Commit b15f0ae3 authored by April Novak's avatar April Novak

Correct example and accidentally-versioned file.

parent 03818e95
......@@ -19,6 +19,10 @@
[Problem]
type = NekRSProblem
minimize_transfers_in = true
transfer_in = synchronize
minimize_transfers_out = true
[]
[Executioner]
......@@ -38,6 +42,9 @@
[flux_integral] # this receives the total heat flux for normalization
type = Receiver
[]
[synchronize]
type = Receiver
[]
# This is the heat flux in the nekRS solution, i.e. it is not an integral
# of nrs->usrwrk, instead this is directly an integral of k*grad(T)*hat(n).
......
[Mesh]
# make a mesh of a single pincell
[circle]
type = AnnularMeshGenerator
nr = 20
nt = 20
rmin = 0
rmax = 0.0033
growth_r = -1.3
[]
[cylinder]
type = FancyExtruderGenerator
input = circle
heights = '0.150'
num_layers = '20'
direction = '0 0 1'
[]
# and then translate it to all the locations where there are pins
[combine]
type = CombinerGenerator
inputs = cylinder
positions = '
+0.00000000 +0.00000000 +0.00000000
+0.00414000 +0.00717069 +0.00000000
-0.00414000 +0.00717069 +0.00000000
-0.00828000 +0.00000000 +0.00000000
-0.00414000 -0.00717069 +0.00000000
+0.00414000 -0.00717069 +0.00000000
+0.00828000 +0.00000000 +0.00000000'
[]
# make sure the mesh lines up with nekRS mesh, which is centered on (0, 0, 0)
[translate]
type = TransformGenerator
transform = translate
vector_value = '0 0 -0.075'
input = combine
[]
[]
[Variables]
[temperature]
initial_condition = 500.0
[]
[]
[Kernels]
[diffusion]
type = HeatConduction
variable = temperature
diffusion_coefficient = thermal_conductivity
[]
[source]
type = CoupledForce
variable = temperature
v = source
[]
[]
[BCs]
[interface]
type = MatchedValueBC
variable = temperature
v = nek_temp
boundary = '1'
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.05
nl_abs_tol = 1e-8
[]
[MultiApps]
[nek]
type = TransientMultiApp
app_type = NekApp
input_files = 'nek.i'
sub_cycling = true
execute_on = timestep_end
[]
[]
[Transfers]
[temperature]
type = MultiAppNearestNodeTransfer
source_variable = temp
direction = from_multiapp
multi_app = nek
variable = nek_temp
[]
[flux]
type = MultiAppNearestNodeTransfer
source_variable = flux
direction = to_multiapp
multi_app = nek
variable = avg_flux
source_boundary = '1'
[]
[flux_integral]
type = MultiAppPostprocessorTransfer
to_postprocessor = flux_integral
direction = to_multiapp
from_postprocessor = flux_integral
multi_app = nek
[]
[synchronization_to_nek]
type = MultiAppPostprocessorTransfer
direction = to_multiapp
to_postprocessor = synchronization_in
from_postprocessor = synchronization_to_nek
multi_app = nek
[]
[]
[AuxVariables]
[flux]
family = MONOMIAL
order = CONSTANT
[]
[nek_temp]
initial_condition = 628.15
[]
[source]
initial_condition = 1e9
[]
[]
[AuxKernels]
[flux]
type = NormalDiffusionFluxAux
variable = flux
coupled = temperature
diffusivity = thermal_conductivity
boundary = '1'
[]
[]
[Materials]
[k]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '1.5'
[]
[]
[Postprocessors]
active = 'flux_integral synchronization_to_nek'
[flux_integral]
type = SideIntegralVariablePostprocessor
variable = flux
boundary = '1'
[]
[max_temp_bison]
type = NodalExtremeValue
variable = temperature
value_type = max
[]
[min_temp_bison]
type = NodalExtremeValue
variable = temperature
value_type = min
[]
[max_temp_interface]
type = NodalExtremeValue
variable = nek_temp
value_type = max
[]
[min_temp_interface]
type = NodalExtremeValue
variable = nek_temp
value_type = min
[]
[power]
type = ElementIntegralVariablePostprocessor
variable = source
[]
[synchronization_to_nek]
type = Receiver
default = 1
[]
[]
[Outputs]
exodus = true
print_linear_residuals = false
[]
......@@ -265,6 +265,10 @@ Fp = 1.0
value_type = max
block = '10'
[]
[synchronize]
type = Receiver
default = 1
[]
[]
# run nekRS (with a problem defined in the nek.i file) on the end of each solid timestep
......@@ -286,6 +290,7 @@ Fp = 1.0
direction = from_multiapp
multi_app = nek
variable = nek_temp
fixed_meshes = true
[]
[avg_flux] # sends heat flux in avg_flux to nekRS
type = MultiAppNearestNodeTransfer
......@@ -293,6 +298,7 @@ Fp = 1.0
direction = to_multiapp
multi_app = nek
variable = avg_flux
fixed_meshes = true
[]
[flux_integral_to_nek] # sends the heat flux integral (for normalization) to nekRS
type = MultiAppPostprocessorTransfer
......@@ -301,6 +307,13 @@ Fp = 1.0
from_postprocessor = flux_integral
multi_app = nek
[]
[synchronize]
type = MultiAppPostprocessorTransfer
to_postprocessor = synchronize
direction = to_multiapp
from_postprocessor = synchronize
multi_app = nek
[]
[]
[AuxVariables]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment