- boundaryThe list of boundary IDs from the mesh where this object applies
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The list of boundary IDs from the mesh where this object applies
- hThe convective heat transfer coefficient. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.
C++ Type:MooseFunctorName
Unit:(no unit assumed)
Controllable:No
Description:The convective heat transfer coefficient. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.
- incoming_fluxThe incoming diffusive flux on the interface. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.
C++ Type:MooseFunctorName
Unit:(no unit assumed)
Controllable:No
Description:The incoming diffusive flux on the interface. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.
- surface_temperatureThe prescribed temperature on the interface. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.
C++ Type:MooseFunctorName
Unit:(no unit assumed)
Controllable:No
Description:The prescribed temperature on the interface. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.
- thermal_conductivityThe thermal conductivity of the material. Only used to compute the pure normal gradient of the variable on the boundary. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.
C++ Type:MooseFunctorName
Unit:(no unit assumed)
Controllable:No
Description:The thermal conductivity of the material. Only used to compute the pure normal gradient of the variable on the boundary. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.
- variableThe name of the variable that this boundary condition applies to
C++ Type:LinearVariableName
Unit:(no unit assumed)
Controllable:No
Description:The name of the variable that this boundary condition applies to
LinearFVRobinCHTBC
Description
This object is a boundary condition used in the Navier-Stokes module that can be used for conjugate heat transfer (CHT) problems. Its role is to enforce a Robin-type boundary condition at an interface where heat is exchanged between solid and fluid regions. It is similar in behavior to LinearFVAdvectionDiffusionFunctorRobinBC with the coefficients in the expression aligned with the thermal-hydraulics fields. For more information on the design of CHT, see the CHT capability page.
This boundary condition needs an incoming flux which is typically provided by the SIMPLE-type executioner when conjugate heat transfer is enabled. The automatically created functors within SIMPLE are:
heat_flux_to_solid_* (where * is the interface boundary name)
heat_flux_to_fluid_* (where * is the interface boundary name)
When this boundary condition is action on the fluid side the user is recommended to set "incoming_flux" parameter to the heat_flux_to_fluid functor. The same logic applies to the solid side. Furthermore, this boundary condition also requires a surface temperature which is typically the surface temperature on the other side of the interface. The interface temperatures are also tracked in fuctors and are created within the SIMPLE executioner. The following surface termperatures are created automatically:
interface_temperature_solid_* (where * is the interface boundary name)
interface_temperature_fluid_* (where * is the interface boundary name)
The element side to use for the incoming-flux and surface-temperature functor is inferred.
[LinearFVBCs<<<{"href": "../../syntax/LinearFVBCs/index.html"}>>>]
[fluid_solid]
type = LinearFVRobinCHTBC<<<{"description": "Conjugate heat transfer BC for Robin boundary condition-based coupling.", "href": "LinearFVRobinCHTBC.html"}>>>
variable<<<{"description": "The name of the variable that this boundary condition applies to"}>>> = T_fluid
boundary<<<{"description": "The list of boundary IDs from the mesh where this object applies"}>>> = interface
h<<<{"description": "The convective heat transfer coefficient. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number."}>>> = ${h_f}
incoming_flux<<<{"description": "The incoming diffusive flux on the interface. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number."}>>> = heat_flux_to_fluid_interface
surface_temperature<<<{"description": "The prescribed temperature on the interface. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number."}>>> = interface_temperature_to_fluid_interface
thermal_conductivity<<<{"description": "The thermal conductivity of the material. Only used to compute the pure normal gradient of the variable on the boundary. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number."}>>> = ${k}
[]
[solid_fluid]
type = LinearFVRobinCHTBC<<<{"description": "Conjugate heat transfer BC for Robin boundary condition-based coupling.", "href": "LinearFVRobinCHTBC.html"}>>>
variable<<<{"description": "The name of the variable that this boundary condition applies to"}>>> = T_solid
boundary<<<{"description": "The list of boundary IDs from the mesh where this object applies"}>>> = interface
h<<<{"description": "The convective heat transfer coefficient. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number."}>>> = ${h_s}
incoming_flux<<<{"description": "The incoming diffusive flux on the interface. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number."}>>> = heat_flux_to_solid_interface
surface_temperature<<<{"description": "The prescribed temperature on the interface. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number."}>>> = interface_temperature_to_solid_interface
thermal_conductivity<<<{"description": "The thermal conductivity of the material. Only used to compute the pure normal gradient of the variable on the boundary. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number."}>>> = ${k_s}
[]
[](modules/navier_stokes/test/tests/finite_volume/ins/cht/conjugate_heat_transfer/cht_rob-rob.i)Input Parameters
- absolute_value_vector_tagsThe tags for the vectors this residual object should fill with the absolute value of the residual contribution
C++ Type:std::vector<TagName>
Controllable:No
Description:The tags for the vectors this residual object should fill with the absolute value of the residual contribution
- extra_matrix_tagsThe extra tags for the matrices this Kernel should fill
C++ Type:std::vector<TagName>
Controllable:No
Description:The extra tags for the matrices this Kernel should fill
- extra_vector_tagsThe extra tags for the vectors this Kernel should fill
C++ Type:std::vector<TagName>
Controllable:No
Description:The extra tags for the vectors this Kernel should fill
- matrix_onlyFalseWhether this object is only doing assembly to matrices (no vectors)
Default:False
C++ Type:bool
Controllable:No
Description:Whether this object is only doing assembly to matrices (no vectors)
- matrix_tagssystemThe tag for the matrices this Kernel should fill
Default:system
C++ Type:MultiMooseEnum
Options:nontime, system
Controllable:No
Description:The tag for the matrices this Kernel should fill
- vector_tagsrhsThe tag for the vectors this Kernel should fill
Default:rhs
C++ Type:MultiMooseEnum
Options:rhs, time
Controllable:No
Description:The tag for the vectors this Kernel should fill
Contribution To Tagged Field Data Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- implicitTrueDetermines whether this object is calculated using an implicit or explicit form
Default:True
C++ Type:bool
Controllable:No
Description:Determines whether this object is calculated using an implicit or explicit form
- search_methodnearest_node_connected_sidesChoice of search algorithm. All options begin by finding the nearest node in the primary boundary to a query point in the secondary boundary. In the default nearest_node_connected_sides algorithm, primary boundary elements are searched iff that nearest node is one of their nodes. This is fast to determine via a pregenerated node-to-elem map and is robust on conforming meshes. In the optional all_proximate_sides algorithm, primary boundary elements are searched iff they touch that nearest node, even if they are not topologically connected to it. This is more CPU-intensive but is necessary for robustness on any boundary surfaces which has disconnections (such as Flex IGA meshes) or non-conformity (such as hanging nodes in adaptively h-refined meshes).
Default:nearest_node_connected_sides
C++ Type:MooseEnum
Options:nearest_node_connected_sides, all_proximate_sides
Controllable:No
Description:Choice of search algorithm. All options begin by finding the nearest node in the primary boundary to a query point in the secondary boundary. In the default nearest_node_connected_sides algorithm, primary boundary elements are searched iff that nearest node is one of their nodes. This is fast to determine via a pregenerated node-to-elem map and is robust on conforming meshes. In the optional all_proximate_sides algorithm, primary boundary elements are searched iff they touch that nearest node, even if they are not topologically connected to it. This is more CPU-intensive but is necessary for robustness on any boundary surfaces which has disconnections (such as Flex IGA meshes) or non-conformity (such as hanging nodes in adaptively h-refined meshes).
Advanced Parameters
Input Files
- (modules/navier_stokes/test/tests/finite_volume/ins/radiation_s2s/diff_heated_cavity_slabs_cht.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/radiation_participating_media/p1_radiation_cht_SIMPLE.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/cht/conjugate_heat_transfer/cht_neu-dir.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/cht/conjugate_heat_transfer/cht_thermal_resistance.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/radiation_s2s/two_slabs_cht_s2s_analytic.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/cht/conjugate_heat_transfer/cht_rob-rob.i)
incoming_flux
C++ Type:MooseFunctorName
Unit:(no unit assumed)
Controllable:No
Description:The incoming diffusive flux on the interface. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.
(modules/navier_stokes/test/tests/finite_volume/ins/cht/conjugate_heat_transfer/cht_rob-rob.i)
### benchmark sources:
### https://doi.org/10.1016/j.compfluid.2018.06.016
### https://doi.org/10.1016/0017-9310(74)90087-8
b = 0.01 # plate thickness
l = 0.2 # plate length
nxi = 24 # nx in the inlet/entrance region
nyf = 18 # ny in fluid
nxf = 24 # nx in the main fluid region
nys = 8 # ny in the solid domain
fx1_bias = 1.00 # bdry layer bias - fluid
fx2_bias = '${fparse 1.0/1.00}' # bdry layer bias - solid
fy_bias = 1.20 # bdry layer bias - fluid
sy_bias = '${fparse 1.0/1.05}' # bdry layer bias - solid
k_s = 0.2876
rho = 0.3525
mu = 3.95e-5
k = 0.06808
cp = 1142.6
vin = 12.0
Tin = 1000.0
T_s_bottom = 600.0
P_out = 1.03e5
h_s = 1.0
h_f = 1.0
advected_interp_method = 'upwind'
[Mesh]
[fluid_channel]
type = GeneratedMeshGenerator
dim = 2
nx = ${nxf}
ny = ${nyf}
xmin = 0
xmax = ${l}
ymin = 0
ymax = '${fparse 10.0*b}'
subdomain_ids = '1'
subdomain_name = 'fluid'
bias_x = '${fx1_bias}'
bias_y = '${fparse fy_bias}'
boundary_name_prefix = 'fluid'
[]
[solid_base]
type = GeneratedMeshGenerator
dim = 2
nx = ${nxf}
ny = ${nys}
xmin = 0
xmax = ${l}
ymin = '${fparse -b}'
ymax = 0
subdomain_ids = '2'
subdomain_name = 'solid'
bias_x = ${fx1_bias}
bias_y = '${fparse sy_bias}'
boundary_id_offset = 10
boundary_name_prefix = 'solid'
[]
[entrance]
type = GeneratedMeshGenerator
dim = 2
nx = '${fparse 2.0*nxi}'
ny = ${nyf}
xmin = '${fparse -2.0*l}'
xmax = 0
ymin = 0
ymax = '${fparse 10.0*b}'
subdomain_ids = '0'
subdomain_name = 'entrance'
bias_x = ${fx2_bias}
bias_y = '${fparse fy_bias}'
boundary_id_offset = 20
boundary_name_prefix = 'ent'
[]
[smg]
type = StitchedMeshGenerator
inputs = 'entrance fluid_channel solid_base'
stitch_boundaries_pairs = 'ent_right fluid_left;
fluid_bottom solid_top'
prevent_boundary_ids_overlap = false
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'smg'
primary_block = 'fluid'
paired_block = 'solid'
new_boundary = interface
[]
[symmetry_transform]
type = SymmetryTransformGenerator
input = interface
mirror_point = '0 0 0'
mirror_normal_vector = '0 1 0'
[]
inactive = 'symmetry_transform'
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system energy_system solid_energy_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
block = '0 1'
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = ${vin}
solver_sys = u_system
block = '0 1'
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
block = '0 1'
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = ${P_out}
block = '0 1'
[]
[T_fluid]
type = MooseLinearVariableFVReal
solver_sys = energy_system
initial_condition = ${Tin}
block = '0 1'
[]
[T_solid]
type = MooseLinearVariableFVReal
solver_sys = solid_energy_system
initial_condition = ${T_s_bottom}
block = 2
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[h_advection]
type = LinearFVEnergyAdvection
variable = T_fluid
advected_quantity = temperature
cp = ${cp}
advected_interp_method = ${advected_interp_method}
rhie_chow_user_object = 'rc'
[]
[conduction]
type = LinearFVDiffusion
variable = T_fluid
diffusion_coeff = ${k}
use_nonorthogonal_correction = false
[]
[solid-conduction]
type = LinearFVDiffusion
variable = T_solid
diffusion_coeff = ${k_s}
use_nonorthogonal_correction = false
[]
[]
[LinearFVBCs]
# velocity BCs
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_left'
variable = vel_x
functor = ${vin}
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_left'
variable = vel_y
functor = '0.000'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_bottom interface'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_bottom interface'
variable = vel_y
functor = 0.0
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'fluid_right'
variable = pressure
functor = ${P_out}
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_right'
variable = vel_x
use_two_term_expansion = false
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_right'
variable = vel_y
use_two_term_expansion = false
[]
# freestream BCs for top of fluid domain
[freestream_u]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_top ent_top'
variable = vel_x
use_two_term_expansion = false
[]
[freestream_v]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_top ent_top'
variable = vel_y
use_two_term_expansion = false
[]
[freestream_p]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
boundary = 'fluid_top ent_top'
variable = pressure
functor = 0
[]
# temperature BCs
[inlet_T]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_fluid
functor = ${Tin}
boundary = 'ent_left'
[]
[heated_wall_solid]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_solid
functor = ${T_s_bottom}
boundary = 'solid_bottom'
[]
[insulated_fluid]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
variable = T_fluid
functor = 0
boundary = 'ent_top ent_bottom fluid_top'
[]
[insulated_solid]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
variable = T_solid
functor = 0
boundary = 'solid_left solid_right'
[]
[outlet_T]
type = LinearFVAdvectionDiffusionOutflowBC
variable = T_fluid
use_two_term_expansion = false
boundary = 'fluid_right'
[]
[fluid_solid]
type = LinearFVRobinCHTBC
variable = T_fluid
boundary = interface
h = ${h_f}
incoming_flux = heat_flux_to_fluid_interface
surface_temperature = interface_temperature_to_fluid_interface
thermal_conductivity = ${k}
[]
[solid_fluid]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = interface
h = ${h_s}
incoming_flux = heat_flux_to_solid_interface
surface_temperature = interface_temperature_to_solid_interface
thermal_conductivity = ${k_s}
[]
[]
[FunctorMaterials]
[rhocpT]
property_name = 'rhocpT'
type = ParsedFunctorMaterial
functor_names = 'T_fluid'
expression = '${rho}*${cp}*T_fluid'
[]
[]
[Postprocessors]
[h_in]
type = VolumetricFlowRate
boundary = 'ent_left'
vel_x = vel_x
vel_y = vel_y
rhie_chow_user_object = rc
advected_quantity = 'rhocpT'
subtract_mesh_velocity = false
[]
[h_out]
type = VolumetricFlowRate
boundary = 'fluid_right fluid_top ent_top interface'
vel_x = vel_x
vel_y = vel_y
rhie_chow_user_object = rc
advected_quantity = 'rhocpT'
advected_interp_method = upwind
subtract_mesh_velocity = false
[]
[]
[VectorPostprocessors]
[y_vs_ts]
type = LineValueSampler
variable = 'T_solid'
start_point = '0.05 -1e-9 0' # making sure we are always in the domain
end_point = '0.05 ${fparse -b+1e-9} 0'
num_points = 8
sort_by = id
warn_discontinuous_face_values = false
[]
[y_vs_tf]
type = LineValueSampler
variable = 'T_fluid'
start_point = '0.05 1e-9 0' # making sure we are always in the domain
end_point = '0.05 ${fparse b-1e-9} 0'
num_points = 12
sort_by = id
warn_discontinuous_face_values = false
[]
[]
[Executioner]
type = SIMPLE
num_iterations = 1000
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
rhie_chow_user_object = 'rc'
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
momentum_equation_relaxation = 0.9
pressure_variable_relaxation = 0.3
momentum_absolute_tolerance = 1e-7
pressure_absolute_tolerance = 1e-7
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
energy_system = 'energy_system'
solid_energy_system = 'solid_energy_system'
energy_l_abs_tol = 1e-10
solid_energy_l_abs_tol = 1e-10
energy_l_tol = 0
solid_energy_l_tol = 0
energy_equation_relaxation = 1.0
energy_absolute_tolerance = 1e-7
solid_energy_absolute_tolerance = 1e-7
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
solid_energy_petsc_options_iname = '-pc_type -pc_hypre_type'
solid_energy_petsc_options_value = 'hypre boomeramg'
cht_interfaces = 'interface'
cht_solid_flux_relaxation = 1.0
cht_fluid_flux_relaxation = 1.0
cht_solid_temperature_relaxation = 1.0
cht_fluid_temperature_relaxation = 1.0
max_cht_fpi = 2
print_fields = false
[]
[Outputs]
exodus = true
csv = true
execute_on = timestep_end
[]
(modules/navier_stokes/test/tests/finite_volume/ins/radiation_s2s/diff_heated_cavity_slabs_cht.i)
# Differentially heated cavity with conducting slabs on the left and right.
#
# Domain layout:
#
# T = 880 K fluid cavity T = 870 K
# | left slab | 0 < x < 1 | right slab |
# | -d < x < 0 | | 1 < x < 1+d |
#
# The prescribed temperatures are applied only to the OUTER slab faces.
# The left/right cavity surfaces use linear-FV CHT, and the top/bottom cavity
# walls are externally adiabatic.
#
# As written, this input solves the case without radiation. The radiation case
# activates the inactive objects below and sets
# Executioner/surface_radiation_object_name = gray_lambert, which passes the
# surface-to-surface radiation into CHTHandler. The conductive heat flux on the
# top/bottom walls is then balanced by LinearFVGrayLambertBC.
################################################################################
# MATERIAL PROPERTIES AND GEOMETRY
################################################################################
rho = 3279.0
T_0 = 875.0
T_hot = 880.0
T_cold = 870.0
mu = 1.0
k_fluid = 38.0
k_solid = 38.0
cp = 640.0
alpha = 3.26e-5
eps = 1.0
slab_thickness = 0.10
# Coarsest mesh on which SIMPLE converges for this problem; a 10x10 fluid mesh
# stalls with momentum residuals near 0.5.
n_slab_x = 4
n_fluid_x = 20
n_y = 20
rad_left = 'left_0 left_1 left_2 left_3 left_4'
rad_right = 'right_0 right_1 right_2 right_3 right_4'
rad_top = 'top_0 top_1 top_2 top_3 top_4'
rad_bottom = 'bottom_0 bottom_1 bottom_2 bottom_3 bottom_4'
rad_cht = '${rad_left} ${rad_right}'
rad_noncht = '${rad_top} ${rad_bottom}'
rad_all = '${rad_left} ${rad_right} ${rad_top} ${rad_bottom}'
walls = ${rad_all}
[GlobalParams]
rhie_chow_user_object = ins_rhie_chow_interpolator
advected_interp_method = upwind
u = vel_x
v = vel_y
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system energy_system solid_energy_system'
previous_nl_solution_required = true
[]
################################################################################
# GEOMETRY
################################################################################
[Mesh]
type = MeshGeneratorMesh
parallel_type = replicated
# A single generator gives a conforming mesh across both CHT interfaces.
[base]
type = CartesianMeshGenerator
dim = 2
dx = '${slab_thickness} 1.0 ${slab_thickness}'
ix = '${n_slab_x} ${n_fluid_x} ${n_slab_x}'
dy = '1.0'
iy = '${n_y}'
subdomain_id = '1 0 2'
[]
# Keep the fluid cavity at 0 <= x <= 1.
[shift]
type = TransformGenerator
input = base
transform = TRANSLATE
vector_value = '${fparse -slab_thickness} 0 0'
[]
[rename_blocks]
type = RenameBlockGenerator
input = shift
old_block = '0 1 2'
new_block = 'fluid left_solid right_solid'
[]
# Reserve left/right/top/bottom for the four surfaces of the cavity.
[rename_exterior]
type = RenameBoundaryGenerator
input = rename_blocks
old_boundary = 'left right bottom top'
new_boundary = 'left_outer right_outer whole_bottom whole_top'
[]
# Put the internal sidesets on fluid elements so gray_lambert can sample
# T_fluid on every surface in its boundary list.
[left_interface]
type = SideSetsBetweenSubdomainsGenerator
input = rename_exterior
primary_block = fluid
paired_block = left_solid
new_boundary = left
[]
[right_interface]
type = SideSetsBetweenSubdomainsGenerator
input = left_interface
primary_block = fluid
paired_block = right_solid
new_boundary = right
[]
# Re-create separate exterior horizontal sidesets for each block.
[cavity_horizontal]
type = SideSetsFromNormalsGenerator
input = right_interface
normals = '0 -1 0
0 1 0'
fixed_normal = true
included_subdomains = fluid
new_boundary = 'bottom top'
[]
[left_slab_horizontal]
type = SideSetsFromNormalsGenerator
input = cavity_horizontal
normals = '0 -1 0
0 1 0'
fixed_normal = true
included_subdomains = left_solid
new_boundary = 'left_solid_bottom left_solid_top'
[]
[right_slab_horizontal]
type = SideSetsFromNormalsGenerator
input = left_slab_horizontal
normals = '0 -1 0
0 1 0'
fixed_normal = true
included_subdomains = right_solid
new_boundary = 'right_solid_bottom right_solid_top'
[]
# Patch every radiating surface. This allows the wall temperature and
# radiative heat flux to vary along each side of the cavity.
[patch_left]
type = PatchSidesetGenerator
input = right_slab_horizontal
boundary = left
n_patches = 5
partitioner = centroid
centroid_partitioner_direction = y
[]
[patch_right]
type = PatchSidesetGenerator
input = patch_left
boundary = right
n_patches = 5
partitioner = centroid
centroid_partitioner_direction = y
[]
[patch_top]
type = PatchSidesetGenerator
input = patch_right
boundary = top
n_patches = 5
partitioner = centroid
centroid_partitioner_direction = x
[]
[patch_bottom]
type = PatchSidesetGenerator
input = patch_top
boundary = bottom
n_patches = 5
partitioner = centroid
centroid_partitioner_direction = x
[]
# PatchSidesetGenerator retains its parent sideset. Remove the parents so
# each face has only its patch boundary for radiation and CHT bookkeeping.
[delete_unpatched_parents]
type = BoundaryDeletionGenerator
input = patch_bottom
boundary_names = 'left right top bottom whole_top whole_bottom'
[]
final_generator = delete_unpatched_parents
[]
################################################################################
# USER OBJECTS: RHIE-CHOW AND SURFACE-TO-SURFACE RADIATION
################################################################################
[UserObjects]
# Activated for the radiation case
inactive = 'view_factor gray_lambert'
[ins_rhie_chow_interpolator]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
block = fluid
[]
# The enclosure is convex and unobstructed. This deterministic view-factor
# object also avoids ray-orientation ambiguity on the internal CHT sidesets.
[view_factor]
type = UnobstructedPlanarViewFactor
boundary = ${rad_all}
normalize_view_factor = true
execute_on = INITIAL
[]
[gray_lambert]
type = ViewFactorObjectSurfaceRadiation
boundary = ${rad_all}
# There are no fixed-temperature or radiatively adiabatic surfaces here.
# All 20 surfaces obtain their current temperature from T_fluid.
emissivity = '${eps} ${eps} ${eps} ${eps} ${eps}
${eps} ${eps} ${eps} ${eps} ${eps}
${eps} ${eps} ${eps} ${eps} ${eps}
${eps} ${eps} ${eps} ${eps} ${eps}'
temperature = T_fluid
view_factor_object_name = view_factor
# Refreshes radiation during the SIMPLE/CHT Picard loop. The handler uses
# the most recently assembled radiation state (one fluid-energy solve lag).
execute_on = 'NONLINEAR TIMESTEP_END'
[]
[]
################################################################################
# VARIABLES
################################################################################
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
solver_sys = u_system
block = fluid
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
block = fluid
[]
[pressure]
type = MooseLinearVariableFVReal
initial_condition = 0
solver_sys = pressure_system
block = fluid
[]
[T_fluid]
type = MooseLinearVariableFVReal
solver_sys = energy_system
initial_condition = ${T_0}
block = fluid
[]
# A single solid system/variable is used on the two disconnected slabs,
# as required by the current linear-FV CHTHandler.
[T_solid]
type = MooseLinearVariableFVReal
solver_sys = solid_energy_system
initial_condition = ${T_0}
block = 'left_solid right_solid'
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
################################################################################
# LINEAR-FV EQUATIONS
################################################################################
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = upwind
mu = ${mu}
momentum_component = x
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = x
[]
[u_buoyancy]
type = LinearFVMomentumBoussinesq
variable = vel_x
T_fluid = T_fluid
gravity = '0 -9.81 0'
rho = ${rho}
ref_temperature = ${T_0}
alpha_name = alpha_b
momentum_component = x
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = upwind
mu = ${mu}
momentum_component = y
use_nonorthogonal_correction = false
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = y
[]
[v_buoyancy]
type = LinearFVMomentumBoussinesq
variable = vel_y
T_fluid = T_fluid
gravity = '0 -9.81 0'
rho = ${rho}
ref_temperature = ${T_0}
alpha_name = alpha_b
momentum_component = y
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = false
[]
[fluid_heat_advection]
type = LinearFVEnergyAdvection
variable = T_fluid
advected_quantity = temperature
cp = ${cp}
[]
[fluid_conduction]
type = LinearFVDiffusion
variable = T_fluid
diffusion_coeff = ${k_fluid}
use_nonorthogonal_correction = false
[]
# CHTHandler expects exactly one solid conduction kernel in the solid
# energy system, so this one kernel covers both slabs.
[solid_conduction]
type = LinearFVDiffusion
variable = T_solid
diffusion_coeff = ${k_solid}
use_nonorthogonal_correction = false
[]
[]
################################################################################
# LINEAR-FV BOUNDARY CONDITIONS
################################################################################
[LinearFVBCs]
# Activated for the radiation case
inactive = 'radiation_top_bottom'
[no_slip_u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = vel_x
boundary = ${walls}
functor = 0
[]
[no_slip_v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = vel_y
boundary = ${walls}
functor = 0
[]
[pressure_walls]
type = LinearFVPressureFluxBC
boundary = ${walls}
variable = pressure
HbyA_flux = HbyA
Ainv = Ainv
u = vel_x
v = vel_y
rho = ${rho}
[]
# Prescribe temperature only on the exterior faces of the slabs.
[left_outer_temperature]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_solid
boundary = left_outer
functor = ${T_hot}
[]
[right_outer_temperature]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_solid
boundary = right_outer
functor = ${T_cold}
[]
[insulated_slab_horizontal_faces]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
variable = T_solid
boundary = 'left_solid_bottom left_solid_top right_solid_bottom right_solid_top'
functor = 0
[]
# Without radiation, the top/bottom cavity walls are adiabatic. The radiation
# case replaces this BC with radiation_top_bottom.
[adiabatic_top_bottom]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
variable = T_fluid
boundary = ${rad_noncht}
functor = 0
[]
# Radiation is imposed directly only on the non-CHT top/bottom walls.
# Do not add these boundaries to adiabatic_boundary in gray_lambert:
# this BC makes their conductive flux balance their radiative flux.
[radiation_top_bottom]
type = LinearFVGrayLambertBC
variable = T_fluid
temperature_radiation = T_fluid
coeff_diffusion = ${k_fluid}
surface_radiation_object_name = gray_lambert
boundary = ${rad_noncht}
[]
# Neumann-Dirichlet CHT. Each patch needs its own pair because CHTHandler
# creates boundary-specific temperature and heat-flux functors.
# ---- left slab / fluid interface -----------------------------------------
[fluid_left_0]
type = LinearFVDirichletCHTBC
variable = T_fluid
boundary = left_0
functor = interface_temperature_to_fluid_left_0
[]
[solid_left_0]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = left_0
h = 0
thermal_conductivity = ${k_solid}
incoming_flux = heat_flux_to_solid_left_0
surface_temperature = interface_temperature_to_solid_left_0
[]
[fluid_left_1]
type = LinearFVDirichletCHTBC
variable = T_fluid
boundary = left_1
functor = interface_temperature_to_fluid_left_1
[]
[solid_left_1]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = left_1
h = 0
thermal_conductivity = ${k_solid}
incoming_flux = heat_flux_to_solid_left_1
surface_temperature = interface_temperature_to_solid_left_1
[]
[fluid_left_2]
type = LinearFVDirichletCHTBC
variable = T_fluid
boundary = left_2
functor = interface_temperature_to_fluid_left_2
[]
[solid_left_2]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = left_2
h = 0
thermal_conductivity = ${k_solid}
incoming_flux = heat_flux_to_solid_left_2
surface_temperature = interface_temperature_to_solid_left_2
[]
[fluid_left_3]
type = LinearFVDirichletCHTBC
variable = T_fluid
boundary = left_3
functor = interface_temperature_to_fluid_left_3
[]
[solid_left_3]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = left_3
h = 0
thermal_conductivity = ${k_solid}
incoming_flux = heat_flux_to_solid_left_3
surface_temperature = interface_temperature_to_solid_left_3
[]
[fluid_left_4]
type = LinearFVDirichletCHTBC
variable = T_fluid
boundary = left_4
functor = interface_temperature_to_fluid_left_4
[]
[solid_left_4]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = left_4
h = 0
thermal_conductivity = ${k_solid}
incoming_flux = heat_flux_to_solid_left_4
surface_temperature = interface_temperature_to_solid_left_4
[]
# ---- right slab / fluid interface ----------------------------------------
[fluid_right_0]
type = LinearFVDirichletCHTBC
variable = T_fluid
boundary = right_0
functor = interface_temperature_to_fluid_right_0
[]
[solid_right_0]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = right_0
h = 0
thermal_conductivity = ${k_solid}
incoming_flux = heat_flux_to_solid_right_0
surface_temperature = interface_temperature_to_solid_right_0
[]
[fluid_right_1]
type = LinearFVDirichletCHTBC
variable = T_fluid
boundary = right_1
functor = interface_temperature_to_fluid_right_1
[]
[solid_right_1]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = right_1
h = 0
thermal_conductivity = ${k_solid}
incoming_flux = heat_flux_to_solid_right_1
surface_temperature = interface_temperature_to_solid_right_1
[]
[fluid_right_2]
type = LinearFVDirichletCHTBC
variable = T_fluid
boundary = right_2
functor = interface_temperature_to_fluid_right_2
[]
[solid_right_2]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = right_2
h = 0
thermal_conductivity = ${k_solid}
incoming_flux = heat_flux_to_solid_right_2
surface_temperature = interface_temperature_to_solid_right_2
[]
[fluid_right_3]
type = LinearFVDirichletCHTBC
variable = T_fluid
boundary = right_3
functor = interface_temperature_to_fluid_right_3
[]
[solid_right_3]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = right_3
h = 0
thermal_conductivity = ${k_solid}
incoming_flux = heat_flux_to_solid_right_3
surface_temperature = interface_temperature_to_solid_right_3
[]
[fluid_right_4]
type = LinearFVDirichletCHTBC
variable = T_fluid
boundary = right_4
functor = interface_temperature_to_fluid_right_4
[]
[solid_right_4]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = right_4
h = 0
thermal_conductivity = ${k_solid}
incoming_flux = heat_flux_to_solid_right_4
surface_temperature = interface_temperature_to_solid_right_4
[]
[]
[FunctorMaterials]
[constant_fluid_functors]
type = GenericFunctorMaterial
# block = fluid
prop_names = 'cp alpha_b'
prop_values = '${cp} ${alpha}'
[]
[]
################################################################################
# DIAGNOSTICS
################################################################################
[VectorPostprocessors]
# Activated for the radiation case
inactive = 'surface_radiation'
[surface_radiation]
type = SurfaceRadiationVectorPostprocessor
surface_radiation_object_name = gray_lambert
information = 'temperature emissivity radiosity heat_flux_density'
execute_on = TIMESTEP_END
[]
[]
################################################################################
# EXECUTION / SOLVE
################################################################################
# CHTHandler requires one value per entry in rad_cht (10 entries here).
cht_relaxation = '0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3'
[Executioner]
type = SIMPLE
rhie_chow_user_object = ins_rhie_chow_interpolator
momentum_systems = 'u_system v_system'
pressure_system = pressure_system
energy_system = energy_system
solid_energy_system = solid_energy_system
momentum_l_abs_tol = 1e-14
pressure_l_abs_tol = 1e-14
energy_l_abs_tol = 1e-14
solid_energy_l_abs_tol = 1e-14
momentum_l_tol = 0
pressure_l_tol = 0
energy_l_tol = 0
solid_energy_l_tol = 0
momentum_equation_relaxation = 0.7
pressure_variable_relaxation = 0.3
energy_equation_relaxation = 0.9
num_iterations = 5000
# Tight enough that the gold files do not depend on the number of MPI ranks.
pressure_absolute_tolerance = 1e-11
momentum_absolute_tolerance = 1e-11
energy_absolute_tolerance = 1e-11
solid_energy_absolute_tolerance = 1e-11
# Activate CHT on every patched slab/cavity interface.
cht_interfaces = ${rad_cht}
cht_solid_flux_relaxation = ${cht_relaxation}
cht_fluid_flux_relaxation = ${cht_relaxation}
cht_solid_temperature_relaxation = ${cht_relaxation}
cht_fluid_temperature_relaxation = ${cht_relaxation}
cht_heat_flux_tolerance = 1e-4
max_cht_fpi = 10
print_fields = false
momentum_l_max_its = 300
pin_pressure = true
pressure_pin_value = 0.0
pressure_pin_point = '0.5 0.5 0.0'
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
solid_energy_petsc_options_iname = '-pc_type -pc_hypre_type'
solid_energy_petsc_options_value = 'hypre boomeramg'
continue_on_max_its = true
# Improves the numerical integration used by UnobstructedPlanarViewFactor.
[Quadrature]
order = SECOND
[]
[]
################################################################################
# OUTPUTS
################################################################################
[Outputs]
exodus = true
csv = true
execute_on = TIMESTEP_END
[]
(modules/navier_stokes/test/tests/finite_volume/ins/radiation_participating_media/p1_radiation_cht_SIMPLE.i)
# Coupled conduction and radiative heat transfer test in the linear FV system using the SIMPLE executioner.
# A 1D P1 radiation model is solved in the fluid region. Energy is solved in the
# fluid and solid region using two different variables. The radiative and conductive flux
# is maintained at the fluid-solid interface using conjugate heat transfer, Robin BCs for
# the solid side and Dirichlet BCs for the fluid side. Fixed temperatures are set at the solid and
# fluid external boundaries.
### Benchmark sources:
### https://hal.science/hal-02070285/document
nx = 10
Tw_left = 1.0
Tw_right = 0.0
sigma = 5.670374419e-8
sigma_a = 1.0
N = 0.1 # Stark number N = k sigma_a / (4*sigma*pow(T_w,3))
k_salt = ${fparse N*4*sigma*pow(Tw_left,3)/sigma_a}
k_solid = ${fparse 4.0*k_salt}
diffusion_coef = ${fparse 1/(3*sigma_a)}
b_eps = 1.0
rho = 1.
mu = 5.
h_s = 0.0
advected_interp_method = 'upwind'
[Mesh]
[salt_mesh]
type = GeneratedMeshGenerator
dim = 1
nx = ${nx}
xmin = 0
xmax = 1
subdomain_ids = 0
[]
[solid_mesh]
type = GeneratedMeshGenerator
dim = 1
nx = ${nx}
xmin = 1
xmax = 2
subdomain_ids = 1
[]
[give_name_solid]
type = RenameBlockGenerator
input = solid_mesh
old_block = 1
new_block = 'solid'
[]
[give_name_salt]
type = RenameBlockGenerator
input = salt_mesh
old_block = 0
new_block = 'salt'
[]
[stitch]
type = StitchMeshGenerator
inputs = 'give_name_salt give_name_solid'
stitch_boundaries_pairs = 'right left'
[]
[interface]
input = stitch
type = SideSetsBetweenSubdomainsGenerator
primary_block = 'solid'
paired_block = 'salt'
new_boundary = interface
[]
# Prevent test diffing on distributed parallel element numbering
allow_renumbering = false
[]
[Problem]
linear_sys_names = 'u_system pressure_system energy_system solid_energy_system radiation_system '
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
block = 'salt'
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 1e-6
solver_sys = 'u_system'
block = 'salt'
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = 'pressure_system'
initial_condition = 1e-6
block = 'salt'
[]
[T_fluid]
type = MooseLinearVariableFVReal
solver_sys = 'energy_system'
initial_condition = ${fparse Tw_left/2}
block = 'salt'
[]
[G]
type = MooseLinearVariableFVReal
solver_sys = 'radiation_system'
initial_condition = ${fparse 4*sigma*pow(Tw_left/2,4)}
block = 'salt'
[]
[T_solid]
type = MooseLinearVariableFVReal
solver_sys = 'solid_energy_system'
initial_condition = ${fparse Tw_left/2}
block = 'solid'
[]
[]
[Postprocessors]
[T_fluid_iface]
type = ElementalVariableValue
variable = T_fluid
elementid = ${fparse nx-1}
[]
[T_solid_iface]
type = ElementalVariableValue
variable = T_solid
elementid = ${fparse nx}
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[fluid_conduction]
type = LinearFVDiffusion
variable = T_fluid
diffusion_coeff = ${k_salt}
use_nonorthogonal_correction = false
block = salt
[]
[fluid_radiation]
type = LinearFVP1TemperatureSourceSink
variable = T_fluid
G = 'G'
absorption_coeff = ${sigma_a}
block = salt
[]
[G_diffusion]
type = LinearFVDiffusion
variable = G
diffusion_coeff = ${diffusion_coef}
block = salt
[]
[G_source_and_sink]
type = LinearFVP1RadiationSourceSink
variable = G
temperature_radiation = 'T_fluid'
absorption_coeff = ${sigma_a}
block = salt
[]
[solid_conduction]
type = LinearFVDiffusion
variable = T_solid
diffusion_coeff = ${k_solid}
use_nonorthogonal_correction = false
block = solid
[]
[]
[LinearFVBCs]
# velocity BCs
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left interface'
variable = vel_x
functor = 0.0
[]
# temperature BCs
[left_bc_T]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_fluid
boundary = 'left'
functor = ${Tw_left}
[]
[right_bc_T]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_solid
boundary = 'right'
functor = ${Tw_right}
[]
# G
[right_bc_G]
type = LinearFVP1RadiationMarshakBC
boundary = 'interface'
variable = G
temperature_radiation = 'T_fluid'
coeff_diffusion = ${diffusion_coef}
boundary_emissivity = ${b_eps}
[]
[left_bc_G]
type = LinearFVP1RadiationMarshakBC
boundary = 'left'
variable = G
temperature_radiation = ${Tw_left}
coeff_diffusion = ${diffusion_coef}
boundary_emissivity = ${b_eps}
[]
# cht
[fluid_solid]
type = LinearFVDirichletCHTBC
variable = T_fluid
boundary = interface
functor = interface_temperature_to_fluid_interface
[]
[solid_fluid]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = interface
h = ${h_s}
thermal_conductivity = ${k_solid}
incoming_flux = heat_flux_to_solid_interface
surface_temperature = interface_temperature_to_solid_interface
[]
[]
[Executioner]
type = SIMPLE
num_iterations = 2000
momentum_systems = 'u_system '
pressure_system = 'pressure_system'
rhie_chow_user_object = 'rc'
momentum_l_abs_tol = 1e-8
pressure_l_abs_tol = 1e-7
momentum_l_tol = 0
pressure_l_tol = 0
momentum_equation_relaxation = 0.7
pressure_variable_relaxation = 0.3
momentum_absolute_tolerance = 1e-5
pressure_absolute_tolerance = 1e-5
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
#active_scalar_systems = 'radiation_system'
pm_radiation_systems = 'radiation_system'
energy_system = 'energy_system'
solid_energy_system = 'solid_energy_system'
#active_scalar_l_abs_tol = 1e-14
pm_radiation_l_abs_tol = 1e-11
energy_l_abs_tol = 1e-11
solid_energy_l_abs_tol = 1e-11
#active_scalar_l_tol = 0
pm_radiation_l_tol = 0
energy_l_tol = 0
solid_energy_l_tol = 0
#active_scalar_equation_relaxation = 0.95
pm_radiation_equation_relaxation = 1.0
energy_equation_relaxation = 0.9
energy_absolute_tolerance = 1e-10
solid_energy_absolute_tolerance = 1e-10
#active_scalar_absolute_tolerance = 1e-14
#active_scalar_petsc_options_iname = '-pc_type -pc_hypre_type'
#active_scalar_petsc_options_value = 'hypre boomeramg'
pm_radiation_absolute_tolerance = 1e-10
pm_radiation_petsc_options_iname = '-pc_type -pc_hypre_type'
pm_radiation_petsc_options_value = 'hypre boomeramg'
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
solid_energy_petsc_options_iname = '-pc_type -pc_hypre_type'
solid_energy_petsc_options_value = 'hypre boomeramg'
cht_interfaces = 'interface'
cht_solid_flux_relaxation = 0.3
cht_fluid_flux_relaxation = 0.3
cht_solid_temperature_relaxation = 0.3
cht_fluid_temperature_relaxation = 0.3
cht_heat_flux_tolerance = 1e-4
max_cht_fpi = 10
print_fields = false
continue_on_max_its = true
[]
[Outputs]
csv = true
execute_on = timestep_end
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/cht/conjugate_heat_transfer/cht_neu-dir.i)
### benchmark sources:
### https://doi.org/10.1016/j.compfluid.2018.06.016
### https://doi.org/10.1016/0017-9310(74)90087-8
b = 0.01 # plate thickness
l = 0.2 # plate length
nxi = 24 # nx in the inlet/entrance region
nyf = 18 # ny in fluid
nxf = 24 # nx in the main fluid region
nys = 8 # ny in the solid domain
fx1_bias = 1.00 # bdry layer bias - fluid
fx2_bias = '${fparse 1.0/1.00}' # bdry layer bias - solid
fy_bias = 1.20 # bdry layer bias - fluid
sy_bias = '${fparse 1.0/1.05}' # bdry layer bias - solid
k_s = 0.2876
rho = 0.3525
mu = 3.95e-5
k = 0.06808
cp = 1142.6
vin = 12.0
Tin = 1000.0
T_s_bottom = 600.0
P_out = 1.03e5
h_s = 0.0
advected_interp_method = 'upwind'
[Mesh]
[fluid_channel]
type = GeneratedMeshGenerator
dim = 2
nx = ${nxf}
ny = ${nyf}
xmin = 0
xmax = ${l}
ymin = 0
ymax = '${fparse 10.0*b}'
subdomain_ids = '1'
subdomain_name = 'fluid'
bias_x = '${fx1_bias}'
bias_y = '${fparse fy_bias}'
boundary_name_prefix = 'fluid'
[]
[solid_base]
type = GeneratedMeshGenerator
dim = 2
nx = ${nxf}
ny = ${nys}
xmin = 0
xmax = ${l}
ymin = '${fparse -b}'
ymax = 0
subdomain_ids = '2'
subdomain_name = 'solid'
bias_x = ${fx1_bias}
bias_y = '${fparse sy_bias}'
boundary_id_offset = 10
boundary_name_prefix = 'solid'
[]
[entrance]
type = GeneratedMeshGenerator
dim = 2
nx = '${fparse 2.0*nxi}'
ny = ${nyf}
xmin = '${fparse -2.0*l}'
xmax = 0
ymin = 0
ymax = '${fparse 10.0*b}'
subdomain_ids = '0'
subdomain_name = 'entrance'
bias_x = ${fx2_bias}
bias_y = '${fparse fy_bias}'
boundary_id_offset = 20
boundary_name_prefix = 'ent'
[]
[smg]
type = StitchedMeshGenerator
inputs = 'entrance fluid_channel solid_base'
stitch_boundaries_pairs = 'ent_right fluid_left;
fluid_bottom solid_top'
prevent_boundary_ids_overlap = false
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'smg'
primary_block = 'fluid'
paired_block = 'solid'
new_boundary = interface
[]
[symmetry_transform]
type = SymmetryTransformGenerator
input = interface
mirror_point = '0 0 0'
mirror_normal_vector = '0 1 0'
[]
inactive = 'symmetry_transform'
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system energy_system solid_energy_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
block = '0 1'
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = ${vin}
solver_sys = u_system
block = '0 1'
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
block = '0 1'
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = ${P_out}
block = '0 1'
[]
[T_fluid]
type = MooseLinearVariableFVReal
solver_sys = energy_system
initial_condition = ${Tin}
block = '0 1'
[]
[T_solid]
type = MooseLinearVariableFVReal
solver_sys = solid_energy_system
initial_condition = ${T_s_bottom}
block = 2
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[h_advection]
type = LinearFVEnergyAdvection
variable = T_fluid
advected_quantity = temperature
cp = ${cp}
advected_interp_method = ${advected_interp_method}
rhie_chow_user_object = 'rc'
[]
[conduction]
type = LinearFVDiffusion
variable = T_fluid
diffusion_coeff = ${k}
use_nonorthogonal_correction = false
[]
[solid-conduction]
type = LinearFVDiffusion
variable = T_solid
diffusion_coeff = ${k_s}
use_nonorthogonal_correction = false
[]
[]
[LinearFVBCs]
# velocity BCs
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_left'
variable = vel_x
functor = ${vin}
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_left'
variable = vel_y
functor = '0.000'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_bottom interface'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_bottom interface'
variable = vel_y
functor = 0.0
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'fluid_right'
variable = pressure
functor = ${P_out}
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_right'
variable = vel_x
use_two_term_expansion = false
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_right'
variable = vel_y
use_two_term_expansion = false
[]
# freestream BCs for top of fluid domain
[freestream_u]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_top ent_top'
variable = vel_x
use_two_term_expansion = false
[]
[freestream_v]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_top ent_top'
variable = vel_y
use_two_term_expansion = false
[]
[freestream_p]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
boundary = 'fluid_top ent_top'
variable = pressure
functor = 0
[]
# temperature BCs
[inlet_T]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_fluid
functor = ${Tin}
boundary = 'ent_left'
[]
[heated_wall_solid]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_solid
functor = ${T_s_bottom}
boundary = 'solid_bottom'
[]
[insulated_fluid]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
variable = T_fluid
functor = 0
boundary = 'ent_bottom ent_top fluid_top'
[]
[insulated_solid]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
variable = T_solid
functor = 0
boundary = 'solid_left solid_right'
[]
[outlet_T]
type = LinearFVAdvectionDiffusionOutflowBC
variable = T_fluid
use_two_term_expansion = false
boundary = 'fluid_right'
[]
[fluid_solid]
type = LinearFVDirichletCHTBC
variable = T_fluid
boundary = interface
functor = interface_temperature_to_fluid_interface
[]
[solid_fluid]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = interface
h = ${h_s}
thermal_conductivity = ${k_s}
incoming_flux = heat_flux_to_solid_interface
surface_temperature = interface_temperature_to_solid_interface
[]
[]
[FunctorMaterials]
[rhocpT]
property_name = 'rhocpT'
type = ParsedFunctorMaterial
functor_names = 'T_fluid'
expression = '${rho}*${cp}*T_fluid'
[]
[]
[Postprocessors]
[h_in]
type = VolumetricFlowRate
boundary = 'ent_left'
vel_x = vel_x
vel_y = vel_y
rhie_chow_user_object = rc
advected_quantity = 'rhocpT'
subtract_mesh_velocity = false
[]
[h_out]
type = VolumetricFlowRate
boundary = 'fluid_right fluid_top ent_top interface'
vel_x = vel_x
vel_y = vel_y
rhie_chow_user_object = rc
advected_quantity = 'rhocpT'
advected_interp_method = upwind
subtract_mesh_velocity = false
[]
[]
[VectorPostprocessors]
[y_vs_ts]
type = LineValueSampler
variable = 'T_solid'
start_point = '0.05 -1e-9 0' # making sure we are always in the domain
end_point = '0.05 ${fparse -b+1e-9} 0'
num_points = 8
sort_by = id
warn_discontinuous_face_values = false
[]
[y_vs_tf]
type = LineValueSampler
variable = 'T_fluid'
start_point = '0.05 1e-9 0' # making sure we are always in the domain
end_point = '0.05 ${fparse b-1e-9} 0'
num_points = 12
sort_by = id
warn_discontinuous_face_values = false
[]
[]
[Executioner]
type = SIMPLE
num_iterations = 1000
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
rhie_chow_user_object = 'rc'
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
momentum_equation_relaxation = 0.9
pressure_variable_relaxation = 0.3
momentum_absolute_tolerance = 1e-7
pressure_absolute_tolerance = 1e-7
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
energy_system = 'energy_system'
solid_energy_system = 'solid_energy_system'
energy_l_abs_tol = 1e-10
solid_energy_l_abs_tol = 1e-10
energy_l_tol = 0
solid_energy_l_tol = 0
energy_equation_relaxation = 1.0
energy_absolute_tolerance = 1e-7
solid_energy_absolute_tolerance = 1e-7
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
solid_energy_petsc_options_iname = '-pc_type -pc_hypre_type'
solid_energy_petsc_options_value = 'hypre boomeramg'
cht_interfaces = 'interface'
cht_solid_flux_relaxation = 0.4
cht_fluid_flux_relaxation = 0.4
cht_solid_temperature_relaxation = 0.4
cht_fluid_temperature_relaxation = 0.4
max_cht_fpi = 3
print_fields = false
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(modules/navier_stokes/test/tests/finite_volume/ins/cht/conjugate_heat_transfer/cht_thermal_resistance.i)
# One-dimensional conjugate heat-transfer validation with an area-normalized
# interface thermal resistance. The four mms.run_spatial levels refine the
# initial 10 + 10 element mesh to a final 80 + 80 element mesh.
rho_salt = 2000
cp_salt = 2000
k_salt = 0.6
rho_solid = 2000
cp_solid = 900
k_solid = 10
T_hot = 400
T_cold = 300
R_interface = 0.1
L_solid = 0.5
L_salt = 0.5
nx_solid = 10
nx_salt = 10
# Exact 1D steady conduction solution for comparison.
q_exact = ${fparse (T_hot - T_cold) / (L_solid / k_solid + R_interface + L_salt / k_salt)}
T_solid_interface_exact = ${fparse T_cold + q_exact * L_solid / k_solid}
T_salt_interface_exact = ${fparse T_solid_interface_exact + q_exact * R_interface}
[Problem]
kernel_coverage_check = false
material_coverage_check = false
previous_nl_solution_required = true
linear_sys_names = 'energy_system p_system u_system solid_energy_system'
[]
[FVInterpolationMethods]
[harm]
type = FVHarmonicAverage
[]
[]
[Mesh]
[solid_mesh]
type = GeneratedMeshGenerator
dim = 1
nx = ${nx_solid}
xmin = 0.0
xmax = ${L_solid}
subdomain_ids = 0
bias_x = 1.0
[]
[fluid_mesh]
type = GeneratedMeshGenerator
dim = 1
nx = ${nx_salt}
xmin = ${L_solid}
xmax = ${fparse L_solid + L_salt}
subdomain_ids = 1
bias_x = 1.0
[]
[name_solid]
type = RenameBlockGenerator
input = solid_mesh
old_block = 0
new_block = 'solid'
[]
[name_salt]
type = RenameBlockGenerator
input = fluid_mesh
old_block = 1
new_block = 'salt'
[]
[stitch]
type = StitchMeshGenerator
inputs = 'name_solid name_salt'
stitch_boundaries_pairs = 'right left'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = stitch
primary_block = 'solid'
paired_block = 'salt'
new_boundary = interface
[]
[]
[Functions]
[T_solid_exact]
type = ParsedFunction
expression = '${T_cold} + ${q_exact} * x / ${k_solid}'
[]
[T_salt_exact]
type = ParsedFunction
expression = '${T_salt_interface_exact} + ${q_exact} * (x - ${L_solid}) / ${k_salt}'
[]
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
w = vel_z
pressure = pressure
rho = 1
p_diffusion_kernel = p_diffusion
block = salt
[]
[]
[Variables]
[temp_salt]
type = MooseLinearVariableFVReal
solver_sys = energy_system
block = salt
[]
[temp_solid]
type = MooseLinearVariableFVReal
solver_sys = solid_energy_system
block = solid
[]
[vel_x]
type = MooseLinearVariableFVReal
solver_sys = 'u_system'
initial_condition = 0
block = salt
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = 'p_system'
initial_condition = 0
block = salt
[]
[]
[FVICs]
[solid_exact_ic]
type = FVFunctionIC
variable = temp_solid
function = T_solid_exact
block = solid
[]
[salt_exact_ic]
type = FVFunctionIC
variable = temp_salt
function = T_salt_exact
block = salt
[]
[]
[LinearFVKernels]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
block = salt
use_nonorthogonal_correction = false
[]
[h_time]
type = LinearFVTimeDerivative
variable = temp_salt
factor = ${fparse rho_salt * cp_salt}
block = salt
[]
[h_conduction]
type = LinearFVDiffusion
variable = temp_salt
diffusion_coeff = ${k_salt}
use_nonorthogonal_correction = false
block = salt
coeff_interp_method = harm
[]
[solid_time]
type = LinearFVTimeDerivative
variable = temp_solid
factor = ${fparse rho_solid * cp_solid}
block = solid
[]
[solid_conduction]
type = LinearFVDiffusion
variable = temp_solid
diffusion_coeff = ${k_solid}
use_nonorthogonal_correction = false
block = solid
coeff_interp_method = harm
[]
[]
[FunctorMaterials]
[]
[LinearFVBCs]
[solid_left]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = temp_solid
boundary = left
functor = ${T_cold}
[]
[fluid_right]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = temp_salt
boundary = right
functor = ${T_hot}
[]
# Neumann-Dirichlet CHT pair. The Robin BC emulates a Neumann BC because h = 0.
# This avoids adding an unrelated heat-transfer coefficient to the accuracy test.
[fluid_solid]
type = LinearFVRobinCHTBC
variable = temp_salt
boundary = interface
h = 0
thermal_conductivity = ${k_salt}
incoming_flux = heat_flux_to_fluid_interface
surface_temperature = interface_temperature_to_fluid_interface
[]
[solid_fluid]
type = LinearFVDirichletCHTBC
variable = temp_solid
boundary = interface
functor = interface_temperature_to_solid_interface
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = csv
[]
# Numerical interface quantities
[q]
type = SideAverageFunctorPostprocessor
boundary = interface
functor = heat_flux_to_solid_interface
functor_argument = face
[]
[t_solid]
type = SideAverageFunctorPostprocessor
boundary = interface
functor = interface_temperature_to_solid_interface
functor_argument = face
[]
[t_fluid]
type = SideAverageFunctorPostprocessor
boundary = interface
functor = interface_temperature_to_fluid_interface
functor_argument = face
[]
# Analytical interface quantities
[q_analytical]
type = ParsedPostprocessor
expression = '${q_exact}'
[]
[t_solid_analytical]
type = ParsedPostprocessor
expression = '${T_solid_interface_exact}'
[]
[t_fluid_analytical]
type = ParsedPostprocessor
expression = '${T_salt_interface_exact}'
[]
[q_relative_error]
type = ParsedPostprocessor
pp_names = 'q q_analytical'
expression = 'abs(q-q_analytical)/abs(q_analytical)'
[]
[t_solid_relative_error]
type = ParsedPostprocessor
pp_names = 't_solid t_solid_analytical'
expression = 'abs(t_solid-t_solid_analytical)/abs(t_solid_analytical)'
[]
[t_fluid_relative_error]
type = ParsedPostprocessor
pp_names = 't_fluid t_fluid_analytical'
expression = 'abs(t_fluid-t_fluid_analytical)/abs(t_fluid_analytical)'
[]
[]
[Executioner]
type = PIMPLE
# Large dt makes this effectively a steady-state conduction test in one step.
dt = 1e6
end_time = 1e6
num_iterations = 2
continue_on_max_its = true
print_fields = false
energy_system = energy_system
solid_energy_system = solid_energy_system
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system'
pressure_system = 'p_system'
should_solve_momentum = false
should_solve_pressure = false
energy_l_abs_tol = 1e-14
energy_l_tol = 1e-14
solid_energy_l_abs_tol = 1e-14
solid_energy_l_tol = 1e-14
energy_absolute_tolerance = 1e-14
solid_energy_absolute_tolerance = 1e-14
energy_equation_relaxation = 1.0
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
solid_energy_petsc_options_iname = '-pc_type -pc_hypre_type'
solid_energy_petsc_options_value = 'hypre boomeramg'
cht_interfaces = interface
thermal_resistance = ${R_interface}
cht_solid_flux_relaxation = 0.3
cht_fluid_flux_relaxation = 0.3
cht_solid_temperature_relaxation = 0.3
cht_fluid_temperature_relaxation = 0.3
cht_heat_flux_tolerance = 1e-10
max_cht_fpi = 500
[]
[Outputs]
execute_on = TIMESTEP_END
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/radiation_s2s/two_slabs_cht_s2s_analytic.i)
# Two conducting slabs coupled to a conducting transparent gap by linear-FV
# conjugate heat transfer, with surface-to-surface radiation acting in parallel.
#
# The three regions are one-dimensional and have unit area:
#
# 1000 K | left solid | transparent conducting gap | right solid | 300 K
# x=0 0.1 0.2 0.3
#
# Analytic model:
#
# q_total = k_s / L_s * (T_hot - T_left)
# = k_f / L_f * (T_left - T_right) + q_rad
# = k_s / L_s * (T_right - T_cold)
#
# q_rad = sigma * (T_left^4 - T_right^4)
# / (1 / eps_left + 1 / eps_right - 1)
#
# For equal solid resistances, define dT = T_left - T_right. The solid
# balances give T_left + T_right = T_hot + T_cold. Substitution into the gap
# balance produces one depressed cubic:
#
# cubic_A*dT^3 + cubic_B*dT - cubic_C = 0.
#
# Its unique real root, and every analytical temperature and heat-flux
# reference below, are evaluated with HIT fparse expressions. Therefore,
# changing only k_fluid updates both the simulation and its analytical checks.
#
# LinearFVRobinCHTBC exchanges adjacent FV-cell temperatures. The numerical
# solution consequently approaches these continuum references at first order
# under refinement; no mesh-dependent reference values are used here.
T_hot = 1000.0
T_cold = 300.0
L_solid = 0.1
L_gap = 0.1
k_solid = 10.0
# Change this value to move between radiation-, mixed-, and
# conduction-dominated regimes. Examples: 0.1, 3.4180137348, and 50.0.
k_fluid = 50
eps_left = 0.8
eps_right = 0.6
sigma = 5.67037e-8
# Virtual Robin-Robin coupling coefficients. They affect fixed-point
# convergence, but not the converged interface solution.
h_f = 1.0
h_s = 1.0
# ---------------------------------------------------------------------------
# Continuum analytical solution. For dT = T_left - T_right,
#
# A*dT^3 + B*dT - C = 0,
# p = B/A, r = C/A,
# dT = 2*sqrt(p/3)*sinh(asinh(3*r/(2*p)*sqrt(3/p))/3).
#
# This form avoids taking a fractional power of a negative number in Cardano's
# formula and has one real root because A, B, and C are positive.
temperature_sum = ${fparse T_hot+T_cold}
temperature_span = ${fparse T_hot-T_cold}
solid_resistance = ${fparse L_solid/k_solid}
gap_conductance = ${fparse k_fluid/L_gap}
emissivity_denominator = ${fparse 1/eps_left+1/eps_right-1}
cubic_A = ${fparse sigma*temperature_sum/(2*emissivity_denominator)}
cubic_B = ${fparse 1/(2*solid_resistance)+gap_conductance+sigma*temperature_sum^3/(2*emissivity_denominator)}
cubic_C = ${fparse temperature_span/(2*solid_resistance)}
cubic_p = ${fparse cubic_B/cubic_A}
cubic_r = ${fparse cubic_C/cubic_A}
interface_temperature_span = ${fparse 2*sqrt(cubic_p/3)*sinh(asinh(3*cubic_r/(2*cubic_p)*sqrt(3/cubic_p))/3)}
T_left_ref = ${fparse (temperature_sum+interface_temperature_span)/2}
T_right_ref = ${fparse (temperature_sum-interface_temperature_span)/2}
q_conduction_ref = ${fparse gap_conductance*interface_temperature_span}
q_radiation_ref = ${fparse sigma*(T_left_ref^4-T_right_ref^4)/emissivity_denominator}
q_total_ref = ${fparse q_conduction_ref+q_radiation_ref}
# Coarsest mesh of the spatial convergence study in mms_spatial.py, which
# refines it uniformly. The errors are already first order on this mesh, and
# starting this coarse keeps the study short enough for the default test suite.
nx_solid = 5
nx_gap = 5
[Problem]
kernel_coverage_check = false
linear_sys_names = 'energy_system solid_energy_system u_system v_system p_system'
previous_nl_solution_required = true
[]
[Mesh]
type = MeshGeneratorMesh
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '${L_solid} ${L_gap} ${L_solid}'
ix = '${nx_solid} ${nx_gap} ${nx_solid}'
dy = '1.0'
iy = '1'
subdomain_id = '1 5 2'
[]
# The sidesets are attached to the solid elements. This lets gray_lambert
# sample T_solid on both radiating surfaces.
[left_rad_sideset]
type = SideSetsBetweenSubdomainsGenerator
input = cmg
primary_block = 1
paired_block = 5
new_boundary = left_rad
[]
[right_rad_sideset]
type = SideSetsBetweenSubdomainsGenerator
input = left_rad_sideset
primary_block = 2
paired_block = 5
new_boundary = right_rad
[]
[rename_blocks]
type = RenameBlockGenerator
input = right_rad_sideset
old_block = '1 5 2'
new_block = 'left_solid fluid right_solid'
[]
[]
[Variables]
[T_fluid]
type = MooseLinearVariableFVReal
solver_sys = energy_system
initial_condition = 600
block = fluid
[]
# A single solid variable/system spans the two disconnected slabs.
[T_solid]
type = MooseLinearVariableFVReal
solver_sys = solid_energy_system
initial_condition = 600
block = 'left_solid right_solid'
[]
# Dummy flow variables retain the SIMPLE setup. Their systems are disabled.
[vel_x]
type = MooseLinearVariableFVReal
solver_sys = u_system
initial_condition = 0
block = fluid
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0
block = fluid
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = p_system
initial_condition = 0
block = fluid
[]
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = 1
p_diffusion_kernel = p_diffusion
block = fluid
[]
[view_factors_uo]
type = SpecifiedViewFactor
boundary = 'left_rad right_rad'
view_factors = '0 1;
1 0'
execute_on = INITIAL
[]
[gray_lambert]
type = ViewFactorObjectSurfaceRadiation
boundary = 'left_rad right_rad'
emissivity = '${eps_left} ${eps_right}'
temperature = T_solid
stefan_boltzmann_constant = ${sigma}
view_factor_object_name = view_factors_uo
execute_on = 'NONLINEAR TIMESTEP_END'
[]
[]
[LinearFVKernels]
[fluid_conduction]
type = LinearFVDiffusion
variable = T_fluid
diffusion_coeff = ${k_fluid}
block = fluid
use_nonorthogonal_correction = false
[]
# CHTHandler expects one conduction kernel for the solid energy system.
[solid_conduction]
type = LinearFVDiffusion
variable = T_solid
diffusion_coeff = ${k_solid}
block = 'left_solid right_solid'
use_nonorthogonal_correction = false
[]
# Required by RhieChowMassFlux although the pressure solve is disabled.
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
block = fluid
use_nonorthogonal_correction = false
[]
[]
[LinearFVBCs]
[hot_left]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_solid
boundary = left
functor = ${T_hot}
[]
[cold_right]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_solid
boundary = right
functor = ${T_cold}
[]
# Robin-Robin CHT at the left solid/gap interface.
[fluid_left]
type = LinearFVRobinCHTBC
variable = T_fluid
boundary = left_rad
h = ${h_f}
thermal_conductivity = ${k_fluid}
incoming_flux = heat_flux_to_fluid_left_rad
surface_temperature = interface_temperature_to_fluid_left_rad
[]
[solid_left]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = left_rad
h = ${h_s}
thermal_conductivity = ${k_solid}
incoming_flux = heat_flux_to_solid_left_rad
surface_temperature = interface_temperature_to_solid_left_rad
[]
# Robin-Robin CHT at the right gap/solid interface.
[fluid_right]
type = LinearFVRobinCHTBC
variable = T_fluid
boundary = right_rad
h = ${h_f}
thermal_conductivity = ${k_fluid}
incoming_flux = heat_flux_to_fluid_right_rad
surface_temperature = interface_temperature_to_fluid_right_rad
[]
[solid_right]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = right_rad
h = ${h_s}
thermal_conductivity = ${k_solid}
incoming_flux = heat_flux_to_solid_right_rad
surface_temperature = interface_temperature_to_solid_right_rad
[]
# Do not add LinearFVGrayLambertBC on left_rad/right_rad. The modified
# CHTHandler removes q_rad from the flux transferred through the transparent
# fluid and applies the corresponding surface loss/gain to the solids.
[]
[Postprocessors]
# Mesh size for the spatial convergence study
[h]
type = AverageElementSize
outputs = csv
[]
# Interface temperatures
[T_left_rad]
type = GrayLambertSurfaceRadiationPP
surface_radiation_object_name = gray_lambert
return_type = TEMPERATURE
boundary = left_rad
execute_on = NONLINEAR
[]
[T_right_rad]
type = GrayLambertSurfaceRadiationPP
surface_radiation_object_name = gray_lambert
return_type = TEMPERATURE
boundary = right_rad
execute_on = NONLINEAR
[]
# Radiative heat flux, positive from left to right
[q_radiation]
type = GrayLambertSurfaceRadiationPP
surface_radiation_object_name = gray_lambert
return_type = HEAT_FLUX_DENSITY
boundary = left_rad
execute_on = NONLINEAR
[]
# Total heat flux entering through the hot external boundary
[q_hot_boundary_outward]
type = BoundaryLinearFVFluxIntegral
boundary = left
linearfvkernels = solid_conduction
execute_on = NONLINEAR
[]
[q_total]
type = ParsedPostprocessor
pp_names = 'q_hot_boundary_outward'
expression = '-q_hot_boundary_outward'
execute_on = NONLINEAR
[]
# Conductive contribution through the middle region
[q_conduction]
type = ParsedPostprocessor
pp_names = 'q_total q_radiation'
expression = 'q_total-q_radiation'
execute_on = NONLINEAR
[]
# Analytical-solution errors
[T_left_rel_error]
type = ParsedPostprocessor
pp_names = 'T_left_rad'
expression = 'abs(T_left_rad-${T_left_ref})/${T_left_ref}'
execute_on = NONLINEAR
[]
[T_right_rel_error]
type = ParsedPostprocessor
pp_names = 'T_right_rad'
expression = 'abs(T_right_rad-${T_right_ref})/${T_right_ref}'
execute_on = NONLINEAR
[]
[q_radiation_rel_error]
type = ParsedPostprocessor
pp_names = 'q_radiation'
expression = 'abs(q_radiation-${q_radiation_ref})/${q_radiation_ref}'
execute_on = NONLINEAR
[]
[q_conduction_rel_error]
type = ParsedPostprocessor
pp_names = 'q_conduction'
expression = 'abs(q_conduction-${q_conduction_ref})/${q_conduction_ref}'
execute_on = NONLINEAR
[]
[q_total_rel_error]
type = ParsedPostprocessor
pp_names = 'q_total'
expression = 'abs(q_total-${q_total_ref})/${q_total_ref}'
execute_on = NONLINEAR
[]
[]
[Executioner]
type = SIMPLE
num_iterations = 1000
should_solve_momentum = false
should_solve_pressure = false
rhie_chow_user_object = rc
momentum_systems = 'u_system v_system'
pressure_system = p_system
energy_system = energy_system
solid_energy_system = solid_energy_system
energy_l_abs_tol = 1e-14
energy_l_tol = 1e-14
energy_equation_relaxation = 0.99
energy_field_relaxation = 0.99
# The fluid energy residual stagnates near 1e-10 in this problem, so a tighter
# tolerance is never reached. Matches linear_fv_gray_lambert_parallel_plates_simple.i.
energy_absolute_tolerance = 1e-8
solid_energy_l_abs_tol = 1e-14
solid_energy_l_tol = 1e-14
solid_energy_absolute_tolerance = 1e-12
energy_petsc_options_iname = '-pc_type'
energy_petsc_options_value = 'lu'
solid_energy_petsc_options_iname = '-pc_type'
solid_energy_petsc_options_value = 'lu'
cht_interfaces = 'left_rad right_rad'
cht_solid_flux_relaxation = '0.5 0.5'
cht_fluid_flux_relaxation = '0.5 0.5'
cht_solid_temperature_relaxation = '0.5 0.5'
cht_fluid_temperature_relaxation = '0.5 0.5'
cht_heat_flux_tolerance = 1e-10
max_cht_fpi = 10
# Parameter supplied by the radiation-aware CHTHandler.
surface_radiation_object_name = gray_lambert
print_fields = false
continue_on_max_its = false
[]
[Outputs]
execute_on = FINAL
exodus = true
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/cht/conjugate_heat_transfer/cht_rob-rob.i)
### benchmark sources:
### https://doi.org/10.1016/j.compfluid.2018.06.016
### https://doi.org/10.1016/0017-9310(74)90087-8
b = 0.01 # plate thickness
l = 0.2 # plate length
nxi = 24 # nx in the inlet/entrance region
nyf = 18 # ny in fluid
nxf = 24 # nx in the main fluid region
nys = 8 # ny in the solid domain
fx1_bias = 1.00 # bdry layer bias - fluid
fx2_bias = '${fparse 1.0/1.00}' # bdry layer bias - solid
fy_bias = 1.20 # bdry layer bias - fluid
sy_bias = '${fparse 1.0/1.05}' # bdry layer bias - solid
k_s = 0.2876
rho = 0.3525
mu = 3.95e-5
k = 0.06808
cp = 1142.6
vin = 12.0
Tin = 1000.0
T_s_bottom = 600.0
P_out = 1.03e5
h_s = 1.0
h_f = 1.0
advected_interp_method = 'upwind'
[Mesh]
[fluid_channel]
type = GeneratedMeshGenerator
dim = 2
nx = ${nxf}
ny = ${nyf}
xmin = 0
xmax = ${l}
ymin = 0
ymax = '${fparse 10.0*b}'
subdomain_ids = '1'
subdomain_name = 'fluid'
bias_x = '${fx1_bias}'
bias_y = '${fparse fy_bias}'
boundary_name_prefix = 'fluid'
[]
[solid_base]
type = GeneratedMeshGenerator
dim = 2
nx = ${nxf}
ny = ${nys}
xmin = 0
xmax = ${l}
ymin = '${fparse -b}'
ymax = 0
subdomain_ids = '2'
subdomain_name = 'solid'
bias_x = ${fx1_bias}
bias_y = '${fparse sy_bias}'
boundary_id_offset = 10
boundary_name_prefix = 'solid'
[]
[entrance]
type = GeneratedMeshGenerator
dim = 2
nx = '${fparse 2.0*nxi}'
ny = ${nyf}
xmin = '${fparse -2.0*l}'
xmax = 0
ymin = 0
ymax = '${fparse 10.0*b}'
subdomain_ids = '0'
subdomain_name = 'entrance'
bias_x = ${fx2_bias}
bias_y = '${fparse fy_bias}'
boundary_id_offset = 20
boundary_name_prefix = 'ent'
[]
[smg]
type = StitchedMeshGenerator
inputs = 'entrance fluid_channel solid_base'
stitch_boundaries_pairs = 'ent_right fluid_left;
fluid_bottom solid_top'
prevent_boundary_ids_overlap = false
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'smg'
primary_block = 'fluid'
paired_block = 'solid'
new_boundary = interface
[]
[symmetry_transform]
type = SymmetryTransformGenerator
input = interface
mirror_point = '0 0 0'
mirror_normal_vector = '0 1 0'
[]
inactive = 'symmetry_transform'
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system energy_system solid_energy_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
block = '0 1'
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = ${vin}
solver_sys = u_system
block = '0 1'
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
block = '0 1'
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = ${P_out}
block = '0 1'
[]
[T_fluid]
type = MooseLinearVariableFVReal
solver_sys = energy_system
initial_condition = ${Tin}
block = '0 1'
[]
[T_solid]
type = MooseLinearVariableFVReal
solver_sys = solid_energy_system
initial_condition = ${T_s_bottom}
block = 2
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[h_advection]
type = LinearFVEnergyAdvection
variable = T_fluid
advected_quantity = temperature
cp = ${cp}
advected_interp_method = ${advected_interp_method}
rhie_chow_user_object = 'rc'
[]
[conduction]
type = LinearFVDiffusion
variable = T_fluid
diffusion_coeff = ${k}
use_nonorthogonal_correction = false
[]
[solid-conduction]
type = LinearFVDiffusion
variable = T_solid
diffusion_coeff = ${k_s}
use_nonorthogonal_correction = false
[]
[]
[LinearFVBCs]
# velocity BCs
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_left'
variable = vel_x
functor = ${vin}
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_left'
variable = vel_y
functor = '0.000'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_bottom interface'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_bottom interface'
variable = vel_y
functor = 0.0
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'fluid_right'
variable = pressure
functor = ${P_out}
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_right'
variable = vel_x
use_two_term_expansion = false
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_right'
variable = vel_y
use_two_term_expansion = false
[]
# freestream BCs for top of fluid domain
[freestream_u]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_top ent_top'
variable = vel_x
use_two_term_expansion = false
[]
[freestream_v]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_top ent_top'
variable = vel_y
use_two_term_expansion = false
[]
[freestream_p]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
boundary = 'fluid_top ent_top'
variable = pressure
functor = 0
[]
# temperature BCs
[inlet_T]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_fluid
functor = ${Tin}
boundary = 'ent_left'
[]
[heated_wall_solid]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_solid
functor = ${T_s_bottom}
boundary = 'solid_bottom'
[]
[insulated_fluid]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
variable = T_fluid
functor = 0
boundary = 'ent_top ent_bottom fluid_top'
[]
[insulated_solid]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
variable = T_solid
functor = 0
boundary = 'solid_left solid_right'
[]
[outlet_T]
type = LinearFVAdvectionDiffusionOutflowBC
variable = T_fluid
use_two_term_expansion = false
boundary = 'fluid_right'
[]
[fluid_solid]
type = LinearFVRobinCHTBC
variable = T_fluid
boundary = interface
h = ${h_f}
incoming_flux = heat_flux_to_fluid_interface
surface_temperature = interface_temperature_to_fluid_interface
thermal_conductivity = ${k}
[]
[solid_fluid]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = interface
h = ${h_s}
incoming_flux = heat_flux_to_solid_interface
surface_temperature = interface_temperature_to_solid_interface
thermal_conductivity = ${k_s}
[]
[]
[FunctorMaterials]
[rhocpT]
property_name = 'rhocpT'
type = ParsedFunctorMaterial
functor_names = 'T_fluid'
expression = '${rho}*${cp}*T_fluid'
[]
[]
[Postprocessors]
[h_in]
type = VolumetricFlowRate
boundary = 'ent_left'
vel_x = vel_x
vel_y = vel_y
rhie_chow_user_object = rc
advected_quantity = 'rhocpT'
subtract_mesh_velocity = false
[]
[h_out]
type = VolumetricFlowRate
boundary = 'fluid_right fluid_top ent_top interface'
vel_x = vel_x
vel_y = vel_y
rhie_chow_user_object = rc
advected_quantity = 'rhocpT'
advected_interp_method = upwind
subtract_mesh_velocity = false
[]
[]
[VectorPostprocessors]
[y_vs_ts]
type = LineValueSampler
variable = 'T_solid'
start_point = '0.05 -1e-9 0' # making sure we are always in the domain
end_point = '0.05 ${fparse -b+1e-9} 0'
num_points = 8
sort_by = id
warn_discontinuous_face_values = false
[]
[y_vs_tf]
type = LineValueSampler
variable = 'T_fluid'
start_point = '0.05 1e-9 0' # making sure we are always in the domain
end_point = '0.05 ${fparse b-1e-9} 0'
num_points = 12
sort_by = id
warn_discontinuous_face_values = false
[]
[]
[Executioner]
type = SIMPLE
num_iterations = 1000
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
rhie_chow_user_object = 'rc'
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
momentum_equation_relaxation = 0.9
pressure_variable_relaxation = 0.3
momentum_absolute_tolerance = 1e-7
pressure_absolute_tolerance = 1e-7
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
energy_system = 'energy_system'
solid_energy_system = 'solid_energy_system'
energy_l_abs_tol = 1e-10
solid_energy_l_abs_tol = 1e-10
energy_l_tol = 0
solid_energy_l_tol = 0
energy_equation_relaxation = 1.0
energy_absolute_tolerance = 1e-7
solid_energy_absolute_tolerance = 1e-7
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
solid_energy_petsc_options_iname = '-pc_type -pc_hypre_type'
solid_energy_petsc_options_value = 'hypre boomeramg'
cht_interfaces = 'interface'
cht_solid_flux_relaxation = 1.0
cht_fluid_flux_relaxation = 1.0
cht_solid_temperature_relaxation = 1.0
cht_fluid_temperature_relaxation = 1.0
max_cht_fpi = 2
print_fields = false
[]
[Outputs]
exodus = true
csv = true
execute_on = timestep_end
[]