- inputThe mesh we want to modify
C++ Type:MeshGeneratorName
Controllable:No
Description:The mesh we want to modify
BlockDeletionGenerator
Mesh generator which removes elements from the specified subdomains
Overview
The BlockDeletionGenerator
is used to remove elements from a mesh matching a user provided subdomain ID. While most mesh generation operations should be based on geometric operations, it is sometimes easier to remove discretized elements, by blocks, for certain problems.
For example, if we have a mesh that models both a pipe and its interior, but we only want to model the fluid flow, we may delete the subdomain associated with the pipe.
Once a block is deleted from the mesh, it should not be referred to in the input. Variables and materials can no longer be block restricted to a deleted block, for example.
Lower-dimensional elements created from the deleted elements will also be removed.
Example input syntax
In this example input file, we remove blocks 1 and 3 with a single BlockDeletionGenerator
. This leaves only block 2 in the simulation.
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '4 2 3'
dy = '1 2'
ix = '10 10 10'
iy = '8 8'
subdomain_id = '1 2 3
2 2 2'
[]
[ed0]
type = BlockDeletionGenerator
input = cmg
block = '1 3'
[]
[]
Input Parameters
- blockThe list of blocks to be deleted
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:The list of blocks to be deleted
- delete_exteriorsTrueWhether to delete lower-d elements whose interior parents are deleted
Default:True
C++ Type:bool
Controllable:No
Description:Whether to delete lower-d elements whose interior parents are deleted
- new_boundaryoptional boundary name to assign to the cut surface
C++ Type:BoundaryName
Controllable:No
Description:optional boundary name to assign to the cut surface
Optional Parameters
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:No
Description:Set the enabled status of the MooseObject.
- save_with_nameKeep the mesh from this mesh generator in memory with the name specified
C++ Type:std::string
Controllable:No
Description:Keep the mesh from this mesh generator in memory with the name specified
Advanced Parameters
- nemesisFalseWhether or not to output the mesh file in the nemesisformat (only if output = true)
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to output the mesh file in the nemesisformat (only if output = true)
- outputFalseWhether or not to output the mesh file after generating the mesh
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to output the mesh file after generating the mesh
- show_infoFalseWhether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)
Debugging Parameters
Input Files
- (modules/heat_transfer/test/tests/postprocessors/ad_convective_ht_side_integral.i)
- (test/tests/auxkernels/projection_aux/2d_and_lower_d.i)
- (modules/electromagnetics/test/tests/interfacekernels/electrostatic_contact/contact_conductance_calculated.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_rz_cylinder.i)
- (modules/solid_mechanics/examples/coal_mining/cosserat_mc_wp.i)
- (test/tests/meshgenerators/block_deletion_generator/preserve_exteriors.i)
- (modules/solid_mechanics/test/tests/notched_plastic_block/biaxial_smooth.i)
- (modules/heat_transfer/test/tests/radiative_bcs/radiative_bc_cyl.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_balance/large_gap_heat_transfer_test_cylinder.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/cht/flow-around-square-linear-fluidonly-physics.i)
- (test/tests/meshgenerators/block_deletion_generator/block_deletion_test9.i)
- (modules/solid_mechanics/examples/coal_mining/cosserat_mc_only.i)
- (modules/reactor/test/tests/meshgenerators/reporting_id/hexagonal_id/core_reporting_id_exclude.i)
- (test/tests/meshgenerators/block_deletion_generator/block_deletion_test8.i)
- (test/tests/meshgenerators/block_deletion_generator/block_deletion_test7.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder_mortar_error.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder_mortar.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/pump/pump_loop_negative_rotation.i)
- (modules/optimization/test/tests/executioners/constrained/shape_optimization/forward.i)
- (modules/solid_mechanics/examples/coal_mining/cosserat_elastic.i)
- (modules/navier_stokes/examples/flow-over-circle/mesh.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/shock_tube_2D_cavity/hllc_sod_shocktube_2D.i)
- (test/tests/meshgenerators/block_deletion_generator/delete_interior_parents.i)
- (tutorials/tutorial04_meshing/app/test/tests/reactor_examples/hpmr/hpmr.i)
- (modules/navier_stokes/test/tests/finite_volume/materials/flow_diode/transient_operation.i)
- (modules/solid_mechanics/test/tests/notched_plastic_block/biaxial_planar.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/cht/flow-around-square-linear-fluidonly.i)
- (modules/heat_transfer/test/tests/postprocessors/convective_ht_side_integral.i)
- (modules/solid_mechanics/examples/coal_mining/cosserat_wp_only.i)
- (test/tests/meshgenerators/block_deletion_generator/block_deletion_test12.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/pump/pump_and_counterpump_loop.i)
- (modules/subchannel/examples/duct/wrapper.i)
- (modules/reactor/test/tests/meshgenerators/reporting_id/cartesian_id/core_zigzag_reporting_id.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d-heated/solid.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_rz_cylinder_mortar.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/natural_convection/natural_circulation_dogleg.i)
- (test/tests/meshgenerators/block_deletion_generator/block_deletion_test14.i)
- (test/tests/meshgenerators/block_deletion_generator/block_deletion_test10.i)
- (tutorials/tutorial04_meshing/app/test/tests/adv_examples/pcg_xyd.i)
- (test/tests/meshgenerators/block_deletion_generator/block_deletion_test1.i)
- (modules/solid_mechanics/test/tests/notched_plastic_block/cmc_planar.i)
- (modules/heat_transfer/test/tests/radiative_bcs/ad_radiative_bc_cyl.i)
- (modules/solid_mechanics/test/tests/notched_plastic_block/biaxial_abbo.i)
- (test/tests/meshgenerators/block_deletion_generator/block_deletion_test11.i)
- (modules/contact/test/tests/bouncing-block-contact/frictional-nodal-min-normal-lm-mortar-pdass-tangential-lm-mortar-action.i)
- (test/tests/meshgenerators/block_deletion_generator/block_deletion_test6.i)
- (modules/combined/examples/stochastic/thermomech/graphite_ring_thermomechanics.i)
- (test/tests/meshgenerators/block_deletion_generator/block_deletion_not_prepared.i)
- (test/tests/transfers/general_field/nearest_node/nearest_position/sub_holes.i)
- (test/tests/meshgenerators/block_deletion_generator/block_deletion_test2.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/pump/pump_as_volume_force_loop_pressure_corrected.i)
- (test/tests/meshgenerators/block_deletion_generator/block_deletion_test3.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_balance/large_gap_heat_transfer_test_rz_cylinder.i)
- (test/tests/meshgenerators/block_deletion_generator/block_deletion_test4.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/pump/pump_loop.i)
- (modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-fretting-wear-test-action.i)
- (test/tests/meshgenerators/rename_boundary_generator/name_and_id.i)
- (modules/contact/test/tests/bouncing-block-contact/frictionless-penalty-weighted-gap-action.i)
- (tutorials/tutorial04_meshing/app/test/tests/adv_examples/quarter_circle_connect.i)
- (test/tests/meshgenerators/cyclic/cyclic.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/turbulence/bfs/BFS_ERCOFTAC.i)
- (modules/solid_mechanics/test/tests/notched_plastic_block/cmc_smooth.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/pump/pump_as_volume_force_loop_force_corrected.i)
- (tutorials/tutorial04_meshing/app/test/tests/reactor_examples/abtr/abtr.i)
- (test/tests/meshgenerators/block_deletion_generator/block_deletion_test5.i)
- (modules/electromagnetics/test/tests/interfacekernels/electrostatic_contact/contact_conductance_supplied.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder.i)
- (test/tests/meshgenerators/block_deletion_generator/block_deletion_test13.i)
- (modules/contact/test/tests/bouncing-block-contact/variational-frictional-action.i)
(test/tests/meshgenerators/block_deletion_generator/block_deletion_test14.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '4 2 3'
dy = '1 2'
ix = '10 10 10'
iy = '8 8'
subdomain_id = '1 2 3
2 2 2'
[]
[ed0]
type = BlockDeletionGenerator
input = cmg
block = '1 3'
[]
[]
[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
[]
(modules/heat_transfer/test/tests/postprocessors/ad_convective_ht_side_integral.i)
[Mesh]
[./cartesian]
type = CartesianMeshGenerator
dim = 2
dx = '0.45 0.1 0.45'
ix = '5 1 5'
dy = '0.45 0.1 0.45'
iy = '5 1 5'
subdomain_id = '1 1 1
1 2 1
1 1 1'
[../]
[./add_iss_1]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = 'interface'
input = cartesian
[../]
[./block_deleter]
type = BlockDeletionGenerator
block = 2
input = add_iss_1
[../]
[]
[Variables]
[./temperature]
initial_condition = 300
[../]
[]
[AuxVariables]
[./channel_T]
family = MONOMIAL
order = CONSTANT
initial_condition = 400
[../]
[./channel_Hw]
family = MONOMIAL
order = CONSTANT
initial_condition = 1000
[../]
[]
[Kernels]
[./graphite_diffusion]
type = ADHeatConduction
variable = temperature
thermal_conductivity = 'thermal_conductivity'
[../]
[]
[BCs]
## boundary conditions for the thm channels in the reflector
[./channel_heat_transfer]
type = CoupledConvectiveHeatFluxBC
variable = temperature
htc = channel_Hw
T_infinity = channel_T
boundary = 'interface'
[../]
# hot boundary on the left
[./left]
type = DirichletBC
variable = temperature
value = 1000
boundary = 'left'
[../]
# cool boundary on the right
[./right]
type = DirichletBC
variable = temperature
value = 300
boundary = 'right'
[../]
[]
[Materials]
[./pronghorn_solid_material]
type = ADHeatConductionMaterial
temp = temperature
thermal_conductivity = 25
specific_heat = 1000
[../]
[./htc_material]
type = ADGenericConstantMaterial
prop_names = 'alpha_wall'
prop_values = '1000'
[../]
[./tfluid_mat]
type = ADPiecewiseLinearInterpolationMaterial
property = tfluid_mat
variable = channel_T
x = '400 500'
y = '400 500'
[../]
[]
[Postprocessors]
[./Qw1]
type = ADConvectiveHeatTransferSideIntegral
T_fluid_var = channel_T
htc_var = channel_Hw
T_solid = temperature
boundary = interface
[../]
[./Qw2]
type = ADConvectiveHeatTransferSideIntegral
T_fluid_var = channel_T
htc = alpha_wall
T_solid = temperature
boundary = interface
[../]
[./Qw3]
type = ADConvectiveHeatTransferSideIntegral
T_fluid = tfluid_mat
htc = alpha_wall
T_solid = temperature
boundary = interface
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/auxkernels/projection_aux/2d_and_lower_d.i)
[Mesh]
[cube]
type = FileMeshGenerator
file = 'mesh/cube.e'
[]
[remove_low_low_D]
type = BlockDeletionGenerator
input = cube
block = 2
[]
second_order = true
allow_renumbering = false
[]
[AuxVariables]
[u_elem]
[InitialCondition]
type = FunctionIC
function = 'x + y * x'
[]
family = MONOMIAL
order = CONSTANT
[]
[u_nodal]
[InitialCondition]
type = FunctionIC
function = 'x + y * x'
[]
[]
[v_high]
order = SECOND
[]
[v_low]
block = 0
[]
[]
[AuxKernels]
[node_to_node_higher_order]
type = ProjectionAux
variable = v_high
v = u_nodal
execute_on = 'INITIAL TIMESTEP_END'
# block restrict the lower D blocks 1 & 2 away
block = 0
[]
[elem_to_nodal]
type = ProjectionAux
variable = v_low
v = u_elem
execute_on = 'INITIAL TIMESTEP_END'
# block restrict the lower D blocks 1 & 2 away
block = 0
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
csv = true
exodus = true
show = 'v_high v_low'
[]
(modules/electromagnetics/test/tests/interfacekernels/electrostatic_contact/contact_conductance_calculated.i)
[Mesh]
[box]
type = CartesianMeshGenerator
dim = 2
dx = '0.5 0.5'
dy = '0.25 0.5 0.25'
ix = '20 20'
iy = '10 20 10'
subdomain_id = '1 1
2 3
1 1'
[]
[rename_subdomains]
type = RenameBlockGenerator
input = box
old_block = '1 2'
new_block = 'stainless_steel graphite'
[]
[create_interface]
type = SideSetsBetweenSubdomainsGenerator
input = rename_subdomains
primary_block = stainless_steel
paired_block = graphite
new_boundary = 'ssg_interface'
[]
[delete_block]
type = BlockDeletionGenerator
input = create_interface
block = 3
[]
[]
[Problem]
coord_type = RZ
[]
[Variables]
[potential_graphite]
block = graphite
[]
[potential_stainless_steel]
block = stainless_steel
[]
[]
[Kernels]
[electric_graphite]
type = ADMatDiffusion
variable = potential_graphite
diffusivity = electrical_conductivity
block = graphite
[]
[electric_stainless_steel]
type = ADMatDiffusion
variable = potential_stainless_steel
diffusivity = electrical_conductivity
block = stainless_steel
[]
[]
[BCs]
[elec_top]
type = DirichletBC
variable = potential_stainless_steel
boundary = top
value = 1
[]
[elec_bottom]
type = DirichletBC
variable = potential_stainless_steel
boundary = bottom
value = 0
[]
[]
[InterfaceKernels]
[electrostatic_contact]
type = ElectrostaticContactCondition
variable = potential_stainless_steel
neighbor_var = potential_graphite
boundary = ssg_interface
primary_conductivity = electrical_conductivity
secondary_conductivity = electrical_conductivity
mean_hardness = mean_hardness
mechanical_pressure = 8.52842e10 # resulting contact conductance should be ~1.47e5 as described in Cincotti et al (https://doi.org/10.1002/aic.11102)
[]
[]
[Materials]
#graphite
[sigma_graphite]
type = ADGenericConstantMaterial
prop_names = 'electrical_conductivity'
prop_values = 3.33e2
block = graphite
[]
#stainless_steel
[sigma_stainless_steel]
type = ADGenericConstantMaterial
prop_names = 'electrical_conductivity'
prop_values = 1.429e6
block = stainless_steel
[]
#mean hardness
[harmonic_mean_hardness]
type = ADGenericConstantMaterial
prop_names = 'mean_hardness'
prop_values = 2.4797e9
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_rel_tol = 1e-09
petsc_options_iname = '-pc_type -ksp_grmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 101 preonly ilu 1'
automatic_scaling = true
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_rz_cylinder.i)
rpv_core_gap_size = 0.2
core_outer_radius = 2
rpv_inner_radius = '${fparse 2 + rpv_core_gap_size}'
rpv_outer_radius = '${fparse 2.5 + rpv_core_gap_size}'
rpv_width = '${fparse rpv_outer_radius - rpv_inner_radius}'
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
[gmg]
type = CartesianMeshGenerator
dim = 2
dx = '${core_outer_radius} ${rpv_core_gap_size} ${rpv_width}'
ix = '400 1 100'
dy = 1
iy = '5'
[]
[set_block_id1]
type = SubdomainBoundingBoxGenerator
input = gmg
bottom_left = '0 0 0'
top_right = '${core_outer_radius} 1 0'
block_id = 1
location = INSIDE
[]
[rename_core_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = set_block_id1
primary_block = 1
paired_block = 0
new_boundary = 'core_outer'
[]
[set_block_id3]
type = SubdomainBoundingBoxGenerator
input = rename_core_bdy
bottom_left = '${rpv_inner_radius} 0 0'
top_right = '${rpv_outer_radius} 1 0'
block_id = 3
location = INSIDE
[]
[rename_inner_rpv_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = set_block_id3
primary_block = 3
paired_block = 0
new_boundary = 'rpv_inner'
[]
# comment out for test without gap
[2d_mesh]
type = BlockDeletionGenerator
input = rename_inner_rpv_bdy
block = 0
[]
allow_renumbering = false
[]
[Problem]
coord_type = RZ
[]
[Variables]
[Tsolid]
initial_condition = 500
[]
[]
[Kernels]
[heat_source]
type = CoupledForce
variable = Tsolid
block = '${core_blocks}'
v = power_density
[]
[heat_conduction]
type = HeatConduction
variable = Tsolid
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = Tsolid
boundary = 'right' # outer RPV
coefficient = ${rpv_outer_htc}
T_infinity = ${rpv_outer_Tinf}
[]
[]
[ThermalContact]
[RPV_gap]
type = GapHeatTransfer
gap_geometry_type = 'CYLINDER'
emissivity_primary = 0.8
emissivity_secondary = 0.8
variable = Tsolid
primary = 'core_outer'
secondary = 'rpv_inner'
gap_conductivity = 0.1
quadrature = true
[]
[]
[AuxVariables]
[power_density]
block = '${core_blocks}'
initial_condition = 50e3
[]
[]
[Materials]
[simple_mat]
type = HeatConductionMaterial
thermal_conductivity = 34.6 # W/m/K
[]
[]
[Postprocessors]
[Tcore_avg]
type = ElementAverageValue
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${core_blocks}'
[]
[Trpv_avg]
type = ElementAverageValue
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${rpv_blocks}'
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = '${core_blocks}'
[]
[rpv_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = Tsolid
boundary = 'right' # outer RVP
T_fluid = ${rpv_outer_Tinf}
htc = ${rpv_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
expression = '(rpv_convective_out - ptot) / ptot'
pp_names = 'rpv_convective_out ptot'
[]
[flux_from_core] # converges to ptot as the mesh is refined
type = SideDiffusiveFluxIntegral
variable = Tsolid
boundary = core_outer
diffusivity = thermal_conductivity
[]
[flux_into_rpv] # converges to rpv_convective_out as the mesh is refined
type = SideDiffusiveFluxIntegral
variable = Tsolid
boundary = rpv_inner
diffusivity = thermal_conductivity
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = 'rpv_inner core_outer'
variable = Tsolid
[]
[]
[Executioner]
type = Steady
automatic_scaling = true
compute_scaling_once = false
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_max_its = 100
[Quadrature]
# order = fifth
side_order = seventh
[]
line_search = none
[]
[Outputs]
exodus = false
csv = true
[]
(modules/solid_mechanics/examples/coal_mining/cosserat_mc_wp.i)
# Strata deformation and fracturing around a coal mine
#
# A 2D geometry is used that simulates a transverse section of
# the coal mine. The model is actually 3D, but the "x"
# dimension is only 10m long, meshed with 1 element, and
# there is no "x" displacement. The mine is 300m deep
# and just the roof is studied (0<=z<=300). The model sits
# between 0<=y<=450. The excavation sits in 0<=y<=150. This
# is a "half model": the boundary conditions are such that
# the model simulates an excavation sitting in -150<=y<=150
# inside a model of the region -450<=y<=450. The
# excavation height is 3m (ie, the excavation lies within
# 0<=z<=3). Mining is simulated by moving the excavation's
# roof down, until disp_z=-3 at t=1.
# Time is meaningless in this example
# as quasi-static solutions are sought at each timestep, but
# the number of timesteps controls the resolution of the
# process.
#
# The boundary conditions are:
# - disp_x = 0 everywhere
# - disp_y = 0 at y=0 and y=450
# - disp_z = 0 for y>150
# - disp_z = -3 at maximum, for 0<=y<=150. See excav function.
# That is, rollers on the sides, free at top, and prescribed at bottom.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa. The initial stress is consistent with
# the weight force from density 2500 kg/m^3, ie, stress_zz = -0.025*(300-z) MPa
# where gravity = 10 m.s^-2 = 1E-5 MPa m^2/kg. The maximum and minimum
# principal horizontal stresses are assumed to be equal to 0.8*stress_zz.
#
# Material properties:
# Young's modulus = 8 GPa
# Poisson's ratio = 0.25
# Cosserat layer thickness = 1 m
# Cosserat-joint normal stiffness = large
# Cosserat-joint shear stiffness = 1 GPa
# MC cohesion = 3 MPa
# MC friction angle = 37 deg
# MC dilation angle = 8 deg
# MC tensile strength = 1 MPa
# MC compressive strength = 100 MPa, varying down to 1 MPa when tensile strain = 1
# WeakPlane cohesion = 0.1 MPa
# WeakPlane friction angle = 30 deg
# WeakPlane dilation angle = 10 deg
# WeakPlane tensile strength = 0.1 MPa
# WeakPlane compressive strength = 100 MPa softening to 1 MPa at strain = 1
#
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
xmin = -5
xmax = 5
nz = 40
zmin = 0
zmax = 400.0
bias_z = 1.1
ny = 30 # make this a multiple of 3, so y=150 is at a node
ymin = 0
ymax = 450
[]
[left]
type = SideSetsAroundSubdomainGenerator
new_boundary = 11
normal = '0 -1 0'
input = generated_mesh
[]
[right]
type = SideSetsAroundSubdomainGenerator
new_boundary = 12
normal = '0 1 0'
input = left
[]
[front]
type = SideSetsAroundSubdomainGenerator
new_boundary = 13
normal = '-1 0 0'
input = right
[]
[back]
type = SideSetsAroundSubdomainGenerator
new_boundary = 14
normal = '1 0 0'
input = front
[]
[top]
type = SideSetsAroundSubdomainGenerator
new_boundary = 15
normal = '0 0 1'
input = back
[]
[bottom]
type = SideSetsAroundSubdomainGenerator
new_boundary = 16
normal = '0 0 -1'
input = top
[]
[excav]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '-5 0 0'
top_right = '5 150 3'
input = bottom
[]
[roof]
type = SideSetsBetweenSubdomainsGenerator
new_boundary = 21
primary_block = 0
paired_block = 1
input = excav
[]
[hole]
type = BlockDeletionGenerator
block = 1
input = roof
[]
[]
[GlobalParams]
block = 0
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
[]
[Variables]
[./disp_y]
[../]
[./disp_z]
[../]
[./wc_x]
[../]
[]
[Kernels]
[./cy_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_y
component = 1
[../]
[./cz_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_z
component = 2
[../]
[./x_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[../]
[./x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[../]
[./gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./wc_y]
[../]
[./wc_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./mc_shear]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_internal_parameter
variable = mc_shear
[../]
[./mc_tensile]
type = MaterialStdVectorAux
index = 1
property = mc_plastic_internal_parameter
variable = mc_tensile
[../]
[./wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
[../]
[./wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
[../]
[./mc_shear_f]
type = MaterialStdVectorAux
index = 6
property = mc_plastic_yield_function
variable = mc_shear_f
[../]
[./mc_tensile_f]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_yield_function
variable = mc_tensile_f
[../]
[./wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
[../]
[./wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
[../]
[]
[BCs]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '11 12 16 21' # note addition of 16 and 21
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '16'
value = 0.0
[../]
[./no_wc_x]
type = DirichletBC
variable = wc_x
boundary = '11 12'
value = 0.0
[../]
[./roof]
type = FunctionDirichletBC
variable = disp_z
boundary = 21
function = excav_sideways
[../]
[]
[Functions]
[./ini_xx]
type = ParsedFunction
expression = '-0.8*2500*10E-6*(400-z)'
[../]
[./ini_zz]
type = ParsedFunction
expression = '-2500*10E-6*(400-z)'
[../]
[./excav_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax e_h closure_dist'
symbol_values = '1.0 0 150.0 -3.0 15.0'
expression = 'e_h*max(min((min(t/end_t,1)*(ymax-ymin)+ymin-y)/closure_dist,1),0)'
[../]
[./excav_downwards]
type = ParsedFunction
symbol_names = 'end_t ymin ymax e_h closure_dist'
symbol_values = '1.0 0 150.0 -3.0 15.0'
expression = 'e_h*min(t/end_t,1)*max(min(((ymax-ymin)+ymin-y)/closure_dist,1),0)'
[../]
[]
[UserObjects]
[./mc_coh_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 2.99 # MPa
value_residual = 3.01 # MPa
rate = 1.0
[../]
[./mc_fric]
type = SolidMechanicsHardeningConstant
value = 0.65 # 37deg
[../]
[./mc_dil]
type = SolidMechanicsHardeningConstant
value = 0.15 # 8deg
[../]
[./mc_tensile_str_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.0 # MPa
rate = 1.0
[../]
[./mc_compressive_str]
type = SolidMechanicsHardeningCubic
value_0 = 100 # Large!
value_residual = 100
internal_limit = 0.1
[../]
[./wp_coh_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_tan_fric]
type = SolidMechanicsHardeningConstant
value = 0.36 # 20deg
[../]
[./wp_tan_dil]
type = SolidMechanicsHardeningConstant
value = 0.18 # 10deg
[../]
[./wp_tensile_str_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_compressive_str_soften]
type = SolidMechanicsHardeningCubic
value_0 = 100
value_residual = 1
internal_limit = 1.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeLayeredCosseratElasticityTensor
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3
[../]
[./strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[../]
[./ini_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
eigenstrain_name = ini_stress
[../]
[./stress]
type = ComputeMultipleInelasticCosseratStress
block = 0
inelastic_models = 'mc wp'
cycle_models = true
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./mc]
type = CappedMohrCoulombCosseratStressUpdate
block = 0
warn_about_precision_loss = false
host_youngs_modulus = 8E3
host_poissons_ratio = 0.25
base_name = mc
tensile_strength = mc_tensile_str_strong_harden
compressive_strength = mc_compressive_str
cohesion = mc_coh_strong_harden
friction_angle = mc_fric
dilation_angle = mc_dil
max_NR_iterations = 10000
smoothing_tol = 0.1 # MPa # Must be linked to cohesion
yield_function_tol = 1E-9 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[../]
[./wp]
type = CappedWeakPlaneCosseratStressUpdate
block = 0
warn_about_precision_loss = false
base_name = wp
cohesion = wp_coh_harden
tan_friction_angle = wp_tan_fric
tan_dilation_angle = wp_tan_dil
tensile_strength = wp_tensile_str_harden
compressive_strength = wp_compressive_str_soften
max_NR_iterations = 10000
tip_smoother = 0.1
smoothing_tol = 0.1 # MPa # Note, this must be tied to cohesion, otherwise get no possible return at cone apex
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[../]
[./density]
type = GenericConstantMaterial
prop_names = density
prop_values = 2500
[../]
[]
[Postprocessors]
[./subsidence]
type = PointValue
point = '0 0 400'
variable = disp_z
use_displaced_mesh = false
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
line_search = bt
nl_abs_tol = 1e-3
nl_rel_tol = 1e-5
l_max_its = 30
nl_max_its = 1000
start_time = 0.0
dt = 0.2
end_time = 0.2
[]
[Outputs]
file_base = cosserat_mc_wp
time_step_interval = 1
print_linear_residuals = false
csv = true
exodus = true
[./console]
type = Console
output_linear = false
[../]
[]
(test/tests/meshgenerators/block_deletion_generator/preserve_exteriors.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 8 # large enough to be interesting distributed
ny = 8
xmin = 0
xmax = 4
ymin = 0
ymax = 4
[]
[lower_d]
type = LowerDBlockFromSidesetGenerator
input = gmg
new_block_name = 'external_boundary'
sidesets = 'bottom top left right'
[]
[del_lower_d_inner_block]
type = BlockDeletionGenerator
input = lower_d
block = 0
delete_exteriors = false
[]
[]
(modules/solid_mechanics/test/tests/notched_plastic_block/biaxial_smooth.i)
# Uses a multi-smooted version of Mohr-Coulomb (via CappedMohrCoulombStressUpdate and ComputeMultipleInelasticStress) to simulate the following problem.
# A cubical block is notched around its equator.
# All of its outer surfaces have roller BCs, but the notched region is free to move as needed
# The block is initialised with a high hydrostatic tensile stress
# Without the notch, the BCs do not allow contraction of the block, and this stress configuration is admissible
# With the notch, however, the interior parts of the block are free to move in order to relieve stress, and this causes plastic failure
# The top surface is then pulled upwards (the bottom is fixed because of the roller BCs)
# This causes more failure
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 9
ny = 9
nz = 9
xmin = 0
xmax = 0.1
ymin = 0
ymax = 0.1
zmin = 0
zmax = 0.1
[]
[block_to_remove_xmin]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 -0.01 0.045'
top_right = '0.01 0.11 0.055'
location = INSIDE
block_id = 1
input = generated_mesh
[]
[block_to_remove_xmax]
type = SubdomainBoundingBoxGenerator
bottom_left = '0.09 -0.01 0.045'
top_right = '0.11 0.11 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_xmin
[]
[block_to_remove_ymin]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 -0.01 0.045'
top_right = '0.11 0.01 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_xmax
[]
[block_to_remove_ymax]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 0.09 0.045'
top_right = '0.11 0.11 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_ymin
[]
[remove_block]
type = BlockDeletionGenerator
block = 1
input = block_to_remove_ymax
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
add_variables = true
incremental = true
generate_output = 'max_principal_stress mid_principal_stress min_principal_stress stress_zz'
eigenstrain_names = ini_stress
[../]
[]
[Postprocessors]
[./uz]
type = PointValue
point = '0 0 0.1'
use_displaced_mesh = false
variable = disp_z
[../]
[./s_zz]
type = ElementAverageValue
use_displaced_mesh = false
variable = stress_zz
[../]
[./num_res]
type = NumResidualEvaluations
[../]
[./nr_its] # num_iters is the average number of NR iterations encountered per element in this timestep
type = ElementAverageValue
variable = num_iters
[../]
[./max_nr_its] # max_num_iters is the maximum number of NR iterations encountered in the element during the whole simulation
type = ElementExtremeValue
variable = max_num_iters
[../]
[./runtime]
type = PerfGraphData
data_type = TOTAL
section_name = 'Root'
[../]
[]
[BCs]
# back=zmin, front=zmax, bottom=ymin, top=ymax, left=xmin, right=xmax
[./xmin_xzero]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./xmax_xzero]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[../]
[./ymin_yzero]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./ymax_yzero]
type = DirichletBC
variable = disp_y
boundary = top
value = 0.0
[../]
[./zmin_zzero]
type = DirichletBC
variable = disp_z
boundary = back
value = '0'
[../]
[./zmax_disp]
type = FunctionDirichletBC
variable = disp_z
boundary = front
function = '1E-6*max(t,0)'
[../]
[]
[AuxVariables]
[./mc_int]
order = CONSTANT
family = MONOMIAL
[../]
[./num_iters]
order = CONSTANT
family = MONOMIAL
[../]
[./max_num_iters]
order = CONSTANT
family = MONOMIAL
[../]
[./yield_fcn]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./mc_int_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_internal_parameter
variable = mc_int
[../]
[./num_iters_auxk]
type = MaterialRealAux
property = plastic_NR_iterations
variable = num_iters
[../]
[./max_num_iters_auxk]
type = MaterialRealAux
property = max_plastic_NR_iterations
variable = max_num_iters
[../]
[./yield_fcn_auxk]
type = MaterialStdVectorAux
index = 6
property = plastic_yield_function
variable = yield_fcn
[../]
[]
[UserObjects]
[./ts]
type = SolidMechanicsHardeningConstant
value = 1E16
[../]
[./mc_coh]
type = SolidMechanicsHardeningConstant
value = 5E6
[../]
[./mc_phi]
type = SolidMechanicsHardeningConstant
value = 35
convert_to_radians = true
[../]
[./mc_psi]
type = SolidMechanicsHardeningConstant
value = 10
convert_to_radians = true
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 16E9
poissons_ratio = 0.25
[../]
[./mc]
type = CappedMohrCoulombStressUpdate
tensile_strength = ts
compressive_strength = ts
cohesion = mc_coh
friction_angle = mc_phi
dilation_angle = mc_psi
smoothing_tol = 0.2E6
yield_function_tol = 1E-5
[../]
[./stress]
type = ComputeMultipleInelasticStress
inelastic_models = mc
perform_finite_strain_rotations = false
[../]
[./strain_from_initial_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = '6E6 0 0 0 6E6 0 0 0 6E6'
eigenstrain_name = ini_stress
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
start_time = -1
end_time = 10
dt = 1
solve_type = NEWTON
type = Transient
l_tol = 1E-2
nl_abs_tol = 1E-5
nl_rel_tol = 1E-7
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
file_base = biaxial_smooth
perf_graph = true
exodus = false
csv = true
[]
(modules/heat_transfer/test/tests/radiative_bcs/radiative_bc_cyl.i)
#
# Thin cylindrical shell with very high thermal conductivity
# so that temperature is almost uniform at 500 K. Radiative
# boundary conditions is applied. Heat flux out of boundary
# 'right' should be 3723.36; this is approached as the mesh
# is refined
#
[Mesh]
type = MeshGeneratorMesh
[./cartesian]
type = CartesianMeshGenerator
dim = 2
dx = '1 1'
ix = '1 10'
dy = '1 1'
subdomain_id = '1 2 1 2'
[../]
[./remove_1]
type = BlockDeletionGenerator
block = 1
input = cartesian
[../]
[./readd_left]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(x - 1) < 1e-4'
new_sideset_name = left
input = remove_1
[../]
[]
[Problem]
coord_type = RZ
[]
[Variables]
[./temp]
initial_condition = 800.0
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[]
[BCs]
[./lefttemp]
type = DirichletBC
boundary = left
variable = temp
value = 800
[../]
[./radiative_bc]
type = InfiniteCylinderRadiativeBC
boundary = right
variable = temp
boundary_radius = 2
boundary_emissivity = 0.2
cylinder_radius = 3
cylinder_emissivity = 0.7
Tinfinity = 500
[../]
[]
[Materials]
[./density]
type = GenericConstantMaterial
prop_names = 'density thermal_conductivity'
prop_values = '1 1.0e5'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
petsc_options = '-snes_converged_reason'
line_search = none
nl_rel_tol = 1e-6
nl_abs_tol = 1e-7
[]
[Postprocessors]
[./right]
type = SideDiffusiveFluxAverage
variable = temp
boundary = right
diffusivity = thermal_conductivity
[../]
[./min_temp]
type = ElementExtremeValue
variable = temp
value_type = min
[../]
[./max_temp]
type = ElementExtremeValue
variable = temp
value_type = max
[../]
[]
[Outputs]
csv = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_balance/large_gap_heat_transfer_test_cylinder.i)
rpv_core_gap_size = 0.15
core_outer_radius = 2
rpv_inner_radius = ${fparse 2 + rpv_core_gap_size}
rpv_outer_radius = ${fparse 2.5 + rpv_core_gap_size}
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
[core_gap_rpv]
type = ConcentricCircleMeshGenerator
num_sectors = 10
radii = '${core_outer_radius} ${rpv_inner_radius} ${rpv_outer_radius}'
rings = '2 1 2'
has_outer_square = false
preserve_volumes = true
portion = full
[]
[rename_core_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = core_gap_rpv
primary_block = 1
paired_block = 2
new_boundary = 'core_outer'
[]
[rename_inner_rpv_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = rename_core_bdy
primary_block = 3
paired_block = 2
new_boundary = 'rpv_inner'
[]
[2d_mesh]
type = BlockDeletionGenerator
input = rename_inner_rpv_bdy
block = 2
[]
[]
[Variables]
[Tsolid]
initial_condition = 500
[]
[]
[Kernels]
[heat_source]
type = CoupledForce
variable = Tsolid
block = '${core_blocks}'
v = power_density
[]
[heat_conduction]
type = HeatConduction
variable = Tsolid
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = Tsolid
boundary = 'outer' # outer RPV
coefficient = ${rpv_outer_htc}
T_infinity = ${rpv_outer_Tinf}
[]
[]
[ThermalContact]
[RPV_gap]
type = GapHeatTransfer
gap_geometry_type = 'CYLINDER'
emissivity_primary = 0.8
emissivity_secondary = 0.8
variable = Tsolid
primary = 'core_outer'
secondary = 'rpv_inner'
gap_conductivity = 0.1
quadrature = true
cylinder_axis_point_1 = '0 0 0'
cylinder_axis_point_2 = '0 0 5'
[]
[]
[AuxVariables]
[power_density]
block = '${core_blocks}'
initial_condition = 50e3
[]
[]
[Materials]
[simple_mat]
type = HeatConductionMaterial
thermal_conductivity = 34.6 # W/m/K
[]
[]
[Postprocessors]
[Tcore_avg]
type = ElementAverageValue
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${core_blocks}'
[]
[Trpv_avg]
type = ElementAverageValue
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${rpv_blocks}'
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = '${core_blocks}'
[]
[rpv_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = Tsolid
boundary = 'outer' # outer RVP
T_fluid = ${rpv_outer_Tinf}
htc = ${rpv_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
expression = '(rpv_convective_out - ptot) / ptot'
pp_names = 'rpv_convective_out ptot'
[]
[]
[Executioner]
type = Steady
automatic_scaling = true
compute_scaling_once = false
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_max_its = 100
[Quadrature]
side_order = seventh
[]
line_search = none
[]
[Outputs]
exodus = false
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/cht/flow-around-square-linear-fluidonly-physics.i)
mu = 0.01
rho = 1.1
k = 0.0005
cp = 10
h_conv = 5
inlet_temp = 300
advected_interp_method = 'upwind'
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin = 0
ymin = 0
ymax = 0.1
xmax = 0.1
[]
[subdomain1]
type = SubdomainBoundingBoxGenerator
input = generated_mesh
block_name = subdomain1
bottom_left = '0.04 0.04 0'
block_id = 1
top_right = '0.06 0.06 0'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = 0
paired_block = 1
new_boundary = interface
[]
[delete]
type = BlockDeletionGenerator
input = interface
block = 1
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system energy_system'
previous_nl_solution_required = true
[]
[Physics]
[NavierStokes]
[FlowSegregated]
[flow]
compressibility = 'weakly-compressible'
block = '0'
velocity_variable = 'vel_x vel_y'
density = ${rho}
dynamic_viscosity = ${mu}
initial_velocity = '0.1 0.01 0'
initial_pressure = '0.2'
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_functors = '0.1 0'
wall_boundaries = 'top bottom interface'
momentum_wall_types = 'noslip noslip noslip'
outlet_boundaries = 'right'
momentum_outlet_types = 'fixed-pressure'
pressure_functors = '1.4'
momentum_advection_interpolation = ${advected_interp_method}
momentum_two_term_bc_expansion = false
pressure_two_term_bc_expansion = false
orthogonality_correction = false
[]
[]
[FluidHeatTransferSegregated]
[energy]
coupled_flow_physics = flow
block = '0'
thermal_conductivity = '${k}'
specific_heat = '${cp}'
initial_temperature = '${inlet_temp}'
energy_inlet_types = 'fixed-temperature'
energy_inlet_functors = '${inlet_temp}'
energy_wall_types = 'heatflux heatflux convection'
energy_wall_functors = '0 0 boundary_value:htc'
energy_advection_interpolation = ${advected_interp_method}
energy_two_term_bc_expansion = false
[]
[]
[]
[]
[FunctorMaterials]
[rhocpT]
property_name = 'rhocpT'
type = ParsedFunctorMaterial
functor_names = 'T_fluid'
expression = '${rho}*${cp}*T_fluid'
[]
[conv_data]
type = GenericFunctorMaterial
prop_names = 'htc boundary_value'
prop_values = '${h_conv} 350'
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-13
pressure_l_abs_tol = 1e-13
energy_l_abs_tol = 1e-13
momentum_l_tol = 0
pressure_l_tol = 0
energy_l_tol = 0
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
energy_system = 'energy_system'
momentum_equation_relaxation = 0.8
energy_equation_relaxation = 1.0
pressure_variable_relaxation = 0.3
num_iterations = 1000
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
energy_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
print_fields = false
continue_on_max_its = true
[]
[Outputs]
exodus = true
execute_on = timestep_end
[]
(test/tests/meshgenerators/block_deletion_generator/block_deletion_test9.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
xmin = 0
xmax = 4
ymin = 0
ymax = 4
[]
[SubdomainBoundingBox1]
type = SubdomainBoundingBoxGenerator
input = gmg
block_id = 1
bottom_left = '0 0 0'
top_right = '3 4 1'
[]
[ed0]
type = BlockDeletionGenerator
block = 1
input = '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
[]
(modules/solid_mechanics/examples/coal_mining/cosserat_mc_only.i)
# Strata deformation and fracturing around a coal mine
#
# A 2D geometry is used that simulates a transverse section of
# the coal mine. The model is actually 3D, but the "x"
# dimension is only 10m long, meshed with 1 element, and
# there is no "x" displacement. The mine is 300m deep
# and just the roof is studied (0<=z<=300). The model sits
# between 0<=y<=450. The excavation sits in 0<=y<=150. This
# is a "half model": the boundary conditions are such that
# the model simulates an excavation sitting in -150<=y<=150
# inside a model of the region -450<=y<=450. The
# excavation height is 3m (ie, the excavation lies within
# 0<=z<=3). Mining is simulated by moving the excavation's
# roof down, until disp_z=-3 at t=1.
# Time is meaningless in this example
# as quasi-static solutions are sought at each timestep, but
# the number of timesteps controls the resolution of the
# process.
#
# The boundary conditions are:
# - disp_x = 0 everywhere
# - disp_y = 0 at y=0 and y=450
# - disp_z = 0 for y>150
# - disp_z = -3 at maximum, for 0<=y<=150. See excav function.
# That is, rollers on the sides, free at top, and prescribed at bottom.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa. The initial stress is consistent with
# the weight force from density 2500 kg/m^3, ie, stress_zz = -0.025*(300-z) MPa
# where gravity = 10 m.s^-2 = 1E-5 MPa m^2/kg. The maximum and minimum
# principal horizontal stresses are assumed to be equal to 0.8*stress_zz.
#
# Below you will see weak-plane parameters and AuxVariables, etc.
# These are not actally used in this example.
#
# Material properties:
# Young's modulus = 8 GPa
# Poisson's ratio = 0.25
# Cosserat layer thickness = 1 m
# Cosserat-joint normal stiffness = large
# Cosserat-joint shear stiffness = 1 GPa
# MC cohesion = 3 MPa
# MC friction angle = 37 deg
# MC dilation angle = 8 deg
# MC tensile strength = 1 MPa
# MC compressive strength = 100 MPa, varying down to 1 MPa when tensile strain = 1
#
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
xmin = -5
xmax = 5
nz = 40
zmin = 0
zmax = 400.0
bias_z = 1.1
ny = 30 # make this a multiple of 3, so y=150 is at a node
ymin = 0
ymax = 450
[]
[left]
type = SideSetsAroundSubdomainGenerator
new_boundary = 11
normal = '0 -1 0'
input = generated_mesh
[]
[right]
type = SideSetsAroundSubdomainGenerator
new_boundary = 12
normal = '0 1 0'
input = left
[]
[front]
type = SideSetsAroundSubdomainGenerator
new_boundary = 13
normal = '-1 0 0'
input = right
[]
[back]
type = SideSetsAroundSubdomainGenerator
new_boundary = 14
normal = '1 0 0'
input = front
[]
[top]
type = SideSetsAroundSubdomainGenerator
new_boundary = 15
normal = '0 0 1'
input = back
[]
[bottom]
type = SideSetsAroundSubdomainGenerator
new_boundary = 16
normal = '0 0 -1'
input = top
[]
[excav]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '-5 0 0'
top_right = '5 150 3'
input = bottom
[]
[roof]
type = SideSetsBetweenSubdomainsGenerator
new_boundary = 21
primary_block = 0
paired_block = 1
input = excav
[]
[hole]
type = BlockDeletionGenerator
block = 1
input = roof
[]
[]
[GlobalParams]
block = 0
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
[]
[Variables]
[./disp_y]
[../]
[./disp_z]
[../]
[./wc_x]
[../]
[]
[Kernels]
[./cy_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_y
component = 1
[../]
[./cz_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_z
component = 2
[../]
[./x_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[../]
[./x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[../]
[./gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./wc_y]
[../]
[./wc_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./mc_shear]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_internal_parameter
variable = mc_shear
[../]
[./mc_tensile]
type = MaterialStdVectorAux
index = 1
property = mc_plastic_internal_parameter
variable = mc_tensile
[../]
[./wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
[../]
[./wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
[../]
[./mc_shear_f]
type = MaterialStdVectorAux
index = 6
property = mc_plastic_yield_function
variable = mc_shear_f
[../]
[./mc_tensile_f]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_yield_function
variable = mc_tensile_f
[../]
[./wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
[../]
[./wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
[../]
[]
[BCs]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '11 12 16 21' # note addition of 16 and 21
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '16'
value = 0.0
[../]
[./no_wc_x]
type = DirichletBC
variable = wc_x
boundary = '11 12'
value = 0.0
[../]
[./roof]
type = FunctionDirichletBC
variable = disp_z
boundary = 21
function = excav_sideways
[../]
[]
[Functions]
[./ini_xx]
type = ParsedFunction
expression = '-0.8*2500*10E-6*(400-z)'
[../]
[./ini_zz]
type = ParsedFunction
expression = '-2500*10E-6*(400-z)'
[../]
[./excav_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax e_h closure_dist'
symbol_values = '1.0 0 150.0 -3.0 15.0'
expression = 'e_h*max(min((t/end_t*(ymax-ymin)+ymin-y)/closure_dist,1),0)'
[../]
[./excav_downwards]
type = ParsedFunction
symbol_names = 'end_t ymin ymax e_h closure_dist'
symbol_values = '1.0 0 150.0 -3.0 15.0'
expression = 'e_h*t/end_t*max(min(((ymax-ymin)+ymin-y)/closure_dist,1),0)'
[../]
[]
[UserObjects]
[./mc_coh_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 2.99 # MPa
value_residual = 3.01 # MPa
rate = 1.0
[../]
[./mc_fric]
type = SolidMechanicsHardeningConstant
value = 0.65 # 37deg
[../]
[./mc_dil]
type = SolidMechanicsHardeningConstant
value = 0.15 # 8deg
[../]
[./mc_tensile_str_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.0 # MPa
rate = 1.0
[../]
[./mc_compressive_str]
type = SolidMechanicsHardeningCubic
value_0 = 100 # Large!
value_residual = 100
internal_limit = 0.1
[../]
[./wp_coh_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_tan_fric]
type = SolidMechanicsHardeningConstant
value = 0.36 # 20deg
[../]
[./wp_tan_dil]
type = SolidMechanicsHardeningConstant
value = 0.18 # 10deg
[../]
[./wp_tensile_str_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_compressive_str_soften]
type = SolidMechanicsHardeningCubic
value_0 = 100
value_residual = 1.0
internal_limit = 1.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeLayeredCosseratElasticityTensor
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3
[../]
[./strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[../]
[./ini_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
eigenstrain_name = ini_stress
[../]
[./stress]
type = ComputeMultipleInelasticCosseratStress
block = 0
inelastic_models = mc
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./mc]
type = CappedMohrCoulombCosseratStressUpdate
block = 0
warn_about_precision_loss = false
host_youngs_modulus = 8E3
host_poissons_ratio = 0.25
base_name = mc
tensile_strength = mc_tensile_str_strong_harden
compressive_strength = mc_compressive_str
cohesion = mc_coh_strong_harden
friction_angle = mc_fric
dilation_angle = mc_dil
max_NR_iterations = 100000
smoothing_tol = 0.1 # MPa # Must be linked to cohesion
yield_function_tol = 1E-9 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[../]
[./wp]
type = CappedWeakPlaneCosseratStressUpdate
block = 0
warn_about_precision_loss = false
base_name = wp
cohesion = wp_coh_harden
tan_friction_angle = wp_tan_fric
tan_dilation_angle = wp_tan_dil
tensile_strength = wp_tensile_str_harden
compressive_strength = wp_compressive_str_soften
max_NR_iterations = 10000
tip_smoother = 0.1
smoothing_tol = 0.1 # MPa # Note, this must be tied to cohesion, otherwise get no possible return at cone apex
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0E-3
[../]
[./density]
type = GenericConstantMaterial
prop_names = density
prop_values = 2500
[../]
[]
[Postprocessors]
[./subsidence]
type = PointValue
point = '0 0 400'
variable = disp_z
use_displaced_mesh = false
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
line_search = bt
nl_abs_tol = 1e-3
nl_rel_tol = 1e-5
l_max_its = 30
nl_max_its = 1000
start_time = 0.0
dt = 0.2
end_time = 0.2
[]
[Outputs]
file_base = cosserat_mc_only
time_step_interval = 1
print_linear_residuals = false
csv = true
exodus = true
[./console]
type = Console
output_linear = false
[../]
[]
(modules/reactor/test/tests/meshgenerators/reporting_id/hexagonal_id/core_reporting_id_exclude.i)
[Mesh]
[assembly]
type = SimpleHexagonGenerator
hexagon_size = 5.0
hexagon_size_style = 'apothem'
block_id = '1'
[]
[dummy]
type = SimpleHexagonGenerator
hexagon_size = 5.0
hexagon_size_style = 'apothem'
block_id = '2'
[]
[core]
type = PatternedHexMeshGenerator
inputs = 'assembly dummy'
pattern_boundary = none
pattern = ' 1 0 1;
0 0 0 0;
1 0 0 0 1;
0 0 0 0;
1 0 1'
assign_type = 'cell'
id_name = 'assembly_id'
exclude_id = 'dummy'
[]
[del_dummy]
type = BlockDeletionGenerator
block = 2
input = core
new_boundary = core_out
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[AuxVariables]
[assembly_id]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[set_assembly_id]
type = ExtraElementIDAux
variable = assembly_id
extra_id_name = assembly_id
[]
[]
[Outputs]
[out]
type = Exodus
execute_on = timestep_end
output_extra_element_ids = true
extra_element_ids_to_output = 'assembly_id'
[]
[]
(test/tests/meshgenerators/block_deletion_generator/block_deletion_test8.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmin = 0
xmax = 5
ymin = 0
ymax = 5
[]
[SubdomainBoundingBox1]
type = SubdomainBoundingBoxGenerator
input = gmg
block_id = 1
bottom_left = '0 0 0'
top_right = '4 4 1'
[]
[interior_nodeset]
type = BoundingBoxNodeSetGenerator
input = SubdomainBoundingBox1
new_boundary = interior_ns
bottom_left = '2 2 0'
top_right = '3 3 1'
[]
[ed0]
type = BlockDeletionGenerator
block = 1
input = 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/meshgenerators/block_deletion_generator/block_deletion_test7.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
xmin = 0
xmax = 4
ymin = 0
ymax = 4
[]
[SubdomainBoundingBox1]
type = SubdomainBoundingBoxGenerator
input = gmg
block_id = 1
bottom_left = '0 0 0'
top_right = '1 1 1'
[]
[SubdomainBoundingBox2]
type = SubdomainBoundingBoxGenerator
input = SubdomainBoundingBox1
block_id = 1
bottom_left = '2 2 0'
top_right = '3 3 1'
[]
[ed0]
type = BlockDeletionGenerator
block = 1
input = 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
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder_mortar_error.i)
rpv_core_gap_size = 0.15
core_outer_radius = 2
rpv_inner_radius = ${fparse 2 + rpv_core_gap_size}
rpv_outer_radius = ${fparse 2.5 + rpv_core_gap_size}
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
[core_gap_rpv]
type = ConcentricCircleMeshGenerator
num_sectors = 10
radii = '${core_outer_radius} ${rpv_inner_radius} ${rpv_outer_radius}'
rings = '2 1 2'
has_outer_square = false
preserve_volumes = true
portion = full
[]
[rename_core_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = core_gap_rpv
primary_block = 1
paired_block = 2
new_boundary = 'core_outer'
[]
[rename_inner_rpv_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = rename_core_bdy
primary_block = 3
paired_block = 2
new_boundary = 'rpv_inner'
[]
[2d_mesh]
type = BlockDeletionGenerator
input = rename_inner_rpv_bdy
block = 2
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = 'rpv_inner'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = 2d_mesh
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = 'core_outer'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Variables]
[Tsolid]
initial_condition = 500
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[Kernels]
[heat_source]
type = CoupledForce
variable = Tsolid
block = '${core_blocks}'
v = power_density
[]
[heat_conduction]
type = HeatConduction
variable = Tsolid
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = Tsolid
boundary = 'outer' # outer RPV
coefficient = ${rpv_outer_htc}
T_infinity = ${rpv_outer_Tinf}
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = Tsolid
boundary = 'rpv_inner'
primary_emissivity = 0.8
secondary_emissivity = 0.8
[]
[conduction]
type = GapFluxModelConduction
temperature = Tsolid
boundary = 'rpv_inner'
gap_conductivity = 0.1
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = Tsolid
primary_boundary = 'core_outer'
primary_subdomain = 10000
secondary_boundary = 'rpv_inner'
secondary_subdomain = 10001
gap_flux_models = 'radiation conduction'
gap_geometry_type = 'CYLINDER'
cylinder_axis_point_2 = '0 0 5'
[]
[]
[AuxVariables]
[power_density]
block = '${core_blocks}'
initial_condition = 50e3
[]
[]
[Materials]
[simple_mat]
type = HeatConductionMaterial
thermal_conductivity = 34.6 # W/m/K
[]
[]
[Postprocessors]
[Tcore_avg]
type = ElementAverageValue
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${core_blocks}'
[]
[Trpv_avg]
type = ElementAverageValue
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${rpv_blocks}'
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = '${core_blocks}'
[]
[rpv_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = Tsolid
boundary = 'outer' # outer RVP
T_fluid = ${rpv_outer_Tinf}
htc = ${rpv_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
expression = '(rpv_convective_out - ptot) / ptot'
pp_names = 'rpv_convective_out ptot'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = 'rpv_inner core_outer'
variable = 'Tsolid'
[]
[]
[Executioner]
type = Steady
petsc_options = '-snes_converged_reason -pc_svd_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -mat_mffd_err -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = ' lu superlu_dist 1e-5 NONZERO '
'1e-15'
snesmf_reuse_base = false
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_max_its = 100
line_search = none
[]
[Outputs]
exodus = false
csv = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder_mortar.i)
rpv_core_gap_size = 0.15
core_outer_radius = 2
rpv_inner_radius = '${fparse 2 + rpv_core_gap_size}'
rpv_outer_radius = '${fparse 2.5 + rpv_core_gap_size}'
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
[core_gap_rpv]
type = ConcentricCircleMeshGenerator
num_sectors = 10
radii = '${core_outer_radius} ${rpv_inner_radius} ${rpv_outer_radius}'
rings = '2 1 2'
has_outer_square = false
preserve_volumes = true
portion = full
[]
[rename_core_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = core_gap_rpv
primary_block = 1
paired_block = 2
new_boundary = 'core_outer'
[]
[rename_inner_rpv_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = rename_core_bdy
primary_block = 3
paired_block = 2
new_boundary = 'rpv_inner'
[]
[2d_mesh]
type = BlockDeletionGenerator
input = rename_inner_rpv_bdy
block = 2
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = 'rpv_inner'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = 2d_mesh
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = 'core_outer'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Variables]
[Tsolid]
initial_condition = 500
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[Kernels]
[heat_source]
type = CoupledForce
variable = Tsolid
block = '${core_blocks}'
v = power_density
[]
[heat_conduction]
type = HeatConduction
variable = Tsolid
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = Tsolid
boundary = 'outer' # outer RPV
coefficient = ${rpv_outer_htc}
T_infinity = ${rpv_outer_Tinf}
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = Tsolid
boundary = 'rpv_inner'
primary_emissivity = 0.8
secondary_emissivity = 0.8
[]
[conduction]
type = GapFluxModelConduction
temperature = Tsolid
boundary = 'rpv_inner'
gap_conductivity = 0.1
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = Tsolid
primary_boundary = 'core_outer'
primary_subdomain = 10000
secondary_boundary = 'rpv_inner'
secondary_subdomain = 10001
gap_flux_models = 'radiation conduction'
gap_geometry_type = 'CYLINDER'
[]
[]
[AuxVariables]
[power_density]
block = '${core_blocks}'
initial_condition = 50e3
[]
[]
[Materials]
[simple_mat]
type = HeatConductionMaterial
thermal_conductivity = 34.6 # W/m/K
[]
[]
[Postprocessors]
[Tcore_avg]
type = ElementAverageValue
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${core_blocks}'
[]
[Trpv_avg]
type = ElementAverageValue
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${rpv_blocks}'
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = '${core_blocks}'
[]
[rpv_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = Tsolid
boundary = 'outer' # outer RVP
T_fluid = ${rpv_outer_Tinf}
htc = ${rpv_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
expression = '(rpv_convective_out - ptot) / ptot'
pp_names = 'rpv_convective_out ptot'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = 'rpv_inner core_outer'
variable = 'Tsolid'
[]
[]
[Executioner]
type = Steady
petsc_options = '-snes_converged_reason -pc_svd_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' lu superlu_dist 1e-5 NONZERO 1e-15'
snesmf_reuse_base = false
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_max_its = 100
line_search = none
[]
[Outputs]
exodus = false
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/pump/pump_loop_negative_rotation.i)
mu = 1.0
rho = 1.0
[Mesh]
[gen]
type = CartesianMeshGenerator
dim = 2
dx = '0.1 0.8 0.1'
dy = '0.1 0.8 0.1'
ix = '5 20 5'
iy = '5 20 5'
subdomain_id = '1 1 1
1 2 1
1 1 1'
[]
[delete_internal_part]
type = BlockDeletionGenerator
input = gen
block = '2'
new_boundary = 'wall-internal'
[]
[lump_bdries_to_wall]
type = RenameBoundaryGenerator
input = delete_internal_part
old_boundary = 'bottom right top left'
new_boundary = 'wall-external wall-external wall-external wall-external'
[]
[pump_domain]
type = ParsedSubdomainMeshGenerator
input = lump_bdries_to_wall
combinatorial_geometry = 'x > 0.3 & x < 0.4 & y > 0.5'
block_id = '3'
[]
[rename_blocks]
type = RenameBlockGenerator
input = pump_domain
old_block = '1 3'
new_block = 'pipe pump'
[]
[side_pump]
type = ParsedGenerateSideset
input = rename_blocks
included_subdomains = 'pump'
included_neighbors = 'pipe'
new_sideset_name = 'pump_side'
normal = '1 0 0'
combinatorial_geometry = 'x > 0.35'
[]
[]
[GlobalParams]
velocity_interp_method = 'rc'
advected_interp_method = 'upwind'
rhie_chow_user_object = 'rc'
[]
[Problem]
material_coverage_check = False
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = vel_x
v = vel_y
pressure = pressure
correct_volumetric_force = true
volumetric_force_functors = 'pump_volume_force'
volume_force_correction_method = 'force-consistent'
[]
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
initial_condition = 1
[]
[vel_y]
type = INSFVVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[AuxVariables]
[U]
order = CONSTANT
family = MONOMIAL
fv = true
[]
[]
[AuxKernels]
[mag]
type = VectorMagnitudeAux
variable = U
x = vel_x
y = vel_y
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
rho = ${rho}
[]
[mean_zero_pressure]
type = FVIntegralValueConstraint
variable = pressure
lambda = lambda
phi0 = 0.0
[]
[u_advection]
type = INSFVMomentumAdvection
variable = vel_x
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = vel_x
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = vel_x
momentum_component = 'x'
pressure = pressure
[]
[u_pump]
type = INSFVPump
variable = vel_x
momentum_component = 'x'
pump_volume_force = 'pump_volume_force'
block = 'pump'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = vel_y
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = vel_y
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = vel_y
momentum_component = 'y'
pressure = pressure
[]
[]
[FVBCs]
[walls-u]
type = INSFVNoSlipWallBC
boundary = 'wall-internal wall-external'
variable = vel_x
function = '0'
[]
[walls-v]
type = INSFVNoSlipWallBC
boundary = 'wall-internal wall-external'
variable = vel_y
function = '0'
[]
[]
[Functions]
[pump_head_negative]
type = PiecewiseLinear
x = '0.0 10.0'
y = '1000.0 0.0'
[]
[]
[FunctorMaterials]
[pump_mat]
type = NSFVPumpFunctorMaterial
rho = ${rho}
speed = 'U'
rotation_speed = 120
rotation_speed_rated = 100
area_rated = 0.1
volume_rated = 0.01
flow_rate_rated = 1.0
flow_rate = 'flow_rate'
block = 'pump'
enable_negative_rotation = true
symmetric_negative_pressure_head = false
pressure_head_function_negative_rotation = 'pump_head_negative'
[]
[]
[Postprocessors]
[flow_rate]
type = Receiver
default = 1.0
[]
[flow_rate_to_pipe]
type = VolumetricFlowRate
advected_quantity = ${rho}
boundary = 'pump_side'
vel_x = 'vel_x'
vel_y = 'vel_y'
[]
[maximum_speed]
type = ADElementExtremeFunctorValue
functor = vel_x
value_type = max
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = false
[out]
type = CSV
execute_on = FINAL
show = 'flow_rate_to_pipe maximum_speed'
[]
[]
(modules/optimization/test/tests/executioners/constrained/shape_optimization/forward.i)
# This test is documented as an example for ConstrainedShapeOptimization. This
# test should not be changed without updating the documentation.
inner_radius = 6
outer_radius = 10
volume_constraint = 200
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[mesh]
type = ConcentricCircleMeshGenerator
has_outer_square = no
num_sectors = 16
radii = '${inner_radius} ${outer_radius}'
rings = '16 16'
preserve_volumes = false
[]
[inner_radius]
type = SideSetsBetweenSubdomainsGenerator
input = mesh
new_boundary = inner
primary_block = 2
paired_block = 1
[]
[delete]
type = BlockDeletionGenerator
input = inner_radius
block = 1
[]
[gather_all]
type = BoundingBoxNodeSetGenerator
input = delete
bottom_left = '-100 -100 -100'
top_right = '100 100 100'
new_boundary = total
[]
[combine]
type = SideSetsFromBoundingBoxGenerator
input = gather_all
bottom_left = '-100 -100 -100'
top_right = '100 100 100'
boundaries_old = 'inner outer'
boundary_new = moving
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[T]
[]
[]
[AuxVariables]
[dist_between]
[AuxKernel]
type = NearestNodeDistanceAux
variable = dist_between
paired_boundary = moving
boundary = total
block = 2
use_displaced_mesh = false
execute_on = "INITIAL"
[]
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
use_displaced_mesh = false
diffusivity = diff_coef
[]
[disp_y]
type = MatDiffusion
variable = disp_y
use_displaced_mesh = false
diffusivity = diff_coef
[]
# run physics of interest on deformed mesh
[Diffusion]
type = FunctionDiffusion
variable = T
use_displaced_mesh = true
[]
[Source]
type = BodyForce
variable = T
value = 1
use_displaced_mesh = true
[]
[]
[Materials]
# perserve elements near the boundary
[diff_coef]
type = ParsedMaterial
coupled_variables = 'dist_between'
expression = '1/(dist_between+0.5)'
property_name = 'diff_coef'
[]
[h]
type = ADGenericFunctionMaterial
prop_names = h
prop_values = h
[]
# convection type boundary condition
[convection_bc]
type = ADParsedMaterial
coupled_variables = "T"
expression = "h*(100-T)"
material_property_names = "h"
property_name = convection
[]
[]
[Functions]
[r1_x]
type = ParsedOptimizationFunction
expression = 'r1 * cos((atan(y/x)))'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[r1_y]
type = ParsedOptimizationFunction
expression = 'r1 * sin((atan(y/x)))'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[r0_x]
type = ParsedOptimizationFunction
expression = 'r0 * cos((atan(y/x)))'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[r0_y]
type = ParsedOptimizationFunction
expression = 'r0 * sin((atan(y/x)))'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[h]
type = ParsedOptimizationFunction
# r0+${inner_radius} is the true current inner radius
expression = '10 /(pi * (r0+${inner_radius})^3)'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[eq_grad_r0]
type = ParsedOptimizationFunction
expression = '-2 * pi * (r0 + ${inner_radius})'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[eq_grad_r1]
type = ParsedOptimizationFunction
# r1+${outer_radius} is the true current outer radius
expression = '2 * pi * (r1+${outer_radius})'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[]
[BCs]
[diffuse_r1_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 'outer'
function = r1_x
preset = false
[]
[diffuse_r1_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = 'outer'
function = r1_y
preset = false
[]
[diffuse_r0_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 'inner'
function = r0_x
preset = false
[]
[diffuse_r0_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = 'inner'
function = r0_y
preset = false
[]
# run physics on deformed mesh
[convection]
type = ADMatNeumannBC
variable = T
boundary = inner
boundary_material = convection
use_displaced_mesh = true
value = 1
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Reporters]
[params]
type = ConstantReporter
real_vector_names = 'radii'
real_vector_values = '0 0'
dof_id_type_vector_names = 'num_params'
dof_id_type_vector_values = '2'
[]
[]
[Postprocessors]
[current_volume]
type = VolumePostprocessor
use_displaced_mesh = true
[]
# objective function
[objective]
type = NodalExtremeValue
variable = T
[]
[eq_constraint]
type = ParsedPostprocessor
pp_names = current_volume
expression = 'current_volume - ${volume_constraint}'
[]
[func_r0]
type = FunctionValuePostprocessor
function = eq_grad_r0
[]
[func_r1]
type = FunctionValuePostprocessor
function = eq_grad_r1
[]
[]
[VectorPostprocessors]
# convert "Real" postprocessors to vectors
[vol_constraint]
type = VectorOfPostprocessors
postprocessors = 'eq_constraint'
force_postaux = true
[]
[eq_grad]
type = VectorOfPostprocessors
postprocessors = 'func_r0 func_r1'
force_postaux = true
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = none
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
[]
[Outputs]
console = false
[]
(modules/solid_mechanics/examples/coal_mining/cosserat_elastic.i)
# Strata deformation and fracturing around a coal mine
#
# A 2D geometry is used that simulates a transverse section of
# the coal mine. The model is actually 3D, but the "x"
# dimension is only 10m long, meshed with 1 element, and
# there is no "x" displacement. The mine is 400m deep
# and just the roof is studied (0<=z<=400). The model sits
# between 0<=y<=450. The excavation sits in 0<=y<=150. This
# is a "half model": the boundary conditions are such that
# the model simulates an excavation sitting in -150<=y<=150
# inside a model of the region -450<=y<=450. The
# excavation height is 3m (ie, the excavation lies within
# 0<=z<=3).
#
# Time is meaningless in this example
# as quasi-static solutions are sought at each timestep, but
# the number of timesteps controls the resolution of the
# process.
#
# The boundary conditions for this elastic simulation are:
# - disp_x = 0 everywhere
# - disp_y = 0 at y=0 and y=450
# - disp_z = 0 for y>150
# - wc_x = 0 at y=0 and y=450.
# That is, rollers on the sides, free at top,
# and prescribed at bottom in the unexcavated portion.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa. The initial stress is consistent with
# the weight force from density 2500 kg/m^3, ie, stress_zz = -0.025*(300-z) MPa
# where gravity = 10 m.s^-2 = 1E-5 MPa m^2/kg. The maximum and minimum
# principal horizontal stresses are assumed to be equal to 0.8*stress_zz.
#
# This is an elastic simulation, but the weak-plane and Drucker-Prager
# parameters and AuxVariables may be found below. They are irrelevant
# in this simulation. The weak-plane and Drucker-Prager cohesions,
# tensile strengths and compressive strengths have been set very high
#
# Material properties:
# Young's modulus = 8 GPa
# Poisson's ratio = 0.25
# Cosserat layer thickness = 1 m
# Cosserat-joint normal stiffness = large
# Cosserat-joint shear stiffness = 1 GPa
#
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
xmin = -5
xmax = 5
nz = 40
zmin = 0
zmax = 403.003
bias_z = 1.1
ny = 30 # make this a multiple of 3, so y=150 is at a node
ymin = 0
ymax = 450
[]
[left]
type = SideSetsAroundSubdomainGenerator
new_boundary = 11
normal = '0 -1 0'
input = generated_mesh
[]
[right]
type = SideSetsAroundSubdomainGenerator
new_boundary = 12
normal = '0 1 0'
input = left
[]
[front]
type = SideSetsAroundSubdomainGenerator
new_boundary = 13
normal = '-1 0 0'
input = right
[]
[back]
type = SideSetsAroundSubdomainGenerator
new_boundary = 14
normal = '1 0 0'
input = front
[]
[top]
type = SideSetsAroundSubdomainGenerator
new_boundary = 15
normal = '0 0 1'
input = back
[]
[bottom]
type = SideSetsAroundSubdomainGenerator
new_boundary = 16
normal = '0 0 -1'
input = top
[]
[excav]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '-5 0 0'
top_right = '5 150 3'
input = bottom
[]
[roof]
type = SideSetsBetweenSubdomainsGenerator
new_boundary = 21
primary_block = 0
paired_block = 1
input = excav
[]
[hole]
type = BlockDeletionGenerator
block = 1
input = roof
[]
[]
[GlobalParams]
block = 0
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
[]
[Variables]
[./disp_y]
[../]
[./disp_z]
[../]
[./wc_x]
[../]
[]
[Kernels]
[./cy_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_y
component = 1
[../]
[./cz_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_z
component = 2
[../]
[./x_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[../]
[./x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[../]
[./gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6 # remember this is in MPa
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./wc_y]
[../]
[./wc_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./dp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./dp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[./dp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./dp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[../]
[./stress_yx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yx
index_i = 1
index_j = 0
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zx
index_i = 2
index_j = 0
[../]
[./stress_zy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zy
index_i = 2
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./dp_shear]
type = MaterialStdVectorAux
index = 0
property = dp_plastic_internal_parameter
variable = dp_shear
[../]
[./dp_tensile]
type = MaterialStdVectorAux
index = 1
property = dp_plastic_internal_parameter
variable = dp_tensile
[../]
[./wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
[../]
[./wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
[../]
[./dp_shear_f]
type = MaterialStdVectorAux
index = 0
property = dp_plastic_yield_function
variable = dp_shear_f
[../]
[./dp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = dp_plastic_yield_function
variable = dp_tensile_f
[../]
[./wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
[../]
[./wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
[../]
[]
[BCs]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '11 12'
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '16'
value = 0.0
[../]
[./no_wc_x]
type = DirichletBC
variable = wc_x
boundary = '11 12'
value = 0.0
[../]
[]
[Functions]
[./ini_xx]
type = ParsedFunction
expression = '-0.8*2500*10E-6*(403.003-z)'
[../]
[./ini_zz]
type = ParsedFunction
expression = '-2500*10E-6*(403.003-z)'
[../]
[]
[UserObjects]
[./dp_coh_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 2.9 # MPa
value_residual = 3.1 # MPa
rate = 1.0
[../]
[./dp_fric]
type = SolidMechanicsHardeningConstant
value = 0.65 # 37deg
[../]
[./dp_dil]
type = SolidMechanicsHardeningConstant
value = 0.65
[../]
[./dp_tensile_str_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.4 # MPa
rate = 1.0
[../]
[./dp_compressive_str]
type = SolidMechanicsHardeningConstant
value = 1.0E3 # Large!
[../]
[./drucker_prager_model]
type = SolidMechanicsPlasticDruckerPrager
mc_cohesion = dp_coh_strong_harden
mc_friction_angle = dp_fric
mc_dilation_angle = dp_dil
internal_constraint_tolerance = 1 # irrelevant here
yield_function_tolerance = 1 # irrelevant here
[../]
[./wp_coh]
type = SolidMechanicsHardeningConstant
value = 1E12
[../]
[./wp_tan_fric]
type = SolidMechanicsHardeningConstant
value = 0.36 # 20deg
[../]
[./wp_tan_dil]
type = SolidMechanicsHardeningConstant
value = 0.18 # 10deg
[../]
[./wp_tensile_str]
type = SolidMechanicsHardeningConstant
value = 1E12
[../]
[./wp_compressive_str]
type = SolidMechanicsHardeningConstant
value = 1E12
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeLayeredCosseratElasticityTensor
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
[../]
[./strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[../]
[./ini_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
eigenstrain_name = ini_stress
[../]
[./stress]
# this is needed so as to correctly apply the initial stress
type = ComputeMultipleInelasticCosseratStress
block = 0
inelastic_models = ''
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./dp]
type = CappedDruckerPragerCosseratStressUpdate
block = 0
warn_about_precision_loss = false
host_youngs_modulus = 8E3
host_poissons_ratio = 0.25
base_name = dp
DP_model = drucker_prager_model
tensile_strength = dp_tensile_str_strong_harden
compressive_strength = dp_compressive_str
max_NR_iterations = 100000
tip_smoother = 0.1E1
smoothing_tol = 0.1E1 # MPa # Must be linked to cohesion
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[../]
[./wp]
type = CappedWeakPlaneCosseratStressUpdate
block = 0
warn_about_precision_loss = false
base_name = wp
cohesion = wp_coh
tan_friction_angle = wp_tan_fric
tan_dilation_angle = wp_tan_dil
tensile_strength = wp_tensile_str
compressive_strength = wp_compressive_str
max_NR_iterations = 10000
tip_smoother = 0.1
smoothing_tol = 0.1 # MPa # Note, this must be tied to cohesion, otherwise get no possible return at cone apex
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0E-3
[../]
[./density]
type = GenericConstantMaterial
prop_names = density
prop_values = 2500
[../]
[]
[Postprocessors]
[./subs_max]
type = PointValue
point = '0 0 403.003'
variable = disp_z
use_displaced_mesh = false
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'Linear'
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
line_search = bt
nl_abs_tol = 1e-3
nl_rel_tol = 1e-5
l_max_its = 30
nl_max_its = 1000
start_time = 0.0
dt = 1.0
end_time = 1.0
[]
[Outputs]
file_base = cosserat_elastic
time_step_interval = 1
print_linear_residuals = false
exodus = true
csv = true
console = true
#[./console]
# type = Console
# output_linear = false
#[../]
[]
(modules/navier_stokes/examples/flow-over-circle/mesh.i)
[Mesh]
# ------------------------------------------
# Middle layer
# ------------------------------------------
[ccmg]
type = ConcentricCircleMeshGenerator
num_sectors = '${fparse refinement*2}'
radii = '${circle_radius} ${fparse 1.2*circle_radius}'
rings = '4 ${refinement} ${refinement}'
has_outer_square = on
pitch = ${pitch}
preserve_volumes = off
smoothing_max_it = 2
[]
[in_between]
type = SideSetsBetweenSubdomainsGenerator
input = ccmg
primary_block = 2
paired_block = 1
new_boundary = 'circle'
[]
[delete]
type = BlockDeletionGenerator
input = in_between
block = '1'
[]
[final_ccmg]
type = RenameBlockGenerator
input = delete
old_block = '2 3'
new_block = '0 0'
[]
[left]
type = GeneratedMeshGenerator
dim = 2
xmin = '${x_min}'
xmax = '${fparse -pitch/2}'
ymin = '${fparse -pitch/2}'
ymax = '${fparse pitch/2}'
nx = '${fparse refinement*2}'
ny = '${fparse refinement*4+2}'
[]
[right]
type = GeneratedMeshGenerator
dim = 2
xmin = '${fparse pitch/2}'
xmax = '${x_max}'
ymin = '${fparse -pitch/2}'
ymax = '${fparse pitch/2}'
nx = '${fparse refinement*40}'
ny = '${fparse refinement*4+2}'
[]
[combined_middle]
type = StitchedMeshGenerator
inputs = 'final_ccmg left right'
stitch_boundaries_pairs = 'left right; right left'
clear_stitched_boundary_ids = false
prevent_boundary_ids_overlap = true
merge_boundaries_with_same_name = true
[]
[middle_top_sideset]
input = combined_middle
type = ParsedGenerateSideset
combinatorial_geometry = 'y > ${fparse pitch/2-rundoff}'
normal = '0 1 0'
new_sideset_name = 'middle_top'
[]
[middle_bottom_sideset]
input = middle_top_sideset
type = ParsedGenerateSideset
combinatorial_geometry = 'y < ${fparse -pitch/2+rundoff}'
normal = '0 -1 0'
new_sideset_name = 'middle_bottom'
[]
# ------------------------------------------
# Top layer
# ------------------------------------------
[top_left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = '${x_min}'
xmax = '${fparse -pitch/2}'
ymin = '${fparse pitch/2}'
ymax = '${y_max}'
nx = '${fparse refinement*2}'
ny = '${fparse refinement*2+1}'
[]
[top_middle_block]
type = GeneratedMeshGenerator
dim = 2
xmin = '${fparse -pitch/2}'
xmax = '${fparse pitch/2}'
ymin = '${fparse pitch/2}'
ymax = '${y_max}'
nx = '${fparse refinement*4+2}'
ny = '${fparse refinement*2+1}'
[]
[top_right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = '${fparse pitch/2}'
xmax = '${x_max}'
ymin = '${fparse pitch/2}'
ymax = '${y_max}'
nx = '${fparse refinement*40}'
ny = '${fparse refinement*2+1}'
[]
[combined_top]
type = StitchedMeshGenerator
inputs = 'top_middle_block top_left_block top_right_block'
stitch_boundaries_pairs = 'left right; right left'
prevent_boundary_ids_overlap = true
merge_boundaries_with_same_name = true
[]
[top_bottom_sideset]
input = combined_top
type = ParsedGenerateSideset
combinatorial_geometry = 'y < ${fparse pitch/2+rundoff}'
normal = '0 -1 0'
new_sideset_name = 'top_bottom'
[]
[combined_middle_top]
type = StitchedMeshGenerator
inputs = 'top_bottom_sideset middle_bottom_sideset'
stitch_boundaries_pairs = 'top_bottom middle_top'
clear_stitched_boundary_ids = false
prevent_boundary_ids_overlap = true
merge_boundaries_with_same_name = true
[]
[create_fused_top_sideset]
input = combined_middle_top
type = ParsedGenerateSideset
combinatorial_geometry = 'y > ${fparse y_max-rundoff}'
normal = '0 1 0'
new_sideset_name = 'top_boundary'
[]
# ------------------------------------------
# Bottom layer
# ------------------------------------------
[bottom_left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = '${x_min}'
xmax = '${fparse -pitch/2}'
ymin = '${y_min}'
ymax = '${fparse -pitch/2}'
nx = '${fparse refinement*2}'
ny = '${fparse refinement*2}'
[]
[bottom_middle_block]
type = GeneratedMeshGenerator
dim = 2
xmin = '${fparse -pitch/2}'
xmax = '${fparse pitch/2}'
ymin = '${y_min}'
ymax = '${fparse -pitch/2}'
nx = '${fparse refinement*4+2}'
ny = '${fparse refinement*2}'
[]
[bottom_right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = '${fparse pitch/2}'
xmax = '${x_max}'
ymin = '${y_min}'
ymax = '${fparse -pitch/2}'
nx = '${fparse refinement*40}'
ny = '${fparse refinement*2}'
[]
[combined_bottom]
type = StitchedMeshGenerator
inputs = 'bottom_middle_block bottom_left_block bottom_right_block'
stitch_boundaries_pairs = 'left right; right left'
prevent_boundary_ids_overlap = true
merge_boundaries_with_same_name = true
[]
[bottom_top_sideset]
input = combined_bottom
type = ParsedGenerateSideset
combinatorial_geometry = 'y > ${fparse -pitch/2-rundoff}'
normal = '0 1 0'
new_sideset_name = 'bottom_top'
[]
[combined_final]
type = StitchedMeshGenerator
inputs = 'create_fused_top_sideset bottom_top_sideset'
stitch_boundaries_pairs = 'middle_bottom bottom_top'
clear_stitched_boundary_ids = false
prevent_boundary_ids_overlap = true
merge_boundaries_with_same_name = true
[]
[create_fused_bottom_sideset]
input = combined_final
type = ParsedGenerateSideset
combinatorial_geometry = 'y < ${fparse y_min+rundoff}'
normal = '0 -1 0'
new_sideset_name = 'bottom_boundary'
[]
# ------------------------------------------
# Left and right boundaries
# ------------------------------------------
[create_fused_left_sideset]
input = create_fused_bottom_sideset
type = ParsedGenerateSideset
combinatorial_geometry = 'x < ${fparse x_min+rundoff}'
normal = '-1 0 0'
new_sideset_name = 'left_boundary'
[]
[create_fused_right_sideset]
input = create_fused_left_sideset
type = ParsedGenerateSideset
combinatorial_geometry = 'x > ${fparse x_max-rundoff}'
normal = '1 0 0'
new_sideset_name = 'right_boundary'
[]
[sideset_removal]
input = create_fused_right_sideset
type = BoundaryDeletionGenerator
boundary_names = 'bottom top left right middle_bottom middle_top bottom_top top_bottom'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/cns/shock_tube_2D_cavity/hllc_sod_shocktube_2D.i)
rho_left = 1
E_left = 2.501505578
u_left = 1e-15
rho_right = 0.125
E_right = 1.999770935
u_right = 1e-15
x_sep = 35
[GlobalParams]
fp = fp
[]
[Mesh]
[./cartesian]
type = CartesianMeshGenerator
dim = 2
dx = '40 20'
ix = '200 100'
dy = '1 20 2 20 1'
iy = '4 100 10 100 4'
subdomain_id = '0 0
0 1
1 1
0 1
0 0'
[../]
[./wall]
type = SideSetsBetweenSubdomainsGenerator
input = cartesian
primary_block = 1
paired_block = 0
new_boundary = 'wall'
[../]
[./delete]
type = BlockDeletionGenerator
input = wall
block = 0
[../]
[]
[FluidProperties]
[./fp]
type = IdealGasFluidProperties
allow_imperfect_jacobians = true
[../]
[]
[Variables]
[./rho]
order = CONSTANT
family = MONOMIAL
fv = true
[../]
[./rho_u]
order = CONSTANT
family = MONOMIAL
fv = true
[../]
[./rho_v]
order = CONSTANT
family = MONOMIAL
fv = true
[../]
[./rho_E]
order = CONSTANT
family = MONOMIAL
fv = true
[../]
[]
[AuxVariables]
[./Ma]
order = CONSTANT
family = MONOMIAL
[../]
[./p]
order = CONSTANT
family = MONOMIAL
[../]
[./v_norm]
order = CONSTANT
family = MONOMIAL
[../]
[./temperature]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./Ma_aux]
type = NSMachAux
variable = Ma
fluid_properties = fp
use_material_properties = true
[../]
[./p_aux]
type = ADMaterialRealAux
variable = p
property = pressure
[../]
[./v_norm_aux]
type = ADMaterialRealAux
variable = v_norm
property = speed
[../]
[./temperature_aux]
type = ADMaterialRealAux
variable = temperature
property = T_fluid
[../]
[]
[FVKernels]
[./mass_time]
type = FVTimeKernel
variable = rho
[../]
[./mass_advection]
type = CNSFVMassHLLC
variable = rho
[../]
[./momentum_x_time]
type = FVTimeKernel
variable = rho_u
[../]
[./momentum_x_advection]
type = CNSFVMomentumHLLC
variable = rho_u
momentum_component = x
[../]
[./momentum_y_time]
type = FVTimeKernel
variable = rho_v
[../]
[./momentum_y_advection]
type = CNSFVMomentumHLLC
variable = rho_v
momentum_component = y
[../]
[./fluid_energy_time]
type = FVTimeKernel
variable = rho_E
[../]
[./fluid_energy_advection]
type = CNSFVFluidEnergyHLLC
variable = rho_E
[../]
[]
[FVBCs]
[./mom_x_pressure]
type = CNSFVMomImplicitPressureBC
variable = rho_u
momentum_component = x
boundary = 'left right wall'
[../]
[./mom_y_pressure]
type = CNSFVMomImplicitPressureBC
variable = rho_v
momentum_component = y
boundary = 'wall'
[../]
[]
[ICs]
[./rho_ic]
type = FunctionIC
variable = rho
function = 'if (x < ${x_sep}, ${rho_left}, ${rho_right})'
[../]
[./rho_u_ic]
type = FunctionIC
variable = rho_u
function = 'if (x < ${x_sep}, ${fparse rho_left * u_left}, ${fparse rho_right * u_right})'
[../]
[./rho_E_ic]
type = FunctionIC
variable = rho_E
function = 'if (x < ${x_sep}, ${fparse E_left * rho_left}, ${fparse E_right * rho_right})'
[../]
[]
[Materials]
[./var_mat]
type = ConservedVarValuesMaterial
rho = rho
rhou = rho_u
rhov = rho_v
rho_et = rho_E
fp = fp
[../]
[./sound_speed]
type = SoundspeedMat
fp = fp
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[../]
[]
[Postprocessors]
[./cfl_dt]
type = ADCFLTimeStepSize
c_names = 'sound_speed'
vel_names = 'speed'
[../]
[]
[Executioner]
type = Transient
end_time = 100
[TimeIntegrator]
type = ExplicitSSPRungeKutta
order = 2
[]
l_tol = 1e-8
[./TimeStepper]
type = PostprocessorDT
postprocessor = cfl_dt
[../]
[]
(test/tests/meshgenerators/block_deletion_generator/delete_interior_parents.i)
[Mesh]
[twoquad]
type = GeneratedMeshGenerator
dim = 2
nx = 3
ny = 4
xmax = 2
[]
[subdomain]
type = SubdomainBoundingBoxGenerator
input = twoquad
block_id = 1
bottom_left = '1 0 0'
top_right = '2 1 0'
[]
[sideset1]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain
primary_block = 0
paired_block = 1
new_boundary = bar
[]
[lowerblock1]
type = LowerDBlockFromSidesetGenerator
input = sideset1
sidesets = bar
new_block_id = 2
[]
[sideset2]
type = SideSetsBetweenSubdomainsGenerator
input = lowerblock1
primary_block = 1
paired_block = 0
new_boundary = baz
[]
[delete]
type = BlockDeletionGenerator
input = sideset2
block = 0
[]
[lowerblock2]
type = LowerDBlockFromSidesetGenerator
input = delete
sidesets = baz
new_block_id = 3
[]
[]
[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/tutorial04_meshing/app/test/tests/reactor_examples/hpmr/hpmr.i)
# Heat Pipe-Cooled Micro Reactor - 3D Core with Heterogeneous Assemblies
[Mesh]
################################# # This parameter allows us to execute the file but stop at this block so we can see intermediate output.
final_generator = moderator_pincell # User: Change this based on build step
################################
# step 1: moderator_pincell
# step 2: fuel_assembly
# optional: fuel_core
# step 3: cd1
# step 4: refl1
# step 5: core
# step 6: del_dummy
# step 7: outer_shield
# step 8: coreslice_2
# step 9: extrude
### Step 1. Create Pin Unit Cells
# There are 3 unique pin in the fuel assembly
[moderator_pincell]
type = PolygonConcentricCircleMeshGenerator
num_sides = 6 # must be six to use hex pattern
num_sectors_per_side = '2 2 2 2 2 2 '
background_intervals = 1
background_block_ids = '10'
polygon_size = 1.15
polygon_size_style ='apothem'
ring_radii = '0.825 0.92'
ring_intervals = '2 1'
ring_block_ids = '103 100 101' # 103 is tri mesh
preserve_volumes = on
quad_center_elements = false
[]
[heatpipe_pincell]
type = PolygonConcentricCircleMeshGenerator
num_sides = 6 # must be six to use hex pattern
num_sectors_per_side = '2 2 2 2 2 2 '
background_intervals = 1
background_block_ids = '10'
polygon_size = 1.15
polygon_size_style ='apothem'
ring_radii = '0.97 1.07'
ring_intervals = '2 1'
ring_block_ids = '203 200 201' # 203 is tri mesh
preserve_volumes = on
quad_center_elements = false
[]
[fuel_pincell]
type = PolygonConcentricCircleMeshGenerator
num_sides = 6 # must be six to use hex pattern
num_sectors_per_side = '2 2 2 2 2 2 '
background_intervals = 1
background_block_ids = '10'
polygon_size = 1.15
polygon_size_style ='apothem'
ring_radii = '1'
ring_intervals = '2'
ring_block_ids = '303 301' # 303 is tri mesh
preserve_volumes = on
quad_center_elements = false
[]
### Step 2. Create Patterned Hexagonal Fuel Assembly
[fuel_assembly]
type = PatternedHexMeshGenerator
inputs = 'fuel_pincell heatpipe_pincell moderator_pincell'
hexagon_size = 13.376
background_block_id = 10
background_intervals = 1
pattern = '1 0 1 0 1 0 1;
0 2 0 2 0 2 0 0;
1 0 1 0 1 0 1 2 1;
0 2 0 2 0 2 0 0 0 0;
1 0 1 0 1 0 1 2 1 2 1;
0 2 0 2 0 2 0 0 0 0 0 0;
1 0 1 0 1 0 1 2 1 2 1 2 1;
0 2 0 2 0 2 0 0 0 0 0 0;
1 0 1 0 1 0 1 2 1 2 1;
0 2 0 2 0 2 0 0 0 0;
1 0 1 0 1 0 1 2 1;
0 2 0 2 0 2 0 0;
1 0 1 0 1 0 1'
[]
### Optional. Create Fuel-Only Core
# optional example, create a core made only of fuel assemblies
[fuel_core]
type = PatternedHexMeshGenerator
inputs = 'fuel_assembly'
# Pattern ID 0
pattern_boundary = none
generate_core_metadata = true
pattern = '0 0 0 0 0;
0 0 0 0 0 0;
0 0 0 0 0 0 0;
0 0 0 0 0 0 0 0;
0 0 0 0 0 0 0 0 0;
0 0 0 0 0 0 0 0;
0 0 0 0 0 0 0;
0 0 0 0 0 0;
0 0 0 0 0'
rotate_angle = 60
[]
### Step 3. Create Control Drum Assembly
# 12 control drum (cd1-cd12) meshes are needed for different locations and node boundary conditions
[cd1_step1]
type =HexagonConcentricCircleAdaptiveBoundaryMeshGenerator
meshes_to_adapt_to = 'fuel_assembly fuel_assembly'
sides_to_adapt = '3 4'
num_sectors_per_side= '4 4 4 4 4 4'
hexagon_size = 13.376
background_intervals = 2
background_block_ids = 504
ring_radii = '12.25 13.25'
ring_intervals = '2 1'
ring_block_ids = '500 501 502'
preserve_volumes = true
is_control_drum = true
[]
[cd1]
type = AzimuthalBlockSplitGenerator
input = cd1_step1
start_angle = 45
angle_range = 90
old_blocks = 502
new_block_ids = 503
[]
[cd2_step1]
type =HexagonConcentricCircleAdaptiveBoundaryMeshGenerator
meshes_to_adapt_to = 'fuel_assembly fuel_assembly fuel_assembly'
sides_to_adapt = '2 3 4'
num_sectors_per_side= '4 4 4 4 4 4'
hexagon_size = 13.376
background_intervals = 2
background_block_ids = 504
ring_radii = '12.25 13.25'
ring_intervals = '2 1'
ring_block_ids = '500 501 502'
preserve_volumes = true
is_control_drum = true
[]
[cd2]
type = AzimuthalBlockSplitGenerator
input = cd2_step1
start_angle = 15
angle_range = 90
old_blocks = 502
new_block_ids = 503
[]
[cd3_step1]
type =HexagonConcentricCircleAdaptiveBoundaryMeshGenerator
meshes_to_adapt_to = 'fuel_assembly fuel_assembly'
sides_to_adapt = '2 3'
num_sectors_per_side= '4 4 4 4 4 4'
hexagon_size = 13.376
background_intervals = 2
background_block_ids = 504
ring_radii = '12.25 13.25'
ring_intervals = '2 1'
ring_block_ids = '500 501 502'
preserve_volumes = true
is_control_drum = true
[]
[cd3]
type = AzimuthalBlockSplitGenerator
input = cd3_step1
start_angle = 345
angle_range = 90
old_blocks = 502
new_block_ids = 503
[]
[cd4_step1]
type =HexagonConcentricCircleAdaptiveBoundaryMeshGenerator
meshes_to_adapt_to = 'fuel_assembly fuel_assembly fuel_assembly'
sides_to_adapt = '1 2 3'
num_sectors_per_side= '4 4 4 4 4 4'
hexagon_size = 13.376
background_intervals = 2
background_block_ids = 504
ring_radii = '12.25 13.25'
ring_intervals = '2 1'
ring_block_ids = '500 501 502'
preserve_volumes = true
is_control_drum = true
[]
[cd4]
type = AzimuthalBlockSplitGenerator
input = cd4_step1
start_angle = 315
angle_range = 90
old_blocks = 502
new_block_ids = 503
[]
[cd5_step1]
type =HexagonConcentricCircleAdaptiveBoundaryMeshGenerator
meshes_to_adapt_to = 'fuel_assembly fuel_assembly'
sides_to_adapt = '1 2'
num_sectors_per_side= '4 4 4 4 4 4'
hexagon_size = 13.376
background_intervals = 2
background_block_ids = 504
ring_radii = '12.25 13.25'
ring_intervals = '2 1'
ring_block_ids = '500 501 502'
preserve_volumes = true
is_control_drum = true
[]
[cd5]
type = AzimuthalBlockSplitGenerator
input = cd5_step1
start_angle = 285
angle_range = 90
old_blocks = 502
new_block_ids = 503
[]
[cd6_step1]
type =HexagonConcentricCircleAdaptiveBoundaryMeshGenerator
meshes_to_adapt_to = ' fuel_assembly fuel_assembly fuel_assembly'
sides_to_adapt = '0 1 2'
num_sectors_per_side= '4 4 4 4 4 4'
hexagon_size = 13.376
background_intervals = 2
background_block_ids = 504
ring_radii = '12.25 13.25'
ring_intervals = '2 1'
ring_block_ids = '500 501 502'
preserve_volumes = true
is_control_drum = true
[]
[cd6]
type = AzimuthalBlockSplitGenerator
input = cd6_step1
start_angle = 255
angle_range = 90
old_blocks = 502
new_block_ids = 503
[]
[cd7_step1]
type =HexagonConcentricCircleAdaptiveBoundaryMeshGenerator
meshes_to_adapt_to = 'fuel_assembly fuel_assembly'
sides_to_adapt = '0 1'
num_sectors_per_side= '4 4 4 4 4 4'
hexagon_size = 13.376
background_intervals = 2
background_block_ids = 504
ring_radii = '12.25 13.25'
ring_intervals = '2 1'
ring_block_ids = '500 501 502'
preserve_volumes = true
is_control_drum = true
[]
[cd7]
type = AzimuthalBlockSplitGenerator
input = cd7_step1
start_angle = 225
angle_range = 90
old_blocks = 502
new_block_ids = 503
[]
[cd8_step1]
type =HexagonConcentricCircleAdaptiveBoundaryMeshGenerator
meshes_to_adapt_to = ' fuel_assembly fuel_assembly fuel_assembly'
sides_to_adapt = '0 1 5'
num_sectors_per_side= '4 4 4 4 4 4'
hexagon_size = 13.376
background_intervals = 2
background_block_ids = 504
ring_radii = '12.25 13.25'
ring_intervals = '2 1'
ring_block_ids = '500 501 502'
preserve_volumes = true
is_control_drum = true
[]
[cd8]
type = AzimuthalBlockSplitGenerator
input = cd8_step1
start_angle = 195
angle_range = 90
old_blocks = 502
new_block_ids = 503
[]
[cd9_step1]
type =HexagonConcentricCircleAdaptiveBoundaryMeshGenerator
meshes_to_adapt_to = 'fuel_assembly fuel_assembly'
sides_to_adapt = '0 5'
num_sectors_per_side= '4 4 4 4 4 4'
hexagon_size = 13.376
background_intervals = 2
background_block_ids = 504
ring_radii = '12.25 13.25'
ring_intervals = '2 1'
ring_block_ids = '500 501 502'
preserve_volumes = true
is_control_drum = true
[]
[cd9]
type = AzimuthalBlockSplitGenerator
input = cd9_step1
start_angle = 165
angle_range = 90
old_blocks = 502
new_block_ids = 503
[]
[cd10_step1]
type =HexagonConcentricCircleAdaptiveBoundaryMeshGenerator
meshes_to_adapt_to = 'fuel_assembly fuel_assembly fuel_assembly'
sides_to_adapt = '0 4 5'
num_sectors_per_side= '4 4 4 4 4 4'
hexagon_size = 13.376
background_intervals = 2
background_block_ids = 504
ring_radii = '12.25 13.25'
ring_intervals = '2 1'
ring_block_ids = '500 501 502'
preserve_volumes = true
is_control_drum = true
[]
[cd10]
type = AzimuthalBlockSplitGenerator
input = cd10_step1
start_angle = 135
angle_range = 90
old_blocks = 502
new_block_ids = 503
[]
[cd11_step1]
type =HexagonConcentricCircleAdaptiveBoundaryMeshGenerator
meshes_to_adapt_to = 'fuel_assembly fuel_assembly'
sides_to_adapt = '4 5'
num_sectors_per_side= '4 4 4 4 4 4'
hexagon_size = 13.376
background_intervals = 2
background_block_ids = 504
ring_radii = '12.25 13.25'
ring_intervals = '2 1'
ring_block_ids = '500 501 502'
preserve_volumes = true
is_control_drum = true
[]
[cd11]
type = AzimuthalBlockSplitGenerator
input = cd11_step1
start_angle = 105
angle_range = 90
old_blocks = 502
new_block_ids = 503
[]
[cd12_step1]
type =HexagonConcentricCircleAdaptiveBoundaryMeshGenerator
meshes_to_adapt_to = 'fuel_assembly fuel_assembly fuel_assembly'
sides_to_adapt = '3 4 5'
num_sectors_per_side= '4 4 4 4 4 4'
hexagon_size = 13.376
background_intervals = 2
background_block_ids = 504
ring_radii = '12.25 13.25'
ring_intervals = '2 1'
ring_block_ids = '500 501 502'
preserve_volumes = true
is_control_drum = true
[]
[cd12]
type = AzimuthalBlockSplitGenerator
input = cd12_step1
start_angle = 75
angle_range = 90
old_blocks = 502
new_block_ids = 503
[]
### Step 4. Create Additional Assemblies (Reflector, Air, Dummy)
# 6 reflector meshes (refl1-refl6) are needed for difference node boundary conditions
# 1 central air hole
# dummy assembly for patterning
[refl1]
type =HexagonConcentricCircleAdaptiveBoundaryMeshGenerator
meshes_to_adapt_to = 'fuel_assembly'
sides_to_adapt = '4'
num_sectors_per_side= '4 4 4 4 4 4'
hexagon_size = 13.376
background_intervals = 2
background_block_ids = '400 401'
[]
[refl2]
type =HexagonConcentricCircleAdaptiveBoundaryMeshGenerator
meshes_to_adapt_to = 'fuel_assembly'
sides_to_adapt = '5'
num_sectors_per_side= '4 4 4 4 4 4'
hexagon_size = 13.376
background_intervals = 2
background_block_ids = '400 401'
[]
[refl3]
type =HexagonConcentricCircleAdaptiveBoundaryMeshGenerator
meshes_to_adapt_to = 'fuel_assembly'
sides_to_adapt = '0'
num_sectors_per_side= '4 4 4 4 4 4'
hexagon_size = 13.376
background_intervals = 2
background_block_ids = '400 401'
[]
[refl4]
type =HexagonConcentricCircleAdaptiveBoundaryMeshGenerator
meshes_to_adapt_to = 'fuel_assembly'
sides_to_adapt = '1'
num_sectors_per_side= '4 4 4 4 4 4'
hexagon_size = 13.376
background_intervals = 2
background_block_ids = '400 401'
[]
[refl5]
type =HexagonConcentricCircleAdaptiveBoundaryMeshGenerator
meshes_to_adapt_to = 'fuel_assembly'
sides_to_adapt = '2'
num_sectors_per_side= '4 4 4 4 4 4'
hexagon_size = 13.376
background_intervals = 2
background_block_ids = '400 401'
[]
[refl6]
type =HexagonConcentricCircleAdaptiveBoundaryMeshGenerator
meshes_to_adapt_to = 'fuel_assembly'
sides_to_adapt = '3'
num_sectors_per_side= '4 4 4 4 4 4'
hexagon_size = 13.376
background_intervals = 2
background_block_ids = '400 401'
[]
[air_center]
type =HexagonConcentricCircleAdaptiveBoundaryMeshGenerator
num_sectors_per_side= '4 4 4 4 4 4'
meshes_to_adapt_to = 'fuel_assembly fuel_assembly fuel_assembly fuel_assembly fuel_assembly fuel_assembly'
sides_to_adapt = '0 1 2 3 4 5'
hexagon_size = 13.376
background_intervals = 2
background_block_ids = '600 601'
[]
[dummy]
type =HexagonConcentricCircleAdaptiveBoundaryMeshGenerator
num_sectors_per_side= '4 4 4 4 4 4'
hexagon_size = 13.376
background_intervals = 2
background_block_ids = '700 701'
# external_boundary_id = 9998
[]
### Step 5. Create Patterned Full Core
[core]
type = PatternedHexMeshGenerator
inputs = 'fuel_assembly cd1 cd2 cd3 cd4 cd5 cd6 cd7 cd8 cd9 cd10 cd11 cd12 refl1 refl2 refl3 refl4 refl5 refl6 dummy air_center'
# Pattern ID 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
pattern_boundary = none
generate_core_metadata = true
pattern = '19 13 1 18 19;
13 12 0 0 2 18;
11 0 0 0 0 0 3;
14 0 0 0 0 0 0 17;
19 10 0 0 20 0 0 4 19;
14 0 0 0 0 0 0 17;
9 0 0 0 0 0 5;
15 8 0 0 6 16;
19 15 7 16 19'
rotate_angle = 60
[]
### Step 6. Delete Dummy Assemblies
[del_dummy]
type = BlockDeletionGenerator
block = '700 701'
input = core
new_boundary = 10000
[]
### Step 7. Add Core Periphery
[outer_shield]
type = PeripheralRingMeshGenerator
input = del_dummy
peripheral_layer_num = 1
peripheral_ring_radius = 115.0
input_mesh_external_boundary = 10000
peripheral_ring_block_id = 250
peripheral_ring_block_name = outer_shield
[]
### Step 8. Slice to 1/6 Core
[coreslice_1]
type = PlaneDeletionGenerator
point = '0 0 0'
normal = '10 17.32 0'
input = outer_shield
new_boundary = 147
[]
[coreslice_2]
type = PlaneDeletionGenerator
point = '0 0 0'
normal = '10 -17.32 0'
input = coreslice_1
new_boundary = 147
[]
### Step 9. Extrude to 3D
[extrude]
type = AdvancedExtruderGenerator
input = coreslice_2
heights = '20 160 20'
num_layers = '1 8 1'
direction = '0 0 1'
subdomain_swaps = '10 1000 100 1000 101 1000 103 1003 200 1000 201 1000 203 1003 301 1000 303 1003;
10 10 100 100 101 101 103 103 200 200 201 201 203 203 301 301 303 303;
10 1000 100 1000 101 1000 103 1003 200 200 201 201 203 203 301 1000 303 1003'
top_boundary = 2000
bottom_boundary = 3000
[]
[]
(modules/navier_stokes/test/tests/finite_volume/materials/flow_diode/transient_operation.i)
# Horizontal H junction with flow in different directions in the two branches
# One of the branches has a diode against the direction of the flow that can
# be triggered using the Controls
# There are 3 different strategies available for the diode blocking the flow
# - based on a time trigger
# - based on a pressure drop (here chosen across the diode)
# - based on a mass flow rate (here chosen through the diode)
mu = 0.1
rho = 10
nx = 10
ny = 5
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1 0.3 1'
dy = '0.5 0.2 0.5'
ix = '${nx} ${fparse nx/2} ${nx}'
iy = '${ny} ${ny} ${ny}'
subdomain_id = '1 1 1
2 1 2
3 4 1'
[]
[add_walls]
type = SideSetsBetweenSubdomainsGenerator
input = 'cmg'
primary_block = '1 3 4'
paired_block = '2'
new_boundary = 'walls'
[]
[remove_wall_blocks]
type = BlockDeletionGenerator
input = add_walls
block = 2
[]
# Add inlets and outlets
[top_left]
type = ParsedGenerateSideset
input = remove_wall_blocks
combinatorial_geometry = 'x<0.001 & y>0.6'
new_sideset_name = top_left
[]
[bottom_left]
type = ParsedGenerateSideset
input = top_left
combinatorial_geometry = 'x<0.001 & y<0.6'
new_sideset_name = bottom_left
[]
[top_right]
type = ParsedGenerateSideset
input = bottom_left
combinatorial_geometry = 'x>2.299 & y>0.6'
new_sideset_name = top_right
[]
[bottom_right]
type = ParsedGenerateSideset
input = top_right
combinatorial_geometry = 'x>2.299 & y<0.6'
new_sideset_name = bottom_right
[]
# Extra surfaces
[diode_inlet]
type = SideSetsBetweenSubdomainsGenerator
input = bottom_right
primary_block = 4
paired_block = 3
new_boundary = 'diode_inlet'
[]
[mid_section]
type = SideSetsBetweenSubdomainsGenerator
input = diode_inlet
primary_block = 4
paired_block = 1
new_boundary = 'mid_connection'
[]
[reduce_blocks]
type = RenameBlockGenerator
input = 'mid_section'
old_block = '4 3 1'
new_block = '1 diode fluid'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'pins_rhie_chow_interpolator'
advected_interp_method = 'upwind'
velocity_interp_method = 'rc'
[]
[Modules]
[NavierStokesFV]
compressibility = 'incompressible'
porous_medium_treatment = true
density = ${rho}
dynamic_viscosity = ${mu}
initial_velocity = '1e-6 1e-6 0'
initial_pressure = 0.0
inlet_boundaries = 'bottom_left top_right'
momentum_inlet_types = 'fixed-velocity fixed-velocity'
momentum_inlet_function = '1 0; -1 0'
wall_boundaries = 'top bottom walls'
momentum_wall_types = 'noslip noslip noslip'
outlet_boundaries = 'bottom_right top_left'
momentum_outlet_types = 'fixed-pressure fixed-pressure'
pressure_function = '1 1'
friction_blocks = 'fluid; diode'
friction_types = 'darcy forchheimer; darcy forchheimer'
standard_friction_formulation = true
# Base friction
# friction_coeffs = 'Darcy Forchheimer; Darcy Forchheimer'
# Combined with diode
friction_coeffs = 'combined_linear combined_quadratic; combined_linear combined_quadratic'
# Porosity jump treatment
# Option 1: diffusion correction
use_friction_correction = true
consistent_scaling = 10
# Option 2: bernouilli jump
# porosity_interface_pressure_treatment = bernoulli
mass_advection_interpolation = 'average'
momentum_advection_interpolation = 'average'
[]
[]
[FunctorMaterials]
[porosity]
type = ADGenericFunctorMaterial
prop_names = 'porosity'
prop_values = '0.5'
[]
[base_friction]
type = ADGenericVectorFunctorMaterial
prop_names = 'Darcy Forchheimer'
prop_values = '220 240 260 0 0 0'
[]
# Material definitions needed for the diode
[diode]
type = NSFVFrictionFlowDiodeFunctorMaterial
# Friction only in X direction
direction = '-1 0 0'
additional_linear_resistance = '20000 0 0'
additional_quadratic_resistance = '0 0 0'
base_linear_friction_coefs = 'Darcy'
base_quadratic_friction_coefs = 'Forchheimer'
sum_linear_friction_name = 'diode_linear'
sum_quadratic_friction_name = 'diode_quad'
block = 'diode'
turn_on_diode = false
[]
[combine_linear_friction]
type = ADPiecewiseByBlockVectorFunctorMaterial
prop_name = 'combined_linear'
subdomain_to_prop_value = 'fluid Darcy
diode diode_linear'
[]
[combine_quadratic_friction]
type = ADPiecewiseByBlockVectorFunctorMaterial
prop_name = 'combined_quadratic'
subdomain_to_prop_value = 'fluid Forchheimer
diode diode_quad'
[]
# density is constant
[momentum]
type = ADGenericVectorFunctorMaterial
prop_names = 'momentum'
prop_values = 'superficial_vel_x superficial_vel_y 0'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_shift_type -ksp_gmres_restart'
petsc_options_value = 'lu NONZERO 200'
line_search = 'none'
end_time = 0.2
dt = 0.015
nl_abs_tol = 1e-12
[]
[Controls]
active = 'pdrop_based'
# Case 1: Diode turns on at a certain time and blocks (adds friction) flow at a given time
[time_based]
type = BoolFunctionControl
function = time_function
parameter = 'FunctorMaterials/diode/turn_on_diode'
execute_on = timestep_begin
[]
# Case 2: Diode looks at pressure drop, reduces flow if positive pressure drop
# This will not oscillate as the diode increases the pressure drop
[pdrop_based]
type = BoolFunctionControl
function = pdrop_positive
parameter = 'FunctorMaterials/diode/turn_on_diode'
execute_on = timestep_begin
[]
# Case 3: Diode looks at flow direction & quantity, reduces flow if too much flow
# in a given direction
# This will oscillate (turn on/off on each step) if the action of turning the diode
# makes the amount of flow smaller than the threshold for turning on the diode
[flow_based]
type = BoolFunctionControl
function = velocity_big_enough
parameter = 'FunctorMaterials/diode/turn_on_diode'
execute_on = timestep_begin
[]
[]
[Functions]
# Functions are used to parse postprocessors and provide them to a BoolFunctionControl
[time_function]
type = ParsedFunction
expression = 'if(t<0.1, 0, 1)'
[]
[pdrop_positive]
type = ParsedFunction
expression = 'if(pdrop_diode>100, 1, 0)'
symbol_names = pdrop_diode
symbol_values = pdrop_diode
[]
[velocity_big_enough]
type = ParsedFunction
expression = 'if(flow_diode<-0.4, 1, 0)'
symbol_names = flow_diode
symbol_values = flow_diode
[]
[]
[Postprocessors]
# Analysis of the simulation
[mdot_top]
type = VolumetricFlowRate
boundary = 'top_right'
vel_x = superficial_vel_x
vel_y = superficial_vel_y
advected_quantity = ${rho}
[]
[mdot_bottom]
type = VolumetricFlowRate
boundary = 'bottom_right'
vel_x = superficial_vel_x
vel_y = superficial_vel_y
advected_quantity = ${rho}
[]
[mdot_middle]
type = VolumetricFlowRate
boundary = 'mid_connection'
vel_x = superficial_vel_x
vel_y = superficial_vel_y
advected_quantity = ${rho}
[]
[pdrop_top_channel]
type = PressureDrop
upstream_boundary = 'top_left'
downstream_boundary = 'top_right'
weighting_functor = 'momentum'
boundary = 'top_left top_right'
pressure = pressure
[]
[pdrop_bottom_channel]
type = PressureDrop
upstream_boundary = 'bottom_left'
downstream_boundary = 'bottom_right'
weighting_functor = 'momentum'
boundary = 'bottom_left bottom_right'
pressure = pressure
[]
# Diode operation
[pdrop_diode]
type = PressureDrop
upstream_boundary = 'diode_inlet'
downstream_boundary = 'top_left'
weighting_functor = 'momentum'
boundary = 'diode_inlet top_left'
pressure = pressure
[]
[flow_diode]
type = VolumetricFlowRate
boundary = 'diode_inlet'
vel_x = superficial_vel_x
vel_y = superficial_vel_y
advected_quantity = ${rho}
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/solid_mechanics/test/tests/notched_plastic_block/biaxial_planar.i)
# Uses non-smoothed Mohr-Coulomb (via ComputeMultiPlasticityStress and SolidMechanicsPlasticMohrCoulombMulti) to simulate the following problem.
# A cubical block is notched around its equator.
# All of its outer surfaces have roller BCs, but the notched region is free to move as needed
# The block is initialised with a high hydrostatic tensile stress
# Without the notch, the BCs do not allow contraction of the block, and this stress configuration is admissible
# With the notch, however, the interior parts of the block are free to move in order to relieve stress, and this causes plastic failure
# The top surface is then pulled upwards (the bottom is fixed because of the roller BCs)
# This causes more failure
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 9
ny = 9
nz = 9
xmin = 0
xmax = 0.1
ymin = 0
ymax = 0.1
zmin = 0
zmax = 0.1
[]
[block_to_remove_xmin]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 -0.01 0.045'
top_right = '0.01 0.11 0.055'
location = INSIDE
block_id = 1
input = generated_mesh
[]
[block_to_remove_xmax]
type = SubdomainBoundingBoxGenerator
bottom_left = '0.09 -0.01 0.045'
top_right = '0.11 0.11 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_xmin
[]
[block_to_remove_ymin]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 -0.01 0.045'
top_right = '0.11 0.01 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_xmax
[]
[block_to_remove_ymax]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 0.09 0.045'
top_right = '0.11 0.11 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_ymin
[]
[remove_block]
type = BlockDeletionGenerator
block = 1
input = block_to_remove_ymax
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
incremental = true
generate_output = 'max_principal_stress mid_principal_stress min_principal_stress stress_zz'
eigenstrain_names = ini_stress
[]
[]
[Postprocessors]
[uz]
type = PointValue
point = '0 0 0.1'
use_displaced_mesh = false
variable = disp_z
[]
[s_zz]
type = ElementAverageValue
use_displaced_mesh = false
variable = stress_zz
[]
[num_res]
type = NumResidualEvaluations
[]
[nr_its]
type = ElementAverageValue
variable = num_iters
[]
[max_nr_its]
type = ElementExtremeValue
variable = num_iters
[]
[runtime]
type = PerfGraphData
data_type = TOTAL
section_name = 'Root'
[]
[]
[BCs]
# back=zmin, front=zmax, bottom=ymin, top=ymax, left=xmin, right=xmax
[xmin_xzero]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[xmax_xzero]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[ymin_yzero]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[ymax_yzero]
type = DirichletBC
variable = disp_y
boundary = top
value = 0.0
[]
[zmin_zzero]
type = DirichletBC
variable = disp_z
boundary = back
value = '0'
[]
[zmax_disp]
type = FunctionDirichletBC
variable = disp_z
boundary = front
function = '1E-6*max(t,0)'
[]
[]
[AuxVariables]
[mc_int]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain]
order = CONSTANT
family = MONOMIAL
[]
[num_iters]
order = CONSTANT
family = MONOMIAL
[]
[yield_fcn]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[mc_int_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_internal_parameter
variable = mc_int
[]
[plastic_strain_aux]
type = MaterialRankTwoTensorAux
i = 2
j = 2
property = plastic_strain
variable = plastic_strain
[]
[num_iters_auxk] # cannot use plastic_NR_iterations directly as this is zero, since no NR iterations are actually used, since we use a custom algorithm to do the return
type = ParsedAux
coupled_variables = plastic_strain
expression = 'if(plastic_strain>0,1,0)'
variable = num_iters
[]
[yield_fcn_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_yield_function
variable = yield_fcn
[]
[]
[UserObjects]
[mc_coh]
type = SolidMechanicsHardeningConstant
value = 5E6
[]
[mc_phi]
type = SolidMechanicsHardeningConstant
value = 35
convert_to_radians = true
[]
[mc_psi]
type = SolidMechanicsHardeningConstant
value = 10
convert_to_radians = true
[]
[mc]
type = SolidMechanicsPlasticMohrCoulombMulti
cohesion = mc_coh
friction_angle = mc_phi
dilation_angle = mc_psi
yield_function_tolerance = 1E-5
internal_constraint_tolerance = 1E-11
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 16E9
poissons_ratio = 0.25
[]
[mc]
type = ComputeMultiPlasticityStress
ep_plastic_tolerance = 1E-11
plastic_models = mc
max_NR_iterations = 1000
debug_fspb = crash
[]
[strain_from_initial_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = '6E6 0 0 0 6E6 0 0 0 6E6'
eigenstrain_name = ini_stress
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
start_time = -1
end_time = 10
dt = 1
dtmin = 1
solve_type = NEWTON
type = Transient
l_tol = 1E-2
nl_abs_tol = 1E-5
nl_rel_tol = 1E-7
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
perf_graph = true
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/cht/flow-around-square-linear-fluidonly.i)
mu = 0.01
rho = 1.1
k = 0.0005
cp = 10
h_conv = 5
advected_interp_method = 'upwind'
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin = 0
ymin = 0
ymax = 0.1
xmax = 0.1
[]
[subdomain1]
type = SubdomainBoundingBoxGenerator
input = generated_mesh
block_name = subdomain1
bottom_left = '0.04 0.04 0'
block_id = 1
top_right = '0.06 0.06 0'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = 0
paired_block = 1
new_boundary = interface
[]
[delete]
type = BlockDeletionGenerator
input = interface
block = 1
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system energy_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
block = 0
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0.1
solver_sys = u_system
block = 0
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.01
block = 0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = 0.2
block = 0
[]
[T_fluid]
type = MooseLinearVariableFVReal
solver_sys = energy_system
initial_condition = 300
block = 0
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = true
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = true
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVAnisotropicDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = true
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[h_advection]
type = LinearFVEnergyAdvection
variable = T_fluid
advected_quantity = temperature
cp = ${cp}
advected_interp_method = ${advected_interp_method}
rhie_chow_user_object = 'rc'
[]
[conduction]
type = LinearFVDiffusion
variable = T_fluid
diffusion_coeff = ${k}
use_nonorthogonal_correction = true
[]
[]
[LinearFVBCs]
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_x
functor = '0.1'
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_y
functor = '0.0'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom interface'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom interface'
variable = vel_y
functor = 0.0
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = 1.4
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_x
use_two_term_expansion = false
boundary = right
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_y
use_two_term_expansion = false
boundary = right
[]
[inlet_T]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_fluid
functor = 300
boundary = 'left'
[]
[walls_T]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
variable = T_fluid
functor = 0.0
boundary = 'top bottom'
[]
[outlet_T]
type = LinearFVAdvectionDiffusionOutflowBC
variable = T_fluid
use_two_term_expansion = false
boundary = right
[]
[fluid_solid]
type = LinearFVConvectiveHeatTransferBC
variable = T_fluid
T_solid = boundary_value
T_fluid = T_fluid
boundary = interface
h = ${h_conv}
[]
[]
[FunctorMaterials]
[rhocpT]
property_name = 'rhocpT'
type = ParsedFunctorMaterial
functor_names = 'T_fluid'
expression = '${rho}*${cp}*T_fluid'
[]
[]
[Functions]
[boundary_value]
type = ConstantFunction
value = 350
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-13
pressure_l_abs_tol = 1e-13
energy_l_abs_tol = 1e-13
momentum_l_tol = 0
pressure_l_tol = 0
energy_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
energy_system = 'energy_system'
momentum_equation_relaxation = 0.8
energy_equation_relaxation = 1.0
pressure_variable_relaxation = 0.3
num_iterations = 1000
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
energy_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
print_fields = false
continue_on_max_its = true
[]
[Outputs]
exodus = true
execute_on = timestep_end
[]
(modules/heat_transfer/test/tests/postprocessors/convective_ht_side_integral.i)
[Mesh]
type = MeshGeneratorMesh
[./cartesian]
type = CartesianMeshGenerator
dim = 2
dx = '0.45 0.1 0.45'
ix = '5 1 5'
dy = '0.45 0.1 0.45'
iy = '5 1 5'
subdomain_id = '1 1 1
1 2 1
1 1 1'
[../]
[./add_iss_1]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = 'interface'
input = cartesian
[../]
[./block_deleter]
type = BlockDeletionGenerator
block = 2
input = add_iss_1
[../]
[]
[Variables]
[./temperature]
initial_condition = 300
[../]
[]
[AuxVariables]
[./channel_T]
family = MONOMIAL
order = CONSTANT
initial_condition = 400
[../]
[./channel_Hw]
family = MONOMIAL
order = CONSTANT
initial_condition = 1000
[../]
[]
[Kernels]
[./graphite_diffusion]
type = HeatConduction
variable = temperature
diffusion_coefficient = 'k_s'
[../]
[]
[BCs]
## boundary conditions for the thm channels in the reflector
[./channel_heat_transfer]
type = CoupledConvectiveHeatFluxBC
variable = temperature
htc = channel_Hw
T_infinity = channel_T
boundary = 'interface'
[../]
# hot boundary on the left
[./left]
type = DirichletBC
variable = temperature
value = 1000
boundary = 'left'
[../]
# cool boundary on the right
[./right]
type = DirichletBC
variable = temperature
value = 300
boundary = 'right'
[../]
[]
[Materials]
[./thermal]
type = GenericConstantMaterial
prop_names = 'k_s'
prop_values = '12'
[../]
[./htc_material]
type = GenericConstantMaterial
prop_names = 'alpha_wall'
prop_values = '1000'
[../]
[./tfluid_mat]
type = PiecewiseLinearInterpolationMaterial
property = tfluid_mat
variable = channel_T
x = '400 500'
y = '400 500'
[../]
[]
[Postprocessors]
[./Qw1]
type = ConvectiveHeatTransferSideIntegral
T_fluid_var = channel_T
htc_var = channel_Hw
T_solid = temperature
boundary = interface
[../]
[./Qw2]
type = ConvectiveHeatTransferSideIntegral
T_fluid_var = channel_T
htc = alpha_wall
T_solid = temperature
boundary = interface
[../]
[./Qw3]
type = ConvectiveHeatTransferSideIntegral
T_fluid = tfluid_mat
htc = alpha_wall
T_solid = temperature
boundary = interface
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/examples/coal_mining/cosserat_wp_only.i)
# Strata deformation and fracturing around a coal mine
#
# A 2D geometry is used that simulates a transverse section of
# the coal mine. The model is actually 3D, but the "x"
# dimension is only 10m long, meshed with 1 element, and
# there is no "x" displacement. The mine is 300m deep
# and just the roof is studied (0<=z<=300). The model sits
# between 0<=y<=450. The excavation sits in 0<=y<=150. This
# is a "half model": the boundary conditions are such that
# the model simulates an excavation sitting in -150<=y<=150
# inside a model of the region -450<=y<=450. The
# excavation height is 3m (ie, the excavation lies within
# 0<=z<=3). Mining is simulated by moving the excavation's
# roof down, until disp_z=-3 at t=1.
# Time is meaningless in this example
# as quasi-static solutions are sought at each timestep, but
# the number of timesteps controls the resolution of the
# process.
#
# The boundary conditions are:
# - disp_x = 0 everywhere
# - disp_y = 0 at y=0 and y=450
# - disp_z = 0 for y>150
# - disp_z = -3 at maximum, for 0<=y<=150. See excav function.
# That is, rollers on the sides, free at top, and prescribed at bottom.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa. The initial stress is consistent with
# the weight force from density 2500 kg/m^3, ie, stress_zz = -0.025*(300-z) MPa
# where gravity = 10 m.s^-2 = 1E-5 MPa m^2/kg. The maximum and minimum
# principal horizontal stresses are assumed to be equal to 0.8*stress_zz.
#
# Below you will see Drucker-Prager parameters and AuxVariables, etc.
# These are not actally used in this example.
#
# Material properties:
# Young's modulus = 8 GPa
# Poisson's ratio = 0.25
# Cosserat layer thickness = 1 m
# Cosserat-joint normal stiffness = large
# Cosserat-joint shear stiffness = 1 GPa
# Weak-plane cohesion = 0.1 MPa
# Weak-plane friction angle = 20 deg
# Weak-plane dilation angle = 10 deg
# Weak-plane tensile strength = 0.1 MPa
# Weak-plane compressive strength = 100 MPa, varying down to 1 MPa when tensile strain = 1
#
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
xmin = -5
xmax = 5
nz = 40
zmin = 0
zmax = 400
bias_z = 1.1
ny = 30 # make this a multiple of 3, so y=150 is at a node
ymin = 0
ymax = 450
[]
[left]
type = SideSetsAroundSubdomainGenerator
new_boundary = 11
normal = '0 -1 0'
input = generated_mesh
[]
[right]
type = SideSetsAroundSubdomainGenerator
new_boundary = 12
normal = '0 1 0'
input = left
[]
[front]
type = SideSetsAroundSubdomainGenerator
new_boundary = 13
normal = '-1 0 0'
input = right
[]
[back]
type = SideSetsAroundSubdomainGenerator
new_boundary = 14
normal = '1 0 0'
input = front
[]
[top]
type = SideSetsAroundSubdomainGenerator
new_boundary = 15
normal = '0 0 1'
input = back
[]
[bottom]
type = SideSetsAroundSubdomainGenerator
new_boundary = 16
normal = '0 0 -1'
input = top
[]
[excav]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '-5 0 0'
top_right = '5 150 3'
input = bottom
[]
[roof]
type = SideSetsBetweenSubdomainsGenerator
new_boundary = 21
primary_block = 0
paired_block = 1
input = excav
[]
[hole]
type = BlockDeletionGenerator
block = 1
input = roof
[]
[]
[GlobalParams]
block = 0
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
[]
[Variables]
[./disp_y]
[../]
[./disp_z]
[../]
[./wc_x]
[../]
[]
[Kernels]
[./cy_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_y
component = 1
[../]
[./cz_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_z
component = 2
[../]
[./x_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[../]
[./x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[../]
[./gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./wc_y]
[../]
[./wc_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./dp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./dp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[./dp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./dp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./dp_shear]
type = MaterialStdVectorAux
index = 0
property = dp_plastic_internal_parameter
variable = dp_shear
[../]
[./dp_tensile]
type = MaterialStdVectorAux
index = 1
property = dp_plastic_internal_parameter
variable = dp_tensile
[../]
[./wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
[../]
[./wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
[../]
[./dp_shear_f]
type = MaterialStdVectorAux
index = 0
property = dp_plastic_yield_function
variable = dp_shear_f
[../]
[./dp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = dp_plastic_yield_function
variable = dp_tensile_f
[../]
[./wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
[../]
[./wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
[../]
[]
[BCs]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '11 12 16 21' # note addition of 16 and 21
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '16'
value = 0.0
[../]
[./no_wc_x]
type = DirichletBC
variable = wc_x
boundary = '11 12'
value = 0.0
[../]
[./roof]
type = FunctionDirichletBC
variable = disp_z
boundary = 21
function = excav_sideways
[../]
[]
[Functions]
[./ini_xx]
type = ParsedFunction
expression = '-0.8*2500*10E-6*(400-z)'
[../]
[./ini_zz]
type = ParsedFunction
expression = '-2500*10E-6*(400-z)'
[../]
[./excav_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax e_h closure_dist'
symbol_values = '1.0 0 150.0 -3.0 15.0'
expression = 'e_h*max(min((t/end_t*(ymax-ymin)+ymin-y)/closure_dist,1),0)'
[../]
[./excav_downwards]
type = ParsedFunction
symbol_names = 'end_t ymin ymax e_h closure_dist'
symbol_values = '1.0 0 150.0 -3.0 15.0'
expression = 'e_h*t/end_t*max(min(((ymax-ymin)+ymin-y)/closure_dist,1),0)'
[../]
[]
[UserObjects]
[./dp_coh_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 2.9 # MPa
value_residual = 3.1 # MPa
rate = 1.0
[../]
[./dp_fric]
type = SolidMechanicsHardeningConstant
value = 0.65 # 37deg
[../]
[./dp_dil]
type = SolidMechanicsHardeningConstant
value = 0.65
[../]
[./dp_tensile_str_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.4 # MPa
rate = 1.0
[../]
[./dp_compressive_str]
type = SolidMechanicsHardeningConstant
value = 1.0E3 # Large!
[../]
[./drucker_prager_model]
type = SolidMechanicsPlasticDruckerPrager
mc_cohesion = dp_coh_strong_harden
mc_friction_angle = dp_fric
mc_dilation_angle = dp_dil
internal_constraint_tolerance = 1 # irrelevant here
yield_function_tolerance = 1 # irrelevant here
[../]
[./wp_coh_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_tan_fric]
type = SolidMechanicsHardeningConstant
value = 0.36 # 20deg
[../]
[./wp_tan_dil]
type = SolidMechanicsHardeningConstant
value = 0.18 # 10deg
[../]
[./wp_tensile_str_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_compressive_str_soften]
type = SolidMechanicsHardeningCubic
value_0 = 100
value_residual = 1.0
internal_limit = 1.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeLayeredCosseratElasticityTensor
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3
[../]
[./strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[../]
[./ini_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
eigenstrain_name = ini_stress
[../]
[./stress]
type = ComputeMultipleInelasticCosseratStress
block = 0
inelastic_models = 'wp'
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./dp]
type = CappedDruckerPragerCosseratStressUpdate
block = 0
warn_about_precision_loss = false
host_youngs_modulus = 8E3
host_poissons_ratio = 0.25
base_name = dp
DP_model = drucker_prager_model
tensile_strength = dp_tensile_str_strong_harden
compressive_strength = dp_compressive_str
max_NR_iterations = 100000
tip_smoother = 0.1E1
smoothing_tol = 0.1E1 # MPa # Must be linked to cohesion
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[../]
[./wp]
type = CappedWeakPlaneCosseratStressUpdate
block = 0
warn_about_precision_loss = false
base_name = wp
cohesion = wp_coh_harden
tan_friction_angle = wp_tan_fric
tan_dilation_angle = wp_tan_dil
tensile_strength = wp_tensile_str_harden
compressive_strength = wp_compressive_str_soften
max_NR_iterations = 10000
tip_smoother = 0.1
smoothing_tol = 0.1 # MPa # Note, this must be tied to cohesion, otherwise get no possible return at cone apex
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0E-3
[../]
[./density]
type = GenericConstantMaterial
prop_names = density
prop_values = 2500
[../]
[]
[Postprocessors]
[./subsidence]
type = PointValue
point = '0 0 400'
variable = disp_z
use_displaced_mesh = false
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
line_search = bt
nl_abs_tol = 1e-3
nl_rel_tol = 1e-5
l_max_its = 30
nl_max_its = 1000
start_time = 0.0
dt = 0.2
end_time = 0.2
[]
[Outputs]
file_base = cosserat_wp_only
time_step_interval = 1
print_linear_residuals = false
csv = true
exodus = true
[./console]
type = Console
output_linear = false
[../]
[]
(test/tests/meshgenerators/block_deletion_generator/block_deletion_test12.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 8
ny = 8
xmin = 0
xmax = 4
ymin = 0
ymax = 4
[]
[mark]
type = SubdomainBoundingBoxGenerator
input = gmg
block_id = 1
bottom_left = '0.9 0.9 0'
top_right = '3.1 3.1 0'
[]
[delete]
type = BlockDeletionGenerator
block = 1
input = 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
[]
(modules/navier_stokes/test/tests/finite_volume/ins/pump/pump_and_counterpump_loop.i)
mu = 1.0
rho = 1.0
[Mesh]
[gen]
type = CartesianMeshGenerator
dim = 2
dx = '0.1 0.8 0.1'
dy = '0.1 0.8 0.1'
ix = '5 20 5'
iy = '5 20 5'
subdomain_id = '1 1 1
1 2 1
1 1 1'
[]
[delete_internal_part]
type = BlockDeletionGenerator
input = gen
block = '2'
new_boundary = 'wall-internal'
[]
[lump_bdries_to_wall]
type = RenameBoundaryGenerator
input = delete_internal_part
old_boundary = 'bottom right top left'
new_boundary = 'wall-external wall-external wall-external wall-external'
[]
[pump_1_domain]
type = ParsedSubdomainMeshGenerator
input = lump_bdries_to_wall
combinatorial_geometry = 'x > 0.3 & x < 0.4 & y > 0.5'
block_id = '3'
[]
[pump_2_domain]
type = ParsedSubdomainMeshGenerator
input = pump_1_domain
combinatorial_geometry = 'x > 0.5 & y > 0.3 & y < 0.4'
block_id = '4'
[]
[rename_blocks]
type = RenameBlockGenerator
input = pump_2_domain
old_block = '1 3 4'
new_block = 'pipe pump_1 pump_2'
[]
[side_pump]
type = ParsedGenerateSideset
input = rename_blocks
included_subdomains = 'pump_1'
included_neighbors = 'pipe'
new_sideset_name = 'pump_side'
normal = '1 0 0'
combinatorial_geometry = 'x > 0.35'
[]
[]
[GlobalParams]
velocity_interp_method = 'rc'
advected_interp_method = 'upwind'
rhie_chow_user_object = 'rc'
[]
[Problem]
material_coverage_check = False
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = vel_x
v = vel_y
pressure = pressure
correct_volumetric_force = true
volumetric_force_functors = 'pump_volume_force_1 pump_volume_force_2'
[]
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
initial_condition = 1
[]
[vel_y]
type = INSFVVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[AuxVariables]
[U]
order = CONSTANT
family = MONOMIAL
fv = true
[]
[]
[AuxKernels]
[mag]
type = VectorMagnitudeAux
variable = U
x = vel_x
y = vel_y
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
rho = ${rho}
[]
[mean_zero_pressure]
type = FVIntegralValueConstraint
variable = pressure
lambda = lambda
phi0 = 0.0
[]
[u_advection]
type = INSFVMomentumAdvection
variable = vel_x
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = vel_x
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = vel_x
momentum_component = 'x'
pressure = pressure
[]
[u_pump_1]
type = INSFVPump
variable = vel_x
momentum_component = 'x'
pump_volume_force = 'pump_volume_force_1'
block = 'pump_1'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = vel_y
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = vel_y
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = vel_y
momentum_component = 'y'
pressure = pressure
[]
[u_pump_2]
type = INSFVPump
variable = vel_y
momentum_component = 'y'
pump_volume_force = 'pump_volume_force_2'
block = 'pump_2'
[]
[]
[FVBCs]
[walls-u]
type = INSFVNoSlipWallBC
boundary = 'wall-internal wall-external'
variable = vel_x
function = '0'
[]
[walls-v]
type = INSFVNoSlipWallBC
boundary = 'wall-internal wall-external'
variable = vel_y
function = '0'
[]
[]
[Functions]
[pump_head]
type = PiecewiseLinear
x = '0.0 10.0'
y = '1000.0 0.0'
[]
[]
[FunctorMaterials]
[pump_mat_1]
type = NSFVPumpFunctorMaterial
rho = ${rho}
speed = 'U'
pressure_head_function = 'pump_head'
rotation_speed = 120
rotation_speed_rated = 100
area_rated = 0.1
volume_rated = 0.01
flow_rate_rated = 1.0
flow_rate = 'flow_rate'
block = 'pump_1'
pump_force_name = 'pump_volume_force_1'
[]
[pump_mat_2]
type = NSFVPumpFunctorMaterial
rho = ${rho}
speed = 'U'
pressure_head_function = 'pump_head'
rotation_speed = 50
rotation_speed_rated = 100
area_rated = 0.1
volume_rated = 0.01
flow_rate_rated = 1.0
flow_rate = 'flow_rate'
block = 'pump_2'
pump_force_name = 'pump_volume_force_2'
[]
[]
[Postprocessors]
[flow_rate]
type = Receiver
default = 1.0
[]
[flow_rate_to_pipe]
type = VolumetricFlowRate
advected_quantity = ${rho}
boundary = 'pump_side'
vel_x = 'vel_x'
vel_y = 'vel_y'
[]
[maximum_speed]
type = ADElementExtremeFunctorValue
functor = vel_x
value_type = max
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = false
[out]
type = CSV
execute_on = FINAL
show = 'flow_rate_to_pipe maximum_speed'
[]
[]
(modules/subchannel/examples/duct/wrapper.i)
# a wrapper mesh for coupling to subchannel
# sqrt(3) / 2 is by how much flat to flat is smaller than corer to corner
f = '${fparse sqrt(3) / 2}'
# units are meters
height = 1.0
duct_inside = 0.085
wrapper_thickness = 0.002
duct_outside = '${fparse duct_inside + 2 * wrapper_thickness}'
# number of radial elements in the wrapper
n_radial = 4
# number of azimuthal elements per side
n_az = 4
# number of axial elements
n_ax = 10
# System variables
T_in = 660
[DefaultElementQuality]
failure_type = warning
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[bisonMesh]
type = PolygonConcentricCircleMeshGenerator
num_sides = 6
num_sectors_per_side = '${n_az} ${n_az} ${n_az} ${n_az} ${n_az} ${n_az}'
background_intervals = 1
background_block_ids = '1'
# note that polygon_size is "like radius"
polygon_size = '${fparse duct_outside / 2}'
duct_sizes = '${fparse duct_inside / 2 / f}'
duct_intervals = '${n_radial}'
duct_block_ids = '2'
# interface_boundary_names = 'inside'
external_boundary_name = 'outside'
[]
[extrude]
type = AdvancedExtruderGenerator
# type = FancyExtruderGenerator
direction = '0 0 1'
input = bisonMesh
heights = '${height}'
num_layers = '${n_ax}'
[]
[inlet_boundary]
type = ParsedGenerateSideset
input = extrude
combinatorial_geometry = 'z < 1e-6'
normal = '0 0 -1'
new_sideset_name = 'inlet'
[]
[outlet_boundary]
type = ParsedGenerateSideset
input = inlet_boundary
combinatorial_geometry = 'z > ${fparse height - 1e-6}'
normal = '0 0 1'
new_sideset_name = 'outlet'
[]
[inside_boundary]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 2
paired_block = 1
new_boundary = 'inside'
input = outlet_boundary
[]
[remove]
type = BlockDeletionGenerator
block = 1
input = inside_boundary
[]
[rename]
type = RenameBlockGenerator
input = remove
old_block = '2'
new_block = 'wrapper'
[]
[rotate]
type = TransformGenerator
input = rename
transform = ROTATE
vector_value = '30 0 0'
[]
coord_type = XYZ
[]
[Functions]
[volumetric_heat_rate]
type = ParsedFunction
expression = '1.0*H'
symbol_names = 'H'
symbol_values = '${height}'
[]
[]
[Variables]
[temperature]
order = FIRST
family = LAGRANGE
[]
[]
[Modules]
[TensorMechanics]
[Master]
add_variables = true
strain = SMALL
incremental = true
generate_output = 'stress_xx stress_yy stress_xy'
temperature = temperature
[block0]
eigenstrain_names = eigenstrain
block = wrapper
[]
[]
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temperature
[]
[heat_source]
type = HeatSource
variable = temperature
function = volumetric_heat_rate
[]
[]
[AuxVariables]
[q_prime]
order = CONSTANT
family = MONOMIAL
[]
[duct_surface_temperature]
[]
[disp_magnitude]
[]
[]
[AuxKernels]
[QPrime]
type = SCMTriDuctQPrimeAux
diffusivity = 'thermal_conductivity'
flat_to_flat = '${fparse duct_inside}'
variable = q_prime
diffusion_variable = temperature
component = normal
boundary = 'inside'
execute_on = 'timestep_end'
[]
[Deformation]
type = ParsedAux
variable = disp_magnitude
coupled_variables = 'disp_x disp_y disp_z'
expression = 'sqrt(disp_x^2 + disp_y^2 + disp_z^2)'
execute_on = 'timestep_end'
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
block = wrapper
bulk_modulus = 0.333333333333e6
poissons_ratio = 0.0
[]
[thermal_strain]
type = ComputeThermalExpansionEigenstrain
block = wrapper
temperature = temperature
stress_free_temperature = ${T_in}
thermal_expansion_coeff = 1e-5
eigenstrain_name = eigenstrain
[]
[stress]
type = ComputeStrainIncrementBasedStress
block = wrapper
[]
[heat_conductor]
type = HeatConductionMaterial
thermal_conductivity = 1.0
block = wrapper
[]
[density]
type = Density
block = wrapper
density = 1.0
[]
[]
[BCs]
[isolated_bc]
type = NeumannBC
variable = temperature
boundary = 'inlet outlet'
[]
[inside_bc]
type = MatchedValueBC
variable = temperature
boundary = 'inside'
v = duct_surface_temperature
[]
[outside_bc]
type = DirichletBC
variable = temperature
boundary = 'outside'
value = '${fparse T_in+10}'
[]
[no_x]
type = DirichletBC
variable = disp_x
boundary = 'inlet outlet'
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_y
boundary = 'inlet outlet'
value = 0.0
[]
[no_z]
type = DirichletBC
variable = disp_z
boundary = 'inlet'
value = 0.0
[]
[]
[ICs]
[temperature_ic]
type = ConstantIC
variable = temperature
value = ${T_in}
[]
[q_prime_ic]
type = ConstantIC
variable = q_prime
value = 0.0
[]
[]
[UserObjects]
[q_prime_uo]
type = LayeredSideAverage
boundary = 'inside'
variable = q_prime
num_layers = 1000
direction = z
execute_on = 'TIMESTEP_END'
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
[Quadrature]
order = THIRD
side_order = FOURTH
[]
[]
[Outputs]
exodus = true
[]
(modules/reactor/test/tests/meshgenerators/reporting_id/cartesian_id/core_zigzag_reporting_id.i)
[Mesh]
[pin1]
type = ConcentricCircleMeshGenerator
num_sectors = 2
radii = '0.4 0.5'
rings = '1 1 1'
has_outer_square = on
pitch = 1.26
preserve_volumes = yes
smoothing_max_it = 3
[]
[pin2]
type = ConcentricCircleMeshGenerator
num_sectors = 2
radii = '0.3 0.4'
rings = '1 1 1'
has_outer_square = on
pitch = 1.26
preserve_volumes = yes
smoothing_max_it = 3
[]
[pin_dummy]
type = RenameBlockGenerator
input = 'pin1'
old_block = '1 2 3'
new_block = '9999 9999 9999'
[]
[assembly1]
type = CartesianIDPatternedMeshGenerator
inputs = 'pin1 pin2'
pattern = ' 1 0 1 0;
0 1 0 1;
1 0 1 0;
0 1 0 1'
assign_type = 'cell'
id_name = 'pin_id'
[]
[assembly2]
type = CartesianIDPatternedMeshGenerator
inputs = 'pin1 pin2'
pattern = ' 0 1 1 0;
1 0 0 1;
1 0 0 1;
0 1 1 0'
assign_type = 'cell'
id_name = 'pin_id'
[]
[assembly_dummy]
type = CartesianIDPatternedMeshGenerator
inputs = 'pin_dummy'
pattern = ' 0 0 0 0;
0 0 0 0;
0 0 0 0;
0 0 0 0'
assign_type = 'cell'
id_name = 'pin_id'
[]
[core_base]
type = CartesianIDPatternedMeshGenerator
inputs = 'assembly1 assembly2 assembly_dummy'
pattern = '0 1;
2 0'
assign_type = 'cell'
id_name = 'assembly_id'
exclude_id = 'assembly_dummy'
[]
[core]
type = BlockDeletionGenerator
input = 'core_base'
block = 9999 # dummy
new_boundary = 'zagged'
[]
final_generator = core
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
execute_on = timestep_end
output_extra_element_ids = true
extra_element_ids_to_output = 'pin_id assembly_id'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d-heated/solid.i)
k = 2
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '0.25 0.25'
dy = '0.2'
ix = '5 5'
iy = '5'
subdomain_id = '0 1'
[]
[delete]
type = BlockDeletionGenerator
input = mesh
block = '0'
[]
[]
[Variables]
[T_solid]
type = MooseVariableFVReal
initial_condition = 300
[]
[]
[AuxVariables]
[T_fluid]
type = MooseVariableFVReal
initial_condition = 300
[]
[]
[MultiApps]
inactive = 'fluid'
[fluid]
type = FullSolveMultiApp
input_files = fluid.i
execute_on = timestep_begin
no_restore = true
[]
[]
[Transfers]
inactive = 'from_fluid to_fluid'
[from_fluid]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = fluid
source_variable = 'T_fluid'
variable = 'T_fluid'
execute_on = timestep_begin
from_blocks = 1
[]
[to_fluid]
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = fluid
source_variable = 'T_solid'
variable = 'T_solid'
execute_on = timestep_begin
to_blocks = 1
[]
[]
[FVKernels]
[conduction]
type = FVDiffusion
variable = T_solid
coeff = ${k}
[]
[source]
type = FVBodyForce
variable = T_solid
function = 25000
[]
[heat_exchange]
type = PINSFVEnergyAmbientConvection
variable = T_solid
h_solid_fluid = 100
T_fluid = T_fluid
T_solid = T_solid
is_solid = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
execute_on = timestep_end
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_rz_cylinder_mortar.i)
rpv_core_gap_size = 0.2
core_outer_radius = 2
rpv_inner_radius = '${fparse 2 + rpv_core_gap_size}'
rpv_outer_radius = '${fparse 2.5 + rpv_core_gap_size}'
rpv_width = '${fparse rpv_outer_radius - rpv_inner_radius}'
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
[gmg]
type = CartesianMeshGenerator
dim = 2
dx = '${core_outer_radius} ${rpv_core_gap_size} ${rpv_width}'
ix = '400 1 100'
dy = 1
iy = '5'
[]
[set_block_id1]
type = SubdomainBoundingBoxGenerator
input = gmg
bottom_left = '0 0 0'
top_right = '${core_outer_radius} 1 0'
block_id = 1
location = INSIDE
[]
[rename_core_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = set_block_id1
primary_block = 1
paired_block = 0
new_boundary = 'core_outer'
[]
[set_block_id3]
type = SubdomainBoundingBoxGenerator
input = rename_core_bdy
bottom_left = '${rpv_inner_radius} 0 0'
top_right = '${rpv_outer_radius} 1 0'
block_id = 3
location = INSIDE
[]
[rename_inner_rpv_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = set_block_id3
primary_block = 3
paired_block = 0
new_boundary = 'rpv_inner'
[]
# comment out for test without gap
[2d_mesh]
type = BlockDeletionGenerator
input = rename_inner_rpv_bdy
block = 0
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = 'rpv_inner'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = 2d_mesh
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = 'core_outer'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
coord_type = RZ
[]
[Variables]
[Tsolid]
initial_condition = 500
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[Kernels]
[heat_source]
type = CoupledForce
variable = Tsolid
block = '${core_blocks}'
v = power_density
[]
[heat_conduction]
type = HeatConduction
variable = Tsolid
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = Tsolid
boundary = 'right' # outer RPV
coefficient = ${rpv_outer_htc}
T_infinity = ${rpv_outer_Tinf}
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = Tsolid
boundary = 'rpv_inner'
primary_emissivity = 0.8
secondary_emissivity = 0.8
[]
[conduction]
type = GapFluxModelConduction
temperature = Tsolid
boundary = 'rpv_inner'
gap_conductivity = 0.1
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = Tsolid
primary_boundary = 'core_outer'
primary_subdomain = 10000
secondary_boundary = 'rpv_inner'
secondary_subdomain = 10001
gap_flux_models = 'radiation conduction'
gap_geometry_type = 'CYLINDER'
[]
[]
[AuxVariables]
[power_density]
block = '${core_blocks}'
initial_condition = 50e3
[]
[]
[Materials]
[simple_mat]
type = HeatConductionMaterial
thermal_conductivity = 34.6 # W/m/K
[]
[]
[Postprocessors]
[Tcore_avg]
type = ElementAverageValue
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${core_blocks}'
[]
[Trpv_avg]
type = ElementAverageValue
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${rpv_blocks}'
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = '${core_blocks}'
[]
[rpv_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = Tsolid
boundary = 'right' # outer RVP
T_fluid = ${rpv_outer_Tinf}
htc = ${rpv_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
expression = '(rpv_convective_out - ptot) / ptot'
pp_names = 'rpv_convective_out ptot'
[]
[flux_from_core] # converges to ptot as the mesh is refined
type = SideDiffusiveFluxIntegral
variable = Tsolid
boundary = core_outer
diffusivity = thermal_conductivity
[]
[flux_into_rpv] # converges to rpv_convective_out as the mesh is refined
type = SideDiffusiveFluxIntegral
variable = Tsolid
boundary = rpv_inner
diffusivity = thermal_conductivity
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = 'rpv_inner core_outer'
variable = Tsolid
[]
[]
[Executioner]
type = Steady
petsc_options = '-snes_converged_reason -pc_svd_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -mat_mffd_err -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = ' lu superlu_dist 1e-5 NONZERO '
'1e-15'
snesmf_reuse_base = false
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_max_its = 100
line_search = none
[]
[Outputs]
exodus = false
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/natural_convection/natural_circulation_dogleg.i)
# natural convection through a dogleg
height = 2.2
density = 1.2
gravity = 10
head = '${fparse height * density * gravity}'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '1 0.2 0.2 0.2 1'
ix = '1 3 3 3 1'
dy = '1 0.2 1'
iy = '12 3 12'
subdomain_id = '2 1 2 2 3
2 1 1 1 3
2 2 2 1 3'
[]
[wall]
type = SideSetsBetweenSubdomainsGenerator
input = mesh
primary_block = '1'
paired_block = '2'
new_boundary = wall
[]
[heated_wall]
type = SideSetsBetweenSubdomainsGenerator
input = wall
primary_block = '1'
paired_block = '3'
new_boundary = heated_wall
[]
[delete]
type = BlockDeletionGenerator
block = '2 3'
input = heated_wall
[]
[]
[GlobalParams]
rhie_chow_user_object = ins_rhie_chow_interpolator
[]
[Modules]
[NavierStokesFV]
compressibility = 'incompressible'
add_energy_equation = true
boussinesq_approximation = true
thermal_expansion = 8e-4
gravity = '0 -${gravity} 0'
density = 1.2
dynamic_viscosity = 1e-3
specific_heat = 300
thermal_conductivity = '10'
initial_velocity = '0 1e-6 0'
initial_pressure = 0
inlet_boundaries = 'bottom'
momentum_inlet_types = 'fixed-pressure'
momentum_inlet_function = '${head}'
energy_inlet_types = 'fixed-temperature'
energy_inlet_function = '300'
wall_boundaries = 'wall heated_wall'
momentum_wall_types = 'slip slip'
energy_wall_types = 'heatflux heatflux'
energy_wall_function = '0 300'
outlet_boundaries = 'top'
momentum_outlet_types = 'fixed-pressure'
pressure_function = '0'
energy_advection_interpolation = 'average'
momentum_advection_interpolation = 'upwind'
mass_advection_interpolation = 'upwind'
friction_blocks = '1'
friction_types = 'Darcy'
friction_coeffs = 'friction_coefficient'
standard_friction_formulation = false
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-8
[]
[FunctorMaterials]
[props]
type = ADGenericFunctorMaterial
prop_names = 'rho'
prop_values = '${density}'
[]
[friction_coefficient]
type = ADGenericVectorFunctorMaterial
prop_names = 'friction_coefficient'
prop_values = '2 2 2'
[]
[]
[Postprocessors]
[inlet_mfr]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
advected_quantity = rho
boundary = bottom
[]
[outlet_mfr]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
advected_quantity = rho
boundary = top
[]
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/block_deletion_generator/block_deletion_test14.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '4 2 3'
dy = '1 2'
ix = '10 10 10'
iy = '8 8'
subdomain_id = '1 2 3
2 2 2'
[]
[ed0]
type = BlockDeletionGenerator
input = cmg
block = '1 3'
[]
[]
[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/meshgenerators/block_deletion_generator/block_deletion_test10.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmin = 0
xmax = 5
ymin = 0
ymax = 5
[]
[left]
type = SubdomainBoundingBoxGenerator
input = gmg
block_id = 1
bottom_left = '2 2 0'
top_right = '3 3 1'
[]
[right]
type = SubdomainBoundingBoxGenerator
input = left
block_id = 2
bottom_left = '3 2 0'
top_right = '4 3 1'
[]
[interior_sideset]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
input = right
new_boundary = interior_ss
[]
[new_block_number]
type = SubdomainBoundingBoxGenerator
block_id = 3
bottom_left = '0 0 0'
top_right = '4 4 1'
input = 'interior_sideset'
[]
[ed0]
type = BlockDeletionGenerator
block = 3
input = '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
[]
(tutorials/tutorial04_meshing/app/test/tests/adv_examples/pcg_xyd.i)
[Mesh]
# make a unit hexagonal pin
[hex_1]
type = PolygonConcentricCircleMeshGenerator
num_sides = 6
num_sectors_per_side = '2 2 2 2 2 2'
background_intervals = 2
ring_radii = 4.0
ring_intervals = 2
ring_block_ids = '10 15'
ring_block_names = 'pin_tri pin_quad'
background_block_ids = 20
background_block_names = pin_background
polygon_size = 5.0
preserve_volumes = on
[]
# stitch the unit pins into a hexagonal pattern
[pattern]
type = PatternedHexMeshGenerator
inputs = 'hex_1'
hexagon_size=25
background_block_id = 30
background_block_name = assembly_background
pattern = '0 0 0;
0 0 0 0;
0 0 0 0 0;
0 0 0 0;
0 0 0'
[]
# Add a layer of circular peripheral region
[tmg1]
type = PeripheralTriangleMeshGenerator
input = pattern
peripheral_ring_radius = 35
peripheral_ring_num_segments = 50
peripheral_ring_block_name = peripheral_1
desired_area = 8
[]
# Add another layer of circular peripheral region
[tmg2]
type = PeripheralTriangleMeshGenerator
input = tmg1
peripheral_ring_radius = 38
peripheral_ring_num_segments = 80
peripheral_ring_block_name = peripheral_2
desired_area = 6
[]
# Define the complex boundary shape using ParsedCurveMG
[pcg1]
type = ParsedCurveGenerator
x_formula = 't1:=t;
t2:=t-1;
t3:=t-2;
t4:=t-3;
x1:=r*cos(t1*(th1-th0)+th0);
x2_0:=r*cos(th1);
x2_1:=x2_0-Lx;
x2:=x2_0+(x2_1-x2_0)*t2;
rs:=abs(r*sin(th1));
rth0:=1.5*pi;
rth1:=0.5*pi;
x3:=x2_1+rs*cos(rth0+(rth1-rth0)*t3);
x4_1:=r*cos(th1);
x4_0:=x4_1-Lx;
x4:=x4_0+(x4_1-x4_0)*t4;
if(t<1,x1,if(t<2,x2,if(t<3,x3,x4)))'
y_formula = 't1:=t;
t2:=t-1;
t3:=t-2;
t4:=t-3;
y1:=r*sin(t1*(th1-th0)+th0);
y2:=r*sin(th1);
rs:=abs(r*sin(th1));
rth0:=1.5*pi;
rth1:=0.5*pi;
y3:=rs*sin(rth0+(rth1-rth0)*t3);
y4:=r*sin(th0);
if(t<1,y1,if(t<2,y2,if(t<3,y3,y4)))'
section_bounding_t_values = '0 1 2 3 4'
constant_names = 'pi r th0 th1 Lx'
constant_expressions = '${fparse pi} 100.0 ${fparse pi/9.0} ${fparse pi/9.0*17.0} 10.0'
nums_segments = '50 3 15 3'
is_closed_loop = true
[]
# fill the curve defined above and include the internal patterned pin regions
[xydg1]
type = XYDelaunayGenerator
boundary = 'pcg1'
holes = 'tmg2'
add_nodes_per_boundary_segment = 0
refine_boundary = false
desired_area = 30
output_subdomain_name = xy_layer_1
stitch_holes = 'true'
refine_holes = 'false'
[]
# Define the control drum pin structure
# As we currently do not have a pure ring mesher
# We will use PCCMG and then delete the hexagonal outermost layer to get the rings
[cd]
type = PolygonConcentricCircleMeshGenerator
num_sides = 6
num_sectors_per_side = '6 6 6 6 6 6'
background_intervals = 2
ring_radii = '27 30 32'
ring_intervals = '2 2 2'
ring_block_ids = '110 115 120 125'
ring_block_names = 'cd_1_tri cd_1_quad cd_2 cd_3'
background_block_ids = 130
background_block_names = cd_background
polygon_size = 40
preserve_volumes = on
[]
# Define the absorber region of the control drum
[cd_azi_define]
type = AzimuthalBlockSplitGenerator
input = cd
start_angle = 300
angle_range = 120
old_blocks = '120'
new_block_ids = '121'
new_block_names = 'absorber'
preserve_volumes = true
[]
# Delete the hexagonal outmost layer
[cd_bd]
type = BlockDeletionGenerator
input = cd_azi_define
block = cd_background
[]
# Translate the control drum to desired position
[cd_translate]
type = TransformGenerator
input = cd_bd
transform = translate
vector_value = '${fparse 100.0*cos(pi/9.0)-10.0} 0 0'
[]
# Define the small pin near the external boundary
# We are using the similar PCCMG+deletion approach
[outer_pin]
type = PolygonConcentricCircleMeshGenerator
num_sides = 6
num_sectors_per_side = '2 2 2 2 2 2'
background_intervals = 2
ring_radii = '10 12'
ring_intervals = '2 2'
ring_block_ids = '210 215 220'
ring_block_names = 'op_1_tri op_1_quad op_2'
background_block_ids = 230
background_block_names = op_background
polygon_size = 15
preserve_volumes = on
[]
# delete the outermost layer to get a circular pin mesh
[op_bd]
type = BlockDeletionGenerator
input = outer_pin
block = op_background
[]
# translate to the desired position
[op_translate]
type = TransformGenerator
input = op_bd
transform = translate
vector_value = '${fparse 120/sqrt(2)} ${fparse 120/sqrt(2)} 0'
[]
# Define the circular curve boundary
[pcg2]
type = ParsedCurveGenerator
x_formula = 'r*cos(t)'
y_formula = 'r*sin(t)'
section_bounding_t_values = '0 ${fparse 2*pi}'
constant_names = 'pi r'
constant_expressions = '${fparse pi} 140.0'
nums_segments = '100'
is_closed_loop = true
[]
# fill the curve defined above including the internal structure, control drum and outer pin
[xydg2]
type = XYDelaunayGenerator
boundary = 'pcg2'
holes = 'xydg1 cd_translate op_translate'
add_nodes_per_boundary_segment = 0
refine_boundary = false
desired_area = 30
output_subdomain_name = xy_layer_2
stitch_holes = 'true true true'
refine_holes = 'false false false'
[]
# add another layer of circular peripheral region
[tmg3]
type = PeripheralTriangleMeshGenerator
input = xydg2
peripheral_ring_radius = 150
peripheral_ring_num_segments = 100
peripheral_ring_block_name = peripheral_3
desired_area = 20
[]
[]
(test/tests/meshgenerators/block_deletion_generator/block_deletion_test1.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
xmin = 0
xmax = 4
ymin = 0
ymax = 4
[]
[SubdomainBoundingBox]
type = SubdomainBoundingBoxGenerator
input = gmg
block_id = 1
bottom_left = '0 0 0'
top_right = '3 3 3'
[]
[ed0]
type = BlockDeletionGenerator
input = SubdomainBoundingBox
block = 1
[]
[]
[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
[]
(modules/solid_mechanics/test/tests/notched_plastic_block/cmc_planar.i)
# Uses an unsmoothed version of capped-Mohr-Coulomb (via ComputeMultiPlasticityStress with SolidMechanicsPlasticTensileMulti and SolidMechanicsPlasticMohrCoulombMulti) to simulate the following problem.
# A cubical block is notched around its equator.
# All of its outer surfaces have roller BCs, but the notched region is free to move as needed
# The block is initialised with a high hydrostatic tensile stress
# Without the notch, the BCs do not allow contraction of the block, and this stress configuration is admissible
# With the notch, however, the interior parts of the block are free to move in order to relieve stress, and this causes plastic failure
# The top surface is then pulled upwards (the bottom is fixed because of the roller BCs)
# This causes more failure
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 9
ny = 9
nz = 9
xmin = 0
xmax = 0.1
ymin = 0
ymax = 0.1
zmin = 0
zmax = 0.1
[]
[block_to_remove_xmin]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 -0.01 0.045'
top_right = '0.01 0.11 0.055'
location = INSIDE
block_id = 1
input = generated_mesh
[]
[block_to_remove_xmax]
type = SubdomainBoundingBoxGenerator
bottom_left = '0.09 -0.01 0.045'
top_right = '0.11 0.11 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_xmin
[]
[block_to_remove_ymin]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 -0.01 0.045'
top_right = '0.11 0.01 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_xmax
[]
[block_to_remove_ymax]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 0.09 0.045'
top_right = '0.11 0.11 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_ymin
[]
[remove_block]
type = BlockDeletionGenerator
block = 1
input = block_to_remove_ymax
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
add_variables = true
incremental = true
generate_output = 'max_principal_stress mid_principal_stress min_principal_stress stress_zz'
eigenstrain_names = ini_stress
[../]
[]
[Postprocessors]
[./uz]
type = PointValue
point = '0 0 0.1'
use_displaced_mesh = false
variable = disp_z
[../]
[./s_zz]
type = ElementAverageValue
use_displaced_mesh = false
variable = stress_zz
[../]
[./num_res]
type = NumResidualEvaluations
[../]
[./nr_its]
type = ElementAverageValue
variable = num_iters
[../]
[./max_nr_its]
type = ElementExtremeValue
variable = num_iters
[../]
[./runtime]
type = PerfGraphData
data_type = TOTAL
section_name = 'Root'
[../]
[]
[BCs]
# back=zmin, front=zmax, bottom=ymin, top=ymax, left=xmin, right=xmax
[./xmin_xzero]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./xmax_xzero]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[../]
[./ymin_yzero]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./ymax_yzero]
type = DirichletBC
variable = disp_y
boundary = top
value = 0.0
[../]
[./zmin_zzero]
type = DirichletBC
variable = disp_z
boundary = back
value = '0'
[../]
[./zmax_disp]
type = FunctionDirichletBC
variable = disp_z
boundary = front
function = '1E-6*max(t,0)'
[../]
[]
[AuxVariables]
[./mc_int]
order = CONSTANT
family = MONOMIAL
[../]
[./plastic_strain]
order = CONSTANT
family = MONOMIAL
[../]
[./num_iters]
order = CONSTANT
family = MONOMIAL
[../]
[./yield_fcn]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./mc_int_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_internal_parameter
variable = mc_int
[../]
[./plastic_strain_aux]
type = MaterialRankTwoTensorAux
i = 2
j = 2
property = plastic_strain
variable = plastic_strain
[../]
[./num_iters_auxk] # cannot use plastic_NR_iterations directly as this is zero, since no NR iterations are actually used, since we use a custom algorithm to do the return
type = ParsedAux
coupled_variables = plastic_strain
expression = 'if(plastic_strain>0,1,0)'
variable = num_iters
[../]
[./yield_fcn_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_yield_function
variable = yield_fcn
[../]
[]
[UserObjects]
[./ts]
type = SolidMechanicsHardeningConstant
value = 3E6
[../]
[./tensile]
type = SolidMechanicsPlasticTensileMulti
tensile_strength = ts
yield_function_tolerance = 1
internal_constraint_tolerance = 1.0E-6
#shift = 1
use_custom_returnMap = false
use_custom_cto = false
[../]
[./mc_coh]
type = SolidMechanicsHardeningConstant
value = 5E6
[../]
[./mc_phi]
type = SolidMechanicsHardeningConstant
value = 35
convert_to_radians = true
[../]
[./mc_psi]
type = SolidMechanicsHardeningConstant
value = 10
convert_to_radians = true
[../]
[./mc]
type = SolidMechanicsPlasticMohrCoulombMulti
cohesion = mc_coh
friction_angle = mc_phi
dilation_angle = mc_psi
yield_function_tolerance = 1E-5
internal_constraint_tolerance = 1E-11
use_custom_returnMap = false
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 16E9
poissons_ratio = 0.25
[../]
[./mc]
type = ComputeMultiPlasticityStress
ep_plastic_tolerance = 1E-6
plastic_models = 'tensile mc'
max_NR_iterations = 50
specialIC = rock
deactivation_scheme = safe_to_dumb
debug_fspb = crash
[../]
[./strain_from_initial_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = '2.5E6 0 0 0 2.5E6 0 0 0 2.5E6'
eigenstrain_name = ini_stress
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
start_time = -1
end_time = 10
dt = 1
solve_type = NEWTON
type = Transient
l_tol = 1E-2
nl_abs_tol = 1E-5
nl_rel_tol = 1E-7
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
file_base = cmc_planar
perf_graph = true
exodus = false
csv = true
[]
(modules/heat_transfer/test/tests/radiative_bcs/ad_radiative_bc_cyl.i)
#
# Thin cylindrical shell with very high thermal conductivity
# so that temperature is almost uniform at 500 K. Radiative
# boundary conditions is applied. Heat flux out of boundary
# 'right' should be 3723.36; this is approached as the mesh
# is refined
#
[Mesh]
type = MeshGeneratorMesh
[cartesian]
type = CartesianMeshGenerator
dim = 2
dx = '1 1'
ix = '1 10'
dy = '1 1'
subdomain_id = '1 2 1 2'
[]
[remove_1]
type = BlockDeletionGenerator
block = 1
input = cartesian
[]
[readd_left]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(x - 1) < 1e-4'
new_sideset_name = left
input = remove_1
[]
[]
[Problem]
coord_type = RZ
[]
[Variables]
[temp]
initial_condition = 800.0
[]
[]
[Kernels]
[heat]
type = ADHeatConduction
variable = temp
[]
[]
[BCs]
[lefttemp]
type = ADDirichletBC
boundary = left
variable = temp
value = 800
[]
[radiative_bc]
type = ADInfiniteCylinderRadiativeBC
boundary = right
variable = temp
boundary_radius = 2
boundary_emissivity = 0.2
cylinder_radius = 3
cylinder_emissivity = 0.7
Tinfinity = 500
[]
[]
[Materials]
[density]
type = ADGenericConstantMaterial
prop_names = 'density thermal_conductivity'
prop_values = '1 1.0e5'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
petsc_options = '-snes_converged_reason'
line_search = none
nl_rel_tol = 1e-6
nl_abs_tol = 1e-7
[]
[Postprocessors]
[right]
type = ADSideDiffusiveFluxAverage
variable = temp
boundary = right
diffusivity = thermal_conductivity
[]
[min_temp]
type = ElementExtremeValue
variable = temp
value_type = min
[]
[max_temp]
type = ElementExtremeValue
variable = temp
value_type = max
[]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/notched_plastic_block/biaxial_abbo.i)
# Uses an Abbo et al smoothed version of Mohr-Coulomb (via SolidMechanicsPlasticMohrCoulomb and ComputeMultiPlasticityStress) to simulate the following problem.
# A cubical block is notched around its equator.
# All of its outer surfaces have roller BCs, but the notched region is free to move as needed
# The block is initialised with a high hydrostatic tensile stress
# Without the notch, the BCs do not allow contraction of the block, and this stress configuration is admissible
# With the notch, however, the interior parts of the block are free to move in order to relieve stress, and this causes plastic failure
# The top surface is then pulled upwards (the bottom is fixed because of the roller BCs)
# This causes more failure
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 9
ny = 9
nz = 9
xmin = 0
xmax = 0.1
ymin = 0
ymax = 0.1
zmin = 0
zmax = 0.1
[]
[block_to_remove_xmin]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 -0.01 0.045'
top_right = '0.01 0.11 0.055'
location = INSIDE
block_id = 1
input = generated_mesh
[]
[block_to_remove_xmax]
type = SubdomainBoundingBoxGenerator
bottom_left = '0.09 -0.01 0.045'
top_right = '0.11 0.11 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_xmin
[]
[block_to_remove_ymin]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 -0.01 0.045'
top_right = '0.11 0.01 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_xmax
[]
[block_to_remove_ymax]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 0.09 0.045'
top_right = '0.11 0.11 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_ymin
[]
[remove_block]
type = BlockDeletionGenerator
block = 1
input = block_to_remove_ymax
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
add_variables = true
incremental = true
generate_output = 'max_principal_stress mid_principal_stress min_principal_stress stress_zz'
eigenstrain_names = ini_stress
[../]
[]
[Postprocessors]
[./uz]
type = PointValue
point = '0 0 0.1'
use_displaced_mesh = false
variable = disp_z
[../]
[./s_zz]
type = ElementAverageValue
use_displaced_mesh = false
variable = stress_zz
[../]
[./num_res]
type = NumResidualEvaluations
[../]
[./nr_its] # num_iters is the average number of NR iterations encountered per element in this timestep
type = ElementAverageValue
variable = num_iters
[../]
[./max_nr_its] # num_iters is the average number of NR iterations encountered in the element in this timestep, so we must get max(max_nr_its) to obtain the max number of iterations
type = ElementExtremeValue
variable = num_iters
[../]
[./runtime]
type = PerfGraphData
data_type = TOTAL
section_name = 'Root'
[../]
[]
[BCs]
# back=zmin, front=zmax, bottom=ymin, top=ymax, left=xmin, right=xmax
[./xmin_xzero]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./xmax_xzero]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[../]
[./ymin_yzero]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./ymax_yzero]
type = DirichletBC
variable = disp_y
boundary = top
value = 0.0
[../]
[./zmin_zzero]
type = DirichletBC
variable = disp_z
boundary = back
value = '0'
[../]
[./zmax_disp]
type = FunctionDirichletBC
variable = disp_z
boundary = front
function = '1E-6*max(t,0)'
[../]
[]
[AuxVariables]
[./mc_int]
order = CONSTANT
family = MONOMIAL
[../]
[./num_iters]
order = CONSTANT
family = MONOMIAL
[../]
[./yield_fcn]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./mc_int_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_internal_parameter
variable = mc_int
[../]
[./num_iters_auxk]
type = MaterialRealAux
property = plastic_NR_iterations
variable = num_iters
[../]
[./yield_fcn_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_yield_function
variable = yield_fcn
[../]
[]
[UserObjects]
[./mc_coh]
type = SolidMechanicsHardeningConstant
value = 5E6
[../]
[./mc_phi]
type = SolidMechanicsHardeningConstant
value = 35
convert_to_radians = true
[../]
[./mc_psi]
type = SolidMechanicsHardeningConstant
value = 10
convert_to_radians = true
[../]
[./mc]
type = SolidMechanicsPlasticMohrCoulomb
cohesion = mc_coh
friction_angle = mc_phi
dilation_angle = mc_psi
mc_tip_smoother = 0.02E6
mc_edge_smoother = 29
yield_function_tolerance = 1E-5
internal_constraint_tolerance = 1E-11
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 16E9
poissons_ratio = 0.25
[../]
[./mc]
type = ComputeMultiPlasticityStress
ep_plastic_tolerance = 1E-11
plastic_models = mc
max_NR_iterations = 1000
debug_fspb = crash
[../]
[./strain_from_initial_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = '6E6 0 0 0 6E6 0 0 0 6E6'
eigenstrain_name = ini_stress
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
start_time = -1
end_time = 10
dt = 1
solve_type = NEWTON
type = Transient
l_tol = 1E-2
nl_abs_tol = 1E-5
nl_rel_tol = 1E-7
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
file_base = biaxial_abbo
perf_graph = true
exodus = false
csv = true
[]
(test/tests/meshgenerators/block_deletion_generator/block_deletion_test11.i)
[Mesh]
[fmg]
type = FileMeshGenerator
file = pyramid.e
[]
[sbb2]
type = SubdomainBoundingBoxGenerator
input = fmg
block_id = 2
bottom_left = '-0.5 -0.5 -0.5'
top_right = '0.5 0.5 0.5'
[]
[swiss_cheese2]
type = BlockDeletionGenerator
block = 2
input = 'sbb2'
[]
[sbb3]
type = SubdomainBoundingBoxGenerator
input = swiss_cheese2
block_id = 3
bottom_left = '-5 -5 -3'
top_right = '-2 -2 -1'
[]
[swiss_cheese3]
type = BlockDeletionGenerator
block = 3
input = 'sbb3'
[]
[sbb4]
type = SubdomainBoundingBoxGenerator
input = swiss_cheese3
block_id = 4
bottom_left = '-1 2 -2'
top_right = '1 5 0'
[]
[swiss_cheese4]
type = BlockDeletionGenerator
block = 4
input = 'sbb4'
[]
[sbb5]
type = OrientedSubdomainBoundingBoxGenerator
input = swiss_cheese4
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 = BlockDeletionGenerator
block = 5
input = 'sbb5'
[]
[sbb6]
type = OrientedSubdomainBoundingBoxGenerator
input = swiss_cheese5
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 = BlockDeletionGenerator
block = 6
input = '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
[]
(modules/contact/test/tests/bouncing-block-contact/frictional-nodal-min-normal-lm-mortar-pdass-tangential-lm-mortar-action.i)
starting_point = 2e-1
# We offset slightly so we avoid the case where the bottom of the secondary block and the top of the
# primary block are perfectly vertically aligned which can cause the backtracking line search some
# issues for a coarse mesh (basic line search handles that fine)
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
[original_file_mesh]
type = FileMeshGenerator
file = long-bottom-block-1elem-blocks-coarse.e
[]
# These sidesets need to be deleted because the contact action adds them automatically. For this
# particular mesh, the new IDs will be identical to the deleted ones and will conflict if we don't
# remove the original ones.
[delete_3]
type = BlockDeletionGenerator
input = original_file_mesh
block = 3
[]
[revised_file_mesh]
type = BlockDeletionGenerator
input = delete_3
block = 4
[]
[]
[Variables]
[disp_x]
block = '1 2'
# order = SECOND
[]
[disp_y]
block = '1 2'
# order = SECOND
[]
[]
[Contact]
[frictional]
primary = 20
secondary = 10
formulation = mortar
model = coulomb
friction_coefficient = 0.1
c_normal = 1.0e-2
c_tangential = 1.0e-1
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
hide = 'contact_pressure nodal_area penetration'
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = frictional_normal_lm
subdomain = frictional_secondary_subdomain
execute_on = 'nonlinear timestep_end'
[]
[]
(test/tests/meshgenerators/block_deletion_generator/block_deletion_test6.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 4
nz = 2
xmin = 0
xmax = 4
ymin = 0
ymax = 4
zmin = 0
zmax = 2
[]
[SubdomainBoundingBox1]
type = SubdomainBoundingBoxGenerator
input = gmg
block_id = 1
bottom_left = '0 0 0'
top_right = '1 2 1'
[]
[SubdomainBoundingBox2]
type = SubdomainBoundingBoxGenerator
input = SubdomainBoundingBox1
block_id = 1
bottom_left = '1 1 0'
top_right = '3 3 1'
[]
[SubdomainBoundingBox3]
type = SubdomainBoundingBoxGenerator
input = SubdomainBoundingBox2
block_id = 1
bottom_left = '2 2 1'
top_right = '3 3 2'
[]
[ed0]
type = BlockDeletionGenerator
block = 1
input = 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
[]
(modules/combined/examples/stochastic/thermomech/graphite_ring_thermomechanics.i)
# Generate 1/4 of a 2-ring disk and extrude it by half to obtain
# 1/8 of a 3D tube. Mirror boundary conditions will exist on the
# cut portions.
[Mesh]
[disk]
type = ConcentricCircleMeshGenerator
num_sectors = 10
radii = '1.0 1.1 1.2'
rings = '1 1 1'
has_outer_square = false
preserve_volumes = false
portion = top_right
[]
[ring]
type = BlockDeletionGenerator
input = disk
block = 1
new_boundary = 'inner'
[]
[cylinder]
type = MeshExtruderGenerator
input = ring
extrusion_vector = '0 0 1.5'
num_layers = 15
bottom_sideset = 'back'
top_sideset = 'front'
[]
[]
[Variables]
[T]
initial_condition = 300
[]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Kernels]
[hc]
type = HeatConduction
variable = T
[]
[TensorMechanics]
displacements = 'disp_x disp_y disp_z'
[]
[]
[BCs]
[temp_inner]
type = FunctionNeumannBC
variable = T
boundary = 'inner'
function = surface_source
[]
[temp_front]
type = ConvectiveHeatFluxBC
variable = T
boundary = 'front'
T_infinity = 300
heat_transfer_coefficient = 10
[]
[temp_outer]
type = ConvectiveHeatFluxBC
variable = T
boundary = 'outer'
T_infinity = 300
heat_transfer_coefficient = 10
[]
# mirror boundary conditions.
[disp_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0.0
[]
[disp_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0.0
[]
[disp_z]
type = DirichletBC
variable = disp_z
boundary = 'back'
value = 0.0
[]
[]
[Materials]
[cond_inner]
type = GenericConstantMaterial
block = 2
prop_names = thermal_conductivity
prop_values = 25
[]
[cond_outer]
type = GenericConstantMaterial
block = 3
prop_names = thermal_conductivity
prop_values = 100
[]
[elasticity_tensor_inner]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
block = 2
[]
[elasticity_tensor_outer]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 3.1e5
poissons_ratio = 0.2
block = 3
[]
[thermal_strain_inner]
type = ComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 2e-6
temperature = T
stress_free_temperature = 300
eigenstrain_name = eigenstrain_inner
block = 2
[]
[thermal_strain_outer]
type = ComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 1e-6
temperature = T
stress_free_temperature = 300
eigenstrain_name = eigenstrain_outer
block = 3
[]
[strain_inner] #We use small deformation mechanics
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
eigenstrain_names = 'eigenstrain_inner'
block = 2
[]
[strain_outer] #We use small deformation mechanics
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
eigenstrain_names = 'eigenstrain_outer'
block = 3
[]
[stress] #We use linear elasticity
type = ComputeLinearElasticStress
[]
[]
[Functions]
[surface_source]
type = ParsedFunction
expression = 'Q_t*pi/2.0/3.0 * cos(pi/3.0*z)'
symbol_names = 'Q_t'
symbol_values = heat_source
[]
[]
[Executioner]
type = Steady
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 101'
l_max_its = 30
nl_max_its = 100
nl_abs_tol = 1e-9
l_tol = 1e-04
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[VectorPostprocessors]
[temp_center]
type = LineValueSampler
variable = T
start_point = '1 0 0'
end_point = '1.2 0 0'
num_points = 11
sort_by = 'x'
[]
[temp_end]
type = LineValueSampler
variable = T
start_point = '1 0 1.5'
end_point = '1.2 0 1.5'
num_points = 11
sort_by = 'x'
[]
[dispx_center]
type = LineValueSampler
variable = disp_x
start_point = '1 0 0'
end_point = '1.2 0 0'
num_points = 11
sort_by = 'x'
[]
[dispx_end]
type = LineValueSampler
variable = disp_x
start_point = '1 0 1.5'
end_point = '1.2 0 1.5'
num_points = 11
sort_by = 'x'
[]
[dispz_end]
type = LineValueSampler
variable = disp_z
start_point = '1 0 1.5'
end_point = '1.2 0 1.5'
num_points = 11
sort_by = 'x'
[]
[]
[Postprocessors]
[heat_source]
type = FunctionValuePostprocessor
function = 1
scale_factor = 10000
execute_on = linear
[]
[temp_center_inner]
type = PointValue
variable = T
point = '1 0 0'
[]
[temp_center_outer]
type = PointValue
variable = T
point = '1.2 0 0'
[]
[temp_end_inner]
type = PointValue
variable = T
point = '1 0 1.5'
[]
[temp_end_outer]
type = PointValue
variable = T
point = '1.2 0 1.5'
[]
[dispx_center_inner]
type = PointValue
variable = disp_x
point = '1 0 0'
[]
[dispx_center_outer]
type = PointValue
variable = disp_x
point = '1.2 0 0'
[]
[dispx_end_inner]
type = PointValue
variable = disp_x
point = '1 0 1.5'
[]
[dispx_end_outer]
type = PointValue
variable = disp_x
point = '1.2 0 1.5'
[]
[dispz_inner]
type = PointValue
variable = disp_z
point = '1 0 1.5'
[]
[dispz_outer]
type = PointValue
variable = disp_z
point = '1.2 0 1.5'
[]
[]
[Outputs]
exodus = false
csv = false
[]
(test/tests/meshgenerators/block_deletion_generator/block_deletion_not_prepared.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '4 2 3'
dy = '1 2'
ix = '10 10 10'
iy = '8 8'
subdomain_id = '1 2 3
2 2 2'
[]
[feg]
type = AdvancedExtruderGenerator
input = cmg
direction = '0 0 1'
heights = 1
num_layers = 1
[]
[bdg]
type = BlockDeletionGenerator
input = feg
block = '1 3'
new_boundary = 'new_external'
[]
[]
(test/tests/transfers/general_field/nearest_node/nearest_position/sub_holes.i)
[Mesh]
# Create a 4 rectangle pin lattice
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 100
xmax = 1
ymax = 1
[]
[pin_1]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x > 0.1 & x < 0.2 & y > 0.1 & y < 0.2'
block_id = 1
[]
[pin_2]
type = ParsedSubdomainMeshGenerator
input = pin_1
combinatorial_geometry = 'x > 0.5 & x < 0.7 & y > 0.1 & y < 0.2'
block_id = 2
[]
[pin_3]
type = ParsedSubdomainMeshGenerator
input = pin_2
combinatorial_geometry = 'x > 0.1 & x < 0.2 & y > 0.4 & y < 0.6'
block_id = 3
[]
[pin_4]
type = ParsedSubdomainMeshGenerator
input = pin_3
combinatorial_geometry = 'x > 0.8 & x < 0.9 & y > 0.7 & y < 0.9'
block_id = 4
[]
[delete_back]
type = BlockDeletionGenerator
input = pin_4
block = '0'
[]
[]
[AuxVariables]
[to_main]
[]
[to_main_elem]
order = CONSTANT
family = MONOMIAL
[]
[]
[ICs]
[pin_1]
type = ConstantIC
variable = to_main
value = 1
block = 1
[]
[pin_2]
type = ConstantIC
variable = to_main
value = 2
block = 2
[]
[pin_3]
type = ConstantIC
variable = to_main
value = 3
block = 3
[]
[pin_4]
type = ConstantIC
variable = to_main
value = 4
block = 4
[]
[pin_1_elem]
type = ConstantIC
variable = to_main_elem
value = 1
block = 1
[]
[pin_2_elem]
type = ConstantIC
variable = to_main_elem
value = 2
block = 2
[]
[pin_3_elem]
type = ConstantIC
variable = to_main_elem
value = 3
block = 3
[]
[pin_4_elem]
type = ConstantIC
variable = to_main_elem
value = 4
block = 4
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
overwrite = true
[]
[]
(test/tests/meshgenerators/block_deletion_generator/block_deletion_test2.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 4
nz = 1
xmin = 0
xmax = 4
ymin = 0
ymax = 4
zmin = 0
zmax = 1
[]
[SubdomainBoundingBox]
type = SubdomainBoundingBoxGenerator
input = gmg
block_id = 1
bottom_left = '0 0 0'
top_right = '3 3 1'
[]
[ed0]
type = BlockDeletionGenerator
input = SubdomainBoundingBox
block = 1
[]
[]
[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
[]
(modules/navier_stokes/test/tests/finite_volume/ins/pump/pump_as_volume_force_loop_pressure_corrected.i)
mu = 1.0
rho = 1.0
[Mesh]
[gen]
type = CartesianMeshGenerator
dim = 2
dx = '0.1 0.8 0.1'
dy = '0.1 0.8 0.1'
ix = '5 20 5'
iy = '5 20 5'
subdomain_id = '1 1 1
1 2 1
1 1 1'
[]
[delete_internal_part]
type = BlockDeletionGenerator
input = gen
block = '2'
new_boundary = 'wall-internal'
[]
[lump_bdries_to_wall]
type = RenameBoundaryGenerator
input = delete_internal_part
old_boundary = 'bottom right top left'
new_boundary = 'wall-external wall-external wall-external wall-external'
[]
[pump_domain]
type = ParsedSubdomainMeshGenerator
input = lump_bdries_to_wall
combinatorial_geometry = 'x > 0.3 & x < 0.7 & y > 0.5'
block_id = '3'
[]
[rename_blocks]
type = RenameBlockGenerator
input = pump_domain
old_block = '1 3'
new_block = 'pipe pump'
[]
[side_pump]
type = ParsedGenerateSideset
input = rename_blocks
included_subdomains = 'pump'
included_neighbors = 'pipe'
new_sideset_name = 'pump_side'
normal = '1 0 0'
combinatorial_geometry = 'x > 0.35'
[]
[]
[GlobalParams]
velocity_interp_method = 'rc'
advected_interp_method = 'upwind'
rhie_chow_user_object = 'rc'
[]
[Problem]
material_coverage_check = False
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = vel_x
v = vel_y
pressure = pressure
correct_volumetric_force = true
volumetric_force_functors = 'pump_force'
volume_force_correction_method = 'pressure-consistent'
[]
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
initial_condition = 1
[]
[vel_y]
type = INSFVVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[AuxVariables]
[U]
order = CONSTANT
family = MONOMIAL
fv = true
[]
[]
[AuxKernels]
[mag]
type = VectorMagnitudeAux
variable = U
x = vel_x
y = vel_y
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
rho = ${rho}
[]
[mean_zero_pressure]
type = FVIntegralValueConstraint
variable = pressure
lambda = lambda
phi0 = 0.0
[]
[u_advection]
type = INSFVMomentumAdvection
variable = vel_x
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = vel_x
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = vel_x
momentum_component = 'x'
pressure = pressure
[]
[u_pump]
type = INSFVBodyForce
variable = vel_x
momentum_component = 'x'
functor = 'pump_force'
block = 'pump'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = vel_y
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = vel_y
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = vel_y
momentum_component = 'y'
pressure = pressure
[]
[]
[FVBCs]
[walls-u]
type = INSFVNoSlipWallBC
boundary = 'wall-internal wall-external'
variable = vel_x
function = '0'
[]
[walls-v]
type = INSFVNoSlipWallBC
boundary = 'wall-internal wall-external'
variable = vel_y
function = '0'
[]
[]
[FunctorMaterials]
[pump_force]
type = PiecewiseByBlockFunctorMaterial
prop_name = 'pump_force'
subdomain_to_prop_value = 'pump 1000.0
pipe 0.0'
[]
[]
[Postprocessors]
[flow_rate]
type = Receiver
default = 1.0
[]
[flow_rate_to_pipe]
type = VolumetricFlowRate
advected_quantity = ${rho}
boundary = 'pump_side'
vel_x = 'vel_x'
vel_y = 'vel_y'
[]
[maximum_speed]
type = ADElementExtremeFunctorValue
functor = vel_x
value_type = max
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = false
[out]
type = CSV
execute_on = FINAL
show = 'flow_rate_to_pipe maximum_speed'
[]
[]
(test/tests/meshgenerators/block_deletion_generator/block_deletion_test3.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
xmin = 0
xmax = 4
ymin = 0
ymax = 4
[]
[SubdomainBoundingBox]
type = SubdomainBoundingBoxGenerator
input = gmg
block_id = 1
bottom_left = '1 1 0'
top_right = '3 3 1'
[]
[ed0]
type = BlockDeletionGenerator
block = 1
input = 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
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_balance/large_gap_heat_transfer_test_rz_cylinder.i)
rpv_core_gap_size = 0.2
core_outer_radius = 2
rpv_inner_radius = '${fparse 2 + rpv_core_gap_size}'
rpv_outer_radius = '${fparse 2.5 + rpv_core_gap_size}'
rpv_width = '${fparse rpv_outer_radius - rpv_inner_radius}'
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
[gmg]
type = CartesianMeshGenerator
dim = 2
dx = '${core_outer_radius} ${rpv_core_gap_size} ${rpv_width}'
ix = '400 1 100'
dy = 1
iy = '5'
[]
[set_block_id1]
type = SubdomainBoundingBoxGenerator
input = gmg
bottom_left = '0 0 0'
top_right = '${core_outer_radius} 1 0'
block_id = 1
location = INSIDE
[]
[rename_core_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = set_block_id1
primary_block = 1
paired_block = 0
new_boundary = 'core_outer'
[]
[set_block_id3]
type = SubdomainBoundingBoxGenerator
input = rename_core_bdy
bottom_left = '${rpv_inner_radius} 0 0'
top_right = '${rpv_outer_radius} 1 0'
block_id = 3
location = INSIDE
[]
[rename_inner_rpv_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = set_block_id3
primary_block = 3
paired_block = 0
new_boundary = 'rpv_inner'
[]
# comment out for test without gap
[2d_mesh]
type = BlockDeletionGenerator
input = rename_inner_rpv_bdy
block = 0
[]
[]
[Problem]
coord_type = RZ
[]
[Variables]
[Tsolid]
initial_condition = 500
[]
[]
[Kernels]
[heat_source]
type = CoupledForce
variable = Tsolid
block = '${core_blocks}'
v = power_density
[]
[heat_conduction]
type = HeatConduction
variable = Tsolid
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = Tsolid
boundary = 'right' # outer RPV
coefficient = ${rpv_outer_htc}
T_infinity = ${rpv_outer_Tinf}
[]
[]
[ThermalContact]
[RPV_gap]
type = GapHeatTransfer
gap_geometry_type = 'CYLINDER'
emissivity_primary = 0.8
emissivity_secondary = 0.8
variable = Tsolid
primary = 'core_outer'
secondary = 'rpv_inner'
gap_conductivity = 0.1
quadrature = true
[]
[]
[AuxVariables]
[power_density]
block = '${core_blocks}'
initial_condition = 50e3
[]
[]
[Materials]
[simple_mat]
type = HeatConductionMaterial
thermal_conductivity = 34.6 # W/m/K
[]
[]
[Postprocessors]
[Tcore_avg]
type = ElementAverageValue
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${core_blocks}'
[]
[Trpv_avg]
type = ElementAverageValue
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${rpv_blocks}'
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = '${core_blocks}'
[]
[rpv_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = Tsolid
boundary = 'right' # outer RVP
T_fluid = ${rpv_outer_Tinf}
htc = ${rpv_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
expression = '(rpv_convective_out - ptot) / ptot'
pp_names = 'rpv_convective_out ptot'
[]
[flux_from_core] # converges to ptot as the mesh is refined
type = SideDiffusiveFluxIntegral
variable = Tsolid
boundary = core_outer
diffusivity = thermal_conductivity
[]
[flux_into_rpv] # converges to rpv_convective_out as the mesh is refined
type = SideDiffusiveFluxIntegral
variable = Tsolid
boundary = rpv_inner
diffusivity = thermal_conductivity
[]
[]
[Executioner]
type = Steady
automatic_scaling = true
compute_scaling_once = false
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_max_its = 100
[Quadrature]
# order = fifth
side_order = seventh
[]
line_search = none
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/meshgenerators/block_deletion_generator/block_deletion_test4.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 4
nz = 1
xmin = 0
xmax = 4
ymin = 0
ymax = 4
zmin = 0
zmax = 1
[]
[SubdomainBoundingBox]
type = SubdomainBoundingBoxGenerator
input = gmg
block_id = 1
bottom_left = '1 1 0'
top_right = '3 3 1'
[]
[ed0]
type = BlockDeletionGenerator
block = 1
input = 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
[]
(modules/navier_stokes/test/tests/finite_volume/ins/pump/pump_loop.i)
mu = 1.0
rho = 1.0
[Mesh]
[gen]
type = CartesianMeshGenerator
dim = 2
dx = '0.1 0.8 0.1'
dy = '0.1 0.8 0.1'
ix = '5 20 5'
iy = '5 20 5'
subdomain_id = '1 1 1
1 2 1
1 1 1'
[]
[delete_internal_part]
type = BlockDeletionGenerator
input = gen
block = '2'
new_boundary = 'wall-internal'
[]
[lump_bdries_to_wall]
type = RenameBoundaryGenerator
input = delete_internal_part
old_boundary = 'bottom right top left'
new_boundary = 'wall-external wall-external wall-external wall-external'
[]
[pump_domain]
type = ParsedSubdomainMeshGenerator
input = lump_bdries_to_wall
combinatorial_geometry = 'x > 0.3 & x < 0.4 & y > 0.5'
block_id = '3'
[]
[rename_blocks]
type = RenameBlockGenerator
input = pump_domain
old_block = '1 3'
new_block = 'pipe pump'
[]
[side_pump]
type = ParsedGenerateSideset
input = rename_blocks
included_subdomains = 'pump'
included_neighbors = 'pipe'
new_sideset_name = 'pump_side'
normal = '1 0 0'
combinatorial_geometry = 'x > 0.35'
[]
[]
[GlobalParams]
velocity_interp_method = 'rc'
advected_interp_method = 'upwind'
rhie_chow_user_object = 'rc'
[]
[Problem]
material_coverage_check = False
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = vel_x
v = vel_y
pressure = pressure
correct_volumetric_force = true
volumetric_force_functors = 'pump_volume_force'
volume_force_correction_method = 'pressure-consistent'
[]
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
initial_condition = 1
[]
[vel_y]
type = INSFVVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[AuxVariables]
[U]
order = CONSTANT
family = MONOMIAL
fv = true
[]
[]
[AuxKernels]
[mag]
type = VectorMagnitudeAux
variable = U
x = vel_x
y = vel_y
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
rho = ${rho}
[]
[mean_zero_pressure]
type = FVIntegralValueConstraint
variable = pressure
lambda = lambda
phi0 = 0.0
[]
[u_advection]
type = INSFVMomentumAdvection
variable = vel_x
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = vel_x
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = vel_x
momentum_component = 'x'
pressure = pressure
[]
[u_pump]
type = INSFVPump
variable = vel_x
momentum_component = 'x'
pump_volume_force = 'pump_volume_force'
block = 'pump'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = vel_y
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = vel_y
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = vel_y
momentum_component = 'y'
pressure = pressure
[]
[]
[FVBCs]
[walls-u]
type = INSFVNoSlipWallBC
boundary = 'wall-internal wall-external'
variable = vel_x
function = '0'
[]
[walls-v]
type = INSFVNoSlipWallBC
boundary = 'wall-internal wall-external'
variable = vel_y
function = '0'
[]
[]
[Functions]
[pump_head]
type = PiecewiseLinear
x = '0.0 10.0'
y = '1000.0 0.0'
[]
[]
[FunctorMaterials]
[pump_mat]
type = NSFVPumpFunctorMaterial
rho = ${rho}
speed = 'U'
pressure_head_function = 'pump_head'
rotation_speed = 120
rotation_speed_rated = 100
area_rated = 0.1
volume_rated = 0.01
flow_rate_rated = 1.0
flow_rate = 'flow_rate'
block = 'pump'
[]
[]
[Postprocessors]
[flow_rate]
type = Receiver
default = 1.0
[]
[flow_rate_to_pipe]
type = VolumetricFlowRate
advected_quantity = ${rho}
boundary = 'pump_side'
vel_x = 'vel_x'
vel_y = 'vel_y'
[]
[maximum_speed]
type = ADElementExtremeFunctorValue
functor = vel_x
value_type = max
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = false
[out]
type = CSV
execute_on = FINAL
show = 'flow_rate_to_pipe maximum_speed'
[]
[]
(modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-fretting-wear-test-action.i)
starting_point = 0.5e-1
offset = -0.045
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = long-bottom-block-1elem-blocks.e
[]
[remote]
type = BlockDeletionGenerator
input = file
block = '3 4'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[Problem]
material_coverage_check = false
kernel_coverage_check = false
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Physics/SolidMechanics/Dynamic]
[all]
hht_alpha = 0.0
newmark_beta = 0.25
newmark_gamma = 0.5
mass_damping_coefficient = 0.0
stiffness_damping_coefficient = 1.0
accelerations = 'accel_x accel_y'
generate_output = 'stress_xx stress_yy'
block = '1 2'
strain = FINITE
density = density
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '7750'
[]
[]
[AuxVariables]
[worn_depth]
block = 'normal_secondary_subdomain'
[]
[gap_vel]
block = 'normal_secondary_subdomain'
[]
[vel_x]
order = FIRST
family = LAGRANGE
[]
[vel_y]
order = FIRST
family = LAGRANGE
[]
[accel_x]
order = FIRST
family = LAGRANGE
[]
[accel_y]
order = FIRST
family = LAGRANGE
[]
[]
[AuxKernels]
[gap_vel]
type = WeightedGapVelAux
variable = gap_vel
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = normal_primary_subdomain
secondary_subdomain = normal_secondary_subdomain
disp_x = disp_x
disp_y = disp_y
[]
[worn_depth]
type = MortarArchardsLawAux
variable = worn_depth
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = normal_primary_subdomain
secondary_subdomain = normal_secondary_subdomain
displacements = 'disp_x disp_y'
friction_coefficient = 0.5
energy_wear_coefficient = 1.0e-6
normal_pressure = normal_normal_lm
execute_on = 'TIMESTEP_END'
[]
[]
[Contact]
[normal]
formulation = mortar
model = coulomb
primary = 20
secondary = 10
c_normal = 1e+06
c_tangential = 1.0e+6
capture_tolerance = 1.0e-5
newmark_beta = 0.25
newmark_gamma = 0.5
mortar_dynamics = true
wear_depth = worn_depth
friction_coefficient = 0.5
normalize_c = true
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(4.0 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * (cos(32.0 * pi / 4 * t) - 1.0)'
[]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 0.05
dtmin = .002
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15'
nl_max_its = 40
l_max_its = 15
line_search = 'l2'
snesmf_reuse_base = true
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(test/tests/meshgenerators/rename_boundary_generator/name_and_id.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
xmin = 0
xmax = 4
ymin = 0
ymax = 4
[]
[SubdomainBoundingBox]
type = SubdomainBoundingBoxGenerator
input = gmg
block_id = 1
bottom_left = '0 0 0'
top_right = '2 2 2'
[]
[ed0]
type = BlockDeletionGenerator
input = SubdomainBoundingBox
block = 1
# this makes a new boundary with an ID of 100 and a name of "100"
new_boundary = '100'
[]
[rename_both_id_and_name]
type = RenameBoundaryGenerator
input = ed0
old_boundary = '100' # this is both an ID and a name, which we want to both rename
new_boundary = '101'
[]
# We compare by element numbers, which are not consistent in parallel
# if this is true
allow_renumbering = false
parallel_type = replicated
[]
[Reporters/mesh_info]
type = MeshInfo
items = sideset_elems
[]
[Outputs]
[out]
type = JSON
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
(modules/contact/test/tests/bouncing-block-contact/frictionless-penalty-weighted-gap-action.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
preset = false
[]
[Mesh]
[mesh_file]
type = FileMeshGenerator
file = long-bottom-block-1elem-blocks.e
[]
[remove_blocks]
type = BlockDeletionGenerator
input = mesh_file
block = '3 4'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[Contact]
[weighted_gap]
formulation = mortar_penalty
model = frictionless
secondary = 10
primary = 20
penalty = 1e0
use_dual = false
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = true
abort_on_solve_fail = true
nl_rel_tol = 1e-13
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[]
(tutorials/tutorial04_meshing/app/test/tests/adv_examples/quarter_circle_connect.i)
l_lat = 5 # length of a lattice edge
l_fuel = 3 # length of the fuel channel (including round end)
r_fuel = 0.5 # radius of the round end
[Mesh]
[Corner_bottom_left_1]
type = ConcentricCircleMeshGenerator
num_sectors = 8
radii = '${fparse r_fuel} ${fparse r_fuel}'
rings = '1 1'
has_outer_square = off
pitch = 2
portion = top_right
preserve_volumes = off
[]
[Corner_bottom_left_2]
type = BlockDeletionGenerator
input = Corner_bottom_left_1
block = '2'
new_boundary = 'curve_1'
[]
[Corner_top_right_1]
type = ConcentricCircleMeshGenerator
num_sectors = 8
radii = ${fparse r_fuel}
rings = '1 1'
has_outer_square = on
pitch = 2
portion = bottom_left
preserve_volumes = off
[]
[Corner_top_right_2]
type = BlockDeletionGenerator
input = Corner_top_right_1
block = '2'
new_boundary = 'curve_2'
[]
[Corner_top_right_3]
type = TransformGenerator
transform = TRANSLATE
vector_value = '${fparse (l_lat-l_fuel)/2+r_fuel} ${fparse (l_lat-l_fuel)/2+r_fuel} 0'
input = Corner_top_right_2
[]
[connect_two_circles]
type = FillBetweenSidesetsGenerator
input_mesh_1 = 'Corner_bottom_left_2'
input_mesh_2 = 'Corner_top_right_3'
boundary_1 = 'curve_1'
boundary_2 = 'curve_2'
num_layers = 8
keep_inputs = true
use_quad_elements = true
block_id = 200
[]
[]
(test/tests/meshgenerators/cyclic/cyclic.i)
[Mesh]
[ccmg]
type = ConcentricCircleMeshGenerator
num_sectors = 6
radii = '0.2546 0.3368'
rings = '4 3 4'
has_outer_square = on
pitch = 1
preserve_volumes = off
smoothing_max_it = 3
[]
[rename_left]
type = RenameBoundaryGenerator
input = ccmg
old_boundary = 'left'
new_boundary = '101'
[]
[left]
type = CartesianMeshGenerator
dim = 2
dx = '5'
dy = '1'
ix = '100'
iy = '16'
[]
[move_it]
type = TransformGenerator
input = left
transform = translate
vector_value = '-5.5 -0.5 0'
[]
[rename_middle]
type = RenameBoundaryGenerator
input = move_it
old_boundary = 'right'
new_boundary = '102'
[]
[stitch]
type = StitchedMeshGenerator
inputs = 'rename_left rename_middle'
stitch_boundaries_pairs = '101 102'
[]
[in_between]
type = SideSetsBetweenSubdomainsGenerator
input = stitch
primary_block = 2
paired_block = 1
new_boundary = 'no_circle'
[]
[delete]
type = BlockDeletionGenerator
input = in_between
block = '1'
[]
[create_fused_top_sideset_l]
input = delete
type = ParsedGenerateSideset
combinatorial_geometry = 'y > 0.49'
normal = '0 1 0'
new_sideset_name = 103
[]
[top_left_block]
type = GeneratedMeshGenerator
xmin = -5.5
xmax = -0.5
ymin = 0.5
ymax = ${fparse 0.5 + 2. / 16.}
nx = 100
ny = 2
dim = 2
[]
[rename_top_left_block]
input = top_left_block
type = RenameBlockGenerator
old_block = '0'
new_block = '100'
[]
[rename_middle_2]
input = rename_top_left_block
type = RenameBoundaryGenerator
old_boundary = 'right'
new_boundary = '104'
[]
[top_middle_block]
type = GeneratedMeshGenerator
xmin = -0.5
xmax = 0.5
ymin = 0.5
ymax = ${fparse 0.5 + 2. / 16.}
nx = 16
ny = 2
dim = 2
[]
[rename_top_middle_block]
input = top_middle_block
type = RenameBlockGenerator
old_block = '0'
new_block = '101'
[]
[rename_left_2]
input = rename_top_middle_block
type = RenameBoundaryGenerator
old_boundary = 'left'
new_boundary = '105'
[]
[stitch_2]
inputs = 'rename_middle_2 rename_left_2'
type = StitchedMeshGenerator
stitch_boundaries_pairs = '104 105'
[]
[create_fused_bottom_sideset]
input = stitch_2
type = ParsedGenerateSideset
combinatorial_geometry = 'y < 0.51'
normal = '0 -1 0'
new_sideset_name = 106
[]
[stitch_3]
inputs = 'create_fused_top_sideset_l create_fused_bottom_sideset'
type = StitchedMeshGenerator
stitch_boundaries_pairs = '103 106'
[]
[rename_extension]
type = RenameBoundaryGenerator
input = no_slip_bottom
old_boundary = 'extension'
new_boundary = '111'
[]
[extension]
type = CartesianMeshGenerator
dim = 2
dx = '5'
dy = '1'
ix = '100'
iy = '16'
[]
[move_it_2]
type = TransformGenerator
input = extension
transform = translate
vector_value = '5.5 -0.5 0'
[]
[stitch_4]
inputs = 'rename_middle rename_extension'
type = StitchedMeshGenerator
stitch_boundaries_pairs = '102 111'
[]
[create_fused_top_sideset_r]
input = stitch_4
type = ParsedGenerateSideset
combinatorial_geometry = 'y > .49'
normal = '0 1 0'
new_sideset_name = 113
[]
[top_right_block]
type = GeneratedMeshGenerator
xmin = 0.5
xmax = 5.5
ymin = 0.5
ymax = ${fparse 0.5 + 2. / 16.}
nx = 100
ny = 2
dim = 2
[]
[rename_top_right_block]
input = top_right_block
type = RenameBlockGenerator
old_block = 'top_right_block'
new_block = '110'
[]
[rename_extension_2]
input = rename_top_right_block
type = RenameBoundaryGenerator
old_boundary = 'rename_extension'
new_boundary = '115'
[]
[stitch_5]
inputs = 'rename_middle_2 rename_extension_2'
type = StitchedMeshGenerator
stitch_boundaries_pairs = '104 115'
[]
[stitch_6]
inputs = 'create_fused_bottom_sideset create_fused_top_sideset_r'
type = StitchedMeshGenerator
stitch_boundaries_pairs = '106 113'
[]
[no_slip_top]
input = stitch_6
type = ParsedGenerateSideset
combinatorial_geometry = 'y > .615'
normal = '0 1 0'
new_sideset_name = 'no_slip_top'
[]
[no_slip_bottom]
input = no_slip_top
type = ParsedGenerateSideset
combinatorial_geometry = 'y < -0.49'
normal = '0 -1 0'
new_sideset_name = 'no_slip_bottom'
[]
[inlet]
input = no_slip_bottom
type = ParsedGenerateSideset
combinatorial_geometry = 'x > 5.49'
normal = '1 0 0'
new_sideset_name = 'inlet'
[]
[outlet]
input = inlet
type = ParsedGenerateSideset
combinatorial_geometry = 'x < -5.49'
normal = '-1 0 0'
new_sideset_name = 'outlet'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/turbulence/bfs/BFS_ERCOFTAC.i)
##########################################################
# ERCOFTAC test case foe BFS
# Case Number: 031
# Author: Dr. Mauricio Tano
# Last Update: November, 2023
# Turbulent model using:
# k-epsilon model
# Equilibrium + Newton wall treatement
# SIMPLE solve
##########################################################
Re = 5100
rho = 1.0
bulk_u = 1.0
H = 1.0
mu = '${fparse rho * bulk_u * H/ Re}'
advected_interp_method = 'upwind'
pressure_tag = "pressure_grad"
### k-epsilon Closure Parameters ###
sigma_k = 1.0
sigma_eps = 1.3
C1_eps = 1.44
C2_eps = 1.92
C_mu = 0.09
### Initial and Boundary Conditions ###
intensity = 0.01
k_init = '${fparse 1.5*(intensity * bulk_u)^2}'
eps_init = '${fparse C_mu^0.75 * k_init^1.5 / H}'
### Modeling parameters ###
bulk_wall_treatment = false
walls = 'bottom wall-side top'
wall_treatment = 'eq_incremental' # Options: eq_newton, eq_incremental, eq_linearized, neq
[Mesh]
[gen]
type = CartesianMeshGenerator
dim = 2
dx = '${fparse 10.0*H} ${fparse 20.0*H}'
dy = '${H} ${fparse 5*H}'
ix = '8 16'
iy = '2 8'
subdomain_id = '
2 1
1 1
'
[]
[corner_walls]
type = SideSetsBetweenSubdomainsGenerator
input = gen
primary_block = '1'
paired_block = '2'
new_boundary = 'wall-side'
[]
[delete_bottom]
type = BlockDeletionGenerator
input = corner_walls
block = '2'
[]
[]
[Problem]
nl_sys_names = 'u_system v_system pressure_system TKE_system TKED_system'
previous_nl_solution_required = true
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
advected_interp_method = ${advected_interp_method}
velocity_interp_method = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolatorSegregated
u = vel_x
v = vel_y
pressure = pressure
[]
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
initial_condition = ${bulk_u}
solver_sys = u_system
two_term_boundary_expansion = false
[]
[vel_y]
type = INSFVVelocityVariable
initial_condition = 0
solver_sys = v_system
two_term_boundary_expansion = false
[]
[pressure]
type = INSFVPressureVariable
initial_condition = 1e-8
solver_sys = pressure_system
two_term_boundary_expansion = false
[]
[TKE]
type = INSFVEnergyVariable
solver_sys = TKE_system
initial_condition = ${k_init}
[]
[TKED]
type = INSFVEnergyVariable
solver_sys = TKED_system
initial_condition = ${eps_init}
[]
[]
[FVKernels]
[u_advection]
type = INSFVMomentumAdvection
variable = vel_x
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = vel_x
mu = ${mu}
momentum_component = 'x'
[]
[u_viscosity_turbulent]
type = INSFVMomentumDiffusion
variable = vel_x
mu = 'mu_t'
momentum_component = 'x'
complete_expansion = true
u = vel_x
v = vel_y
[]
[u_pressure]
type = INSFVMomentumPressure
variable = vel_x
momentum_component = 'x'
pressure = pressure
extra_vector_tags = ${pressure_tag}
[]
[v_advection]
type = INSFVMomentumAdvection
variable = vel_y
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = vel_y
mu = ${mu}
momentum_component = 'y'
[]
[v_viscosity_turbulent]
type = INSFVMomentumDiffusion
variable = vel_y
mu = 'mu_t'
momentum_component = 'y'
complete_expansion = true
u = vel_x
v = vel_y
[]
[v_pressure]
type = INSFVMomentumPressure
variable = vel_y
momentum_component = 'y'
pressure = pressure
extra_vector_tags = ${pressure_tag}
[]
[p_diffusion]
type = FVAnisotropicDiffusion
variable = pressure
coeff = "Ainv"
coeff_interp_method = 'average'
[]
[p_source]
type = FVDivergence
variable = pressure
vector_field = "HbyA"
force_boundary_execution = true
[]
[TKE_advection]
type = INSFVTurbulentAdvection
variable = TKE
rho = ${rho}
[]
[TKE_diffusion]
type = INSFVTurbulentDiffusion
variable = TKE
coeff = ${mu}
[]
[TKE_diffusion_turbulent]
type = INSFVTurbulentDiffusion
variable = TKE
coeff = 'mu_t'
scaling_coef = ${sigma_k}
[]
[TKE_source_sink]
type = INSFVTKESourceSink
variable = TKE
u = vel_x
v = vel_y
epsilon = TKED
rho = ${rho}
mu = ${mu}
mu_t = 'mu_t'
walls = ${walls}
wall_treatment = ${wall_treatment}
[]
[TKED_advection]
type = INSFVTurbulentAdvection
variable = TKED
rho = ${rho}
walls = ${walls}
[]
[TKED_diffusion]
type = INSFVTurbulentDiffusion
variable = TKED
coeff = ${mu}
walls = ${walls}
[]
[TKED_diffusion_turbulent]
type = INSFVTurbulentDiffusion
variable = TKED
coeff = 'mu_t'
scaling_coef = ${sigma_eps}
walls = ${walls}
[]
[TKED_source_sink]
type = INSFVTKEDSourceSink
variable = TKED
u = vel_x
v = vel_y
k = TKE
rho = ${rho}
mu = ${mu}
mu_t = 'mu_t'
C1_eps = ${C1_eps}
C2_eps = ${C2_eps}
walls = ${walls}
wall_treatment = ${wall_treatment}
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = vel_x
functor = '${bulk_u}'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = vel_y
functor = 0
[]
[inlet_TKE]
type = INSFVInletIntensityTKEBC
boundary = 'left'
variable = TKE
u = vel_x
v = vel_y
intensity = ${intensity}
[]
[inlet_TKED]
type = INSFVMixingLengthTKEDBC
boundary = 'left'
variable = TKED
k = TKE
characteristic_length = '${fparse 2*H}'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
functor = 0
[]
[walls-u]
type = FVDirichletBC
boundary = ${walls}
variable = vel_x
value = 0
[]
[walls-v]
type = FVDirichletBC
boundary = ${walls}
variable = vel_y
value = 0
[]
[walls_mu_t]
type = INSFVTurbulentViscosityWallFunction
boundary = ${walls}
variable = mu_t
u = vel_x
v = vel_y
rho = ${rho}
mu = ${mu}
mu_t = 'mu_t'
k = TKE
wall_treatment = ${wall_treatment}
[]
[]
[AuxVariables]
[mu_t]
type = MooseVariableFVReal
initial_condition = '${fparse rho * C_mu * ${k_init}^2 / eps_init}'
two_term_boundary_expansion = false
[]
[]
[AuxKernels]
[compute_mu_t]
type = kEpsilonViscosityAux
variable = mu_t
C_mu = ${C_mu}
k = TKE
epsilon = TKED
mu = ${mu}
rho = ${rho}
u = vel_x
v = vel_y
bulk_wall_treatment = ${bulk_wall_treatment}
walls = ${walls}
wall_treatment = ${wall_treatment}
execute_on = 'NONLINEAR'
[]
[]
[Executioner]
type = SIMPLENonlinearAssembly
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
turbulence_systems = 'TKED_system TKE_system'
pressure_gradient_tag = ${pressure_tag}
momentum_equation_relaxation = 0.7
pressure_variable_relaxation = 0.3
turbulence_equation_relaxation = '0.3 0.3'
num_iterations = 500
pressure_absolute_tolerance = 1e-12
momentum_absolute_tolerance = 1e-12
turbulence_absolute_tolerance = '1e-12 1e-12'
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
momentum_l_abs_tol = 1e-14
pressure_l_abs_tol = 1e-14
turbulence_l_abs_tol = 1e-14
momentum_l_max_its = 30
pressure_l_max_its = 30
momentum_l_tol = 0.0
pressure_l_tol = 0.0
turbulence_l_tol = 0.0
print_fields = false
continue_on_max_its = true
[]
[Outputs]
exodus = true
[console]
type = Console
outlier_variable_norms = false
[]
[]
(modules/solid_mechanics/test/tests/notched_plastic_block/cmc_smooth.i)
# Uses a multi-smoothed version of capped-Mohr-Coulomb (via CappedMohrCoulombStressUpdate and ComputeMultipleInelasticStress) to simulate the following problem.
# A cubical block is notched around its equator.
# All of its outer surfaces have roller BCs, but the notched region is free to move as needed
# The block is initialised with a high hydrostatic tensile stress
# Without the notch, the BCs do not allow contraction of the block, and this stress configuration is admissible
# With the notch, however, the interior parts of the block are free to move in order to relieve stress, and this causes plastic failure
# The top surface is then pulled upwards (the bottom is fixed because of the roller BCs)
# This causes more failure
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 9
ny = 9
nz = 9
xmin = 0
xmax = 0.1
ymin = 0
ymax = 0.1
zmin = 0
zmax = 0.1
[]
[block_to_remove_xmin]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 -0.01 0.045'
top_right = '0.01 0.11 0.055'
location = INSIDE
block_id = 1
input = generated_mesh
[]
[block_to_remove_xmax]
type = SubdomainBoundingBoxGenerator
bottom_left = '0.09 -0.01 0.045'
top_right = '0.11 0.11 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_xmin
[]
[block_to_remove_ymin]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 -0.01 0.045'
top_right = '0.11 0.01 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_xmax
[]
[block_to_remove_ymax]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 0.09 0.045'
top_right = '0.11 0.11 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_ymin
[]
[remove_block]
type = BlockDeletionGenerator
block = 1
input = block_to_remove_ymax
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
add_variables = true
incremental = true
generate_output = 'max_principal_stress mid_principal_stress min_principal_stress stress_zz'
eigenstrain_names = ini_stress
[../]
[]
[Postprocessors]
[./uz]
type = PointValue
point = '0 0 0.1'
use_displaced_mesh = false
variable = disp_z
[../]
[./s_zz]
type = ElementAverageValue
use_displaced_mesh = false
variable = stress_zz
[../]
[./num_res]
type = NumResidualEvaluations
[../]
[./nr_its] # num_iters is the average number of NR iterations encountered per element in this timestep
type = ElementAverageValue
variable = num_iters
[../]
[./max_nr_its] # max_num_iters is the maximum number of NR iterations encountered in the element during the whole simulation
type = ElementExtremeValue
variable = max_num_iters
[../]
[./runtime]
type = PerfGraphData
data_type = TOTAL
section_name = 'Root'
[../]
[]
[BCs]
# back=zmin, front=zmax, bottom=ymin, top=ymax, left=xmin, right=xmax
[./xmin_xzero]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./xmax_xzero]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[../]
[./ymin_yzero]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./ymax_yzero]
type = DirichletBC
variable = disp_y
boundary = top
value = 0.0
[../]
[./zmin_zzero]
type = DirichletBC
variable = disp_z
boundary = back
value = '0'
[../]
[./zmax_disp]
type = FunctionDirichletBC
variable = disp_z
boundary = front
function = '1E-6*max(t,0)'
[../]
[]
[AuxVariables]
[./mc_int]
order = CONSTANT
family = MONOMIAL
[../]
[./num_iters]
order = CONSTANT
family = MONOMIAL
[../]
[./max_num_iters]
order = CONSTANT
family = MONOMIAL
[../]
[./yield_fcn]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./mc_int_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_internal_parameter
variable = mc_int
[../]
[./num_iters_auxk]
type = MaterialRealAux
property = plastic_NR_iterations
variable = num_iters
[../]
[./max_num_iters_auxk]
type = MaterialRealAux
property = max_plastic_NR_iterations
variable = max_num_iters
[../]
[./yield_fcn_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_yield_function
variable = yield_fcn
[../]
[]
[UserObjects]
[./ts]
type = SolidMechanicsHardeningConstant
value = 3E6
[../]
[./cs]
type = SolidMechanicsHardeningConstant
value = 1E16
[../]
[./mc_coh]
type = SolidMechanicsHardeningConstant
value = 5E6
[../]
[./mc_phi]
type = SolidMechanicsHardeningConstant
value = 35
convert_to_radians = true
[../]
[./mc_psi]
type = SolidMechanicsHardeningConstant
value = 10
convert_to_radians = true
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 16E9
poissons_ratio = 0.25
[../]
[./mc]
type = CappedMohrCoulombStressUpdate
tensile_strength = ts
compressive_strength = cs
cohesion = mc_coh
friction_angle = mc_phi
dilation_angle = mc_psi
smoothing_tol = 0.2E6
yield_function_tol = 1E-5
perfect_guess = false # this is so we can observe some Newton-Raphson iterations, for comparison with other models, and it is not optimal in any real-life simulations
[../]
[./stress]
type = ComputeMultipleInelasticStress
inelastic_models = mc
perform_finite_strain_rotations = false
[../]
[./strain_from_initial_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = '2.5E6 0 0 0 2.5E6 0 0 0 2.5E6'
eigenstrain_name = ini_stress
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
start_time = -1
end_time = 10
dt = 1
solve_type = NEWTON
type = Transient
l_tol = 1E-2
nl_abs_tol = 1E-5
nl_rel_tol = 1E-7
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
file_base = cmc_smooth
perf_graph = true
exodus = false
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/pump/pump_as_volume_force_loop_force_corrected.i)
mu = 1.0
rho = 1.0
[Mesh]
[gen]
type = CartesianMeshGenerator
dim = 2
dx = '0.1 0.8 0.1'
dy = '0.1 0.8 0.1'
ix = '5 20 5'
iy = '5 20 5'
subdomain_id = '1 1 1
1 2 1
1 1 1'
[]
[delete_internal_part]
type = BlockDeletionGenerator
input = gen
block = '2'
new_boundary = 'wall-internal'
[]
[lump_bdries_to_wall]
type = RenameBoundaryGenerator
input = delete_internal_part
old_boundary = 'bottom right top left'
new_boundary = 'wall-external wall-external wall-external wall-external'
[]
[pump_domain]
type = ParsedSubdomainMeshGenerator
input = lump_bdries_to_wall
combinatorial_geometry = 'x > 0.3 & x < 0.7 & y > 0.5'
block_id = '3'
[]
[rename_blocks]
type = RenameBlockGenerator
input = pump_domain
old_block = '1 3'
new_block = 'pipe pump'
[]
[side_pump]
type = ParsedGenerateSideset
input = rename_blocks
included_subdomains = 'pump'
included_neighbors = 'pipe'
new_sideset_name = 'pump_side'
normal = '1 0 0'
combinatorial_geometry = 'x > 0.35'
[]
[]
[GlobalParams]
velocity_interp_method = 'rc'
advected_interp_method = 'upwind'
rhie_chow_user_object = 'rc'
[]
[Problem]
material_coverage_check = False
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = vel_x
v = vel_y
pressure = pressure
correct_volumetric_force = true
volumetric_force_functors = 'pump_force'
volume_force_correction_method = 'force-consistent'
[]
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
initial_condition = 1
[]
[vel_y]
type = INSFVVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[AuxVariables]
[U]
order = CONSTANT
family = MONOMIAL
fv = true
[]
[]
[AuxKernels]
[mag]
type = VectorMagnitudeAux
variable = U
x = vel_x
y = vel_y
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
rho = ${rho}
[]
[mean_zero_pressure]
type = FVIntegralValueConstraint
variable = pressure
lambda = lambda
phi0 = 0.0
[]
[u_advection]
type = INSFVMomentumAdvection
variable = vel_x
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = vel_x
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = vel_x
momentum_component = 'x'
pressure = pressure
[]
[u_pump]
type = INSFVBodyForce
variable = vel_x
momentum_component = 'x'
functor = 'pump_force'
block = 'pump'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = vel_y
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = vel_y
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = vel_y
momentum_component = 'y'
pressure = pressure
[]
[]
[FVBCs]
[walls-u]
type = INSFVNoSlipWallBC
boundary = 'wall-internal wall-external'
variable = vel_x
function = '0'
[]
[walls-v]
type = INSFVNoSlipWallBC
boundary = 'wall-internal wall-external'
variable = vel_y
function = '0'
[]
[]
[FunctorMaterials]
[pump_force]
type = PiecewiseByBlockFunctorMaterial
prop_name = 'pump_force'
subdomain_to_prop_value = 'pump 1000.0
pipe 0.0'
[]
[]
[Postprocessors]
[flow_rate]
type = Receiver
default = 1.0
[]
[flow_rate_to_pipe]
type = VolumetricFlowRate
advected_quantity = ${rho}
boundary = 'pump_side'
vel_x = 'vel_x'
vel_y = 'vel_y'
[]
[maximum_speed]
type = ADElementExtremeFunctorValue
functor = vel_x
value_type = max
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = false
[out]
type = CSV
execute_on = FINAL
show = 'flow_rate_to_pipe maximum_speed'
[]
[]
(tutorials/tutorial04_meshing/app/test/tests/reactor_examples/abtr/abtr.i)
# Advanced Burner Test Reactor - 3D Core with Homogeneous Assemblies
[Mesh]
################################# # This parameter allows us to execute the file but stop at this block so we can see intermediate output.
final_generator = abtr_mesh # User: Change this to control, dummy, core, del_dummy, extrude, plane_id, or abtr_mesh
################################
# step 1: control
# step 2: dummy
# step 3: core
# step 4: del_dummy
# step 5: extrude
# step 6: plane_id
# step 7: abtr_mesh
### Step 1. Define homogeneous assembly types
# There are 7 unique assembly types in the core. All assemblies of a given type will be considered the same in terms of materials/cross sections.
[control]
type = SimpleHexagonGenerator
hexagon_size = 7.3425 # Half of the assembly pitch, which is 14.685
hexagon_size_style = 'apothem' # default
element_type = QUAD
block_id = '0'
[]
[inner_core]
type = SimpleHexagonGenerator
hexagon_size = 7.3425
hexagon_size_style = 'apothem'
element_type = QUAD
block_id = '1'
[]
[test_fuel]
type = SimpleHexagonGenerator
hexagon_size = 7.3425
hexagon_size_style = 'apothem'
element_type = QUAD
block_id = '2'
[]
[inner_reflector]
type = SimpleHexagonGenerator
hexagon_size = 7.3425
hexagon_size_style = 'apothem'
element_type = QUAD
block_id = '3'
[]
[outer_core]
type = SimpleHexagonGenerator
hexagon_size = 7.3425
hexagon_size_style = 'apothem'
element_type = QUAD
block_id = '4'
[]
[outer_reflector]
type = SimpleHexagonGenerator
hexagon_size = 7.3425
hexagon_size_style = 'apothem'
element_type = QUAD
block_id = '5'
[]
[shield]
type = SimpleHexagonGenerator
hexagon_size = 7.3425
hexagon_size_style = 'apothem'
element_type = QUAD
block_id = '6'
[]
### Step 2. Define dummy assembly type
### Dummy assemblies are needed only to make a perfect hex pattern and will be deleted later. Note the assignment of block 997.
[dummy]
type = SimpleHexagonGenerator
hexagon_size = 7.3425
hexagon_size_style = 'apothem'
element_type = QUAD
block_id = '997'
[]
### Step 3. Pattern assemblies into a perfect grid by using dummy assemblies to fill in empty slots.
[core]
type = PatternedHexMeshGenerator
inputs = 'control inner_core test_fuel inner_reflector
outer_core outer_reflector shield dummy'
pattern_boundary = none # do not add background coolant or a duct around this pattern
rotate_angle = 0 # do not rotate (default is 90 degrees, i.e. vertex up)
external_boundary_name = radial # external boundary is called 'radial'
generate_core_metadata = false # This is a special case. Even though this is a core, we say "false" since the assemblies
# are homogenized (no pin information) and this is the first invocation of patterning.
pattern = ' 7 7 6 6 6 6 6 6 7 7;
7 6 6 5 5 5 5 5 6 6 7;
6 6 5 5 3 3 3 3 5 5 6 6;
6 5 5 3 3 3 3 3 3 3 5 5 6;
6 5 3 3 3 3 4 4 3 3 3 3 5 6;
6 5 3 3 3 4 4 0 4 4 3 3 3 5 6;
6 5 3 3 4 4 2 1 1 3 4 4 3 3 5 6;
6 5 3 3 4 0 1 1 2 1 1 0 4 3 3 5 6;
7 6 5 3 3 4 1 0 1 1 0 1 4 3 3 5 6 7;
7 6 5 3 3 4 3 1 1 0 1 1 2 4 3 3 5 6 7;
7 6 5 3 3 4 1 2 1 1 2 1 4 3 3 5 6 7;
6 5 3 3 4 0 1 1 0 1 1 0 4 3 3 5 6;
6 5 3 3 4 4 2 1 1 3 4 4 3 3 5 6;
6 5 3 3 3 4 4 0 4 4 3 3 3 5 6;
6 5 3 3 3 3 4 4 3 3 3 3 5 6;
6 5 5 3 3 3 3 3 3 3 5 5 6;
6 6 5 5 3 3 3 3 5 5 6 6;
7 6 6 5 5 5 5 5 6 6 7;
7 7 6 6 6 6 6 6 7 7'
id_name = 'assembly_id' # automatically assigns assembly_ids
assign_type = cell # using cell mode
exclude_id = 'dummy' # don't assign ids to dummy assemblies
[]
### Step 4. Delete dummy assemblies by deleting all elements belonging to block 997.
[del_dummy]
type = BlockDeletionGenerator
input = core
block = 997 # delete the elements in block 997 (these are the dummy blocks)
new_boundary = radial # rename the newly exposed outer boundary 'radial'
[]
### Step 5. Extrude 2D core to 3D.
# The 2D plane will be extruded upwards into 12 "zones" consisting of varying actual thicknesses and meshing subintervals.
[extrude]
type = AdvancedExtruderGenerator
input = del_dummy
heights = '50.24 42.32 17.98 16.88 16.88 16.88 16.89 16.88 19.76 65.66 31.14 30.15'
num_layers = '3 2 1 1 1 1 1 1 1 4 2 2'
direction = '0 0 1'
top_boundary = 998
bottom_boundary = 999
# This changes the block (subdomain) IDs on each axial layer from the original value (0,1,2,3,4,5,6) to something else
# There are more than 7 materials in the problem so we introduce new block IDs such as 8,9,10,11,12 to account for different materials.
# The first row changes the bottom layer block ids 0 1 2 3 4 5 6 to block ids 12 12 12 12 12 11
subdomain_swaps = '0 12 1 12 2 12 3 12 4 12 5 12 6 11;
0 9 1 9 2 9 3 8 4 9 5 10 6 11;
0 4 1 9 2 9 3 8 4 9 5 10 6 11;
0 4 1 1 2 2 3 8 4 3 5 10 6 11;
0 4 1 1 2 2 3 8 4 3 5 10 6 11;
0 4 1 1 2 2 3 8 4 3 5 10 6 11;
0 4 1 1 2 2 3 8 4 3 5 10 6 11;
0 5 1 1 2 2 3 8 4 3 5 10 6 11;
0 6 1 13 2 13 3 8 4 13 5 10 6 11;
0 6 1 14 2 14 3 8 4 14 5 10 6 11;
0 7 1 14 2 14 3 8 4 14 5 10 6 11;
0 15 1 15 2 15 3 15 4 15 5 15 6 11'
# The last row changes the block ids on the top layer
[]
### Step 6. Add reporting IDs ("plane_id") to each plane
# We can later query solution data by plane simply by integrating over elements with the same "plane_id".
# The axial heights here should match heights in the mesh.
[plane_id]
type = PlaneIDMeshGenerator
input = extrude
id_name = plane_id # add reporting ids called 'plane_id'
plane_coordinates = '0.000 50.240 92.560 110.540 127.420
144.300 161.180 178.070 194.950
214.710 280.370 311.510 341.660' # elements between these coordinates will be labeled with the same plane_id
[]
### Step 7. Rename external boundaries to make it easier to reference in Griffin
[abtr_mesh]
type = RenameBoundaryGenerator
input = plane_id
old_boundary = '999 998' # The old boundary '999' is renamed 'bottom'.
# The old boundary '998' is renamed 'top'.
new_boundary = 'bottom top'
[]
# This is a placeholder in case you want to uniformly refine the mesh later on. It does nothing in this example.
uniform_refine = 0
[]
(test/tests/meshgenerators/block_deletion_generator/block_deletion_test5.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
xmin = 0
xmax = 4
ymin = 0
ymax = 4
[]
[SubdomainBoundingBox1]
type = SubdomainBoundingBoxGenerator
input = gmg
block_id = 1
bottom_left = '0 0 0'
top_right = '1 2 1'
[]
[SubdomainBoundingBox2]
type = SubdomainBoundingBoxGenerator
input = SubdomainBoundingBox1
block_id = 1
bottom_left = '1 1 0'
top_right = '3 3 1'
[]
[ed0]
type = BlockDeletionGenerator
block = 1
input = 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
[]
(modules/electromagnetics/test/tests/interfacekernels/electrostatic_contact/contact_conductance_supplied.i)
[Mesh]
[box]
type = CartesianMeshGenerator
dim = 2
dx = '0.5 0.5'
dy = '0.25 0.5 0.25'
ix = '20 20'
iy = '10 20 10'
subdomain_id = '1 1
2 3
1 1'
[]
[rename_subdomains]
type = RenameBlockGenerator
input = box
old_block = '1 2'
new_block = 'stainless_steel graphite'
[]
[create_interface]
type = SideSetsBetweenSubdomainsGenerator
input = rename_subdomains
primary_block = stainless_steel
paired_block = graphite
new_boundary = 'ssg_interface'
[]
[delete_block]
type = BlockDeletionGenerator
input = create_interface
block = 3
[]
[]
[Problem]
coord_type = RZ
[]
[Variables]
[potential_graphite]
block = graphite
[]
[potential_stainless_steel]
block = stainless_steel
[]
[]
[Kernels]
[electric_graphite]
type = ADMatDiffusion
variable = potential_graphite
diffusivity = electrical_conductivity
block = graphite
[]
[electric_stainless_steel]
type = ADMatDiffusion
variable = potential_stainless_steel
diffusivity = electrical_conductivity
block = stainless_steel
[]
[]
[BCs]
[elec_top]
type = DirichletBC
variable = potential_stainless_steel
boundary = top
value = 1
[]
[elec_bottom]
type = DirichletBC
variable = potential_stainless_steel
boundary = bottom
value = 0
[]
[]
[InterfaceKernels]
[electrostatic_contact]
type = ElectrostaticContactCondition
variable = potential_stainless_steel
neighbor_var = potential_graphite
primary_conductivity = electrical_conductivity
secondary_conductivity = electrical_conductivity
boundary = ssg_interface
user_electrical_contact_conductance = 1.47e5 # as described in Cincotti et al (https://doi.org/10.1002/aic.11102)
[]
[]
[Materials]
#graphite
[sigma_graphite]
type = ADGenericConstantMaterial
prop_names = 'electrical_conductivity'
prop_values = 3.33e2
block = graphite
[]
#stainless_steel
[sigma_stainless_steel]
type = ADGenericConstantMaterial
prop_names = 'electrical_conductivity'
prop_values = 1.429e6
block = stainless_steel
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -ksp_grmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 101 preonly ilu 1'
automatic_scaling = true
nl_rel_tol = 1e-09
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder.i)
rpv_core_gap_size = 0.15
core_outer_radius = 2
rpv_inner_radius = '${fparse 2 + rpv_core_gap_size}'
rpv_outer_radius = '${fparse 2.5 + rpv_core_gap_size}'
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
[core_gap_rpv]
type = ConcentricCircleMeshGenerator
num_sectors = 10
radii = '${core_outer_radius} ${rpv_inner_radius} ${rpv_outer_radius}'
rings = '2 1 2'
has_outer_square = false
preserve_volumes = true
portion = full
[]
[rename_core_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = core_gap_rpv
primary_block = 1
paired_block = 2
new_boundary = 'core_outer'
[]
[rename_inner_rpv_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = rename_core_bdy
primary_block = 3
paired_block = 2
new_boundary = 'rpv_inner'
[]
[2d_mesh]
type = BlockDeletionGenerator
input = rename_inner_rpv_bdy
block = 2
[]
allow_renumbering = false
[]
[Variables]
[Tsolid]
initial_condition = 500
[]
[]
[Kernels]
[heat_source]
type = CoupledForce
variable = Tsolid
block = '${core_blocks}'
v = power_density
[]
[heat_conduction]
type = HeatConduction
variable = Tsolid
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = Tsolid
boundary = 'outer' # outer RPV
coefficient = ${rpv_outer_htc}
T_infinity = ${rpv_outer_Tinf}
[]
[]
[ThermalContact]
[RPV_gap]
type = GapHeatTransfer
gap_geometry_type = 'CYLINDER'
emissivity_primary = 0.8
emissivity_secondary = 0.8
variable = Tsolid
primary = 'core_outer'
secondary = 'rpv_inner'
gap_conductivity = 0.1
quadrature = true
cylinder_axis_point_1 = '0 0 0'
cylinder_axis_point_2 = '0 0 5'
[]
[]
[AuxVariables]
[power_density]
block = '${core_blocks}'
initial_condition = 50e3
[]
[]
[Materials]
[simple_mat]
type = HeatConductionMaterial
thermal_conductivity = 34.6 # W/m/K
[]
[]
[Postprocessors]
[Tcore_avg]
type = ElementAverageValue
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${core_blocks}'
[]
[Trpv_avg]
type = ElementAverageValue
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${rpv_blocks}'
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = '${core_blocks}'
[]
[rpv_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = Tsolid
boundary = 'outer' # outer RVP
T_fluid = ${rpv_outer_Tinf}
htc = ${rpv_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
expression = '(rpv_convective_out - ptot) / ptot'
pp_names = 'rpv_convective_out ptot'
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = 'rpv_inner core_outer'
variable = Tsolid
[]
[]
[Executioner]
type = Steady
automatic_scaling = true
compute_scaling_once = false
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_max_its = 100
[Quadrature]
side_order = seventh
[]
line_search = none
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/meshgenerators/block_deletion_generator/block_deletion_test13.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
xmin = 0
xmax = 4
ymin = 0
ymax = 4
[]
[SubdomainBoundingBox]
type = SubdomainBoundingBoxGenerator
input = gmg
block_id = 1
bottom_left = '0 0 0'
top_right = '3 3 3'
[]
[rename]
type = RenameBlockGenerator
input = SubdomainBoundingBox
old_block = 1
new_block = 'my_name'
[]
[ed0]
type = BlockDeletionGenerator
input = rename
block = 'my_name'
[]
[]
[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
[]
(modules/contact/test/tests/bouncing-block-contact/variational-frictional-action.i)
starting_point = 2e-1
# We offset slightly so we avoid the case where the bottom of the secondary block and the top of the
# primary block are perfectly vertically aligned which can cause the backtracking line search some
# issues for a coarse mesh (basic line search handles that fine)
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
[]
[Mesh]
[file_mesh]
type = FileMeshGenerator
file = long-bottom-block-1elem-blocks-coarse.e
[]
[remove]
type = BlockDeletionGenerator
input = file_mesh
block = '3 4'
[]
patch_update_strategy = iteration
[]
# [Problem]
# type = DumpObjectsProblem
# dump_path = Contact/contact_action
# []
[Variables]
[disp_x]
block = '1 2'
scaling = 1e1
[]
[disp_y]
block = '1 2'
scaling = 1e1
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[AuxVariables]
[procid]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[procid]
type = ProcessorIDAux
variable = procid
[]
[]
[Contact]
[contact_action]
model = coulomb
formulation = mortar
c_normal = 1.0e-2
c_tangential = 1.0e-1
friction_coefficient = 0.1
primary = 10
secondary = 20
normalize_c = true
normal_lm_scaling = 1e3
tangential_lm_scaling = 1e2
correct_edge_dropping = true
use_dual = false
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-15'
l_max_its = 30
nl_max_its = 25
line_search = 'none'
nl_rel_tol = 1e-12
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exodus]
type = Exodus
hide = 'procid contact_pressure nodal_area penetration'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]