- inputsThe input MeshGenerators. This can either be N generators or 1 generator. If only 1 is given then 'positions' must also be given.
C++ Type:std::vector<MeshGeneratorName>
Controllable:No
Description:The input MeshGenerators. This can either be N generators or 1 generator. If only 1 is given then 'positions' must also be given.
CombinerGenerator
Combine multiple meshes (or copies of one mesh) together into one (disjoint) mesh. Can optionally translate those meshes before combining them.
Overview
The CombinerGenerator
allows the user to combine the outputs of multiple MeshGenerator
s into a single mesh. This is somewhat similar to the StitchedMeshGenerator with the difference being that CombinerGenerator
makes no attempt to "heal" / "join" the mesh like StitchedMeshGenerator does. There CombinerGenerator
is more suited to creation of disjoint meshes (where the individual pieces are not directly tied together).
CombinerGenerator
preserves subdomain names and boundary names (node sets, side sets, and edge sets). If the corresponding IDs exist in multiple meshes, then the meshes/copies listed later in "inputs"/"positions" take precedence.
Usage
There are three main ways to use the CombinerGenerator
:
1. Combine Multiple MeshGenerator
s
The most straightforward thing to do is simply to combine the output of multiple MeshGenerator
s together into a single mesh. For example:
[Mesh]
[gen1]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin = 0
xmax = 1
ymin = 0
ymax = 1
[]
[gen2]
type = GeneratedMeshGenerator
dim = 2
nx = 12
ny = 12
xmin = 2
xmax = 3
ymin = 2
ymax = 3
[]
[gen3]
type = GeneratedMeshGenerator
dim = 2
nx = 14
ny = 14
xmin = 3.5
xmax = 5
ymin = 3
ymax = 4
[]
[cmbn]
type = CombinerGenerator
inputs = 'gen1 gen2 gen3'
[]
[]
(test/tests/meshgenerators/combiner_generator/combiner_multi_input.i)Will generate a mesh that looks like:
2. Combine Multiple MeshGenerator
s AND Translate Them
It is also possible to translate (move) the input MeshGenerator
s as they are combined. This is done using the positions
option which takes triplets of floating point numbers that are interpreted as displacement vectors for moving each of the input meshes.
If you specify positions
then the number of positions
must match the number of inputs
, unless only one input is specified (more on that in a moment).
[Mesh]
[gen1]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[gen2]
type = GeneratedMeshGenerator
dim = 2
nx = 12
ny = 12
[]
[gen3]
type = GeneratedMeshGenerator
dim = 2
nx = 14
ny = 14
[]
[cmbn]
type = CombinerGenerator
inputs = 'gen1 gen2 gen3'
positions = '1 0 0 2 2 2 3 0 0'
[]
[]
(test/tests/meshgenerators/combiner_generator/combiner_multi_input_translate.i)Will generate a mesh that looks like:
Alternatively, the same displacement vectors can be supplied in a file with the positions_file
option. The above mesh can equivalently be generated with the following.
[Mesh]
[gen1]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[gen2]
type = GeneratedMeshGenerator
dim = 2
nx = 12
ny = 12
[]
[gen3]
type = GeneratedMeshGenerator
dim = 2
nx = 14
ny = 14
[]
[cmbn]
type = CombinerGenerator
inputs = 'gen1 gen2 gen3'
positions_file = 'positions.txt'
[]
[]
(test/tests/meshgenerators/combiner_generator/combiner_multi_input_translate_from_file.i)where the positions.txt
file contains the floating point triplets.
1 0 0
2 2 2
3 0 0
(test/tests/meshgenerators/combiner_generator/positions.txt)The same restrictions on positions
also apply to the number of entries in position_file
.
3. Copy a Single Input Multiple Times With Translations
The final option is to provide exactly one inputs
but specify multiple positions
. This will cause the single input to be copied multiple times with the position of each copy specified by the positions
parameter. For example
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[cmbn]
type = CombinerGenerator
inputs = 'gen'
positions = '1 0 0 2 2 2 3 0 0'
[]
[]
(test/tests/meshgenerators/combiner_generator/combiner_generator.i)Will generate a mesh that looks like:
Again, the same capability can be achieved with the positions_file
option.
Input Parameters
- positionsThe (optional) position of each given mesh. If N 'inputs' were given then this must either be left blank or N positions must be given. If 1 input was given then this MUST be provided.
C++ Type:std::vector<libMesh::Point>
Controllable:No
Description:The (optional) position of each given mesh. If N 'inputs' were given then this must either be left blank or N positions must be given. If 1 input was given then this MUST be provided.
- positions_fileAlternative way to provide the position of each given mesh.
C++ Type:std::vector<FileName>
Controllable:No
Description:Alternative way to provide the position of each given mesh.
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
- 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/heat_transfer/test/tests/directional_flux_bc/3d_elem.i)
- (test/tests/meshgenerators/coarsen_block_generator/coarsen_hex.i)
- (test/tests/meshgenerators/parsed_element_deletion_generator/cut_the_small.i)
- (modules/heat_transfer/test/tests/directional_flux_bc/2d.i)
- (test/tests/mesh/blocks_max_dimension/blocks_max_dimension.i)
- (test/tests/meshgenerators/combiner_generator/combiner_multi_input_translate.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_htonly/1D.i)
- (test/tests/postprocessors/nearest_node_number/nearest_node_number_2.i)
- (test/tests/meshgenerators/combiner_generator/combiner_merge_names.i)
- (test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_from_2d_bcids.i)
- (test/tests/meshgenerators/mesh_repair_generator/overlapping_fix_test.i)
- (test/tests/meshgenerators/combiner_generator/combiner_generator.i)
- (test/tests/meshgenerators/mesh_diagnostics_generator/node_based_test.i)
- (test/tests/meshgenerators/mesh_repair_generator/mixed_elements.i)
- (modules/optimization/test/tests/simp/2d.i)
- (modules/optimization/test/tests/simp/2d_twoconstraints.i)
- (test/tests/coord_type/coord_type_rz_general.i)
- (test/tests/meshgenerators/mesh_repair_generator/flip_element.i)
- (test/tests/meshgenerators/coarsen_block_generator/coarsen_quad.i)
- (test/tests/meshgenerators/mesh_diagnostics_generator/elem_types_test.i)
- (test/tests/mortar/coincident-nodes/test.i)
- (modules/contact/test/tests/verification/patch_tests/automatic_patch_update/iteration_adaptivity_parallel.i)
- (test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_from_1d_sbdids.i)
- (modules/solid_mechanics/test/tests/umat/multiple_blocks/multiple_blocks_two_materials_parallel.i)
- (test/tests/meshgenerators/combiner_generator/combiner_multi_input.i)
- (modules/heat_transfer/test/tests/thermal_materials/2d.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_radiation/sphere.i)
- (modules/solid_mechanics/test/tests/umat/multiple_blocks/multiple_blocks.i)
- (modules/contact/test/tests/verification/patch_tests/automatic_patch_update/iteration_adaptivity_parallel_node_face.i)
- (test/tests/meshgenerators/combiner_generator/combiner_generator_from_file.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_radiation/cylinder.i)
- (test/tests/meshgenerators/mesh_diagnostics_generator/detect_amr_hex.i)
- (test/tests/meshgenerators/mesh_diagnostics_generator/detect_amr_quad.i)
- (modules/heat_transfer/test/tests/directional_flux_bc/3d.i)
- (modules/solid_mechanics/test/tests/umat/multiple_blocks/multiple_blocks_two_materials.i)
- (modules/heat_transfer/test/tests/directional_flux_bc/2d_elem.i)
- (test/tests/meshgenerators/combiner_generator/combiner_multi_input_translate_from_file.i)
inputs
C++ Type:std::vector<MeshGeneratorName>
Controllable:No
Description:The input MeshGenerators. This can either be N generators or 1 generator. If only 1 is given then 'positions' must also be given.
positions
C++ Type:std::vector<libMesh::Point>
Controllable:No
Description:The (optional) position of each given mesh. If N 'inputs' were given then this must either be left blank or N positions must be given. If 1 input was given then this MUST be provided.
(test/tests/meshgenerators/combiner_generator/combiner_multi_input.i)
[Mesh]
[gen1]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin=0
xmax=1
ymin=0
ymax=1
[]
[gen2]
type = GeneratedMeshGenerator
dim = 2
nx = 12
ny = 12
xmin=2
xmax=3
ymin=2
ymax=3
[]
[gen3]
type = GeneratedMeshGenerator
dim = 2
nx = 14
ny = 14
xmin=3.5
xmax=5
ymin=3
ymax=4
[]
[cmbn]
type = CombinerGenerator
inputs = 'gen1 gen2 gen3'
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = 'left'
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = 'right'
value = 1
[]
[]
[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/combiner_generator/combiner_multi_input_translate.i)
[Mesh]
[gen1]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[gen2]
type = GeneratedMeshGenerator
dim = 2
nx = 12
ny = 12
[]
[gen3]
type = GeneratedMeshGenerator
dim = 2
nx = 14
ny = 14
[]
[cmbn]
type = CombinerGenerator
inputs = 'gen1 gen2 gen3'
positions = '1 0 0 2 2 2 3 0 0'
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = 'left'
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = 'right'
value = 1
[]
[]
[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/combiner_generator/combiner_multi_input_translate_from_file.i)
[Mesh]
[gen1]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[gen2]
type = GeneratedMeshGenerator
dim = 2
nx = 12
ny = 12
[]
[gen3]
type = GeneratedMeshGenerator
dim = 2
nx = 14
ny = 14
[]
[cmbn]
type = CombinerGenerator
inputs = 'gen1 gen2 gen3'
positions_file = 'positions.txt'
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = 'left'
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = 'right'
value = 1
[]
[]
[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/combiner_generator/positions.txt)
1 0 0
2 2 2
3 0 0
(test/tests/meshgenerators/combiner_generator/combiner_generator.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[cmbn]
type = CombinerGenerator
inputs = 'gen'
positions = '1 0 0 2 2 2 3 0 0'
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = 'left'
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = 'right'
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/directional_flux_bc/3d_elem.i)
[Mesh]
[shade]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 3
nz = 3
xmax = 0.2
ymax = 0.5
zmax = 0.5
[]
[screen]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 20
nz = 20
xmax = 0.05
[]
[screen_block]
type = SubdomainIDGenerator
input = screen
subdomain_id = 1
[]
[combine]
type = CombinerGenerator
inputs = 'shade screen_block'
positions = '0 0 0 1 0 0'
[]
[all_sides]
type = SideSetsAroundSubdomainGenerator
block = '0 1'
new_boundary = 100
input = combine
[]
[shaded_side]
type = SideSetsAroundSubdomainGenerator
normal = '-1 0 0'
block = 1
input = all_sides
new_boundary = 101
[]
[]
[GlobalParams]
illumination_flux = '1 0 0'
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[dt]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[flux]
type = DirectionalFluxBC
variable = u
boundary = 101
self_shadow_uo = shadow
[]
[]
[UserObjects]
[shadow]
type = SelfShadowSideUserObject
boundary = 100
execute_on = INITIAL
[]
[]
[Postprocessors]
[light]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 101
[]
[]
[Executioner]
type = Transient
dt = 0.01
num_steps = 1
[]
[Outputs]
csv = true
[]
(test/tests/meshgenerators/coarsen_block_generator/coarsen_hex.i)
[Mesh]
allow_renumbering = false
[big_one]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 1
xmax = 2
ymin = 0
ymax = 1
zmin = 0
zmax = 1
[]
[cut_one]
type = CartesianMeshGenerator
dim = 3
dx = 1
dy = 1
dz = 1
ix = 2
iy = 2
iz = 2
[]
[cmbn]
type = CombinerGenerator
inputs = 'big_one cut_one'
[]
[coarsen]
type = CoarsenBlockGenerator
input = cmbn
block = 0
coarsening = 1
starting_point = '0.25 0.25 0.1'
[]
# Stitch now as the coarsening does not stitch
[stitch]
type = MeshRepairGenerator
input = coarsen
fix_node_overlap = true
[]
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/parsed_element_deletion_generator/cut_the_small.i)
[Mesh]
[elem1]
type = ElementGenerator
nodal_positions = '0 0 0
1 0 0
1 1 0'
element_connectivity = '0 1 2'
elem_type = "TRI3"
[]
[elem2]
type = ElementGenerator
nodal_positions = '0 0 0
1e-2 0 0
1e-2 1e-2 0'
element_connectivity = '0 1 2'
elem_type = "TRI3"
[]
[combine]
type = CombinerGenerator
inputs = 'elem1 elem2'
[]
[delete]
type = ParsedElementDeletionGenerator
input = combine
expression = 'volume < 0.1'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Reporters]
[mesh]
type = MeshInfo
outputs = json
items = 'num_nodes'
[]
[]
[Outputs]
[json]
type = JSON
execute_system_information_on = NONE
[]
[]
(modules/heat_transfer/test/tests/directional_flux_bc/2d.i)
[Mesh]
[planet]
type = ConcentricCircleMeshGenerator
has_outer_square = false
radii = 1
num_sectors = 10
rings = 2
preserve_volumes = false
[]
[moon]
type = ConcentricCircleMeshGenerator
has_outer_square = false
radii = 0.5
num_sectors = 8
rings = 2
preserve_volumes = false
[]
[combine]
type = CombinerGenerator
inputs = 'planet moon'
positions = '0 0 0 -1.5 -0.5 0'
[]
[]
[GlobalParams]
illumination_flux = '1 1 0'
[]
[Variables]
[u]
[]
[v]
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
[]
[dt_u]
type = TimeDerivative
variable = u
[]
[diff_v]
type = Diffusion
variable = v
[]
[dt_v]
type = TimeDerivative
variable = v
[]
[]
[BCs]
[flux_u]
type = DirectionalFluxBC
variable = u
boundary = outer
[]
[flux_v]
type = DirectionalFluxBC
variable = v
boundary = outer
self_shadow_uo = shadow
[]
[]
[Postprocessors]
[ave_v_all]
type = SideAverageValue
variable = v
boundary = outer
[]
[ave_v_exposed]
type = ExposedSideAverageValue
variable = v
boundary = outer
self_shadow_uo = shadow
[]
[]
[UserObjects]
[shadow]
type = SelfShadowSideUserObject
boundary = outer
execute_on = INITIAL
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 2
[]
[Outputs]
exodus = true
[]
(test/tests/mesh/blocks_max_dimension/blocks_max_dimension.i)
# This input file tests MooseMesh::getBlocksMaxDimension(), which gets the MESH
# dimension of a list of subdomain names.
#
# Note the differences between the MESH dimension and the SPATIAL dimension.
# The SPATIAL dimension just looks at the maximum coordinate dimension used:
# - Equals 3 if there is a nonzero z coordinate
# - Equals 2 if there is no nonzero z coordinate, but there is a nonzero y coordinate
# - Equals 1 if there is no nonzero y or z coordinate
# In contrast, the MESH dimension looks at the dimensionality of the elements.
# Therefore, the MESH dimension differs from the SPATIAL dimension when:
# - a 1D element has a nonzero y or z coordinate
# - a 2D element has a nonzero z coordinate
# This test will include subdomains with these cases and test different
# lists of subdomains.
#
[Mesh]
# 1D block
[block1d_mg]
type = GeneratedMeshGenerator
dim = 1
xmin = 0.0
xmax = 1.0
[]
[block1d_renumber_mg]
type = RenameBlockGenerator
input = block1d_mg
old_block = 0
new_block = 1
[]
[block1d_rename_mg]
type = RenameBlockGenerator
input = block1d_renumber_mg
old_block = 1
new_block = 'block1d'
[]
[block1d_translate_mg]
type = TransformGenerator
input = block1d_rename_mg
transform = TRANSLATE
vector_value = '0 0 1.0'
[]
# 2D block
[block2d_mg]
type = GeneratedMeshGenerator
dim = 2
xmin = 2.0
xmax = 3.0
ymin = 0.0
ymax = 1.0
boundary_id_offset = 10
[]
[block2d_renumber_mg]
type = RenameBlockGenerator
input = block2d_mg
old_block = 0
new_block = 2
[]
[block2d_rename_mg]
type = RenameBlockGenerator
input = block2d_renumber_mg
old_block = 2
new_block = 'block2d'
[]
[boundary2d_rename_mg]
type = RenameBoundaryGenerator
input = block2d_rename_mg
old_boundary = 'left right bottom top'
new_boundary = 'left2d right2d bottom2d top2d'
[]
[block2d_translate_mg]
type = TransformGenerator
input = boundary2d_rename_mg
transform = TRANSLATE
vector_value = '0 0 1.0'
[]
# 3D block
[block3d_mg]
type = GeneratedMeshGenerator
dim = 3
xmin = 4.0
xmax = 5.0
ymin = 0.0
ymax = 1.0
zmin = 0.0
zmax = 1.0
boundary_id_offset = 20
[]
[block3d_renumber_mg]
type = RenameBlockGenerator
input = block3d_mg
old_block = 0
new_block = 3
[]
[block3d_rename_mg]
type = RenameBlockGenerator
input = block3d_renumber_mg
old_block = 3
new_block = 'block3d'
[]
[boundary3d_rename_mg]
type = RenameBoundaryGenerator
input = block3d_rename_mg
old_boundary = 'left right bottom top back front'
new_boundary = 'left3d right3d bottom3d top3d back3d front3d'
[]
# combine blocks
[combiner_mg]
type = CombinerGenerator
inputs = 'block1d_translate_mg block2d_translate_mg boundary3d_rename_mg'
[]
[]
[Postprocessors]
[dim_1d]
type = BlocksMaxDimensionPostprocessor
block = 'block1d'
execute_on = 'INITIAL'
[]
[dim_1d_2d]
type = BlocksMaxDimensionPostprocessor
block = 'block1d block2d'
execute_on = 'INITIAL'
[]
[dim_1d_2d_3d]
type = BlocksMaxDimensionPostprocessor
block = 'block1d block2d block3d'
execute_on = 'INITIAL'
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
csv = true
execute_on = 'INITIAL'
[]
(test/tests/meshgenerators/combiner_generator/combiner_multi_input_translate.i)
[Mesh]
[gen1]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[gen2]
type = GeneratedMeshGenerator
dim = 2
nx = 12
ny = 12
[]
[gen3]
type = GeneratedMeshGenerator
dim = 2
nx = 14
ny = 14
[]
[cmbn]
type = CombinerGenerator
inputs = 'gen1 gen2 gen3'
positions = '1 0 0 2 2 2 3 0 0'
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = 'left'
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = 'right'
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_htonly/1D.i)
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Mesh]
coord_type = RZ
[fred]
type = GeneratedMeshGenerator
dim = 1
nx = 25
xmin = 0
xmax = 1
boundary_name_prefix = left
elem_type = edge3
[]
[wilma]
type = GeneratedMeshGenerator
dim = 1
nx = 25
xmin = 2
xmax = 3
boundary_id_offset = 10
boundary_name_prefix = right
elem_type = edge3
[]
[combine]
type = CombinerGenerator
inputs = 'fred wilma'
[]
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1 2'
y = '100 200 200'
[]
[]
[Variables]
[temp]
initial_condition = 100
[]
[]
[Kernels]
[heat]
type = HeatConduction
variable = temp
[]
[]
[BCs]
[temp_far_left]
type = FunctionDirichletBC
boundary = left_left
variable = temp
function = temp
[]
[temp_far_right]
type = DirichletBC
boundary = right_right
variable = temp
value = 100
[]
[]
[ThermalContact]
[thermal_contact]
type = GapHeatTransfer
variable = temp
primary = right_left
secondary = left_right
emissivity_primary = 0
emissivity_secondary = 0
[]
[]
[Materials]
[heat]
type = HeatConductionMaterial
specific_heat = 1.0
thermal_conductivity = 1.0e6
[]
[]
[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 4'
line_search = 'none'
nl_abs_tol = 1e-3
nl_rel_tol = 1e-12
l_tol = 1e-8
l_max_its = 100
start_time = 0.0
dt = 2e-1
end_time = 2.0
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = left_right
variable = temp
execute_on = 'initial timestep_end'
[]
[temp_right]
type = SideAverageValue
boundary = right_left
variable = temp
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/nearest_node_number/nearest_node_number_2.i)
# Using NearestNodeNumber, finds the node number of the nearest node to the point in the mesh
# In this case, the mesh has two disjoint parts and the point is equidistant from the two parts, so the closest node with the smallest ID is chosen.
# This input file is run multiple times:
# - 1 thread and 1 process
# - 2 threads and 1 process
# - 1 thread and 2 processes
# - 2 threads and 2 processes
# Each time should give the same result
[Mesh]
[left]
type = GeneratedMeshGenerator
dim = 1
nx = 4
xmin = 0
xmax = 8
[]
[right]
type = GeneratedMeshGenerator
dim = 1
nx = 4
xmin = 12
xmax = 20
[]
[combiner]
type = CombinerGenerator
inputs = 'left right'
[]
# For consistency with distributed mesh
allow_renumbering = false
[]
[UserObjects]
[nnn_uo]
type = NearestNodeNumberUO
point = '10 0 0'
execute_on = 'initial timestep_begin'
[]
[]
[Postprocessors]
[nnn]
type = NearestNodeNumber
nearest_node_number_uo = nnn_uo
execute_on = 'initial timestep_begin'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
end_time = 2
[]
[Outputs]
csv = true
[]
(test/tests/meshgenerators/combiner_generator/combiner_merge_names.i)
[Mesh]
[Top_Block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 10
xmax = 2
ymax = 2
zmax = 2
xmin = 0
ymin = 0
zmin = 1
boundary_name_prefix = 'Upper'
boundary_id_offset = 10
[]
[Bottom_Block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 10
xmax = 2
ymax = 2
zmax = 1
boundary_name_prefix = 'Lower'
[]
[Combine]
type = CombinerGenerator
inputs = 'Top_Block Bottom_Block'
positions = '0 0 0 0.12 0.12 0'
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[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/xy_delaunay_generator/xydelaunay_from_2d_bcids.i)
[Mesh]
[left_bdy]
type = PolyLineMeshGenerator
points = '-3.0 0.0 0.0
-2.0 -1.0 0.0
-1.0 0.0 0.0
-2.0 2.0 0.0'
loop = true
[]
[right_bdy]
type = PolyLineMeshGenerator
points = '3.0 0.0 0.0
2.0 -1.0 0.0
1.0 0.0 0.0
2.0 2.0 0.0'
loop = true
[]
[left_2d]
type = XYDelaunayGenerator
boundary = 'left_bdy'
[]
[right_2d]
type = XYDelaunayGenerator
boundary = 'right_bdy'
output_boundary = 'right_outer'
[]
[both_2d]
type = CombinerGenerator
inputs = 'left_2d right_2d'
[]
[triang]
type = XYDelaunayGenerator
boundary = 'both_2d'
input_boundary_names = 'right_outer' # only the right half
refine_boundary = true
desired_area = 0.2
[]
[]
(test/tests/meshgenerators/mesh_repair_generator/overlapping_fix_test.i)
[Mesh]
[dir1]
type = ElementGenerator
nodal_positions = '0 0 0
1 0 0
0 1 0'
element_connectivity = '0 1 2'
elem_type = 'TRI3'
[]
[dir2]
type = ElementGenerator
nodal_positions = '1 1 0
1 0 0
0 1 0'
element_connectivity = '0 1 2'
elem_type = 'TRI3'
[]
[combine]
type = CombinerGenerator
inputs = 'dir1 dir2'
[]
[diag]
type = MeshRepairGenerator
input = combine
fix_node_overlap = true
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Reporters]
[mesh]
type = MeshInfo
outputs = json
items = 'num_nodes'
[]
[]
[Outputs]
[json]
type = JSON
execute_system_information_on = NONE
[]
[]
(test/tests/meshgenerators/combiner_generator/combiner_generator.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[cmbn]
type = CombinerGenerator
inputs = 'gen'
positions = '1 0 0 2 2 2 3 0 0'
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = 'left'
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = 'right'
value = 1
[]
[]
[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/mesh_diagnostics_generator/node_based_test.i)
[Mesh]
[copy1]
type = ElementGenerator
nodal_positions = '0 0 0
0 2 0
2 2 0
2 0 0'
element_connectivity = '0 1 2 3'
elem_type = 'QUAD4'
[]
[gen]
input = copy1
type = RenameBlockGenerator
old_block = "0"
new_block = "1"
[]
[copy2]
type = ElementGenerator
nodal_positions = '0 3 0
0 2 0
1 1 0
2 3 0'
element_connectivity = '0 1 2 3'
elem_type = 'QUAD4'
[]
[cmbn]
type = CombinerGenerator
inputs = 'gen copy2'
[]
[diag]
type = MeshDiagnosticsGenerator
input = cmbn
examine_element_overlap = INFO
[]
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/mesh_repair_generator/mixed_elements.i)
[Mesh]
[dir1]
type = ElementGenerator
nodal_positions = '0 0 0
1 0 0
0 1 0'
element_connectivity = '0 1 2'
elem_type = 'TRI3'
[]
[dir2]
type = ElementGenerator
nodal_positions = '0 0 0
1 0 0
1 1 0
0 1 0'
element_connectivity = '0 1 2 3'
elem_type = 'QUAD4'
[]
[combine]
type = CombinerGenerator
inputs = 'dir1 dir2'
[]
[separate]
type = MeshRepairGenerator
input = 'combine'
separate_blocks_by_element_types = true
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Reporters]
[mesh]
type = MeshInfo
outputs = json
items = 'subdomains'
[]
[]
[Outputs]
[json]
type = JSON
execute_system_information_on = NONE
[]
[]
(modules/optimization/test/tests/simp/2d.i)
vol_frac = 0.2
[Mesh]
[planet]
type = ConcentricCircleMeshGenerator
has_outer_square = false
radii = 1
num_sectors = 10
rings = 2
preserve_volumes = false
[]
[moon]
type = ConcentricCircleMeshGenerator
has_outer_square = false
radii = 0.5
num_sectors = 8
rings = 2
preserve_volumes = false
[]
[combine]
type = CombinerGenerator
inputs = 'planet moon'
positions = '0 0 0 -1.5 -0.5 0'
[]
[]
[AuxVariables]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = 0.1
[]
[Dc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[]
[Variables]
[u]
[]
[v]
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
[]
[dt_u]
type = TimeDerivative
variable = u
[]
[diff_v]
type = Diffusion
variable = v
[]
[dt_v]
type = TimeDerivative
variable = v
[]
[]
[Materials]
[thermal_cond]
type = GenericFunctionMaterial
prop_values = '-1.4*abs(y)-2.7*abs(x)'
prop_names = thermal_cond
outputs = 'exodus'
[]
[thermal_compliance_sensitivity]
type = GenericFunctionMaterial
prop_values = '-3*abs(y)-1.5*abs(x)'
prop_names = thermal_sensitivity
outputs = 'exodus'
[]
[]
[BCs]
[flux_u]
type = DirichletBC
variable = u
boundary = outer
value = 3.0
[]
[flux_v]
type = DirichletBC
variable = v
boundary = outer
value = 7.0
[]
[]
[UserObjects]
[rad_avg]
type = RadialAverage
radius = 0.1
weights = linear
prop_name = thermal_sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[update]
type = DensityUpdate
density_sensitivity = Dc
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
[]
[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
dt = 0.1
num_steps = 15
nl_rel_tol = 1e-04
[]
[Outputs]
exodus = true
[]
(modules/optimization/test/tests/simp/2d_twoconstraints.i)
cost_frac = 0.3
vol_frac = 0.2
[Mesh]
[planet]
type = ConcentricCircleMeshGenerator
has_outer_square = false
radii = 1
num_sectors = 10
rings = 2
preserve_volumes = false
[]
[moon]
type = ConcentricCircleMeshGenerator
has_outer_square = false
radii = 0.5
num_sectors = 8
rings = 2
preserve_volumes = false
[]
[combine]
type = CombinerGenerator
inputs = 'planet moon'
positions = '0 0 0 -1.5 -0.5 0'
[]
[]
[AuxVariables]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = 0.1
[]
[Dc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[Cc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[Cost]
family = MONOMIAL
order = CONSTANT
initial_condition = 1.0
[]
[]
[Variables]
[u]
[]
[v]
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
[]
[dt_u]
type = TimeDerivative
variable = u
[]
[diff_v]
type = Diffusion
variable = v
[]
[dt_v]
type = TimeDerivative
variable = v
[]
[]
[Materials]
[thermal_cond]
type = GenericFunctionMaterial
prop_values = '-1.4*abs(y)-2.7*abs(x)'
prop_names = thermal_cond
outputs = 'exodus'
[]
[thermal_compliance_sensitivity]
type = GenericFunctionMaterial
prop_values = '-3*abs(y)-1.5*abs(x)'
prop_names = thermal_sensitivity
outputs = 'exodus'
[]
[cost_sensitivity]
type = GenericFunctionMaterial
prop_values = '-0.3*y*y-0.5*abs(x*y)'
prop_names = cost_sensitivity
outputs = 'exodus'
[]
[cost_sensitivity_parsed]
type = DerivativeParsedMaterial
expression = "if(mat_den<0.2,1.0,0.5)"
coupled_variables = 'mat_den'
property_name = cost_sensitivity_parsed
[]
[cc]
type = CostSensitivity
design_density = mat_den
cost = cost_sensitivity_parsed
outputs = 'exodus'
declare_suffix = 'for_testing'
[]
[]
[BCs]
[flux_u]
type = DirichletBC
variable = u
boundary = outer
value = 3.0
[]
[flux_v]
type = DirichletBC
variable = v
boundary = outer
value = 7.0
[]
[]
[UserObjects]
[rad_avg]
type = RadialAverage
radius = 0.1
weights = linear
prop_name = thermal_sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[rad_avg_cost]
type = RadialAverage
radius = 1.2
weights = linear
prop_name = cost_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.0e16
relative_tolerance = 1.0e-3
bisection_move = 0.15
execute_on = TIMESTEP_BEGIN
[]
[calc_sense]
type = SensitivityFilter
density_sensitivity = Dc
design_density = mat_den
filter_UO = rad_avg
execute_on = TIMESTEP_END
force_postaux = true
[]
[calc_sense_cost]
type = SensitivityFilter
density_sensitivity = Cc
design_density = mat_den
filter_UO = rad_avg_cost
execute_on = TIMESTEP_END
force_postaux = true
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 3
nl_rel_tol = 1e-04
[]
[Outputs]
exodus = true
[]
(test/tests/coord_type/coord_type_rz_general.i)
# Tests using different coordinate systems in different blocks:
# block1: XYZ translated by (0,-1,0)
# block2: RZ with origin=(0,0,0) and direction=(0,1,0)
# block3: RZ with origin=(0,0,1) and direction=(1,0,0)
# block4: RZ with origin=(-1,-2,-3) and direction=(1,1,0)
#
# A transient heat conduction equation is solved with uniform properties.
# The same power is applied to each block via a uniform heat flux boundary
# condition on the outer cylindrical surface (top surface for block1).
# Conservation is checked for each via post-processors.
# Blocks block2, block3, and block4 should have identical solutions.
rho = 1000.0
cp = 500.0
k = 15.0
length = 1.5
radius = 0.5
perimeter = ${fparse 2 * pi * radius}
nz = 10
nr = 5
power = 1e3
heat_flux = ${fparse power / (perimeter * length)}
[Mesh]
# block1
[genmesh1]
type = GeneratedMeshGenerator
dim = 2
nx = ${nz}
ny = ${nr}
xmin = 0.0
xmax = ${length}
ymin = -1.0
ymax = ${fparse -1.0 + radius}
boundary_id_offset = 10
[]
[renumberblock1]
type = RenameBlockGenerator
input = genmesh1
old_block = 0
new_block = 1
[]
[renameblock1]
type = RenameBlockGenerator
input = renumberblock1
old_block = 1
new_block = block1
[]
[renameboundary1]
type = RenameBoundaryGenerator
input = renameblock1
old_boundary = '10 11 12 13'
new_boundary = 'bottom1 right1 top1 left1'
[]
# block2
[genmesh2]
type = GeneratedMeshGenerator
dim = 2
nx = ${nr}
ny = ${nz}
xmin = 0.0
xmax = ${radius}
ymin = 0
ymax = ${length}
boundary_id_offset = 20
[]
[renumberblock2]
type = RenameBlockGenerator
input = genmesh2
old_block = 0
new_block = 2
[]
[renameblock2]
type = RenameBlockGenerator
input = renumberblock2
old_block = 2
new_block = block2
[]
[renameboundary2]
type = RenameBoundaryGenerator
input = renameblock2
old_boundary = '20 21 22 23'
new_boundary = 'bottom2 right2 top2 left2'
[]
# block3
[genmesh3]
type = GeneratedMeshGenerator
dim = 2
nx = ${nz}
ny = ${nr}
xmin = 0.0
xmax = ${length}
ymin = 0
ymax = ${radius}
boundary_id_offset = 30
[]
[translate3]
type = TransformGenerator
input = genmesh3
transform = TRANSLATE
vector_value = '0 0 1'
[]
[renumberblock3]
type = RenameBlockGenerator
input = translate3
old_block = 0
new_block = 3
[]
[renameblock3]
type = RenameBlockGenerator
input = renumberblock3
old_block = 3
new_block = block3
[]
[renameboundary3]
type = RenameBoundaryGenerator
input = renameblock3
old_boundary = '30 31 32 33'
new_boundary = 'bottom3 right3 top3 left3'
[]
# block4
[genmesh4]
type = GeneratedMeshGenerator
dim = 2
nx = ${nz}
ny = ${nr}
xmin = 0.0
xmax = ${length}
ymin = 0
ymax = ${radius}
boundary_id_offset = 40
[]
[rotate4]
type = TransformGenerator
input = genmesh4
transform = ROTATE
vector_value = '45 0 0'
[]
[translate4]
type = TransformGenerator
input = rotate4
transform = TRANSLATE
vector_value = '-1 -2 -3'
[]
[renumberblock4]
type = RenameBlockGenerator
input = translate4
old_block = 0
new_block = 4
[]
[renameblock4]
type = RenameBlockGenerator
input = renumberblock4
old_block = 4
new_block = block4
[]
[renameboundary4]
type = RenameBoundaryGenerator
input = renameblock4
old_boundary = '40 41 42 43'
new_boundary = 'bottom4 right4 top4 left4'
[]
[combiner]
type = CombinerGenerator
inputs = 'renameboundary1 renameboundary2 renameboundary3 renameboundary4'
[]
coord_block = 'block1 block2 block3 block4'
coord_type = 'XYZ RZ RZ RZ'
rz_coord_blocks = 'block2 block3 block4'
rz_coord_origins = '0 0 0
0 0 1
-1 -2 -3'
rz_coord_directions = '0 1 0
1 0 0
1 1 0'
[]
[Variables]
[T]
family = LAGRANGE
order = FIRST
[]
[]
[Functions]
[T_ic_fn]
type = ParsedFunction
expression = 'x'
[]
[theoretical_energy_added_fn]
type = ParsedFunction
expression = '${power} * t'
[]
[]
[ICs]
[T_ic]
type = FunctionIC
variable = T
function = T_ic_fn
[]
[]
[Kernels]
[time_derivative]
type = ADTimeDerivative
variable = T
[]
[heat_conduction]
type = CoefDiffusion
variable = T
coef = ${fparse k / (rho * cp)}
[]
[]
[BCs]
[heat_flux_bc]
type = ADFunctionNeumannBC
variable = T
boundary = 'top1 right2 top3 top4'
# The heat conduction equation has been divided by rho*cp
function = '${fparse heat_flux / (rho * cp)}'
[]
[]
[Postprocessors]
[theoretical_energy_change]
type = FunctionValuePostprocessor
function = theoretical_energy_added_fn
execute_on = 'INITIAL TIMESTEP_END'
[]
# block1 conservation
[T_integral1]
type = ElementIntegralVariablePostprocessor
variable = T
block = 'block1'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy1]
type = ParsedPostprocessor
pp_names = 'T_integral1'
expression = 'T_integral1 * ${rho} * ${cp} * ${perimeter}'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change1]
type = ChangeOverTimePostprocessor
postprocessor = energy1
change_with_respect_to_initial = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change_error1]
type = RelativeDifferencePostprocessor
value1 = energy_change1
value2 = theoretical_energy_change
execute_on = 'INITIAL TIMESTEP_END'
[]
# block2 conservation
[T_integral2]
type = ElementIntegralVariablePostprocessor
variable = T
block = 'block2'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy2]
type = ParsedPostprocessor
pp_names = 'T_integral2'
expression = 'T_integral2 * ${rho} * ${cp}'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change2]
type = ChangeOverTimePostprocessor
postprocessor = energy2
change_with_respect_to_initial = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change_error2]
type = RelativeDifferencePostprocessor
value1 = energy_change2
value2 = theoretical_energy_change
execute_on = 'INITIAL TIMESTEP_END'
[]
# block3 conservation
[T_integral3]
type = ElementIntegralVariablePostprocessor
variable = T
block = 'block3'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy3]
type = ParsedPostprocessor
pp_names = 'T_integral3'
expression = 'T_integral3 * ${rho} * ${cp}'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change3]
type = ChangeOverTimePostprocessor
postprocessor = energy3
change_with_respect_to_initial = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change_error3]
type = RelativeDifferencePostprocessor
value1 = energy_change3
value2 = theoretical_energy_change
execute_on = 'INITIAL TIMESTEP_END'
[]
# block4 conservation
[T_integral4]
type = ElementIntegralVariablePostprocessor
variable = T
block = 'block4'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy4]
type = ParsedPostprocessor
pp_names = 'T_integral4'
expression = 'T_integral4 * ${rho} * ${cp}'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change4]
type = ChangeOverTimePostprocessor
postprocessor = energy4
change_with_respect_to_initial = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change_error4]
type = RelativeDifferencePostprocessor
value1 = energy_change4
value2 = theoretical_energy_change
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 1.0
num_steps = 10
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-10
[]
[Outputs]
file_base = 'coord_type_rz_general'
[console]
type = Console
show = 'energy_change_error1 energy_change_error2 energy_change_error3 energy_change_error4'
[]
[exodus]
type = Exodus
show = 'T energy_change_error1 energy_change_error2 energy_change_error3 energy_change_error4'
[]
[]
(test/tests/meshgenerators/mesh_repair_generator/flip_element.i)
[Mesh]
[dir1]
type = ElementGenerator
nodal_positions = '0 0 0
1 0 0
0 1 0'
element_connectivity = '0 1 2'
elem_type = 'TRI3'
[]
[rename]
type = RenameBlockGenerator
input = dir1
old_block = 0
new_block = 1
[]
[dir2]
type = ElementGenerator
nodal_positions = '0 0 0
1 0 0
0 1 0'
element_connectivity = '0 2 1'
elem_type = 'TRI3'
[]
[combine]
type = CombinerGenerator
inputs = 'dir2 rename'
[]
[extrude]
type = MeshExtruderGenerator
input = combine
extrusion_vector = '0 0 1'
[]
[flip]
type = MeshRepairGenerator
input = extrude
fix_elements_orientation = true
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[vol0]
type = VolumePostprocessor
block = 0
[]
[vol1]
type = VolumePostprocessor
block = 1
[]
[]
[Outputs]
csv = true
[]
(test/tests/meshgenerators/coarsen_block_generator/coarsen_quad.i)
[Mesh]
allow_renumbering = false
[big_one]
type = GeneratedMeshGenerator
dim = 2
nx = 1
ny = 1
xmin = 1
xmax = 2
ymin = 0
ymax = 1
[]
[cut_one]
type = CartesianMeshGenerator
dim = 2
dx = 1
dy = 1
ix = 2
iy = 2
[]
[cmbn]
type = CombinerGenerator
inputs = 'big_one cut_one'
[]
[coarsen]
type = CoarsenBlockGenerator
input = cmbn
block = 0
coarsening = 1
starting_point = '0.25 0.25 0'
[]
# Stitch now as the coarsening does not stitch
[stitch]
type = MeshRepairGenerator
input = coarsen
fix_node_overlap = true
[]
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/mesh_diagnostics_generator/elem_types_test.i)
[Mesh]
[copy1]
type = ElementGenerator
nodal_positions = '0 0 0
2 2 0
2 0 0'
element_connectivity = '0 1 2'
elem_type = 'TRI3'
[]
[copy2]
type = ElementGenerator
nodal_positions = '0 1 0
0 3 0
2 3 0
2 1 0'
element_connectivity = '0 1 2 3'
elem_type = 'QUAD4'
[]
[cmbn]
type = CombinerGenerator
inputs = 'copy1 copy2'
[]
[diag]
type = MeshDiagnosticsGenerator
input = cmbn
examine_element_types = INFO
[]
[]
[Outputs]
exodus = true
[]
(test/tests/mortar/coincident-nodes/test.i)
[Mesh]
[top]
type = GeneratedMeshGenerator
dim = 2
ymin = 0.5
ymax = 1
nx = 2
ny = 1
subdomain_ids = '0 0'
[]
[bottom]
type = GeneratedMeshGenerator
dim = 2
ymin = 0
ymax = 0.5
nx = 2
ny = 1
subdomain_ids = '1 1'
[]
[combine]
type = CombinerGenerator
inputs = 'top bottom'
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
input = combine
sidesets = left
new_block_id = 11
new_block_name = secondary
[]
[primary]
type = LowerDBlockFromSidesetGenerator
input = secondary
sidesets = right
new_block_id = 12
new_block_name = primary
[]
[]
[Problem]
solve = false
[]
[Variables]
[u][]
[]
[Constraints]
[mortar]
type = PenaltyEqualValueConstraint
secondary_variable = u
primary_boundary = right
secondary_boundary = left
primary_subdomain = 12
secondary_subdomain = 11
penalty_value = 10
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
(modules/contact/test/tests/verification/patch_tests/automatic_patch_update/iteration_adaptivity_parallel.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
coord_type = XYZ
patch_update_strategy = iteration
patch_size = 8
ghosting_patch_size = 20
[cube1]
type = GeneratedMeshGenerator
dim = 2
boundary_name_prefix = cube1
xmax = 1
ymax = 1
nx = 2
ny = 2
[]
[cube2]
type = GeneratedMeshGenerator
dim = 2
boundary_name_prefix = cube2
boundary_id_offset = 5
xmax = 1
ymax = 1
nx = 2
ny = 2
[]
[block_id]
type = SubdomainIDGenerator
input = cube2
subdomain_id = 2
[]
[combine]
inputs = 'cube1 block_id'
type = CombinerGenerator
positions = '0 0 0
0 1 0'
[]
[rename2]
type = RenameBlockGenerator
input = combine
old_block = '0 2'
new_block = 'cube1 cube2'
[]
[]
[Adaptivity]
initial_marker = box
initial_steps = 1
max_h_level = 1
[Markers]
[box]
type = BoxMarker
bottom_left = '0 0 0'
top_right = '0.5 0.5 0'
inside = refine
outside = do_nothing
[]
[]
[]
[Variables]
[disp_x]
block = 'cube1 cube2'
[]
[disp_y]
block = 'cube1 cube2'
[]
[]
[Modules/TensorMechanics/Master]
[cube1_mechanics]
strain = FINITE
block = 'cube1 cube2'
[]
[]
[BCs]
[cube1_x]
type = ADDirichletBC
variable = disp_x
boundary = 'cube1_bottom '
value = 0.0
[]
[cube1_y]
type = ADDirichletBC
variable = disp_y
boundary = 'cube1_bottom '
value = 0.0
[]
[cube2_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = 'cube2_top'
function = '-t'
preset = false
[]
[cube2_x]
type = ADDirichletBC
variable = disp_x
boundary = 'cube2_top'
value = 0
[]
[]
[Materials]
[cube1_elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 68.9e9
poissons_ratio = 0.3
block = 'cube1'
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = 'cube1 cube2'
[]
[cube2_elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 140e9
poissons_ratio = 0.3
block = 'cube2'
[]
[]
[Contact]
[contactswell]
secondary = cube1_top
primary = cube2_bottom
model = frictionless
formulation = mortar_penalty
penalty = 1.0e12
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
line_search = 'none'
nl_rel_tol = 1e-9
nl_abs_tol = 1e-9
nl_max_its = 50
l_tol = 1e-4
l_max_its = 50
start_time = 0.0
end_time = 0.02e-3
dtmax = 4
dtmin = 0.001e-3
dt = 0.01e-3
automatic_scaling = true
off_diagonals_in_auto_scaling = true
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
(test/tests/meshgenerators/xy_delaunay_generator/xydelaunay_from_1d_sbdids.i)
[Mesh]
[left_bdy]
type = PolyLineMeshGenerator
points = '-3.0 0.0 0.0
-2.0 -1.0 0.0
-1.0 0.0 0.0
-2.0 2.0 0.0'
loop = true
[]
[right_bdy]
type = PolyLineMeshGenerator
points = '3.0 0.0 0.0
2.0 -1.0 0.0
1.0 0.0 0.0
2.0 2.0 0.0'
loop = true
[]
[right_sbd1]
type = SubdomainIDGenerator
input = right_bdy
subdomain_id = 1
[]
[both_bdy]
type = CombinerGenerator
inputs = 'left_bdy right_sbd1'
[]
[triang]
type = XYDelaunayGenerator
boundary = 'both_bdy'
input_subdomain_names = 1 # only the right half
refine_boundary = true
desired_area = 0.2
[]
[]
(modules/solid_mechanics/test/tests/umat/multiple_blocks/multiple_blocks_two_materials_parallel.i)
# Testing the UMAT Interface - linear elastic model using the large strain formulation.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[mesh_1]
type = GeneratedMeshGenerator
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
nx = 2
ny = 2
nz = 2
[]
[block_1]
type = SubdomainIDGenerator
input = mesh_1
subdomain_id = 1
[]
[mesh_2]
type = GeneratedMeshGenerator
dim = 3
xmin = -2.0
xmax = -1.0
ymin = -2.0
ymax = -1.0
zmin = -2.0
zmax = -1.0
nx = 2
ny = 2
nz = 2
boundary_name_prefix = 'second'
[]
[block_2]
type = SubdomainIDGenerator
input = mesh_2
subdomain_id = 2
[]
[combined]
type = CombinerGenerator
inputs = 'block_1 block_2'
[]
[]
[Functions]
[top_pull]
type = ParsedFunction
value = t/100
[]
# Forced evolution of temperature
[temperature_load]
type = ParsedFunction
value = '273'
[]
# Factor to multiply the elasticity tensor in MOOSE
[elasticity_prefactor]
type = ParsedFunction
value = '1'
[]
[]
[AuxVariables]
[temperature]
[]
[]
[AuxKernels]
[temperature_function]
type = FunctionAux
variable = temperature
function = temperature_load
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
generate_output = 'stress_yy'
[]
[]
[BCs]
[y_pull_function]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = top_pull
[]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[z_bot]
type = DirichletBC
variable = disp_z
boundary = front
value = 0.0
[]
[]
[Materials]
[umat_1]
type = AbaqusUMATStress
constant_properties = '1000 0.3'
plugin = '../../../plugins/elastic_temperature'
num_state_vars = 0
temperature = temperature
use_one_based_indexing = true
block = '1'
[]
# Linear strain hardening
[umat_2]
type = AbaqusUMATStress
# Young's modulus, Poisson's Ratio, Yield, Hardening
constant_properties = '1000 0.3 100 100'
plugin = '../../../plugins/linear_strain_hardening'
num_state_vars = 3
use_one_based_indexing = true
block = '2'
[]
[elastic]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1000
poissons_ratio = 0.3
elasticity_tensor_prefactor = 'elasticity_prefactor'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
num_steps = 30
dt = 1.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/combiner_generator/combiner_multi_input.i)
[Mesh]
[gen1]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin=0
xmax=1
ymin=0
ymax=1
[]
[gen2]
type = GeneratedMeshGenerator
dim = 2
nx = 12
ny = 12
xmin=2
xmax=3
ymin=2
ymax=3
[]
[gen3]
type = GeneratedMeshGenerator
dim = 2
nx = 14
ny = 14
xmin=3.5
xmax=5
ymin=3
ymax=4
[]
[cmbn]
type = CombinerGenerator
inputs = 'gen1 gen2 gen3'
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = 'left'
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = 'right'
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/thermal_materials/2d.i)
power = 2.0
rho0 = 0.0
rho1 = 1.0
TC0 = 1.0e-16
TC1 = 1.0
[Mesh]
[planet]
type = ConcentricCircleMeshGenerator
has_outer_square = false
radii = 1
num_sectors = 10
rings = 2
preserve_volumes = false
[]
[moon]
type = ConcentricCircleMeshGenerator
has_outer_square = false
radii = 0.5
num_sectors = 8
rings = 2
preserve_volumes = false
[]
[combine]
type = CombinerGenerator
inputs = 'planet moon'
positions = '0 0 0 -1.5 -0.5 0'
[]
[]
[GlobalParams]
illumination_flux = '1 1 0'
[]
[AuxVariables]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = 0.1
[]
[]
[Variables]
[u]
[]
[v]
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
[]
[dt_u]
type = TimeDerivative
variable = u
[]
[diff_v]
type = Diffusion
variable = v
[]
[dt_v]
type = TimeDerivative
variable = v
[]
[]
[Materials]
[thermal_compliance]
type = ThermalCompliance
temperature = u
thermal_conductivity = thermal_cond
outputs = 'exodus'
[]
[thermal_cond]
type = DerivativeParsedMaterial
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_sensitivity]
type = ThermalSensitivity
design_density = mat_den
thermal_conductivity = thermal_cond
temperature = u
outputs = 'exodus'
[]
[]
[BCs]
[flux_u]
type = DirectionalFluxBC
variable = u
boundary = outer
[]
[flux_v]
type = DirectionalFluxBC
variable = v
boundary = outer
self_shadow_uo = shadow
[]
[]
[Postprocessors]
[ave_v_all]
type = SideAverageValue
variable = v
boundary = outer
[]
[ave_v_exposed]
type = ExposedSideAverageValue
variable = v
boundary = outer
self_shadow_uo = shadow
[]
[]
[UserObjects]
[shadow]
type = SelfShadowSideUserObject
boundary = outer
execute_on = INITIAL
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 1
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_radiation/sphere.i)
#
# This problem is one of radiation boundary conditions between two
# spherical surfaces.
#
# S(T1^4 - T2^4) R1^2
# flux1 = - ---------------- and flux2 = -flux1 * ----
# 1 1 - e2 R1^2 R2^2
# -- + ------ * ----
# e1 e2 R2^2
#
# where S is the Stefan Boltzmann constant 5.67e-8 W/m^2/K^4
# T1 is the temperature on the left surface 278 K
# T2 is the temperature on the right surface 333 K
# e1 is the emissivity for the left surface 0.8
# e2 is the emissivity for the left surface 0.9
# R1 is the radius of the inner surface 0.1 m
# R2 is the radius of the outer surface 0.11 m
#
# Flux1:
# Exact Code
# ------------- -------------
# -267.21 W/m^2 -267.02 W/m^2
#
# Flux2:
# Exact Code
# ------------- -------------
# 220.83 W/m^2 220.70 W/m^2
#
thick = 0.01
R1 = 0.1
R2 = 0.11
[GlobalParams]
order = second
family = lagrange
[]
[Mesh]
coord_type = RSPHERICAL
[mesh1]
type = GeneratedMeshGenerator
dim = 1
elem_type = edge3
nx = 4
xmin = '${fparse R1 - thick}'
xmax = '${R1}'
boundary_name_prefix = left
[]
[mesh2]
type = GeneratedMeshGenerator
dim = 1
elem_type = edge3
nx = 4
ny = 1
xmin = '${R2}'
xmax = '${fparse R2 + thick}'
boundary_id_offset = 4
boundary_name_prefix = right
[]
[final]
type = CombinerGenerator
inputs = 'mesh1 mesh2'
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temperature
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temperature
boundary = left_left
value = 278
[]
[right]
type = DirichletBC
variable = temperature
boundary = right_right
value = 333
[]
[]
[Materials]
[heat]
type = HeatConductionMaterial
thermal_conductivity = 200 # W/m/K
specific_heat = 4.2e5
[]
[]
[ThermalContact]
[thermal_contact]
type = GapHeatTransfer
variable = temperature
primary = left_right
secondary = right_left
emissivity_primary = 0.8
emissivity_secondary = 0.9
quadrature = true
gap_conductivity = 1e-40 # requires a positive value
gap_geometry_type = sphere
[]
[]
[Functions]
[analytic_flux_1]
type = ParsedFunction
symbol_names = 'S T1 T2 e1 e2 R1 R2'
symbol_values = '5.67e-8 278 333 0.8 0.9 ${R1} ${R2}'
expression = 'T14 := T1*T1*T1*T1;
T24 := T2*T2*T2*T2;
S*(T14-T24)/(1/e1+(1-e2)/e2*R1*R1/R2/R2)'
[]
[analytic_flux_2]
type = ParsedFunction
symbol_names = 'S T1 T2 e1 e2 R1 R2'
symbol_values = '5.67e-8 278 333 0.8 0.9 ${R1} ${R2}'
expression = 'T14 := T1*T1*T1*T1;
T24 := T2*T2*T2*T2;
-S*(T14-T24)/(1/e1+(1-e2)/e2*R1*R1/R2/R2)*R1*R1/R2/R2'
[]
[]
[Postprocessors]
[code_flux_1]
type = SideDiffusiveFluxAverage
variable = temperature
boundary = left_right
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[]
[analytic_flux_1]
type = FunctionValuePostprocessor
function = analytic_flux_1
execute_on = 'initial timestep_end'
[]
[error_1]
type = ParsedPostprocessor
pp_names = 'code_flux_1 analytic_flux_1'
expression = '(analytic_flux_1 - code_flux_1)/analytic_flux_1*100'
execute_on = 'initial timestep_end'
[]
[code_flux_2]
type = SideDiffusiveFluxAverage
variable = temperature
boundary = right_left
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[]
[analytic_flux_2]
type = FunctionValuePostprocessor
function = analytic_flux_2
execute_on = 'initial timestep_end'
[]
[error_2]
type = ParsedPostprocessor
pp_names = 'code_flux_2 analytic_flux_2'
expression = '(analytic_flux_2 - code_flux_2)/analytic_flux_2*100'
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = newton
num_steps = 1
dt = 1
end_time = 1
nl_abs_tol = 1e-12
nl_rel_tol = 1e-10
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/umat/multiple_blocks/multiple_blocks.i)
# Testing the UMAT Interface - linear elastic model using the large strain formulation.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[mesh_1]
type = GeneratedMeshGenerator
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[block_1]
type = SubdomainIDGenerator
input = mesh_1
subdomain_id = 1
[]
[mesh_2]
type = GeneratedMeshGenerator
dim = 3
xmin = -2.0
xmax = -1.0
ymin = -2.0
ymax = -1.0
zmin = -2.0
zmax = -1.
boundary_name_prefix = 'second'
[]
[block_2]
type = SubdomainIDGenerator
input = mesh_2
subdomain_id = 2
[]
[combined]
type = CombinerGenerator
inputs = 'block_1 block_2'
[]
[]
[Functions]
[top_pull]
type = ParsedFunction
value = t/100
[]
# Forced evolution of temperature
[temperature_load]
type = ParsedFunction
value = '273 + 10*t'
[]
# Factor to multiply the elasticity tensor in MOOSE
[elasticity_prefactor]
type = ParsedFunction
value = '273/(273 + 10*t)'
[]
[]
[AuxVariables]
[temperature]
[]
[]
[AuxKernels]
[temperature_function]
type = FunctionAux
variable = temperature
function = temperature_load
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
generate_output = 'stress_yy'
[]
[]
[BCs]
[y_pull_function]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = top_pull
[]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[z_bot]
type = DirichletBC
variable = disp_z
boundary = front
value = 0.0
[]
[]
[Materials]
[umat_1]
type = AbaqusUMATStress
constant_properties = '1000 0.3'
plugin = '../../../plugins/elastic_temperature'
num_state_vars = 0
temperature = temperature
use_one_based_indexing = true
block = '1'
[]
[umat_2]
type = AbaqusUMATStress
constant_properties = '10000 0.3'
plugin = '../../../plugins/elastic_temperature'
num_state_vars = 0
temperature = temperature
use_one_based_indexing = true
block = '2'
[]
[elastic]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1000
poissons_ratio = 0.3
elasticity_tensor_prefactor = 'elasticity_prefactor'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
num_steps = 30
dt = 1.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/verification/patch_tests/automatic_patch_update/iteration_adaptivity_parallel_node_face.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
coord_type = XYZ
patch_update_strategy = iteration
patch_size = 8
ghosting_patch_size = 20
[cube1]
type = GeneratedMeshGenerator
dim = 2
boundary_name_prefix = cube1
xmax = 1
ymax = 1
nx = 2
ny = 2
[]
[cube2]
type = GeneratedMeshGenerator
dim = 2
boundary_name_prefix = cube2
boundary_id_offset = 5
xmax = 1
ymax = 1
nx = 2
ny = 2
[]
[block_id]
type = SubdomainIDGenerator
input = cube2
subdomain_id = 2
[]
[combine]
inputs = 'cube1 block_id'
type = CombinerGenerator
positions = '0 0 0
0 1 0'
[]
[rename2]
type = RenameBlockGenerator
input = combine
old_block = '0 2'
new_block = 'cube1 cube2'
[]
[]
[Adaptivity]
initial_marker = box
initial_steps = 1
max_h_level = 1
[Markers]
[box]
type = BoxMarker
bottom_left = '0 0 0'
top_right = '0.5 0.5 0'
inside = refine
outside = do_nothing
[]
[]
[]
[Variables]
[disp_x]
block = 'cube1 cube2'
[]
[disp_y]
block = 'cube1 cube2'
[]
[]
[Modules/TensorMechanics/Master]
[cube1_mechanics]
strain = FINITE
block = 'cube1 cube2'
[]
[]
[BCs]
[cube1_x]
type = ADDirichletBC
variable = disp_x
boundary = 'cube1_bottom '
value = 0.0
[]
[cube1_y]
type = ADDirichletBC
variable = disp_y
boundary = 'cube1_bottom '
value = 0.0
[]
[cube2_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = 'cube2_top'
function = '-t'
preset = false
[]
[cube2_x]
type = ADDirichletBC
variable = disp_x
boundary = 'cube2_top'
value = 0
[]
[]
[Materials]
[cube1_elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 68.9e9
poissons_ratio = 0.3
block = 'cube1'
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = 'cube1 cube2'
[]
[cube2_elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 140e9
poissons_ratio = 0.3
block = 'cube2'
[]
[]
[Contact]
[contactswell]
secondary = cube1_top
primary = cube2_bottom
model = frictionless
formulation = kinematic
penalty = 1.0e6
normalize_penalty = true
tangential_tolerance = 0.1
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
line_search = 'none'
nl_rel_tol = 1e-16
nl_abs_tol = 1e-16
nl_max_its = 50
l_tol = 1e-4
l_max_its = 50
start_time = 0.0
end_time = 0.02e-3
dtmax = 4
dtmin = 0.001e-3
dt = 0.01e-3
automatic_scaling = true
off_diagonals_in_auto_scaling = true
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
execute_on = 'FINAL'
[]
(test/tests/meshgenerators/combiner_generator/combiner_generator_from_file.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[cmbn]
type = CombinerGenerator
inputs = 'gen'
positions_file = 'positions.txt'
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = 'left'
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = 'right'
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_radiation/cylinder.i)
#
# This problem is one of radiation boundary conditions between two
# cylindrical surfaces.
#
# S(T1^4 - T2^4) R1
# flux1 = - ---------------- and flux2 = -flux1 * --
# 1 1 - e2 R1 R2
# -- + ------ * --
# e1 e2 R2
#
# where S is the Stefan Boltzmann constant 5.67e-8 W/m^2/K^4
# T1 is the temperature on the left surface 278 K
# T2 is the temperature on the right surface 333 K
# e1 is the emissivity for the left surface 0.8
# e2 is the emissivity for the left surface 0.9
# R1 is the radius of the inner surface 0.1 m
# R2 is the radius of the outer surface 0.11 m
#
# Flux1:
# Exact Code
# ------------- -------------
# -265.29 W/m^2 -265.26 W/m^2
#
# Flux2:
# Exact Code
# ------------- -------------
# 241.26 W/m^2 241.15 W/m^2
#
thick = 0.01
R1 = 0.1
R2 = 0.11
[GlobalParams]
order = second
family = lagrange
[]
[Mesh]
coord_type = RZ
[mesh1]
type = GeneratedMeshGenerator
dim = 2
elem_type = quad8
nx = 4
ny = 1
xmin = '${fparse R1 - thick}'
xmax = '${R1}'
ymin = 0
ymax = '${R1}'
boundary_name_prefix = left
[]
[mesh2]
type = GeneratedMeshGenerator
dim = 2
elem_type = quad8
nx = 4
ny = 1
xmin = '${R2}'
xmax = '${fparse R2 + thick}'
ymin = 0
ymax = '${R1}'
boundary_id_offset = 4
boundary_name_prefix = right
[]
[final]
type = CombinerGenerator
inputs = 'mesh1 mesh2'
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temperature
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temperature
boundary = left_left
value = 278
[]
[right]
type = DirichletBC
variable = temperature
boundary = right_right
value = 333
[]
[]
[Materials]
[heat]
type = HeatConductionMaterial
thermal_conductivity = 200 # W/m/K
specific_heat = 4.2e5
[]
[]
[ThermalContact]
[thermal_contact]
type = GapHeatTransfer
variable = temperature
primary = left_right
secondary = right_left
emissivity_primary = 0.8
emissivity_secondary = 0.9
quadrature = true
gap_conductivity = 1e-40 # requires a positive value
gap_geometry_type = cylinder
[]
[]
[Functions]
[analytic_flux_1]
type = ParsedFunction
symbol_names = 'S T1 T2 e1 e2 R1 R2'
symbol_values = '5.67e-8 278 333 0.8 0.9 ${R1} ${R2}'
expression = 'T14 := T1*T1*T1*T1;
T24 := T2*T2*T2*T2;
S*(T14-T24)/(1/e1+(1-e2)/e2*R1/R2)'
[]
[analytic_flux_2]
type = ParsedFunction
symbol_names = 'S T1 T2 e1 e2 R1 R2'
symbol_values = '5.67e-8 278 333 0.8 0.9 ${R1} ${R2}'
expression = 'T14 := T1*T1*T1*T1;
T24 := T2*T2*T2*T2;
-S*(T14-T24)/(1/e1+(1-e2)/e2*R1/R2)*R1/R2'
[]
[]
[Postprocessors]
[code_flux_1]
type = SideDiffusiveFluxAverage
variable = temperature
boundary = left_right
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[]
[analytic_flux_1]
type = FunctionValuePostprocessor
function = analytic_flux_1
execute_on = 'initial timestep_end'
[]
[error_1]
type = ParsedPostprocessor
pp_names = 'code_flux_1 analytic_flux_1'
expression = '(analytic_flux_1 - code_flux_1)/analytic_flux_1*100'
execute_on = 'initial timestep_end'
[]
[code_flux_2]
type = SideDiffusiveFluxAverage
variable = temperature
boundary = right_left
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[]
[analytic_flux_2]
type = FunctionValuePostprocessor
function = analytic_flux_2
execute_on = 'initial timestep_end'
[]
[error_2]
type = ParsedPostprocessor
pp_names = 'code_flux_2 analytic_flux_2'
expression = '(analytic_flux_2 - code_flux_2)/analytic_flux_2*100'
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = newton
num_steps = 1
dt = 1
end_time = 1
nl_abs_tol = 1e-12
nl_rel_tol = 1e-10
[]
[Outputs]
csv = true
[]
(test/tests/meshgenerators/mesh_diagnostics_generator/detect_amr_hex.i)
[Mesh]
[big_one]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 1
xmax = 2
ymin = 0
ymax = 1
zmin = 0
zmax = 1
[]
[cut_one]
type = CartesianMeshGenerator
dim = 3
dx = 1
dy = 1
dz = 1
ix = 2
iy = 2
iz = 2
[]
[cmbn]
type = CombinerGenerator
inputs = 'big_one cut_one'
[]
[diag]
type = MeshDiagnosticsGenerator
input = cmbn
search_for_adaptivity_nonconformality = INFO
[]
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/mesh_diagnostics_generator/detect_amr_quad.i)
[Mesh]
[big_one]
type = GeneratedMeshGenerator
dim = 2
nx = 1
ny = 1
xmin = 1
xmax = 2
ymin = 0
ymax = 1
[]
[cut_one]
type = CartesianMeshGenerator
dim = 2
dx = 1
dy = 1
ix = 2
iy = 2
[]
[cmbn]
type = CombinerGenerator
inputs = 'big_one cut_one'
[]
[diag]
type = MeshDiagnosticsGenerator
input = cmbn
search_for_adaptivity_nonconformality = INFO
[]
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/directional_flux_bc/3d.i)
[Mesh]
[planet]
type = SphereMeshGenerator
radius = 1
nr = 2 # increase for a better visualization
[]
[moon]
type = SphereMeshGenerator
radius = 0.3
nr = 1 # increase for a better visualization
[]
[combine]
type = CombinerGenerator
inputs = 'planet moon'
positions = '0 0 0 -1.2 -1 -1'
[]
[]
[GlobalParams]
illumination_flux = '1 1 1'
[]
[Variables]
[u]
[]
[v]
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
[]
[dt_u]
type = TimeDerivative
variable = u
[]
[diff_v]
type = Diffusion
variable = v
[]
[dt_v]
type = TimeDerivative
variable = v
[]
[]
[BCs]
[flux_u]
type = DirectionalFluxBC
variable = u
boundary = 0
[]
[flux_v]
type = DirectionalFluxBC
variable = v
boundary = 0
self_shadow_uo = shadow
[]
[]
[Postprocessors]
[ave_v_all]
type = SideAverageValue
variable = v
boundary = 0
[]
[ave_v_exposed]
type = ExposedSideAverageValue
variable = v
boundary = 0
self_shadow_uo = shadow
[]
[]
[UserObjects]
[shadow]
type = SelfShadowSideUserObject
boundary = 0
execute_on = INITIAL
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 1
[]
[Outputs]
[out]
type = Exodus
execute_on = FINAL
[]
[]
(modules/solid_mechanics/test/tests/umat/multiple_blocks/multiple_blocks_two_materials.i)
# Testing the UMAT Interface - linear elastic model using the large strain formulation.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[mesh_1]
type = GeneratedMeshGenerator
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[block_1]
type = SubdomainIDGenerator
input = mesh_1
subdomain_id = 1
[]
[mesh_2]
type = GeneratedMeshGenerator
dim = 3
xmin = -2.0
xmax = -1.0
ymin = -2.0
ymax = -1.0
zmin = -2.0
zmax = -1.
boundary_name_prefix = 'second'
[]
[block_2]
type = SubdomainIDGenerator
input = mesh_2
subdomain_id = 2
[]
[combined]
type = CombinerGenerator
inputs = 'block_1 block_2'
[]
[]
[Functions]
[top_pull]
type = ParsedFunction
value = t/100
[]
# Forced evolution of temperature
[temperature_load]
type = ParsedFunction
value = '273'
[]
# Factor to multiply the elasticity tensor in MOOSE
[elasticity_prefactor]
type = ParsedFunction
value = '1'
[]
[]
[AuxVariables]
[temperature]
[]
[]
[AuxKernels]
[temperature_function]
type = FunctionAux
variable = temperature
function = temperature_load
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
generate_output = 'stress_yy'
[]
[]
[BCs]
[y_pull_function]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = top_pull
[]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[z_bot]
type = DirichletBC
variable = disp_z
boundary = front
value = 0.0
[]
[]
[Materials]
[umat_1]
type = AbaqusUMATStress
constant_properties = '1000 0.3'
plugin = '../../../plugins/elastic_temperature'
num_state_vars = 0
temperature = temperature
use_one_based_indexing = true
block = '1'
[]
# Linear strain hardening
[umat_2]
type = AbaqusUMATStress
# Young's modulus, Poisson's Ratio, Yield, Hardening
constant_properties = '1000 0.3 100 100'
plugin = '../../../plugins/linear_strain_hardening'
num_state_vars = 3
use_one_based_indexing = true
block = '2'
[]
[elastic]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1000
poissons_ratio = 0.3
elasticity_tensor_prefactor = 'elasticity_prefactor'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
num_steps = 30
dt = 1.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/directional_flux_bc/2d_elem.i)
[Mesh]
[shade]
type = GeneratedMeshGenerator
dim = 2
nx = 1
ny = 3
xmax = 0.2
ymax = 0.5
[]
[screen]
type = GeneratedMeshGenerator
dim = 2
nx = 1
ny = 20
xmax = 0.05
[]
[screen_block]
type = SubdomainIDGenerator
input = screen
subdomain_id = 1
[]
[combine]
type = CombinerGenerator
inputs = 'shade screen_block'
positions = '0 0 0 1 0 0'
[]
[all_sides]
type = SideSetsAroundSubdomainGenerator
block = '0 1'
new_boundary = 100
input = combine
[]
[shaded_side]
type = SideSetsAroundSubdomainGenerator
normal = '-1 0 0'
block = 1
input = all_sides
new_boundary = 101
[]
[]
[GlobalParams]
illumination_flux = '1 0 0'
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[dt]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[flux]
type = DirectionalFluxBC
variable = u
boundary = 101
self_shadow_uo = shadow
[]
[]
[UserObjects]
[shadow]
type = SelfShadowSideUserObject
boundary = 100
execute_on = INITIAL
[]
[]
[Postprocessors]
[light]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 101
[]
[]
[Executioner]
type = Transient
dt = 0.01
num_steps = 1
[]
[Outputs]
csv = true
[]
(test/tests/meshgenerators/combiner_generator/combiner_multi_input_translate_from_file.i)
[Mesh]
[gen1]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[gen2]
type = GeneratedMeshGenerator
dim = 2
nx = 12
ny = 12
[]
[gen3]
type = GeneratedMeshGenerator
dim = 2
nx = 14
ny = 14
[]
[cmbn]
type = CombinerGenerator
inputs = 'gen1 gen2 gen3'
positions_file = 'positions.txt'
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = 'left'
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = 'right'
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]