- block_idSubdomain id to set for inside/outside the bounding box
C++ Type:unsigned short
Description:Subdomain id to set for inside/outside the bounding box
- bottom_leftThe bottom left point (in x,y,z with spaces in-between).
C++ Type:libMesh::VectorValue
Description:The bottom left point (in x,y,z with spaces in-between).
- top_rightThe bottom left point (in x,y,z with spaces in-between).
C++ Type:libMesh::VectorValue
Description:The bottom left point (in x,y,z with spaces in-between).
SubdomainBoundingBox
This MeshModifier takes a user specified axis aligned box specified in terms of extreme coordinates (lower left and upper right), and changes all element subdomain IDs either inside or outside the box to the specified ID.
Changes the subdomain ID of elements either (XOR) inside or outside the specified box to the specified ID.
Input Parameters
- block_nameSubdomain name to set for inside/outside the bounding box (optional)
C++ Type:SubdomainName
Options:
Description:Subdomain name to set for inside/outside the bounding box (optional)
- depends_onThe MeshModifiers that this modifier relies upon (i.e. must execute before this one)
C++ Type:std::vector
Options:
Description:The MeshModifiers that this modifier relies upon (i.e. must execute before this one)
- force_prepareFalseNormally all MeshModifiers run before the mesh is prepared for use. This flag can be set on an individual modifier to force preparation between modifiers where they might be needed.
Default:False
C++ Type:bool
Options:
Description:Normally all MeshModifiers run before the mesh is prepared for use. This flag can be set on an individual modifier to force preparation between modifiers where they might be needed.
- locationINSIDEControl of where the subdomain id is to be set
Default:INSIDE
C++ Type:MooseEnum
Options:INSIDE OUTSIDE
Description:Control of where the subdomain id is to be set
Optional Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector
Options:
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Options:
Description:Set the enabled status of the MooseObject.
Advanced Parameters
Input Files
- test/tests/mesh_modifiers/block_deleter/BlockDeleterTest1.i
- test/tests/mesh_modifiers/subdomain_bounding_box/subdomain_bounding_box_inside.i
- python/chigger/tests/simple/mug_blocks.i
- tutorials/darcy_thermo_mech/step07_adaptivity/problems/step7d_adapt_blocks.i
- python/peacock/tests/common/simple_diffusion2.i
- test/tests/mesh_modifiers/block_deleter/BlockDeleterTest4.i
- test/tests/mesh_modifiers/block_deleter/BlockDeleterTest5.i
- tutorials/darcy_thermo_mech/step09_mechanics/problems/step9.i
- test/tests/mesh_modifiers/block_deleter/BlockDeleterTest10.i
- test/tests/mesh_modifiers/block_deleter/BlockDeleterTest8.i
- test/tests/mesh_modifiers/break_boundary/break_bottom_interface_on_subdomain.i
- test/tests/mesh_modifiers/rename_block/rename2.i
- python/chigger/tests/input/mug_blocks.i
- test/tests/mesh_modifiers/block_deleter/BlockDeleterTest9.i
- test/tests/mesh_modifiers/modifier_depend_order/depend_with_force_prepare.i
- test/tests/mesh_modifiers/sidesets_around_subdomain/around_created_subdomain.i
- test/tests/mesh_modifiers/sidesets_between_subdomains/between_created_subdomain.i
- test/tests/mesh_modifiers/rename_block/except.i
- test/tests/mesh_modifiers/block_deleter/BlockDeleterTest11.i
- test/tests/mesh_modifiers/rename_block/rename1.i
- test/tests/mesh_modifiers/block_deleter/BlockDeleterTest6.i
- test/tests/mesh_modifiers/block_deleter/BlockDeleterTest12.i
- test/tests/mesh_modifiers/subdomain_bounding_box/subdomain_bounding_box_outside.i
- test/tests/mesh_modifiers/block_deleter/BlockDeleterTest3.i
- test/tests/mesh_modifiers/mesh_side_set/test.i
- test/tests/mesh_modifiers/block_deleter/BlockDeleterTest2.i
- test/tests/mesh_modifiers/break_boundary/break_boundary_on_subdomain.i
- test/tests/mesh_modifiers/block_deleter/BlockDeleterTest7.i
test/tests/mesh_modifiers/block_deleter/BlockDeleterTest1.i
# 2D, concave block
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 0
xmax = 4
ymin = 0
ymax = 4
[]
[MeshModifiers]
[./SubdomainBoundingBox]
type = SubdomainBoundingBox
block_id = 1
bottom_left = '0 0 0'
top_right = '3 3 3'
[../]
[./ed0]
type = BlockDeleter
block_id = 1
depends_on = SubdomainBoundingBox
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./dt]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./top]
type = DirichletBC
variable = u
boundary = bottom
value = 1
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 10
dt = 10
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
test/tests/mesh_modifiers/subdomain_bounding_box/subdomain_bounding_box_inside.i
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 1
uniform_refine = 2
[]
[MeshModifiers]
[./subdomains]
type = SubdomainBoundingBox
bottom_left = '0.1 0.1 0'
block_id = 1
top_right = '0.9 0.9 0'
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = MatCoefDiffusion
variable = u
conductivity = 'k'
block = '0 1'
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Materials]
[./outside]
type = GenericConstantMaterial
block = 0
prop_names = 'k'
prop_values = 1
[../]
[./inside]
type = GenericConstantMaterial
block = 1
prop_names = 'k'
prop_values = 0.1
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
python/chigger/tests/simple/mug_blocks.i
[Mesh]
type = FileMesh
file = mug.e
[]
[MeshModifiers]
[./subdomains]
type = SubdomainBoundingBox
top_right = '3 3 3'
bottom_left = '0 -3 -2.1'
block_id = '76'
[../]
[]
[Variables]
[./convected]
order = FIRST
family = LAGRANGE
[../]
[./diffused]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./aux_elem]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff_convected]
type = Diffusion
variable = convected
[../]
[./conv]
# Couple a variable into the convection kernel using local_name = simulationg_name syntax
type = Convection
variable = convected
velocity = '1 1 1'
[../]
[./diff_diffused]
type = Diffusion
variable = diffused
[../]
[./diff_t]
type = TimeDerivative
variable = diffused
[../]
[./conv_t]
type = TimeDerivative
variable = convected
block = '76'
[../]
[]
[BCs]
[./bottom_convected]
type = DirichletBC
variable = convected
boundary = bottom
value = 1
[../]
[./top_convected]
type = DirichletBC
variable = convected
boundary = top
value = 0
[../]
[./bottom_diffused]
type = DirichletBC
variable = diffused
boundary = bottom
value = 2
[../]
[./top_diffused]
type = DirichletBC
variable = diffused
boundary = top
value = 0
[../]
[]
[Postprocessors]
[./func_pp]
type = FunctionValuePostprocessor
function = 2*t
[../]
[]
[Executioner]
# Preconditioned JFNK (default)
type = Transient
num_steps = 20
solve_type = PJFNK
dt = 0.1
[]
[Outputs]
exodus = true
[]
[ICs]
[./aux_ic]
variable = aux_elem
max = 10
seed = 2
type = RandomIC
[../]
[]
tutorials/darcy_thermo_mech/step07_adaptivity/problems/step7d_adapt_blocks.i
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 4
xmax = 0.304 # Length of test chamber
ymax = 0.0257 # Test chamber radius
uniform_refine = 3
[]
[MeshModifiers]
[bottom]
type = SubdomainBoundingBox
location = inside
bottom_left = '0 0 0'
top_right = '0.304 0.01285 0'
block_id = 1
[]
[]
[Variables]
[pressure]
[]
[temperature]
initial_condition = 300 # Start at room temperature
[]
[]
[AuxVariables]
[velocity]
order = CONSTANT
family = MONOMIAL_VEC
[]
[]
[Kernels]
[darcy_pressure]
type = DarcyPressure
variable = pressure
[]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[heat_conduction_time_derivative]
type = ADHeatConductionTimeDerivative
variable = temperature
[]
[heat_convection]
type = DarcyAdvection
variable = temperature
pressure = pressure
[]
[]
[AuxKernels]
[velocity]
type = DarcyVelocity
variable = velocity
execute_on = timestep_end
pressure = pressure
[]
[]
[BCs]
[inlet]
type = DirichletBC
variable = pressure
boundary = left
value = 4000 # (Pa) From Figure 2 from paper. First data point for 1mm spheres.
[]
[outlet]
type = DirichletBC
variable = pressure
boundary = right
value = 0 # (Pa) Gives the correct pressure drop from Figure 2 for 1mm spheres
[]
[inlet_temperature]
type = FunctionDirichletBC
variable = temperature
boundary = left
function = 'if(t<0,350+50*t,350)'
[]
[outlet_temperature]
type = HeatConductionOutflow
variable = temperature
boundary = right
[]
[]
[Materials]
viscosity_file = data/water_viscosity.csv
density_file = data/water_density.csv
thermal_conductivity_file = data/water_thermal_conductivity.csv
specific_heat_file = data/water_specific_heat.csv
[column_bottom]
type = PackedColumn
block = 1
radius = 1.15
temperature = temperature
fluid_viscosity_file = ${viscosity_file}
fluid_density_file = ${density_file}
fluid_thermal_conductivity_file = ${thermal_conductivity_file}
fluid_specific_heat_file = ${specific_heat_file}
[]
[column_top]
type = PackedColumn
block = 0
radius = 1
temperature = temperature
porosity = '0.25952 + 0.7*x/0.304'
fluid_viscosity_file = ${viscosity_file}
fluid_density_file = ${density_file}
fluid_thermal_conductivity_file = ${thermal_conductivity_file}
fluid_specific_heat_file = ${specific_heat_file}
[]
[]
[Problem]
type = FEProblem
coord_type = RZ
rz_coord_axis = X
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = true
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
end_time = 100
dt = 0.25
start_time = -1
steady_state_tolerance = 1e-5
steady_state_detection = true
[TimeStepper]
type = FunctionDT
function = 'if(t<0,0.1,0.25)'
[]
[]
[Adaptivity]
marker = error_frac
max_h_level = 3
[Indicators]
[temperature_jump]
type = GradientJumpIndicator
variable = temperature
scale_by_flux_faces = true
[]
[]
[Markers]
[error_frac]
type = ErrorFractionMarker
coarsen = 0.025
indicator = temperature_jump
refine = 0.9
[]
[]
[]
[Outputs]
[out]
type = Exodus
output_material_properties = true
[]
[]
python/peacock/tests/common/simple_diffusion2.i
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[MeshModifiers]
[./new_block]
type = SubdomainBoundingBox
bottom_left = '0.25 0.25 0'
top_right = '0.75 0.75 0'
block_id = 1980
[../]
[]
[Variables]
[./not_u]
[../]
[]
[AuxVariables]
[./aux]
initial_condition = 1980
[../]
[./u]
initial_condition = 624
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = not_u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = not_u
boundary = left
value = 4
[../]
[./right]
type = DirichletBC
variable = not_u
boundary = right
value = 6
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
test/tests/mesh_modifiers/block_deleter/BlockDeleterTest4.i
# 3D, interior
[Mesh]
type = GeneratedMesh
dim = 3
nx = 4
ny = 4
nz = 1
xmin = 0
xmax = 4
ymin = 0
ymax = 4
zmin = 0
zmax = 1
[]
[MeshModifiers]
[./SubdomainBoundingBox]
type = SubdomainBoundingBox
block_id = 1
bottom_left = '1 1 0'
top_right = '3 3 1'
[../]
[./ed0]
type = BlockDeleter
block_id = 1
depends_on = SubdomainBoundingBox
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./dt]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./top]
type = DirichletBC
variable = u
boundary = bottom
value = 1
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 10
dt = 10
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
test/tests/mesh_modifiers/block_deleter/BlockDeleterTest5.i
# 2D, non-concave
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 0
xmax = 4
ymin = 0
ymax = 4
[]
[MeshModifiers]
[./SubdomainBoundingBox1]
type = SubdomainBoundingBox
block_id = 1
bottom_left = '0 0 0'
top_right = '1 2 1'
[../]
[./SubdomainBoundingBox2]
type = SubdomainBoundingBox
block_id = 1
bottom_left = '1 1 0'
top_right = '3 3 1'
[../]
[./ed0]
type = BlockDeleter
block_id = 1
depends_on = 'SubdomainBoundingBox1 SubdomainBoundingBox2'
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./dt]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./top]
type = DirichletBC
variable = u
boundary = bottom
value = 1
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 10
dt = 10
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
tutorials/darcy_thermo_mech/step09_mechanics/problems/step9.i
[GlobalParams]
displacements = 'disp_r disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 2
ny = 200
nx = 10
ymax = 0.304 # Length of test chamber
xmax = 0.0257 # Test chamber radius
[]
[MeshModifiers]
[bottom]
type = SubdomainBoundingBox
location = inside
bottom_left = '0 0 0'
top_right = '0.01285 0.304 0'
block_id = 1
[]
[]
[Variables]
[pressure]
[]
[temperature]
initial_condition = 300 # Start at room temperature
[]
[]
[AuxVariables]
[velocity]
order = CONSTANT
family = MONOMIAL_VEC
[]
[]
[Modules/TensorMechanics/Master]
[all]
# This block adds all of the proper Kernels, strain calculators, and Variables
# for TensorMechanics in the correct coordinate system (autodetected)
add_variables = true
strain = FINITE
eigenstrain_names = eigenstrain
use_automatic_differentiation = true
generate_output = 'vonmises_stress elastic_strain_xx elastic_strain_yy strain_xx strain_yy'
[]
[]
[Kernels]
[darcy_pressure]
type = DarcyPressure
variable = pressure
[]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[heat_conduction_time_derivative]
type = ADHeatConductionTimeDerivative
variable = temperature
[]
[heat_convection]
type = DarcyAdvection
variable = temperature
pressure = pressure
[]
[]
[AuxKernels]
[velocity]
type = DarcyVelocity
variable = velocity
execute_on = timestep_end
pressure = pressure
[]
[]
[BCs]
[inlet]
type = DirichletBC
variable = pressure
boundary = bottom
value = 4000 # (Pa) From Figure 2 from paper. First data point for 1mm spheres.
[]
[outlet]
type = DirichletBC
variable = pressure
boundary = top
value = 0 # (Pa) Gives the correct pressure drop from Figure 2 for 1mm spheres
[]
[inlet_temperature]
type = FunctionDirichletBC
variable = temperature
boundary = bottom
function = 'if(t<0,350+50*t,350)'
[]
[outlet_temperature]
type = HeatConductionOutflow
variable = temperature
boundary = top
[]
[hold_inlet]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0
[]
[hold_center]
type = DirichletBC
variable = disp_r
boundary = left
value = 0
[]
[hold_outside]
type = DirichletBC
variable = disp_r
boundary = right
value = 0
[]
[]
[Materials]
viscosity_file = data/water_viscosity.csv
density_file = data/water_density.csv
thermal_conductivity_file = data/water_thermal_conductivity.csv
specific_heat_file = data/water_specific_heat.csv
thermal_expansion_file = data/water_thermal_expansion.csv
[column_top]
type = PackedColumn
block = 0
temperature = temperature
radius = 1.15
fluid_viscosity_file = ${viscosity_file}
fluid_density_file = ${density_file}
fluid_thermal_conductivity_file = ${thermal_conductivity_file}
fluid_specific_heat_file = ${specific_heat_file}
fluid_thermal_expansion_file = ${thermal_expansion_file}
[]
[column_bottom]
type = PackedColumn
block = 1
temperature = temperature
radius = 1
fluid_viscosity_file = ${viscosity_file}
fluid_density_file = ${density_file}
fluid_thermal_conductivity_file = ${thermal_conductivity_file}
fluid_specific_heat_file = ${specific_heat_file}
fluid_thermal_expansion_file = ${thermal_expansion_file}
[]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 200e9 # (Pa) from wikipedia
poissons_ratio = .3 # from wikipedia
[]
[elastic_stress]
type = ADComputeFiniteStrainElasticStress
[]
[thermal_strain]
type = ADComputeThermalExpansionEigenstrain
stress_free_temperature = 300
eigenstrain_name = eigenstrain
temperature = temperature
thermal_expansion_coeff = 1e-5 # TM modules doesn't support material property, but it will
[]
[]
[Postprocessors]
[average_temperature]
type = ElementAverageValue
variable = temperature
[]
[]
[Problem]
type = FEProblem
coord_type = RZ
[]
[Executioner]
type = Transient
start_time = -1
end_time = 200
steady_state_tolerance = 1e-7
steady_state_detection = true
dt = 0.25
solve_type = PJFNK
automatic_scaling = true
compute_scaling_once = false
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
#petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
#petsc_options_value = 'hypre boomeramg 500'
line_search = none
[TimeStepper]
type = FunctionDT
function = 'if(t<0,0.1,0.25)'
[]
[]
[Outputs]
[out]
type = Exodus
elemental_as_nodal = true
[]
[]
test/tests/mesh_modifiers/block_deleter/BlockDeleterTest10.i
# 2D, removal of a block containing a sideset inside it
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
xmin = 0
xmax = 5
ymin = 0
ymax = 5
[]
[MeshModifiers]
[./left]
type = SubdomainBoundingBox
block_id = 1
bottom_left = '2 2 0'
top_right = '3 3 1'
[../]
[./right]
type = SubdomainBoundingBox
block_id = 2
bottom_left = '3 2 0'
top_right = '4 3 1'
[../]
[./interior_sideset]
type = SideSetsBetweenSubdomains
master_block = 1
paired_block = 2
depends_on = 'left right'
new_boundary = interior_ss
[../]
[./new_block_number]
type = SubdomainBoundingBox
block_id = 3
bottom_left = '0 0 0'
top_right = '4 4 1'
depends_on = 'interior_sideset'
[../]
[./ed0]
type = BlockDeleter
block_id = 3
depends_on = 'new_block_number'
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./dt]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./top]
type = DirichletBC
variable = u
boundary = bottom
value = 1
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 10
dt = 10
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
test/tests/mesh_modifiers/block_deleter/BlockDeleterTest8.i
# 2D, removal of a block containing a nodeset inside it
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
xmin = 0
xmax = 5
ymin = 0
ymax = 5
[]
[MeshModifiers]
[./SubdomainBoundingBox1]
type = SubdomainBoundingBox
block_id = 1
bottom_left = '0 0 0'
top_right = '4 4 1'
[../]
[./interior_nodeset]
type = BoundingBoxNodeSet
new_boundary = interior_ns
bottom_left = '2 2 0'
top_right = '3 3 1'
[../]
[./ed0]
type = BlockDeleter
block_id = 1
depends_on = 'SubdomainBoundingBox1 interior_nodeset'
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./dt]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./top]
type = DirichletBC
variable = u
boundary = bottom
value = 1
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 10
dt = 10
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
test/tests/mesh_modifiers/break_boundary/break_bottom_interface_on_subdomain.i
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
xmax = 2
ny = 2
ymax = 2
nz = 2
zmax = 2
[]
[MeshModifiers]
[./subdomain1]
type = SubdomainBoundingBox
bottom_left = '0 0 0'
top_right = '1 1 1'
block_id = 1
[../]
[./subdomain2]
type = SubdomainBoundingBox
bottom_left = '1 0 0'
top_right = '2 1 1'
block_id = 2
[../]
[./interface]
type = SideSetsBetweenSubdomains
depends_on = 'subdomain1 subdomain2'
master_block = '1 2'
paired_block = '0'
new_boundary = 'interface'
[../]
[./break_boundary]
depends_on = interface
type = BreakBoundaryOnSubdomain
boundaries = 'bottom interface'
[../]
[]
test/tests/mesh_modifiers/rename_block/rename2.i
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
# Mesh Modifiers
[MeshModifiers]
[./sbb1]
type = SubdomainBoundingBox
block_id = 1
bottom_left = '-1 -1 -1'
top_right = '0 0 0'
[../]
[./sbb2]
type = SubdomainBoundingBox
block_id = 2
bottom_left = '0 -1 -1'
top_right = '1 0 0'
[../]
[./sbb3]
type = SubdomainBoundingBox
block_id = 3
bottom_left = '-1 0 -1'
top_right = '0 1 0'
[../]
[./sbb4]
type = SubdomainBoundingBox
block_id = 4
bottom_left = '0 0 -1'
top_right = '1 1 0'
[../]
[./sbb5]
type = SubdomainBoundingBox
block_id = 5
bottom_left = '-1 -1 0'
top_right = '0 0 1'
[../]
[./sbb6]
type = SubdomainBoundingBox
block_id = 6
bottom_left = '0 -1 0'
top_right = '1 0 1'
[../]
[./sbb7]
type = SubdomainBoundingBox
block_id = 7
bottom_left = '-1 0 0'
top_right = '0 1 1'
[../]
[./sbb8]
type = SubdomainBoundingBox
block_id = 8
bottom_left = '0 0 0'
top_right = '1 1 1'
[../]
[./re0]
type = RenameBlock
old_block_id = '12345 1 2 3 4'
new_block_name = 'nill one two three four'
depends_on = 'sbb1 sbb2 sbb3 sbb4 sbb5 sbb6 sbb7 sbb8'
[../]
[./re1]
type = RenameBlock
old_block_id = '12345 1 2'
new_block_name = 'nill one_and_two one_and_two'
depends_on = re0
[../]
[./does_nothing_there_is_no_block_2_now]
type = RenameBlock
old_block_id = 2
new_block_id = 9
depends_on = re1
[../]
[./re2]
type = RenameBlock
old_block_id = '1 2 3 4 5 8'
new_block_id = '1 12345 4 4 4 7' # note this makes block_id=4 have name "three", since the first occurance of new_block_id=4 has name "three"
depends_on = does_nothing_there_is_no_block_2_now
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = u
boundary = bottom
value = 0
[../]
[./top]
type = DirichletBC
variable = u
boundary = top
value = 0
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
python/chigger/tests/input/mug_blocks.i
[Mesh]
type = FileMesh
file = mug.e
[]
[MeshModifiers]
[./subdomains]
type = SubdomainBoundingBox
top_right = '3 3 3'
bottom_left = '0 -3 -2.1'
block_id = '76'
[../]
[]
[Variables]
[./convected]
order = FIRST
family = LAGRANGE
[../]
[./diffused]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./aux_elem]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff_convected]
type = Diffusion
variable = convected
[../]
[./conv]
# Couple a variable into the convection kernel using local_name = simulationg_name syntax
type = Convection
variable = convected
velocity = '1 1 1'
[../]
[./diff_diffused]
type = Diffusion
variable = diffused
[../]
[./diff_t]
type = TimeDerivative
variable = diffused
[../]
[./conv_t]
type = TimeDerivative
variable = convected
block = '76'
[../]
[]
[BCs]
[./bottom_convected]
type = DirichletBC
variable = convected
boundary = bottom
value = 1
[../]
[./top_convected]
type = DirichletBC
variable = convected
boundary = top
value = 0
[../]
[./bottom_diffused]
type = DirichletBC
variable = diffused
boundary = bottom
value = 2
[../]
[./top_diffused]
type = DirichletBC
variable = diffused
boundary = top
value = 0
[../]
[]
[Postprocessors]
[./func_pp]
type = FunctionValuePostprocessor
function = 2*t
[../]
[]
[Executioner]
# Preconditioned JFNK (default)
type = Transient
num_steps = 20
solve_type = PJFNK
dt = 0.1
[]
[Outputs]
exodus = true
[]
[ICs]
[./aux_ic]
variable = aux_elem
max = 10
seed = 2
type = RandomIC
[../]
[]
test/tests/mesh_modifiers/block_deleter/BlockDeleterTest9.i
# 2D, removal of a block which should also completely remove a sideset
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 0
xmax = 4
ymin = 0
ymax = 4
[]
[MeshModifiers]
[./SubdomainBoundingBox1]
type = SubdomainBoundingBox
block_id = 1
bottom_left = '0 0 0'
top_right = '3 4 1'
[../]
[./ed0]
type = BlockDeleter
block_id = 1
depends_on = 'SubdomainBoundingBox1'
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./dt]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./top]
type = DirichletBC
variable = u
boundary = bottom
value = 1
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 10
dt = 10
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
test/tests/mesh_modifiers/modifier_depend_order/depend_with_force_prepare.i
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 1
nz = 10
xmin = -1000
xmax = 1000
ymin = -1
ymax = 1
zmin = -400
zmax = 0
[]
[MeshModifiers]
[./add_subdomain]
type = SubdomainBoundingBox
block_id = 1
bottom_left = '-200 -1 -400'
top_right = '200 1 0'
force_prepare = true
[../]
[./add_sidesets_between]
type = SideSetsBetweenSubdomains
master_block = 1
paired_block = 0
depends_on = add_subdomain
new_boundary = 10
[../]
[./add_sidesets_around]
type = SideSetsAroundSubdomain
block = 1
depends_on = add_subdomain
new_boundary = 11
[../]
[]
test/tests/mesh_modifiers/sidesets_around_subdomain/around_created_subdomain.i
[Mesh]
type = GeneratedMesh
dim = 3
xmax = 3
ymax = 3
zmax = 3
nx = 3
ny = 3
nz = 3
[]
[MeshModifiers]
[./central_block]
type = SubdomainBoundingBox
block_id = 2
bottom_left = '1 1 1'
top_right = '2 2 2'
[../]
[./central_boundary]
type = SideSetsAroundSubdomain
depends_on = central_block
block = 2
new_boundary = 7
[../]
[]
# This input file is intended to be run with the "--mesh-only" option so
# no other sections are required
test/tests/mesh_modifiers/sidesets_between_subdomains/between_created_subdomain.i
[Mesh]
type = GeneratedMesh
dim = 3
xmax = 3
ymax = 3
zmax = 3
nx = 3
ny = 3
nz = 3
[]
[MeshModifiers]
[./central_block]
type = SubdomainBoundingBox
block_id = 2
bottom_left = '1 1 1'
top_right = '2 2 2'
[../]
[./central_boundary]
type = SideSetsBetweenSubdomains
depends_on = central_block
master_block = 2
paired_block = 0
new_boundary = 7
[../]
[]
# This input file is intended to be run with the "--mesh-only" option so
# no other sections are required
test/tests/mesh_modifiers/rename_block/except.i
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
# Mesh Modifiers
[MeshModifiers]
active = 'sbb0'
[./sbb0]
type = SubdomainBoundingBox
block_id = 1
bottom_left = '-1 -1 -1'
top_right = '0 0 0'
[../]
[./too_many_new_id]
type = RenameBlock
old_block_id = '0'
new_block_id = '2 3'
depends_on = sbb0
[../]
[./old_id_and_name]
type = RenameBlock
old_block_id = '0 1'
old_block_name = 'zero one'
new_block_id = '2 3'
depends_on = sbb0
[../]
[./no_old_id]
type = RenameBlock
new_block_id = '2 3'
depends_on = sbb0
[../]
[./too_many_old]
type = RenameBlock
old_block_id = '1 2 3'
new_block_name = 'two three'
depends_on = sbb0
[../]
[./new_id_and_name]
type = RenameBlock
old_block_id = '1 2 3'
new_block_id = '5 6 7'
new_block_name = 'five six seven'
depends_on = sbb0
[../]
[./no_new]
type = RenameBlock
old_block_id = '1 2 3'
depends_on = sbb0
[../]
[]
[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/mesh_modifiers/block_deleter/BlockDeleterTest11.i
# tet elements
[Mesh]
type = FileMesh
file = pyramid.e
[]
[MeshModifiers]
[./sbb2]
type = SubdomainBoundingBox
block_id = 2
bottom_left = '-0.5 -0.5 -0.5'
top_right = '0.5 0.5 0.5'
[../]
[./swiss_cheese2]
type = BlockDeleter
block_id = 2
depends_on = 'sbb2'
[../]
[./sbb3]
type = SubdomainBoundingBox
block_id = 3
bottom_left = '-5 -5 -3'
top_right = '-2 -2 -1'
[../]
[./swiss_cheese3]
type = BlockDeleter
block_id = 3
depends_on = 'sbb3'
[../]
[./sbb4]
type = SubdomainBoundingBox
block_id = 4
bottom_left = '-1 2 -2'
top_right = '1 5 0'
[../]
[./swiss_cheese4]
type = BlockDeleter
block_id = 4
depends_on = 'sbb4'
[../]
[./sbb5]
type = OrientedSubdomainBoundingBox
block_id = 5
center = '2.4 -1.4 0.4'
height = 3
length = 8
length_direction = '-2 1 -1'
width = 3
width_direction = '1 2 0'
[../]
[./swiss_cheese5]
type = BlockDeleter
block_id = 5
depends_on = 'sbb5'
[../]
[./sbb6]
type = OrientedSubdomainBoundingBox
block_id = 6
center = '-1 0.4 2.2'
height = 1
length = 8
length_direction = '2 -1 -1'
width = 1
width_direction = '1 2 0'
[../]
[./swiss_cheese6]
type = BlockDeleter
block_id = 6
depends_on = 'sbb6'
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./dt]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./top]
type = DirichletBC
variable = u
boundary = top
value = 1
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 100
dt = 100
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
test/tests/mesh_modifiers/rename_block/rename1.i
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
# Mesh Modifiers
[MeshModifiers]
[./sbb0]
type = SubdomainBoundingBox
block_id = 1
bottom_left = '-1 -1 -1'
top_right = '0 0 0'
[../]
[./re_id]
type = RenameBlock
old_block_id = '0 1'
new_block_id = '2 3'
depends_on = sbb0
[../]
[./rename_no_effect]
type = RenameBlock
old_block_id = '5 0 1'
new_block_name = 'five zero one'
depends_on = re_id
[../]
[./rename]
type = RenameBlock
old_block_id = '2'
new_block_name = 'two_was_zero'
depends_on = rename_no_effect
[../]
[./rename_block2]
type = RenameBlock
old_block_name = 'two_was_zero'
new_block_name = 'simply_two'
depends_on = rename
[../]
[./rename_blockID_3]
type = RenameBlock
old_block_id = '3'
new_block_name = 'three'
depends_on = rename_block2
[../]
[./three_to_4]
type = RenameBlock
old_block_name = 'three'
new_block_id = 4
depends_on = rename_blockID_3
[../]
[./another_no_effect]
type = RenameBlock
old_block_id = 3
new_block_name = 'there_is_no_block_id_3_now'
depends_on = three_to_4
[../]
[./should_not_do_anything]
type = RenameBlock
old_block_name = 'five'
new_block_id = '4'
depends_on = another_no_effect
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = u
boundary = bottom
value = 0
[../]
[./top]
type = DirichletBC
variable = u
boundary = top
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/mesh_modifiers/block_deleter/BlockDeleterTest6.i
# 3D, non-concave
[Mesh]
type = GeneratedMesh
dim = 3
nx = 4
ny = 4
nz = 2
xmin = 0
xmax = 4
ymin = 0
ymax = 4
zmin = 0
zmax = 2
[]
[MeshModifiers]
[./SubdomainBoundingBox1]
type = SubdomainBoundingBox
block_id = 1
bottom_left = '0 0 0'
top_right = '1 2 1'
[../]
[./SubdomainBoundingBox2]
type = SubdomainBoundingBox
block_id = 1
bottom_left = '1 1 0'
top_right = '3 3 1'
[../]
[./SubdomainBoundingBox3]
type = SubdomainBoundingBox
block_id = 1
bottom_left = '2 2 1'
top_right = '3 3 2'
[../]
[./ed0]
type = BlockDeleter
block_id = 1
depends_on = 'SubdomainBoundingBox1 SubdomainBoundingBox2 SubdomainBoundingBox3'
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./dt]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./top]
type = DirichletBC
variable = u
boundary = bottom
value = 1
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 10
dt = 10
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
test/tests/mesh_modifiers/block_deleter/BlockDeleterTest12.i
# 2D, concave block
[Mesh]
type = GeneratedMesh
dim = 2
nx = 8
ny = 8
xmin = 0
xmax = 4
ymin = 0
ymax = 4
[]
[MeshModifiers]
[./mark]
type = SubdomainBoundingBox
block_id = 1
bottom_left = '0.9 0.9 0'
top_right = '3.1 3.1 0'
[../]
[./delete]
type = BlockDeleter
block_id = 1
depends_on = mark
new_boundary = cut_surface
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./dt]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./outer]
type = DirichletBC
variable = u
boundary = 'top bottom left right'
value = 1
[../]
[./inner]
type = DirichletBC
variable = u
boundary = cut_surface
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
exodus = true
[]
test/tests/mesh_modifiers/subdomain_bounding_box/subdomain_bounding_box_outside.i
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 1
uniform_refine = 2
[]
[MeshModifiers]
[./subdomains]
type = SubdomainBoundingBox
bottom_left = '0.1 0.1 0'
block_id = 1
top_right = '0.9 0.9 0'
location = OUTSIDE
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = MatCoefDiffusion
variable = u
conductivity = 'k'
block = '0 1'
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Materials]
[./outside]
type = GenericConstantMaterial
block = 0
prop_names = 'k'
prop_values = 1
[../]
[./inside]
type = GenericConstantMaterial
block = 1
prop_names = 'k'
prop_values = 0.1
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
test/tests/mesh_modifiers/block_deleter/BlockDeleterTest3.i
# 2D, interior
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 0
xmax = 4
ymin = 0
ymax = 4
[]
[MeshModifiers]
[./SubdomainBoundingBox]
type = SubdomainBoundingBox
block_id = 1
bottom_left = '1 1 0'
top_right = '3 3 1'
[../]
[./ed0]
type = BlockDeleter
block_id = 1
depends_on = SubdomainBoundingBox
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./dt]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./top]
type = DirichletBC
variable = u
boundary = bottom
value = 1
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 10
dt = 10
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
test/tests/mesh_modifiers/mesh_side_set/test.i
[Mesh]
type = GeneratedMesh
dim = 3
nx = 4
ny = 4
nz = 4
elem_type = TET4
[]
[MeshModifiers]
[./left_block]
type = SubdomainBoundingBox
block_id = 1
block_name = left_block
bottom_left = '0 0 0'
top_right = '0.5 1 1'
[../]
[./right_block]
type = SubdomainBoundingBox
block_id = 2
block_name = right_block
bottom_left = '0.5 0 0'
top_right = '1 1 1'
[../]
[./center_side_set]
type = SideSetsBetweenSubdomains
master_block = left_block
paired_block = right_block
new_boundary = center_side_set
depends_on = 'left_block right_block'
[../]
[./center_mesh]
type = MeshSideSet
boundaries = center_side_set
block_id = 10
block_name = center_mesh
depends_on = 'center_side_set'
[../]
[]
[Variables]
[./c_volume]
[./InitialCondition]
type = FunctionIC
function = '1-(x-0.5)^2+(y-0.5)^2+(z-0.5)^2'
[../]
[../]
[./c_plane]
block = 'center_mesh'
[../]
[]
[Kernels]
[./volume_diff]
type = Diffusion
variable = c_volume
block = 'left_block right_block'
[../]
[./volume_dt]
type = TimeDerivative
variable = c_volume
block = 'left_block right_block'
[../]
# couple the lower dimensional variable to the volume variable
[./plane_reaction]
type = Reaction
variable = c_plane
block = 'center_mesh'
[../]
[./plane_coupled]
type = CoupledForce
variable = c_plane
v = c_volume
block = 'center_mesh'
[../]
[]
[Executioner]
type = Transient
dt = 0.01
num_steps = 2
[]
[Outputs]
exodus = true
[]
test/tests/mesh_modifiers/block_deleter/BlockDeleterTest2.i
# 3D, concave block
[Mesh]
type = GeneratedMesh
dim = 3
nx = 4
ny = 4
nz = 1
xmin = 0
xmax = 4
ymin = 0
ymax = 4
zmin = 0
zmax = 1
[]
[MeshModifiers]
[./SubdomainBoundingBox]
type = SubdomainBoundingBox
block_id = 1
bottom_left = '0 0 0'
top_right = '3 3 1'
[../]
[./ed0]
type = BlockDeleter
block_id = 1
depends_on = SubdomainBoundingBox
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./dt]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./top]
type = DirichletBC
variable = u
boundary = bottom
value = 1
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 10
dt = 10
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
test/tests/mesh_modifiers/break_boundary/break_boundary_on_subdomain.i
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
xmax = 2
ny = 2
ymax = 2
nz = 2
zmax = 2
[]
[MeshModifiers]
[./subdomain1]
type = SubdomainBoundingBox
bottom_left = '0 0 0'
top_right = '1 1 1'
block_id = 1
[../]
[./subdomain2]
type = SubdomainBoundingBox
bottom_left = '1 0 0'
top_right = '2 1 1'
block_id = 2
[../]
[./interface]
type = SideSetsBetweenSubdomains
depends_on = 'subdomain1 subdomain2'
master_block = '1 2'
paired_block = '0'
new_boundary = 'interface'
[../]
[./break_boundary]
depends_on = interface
type = BreakBoundaryOnSubdomain
[../]
[]
test/tests/mesh_modifiers/block_deleter/BlockDeleterTest7.i
# 2D, removal of a union of disjoint pieces
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 0
xmax = 4
ymin = 0
ymax = 4
[]
[MeshModifiers]
[./SubdomainBoundingBox1]
type = SubdomainBoundingBox
block_id = 1
bottom_left = '0 0 0'
top_right = '1 1 1'
[../]
[./SubdomainBoundingBox2]
type = SubdomainBoundingBox
block_id = 1
bottom_left = '2 2 0'
top_right = '3 3 1'
[../]
[./ed0]
type = BlockDeleter
block_id = 1
depends_on = 'SubdomainBoundingBox1 SubdomainBoundingBox2'
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./dt]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./top]
type = DirichletBC
variable = u
boundary = bottom
value = 1
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 10
dt = 10
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]