- boundaryThe boundary that will be divided into patches
C++ Type:BoundaryName
Controllable:No
Description:The boundary that will be divided into patches
- inputThe mesh we want to modify
C++ Type:MeshGeneratorName
Controllable:No
Description:The mesh we want to modify
- n_patchesNumber of patches
C++ Type:unsigned int
Range:n_patches>0
Controllable:No
Description:Number of patches
PatchSidesetGenerator
Description
This mesh generator splits a given sideset (sideset parameter) into n pieces (n_patches). The pieces are referred to as patches. Patches are used for net radiation transfer method via view factors. The sideset is divided into n patches using partitioner that are available from libMesh. The new sidesets are named <old_side_name>_<id>, where <id> is a number running from 0 to n - 1.
In addition to libMesh partitioners, this mesh generator also supports a grid partitioner. The grid partitioner superimposes a 3-dimensional (where is the dimensionality of the problem) uniform, orthogonal grid over the sideset and partitions the elements according to where the centroids of the sideset faces fall on the orthogonal grid. The superimposed grid is congruent to the bounding box of the sideset to ensure that the sideset is completely encompassed within the superimposed grid.
The superimposed orthogonal grid is _always_ 3-dimensional because the sideset (surface in 3D and line in 2D problems) does not need to be orthogonal to any of the coordinate axes. The superimposed 3-dimensional mesh is aligned with the coordinate axis and will have a single element in 1 (2) directions for 3 (2)-dimensional problems. These are discussed in turn:
for 2-dimensional problems, sidesets are a collection of line segments so sidesets are 1-dimensional. The bounding box of the sideset is computed and the largest distance along any of the three axes is computed (i.e. ). The superimposed mesh has
n_patchessubdivisions along the longest axis and a single subdivision along the two shorter axes.for 3-dimensional problems, sidesets are a collection of faces so sidesets are 2-dimensional. The bounding box of the sideset is computed and the two largest distance along any of the three axes is computed (i.e. two largest from set ). The superimposed mesh has a single subdivision along the axes with the smallest extent. The number of elements along the two larger dimensions are determined as follows:
where and are the subdivisions along the longest and second longest axes and is equal to
n_patches. Due to the rounding, the does not need to be equal ton_patchesso the number of patches might be adjusted. A warning is printed if that happens.
Example Input Syntax
[patch]
type = PatchSidesetGenerator
boundary = 0
n_patches = 10
input = cmg
[](modules/heat_transfer/test/tests/meshgenerators/patch_sideset_generator/patch_sideset_generator.i)Input Parameters
- centroid_partitioner_directionSpecifies the sort direction if using the centroid partitioner. Available options: x, y, z, radial
C++ Type:MooseEnum
Options:x, y, z, radial
Controllable:No
Description:Specifies the sort direction if using the centroid partitioner. Available options: x, y, z, radial
- partitionerdefaultSpecifies a mesh partitioner to use when splitting the mesh for a parallel computation.
Default:default
C++ Type:MooseEnum
Options:default, metis, parmetis, linear, centroid, hilbert_sfc, morton_sfc, custom, grid
Controllable:No
Description:Specifies a mesh partitioner to use when splitting the mesh for a parallel computation.
Partitioning Parameters
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:No
Description:Set the enabled status of the MooseObject.
- save_with_nameKeep the mesh from this mesh generator in memory with the name specified
C++ Type:std::string
Controllable:No
Description:Keep the mesh from this mesh generator in memory with the name specified
Advanced Parameters
- nemesisFalseWhether or not to output the mesh file in the nemesisformat (only if output = true)
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to output the mesh file in the nemesisformat (only if output = true)
- outputFalseWhether or not to output the mesh file after generating the mesh
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to output the mesh file after generating the mesh
- show_infoFalseWhether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)
Debugging Parameters
Input Files
- (modules/navier_stokes/test/tests/finite_volume/ins/exceptions/bad-restriction.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/radiation_s2s/diff_heated_cavity_slabs_cht.i)
- (modules/heat_transfer/test/tests/meshgenerators/patch_sideset_generator/patch_sideset_generator.i)
- (modules/heat_transfer/test/tests/meshgenerators/patch_sideset_generator/patch_sideset_generator_grid_2D.i)
- (modules/heat_transfer/test/tests/meshgenerators/patch_sideset_generator/patch_sideset_generator_grid.i)
- (modules/heat_transfer/test/tests/radiation_transfer_action/radiative_transfer_no_action_linearfv_steady.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/block_restriction/segregated/2d-segregated-block.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/block_restriction/2d-rc.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/radiation_s2s/radiative_transfer_no_action_linearfv_simple.i)
- (modules/heat_transfer/test/tests/radiation_transfer_action/radiative_transfer_no_action.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/natural_convection/linear_segregated/2d/diff_heated_cavity_s2s_rad.i)
(modules/heat_transfer/test/tests/meshgenerators/patch_sideset_generator/patch_sideset_generator.i)
[Mesh]
type = MeshGeneratorMesh
[cmg]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 1
nx = 25
ymin = 0
ymax = 1
ny = 25
zmin = 0
zmax = 1
nz = 25
[]
[patch]
type = PatchSidesetGenerator
boundary = 0
n_patches = 10
input = cmg
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/exceptions/bad-restriction.i)
mu=1.1
rho=1.1
advected_interp_method='average'
velocity_interp_method='rc'
restricted_blocks = '1'
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
block = '1 2'
pressure = pressure
[]
[]
[Mesh]
parallel_type = 'replicated'
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '1 1'
dy = '1'
ix = '7 7'
iy = 10
subdomain_id = '1 2'
[]
[mid]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
input = mesh
new_boundary = 'middle'
[]
[break_top]
type = PatchSidesetGenerator
boundary = 'top'
n_patches = 2
input = mid
[]
[break_bottom]
type = PatchSidesetGenerator
boundary = 'bottom'
n_patches = 2
input = break_top
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 1
block = ${restricted_blocks}
[]
[v]
type = INSFVVelocityVariable
initial_condition = 1
block = ${restricted_blocks}
[]
[pressure]
type = INSFVPressureVariable
block = ${restricted_blocks}
[]
[temperature]
type = INSFVEnergyVariable
block = ${restricted_blocks}
[]
[scalar]
type = INSFVScalarFieldVariable
block = ${restricted_blocks}
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[energy_advection]
type = INSFVEnergyAdvection
variable = temperature
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
[]
[energy_diffusion]
type = FVDiffusion
coeff = 1.1
variable = temperature
[]
[energy_loss]
type = FVBodyForce
variable = temperature
value = -0.1
[]
[scalar_advection]
type = INSFVScalarFieldAdvection
variable = scalar
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
[]
[scalar_diffusion]
type = FVDiffusion
coeff = 1
variable = scalar
[]
[scalar_src]
type = FVBodyForce
variable = scalar
value = 0.1
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
functor = '1'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = v
functor = 0
[]
[top-wall-u]
type = INSFVNoSlipWallBC
boundary = 'top_0'
variable = u
function = 0
[]
[top-wall-v]
type = INSFVNoSlipWallBC
boundary = 'top_0'
variable = v
function = 0
[]
[bottom-wall-u]
type = INSFVSymmetryVelocityBC
boundary = 'bottom_0'
variable = u
mu = ${mu}
u = u
v = v
momentum_component = 'x'
[]
[bottom-wall-v]
type = INSFVSymmetryVelocityBC
boundary = 'bottom_0'
variable = v
mu = ${mu}
u = u
v = v
momentum_component = 'y'
[]
[bottom-wall-p]
type = INSFVSymmetryPressureBC
boundary = 'bottom_0'
variable = pressure
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'middle'
variable = pressure
function = 0
[]
[inlet_t]
type = FVDirichletBC
boundary = 'left'
variable = temperature
value = 1
[]
[outlet_scalar]
type = FVDirichletBC
boundary = 'middle'
variable = scalar
value = 1
[]
[]
[FunctorMaterials]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = 'temperature'
rho = ${rho}
block = ${restricted_blocks}
[]
[const]
type = ADGenericFunctorMaterial
prop_names = 'cp'
prop_values = '2'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm 100 lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
[]
(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/heat_transfer/test/tests/meshgenerators/patch_sideset_generator/patch_sideset_generator.i)
[Mesh]
type = MeshGeneratorMesh
[cmg]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 1
nx = 25
ymin = 0
ymax = 1
ny = 25
zmin = 0
zmax = 1
nz = 25
[]
[patch]
type = PatchSidesetGenerator
boundary = 0
n_patches = 10
input = cmg
[]
[]
(modules/heat_transfer/test/tests/meshgenerators/patch_sideset_generator/patch_sideset_generator_grid_2D.i)
[Mesh]
[cartesian]
type = CartesianMeshGenerator
dim = 2
dx = '1 2 3'
ix = '20 20 20'
dy = '5'
iy = '10'
subdomain_id = '1 2 3'
[]
[rotate]
type = TransformGenerator
transform = ROTATE
vector_value = '0 0 -45'
input = cartesian
[]
[patch]
type = PatchSidesetGenerator
boundary = 0
n_patches = 4
input = rotate
partitioner = grid
[]
[]
(modules/heat_transfer/test/tests/meshgenerators/patch_sideset_generator/patch_sideset_generator_grid.i)
[Mesh]
type = MeshGeneratorMesh
[cmg]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 3
nx = 25
ymin = 0
ymax = 2
ny = 25
zmin = 0
zmax = 4
nz = 25
[]
[patch]
type = PatchSidesetGenerator
boundary = back
n_patches = 19
input = cmg
partitioner = grid
[]
[]
(modules/heat_transfer/test/tests/radiation_transfer_action/radiative_transfer_no_action_linearfv_steady.i)
[Problem]
kernel_coverage_check = false
linear_sys_names = 'energy_system'
[]
[Mesh]
type = MeshGeneratorMesh
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1 1.3 1.9'
ix = '5 5 5'
dy = '2 1.2 0.9'
iy = '5 5 5'
subdomain_id = '0 1 0
4 5 2
0 3 0'
[]
[inner_bottom]
type = SideSetsBetweenSubdomainsGenerator
input = cmg
primary_block = 1
paired_block = 5
new_boundary = 'inner_bottom'
[]
[inner_left]
type = SideSetsBetweenSubdomainsGenerator
input = inner_bottom
primary_block = 4
paired_block = 5
new_boundary = 'inner_left'
[]
[inner_right]
type = SideSetsBetweenSubdomainsGenerator
input = inner_left
primary_block = 2
paired_block = 5
new_boundary = 'inner_right'
[]
[inner_top]
type = SideSetsBetweenSubdomainsGenerator
input = inner_right
primary_block = 3
paired_block = 5
new_boundary = 'inner_top'
[]
[rename]
type = RenameBlockGenerator
old_block = '1 2 3 4'
new_block = '0 0 0 0'
input = inner_top
[]
[split_inner_bottom]
type = PatchSidesetGenerator
boundary = 4
n_patches = 2
partitioner = centroid
centroid_partitioner_direction = x
input = rename
[]
[split_inner_left]
type = PatchSidesetGenerator
boundary = 5
n_patches = 2
partitioner = centroid
centroid_partitioner_direction = y
input = split_inner_bottom
[]
[split_inner_right]
type = PatchSidesetGenerator
boundary = 6
n_patches = 2
partitioner = centroid
centroid_partitioner_direction = y
input = split_inner_left
[]
[split_inner_top]
type = PatchSidesetGenerator
boundary = 7
n_patches = 3
partitioner = centroid
centroid_partitioner_direction = x
input = split_inner_right
[]
[delete_others]
type = BoundaryDeletionGenerator
input = 'split_inner_top'
boundary_names = 'inner_bottom inner_top inner_left inner_right'
[]
[delete_block5]
type = BlockDeletionGenerator
input = 'delete_others'
block = '5'
[]
[]
[Variables]
[temperature]
type = MooseLinearVariableFVReal
solver_sys = 'energy_system'
initial_condition = 400
[]
[]
[LinearFVKernels]
[temp_conduction]
type = LinearFVDiffusion
diffusion_coeff = 5.
variable = temperature
[]
[]
[UserObjects]
[gray_lambert]
type = ViewFactorObjectSurfaceRadiation
boundary = 'inner_bottom_0 inner_bottom_1
inner_left_0 inner_left_1
inner_right_0 inner_right_1
inner_top_0 inner_top_1 inner_top_2'
fixed_temperature_boundary = 'inner_bottom_0 inner_bottom_1'
fixed_boundary_temperatures = '1200 1200'
adiabatic_boundary = 'inner_top_0 inner_top_1 inner_top_2'
emissivity = '0.9 0.9
0.8 0.8
0.4 0.4
1 1 1'
temperature = temperature
view_factor_object_name = view_factor
execute_on = 'NONLINEAR'
[]
[view_factor]
type = UnobstructedPlanarViewFactor
boundary = 'inner_bottom_0 inner_bottom_1
inner_left_0 inner_left_1
inner_right_0 inner_right_1
inner_top_0 inner_top_1 inner_top_2'
normalize_view_factor = true
execute_on = 'INITIAL'
[]
[]
[LinearFVBCs]
[left]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = temperature
boundary = 'left'
functor = 600.
[]
[right]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = temperature
boundary = 'right'
functor = 300.
[]
[radiation]
type = LinearFVGrayLambertBC
variable = temperature
temperature_radiation = temperature
coeff_diffusion = 5.
surface_radiation_object_name = gray_lambert
boundary = 'inner_left_0 inner_left_1
inner_right_0 inner_right_1'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-energy_system_pc_type -energy_system_pc_factor_shift_type -snes_linesearch_damping'
petsc_options_value = 'hypre boomeramg 0.8'
l_abs_tol = 1e-10
l_tol = 1e-10
multi_system_fixed_point=true
multi_system_fixed_point_convergence=linear
multi_system_fixed_point_relaxation_factor = 0.5
[Quadrature]
side_order = SECOND
[]
[]
[Convergence]
[linear]
type = IterationCountConvergence
max_iterations = 100
converge_at_max_iterations = true
[]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/block_restriction/segregated/2d-segregated-block.i)
mu = 1.1
rho = 1.1
advected_interp_method = 'average'
velocity_interp_method = 'rc'
pressure_tag = "pressure_grad"
restricted_blocks = '1'
[Mesh]
parallel_type = 'replicated'
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '1 1'
dy = '1'
ix = '7 7'
iy = 10
subdomain_id = '1 2'
[]
[mid]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
input = mesh
new_boundary = 'middle'
[]
[break_top]
type = PatchSidesetGenerator
boundary = 'top'
n_patches = 2
input = mid
[]
[break_bottom]
type = PatchSidesetGenerator
boundary = 'bottom'
n_patches = 2
input = break_top
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[Problem]
nl_sys_names = 'u_system v_system pressure_system energy_system scalar_system'
previous_nl_solution_required = true
kernel_coverage_check = false
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolatorSegregated
u = vel_x
v = vel_y
pressure = pressure
block = ${restricted_blocks}
[]
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
initial_condition = 1.0
solver_sys = u_system
two_term_boundary_expansion = false
block = ${restricted_blocks}
[]
[vel_y]
type = INSFVVelocityVariable
initial_condition = 0.0
solver_sys = v_system
two_term_boundary_expansion = false
block = ${restricted_blocks}
[]
[pressure]
type = INSFVPressureVariable
solver_sys = pressure_system
initial_condition = 0.2
two_term_boundary_expansion = false
block = ${restricted_blocks}
[]
[T_fluid]
type = INSFVEnergyVariable
initial_condition = 300
solver_sys = energy_system
two_term_boundary_expansion = false
block = ${restricted_blocks}
[]
[scalar]
type = INSFVScalarFieldVariable
block = ${restricted_blocks}
solver_sys = scalar_system
[]
[]
[FVKernels]
[u_advection]
type = INSFVMomentumAdvection
variable = vel_x
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = vel_x
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = vel_x
momentum_component = 'x'
pressure = pressure
extra_vector_tags = ${pressure_tag}
[]
[v_advection]
type = INSFVMomentumAdvection
variable = vel_y
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = vel_y
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = vel_y
momentum_component = 'y'
pressure = pressure
extra_vector_tags = ${pressure_tag}
[]
[p_diffusion]
type = FVAnisotropicDiffusion
variable = pressure
coeff = "Ainv"
coeff_interp_method = 'average'
[]
[p_source]
type = FVDivergence
variable = pressure
vector_field = "HbyA"
force_boundary_execution = true
[]
[energy_advection]
type = INSFVEnergyAdvection
variable = T_fluid
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
boundaries_to_force = 'bottom_0'
[]
[energy_diffusion]
type = FVDiffusion
coeff = 1.1
variable = T_fluid
[]
[energy_loss]
type = FVBodyForce
variable = T_fluid
value = -0.1
[]
[scalar_advection]
type = INSFVScalarFieldAdvection
variable = scalar
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
boundaries_to_force = 'bottom_0'
[]
[scalar_diffusion]
type = FVDiffusion
coeff = 1.0
variable = scalar
[]
[scalar_src]
type = FVBodyForce
variable = scalar
value = 0.1
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = vel_x
functor = '1.0'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = vel_y
functor = '0.0'
[]
[walls-u]
type = INSFVNoSlipWallBC
boundary = 'top_0'
variable = vel_x
function = 0.0
[]
[walls-v]
type = INSFVNoSlipWallBC
boundary = 'top_0'
variable = vel_y
function = 0.0
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'middle'
variable = pressure
function = 0
[]
[inlet_t]
type = FVDirichletBC
boundary = 'left'
variable = T_fluid
value = 1
[]
[outlet_scalar]
type = FVDirichletBC
boundary = 'middle'
variable = scalar
value = 1
[]
[symmetry-u]
type = INSFVSymmetryVelocityBC
boundary = 'bottom_0'
variable = vel_x
u = vel_x
v = vel_y
mu = ${mu}
momentum_component = 'x'
[]
[symmetry-v]
type = INSFVSymmetryVelocityBC
boundary = 'bottom_0'
variable = vel_y
u = vel_x
v = vel_y
mu = ${mu}
momentum_component = 'y'
[]
[symmetry-p]
type = INSFVSymmetryPressureBC
boundary = 'bottom_0'
variable = pressure
[]
[]
[Executioner]
type = SIMPLENonlinearAssembly
momentum_l_abs_tol = 1e-12
pressure_l_abs_tol = 1e-12
energy_l_abs_tol = 1e-12
passive_scalar_l_abs_tol = 1e-12
momentum_l_tol = 0
pressure_l_tol = 0
energy_l_tol = 0
passive_scalar_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
energy_system = 'energy_system'
passive_scalar_systems = 'scalar_system'
pressure_gradient_tag = ${pressure_tag}
momentum_equation_relaxation = 0.8
pressure_variable_relaxation = 0.3
energy_equation_relaxation = 0.99
passive_scalar_equation_relaxation = 0.99
num_iterations = 100
pressure_absolute_tolerance = 1e-9
momentum_absolute_tolerance = 1e-9
energy_absolute_tolerance = 1e-9
passive_scalar_absolute_tolerance = 1e-9
print_fields = false
[]
[FunctorMaterials]
[const_functor]
type = ADGenericFunctorMaterial
prop_names = 'cp'
prop_values = '2'
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
rho = ${rho}
temperature = 'T_fluid'
block = ${restricted_blocks}
[]
[]
[Outputs]
exodus = true
csv = false
perf_graph = false
print_nonlinear_residuals = false
print_linear_residuals = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/block_restriction/2d-rc.i)
mu = 1.1
rho = 1.1
advected_interp_method = 'average'
velocity_interp_method = 'rc'
restricted_blocks = '1'
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
block = ${restricted_blocks}
pressure = pressure
[]
[]
[Mesh]
parallel_type = 'replicated'
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '1 1'
dy = '1'
ix = '7 7'
iy = 10
subdomain_id = '1 2'
[]
[mid]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
input = mesh
new_boundary = 'middle'
[]
[break_top]
type = PatchSidesetGenerator
boundary = 'top'
n_patches = 2
input = mid
[]
[break_bottom]
type = PatchSidesetGenerator
boundary = 'bottom'
n_patches = 2
input = break_top
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 1
block = ${restricted_blocks}
[]
[v]
type = INSFVVelocityVariable
initial_condition = 1
block = ${restricted_blocks}
[]
[pressure]
type = INSFVPressureVariable
block = ${restricted_blocks}
[]
[temperature]
type = INSFVEnergyVariable
block = ${restricted_blocks}
[]
[scalar]
type = INSFVScalarFieldVariable
block = ${restricted_blocks}
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[energy_advection]
type = INSFVEnergyAdvection
variable = temperature
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
[]
[energy_diffusion]
type = FVDiffusion
coeff = 1.1
variable = temperature
[]
[energy_loss]
type = FVBodyForce
variable = temperature
value = -0.1
[]
[scalar_advection]
type = INSFVScalarFieldAdvection
variable = scalar
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
[]
[scalar_diffusion]
type = FVDiffusion
coeff = 1
variable = scalar
[]
[scalar_src]
type = FVBodyForce
variable = scalar
value = 0.1
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
functor = '1'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = v
functor = 0
[]
[top-wall-u]
type = INSFVNoSlipWallBC
boundary = 'top_0'
variable = u
function = 0
[]
[top-wall-v]
type = INSFVNoSlipWallBC
boundary = 'top_0'
variable = v
function = 0
[]
[bottom-wall-u]
type = INSFVSymmetryVelocityBC
boundary = 'bottom_0'
variable = u
mu = ${mu}
u = u
v = v
momentum_component = 'x'
[]
[bottom-wall-v]
type = INSFVSymmetryVelocityBC
boundary = 'bottom_0'
variable = v
mu = ${mu}
u = u
v = v
momentum_component = 'y'
[]
[bottom-wall-p]
type = INSFVSymmetryPressureBC
boundary = 'bottom_0'
variable = pressure
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'middle'
variable = pressure
function = 0
[]
[inlet_t]
type = FVDirichletBC
boundary = 'left'
variable = temperature
value = 1
[]
[outlet_scalar]
type = FVDirichletBC
boundary = 'middle'
variable = scalar
value = 1
[]
[]
[FunctorMaterials]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = 'temperature'
rho = ${rho}
block = ${restricted_blocks}
[]
[const]
type = ADGenericFunctorMaterial
prop_names = 'cp'
prop_values = '2'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/radiation_s2s/radiative_transfer_no_action_linearfv_simple.i)
[Problem]
kernel_coverage_check = false
linear_sys_names = 'energy_system u_system v_system p_system'
[]
[Mesh]
type = MeshGeneratorMesh
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1 1.3 1.9'
ix = '5 5 5'
dy = '2 1.2 0.9'
iy = '5 5 5'
subdomain_id = '0 1 0
4 5 2
0 3 0'
[]
[inner_bottom]
type = SideSetsBetweenSubdomainsGenerator
input = cmg
primary_block = 1
paired_block = 5
new_boundary = 'inner_bottom'
[]
[inner_left]
type = SideSetsBetweenSubdomainsGenerator
input = inner_bottom
primary_block = 4
paired_block = 5
new_boundary = 'inner_left'
[]
[inner_right]
type = SideSetsBetweenSubdomainsGenerator
input = inner_left
primary_block = 2
paired_block = 5
new_boundary = 'inner_right'
[]
[inner_top]
type = SideSetsBetweenSubdomainsGenerator
input = inner_right
primary_block = 3
paired_block = 5
new_boundary = 'inner_top'
[]
[rename]
type = RenameBlockGenerator
old_block = '1 2 3 4'
new_block = '0 0 0 0'
input = inner_top
[]
[split_inner_bottom]
type = PatchSidesetGenerator
boundary = 4
n_patches = 2
partitioner = centroid
centroid_partitioner_direction = x
input = rename
[]
[split_inner_left]
type = PatchSidesetGenerator
boundary = 5
n_patches = 2
partitioner = centroid
centroid_partitioner_direction = y
input = split_inner_bottom
[]
[split_inner_right]
type = PatchSidesetGenerator
boundary = 6
n_patches = 2
partitioner = centroid
centroid_partitioner_direction = y
input = split_inner_left
[]
[split_inner_top]
type = PatchSidesetGenerator
boundary = 7
n_patches = 3
partitioner = centroid
centroid_partitioner_direction = x
input = split_inner_right
[]
[delete_others]
type = BoundaryDeletionGenerator
input = 'split_inner_top'
boundary_names = 'inner_bottom inner_top inner_left inner_right'
[]
[delete_block5]
type = BlockDeletionGenerator
input = 'delete_others'
block = '5'
[]
[]
[Variables]
[temperature]
type = MooseLinearVariableFVReal
solver_sys = 'energy_system'
initial_condition = 400
[]
[vel_x]
type = MooseLinearVariableFVReal
solver_sys = 'u_system'
initial_condition = 0
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = 'v_system'
initial_condition = 0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = 'p_system'
initial_condition = 0
[]
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = 1
p_diffusion_kernel = p_diffusion
[]
[]
[LinearFVKernels]
[temp_conduction]
type = LinearFVDiffusion
diffusion_coeff = 5.
variable = temperature
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[]
[UserObjects]
[gray_lambert]
type = ViewFactorObjectSurfaceRadiation
boundary = 'inner_bottom_0 inner_bottom_1
inner_left_0 inner_left_1
inner_right_0 inner_right_1
inner_top_0 inner_top_1 inner_top_2'
fixed_temperature_boundary = 'inner_bottom_0 inner_bottom_1'
fixed_boundary_temperatures = '1200 1200'
adiabatic_boundary = 'inner_top_0 inner_top_1 inner_top_2'
emissivity = '0.9 0.9
0.8 0.8
0.4 0.4
1 1 1'
temperature = temperature
view_factor_object_name = view_factor
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END NONLINEAR'
[]
[view_factor]
type = UnobstructedPlanarViewFactor
boundary = 'inner_bottom_0 inner_bottom_1
inner_left_0 inner_left_1
inner_right_0 inner_right_1
inner_top_0 inner_top_1 inner_top_2'
normalize_view_factor = true
execute_on = 'INITIAL'
[]
[]
[LinearFVBCs]
[left]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = temperature
boundary = 'left'
functor = 600.
[]
[right]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = temperature
boundary = 'right'
functor = 300.
[]
[radiation]
type = LinearFVGrayLambertBC
variable = temperature
temperature_radiation = temperature
coeff_diffusion = 5.
surface_radiation_object_name = gray_lambert
boundary = 'inner_left_0 inner_left_1
inner_right_0 inner_right_1'
[]
[]
[Executioner]
type = SIMPLE
num_iterations = 2000
should_solve_momentum = false
should_solve_pressure = false
energy_system = 'energy_system'
energy_l_abs_tol = 1e-11
energy_l_tol = 1e-11
energy_equation_relaxation = 0.8
energy_field_relaxation = 0.8
energy_absolute_tolerance = 1e-10
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
print_fields = false
continue_on_max_its = true
[Quadrature]
side_order = SECOND
[]
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'p_system'
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/radiation_transfer_action/radiative_transfer_no_action.i)
[Problem]
kernel_coverage_check = false
[]
[Mesh]
type = MeshGeneratorMesh
[./cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1 1.3 1.9'
ix = '3 3 3'
dy = '2 1.2 0.9'
iy = '3 3 3'
subdomain_id = '0 1 0
4 5 2
0 3 0'
[../]
[./inner_bottom]
type = SideSetsBetweenSubdomainsGenerator
input = cmg
primary_block = 1
paired_block = 5
new_boundary = 'inner_bottom'
[../]
[./inner_left]
type = SideSetsBetweenSubdomainsGenerator
input = inner_bottom
primary_block = 4
paired_block = 5
new_boundary = 'inner_left'
[../]
[./inner_right]
type = SideSetsBetweenSubdomainsGenerator
input = inner_left
primary_block = 2
paired_block = 5
new_boundary = 'inner_right'
[../]
[./inner_top]
type = SideSetsBetweenSubdomainsGenerator
input = inner_right
primary_block = 3
paired_block = 5
new_boundary = 'inner_top'
[../]
[./rename]
type = RenameBlockGenerator
old_block = '1 2 3 4'
new_block = '0 0 0 0'
input = inner_top
[../]
[./split_inner_bottom]
type = PatchSidesetGenerator
boundary = 4
n_patches = 2
partitioner = centroid
centroid_partitioner_direction = x
input = rename
[../]
[./split_inner_left]
type = PatchSidesetGenerator
boundary = 5
n_patches = 2
partitioner = centroid
centroid_partitioner_direction = y
input = split_inner_bottom
[../]
[./split_inner_right]
type = PatchSidesetGenerator
boundary = 6
n_patches = 2
partitioner = centroid
centroid_partitioner_direction = y
input = split_inner_left
[../]
[./split_inner_top]
type = PatchSidesetGenerator
boundary = 7
n_patches = 3
partitioner = centroid
centroid_partitioner_direction = x
input = split_inner_right
[../]
[]
[Variables]
[./temperature]
block = 0
[../]
[]
[Kernels]
[./heat_conduction]
type = HeatConduction
variable = temperature
block = 0
thermal_conductivity = 5
[../]
[]
[UserObjects]
[./gray_lambert]
type = ViewFactorObjectSurfaceRadiation
boundary = 'inner_bottom_0 inner_bottom_1
inner_left_0 inner_left_1
inner_right_0 inner_right_1
inner_top_0 inner_top_1 inner_top_2'
fixed_temperature_boundary = 'inner_bottom_0 inner_bottom_1'
fixed_boundary_temperatures = '1200 1200'
adiabatic_boundary = 'inner_top_0 inner_top_1 inner_top_2'
emissivity = '0.9 0.9
0.8 0.8
0.4 0.4
1 1 1'
temperature = temperature
view_factor_object_name = view_factor
execute_on = 'LINEAR TIMESTEP_END'
[../]
[./view_factor]
type = UnobstructedPlanarViewFactor
boundary = 'inner_bottom_0 inner_bottom_1
inner_left_0 inner_left_1
inner_right_0 inner_right_1
inner_top_0 inner_top_1 inner_top_2'
normalize_view_factor = true
execute_on = 'INITIAL'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = temperature
boundary = left
value = 600
[../]
[./right]
type = DirichletBC
variable = temperature
boundary = right
value = 300
[../]
[./fixed_temperature]
type = FunctionDirichletBC
variable = temperature
boundary = inner_bottom
function = 1200
[../]
[./radiation]
type = GrayLambertNeumannBC
variable = temperature
surface_radiation_object_name = gray_lambert
boundary = 'inner_left_0 inner_left_1
inner_right_0 inner_right_1'
[../]
[]
[Postprocessors]
[./average_T_inner_right]
type = SideAverageValue
variable = temperature
boundary = inner_right
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/natural_convection/linear_segregated/2d/diff_heated_cavity_s2s_rad.i)
################################################################################
# MATERIAL PROPERTIES
################################################################################
rho = 3279.
T_0 = 875.0
mu = 1.
k_cond = 38.0
cp = 640.
alpha = 3.26e-5
eps = 1.0
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_fixed = '${rad_left} ${rad_right}'
rad_variable = '${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'
previous_nl_solution_required = true
[]
################################################################################
# GEOMETRY
################################################################################
[Mesh]
type = MeshGeneratorMesh
parallel_type = replicated
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 20
ny = 20
[]
[patch_left]
type = PatchSidesetGenerator
input = gen
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
[]
[delete_original_sidesets]
type = BoundaryDeletionGenerator
input = patch_bottom
boundary_names = 'left right top bottom'
[]
[]
################################################################################
# EQUATIONS: VARIABLES, KERNELS & BCS
################################################################################
[UserObjects]
[ins_rhie_chow_interpolator]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[view_factor_study]
type = ViewFactorRayStudy
boundary = ${rad_all}
execute_on = INITIAL
face_order = FOURTH
polar_quad_order = 12
azimuthal_quad_order = 4
warn_subdomain_hmax = false
[]
[view_factor]
type = RayTracingViewFactor
boundary = ${rad_all}
ray_study_name = view_factor_study
normalize_view_factor = true
execute_on = INITIAL
[]
[gray_lambert]
type = ViewFactorObjectSurfaceRadiation
boundary = ${rad_all}
fixed_temperature_boundary = ${rad_fixed}
fixed_boundary_temperatures = '880 880 880 880 880
870 870 870 870 870'
# Top and bottom are variable-temperature radiating surfaces.
adiabatic_boundary = ''
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
# NONLINEAR updates the radiation solution between SIMPLE iterations.
execute_on = 'NONLINEAR'
[]
[]
[RayBCs]
[view_factor]
type = ViewFactorRayBC
boundary = ${rad_all}
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
[]
[pressure]
type = MooseLinearVariableFVReal
initial_condition = 0
solver_sys = pressure_system
[]
[T_fluid]
type = MooseLinearVariableFVReal
solver_sys = energy_system
initial_condition = 875
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[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.8 0'
rho = ${rho}
ref_temperature = ${T_0}
alpha_name = ${alpha}
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}
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 ENERGY EQUATION #######
[heat_advection]
type = LinearFVEnergyAdvection
variable = T_fluid
advected_quantity = temperature
cp = ${cp}
[]
[conduction]
type = LinearFVDiffusion
variable = T_fluid
diffusion_coeff = ${fparse k_cond}
[]
[]
[LinearFVBCs]
[no-slip-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = vel_x
boundary = ${walls}
functor = 0
[]
[no-slip-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = vel_y
boundary = ${walls}
functor = 0
[]
[T_cold]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_fluid
boundary = ${rad_right}
functor = 870.0
[]
[T_hot]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_fluid
boundary = ${rad_left}
functor = 880.0
[]
[radiation_top_bottom]
type = LinearFVGrayLambertBC
variable = T_fluid
temperature_radiation = T_fluid
coeff_diffusion = ${k_cond}
surface_radiation_object_name = gray_lambert
boundary = ${rad_variable}
[]
[pressure]
type = LinearFVPressureFluxBC
boundary = ${walls}
variable = pressure
HbyA_flux = HbyA
Ainv = Ainv
u = vel_x
v = vel_y
rho = ${rho}
[]
[]
[FunctorMaterials]
[constant_functors]
type = GenericFunctorMaterial
prop_names = 'cp alpha_b'
prop_values = '${cp} ${alpha}'
[]
[]
################################################################################
# EXECUTION / SOLVE
################################################################################
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-14
pressure_l_abs_tol = 1e-14
energy_l_abs_tol = 1e-14
momentum_l_tol = 0
pressure_l_tol = 0
energy_l_tol = 0
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
energy_system = 'energy_system'
momentum_equation_relaxation = 0.7
pressure_variable_relaxation = 0.3
energy_equation_relaxation = 0.9
num_iterations = 1500
# Tight enough that the gold file does not depend on the number of MPI ranks.
pressure_absolute_tolerance = 1e-11
momentum_absolute_tolerance = 1e-11
energy_absolute_tolerance = 1e-11
print_fields = false
momentum_l_max_its = 300
pin_pressure = true
pressure_pin_value = 0.0
pressure_pin_point = '0.5 0.0 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'
continue_on_max_its = true
[]
################################################################################
# SIMULATION OUTPUTS
################################################################################
[Outputs]
exodus = true
[]