- bottom_leftThe bottom left point (in x,y,z with spaces in-between).
C++ Type:libMesh::VectorValue<double>
Controllable:No
Description:The bottom left point (in x,y,z with spaces in-between).
- boundary_newBoundary on specified block within the bounding box to assign
C++ Type:BoundaryName
Controllable:No
Description:Boundary on specified block within the bounding box to assign
- inputThe mesh we want to modify
C++ Type:MeshGeneratorName
Controllable:No
Description:The mesh we want to modify
- top_rightThe bottom left point (in x,y,z with spaces in-between).
C++ Type:libMesh::VectorValue<double>
Controllable:No
Description:The bottom left point (in x,y,z with spaces in-between).
SideSetsFromBoundingBoxGenerator
Defines new sidesets using currently-defined sideset IDs inside or outside of a bounding box.
Overview
This MeshGenerator
can be used in two ways:
To define a new sideset on multiple boundaries (default) - provide multiple boundary names or IDs, and all nodes existing on each provided boundary within the bounding box (or outside if
location = OUTSIDE
) will be assigned the new boundary name/ID.To define a new sideset only on overlapping boundaries (
boundary_id_overlap = True
) - provide multiple boundary names or IDs, and all nodes within the bounding box (or outside iflocation = OUTSIDE
) that are currently assigned to ALL of the listed boundary names/IDs will be assigned the new boundary name/ID.
Input Parameters
- boundary_id_overlapFalseSet to true if boundaries need to overlap on sideset to be detected.
Default:False
C++ Type:bool
Controllable:No
Description:Set to true if boundaries need to overlap on sideset to be detected.
- locationINSIDEControl of where the subdomain id is to be set
Default:INSIDE
C++ Type:MooseEnum
Options:INSIDE, OUTSIDE
Controllable:No
Description:Control of where the subdomain id is to be set
- replaceFalseIf true, replace the old sidesets. If false, the current sidesets (if any) will be preserved.
Default:False
C++ Type:bool
Controllable:No
Description:If true, replace the old sidesets. If false, the current sidesets (if any) will be preserved.
Optional 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: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
- include_only_external_sidesFalseWhether to only include external sides when considering sides to add to the sideset
Default:False
C++ Type:bool
Controllable:No
Description:Whether to only include external sides when considering sides to add to the sideset
- included_boundariesA set of boundary names or ids whose sides will be included in the new sidesets
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:A set of boundary names or ids whose sides will be included in the new sidesets
- included_neighborsA set of neighboring subdomain names or ids. A face is only added if the subdomain id of the neighbor is in this set
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:A set of neighboring subdomain names or ids. A face is only added if the subdomain id of the neighbor is in this set
- included_subdomainsA set of subdomain names or ids whose sides will be included in the new sidesets
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:A set of subdomain names or ids whose sides will be included in the new sidesets
- normal0 0 0If supplied, only faces with normal equal to this, up to normal_tol, will be added to the sidesets specified
Default:0 0 0
C++ Type:libMesh::Point
Controllable:No
Description:If supplied, only faces with normal equal to this, up to normal_tol, will be added to the sidesets specified
- normal_tol0.1If normal is supplied then faces are only added if face_normal.normal_hat >= 1 - normal_tol, where normal_hat = normal/|normal|
Default:0.1
C++ Type:double
Controllable:No
Description:If normal is supplied then faces are only added if face_normal.normal_hat >= 1 - normal_tol, where normal_hat = normal/|normal|
Sideset Restrictions 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
- (test/tests/meshgenerators/sidesets_bounding_box_generator/overlapping_sidesets.i)
- (test/tests/meshgenerators/sidesets_bounding_box_generator/generate_outside.i)
- (test/tests/meshgenerators/stitch_boundary_mesh_generator/stitch_2d.i)
- (test/tests/meshgenerators/sidesets_bounding_box_generator/error_no_side_sets_found.i)
- (modules/combined/examples/optimization/thermomechanical/structural_sub.i)
- (test/tests/meshgenerators/sidesets_bounding_box_generator/generate_sidesets_bounding_box.i)
- (test/tests/meshgenerators/stitch_boundary_mesh_generator/stitch_3d.i)
- (test/tests/meshgenerators/sidesets_bounding_box_generator/error_boundary_number.i)
- (test/tests/meshgenerators/flip_sideset_generator/flux_flip_2D.i)
- (modules/xfem/test/tests/nucleation_uo/nucleate_edge_crack_2d.i)
- (test/tests/meshgenerators/sidesets_bounding_box_generator/multiple_boundary_ids_3d.i)
- (test/tests/meshgenerators/sidesets_bounding_box_generator/multiple_boundary_ids.i)
- (test/tests/meshgenerators/sidesets_bounding_box_generator/overlapping_sidesets_not_found.i)
- (test/tests/meshgenerators/sidesets_bounding_box_generator/error_no_nodes_found.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/block-restriction/with-empty-block.i)
- (test/tests/meshgenerators/sidesets_bounding_box_generator/error_no_elements_in_bounding_box.i)
- (modules/optimization/test/tests/executioners/constrained/shape_optimization/forward.i)
- (modules/combined/examples/optimization/thermomechanical/thermal_sub.i)
- (modules/combined/examples/optimization/thermomechanical/thermomechanical_main.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/thermal_test.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/block-restriction/segregated/empty-block-segregated.i)
(test/tests/meshgenerators/sidesets_bounding_box_generator/overlapping_sidesets.i)
[Mesh]
#active = 'gmg'
[./gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 10
[]
[./createNewSidesetOne]
type = SideSetsFromBoundingBoxGenerator
input = gmg
included_boundaries = 'bottom back left'
boundary_new = 10
bottom_left = '-1.1 -1.1 -1.1'
top_right = '1.1 1.1 1.1'
boundary_id_overlap = true
[]
[./createNewSidesetTwo]
type = SideSetsFromBoundingBoxGenerator
input = createNewSidesetOne
included_boundaries = 'right bottom'
boundary_new = 11
bottom_left = '-1.1 -1.1 -1.1'
top_right = '1.1 1.1 1.1'
boundary_id_overlap = true
[]
[./createNewSidesetThree]
type = SideSetsFromBoundingBoxGenerator
input = createNewSidesetTwo
included_boundaries = 'top front'
boundary_new = 12
bottom_left = '-1.1 -1.1 -1.1'
top_right = '1.1 1.1 1.1'
boundary_id_overlap = true
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./BCone]
type = DirichletBC
variable = u
boundary = 10
value = 1
[../]
[./BCtwo]
type = DirichletBC
variable = u
boundary = 11
value = 1
[../]
[./BCthree]
type = DirichletBC
variable = u
boundary = 12
value = 0
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/sidesets_bounding_box_generator/generate_outside.i)
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[./createNewSidesetOne]
type = SideSetsFromBoundingBoxGenerator
input = gmg
included_boundaries = 'left'
boundary_new = 10
location = OUTSIDE
bottom_left = '-0.1 -0.1 0'
top_right = '0.5 0.5 0'
[]
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/stitch_boundary_mesh_generator/stitch_2d.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
nx = 4
ny = 4
dim = 2
[]
[block1]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '0.5 1 0'
input = gen
[]
[block2]
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '0.5 0 0'
top_right = '1 1 0'
input = block1
[]
[breakmesh]
input = block2
type = BreakMeshByBlockGenerator
block_pairs = '1 2'
split_interface = true
add_interface_on_two_sides = true
[]
[block1_block2_top]
type = SideSetsFromBoundingBoxGenerator
input = breakmesh
included_boundaries = 'Block1_Block2'
boundary_new = '103'
bottom_left = '0 0.5 0'
top_right = '1 1 0'
[]
[block1_block2_bottom]
type = SideSetsFromBoundingBoxGenerator
input = block1_block2_top
included_boundaries = 'Block1_Block2'
boundary_new = '102'
bottom_left = '0 0.5 0'
top_right = '1 1 0'
location = OUTSIDE
[]
[block2_block1_top]
type = SideSetsFromBoundingBoxGenerator
input = block1_block2_bottom
included_boundaries = 'Block2_Block1'
boundary_new = '101'
bottom_left = '0 0.5 0'
top_right = '1 1 0'
[]
[block2_block1_bottom]
type = SideSetsFromBoundingBoxGenerator
input = block2_block1_top
included_boundaries = 'Block2_Block1'
boundary_new = '100'
bottom_left = '0 0.5 0'
top_right = '1 1 0'
location = OUTSIDE
[]
[stitch]
type = StitchBoundaryMeshGenerator
input = block2_block1_bottom
clear_stitched_boundary_ids = false
stitch_boundaries_pair = '101 103'
[]
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/sidesets_bounding_box_generator/error_no_side_sets_found.i)
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
#parallel_type = replicated
[]
[./createNewSidesetOne]
type = SideSetsFromBoundingBoxGenerator
input = gmg
included_boundaries = 'right'
boundary_new = 11
bottom_left = '-0.1 -0.1 0'
top_right = '0.9 0.9 0'
[]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./leftBC]
type = DirichletBC
variable = u
boundary = 'left'
value = 1
[../]
[./rightBC]
type = DirichletBC
variable = u
boundary = 11
value = 0
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/combined/examples/optimization/thermomechanical/structural_sub.i)
vol_frac = 0.4
power = 2.0
E0 = 1.0e-6
E1 = 1.0
rho0 = 0.0
rho1 = 1.0
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 40
xmin = 0
xmax = 40
ymin = 0
ymax = 40
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold
nodes = 0
[]
[push_left]
type = ExtraNodesetGenerator
input = node
new_boundary = push_left
coord = '16 0 0'
[]
[push_center]
type = ExtraNodesetGenerator
input = push_left
new_boundary = push_center
coord = '24 0 0'
[]
[extra]
type = SideSetsFromBoundingBoxGenerator
input = push_center
bottom_left = '-0.01 17.999 0'
top_right = '5 22.001 0'
boundary_new = n1
boundaries_old = left
[]
[dirichlet_bc]
type = SideSetsFromNodeSetsGenerator
input = extra
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[Dc]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = FIRST
initial_condition = ${vol_frac}
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = hold
value = 0.0
[]
[no_x_symm]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[]
[NodalKernels]
[push_left]
type = NodalGravity
variable = disp_y
boundary = push_left
gravity_value = -1.0e-3
mass = 1
[]
[push_center]
type = NodalGravity
variable = disp_y
boundary = push_center
gravity_value = -1.0e-3
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
expression = "A1:=(${E0}-${E1})/(${rho0}^${power}-${rho1}^${power}); "
"B1:=${E0}-A1*${rho0}^${power}; E1:=A1*mat_den^${power}+B1; E1"
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[rad_avg]
type = RadialAverage
radius = 1.2
weights = linear
prop_name = sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[calc_sense]
type = SensitivityFilter
density_sensitivity = Dc
design_density = mat_den
filter_UO = rad_avg
execute_on = TIMESTEP_END
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-12
dt = 1.0
num_steps = 500
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'INITIAL TIMESTEP_END'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
expression = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
[]
[objective]
type = ElementIntegralMaterialProperty
mat_prop = strain_energy_density
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
(test/tests/meshgenerators/sidesets_bounding_box_generator/generate_sidesets_bounding_box.i)
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[./createNewSidesetOne]
type = SideSetsFromBoundingBoxGenerator
input = gmg
included_boundaries = 'left'
boundary_new = 10
bottom_left = '-0.1 -0.1 0'
top_right = '0.5 0.5 0'
[]
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/stitch_boundary_mesh_generator/stitch_3d.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
nx = 4
ny = 4
nz = 4
dim = 3
[]
[block1]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '0.5 1 1'
input = gen
[]
[block2]
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '0.5 0 0'
top_right = '1 1 1'
input = block1
[]
[breakmesh]
input = block2
type = BreakMeshByBlockGenerator
block_pairs = '1 2'
split_interface = true
add_interface_on_two_sides = true
[]
[block1_block2_top]
type = SideSetsFromBoundingBoxGenerator
input = breakmesh
included_boundaries = 'Block1_Block2'
boundary_new = '103'
bottom_left = '0 0.5 0'
top_right = '1 1 1'
[]
[block1_block2_bottom]
type = SideSetsFromBoundingBoxGenerator
input = block1_block2_top
included_boundaries = 'Block1_Block2'
boundary_new = '102'
bottom_left = '0 0.5 0'
top_right = '1 1 1'
location = OUTSIDE
[]
[block2_block1_top]
type = SideSetsFromBoundingBoxGenerator
input = block1_block2_bottom
included_boundaries = 'Block2_Block1'
boundary_new = '101'
bottom_left = '0 0.5 0'
top_right = '1 1 1'
[]
[block2_block1_bottom]
type = SideSetsFromBoundingBoxGenerator
input = block2_block1_top
included_boundaries = 'Block2_Block1'
boundary_new = '100'
bottom_left = '0 0.5 0'
top_right = '1 1 1'
location = OUTSIDE
[]
[stitch]
type = StitchBoundaryMeshGenerator
input = block2_block1_bottom
clear_stitched_boundary_ids = false
stitch_boundaries_pair = '101 103'
[]
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/sidesets_bounding_box_generator/error_boundary_number.i)
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[./createNewSidesetOne]
type = SideSetsFromBoundingBoxGenerator
input = gmg
included_boundaries = 'right'
boundary_new = 11
bottom_left = '0.5 0.5 0'
top_right = '1.9 1.9 0'
[]
[./createNewSidesetTwo]
type = SideSetsFromBoundingBoxGenerator
input = createNewSidesetOne
included_boundaries = 'left'
boundary_new = 10
bottom_left = '-0.1 -0.1 0'
top_right = '0.3 0.3 0'
boundary_id_overlap = true
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/flip_sideset_generator/flux_flip_2D.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 3
ny = 3
xmax = 3
ymax = 3
[]
[s1]
type = ParsedGenerateSideset
input = gmg
combinatorial_geometry = 'x > 0.9 & x < 1.1 & y > -0.1 & y < 1.1'
normal = '1 0 0'
new_sideset_name = s1
[]
[s2]
type = ParsedGenerateSideset
input = s1
combinatorial_geometry = 'x > 0.9 & x < 2.1 & y > 0.9 & y < 1.1'
normal = '0 1 0'
new_sideset_name = s2
[]
[s3]
type = ParsedGenerateSideset
input = s2
combinatorial_geometry = 'x > 1.9 & x < 2.1 & y > 0.9 & y < 2.1'
normal = '1 0 0'
new_sideset_name = s3
[]
[s4]
type = ParsedGenerateSideset
input = s3
combinatorial_geometry = 'x > 1.9 & x < 3.1 & y > 1.9 & y < 2.1'
normal = '0 1 0'
new_sideset_name = s4
[]
[sideset]
type = SideSetsFromBoundingBoxGenerator
input = s4
bottom_left = '0 0 0'
top_right = '3 3 3'
included_boundaries = 's1 s2 s3 s4'
boundary_new = 's_combined'
[]
[flip]
type = FlipSidesetGenerator
input = sideset
boundary = s_combined
[]
[]
[AuxVariables]
[u]
[]
[]
[AuxKernels]
[diffusion]
type = FunctionAux
variable = u
function = func
[]
[]
[Functions]
[func]
type = ParsedFunction
expression = x+y
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Postprocessors]
[flux]
type = SideDiffusiveFluxIntegral
variable = u
boundary = s_combined
diffusivity = 1
[]
[area]
type = AreaPostprocessor
boundary = s_combined
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(modules/xfem/test/tests/nucleation_uo/nucleate_edge_crack_2d.i)
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[XFEM]
geometric_cut_userobjects = 'cut_mesh2'
qrule = volfrac
output_cut_plane = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
xmin = 0
xmax = 2
ymin = 0.0
ymax = 1.0
elem_type = QUAD4
[]
[top_left]
type = BoundingBoxNodeSetGenerator
new_boundary = pull_top_left
bottom_left = '-0.01 0.99 0'
top_right = '0.11 1.01 0'
input = gen
[]
[top_right]
type = BoundingBoxNodeSetGenerator
new_boundary = pull_top_right
bottom_left = '1.89 0.99 0'
top_right = '2.01 1.01 0'
input = top_left
[]
[top_middle_ss]
type = SideSetsFromBoundingBoxGenerator
input = top_right
bottom_left = '0.79 0.89 0'
top_right = '1.21 1.01 0'
block_id = '0'
boundary_new = top_middle_ss
boundaries_old = top
[]
[nucleate]
type = ParsedSubdomainMeshGenerator
input = top_middle_ss
combinatorial_geometry = 'y > 0.39 & y < 0.51'
block_id = 10
[]
[]
[DomainIntegral]
integrals = 'InteractionIntegralKI InteractionIntegralKII'
displacements = 'disp_x disp_y'
crack_front_points_provider = cut_mesh2
2d=true
number_points_from_provider = 0
crack_direction_method = CurvedCrackFront
radius_inner = '0.15'
radius_outer = '0.45'
poissons_ratio = 0.3
youngs_modulus = 207000
block = 0
incremental = true
used_by_xfem_to_grow_crack = true
[]
[UserObjects]
[nucleate]
type = MeshCut2DRankTwoTensorNucleation
tensor = stress
scalar_type = MaxPrincipal
nucleation_threshold = nucleation_threshold
initiate_on_boundary = 'left right'
nucleation_length = .2
[]
[cut_mesh2]
type = MeshCut2DFractureUserObject
mesh_file = make_edge_crack_in.e
k_critical=230
growth_increment = 0.11
nucleate_uo = nucleate
[]
[]
[AuxVariables]
[nucleation_threshold]
order = CONSTANT
family = MONOMIAL
[]
[]
[ICs]
[nucleation_bulk]
type = ConstantIC
value = 10000
variable = nucleation_threshold
block = 0
[]
[nucleation_weak]
type = FunctionIC
function = nucleation_x
variable = nucleation_threshold
block = 10
[]
[]
[Functions]
[nucleation_x]
type = ParsedFunction
expression = '300+x*50'
[]
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
planar_formulation = plane_strain
add_variables = true
generate_output = 'stress_xx stress_yy vonmises_stress max_principal_stress'
[../]
[]
[Functions]
[bc_pull_top]
type = ParsedFunction
expression = 0.0005*t
[]
[]
[BCs]
[top_edges]
type = FunctionDirichletBC
boundary = 'pull_top_left pull_top_right'
variable = disp_y
function = bc_pull_top
[]
[top_middle]
type = NeumannBC
boundary = top_middle_ss
variable = disp_y
value = -2000
[]
[bottom_x]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[]
[bottom_y]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
line_search = 'none'
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
# controls for linear iterations
l_max_its = 100
l_tol = 1e-2
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
# time control
start_time = 0.0
dt = 1.0
end_time = 5
max_xfem_update = 100
[]
[Outputs]
csv=true
execute_on = TIMESTEP_END
# [xfemcutter]
# type=XFEMCutMeshOutput
# xfem_cutter_uo=cut_mesh2
# []
# console = false
[./console]
type = Console
output_linear = false
output_nonlinear = false
[../]
[]
(test/tests/meshgenerators/sidesets_bounding_box_generator/multiple_boundary_ids_3d.i)
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 10
#parallel_type = replicated
[]
[./createNewSidesetOne]
type = SideSetsFromBoundingBoxGenerator
input = gmg
included_boundaries = 'left bottom front'
boundary_new = 10
bottom_left = '-0.1 -0.1 -0.1'
top_right = '0.1 0.2 0.3'
[]
[./createNewSidesetTwo]
type = SideSetsFromBoundingBoxGenerator
input = createNewSidesetOne
included_boundaries = 'right top back'
boundary_new = 11
bottom_left = '0.6 0.7 0.8'
top_right = '1.1 1.1 1.1'
[]
[./createNewSidesetThree]
type = SideSetsFromBoundingBoxGenerator
input = createNewSidesetTwo
included_boundaries = 'left top back'
boundary_new = 12
bottom_left = '-0.1 0.9 0.9'
top_right = '0.1 1.1 1.1'
[]
[./createNewSidesetFour]
type = SideSetsFromBoundingBoxGenerator
input = createNewSidesetThree
included_boundaries = 'front'
boundary_new = 13
bottom_left = '0.4 0.4 0.9'
top_right = '0.6 0.6 1.1'
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./firstBC]
type = DirichletBC
variable = u
boundary = 10
value = 1
[../]
[./secondBC]
type = DirichletBC
variable = u
boundary = 11
value = 0
[../]
[./thirdBC]
type = DirichletBC
variable = u
boundary = 12
value = 0
[../]
[./fourthBC]
type = DirichletBC
variable = u
boundary = 13
value = 0.5
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/sidesets_bounding_box_generator/multiple_boundary_ids.i)
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[./createNewSidesetOne]
type = SideSetsFromBoundingBoxGenerator
input = gmg
included_boundaries = 'left bottom'
boundary_new = 10
bottom_left = '-0.1 -0.1 0'
top_right = '0.2 0.9 0'
[../]
[./createNewSidesetTwo]
type = SideSetsFromBoundingBoxGenerator
input = createNewSidesetOne
included_boundaries = 'right'
boundary_new = 11
bottom_left = '0.5 0.5 0'
top_right = '1.1 1.1 0'
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./leftBC]
type = DirichletBC
variable = u
boundary = 10
value = 1
[../]
[./rightBC]
type = DirichletBC
variable = u
boundary = 11
value = 0
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/sidesets_bounding_box_generator/overlapping_sidesets_not_found.i)
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 10
[]
[./createNewSidesetOne]
type = SideSetsFromBoundingBoxGenerator
input = gmg
included_boundaries = 'bottom top'
boundary_new = 11
bottom_left = '-1.1 -1.1 -1.1'
top_right = '1.1 1.1 1.1'
boundary_id_overlap = true
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./BCone]
type = DirichletBC
variable = u
boundary = 'left'
value = 1
[../]
[./BCtwo]
type = DirichletBC
variable = u
boundary = 11
value = 0
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/sidesets_bounding_box_generator/error_no_nodes_found.i)
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
#parallel_type = replicated
[]
[./createNewSidesetOne]
type = SideSetsFromBoundingBoxGenerator
input = gmg
included_boundaries = 'right'
boundary_new = 11
bottom_left = '0.5 0.5 0'
top_right = '1.9 1.9 0'
[]
[./createNewSidesetTwo]
type = SideSetsFromBoundingBoxGenerator
input = createNewSidesetOne
included_boundaries = 'top right'
boundary_new = 10
bottom_left = '-0.1 -0.1 0'
top_right = '0.7 0.3 0'
boundary_id_overlap = true
[]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./leftBC]
type = DirichletBC
variable = u
boundary = 10
value = 1
[../]
[./rightBC]
type = DirichletBC
variable = u
boundary = 11
value = 0
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/block-restriction/with-empty-block.i)
mu = 1.2
rho_fluid = 0.2
k_fluid = 1.1
cp_fluid = 2.3
T_cold = 310
alpha = 1e-3
Q = 200
[Problem]
kernel_coverage_check = false
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
velocity_interp_method = 'rc'
advected_interp_method = 'average'
[]
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '0.3683 0.0127'
dy = '0.0127 0.2292 2.5146 0.2292 0.0127'
ix = '2 1'
iy = '1 2 3 2 1'
subdomain_id = '0 0
1 0
2 0
1 0
0 0
'
[]
[rename_block_name]
type = RenameBlockGenerator
input = cmg
old_block = '0 1 2'
new_block = 'wall_block spacer_block porous_block'
[]
[solid_fluid_interface_1]
type = SideSetsBetweenSubdomainsGenerator
input = rename_block_name
primary_block = porous_block
paired_block = wall_block
new_boundary = 'solid_fluid_interface'
[]
[solid_fluid_interface_2]
type = SideSetsBetweenSubdomainsGenerator
input = solid_fluid_interface_1
primary_block = spacer_block
paired_block = wall_block
new_boundary = 'solid_fluid_interface'
[]
[wall_left_boundary_1]
type = SideSetsFromBoundingBoxGenerator
input = solid_fluid_interface_2
bottom_left = '0 0 0'
top_right = '0.1 0.0127 0'
included_boundaries = left
boundary_new = wall_left
[]
[wall_left_boundary_2]
type = SideSetsFromBoundingBoxGenerator
input = wall_left_boundary_1
bottom_left = '0 2.9857 0'
top_right = '0.1 2.9984 0'
included_boundaries = left
boundary_new = wall_left
[]
[fluid_left_boundary]
type = SideSetsFromBoundingBoxGenerator
input = wall_left_boundary_2
bottom_left = '0 0.0127 0'
top_right = '0.1 2.9857 0'
included_boundaries = left
boundary_new = fluid_left
[]
coord_type = RZ
rz_coord_axis = Y
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = superficial_vel_x
v = superficial_vel_y
pressure = pressure
porosity = porosity
block = 'spacer_block porous_block'
[]
[]
[Variables]
[superficial_vel_x]
type = PINSFVSuperficialVelocityVariable
block = 'spacer_block porous_block'
[]
[superficial_vel_y]
type = PINSFVSuperficialVelocityVariable
block = 'spacer_block porous_block'
[]
[pressure]
type = INSFVPressureVariable
block = 'spacer_block porous_block'
[]
[T_fluid]
type = INSFVEnergyVariable
block = 'spacer_block porous_block'
[]
[lambda]
family = SCALAR
order = FIRST
block = 'spacer_block porous_block'
[]
[]
[AuxVariables]
[porosity]
type = MooseVariableFVReal
block = 'spacer_block porous_block'
[]
[]
[FVKernels]
# No mass time derivative because imcompressible (derivative = 0)
[mass]
type = PINSFVMassAdvection
variable = pressure
rho = ${rho_fluid}
block = 'spacer_block porous_block'
[]
[mean_zero_pressure]
type = FVIntegralValueConstraint
variable = pressure
lambda = lambda
block = 'spacer_block porous_block'
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_x
rho = ${rho_fluid}
momentum_component = 'x'
block = 'spacer_block porous_block'
porosity = porosity
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_x
mu = ${mu}
momentum_component = 'x'
block = 'spacer_block porous_block'
porosity = porosity
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_x
momentum_component = 'x'
pressure = pressure
block = 'spacer_block porous_block'
porosity = porosity
[]
[u_buoyancy]
type = PINSFVMomentumBoussinesq
variable = superficial_vel_x
T_fluid = T_fluid
gravity = '0 -1 0'
rho = ${rho_fluid}
ref_temperature = ${T_cold}
momentum_component = 'x'
block = 'spacer_block porous_block'
porosity = porosity
[]
[u_gravity]
type = PINSFVMomentumGravity
variable = superficial_vel_x
gravity = '0 -1 0'
rho = ${rho_fluid}
momentum_component = 'x'
block = 'spacer_block porous_block'
porosity = porosity
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_y
rho = ${rho_fluid}
momentum_component = 'y'
block = 'spacer_block porous_block'
porosity = porosity
[]
[v_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_y
mu = ${mu}
momentum_component = 'y'
block = 'spacer_block porous_block'
porosity = porosity
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_y
momentum_component = 'y'
pressure = pressure
block = 'spacer_block porous_block'
porosity = porosity
[]
[v_buoyancy]
type = PINSFVMomentumBoussinesq
variable = superficial_vel_y
T_fluid = T_fluid
gravity = '0 -1 0'
rho = ${rho_fluid}
ref_temperature = ${T_cold}
momentum_component = 'y'
block = 'spacer_block porous_block'
porosity = porosity
[]
[v_gravity]
type = PINSFVMomentumGravity
variable = superficial_vel_y
gravity = '0 -1 0'
rho = ${rho_fluid}
momentum_component = 'y'
block = 'spacer_block porous_block'
porosity = porosity
[]
[temp_conduction]
type = PINSFVEnergyDiffusion
k = 'k_fluid'
variable = T_fluid
block = 'spacer_block porous_block'
porosity = porosity
[]
[temp_advection]
type = PINSFVEnergyAdvection
variable = T_fluid
block = 'spacer_block porous_block'
[]
[heat_source]
type = FVBodyForce
variable = T_fluid
function = ${Q}
block = 'porous_block'
[]
[]
[FVBCs]
[no_slip_x]
type = INSFVNoSlipWallBC
variable = superficial_vel_x
boundary = 'solid_fluid_interface'
function = 0
[]
[no_slip_y]
type = INSFVNoSlipWallBC
variable = superficial_vel_y
boundary = 'solid_fluid_interface'
function = 0
[]
[reflective_x]
type = INSFVSymmetryVelocityBC
variable = superficial_vel_x
boundary = fluid_left
momentum_component = 'x'
mu = ${mu}
u = superficial_vel_x
v = superficial_vel_y
[]
[reflective_y]
type = INSFVSymmetryVelocityBC
variable = superficial_vel_y
boundary = fluid_left
momentum_component = 'y'
mu = ${mu}
u = superficial_vel_x
v = superficial_vel_y
[]
[reflective_p]
type = INSFVSymmetryPressureBC
boundary = fluid_left
variable = pressure
[]
[T_reflective]
type = FVNeumannBC
variable = T_fluid
boundary = fluid_left
value = 0
[]
[T_cold_boundary]
type = FVDirichletBC
variable = T_fluid
boundary = solid_fluid_interface
value = ${T_cold}
[]
[]
[ICs]
[porosity_spacer]
type = ConstantIC
variable = porosity
block = spacer_block
value = 1.0
[]
[porosity_fuel]
type = ConstantIC
variable = porosity
block = porous_block
value = 0.1
[]
[temp_ic_fluid]
type = ConstantIC
variable = T_fluid
value = ${T_cold}
block = 'spacer_block porous_block'
[]
[superficial_vel_x]
type = ConstantIC
variable = superficial_vel_x
value = 1E-5
block = 'spacer_block porous_block'
[]
[superficial_vel_y]
type = ConstantIC
variable = superficial_vel_y
value = 1E-5
block = 'spacer_block porous_block'
[]
[]
[FunctorMaterials]
[functor_constants_fluid]
type = ADGenericFunctorMaterial
prop_names = 'alpha_b cp k_fluid'
prop_values = '${alpha} ${cp_fluid} ${k_fluid}'
block = 'spacer_block porous_block'
[]
[density_fluid]
type = INSFVEnthalpyFunctorMaterial
temperature = 'T_fluid'
rho = ${rho_fluid}
block = 'spacer_block porous_block'
[]
[functor_constants_steel]
# We need this to avoid errors for materials not existing on every block
type = ADGenericFunctorMaterial
prop_names = 'dummy'
prop_values = 0.0
block = wall_block
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = none
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
[Debug]
show_var_residual_norms = true
[]
(test/tests/meshgenerators/sidesets_bounding_box_generator/error_no_elements_in_bounding_box.i)
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
#parallel_type = replicated
[]
[./createNewSidesetOne]
type = SideSetsFromBoundingBoxGenerator
input = gmg
included_boundaries = 'left bottom'
boundary_new = 10
bottom_left = '-0.1 -0.1 0'
top_right = '0.8 0.2 0'
[]
[./createNewSidesetTwo]
type = SideSetsFromBoundingBoxGenerator
input = createNewSidesetOne
included_boundaries = 'right top'
boundary_new = 11
bottom_left = '1.7 0.7 0'
top_right = '2.1 1.1 0'
[]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./leftBC]
type = DirichletBC
variable = u
boundary = 10
value = 1
[../]
[./rightBC]
type = DirichletBC
variable = u
boundary = 11
value = 0
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/optimization/test/tests/executioners/constrained/shape_optimization/forward.i)
# This test is documented as an example for ConstrainedShapeOptimization. This
# test should not be changed without updating the documentation.
inner_radius = 6
outer_radius = 10
volume_constraint = 200
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[mesh]
type = ConcentricCircleMeshGenerator
has_outer_square = no
num_sectors = 16
radii = '${inner_radius} ${outer_radius}'
rings = '16 16'
preserve_volumes = false
[]
[inner_radius]
type = SideSetsBetweenSubdomainsGenerator
input = mesh
new_boundary = inner
primary_block = 2
paired_block = 1
[]
[delete]
type = BlockDeletionGenerator
input = inner_radius
block = 1
[]
[gather_all]
type = BoundingBoxNodeSetGenerator
input = delete
bottom_left = '-100 -100 -100'
top_right = '100 100 100'
new_boundary = total
[]
[combine]
type = SideSetsFromBoundingBoxGenerator
input = gather_all
bottom_left = '-100 -100 -100'
top_right = '100 100 100'
boundaries_old = 'inner outer'
boundary_new = moving
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[T]
[]
[]
[AuxVariables]
[dist_between]
[AuxKernel]
type = NearestNodeDistanceAux
variable = dist_between
paired_boundary = moving
boundary = total
block = 2
use_displaced_mesh = false
execute_on = "INITIAL"
[]
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
use_displaced_mesh = false
diffusivity = diff_coef
[]
[disp_y]
type = MatDiffusion
variable = disp_y
use_displaced_mesh = false
diffusivity = diff_coef
[]
# run physics of interest on deformed mesh
[Diffusion]
type = FunctionDiffusion
variable = T
use_displaced_mesh = true
[]
[Source]
type = BodyForce
variable = T
value = 1
use_displaced_mesh = true
[]
[]
[Materials]
# perserve elements near the boundary
[diff_coef]
type = ParsedMaterial
coupled_variables = 'dist_between'
expression = '1/(dist_between+0.5)'
property_name = 'diff_coef'
[]
[h]
type = ADGenericFunctionMaterial
prop_names = h
prop_values = h
[]
# convection type boundary condition
[convection_bc]
type = ADParsedMaterial
coupled_variables = "T"
expression = "h*(100-T)"
material_property_names = "h"
property_name = convection
[]
[]
[Functions]
[r1_x]
type = ParsedOptimizationFunction
expression = 'r1 * cos((atan(y/x)))'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[r1_y]
type = ParsedOptimizationFunction
expression = 'r1 * sin((atan(y/x)))'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[r0_x]
type = ParsedOptimizationFunction
expression = 'r0 * cos((atan(y/x)))'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[r0_y]
type = ParsedOptimizationFunction
expression = 'r0 * sin((atan(y/x)))'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[h]
type = ParsedOptimizationFunction
# r0+${inner_radius} is the true current inner radius
expression = '10 /(pi * (r0+${inner_radius})^3)'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[eq_grad_r0]
type = ParsedOptimizationFunction
expression = '-2 * pi * (r0 + ${inner_radius})'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[eq_grad_r1]
type = ParsedOptimizationFunction
# r1+${outer_radius} is the true current outer radius
expression = '2 * pi * (r1+${outer_radius})'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[]
[BCs]
[diffuse_r1_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 'outer'
function = r1_x
preset = false
[]
[diffuse_r1_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = 'outer'
function = r1_y
preset = false
[]
[diffuse_r0_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 'inner'
function = r0_x
preset = false
[]
[diffuse_r0_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = 'inner'
function = r0_y
preset = false
[]
# run physics on deformed mesh
[convection]
type = ADMatNeumannBC
variable = T
boundary = inner
boundary_material = convection
use_displaced_mesh = true
value = 1
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Reporters]
[params]
type = ConstantReporter
real_vector_names = 'radii'
real_vector_values = '0 0'
dof_id_type_vector_names = 'num_params'
dof_id_type_vector_values = '2'
[]
[]
[Postprocessors]
[current_volume]
type = VolumePostprocessor
use_displaced_mesh = true
[]
# objective function
[objective]
type = NodalExtremeValue
variable = T
[]
[eq_constraint]
type = ParsedPostprocessor
pp_names = current_volume
expression = 'current_volume - ${volume_constraint}'
[]
[func_r0]
type = FunctionValuePostprocessor
function = eq_grad_r0
[]
[func_r1]
type = FunctionValuePostprocessor
function = eq_grad_r1
[]
[]
[VectorPostprocessors]
# convert "Real" postprocessors to vectors
[vol_constraint]
type = VectorOfPostprocessors
postprocessors = 'eq_constraint'
force_postaux = true
[]
[eq_grad]
type = VectorOfPostprocessors
postprocessors = 'func_r0 func_r1'
force_postaux = true
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = none
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
[]
[Outputs]
console = false
[]
(modules/combined/examples/optimization/thermomechanical/thermal_sub.i)
vol_frac = 0.4
power = 2.0
E0 = 1.0e-6
E1 = 1.0
rho0 = 0.0
rho1 = 1.0
C0 = 1.0e-6
C1 = 1.0
TC0 = 1.0e-16
TC1 = 1.0
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 40
xmin = 0
xmax = 40
ymin = 0
ymax = 40
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold
nodes = 0
[]
[push_left]
type = ExtraNodesetGenerator
input = node
new_boundary = push_left
coord = '16 0 0'
[]
[push_center]
type = ExtraNodesetGenerator
input = push_left
new_boundary = push_center
coord = '24 0 0'
[]
[extra]
type = SideSetsFromBoundingBoxGenerator
input = push_center
bottom_left = '-0.01 17.999 0'
top_right = '5 22.001 0'
boundary_new = n1
boundaries_old = left
[]
[dirichlet_bc]
type = SideSetsFromNodeSetsGenerator
input = extra
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[temp]
initial_condition = 100.0
[]
[]
[AuxVariables]
[Dc]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[Cc]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[Tc]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[Cost]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = FIRST
initial_condition = ${vol_frac}
[]
[]
[AuxKernels]
[Cost]
type = MaterialRealAux
variable = Cost
property = Cost_mat
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
diffusion_coefficient = thermal_cond
[]
[heat_source]
type = HeatSource
value = 1e-2 # W/m^3
variable = temp
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = hold
value = 0.0
[]
[no_x_symm]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[left_n1]
type = DirichletBC
variable = temp
boundary = n1
value = 0.0
[]
[top]
type = NeumannBC
variable = temp
boundary = top
value = 0
[]
[bottom]
type = NeumannBC
variable = temp
boundary = bottom
value = 0
[]
[right]
type = NeumannBC
variable = temp
boundary = right
value = 0
[]
[left]
type = NeumannBC
variable = temp
boundary = left
value = 0
[]
[]
[NodalKernels]
[push_left]
type = NodalGravity
variable = disp_y
boundary = push_left
gravity_value = 0.0 # -1e-8
mass = 1
[]
[push_center]
type = NodalGravity
variable = disp_y
boundary = push_center
gravity_value = 0.0 # -1e-8
mass = 1
[]
[]
[Materials]
[thermal_cond]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${TC0}-${TC1})/(${rho0}^${power}-${rho1}^${power}); "
"B1:=${TC0}-A1*${rho0}^${power}; TC1:=A1*mat_den^${power}+B1; TC1"
coupled_variables = 'mat_den'
property_name = thermal_cond
outputs = 'exodus'
[]
[thermal_compliance]
type = ThermalCompliance
temperature = temp
thermal_conductivity = thermal_cond
outputs = 'exodus'
[]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${E0}-${E1})/(${rho0}^${power}-${rho1}^${power}); "
"B1:=${E0}-A1*${rho0}^${power}; E1:=A1*mat_den^${power}+B1; E1"
coupled_variables = 'mat_den'
property_name = E_phys
[]
[Cost_mat]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${C0}-${C1})/(${rho0}^(1/${power})-${rho1}^(1/${power})); "
"B1:=${C0}-A1*${rho0}^(1/${power}); C1:=A1*mat_den^(1/${power})+B1; C1"
coupled_variables = 'mat_den'
property_name = Cost_mat
[]
[CostDensity]
type = ParsedMaterial
property_name = CostDensity
coupled_variables = 'mat_den Cost'
expression = 'mat_den*Cost'
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
[]
[cc]
type = CostSensitivity
design_density = mat_den
cost = Cost_mat
outputs = 'exodus'
[]
[tc]
type = ThermalSensitivity
design_density = mat_den
thermal_conductivity = thermal_cond
temperature = temp
outputs = 'exodus'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[rad_avg]
type = RadialAverage
radius = 0.1
weights = linear
prop_name = sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[rad_avg_cost]
type = RadialAverage
radius = 0.1
weights = linear
prop_name = cost_sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[rad_avg_thermal]
type = RadialAverage
radius = 0.1
weights = linear
prop_name = thermal_sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
# Provides Dc
[calc_sense]
type = SensitivityFilter
density_sensitivity = Dc
design_density = mat_den
filter_UO = rad_avg
execute_on = TIMESTEP_END
force_postaux = true
[]
# Provides Cc
[calc_sense_cost]
type = SensitivityFilter
density_sensitivity = Cc
design_density = mat_den
filter_UO = rad_avg_cost
execute_on = TIMESTEP_END
force_postaux = true
[]
# Provides Tc
[calc_sense_thermal]
type = SensitivityFilter
density_sensitivity = Tc
design_density = mat_den
filter_UO = rad_avg_thermal
execute_on = TIMESTEP_END
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-12
dt = 1.0
num_steps = 500
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[right_flux]
type = SideDiffusiveFluxAverage
variable = temp
boundary = right
diffusivity = 10
[]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'initial timestep_end'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
expression = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
[]
[cost_sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = cost_sensitivity
[]
[cost]
type = ElementIntegralMaterialProperty
mat_prop = CostDensity
[]
[cost_frac]
type = ParsedPostprocessor
expression = 'cost / mesh_volume'
pp_names = 'cost mesh_volume'
[]
[objective]
type = ElementIntegralMaterialProperty
mat_prop = strain_energy_density
execute_on = 'INITIAL TIMESTEP_END'
[]
[objective_thermal]
type = ElementIntegralMaterialProperty
mat_prop = thermal_compliance
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
(modules/combined/examples/optimization/thermomechanical/thermomechanical_main.i)
vol_frac = 0.4
power = 2.0
E0 = 1.0e-6
E1 = 1.0
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 40
xmin = 0
xmax = 40
ymin = 0
ymax = 40
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold
nodes = 0
[]
[push_left]
type = ExtraNodesetGenerator
input = node
new_boundary = push_left
coord = '16 0 0'
[]
[push_center]
type = ExtraNodesetGenerator
input = push_left
new_boundary = push_center
coord = '24 0 0'
[]
[extra]
type = SideSetsFromBoundingBoxGenerator
input = push_center
bottom_left = '-0.01 17.999 0'
top_right = '5 22.001 0'
boundary_new = n1
boundaries_old = left
[]
[dirichlet_bc]
type = SideSetsFromNodeSetsGenerator
input = extra
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[mat_den]
family = MONOMIAL
order = FIRST
initial_condition = 0.02
[]
[sensitivity_one]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[sensitivity_two]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[total_sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[]
[AuxKernels]
[total_sensitivity]
type = ParsedAux
variable = total_sensitivity
expression = '(1-1.0e-7)*sensitivity_one + 1.0e-7*sensitivity_two'
coupled_variables = 'sensitivity_one sensitivity_two'
execute_on = 'LINEAR TIMESTEP_END'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = hold
value = 0.0
[]
[no_x_symm]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${E1} + (mat_den ^ ${power}) * (${E1}-${E0})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
# We do filtering in the subapps
[update]
type = DensityUpdate
density_sensitivity = total_sensitivity
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = MULTIAPP_FIXED_POINT_BEGIN
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-8
dt = 1.0
num_steps = 2
[]
[Outputs]
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
exodus = true
[]
[Postprocessors]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'initial timestep_end'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
expression = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralVariablePostprocessor
variable = total_sensitivity
[]
[]
[MultiApps]
[sub_app_one]
type = TransientMultiApp
input_files = structural_sub.i
[]
[sub_app_two]
type = TransientMultiApp
input_files = thermal_sub.i
[]
[]
[Transfers]
# First SUB-APP: STRUCTURAL
# To subapp densities
[subapp_one_density]
type = MultiAppCopyTransfer
to_multi_app = sub_app_one
source_variable = mat_den # Here
variable = mat_den
[]
# From subapp sensitivity
[subapp_one_sensitivity]
type = MultiAppCopyTransfer
from_multi_app = sub_app_one
source_variable = Dc # sensitivity_var
variable = sensitivity_one # Here
[]
# Second SUB-APP: HEAT CONDUCTIVITY
# To subapp densities
[subapp_two_density]
type = MultiAppCopyTransfer
to_multi_app = sub_app_two
source_variable = mat_den # Here
variable = mat_den
[]
# From subapp sensitivity
[subapp_two_sensitivity]
type = MultiAppCopyTransfer
from_multi_app = sub_app_two
source_variable = Tc # sensitivity_var
variable = sensitivity_two # Here
[]
[]
(modules/combined/test/tests/optimization/compliance_sensitivity/thermal_test.i)
vol_frac = 0.4
cost_frac = 10.0
power = 2.0
E0 = 1.0e-6
E1 = 1.0
rho0 = 0.0
rho1 = 1.0
C0 = 1.0e-6
C1 = 1.0
TC0 = 1.0e-16
TC1 = 1.0
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin = 0
xmax = 40
ymin = 0
ymax = 40
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold
nodes = 0
[]
[push_left]
type = ExtraNodesetGenerator
input = node
new_boundary = push_left
coord = '16 0 0'
[]
[push_center]
type = ExtraNodesetGenerator
input = push_left
new_boundary = push_center
coord = '24 0 0'
[]
[extra]
type = SideSetsFromBoundingBoxGenerator
input = push_center
bottom_left = '-0.01 17.999 0'
top_right = '5 22.001 0'
boundary_new = n1
included_boundaries = left
[]
[dirichlet_bc]
type = SideSetsFromNodeSetsGenerator
input = extra
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[temp]
initial_condition = 100.0
[]
[]
[AuxVariables]
[Dc]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[Cc]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[Tc]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[Cost]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = FIRST
initial_condition = ${vol_frac}
[]
[]
[AuxKernels]
[Cost]
type = MaterialRealAux
variable = Cost
property = Cost_mat
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
diffusion_coefficient = thermal_cond
[]
[heat_source]
type = HeatSource
value = 1e-2 # W/m^3
variable = temp
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = hold
value = 0.0
[]
[no_x_symm]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[left_n1]
type = DirichletBC
variable = temp
boundary = n1
value = 0.0
[]
[top]
type = NeumannBC
variable = temp
boundary = top
value = 0
[]
[bottom]
type = NeumannBC
variable = temp
boundary = bottom
value = 0
[]
[right]
type = NeumannBC
variable = temp
boundary = right
value = 0
[]
[left]
type = NeumannBC
variable = temp
boundary = left
value = 0
[]
[]
[NodalKernels]
[push_left]
type = NodalGravity
variable = disp_y
boundary = push_left
gravity_value = 0.0 # -1e-8
mass = 1
[]
[push_center]
type = NodalGravity
variable = disp_y
boundary = push_center
gravity_value = 0.0 # -1e-8
mass = 1
[]
[]
[Materials]
[thermal_cond]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${TC0}-${TC1})/(${rho0}^${power}-${rho1}^${power}); "
"B1:=${TC0}-A1*${rho0}^${power}; TC1:=A1*mat_den^${power}+B1; TC1"
coupled_variables = 'mat_den'
property_name = thermal_cond
outputs = 'exodus'
[]
[thermal_compliance]
type = ThermalCompliance
temperature = temp
thermal_conductivity = thermal_cond
outputs = 'exodus'
[]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${E0}-${E1})/(${rho0}^${power}-${rho1}^${power}); "
"B1:=${E0}-A1*${rho0}^${power}; E1:=A1*mat_den^${power}+B1; E1"
coupled_variables = 'mat_den'
property_name = E_phys
[]
[Cost_mat]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${C0}-${C1})/(${rho0}^(1/${power})-${rho1}^(1/${power})); "
"B1:=${C0}-A1*${rho0}^(1/${power}); C1:=A1*mat_den^(1/${power})+B1; C1"
coupled_variables = 'mat_den'
property_name = Cost_mat
[]
[CostDensity]
type = ParsedMaterial
property_name = CostDensity
coupled_variables = 'mat_den Cost'
expression = 'mat_den*Cost'
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
[]
[cc]
type = CostSensitivity
design_density = mat_den
cost = Cost_mat
outputs = 'exodus'
[]
[tc]
type = ThermalSensitivity
design_density = mat_den
thermal_conductivity = thermal_cond
temperature = temp
outputs = 'exodus'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[rad_avg]
type = RadialAverage
radius = 0.1
weights = linear
prop_name = sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[rad_avg_cost]
type = RadialAverage
radius = 0.1
weights = linear
prop_name = cost_sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[rad_avg_thermal]
type = RadialAverage
radius = 0.1
weights = linear
prop_name = thermal_sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[update]
type = DensityUpdateTwoConstraints
density_sensitivity = Dc
cost_density_sensitivity = Cc
cost = Cost
cost_fraction = ${cost_frac}
design_density = mat_den
volume_fraction = ${vol_frac}
bisection_lower_bound = 0
bisection_upper_bound = 1.0e12 # 100
use_thermal_compliance = true
thermal_sensitivity = Tc
weight_mechanical_thermal = '0 1'
relative_tolerance = 1.0e-12
bisection_move = 0.015
adaptive_move = false
execute_on = TIMESTEP_BEGIN
[]
# Provides Dc
[calc_sense]
type = SensitivityFilter
density_sensitivity = Dc
design_density = mat_den
filter_UO = rad_avg
execute_on = TIMESTEP_END
force_postaux = true
[]
# Provides Cc
[calc_sense_cost]
type = SensitivityFilter
density_sensitivity = Cc
design_density = mat_den
filter_UO = rad_avg_cost
execute_on = TIMESTEP_END
force_postaux = true
[]
# Provides Tc
[calc_sense_thermal]
type = SensitivityFilter
density_sensitivity = Tc
design_density = mat_den
filter_UO = rad_avg_thermal
execute_on = TIMESTEP_END
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-12
dt = 1.0
num_steps = 5
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[right_flux]
type = SideDiffusiveFluxAverage
variable = temp
boundary = right
diffusivity = 10
[]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'initial timestep_end'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
expression = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
[]
[cost_sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = cost_sensitivity
[]
[cost]
type = ElementIntegralMaterialProperty
mat_prop = CostDensity
[]
[cost_frac]
type = ParsedPostprocessor
expression = 'cost / mesh_volume'
pp_names = 'cost mesh_volume'
[]
[objective]
type = ElementIntegralMaterialProperty
mat_prop = strain_energy_density
execute_on = 'INITIAL TIMESTEP_END'
[]
[objective_thermal]
type = ElementIntegralMaterialProperty
mat_prop = thermal_compliance
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/pins/block-restriction/segregated/empty-block-segregated.i)
mu = 1.2
rho_fluid = 0.2
k_fluid = 1.1
cp_fluid = 2.3
T_cold = 310
alpha = 1e-3
Q = 200
pressure_tag = "pressure_grad"
[Problem]
kernel_coverage_check = false
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
velocity_interp_method = 'rc'
advected_interp_method = 'average'
[]
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '0.3683 0.0127'
dy = '0.0127 0.2292 2.5146 0.2292 0.0127'
ix = '2 1'
iy = '1 2 3 2 1'
subdomain_id = '0 0
1 0
2 0
1 0
0 0
'
[]
[rename_block_name]
type = RenameBlockGenerator
input = cmg
old_block = '0 1 2'
new_block = 'wall_block spacer_block porous_block'
[]
[solid_fluid_interface_1]
type = SideSetsBetweenSubdomainsGenerator
input = rename_block_name
primary_block = porous_block
paired_block = wall_block
new_boundary = 'solid_fluid_interface'
[]
[solid_fluid_interface_2]
type = SideSetsBetweenSubdomainsGenerator
input = solid_fluid_interface_1
primary_block = spacer_block
paired_block = wall_block
new_boundary = 'solid_fluid_interface'
[]
[wall_left_boundary_1]
type = SideSetsFromBoundingBoxGenerator
input = solid_fluid_interface_2
bottom_left = '0 0 0'
top_right = '0.1 0.0127 0'
included_boundaries = left
boundary_new = wall_left
[]
[wall_left_boundary_2]
type = SideSetsFromBoundingBoxGenerator
input = wall_left_boundary_1
bottom_left = '0 2.9857 0'
top_right = '0.1 2.9984 0'
included_boundaries = left
boundary_new = wall_left
[]
[fluid_left_boundary]
type = SideSetsFromBoundingBoxGenerator
input = wall_left_boundary_2
bottom_left = '0 0.0127 0'
top_right = '0.1 2.9857 0'
included_boundaries = left
boundary_new = fluid_left
[]
coord_type = RZ
rz_coord_axis = Y
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolatorSegregated
u = superficial_vel_x
v = superficial_vel_y
pressure = pressure
porosity = porosity
block = 'spacer_block porous_block'
[]
[]
[Problem]
nl_sys_names = 'u_system v_system pressure_system t_system'
previous_nl_solution_required = true
error_on_jacobian_nonzero_reallocation = true
[]
[Variables]
[superficial_vel_x]
type = PINSFVSuperficialVelocityVariable
block = 'spacer_block porous_block'
solver_sys = u_system
[]
[superficial_vel_y]
type = PINSFVSuperficialVelocityVariable
block = 'spacer_block porous_block'
solver_sys = v_system
[]
[pressure]
type = INSFVPressureVariable
block = 'spacer_block porous_block'
solver_sys = pressure_system
[]
[T_fluid]
type = INSFVEnergyVariable
block = 'spacer_block porous_block'
solver_sys = t_system
[]
[]
[AuxVariables]
[porosity]
type = MooseVariableFVReal
block = 'spacer_block porous_block'
[]
[]
[FVKernels]
[u_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_x
rho = ${rho_fluid}
momentum_component = 'x'
block = 'spacer_block porous_block'
porosity = porosity
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_x
mu = ${mu}
momentum_component = 'x'
block = 'spacer_block porous_block'
porosity = porosity
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_x
momentum_component = 'x'
pressure = pressure
block = 'spacer_block porous_block'
porosity = porosity
extra_vector_tags = ${pressure_tag}
[]
[u_buoyancy]
type = PINSFVMomentumBoussinesq
variable = superficial_vel_x
T_fluid = T_fluid
gravity = '0 -1 0'
rho = ${rho_fluid}
ref_temperature = ${T_cold}
momentum_component = 'x'
block = 'spacer_block porous_block'
porosity = porosity
[]
[u_gravity]
type = PINSFVMomentumGravity
variable = superficial_vel_x
gravity = '0 -1 0'
rho = ${rho_fluid}
momentum_component = 'x'
block = 'spacer_block porous_block'
porosity = porosity
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_y
rho = ${rho_fluid}
momentum_component = 'y'
block = 'spacer_block porous_block'
porosity = porosity
[]
[v_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_y
mu = ${mu}
momentum_component = 'y'
block = 'spacer_block porous_block'
porosity = porosity
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_y
momentum_component = 'y'
pressure = pressure
block = 'spacer_block porous_block'
porosity = porosity
extra_vector_tags = ${pressure_tag}
[]
[v_buoyancy]
type = PINSFVMomentumBoussinesq
variable = superficial_vel_y
T_fluid = T_fluid
gravity = '0 -1 0'
rho = ${rho_fluid}
ref_temperature = ${T_cold}
momentum_component = 'y'
block = 'spacer_block porous_block'
porosity = porosity
[]
[v_gravity]
type = PINSFVMomentumGravity
variable = superficial_vel_y
gravity = '0 -1 0'
rho = ${rho_fluid}
momentum_component = 'y'
block = 'spacer_block porous_block'
porosity = porosity
[]
[temp_conduction]
type = PINSFVEnergyDiffusion
k = 'k_fluid'
variable = T_fluid
block = 'spacer_block porous_block'
porosity = porosity
[]
[temp_advection]
type = PINSFVEnergyAdvection
variable = T_fluid
block = 'spacer_block porous_block'
boundaries_to_force = fluid_left
[]
[heat_source]
type = FVBodyForce
variable = T_fluid
function = ${Q}
block = 'porous_block'
[]
[p_diffusion]
type = FVAnisotropicDiffusion
variable = pressure
coeff = "Ainv"
coeff_interp_method = 'average'
block = 'spacer_block porous_block'
[]
[p_source]
type = FVDivergence
variable = pressure
vector_field = "HbyA"
force_boundary_execution = true
block = 'spacer_block porous_block'
[]
[]
[FVBCs]
[no_slip_x]
type = INSFVNoSlipWallBC
variable = superficial_vel_x
boundary = 'solid_fluid_interface'
function = 0
[]
[no_slip_y]
type = INSFVNoSlipWallBC
variable = superficial_vel_y
boundary = 'solid_fluid_interface'
function = 0
[]
[reflective_x]
type = INSFVSymmetryVelocityBC
variable = superficial_vel_x
boundary = fluid_left
momentum_component = 'x'
mu = ${mu}
u = superficial_vel_x
v = superficial_vel_y
[]
[reflective_y]
type = INSFVSymmetryVelocityBC
variable = superficial_vel_y
boundary = fluid_left
momentum_component = 'y'
mu = ${mu}
u = superficial_vel_x
v = superficial_vel_y
[]
[reflective_p]
type = INSFVSymmetryPressureBC
boundary = fluid_left
variable = pressure
[]
[T_reflective]
type = FVNeumannBC
variable = T_fluid
boundary = fluid_left
value = 0
[]
[T_cold_boundary]
type = FVDirichletBC
variable = T_fluid
boundary = solid_fluid_interface
value = ${T_cold}
[]
[]
[ICs]
[porosity_spacer]
type = ConstantIC
variable = porosity
block = spacer_block
value = 1.0
[]
[porosity_fuel]
type = ConstantIC
variable = porosity
block = porous_block
value = 0.1
[]
[temp_ic_fluid]
type = ConstantIC
variable = T_fluid
value = ${T_cold}
block = 'spacer_block porous_block'
[]
[superficial_vel_x]
type = ConstantIC
variable = superficial_vel_x
value = 1E-5
block = 'spacer_block porous_block'
[]
[superficial_vel_y]
type = ConstantIC
variable = superficial_vel_y
value = 1E-5
block = 'spacer_block porous_block'
[]
[]
[FunctorMaterials]
[functor_constants_fluid]
type = ADGenericFunctorMaterial
prop_names = 'alpha_b cp k_fluid'
prop_values = '${alpha} ${cp_fluid} ${k_fluid}'
block = 'spacer_block porous_block'
[]
[density_fluid]
type = INSFVEnthalpyFunctorMaterial
temperature = 'T_fluid'
rho = ${rho_fluid}
block = 'spacer_block porous_block'
[]
[functor_constants_steel]
# We need this to avoid errors for materials not existing on every block
type = ADGenericFunctorMaterial
prop_names = 'dummy'
prop_values = 0.0
block = wall_block
[]
[]
[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 = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
energy_system = 't_system'
pressure_gradient_tag = ${pressure_tag}
momentum_equation_relaxation = 0.85
energy_equation_relaxation = 0.95
pressure_variable_relaxation = 0.45
num_iterations = 150
pressure_absolute_tolerance = 1e-13
momentum_absolute_tolerance = 1e-13
pin_pressure = true
pressure_pin_point = '0.2 1.5 0.0'
pressure_pin_value = 0
print_fields = false
[]
[Outputs]
exodus = true
[]