- inputThe mesh we want to modify
C++ Type:MeshGeneratorName
Controllable:No
Description:The mesh we want to modify
- new_boundaryThe list of boundary names to create on the supplied subdomain
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The list of boundary names to create on the supplied subdomain
SideSetsBetweenSubdomainsGenerator
MeshGenerator that creates a sideset composed of the nodes located between two or more subdomains.
Input Parameters
- replaceFalseIf true, replace the old sidesets. If false, the current sidesets (if any) will be preserved.
Default:False
C++ Type:bool
Controllable:No
Description:If true, replace the old sidesets. If false, the current sidesets (if any) will be preserved.
Optional Parameters
- 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
- excluded_boundariesA set of boundary names or ids whose sides will be excluded from the new sidesets. A side is only added if does not belong to any of these boundaries.
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:A set of boundary names or ids whose sides will be excluded from the new sidesets. A side is only added if does not belong to any of these boundaries.
- included_boundariesA set of boundary names or ids whose sides will be included in the new sidesets. A side is only added if it also belongs to one of these boundaries.
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:A set of boundary names or ids whose sides will be included in the new sidesets. A side is only added if it also belongs to one of these boundaries.
- normal0 0 0If supplied, only faces with normal equal to this, up to normal_tol, will be added to the sidesets specified
Default:0 0 0
C++ Type:libMesh::Point
Controllable:No
Description:If supplied, only faces with normal equal to this, up to normal_tol, will be added to the sidesets specified
- normal_tol0.1If normal is supplied then faces are only added if face_normal.normal_hat >= 1 - normal_tol, where normal_hat = normal/|normal|
Default:0.1
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:If normal is supplied then faces are only added if face_normal.normal_hat >= 1 - normal_tol, where normal_hat = normal/|normal|
- paired_blockThe paired set of blocks for which to draw a sideset between
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:The paired set of blocks for which to draw a sideset between
- primary_blockThe primary set of blocks for which to draw a sideset between
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:The primary set of blocks for which to draw a sideset between
Sideset Restrictions Parameters
- nemesisFalseWhether or not to output the mesh file in the nemesisformat (only if output = true)
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to output the mesh file in the nemesisformat (only if output = true)
- outputFalseWhether or not to output the mesh file after generating the mesh
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to output the mesh file after generating the mesh
- show_infoFalseWhether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)
Debugging Parameters
Input Files
- (test/tests/materials/interface_material/interface_value_material.i)
- (test/tests/auxkernels/current_boundary_id/current_boundary_id.i)
- (modules/heat_transfer/test/tests/gray_lambert_radiator/coupled_heat_conduction.i)
- (test/tests/fviks/auxiliary_variables/fv_reaction_1D.i)
- (test/tests/interfacekernels/ad_coupled_value/coupled.i)
- (test/tests/misc/boundary_variable_check/three-domains/test.i)
- (test/tests/interfacekernels/hybrid/interface.i)
- (modules/phase_field/test/tests/feature_volume_vpp_test/boundary_area_3D.i)
- (test/tests/transfers/general_field/user_object/boundary/main.i)
- (test/tests/postprocessors/interface_value/interface_fe_variable_value_postprocessor.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/block_restriction/2d-rc.i)
- (test/tests/transfers/multiapp_transfer_transformation/transfer_transformation.i)
- (test/tests/misc/save_in/block-restricted-save-in.i)
- (modules/heat_transfer/test/tests/radiation_transfer_action/radiative_transfer_action_external_boundary.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_rz_cylinder.i)
- (test/tests/userobjects/side_uo_with_lowerd_use/side-uo-with-lower-d-use.i)
- (test/tests/interfacekernels/2d_interface/vector_2d.i)
- (modules/phase_field/test/tests/feature_volume_vpp_test/boundary_area_3D_single.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder_mortar_error.i)
- (modules/porous_flow/examples/coal_mining/coarse_with_fluid.i)
- (test/tests/meshgenerators/coarsen_block_generator/coarsen_hex_multi.i)
- (test/tests/linearfvkernels/block-restriction/block-restricted-diffusion.i)
- (test/tests/userobjects/interface_user_object/interface_value_rate_increment_user_object_QP.i)
- (test/tests/meshgenerators/xy_mesh_line_cutter/multi_block_cut.i)
- (test/tests/transfers/multiapp_transfer_transformation/transfer_transformation_sub.i)
- (modules/electromagnetics/test/tests/interfacekernels/electromagnetic_interfaces/combined_default.i)
- (test/tests/fvkernels/boundary_execution/2d.i)
- (test/tests/outputs/debug/show_execution_userobjects.i)
- (modules/heat_transfer/test/tests/view_factors_symmetry/cavity_with_pillars.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/exceptions/bad-restriction.i)
- (modules/heat_transfer/test/tests/fvbcs/fv_functor_convective_heat_flux/fv_functor_convective_heat_flux.i)
- (test/tests/postprocessors/side_integral/side_integral_functor.i)
- (test/tests/meshmodifiers/element_subdomain_modifier/return_moving_boundary.i)
- (test/tests/interfacekernels/ad_coupled_gradient/coupled.i)
- (test/tests/interfacekernels/1d_interface/ik_save_in_test.i)
- (test/tests/fviks/diffusion/test.i)
- (modules/ray_tracing/test/tests/traceray/internal_sidesets/internal_sidesets_3d.i)
- (test/tests/interfacekernels/1d_interface/coupled_value_coupled_flux.i)
- (modules/electromagnetics/test/tests/interfacekernels/electrostatic_contact/contact_conductance_supplied.i)
- (modules/phase_field/test/tests/misc/interface_flux.i)
- (test/tests/interfacekernels/1d_interface/ADMatreaction_1D_transient.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/block-restriction/with-empty-block.i)
- (modules/subchannel/examples/duct/wrapper.i)
- (modules/heat_transfer/test/tests/radiation_transfer_symmetry/cavity_with_pillars_symmetry_bc.i)
- (modules/heat_transfer/test/tests/radiation_transfer_action/radiative_transfer_action.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/natural_convection/natural_circulation_dogleg.i)
- (test/tests/interfacekernels/3d_interface/coupled_value_coupled_flux_with_jump_material.i)
- (test/tests/transfers/general_field/shape_evaluation/boundary/sub.i)
- (test/tests/meshgenerators/refine_sideset_generator/test_secondary.i)
- (modules/phase_field/examples/interfacekernels/interface_fluxbc.i)
- (test/tests/transfers/general_field/nearest_node/boundary/main.i)
- (modules/heat_transfer/test/tests/view_factors/view_factor_obstructed.i)
- (modules/electromagnetics/test/tests/interfacekernels/electromagnetic_interfaces/parallel.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_balance/large_gap_heat_transfer_test_cylinder.i)
- (modules/navier_stokes/test/tests/finite_volume/fviks/convection/convection_channel.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_balance/large_gap_heat_transfer_test_rz_cylinder.i)
- (modules/navier_stokes/test/tests/postprocessors/flow_rates/conservation_INSFE.i)
- (modules/fsi/test/tests/fsi_acoustics/1D_struc_acoustic/1D_struc_acoustic.i)
- (modules/navier_stokes/test/tests/postprocessors/pressure_drop/drop_insad.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/physics/diffusion_interfaces/three_zones.i)
- (test/tests/materials/functor_conversion/conversion_vec.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/scalar_advection/2d-rc-physics.i)
- (test/tests/dgkernels/dg_block_restrict/2d_dg_diffusion_block_restrict.i)
- (modules/rdg/test/tests/advection_1d/block_restrictable.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/block-restriction/segregated/empty-block-segregated.i)
- (modules/ray_tracing/test/tests/raybcs/errors/raybc_errors.i)
- (test/tests/materials/functor_properties/functor-mat-props.i)
- (modules/navier_stokes/test/tests/postprocessors/pressure_drop/drop_insfv.i)
- (modules/heat_transfer/test/tests/multiple_radiation_cavities/multiple_radiation_cavities.i)
- (modules/ray_tracing/test/tests/traceray/internal_sidesets/internal_sidesets_1d.i)
- (test/tests/dgkernels/dg_block_restrict/1d_dg_block_restrict.i)
- (test/tests/interfacekernels/1d_interface/sorted-interface-materials.i)
- (modules/electromagnetics/test/tests/interfacekernels/electromagnetic_interfaces/combined_props.i)
- (test/tests/interfacekernels/1d_interface/mixed_shapes.i)
- (test/tests/meshgenerators/sidesets_between_subdomains_generator/sideset_between_vector_subdomains_generator.i)
- (test/tests/meshgenerators/break_boundary_on_subdomain/break_boundary_on_subdomain.i)
- (test/tests/quadrature/order/block-order.i)
- (test/tests/userobjects/interface_user_object/interface_value_user_object_QP.i)
- (modules/heat_transfer/test/tests/postprocessors/ad_convective_ht_side_integral.i)
- (modules/navier_stokes/test/tests/postprocessors/flow_rates/mass_flux_weighted_pp.i)
- (test/tests/userobjects/domain-user-object/measure-conservation-interface.i)
- (modules/heat_transfer/test/tests/postprocessors/convective_ht_side_integral.i)
- (modules/heat_transfer/test/tests/ad_convective_heat_flux/fe_fv_coupled_error.i)
- (test/tests/scaling/scalar-field-grouping/test.i)
- (modules/ray_tracing/test/tests/outputs/ray_tracing_mesh_output/ray_mesh_output.i)
- (test/tests/transfers/general_field/nearest_node/boundary/sub.i)
- (modules/heat_transfer/test/tests/radiation_transfer_symmetry/cavity_with_pillars.i)
- (modules/heat_transfer/test/tests/radiation_transfer_action/radiative_transfer_no_action.i)
- (test/tests/meshmodifiers/element_subdomain_modifier/adaptivity_moving_boundary.i)
- (modules/navier_stokes/test/tests/finite_volume/wcns/boundary_conditions/with-direction/errors/flux_bcs.i)
- (test/tests/fvkernels/block-restriction/fv-and-fe-block-restriction.i)
- (test/tests/fvkernels/block-restriction/1d.i)
- (test/tests/userobjects/interface_user_object/interface_userobject_material_value.i)
- (modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_1D.i)
- (test/tests/materials/interface_material/interface_value_material_noIK.i)
- (test/tests/meshgenerators/sidesets_between_subdomains_generator/sideset_between_subdomains_not_prepared.i)
- (test/tests/vectorpostprocessors/element_id_counters/side_element_counter.i)
- (test/tests/meshgenerators/block_deletion_generator/delete_interior_parents.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/neighbor-connected-boundary/test.i)
- (modules/ray_tracing/test/tests/outputs/ray_tracing_mesh_output/ray_mesh_output_3d.i)
- (modules/porous_flow/examples/coal_mining/fine_with_fluid.i)
- (modules/phase_field/test/tests/feature_volume_vpp_test/boundary_area_2D_single.i)
- (modules/phase_field/test/tests/misc/interface_grad.i)
- (modules/heat_transfer/test/tests/sideset_heat_transfer/cfem_gap.i)
- (modules/ray_tracing/test/tests/raybcs/reflect_ray_bc/reflect_ray_bc_nonplanar.i)
- (modules/navier_stokes/test/tests/finite_volume/fviks/convection/convection_cavity.i)
- (modules/heat_transfer/test/tests/radiation_transfer_action/radiative_transfer_action_external_boundary_ray_tracing.i)
- (modules/ray_tracing/test/tests/traceray/internal_sidesets/internal_sidesets_2d.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_rz_cylinder_mortar.i)
- (test/tests/misc/boundary_variable_check/test.i)
- (test/tests/linearfvkernels/block-restriction/block-restricted-adr.i)
- (modules/navier_stokes/test/tests/postprocessors/flow_rates/conservation_INSFV.i)
- (test/tests/userobjects/interface_user_object/interface_mp_real_user_object_QP.i)
- (modules/optimization/test/tests/executioners/constrained/shape_optimization/forward.i)
- (test/tests/postprocessors/interface_diffusive_flux/interface_diffusive_flux.i)
- (test/tests/fviks/one-var-diffusion/test.i)
- (test/tests/meshgenerators/sidesets_between_subdomains_generator/between.i)
- (modules/heat_transfer/test/tests/view_factors_symmetry/cavity_with_pillars_symmetry_bc.i)
- (test/tests/meshgenerators/break_boundary_on_subdomain/break_bottom_interface_on_subdomain.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/shock_tube_2D_cavity/hllc_sod_shocktube_2D.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/iks/flow-around-square/flow-around-square.i)
- (modules/navier_stokes/test/tests/postprocessors/flow_rates/conservation_PINSFV.i)
- (test/tests/meshgenerators/sidesets_between_subdomains_generator/sideset_between_subdomains.i)
- (test/tests/interfacekernels/3d_interface/vector_3d.i)
- (test/tests/vectorpostprocessors/element_id_counters/interface_element_counter.i)
- (modules/heat_transfer/test/tests/ad_convective_heat_flux/fe_fv_coupled.i)
- (modules/navier_stokes/test/tests/finite_element/ins/energy-conservation/q1q1.i)
- (modules/navier_stokes/test/tests/finite_element/ins/block-restriction/one-mat-two-eqn-sets.i)
- (test/tests/interfacekernels/1d_interface/reaction_1D_steady.i)
- (test/tests/meshgenerators/block_deletion_generator/block_deletion_test10.i)
- (modules/electromagnetics/test/tests/interfacekernels/electromagnetic_interfaces/perpendicular.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder_mortar.i)
- (modules/navier_stokes/test/tests/finite_element/ins/energy-conservation/q2q1.i)
- (test/tests/fviks/continuity/test.i)
- (test/tests/meshmodifiers/element_subdomain_modifier/steady.i)
- (test/tests/variables/second_derivative/interface_kernels.i)
- (test/tests/interfacekernels/1d_interface/coupled_value_coupled_flux_with_jump_material.i)
- (modules/navier_stokes/test/tests/finite_volume/materials/flow_diode/transient_operation.i)
- (modules/fsi/test/tests/2d-small-strain-transient/fsi_flat_channel.i)
- (modules/phase_field/examples/interfacekernels/interface_gradient.i)
- (test/tests/interfacekernels/3d_interface/coupled_value_coupled_flux.i)
- (test/tests/meshgenerators/coarsen_block_generator/coarsen_quad_multi.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder.i)
- (test/tests/postprocessors/interface_value/interface_fv_variable_value_postprocessor.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/turbulence/bfs/BFS_ERCOFTAC.i)
- (test/tests/indicators/gradient_jump_indicator/gradient_jump_indicator_fv_test.i)
- (modules/fsi/test/tests/fsi_acoustics/3D_struc_acoustic/3D_struc_acoustic.i)
- (modules/electromagnetics/test/tests/interfacekernels/electrostatic_contact/analytic_solution_test_two_block.i)
- (test/tests/postprocessors/interface_diffusive_flux/interface_diffusive_flux_fv.i)
- (test/tests/interfacekernels/2d_interface/coupled_value_coupled_flux.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/block_restriction/segregated/2d-segregated-block.i)
- (modules/solid_mechanics/examples/coal_mining/cosserat_mc_only.i)
- (test/tests/interfacekernels/2d_interface/coupled_value_coupled_flux_with_jump_material.i)
- (test/tests/tag/tag_interface_kernels.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/natural_convection/fuel_cavity.i)
- (test/tests/materials/functor_conversion/conversion.i)
- (modules/thermal_hydraulics/test/tests/userobjects/layered_flow_area_change/layered_flow_area_2D.i)
- (test/tests/fvkernels/block-restriction/just-mat-blk-restriction.i)
- (test/tests/interfacekernels/ik_displaced/displaced.i)
- (modules/solid_mechanics/examples/coal_mining/cosserat_mc_wp.i)
- (test/tests/interfacekernels/adaptivity/adaptivity.i)
- (modules/navier_stokes/examples/flow-over-circle/mesh.i)
- (test/tests/transfers/general_field/shape_evaluation/boundary/main.i)
- (test/tests/meshgenerators/refine_sideset_generator/test_multi.i)
- (modules/heat_transfer/test/tests/radiation_transfer_action/cavity_with_pillar_vf.i)
- (modules/phase_field/test/tests/feature_volume_vpp_test/boundary_area_2D.i)
- (modules/solid_mechanics/examples/coal_mining/cosserat_wp_only.i)
- (modules/electromagnetics/test/tests/interfacekernels/electrostatic_contact/analytic_solution_test_three_block.i)
- (modules/electromagnetics/test/tests/interfacekernels/electrostatic_contact/contact_conductance_calculated.i)
- (test/tests/interfacekernels/1d_interface/single_variable_coupled_flux.i)
- (test/tests/meshgenerators/cyclic/cyclic.i)
- (modules/fsi/test/tests/2d-small-strain-transient/ad-fsi-flat-channel.i)
- (test/tests/meshmodifiers/element_subdomain_modifier/adaptivity_moving_boundary_3d.i)
- (modules/solid_mechanics/examples/coal_mining/cosserat_elastic.i)
- (test/tests/postprocessors/side_average_value/side_average_functor_test.i)
- (test/tests/interfacekernels/auxiliary_variables/reaction_1D_steady.i)
- (test/tests/interfacekernels/1d_interface/reaction_1D_transient.i)
- (test/tests/fvbcs/fv_functor_dirichlet/fv_other_side.i)
- (test/tests/materials/piecewise_by_block_material/discontinuous.i)
- (modules/ray_tracing/test/tests/raykernels/errors/raykernel_errors.i)
- (test/tests/interfacekernels/1d_interface/no-failed-point-inversions.i)
- (test/tests/fviks/diffusion/multisystem.i)
- (test/tests/interfacekernels/2d_interface/coupled_value_coupled_flux_dot.i)
- (modules/porous_flow/test/tests/actions/block_restricted.i)
- (test/tests/outputs/debug/show_execution_fv_flux_objects.i)
- (test/tests/materials/functor_properties/traditional-mat-props.i)
- (test/tests/interfacekernels/1d_interface/ADMatreaction_1D_steady.i)
- (modules/navier_stokes/test/tests/finite_element/ins/block-restriction/two-mats-two-eqn-sets.i)
- (test/tests/interfacekernels/ad_coupled_vector_value/coupled.i)
- (modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_ktemp_1D.i)
- (modules/navier_stokes/test/tests/finite_element/ins/block-restriction/two-mats-one-eqn-set.i)
- (test/tests/interfacekernels/resid_jac_together/jump.i)
- (test/tests/transfers/general_field/user_object/boundary/sub.i)
- (modules/phase_field/test/tests/misc/equal_gradient_lagrange.i)
- (test/tests/fvkernels/mms/broken-domain/diffusion.i)
- (test/tests/outputs/debug/show_execution_kernels_bcs.i)
- (test/tests/interfacekernels/1d_interface/ad-coupled-value-coupled-flux.i)
(test/tests/materials/interface_material/interface_value_material.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
elem_type = QUAD4
[]
[./subdomain_id]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1 0 0'
top_right = '2 2 0'
block_id = 1
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain_id
primary_block = '0'
paired_block = '1'
new_boundary = 'interface'
[../]
[]
[Variables]
[./u]
block = 0
[../]
[./v]
block = 1
[../]
[]
[Kernels]
[./diff]
type = MatDiffusion
variable = u
diffusivity = 'diffusivity'
block = 0
[../]
[./diff_v]
type = MatDiffusion
variable = v
diffusivity = 'diffusivity'
block = 1
[../]
[]
[InterfaceKernels]
[tied]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
jump_prop_name = "average_jump"
penalty = 1e6
boundary = 'interface'
[]
[]
[BCs]
[u_left]
type = DirichletBC
boundary = 'left'
variable = u
value = 1
[]
[v_right]
type = DirichletBC
boundary = 'right'
variable = v
value = 0
[]
[]
[Materials]
[./stateful1]
type = StatefulMaterial
block = 0
initial_diffusivity = 1
# outputs = all
[../]
[./stateful2]
type = StatefulMaterial
block = 1
initial_diffusivity = 2
# outputs = all
[../]
[./interface_material_avg]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = average
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
[../]
[./interface_material_jump_primary_minus_secondary]
type = ADInterfaceValueMaterial # To test generic routines
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = jump_primary_minus_secondary
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
[../]
[./interface_material_jump_secondary_minus_primary]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = jump_secondary_minus_primary
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
[../]
[./interface_material_jump_abs]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = jump_abs
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
[../]
[./interface_material_primary]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = primary
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
[../]
[./interface_material_secondary]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
mat_prop_var_out_basename = diff_var
boundary = interface
interface_value_type = secondary
nl_var_primary = u
nl_var_secondary = v
[../]
[]
[AuxKernels]
[./interface_material_avg]
type = MaterialRealAux
property = diff_average
variable = diffusivity_average
boundary = interface
[]
[./interface_material_jump_primary_minus_secondary]
type = MaterialRealAux
property = diff_jump_primary_minus_secondary
variable = diffusivity_jump_primary_minus_secondary
boundary = interface
[]
[./interface_material_jump_secondary_minus_primary]
type = MaterialRealAux
property = diff_jump_secondary_minus_primary
variable = diffusivity_jump_secondary_minus_primary
boundary = interface
[]
[./interface_material_jump_abs]
type = MaterialRealAux
property = diff_jump_abs
variable = diffusivity_jump_abs
boundary = interface
[]
[./interface_material_primary]
type = MaterialRealAux
property = diff_primary
variable = diffusivity_primary
boundary = interface
[]
[./interface_material_secondary]
type = MaterialRealAux
property = diff_secondary
variable = diffusivity_secondary
boundary = interface
[]
[diffusivity_var]
type = MaterialRealAux
property = diffusivity
variable = diffusivity_var
[]
[]
[AuxVariables]
[diffusivity_var]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_average]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_jump_primary_minus_secondary]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_jump_secondary_minus_primary]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_jump_abs]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_primary]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_secondary]
family = MONOMIAL
order = CONSTANT
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(test/tests/auxkernels/current_boundary_id/current_boundary_id.i)
#
# This is used to create the mesh but it does not work with --distributed-mesh flag
# and the parallel test bombs.
#
#[Mesh]
# type = MeshGeneratorMesh
#
# [./cartesian]
# type = CartesianMeshGenerator
# dim = 2
# dx = '1 1'
# ix = '10 10'
# dy = '1'
# iy = '10'
# subdomain_id = '1 2'
# [../]
#
# [./interior_bc]
# type = SideSetsBetweenSubdomainsGenerator
# primary_block = 1
# paired_block = 2
# new_boundary = 12
# input = cartesian
# [../]
#[]
[Mesh]
type = FileMesh
file = current_boundary_id_in.e
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./u]
[../]
[]
[Executioner]
type = Steady
[]
[AuxVariables]
[./id1]
family = MONOMIAL
order = CONSTANT
[]
[./id2]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[./id1]
type = BIDAux
variable = id1
boundary = 'top'
[../]
[./id2]
type = BIDAux
variable = id2
boundary = '12'
[../]
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/gray_lambert_radiator/coupled_heat_conduction.i)
[Problem]
kernel_coverage_check = false
[]
[Mesh]
type = MeshGeneratorMesh
[./cartesian]
type = CartesianMeshGenerator
dim = 2
dx = '1 1 1'
ix = '2 2 2'
dy = '5'
iy = '10'
subdomain_id = '1 2 3'
[../]
[./break_sides]
type = BreakBoundaryOnSubdomainGenerator
boundaries = 'bottom top'
input = cartesian
[../]
[./left_interior]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = left_interior
input = break_sides
[../]
[./right_interior]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 3
paired_block = 2
new_boundary = right_interior
input = left_interior
[../]
[./rename]
type = RenameBlockGenerator
input = right_interior
old_block = '1 2 3'
new_block = '1 4 3'
[../]
[]
[Variables]
[./temperature]
initial_condition = 300
block = '1 3'
[../]
[]
[Kernels]
[./heat_conduction]
type = HeatConduction
variable = temperature
diffusion_coefficient = 1
block = '1 3'
[../]
[]
[UserObjects]
[./cavity_radiation]
type = ConstantViewFactorSurfaceRadiation
boundary = 'left_interior right_interior bottom_to_2 top_to_2'
temperature = temperature
emissivity = '0.8 0.8 0.8 0.8'
adiabatic_boundary = 'bottom_to_2 top_to_2'
# these view factors are made up to exactly balance energy
# transfer through the cavity
view_factors = '0 0.8 0.1 0.1;
0.8 0 0.1 0.1;
0.45 0.45 0 0.1;
0.45 0.45 0.1 0'
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[../]
[]
[BCs]
[./bottom_left]
type = DirichletBC
preset = false
variable = temperature
boundary = bottom_to_1
value = 1500
[../]
[./top_right]
type = DirichletBC
preset = false
variable = temperature
boundary = top_to_3
value = 300
[../]
[./radiation]
type = GrayLambertNeumannBC
variable = temperature
reconstruct_emission = false
surface_radiation_object_name = cavity_radiation
boundary = 'left_interior right_interior'
[../]
[]
[Postprocessors]
[./qdot_left]
type = GrayLambertSurfaceRadiationPP
boundary = left_interior
surface_radiation_object_name = cavity_radiation
return_type = HEAT_FLUX_DENSITY
[../]
[./qdot_right]
type = GrayLambertSurfaceRadiationPP
boundary = right_interior
surface_radiation_object_name = cavity_radiation
return_type = HEAT_FLUX_DENSITY
[../]
[./qdot_top]
type = GrayLambertSurfaceRadiationPP
boundary = top_to_2
surface_radiation_object_name = cavity_radiation
return_type = HEAT_FLUX_DENSITY
[../]
[./qdot_bottom]
type = GrayLambertSurfaceRadiationPP
boundary = bottom_to_2
surface_radiation_object_name = cavity_radiation
return_type = HEAT_FLUX_DENSITY
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(test/tests/fviks/auxiliary_variables/fv_reaction_1D.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'subdomain1'
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[]
[Variables]
[u]
type = MooseVariableFVReal
block = '0'
[]
[]
[AuxVariables]
[v]
type = MooseVariableFVReal
block = '1'
initial_condition = 4
[]
[]
[FVKernels]
[diff_u]
type = FVDiffusion
variable = u
block = '0'
coeff = 1
[]
[]
[FVInterfaceKernels]
[interface]
type = FVDiffusionInterface
variable1 = u
variable2 = 'v'
boundary = 'primary0_interface'
coeff1 = 1
coeff2= 2
subdomain1 = 0
subdomain2 = 1
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_rel_tol = 1e-10
nl_forced_its = 2
[]
[Problem]
kernel_coverage_check = false
[]
[Outputs]
csv = true
[]
[Postprocessors]
[min]
type = ElementExtremeValue
variable = 'u'
value_type = 'min'
block = '0'
[]
[max]
type = ElementExtremeValue
variable = 'u'
block = '0'
[]
[]
(test/tests/interfacekernels/ad_coupled_value/coupled.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 20
xmax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[../]
[./interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[]
[Variables]
[./u]
block = '0'
[../]
[./v]
block = '1'
[../]
[w][]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
block = 0
[../]
[./diff_v]
type = Diffusion
variable = v
block = 1
[../]
[diff_w]
type = Diffusion
variable = w
[]
[]
[InterfaceKernels]
[./interface]
type = ADCoupledInterfacialSource
variable = u
neighbor_var = v
var_source = w
boundary = primary0_interface
D = 1
D_neighbor = 1
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left'
value = 0
[../]
[./right]
type = DirichletBC
variable = v
boundary = 'right'
value = 10
[../]
[./middle]
type = MatchedValueBC
variable = v
boundary = 'primary0_interface'
v = u
[../]
[w_left]
type = DirichletBC
variable = w
boundary = 'left'
value = 0
[]
[w_right]
type = DirichletBC
variable = w
boundary = 'right'
value = 4
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(test/tests/misc/boundary_variable_check/three-domains/test.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 15
xmax = 3
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[subdomain2]
input = subdomain1
type = SubdomainBoundingBoxGenerator
bottom_left = '2.0 0 0'
block_id = 2
top_right = '3.0 1.0 0'
[]
[interface]
input = subdomain2
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[]
[Variables]
[u]
block = '0 1'
[]
[v]
block = '2'
[]
[]
[Kernels]
[diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = '0 1'
[]
[diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = '2'
[]
[]
[BCs]
[bad]
type = MatchedValueBC
variable = u
boundary = 'primary0_interface'
v = v
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(test/tests/interfacekernels/hybrid/interface.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 40
xmax = 2
ny = 40
ymax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0.5 0.5 0'
top_right = '1.5 1.5 0'
block_id = 1
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '1'
paired_block = '0'
new_boundary = 'primary1_interface'
[]
[]
[Variables]
[u]
block = 0
[]
[v]
block = 1
[]
[]
[Kernels]
[diff_u]
type = MatDiffusion
variable = u
diffusivity = D
block = 0
[]
[diff_v]
type = MatDiffusion
variable = v
diffusivity = D
block = 1
[]
[source_u]
type = BodyForce
variable = u
value = 1
block = 0
[]
[source_v]
type = BodyForce
variable = v
value = 1
block = 1
[]
[]
[BCs]
[u]
type = VacuumBC
variable = u
boundary = 'left bottom right top'
[]
[interface_bc]
type = ADMatchedValueBC
variable = v
v = u
boundary = primary1_interface
[]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
[InterfaceKernels]
active = 'diffusion'
[./diffusion]
type = InterfaceDiffusion
variable = v
neighbor_var = u
boundary = primary1_interface
D = 'D'
D_neighbor = 'D'
[../]
[./penalty]
type = PenaltyInterfaceDiffusion
variable = v
neighbor_var = u
boundary = primary1_interface
penalty = 1e3
[../]
[]
[Materials]
[mat0]
type = GenericConstantMaterial
prop_names = 'D'
prop_values = '1'
block = 0
[]
[mat1]
type = GenericConstantMaterial
prop_names = 'D'
prop_values = '1'
block = 1
[]
[]
[AuxVariables]
[c][]
[]
[AuxKernels]
[u]
type = ParsedAux
variable = c
coupled_variables = 'u'
expression = 'u'
block = 0
[]
[v]
type = ParsedAux
variable = c
coupled_variables = 'v'
expression = 'v'
block = 1
[]
[]
(modules/phase_field/test/tests/feature_volume_vpp_test/boundary_area_3D.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 6
ny = 25
nz = 15
xmin = 20
xmax = 30
ymin = 0
ymax = 50
zmin = 10
zmax = 40
elem_type = HEX8
[]
[./left_side]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '24.9 50 50'
[../]
[./right_side]
input = left_side
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '25.1 0 0'
top_right = '50 50 50'
[../]
[./iface_u]
input = right_side
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = 10
[../]
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[]
[]
[ICs]
[./c]
type = SpecifiedSmoothCircleIC
variable = c
invalue = 1.0
outvalue = 0.0
radii = '4 5 10'
x_positions = '25 25 25'
y_positions = '40 25 0'
z_positions = '25 25 25'
int_width = 2.0
[]
[]
[Postprocessors]
[./flood_count]
type = FeatureFloodCount
variable = c
# Must be turned on to build data structures necessary for FeatureVolumeVPP
compute_var_to_feature_map = true
threshold = 0.001
execute_on = INITIAL
[../]
[]
[VectorPostprocessors]
[./features]
type = FeatureVolumeVectorPostprocessor
flood_counter = flood_count
# Turn on centroid output
output_centroids = true
execute_on = INITIAL
boundary = 10
single_feature_per_element = false
[../]
[]
[Kernels]
[diff]
type = Diffusion
variable = c
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = INITIAL
[]
(test/tests/transfers/general_field/user_object/boundary/main.i)
# Base input for testing transfers. It has the following complexities:
# - more than one subapp
# - transfers both from and to the subapps
# - both nodal and elemental variables
# - subapp meshes are not aligned with the main app
# Tests derived from this input may add complexities through command line arguments
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 5
ny = 5
nz = 5
[]
[add_block]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x < 0.5 & y < 0.5'
block_id = 1
[]
[add_internal_sideset]
type = SideSetsBetweenSubdomainsGenerator
input = add_block
primary_block = 0
paired_block = 1
new_boundary = internal
[]
[]
[AuxVariables]
[from_sub]
initial_condition = -1
[]
[from_sub_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_sub]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[to_sub_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[]
[UserObjects]
[to_sub]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_sub
[]
[to_sub_elem]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_sub_elem
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
verbose_multiapps = true
[]
[Outputs]
[out]
type = Exodus
hide = 'to_sub to_sub_elem'
overwrite = true
[]
[]
[MultiApps]
[sub]
# 1 on corner, one in the center and one close to a corner
# The subapp mesh is a 0.3-sized cube, no overlap
positions = '0.2222 0 0 0.61111 0.311111 0.31111 0.76666 0.111111 0.81111'
type = TransientMultiApp
app_type = MooseTestApp
input_files = sub.i
execute_on = timestep_end
# Facilitates debugging
output_in_position = true
[]
[]
[Transfers]
# Boundary restrictions are added in the tests specification
[to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub
source_user_object = to_sub
variable = from_main
extrapolation_constant = -1
[]
[to_sub_elem]
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub
source_user_object = to_sub_elem
variable = from_main_elem
extrapolation_constant = -1
[]
[from_sub]
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = sub
source_user_object = to_main
variable = from_sub
extrapolation_constant = -1
[]
[from_sub_elem]
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = sub
source_user_object = to_main_elem
variable = from_sub_elem
extrapolation_constant = -1
[]
[]
(test/tests/postprocessors/interface_value/interface_fe_variable_value_postprocessor.i)
postprocessor_type = InterfaceAverageVariableValuePostprocessor
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 6
xmax = 3
ny = 9
ymax = 3
elem_type = QUAD4
[]
[./subdomain_id]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '2 1 0'
block_id = 1
[../]
[./interface]
input = subdomain_id
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'interface'
[../]
[]
[Functions]
[./fn_exact]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[./ffn]
type = ParsedFunction
expression = -4
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = FIRST
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = ffn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = fn_exact
[../]
[]
[Materials]
[./stateful1]
type = StatefulMaterial
block = 0
initial_diffusivity = 5
[../]
[./stateful2]
type = StatefulMaterial
block = 1
initial_diffusivity = 2
[../]
[]
[AuxKernels]
[./diffusivity_1]
type = MaterialRealAux
property = diffusivity
variable = diffusivity_1
[]
[./diffusivity_2]
type = MaterialRealAux
property = diffusivity
variable = diffusivity_2
[]
[]
[AuxVariables]
[./diffusivity_1]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_2]
family = MONOMIAL
order = CONSTANT
[]
[]
[Postprocessors]
[./diffusivity_average]
type = ${postprocessor_type}
interface_value_type = average
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_jump_primary_secondary]
type = ${postprocessor_type}
interface_value_type = jump_primary_minus_secondary
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_jump_secondary_primary]
type = ${postprocessor_type}
interface_value_type = jump_secondary_minus_primary
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_jump_abs]
type = ${postprocessor_type}
interface_value_type = jump_abs
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_primary]
type = ${postprocessor_type}
interface_value_type = primary
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_secondary]
type = ${postprocessor_type}
interface_value_type = secondary
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_single_variable]
type = ${postprocessor_type}
interface_value_type = primary
variable = diffusivity_1
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
file_base = ${raw ${postprocessor_type} _fe}
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/block_restriction/2d-rc.i)
mu = 1.1
rho = 1.1
advected_interp_method = 'average'
velocity_interp_method = 'rc'
restricted_blocks = '1'
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
block = ${restricted_blocks}
pressure = pressure
[]
[]
[Mesh]
parallel_type = 'replicated'
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '1 1'
dy = '1'
ix = '7 7'
iy = 10
subdomain_id = '1 2'
[]
[mid]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
input = mesh
new_boundary = 'middle'
[]
[break_top]
type = PatchSidesetGenerator
boundary = 'top'
n_patches = 2
input = mid
[]
[break_bottom]
type = PatchSidesetGenerator
boundary = 'bottom'
n_patches = 2
input = break_top
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 1
block = ${restricted_blocks}
[]
[v]
type = INSFVVelocityVariable
initial_condition = 1
block = ${restricted_blocks}
[]
[pressure]
type = INSFVPressureVariable
block = ${restricted_blocks}
[]
[temperature]
type = INSFVEnergyVariable
block = ${restricted_blocks}
[]
[scalar]
type = INSFVScalarFieldVariable
block = ${restricted_blocks}
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[energy_advection]
type = INSFVEnergyAdvection
variable = temperature
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
[]
[energy_diffusion]
type = FVDiffusion
coeff = 1.1
variable = temperature
[]
[energy_loss]
type = FVBodyForce
variable = temperature
value = -0.1
[]
[scalar_advection]
type = INSFVScalarFieldAdvection
variable = scalar
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
[]
[scalar_diffusion]
type = FVDiffusion
coeff = 1
variable = scalar
[]
[scalar_src]
type = FVBodyForce
variable = scalar
value = 0.1
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = '1'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = v
function = 0
[]
[top-wall-u]
type = INSFVNoSlipWallBC
boundary = 'top_0'
variable = u
function = 0
[]
[top-wall-v]
type = INSFVNoSlipWallBC
boundary = 'top_0'
variable = v
function = 0
[]
[bottom-wall-u]
type = INSFVSymmetryVelocityBC
boundary = 'bottom_0'
variable = u
mu = ${mu}
u = u
v = v
momentum_component = 'x'
[]
[bottom-wall-v]
type = INSFVSymmetryVelocityBC
boundary = 'bottom_0'
variable = v
mu = ${mu}
u = u
v = v
momentum_component = 'y'
[]
[bottom-wall-p]
type = INSFVSymmetryPressureBC
boundary = 'bottom_0'
variable = pressure
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'middle'
variable = pressure
function = 0
[]
[inlet_t]
type = FVDirichletBC
boundary = 'left'
variable = temperature
value = 1
[]
[outlet_scalar]
type = FVDirichletBC
boundary = 'middle'
variable = scalar
value = 1
[]
[]
[FunctorMaterials]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = 'temperature'
rho = ${rho}
block = ${restricted_blocks}
[]
[const]
type = ADGenericFunctorMaterial
prop_names = 'cp'
prop_values = '2'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/multiapp_transfer_transformation/transfer_transformation.i)
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 3
ny = 5
nz = 0
xmax = 0.8
xmin = 0.2
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[./subdomain_id]
type = SubdomainPerElementGenerator
input = gmg
subdomain_ids = '0 1 2
0 1 2
0 1 2
0 1 2
0 1 2'
[]
[./boundary01]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain_id
primary_block = '0'
paired_block = '1'
new_boundary = 'boundary01'
[]
[./boundary10]
type = SideSetsBetweenSubdomainsGenerator
input = boundary01
primary_block = '1'
paired_block = '0'
new_boundary = 'boundary10'
[]
[./boundary12]
type = SideSetsBetweenSubdomainsGenerator
input = boundary10
primary_block = '1'
paired_block = '2'
new_boundary = 'boundary12'
[]
[./boundary21]
type = SideSetsBetweenSubdomainsGenerator
input = boundary12
primary_block = '2'
paired_block = '1'
new_boundary = 'boundary21'
[]
uniform_refine = 3
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxVariables]
[./fromsubelem]
order = constant
family = monomial
[../]
[./fromsub]
[]
[]
[BCs]
[./left0]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right0]
type = DirichletBC
variable = u
boundary = boundary01
value = 1
[../]
[./right1]
type = DirichletBC
variable = u
boundary = boundary12
value = 0
[../]
[./right2]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0.0 0.0 0.0'
execute_on = 'timestep_end'
input_files = transfer_transformation_sub.i
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeometricInterpolationTransfer
from_multi_app = sub
num_points = 1
shrink_gap_width = 0.2
shrink_mesh = 'source'
source_variable = 'u'
variable = 'fromsub'
exclude_gap_blocks = '1 3'
[]
[from_sub_elem]
type = MultiAppGeometricInterpolationTransfer
from_multi_app = sub
num_points = 4
shrink_gap_width = 0.2
shrink_mesh = 'source'
source_variable = 'u'
variable = 'fromsubelem'
exclude_gap_blocks = '1 3'
[]
[from_parent]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = sub
num_points = 1
shrink_gap_width = 0.2
shrink_mesh = 'target'
source_variable = 'u'
exclude_gap_blocks = '1 3'
variable = 'fromparent'
[]
[from_parent_elem]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = sub
num_points = 4
shrink_gap_width = 0.2
shrink_mesh = 'target'
source_variable = 'u'
exclude_gap_blocks = '1 3'
variable = 'fromparentelem'
[]
[]
(test/tests/misc/save_in/block-restricted-save-in.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./break_boundary]
input = interface
type = BreakBoundaryOnSubdomainGenerator
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./v]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[AuxVariables]
[./vres]
block = 1
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[../]
[./source_u]
type = BodyForce
variable = u
value = 1
[../]
[]
[InterfaceKernels]
[./interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 right top'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1'
save_in = 'vres'
[../]
[]
[Postprocessors]
[./u_int]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[../]
[./v_int]
type = ElementIntegralVariablePostprocessor
variable = v
block = 1
[../]
[./vres_int]
type = ElementIntegralVariablePostprocessor
variable = vres
block = 1
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
(modules/heat_transfer/test/tests/radiation_transfer_action/radiative_transfer_action_external_boundary.i)
[Problem]
kernel_coverage_check = false
[]
[Mesh]
[./cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1 1.3 1.9'
ix = '3 3 3'
dy = '6'
iy = '9'
subdomain_id = '0 1 2'
[../]
[./inner_left]
type = SideSetsBetweenSubdomainsGenerator
input = cmg
primary_block = 0
paired_block = 1
new_boundary = 'inner_left'
[../]
[./inner_right]
type = SideSetsBetweenSubdomainsGenerator
input = inner_left
primary_block = 2
paired_block = 1
new_boundary = 'inner_right'
[../]
[./inner_top]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(y - 6) < 1e-10'
normal = '0 1 0'
included_subdomains = 1
new_sideset_name = 'inner_top'
input = 'inner_right'
[../]
[./inner_bottom]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(y) < 1e-10'
normal = '0 -1 0'
included_subdomains = 1
new_sideset_name = 'inner_bottom'
input = 'inner_top'
[../]
[./rename]
type = RenameBlockGenerator
old_block = '2'
new_block = '0'
input = inner_bottom
[../]
[]
[Variables]
[./temperature]
block = 0
[../]
[]
[Kernels]
[./heat_conduction]
type = HeatConduction
variable = temperature
block = 0
diffusion_coefficient = 5
[../]
[]
[GrayDiffuseRadiation]
[./cavity]
boundary = '4 5 6 7'
emissivity = '0.9 0.8 eps_fn 1'
n_patches = '2 2 2 3'
partitioners = 'centroid centroid centroid centroid'
centroid_partitioner_directions = 'x y y x'
temperature = temperature
adiabatic_boundary = '7'
fixed_temperature_boundary = '6'
fixed_boundary_temperatures = '800'
view_factor_calculator = analytical
[../]
[]
[Functions]
[eps_fn]
type = ConstantFunction
value = 0.4
[]
[]
[BCs]
[./left]
type = DirichletBC
variable = temperature
boundary = left
value = 1000
[../]
[./right]
type = DirichletBC
variable = temperature
boundary = right
value = 300
[../]
[]
[Postprocessors]
[./average_T_inner_right]
type = SideAverageValue
variable = temperature
boundary = inner_right
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = 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
[]
(test/tests/userobjects/side_uo_with_lowerd_use/side-uo-with-lower-d-use.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = 0
ymax = 2
nx = 2
ny = 2
subdomain_ids = '1 2 3 4'
[]
[1to2]
type = SideSetsBetweenSubdomainsGenerator
input = gmg
primary_block = '1'
paired_block = '2'
new_boundary = 'onetwo'
[]
[2to1]
type = SideSetsBetweenSubdomainsGenerator
input = 1to2
primary_block = '2'
paired_block = '1'
new_boundary = 'twoone'
[]
[1to3]
type = SideSetsBetweenSubdomainsGenerator
input = 2to1
primary_block = '1'
paired_block = '3'
new_boundary = 'onethree'
[]
[3to1]
type = SideSetsBetweenSubdomainsGenerator
input = 1to3
primary_block = '3'
paired_block = '1'
new_boundary = 'threeone'
[]
build_all_side_lowerd_mesh = true
[]
[Variables]
[u]
order = THIRD
family = MONOMIAL
block = '1 2 3 4'
[]
[lambda]
order = CONSTANT
family = MONOMIAL
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN_EDGE2
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
block = '1 2 3 4'
[]
[reaction]
type = Reaction
variable = u
rate = '1'
block = '1 2 3 4'
[]
[source]
type = BodyForce
variable = u
value = '1'
block = '1 2 3 4'
[]
[time]
type = CoefTimeDerivative
variable = u
block = '1 2 3 4'
Coefficient = 1
[]
[]
[DGKernels]
[surface]
type = HFEMDiffusion
variable = u
lowerd_variable = lambda
[]
[]
[BCs]
[all]
type = NeumannBC
boundary = 'left right top bottom'
variable = u
[]
[]
[UserObjects]
[onetwo_uo]
type = LowerDIntegralSideUserObject
boundary = onetwo
lowerd_variable = lambda
[]
[twoone_uo]
type = LowerDIntegralSideUserObject
boundary = twoone
lowerd_variable = lambda
[]
[onethree_uo]
type = LowerDIntegralSideUserObject
boundary = onethree
lowerd_variable = lambda
[]
[threeone_uo]
type = LowerDIntegralSideUserObject
boundary = threeone
lowerd_variable = lambda
[]
[]
[Postprocessors]
[unorm]
type = ElementL2Norm
variable = u
block = '1 2 3 4'
[]
[]
[Executioner]
type = Transient
nl_abs_tol = 1e-12
num_steps = 8
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
(test/tests/interfacekernels/2d_interface/vector_2d.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
elem_type = QUAD9
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
[../]
[./break_boundary]
type = BreakBoundaryOnSubdomainGenerator
input = subdomain1
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[]
[Variables]
[./u]
order = FIRST
family = NEDELEC_ONE
block = 0
[../]
[./v]
order = FIRST
family = NEDELEC_ONE
block = 1
[../]
[]
[Kernels]
[./curl_u_plus_u]
type = VectorFEWave
variable = u
x_forcing_func = 1
y_forcing_func = 1
z_forcing_func = 1
block = 0
[../]
[./curl_v_plus_v]
type = VectorFEWave
variable = v
block = 1
[../]
[]
[InterfaceKernels]
[./parallel]
type = VectorPenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
# Natural condition of VectorFEWave weak form is curl(u) = 0, curl(v) = 0
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
(modules/phase_field/test/tests/feature_volume_vpp_test/boundary_area_3D_single.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 6
ny = 25
nz = 15
xmin = 20
xmax = 30
ymin = 0
ymax = 50
zmin = 10
zmax = 40
elem_type = HEX8
[]
[./left_side]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '24.9 50 50'
[../]
[./right_side]
input = left_side
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '25.1 0 0'
top_right = '50 50 50'
[../]
[./iface_u]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = 10
input = right_side
[../]
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[]
[]
[ICs]
[./c]
type = SpecifiedSmoothCircleIC
variable = c
invalue = 1.0
outvalue = 0.0
radii = '4 5 10'
x_positions = '25 25 25'
y_positions = '40 25 0'
z_positions = '25 25 25'
int_width = 2.0
[]
[]
[Postprocessors]
[./flood_count]
type = FeatureFloodCount
variable = c
# Must be turned on to build data structures necessary for FeatureVolumeVPP
compute_var_to_feature_map = true
threshold = 0.5
execute_on = INITIAL
[../]
[]
[VectorPostprocessors]
[./features]
type = FeatureVolumeVectorPostprocessor
flood_counter = flood_count
# Turn on centroid output
output_centroids = true
execute_on = INITIAL
boundary = 10
single_feature_per_element = true
[../]
[]
[Kernels]
[diff]
type = Diffusion
variable = c
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = INITIAL
[]
(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/porous_flow/examples/coal_mining/coarse_with_fluid.i)
# Strata deformation and fluid flow aaround a coal mine - 3D model
#
# A "half model" is used. The mine is 400m deep and
# just the roof is studied (-400<=z<=0). The mining panel
# sits between 0<=x<=150, and 0<=y<=1000, so this simulates
# a coal panel that is 300m wide and 1000m long. The outer boundaries
# are 1km from the excavation boundaries.
#
# The excavation takes 0.5 years.
#
# The boundary conditions for this simulation are:
# - disp_x = 0 at x=0 and x=1150
# - disp_y = 0 at y=-1000 and y=1000
# - disp_z = 0 at z=-400, but there is a time-dependent
# Young modulus that simulates excavation
# - wc_x = 0 at y=-1000 and y=1000
# - wc_y = 0 at x=0 and x=1150
# - no flow at x=0, z=-400 and z=0
# - fixed porepressure at y=-1000, y=1000 and x=1150
# That is, rollers on the sides, free at top,
# and prescribed at bottom in the unexcavated portion.
#
# A single-phase unsaturated fluid is used.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa, and time units are measured in years.
#
# The initial porepressure is hydrostatic with P=0 at z=0, so
# Porepressure ~ - 0.01*z MPa, where the fluid has density 1E3 kg/m^3 and
# gravity = = 10 m.s^-2 = 1E-5 MPa m^2/kg.
# To be more accurate, i use
# Porepressure = -bulk * log(1 + g*rho0*z/bulk)
# where bulk=2E3 MPa and rho0=1Ee kg/m^3.
# The initial stress is consistent with the weight force from undrained
# density 2500 kg/m^3, and fluid porepressure, and a Biot coefficient of 0.7, ie,
# stress_zz^effective = 0.025*z + 0.7 * initial_porepressure
# The maximum and minimum principal horizontal effective 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 = 2 MPa
# MC friction angle = 35 deg
# MC dilation angle = 8 deg
# MC tensile strength = 1 MPa
# MC compressive strength = 100 MPa
# 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
# Fluid density at zero porepressure = 1E3 kg/m^3
# Fluid bulk modulus = 2E3 MPa
# Fluid viscosity = 1.1E-3 Pa.s = 1.1E-9 MPa.s = 3.5E-17 MPa.year
#
[GlobalParams]
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
PorousFlowDictator = dictator
biot_coefficient = 0.7
[]
[Mesh]
[file]
type = FileMeshGenerator
file = mesh/coarse.e
[]
[xmin]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
new_boundary = xmin
normal = '-1 0 0'
input = file
[]
[xmax]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
new_boundary = xmax
normal = '1 0 0'
input = xmin
[]
[ymin]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
new_boundary = ymin
normal = '0 -1 0'
input = xmax
[]
[ymax]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
new_boundary = ymax
normal = '0 1 0'
input = ymin
[]
[zmax]
type = SideSetsAroundSubdomainGenerator
block = 16
new_boundary = zmax
normal = '0 0 1'
input = ymax
[]
[zmin]
type = SideSetsAroundSubdomainGenerator
block = 2
new_boundary = zmin
normal = '0 0 -1'
input = zmax
[]
[excav]
type = SubdomainBoundingBoxGenerator
input = zmin
block_id = 1
bottom_left = '0 0 -400'
top_right = '150 1000 -397'
[]
[roof]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 3
paired_block = 1
input = excav
new_boundary = roof
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[wc_x]
[]
[wc_y]
[]
[porepressure]
scaling = 1E-5
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = ini_pp
[]
[]
[Kernels]
[cx_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_x
component = 0
[]
[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
[]
[y_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_y
displacements = 'wc_x wc_y wc_z'
component = 1
base_name = couple
[]
[x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[]
[y_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_y
component = 1
[]
[gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6 # remember this is in MPa
[]
[poro_x]
type = PorousFlowEffectiveStressCoupling
use_displaced_mesh = false
variable = disp_x
component = 0
[]
[poro_y]
type = PorousFlowEffectiveStressCoupling
use_displaced_mesh = false
variable = disp_y
component = 1
[]
[poro_z]
type = PorousFlowEffectiveStressCoupling
use_displaced_mesh = false
component = 2
variable = disp_z
[]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = porepressure
[]
[flux]
type = PorousFlowAdvectiveFlux
use_displaced_mesh = false
variable = porepressure
gravity = '0 0 -10E-6'
fluid_component = 0
[]
[poro_vol_exp]
type = PorousFlowMassVolumetricExpansion
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
variable = porepressure
fluid_component = 0
[]
[]
[AuxVariables]
[saturation]
order = CONSTANT
family = MONOMIAL
[]
[darcy_x]
order = CONSTANT
family = MONOMIAL
[]
[darcy_y]
order = CONSTANT
family = MONOMIAL
[]
[darcy_z]
order = CONSTANT
family = MONOMIAL
[]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[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
[]
[total_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_xz]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_yx]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_yz]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_zx]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_zy]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[perm_xx]
order = CONSTANT
family = MONOMIAL
[]
[perm_yy]
order = CONSTANT
family = MONOMIAL
[]
[perm_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]
[saturation_water]
type = PorousFlowPropertyAux
variable = saturation
property = saturation
phase = 0
execute_on = timestep_end
[]
[darcy_x]
type = PorousFlowDarcyVelocityComponent
variable = darcy_x
gravity = '0 0 -10E-6'
component = x
[]
[darcy_y]
type = PorousFlowDarcyVelocityComponent
variable = darcy_y
gravity = '0 0 -10E-6'
component = y
[]
[darcy_z]
type = PorousFlowDarcyVelocityComponent
variable = darcy_z
gravity = '0 0 -10E-6'
component = z
[]
[porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
execute_on = timestep_end
[]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
execute_on = timestep_end
[]
[stress_yx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yx
index_i = 1
index_j = 0
execute_on = timestep_end
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[stress_zx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zx
index_i = 2
index_j = 0
execute_on = timestep_end
[]
[stress_zy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zy
index_i = 2
index_j = 1
execute_on = timestep_end
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[total_strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[total_strain_xy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[total_strain_xz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xz
index_i = 0
index_j = 2
execute_on = timestep_end
[]
[total_strain_yx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yx
index_i = 1
index_j = 0
execute_on = timestep_end
[]
[total_strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[total_strain_yz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[total_strain_zx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zx
index_i = 2
index_j = 0
execute_on = timestep_end
[]
[total_strain_zy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zy
index_i = 2
index_j = 1
execute_on = timestep_end
[]
[total_strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[perm_xx]
type = PorousFlowPropertyAux
property = permeability
variable = perm_xx
row = 0
column = 0
execute_on = timestep_end
[]
[perm_yy]
type = PorousFlowPropertyAux
property = permeability
variable = perm_yy
row = 1
column = 1
execute_on = timestep_end
[]
[perm_zz]
type = PorousFlowPropertyAux
property = permeability
variable = perm_zz
row = 2
column = 2
execute_on = timestep_end
[]
[mc_shear]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_internal_parameter
variable = mc_shear
execute_on = timestep_end
[]
[mc_tensile]
type = MaterialStdVectorAux
index = 1
property = mc_plastic_internal_parameter
variable = mc_tensile
execute_on = timestep_end
[]
[wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
execute_on = timestep_end
[]
[wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
execute_on = timestep_end
[]
[mc_shear_f]
type = MaterialStdVectorAux
index = 6
property = mc_plastic_yield_function
variable = mc_shear_f
execute_on = timestep_end
[]
[mc_tensile_f]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_yield_function
variable = mc_tensile_f
execute_on = timestep_end
[]
[wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
execute_on = timestep_end
[]
[wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
execute_on = timestep_end
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_x
boundary = 'xmin xmax'
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_y
boundary = 'ymin ymax'
value = 0.0
[]
[no_z]
type = DirichletBC
variable = disp_z
boundary = zmin
value = 0.0
[]
[no_wc_x]
type = DirichletBC
variable = wc_x
boundary = 'ymin ymax'
value = 0.0
[]
[no_wc_y]
type = DirichletBC
variable = wc_y
boundary = 'xmin xmax'
value = 0.0
[]
[fix_porepressure]
type = FunctionDirichletBC
variable = porepressure
boundary = 'ymin ymax xmax'
function = ini_pp
[]
[roof_porepressure]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
pt_vals = '-1E3 1E3'
multipliers = '-1 1'
fluid_phase = 0
flux_function = roof_conductance
boundary = roof
[]
[roof_bcs]
type = StickyBC
variable = disp_z
min_value = -3.0
boundary = roof
[]
[]
[Functions]
[ini_pp]
type = ParsedFunction
symbol_names = 'bulk p0 g rho0'
symbol_values = '2E3 0.0 1E-5 1E3'
expression = '-bulk*log(exp(-p0/bulk)+g*rho0*z/bulk)'
[]
[ini_xx]
type = ParsedFunction
symbol_names = 'bulk p0 g rho0 biot'
symbol_values = '2E3 0.0 1E-5 1E3 0.7'
expression = '0.8*(2500*10E-6*z+biot*(-bulk*log(exp(-p0/bulk)+g*rho0*z/bulk)))'
[]
[ini_zz]
type = ParsedFunction
symbol_names = 'bulk p0 g rho0 biot'
symbol_values = '2E3 0.0 1E-5 1E3 0.7'
expression = '2500*10E-6*z+biot*(-bulk*log(exp(-p0/bulk)+g*rho0*z/bulk))'
[]
[excav_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval slope'
symbol_values = '0.5 0 1000.0 1E-9 1 60'
# excavation face at ymin+(ymax-ymin)*min(t/end_t,1)
# slope is the distance over which the modulus reduces from maxval to minval
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,if(y<ymin+(ymax-ymin)*min(t/end_t,1)+slope,minval+(maxval-minval)*(y-(ymin+(ymax-ymin)*min(t/end_t,1)))/slope,maxval))'
[]
[density_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval'
symbol_values = '0.5 0 1000.0 0 2500'
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,maxval)'
[]
[roof_conductance]
type = ParsedFunction
symbol_names = 'end_t ymin ymax maxval minval'
symbol_values = '0.5 0 1000.0 1E7 0'
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),maxval,minval)'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1 # MPa^-1
[]
[mc_coh_strong_harden]
type = TensorMechanicsHardeningExponential
value_0 = 1.99 # MPa
value_residual = 2.01 # MPa
rate = 1.0
[]
[mc_fric]
type = TensorMechanicsHardeningConstant
value = 0.61 # 35deg
[]
[mc_dil]
type = TensorMechanicsHardeningConstant
value = 0.15 # 8deg
[]
[mc_tensile_str_strong_harden]
type = TensorMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.0 # MPa
rate = 1.0
[]
[mc_compressive_str]
type = TensorMechanicsHardeningCubic
value_0 = 100 # Large!
value_residual = 100
internal_limit = 0.1
[]
[wp_coh_harden]
type = TensorMechanicsHardeningCubic
value_0 = 0.05
value_residual = 0.05
internal_limit = 10
[]
[wp_tan_fric]
type = TensorMechanicsHardeningConstant
value = 0.26 # 15deg
[]
[wp_tan_dil]
type = TensorMechanicsHardeningConstant
value = 0.18 # 10deg
[]
[wp_tensile_str_harden]
type = TensorMechanicsHardeningCubic
value_0 = 0.05
value_residual = 0.05
internal_limit = 10
[]
[wp_compressive_str_soften]
type = TensorMechanicsHardeningCubic
value_0 = 100
value_residual = 1
internal_limit = 1.0
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E3
density0 = 1000
thermal_expansion = 0
viscosity = 3.5E-17
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity_bulk]
type = PorousFlowPorosity
fluid = true
mechanical = true
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
ensure_positive = true
porosity_zero = 0.02
solid_bulk = 5.3333E3
[]
[porosity_excav]
type = PorousFlowPorosityConst
block = 1
porosity = 1.0
[]
[permeability_bulk]
type = PorousFlowPermeabilityKozenyCarman
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
poroperm_function = kozeny_carman_phi0
k0 = 1E-15
phi0 = 0.02
n = 2
m = 2
[]
[permeability_excav]
type = PorousFlowPermeabilityConst
block = 1
permeability = '0 0 0 0 0 0 0 0 0'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 4
s_res = 0.4
sum_s_res = 0.4
phase = 0
[]
[elasticity_tensor_0]
type = ComputeLayeredCosseratElasticityTensor
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
[]
[elasticity_tensor_1]
type = ComputeLayeredCosseratElasticityTensor
block = 1
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
elasticity_tensor_prefactor = excav_sideways
[]
[strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[]
[ini_stress]
type = ComputeEigenstrainFromInitialStress
eigenstrain_name = ini_stress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
[]
[stress_0]
type = ComputeMultipleInelasticCosseratStress
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
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
[]
[stress_1]
type = ComputeMultipleInelasticCosseratStress
block = 1
inelastic_models = ''
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[]
[mc]
type = CappedMohrCoulombCosseratStressUpdate
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
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.05
smoothing_tol = 0.05 # 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
[]
[undrained_density_0]
type = GenericConstantMaterial
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
prop_names = density
prop_values = 2500
[]
[undrained_density_1]
type = GenericFunctionMaterial
block = 1
prop_names = density
prop_values = density_sideways
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Postprocessors]
[min_roof_disp]
type = NodalExtremeValue
boundary = roof
value_type = min
variable = disp_z
[]
[min_roof_pp]
type = NodalExtremeValue
boundary = roof
value_type = min
variable = porepressure
[]
[min_surface_disp]
type = NodalExtremeValue
boundary = zmax
value_type = min
variable = disp_z
[]
[min_surface_pp]
type = NodalExtremeValue
boundary = zmax
value_type = min
variable = porepressure
[]
[max_perm_zz]
type = ElementExtremeValue
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
variable = perm_zz
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
# best overall
# petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
# petsc_options_value = ' lu mumps'
# best if you do not have mumps:
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu superlu_dist'
# best if you do not have mumps or superlu_dist:
#petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
#petsc_options_value = ' asm 2 lu gmres 200'
# very basic:
#petsc_options_iname = '-pc_type -ksp_type -ksp_gmres_restart'
#petsc_options_value = ' bjacobi gmres 200'
line_search = bt
nl_abs_tol = 1e-3
nl_rel_tol = 1e-5
l_max_its = 200
nl_max_its = 30
start_time = 0.0
dt = 0.014706
end_time = 0.014706 #0.5
[]
[Outputs]
time_step_interval = 1
print_linear_residuals = true
exodus = true
csv = true
console = true
[]
(test/tests/meshgenerators/coarsen_block_generator/coarsen_hex_multi.i)
[Mesh]
allow_renumbering = false
# use these two to re-generate input.e
[eg]
type = CartesianMeshGenerator
dim = 3
dx = '2 1 1'
dy = '2 3'
dz = '2 3'
ix = '2 1 1'
iy = '2 3'
iz = '3 2'
subdomain_id = '0 1 1
1 2 0
0 1 1
1 2 0'
[]
[add_internal]
type = SideSetsBetweenSubdomainsGenerator
input = eg
paired_block = 1
primary_block = 2
new_boundary = middle
[]
[refine]
type = RefineBlockGenerator
input = add_internal
block = '0 1 2'
refinement = '1 1 1'
enable_neighbor_refinement = false
output = true
[]
final_generator = 'diag'
[input]
type = FileMeshGenerator
file = 'single_nonuniform_hex.e'
[]
# Go back to what we had
[coarsen]
type = CoarsenBlockGenerator
input = input
block = '0 1 2'
coarsening = '1 1 1'
# This was found by looking at the output of refine
# careful, has transitions we dont support!
starting_point = '2.75 0.75 0'
maximum_volume_ratio = 4
verbose = true
[]
[diag]
type = MeshDiagnosticsGenerator
input = coarsen
examine_element_overlap = ERROR
search_for_adaptivity_nonconformality = WARNING
examine_non_conformality = WARNING
[]
[]
[Outputs]
exodus = true
[]
(test/tests/linearfvkernels/block-restriction/block-restricted-diffusion.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '0.1 1 0.1'
dy = '0.1 0.5 0.1'
ix = '1 2 1'
iy = '1 1 1'
subdomain_id = '1 1 1 1 2 3 1 1 1'
[]
[transform]
type = TransformGenerator
input = cmg
transform = TRANSLATE
vector_value = '-0.1 -0.1 0.0'
[]
[create_sides]
type = SideSetsBetweenSubdomainsGenerator
input = transform
new_boundary = sides
primary_block = 2
paired_block = 1
[]
[create_outlet]
type = SideSetsBetweenSubdomainsGenerator
input = create_sides
new_boundary = outlet
primary_block = 2
paired_block = 3
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
block = 2
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = diff_coeff_func
use_nonorthogonal_correction = false
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "sides outlet"
functor = analytic_solution
[]
[]
[Functions]
[diff_coeff_func]
type = ParsedFunction
expression = '1.0+0.5*x*y'
[]
[source_func]
type = ParsedFunction
expression = '-1.0*x*pi*sin(x*pi)*cos(2*y*pi) - 0.5*y*pi*sin(2*y*pi)*cos(x*pi) + 5*pi^2*(0.5*x*y + 1.0)*sin(x*pi)*sin(2*y*pi)'
[]
[analytic_solution]
type = ParsedFunction
expression = 'sin(x*pi)*sin(2*y*pi) + 1.5'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = FINAL
block = 2
[]
[error]
type = ElementL2FunctorError
approximate = u
exact = analytic_solution
execute_on = FINAL
block = 2
[]
[]
[Convergence]
[linear]
type = IterationCountConvergence
max_iterations = 1
converge_at_max_iterations = true
[]
[]
[Executioner]
type = Steady
system_names = u_sys
l_abs_tol = 1e-10
multi_system_fixed_point=true
multi_system_fixed_point_convergence=linear
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
[csv]
type = CSV
execute_on = FINAL
[]
[]
(test/tests/userobjects/interface_user_object/interface_value_rate_increment_user_object_QP.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
[../]
[./primary0_interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./break_boundary]
input = primary0_interface
type = BreakBoundaryOnSubdomainGenerator
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./v]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 2
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 4
block = 1
[../]
[./source_u]
type = BodyForce
variable = u
function = 0.1*t
[../]
[]
[InterfaceKernels]
[./primary0_interface]
type = PenaltyInterfaceDiffusionDot
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 right top'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = TRUE
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
dt = 0.1
num_steps = 3
dtmin = 0.1
line_search = none
[]
[Outputs]
exodus = true
[]
[UserObjects]
[./interface_avg_value_uo]
type = InterfaceQpValueUserObject
var = v1
var_neighbor = v2
boundary = 'primary0_interface'
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
interface_value_type = average
[../]
[./interface_avg_value_rate_uo]
type = InterfaceQpValueUserObject
var = v1
var_neighbor = v2
boundary = 'primary0_interface'
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
interface_value_type = average
value_type = rate
[../]
[./interface_avg_value_increment_uo]
type = InterfaceQpValueUserObject
var = v1
var_neighbor = v2
boundary = 'primary0_interface'
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
interface_value_type = average
value_type = increment
[../]
[]
[AuxKernels]
[./v1_saux]
type = StatefulAux
coupled = v1
variable = v1
[../]
[./v2_saux]
type = StatefulAux
coupled = v2
variable = v2
[../]
[./interface_avg_value_aux]
type = InterfaceValueUserObjectAux
variable = avg_qp
boundary = 'primary0_interface'
interface_uo_name = interface_avg_value_uo
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
[]
[./interface_avg_value_rate_aux]
type = InterfaceValueUserObjectAux
variable = avg_rate_qp
boundary = 'primary0_interface'
interface_uo_name = interface_avg_value_rate_uo
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
[]
[./interface_avg_value_increment_aux]
type = InterfaceValueUserObjectAux
variable = avg_increment_qp
boundary = 'primary0_interface'
interface_uo_name = interface_avg_value_increment_uo
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
[]
[]
[AuxVariables]
[./v1]
family = MONOMIAL
order = FIRST
initial_condition = 5
[../]
[./v2]
family = MONOMIAL
order = FIRST
initial_condition = 2
[../]
[./avg_qp]
family = MONOMIAL
order = CONSTANT
[]
[./avg_rate_qp]
family = MONOMIAL
order = CONSTANT
[]
[./avg_increment_qp]
family = MONOMIAL
order = CONSTANT
[]
[]
(test/tests/meshgenerators/xy_mesh_line_cutter/multi_block_cut.i)
[Mesh]
[ccmg]
type = ConcentricCircleMeshGenerator
num_sectors = 6
radii = '1 2 4 6'
rings = '1 2 2 3 2'
has_outer_square = on
pitch = 15
preserve_volumes = false
smoothing_max_it = 3
[]
[ext]
type = RenameBoundaryGenerator
input = ccmg
old_boundary = '1 2 3 4'
new_boundary = '100 100 100 100'
[]
[interface12]
type = SideSetsBetweenSubdomainsGenerator
input = ext
primary_block = '1'
paired_block = '2'
new_boundary = '12'
[]
[interface23]
type = SideSetsBetweenSubdomainsGenerator
input = interface12
primary_block = '2'
paired_block = '3'
new_boundary = '23'
[]
[interface34]
type = SideSetsBetweenSubdomainsGenerator
input = interface23
primary_block = '3'
paired_block = '4'
new_boundary = '34'
[]
[interface45]
type = SideSetsBetweenSubdomainsGenerator
input = interface34
primary_block = '4'
paired_block = '5'
new_boundary = '45'
[]
[mlc]
type = XYMeshLineCutter
input = interface45
cut_line_params = '1 -2 2'
new_boundary_id = 20
input_mesh_external_boundary_id = 100
[]
[]
(test/tests/transfers/multiapp_transfer_transformation/transfer_transformation_sub.i)
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
nz = 0
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[./subdomain_id]
type = SubdomainPerElementGenerator
input = gmg
subdomain_ids = '0 1 2 3 4
0 1 2 3 4
0 1 2 3 4
0 1 2 3 4
0 1 2 3 4'
[]
[./boundary01]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain_id
primary_block = '0'
paired_block = '1'
new_boundary = 'boundary01'
[]
[./boundary10]
type = SideSetsBetweenSubdomainsGenerator
input = boundary01
primary_block = '1'
paired_block = '0'
new_boundary = 'boundary10'
[]
[./boundary12]
type = SideSetsBetweenSubdomainsGenerator
input = boundary10
primary_block = '1'
paired_block = '2'
new_boundary = 'boundary12'
[]
[./boundary21]
type = SideSetsBetweenSubdomainsGenerator
input = boundary12
primary_block = '2'
paired_block = '1'
new_boundary = 'boundary21'
[]
[./boundary23]
type = SideSetsBetweenSubdomainsGenerator
input = boundary21
primary_block = '2'
paired_block = '3'
new_boundary = 'boundary23'
[]
[./boundary32]
type = SideSetsBetweenSubdomainsGenerator
input = boundary23
primary_block = '3'
paired_block = '2'
new_boundary = 'boundary32'
[]
[./boundary34]
type = SideSetsBetweenSubdomainsGenerator
input = boundary32
primary_block = '3'
paired_block = '4'
new_boundary = 'boundary34'
[]
[./boundary43]
type = SideSetsBetweenSubdomainsGenerator
input = boundary34
primary_block = '4'
paired_block = '3'
new_boundary = 'boundary43'
[]
uniform_refine = 3
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxVariables]
[./fromparent]
[]
[./fromparentelem]
order = constant
family = monomial
[../]
[]
[BCs]
[./left0]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right0]
type = DirichletBC
variable = u
boundary = boundary01
value = 1
[../]
[./right1]
type = DirichletBC
variable = u
boundary = boundary12
value = 1
[../]
[./right2]
type = DirichletBC
variable = u
boundary = boundary23
value = 0
[../]
[./right3]
type = DirichletBC
variable = u
boundary = boundary34
value = 0
[../]
[./right4]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
[]
(modules/electromagnetics/test/tests/interfacekernels/electromagnetic_interfaces/combined_default.i)
# Verification Test of PerpendicularElectricFieldInterface and
# ParallelElectricFieldInterface with default materials
#
# Imposes u_perpendicular = v_perpendicular and u_parallel = v_parallel
# on each interface (equivalent to saying u = v for default parameters)
# between subdomain 0 and 1
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 10
xmax = 2
ymax = 2
zmax = 2
elem_type = HEX20
[]
[subdomain1]
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 1'
block_id = 1
input = gmg
[]
[break_boundary]
type = BreakBoundaryOnSubdomainGenerator
input = subdomain1
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[]
[Variables]
[u]
order = FIRST
family = NEDELEC_ONE
block = 0
[]
[v]
order = FIRST
family = NEDELEC_ONE
block = 1
[]
[]
[Kernels]
[curl_u]
type = CurlCurlField
variable = u
block = 0
[]
[coeff_u]
type = VectorFunctionReaction
variable = u
block = 0
[]
[ffn_u]
type = VectorBodyForce
variable = u
block = 0
function_x = 1
function_y = 1
function_z = 1
[]
[curl_v]
type = CurlCurlField
variable = v
block = 1
[]
[coeff_v]
type = VectorFunctionReaction
variable = v
block = 1
[]
[]
[InterfaceKernels]
[perpendicular]
type = PerpendicularElectricFieldInterface
variable = u
neighbor_var = v
boundary = primary0_interface
[]
[parallel]
type = ParallelElectricFieldInterface
variable = u
neighbor_var = v
boundary = primary0_interface
[]
[]
[BCs]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
(test/tests/fvkernels/boundary_execution/2d.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmax = 2
ymax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0.0 0 0'
top_right = '1.0 1.0 0'
block_id = 1
[]
[corner_inward]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'corner_inward'
[]
[corner_outward]
input = corner_inward
type = SideSetsBetweenSubdomainsGenerator
primary_block = '1'
paired_block = '0'
new_boundary = 'corner_outward'
[]
[]
[Variables]
[all_domain]
type = MooseVariableFVReal
[]
[part_domain]
type = MooseVariableFVReal
block = 1
[]
[]
[FVKernels]
[diff_all]
type = FVDiffusion
variable = all_domain
coeff = coeff
[]
[diff_part]
type = FVDiffusion
variable = part_domain
coeff = coeff
[]
[]
[FVBCs]
# The boundaries where the flux kernels are executed are
# the dirichlet BCs: left, right and corner_inward
# On top and bottom, not executed because 0 flux is assumed
[left]
type = FVDirichletBC
variable = all_domain
boundary = left
value = 2
[]
[corner_inward]
type = FVDirichletBC
variable = all_domain
boundary = right
value = 1
[]
[corner_outward]
type = FVDirichletBC
variable = part_domain
boundary = corner_inward
value = 2
[]
[right]
type = FVDirichletBC
variable = part_domain
boundary = left
value = 1
[]
[]
[Materials]
[diffusion]
type = ADGenericFunctorMaterial
prop_names = 'coeff'
prop_values = '1'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
line_search = 'none'
[]
[Outputs]
exodus = true
[]
(test/tests/outputs/debug/show_execution_userobjects.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1.5 2.4'
dy = '1.3 0.9'
ix = '3 2'
iy = '2 3'
subdomain_id = '0 1
1 0'
[]
[add_interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'cmg'
primary_block = 0
paired_block = 1
new_boundary = 'interface'
[]
second_order = true
[]
[Functions]
[forcing_fnu]
type = ParsedFunction
expression = -5.8*(x+y)+x*x*x-x+y*y*y-y
[]
[forcing_fnv]
type = ParsedFunction
expression = -4
[]
[slnu]
type = ParsedGradFunction
expression = x*x*x-x+y*y*y-y
grad_x = 3*x*x-1
grad_y = 3*y*y-1
[]
[slnv]
type = ParsedGradFunction
expression = x*x+y*y
grad_x = 2*x
grad_y = 2*y
[]
# NeumannBC functions
[bc_fnut]
type = ParsedFunction
expression = 3*y*y-1
[]
[bc_fnub]
type = ParsedFunction
expression = -3*y*y+1
[]
[bc_fnul]
type = ParsedFunction
expression = -3*x*x+1
[]
[bc_fnur]
type = ParsedFunction
expression = 3*x*x-1
[]
[]
[Variables]
[u]
order = SECOND
family = HIERARCHIC
[]
[v]
order = SECOND
family = LAGRANGE
initial_condition = 1
[]
[]
[AuxVariables]
[v_elem]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
active = 'diff1 diff2 test1 forceu forcev react'
[diff1]
type = Diffusion
variable = u
[]
[test1]
type = CoupledConvection
variable = u
velocity_vector = v
[]
[diff2]
type = Diffusion
variable = v
[]
[react]
type = Reaction
variable = u
[]
[forceu]
type = BodyForce
variable = u
function = forcing_fnu
[]
[forcev]
type = BodyForce
variable = v
function = forcing_fnv
[]
[]
[AuxKernels]
[set_v_elem]
type = FunctionAux
variable = v_elem
# selected not to be the solution for no particular reason
function = forcing_fnv
[]
[]
[BCs]
[bc_v]
type = FunctionDirichletBC
variable = v
function = slnv
boundary = 'left right top bottom'
[]
[bc_u_tb]
type = CoupledKernelGradBC
variable = u
var2 = v
vel = '0.1 0.1'
boundary = 'top bottom left right'
[]
[bc_ul]
type = FunctionNeumannBC
variable = u
function = bc_fnul
boundary = 'left'
[]
[bc_ur]
type = FunctionNeumannBC
variable = u
function = bc_fnur
boundary = 'right'
[]
[bc_ut]
type = FunctionNeumannBC
variable = u
function = bc_fnut
boundary = 'top'
[]
[bc_ub]
type = FunctionNeumannBC
variable = u
function = bc_fnub
boundary = 'bottom'
[]
[]
[Postprocessors]
# Global user objects
[dofs]
type = NumDOFs
[]
[h]
type = AverageElementSize
[]
# Elemental user objects
[L2u]
type = ElementL2Error
variable = u
function = slnu
# Testing an option
force_preic = true
[]
[L2v]
type = ElementL2Error
variable = v
function = slnv
# Testing an option
force_preaux = true
[]
[H1error]
type = ElementH1Error
variable = u
function = slnu
[]
[H1Semierror]
type = ElementH1SemiError
variable = u
function = slnu
[]
[L2v_elem]
type = ElementL2Error
variable = v_elem
function = slnv
[]
[f_integral]
type = FunctionElementIntegral
function = slnv
[]
[int_v]
type = ElementIntegralVariablePostprocessor
variable = v
block = 1
execute_on = 'TIMESTEP_END transfer'
[]
[int_v_elem]
type = ElementIntegralVariablePostprocessor
variable = v_elem
block = 1
execute_on = 'TIMESTEP_END transfer'
[]
# Side user objects
[integral_v]
type = SideIntegralVariablePostprocessor
variable = v
boundary = 0
[]
[]
[VectorPostprocessors]
# General UOs
[memory]
type = VectorMemoryUsage
[]
[line]
type = LineValueSampler
variable = v
num_points = 10
start_point = '0 0 0'
end_point = '0.5 0.5 0'
sort_by = 'x'
[]
# Nodal UOs
[nodal_sampler_y]
type = NodalValueSampler
variable = v
sort_by = 'y'
[]
[nodal_sampler_x]
type = NodalValueSampler
variable = v
sort_by = 'x'
[]
# Element UO
[elem_sample]
type = ElementValueSampler
variable = v_elem
sort_by = 'x'
[]
[]
[UserObjects]
# Nodal user objects
[find_node]
type = NearestNodeNumberUO
point = '0.5 0.5 0'
[]
# Side user objects
[side_int]
type = LayeredSideIntegral
variable = v
boundary = 0
direction = y
num_layers = 4
[]
[side_int_2]
type = NearestPointLayeredSideIntegral
variable = v
boundary = 0
direction = x
num_layers = 3
points = '1 1 0'
[]
# Interface user objects
[values]
type = InterfaceQpValueUserObject
var = v
boundary = interface
[]
inactive = 'prime_1 prime_2'
# Threaded general user objects
[prime_2]
type = PrimeProductUserObject
[]
[prime_1]
type = PrimeProductUserObject
[]
# Domain user objects
[domain_2]
type = InterfaceDomainUserObject
u = u
v = v
block = '0'
robin_boundaries = 'left'
interface_boundaries = 'interface'
interface_penalty = 1e-10
nl_abs_tol = 1e1
[]
[domain_1]
type = InterfaceDomainUserObject
u = u
v = v
block = '0 1'
robin_boundaries = 'left'
interface_boundaries = 'interface'
interface_penalty = 1e-10
nl_abs_tol = 1e1
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_tol = 1e-5
[]
[Problem]
kernel_coverage_check = false
[]
[MultiApps]
active = ''
[full_solve]
type = FullSolveMultiApp
execute_on = 'initial timestep_end final'
input_files = show_execution_userobjects.i
cli_args = 'Problem/solve=false'
[]
[]
[Transfers]
active = ''
[conservative]
type = MultiAppNearestNodeTransfer
from_multi_app = full_solve
source_variable = v
variable = v_elem
from_postprocessors_to_be_preserved = int_v
to_postprocessors_to_be_preserved = int_v_elem
[]
[]
[Debug]
show_execution_order = 'ALWAYS INITIAL NONLINEAR LINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
[]
(modules/heat_transfer/test/tests/view_factors_symmetry/cavity_with_pillars.i)
[Mesh]
[cartesian]
type = CartesianMeshGenerator
dim = 3
dx = '0.5 0.5 0.5 0.5 0.5 0.5'
dy = '0.5 0.75 0.5'
dz = '1.5 0.5'
subdomain_id = '
1 1 1 1 1 1
1 2 1 1 2 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
'
[]
[add_obstruction]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 2
paired_block = 1
new_boundary = obstruction
input = cartesian
[]
[add_new_back]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(z) < 1e-10'
included_subdomains = '1'
normal = '0 0 -1'
new_sideset_name = back_2
input = add_obstruction
[]
[]
[UserObjects]
[view_factor_study]
type = ViewFactorRayStudy
execute_on = initial
boundary = 'left right top bottom front back_2 obstruction'
face_order = FOURTH
[]
[view_factor]
type = RayTracingViewFactor
boundary = 'left right top bottom front back_2 obstruction'
execute_on = INITIAL
normalize_view_factor = false
ray_study_name = view_factor_study
[]
[]
[RayBCs/viewfactor]
type = ViewFactorRayBC
boundary = 'left right top bottom front back_2 obstruction'
[]
[Postprocessors]
[left_right]
type = ViewFactorPP
from_boundary = left
to_boundary = right
view_factor_object_name = view_factor
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/exceptions/bad-restriction.i)
mu=1.1
rho=1.1
advected_interp_method='average'
velocity_interp_method='rc'
restricted_blocks = '1'
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
block = '1 2'
pressure = pressure
[]
[]
[Mesh]
parallel_type = 'replicated'
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '1 1'
dy = '1'
ix = '7 7'
iy = 10
subdomain_id = '1 2'
[]
[mid]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
input = mesh
new_boundary = 'middle'
[]
[break_top]
type = PatchSidesetGenerator
boundary = 'top'
n_patches = 2
input = mid
[]
[break_bottom]
type = PatchSidesetGenerator
boundary = 'bottom'
n_patches = 2
input = break_top
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 1
block = ${restricted_blocks}
[]
[v]
type = INSFVVelocityVariable
initial_condition = 1
block = ${restricted_blocks}
[]
[pressure]
type = INSFVPressureVariable
block = ${restricted_blocks}
[]
[temperature]
type = INSFVEnergyVariable
block = ${restricted_blocks}
[]
[scalar]
type = INSFVScalarFieldVariable
block = ${restricted_blocks}
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[energy_advection]
type = INSFVEnergyAdvection
variable = temperature
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
[]
[energy_diffusion]
type = FVDiffusion
coeff = 1.1
variable = temperature
[]
[energy_loss]
type = FVBodyForce
variable = temperature
value = -0.1
[]
[scalar_advection]
type = INSFVScalarFieldAdvection
variable = scalar
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
[]
[scalar_diffusion]
type = FVDiffusion
coeff = 1
variable = scalar
[]
[scalar_src]
type = FVBodyForce
variable = scalar
value = 0.1
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = '1'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = v
function = 0
[]
[top-wall-u]
type = INSFVNoSlipWallBC
boundary = 'top_0'
variable = u
function = 0
[]
[top-wall-v]
type = INSFVNoSlipWallBC
boundary = 'top_0'
variable = v
function = 0
[]
[bottom-wall-u]
type = INSFVSymmetryVelocityBC
boundary = 'bottom_0'
variable = u
mu = ${mu}
u = u
v = v
momentum_component = 'x'
[]
[bottom-wall-v]
type = INSFVSymmetryVelocityBC
boundary = 'bottom_0'
variable = v
mu = ${mu}
u = u
v = v
momentum_component = 'y'
[]
[bottom-wall-p]
type = INSFVSymmetryPressureBC
boundary = 'bottom_0'
variable = pressure
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'middle'
variable = pressure
function = 0
[]
[inlet_t]
type = FVDirichletBC
boundary = 'left'
variable = temperature
value = 1
[]
[outlet_scalar]
type = FVDirichletBC
boundary = 'middle'
variable = scalar
value = 1
[]
[]
[FunctorMaterials]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = 'temperature'
rho = ${rho}
block = ${restricted_blocks}
[]
[const]
type = ADGenericFunctorMaterial
prop_names = 'cp'
prop_values = '2'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm 100 lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
[]
(modules/heat_transfer/test/tests/fvbcs/fv_functor_convective_heat_flux/fv_functor_convective_heat_flux.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 6
ny = 5
xmax = 2
subdomain_ids = '0 0 0 1 1 1
0 0 0 1 1 1
0 0 0 1 1 1
0 0 0 1 1 1
0 0 0 1 1 1'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = gen
primary_block = 0
paired_block = 1
new_boundary = interface
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[T_solid]
type = MooseVariableFVReal
initial_condition = 1
block = 0
[]
[T_fluid]
type = MooseVariableFVReal
initial_condition = 0
block = 1
[]
[]
[FVKernels]
[diff_wall]
type = FVDiffusion
variable = T_solid
block = 0
coeff = 2
[]
[diff_fluid]
type = FVDiffusion
variable = T_fluid
block = 1
coeff = 4
[]
[gradient_creating]
type = FVBodyForce
variable = T_fluid
[]
[]
[FVBCs]
[interface_fluid_to_solid]
type = FVFunctorConvectiveHeatFluxBC
boundary = 'interface'
variable = T_solid
T_bulk = T_fluid
T_solid = T_solid
is_solid = true
heat_transfer_coefficient = 'htc'
[]
[left]
type = FVDirichletBC
boundary = 'left'
variable = T_solid
value = 1
[]
[interface_solid_to_fluid]
type = FVFunctorConvectiveHeatFluxBC
boundary = 'interface'
variable = T_fluid
T_bulk = T_fluid
T_solid = T_solid
is_solid = false
heat_transfer_coefficient = 'htc'
[]
[right]
type = FVDirichletBC
boundary = 'right'
variable = T_fluid
value = 0
[]
[]
[Materials]
[cht]
type = ADGenericFunctorMaterial
prop_names = 'htc'
prop_values = '1'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/side_integral/side_integral_functor.i)
[Mesh]
inactive = 'refine'
# U-shaped domains to have internal boundaries in
# a variety of directions
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1 1 1'
dy = '3 1'
ix = '4 5 3'
iy = '12 4'
subdomain_id = '1 2 1
1 1 1'
[]
[internal_boundary_dir1]
type = SideSetsBetweenSubdomainsGenerator
input = cmg
primary_block = 1
paired_block = 2
new_boundary = 'inside_1'
[]
[internal_boundary_dir2]
type = SideSetsBetweenSubdomainsGenerator
input = internal_boundary_dir1
primary_block = 2
paired_block = 1
new_boundary = 'inside_2'
[]
[refine]
type = RefineBlockGenerator
input = internal_boundary_dir2
block = '1 2'
refinement = '2 1'
[]
[]
[Variables]
[u]
type = MooseVariableFVReal
block = 1
[]
[]
[AuxVariables]
[v1]
type = MooseVariableFVReal
block = 1
[FVInitialCondition]
type = FVFunctionIC
function = 'x + y'
[]
[]
[v2]
type = MooseVariableFVReal
block = 2
[FVInitialCondition]
type = FVFunctionIC
function = '2*x*x - y'
[]
[]
[]
[Functions]
[f1]
type = ParsedFunction
expression = 'exp(x - y)'
[]
[]
[Materials]
[m1]
type = ADGenericFunctorMaterial
prop_names = 'm1'
prop_values = 'f1'
[]
[m2]
type = ADPiecewiseByBlockFunctorMaterial
prop_name = 'm2'
subdomain_to_prop_value = '1 12
2 4'
[]
[]
[FVKernels]
[diff]
type = FVDiffusion
variable = u
coeff = '1'
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = u
boundary = 3
value = 0
[]
[right]
type = FVDirichletBC
variable = u
boundary = 1
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Postprocessors]
# Mesh external boundaries integration
[ext_u]
type = ADSideIntegralFunctorPostprocessor
boundary = 'left top right'
functor = u
restrict_to_functors_domain = true
[]
[ext_v1]
type = ADSideIntegralFunctorPostprocessor
boundary = 'left right'
functor = v1
[]
[ext_v2]
type = ADSideIntegralFunctorPostprocessor
boundary = 'top'
functor = v2
restrict_to_functors_domain = true
[]
[ext_f1]
type = ADSideIntegralFunctorPostprocessor
boundary = 'left top right'
functor = f1
prefactor = f1
[]
[ext_m1]
type = ADSideIntegralFunctorPostprocessor
boundary = 'left top right'
functor = m1
restrict_to_functors_domain = true
[]
[ext_m2]
type = ADSideIntegralFunctorPostprocessor
boundary = 'left top right'
functor = m2
restrict_to_functors_domain = true
[]
# Internal to the mesh, but a side to the variables
# With orientation of normal 1->2
[int_s1_u]
type = ADSideIntegralFunctorPostprocessor
boundary = inside_1
functor = u
[]
[int_s1_v1]
type = ADSideIntegralFunctorPostprocessor
boundary = inside_1
functor = v1
[]
[int_s1_f1]
type = ADSideIntegralFunctorPostprocessor
boundary = inside_1
functor = f1
[]
[int_s1_m1]
type = ADSideIntegralFunctorPostprocessor
boundary = inside_1
functor = m1
[]
[int_s1_m2]
type = ADSideIntegralFunctorPostprocessor
boundary = inside_1
functor = m2
[]
# With orientation of normal 2->1
[int_s2_v2]
type = ADSideIntegralFunctorPostprocessor
boundary = inside_2
functor = v2
[]
[int_s2_f1]
type = ADSideIntegralFunctorPostprocessor
boundary = inside_2
functor = f1
[]
[int_s2_m1]
type = ADSideIntegralFunctorPostprocessor
boundary = inside_2
functor = m1
[]
[int_s2_m2]
type = ADSideIntegralFunctorPostprocessor
boundary = inside_2
functor = m2
[]
[]
[Outputs]
csv = true
exodus = true
[]
[Problem]
kernel_coverage_check = false
[]
(test/tests/meshmodifiers/element_subdomain_modifier/return_moving_boundary.i)
[Problem]
solve = false
[]
[Mesh]
add_subdomain_ids = 3
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 16
ny = 16
[]
[left]
type = SubdomainBoundingBoxGenerator
input = 'gen'
block_id = 1
bottom_left = '0 0 0'
top_right = '0.25 1 1'
[]
[right]
type = SubdomainBoundingBoxGenerator
input = 'left'
block_id = 2
bottom_left = '0.25 0 0'
top_right = '1 1 1'
[]
[boundary]
type = SideSetsBetweenSubdomainsGenerator
input = 'right'
new_boundary = 'moving_boundary'
primary_block = '1'
paired_block = '2'
[]
[]
[AuxVariables]
[dummy]
[]
[]
[MeshModifiers]
[subdomain_change]
type = TimedSubdomainModifier
times = '0.3 0.6'
blocks_from = '1 3'
blocks_to = '3 1'
moving_boundaries = 'moving_boundary'
moving_boundary_subdomain_pairs = '1 2'
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[Executioner]
type = Transient
dt = 0.3
num_steps = 3
[]
[Outputs]
exodus = true
[]
(test/tests/interfacekernels/ad_coupled_gradient/coupled.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 20
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[]
[Variables]
[u]
block = '0'
[]
[v]
block = '1'
[]
[w]
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
block = 0
[]
[diff_v]
type = Diffusion
variable = v
block = 1
[]
[diff_w]
type = Diffusion
variable = w
[]
[react_w]
type = Reaction
variable = w
[]
[]
[InterfaceKernels]
[interface]
type = ADCoupledInterfacialSourceGradient
variable = u
neighbor_var = v
var_source = w
boundary = primary0_interface
D = 1
D_neighbor = 1
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = 'left'
value = 0
[]
[right]
type = DirichletBC
variable = v
boundary = 'right'
value = 10
[]
[middle]
type = MatchedValueBC
variable = v
boundary = 'primary0_interface'
v = u
[]
[w_left]
type = DirichletBC
variable = w
boundary = 'left'
value = 0
[]
[w_right]
type = DirichletBC
variable = w
boundary = 'right'
value = 4
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(test/tests/interfacekernels/1d_interface/ik_save_in_test.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 2
xmax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./interface_again]
type = SideSetsBetweenSubdomainsGenerator
input = interface
primary_block = '1'
paired_block = '0'
new_boundary = 'primary1_interface'
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = '0'
[../]
[./v]
order = FIRST
family = LAGRANGE
block = '1'
[../]
[]
[AuxVariables]
[./primary_resid]
[../]
[./secondary_resid]
[../]
[./primary_jac]
[../]
[./secondary_jac]
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
save_in = 'primary_resid'
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
save_in = 'secondary_resid'
[../]
[]
[InterfaceKernels]
[./interface]
type = InterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
D = 4
D_neighbor = 2
save_in_var_side = 'm s'
save_in = 'primary_resid secondary_resid'
diag_save_in_var_side = 'm s'
diag_save_in = 'primary_jac secondary_jac'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left'
value = 0
save_in = 'primary_resid'
[../]
[./right]
type = DirichletBC
variable = v
boundary = 'right'
value = 1
save_in = 'secondary_resid'
[../]
[./middle]
type = MatchedValueBC
variable = v
boundary = 'primary0_interface'
v = u
save_in = 'secondary_resid'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
[Debug]
show_var_residual_norms = true
[]
(test/tests/fviks/diffusion/test.i)
L = 2
l = 1
q1 = 1
q2 = 2
uR = 1
D1 = 1
D2 = 2
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = ${L}
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '${l} 0 0'
block_id = 1
top_right = '${L} 1.0 0'
[]
[interface_primary]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary_interface'
[]
[]
[Variables]
[u]
type = MooseVariableFVReal
block = 0
initial_condition = 0.5
[]
[v]
type = MooseVariableFVReal
block = 1
initial_condition = 0.5
[]
[]
[FVKernels]
[diff_left]
type = FVDiffusion
variable = u
coeff = 'left'
block = 0
coeff_interp_method = average
[]
[source_left]
type = FVBodyForce
variable = u
function = ${q1}
block = 0
[]
[diff_right]
type = FVDiffusion
variable = v
coeff = 'right'
block = 1
coeff_interp_method = average
[]
[source_right]
type = FVBodyForce
variable = v
function = ${q2}
block = 1
[]
[]
[FVInterfaceKernels]
[interface]
type = FVDiffusionInterface
variable1 = u
variable2 = v
boundary = 'primary_interface'
subdomain1 = '0'
subdomain2 = '1'
coeff1 = 'left'
coeff2 = 'right'
coeff_interp_method = average
[]
[]
[FVBCs]
[v_left]
type = FVDirichletBC
variable = v
boundary = 'right'
value = ${uR}
[]
[]
[Materials]
[block0]
type = ADGenericFunctorMaterial
block = '0'
prop_names = 'left'
prop_values = '${D1}'
[]
[block1]
type = ADGenericFunctorMaterial
block = '1'
prop_names = 'right'
prop_values = '${D2}'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(modules/ray_tracing/test/tests/traceray/internal_sidesets/internal_sidesets_3d.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 3
dx = '2 2 2'
dy = '2 2 2'
dz = '2 2 2'
ix = '2 2 2'
iy = '2 2 2'
iz = '2 2 2'
subdomain_id = '0 0 0
0 1 0
0 0 0
0 2 0
3 7 4
0 5 0
0 0 0
0 6 0
0 0 0'
[]
[interior_back]
type = SideSetsBetweenSubdomainsGenerator
input = cmg
primary_block = 7
paired_block = 1
new_boundary = 'interior_back'
[]
[interior_bottom]
type = SideSetsBetweenSubdomainsGenerator
input = interior_back
primary_block = 7
paired_block = 2
new_boundary = 'interior_bottom'
[]
[interior_left]
type = SideSetsBetweenSubdomainsGenerator
input = interior_bottom
primary_block = 7
paired_block = 3
new_boundary = 'interior_left'
[]
[interior_right]
type = SideSetsBetweenSubdomainsGenerator
input = interior_left
primary_block = 7
paired_block = 4
new_boundary = 'interior_right'
[]
[interior_top]
type = SideSetsBetweenSubdomainsGenerator
input = interior_right
primary_block = 7
paired_block = 5
new_boundary = 'interior_top'
[]
[interior_front]
type = SideSetsBetweenSubdomainsGenerator
input = interior_top
primary_block = 7
paired_block = 6
new_boundary = 'interior_front'
[]
[]
[RayBCs]
active = 'kill_internal'
# active = 'kill_external reflect_internal'
# for testing internal kill
[kill_internal]
type = KillRayBC
boundary = 'interior_top interior_right interior_bottom interior_left interior_front interior_back'
[]
# for testing internal reflect
[kill_external]
type = KillRayBC
boundary = 'top right bottom left front back'
[]
[reflect_internal]
type = ReflectRayBC
boundary = 'interior_top interior_right interior_bottom interior_left interior_front interior_back'
[]
[]
[UserObjects/study]
type = RepeatableRayStudy
start_points = '0 0 0
2 2 2
6 6 6
4 4 4
0 2.5 2.5
3 3 6
2.5 0 0
3 3 3
2.5 2.5 2.5'
directions = '1 1 1
1 1 1
-1 -1 -1
-1 -1 -1
1 0.1 0
0 0 -1
0 1 1
1 1 1
0.5 1.5 1.5'
names = 'to_bottom_left_corner
at_bottom_left_corner
to_top_right_corner
at_top_right_corner
centroid_offset
top_down
left_to_edge
inside_to_corner
inside_offset'
execute_on = initial
ray_distance = 10
ray_kernel_coverage_check = false
use_internal_sidesets = true
[]
[Postprocessors/total_distance]
type = RayTracingStudyResult
study = study
result = total_distance
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/interfacekernels/1d_interface/coupled_value_coupled_flux.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[../]
[./interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = '0'
[../]
[./v]
order = FIRST
family = LAGRANGE
block = '1'
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[../]
[]
[InterfaceKernels]
active = 'interface'
[./interface]
type = InterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
D = 'D'
D_neighbor = 'D'
[../]
[./penalty_interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
active = 'left right middle'
[./left]
type = DirichletBC
variable = u
boundary = 'left'
value = 1
[../]
[./right]
type = DirichletBC
variable = v
boundary = 'right'
value = 0
[../]
[./middle]
type = MatchedValueBC
variable = v
boundary = 'primary0_interface'
v = u
[../]
[]
[Materials]
[./stateful]
type = StatefulMaterial
initial_diffusivity = 1
boundary = primary0_interface
[../]
[./block0]
type = GenericConstantMaterial
block = '0'
prop_names = 'D'
prop_values = '4'
[../]
[./block1]
type = GenericConstantMaterial
block = '1'
prop_names = 'D'
prop_values = '2'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
[Debug]
show_var_residual_norms = 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/phase_field/test/tests/misc/interface_flux.i)
#
# This test demonstrates an InterfaceKernel (InterfaceDiffusionFlux) that can
# replace a pair of integrated DiffusionFluxBC boundary conditions.
#
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
ymax = 0.5
[]
[./box1]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '0.51 1 0'
input = gen
[../]
[./box2]
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '0.49 0 0'
top_right = '1 1 0'
input = box1
[../]
[./iface_u]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = 10
input = box2
[../]
[]
[Variables]
[./u2]
block = 1
[./InitialCondition]
type = FunctionIC
function = 'r:=sqrt((x-0.4)^2+(y-0.5)^2);if(r<0.05,5,1)'
[../]
[../]
[./v2]
block = 2
[./InitialCondition]
type = FunctionIC
function = 'r:=sqrt((x-0.7)^2+(y-0.5)^2);if(r<0.05,5,1)'
[../]
[../]
[]
[Kernels]
[./u2_diff]
type = Diffusion
variable = u2
block = 1
[../]
[./u2_dt]
type = TimeDerivative
variable = u2
block = 1
[../]
[./v2_diff]
type = Diffusion
variable = v2
block = 2
[../]
[./v2_dt]
type = TimeDerivative
variable = v2
block = 2
[../]
[]
[InterfaceKernels]
[./iface]
type = InterfaceDiffusionBoundaryTerm
boundary = 10
variable = u2
neighbor_var = v2
[../]
[]
[Executioner]
type = Transient
dt = 0.002
num_steps = 6
[]
[Outputs]
exodus = true
print_linear_residuals = false
[]
(test/tests/interfacekernels/1d_interface/ADMatreaction_1D_transient.i)
# Transient-state test for the InterfaceReaction kernel.
#
# Same to steady-state, except the following
#
# Natural BCs are applied (i.e. NewmannBC h=0 at left and right)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'subdomain1'
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
block = '0'
[]
[v]
order = FIRST
family = LAGRANGE
block = '1'
[]
[]
[Kernels]
[diff_u]
type = MatDiffusion
variable = u
block = '0'
diffusivity = D
[]
[diff_v]
type = MatDiffusion
variable = v
block = '1'
diffusivity = D
[]
[diff_u_dt]
type = TimeDerivative
variable = u
block = '0'
[]
[diff_v_dt]
type = TimeDerivative
variable = v
block = '1'
[]
[source_u]
type = BodyForce
variable = u
block = '0'
[]
[]
[InterfaceKernels]
[interface]
type = InterfaceDiffusion
variable = u
neighbor_var = 'v'
boundary = 'primary0_interface'
D = D
D_neighbor = D
[]
[interface_reaction]
type = ADMatInterfaceReaction
variable = u
neighbor_var = 'v'
boundary = 'primary0_interface'
forward_rate = forward_rate
backward_rate = backward_rate
[]
[]
[Materials]
[block0]
type = 'ADGenericConstantMaterial'
block = '0'
prop_names = 'forward_rate backward_rate'
prop_values = '1.0 2.0'
[]
[block01]
type = 'GenericConstantMaterial'
block = '0'
prop_names = 'D'
prop_values = '4'
[]
[block1]
type = 'ADGenericConstantMaterial'
block = '1'
prop_names = 'forward_rate backward_rate'
prop_values = '1.0 2.0'
[]
[block11]
type = 'GenericConstantMaterial'
block = '1'
prop_names = 'D'
prop_values = '2'
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = NEWTON
[]
[Outputs]
print_linear_residuals = true
#execute_on = 'FINAL'
exodus = true
csv = true
[]
[Debug]
show_var_residual_norms = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/block-restriction/with-empty-block.i)
mu = 1.2
rho_fluid = 0.2
k_fluid = 1.1
cp_fluid = 2.3
T_cold = 310
alpha = 1e-3
Q = 200
[Problem]
kernel_coverage_check = false
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
velocity_interp_method = 'rc'
advected_interp_method = 'average'
[]
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '0.3683 0.0127'
dy = '0.0127 0.2292 2.5146 0.2292 0.0127'
ix = '2 1'
iy = '1 2 3 2 1'
subdomain_id = '0 0
1 0
2 0
1 0
0 0
'
[]
[rename_block_name]
type = RenameBlockGenerator
input = cmg
old_block = '0 1 2'
new_block = 'wall_block spacer_block porous_block'
[]
[solid_fluid_interface_1]
type = SideSetsBetweenSubdomainsGenerator
input = rename_block_name
primary_block = porous_block
paired_block = wall_block
new_boundary = 'solid_fluid_interface'
[]
[solid_fluid_interface_2]
type = SideSetsBetweenSubdomainsGenerator
input = solid_fluid_interface_1
primary_block = spacer_block
paired_block = wall_block
new_boundary = 'solid_fluid_interface'
[]
[wall_left_boundary_1]
type = SideSetsFromBoundingBoxGenerator
input = solid_fluid_interface_2
bottom_left = '0 0 0'
top_right = '0.1 0.0127 0'
included_boundaries = left
boundary_new = wall_left
[]
[wall_left_boundary_2]
type = SideSetsFromBoundingBoxGenerator
input = wall_left_boundary_1
bottom_left = '0 2.9857 0'
top_right = '0.1 2.9984 0'
included_boundaries = left
boundary_new = wall_left
[]
[fluid_left_boundary]
type = SideSetsFromBoundingBoxGenerator
input = wall_left_boundary_2
bottom_left = '0 0.0127 0'
top_right = '0.1 2.9857 0'
included_boundaries = left
boundary_new = fluid_left
[]
coord_type = RZ
rz_coord_axis = Y
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = superficial_vel_x
v = superficial_vel_y
pressure = pressure
porosity = porosity
block = 'spacer_block porous_block'
[]
[]
[Variables]
[superficial_vel_x]
type = PINSFVSuperficialVelocityVariable
block = 'spacer_block porous_block'
[]
[superficial_vel_y]
type = PINSFVSuperficialVelocityVariable
block = 'spacer_block porous_block'
[]
[pressure]
type = INSFVPressureVariable
block = 'spacer_block porous_block'
[]
[T_fluid]
type = INSFVEnergyVariable
block = 'spacer_block porous_block'
[]
[lambda]
family = SCALAR
order = FIRST
block = 'spacer_block porous_block'
[]
[]
[AuxVariables]
[porosity]
type = MooseVariableFVReal
block = 'spacer_block porous_block'
[]
[]
[FVKernels]
# No mass time derivative because imcompressible (derivative = 0)
[mass]
type = PINSFVMassAdvection
variable = pressure
rho = ${rho_fluid}
block = 'spacer_block porous_block'
[]
[mean_zero_pressure]
type = FVIntegralValueConstraint
variable = pressure
lambda = lambda
block = 'spacer_block porous_block'
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_x
rho = ${rho_fluid}
momentum_component = 'x'
block = 'spacer_block porous_block'
porosity = porosity
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_x
mu = ${mu}
momentum_component = 'x'
block = 'spacer_block porous_block'
porosity = porosity
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_x
momentum_component = 'x'
pressure = pressure
block = 'spacer_block porous_block'
porosity = porosity
[]
[u_buoyancy]
type = PINSFVMomentumBoussinesq
variable = superficial_vel_x
T_fluid = T_fluid
gravity = '0 -1 0'
rho = ${rho_fluid}
ref_temperature = ${T_cold}
momentum_component = 'x'
block = 'spacer_block porous_block'
porosity = porosity
[]
[u_gravity]
type = PINSFVMomentumGravity
variable = superficial_vel_x
gravity = '0 -1 0'
rho = ${rho_fluid}
momentum_component = 'x'
block = 'spacer_block porous_block'
porosity = porosity
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_y
rho = ${rho_fluid}
momentum_component = 'y'
block = 'spacer_block porous_block'
porosity = porosity
[]
[v_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_y
mu = ${mu}
momentum_component = 'y'
block = 'spacer_block porous_block'
porosity = porosity
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_y
momentum_component = 'y'
pressure = pressure
block = 'spacer_block porous_block'
porosity = porosity
[]
[v_buoyancy]
type = PINSFVMomentumBoussinesq
variable = superficial_vel_y
T_fluid = T_fluid
gravity = '0 -1 0'
rho = ${rho_fluid}
ref_temperature = ${T_cold}
momentum_component = 'y'
block = 'spacer_block porous_block'
porosity = porosity
[]
[v_gravity]
type = PINSFVMomentumGravity
variable = superficial_vel_y
gravity = '0 -1 0'
rho = ${rho_fluid}
momentum_component = 'y'
block = 'spacer_block porous_block'
porosity = porosity
[]
[temp_conduction]
type = PINSFVEnergyDiffusion
k = 'k_fluid'
variable = T_fluid
block = 'spacer_block porous_block'
porosity = porosity
[]
[temp_advection]
type = PINSFVEnergyAdvection
variable = T_fluid
block = 'spacer_block porous_block'
[]
[heat_source]
type = FVBodyForce
variable = T_fluid
function = ${Q}
block = 'porous_block'
[]
[]
[FVBCs]
[no_slip_x]
type = INSFVNoSlipWallBC
variable = superficial_vel_x
boundary = 'solid_fluid_interface'
function = 0
[]
[no_slip_y]
type = INSFVNoSlipWallBC
variable = superficial_vel_y
boundary = 'solid_fluid_interface'
function = 0
[]
[reflective_x]
type = INSFVSymmetryVelocityBC
variable = superficial_vel_x
boundary = fluid_left
momentum_component = 'x'
mu = ${mu}
u = superficial_vel_x
v = superficial_vel_y
[]
[reflective_y]
type = INSFVSymmetryVelocityBC
variable = superficial_vel_y
boundary = fluid_left
momentum_component = 'y'
mu = ${mu}
u = superficial_vel_x
v = superficial_vel_y
[]
[reflective_p]
type = INSFVSymmetryPressureBC
boundary = fluid_left
variable = pressure
[]
[T_reflective]
type = FVNeumannBC
variable = T_fluid
boundary = fluid_left
value = 0
[]
[T_cold_boundary]
type = FVDirichletBC
variable = T_fluid
boundary = solid_fluid_interface
value = ${T_cold}
[]
[]
[ICs]
[porosity_spacer]
type = ConstantIC
variable = porosity
block = spacer_block
value = 1.0
[]
[porosity_fuel]
type = ConstantIC
variable = porosity
block = porous_block
value = 0.1
[]
[temp_ic_fluid]
type = ConstantIC
variable = T_fluid
value = ${T_cold}
block = 'spacer_block porous_block'
[]
[superficial_vel_x]
type = ConstantIC
variable = superficial_vel_x
value = 1E-5
block = 'spacer_block porous_block'
[]
[superficial_vel_y]
type = ConstantIC
variable = superficial_vel_y
value = 1E-5
block = 'spacer_block porous_block'
[]
[]
[FunctorMaterials]
[functor_constants_fluid]
type = ADGenericFunctorMaterial
prop_names = 'alpha_b cp k_fluid'
prop_values = '${alpha} ${cp_fluid} ${k_fluid}'
block = 'spacer_block porous_block'
[]
[density_fluid]
type = INSFVEnthalpyFunctorMaterial
temperature = 'T_fluid'
rho = ${rho_fluid}
block = 'spacer_block porous_block'
[]
[functor_constants_steel]
# We need this to avoid errors for materials not existing on every block
type = ADGenericFunctorMaterial
prop_names = 'dummy'
prop_values = 0.0
block = wall_block
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = none
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
[Debug]
show_var_residual_norms = true
[]
(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/heat_transfer/test/tests/radiation_transfer_symmetry/cavity_with_pillars_symmetry_bc.i)
#
# inner_left: 8
# inner_top: 11
# inner_bottom: 10
# inner_front: 9
# back_2: 7
# obstruction: 6
#
[Mesh]
[cartesian]
type = CartesianMeshGenerator
dim = 3
dx = '0.4 0.5 0.5 0.5'
dy = '0.5 0.75 0.5'
dz = '1.5 0.5'
subdomain_id = '
3 1 1 1
3 1 2 1
3 1 1 1
3 1 1 1
3 1 1 1
3 1 1 1
'
[]
[add_obstruction]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 2
paired_block = 1
new_boundary = obstruction
input = cartesian
[]
[add_new_back]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(z) < 1e-10'
included_subdomains = '1'
normal = '0 0 -1'
new_sideset_name = back_2
input = add_obstruction
[]
[add_inner_left]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 3
paired_block = 1
new_boundary = inner_left
input = add_new_back
[]
[add_inner_front]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(z - 2) < 1e-10'
included_subdomains = '1'
normal = '0 0 1'
new_sideset_name = inner_front
input = add_inner_left
[]
[add_inner_bottom]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(y) < 1e-10'
included_subdomains = '1'
normal = '0 -1 0'
new_sideset_name = inner_bottom
input = add_inner_front
[]
[add_inner_top]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(y - 1.75) < 1e-10'
included_subdomains = '1'
normal = '0 1 0'
new_sideset_name = inner_top
input = add_inner_bottom
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[temperature]
block = '2 3'
initial_condition = 300
[]
[]
[Kernels]
[conduction]
type = HeatConduction
variable = temperature
block = '2 3'
diffusion_coefficient = 1
[]
[source]
type = BodyForce
variable = temperature
value = 1000
block = '2'
[]
[]
[BCs]
[convective]
type = CoupledConvectiveHeatFluxBC
variable = temperature
T_infinity = 300
htc = 50
boundary = 'left'
[]
[]
[GrayDiffuseRadiation]
[./cavity]
boundary = '6 7 8 9 10 11'
emissivity = '1 1 1 1 1 1'
n_patches = '1 1 1 1 1 1'
adiabatic_boundary = '7 9 10 11'
symmetry_boundary = '2'
partitioners = 'metis metis metis metis metis metis'
temperature = temperature
ray_tracing_face_order = SECOND
normalize_view_factor = false
[../]
[]
[Postprocessors]
[Tpv]
type = PointValue
variable = temperature
point = '0.3 0.5 0.5'
[]
[volume]
type = VolumePostprocessor
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/radiation_transfer_action/radiative_transfer_action.i)
[Problem]
kernel_coverage_check = false
[]
[Mesh]
type = MeshGeneratorMesh
[./cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1 1.3 1.9'
ix = '3 3 3'
dy = '2 1.2 0.9'
iy = '3 3 3'
subdomain_id = '0 1 0
4 5 2
0 3 0'
[../]
[./inner_bottom]
type = SideSetsBetweenSubdomainsGenerator
input = cmg
primary_block = 1
paired_block = 5
new_boundary = 'inner_bottom'
[../]
[./inner_left]
type = SideSetsBetweenSubdomainsGenerator
input = inner_bottom
primary_block = 4
paired_block = 5
new_boundary = 'inner_left'
[../]
[./inner_right]
type = SideSetsBetweenSubdomainsGenerator
input = inner_left
primary_block = 2
paired_block = 5
new_boundary = 'inner_right'
[../]
[./inner_top]
type = SideSetsBetweenSubdomainsGenerator
input = inner_right
primary_block = 3
paired_block = 5
new_boundary = 'inner_top'
[../]
[./rename]
type = RenameBlockGenerator
old_block = '1 2 3 4'
new_block = '0 0 0 0'
input = inner_top
[../]
[]
[Variables]
[./temperature]
block = 0
[../]
[]
[Kernels]
[./heat_conduction]
type = HeatConduction
variable = temperature
block = 0
diffusion_coefficient = 5
[../]
[]
[GrayDiffuseRadiation]
[./cavity]
boundary = '4 5 6 7'
emissivity = '0.9 0.8 0.4 1'
n_patches = '2 2 2 3'
partitioners = 'centroid centroid centroid centroid'
centroid_partitioner_directions = 'x y y x'
temperature = temperature
adiabatic_boundary = '7'
fixed_temperature_boundary = '4'
fixed_boundary_temperatures = '1200'
view_factor_calculator = analytical
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = temperature
boundary = left
value = 600
[../]
[./right]
type = DirichletBC
variable = temperature
boundary = right
value = 300
[../]
[]
[Postprocessors]
[./average_T_inner_right]
type = SideAverageValue
variable = temperature
boundary = inner_right
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/natural_convection/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/interfacekernels/3d_interface/coupled_value_coupled_flux_with_jump_material.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 2
xmax = 2
ny = 2
ymax = 2
nz = 2
zmax = 2
[]
[./subdomain1]
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 1'
block_id = 1
input = gen
[../]
[./break_boundary]
input = subdomain1
type = BreakBoundaryOnSubdomainGenerator
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./v]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[../]
[./source_u]
type = BodyForce
variable = u
value = 1
[../]
[]
[AuxVariables]
[./jump_var]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[jump_aux]
type = MaterialRealAux
boundary = primary0_interface
property = jump
variable = jump_var
[]
[]
[InterfaceKernels]
[./interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
jump_prop_name = jump
[../]
[]
[Materials]
[./jump]
type = JumpInterfaceMaterial
var = u
neighbor_var = v
boundary = primary0_interface
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 back_to_0 right top front'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1 back_to_1'
[../]
[]
[Postprocessors]
[./u_int]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[../]
[./v_int]
type = ElementIntegralVariablePostprocessor
variable = v
block = 1
[../]
[interface_var_jump]
type = InterfaceAverageVariableValuePostprocessor
interface_value_type = jump_abs
variable = u
neighbor_variable = v
execute_on = TIMESTEP_END
boundary = primary0_interface
[]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
(test/tests/transfers/general_field/shape_evaluation/boundary/sub.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 5
ny = 5
nz = 5
xmax = 0.3
ymax = 0.3
zmax = 0.3
[]
[add_block]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x > 0.22 & y < 0.23'
block_id = 1
[]
[add_internal_sideset]
type = SideSetsBetweenSubdomainsGenerator
input = add_block
primary_block = 0
paired_block = 1
new_boundary = internal
[]
[]
[AuxVariables]
[from_main]
initial_condition = -1
[]
[from_main_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_main]
[InitialCondition]
type = FunctionIC
function = '3 + 2*x*x + 3*y*y*y'
[]
[]
[to_main_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '4 + 2*x*x + 3*y*y*y'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
hide = 'to_main to_main_elem'
overwrite = true
[]
[]
(test/tests/meshgenerators/refine_sideset_generator/test_secondary.i)
[Mesh]
[eg]
type = CartesianMeshGenerator
dim = 3
dx = '2 1 1'
dy = '2 3'
dz = '0.4 0.5 0.6 0.7'
ix = '2 1 1'
iy = '2 3'
iz = '1 1 1 1'
subdomain_id = '0 1 1 1
1 2 0 1
0 1 1 1
2 2 2 2
3 3 1 3
1 1 1 1'
[]
[sideset]
type = SideSetsBetweenSubdomainsGenerator
input = eg
primary_block = 1
paired_block = 2
new_boundary = sideset_1
[]
[refine]
type = RefineSidesetGenerator
input = sideset
boundaries = 'sideset_1'
refinement = '2'
boundary_side = 'secondary'
enable_neighbor_refinement = false
[]
[]
[Outputs]
exodus = true
[]
(modules/phase_field/examples/interfacekernels/interface_fluxbc.i)
#
# This test demonstrates an InterfaceKernel (InterfaceDiffusionFlux) that can
# replace a pair of integrated DiffusionFluxBC boundary conditions.
#
# The AuxVariable 'diff' shows the difference between the BC and the InterfaceKernel
# approach.
#
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 50
ny = 50
[]
[./box1]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '0.51 1 0'
[../]
[./box2]
input = box1
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '0.49 0 0'
top_right = '1 1 0'
[../]
[./iface_u]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = 10
input = box2
[../]
[./iface_v]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 2
paired_block = 1
new_boundary = 11
input = iface_u
[../]
[]
[Variables]
[./u1]
block = 1
[./InitialCondition]
type = FunctionIC
function = 'r:=sqrt((x-0.4)^2+(y-0.5)^2);if(r<0.05,5,1)'
[../]
[../]
[./v1]
block = 2
[./InitialCondition]
type = FunctionIC
function = 'r:=sqrt((x-0.7)^2+(y-0.5)^2);if(r<0.05,5,1)'
[../]
[../]
[./u2]
block = 1
[./InitialCondition]
type = FunctionIC
function = 'r:=sqrt((x-0.4)^2+(y-0.5)^2);if(r<0.05,5,1)'
[../]
[../]
[./v2]
block = 2
[./InitialCondition]
type = FunctionIC
function = 'r:=sqrt((x-0.7)^2+(y-0.5)^2);if(r<0.05,5,1)'
[../]
[../]
[]
[Kernels]
[./u1_diff]
type = Diffusion
variable = u1
block = 1
[../]
[./u1_dt]
type = TimeDerivative
variable = u1
block = 1
[../]
[./v1_diff]
type = Diffusion
variable = v1
block = 2
[../]
[./v1_dt]
type = TimeDerivative
variable = v1
block = 2
[../]
[./u2_diff]
type = Diffusion
variable = u2
block = 1
[../]
[./u2_dt]
type = TimeDerivative
variable = u2
block = 1
[../]
[./v2_diff]
type = Diffusion
variable = v2
block = 2
[../]
[./v2_dt]
type = TimeDerivative
variable = v2
block = 2
[../]
[]
[AuxVariables]
[./diff]
[../]
[]
[AuxKernels]
[./u_side]
type = ParsedAux
variable = diff
block = 1
coupled_variables = 'u1 u2'
expression = 'u1 - u2'
[../]
[./v_side]
type = ParsedAux
variable = diff
block = 2
coupled_variables = 'v1 v2'
expression = 'v1 - v2'
[../]
[]
[InterfaceKernels]
[./iface]
type = InterfaceDiffusionBoundaryTerm
boundary = 10
variable = u2
neighbor_var = v2
[../]
[]
[BCs]
[./u_boundary_term]
type = DiffusionFluxBC
variable = u1
boundary = 10
[../]
[./v_boundary_term]
type = DiffusionFluxBC
variable = v1
boundary = 11
[../]
[]
[Executioner]
type = Transient
dt = 0.001
num_steps = 20
[]
[Outputs]
exodus = true
print_linear_residuals = false
[]
(test/tests/transfers/general_field/nearest_node/boundary/main.i)
# Base input for testing transfers. It has the following complexities:
# - more than one subapp
# - transfers both from and to the subapps
# - both nodal and elemental variables
# - subapp meshes are not aligned with the main app
# Tests derived from this input may add complexities through command line arguments
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 5
ny = 5
nz = 5
[]
[add_block]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x < 0.5 & y < 0.5'
block_id = 1
[]
[add_internal_sideset]
type = SideSetsBetweenSubdomainsGenerator
input = add_block
primary_block = 0
paired_block = 1
new_boundary = internal
[]
[]
[AuxVariables]
[from_sub]
initial_condition = -1
[]
[from_sub_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_sub]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[to_sub_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
verbose_multiapps = true
[]
[Outputs]
[out]
type = Exodus
hide = 'to_sub to_sub_elem'
overwrite = true
[]
[]
[MultiApps]
[sub]
# 1 on corner, one in the center and one close to a corner
# The subapp mesh is a 0.3-sized cube, no overlap
positions = '0.2222 0.00002 0.0001 0.61111 0.311111 0.31211 0.76666 0.111114 0.81111'
type = TransientMultiApp
app_type = MooseTestApp
input_files = sub.i
execute_on = timestep_end
# Facilitates debugging
output_in_position = true
[]
[]
[Transfers]
# Boundary restrictions are added in the tests specification
[to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = to_sub
variable = from_main
[]
[to_sub_elem]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = to_sub_elem
variable = from_main_elem
[]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = to_main
variable = from_sub
[]
[from_sub_elem]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = to_main_elem
variable = from_sub_elem
[]
[]
(modules/heat_transfer/test/tests/view_factors/view_factor_obstructed.i)
[Mesh]
[cartesian]
type = CartesianMeshGenerator
dim = 3
dx = '0.55 0.9 0.55'
dy = '0.55 0.9 0.55'
dz = '0.75 0.0001 0.25'
subdomain_id = '0 0 0
0 0 0
0 0 0
0 0 0
0 1 0
0 0 0
0 0 0
0 0 0
0 0 0'
[]
[side_set_around_obstruction]
type = SideSetsBetweenSubdomainsGenerator
input = cartesian
primary_block = 1
paired_block = 0
new_boundary = 'obstacle'
[]
[]
[UserObjects]
[view_factor_study]
type = ViewFactorRayStudy
execute_on = initial
boundary = 'left right top bottom front back obstacle'
face_order = FOURTH
polar_quad_order = 12
azimuthal_quad_order = 4
warn_subdomain_hmax = false
[]
[view_factor]
type = RayTracingViewFactor
boundary = 'left right top bottom front back obstacle'
execute_on = INITIAL
ray_study_name = view_factor_study
[]
[]
[RayBCs/viewfactor]
type = ViewFactorRayBC
boundary = 'left right top bottom front back obstacle'
[]
# Reference solution for front -> back view factor
# is 0.282833. This result is derived from analytical
# view factors from:
# front -> orthogonal sides around front [left right top bottom]
# front -> obstacle
# front -> everywhere must be sum to 1
#
[Postprocessors]
[front_back]
type = ViewFactorPP
from_boundary = front
to_boundary = back
view_factor_object_name = view_factor
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(modules/electromagnetics/test/tests/interfacekernels/electromagnetic_interfaces/parallel.i)
# Verification Test of ParallelElectricFieldInterface
# with default materials
#
# Imposes u_parallel = v_parallel on each interface
# between subdomain 0 and 1
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 10
xmax = 2
ymax = 2
zmax = 2
elem_type = HEX20
[]
[subdomain1]
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 1'
block_id = 1
input = gmg
[]
[break_boundary]
type = BreakBoundaryOnSubdomainGenerator
input = subdomain1
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[]
[Variables]
[u]
order = FIRST
family = NEDELEC_ONE
block = 0
[]
[v]
order = FIRST
family = NEDELEC_ONE
block = 1
[]
[]
[Kernels]
[curl_u]
type = CurlCurlField
variable = u
block = 0
[]
[coeff_u]
type = VectorFunctionReaction
variable = u
block = 0
[]
[ffn_u]
type = VectorBodyForce
variable = u
block = 0
function_x = 1
function_y = 1
function_z = 1
[]
[curl_v]
type = CurlCurlField
variable = v
block = 1
[]
[coeff_v]
type = VectorFunctionReaction
variable = v
block = 1
[]
[]
[InterfaceKernels]
[parallel]
type = ParallelElectricFieldInterface
variable = u
neighbor_var = v
boundary = primary0_interface
[]
[]
[BCs]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
exodus = true
print_linear_residuals = 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/fviks/convection/convection_channel.i)
mu = 1
rho = 1
k = .01
cp = 1
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1 0.5'
dy = '1'
ix = '8 5'
iy = '8'
subdomain_id = '0 1'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'cmg'
primary_block = 0
paired_block = 1
new_boundary = 'interface'
[]
[fluid_side]
type = BreakBoundaryOnSubdomainGenerator
input = 'interface'
boundaries = 'top bottom'
[]
[]
[GlobalParams]
# retain behavior at time of test creation
two_term_boundary_expansion = false
rhie_chow_user_object = 'rc'
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
block = 0
pressure = pressure
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
block = 0
initial_condition = 1e-6
[]
[v]
type = INSFVVelocityVariable
block = 0
initial_condition = 1e-6
[]
[pressure]
type = INSFVPressureVariable
block = 0
[]
[T]
type = INSFVEnergyVariable
block = 0
initial_condition = 1
[]
[Ts]
type = INSFVEnergyVariable
block = 1
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
rho = ${rho}
[]
[mean_zero_pressure]
type = FVIntegralValueConstraint
variable = pressure
lambda = lambda
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[temp_conduction]
type = FVDiffusion
coeff = 'k'
variable = T
[]
[temp_advection]
type = INSFVEnergyAdvection
variable = T
[]
[solid_temp_conduction]
type = FVDiffusion
coeff = 'k'
variable = Ts
[]
[]
[FVInterfaceKernels]
[convection]
type = FVConvectionCorrelationInterface
variable1 = T
variable2 = Ts
boundary = 'interface'
h = 5
T_solid = Ts
T_fluid = T
subdomain1 = 0
subdomain2 = 1
wall_cell_is_bulk = true
[]
[]
[FVBCs]
[walls_u]
type = INSFVNoSlipWallBC
variable = u
boundary = 'interface left'
function = 0
[]
[walls_v]
type = INSFVNoSlipWallBC
variable = v
boundary = 'interface left'
function = 0
[]
[inlet_u]
type = INSFVInletVelocityBC
variable = u
boundary = 'bottom_to_0'
function = 0
[]
[inlet_v]
type = INSFVInletVelocityBC
variable = v
boundary = 'bottom_to_0'
function = 1
[]
[inlet_T]
type = FVDirichletBC
variable = T
boundary = 'bottom_to_0'
value = 0.5
[]
[outlet]
type = INSFVMassAdvectionOutflowBC
variable = pressure
boundary = 'top_to_0'
u = u
v = v
rho = ${rho}
[]
[outlet_u]
type = INSFVMomentumAdvectionOutflowBC
variable = u
boundary = 'top_to_0'
u = u
v = v
momentum_component = 'x'
rho = ${rho}
[]
[outlet_v]
type = INSFVMomentumAdvectionOutflowBC
variable = v
boundary = 'top_to_0'
u = u
v = v
momentum_component = 'y'
rho = ${rho}
[]
[heater]
type = FVDirichletBC
variable = 'Ts'
boundary = 'right'
value = 10
[]
[]
[FunctorMaterials]
[functor_constants]
type = ADGenericFunctorMaterial
prop_names = 'cp k'
prop_values = '${cp} ${k}'
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = 'T'
rho = ${rho}
block = 0
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -ksp_gmres_restart'
petsc_options_value = 'asm lu NONZERO 200'
line_search = 'none'
nl_abs_tol = 1e-14
[]
[Postprocessors]
[max_T]
type = ADElementExtremeFunctorValue
functor = T
block = 0
[]
[max_Ts]
type = ADElementExtremeFunctorValue
functor = Ts
block = 1
[]
[mdot_out]
type = VolumetricFlowRate
boundary = 'top_to_0'
vel_x = u
vel_y = v
advected_quantity = ${rho}
[]
[]
[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
[]
(modules/navier_stokes/test/tests/postprocessors/flow_rates/conservation_INSFE.i)
[Mesh]
second_order = true
inactive = 'mesh internal_boundary_bot internal_boundary_top'
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '1'
dy = '1 1 1'
ix = '5'
iy = '5 5 5'
subdomain_id = '1
2
3'
[]
[internal_boundary_bot]
type = SideSetsBetweenSubdomainsGenerator
input = mesh
new_boundary = 'internal_bot'
primary_block = 1
paired_block = 2
[]
[internal_boundary_top]
type = SideSetsBetweenSubdomainsGenerator
input = internal_boundary_bot
new_boundary = 'internal_top'
primary_block = 2
paired_block = 3
[]
[diverging_mesh]
type = FileMeshGenerator
file = 'expansion_quad.e'
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = steady-state
# no slip BCs
velocity_boundary = 'bottom right left'
velocity_function = '0 1 0 0 0 0'
pressure_boundary = 'top'
pressure_function = '1'
density_name = rho
dynamic_viscosity_name = mu
integrate_p_by_parts = false
order = SECOND
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
block = '1 2 3'
prop_names = 'rho mu'
prop_values = '1 1'
[]
[]
[FunctorMaterials]
[ADconst]
type = ADGenericFunctorMaterial
block = '1 2 3'
prop_names = 'rho_ad'
prop_values = '1'
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-ksp_gmres_restart -pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = '300 bjacobi ilu 4'
line_search = none
nl_rel_tol = 1e-12
nl_max_its = 6
l_tol = 1e-6
l_max_its = 300
[]
[Postprocessors]
[inlet_mass_constant]
type = VolumetricFlowRate
boundary = bottom
vel_x = vel_x
vel_y = vel_y
advected_variable = 1
[]
[inlet_mass_matprop]
type = VolumetricFlowRate
boundary = bottom
vel_x = vel_x
vel_y = vel_y
advected_mat_prop = 'rho_ad'
[]
[mid1_mass]
type = VolumetricFlowRate
boundary = internal_bot
vel_x = vel_x
vel_y = vel_y
[]
[other_mid1_mass]
type = VolumetricFlowRate
boundary = internal_bot
vel_x = vel_x
vel_y = vel_y
advected_mat_prop = 'rho_ad'
[]
[mid2_mass]
type = VolumetricFlowRate
boundary = internal_top
vel_x = vel_x
vel_y = vel_y
[]
[outlet_mass]
type = VolumetricFlowRate
boundary = top
vel_x = vel_x
vel_y = vel_y
[]
[inlet_momentum_x]
type = VolumetricFlowRate
boundary = bottom
vel_x = vel_x
vel_y = vel_y
advected_variable = vel_x
[]
[mid1_momentum_x]
type = VolumetricFlowRate
boundary = internal_bot
vel_x = vel_x
vel_y = vel_y
advected_variable = vel_x
[]
[mid2_momentum_x]
type = VolumetricFlowRate
boundary = internal_top
vel_x = vel_x
vel_y = vel_y
advected_variable = vel_x
[]
[outlet_momentum_x]
type = VolumetricFlowRate
boundary = top
vel_x = vel_x
vel_y = vel_y
advected_variable = vel_x
[]
[inlet_momentum_y]
type = VolumetricFlowRate
boundary = bottom
vel_x = vel_x
vel_y = vel_y
advected_variable = vel_y
[]
[mid1_momentum_y]
type = VolumetricFlowRate
boundary = internal_bot
vel_x = vel_x
vel_y = vel_y
advected_variable = vel_y
[]
[mid2_momentum_y]
type = VolumetricFlowRate
boundary = internal_top
vel_x = vel_x
vel_y = vel_y
advected_variable = vel_y
[]
[outlet_momentum_y]
type = VolumetricFlowRate
boundary = top
vel_x = vel_x
vel_y = vel_y
advected_variable = vel_y
[]
[]
[Outputs]
exodus = false
csv = true
inactive = 'console_mass console_momentum_x console_momentum_y'
[console_mass]
type = Console
start_step = 1
show = 'inlet_mass_variable inlet_mass_constant inlet_mass_matprop mid1_mass mid2_mass outlet_mass'
[]
[console_momentum_x]
type = Console
start_step = 1
show = 'inlet_momentum_x mid1_momentum_x mid2_momentum_x outlet_momentum_x'
[]
[console_momentum_y]
type = Console
start_step = 1
show = 'inlet_momentum_y mid1_momentum_y mid2_momentum_y outlet_momentum_y'
[]
[]
(modules/fsi/test/tests/fsi_acoustics/1D_struc_acoustic/1D_struc_acoustic.i)
# Test for `StructureAcousticInterface` interface kernel. The domain is 1D with 20m
# length. The fluid domain is on the right and the structural domain is on the left.
# Fluid end is subjected to a 250Hz sine wave with a single peak of amplitude unity.
# Structural domain is 4 times as dense as the fluid domain with all other material
# properties being the same. Fluid pressure is recorded at the midpoint in the fluid
# domain (i.e., at 15m). Structural stress is recorded at the midpoint in the structural
# domain (i.e., at 5m). The recorded pressure and stress amplitudes should match
# with theoretical values.
#
# Input parameters:
# Dimensions = 1
# Length = 20 meters
# Fluid speed of sound = 1500 m/s
# Fluid density = 1e-6 Giga kg/m^3
# Structural bulk modulus = 2.25 GPa
# Structural shear modulus = 0 GPa
# Structural density = 4e-6 Giga kg/m^3
# Fluid domain = true
# Fluid BC = single peak sine wave applied as a pressure on the fluid end
# Structural domain = true
# Structural BC = Neumann BC with value zero applied on the structural end.
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 50
xmax = 20
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '10.0 0 0'
block_id = 1
top_right = '20.0 0.0 0'
[../]
[./interface1]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '1'
paired_block = 0
new_boundary = 'interface1'
[../]
[]
[GlobalParams]
[]
[Variables]
[./p]
block = 1
[../]
[./disp_x]
block = 0
[../]
[]
[AuxVariables]
[./vel_x]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./accel_x]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[]
[Kernels]
[./diffusion]
type = Diffusion
variable = 'p'
block = 1
[../]
[./inertia]
type = AcousticInertia
variable = p
block = 1
[../]
[./DynamicTensorMechanics]
displacements = 'disp_x'
block = 0
[../]
[./inertia_x1]
type = InertialForce
variable = disp_x
block = 0
[../]
[]
[AuxKernels]
[./accel_x]
type = TestNewmarkTI
displacement = disp_x
variable = accel_x
first = false
block = 0
[../]
[./vel_x]
type = TestNewmarkTI
displacement = disp_x
variable = vel_x
block = 0
[../]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
block = 0
[../]
[]
[InterfaceKernels]
[./interface1]
type = StructureAcousticInterface
variable = p
neighbor_var = disp_x
boundary = 'interface1'
D = 1e-6
component = 0
[../]
[]
[BCs]
[./bottom_accel]
type = FunctionDirichletBC
variable = p
boundary = 'right'
function = accel_bottom
[../]
[./disp_x1]
type = NeumannBC
boundary = 'left'
variable = disp_x
value = 0.0
[../]
[]
[Functions]
[./accel_bottom]
type = PiecewiseLinear
data_file = Input_1Peak_highF.csv
scale_factor = 1e-2
format = 'columns'
[../]
[]
[Materials]
[./co_sq]
type = GenericConstantMaterial
prop_names = inv_co_sq
prop_values = 4.44e-7
block = '1'
[../]
[./density0]
type = GenericConstantMaterial
block = 0
prop_names = density
prop_values = 4e-6
[../]
[./elasticity_base]
type = ComputeIsotropicElasticityTensor
bulk_modulus = 2.25
shear_modulus = 0.0
block = 0
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'disp_x'
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
start_time = 0.0
end_time = 0.01
dt = 0.0001
dtmin = 0.00001
nl_abs_tol = 1e-12
nl_rel_tol = 1e-12
l_tol = 1e-12
l_max_its = 25
timestep_tolerance = 1e-8
automatic_scaling = true
[TimeIntegrator]
type = NewmarkBeta
[]
[]
[Postprocessors]
[./p1]
type = PointValue
point = '10.0 0.0 0.0'
variable = p
[../]
[./stress1]
type = PointValue
point = '10.0 0.0 0.0'
variable = stress_xx
[../]
[]
[Outputs]
csv = true
perf_graph = true
print_linear_residuals = true
[]
(modules/navier_stokes/test/tests/postprocessors/pressure_drop/drop_insad.i)
[Mesh]
second_order = true
inactive = 'mesh internal_boundary_bot internal_boundary_top'
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '1'
dy = '1 1 1'
ix = '5'
iy = '5 5 5'
subdomain_id = '1
2
3'
[]
[internal_boundary_bot]
type = SideSetsBetweenSubdomainsGenerator
input = mesh
new_boundary = 'internal_bot'
primary_block = 1
paired_block = 2
[]
[internal_boundary_top]
type = SideSetsBetweenSubdomainsGenerator
input = internal_boundary_bot
new_boundary = 'internal_top'
primary_block = 2
paired_block = 3
[]
[diverging_mesh]
type = FileMeshGenerator
file = 'expansion_quad.e'
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = steady-state
# no slip BCs
velocity_boundary = 'bottom right left'
velocity_function = '0 1 0 0 0 0'
pressure_boundary = 'top'
pressure_function = '1'
density_name = rho
dynamic_viscosity_name = mu
integrate_p_by_parts = false
order = SECOND
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
block = '1 2 3'
prop_names = 'rho mu'
prop_values = '1 1'
[]
[]
[FunctorMaterials]
[ADconst]
type = ADGenericFunctorMaterial
block = '1 2 3'
prop_names = 'rho_ad'
prop_values = '1'
[]
[vel_functor]
type = ADGenericVectorFunctorMaterial
prop_names = 'velocity'
prop_values = 'vel_x vel_y 0'
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-ksp_gmres_restart -pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = '300 bjacobi ilu 4'
line_search = none
nl_rel_tol = 1e-12
nl_max_its = 6
l_tol = 1e-6
l_max_its = 300
[]
[Postprocessors]
[pdrop_total]
type = PressureDrop
pressure = p
upstream_boundary = 'bottom'
downstream_boundary = 'top'
boundary = 'top bottom'
[]
[pdrop_mid1]
type = PressureDrop
pressure = p
upstream_boundary = 'bottom'
downstream_boundary = 'internal_bot'
boundary = 'bottom internal_bot'
[]
[pdrop_mid2]
type = PressureDrop
pressure = p
upstream_boundary = 'internal_bot'
downstream_boundary = 'internal_top'
boundary = 'internal_top internal_bot'
[]
[pdrop_mid3]
type = PressureDrop
pressure = p
upstream_boundary = 'internal_top'
downstream_boundary = 'top'
boundary = 'top internal_top'
[]
[sum_drops]
type = ParsedPostprocessor
expression = 'pdrop_mid1 + pdrop_mid2 + pdrop_mid3'
pp_names = 'pdrop_mid1 pdrop_mid2 pdrop_mid3'
[]
[p_upstream]
type = SideAverageValue
variable = p
boundary = 'bottom'
[]
[p_downstream]
type = SideAverageValue
variable = p
boundary = 'top'
[]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/physics/diffusion_interfaces/three_zones.i)
D0 = 1
D1 = 2
D2 = 6
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 1
dx = '1.5 3 2'
ix = '3 3 4'
subdomain_id = '0 1 2'
[]
[add_01]
type = SideSetsBetweenSubdomainsGenerator
input = 'cmg'
primary_block = '0'
paired_block = '1'
new_boundary = '0to1'
[]
[add_12]
type = SideSetsBetweenSubdomainsGenerator
input = 'add_01'
primary_block = '1'
paired_block = '2'
new_boundary = '1to2'
[]
[]
[Variables]
[T_solid]
type = MooseVariableFVReal
[]
[]
[FVBCs]
[right]
type = FVDirichletBC
variable = T_solid
boundary = 'right'
value = 1
[]
[]
[FVKernels]
[diff1]
type = FVDiffusion
variable = T_solid
coeff = ${D0}
block = 0
[]
[diff2]
type = FVDiffusion
variable = T_solid
coeff = ${D1}
block = 1
[]
[diff3]
type = FVDiffusion
variable = T_solid
coeff = ${D2}
block = 2
[]
[source]
type = FVBodyForce
variable = T_solid
value = 1
block = 1
[]
[]
[FVInterfaceKernels]
[01]
type = FVOneVarDiffusionInterface
variable1 = T_solid
subdomain1 = '0'
subdomain2 = '1'
coeff1 = ${D0}
coeff2 = ${D1}
boundary = '0to1'
[]
[12]
type = FVOneVarDiffusionInterface
variable1 = T_solid
subdomain1 = '1'
subdomain2 = '2'
coeff1 = ${D1}
coeff2 = ${D2}
boundary = '1to2'
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
[VectorPostprocessors]
[all_values]
type = ElementValueSampler
variable = T_solid
sort_by = 'x'
[]
[]
(test/tests/materials/functor_conversion/conversion_vec.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE_VEC
initial_condition = '2 2 2'
[]
[]
[AuxVariables]
[v]
order = FIRST
family = MONOMIAL_VEC
initial_condition = '3 3 3'
[]
[]
[FunctorMaterials]
[block0]
type = GenericVectorFunctorMaterial
block = '0'
prop_names = 'D'
prop_values = '4 3 2'
[]
[block1]
type = GenericVectorFunctorMaterial
block = '1'
prop_names = 'D'
prop_values = '2 1 0'
[]
[]
[Materials]
[convert_to_reg]
type = VectorMaterialFunctorConverter
functors_in = 'D u v'
reg_props_out = 'm1 m3 m4'
outputs = 'exo'
[]
[convert_to_ad]
type = VectorMaterialFunctorConverter
functors_in = 'D u v'
ad_props_out = 'm1a m3a m4a'
outputs = 'exo'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Problem]
solve = false
[]
[Outputs]
[exo]
type = Exodus
hide = 'u v'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/scalar_advection/2d-rc-physics.i)
mu = 1.1
rho = 1.1
# No scalar diffusion, as we are looking at advective flow rate for conservation
diff = 0
advected_interp_method = 'upwind'
[Problem]
error_on_jacobian_nonzero_reallocation = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 5
ymin = 0
ymax = 1
nx = 20
ny = 10
[]
[second_block]
type = ParsedSubdomainMeshGenerator
input = 'gen'
combinatorial_geometry = 'x > 2.5001'
block_id = '1'
[]
[middle]
type = SideSetsBetweenSubdomainsGenerator
input = 'second_block'
primary_block = '0'
paired_block = '1'
new_boundary = 'mid'
[]
[]
[Physics]
[NavierStokes]
[Flow]
[flow]
compressibility = 'incompressible'
porous_medium_treatment = true
density = 'rho'
dynamic_viscosity = 'mu'
# Porosity settings
porosity = 'porosity'
porosity_interface_pressure_treatment = 'bernoulli'
initial_velocity = '1 1e-6 0'
initial_pressure = 0.0
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_functors = '1 0'
wall_boundaries = 'top bottom'
momentum_wall_types = 'slip slip'
outlet_boundaries = 'right'
momentum_outlet_types = 'fixed-pressure'
pressure_functors = '0'
mass_advection_interpolation = '${advected_interp_method}'
momentum_advection_interpolation = '${advected_interp_method}'
[]
[]
[ScalarTransport]
[flow]
passive_scalar_names = 'scalar'
passive_scalar_diffusivity = '${diff}'
# Should add +1.25 to scalar concentration on left domain
# Then multiply by 2: 3.25 -> 6.5
# then +2.5 on the right domain -> outlet flow at 9
passive_scalar_coupled_source = Q
passive_scalar_coupled_source_coeff = 0.1
# See flow for inlet boundary
passive_scalar_inlet_types = 'fixed-value'
passive_scalar_inlet_functors = '2'
# No need to specify wall or outlet boundaries here
passive_scalar_advection_interpolation = '${advected_interp_method}'
[]
[]
[]
[]
[FunctorMaterials]
[const]
type = ADGenericFunctorMaterial
prop_names = 'rho mu Q'
prop_values = '${rho} ${mu} 10'
[]
[eps_step]
type = PiecewiseByBlockFunctorMaterial
prop_name = 'porosity'
subdomain_to_prop_value = '0 0.5
1 1'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-11
nl_abs_tol = 1e-14
[]
# Some basic Postprocessors to visually examine the solution
[Postprocessors]
[inlet-u]
type = VolumetricFlowRate
vel_x = 'superficial_vel_x'
vel_y = 'superficial_vel_y'
advected_quantity = '1'
rhie_chow_user_object = 'pins_rhie_chow_interpolator'
advected_interp_method = '${advected_interp_method}'
subtract_mesh_velocity = 'false'
boundary = 'left'
[]
[outlet-u]
type = VolumetricFlowRate
vel_x = 'superficial_vel_x'
vel_y = 'superficial_vel_y'
advected_quantity = '1'
rhie_chow_user_object = 'pins_rhie_chow_interpolator'
advected_interp_method = '${advected_interp_method}'
subtract_mesh_velocity = 'false'
boundary = 'right'
[]
[inlet-momx]
type = VolumetricFlowRate
vel_x = 'superficial_vel_x'
vel_y = 'superficial_vel_y'
advected_quantity = 'superficial_vel_x'
rhie_chow_user_object = 'pins_rhie_chow_interpolator'
advected_interp_method = '${advected_interp_method}'
subtract_mesh_velocity = 'false'
boundary = 'left'
[]
[outlet-momx]
type = VolumetricFlowRate
vel_x = 'superficial_vel_x'
vel_y = 'superficial_vel_y'
advected_quantity = 'superficial_vel_x'
rhie_chow_user_object = 'pins_rhie_chow_interpolator'
advected_interp_method = '${advected_interp_method}'
subtract_mesh_velocity = 'false'
boundary = 'right'
[]
[inlet-scalar]
type = VolumetricFlowRate
vel_x = 'superficial_vel_x'
vel_y = 'superficial_vel_y'
advected_quantity = 'scalar'
rhie_chow_user_object = 'pins_rhie_chow_interpolator'
advected_interp_method = '${advected_interp_method}'
subtract_mesh_velocity = 'false'
boundary = 'left'
[]
[mid-scalar]
type = VolumetricFlowRate
vel_x = 'superficial_vel_x'
vel_y = 'superficial_vel_y'
advected_quantity = 'scalar'
rhie_chow_user_object = 'pins_rhie_chow_interpolator'
advected_interp_method = '${advected_interp_method}'
subtract_mesh_velocity = 'false'
boundary = 'mid'
[]
[outlet-scalar]
type = VolumetricFlowRate
vel_x = 'superficial_vel_x'
vel_y = 'superficial_vel_y'
advected_quantity = 'scalar'
rhie_chow_user_object = 'pins_rhie_chow_interpolator'
advected_interp_method = '${advected_interp_method}'
subtract_mesh_velocity = 'false'
boundary = 'right'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/dgkernels/dg_block_restrict/2d_dg_diffusion_block_restrict.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmax = 2
nx = 10
ymax = 2
ny = 10
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
block_id = 1
top_right = '1 1 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '1'
paired_block = '0'
new_boundary = 'primary1_interface'
[]
[boundaries]
input = interface
type = BreakBoundaryOnSubdomainGenerator
boundaries = 'left bottom'
[]
[]
[Variables]
[u]
order = FIRST
family = L2_LAGRANGE
block = 1
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[source]
type = BodyForce
variable = u
[]
[]
[DGKernels]
[dg_diffusion]
type = DGDiffusion
variable = u
sigma = 4
epsilon = 1
[]
[]
[BCs]
[vacuum]
type = VacuumBC
variable = u
boundary = 'left_to_1 bottom_to_1'
[]
[primary1_inteface]
type = VacuumBC
variable = u
boundary = 'primary1_interface'
[]
[]
[Postprocessors]
[norm]
type = ElementL2Norm
variable = u
block = 1
[]
[]
[Executioner]
type = Steady
nl_abs_tol = 1e-12
[]
[Problem]
kernel_coverage_check = false
[]
[Outputs]
exodus = true
[]
(modules/rdg/test/tests/advection_1d/block_restrictable.i)
############################################################
[GlobalParams]
order = CONSTANT
family = MONOMIAL
u = u
slope_limiting = lslope
implicit = false
[]
############################################################
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = 1
nx = 100
[]
[./subdomain1]
type = SubdomainBoundingBoxGenerator
bottom_left = '0.5 0 0'
block_id = 1
top_right = '1.0 1.0 0'
input = gen
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
input = subdomain1
[../]
[./interface_again]
type = SideSetsBetweenSubdomainsGenerator
primary_block = '1'
paired_block = '0'
new_boundary = 'primary1_interface'
input = interface
[../]
[]
############################################################
[Functions]
[./ic_u]
type = PiecewiseConstant
axis = x
direction = right
xy_data = '0.1 0.5
0.4 1.0
0.5 0.5'
[../]
[]
############################################################
[UserObjects]
[./lslope]
type = AEFVSlopeLimitingOneD
execute_on = 'linear'
scheme = 'superbee' #none | minmod | mc | superbee
block = 0
[../]
[./internal_side_flux]
type = AEFVUpwindInternalSideFlux
execute_on = 'linear'
[../]
[./free_outflow_bc]
type = AEFVFreeOutflowBoundaryFlux
execute_on = 'linear'
[../]
[]
############################################################
[Variables]
[./u]
block = 0
[../]
[./v]
block = 1
family = LAGRANGE
order = FIRST
[../]
[]
############################################################
[ICs]
[./u_ic]
type = FunctionIC
variable = 'u'
function = ic_u
[../]
[]
############################################################
[Kernels]
[./time_u]
implicit = true
type = TimeDerivative
variable = u
block = 0
[../]
[./diff_v]
implicit = true
type = Diffusion
variable = v
block = 1
[../]
[./time_v]
implicit = true
type = TimeDerivative
variable = v
block = 1
[../]
[]
############################################################
[DGKernels]
[./concentration]
type = AEFVKernel
variable = u
component = 'concentration'
flux = internal_side_flux
block = 0
[../]
[]
############################################################
[BCs]
[./concentration]
type = AEFVBC
boundary = 'left primary0_interface'
variable = u
component = 'concentration'
flux = free_outflow_bc
[../]
[./v_left]
type = DirichletBC
boundary = 'primary1_interface'
variable = v
value = 1
[../]
[./v_right]
type = DirichletBC
boundary = 'right'
variable = v
value = 0
[../]
[]
############################################################
[Materials]
[./aefv]
type = AEFVMaterial
block = 0
[../]
[./dummy_1]
type = GenericConstantMaterial
block = 1
prop_names = ''
prop_values = ''
[../]
[]
############################################################
[Executioner]
type = Transient
[./TimeIntegrator]
type = ExplicitMidpoint
[../]
solve_type = 'LINEAR'
l_tol = 1e-4
nl_rel_tol = 1e-20
nl_abs_tol = 1e-8
nl_max_its = 60
start_time = 0.0
num_steps = 4 # 4 | 400 for complete run
dt = 5e-4
dtmin = 1e-6
[]
[Outputs]
[./out]
type = Exodus
time_step_interval = 2
[../]
perf_graph = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/block-restriction/segregated/empty-block-segregated.i)
mu = 1.2
rho_fluid = 0.2
k_fluid = 1.1
cp_fluid = 2.3
T_cold = 310
alpha = 1e-3
Q = 200
pressure_tag = "pressure_grad"
[Problem]
kernel_coverage_check = false
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
velocity_interp_method = 'rc'
advected_interp_method = 'average'
[]
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '0.3683 0.0127'
dy = '0.0127 0.2292 2.5146 0.2292 0.0127'
ix = '2 1'
iy = '1 2 3 2 1'
subdomain_id = '0 0
1 0
2 0
1 0
0 0
'
[]
[rename_block_name]
type = RenameBlockGenerator
input = cmg
old_block = '0 1 2'
new_block = 'wall_block spacer_block porous_block'
[]
[solid_fluid_interface_1]
type = SideSetsBetweenSubdomainsGenerator
input = rename_block_name
primary_block = porous_block
paired_block = wall_block
new_boundary = 'solid_fluid_interface'
[]
[solid_fluid_interface_2]
type = SideSetsBetweenSubdomainsGenerator
input = solid_fluid_interface_1
primary_block = spacer_block
paired_block = wall_block
new_boundary = 'solid_fluid_interface'
[]
[wall_left_boundary_1]
type = SideSetsFromBoundingBoxGenerator
input = solid_fluid_interface_2
bottom_left = '0 0 0'
top_right = '0.1 0.0127 0'
included_boundaries = left
boundary_new = wall_left
[]
[wall_left_boundary_2]
type = SideSetsFromBoundingBoxGenerator
input = wall_left_boundary_1
bottom_left = '0 2.9857 0'
top_right = '0.1 2.9984 0'
included_boundaries = left
boundary_new = wall_left
[]
[fluid_left_boundary]
type = SideSetsFromBoundingBoxGenerator
input = wall_left_boundary_2
bottom_left = '0 0.0127 0'
top_right = '0.1 2.9857 0'
included_boundaries = left
boundary_new = fluid_left
[]
coord_type = RZ
rz_coord_axis = Y
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolatorSegregated
u = superficial_vel_x
v = superficial_vel_y
pressure = pressure
porosity = porosity
block = 'spacer_block porous_block'
[]
[]
[Problem]
nl_sys_names = 'u_system v_system pressure_system t_system'
previous_nl_solution_required = true
error_on_jacobian_nonzero_reallocation = true
[]
[Variables]
[superficial_vel_x]
type = PINSFVSuperficialVelocityVariable
block = 'spacer_block porous_block'
solver_sys = u_system
[]
[superficial_vel_y]
type = PINSFVSuperficialVelocityVariable
block = 'spacer_block porous_block'
solver_sys = v_system
[]
[pressure]
type = INSFVPressureVariable
block = 'spacer_block porous_block'
solver_sys = pressure_system
[]
[T_fluid]
type = INSFVEnergyVariable
block = 'spacer_block porous_block'
solver_sys = t_system
[]
[]
[AuxVariables]
[porosity]
type = MooseVariableFVReal
block = 'spacer_block porous_block'
[]
[]
[FVKernels]
[u_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_x
rho = ${rho_fluid}
momentum_component = 'x'
block = 'spacer_block porous_block'
porosity = porosity
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_x
mu = ${mu}
momentum_component = 'x'
block = 'spacer_block porous_block'
porosity = porosity
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_x
momentum_component = 'x'
pressure = pressure
block = 'spacer_block porous_block'
porosity = porosity
extra_vector_tags = ${pressure_tag}
[]
[u_buoyancy]
type = PINSFVMomentumBoussinesq
variable = superficial_vel_x
T_fluid = T_fluid
gravity = '0 -1 0'
rho = ${rho_fluid}
ref_temperature = ${T_cold}
momentum_component = 'x'
block = 'spacer_block porous_block'
porosity = porosity
[]
[u_gravity]
type = PINSFVMomentumGravity
variable = superficial_vel_x
gravity = '0 -1 0'
rho = ${rho_fluid}
momentum_component = 'x'
block = 'spacer_block porous_block'
porosity = porosity
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_y
rho = ${rho_fluid}
momentum_component = 'y'
block = 'spacer_block porous_block'
porosity = porosity
[]
[v_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_y
mu = ${mu}
momentum_component = 'y'
block = 'spacer_block porous_block'
porosity = porosity
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_y
momentum_component = 'y'
pressure = pressure
block = 'spacer_block porous_block'
porosity = porosity
extra_vector_tags = ${pressure_tag}
[]
[v_buoyancy]
type = PINSFVMomentumBoussinesq
variable = superficial_vel_y
T_fluid = T_fluid
gravity = '0 -1 0'
rho = ${rho_fluid}
ref_temperature = ${T_cold}
momentum_component = 'y'
block = 'spacer_block porous_block'
porosity = porosity
[]
[v_gravity]
type = PINSFVMomentumGravity
variable = superficial_vel_y
gravity = '0 -1 0'
rho = ${rho_fluid}
momentum_component = 'y'
block = 'spacer_block porous_block'
porosity = porosity
[]
[temp_conduction]
type = PINSFVEnergyDiffusion
k = 'k_fluid'
variable = T_fluid
block = 'spacer_block porous_block'
porosity = porosity
[]
[temp_advection]
type = PINSFVEnergyAdvection
variable = T_fluid
block = 'spacer_block porous_block'
boundaries_to_force = fluid_left
[]
[heat_source]
type = FVBodyForce
variable = T_fluid
function = ${Q}
block = 'porous_block'
[]
[p_diffusion]
type = FVAnisotropicDiffusion
variable = pressure
coeff = "Ainv"
coeff_interp_method = 'average'
block = 'spacer_block porous_block'
[]
[p_source]
type = FVDivergence
variable = pressure
vector_field = "HbyA"
force_boundary_execution = true
block = 'spacer_block porous_block'
[]
[]
[FVBCs]
[no_slip_x]
type = INSFVNoSlipWallBC
variable = superficial_vel_x
boundary = 'solid_fluid_interface'
function = 0
[]
[no_slip_y]
type = INSFVNoSlipWallBC
variable = superficial_vel_y
boundary = 'solid_fluid_interface'
function = 0
[]
[reflective_x]
type = INSFVSymmetryVelocityBC
variable = superficial_vel_x
boundary = fluid_left
momentum_component = 'x'
mu = ${mu}
u = superficial_vel_x
v = superficial_vel_y
[]
[reflective_y]
type = INSFVSymmetryVelocityBC
variable = superficial_vel_y
boundary = fluid_left
momentum_component = 'y'
mu = ${mu}
u = superficial_vel_x
v = superficial_vel_y
[]
[reflective_p]
type = INSFVSymmetryPressureBC
boundary = fluid_left
variable = pressure
[]
[T_reflective]
type = FVNeumannBC
variable = T_fluid
boundary = fluid_left
value = 0
[]
[T_cold_boundary]
type = FVDirichletBC
variable = T_fluid
boundary = solid_fluid_interface
value = ${T_cold}
[]
[]
[ICs]
[porosity_spacer]
type = ConstantIC
variable = porosity
block = spacer_block
value = 1.0
[]
[porosity_fuel]
type = ConstantIC
variable = porosity
block = porous_block
value = 0.1
[]
[temp_ic_fluid]
type = ConstantIC
variable = T_fluid
value = ${T_cold}
block = 'spacer_block porous_block'
[]
[superficial_vel_x]
type = ConstantIC
variable = superficial_vel_x
value = 1E-5
block = 'spacer_block porous_block'
[]
[superficial_vel_y]
type = ConstantIC
variable = superficial_vel_y
value = 1E-5
block = 'spacer_block porous_block'
[]
[]
[FunctorMaterials]
[functor_constants_fluid]
type = ADGenericFunctorMaterial
prop_names = 'alpha_b cp k_fluid'
prop_values = '${alpha} ${cp_fluid} ${k_fluid}'
block = 'spacer_block porous_block'
[]
[density_fluid]
type = INSFVEnthalpyFunctorMaterial
temperature = 'T_fluid'
rho = ${rho_fluid}
block = 'spacer_block porous_block'
[]
[functor_constants_steel]
# We need this to avoid errors for materials not existing on every block
type = ADGenericFunctorMaterial
prop_names = 'dummy'
prop_values = 0.0
block = wall_block
[]
[]
[Executioner]
type = SIMPLENonlinearAssembly
momentum_l_abs_tol = 1e-14
pressure_l_abs_tol = 1e-14
energy_l_abs_tol = 1e-14
momentum_l_tol = 0
pressure_l_tol = 0
energy_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
energy_system = 't_system'
pressure_gradient_tag = ${pressure_tag}
momentum_equation_relaxation = 0.85
energy_equation_relaxation = 0.95
pressure_variable_relaxation = 0.45
num_iterations = 150
pressure_absolute_tolerance = 1e-13
momentum_absolute_tolerance = 1e-13
pin_pressure = true
pressure_pin_point = '0.2 1.5 0.0'
pressure_pin_value = 0
print_fields = false
continue_on_max_its = true
[]
[Outputs]
exodus = true
[]
(modules/ray_tracing/test/tests/raybcs/errors/raybc_errors.i)
[Mesh]
active = 'gmg'
[gmg]
type = CartesianMeshGenerator
dim = 1
dx = '0.5 0.5'
ix = '1 1'
subdomain_id = '0 1'
[]
[internal]
type = SideSetsBetweenSubdomainsGenerator
input = gmg
primary_block = 1
paired_block = 0
new_boundary = internal
[]
[]
[UserObjects]
active = 'study'
[study]
type = RepeatableRayStudy
start_points = '0 0 0'
directions = '1 0 0'
names = 'ray'
execute_on = INITIAL
ray_kernel_coverage_check = false
[]
[set_end_study]
type = RepeatableRayStudy
start_points = '0 0 0'
end_points = '1 0 0'
names = 'ray'
execute_on = INITIAL
ray_kernel_coverage_check = false
use_internal_sidesets = true
[]
[start_internal_study]
type = RepeatableRayStudy
start_points = '0.5 0 0'
directions = '1 0 0'
names = 'ray'
execute_on = INITIAL
ray_kernel_coverage_check = false
use_internal_sidesets = true
[]
[]
[RayBCs]
active = ''
[kill]
type = KillRayBC
boundary = right
[]
[change]
type = ChangeRayRayBCTest
boundary = right
change_direction = true
[]
[change_again]
type = ChangeRayRayBCTest
boundary = right
change_direction = true
[]
[change_internal]
type = ChangeRayRayBCTest
boundary = internal
change_direction = true
[]
[change_zero]
type = ChangeRayRayBCTest
boundary = right
change_direction_zero = true
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
(test/tests/materials/functor_properties/functor-mat-props.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[diff_u]
type = FunctorMatDiffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = 'left'
value = 1
[]
[right]
type = DirichletBC
variable = u
boundary = 'right'
value = 0
[]
[]
[Materials]
[block0]
type = GenericFunctorMaterial
block = '0'
prop_names = 'D'
prop_values = '4'
[]
[block1]
type = GenericFunctorMaterial
block = '1'
prop_names = 'D'
prop_values = '2'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/postprocessors/pressure_drop/drop_insfv.i)
mu=1
rho=1
advected_interp_method='average'
velocity_interp_method='rc'
[GlobalParams]
rhie_chow_user_object = 'rc'
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
[]
[]
[Mesh]
inactive = 'mesh internal_boundary_bot internal_boundary_top'
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '1'
dy = '1 1 1'
ix = '5'
iy = '5 5 5'
subdomain_id = '1
2
3'
[]
[internal_boundary_bot]
type = SideSetsBetweenSubdomainsGenerator
input = mesh
new_boundary = 'internal_bot'
primary_block = 1
paired_block = 2
[]
[internal_boundary_top]
type = SideSetsBetweenSubdomainsGenerator
input = internal_boundary_bot
new_boundary = 'internal_top'
primary_block = 2
paired_block = 3
[]
[diverging_mesh]
type = FileMeshGenerator
file = 'expansion_quad.e'
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 0
[]
[v]
type = INSFVVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[temperature]
type = INSFVEnergyVariable
[]
[]
[AuxVariables]
[advected_density]
type = MooseVariableFVReal
initial_condition = ${rho}
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
rho = ${rho}
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
force_boundary_execution = true
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
force_boundary_execution = true
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[temp_advection]
type = INSFVEnergyAdvection
variable = temperature
advected_interp_method = 'upwind'
[]
[temp_source]
type = FVBodyForce
variable = temperature
function = 10
block = 1
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'bottom'
variable = u
function = 0
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'bottom'
variable = v
function = 1
[]
[noslip-u]
type = INSFVNoSlipWallBC
boundary = 'right'
variable = u
function = 0
[]
[noslip-v]
type = INSFVNoSlipWallBC
boundary = 'right'
variable = v
function = 0
[]
[axis-u]
type = INSFVSymmetryVelocityBC
boundary = 'left'
variable = u
u = u
v = v
mu = ${mu}
momentum_component = x
[]
[axis-v]
type = INSFVSymmetryVelocityBC
boundary = 'left'
variable = v
u = u
v = v
mu = ${mu}
momentum_component = y
[]
[axis-p]
type = INSFVSymmetryPressureBC
boundary = 'left'
variable = pressure
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'top'
variable = pressure
function = 0
[]
[inlet_temp]
type = FVNeumannBC
boundary = 'bottom'
variable = temperature
value = 300
[]
[]
[FunctorMaterials]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = 'temperature'
rho = ${rho}
[]
[advected_material_property]
type = ADGenericFunctorMaterial
prop_names = 'advected_rho cp'
prop_values ='${rho} 1'
[]
[vel_functor]
type = ADGenericVectorFunctorMaterial
prop_names = 'velocity'
prop_values = 'u v 0'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm 200 lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
[]
[Postprocessors]
[pdrop_total]
type = PressureDrop
pressure = pressure
upstream_boundary = 'bottom'
downstream_boundary = 'top'
boundary = 'top bottom'
[]
[pdrop_mid1]
type = PressureDrop
pressure = pressure
upstream_boundary = 'bottom'
downstream_boundary = 'internal_bot'
boundary = 'bottom internal_bot'
[]
[pdrop_mid2]
type = PressureDrop
pressure = pressure
upstream_boundary = 'internal_bot'
downstream_boundary = 'internal_top'
boundary = 'internal_top internal_bot'
[]
[pdrop_mid3]
type = PressureDrop
pressure = pressure
upstream_boundary = 'internal_top'
downstream_boundary = 'top'
boundary = 'top internal_top'
[]
[sum_drops]
type = ParsedPostprocessor
expression = 'pdrop_mid1 + pdrop_mid2 + pdrop_mid3'
pp_names = 'pdrop_mid1 pdrop_mid2 pdrop_mid3'
[]
[p_upstream]
type = SideAverageValue
variable = pressure
boundary = 'bottom'
[]
[p_downstream]
type = SideAverageValue
variable = pressure
boundary = 'top'
[]
[]
[Outputs]
csv = true
[]
(modules/heat_transfer/test/tests/multiple_radiation_cavities/multiple_radiation_cavities.i)
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Mesh]
[cartesian]
type = CartesianMeshGenerator
dim = 2
dx = '0.5 4 1 4 0.5'
ix = '2 2 2 2 2'
dy = '0.3 10 1'
iy = '2 2 2'
subdomain_id = '1 2 3 4 5
6 7 8 9 10
11 12 13 14 15'
[]
[add_side_left_left]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 6
paired_block = 7
new_boundary = left_left
input = cartesian
[]
[add_side_left_bottom]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 2
paired_block = 7
new_boundary = left_bottom
input = add_side_left_left
[]
[add_side_left_right]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 8
paired_block = 7
new_boundary = left_right
input = add_side_left_bottom
[]
[add_side_left_top]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 12
paired_block = 7
new_boundary = left_top
input = add_side_left_right
[]
[add_side_right_left]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 8
paired_block = 9
new_boundary = right_left
input = add_side_left_top
[]
[add_side_right_bottom]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 4
paired_block = 9
new_boundary = right_bottom
input = add_side_right_left
[]
[add_side_right_right]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 10
paired_block = 9
new_boundary = right_right
input = add_side_right_bottom
[]
[add_side_right_top]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 14
paired_block = 9
new_boundary = right_top
input = add_side_right_right
[]
[]
[GrayDiffuseRadiation]
[left]
boundary = 'left_left left_right left_bottom left_top'
emissivity = '0.8 0.8 0.9 0.5'
n_patches = '2 2 2 2'
temperature = temperature
ray_tracing_face_order = SECOND
[]
[right]
boundary = 'right_left right_right right_bottom right_top'
emissivity = '0.8 0.8 0.9 0.5'
n_patches = '2 2 2 2'
temperature = temperature
ray_tracing_face_order = SECOND
[]
[]
[Variables]
[temperature]
block = '1 2 3 4 5 6 8 10 11 12 13 14 15'
initial_condition = 300
[]
[]
[Kernels]
[conduction]
type = HeatConduction
variable = temperature
diffusion_coefficient = 10
block = '1 2 3 4 5 6 8 10 11 12 13 14 15'
[]
[]
[BCs]
[bottom]
type = DirichletBC
variable = temperature
value = 300
boundary = bottom
[]
[top]
type = DirichletBC
variable = temperature
value = 400
boundary = top
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/ray_tracing/test/tests/traceray/internal_sidesets/internal_sidesets_1d.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
xmax = 6
nx = 6
[]
[central_block]
type = SubdomainBoundingBoxGenerator
input = gmg
block_id = 1
bottom_left = '2 0 0'
top_right = '4 0 0'
[]
[central_boundary]
type = SideSetsBetweenSubdomainsGenerator
input = central_block
primary_block = 1
paired_block = 0
new_boundary = 7
[]
[]
[RayBCs]
active = 'kill_internal'
# active = 'kill_external reflect_internal'
# for testing internal kill
[kill_internal]
type = KillRayBC
boundary = 7
[]
# for testing internal reflect
[kill_external]
type = KillRayBC
boundary = 'left right'
[]
[reflect_internal]
type = ReflectRayBC
boundary = 7
[]
[]
[UserObjects/study]
type = RepeatableRayStudy
start_points = '0 0 0
2 0 0
6 0 0
4 0 0
3 0 0'
directions = '1 0 0
1 0 0
-1 0 0
-1 0 0
-1 0 0'
names = 'left_in at_left right_in at_right inside_left'
ray_distance = 10
execute_on = initial
ray_kernel_coverage_check = false
use_internal_sidesets = true
[]
[Postprocessors/total_distance]
type = RayTracingStudyResult
study = study
result = total_distance
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/dgkernels/dg_block_restrict/1d_dg_block_restrict.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 100
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 0 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[interface_again]
type = SideSetsBetweenSubdomainsGenerator
input = interface
primary_block = '1'
paired_block = '0'
new_boundary = 'primary1_interface'
show_info = true
[]
# skip_partitioning = true
[]
[Variables]
[u]
order = FIRST
family = MONOMIAL
block = 0
[]
[v]
order = FIRST
family = MONOMIAL
block = 1
[]
[]
[Kernels]
[test_u]
type = Diffusion
variable = u
block = 0
[]
[adv_u]
type = ConservativeAdvection
variable = u
velocity = '1 0 0'
block = 0
[]
[test_v]
type = Diffusion
variable = v
block = 1
[]
[adv_v]
type = ConservativeAdvection
variable = v
velocity = '1 0 0'
block = 1
[]
[]
[DGKernels]
[dg_advection_u]
type = DGConvection
variable = u
velocity = '1 0 0'
block = 0
[]
[dg_diffusion_u]
type = DGDiffusion
variable = u
sigma = 0
epsilon = -1
block = 0
[]
[dg_advection_v]
type = DGConvection
variable = v
velocity = '1 0 0'
block = 1
[]
[dg_diffusion_v]
type = DGDiffusion
variable = v
sigma = 0
epsilon = -1
block = 1
[]
[]
[BCs]
[left]
type = InflowBC
variable = u
boundary = 'left'
inlet_conc = 2
velocity = '1 0 0'
[]
[primary0_inteface]
type = RobinBC
variable = u
boundary = 'primary0_interface'
[]
[primary1_interface]
type = InflowBC
variable = v
boundary = 'primary1_interface'
inlet_conc = 4
velocity = '1 0 0'
[]
[right]
type = RobinBC
variable = v
boundary = 'right'
[]
[]
[ICs]
[u_ic]
type = ConstantIC
variable = u
value = 0
[]
[v_ic]
type = ConstantIC
variable = v
value = 0
[]
[]
[Preconditioning]
[fdp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
nl_abs_tol = 1e-12
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
exodus = true
print_linear_residuals = false
[]
[Debug]
show_var_residual_norms = true
[]
(test/tests/interfacekernels/1d_interface/sorted-interface-materials.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[]
[Variables]
[u]
block = '0'
initial_condition = 1
[]
[v]
block = '1'
initial_condition = 0
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
block = 0
[]
[diff_v]
type = Diffusion
variable = v
block = 1
[]
[]
[InterfaceKernels]
[interface]
type = ADMaterialPropertySource
variable = u
neighbor_var = v
boundary = primary0_interface
source = couple
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = 'left'
value = 1
[]
[right]
type = DirichletBC
variable = v
boundary = 'right'
value = 0
[]
[]
[Materials]
[consumer]
type = ConsumerInterfaceMaterial
prop_consumed = ad_jump
prop_produced = couple
boundary = primary0_interface
[]
[jump]
type = JumpInterfaceMaterial
var = u
neighbor_var = v
boundary = primary0_interface
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(modules/electromagnetics/test/tests/interfacekernels/electromagnetic_interfaces/combined_props.i)
# Verification Test of PerpendicularElectricFieldInterface and
# ParallelElectricFieldInterface with user-defined materials
# and interface free charge
#
# Imposes epsilon_0 * u_perpendicular - epsilon_1 * v_perpendicular = free_charge
# and u_parallel = v_parallel on each interface between subdomain
# blocks 0 and 1
#
# epsilon_0 = 1.0
# epsilon_1 = 10.0
# free_charge = 1.0
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 10
xmax = 2
ymax = 2
zmax = 2
elem_type = HEX20
[]
[subdomain1]
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 1'
block_id = 1
input = gmg
[]
[break_boundary]
type = BreakBoundaryOnSubdomainGenerator
input = subdomain1
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[]
[Variables]
[u]
order = FIRST
family = NEDELEC_ONE
block = 0
[]
[v]
order = FIRST
family = NEDELEC_ONE
block = 1
[]
[]
[Kernels]
[curl_u]
type = CurlCurlField
variable = u
block = 0
[]
[coeff_u]
type = VectorFunctionReaction
variable = u
block = 0
[]
[ffn_u]
type = VectorBodyForce
variable = u
block = 0
function_x = 1
function_y = 1
function_z = 1
[]
[curl_v]
type = CurlCurlField
variable = v
block = 1
[]
[coeff_v]
type = VectorFunctionReaction
variable = v
block = 1
[]
[]
[InterfaceKernels]
[perpendicular]
type = PerpendicularElectricFieldInterface
variable = u
neighbor_var = v
boundary = primary0_interface
primary_epsilon = 1.0
secondary_epsilon = 10.0
free_charge = 1.0
[]
[parallel]
type = ParallelElectricFieldInterface
variable = u
neighbor_var = v
boundary = primary0_interface
[]
[]
[BCs]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
(test/tests/interfacekernels/1d_interface/mixed_shapes.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[../]
[./interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./interface_again]
input = interface
type = SideSetsBetweenSubdomainsGenerator
primary_block = '1'
paired_block = '0'
new_boundary = 'primary1_interface'
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = '0'
[../]
[./v]
order = FIRST
family = MONOMIAL
block = '1'
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[../]
[./body_u]
type = BodyForce
variable = u
block = 0
function = 'x^3+x^2+x+1'
[../]
[./body_v]
type = BodyForce
variable = v
block = 1
function = 'x^3+x^2+x+1'
[../]
[]
[DGKernels]
[./dg_diff_v]
type = DGDiffusion
variable = v
block = 1
diff = 2
sigma = 6
epsilon = -1
[../]
[]
[InterfaceKernels]
[./interface]
type = OneSideDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
D = 4
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left'
value = 1
[../]
# [./right]
# type = DirichletBC
# variable = v
# boundary = 'right'
# value = 0
# [../]
[./right]
type = DGFunctionDiffusionDirichletBC
variable = v
boundary = 'right'
function = 0
epsilon = -1
sigma = 6
[../]
[./middle]
type = NeumannBC
variable = u
boundary = 'primary0_interface'
value = '.5'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
[Debug]
show_var_residual_norms = true
[]
(test/tests/meshgenerators/sidesets_between_subdomains_generator/sideset_between_vector_subdomains_generator.i)
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
nz = 0
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[./subdomain_id]
type = SubdomainPerElementGenerator
input = gmg
subdomain_ids = '0 0 0 0
1 1 1 3
2 2 3 3
1 2 3 3'
[]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain_id
primary_block = '0 1'
paired_block = '2 3'
new_boundary = 'in_between'
[]
[./emperty_interface]
type = SideSetsBetweenSubdomainsGenerator
input = interface
primary_block = '0'
paired_block = '2'
new_boundary = 'not_in_mesh'
[]
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/break_boundary_on_subdomain/break_boundary_on_subdomain.i)
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 2
xmax = 2
ny = 2
ymax = 2
nz = 2
zmax = 2
[]
[./subdomain1]
type = SubdomainBoundingBoxGenerator
input = gmg
bottom_left = '0 0 0'
top_right = '1 1 1'
block_id = 1
[]
[./subdomain2]
type = SubdomainBoundingBoxGenerator
input = subdomain1
bottom_left = '1 0 0'
top_right = '2 1 1'
block_id = 2
[]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain2
primary_block = '1 2'
paired_block = '0'
new_boundary = 'interface'
[]
[./break_boundary]
input = interface
type = BreakBoundaryOnSubdomainGenerator
[]
[]
[Outputs]
exodus = true
[]
(test/tests/quadrature/order/block-order.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 1
ny = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 2
[]
[bottom]
type = SubdomainBoundingBoxGenerator
input = gmg
block_id = 1
bottom_left = '0 0 0'
top_right = '1 1 0'
[]
[top]
type = SubdomainBoundingBoxGenerator
input = bottom
block_id = 2
bottom_left = '0 1 0'
top_right = '1 2 0'
[]
[middle]
type = SideSetsBetweenSubdomainsGenerator
input = top
primary_block = 1
paired_block = 2
new_boundary = middle
[]
[]
[Postprocessors]
[block1_qps]
type = NumElemQPs
block = 1
[]
[block2_qps]
type = NumElemQPs
block = 2
[]
[top_side_qps]
type = NumSideQPs
boundary = top
[]
[bottom_side_qps]
type = NumSideQPs
boundary = bottom
[]
[middle_side_qps]
type = NumSideQPs
boundary = middle
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Steady
[Quadrature]
custom_blocks = '1 2'
custom_orders = 'first second'
[]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = false
csv = true
[]
(test/tests/userobjects/interface_user_object/interface_value_user_object_QP.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
[../]
[./primary0_interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./break_boundary]
input = primary0_interface
type = BreakBoundaryOnSubdomainGenerator
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./v]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 2
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 4
block = 1
[../]
[./source_u]
type = BodyForce
variable = u
function = 0.1*t
[../]
[]
[InterfaceKernels]
[./primary0_interface]
type = PenaltyInterfaceDiffusionDot
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 right top'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = TRUE
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
dt = 0.1
num_steps = 3
dtmin = 0.1
line_search = none
[]
[Outputs]
[./out]
type = Exodus
sync_only = true
sync_times = '0.1 0.2 0.3'
execute_on = 'TIMESTEP_END'
[]
[]
[UserObjects]
[./interface_value_uo]
type = InterfaceQpValueUserObject
var = diffusivity_1
var_neighbor = diffusivity_2
boundary = 'primary0_interface'
execute_on = 'initial timestep_end'
interface_value_type = average
[../]
[./interface_primary_minus_secondary_uo]
type = InterfaceQpValueUserObject
var = diffusivity_1
var_neighbor = diffusivity_2
boundary = 'primary0_interface'
execute_on = 'initial timestep_end'
interface_value_type = jump_primary_minus_secondary
[../]
[./interface_secondary_minus_primary_uo]
type = InterfaceQpValueUserObject
var = diffusivity_1
var_neighbor = diffusivity_2
boundary = 'primary0_interface'
execute_on = 'initial timestep_end'
interface_value_type = jump_secondary_minus_primary
[../]
[./interface_absolute_jump_uo]
type = InterfaceQpValueUserObject
var = diffusivity_1
var_neighbor = diffusivity_2
boundary = 'primary0_interface'
execute_on = 'initial timestep_end'
interface_value_type = jump_abs
[../]
[./interface_primary_uo]
type = InterfaceQpValueUserObject
var = diffusivity_1
var_neighbor = diffusivity_2
boundary = 'primary0_interface'
execute_on = 'initial timestep_end'
interface_value_type = primary
[../]
[./interface_secondary_uo]
type = InterfaceQpValueUserObject
var = diffusivity_1
var_neighbor = diffusivity_2
boundary = 'primary0_interface'
execute_on = 'initial timestep_end'
interface_value_type = secondary
[../]
[]
[Materials]
[./stateful1]
type = StatefulMaterial
block = 0
initial_diffusivity = 5
[../]
[./stateful2]
type = StatefulMaterial
block = 1
initial_diffusivity = 2
[../]
[]
[AuxKernels]
[./diffusivity_1]
type = MaterialRealAux
property = diffusivity
variable = diffusivity_1
execute_on = 'INITIAL NONLINEAR'
[]
[./diffusivity_2]
type = MaterialRealAux
property = diffusivity
variable = diffusivity_2
execute_on = 'INITIAL NONLINEAR'
[]
[./interface_avg_qp_aux]
type = InterfaceValueUserObjectAux
variable = avg_qp
boundary = 'primary0_interface'
interface_uo_name = interface_value_uo
execute_on = 'INITIAL TIMESTEP_END'
[]
[./interface_primary_minus_secondary_qp_aux]
type = InterfaceValueUserObjectAux
variable = primary_minus_secondary_qp
boundary = 'primary0_interface'
interface_uo_name = interface_primary_minus_secondary_uo
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./interface_secondary_minus_primary_qp_aux]
type = InterfaceValueUserObjectAux
variable = secondary_minus_primary_qp
boundary = 'primary0_interface'
interface_uo_name = interface_secondary_minus_primary_uo
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./interface_absolute_jump_qp_aux]
type = InterfaceValueUserObjectAux
variable = abs_jump_qp
boundary = 'primary0_interface'
interface_uo_name = interface_absolute_jump_uo
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./interface_primary_qp_aux]
type = InterfaceValueUserObjectAux
variable = primary_qp
boundary = 'primary0_interface'
interface_uo_name = interface_primary_uo
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./interface_secondary_qp_aux]
type = InterfaceValueUserObjectAux
variable = secondary_qp
boundary = 'primary0_interface'
interface_uo_name = interface_secondary_uo
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
[AuxVariables]
[./diffusivity_1]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_2]
family = MONOMIAL
order = CONSTANT
[]
[./avg_qp]
family = MONOMIAL
order = CONSTANT
[]
[./primary_minus_secondary_qp]
family = MONOMIAL
order = CONSTANT
[]
[./secondary_minus_primary_qp]
family = MONOMIAL
order = CONSTANT
[]
[./abs_jump_qp]
family = MONOMIAL
order = CONSTANT
[]
[./primary_qp]
family = MONOMIAL
order = CONSTANT
[]
[./secondary_qp]
family = MONOMIAL
order = CONSTANT
[]
[]
[Postprocessors]
[./interface_average_PP]
type = SideAverageValue
boundary = 'primary0_interface'
variable = avg_qp
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./primary_minus_secondary_qp_PP]
type = SideAverageValue
boundary = 'primary0_interface'
variable = primary_minus_secondary_qp
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./secondary_minus_primary_qp_PP]
type = SideAverageValue
boundary = 'primary0_interface'
variable = secondary_minus_primary_qp
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./abs_jump_qp_PP]
type = SideAverageValue
boundary = 'primary0_interface'
variable = abs_jump_qp
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./primary_qp_PP]
type = SideAverageValue
boundary = 'primary0_interface'
variable = primary_qp
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./secondary_qp_PP]
type = SideAverageValue
boundary = 'primary0_interface'
variable = secondary_qp
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
(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
[]
(modules/navier_stokes/test/tests/postprocessors/flow_rates/mass_flux_weighted_pp.i)
# Fluid properties
mu = 1
rho = 1
cp = 1
k = 1e-3
# Operating conditions
u_inlet = 1
T_inlet = 200
p_outlet = 10
# expected temperature at outlet
#
# mdot * cp dT = Qdot
# Qdot = 500
# mdot = 1
# cp = 1
# dT = 500
[Mesh]
[gen]
type = CartesianMeshGenerator
dim = 2
dx = '5 0.1 4.9'
ix = '10 3 10'
dy = '0.5 0.5'
iy = '2 2'
subdomain_id = '1 2 3 1 3 3'
[]
[interior]
type = SideSetsBetweenSubdomainsGenerator
primary_block = '1'
paired_block = '2 3'
new_boundary = 'interior'
input = gen
[]
[]
[AuxVariables]
[porosity]
type = MooseVariableFVReal
[]
[hsrc]
type = MooseVariableFVReal
[]
[]
[ICs]
[porosity_1]
type = ConstantIC
variable = porosity
value = 0.5
block = '1 3'
[]
[porosity_2]
type = ConstantIC
variable = porosity
value = 0.1
block = 2
[]
[hsrc]
type = ConstantIC
variable = hsrc
value = 100
block = 1
[]
[]
[Modules]
[NavierStokesFV]
compressibility = 'incompressible'
porous_medium_treatment = true
add_energy_equation = true
density = 'rho'
dynamic_viscosity = 'mu'
thermal_conductivity = 'k'
specific_heat = 'cp'
porosity = 'porosity'
# Reference file sets effective_conductivity by default that way
# so the conductivity is multiplied by the porosity in the kernel
effective_conductivity = false
initial_velocity = '${u_inlet} 1e-6 0'
initial_pressure = ${p_outlet}
initial_temperature = ${T_inlet}
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_function = '${u_inlet} 0'
energy_inlet_types = 'fixed-temperature'
energy_inlet_function = '${T_inlet}'
wall_boundaries = 'top bottom'
momentum_wall_types = 'noslip symmetry'
energy_wall_types = 'heatflux heatflux'
energy_wall_function = '0 0'
outlet_boundaries = 'right'
momentum_outlet_types = 'fixed-pressure'
pressure_function = '${p_outlet}'
mass_advection_interpolation = 'upwind'
momentum_advection_interpolation = 'upwind'
energy_advection_interpolation = 'upwind'
external_heat_source = hsrc
[]
[]
[FunctorMaterials]
[constants]
type = ADGenericFunctorMaterial
prop_names = 'cp rho mu k'
prop_values = '${cp} ${rho} ${mu} ${k}'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-8
end_time = 1000
dt = 10
num_steps = 5
[]
# Some basic Postprocessors to examine the solution
[Postprocessors]
[Qdot]
type = ElementIntegralVariablePostprocessor
variable = hsrc
[]
[mass-flux-weighted-T-out]
type = MassFluxWeightedFlowRate
vel_x = superficial_vel_x
vel_y = superficial_vel_y
advected_quantity = T_fluid
density = rho
rhie_chow_user_object = 'pins_rhie_chow_interpolator'
boundary = 'right'
[]
[mass-flux-weighted-T-interior]
type = MassFluxWeightedFlowRate
vel_x = superficial_vel_x
vel_y = superficial_vel_y
advected_quantity = T_fluid
density = rho
rhie_chow_user_object = 'pins_rhie_chow_interpolator'
boundary = 'interior'
[]
[mdot]
type = VolumetricFlowRate
vel_x = superficial_vel_x
vel_y = superficial_vel_y
advected_quantity = rho
rhie_chow_user_object = 'pins_rhie_chow_interpolator'
boundary = 'right'
[]
[outlet-u]
type = SideAverageValue
variable = superficial_vel_x
boundary = 'right'
[]
[outlet-temp]
type = SideAverageValue
variable = T_fluid
boundary = 'right'
[]
[]
[Outputs]
csv = true
[]
(test/tests/userobjects/domain-user-object/measure-conservation-interface.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[]
[Variables]
[u]
block = '0'
[]
[v]
block = '1'
[]
[]
[UserObjects]
[test]
type = InterfaceDomainUserObject
u = u
v = v
block = '0'
robin_boundaries = 'left'
interface_boundaries = 'primary0_interface'
interface_penalty = 1e6
nl_abs_tol = 1e-10
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
block = 0
[]
[force_u]
type = BodyForce
variable = u
block = 0
[]
[diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[]
[]
[InterfaceKernels]
[penalty_interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[]
[]
[BCs]
[left]
type = RobinBC
variable = u
boundary = 'left'
[]
[right]
type = RobinBC
variable = v
boundary = 'right'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_rel_tol = 0
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(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/heat_transfer/test/tests/ad_convective_heat_flux/fe_fv_coupled_error.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '0.5 0.5'
dy = '0.5 0.5'
ix = '5 5'
iy = '5 5'
subdomain_id = '0 1
2 3'
[]
[add_sideset]
type = SideSetsBetweenSubdomainsGenerator
input = cmg
new_boundary = 'middle middle'
primary_block = '0 2'
paired_block = '1 3'
[]
[]
[Variables]
[u_fe]
block = '0 2 3'
[]
[]
[AuxVariables]
[u_fv]
type = MooseVariableFVReal
block = '0 3'
initial_condition = 1
[]
[]
[Kernels]
[u_fe_diff]
type = ADDiffusion
variable = u_fe
[]
[]
[BCs]
[u_fe_left]
type = ADDirichletBC
boundary = left
variable = u_fe
value = 0
[]
[u_fe_middle]
type = ADConvectiveHeatFluxBC
boundary = middle
variable = u_fe
T_infinity_functor = u_fv
heat_transfer_coefficient_functor = 1.0
[]
[]
[Executioner]
type = Steady
[]
[Problem]
kernel_coverage_check = false
[]
(test/tests/scaling/scalar-field-grouping/test.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 20
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface_primary_side]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary_interface'
[]
[]
[Variables]
[u]
type = MooseVariableFVReal
block = 0
initial_condition = 0.5
[]
[v]
type = MooseVariableFVReal
block = 1
initial_condition = 0.5
[]
[lambda]
type = MooseVariableScalar
[]
[]
[FVKernels]
[diff_left]
type = FVDiffusion
variable = u
coeff = 'left'
block = 0
[]
[diff_right]
type = FVDiffusion
variable = v
coeff = 'right'
block = 1
[]
[]
[FVInterfaceKernels]
[interface]
type = FVTwoVarContinuityConstraint
variable1 = u
variable2 = v
boundary = 'primary_interface'
subdomain1 = '0'
subdomain2 = '1'
lambda = 'lambda'
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = u
boundary = 'left'
value = 1
[]
[v_left]
type = FVDirichletBC
variable = v
boundary = 'right'
value = 0
[]
[]
[Materials]
[block0]
type = ADGenericFunctorMaterial
block = '0'
prop_names = 'left'
prop_values = '1'
[]
[block1]
type = ADGenericFunctorMaterial
block = '1'
prop_names = 'right'
prop_values = '1'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm lu NONZERO'
automatic_scaling = true
off_diagonals_in_auto_scaling = true
scaling_group_variables = 'u v lambda'
verbose = true
[]
[Outputs]
exodus = true
[]
(modules/ray_tracing/test/tests/outputs/ray_tracing_mesh_output/ray_mesh_output.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmax = 5
ymax = 5
elem_type = QUAD4
[]
[middle_block]
type = SubdomainBoundingBoxGenerator
input = gmg
block_id = 1
bottom_left = '2 0 0'
top_right = '3 5 0'
[]
[middle_block_sideset]
type = SideSetsBetweenSubdomainsGenerator
input = middle_block
primary_block = 1
paired_block = 0
new_boundary = 7
[]
[]
[RayBCs]
[kill_top_right]
type = 'KillRayBC'
boundary = 'top right'
rays = 'to_top_right
centroid_left_to_right
along_top'
[]
[kill_bottom_left]
type = 'KillRayBC'
boundary = 'left bottom'
rays = 'reflect_right_and_top
reflect_right_at_node
reflect_internal'
[]
[reflect]
type = 'ReflectRayBC'
boundary = 'top right'
rays = 'reflect_right_and_top
reflect_right_at_node'
[]
[reflect_internal]
type = 'ReflectRayBC'
boundary = 7
rays = 'reflect_internal'
[]
[kill_internal]
type = 'KillRayBC'
boundary = 7
rays = 'kill_internal'
[]
[nothing_internal]
type = 'NullRayBC'
boundary = 7
rays = 'to_top_right
centroid_left_to_right
along_top
reflect_right_and_top
reflect_right_at_node'
[]
[]
[UserObjects/study]
type = RepeatableRayStudy
ray_kernel_coverage_check = false
start_points = '0 0 0
0.5 2.6 0
0 5 0
0 0.23 0
3 0 0
0 2.25 0
4.8 0.2 0'
directions = '1 1 0
1 0 0
1 0 0
1 0.6 0
1 0.5 0
1 0.58 0
-1 0.2 0'
names = 'to_top_right
centroid_left_to_right
along_top
reflect_right_and_top
reflect_right_at_node
reflect_internal
kill_internal'
execute_on = initial
always_cache_traces = true
use_internal_sidesets = true
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
exodus = false
[rays]
type = RayTracingExodus
study = study
execute_on = final
[]
[]
(test/tests/transfers/general_field/nearest_node/boundary/sub.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 5
ny = 5
nz = 5
xmax = 0.3
ymax = 0.3
zmax = 0.3
[]
[add_block]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x > 0.22 & y < 0.23'
block_id = 1
[]
[add_internal_sideset]
type = SideSetsBetweenSubdomainsGenerator
input = add_block
primary_block = 0
paired_block = 1
new_boundary = internal
[]
[]
[AuxVariables]
[from_main]
initial_condition = -1
[]
[from_main_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_main]
[InitialCondition]
type = FunctionIC
function = '3 + 2*x*x + 3*y*y*y'
[]
[]
[to_main_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '4 + 2*x*x + 3*y*y*y'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
hide = 'to_main to_main_elem'
overwrite = true
[]
[]
(modules/heat_transfer/test/tests/radiation_transfer_symmetry/cavity_with_pillars.i)
#
# inner_left: 8
# inner_right: 9
# inner_top: 12
# inner_bottom: 11
# inner_front: 10
# back_2: 7
# obstruction: 6
#
[Mesh]
[cartesian]
type = CartesianMeshGenerator
dim = 3
dx = '0.4 0.5 0.5 0.5 0.5 0.5 0.5 0.4'
dy = '0.5 0.75 0.5'
dz = '1.5 0.5'
subdomain_id = '
3 1 1 1 1 1 1 4
3 1 2 1 1 2 1 4
3 1 1 1 1 1 1 4
3 1 1 1 1 1 1 4
3 1 1 1 1 1 1 4
3 1 1 1 1 1 1 4
'
[]
[add_obstruction]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 2
paired_block = 1
new_boundary = obstruction
input = cartesian
[]
[add_new_back]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(z) < 1e-10'
included_subdomains = '1'
normal = '0 0 -1'
new_sideset_name = back_2
input = add_obstruction
[]
[add_inner_left]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 3
paired_block = 1
new_boundary = inner_left
input = add_new_back
[]
[add_inner_right]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 4
paired_block = 1
new_boundary = inner_right
input = add_inner_left
[]
[add_inner_front]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(z - 2) < 1e-10'
included_subdomains = '1'
normal = '0 0 1'
new_sideset_name = inner_front
input = add_inner_right
[]
[add_inner_bottom]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(y) < 1e-10'
included_subdomains = '1'
normal = '0 -1 0'
new_sideset_name = inner_bottom
input = add_inner_front
[]
[add_inner_top]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(y - 1.75) < 1e-10'
included_subdomains = '1'
normal = '0 1 0'
new_sideset_name = inner_top
input = add_inner_bottom
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[temperature]
block = '2 3 4'
initial_condition = 300
[]
[]
[Kernels]
[conduction]
type = HeatConduction
variable = temperature
block = '2 3 4'
diffusion_coefficient = 1
[]
[source]
type = BodyForce
variable = temperature
value = 1000
block = '2'
[]
[]
[BCs]
[convective]
type = CoupledConvectiveHeatFluxBC
variable = temperature
T_infinity = 300
htc = 50
boundary = 'left right'
[]
[]
[GrayDiffuseRadiation]
[cavity]
boundary = '6 7 8 9 10 11 12'
emissivity = '1 1 1 1 1 1 1'
n_patches = '1 1 1 1 1 1 1'
adiabatic_boundary = '7 10 11 12'
partitioners = 'metis metis metis metis metis metis metis'
temperature = temperature
ray_tracing_face_order = SECOND
normalize_view_factor = false
[]
[]
[Postprocessors]
[Tpv]
type = PointValue
variable = temperature
point = '0.3 0.5 0.5'
[]
[volume]
type = VolumePostprocessor
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/radiation_transfer_action/radiative_transfer_no_action.i)
[Problem]
kernel_coverage_check = false
[]
[Mesh]
type = MeshGeneratorMesh
[./cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1 1.3 1.9'
ix = '3 3 3'
dy = '2 1.2 0.9'
iy = '3 3 3'
subdomain_id = '0 1 0
4 5 2
0 3 0'
[../]
[./inner_bottom]
type = SideSetsBetweenSubdomainsGenerator
input = cmg
primary_block = 1
paired_block = 5
new_boundary = 'inner_bottom'
[../]
[./inner_left]
type = SideSetsBetweenSubdomainsGenerator
input = inner_bottom
primary_block = 4
paired_block = 5
new_boundary = 'inner_left'
[../]
[./inner_right]
type = SideSetsBetweenSubdomainsGenerator
input = inner_left
primary_block = 2
paired_block = 5
new_boundary = 'inner_right'
[../]
[./inner_top]
type = SideSetsBetweenSubdomainsGenerator
input = inner_right
primary_block = 3
paired_block = 5
new_boundary = 'inner_top'
[../]
[./rename]
type = RenameBlockGenerator
old_block = '1 2 3 4'
new_block = '0 0 0 0'
input = inner_top
[../]
[./split_inner_bottom]
type = PatchSidesetGenerator
boundary = 4
n_patches = 2
partitioner = centroid
centroid_partitioner_direction = x
input = rename
[../]
[./split_inner_left]
type = PatchSidesetGenerator
boundary = 5
n_patches = 2
partitioner = centroid
centroid_partitioner_direction = y
input = split_inner_bottom
[../]
[./split_inner_right]
type = PatchSidesetGenerator
boundary = 6
n_patches = 2
partitioner = centroid
centroid_partitioner_direction = y
input = split_inner_left
[../]
[./split_inner_top]
type = PatchSidesetGenerator
boundary = 7
n_patches = 3
partitioner = centroid
centroid_partitioner_direction = x
input = split_inner_right
[../]
[]
[Variables]
[./temperature]
block = 0
[../]
[]
[Kernels]
[./heat_conduction]
type = HeatConduction
variable = temperature
block = 0
diffusion_coefficient = 5
[../]
[]
[UserObjects]
[./gray_lambert]
type = ViewFactorObjectSurfaceRadiation
boundary = 'inner_bottom_0 inner_bottom_1
inner_left_0 inner_left_1
inner_right_0 inner_right_1
inner_top_0 inner_top_1 inner_top_2'
fixed_temperature_boundary = 'inner_bottom_0 inner_bottom_1'
fixed_boundary_temperatures = '1200 1200'
adiabatic_boundary = 'inner_top_0 inner_top_1 inner_top_2'
emissivity = '0.9 0.9
0.8 0.8
0.4 0.4
1 1 1'
temperature = temperature
view_factor_object_name = view_factor
execute_on = 'LINEAR TIMESTEP_END'
[../]
[./view_factor]
type = UnobstructedPlanarViewFactor
boundary = 'inner_bottom_0 inner_bottom_1
inner_left_0 inner_left_1
inner_right_0 inner_right_1
inner_top_0 inner_top_1 inner_top_2'
normalize_view_factor = true
execute_on = 'INITIAL'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = temperature
boundary = left
value = 600
[../]
[./right]
type = DirichletBC
variable = temperature
boundary = right
value = 300
[../]
[./radiation]
type = GrayLambertNeumannBC
variable = temperature
surface_radiation_object_name = gray_lambert
boundary = 'inner_left_0 inner_left_1
inner_right_0 inner_right_1'
[../]
[]
[Postprocessors]
[./average_T_inner_right]
type = SideAverageValue
variable = temperature
boundary = inner_right
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(test/tests/meshmodifiers/element_subdomain_modifier/adaptivity_moving_boundary.i)
[Problem]
solve = false
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 16
ny = 16
[]
[left]
type = SubdomainBoundingBoxGenerator
input = 'gen'
block_id = 1
block_name = 'left'
bottom_left = '-1 -1 0'
top_right = '0 1 1'
[]
[right]
type = SubdomainBoundingBoxGenerator
input = 'left'
block_id = 2
block_name = 'right'
bottom_left = '0 -1 0'
top_right = '1 1 1'
[]
[moving_boundary]
type = SideSetsBetweenSubdomainsGenerator
input = 'right'
new_boundary = 'moving_boundary'
primary_block = 'left'
paired_block = 'right'
[]
[]
[MeshModifiers]
[moving_circle]
type = CoupledVarThresholdElementSubdomainModifier
coupled_var = 'phi'
block = 2
criterion_type = 'ABOVE'
threshold = 0.5
subdomain_id = 1
moving_boundaries = 'moving_boundary'
moving_boundary_subdomain_pairs = 'left right'
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[AuxVariables]
[phi]
[AuxKernel]
type = ParsedAux
expression = 'exp(-((x+0.5-t)^2+(y)^2)/0.25)'
use_xyzt = true
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[]
[Adaptivity]
steps = 1
marker = 'marker'
initial_marker = 'marker'
max_h_level = 1
[Indicators]
[indicator]
type = GradientJumpIndicator
variable = 'phi'
[]
[]
[Markers]
[efm]
type = ErrorFractionMarker
indicator = 'indicator'
coarsen = 0.2
refine = 0.5
[]
[marker]
type = BoundaryPreservedMarker
preserved_boundary = 'moving_boundary'
marker = 'efm'
[]
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 5
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/wcns/boundary_conditions/with-direction/errors/flux_bcs.i)
l = 5
inlet_area = 2
velocity_interp_method = 'rc'
advected_interp_method = 'average'
# Artificial fluid properties
# For a real case, use a GeneralFluidFunctorProperties and a viscosity rampdown
# or initialize very well!
k = 1
cp = 1000
mu = 1e2
rho = 1000
# Operating conditions
inlet_temp = 300
outlet_pressure = 1e5
inlet_velocity = 0.001
[Mesh]
[gen]
type = CartesianMeshGenerator
dim = 2
dx = '${l} ${l}'
dy = '${inlet_area}'
ix = '5 5'
iy = '2'
subdomain_id = '1 2'
[]
[side_set]
type = SideSetsBetweenSubdomainsGenerator
input = gen
primary_block = '1'
paired_block = '2'
new_boundary = 'mid-inlet'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = vel_x
v = vel_y
pressure = pressure
block = 2
[]
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
initial_condition = ${inlet_velocity}
block = 2
[]
[vel_y]
type = INSFVVelocityVariable
initial_condition = 1e-15
block = 2
[]
[pressure]
type = INSFVPressureVariable
initial_condition = ${outlet_pressure}
block = 2
[]
[T_fluid]
type = INSFVEnergyVariable
initial_condition = ${inlet_temp}
block = 2
[]
[scalar]
type = MooseVariableFVReal
initial_condition = 0.1
block = 2
[]
[T_solid]
type = MooseVariableFVReal
initial_condition = ${inlet_temp}
[]
[]
[AuxVariables]
[power_density]
type = MooseVariableFVReal
initial_condition = 1e4
[]
[]
[FVKernels]
# Mass equation
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
# X component momentum equation
[u_advection]
type = INSFVMomentumAdvection
variable = vel_x
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = vel_x
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = vel_x
momentum_component = 'x'
pressure = pressure
[]
# Y component momentum equation
[v_advection]
type = INSFVMomentumAdvection
variable = vel_y
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = vel_y
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = vel_y
momentum_component = 'y'
pressure = pressure
[]
# Energy equation
[temp_conduction]
type = FVDiffusion
coeff = 'k'
variable = T_fluid
[]
[temp_advection]
type = INSFVEnergyAdvection
variable = T_fluid
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
[]
[heat_source]
type = FVCoupledForce
variable = T_fluid
v = power_density
[]
# Scalar concentration equation
[scalar_advection]
type = INSFVScalarFieldAdvection
variable = scalar
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
[]
[scalar_diffusion]
type = FVDiffusion
variable = scalar
coeff = 1.1
[]
[scalar_source]
type = FVBodyForce
variable = scalar
function = 2.1
[]
# Solid temperature
[solid_temp_conduction]
type = FVDiffusion
coeff = 'k'
variable = T_solid
[]
[]
[FVBCs]
# Inlet
[inlet_mass]
type = WCNSFVMassFluxBC
variable = pressure
boundary = 'mid-inlet'
velocity_pp = 'inlet_velocity'
area_pp = 'area_pp_left'
rho = 'rho'
vel_x = vel_x
vel_y = vel_y
[]
[inlet_u]
type = WCNSFVMomentumFluxBC
variable = vel_x
boundary = 'mid-inlet'
mdot_pp = 'inlet_mdot'
area_pp = 'area_pp_left'
rho = 'rho'
momentum_component = 'x'
vel_x = vel_x
vel_y = vel_y
[]
[inlet_v]
type = WCNSFVMomentumFluxBC
variable = vel_y
boundary = 'mid-inlet'
mdot_pp = 0
area_pp = 'area_pp_left'
rho = 'rho'
momentum_component = 'y'
vel_x = vel_x
vel_y = vel_y
[]
[inlet_T]
type = WCNSFVEnergyFluxBC
variable = T_fluid
T_fluid = T_fluid
boundary = 'mid-inlet'
temperature_pp = 'inlet_T'
velocity_pp = 'inlet_velocity'
area_pp = 'area_pp_left'
rho = 'rho'
cp = 'cp'
vel_x = vel_x
vel_y = vel_y
[]
[inlet_scalar]
type = WCNSFVScalarFluxBC
variable = scalar
boundary = 'mid-inlet'
scalar_value_pp = 'inlet_scalar_value'
velocity_pp = 'inlet_velocity'
area_pp = 'area_pp_left'
rho = 'rho'
vel_x = vel_x
vel_y = vel_y
passive_scalar = scalar
[]
[outlet_p]
type = INSFVOutletPressureBC
variable = pressure
boundary = 'right'
function = ${outlet_pressure}
[]
# Walls
[no_slip_x]
type = INSFVNoSlipWallBC
variable = vel_x
boundary = 'top bottom'
function = 0
[]
[no_slip_y]
type = INSFVNoSlipWallBC
variable = vel_y
boundary = 'top bottom'
function = 0
[]
[]
# used for the boundary conditions in this example
[Postprocessors]
[inlet_mdot]
type = Receiver
default = '${fparse 1980 * inlet_velocity * inlet_area}'
[]
[inlet_velocity]
type = Receiver
default = ${inlet_velocity}
[]
[area_pp_left]
type = AreaPostprocessor
boundary = 'left'
execute_on = 'INITIAL'
[]
[inlet_T]
type = Receiver
default = ${inlet_temp}
[]
[inlet_scalar_value]
type = Receiver
default = 0.2
[]
[]
[FunctorMaterials]
[const_functor]
type = ADGenericFunctorMaterial
prop_names = 'cp k rho'
prop_values = '${cp} ${k} ${rho}'
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = 'T_fluid'
rho = ${rho}
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_abs_tol = 1e-9
nl_max_its = 50
line_search = 'none'
automatic_scaling = true
[]
(test/tests/fvkernels/block-restriction/fv-and-fe-block-restriction.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 80
xmax = 4
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '2.0 0 0'
block_id = 1
top_right = '4.0 1.0 0'
[]
[left_right]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'left_right'
[]
[right_left]
input = left_right
type = SideSetsBetweenSubdomainsGenerator
primary_block = '1'
paired_block = '0'
new_boundary = 'right_left'
[]
[]
[Variables]
[left_fv]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 1
block = 0
[]
[left_fe]
initial_condition = 1
block = 0
[]
[right_fv]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 1
block = 1
[]
[right_fe]
initial_condition = 1
block = 1
[]
[]
[FVKernels]
active = 'bad_left_diff left_coupled bad_right_diff right_coupled'
[bad_left_diff]
type = FVDiffusion
variable = left_fv
coeff = fv_prop
block = 0
coeff_interp_method = average
[]
[good_left_diff]
type = FVDiffusion
variable = left_fv
coeff = left_fv_prop
block = 0
coeff_interp_method = average
[]
[left_coupled]
type = FVCoupledForce
v = left_fv
variable = left_fv
block = 0
[]
[bad_right_diff]
type = FVDiffusion
variable = right_fv
coeff = fv_prop
block = 1
coeff_interp_method = average
[]
[good_right_diff]
type = FVDiffusion
variable = right_fv
coeff = right_fv_prop
block = 1
coeff_interp_method = average
[]
[right_coupled]
type = FVCoupledForce
v = right_fv
variable = right_fv
block = 1
[]
[]
[Kernels]
[left_diff]
type = ADFunctorMatDiffusion
variable = left_fe
diffusivity = fe_prop
[]
[left_coupled]
type = CoupledForce
v = left_fv
variable = left_fe
[]
[right_diff]
type = ADFunctorMatDiffusion
variable = right_fe
diffusivity = fe_prop
[]
[right_coupled]
type = CoupledForce
v = right_fv
variable = right_fe
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = left_fv
boundary = left
value = 0
[]
[left_right]
type = FVDirichletBC
variable = left_fv
boundary = left_right
value = 1
[]
[right_left]
type = FVDirichletBC
variable = right_fv
boundary = right_left
value = 0
[]
[right]
type = FVDirichletBC
variable = right_fv
boundary = right
value = 1
[]
[]
[BCs]
[left]
type = DirichletBC
variable = left_fe
boundary = left
value = 0
[]
[left_right]
type = DirichletBC
variable = left_fe
boundary = left_right
value = 1
[]
[right_left]
type = DirichletBC
variable = right_fe
boundary = right_left
value = 0
[]
[right]
type = DirichletBC
variable = right_fe
boundary = right
value = 1
[]
[]
[Materials]
active = 'fe_mat_left bad_fv_mat_left fe_mat_right bad_fv_mat_right'
[fe_mat_left]
type = FEFVCouplingMaterial
fe_var = left_fe
block = 0
[]
[bad_fv_mat_left]
type = FEFVCouplingMaterial
fv_var = left_fv
block = 0
[]
[good_fv_mat_left]
type = FEFVCouplingMaterial
fv_var = left_fv
fv_prop_name = 'left_fv_prop'
block = 0
[]
[fe_mat_right]
type = FEFVCouplingMaterial
fe_var = right_fe
block = 1
[]
[bad_fv_mat_right]
type = FEFVCouplingMaterial
fv_var = right_fv
block = 1
[]
[good_fv_mat_right]
type = FEFVCouplingMaterial
fv_var = right_fv
fv_prop_name = 'right_fv_prop'
block = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
line_search = 'none'
[]
[Outputs]
exodus = true
[]
(test/tests/fvkernels/block-restriction/1d.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 20
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[left_right]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'left_right'
[]
[right_left]
input = left_right
type = SideSetsBetweenSubdomainsGenerator
primary_block = '1'
paired_block = '0'
new_boundary = 'right_left'
[]
[]
[Variables]
[left]
family = MONOMIAL
order = CONSTANT
fv = true
block = 0
[]
[right]
family = MONOMIAL
order = CONSTANT
fv = true
block = 1
[]
[]
[FVKernels]
[left]
type = FVDiffusion
variable = left
coeff = coeff_left
block = 0
coeff_interp_method = average
[]
[right]
type = FVDiffusion
variable = right
coeff = coeff_right
block = 1
coeff_interp_method = average
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = left
boundary = left
value = 0
[]
[left_right]
type = FVDirichletBC
variable = left
boundary = left_right
value = 1
[]
[right_left]
type = FVDirichletBC
variable = right
boundary = right_left
value = 0
[]
[right]
type = FVDirichletBC
variable = right
boundary = right
value = 1
[]
[]
[Materials]
[left]
type = ADGenericFunctorMaterial
prop_names = 'coeff_left'
prop_values = '1'
block = 0
[]
[right]
type = ADGenericFunctorMaterial
prop_names = 'coeff_right'
prop_values = '1'
block = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
line_search = 'none'
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/interface_user_object/interface_userobject_material_value.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
[../]
[./primary0_interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./break_boundary]
input = primary0_interface
type = BreakBoundaryOnSubdomainGenerator
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./v]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 2
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 4
block = 1
[../]
[./source_u]
type = BodyForce
variable = u
function = 0.1*t
[../]
[]
[InterfaceKernels]
[./primary0_interface]
type = PenaltyInterfaceDiffusionDot
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 right top'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = TRUE
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
dt = 0.1
num_steps = 3
dtmin = 0.1
line_search = none
[]
[Outputs]
exodus = true
[]
[UserObjects]
[./interface_material_uo]
type = InterfaceUserObjectTestGetMaterialProperty
property = 'primary_prop'
property_neighbor = 'secondary_prop'
property_boundary = 'boundary_prop'
property_interface = 'interface_prop'
boundary = 'primary0_interface'
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
[../]
[]
[Materials]
[./mat_primary]
type = LinearNonLinearIterationMaterial
block = 0
prefactor = 1
prop_name = 'primary_prop'
[../]
[./mat_secondary]
type = LinearNonLinearIterationMaterial
block = 1
prefactor = 2
prop_name = 'secondary_prop'
[../]
[./mat_boundary]
type = LinearNonLinearIterationMaterial
prefactor = 3
boundary = 'primary0_interface'
prop_name = 'boundary_prop'
[../]
[./mat_interface]
type = LinearNonLinearIterationInterfaceMaterial
prefactor = 4
boundary = 'primary0_interface'
prop_name = 'interface_prop'
[../]
[]
(modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_1D.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
nx = 2
xmax = 2
[]
[split]
type = SubdomainBoundingBoxGenerator
input = mesh
block_id = 1
bottom_left = '1 0 0'
top_right = '2 0 0'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = split
primary_block = 1
paired_block = 0
new_boundary = 'interface0'
[]
uniform_refine = 4
[]
[Variables]
# Defining a DFEM variable to handle gap discontinuity
[T]
order = FIRST
family = MONOMIAL
[]
[]
[AuxVariables]
# Auxvariable containing bulk temperature of gap
[Tbulk]
order = FIRST
family = LAGRANGE
initial_condition = 300 # K
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = T
diffusivity = conductivity
[]
[source]
type = BodyForce
variable = T
value = 1.0
[]
[]
[DGKernels]
# DG kernel to represent diffusion accross element faces
[./dg_diff]
type = DGDiffusion
variable = T
epsilon = -1
sigma = 6
diff = conductivity
# Ignoring gap side set because no diffusion accross there
exclude_boundary = 'interface0'
[../]
[]
[InterfaceKernels]
active = 'gap'
# Heat transfer kernel using Tbulk as material
[gap]
type = SideSetHeatTransferKernel
variable = T
neighbor_var = T
boundary = 'interface0'
[]
# Heat transfer kernel using Tbulk as auxvariable
[gap_var]
type = SideSetHeatTransferKernel
variable = T
neighbor_var = T
boundary = 'interface0'
Tbulk_var = Tbulk
[]
[]
[Functions]
[bc_func]
type = ConstantFunction
value = 300
[]
[exact]
type = ParsedFunction
expression = '
A := if(x < 1, -0.5, -0.25);
B := if(x < 1, -0.293209850655001, 0.0545267662299068);
C := if(x < 1, 300.206790149345, 300.19547323377);
d := -1;
A * (x+d) * (x+d) + B * (x+d) + C'
[]
[]
[BCs]
[bc_left]
type = DGFunctionDiffusionDirichletBC
boundary = 'left'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[bc_right]
type = DGFunctionDiffusionDirichletBC
boundary = 'right'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[]
[Materials]
[k0]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 1.0
block = 0
[]
[k1]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 2.0
block = 1
[]
[gap_mat]
type = SideSetHeatTransferMaterial
boundary = 'interface0'
conductivity = 1.5
gap_length = 1.0
h_primary = 1
h_neighbor = 1
Tbulk = 300
emissivity_primary = 1
emissivity_neighbor = 1
[]
[]
[Postprocessors]
[error]
type = ElementL2Error
variable = T
function = exact
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/materials/interface_material/interface_value_material_noIK.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
elem_type = QUAD4
[]
[./subdomain_id]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1 0 0'
top_right = '2 2 0'
block_id = 1
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain_id
primary_block = '0'
paired_block = '1'
new_boundary = 'interface'
[../]
[]
[Variables]
[./u]
block = 0
[../]
[./v]
block = 1
[../]
[]
[Kernels]
[./diff]
type = MatDiffusion
variable = u
diffusivity = 'diffusivity'
block = 0
[../]
[./diff_v]
type = MatDiffusion
variable = v
diffusivity = 'diffusivity'
block = 1
[../]
[]
[BCs]
[u_left]
type = DirichletBC
boundary = 'left'
variable = u
value = 1
[]
[v_right]
type = DirichletBC
boundary = 'right'
variable = v
value = 0
[]
[]
[Materials]
[./stateful1]
type = StatefulMaterial
block = 0
initial_diffusivity = 1
# outputs = all
[../]
[./stateful2]
type = StatefulMaterial
block = 1
initial_diffusivity = 2
# outputs = all
[../]
[./interface_material_avg]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = average
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
[../]
[./interface_material_jump_primary_minus_secondary]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = jump_primary_minus_secondary
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
[../]
[./interface_material_jump_secondary_minus_primary]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = jump_secondary_minus_primary
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
[../]
[./interface_material_jump_abs]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = jump_abs
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
[../]
[./interface_material_primary]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = primary
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
[../]
[./interface_material_secondary]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
mat_prop_var_out_basename = diff_var
boundary = interface
interface_value_type = secondary
nl_var_primary = u
nl_var_secondary = v
[../]
[]
[AuxKernels]
[./interface_material_avg]
type = MaterialRealAux
property = diff_average
variable = diffusivity_average
boundary = interface
[]
[./interface_material_jump_primary_minus_secondary]
type = MaterialRealAux
property = diff_jump_primary_minus_secondary
variable = diffusivity_jump_primary_minus_secondary
boundary = interface
[]
[./interface_material_jump_secondary_minus_primary]
type = MaterialRealAux
property = diff_jump_secondary_minus_primary
variable = diffusivity_jump_secondary_minus_primary
boundary = interface
[]
[./interface_material_jump_abs]
type = MaterialRealAux
property = diff_jump_abs
variable = diffusivity_jump_abs
boundary = interface
[]
[./interface_material_primary]
type = MaterialRealAux
property = diff_primary
variable = diffusivity_primary
boundary = interface
[]
[./interface_material_secondary]
type = MaterialRealAux
property = diff_secondary
variable = diffusivity_secondary
boundary = interface
[]
[diffusivity_var]
type = MaterialRealAux
property = diffusivity
variable = diffusivity_var
[]
[]
[AuxVariables]
[diffusivity_var]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_average]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_jump_primary_minus_secondary]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_jump_secondary_minus_primary]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_jump_abs]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_primary]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_secondary]
family = MONOMIAL
order = CONSTANT
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/sidesets_between_subdomains_generator/sideset_between_subdomains_not_prepared.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1 1'
dy = '1'
ix = '2 2'
iy = '2'
subdomain_id = '1 2'
[]
[feg]
type = FancyExtruderGenerator
input = cmg
direction = '0 0 1'
heights = 1
num_layers = 1
[]
[sbsg]
type = SideSetsBetweenSubdomainsGenerator
input = feg
new_boundary = 'interface'
paired_block = 2
primary_block = 1
[]
[]
(test/tests/vectorpostprocessors/element_id_counters/side_element_counter.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 1
extra_element_integers = foo_id
[]
[id0]
type = SubdomainBoundingBoxGenerator
input = gmg
bottom_left = '0 0 0'
block_id = 0
top_right = '1 1 0'
integer_name = foo_id
[]
[id1]
type = SubdomainBoundingBoxGenerator
input = id0
bottom_left = '0.4 0.4 0'
block_id = 1
top_right = '0.9 0.9 0'
integer_name = foo_id
[]
[id2]
type = SubdomainBoundingBoxGenerator
input = id1
bottom_left = '0.1 0.1 0'
block_id = 2
top_right = '0.6 0.6 0'
integer_name = foo_id
[]
[subdomain]
type = SubdomainBoundingBoxGenerator
input = id2
bottom_left = '0 0.5 0'
block_id = 1
top_right = '1 1 0'
[]
[side0to1]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain
primary_block = 0
paired_block = 1
new_boundary = side0to1
[]
[]
[VectorPostprocessors]
[elem_counter]
type = SideElementCounterWithID
boundary = side0to1
id_name = foo_id
[]
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = 'timestep_end'
[]
(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
[]
(modules/navier_stokes/test/tests/finite_volume/ins/neighbor-connected-boundary/test.i)
[Mesh]
[gen]
type = CartesianMeshGenerator
dim = 2
dx = '5 5 5 10 5'
ix = '5 5 5 10 5'
dy = '5 10 5 5 5'
iy = '5 10 5 5 5'
subdomain_id = '2 3 2 2 2
2 1 2 2 2
2 1 2 2 2
2 1 1 1 4
2 2 2 2 2'
[]
[attached_to_fluid_block_inlet]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 3
input = gen
new_boundary = attached_to_fluid_block_inlet
[]
[attached_to_fluid_block_outlet]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 4
input = attached_to_fluid_block_inlet
new_boundary = attached_to_fluid_block_outlet
[]
[attached_to_fluid_block_walls]
type = SideSetsBetweenSubdomainsGenerator
input = attached_to_fluid_block_outlet
primary_block = '1'
paired_block = '2'
new_boundary = attached_to_fluid_block_walls
[]
[attached_to_non_fluid_block_inlet]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 3
paired_block = 1
input = attached_to_fluid_block_walls
new_boundary = attached_to_non_fluid_block_inlet
[]
[attached_to_non_fluid_block_outlet]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 4
paired_block = 1
input = attached_to_non_fluid_block_inlet
new_boundary = attached_to_non_fluid_block_outlet
[]
[attached_to_non_fluid_block_walls]
type = SideSetsBetweenSubdomainsGenerator
input = attached_to_non_fluid_block_outlet
primary_block = '2'
paired_block = '1'
new_boundary = attached_to_non_fluid_block_walls
[]
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Modules]
[NavierStokesFV]
block = 1
compressibility = 'incompressible'
pressure_face_interpolation = average
momentum_advection_interpolation = upwind
mass_advection_interpolation = upwind
# fluid properties
density = '1'
dynamic_viscosity = '1e-2'
# initial conditions
initial_velocity = '0 0 0'
initial_pressure = 0
# boundary conditions
inlet_boundaries = 'attached_to_non_fluid_block_inlet'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_function = '0 0.1'
outlet_boundaries = 'attached_to_non_fluid_block_outlet'
momentum_outlet_types = 'fixed-pressure'
pressure_function = '0'
wall_boundaries = 'attached_to_non_fluid_block_walls'
momentum_wall_types = 'slip'
[]
[]
[Postprocessors]
[outlet_mfr]
type = VolumetricFlowRate
vel_x = 'vel_x'
vel_y = 'vel_y'
advected_quantity = 1
boundary = attached_to_fluid_block_outlet
rhie_chow_user_object = ins_rhie_chow_interpolator
[]
[inlet_mfr]
type = VolumetricFlowRate
vel_x = 'vel_x'
vel_y = 'vel_y'
advected_quantity = 1
boundary = attached_to_fluid_block_inlet
rhie_chow_user_object = ins_rhie_chow_interpolator
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options = '-pc_svd_monitor'
petsc_options_iname = '-pc_type'
petsc_options_value = 'svd'
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.1
growth_factor = 1.1
cutback_factor = 0.9
optimal_iterations = 6
iteration_window = 2
[]
nl_max_its = 10
nl_abs_tol = 1e-5
# Steady state detection.
steady_state_detection = true
steady_state_tolerance = 1e-10
num_steps = 1
[]
[Outputs]
exodus = true
[]
(modules/ray_tracing/test/tests/outputs/ray_tracing_mesh_output/ray_mesh_output_3d.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 5
ny = 5
nz = 5
xmax = 5
ymax = 5
zmax = 5
elem_type = HEX8
[]
[middle_block]
type = SubdomainBoundingBoxGenerator
input = gmg
block_id = 1
bottom_left = '2 0 0'
top_right = '3 5 5'
[]
[middle_block_sideset]
type = SideSetsBetweenSubdomainsGenerator
input = middle_block
primary_block = 1
paired_block = 0
new_boundary = 7
[]
[]
[RayBCs]
[kill]
type = 'KillRayBC'
boundary = 'top right front left'
rays = 'to_top_right
along_edge
within'
[]
[kill_left]
type = 'KillRayBC'
boundary = 'left'
rays = 'reflect_three_times
reflect_at_nodes
reflect_internal'
[]
[reflect]
type = 'ReflectRayBC'
boundary = 'back right top'
rays = 'reflect_three_times
reflect_at_nodes'
[]
[reflect_internal]
type = 'ReflectRayBC'
boundary = 7
rays = 'reflect_internal'
[]
[kill_internal]
type = 'KillRayBC'
boundary = 7
rays = 'kill_internal'
[]
[nothing_internal]
type = 'NullRayBC'
boundary = 7
rays = 'to_top_right
reflect_three_times
reflect_at_nodes'
[]
[]
[UserObjects/study]
type = RepeatableRayStudy
ray_kernel_coverage_check = false
start_points = '0 0 0
0 5 0
0.6 0.6 0
0 1.2 0.8
3 0 1
0 1.3 2.5
5 0 2'
directions = '1 1 1
0 0 1
0 0 1
1 0.6 -0.4
2 2 1
0.8 0.5 0.4
-1 1 1'
names = 'to_top_right
along_edge
within
reflect_three_times
reflect_at_nodes
reflect_internal
kill_internal'
execute_on = initial
always_cache_traces = true
use_internal_sidesets = true
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
exodus = false
[rays]
type = RayTracingExodus
study = study
execute_on = final
[]
[]
(modules/porous_flow/examples/coal_mining/fine_with_fluid.i)
#################################################################
#
# NOTE:
# The mesh for this model is too large for the MOOSE repository
# so is kept in the the large_media submodule
#
#################################################################
#
# Strata deformation and fluid flow aaround a coal mine - 3D model
#
# A "half model" is used. The mine is 400m deep and
# just the roof is studied (-400<=z<=0). The mining panel
# sits between 0<=x<=150, and 0<=y<=1000, so this simulates
# a coal panel that is 300m wide and 1000m long. The outer boundaries
# are 1km from the excavation boundaries.
#
# The excavation takes 0.5 years.
#
# The boundary conditions for this simulation are:
# - disp_x = 0 at x=0 and x=1150
# - disp_y = 0 at y=-1000 and y=1000
# - disp_z = 0 at z=-400, but there is a time-dependent
# Young modulus that simulates excavation
# - wc_x = 0 at y=-1000 and y=1000
# - wc_y = 0 at x=0 and x=1150
# - no flow at x=0, z=-400 and z=0
# - fixed porepressure at y=-1000, y=1000 and x=1150
# That is, rollers on the sides, free at top,
# and prescribed at bottom in the unexcavated portion.
#
# A single-phase unsaturated fluid is used.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa, and time units are measured in years.
#
# The initial porepressure is hydrostatic with P=0 at z=0, so
# Porepressure ~ - 0.01*z MPa, where the fluid has density 1E3 kg/m^3 and
# gravity = = 10 m.s^-2 = 1E-5 MPa m^2/kg.
# To be more accurate, i use
# Porepressure = -bulk * log(1 + g*rho0*z/bulk)
# where bulk=2E3 MPa and rho0=1Ee kg/m^3.
# The initial stress is consistent with the weight force from undrained
# density 2500 kg/m^3, and fluid porepressure, and a Biot coefficient of 0.7, ie,
# stress_zz^effective = 0.025*z + 0.7 * initial_porepressure
# The maximum and minimum principal horizontal effective 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 = 2 MPa
# MC friction angle = 35 deg
# MC dilation angle = 8 deg
# MC tensile strength = 1 MPa
# MC compressive strength = 100 MPa
# 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
# Fluid density at zero porepressure = 1E3 kg/m^3
# Fluid bulk modulus = 2E3 MPa
# Fluid viscosity = 1.1E-3 Pa.s = 1.1E-9 MPa.s = 3.5E-17 MPa.year
#
[GlobalParams]
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
PorousFlowDictator = dictator
biot_coefficient = 0.7
[]
[Mesh]
[file]
type = FileMeshGenerator
file = fine.e
[]
[xmin]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = xmin
normal = '-1 0 0'
input = file
[]
[xmax]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = xmax
normal = '1 0 0'
input = xmin
[]
[ymin]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = ymin
normal = '0 -1 0'
input = xmax
[]
[ymax]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = ymax
normal = '0 1 0'
input = ymin
[]
[zmax]
type = SideSetsAroundSubdomainGenerator
block = 30
new_boundary = zmax
normal = '0 0 1'
input = ymax
[]
[zmin]
type = SideSetsAroundSubdomainGenerator
block = 2
new_boundary = zmin
normal = '0 0 -1'
input = zmax
[]
[excav]
type = SubdomainBoundingBoxGenerator
input = zmin
block_id = 1
bottom_left = '0 0 -400'
top_right = '150 1000 -397'
[]
[roof]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 3
paired_block = 1
input = excav
new_boundary = roof
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[wc_x]
[]
[wc_y]
[]
[porepressure]
scaling = 1E-5
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = ini_pp
[]
[]
[Kernels]
[cx_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_x
component = 0
[]
[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
[]
[y_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_y
displacements = 'wc_x wc_y wc_z'
component = 1
base_name = couple
[]
[x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[]
[y_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_y
component = 1
[]
[gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6 # remember this is in MPa
[]
[poro_x]
type = PorousFlowEffectiveStressCoupling
use_displaced_mesh = false
variable = disp_x
component = 0
[]
[poro_y]
type = PorousFlowEffectiveStressCoupling
use_displaced_mesh = false
variable = disp_y
component = 1
[]
[poro_z]
type = PorousFlowEffectiveStressCoupling
use_displaced_mesh = false
component = 2
variable = disp_z
[]
[poro_vol_exp]
type = PorousFlowMassVolumetricExpansion
use_displaced_mesh = false
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
variable = porepressure
fluid_component = 0
[]
[mass0]
type = PorousFlowMassTimeDerivative
use_displaced_mesh = false
fluid_component = 0
variable = porepressure
[]
[flux]
type = PorousFlowAdvectiveFlux
use_displaced_mesh = false
variable = porepressure
gravity = '0 0 -10E-6'
fluid_component = 0
[]
[]
[AuxVariables]
[saturation]
order = CONSTANT
family = MONOMIAL
[]
[darcy_x]
order = CONSTANT
family = MONOMIAL
[]
[darcy_y]
order = CONSTANT
family = MONOMIAL
[]
[darcy_z]
order = CONSTANT
family = MONOMIAL
[]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[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
[]
[total_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_xz]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_yx]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_yz]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_zx]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_zy]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[perm_xx]
order = CONSTANT
family = MONOMIAL
[]
[perm_yy]
order = CONSTANT
family = MONOMIAL
[]
[perm_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]
[saturation_water]
type = PorousFlowPropertyAux
variable = saturation
property = saturation
phase = 0
execute_on = timestep_end
[]
[darcy_x]
type = PorousFlowDarcyVelocityComponent
variable = darcy_x
gravity = '0 0 -10E-6'
component = x
[]
[darcy_y]
type = PorousFlowDarcyVelocityComponent
variable = darcy_y
gravity = '0 0 -10E-6'
component = y
[]
[darcy_z]
type = PorousFlowDarcyVelocityComponent
variable = darcy_z
gravity = '0 0 -10E-6'
component = z
[]
[porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
execute_on = timestep_end
[]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
execute_on = timestep_end
[]
[stress_yx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yx
index_i = 1
index_j = 0
execute_on = timestep_end
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[stress_zx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zx
index_i = 2
index_j = 0
execute_on = timestep_end
[]
[stress_zy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zy
index_i = 2
index_j = 1
execute_on = timestep_end
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[total_strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[total_strain_xy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[total_strain_xz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xz
index_i = 0
index_j = 2
execute_on = timestep_end
[]
[total_strain_yx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yx
index_i = 1
index_j = 0
execute_on = timestep_end
[]
[total_strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[total_strain_yz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[total_strain_zx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zx
index_i = 2
index_j = 0
execute_on = timestep_end
[]
[total_strain_zy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zy
index_i = 2
index_j = 1
execute_on = timestep_end
[]
[total_strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[perm_xx]
type = PorousFlowPropertyAux
property = permeability
variable = perm_xx
row = 0
column = 0
execute_on = timestep_end
[]
[perm_yy]
type = PorousFlowPropertyAux
property = permeability
variable = perm_yy
row = 1
column = 1
execute_on = timestep_end
[]
[perm_zz]
type = PorousFlowPropertyAux
property = permeability
variable = perm_zz
row = 2
column = 2
execute_on = timestep_end
[]
[mc_shear]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_internal_parameter
variable = mc_shear
execute_on = timestep_end
[]
[mc_tensile]
type = MaterialStdVectorAux
index = 1
property = mc_plastic_internal_parameter
variable = mc_tensile
execute_on = timestep_end
[]
[wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
execute_on = timestep_end
[]
[wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
execute_on = timestep_end
[]
[mc_shear_f]
type = MaterialStdVectorAux
index = 6
property = mc_plastic_yield_function
variable = mc_shear_f
execute_on = timestep_end
[]
[mc_tensile_f]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_yield_function
variable = mc_tensile_f
execute_on = timestep_end
[]
[wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
execute_on = timestep_end
[]
[wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
execute_on = timestep_end
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_x
boundary = 'xmin xmax'
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_y
boundary = 'ymin ymax'
value = 0.0
[]
[no_z]
type = DirichletBC
variable = disp_z
boundary = zmin
value = 0.0
[]
[no_wc_x]
type = DirichletBC
variable = wc_x
boundary = 'ymin ymax'
value = 0.0
[]
[no_wc_y]
type = DirichletBC
variable = wc_y
boundary = 'xmin xmax'
value = 0.0
[]
[fix_porepressure]
type = FunctionDirichletBC
variable = porepressure
boundary = 'ymin ymax xmax'
function = ini_pp
[]
[roof_porepressure]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
pt_vals = '-1E3 1E3'
multipliers = '-1 1'
fluid_phase = 0
flux_function = roof_conductance
boundary = roof
[]
[roof]
type = StickyBC
variable = disp_z
min_value = -3.0
boundary = roof
[]
[]
[Functions]
[ini_pp]
type = ParsedFunction
symbol_names = 'bulk p0 g rho0'
symbol_values = '2E3 0.0 1E-5 1E3'
expression = '-bulk*log(exp(-p0/bulk)+g*rho0*z/bulk)'
[]
[ini_xx]
type = ParsedFunction
symbol_names = 'bulk p0 g rho0 biot'
symbol_values = '2E3 0.0 1E-5 1E3 0.7'
expression = '0.8*(2500*10E-6*z+biot*(-bulk*log(exp(-p0/bulk)+g*rho0*z/bulk)))'
[]
[ini_zz]
type = ParsedFunction
symbol_names = 'bulk p0 g rho0 biot'
symbol_values = '2E3 0.0 1E-5 1E3 0.7'
expression = '2500*10E-6*z+biot*(-bulk*log(exp(-p0/bulk)+g*rho0*z/bulk))'
[]
[excav_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval slope'
symbol_values = '0.5 0 1000.0 1E-9 1 10'
# excavation face at ymin+(ymax-ymin)*min(t/end_t,1)
# slope is the distance over which the modulus reduces from maxval to minval
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,if(y<ymin+(ymax-ymin)*min(t/end_t,1)+slope,minval+(maxval-minval)*(y-(ymin+(ymax-ymin)*min(t/end_t,1)))/slope,maxval))'
[]
[density_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval'
symbol_values = '0.5 0 1000.0 0 2500'
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,maxval)'
[]
[roof_conductance]
type = ParsedFunction
symbol_names = 'end_t ymin ymax maxval minval'
symbol_values = '0.5 0 1000.0 1E7 0'
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),maxval,minval)'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1 # MPa^-1
[]
[mc_coh_strong_harden]
type = TensorMechanicsHardeningExponential
value_0 = 1.99 # MPa
value_residual = 2.01 # MPa
rate = 1.0
[]
[mc_fric]
type = TensorMechanicsHardeningConstant
value = 0.61 # 35deg
[]
[mc_dil]
type = TensorMechanicsHardeningConstant
value = 0.15 # 8deg
[]
[mc_tensile_str_strong_harden]
type = TensorMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.0 # MPa
rate = 1.0
[]
[mc_compressive_str]
type = TensorMechanicsHardeningCubic
value_0 = 100 # Large!
value_residual = 100
internal_limit = 0.1
[]
[wp_coh_harden]
type = TensorMechanicsHardeningCubic
value_0 = 0.05
value_residual = 0.05
internal_limit = 10
[]
[wp_tan_fric]
type = TensorMechanicsHardeningConstant
value = 0.26 # 15deg
[]
[wp_tan_dil]
type = TensorMechanicsHardeningConstant
value = 0.18 # 10deg
[]
[wp_tensile_str_harden]
type = TensorMechanicsHardeningCubic
value_0 = 0.05
value_residual = 0.05
internal_limit = 10
[]
[wp_compressive_str_soften]
type = TensorMechanicsHardeningCubic
value_0 = 100
value_residual = 1
internal_limit = 1.0
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E3
density0 = 1000
thermal_expansion = 0
viscosity = 3.5E-17
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity_for_aux]
type = PorousFlowPorosity
at_nodes = false
fluid = true
mechanical = true
ensure_positive = true
porosity_zero = 0.02
solid_bulk = 5.3333E3
[]
[porosity_bulk]
type = PorousFlowPorosity
fluid = true
mechanical = true
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
ensure_positive = true
porosity_zero = 0.02
solid_bulk = 5.3333E3
[]
[porosity_excav]
type = PorousFlowPorosityConst
block = 1
porosity = 1.0
[]
[permeability_bulk]
type = PorousFlowPermeabilityKozenyCarman
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
poroperm_function = kozeny_carman_phi0
k0 = 1E-15
phi0 = 0.02
n = 2
m = 2
[]
[permeability_excav]
type = PorousFlowPermeabilityConst
block = 1
permeability = '0 0 0 0 0 0 0 0 0'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 4
s_res = 0.4
sum_s_res = 0.4
phase = 0
[]
[elasticity_tensor_0]
type = ComputeLayeredCosseratElasticityTensor
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
[]
[elasticity_tensor_1]
type = ComputeLayeredCosseratElasticityTensor
block = 1
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
elasticity_tensor_prefactor = excav_sideways
[]
[strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[]
[ini_stress]
type = ComputeEigenstrainFromInitialStress
eigenstrain_name = ini_stress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
[]
[stress_0]
type = ComputeMultipleInelasticCosseratStress
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
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
[]
[stress_1]
type = ComputeMultipleInelasticCosseratStress
block = 1
inelastic_models = ''
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[]
[mc]
type = CappedMohrCoulombCosseratStressUpdate
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
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.05
smoothing_tol = 0.05 # 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
[]
[undrained_density_0]
type = GenericConstantMaterial
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
prop_names = density
prop_values = 2500
[]
[undrained_density_1]
type = GenericFunctionMaterial
block = 1
prop_names = density
prop_values = density_sideways
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Postprocessors]
[min_roof_disp]
type = NodalExtremeValue
boundary = roof
value_type = min
variable = disp_z
[]
[min_roof_pp]
type = NodalExtremeValue
boundary = roof
value_type = min
variable = porepressure
[]
[min_surface_disp]
type = NodalExtremeValue
boundary = zmax
value_type = min
variable = disp_z
[]
[min_surface_pp]
type = NodalExtremeValue
boundary = zmax
value_type = min
variable = porepressure
[]
[max_perm_zz]
type = ElementExtremeValue
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
variable = perm_zz
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
# best overall
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
# best if you don't have mumps:
#petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
#petsc_options_value = ' asm 2 lu gmres 200'
# very basic:
#petsc_options_iname = '-pc_type -ksp_type -ksp_gmres_restart'
#petsc_options_value = ' bjacobi gmres 200'
line_search = bt
nl_abs_tol = 1e-3
nl_rel_tol = 1e-5
l_max_its = 200
nl_max_its = 30
start_time = 0.0
dt = 0.0025
end_time = 0.5
[]
[Outputs]
time_step_interval = 1
print_linear_residuals = true
exodus = true
csv = true
console = true
[]
(modules/phase_field/test/tests/feature_volume_vpp_test/boundary_area_2D_single.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 50
ny = 50
xmin = 0
xmax = 50
ymin = 0
ymax = 50
elem_type = QUAD4
[]
[./left_side]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '24.9 50 0'
[../]
[./right_side]
input = left_side
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '25.1 0 0'
top_right = '50 50 0'
[../]
[./iface_u]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = 10
input = right_side
[../]
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[]
[]
[AuxVariables]
[./unique_regions]
family = MONOMIAL
order = CONSTANT
[../]
[]
[ICs]
[./c]
type = SpecifiedSmoothCircleIC
variable = c
invalue = 1.0
outvalue = 0.0
radii = '4 5 10'
x_positions = '25 25 25'
y_positions = '37.5 25 0'
z_positions = '0 0 0'
int_width = 2.0
[]
[]
[Postprocessors]
[./flood_count]
type = FeatureFloodCount
variable = c
# Must be turned on to build data structures necessary for FeatureVolumeVPP
compute_var_to_feature_map = true
threshold = 0.5
execute_on = INITIAL
[../]
[]
[VectorPostprocessors]
[./features]
type = FeatureVolumeVectorPostprocessor
flood_counter = flood_count
# Turn on centroid output
output_centroids = true
execute_on = INITIAL
boundary = 10
single_feature_per_element = true
[../]
[]
[Kernels]
[diff]
type = Diffusion
variable = c
[]
[]
[AuxKernels]
[./unique_regions]
type = FeatureFloodCountAux
variable = unique_regions
flood_counter = flood_count
field_display = UNIQUE_REGION
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = INITIAL
[]
(modules/phase_field/test/tests/misc/interface_grad.i)
#
# Test a gradient continuity interfacekernel
#
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
ymax = 0.5
[]
[./box1]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '0.51 1 0'
input = gen
[../]
[./box2]
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '0.49 0 0'
top_right = '1 1 0'
input = box1
[../]
[./iface_u]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = 10
input = box2
[../]
[./iface_v]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 2
paired_block = 1
new_boundary = 11
input = iface_u
[../]
[]
[Variables]
[./u]
block = 1
[./InitialCondition]
type = FunctionIC
function = 'r:=sqrt((x-0.4)^2+(y-0.5)^2);if(r<0.05,5,1)'
[../]
[../]
[./v]
block = 2
initial_condition = 0.8
[../]
[]
[Kernels]
[./u_diff]
type = Diffusion
variable = u
block = 1
[../]
[./u_dt]
type = TimeDerivative
variable = u
block = 1
[../]
[./v_diff]
type = Diffusion
variable = v
block = 2
[../]
[./v_dt]
type = TimeDerivative
variable = v
block = 2
[../]
[]
[InterfaceKernels]
[./iface]
type = InterfaceDiffusionFluxMatch
variable = u
boundary = 10
neighbor_var = v
[../]
[]
[BCs]
[./u_boundary_term]
type = DiffusionFluxBC
variable = u
boundary = 10
[../]
[./v_boundary_term]
type = DiffusionFluxBC
variable = v
boundary = 11
[../]
[]
[Executioner]
type = Transient
dt = 0.002
num_steps = 10
[]
[Outputs]
exodus = true
print_linear_residuals = false
[]
(modules/heat_transfer/test/tests/sideset_heat_transfer/cfem_gap.i)
[Mesh]
# Build 2-by-2 mesh
[mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
# Create blocs 0, 1, 2, 3
[block_1]
type = SubdomainBoundingBoxGenerator
input = mesh
block_id = 1
bottom_left = '1 0 0'
top_right = '2 1 0'
[]
[block_2]
type = SubdomainBoundingBoxGenerator
input = block_1
block_id = 2
bottom_left = '0 1 0'
top_right = '1 2 0'
[]
[block_3]
type = SubdomainBoundingBoxGenerator
input = block_2
block_id = 3
bottom_left = '1 1 0'
top_right = '2 2 0'
[]
# Create inner sidesets
[interface_01]
type = SideSetsBetweenSubdomainsGenerator
input = block_3
primary_block = 0
paired_block = 1
new_boundary = 'interface_01'
[]
[interface_13]
type = SideSetsBetweenSubdomainsGenerator
input = interface_01
primary_block = 1
paired_block = 3
new_boundary = 'interface_13'
[]
[interface_32]
type = SideSetsBetweenSubdomainsGenerator
input = interface_13
primary_block = 3
paired_block = 2
new_boundary = 'interface_32'
[]
[interface_20]
type = SideSetsBetweenSubdomainsGenerator
input = interface_32
primary_block = 2
paired_block = 0
new_boundary = 'interface_20'
[]
# Create outer boundaries
[boundary_left_0]
type = SideSetsAroundSubdomainGenerator
input = interface_20
block = 0
normal = '-1 0 0'
new_boundary = 'left_0'
[]
[boundary_bot_0]
type = SideSetsAroundSubdomainGenerator
input = boundary_left_0
block = 0
normal = '0 -1 0'
new_boundary = 'bot_0'
[]
[boundary_bot_1]
type = SideSetsAroundSubdomainGenerator
input = boundary_bot_0
block = 1
normal = '0 -1 0'
new_boundary = 'bot_1'
[]
[boundary_right_1]
type = SideSetsAroundSubdomainGenerator
input = boundary_bot_1
block = 1
normal = '1 0 0'
new_boundary = 'right_1'
[]
[boundary_right_3]
type = SideSetsAroundSubdomainGenerator
input = boundary_right_1
block = 3
normal = '1 0 0'
new_boundary = 'right_3'
[]
[boundary_top_3]
type = SideSetsAroundSubdomainGenerator
input = boundary_right_3
block = 3
normal = '0 1 0'
new_boundary = 'top_3'
[]
[boundary_top_2]
type = SideSetsAroundSubdomainGenerator
input = boundary_top_3
block = 2
normal = '0 1 0'
new_boundary = 'top_2'
[]
[boundary_left_2]
type = SideSetsAroundSubdomainGenerator
input = boundary_top_2
block = 2
normal = '-1 0 0'
new_boundary = 'left_2'
[]
uniform_refine = 4
[]
[Variables]
# Need to have variable for each block to allow discontinuity
[T0]
block = 0
[]
[T1]
block = 1
[]
[T2]
block = 2
[]
[T3]
block = 3
[]
[]
[Kernels]
# Diffusion kernel for each block's variable
[diff_0]
type = MatDiffusion
variable = T0
diffusivity = conductivity
block = 0
[]
[diff_1]
type = MatDiffusion
variable = T1
diffusivity = conductivity
block = 1
[]
[diff_2]
type = MatDiffusion
variable = T2
diffusivity = conductivity
block = 2
[]
[diff_3]
type = MatDiffusion
variable = T3
diffusivity = conductivity
block = 3
[]
# Source for two of the blocks
[source_0]
type = BodyForce
variable = T0
value = 5e5
block = '0'
[]
[source_3]
type = BodyForce
variable = T3
value = 5e5
block = '3'
[]
[]
[InterfaceKernels]
# Side set kernel to represent heat transfer across blocks
# Automatically uses the materials defined in SideSetHeatTransferMaterial
[gap_01]
type = SideSetHeatTransferKernel
# This variable defined on a given block must match the primary_block given when the side set was generated
variable = T0
# This variable defined on a given block must match the paired_block given when the side set was generated
neighbor_var = T1
boundary = 'interface_01'
[]
[gap_13]
type = SideSetHeatTransferKernel
variable = T1
neighbor_var = T3
boundary = 'interface_13'
[]
[gap_32]
type = SideSetHeatTransferKernel
variable = T3
neighbor_var = T2
boundary = 'interface_32'
[]
[gap_20]
type = SideSetHeatTransferKernel
variable = T2
neighbor_var = T0
boundary = 'interface_20'
[]
[]
# Creating auxiliary variable to combine block restricted solutions
# Ignores discontinuity though
[AuxVariables]
[T]
[]
[]
[AuxKernels]
[temp_0]
type = NormalizationAux
variable = T
source_variable = T0
block = 0
[]
[temp_1]
type = NormalizationAux
variable = T
source_variable = T1
block = 1
[]
[temp_2]
type = NormalizationAux
variable = T
source_variable = T2
block = 2
[]
[temp_3]
type = NormalizationAux
variable = T
source_variable = T3
block = 3
[]
[]
[BCs]
# Boundary condition for each block's outer surface
[bc_left_2]
type = DirichletBC
boundary = 'left_2'
variable = T2
value = 300.0
[]
[bc_left_0]
type = DirichletBC
boundary = 'left_0'
variable = T0
value = 300.0
[]
[bc_bot_0]
type = DirichletBC
boundary = 'bot_0'
variable = T0
value = 300.0
[]
[bc_bot_1]
type = DirichletBC
boundary = 'bot_1'
variable = T1
value = 300.0
[]
[./bc_top_2]
type = ConvectiveFluxFunction # (Robin BC)
variable = T2
boundary = 'top_2'
coefficient = 1e3 # W/K/m^2
T_infinity = 600.0
[../]
[./bc_top_3]
type = ConvectiveFluxFunction # (Robin BC)
variable = T3
boundary = 'top_3'
coefficient = 1e3 # W/K/m^2
T_infinity = 600.0
[../]
[./bc_right_3]
type = ConvectiveFluxFunction # (Robin BC)
variable = T3
boundary = 'right_3'
coefficient = 1e3 # W/K/m^2
T_infinity = 600.0
[../]
[./bc_right_1]
type = ConvectiveFluxFunction # (Robin BC)
variable = T1
boundary = 'right_1'
coefficient = 1e3 # W/K/m^2
T_infinity = 600.0
[../]
[]
[Materials]
[fuel]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 75
block = '0 3'
[]
[mod]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 7.5
block = '1 2'
[]
# Interface material used for SideSetHeatTransferKernel
# Heat transfer meachnisms ignored if certain properties are not supplied
[gap_mat]
type = SideSetHeatTransferMaterial
boundary = 'interface_01 interface_13 interface_32 interface_20'
conductivity = 0.41
gap_length = 0.002
Tbulk = 750
h_primary = 3000
h_neighbor = 3000
emissivity_primary = 0.85
emissivity_neighbor = 0.85
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
l_tol = 1e-8
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -ksp_gmres_restart'
petsc_options_value = 'lu superlu_dist 50'
[]
[Outputs]
exodus = true
[]
(modules/ray_tracing/test/tests/raybcs/reflect_ray_bc/reflect_ray_bc_nonplanar.i)
[Mesh]
[file]
type = FileMeshGenerator
file = nonplanar.e
[]
[subdomains]
type = ParsedSubdomainMeshGenerator
input = file
combinatorial_geometry = 'x > 0.5'
block_id = 1
[]
[internal_sideset]
type = SideSetsBetweenSubdomainsGenerator
input = subdomains
primary_block = 0
paired_block = 1
new_boundary = internal
[]
[]
[UserObjects/study]
type = RepeatableRayStudy
start_points = '0 0 0'
directions = '1 1 1'
names = 'ray'
warn_non_planar = false
use_internal_sidesets = true
execute_on = initial
tolerate_failure = true
[]
[RayBCs]
[kill]
type = KillRayBC
boundary = 'top right bottom left front back'
[]
[reflect_internal]
type = ReflectRayBC
boundary = internal
[]
[]
[RayKernels/null]
type = NullRayKernel
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
(modules/navier_stokes/test/tests/finite_volume/fviks/convection/convection_cavity.i)
mu = 1
rho = 1
k = .01
cp = 1
velocity_interp_method = 'rc'
advected_interp_method = 'average'
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1 0.5'
dy = '1'
ix = '8 5'
iy = '8'
subdomain_id = '0 1'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'cmg'
primary_block = 0
paired_block = 1
new_boundary = 'interface'
[]
[secondary_interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'interface'
primary_block = 1
paired_block = 0
new_boundary = 'secondary_interface'
[]
[]
[GlobalParams]
# retain behavior at time of test creation
two_term_boundary_expansion = false
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
block = 0
pressure = pressure
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
block = 0
[]
[v]
type = INSFVVelocityVariable
block = 0
[]
[pressure]
type = INSFVPressureVariable
block = 0
[]
[T]
type = INSFVEnergyVariable
block = 0
[]
[Ts]
type = INSFVEnergyVariable
block = 1
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[ICs]
[T]
type = ConstantIC
variable = T
value = 1
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
block = 0
[]
[mean_zero_pressure]
type = FVIntegralValueConstraint
variable = pressure
lambda = lambda
block = 0
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
rho = ${rho}
block = 0
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
block = 0
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
block = 0
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
rho = ${rho}
block = 0
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
block = 0
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
block = 0
[]
[temp_conduction]
type = FVDiffusion
coeff = 'k'
variable = T
block = 0
[]
[temp_advection]
type = INSFVEnergyAdvection
variable = T
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
block = 0
[]
[solid_temp_conduction]
type = FVDiffusion
coeff = 'k'
variable = Ts
block = 1
[]
[]
[FVInterfaceKernels]
[convection]
type = FVConvectionCorrelationInterface
variable1 = T
variable2 = Ts
boundary = 'interface'
h = 5
T_solid = Ts
T_fluid = T
subdomain1 = 0
subdomain2 = 1
bulk_distance = 0.3
[]
[]
[FVBCs]
[top_x]
type = INSFVNoSlipWallBC
variable = u
boundary = 'top'
function = 'lid_function'
[]
[no_slip_x]
type = INSFVNoSlipWallBC
variable = u
boundary = 'left interface bottom'
function = 0
[]
[no_slip_y]
type = INSFVNoSlipWallBC
variable = v
boundary = 'left interface top bottom'
function = 0
[]
[T_hot]
type = FVDirichletBC
variable = T
boundary = 'bottom'
value = 1
[]
[T_cold]
type = FVDirichletBC
variable = Ts
boundary = 'right'
value = 0
[]
[]
[FunctorMaterials]
[functor_constants]
type = ADGenericFunctorMaterial
prop_names = 'cp k'
prop_values = '${cp} ${k}'
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = 'T'
rho = ${rho}
block = 0
[]
[]
[Functions]
[lid_function]
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -ksp_gmres_restart'
petsc_options_value = 'asm lu NONZERO 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
l_max_its = 200
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/radiation_transfer_action/radiative_transfer_action_external_boundary_ray_tracing.i)
[Problem]
kernel_coverage_check = false
[]
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1 1.3 1.9'
ix = '3 3 3'
dy = '6'
iy = '9'
subdomain_id = '0 1 2'
[]
[inner_left]
type = SideSetsBetweenSubdomainsGenerator
input = cmg
primary_block = 0
paired_block = 1
new_boundary = 'inner_left'
[]
[inner_right]
type = SideSetsBetweenSubdomainsGenerator
input = inner_left
primary_block = 2
paired_block = 1
new_boundary = 'inner_right'
[]
[inner_top]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(y - 6) < 1e-10'
normal = '0 1 0'
included_subdomains = 1
new_sideset_name = 'inner_top'
input = 'inner_right'
[]
[inner_bottom]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(y) < 1e-10'
normal = '0 -1 0'
included_subdomains = 1
new_sideset_name = 'inner_bottom'
input = 'inner_top'
[]
[rename]
type = RenameBlockGenerator
old_block = '2'
new_block = '0'
input = inner_bottom
[]
[]
[Variables]
[temperature]
block = 0
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temperature
block = 0
diffusion_coefficient = 5
[]
[]
[GrayDiffuseRadiation]
[cavity]
boundary = '4 5 6 7'
emissivity = '0.9 0.8 0.4 1'
n_patches = '2 2 2 3'
partitioners = 'centroid centroid centroid centroid'
centroid_partitioner_directions = 'x y y x'
temperature = temperature
adiabatic_boundary = '7'
fixed_temperature_boundary = '6'
fixed_boundary_temperatures = '800'
view_factor_calculator = ray_tracing
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temperature
boundary = left
value = 1000
[]
[right]
type = DirichletBC
variable = temperature
boundary = right
value = 300
[]
[]
[Postprocessors]
[average_T_inner_right]
type = SideAverageValue
variable = temperature
boundary = inner_right
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/ray_tracing/test/tests/traceray/internal_sidesets/internal_sidesets_2d.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '2 2 2'
dy = '2 2 2'
ix = '2 2 2'
iy = '2 2 2'
subdomain_id = '0 1 0
2 5 3
0 4 0'
[]
[interior_bottom]
type = SideSetsBetweenSubdomainsGenerator
input = cmg
primary_block = 5
paired_block = 1
new_boundary = 'interior_bottom'
[]
[interior_left]
type = SideSetsBetweenSubdomainsGenerator
input = interior_bottom
primary_block = 5
paired_block = 2
new_boundary = 'interior_left'
[]
[interior_right]
type = SideSetsBetweenSubdomainsGenerator
input = interior_left
primary_block = 5
paired_block = 3
new_boundary = 'interior_right'
[]
[interior_top]
type = SideSetsBetweenSubdomainsGenerator
input = interior_right
primary_block = 5
paired_block = 4
new_boundary = 'interior_top'
[]
[]
[RayBCs]
active = 'kill_internal'
# active = 'kill_external reflect_internal'
# for testing internal kill
[kill_internal]
type = KillRayBC
boundary = 'interior_top interior_right interior_bottom interior_left'
[]
# for testing internal reflect
[kill_external]
type = KillRayBC
boundary = 'top right bottom left'
[]
[reflect_internal]
type = ReflectRayBC
boundary = 'interior_top interior_right interior_bottom interior_left'
[]
[]
[UserObjects/study]
type = RepeatableRayStudy
start_points = '0 0 0
2 4 0
6 6 0
0 2.5 0
3 6 0
2.5 2.5 0'
directions = '1 1 0
1 -1 0
-1 -1 0
1 0.1 0
0 -1 0
0.5 1.5 0'
names = 'to_bottom_left_corner
at_top_left_corner
to_top_right_corner
to_left_offset
to_top_center_node
inside_to_top'
ray_distance = 10
execute_on = initial
ray_kernel_coverage_check = false
use_internal_sidesets = true
[]
[Postprocessors/total_distance]
type = RayTracingStudyResult
study = study
result = total_distance
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
exodus = false
csv = true
[]
(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
[]
(test/tests/misc/boundary_variable_check/test.i)
[Problem]
boundary_restricted_elem_integrity_check = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[]
[AuxVariables]
[dummy][]
[dummy2]
family = MONOMIAL
order = CONSTANT
block = 1
[]
[dummy3]
family = MONOMIAL
order = CONSTANT
block = 0
[]
[]
[AuxKernels]
active = 'bad'
[bad]
type = ProjectionAux
variable = dummy
v = v
boundary = 'left'
[]
[bad_elemental]
type = ProjectionAux
variable = dummy3
v = dummy2
boundary = 'left'
[]
[]
[Variables]
[u]
block = '0'
[]
[v]
block = '1'
[]
[]
[Kernels]
[diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[]
[diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[]
[]
[InterfaceKernels]
active = 'interface'
[interface]
type = InterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
D = 'D'
D_neighbor = 'D'
[]
[penalty_interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[]
[]
[BCs]
active = 'left right middle'
[left]
type = DirichletBC
variable = u
boundary = 'left'
value = 1
[]
[bad]
type = MatchedValueBC
variable = u
boundary = 'left'
v = v
[]
[bad_integrated]
type = CoupledVarNeumannBC
variable = u
boundary = 'left'
v = v
[]
[right]
type = DirichletBC
variable = v
boundary = 'right'
value = 0
[]
[middle]
type = MatchedValueBC
variable = v
boundary = 'primary0_interface'
v = u
[]
[]
[Materials]
[stateful]
type = StatefulMaterial
initial_diffusivity = 1
boundary = primary0_interface
[]
[block0]
type = GenericConstantMaterial
block = '0'
prop_names = 'D'
prop_values = '4'
[]
[block1]
type = GenericConstantMaterial
block = '1'
prop_names = 'D'
prop_values = '2'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
[Postprocessors]
active = ''
[bad]
type = NodalExtremeValue
boundary = 'left'
variable = v
[]
[bad_side]
type = SideDiffusiveFluxIntegral
variable = v
diffusivity = 1
boundary = 'left'
[]
[]
(test/tests/linearfvkernels/block-restriction/block-restricted-adr.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '0.1 1 0.1'
dy = '0.1 0.5 0.1'
ix = '1 2 1'
iy = '1 1 1'
subdomain_id = '1 1 1 1 2 3 1 1 1'
[]
[transform]
type = TransformGenerator
input = cmg
transform = TRANSLATE
vector_value = '-0.1 -0.1 0.0'
[]
[create_sides]
type = SideSetsBetweenSubdomainsGenerator
input = transform
new_boundary = sides
primary_block = 2
paired_block = 1
[]
[create_outlet]
type = SideSetsBetweenSubdomainsGenerator
input = create_sides
new_boundary = outlet
primary_block = 2
paired_block = 3
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
block = 2
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = diff_coeff_func
use_nonorthogonal_correction = false
[]
[advection]
type = LinearFVAdvection
variable = u
velocity = "0.5 0 0"
advected_interp_method = average
[]
[reaction]
type = LinearFVReaction
variable = u
coeff = coeff_func
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
inactive = "outflow"
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "sides outlet"
functor = analytic_solution
[]
[outflow]
type = LinearFVAdvectionDiffusionOutflowBC
variable = u
boundary = "right"
use_two_term_expansion = true
[]
[]
[Functions]
[diff_coeff_func]
type = ParsedFunction
expression = '1.0+0.5*x*y'
[]
[coeff_func]
type = ParsedFunction
expression = '1.0+1.0/(1+x*y)'
[]
[source_func]
type = ParsedFunction
expression = '-1.0*x*pi*sin((1/2)*x*pi)*cos(2*y*pi) - 0.25*y*pi*sin(2*y*pi)*cos((1/2)*x*pi) + (1.0 + 1.0/(x*y + 1))*(sin((1/2)*x*pi)*sin(2*y*pi) + 1.5) + (17/4)*pi^2*(0.5*x*y + 1.0)*sin((1/2)*x*pi)*sin(2*y*pi) + 0.25*pi*sin(2*y*pi)*cos((1/2)*x*pi)'
[]
[analytic_solution]
type = ParsedFunction
expression = 'sin((1/2)*x*pi)*sin(2*y*pi) + 1.5'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = FINAL
block = 2
[]
[error]
type = ElementL2FunctorError
approximate = u
exact = analytic_solution
execute_on = FINAL
block = 2
[]
[]
[Convergence]
[linear]
type = IterationCountConvergence
max_iterations = 1
converge_at_max_iterations = true
[]
[]
[Executioner]
type = Steady
system_names = u_sys
l_abs_tol = 1e-10
multi_system_fixed_point=true
multi_system_fixed_point_convergence=linear
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
[csv]
type = CSV
execute_on = FINAL
[]
[]
(modules/navier_stokes/test/tests/postprocessors/flow_rates/conservation_INSFV.i)
mu=1
rho=1
advected_interp_method='average'
velocity_interp_method='rc'
[GlobalParams]
rhie_chow_user_object = 'rc'
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
[]
[]
[Mesh]
inactive = 'mesh internal_boundary_bot internal_boundary_top'
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '1'
dy = '1 1 1'
ix = '5'
iy = '5 5 5'
subdomain_id = '1
2
3'
[]
[internal_boundary_bot]
type = SideSetsBetweenSubdomainsGenerator
input = mesh
new_boundary = 'internal_bot'
primary_block = 1
paired_block = 2
[]
[internal_boundary_top]
type = SideSetsBetweenSubdomainsGenerator
input = internal_boundary_bot
new_boundary = 'internal_top'
primary_block = 2
paired_block = 3
[]
[diverging_mesh]
type = FileMeshGenerator
file = 'expansion_quad.e'
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 0
[]
[v]
type = INSFVVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[temperature]
type = INSFVEnergyVariable
[]
[]
[AuxVariables]
[advected_density]
type = MooseVariableFVReal
initial_condition = ${rho}
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
rho = ${rho}
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
force_boundary_execution = true
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
force_boundary_execution = true
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[temp_advection]
type = INSFVEnergyAdvection
variable = temperature
advected_interp_method = 'upwind'
[]
[temp_source]
type = FVBodyForce
variable = temperature
function = 10
block = 1
[]
[]
[FVBCs]
inactive = 'noslip-u noslip-v'
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'bottom'
variable = u
function = 0
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'bottom'
variable = v
function = 1
[]
[noslip-u]
type = INSFVNoSlipWallBC
boundary = 'right'
variable = u
function = 0
[]
[noslip-v]
type = INSFVNoSlipWallBC
boundary = 'right'
variable = v
function = 0
[]
[free-slip-u]
type = INSFVNaturalFreeSlipBC
boundary = 'right'
variable = u
momentum_component = 'x'
[]
[free-slip-v]
type = INSFVNaturalFreeSlipBC
boundary = 'right'
variable = v
momentum_component = 'y'
[]
[axis-u]
type = INSFVSymmetryVelocityBC
boundary = 'left'
variable = u
u = u
v = v
mu = ${mu}
momentum_component = x
[]
[axis-v]
type = INSFVSymmetryVelocityBC
boundary = 'left'
variable = v
u = u
v = v
mu = ${mu}
momentum_component = y
[]
[axis-p]
type = INSFVSymmetryPressureBC
boundary = 'left'
variable = pressure
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'top'
variable = pressure
function = 0
[]
[inlet_temp]
type = FVNeumannBC
boundary = 'bottom'
variable = temperature
value = 300
[]
[]
[FunctorMaterials]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = 'temperature'
rho = ${rho}
[]
[advected_material_property]
type = ADGenericFunctorMaterial
prop_names = 'advected_rho cp'
prop_values ='${rho} 1'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm 200 lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
[]
[Postprocessors]
[inlet_mass_variable]
type = VolumetricFlowRate
boundary = bottom
vel_x = u
vel_y = v
advected_quantity = advected_density
[]
[inlet_mass_constant]
type = VolumetricFlowRate
boundary = bottom
vel_x = u
vel_y = v
advected_quantity = ${rho}
[]
[inlet_mass_matprop]
type = VolumetricFlowRate
boundary = bottom
vel_x = u
vel_y = v
advected_quantity = 'advected_rho'
[]
[mid1_mass]
type = VolumetricFlowRate
boundary = internal_bot
vel_x = u
vel_y = v
advected_quantity = ${rho}
[]
[mid2_mass]
type = VolumetricFlowRate
boundary = internal_top
vel_x = u
vel_y = v
advected_quantity = ${rho}
[]
[outlet_mass]
type = VolumetricFlowRate
boundary = top
vel_x = u
vel_y = v
advected_quantity = ${rho}
[]
[inlet_momentum_x]
type = VolumetricFlowRate
boundary = bottom
vel_x = u
vel_y = v
advected_quantity = u
[]
[inlet_momentum_y]
type = VolumetricFlowRate
boundary = bottom
vel_x = u
vel_y = v
advected_quantity = v
[]
[mid1_advected_energy]
type = VolumetricFlowRate
boundary = internal_bot
vel_x = u
vel_y = v
advected_quantity = 'rho_cp_temp'
advected_interp_method = 'upwind'
[]
[mid2_advected_energy]
type = VolumetricFlowRate
boundary = internal_top
vel_x = u
vel_y = v
advected_quantity = 'rho_cp_temp'
advected_interp_method = 'upwind'
[]
[outlet_advected_energy]
type = VolumetricFlowRate
boundary = top
vel_x = u
vel_y = v
advected_quantity = 'rho_cp_temp'
advected_interp_method = 'upwind'
[]
[]
[Outputs]
csv = true
[]
(test/tests/userobjects/interface_user_object/interface_mp_real_user_object_QP.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
[../]
[./primary0_interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./break_boundary]
input = primary0_interface
type = BreakBoundaryOnSubdomainGenerator
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./v]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 2
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 4
block = 1
[../]
[./source_u]
type = BodyForce
variable = u
function = 0.1*t
[../]
[]
[InterfaceKernels]
[./primary0_interface]
type = PenaltyInterfaceDiffusionDot
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 right top'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = TRUE
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
dt = 0.1
num_steps = 3
dtmin = 0.1
line_search = none
[]
[Outputs]
[./out]
type = Exodus
sync_only = true
sync_times = '0.1 0.2 0.3'
execute_on = 'TIMESTEP_END'
[]
[]
[UserObjects]
[./interface_value_uo]
type = InterfaceQpMaterialPropertyRealUO
property = diffusivity
property_neighbor = diffusivity
boundary = 'primary0_interface'
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
interface_value_type = average
[../]
[./interface_value_rate_uo]
type = InterfaceQpMaterialPropertyRealUO
property = diffusivity
property_neighbor = diffusivity
boundary = 'primary0_interface'
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
interface_value_type = average
value_type = rate
[../]
[./interface_value_increment_uo]
type = InterfaceQpMaterialPropertyRealUO
property = diffusivity
property_neighbor = diffusivity
boundary = 'primary0_interface'
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
interface_value_type = average
value_type = increment
[../]
[]
[Materials]
[./stateful1]
type = StatefulMaterial
block = 0
initial_diffusivity = 5
[../]
[./stateful2]
type = StatefulMaterial
block = 1
initial_diffusivity = 2
[../]
[]
[AuxKernels]
[./interface_avg_value_aux]
type = InterfaceValueUserObjectAux
variable = avg
boundary = 'primary0_interface'
interface_uo_name = interface_value_uo
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
[]
[./interface_avg_value_rate_aux]
type = InterfaceValueUserObjectAux
variable = avg_rate
boundary = 'primary0_interface'
interface_uo_name = interface_value_rate_uo
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
[]
[./interface_avg_value_increment_aux]
type = InterfaceValueUserObjectAux
variable = avg_increment
boundary = 'primary0_interface'
interface_uo_name = interface_value_increment_uo
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
[]
[]
[AuxVariables]
[./avg]
family = MONOMIAL
order = CONSTANT
[]
[./avg_rate]
family = MONOMIAL
order = CONSTANT
[]
[./avg_increment]
family = MONOMIAL
order = CONSTANT
[]
[]
(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
[]
(test/tests/postprocessors/interface_diffusive_flux/interface_diffusive_flux.i)
postprocessor_type = InterfaceDiffusiveFluxAverage
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 6
xmax = 3
ny = 9
ymax = 3
elem_type = QUAD4
[]
[subdomain_id]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '2 1 0'
block_id = 1
[]
[interface]
input = subdomain_id
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'interface'
[]
[]
[Functions]
[fn_exact]
type = ParsedFunction
expression = 'x*x+y*y'
[]
[]
[Variables]
[u]
block = 0
[]
[v]
block = 1
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
[]
[body_u]
type = BodyForce
variable = u
function = 1
[]
[diff_v]
type = Diffusion
variable = v
[]
[body_v]
type = BodyForce
variable = v
function = -1
[]
[]
# Not a diffusion interface but can test the postprocessor anyway
[InterfaceKernels]
[reaction]
type = InterfaceReaction
kb = 1
kf = 2
variable = u
neighbor_var = v
boundary = 'interface'
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = fn_exact
[]
[]
[Postprocessors]
[diffusive_flux]
type = ${postprocessor_type}
variable = u
neighbor_variable = v
diffusivity = 1
execute_on = TIMESTEP_END
boundary = 'interface'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
file_base = ${raw ${postprocessor_type} _fe}
exodus = true
[]
(test/tests/fviks/one-var-diffusion/test.i)
L = 2
l = 1
q1 = 1
q2 = 2
uR = 1
D1 = 1
D2 = 2
ul = '${fparse 1/D2*(D2*uR+q2*L*L/2-q2*l*l/2-l*(q2-q1)*L+l*l*(q2-q1))}'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = ${L}
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '${l} 0 0'
block_id = 1
top_right = '${L} 1.0 0'
[]
[interface_primary_side]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary_interface'
[]
[interface_secondary_side]
input = interface_primary_side
type = SideSetsBetweenSubdomainsGenerator
primary_block = '1'
paired_block = '0'
new_boundary = 'secondary_interface'
[]
[]
[Variables]
[u]
type = MooseVariableFVReal
[]
[v]
type = MooseVariableFVReal
block = 0
[]
[w]
type = MooseVariableFVReal
block = 1
[]
[]
[FVKernels]
[diff_left]
type = FVDiffusion
variable = u
coeff = 'left'
block = 0
[]
[diff_right]
type = FVDiffusion
variable = u
coeff = 'right'
block = 1
[]
[source_left]
type = FVBodyForce
variable = u
function = ${q1}
block = 0
[]
[source_right]
type = FVBodyForce
variable = u
function = ${q2}
block = 1
[]
[diff_v]
type = FVDiffusion
variable = v
block = 0
coeff = 'left'
[]
[diff_w]
type = FVDiffusion
variable = w
block = 1
coeff = 'right'
[]
[]
[FVInterfaceKernels]
active = 'interface'
[interface]
type = FVOneVarDiffusionInterface
variable1 = u
boundary = primary_interface
subdomain1 = '0'
subdomain2 = '1'
coeff1 = 'left'
coeff2 = 'right'
coeff_interp_method = average
[]
[bad1]
type = FVOneVarDiffusionInterface
variable1 = w
variable2 = u
boundary = primary_interface
subdomain1 = '0'
subdomain2 = '1'
coeff1 = 'left'
coeff2 = 'right'
coeff_interp_method = average
[]
[bad2]
type = FVOneVarDiffusionInterface
variable1 = u
variable2 = v
boundary = primary_interface
subdomain1 = '0'
subdomain2 = '1'
coeff1 = 'left'
coeff2 = 'right'
coeff_interp_method = average
[]
[bad3]
type = FVOneVarDiffusionInterface
variable1 = v
boundary = primary_interface
subdomain1 = '0'
subdomain2 = '1'
coeff1 = 'left'
coeff2 = 'right'
coeff_interp_method = average
[]
[]
[FVBCs]
[right]
type = FVDirichletBC
variable = u
boundary = 'right'
value = ${uR}
[]
[v_left]
type = FVDirichletBC
variable = v
boundary = 'left'
value = 1
[]
[v_right]
type = FVDirichletBC
variable = v
boundary = 'primary_interface'
value = 0
[]
[w_left]
type = FVDirichletBC
variable = w
boundary = 'secondary_interface'
value = 1
[]
[w_right]
type = FVDirichletBC
variable = w
boundary = 'right'
value = 0
[]
[]
[Materials]
[block0]
type = ADGenericFunctorMaterial
block = '0'
prop_names = 'left'
prop_values = '${D1}'
[]
[block1]
type = ADGenericFunctorMaterial
block = '1'
prop_names = 'right'
prop_values = '${D2}'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
csv = true
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'if(x<${l}, 1/${D1}*(${fparse D1*ul+q1*l*l/2}-${fparse q1/2}*x*x),-1/${D2}*(${fparse -D2*ul-q2*l*l/2}+${fparse q2/2}*x*x-${fparse l*(q2-q1)}*x+${fparse l*l*(q2-q1)}))'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2Error
variable = u
function = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(test/tests/meshgenerators/sidesets_between_subdomains_generator/between.i)
[Mesh]
[./fmg]
type = FileMeshGenerator
file = twoblocks.e
[]
[./extrude]
type = SideSetsBetweenSubdomainsGenerator
input = fmg
primary_block = 'left'
paired_block = 'right'
new_boundary = 'in_between'
[../]
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/view_factors_symmetry/cavity_with_pillars_symmetry_bc.i)
[Mesh]
[cartesian]
type = CartesianMeshGenerator
dim = 3
dx = '0.5 0.5 0.5'
dy = '0.5 0.75 0.5'
dz = '1.5 0.5'
subdomain_id = '1 1 1
1 2 1
1 1 1
1 1 1
1 1 1
1 1 1'
[]
[add_obstruction]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 2
paired_block = 1
new_boundary = obstruction
input = cartesian
[]
[add_new_back]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(z) < 1e-10'
included_subdomains = '1'
normal = '0 0 -1'
new_sideset_name = back_2
input = add_obstruction
[]
[]
[UserObjects]
[view_factor_study]
type = ViewFactorRayStudy
execute_on = initial
boundary = 'left top bottom front back_2 obstruction'
face_order = FOURTH
[]
[view_factor]
type = RayTracingViewFactor
boundary = 'left top bottom front back_2 obstruction'
execute_on = INITIAL
normalize_view_factor = false
ray_study_name = view_factor_study
[]
[]
[RayBCs]
[vf_bc]
type = ViewFactorRayBC
boundary = 'left top bottom front back_2 obstruction'
[]
[symmetry]
type = ReflectRayBC
boundary = 'right'
[]
[]
[Postprocessors]
[left_left]
type = ViewFactorPP
from_boundary = left
to_boundary = left
view_factor_object_name = view_factor
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/meshgenerators/break_boundary_on_subdomain/break_bottom_interface_on_subdomain.i)
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 2
xmax = 2
ny = 2
ymax = 2
nz = 2
zmax = 2
[]
[./subdomain1]
type = SubdomainBoundingBoxGenerator
input = gmg
bottom_left = '0 0 0'
top_right = '1 1 1'
block_id = 1
[]
[./subdomain2]
type = SubdomainBoundingBoxGenerator
input = subdomain1
bottom_left = '1 0 0'
top_right = '2 1 1'
block_id = 2
[]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain2
primary_block = '1 2'
paired_block = '0'
new_boundary = 'interface'
[]
[./break_boundary]
input = interface
type = BreakBoundaryOnSubdomainGenerator
boundaries = 'bottom interface'
[../]
[]
[Outputs]
exodus = true
[]
(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
[../]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/iks/flow-around-square/flow-around-square.i)
# Water properties
mu = 1.0E-3
rho = 1000.0
k = 0.598
cp = 4186
# Solid properties
cp_s = 830
rho_s = 1680
k_s = 3.5
# Other parameters
p_outlet = 0
u_inlet = -1e-4
h_conv = 50
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin = 0
ymin = 0
ymax = 0.1
xmax = 0.1
[]
[subdomain1]
input = generated_mesh
type = SubdomainBoundingBoxGenerator
block_name = subdomain1
bottom_left = '0.04 0.04 0'
block_id = 1
top_right = '0.06 0.06 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = 0
paired_block = 1
new_boundary = interface
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
advected_interp_method = 'upwind'
velocity_interp_method = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = vel_x
v = vel_y
pressure = pressure
block = 0
[]
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
initial_condition = 1e-4
block = 0
[]
[vel_y]
type = INSFVVelocityVariable
initial_condition = 1e-4
block = 0
[]
[pressure]
type = INSFVPressureVariable
block = 0
[]
[T]
type = INSFVEnergyVariable
initial_condition = 283.15
scaling = 1e-5
block = 0
[]
[Ts]
type = INSFVEnergyVariable
initial_condition = 333.15
scaling = 1e-5
block = 1
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
rho = ${rho}
block = 0
[]
[u_time]
type = INSFVMomentumTimeDerivative
variable = vel_x
rho = ${rho}
momentum_component = 'x'
block = 0
[]
[u_advection]
type = INSFVMomentumAdvection
variable = vel_x
rho = ${rho}
momentum_component = 'x'
block = 0
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = vel_x
mu = ${mu}
momentum_component = 'x'
block = 0
[]
[u_pressure]
type = INSFVMomentumPressure
variable = vel_x
momentum_component = 'x'
pressure = pressure
block = 0
[]
[v_time]
type = INSFVMomentumTimeDerivative
variable = vel_y
rho = ${rho}
momentum_component = 'y'
block = 0
[]
[v_advection]
type = INSFVMomentumAdvection
variable = vel_y
rho = ${rho}
momentum_component = 'y'
block = 0
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = vel_y
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = vel_y
momentum_component = 'y'
pressure = pressure
block = 0
[]
[energy_time]
type = INSFVEnergyTimeDerivative
variable = T
rho = ${rho}
dh_dt = dh_dt
block = 0
[]
[temp_conduction]
type = FVDiffusion
coeff = 'k'
variable = T
block = 0
[]
[temp_advection]
type = INSFVEnergyAdvection
variable = T
block = 0
[]
[solid_energy_time]
type = INSFVEnergyTimeDerivative
variable = Ts
rho = ${rho_s}
dh_dt = dh_solid_dt
block = 1
[]
[solid_temp_conduction]
type = FVDiffusion
coeff = 'k_s'
variable = Ts
block = 1
[]
[]
[FVInterfaceKernels]
[convection]
type = FVConvectionCorrelationInterface
variable1 = T
variable2 = Ts
subdomain1 = 0
subdomain2 = 1
boundary = interface
h = ${h_conv}
T_solid = Ts
T_fluid = T
wall_cell_is_bulk = true
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'top'
variable = vel_x
function = 0
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'top'
variable = vel_y
function = ${u_inlet}
[]
[inlet_T]
type = FVDirichletBC
variable = T
boundary = 'top'
value = 283.15
[]
[no-slip-u]
type = INSFVNoSlipWallBC
boundary = 'left right interface'
variable = vel_x
function = 0
[]
[no-slip-v]
type = INSFVNoSlipWallBC
boundary = 'left right interface'
variable = vel_y
function = 0
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'bottom'
variable = pressure
function = '${p_outlet}'
[]
[]
[FunctorMaterials]
[functor_constants]
type = ADGenericFunctorMaterial
prop_names = 'cp k'
prop_values = '${cp} ${k}'
block = 0
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = 'T'
rho = ${rho}
block = 0
[]
[solid_functor_constants]
type = ADGenericFunctorMaterial
prop_names = 'cp_s k_s'
prop_values = '${cp_s} ${k_s}'
block = 1
[]
[solid_ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = 'Ts'
rho = ${rho_s}
cp = ${cp_s}
block = 1
h = h_solid
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm 100 lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-8
dt = 10
end_time = 10
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/postprocessors/flow_rates/conservation_PINSFV.i)
mu=1
rho=1
advected_interp_method='average'
velocity_interp_method='rc'
[Mesh]
inactive = 'mesh internal_boundary_bot internal_boundary_top'
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '1'
dy = '1 1 1'
ix = '5'
iy = '5 5 5'
subdomain_id = '1
2
3'
[]
[internal_boundary_bot]
type = SideSetsBetweenSubdomainsGenerator
input = mesh
new_boundary = 'internal_bot'
primary_block = 1
paired_block = 2
[]
[internal_boundary_top]
type = SideSetsBetweenSubdomainsGenerator
input = internal_boundary_bot
new_boundary = 'internal_top'
primary_block = 2
paired_block = 3
[]
[diverging_mesh]
type = FileMeshGenerator
file = 'expansion_quad.e'
[]
[]
[Problem]
fv_bcs_integrity_check = true
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
porosity = porosity
[]
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 0
[]
[v]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[temperature]
type = INSFVEnergyVariable
[]
[]
[AuxVariables]
[advected_density]
order = CONSTANT
family = MONOMIAL
fv = true
initial_condition = ${rho}
[]
[porosity]
order = CONSTANT
family = MONOMIAL
fv = true
initial_condition = 0.5
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = u
force_boundary_execution = true
porosity = porosity
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
porosity = porosity
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = v
rho = ${rho}
porosity = porosity
momentum_component = 'y'
[]
[v_viscosity]
type = PINSFVMomentumDiffusion
variable = v
force_boundary_execution = true
porosity = porosity
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
porosity = porosity
[]
[temp_advection]
type = PINSFVEnergyAdvection
variable = temperature
advected_interp_method = 'upwind'
[]
[temp_source]
type = FVBodyForce
variable = temperature
function = 10
block = 1
[]
[]
[FVBCs]
inactive = 'noslip-u noslip-v'
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'bottom'
variable = u
function = 0
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'bottom'
variable = v
function = 1
[]
[noslip-u]
type = INSFVNoSlipWallBC
boundary = 'right'
variable = u
function = 0
[]
[noslip-v]
type = INSFVNoSlipWallBC
boundary = 'right'
variable = v
function = 0
[]
[free-slip-u]
type = INSFVNaturalFreeSlipBC
boundary = 'right'
variable = u
momentum_component = 'x'
[]
[free-slip-v]
type = INSFVNaturalFreeSlipBC
boundary = 'right'
variable = v
momentum_component = 'y'
[]
[axis-u]
type = PINSFVSymmetryVelocityBC
boundary = 'left'
variable = u
u = u
v = v
mu = ${mu}
momentum_component = x
[]
[axis-v]
type = PINSFVSymmetryVelocityBC
boundary = 'left'
variable = v
u = u
v = v
mu = ${mu}
momentum_component = y
[]
[axis-p]
type = INSFVSymmetryPressureBC
boundary = 'left'
variable = pressure
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'top'
variable = pressure
function = 0
[]
[inlet_temp]
type = FVNeumannBC
boundary = 'bottom'
variable = temperature
value = 300
[]
[]
[FunctorMaterials]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = 'temperature'
rho = ${rho}
[]
[advected_material_property]
type = ADGenericFunctorMaterial
prop_names = 'advected_rho cp'
prop_values ='${rho} 1'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm 200 lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
[]
[Postprocessors]
[inlet_mass_variable]
type = VolumetricFlowRate
boundary = bottom
vel_x = u
vel_y = v
advected_quantity = advected_density
[]
[inlet_mass_constant]
type = VolumetricFlowRate
boundary = bottom
vel_x = u
vel_y = v
advected_quantity = ${rho}
[]
[inlet_mass_matprop]
type = VolumetricFlowRate
boundary = bottom
vel_x = u
vel_y = v
advected_quantity = 'advected_rho'
[]
[mid1_mass]
type = VolumetricFlowRate
boundary = internal_bot
vel_x = u
vel_y = v
advected_quantity = ${rho}
[]
[mid2_mass]
type = VolumetricFlowRate
boundary = internal_top
vel_x = u
vel_y = v
advected_quantity = ${rho}
[]
[outlet_mass]
type = VolumetricFlowRate
boundary = top
vel_x = u
vel_y = v
advected_quantity = ${rho}
[]
[inlet_momentum_x]
type = VolumetricFlowRate
boundary = bottom
vel_x = u
vel_y = v
advected_quantity = u
[]
[inlet_momentum_y]
type = VolumetricFlowRate
boundary = bottom
vel_x = u
vel_y = v
advected_quantity = v
[]
[mid1_advected_energy]
type = VolumetricFlowRate
boundary = internal_bot
vel_x = u
vel_y = v
advected_quantity = 'rho_cp_temp'
advected_interp_method = 'upwind'
[]
[mid2_advected_energy]
type = VolumetricFlowRate
boundary = internal_top
vel_x = u
vel_y = v
advected_quantity = 'rho_cp_temp'
advected_interp_method = 'upwind'
[]
[outlet_advected_energy]
type = VolumetricFlowRate
boundary = top
vel_x = u
vel_y = v
advected_quantity = 'rho_cp_temp'
advected_interp_method = 'upwind'
[]
[]
[Outputs]
csv = true
[]
(test/tests/meshgenerators/sidesets_between_subdomains_generator/sideset_between_subdomains.i)
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 3
xmax = 3
ymax = 3
zmax = 3
nx = 3
ny = 3
nz = 3
[]
[./central_block]
type = SubdomainBoundingBoxGenerator
input = gmg
block_id = 2
bottom_left = '1 1 1'
top_right = '2 2 2'
[]
[./central_boundary]
type = SideSetsBetweenSubdomainsGenerator
input = central_block
primary_block = 2
paired_block = 0
new_boundary = 7
[]
[]
[Outputs]
exodus = true
[]
(test/tests/interfacekernels/3d_interface/vector_3d.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 2
xmax = 2
ny = 2
ymax = 2
nz = 2
zmax = 2
elem_type = HEX20
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 1'
block_id = 1
[../]
[./break_boundary]
type = BreakBoundaryOnSubdomainGenerator
input = subdomain1
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[]
[Variables]
[./u]
order = FIRST
family = NEDELEC_ONE
block = 0
[../]
[./v]
order = FIRST
family = NEDELEC_ONE
block = 1
[../]
[]
[Kernels]
[./curl_u_plus_u]
type = VectorFEWave
variable = u
x_forcing_func = 1
y_forcing_func = 1
z_forcing_func = 1
block = 0
[../]
[./curl_v_plus_v]
type = VectorFEWave
variable = v
block = 1
[../]
[]
[InterfaceKernels]
[./parallel]
type = VectorPenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
# Natural condition of VectorFEWave weak form is curl(u) = 0, curl(v) = 0
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
(test/tests/vectorpostprocessors/element_id_counters/interface_element_counter.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 1
extra_element_integers = foo_id
[]
[id0]
type = SubdomainBoundingBoxGenerator
input = gmg
bottom_left = '0 0 0'
block_id = 0
top_right = '1 1 0'
integer_name = foo_id
[]
[id1]
type = SubdomainBoundingBoxGenerator
input = id0
bottom_left = '0.4 0.4 0'
block_id = 1
top_right = '0.9 0.9 0'
integer_name = foo_id
[]
[id2]
type = SubdomainBoundingBoxGenerator
input = id1
bottom_left = '0.1 0.1 0'
block_id = 2
top_right = '0.6 0.6 0'
integer_name = foo_id
[]
[subdomain]
type = SubdomainBoundingBoxGenerator
input = id2
bottom_left = '0 0.6 0'
block_id = 1
top_right = '1 1 0'
[]
[side0to1]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain
primary_block = 0
paired_block = 1
new_boundary = side0to1
[]
[]
[AuxVariables]
[foo_id_var]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[foo_id]
type = ExtraElementIDAux
variable = foo_id_var
extra_id_name = foo_id
[]
[]
[VectorPostprocessors]
[elem_counter]
type = InterfaceElementCounterWithID
boundary = side0to1
id_name = foo_id
[]
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = 'timestep_end'
[]
(modules/heat_transfer/test/tests/ad_convective_heat_flux/fe_fv_coupled.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '0.5 0.5'
dy = '0.5 0.5'
ix = '5 5'
iy = '5 5'
subdomain_id = '0 1
0 1'
[]
[add_sideset0]
type = SideSetsBetweenSubdomainsGenerator
input = cmg
new_boundary = middle01
primary_block = 0
paired_block = 1
[]
[add_sideset1]
type = SideSetsBetweenSubdomainsGenerator
input = add_sideset0
new_boundary = middle10
primary_block = 1
paired_block = 0
[]
[]
[Variables]
[u_fe]
block = 0
[]
[u_fv]
type = MooseVariableFVReal
block = 1
[]
[]
[Kernels]
[u_fe_diff]
type = ADDiffusion
variable = u_fe
[]
[]
[BCs]
[u_fe_left]
type = ADDirichletBC
boundary = left
variable = u_fe
value = 0
[]
[u_fe_middle]
type = ADConvectiveHeatFluxBC
boundary = middle01
variable = u_fe
T_infinity_functor = u_fv
heat_transfer_coefficient_functor = 1.0
[]
[]
[FVKernels]
[u_fv_diff]
type = FVDiffusion
variable = u_fv
coeff = 1.0
[]
[]
[FVBCs]
[u_fv_right]
type = FVDirichletBC
boundary = right
variable = u_fv
value = 1.0
[]
[u_fv_middle]
type = FVFunctorConvectiveHeatFluxBC
boundary = middle10
variable = u_fv
T_bulk = u_fv
T_solid = u_fe
heat_transfer_coefficient = 1.0
is_solid = false
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/energy-conservation/q1q1.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
nx = 10
ny = 10
dim = 2
[]
[subdomain]
type = SubdomainBoundingBoxGenerator
bottom_left = '0.5 0 0'
top_right = '1 1 0'
block_id = 1
input = gen
[]
[break_boundary]
input = subdomain
type = BreakBoundaryOnSubdomainGenerator
boundaries = 'bottom top'
[]
[sideset]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '1'
paired_block = '0'
new_boundary = 'fluid_left'
[]
coord_type = RZ
[]
[Variables]
[T][]
[velocity]
family = LAGRANGE_VEC
block = 1
[]
[pressure]
block = 1
[]
[]
[Kernels]
[mass]
type = INSADMass
variable = pressure
block = 1
[]
[pspg]
type = INSADMassPSPG
variable = pressure
block = 1
[]
[momentum_convection]
type = INSADMomentumAdvection
variable = velocity
block = 1
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = velocity
block = 1
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = pressure
integrate_p_by_parts = true
block = 1
[]
[momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
block = 1
[]
[temperature_advection]
type = INSADEnergyAdvection
variable = T
block = 1
[]
[temperature_supg]
type = INSADEnergySUPG
variable = T
velocity = velocity
block = 1
[]
[temperature_conduction]
type = ADHeatConduction
variable = T
thermal_conductivity = 'k'
[]
[heat_source]
type = BodyForce
variable = T
block = 0
function = 'x + y'
[]
[]
[BCs]
[velocity_inlet]
type = VectorFunctionDirichletBC
variable = velocity
function_y = 1
boundary = 'bottom_to_1'
[]
[wall]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'fluid_left right'
[]
[convective_heat_transfer]
type = ConvectiveHeatFluxBC
variable = T
T_infinity = 0
heat_transfer_coefficient = 1
boundary = 'right'
[]
[]
[Materials]
[constant]
type = ADGenericConstantMaterial
prop_names = 'cp rho k mu'
prop_values = '1 1 1 1'
[]
[ins]
type = INSADStabilized3Eqn
pressure = pressure
velocity = velocity
temperature = T
block = 1
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[Outputs]
csv = true
[]
[Postprocessors]
[convective_heat_transfer]
type = ConvectiveHeatTransferSideIntegral
T_solid = T
T_fluid = 0
htc = 1
boundary = 'right'
[]
[advection]
type = INSADElementIntegralEnergyAdvection
temperature = T
velocity = velocity
cp = cp
rho = rho
block = 1
[]
[source]
type = FunctionElementIntegral
function = 'x + y'
block = 0
[]
[energy_balance]
type = ParsedPostprocessor
expression = 'convective_heat_transfer + advection - source'
pp_names = 'convective_heat_transfer advection source'
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/block-restriction/one-mat-two-eqn-sets.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = 0
ymax = 1
nx = 16
ny = 8
elem_type = QUAD9
[]
[./corner_node_0]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_0'
coord = '0 0 0'
input = gen
[../]
[./corner_node_1]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_1'
coord = '1 0 0'
input = corner_node_0
[../]
[./subdomain1]
input = corner_node_1
type = SubdomainBoundingBoxGenerator
bottom_left = '1 0 0'
top_right = '2 1 0'
block_id = 1
[../]
[./break_boundary]
input = subdomain1
type = BreakBoundaryOnSubdomainGenerator
[../]
[./interface0]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '0'
paired_block = '1'
new_boundary = 'interface0'
[../]
[./interface1]
type = SideSetsBetweenSubdomainsGenerator
input = interface0
primary_block = '1'
paired_block = '0'
new_boundary = 'interface1'
[../]
[]
[Variables]
[velocity0]
order = SECOND
family = LAGRANGE_VEC
[]
[T0]
order = SECOND
[InitialCondition]
type = ConstantIC
value = 1.0
[]
[]
[p0]
[]
[]
[Kernels]
[./mass0]
type = INSADMass
variable = p0
block = 0
[../]
[./momentum_time0]
type = INSADMomentumTimeDerivative
variable = velocity0
block = 0
[../]
[./momentum_convection0]
type = INSADMomentumAdvection
variable = velocity0
block = 0
[../]
[./momentum_viscous0]
type = INSADMomentumViscous
variable = velocity0
block = 0
[../]
[./momentum_pressure0]
type = INSADMomentumPressure
variable = velocity0
pressure = p0
integrate_p_by_parts = true
block = 0
[../]
[./temperature_time0]
type = INSADHeatConductionTimeDerivative
variable = T0
block = 0
[../]
[./temperature_advection0]
type = INSADEnergyAdvection
variable = T0
block = 0
[../]
[./temperature_conduction0]
type = ADHeatConduction
variable = T0
thermal_conductivity = 'k'
block = 0
[../]
[./mass1]
type = INSADMass
variable = p0
block = 1
[../]
[./momentum_time1]
type = INSADMomentumTimeDerivative
variable = velocity0
block = 1
[../]
[./momentum_convection1]
type = INSADMomentumAdvection
variable = velocity0
block = 1
[../]
[./momentum_viscous1]
type = INSADMomentumViscous
variable = velocity0
block = 1
[../]
[./momentum_pressure1]
type = INSADMomentumPressure
variable = velocity0
pressure = p0
integrate_p_by_parts = true
block = 1
[../]
[./temperature_time1]
type = INSADHeatConductionTimeDerivative
variable = T0
block = 1
[../]
[./temperature_advection1]
type = INSADEnergyAdvection
variable = T0
block = 1
[../]
[./temperature_conduction1]
type = ADHeatConduction
variable = T0
thermal_conductivity = 'k'
block = 1
[../]
[]
[BCs]
[./no_slip0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'bottom_to_0 interface0 left'
[../]
[./lid0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'top_to_0'
function_x = 'lid_function0'
[../]
[./T_hot0]
type = DirichletBC
variable = T0
boundary = 'bottom_to_0'
value = 1
[../]
[./T_cold0]
type = DirichletBC
variable = T0
boundary = 'top_to_0'
value = 0
[../]
[./pressure_pin0]
type = DirichletBC
variable = p0
boundary = 'pinned_node_0'
value = 0
[../]
[./no_slip1]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'bottom_to_1 interface1 right'
[../]
[./lid1]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'top_to_1'
function_x = 'lid_function1'
[../]
[./T_hot1]
type = DirichletBC
variable = T0
boundary = 'bottom_to_1'
value = 1
[../]
[./T_cold1]
type = DirichletBC
variable = T0
boundary = 'top_to_1'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat0]
type = INSAD3Eqn
velocity = velocity0
pressure = p0
temperature = T0
block = '0 1'
[]
[]
[Functions]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
[./lid_function0]
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[./lid_function1]
type = ParsedFunction
expression = '4*(x-1)*(2-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels -sub_pc_factor_shift_type'
petsc_options_value = 'asm 2 ilu 4 NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
exodus = true
[]
(test/tests/interfacekernels/1d_interface/reaction_1D_steady.i)
# Steady-state test for the InterfaceReaction kernel.
#
# Specie M transport from domain 1 (0<=x<=1) to domain 2 (1<x<=2),
# u and v are concentrations in domain 1 and domain 2.
#
# Diffusion in both domains can be described by Ficks law and diffusion
# kernel is applied.
#
# Specie M has different diffusity in different domains, here set as D1=4, D2=2.
#
# Dirichlet boundary conditions are applied, i.e., u(0)=1, v(2)=0
#
# At the interface consider the following
#
# (a) Fluxes are matched from both domains (InterfaceDiffusion kernel)
#
# (b) First-order reaction is R = kf*u - kb*v = 0
#
# This results in the interfacial conditions
#
# -D1 du = -D2 dv
# kf*u = kb*v
#
# Analytical solution is
# u = -0.2*u+1, 0<=u<=1
# v = -0.4*v+0.8, 1<v<=2
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'subdomain1'
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = '0'
[../]
[./v]
order = FIRST
family = LAGRANGE
block = '1'
[../]
[]
[Kernels]
[./diff_u]
type = MatDiffusion
variable = u
block = '0'
diffusivity = D
[../]
[./diff_v]
type = MatDiffusion
variable = v
block = '1'
diffusivity = D
[../]
[]
[InterfaceKernels]
[./interface]
type = InterfaceDiffusion
variable = u
neighbor_var = 'v'
boundary = 'primary0_interface'
D = D
D_neighbor = D
[../]
[./interface_reaction]
type = InterfaceReaction
variable = u
neighbor_var = 'v'
boundary = 'primary0_interface'
kf = 1 # Forward reaction rate coefficient
kb = 2 # Backward reaction rate coefficient
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left'
value = 1
[../]
[./right]
type = DirichletBC
variable = v
boundary = 'right'
value = 0
[../]
[]
[Materials]
[./block0]
type = GenericConstantMaterial
block = '0'
prop_names = 'D'
prop_values = '4'
[../]
[./block1]
type = GenericConstantMaterial
block = '1'
prop_names = 'D'
prop_values = '2'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_rel_tol = 1e-10
[]
[Outputs]
print_linear_residuals = true
execute_on = 'FINAL'
exodus = true
csv = true
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[./elemental_error_u]
type = ElementL2Error
function = -0.2*x+1
variable = 'u'
block = '0'
[../]
[./elemental_error_v]
type = ElementL2Error
function = -0.4*x+0.8
variable = 'v'
block = '1'
[../]
[]
(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
[]
(modules/electromagnetics/test/tests/interfacekernels/electromagnetic_interfaces/perpendicular.i)
# Verification Test of PerpendicularElectricFieldInterface
# with default materials
#
# Imposes u_perpendicular = v_perpendicular on each interface
# between subdomain 0 and 1
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 10
xmax = 2
ymax = 2
zmax = 2
elem_type = HEX20
[]
[subdomain1]
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 1'
block_id = 1
input = gmg
[]
[break_boundary]
type = BreakBoundaryOnSubdomainGenerator
input = subdomain1
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[]
[Variables]
[u]
order = FIRST
family = NEDELEC_ONE
block = 0
[]
[v]
order = FIRST
family = NEDELEC_ONE
block = 1
[]
[]
[Kernels]
[curl_u]
type = CurlCurlField
variable = u
block = 0
[]
[coeff_u]
type = VectorFunctionReaction
variable = u
block = 0
[]
[ffn_u]
type = VectorBodyForce
variable = u
block = 0
function_x = 1
function_y = 1
function_z = 1
[]
[curl_v]
type = CurlCurlField
variable = v
block = 1
[]
[coeff_v]
type = VectorFunctionReaction
variable = v
block = 1
[]
[]
[InterfaceKernels]
[perpendicular]
type = PerpendicularElectricFieldInterface
variable = u
neighbor_var = v
boundary = primary0_interface
[]
[]
[BCs]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
exodus = true
print_linear_residuals = 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_element/ins/energy-conservation/q2q1.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
nx = 10
ny = 10
dim = 2
[]
[subdomain]
type = SubdomainBoundingBoxGenerator
bottom_left = '0.5 0 0'
top_right = '1 1 0'
block_id = 1
input = gen
[]
[break_boundary]
input = subdomain
type = BreakBoundaryOnSubdomainGenerator
boundaries = 'bottom top'
[]
[sideset]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '1'
paired_block = '0'
new_boundary = 'fluid_left'
[]
coord_type = RZ
second_order = true
[]
[Variables]
[T]
order = SECOND
[]
[velocity]
family = LAGRANGE_VEC
order = SECOND
block = 1
[]
[pressure]
block = 1
[]
[]
[Kernels]
[mass]
type = INSADMass
variable = pressure
block = 1
[]
[momentum_convection]
type = INSADMomentumAdvection
variable = velocity
block = 1
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = velocity
block = 1
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = pressure
integrate_p_by_parts = true
block = 1
[]
[momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
block = 1
[]
[temperature_advection]
type = INSADEnergyAdvection
variable = T
block = 1
[]
[temperature_supg]
type = INSADEnergySUPG
variable = T
velocity = velocity
block = 1
[]
[temperature_conduction]
type = ADHeatConduction
variable = T
thermal_conductivity = 'k'
[]
[heat_source]
type = BodyForce
variable = T
block = 0
function = 'x + y'
[]
[]
[BCs]
[velocity_inlet]
type = VectorFunctionDirichletBC
variable = velocity
function_y = 1
boundary = 'bottom_to_1'
[]
[wall]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'fluid_left right'
[]
[convective_heat_transfer]
type = ConvectiveHeatFluxBC
variable = T
T_infinity = 0
heat_transfer_coefficient = 1
boundary = 'right'
[]
[]
[Materials]
[constant]
type = ADGenericConstantMaterial
prop_names = 'cp rho k mu'
prop_values = '1 1 1 1'
[]
[ins]
type = INSADStabilized3Eqn
pressure = pressure
velocity = velocity
temperature = T
block = 1
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[Outputs]
csv = true
[]
[Postprocessors]
[convective_heat_transfer]
type = ConvectiveHeatTransferSideIntegral
T_solid = T
T_fluid = 0
htc = 1
boundary = 'right'
[]
[advection]
type = INSADElementIntegralEnergyAdvection
temperature = T
velocity = velocity
cp = cp
rho = rho
block = 1
[]
[source]
type = FunctionElementIntegral
function = 'x + y'
block = 0
[]
[energy_balance]
type = ParsedPostprocessor
expression = 'convective_heat_transfer + advection - source'
pp_names = 'convective_heat_transfer advection source'
[]
[]
(test/tests/fviks/continuity/test.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 20
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface_primary_side]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary_interface'
[]
[]
[GlobalParams]
# retain behavior at time of test creation
two_term_boundary_expansion = false
[]
[Variables]
[u]
type = MooseVariableFVReal
block = 0
initial_condition = 0.5
[]
[v]
type = MooseVariableFVReal
block = 1
initial_condition = 0.5
[]
[lambda]
type = MooseVariableScalar
[]
[]
[Problem]
kernel_coverage_check = false
[]
[FVKernels]
[diff_left]
type = FVDiffusion
variable = u
coeff = 'left'
block = 0
[]
[diff_right]
type = FVDiffusion
variable = v
coeff = 'right'
block = 1
[]
[]
[FVInterfaceKernels]
[interface]
type = FVTwoVarContinuityConstraint
variable1 = u
variable2 = v
boundary = 'primary_interface'
subdomain1 = '0'
subdomain2 = '1'
lambda = 'lambda'
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = u
boundary = 'left'
value = 1
[]
[v_left]
type = FVDirichletBC
variable = v
boundary = 'right'
value = 0
[]
[]
[Materials]
[block0]
type = ADGenericFunctorMaterial
block = '0'
prop_names = 'left'
prop_values = '1'
[]
[block1]
type = ADGenericFunctorMaterial
block = '1'
prop_names = 'right'
prop_values = '1'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm lu NONZERO'
[]
[Outputs]
exodus = true
[]
(test/tests/meshmodifiers/element_subdomain_modifier/steady.i)
[Problem]
solve = false
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 16
ny = 16
[]
[left]
type = SubdomainBoundingBoxGenerator
input = 'gen'
block_id = 1
block_name = 'left'
bottom_left = '0 0 0'
top_right = '0.25 1 1'
[]
[right]
type = SubdomainBoundingBoxGenerator
input = 'left'
block_id = 2
block_name = 'right'
bottom_left = '0.25 0 0'
top_right = '1 1 1'
[]
[moving_boundary]
type = SideSetsBetweenSubdomainsGenerator
input = 'right'
new_boundary = 'moving_boundary'
primary_block = 'left'
paired_block = 'right'
[]
[]
[MeshModifiers]
[moving_circle]
type = CoupledVarThresholdElementSubdomainModifier
coupled_var = 'phi'
criterion_type = 'BELOW'
threshold = 0
subdomain_id = 1
moving_boundaries = 'moving_boundary'
moving_boundary_subdomain_pairs = 'left right'
execute_on = 'INITIAL'
[]
[]
[AuxVariables]
[phi]
[AuxKernel]
type = ParsedAux
expression = '(x-t)^2+(y)^2-0.5^2'
use_xyzt = true
execute_on = 'INITIAL'
[]
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(test/tests/variables/second_derivative/interface_kernels.i)
# This is testing a scenario where volumetric system (like kernels) asks for second derivatives
# and the formulation includes a system using neighbor elements (like DGKernels or
# InterfaceKernels)
# If the latter did not request the second derivatives MOOSE should not be computing those.
# The PDEs solved are quite contrived, the Biharmonic kernel is there just to trigger the
# computation of second derivatives.
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
xmax = 2
ymax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 2 0'
block_id = 1
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'middle'
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
block = 0
[]
[v]
order = FIRST
family = LAGRANGE
block = 1
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
[]
[diff_v]
type = Diffusion
variable = v
[]
[bh]
type = Biharmonic
variable = u
[]
[]
[InterfaceKernels]
[interface]
type = InterfaceDiffusion
variable = u
neighbor_var = v
boundary = middle
D = 4
D_neighbor = 2
[]
[]
[BCs]
[u]
type = DirichletBC
variable = u
value = 1
boundary = 'right middle'
[]
[v]
type = DirichletBC
variable = v
value = 2
boundary = 'left middle'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(test/tests/interfacekernels/1d_interface/coupled_value_coupled_flux_with_jump_material.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[./subdomain1]
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
input = gen
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = '0'
[../]
[./v]
order = FIRST
family = LAGRANGE
block = '1'
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[../]
[]
[InterfaceKernels]
[./penalty_interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
jump_prop_name = jump
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left'
value = 1
[../]
[./right]
type = DirichletBC
variable = v
boundary = 'right'
value = 0
[../]
[]
[Materials]
[./jump]
type = JumpInterfaceMaterial
var = u
neighbor_var = v
boundary = primary0_interface
[../]
[./stateful]
type = StatefulMaterial
initial_diffusivity = 1
boundary = primary0_interface
[../]
[./block0]
type = GenericConstantMaterial
block = '0'
prop_names = 'D'
prop_values = '4'
[../]
[./block1]
type = GenericConstantMaterial
block = '1'
prop_names = 'D'
prop_values = '2'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
[Debug]
show_var_residual_norms = true
[]
(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/fsi/test/tests/2d-small-strain-transient/fsi_flat_channel.i)
[GlobalParams]
gravity = '0 0 0'
integrate_p_by_parts = true
laplace = true
convective_term = true
transient_term = true
pspg = true
supg = true
displacements = 'disp_x disp_y'
preset = false
order = FIRST
use_displaced_mesh = true
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 3.0
ymin = 0
ymax = 1.0
nx = 10
ny = 15
elem_type = QUAD4
[]
[subdomain1]
type = SubdomainBoundingBoxGenerator
bottom_left = '0.0 0.5 0'
block_id = 1
top_right = '3.0 1.0 0'
input = gmg
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'master0_interface'
input = subdomain1
[]
[break_boundary]
type = BreakBoundaryOnSubdomainGenerator
input = interface
[]
[]
[Variables]
[./vel_x]
block = 0
[../]
[./vel_y]
block = 0
[../]
[./p]
block = 0
[../]
[./disp_x]
[../]
[./disp_y]
[../]
[./vel_x_solid]
block = 1
[../]
[./vel_y_solid]
block = 1
[../]
[]
[Kernels]
[./vel_x_time]
type = INSMomentumTimeDerivative
variable = vel_x
block = 0
[../]
[./vel_y_time]
type = INSMomentumTimeDerivative
variable = vel_y
block = 0
[../]
[./mass]
type = INSMass
variable = p
u = vel_x
v = vel_y
pressure = p
block = 0
disp_x = disp_x
disp_y = disp_y
[../]
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
block = 0
disp_x = disp_x
disp_y = disp_y
[../]
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
block = 0
disp_x = disp_x
disp_y = disp_y
[../]
[./vel_x_mesh]
type = ConvectedMesh
disp_x = disp_x
disp_y = disp_y
variable = vel_x
u = vel_x
v = vel_y
pressure = p
block = 0
[../]
[./vel_y_mesh]
type = ConvectedMesh
disp_x = disp_x
disp_y = disp_y
variable = vel_y
u = vel_x
v = vel_y
pressure = p
block = 0
[../]
[./p_mesh]
type = ConvectedMeshPSPG
disp_x = disp_x
disp_y = disp_y
variable = p
u = vel_x
v = vel_y
pressure = p
block = 0
[../]
[./disp_x_fluid]
type = Diffusion
variable = disp_x
block = 0
use_displaced_mesh = false
[../]
[./disp_y_fluid]
type = Diffusion
variable = disp_y
block = 0
use_displaced_mesh = false
[../]
[./accel_tensor_x]
type = CoupledTimeDerivative
variable = disp_x
v = vel_x_solid
block = 1
use_displaced_mesh = false
[../]
[./accel_tensor_y]
type = CoupledTimeDerivative
variable = disp_y
v = vel_y_solid
block = 1
use_displaced_mesh = false
[../]
[./vxs_time_derivative_term]
type = CoupledTimeDerivative
variable = vel_x_solid
v = disp_x
block = 1
use_displaced_mesh = false
[../]
[./vys_time_derivative_term]
type = CoupledTimeDerivative
variable = vel_y_solid
v = disp_y
block = 1
use_displaced_mesh = false
[../]
[./source_vxs]
type = MatReaction
variable = vel_x_solid
block = 1
reaction_rate = 1
use_displaced_mesh = false
[../]
[./source_vys]
type = MatReaction
variable = vel_y_solid
block = 1
reaction_rate = 1
use_displaced_mesh = false
[../]
[]
[InterfaceKernels]
[./penalty_interface_x]
type = CoupledPenaltyInterfaceDiffusion
variable = vel_x
neighbor_var = disp_x
secondary_coupled_var = vel_x_solid
boundary = master0_interface
penalty = 1e6
[../]
[./penalty_interface_y]
type = CoupledPenaltyInterfaceDiffusion
variable = vel_y
neighbor_var = disp_y
secondary_coupled_var = vel_y_solid
boundary = master0_interface
penalty = 1e6
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./solid_domain]
strain = SMALL
incremental = false
# generate_output = 'strain_xx strain_yy strain_zz' ## Not at all necessary, but nice
block = '1'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e2
poissons_ratio = 0.3
block = '1'
use_displaced_mesh = false
[../]
[./small_stress]
type = ComputeLinearElasticStress
block = 1
[../]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '1 1'
use_displaced_mesh = false
[../]
[]
[BCs]
[./fluid_x_no_slip]
type = DirichletBC
variable = vel_x
boundary = 'bottom'
value = 0.0
[../]
[./fluid_y_no_slip]
type = DirichletBC
variable = vel_y
boundary = 'bottom left_to_0'
value = 0.0
[../]
[./x_inlet]
type = FunctionDirichletBC
variable = vel_x
boundary = 'left_to_0'
function = 'inlet_func'
[../]
[./no_disp_x]
type = DirichletBC
variable = disp_x
boundary = 'bottom top left_to_1 right_to_1 left_to_0 right_to_0'
value = 0
[../]
[./no_disp_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom top left_to_1 right_to_1 left_to_0 right_to_0'
value = 0
[../]
[./solid_x_no_slip]
type = DirichletBC
variable = vel_x_solid
boundary = 'top left_to_1 right_to_1'
value = 0.0
[../]
[./solid_y_no_slip]
type = DirichletBC
variable = vel_y_solid
boundary = 'top left_to_1 right_to_1'
value = 0.0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
num_steps = 5
# num_steps = 60
dt = 0.1
dtmin = 0.1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = none
nl_rel_tol = 1e-50
nl_abs_tol = 1e-10
[]
[Outputs]
[./out]
type = Exodus
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '(-16 * (y - 0.25)^2 + 1) * (1 + cos(t))'
[../]
[]
(modules/phase_field/examples/interfacekernels/interface_gradient.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 50
ny = 50
[]
[./box1]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '0.51 1 0'
[../]
[./box2]
input = box1
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '0.49 0 0'
top_right = '1 1 0'
[../]
[./iface]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = 10
input = box2
[../]
[./rotate]
type = TransformGenerator
transform = ROTATE
vector_value = '5 0 0'
input = iface
[../]
[]
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Variables]
[./u]
block = 1
[./InitialCondition]
type = FunctionIC
function = 'r:=sqrt((x-0.4)^2+(y-0.5)^2);if(r<0.05,5,1)'
[../]
[../]
[./v]
block = 2
initial_condition = 0.8
[../]
[]
[Kernels]
[./u_diff]
type = Diffusion
variable = u
block = 1
[../]
[./u_dt]
type = TimeDerivative
variable = u
block = 1
[../]
[./v_diff]
type = Diffusion
variable = v
block = 2
[../]
[./v_dt]
type = TimeDerivative
variable = v
block = 2
[../]
[]
[InterfaceKernels]
[./flux_continuity]
type = InterfaceDiffusionFluxMatch
variable = u
boundary = 10
neighbor_var = v
[../]
[./diffusion_surface_term]
type = InterfaceDiffusionBoundaryTerm
boundary = 10
variable = u
neighbor_var = v
[../]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 0.001
num_steps = 20
[]
[Outputs]
[./out]
type = Exodus
use_problem_dimension = false
[../]
print_linear_residuals = false
[]
(test/tests/interfacekernels/3d_interface/coupled_value_coupled_flux.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 2
xmax = 2
ny = 2
ymax = 2
nz = 2
zmax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 1'
block_id = 1
[../]
[./break_boundary]
input = subdomain1
type = BreakBoundaryOnSubdomainGenerator
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./v]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[../]
[./source_u]
type = BodyForce
variable = u
value = 1
[../]
[]
[InterfaceKernels]
[./interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 back_to_0 right top front'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1 back_to_1'
[../]
[]
[Postprocessors]
[./u_int]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[../]
[./v_int]
type = ElementIntegralVariablePostprocessor
variable = v
block = 1
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
(test/tests/meshgenerators/coarsen_block_generator/coarsen_quad_multi.i)
[Mesh]
# use these two to re-generate input.e
[eg]
type = CartesianMeshGenerator
dim = 2
dx = '2 1 1'
dy = '2 3'
ix = '2 1 1'
iy = '2 3'
subdomain_id = '0 1 1
1 2 0'
[]
[add_internal]
type = SideSetsBetweenSubdomainsGenerator
input = eg
paired_block = 0
primary_block = 2
new_boundary = middle
[]
[refine]
type = RefineBlockGenerator
input = add_internal
block = '0 1 2'
refinement = '0 1 1'
enable_neighbor_refinement = false
output = true
[]
final_generator = 'diag'
[input]
type = FileMeshGenerator
file = 'single_nonuniform.e'
[]
# Go back to what we had
[coarsen]
type = CoarsenBlockGenerator
input = input
block = '0 1 2'
coarsening = '0 1 1'
# This was found by looking at the output of refine
# careful, has transitions we dont support!
starting_point = '2.75 0.75 0'
verbose = true
[]
[diag]
type = MeshDiagnosticsGenerator
input = coarsen
examine_element_overlap = ERROR
search_for_adaptivity_nonconformality = WARNING
examine_non_conformality = WARNING
[]
[]
[Outputs]
exodus = 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/postprocessors/interface_value/interface_fv_variable_value_postprocessor.i)
postprocessor_type = InterfaceAverageVariableValuePostprocessor
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 6
xmax = 3
ny = 9
ymax = 3
elem_type = QUAD4
[]
[./subdomain_id]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '2 1 0'
block_id = 1
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain_id
primary_block = '0'
paired_block = '1'
new_boundary = 'interface'
[../]
[]
[Functions]
[./fn_exact]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[./ffn]
type = ParsedFunction
expression = -4
[../]
[]
[Variables]
[./u]
family = MONOMIAL
order = CONSTANT
fv = true
[../]
[]
[FVKernels]
[./diff]
type = FVDiffusion
variable = u
coeff = 1
[../]
[./ffn]
type = FVBodyForce
variable = u
function = ffn
[../]
[]
[FVBCs]
[./all]
type = FVFunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = fn_exact
[../]
[]
[Materials]
[./stateful1]
type = GenericConstantMaterial
block = 0
prop_names = 'diffusivity'
prop_values = 10
[../]
[./stateful2]
type = GenericConstantMaterial
block = 1
prop_names = 'diffusivity'
prop_values = 4
[../]
[]
[AuxKernels]
[./diffusivity_1]
type = MaterialRealAux
property = diffusivity
variable = diffusivity_1
[]
[./diffusivity_2]
type = MaterialRealAux
property = diffusivity
variable = diffusivity_2
[]
[]
[AuxVariables]
[./diffusivity_1]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_2]
family = MONOMIAL
order = CONSTANT
[]
[]
[Postprocessors]
[./diffusivity_average]
type = ${postprocessor_type}
interface_value_type = average
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_jump_primary_secondary]
type = ${postprocessor_type}
interface_value_type = jump_primary_minus_secondary
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_jump_secondary_primary]
type = ${postprocessor_type}
interface_value_type = jump_secondary_minus_primary
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_jump_abs]
type = ${postprocessor_type}
interface_value_type = jump_abs
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_primary]
type = ${postprocessor_type}
interface_value_type = primary
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_secondary]
type = ${postprocessor_type}
interface_value_type = secondary
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_single_variable]
type = ${postprocessor_type}
interface_value_type = primary
variable = diffusivity_1
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
file_base = ${raw ${postprocessor_type} _fv}
exodus = true
[]
(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
[]
[]
(test/tests/indicators/gradient_jump_indicator/gradient_jump_indicator_fv_test.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmax = 2
nx = 2
ny = 1
subdomain_ids = '0 1'
[]
[interface_mesh]
type = SideSetsBetweenSubdomainsGenerator
input = gmg
primary_block = 0
paired_block = 1
new_boundary = interface
[]
# This creates enough elements to have defined gradients
[refine]
type = RefineBlockGenerator
input = interface_mesh
block = '0 1'
refinement = '3 3'
[]
[]
[Adaptivity]
marker = error_frac
max_h_level = 5
[Indicators]
[u0_jump]
type = GradientJumpIndicator
variable = u0
scale_by_flux_faces = false
[]
[]
[Markers]
[error_frac]
type = ErrorFractionMarker
coarsen = 0.15
indicator = u0_jump
refine = 0.7
[]
[]
[]
[Variables]
[u0]
family = MONOMIAL
order = CONSTANT
fv = true
block = 0
initial_condition = 0
[]
[u1]
family = MONOMIAL
order = CONSTANT
fv = true
block = 1
initial_condition = 0
[]
[]
[FVKernels]
[time0]
type = FVTimeKernel
variable = u0
[]
[diff0]
type = FVDiffusion
variable = u0
coeff = 1
block = 0
[]
[time1]
type = FVTimeKernel
variable = u1
[]
[diff1]
type = FVDiffusion
variable = u1
coeff = 1
block = 1
[]
[]
[FVInterfaceKernels]
[diffusion]
type = FVDiffusionInterface
variable1 = u0
variable2 = u1
boundary = interface
subdomain1 = 0
subdomain2 = 1
coeff1 = 1
coeff2 = 1
[]
[]
[FVBCs]
[left] # arbitrary user-chosen name
type = FVDirichletBC
variable = u0
boundary = 'left' # This must match a named boundary in the mesh file
value = 1
[]
[right] # arbitrary user-chosen name
type = FVNeumannBC
variable = u1
boundary = 'right' # This must match a named boundary in the mesh file
value = 0
[]
[]
[Executioner]
type = Transient
solve_type = 'Newton'
end_time = 0.5
dt = 0.1
[]
[VectorPostprocessors]
[samples]
type = LineValueSampler
variable = u0
# Avoiding element faces
start_point = '0.0001 1e-6 0'
end_point = '0.999999 1e-6 0'
num_points = 10
sort_by = 'x'
[]
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
[]
(modules/fsi/test/tests/fsi_acoustics/3D_struc_acoustic/3D_struc_acoustic.i)
# Test for `StructureAcousticInterface` interface kernel. The domain is 3D with lengths
# 10 X 0.1 X 0.1 meters. The fluid domain is on the right and the structural domain
# is on the left. Fluid end is subjected to a 250Hz sine wave with a single peak.
# Structural domain has the same material properties as the fluid. Interface between
# structure and fluid is located at 5.0m in the x-direction. Fluid pressure is recorded
# at (5, 0.05, 0.05). Structural stress is also recorded at the same location. Fluid
# pressure and structural stress should be almost equal and opposite to each other.
#
# Input parameters:
# Dimensions = 3
# Lengths = 10 X 0.1 X 0.1 meters
# Fluid speed of sound = 1500 m/s
# Fluid density = 1e-6 Giga kg/m^3
# Structural bulk modulus = 2.25 GPa
# Structural shear modulus = 0 GPa
# Structural density = 1e-6 Giga kg/m^3
# Fluid domain = true
# Fluid BC = single peak sine wave applied as a pressure on the fluid end
# Structural domain = true
# Structural BC = Neumann BC with value zero applied on the structural end.
# Fluid-structure interface location = 5.0m along the x-direction
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 100
ny = 1
nz = 1
xmax = 10
ymax = 0.1
zmax = 0.1
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '5.0 0.0 0.0'
block_id = 1
top_right = '10.0 0.1 0.1'
[../]
[./interface1]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = 1
paired_block = 0
new_boundary = 'interface1'
[../]
[]
[GlobalParams]
[]
[Variables]
[./p]
block = 1
[../]
[./disp_x]
block = 0
[../]
[./disp_y]
block = 0
[../]
[./disp_z]
block = 0
[../]
[]
[AuxVariables]
[./vel_x]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./accel_x]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./vel_y]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./accel_y]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./vel_z]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./accel_z]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[]
[Kernels]
[./diffusion]
type = Diffusion
variable = 'p'
block = 1
[../]
[./inertia]
type = AcousticInertia
variable = p
block = 1
[../]
[./DynamicTensorMechanics]
displacements = 'disp_x disp_y disp_z'
block = 0
[../]
[./inertia_x]
type = InertialForce
variable = disp_x
block = 0
[../]
[./inertia_y]
type = InertialForce
variable = disp_y
block = 0
[../]
[./inertia_z]
type = InertialForce
variable = disp_z
block = 0
[../]
[]
[AuxKernels]
[./accel_x]
type = TestNewmarkTI
displacement = disp_x
variable = accel_x
first = false
block = 0
[../]
[./vel_x]
type = TestNewmarkTI
displacement = disp_x
variable = vel_x
block = 0
[../]
[./accel_y]
type = TestNewmarkTI
displacement = disp_y
variable = accel_y
first = false
block = 0
[../]
[./vel_y]
type = TestNewmarkTI
displacement = disp_y
variable = vel_y
block = 0
[../]
[./accel_z]
type = TestNewmarkTI
displacement = disp_z
variable = accel_z
first = false
block = 0
[../]
[./vel_z]
type = TestNewmarkTI
displacement = disp_z
variable = vel_z
block = 0
[../]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
block = 0
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
block = 0
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
block = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
block = 0
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
block = 0
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
block = 0
[../]
[]
[InterfaceKernels]
[./interface1]
type = StructureAcousticInterface
variable = p
neighbor_var = disp_x
boundary = 'interface1'
D = 1e-6
component = 0
[../]
[./interface2]
type = StructureAcousticInterface
variable = p
neighbor_var = disp_y
boundary = 'interface1'
D = 1e-6
component = 1
[../]
[./interface3]
type = StructureAcousticInterface
variable = p
neighbor_var = disp_z
boundary = 'interface1'
D = 1e-6
component = 2
[../]
[]
[BCs]
[./bottom_accel]
type = FunctionDirichletBC
variable = p
boundary = 'right'
function = accel_bottom
[../]
[./disp_x1]
type = NeumannBC
boundary = 'left'
variable = disp_x
value = 0.0
[../]
[./disp_y1]
type = NeumannBC
boundary = 'left'
variable = disp_y
value = 0.0
[../]
[./disp_z1]
type = NeumannBC
boundary = 'left'
variable = disp_z
value = 0.0
[../]
[]
[Functions]
[./accel_bottom]
type = PiecewiseLinear
data_file = ../1D_struc_acoustic/Input_1Peak_highF.csv
scale_factor = 1e-2
format = 'columns'
[../]
[]
[Materials]
[./co_sq]
type = GenericConstantMaterial
prop_names = inv_co_sq
prop_values = 4.44e-7
block = '1'
[../]
[./density0]
type = GenericConstantMaterial
block = 0
prop_names = density
prop_values = 1e-6
[../]
[./elasticity_base]
type = ComputeIsotropicElasticityTensor
bulk_modulus = 2.25
shear_modulus = 0.0
block = 0
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
start_time = 0.0
end_time = 0.005
dt = 0.0001
dtmin = 0.00001
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
l_tol = 1e-8
l_max_its = 25
timestep_tolerance = 1e-8
automatic_scaling = true
[TimeIntegrator]
type = NewmarkBeta
[]
[]
[Postprocessors]
[./p1]
type = PointValue
point = '5.0 0.05 0.05'
variable = p
[../]
[./stress_xx]
type = PointValue
point = '5.0 0.05 0.05'
variable = stress_xx
[../]
[]
[Outputs]
csv = true
perf_graph = true
print_linear_residuals = true
[]
(modules/electromagnetics/test/tests/interfacekernels/electrostatic_contact/analytic_solution_test_two_block.i)
# Regression test for ElectrostaticContactCondition with analytic solution with
# two blocks
#
# dim = 1D
# X = [0,2]
# Interface at X = 1
#
# stainless_steel graphite
# +------------------+------------------+
#
# Left BC: Potential = 1
# Right BC: Potential = 0
# Center Interface: ElectrostaticContactCondition
#
[Mesh]
[line]
type = GeneratedMeshGenerator
dim = 1
nx = 4
xmax = 2
[]
[break]
type = SubdomainBoundingBoxGenerator
input = line
block_id = 1
block_name = 'graphite'
bottom_left = '1 0 0'
top_right = '2 0 0'
[]
[block_rename]
type = RenameBlockGenerator
input = break
old_block = 0
new_block = 'stainless_steel'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = block_rename
primary_block = 'stainless_steel'
paired_block = 'graphite'
new_boundary = 'ssg_interface'
[]
[]
[Variables]
[potential_graphite]
block = graphite
[]
[potential_stainless_steel]
block = stainless_steel
[]
[]
[AuxVariables]
[analytic_potential_stainless_steel]
block = stainless_steel
[]
[analytic_potential_graphite]
block = graphite
[]
[]
[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
[]
[]
[AuxKernels]
[analytic_function_aux_stainless_steel]
type = FunctionAux
function = potential_fxn_stainless_steel
variable = analytic_potential_stainless_steel
block = stainless_steel
[]
[analytic_function_aux_graphite]
type = FunctionAux
function = potential_fxn_graphite
variable = analytic_potential_graphite
block = graphite
[]
[]
[BCs]
[elec_left]
type = ADDirichletBC
variable = potential_stainless_steel
boundary = left
value = 1
[]
[elec_right]
type = ADDirichletBC
variable = potential_graphite
boundary = right
value = 0
[]
[]
[InterfaceKernels]
[electric_contact_conductance_ssg]
type = ElectrostaticContactCondition
variable = potential_stainless_steel
neighbor_var = potential_graphite
boundary = ssg_interface
mean_hardness = mean_hardness
mechanical_pressure = 3000
[]
[]
[Materials]
#graphite (at 300 K)
[sigma_graphite]
type = ADGenericConstantMaterial
prop_names = electrical_conductivity
prop_values = 73069.2
block = graphite
[]
#stainless_steel (at 300 K)
[sigma_stainless_steel]
type = ADGenericConstantMaterial
prop_names = electrical_conductivity
prop_values = 1.41867e6
block = stainless_steel
[]
# harmonic mean of graphite and stainless steel hardness
[mean_hardness]
type = ADGenericConstantMaterial
prop_names = mean_hardness
prop_values = 2.4797e9
[]
[]
[Functions]
[potential_fxn_stainless_steel]
type = ElectricalContactTestFunc
domain = stainless_steel
[]
[potential_fxn_graphite]
type = ElectricalContactTestFunc
domain = graphite
[]
[]
[Postprocessors]
[error_stainless_steel]
type = ElementL2Error
variable = potential_stainless_steel
function = potential_fxn_stainless_steel
block = stainless_steel
[]
[error_graphite]
type = ElementL2Error
variable = potential_graphite
function = potential_fxn_graphite
block = graphite
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = true
[]
[Outputs]
csv = true
perf_graph = true
[]
(test/tests/postprocessors/interface_diffusive_flux/interface_diffusive_flux_fv.i)
postprocessor_type = InterfaceDiffusiveFluxAverage
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 6
xmax = 3
ny = 9
ymax = 3
elem_type = QUAD4
[]
[subdomain_id]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '2 1 0'
block_id = 1
[]
[interface]
input = subdomain_id
type = SideSetsBetweenSubdomainsGenerator
primary_block = '1'
paired_block = '0'
new_boundary = 'interface'
[]
[]
[Functions]
[fn_exact]
type = ParsedFunction
expression = 'x*x+y*y'
[]
[]
[Variables]
[u]
type = MooseVariableFVReal
block = 0
[]
[v]
type = MooseVariableFVReal
block = 1
[]
[]
[FVKernels]
[diff_u]
type = FVDiffusion
variable = u
coeff = 1
[]
[body_u]
type = FVBodyForce
variable = u
function = 1
[]
[diff_v]
type = FVDiffusion
variable = v
coeff = 1
[]
[body_v]
type = FVBodyForce
variable = v
function = -1
[]
[]
[FVInterfaceKernels]
[reaction]
type = FVDiffusionInterface
variable1 = u
variable2 = v
coeff1 = 1
coeff2 = 2
boundary = 'interface'
subdomain1 = '0'
subdomain2 = '1'
coeff_interp_method = average
[]
[]
[FVBCs]
[all]
type = FVFunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = fn_exact
[]
[]
[Postprocessors]
[diffusive_flux]
type = ${postprocessor_type}
variable = v
neighbor_variable = u
diffusivity = 1
execute_on = TIMESTEP_END
boundary = 'interface'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
file_base = '${raw ${postprocessor_type} _fv}'
exodus = true
[]
(test/tests/interfacekernels/2d_interface/coupled_value_coupled_flux.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./break_boundary]
input = interface
type = BreakBoundaryOnSubdomainGenerator
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./v]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[../]
[./source_u]
type = BodyForce
variable = u
value = 1
[../]
[]
[InterfaceKernels]
[./interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 right top'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1'
[../]
[]
[Postprocessors]
[./u_int]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[../]
[./v_int]
type = ElementIntegralVariablePostprocessor
variable = v
block = 1
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/block_restriction/segregated/2d-segregated-block.i)
mu = 1.1
rho = 1.1
advected_interp_method = 'average'
velocity_interp_method = 'rc'
pressure_tag = "pressure_grad"
restricted_blocks = '1'
[Mesh]
parallel_type = 'replicated'
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '1 1'
dy = '1'
ix = '7 7'
iy = 10
subdomain_id = '1 2'
[]
[mid]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
input = mesh
new_boundary = 'middle'
[]
[break_top]
type = PatchSidesetGenerator
boundary = 'top'
n_patches = 2
input = mid
[]
[break_bottom]
type = PatchSidesetGenerator
boundary = 'bottom'
n_patches = 2
input = break_top
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[Problem]
nl_sys_names = 'u_system v_system pressure_system energy_system scalar_system'
previous_nl_solution_required = true
kernel_coverage_check = false
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolatorSegregated
u = vel_x
v = vel_y
pressure = pressure
block = ${restricted_blocks}
[]
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
initial_condition = 1.0
solver_sys = u_system
two_term_boundary_expansion = false
block = ${restricted_blocks}
[]
[vel_y]
type = INSFVVelocityVariable
initial_condition = 0.0
solver_sys = v_system
two_term_boundary_expansion = false
block = ${restricted_blocks}
[]
[pressure]
type = INSFVPressureVariable
solver_sys = pressure_system
initial_condition = 0.2
two_term_boundary_expansion = false
block = ${restricted_blocks}
[]
[T_fluid]
type = INSFVEnergyVariable
initial_condition = 300
solver_sys = energy_system
two_term_boundary_expansion = false
block = ${restricted_blocks}
[]
[scalar]
type = INSFVScalarFieldVariable
block = ${restricted_blocks}
solver_sys = scalar_system
[]
[]
[FVKernels]
[u_advection]
type = INSFVMomentumAdvection
variable = vel_x
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = vel_x
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = vel_x
momentum_component = 'x'
pressure = pressure
extra_vector_tags = ${pressure_tag}
[]
[v_advection]
type = INSFVMomentumAdvection
variable = vel_y
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = vel_y
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = vel_y
momentum_component = 'y'
pressure = pressure
extra_vector_tags = ${pressure_tag}
[]
[p_diffusion]
type = FVAnisotropicDiffusion
variable = pressure
coeff = "Ainv"
coeff_interp_method = 'average'
[]
[p_source]
type = FVDivergence
variable = pressure
vector_field = "HbyA"
force_boundary_execution = true
[]
[energy_advection]
type = INSFVEnergyAdvection
variable = T_fluid
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
boundaries_to_force = 'bottom_0'
[]
[energy_diffusion]
type = FVDiffusion
coeff = 1.1
variable = T_fluid
[]
[energy_loss]
type = FVBodyForce
variable = T_fluid
value = -0.1
[]
[scalar_advection]
type = INSFVScalarFieldAdvection
variable = scalar
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
boundaries_to_force = 'bottom_0'
[]
[scalar_diffusion]
type = FVDiffusion
coeff = 1.0
variable = scalar
[]
[scalar_src]
type = FVBodyForce
variable = scalar
value = 0.1
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = vel_x
function = '1.0'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = vel_y
function = '0.0'
[]
[walls-u]
type = INSFVNoSlipWallBC
boundary = 'top_0'
variable = vel_x
function = 0.0
[]
[walls-v]
type = INSFVNoSlipWallBC
boundary = 'top_0'
variable = vel_y
function = 0.0
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'middle'
variable = pressure
function = 0
[]
[inlet_t]
type = FVDirichletBC
boundary = 'left'
variable = T_fluid
value = 1
[]
[outlet_scalar]
type = FVDirichletBC
boundary = 'middle'
variable = scalar
value = 1
[]
[symmetry-u]
type = INSFVSymmetryVelocityBC
boundary = 'bottom_0'
variable = vel_x
u = vel_x
v = vel_y
mu = ${mu}
momentum_component = 'x'
[]
[symmetry-v]
type = INSFVSymmetryVelocityBC
boundary = 'bottom_0'
variable = vel_y
u = vel_x
v = vel_y
mu = ${mu}
momentum_component = 'y'
[]
[symmetry-p]
type = INSFVSymmetryPressureBC
boundary = 'bottom_0'
variable = pressure
[]
[]
[Executioner]
type = SIMPLENonlinearAssembly
momentum_l_abs_tol = 1e-12
pressure_l_abs_tol = 1e-12
energy_l_abs_tol = 1e-12
passive_scalar_l_abs_tol = 1e-12
momentum_l_tol = 0
pressure_l_tol = 0
energy_l_tol = 0
passive_scalar_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
energy_system = 'energy_system'
passive_scalar_systems = 'scalar_system'
pressure_gradient_tag = ${pressure_tag}
momentum_equation_relaxation = 0.8
pressure_variable_relaxation = 0.3
energy_equation_relaxation = 0.99
passive_scalar_equation_relaxation = 0.99
num_iterations = 100
pressure_absolute_tolerance = 1e-9
momentum_absolute_tolerance = 1e-9
energy_absolute_tolerance = 1e-9
passive_scalar_absolute_tolerance = 1e-9
print_fields = false
[]
[FunctorMaterials]
[const_functor]
type = ADGenericFunctorMaterial
prop_names = 'cp'
prop_values = '2'
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
rho = ${rho}
temperature = 'T_fluid'
block = ${restricted_blocks}
[]
[]
[Outputs]
exodus = true
csv = false
perf_graph = false
print_nonlinear_residuals = false
print_linear_residuals = true
[]
(modules/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
[../]
[]
(test/tests/interfacekernels/2d_interface/coupled_value_coupled_flux_with_jump_material.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
[./subdomain1]
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
input = gen
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./break_boundary]
input = interface
type = BreakBoundaryOnSubdomainGenerator
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./v]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[../]
[./source_u]
type = BodyForce
variable = u
value = 1
[../]
[]
[InterfaceKernels]
[./interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
jump_prop_name = jump
[../]
[]
[Materials]
[./jump]
type = JumpInterfaceMaterial
var = u
neighbor_var = v
boundary = primary0_interface
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 right top'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1'
[../]
[]
[Postprocessors]
[./u_int]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[../]
[./v_int]
type = ElementIntegralVariablePostprocessor
variable = v
block = 1
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
(test/tests/tag/tag_interface_kernels.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 2
xmax = 2
ny = 2
ymax = 2
nz = 2
zmax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 1'
block_id = 1
[../]
[./break_boundary]
input = subdomain1
type = BreakBoundaryOnSubdomainGenerator
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./v]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1'
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1'
[../]
[./source_u]
type = BodyForce
variable = u
value = 1
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1 vec_tag2'
[../]
[]
[InterfaceKernels]
[./interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1 vec_tag2'
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 back_to_0 right top front'
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1 back_to_1'
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1'
[../]
[]
[AuxVariables]
[./tag_variable1]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./tag_variable2]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[AuxKernels]
[./TagVectorAux1]
type = TagVectorAux
variable = tag_variable1
v = u
block = 0
vector_tag = vec_tag2
execute_on = timestep_end
[../]
[./TagVectorAux2]
type = TagMatrixAux
variable = tag_variable2
v = v
block = 1
matrix_tag = mat_tag2
execute_on = timestep_end
[../]
[]
[Postprocessors]
[./u_int]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[../]
[./v_int]
type = ElementIntegralVariablePostprocessor
variable = v
block = 1
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Problem]
type = TagTestProblem
test_tag_vectors = 'nontime residual vec_tag1 vec_tag2'
test_tag_matrices = 'mat_tag1 mat_tag2'
extra_tag_matrices = 'mat_tag1 mat_tag2'
extra_tag_vectors = 'vec_tag1 vec_tag2'
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/natural_convection/fuel_cavity.i)
# ========================================================================
# The purpose of this MOOSE scripts is to solve a 2-D axisymmetric
# problem with the following details:
# ------------------------------------------------------------------
# Physics: natural convection through a fluid and heat conduction
# in a solid and there is convective heat transfer from the
# solid to the liquid.
# ------------------------------------------------------------------
# Materials: the fluid is water and the solid is not specified.
# ------------------------------------------------------------------
# BCS: Inlet and outlet pressure with value of 0
# noslip conditions on the walls.
# Heat flux on the left wall with value of 40000 W/m^2
# ========================================================================
# ========================================================================
# Dimensions & Physical properties
# ========================================================================
Domain_length = 121.92e-2 # m
Solid_width = 0.7112e-3 # m
Liquid_width = 0.56261e-2 # m
mu = 0.00053157
rho = 987.27
k = 0.64247
k_solid = 15.0
cp = 4181.8
alpha_b = 210e-6
T_init = 300.0
input_heat_flux = 40000.0
# ========================================================================
# The main body of the script
# ========================================================================
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
#dx = '0.7032625e-4 0.7112e-5'
dx = '${Liquid_width} ${Solid_width}'
ix = '10 3'
dy = '${fparse 1./5.*Domain_length} ${fparse 4./5.*Domain_length}'
iy = '30 10'
subdomain_id = '0 1
0 1'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'cmg'
primary_block = 0
paired_block = 1
new_boundary = 'interface'
[]
[fluid_side]
type = BreakBoundaryOnSubdomainGenerator
input = 'interface'
boundaries = 'top bottom'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
advected_interp_method = 'upwind'
velocity_interp_method = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = vel_x
v = vel_y
block = 0
pressure = pressure
[]
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
block = 0
initial_condition = 1e-6
[]
[vel_y]
type = INSFVVelocityVariable
block = 0
initial_condition = 1e-6
[]
[pressure]
type = INSFVPressureVariable
block = 0
[]
[T]
type = INSFVEnergyVariable
block = 0
initial_condition = ${T_init}
scaling = 1e-5
[]
[Ts]
type = INSFVEnergyVariable
block = 1
initial_condition = ${T_init}
scaling = 1e-3
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
rho = ${rho}
[]
[u_time]
type = INSFVMomentumTimeDerivative
variable = vel_x
rho = ${rho}
momentum_component = 'x'
[]
[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_buoyancy]
type = INSFVMomentumBoussinesq
variable = vel_x
T_fluid = T
gravity = '0 -9.81 0'
rho = ${rho}
ref_temperature = ${T_init}
momentum_component = 'x'
#alpha_name = ${alpha_b}
[]
[v_time]
type = INSFVMomentumTimeDerivative
variable = vel_y
rho = ${rho}
momentum_component = 'y'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = vel_y
rho = ${rho}
momentum_component = 'y'
#alpha_name = ${alpha_b}
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = vel_y
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = vel_y
momentum_component = 'y'
pressure = pressure
[]
[v_buoyancy]
type = INSFVMomentumBoussinesq
variable = vel_y
T_fluid = T
gravity = '0 -9.81 0'
rho = ${rho}
ref_temperature = ${T_init}
momentum_component = 'y'
[]
[temp_time]
type = INSFVEnergyTimeDerivative
variable = T
rho = '${rho}'
dh_dt = dh_dt
[]
[temp_conduction]
type = FVDiffusion
coeff = 'k'
variable = T
[]
[temp_advection]
type = INSFVEnergyAdvection
variable = T
[]
[Ts_time]
type = INSFVEnergyTimeDerivative
variable = Ts
rho = '${rho}'
dh_dt = dh_solid_dt
[]
[solid_temp_conduction]
type = FVDiffusion
coeff = 'k_solid'
variable = Ts
[]
[]
[FVInterfaceKernels]
[convection]
type = FVConvectionCorrelationInterface
variable1 = T
variable2 = Ts
boundary = 'interface'
h = htc
T_solid = Ts
T_fluid = T
subdomain1 = 0
subdomain2 = 1
wall_cell_is_bulk = true
[]
[]
[FVBCs]
[walls_u]
type = INSFVNoSlipWallBC
variable = vel_x
boundary = 'interface left bottom_to_0'
function = 0
[]
[walls_v]
type = INSFVNoSlipWallBC
variable = vel_y
boundary = 'interface left bottom_to_0'
function = 0
[]
[outlet]
type = INSFVOutletPressureBC
variable = pressure
boundary = 'top_to_0'
function = 0.0
[]
[outlet_T]
type = NSFVOutflowTemperatureBC
variable = T
boundary = 'top_to_0'
u = vel_x
v = vel_y
rho = ${rho}
cp = '${cp}'
backflow_T = ${T_init}
[]
[Insulator]
type = FVNeumannBC
variable = 'T'
boundary = 'left'
value = 0.0
[]
[heater]
type = FVNeumannBC
variable = 'Ts'
boundary = 'right'
value = '${fparse input_heat_flux}'
[]
[Insulator_solid]
type = FVNeumannBC
variable = 'Ts'
boundary = 'top_to_1'
value = 0.0
[]
[inlet_T_1]
type = FVDirichletBC
variable = Ts
boundary = 'bottom_to_1'
value = ${T_init}
[]
[]
[AuxVariables]
[Ra]
type = INSFVScalarFieldVariable
initial_condition = 1000.0
[]
[htc]
type = INSFVScalarFieldVariable
initial_condition = 0.0
[]
[]
[AuxKernels]
[compute_Ra]
type = ParsedAux
variable = Ra
coupled_variables = 'T'
constant_names = 'g beta T_init width nu alpha'
constant_expressions = '9.81 ${alpha_b} ${T_init} ${Liquid_width} ${fparse mu/rho} ${fparse k/(rho*cp)}'
expression = 'g * beta * (T - T_init) * pow(width, 3) / (nu*alpha) + 1.0'
block = 0
[]
[htc]
type = ParsedAux
variable = htc
coupled_variables = 'Ra'
constant_names = 'Pr'
constant_expressions = '${fparse cp*mu/k}'
expression = '${k}* (0.68 + 0.67 * pow(Ra, 0.25)/pow(1 + pow(0.437/Pr, 9/16) ,4/9) )/ ${Liquid_width} '
block = 0
[]
[]
[FunctorMaterials]
[functor_constants]
type = ADGenericFunctorMaterial
prop_names = 'cp k k_solid'
prop_values = '${cp} ${k} ${k_solid}'
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = 'T'
rho = ${rho}
block = 0
[]
[ins_fv_solid]
type = INSFVEnthalpyFunctorMaterial
temperature = 'Ts'
rho = ${rho}
cp = ${cp}
h = h_solid
rho_h = rho_h_solid
block = 1
[]
[const_functor]
type = ADGenericFunctorMaterial
prop_names = 'alpha_b'
prop_values = '${alpha_b}'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -sub_pc_factor_shift_type -ksp_gmres_restart'
petsc_options_value = ' lu NONZERO 200'
line_search = 'none'
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.01
optimal_iterations = 20
iteration_window = 2
[]
nl_max_its = 30
nl_abs_tol = 1e-10
steady_state_detection = true
steady_state_tolerance = 1e-09
[]
[Postprocessors]
[max_T]
type = ADElementExtremeFunctorValue
functor = T
block = 0
[]
[max_Ts]
type = ADElementExtremeFunctorValue
functor = Ts
block = 1
[]
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/materials/functor_conversion/conversion.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
initial_condition = 2
[]
[]
[AuxVariables]
[v]
order = FIRST
family = MONOMIAL
initial_condition = 3
[]
[]
[Functions]
[f1]
type = ParsedFunction
expression = '2 + x'
[]
[]
[FunctorMaterials]
[block0]
type = GenericFunctorMaterial
block = '0'
prop_names = 'D D_block0'
prop_values = '4 3'
[]
[block1]
type = GenericFunctorMaterial
block = '1'
prop_names = 'D'
prop_values = '2'
[]
[]
[Materials]
[convert_to_reg]
type = MaterialFunctorConverter
functors_in = 'D f1 u v'
reg_props_out = 'm1 m2 m3 m4'
outputs = 'exo'
[]
[convert_to_ad]
type = MaterialFunctorConverter
functors_in = 'D f1 u v'
ad_props_out = 'm1a m2a m3a m4a'
outputs = 'exo'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Problem]
solve = false
[]
[Outputs]
[exo]
type = Exodus
hide = 'u v'
[]
[]
(modules/thermal_hydraulics/test/tests/userobjects/layered_flow_area_change/layered_flow_area_2D.i)
[Mesh]
[generated]
type = CartesianMeshGenerator
dim = 2
dx = '1 1 1'
dy = '4'
ix = '1 1 1'
iy = '40'
subdomain_id = '1 2 1'
[]
[interior_walls]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = interior
input = generated
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[disp_x]
[]
[disp_y]
[]
[channel_dA]
[]
[]
[ICs]
[disp_x_ic]
type = FunctionIC
variable = disp_x
function = 'if (x < 1.5, 0.5 * (y - 2) * 0.1, 0)'
[]
[]
[AuxKernels]
[channel_dA_aux]
type = SpatialUserObjectAux
variable = channel_dA
user_object = layered_area_change
[]
[]
[UserObjects]
[layered_area_change]
type = LayeredFlowAreaChange
direction = y
displacements = 'disp_x disp_y'
boundary = interior
num_layers = 40
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(test/tests/fvkernels/block-restriction/just-mat-blk-restriction.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 50
xmax = 4
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '2.0 0 0'
block_id = 1
top_right = '4.0 1.0 0'
[]
[left_right]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'left_right'
[]
[right_left]
input = left_right
type = SideSetsBetweenSubdomainsGenerator
primary_block = '1'
paired_block = '0'
new_boundary = 'right_left'
[]
[]
[Variables]
[fv]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 1
[]
[]
[FVKernels]
[diff]
type = FVDiffusion
variable = fv
coeff = diff
coeff_interp_method = average
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = fv
boundary = left
value = 0
[]
[right]
type = FVDirichletBC
variable = fv
boundary = right
value = 1
[]
[]
[Materials]
[left]
type = ADGenericFunctorMaterial
prop_names = 'diff'
prop_values = '1'
block = 0
[]
[right]
type = ADGenericFunctorMaterial
prop_names = 'diff'
prop_values = '2'
block = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
line_search = 'none'
[]
[Outputs]
exodus = true
[]
(test/tests/interfacekernels/ik_displaced/displaced.i)
[Mesh]
displacements = 'disp_x disp_y'
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./break_boundary]
input = interface
type = BreakBoundaryOnSubdomainGenerator
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./v]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[../]
[./source_u]
type = BodyForce
variable = u
value = 1
[../]
[]
[InterfaceKernels]
[./interface]
type = InterfacialSource
variable = u
neighbor_var = v
boundary = primary0_interface
use_displaced_mesh = true
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 right top'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1'
[../]
[]
[Postprocessors]
[./u_int]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[../]
[./v_int]
type = ElementIntegralVariablePostprocessor
variable = v
block = 1
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
file_base = displaced
exodus = true
[]
[Functions]
[./disp_x_func]
type = ParsedFunction
expression = x
[../]
[./disp_y_func]
type = ParsedFunction
expression = y
[../]
[]
[ICs]
[./disp_x_ic]
function = disp_x_func
variable = disp_x
type = FunctionIC
[../]
[./disp_y_ic]
function = disp_y_func
variable = disp_y
type = FunctionIC
[../]
[]
(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/interfacekernels/adaptivity/adaptivity.i)
# This input file is used for two tests:
# 1) Check that InterfaceKernels work with mesh adaptivity
# 2) Error out when InterfaceKernels are used with adaptivity
# and stateful material prpoerties
[Mesh]
parallel_type = 'replicated'
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0.5 0 0'
top_right = '1 1 0'
block_id = 1
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./break_boundary]
input = interface
type = BreakBoundaryOnSubdomainGenerator
[../]
[]
[Variables]
[./u]
[./InitialCondition]
type = ConstantIC
value = 1
[../]
block = 0
[../]
[./u_neighbor]
[./InitialCondition]
type = ConstantIC
value = 1
[../]
block = 1
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = (x*x*x)-6.0*x
[../]
[./bc_fn]
type = ParsedFunction
expression = (x*x*x)
[../]
[]
[Kernels]
[./diff]
type = MatDiffusionTest
variable = u
prop_name = diffusivity
block = 0
[../]
[./abs]
type = Reaction
variable = u
block = 0
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
block = 0
[../]
[./diffn]
type = MatDiffusionTest
variable = u_neighbor
prop_name = diffusivity
block = 1
[../]
[./absn]
type = Reaction
variable = u_neighbor
block = 1
[../]
[./forcingn]
type = BodyForce
variable = u_neighbor
function = forcing_fn
block = 1
[../]
[]
[InterfaceKernels]
[./flux_match]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = u_neighbor
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = FunctionDirichletBC
variable = u
boundary = 'left'
function = bc_fn
[../]
[./u_neighbor]
type = FunctionDirichletBC
variable = u_neighbor
boundary = 'right'
function = bc_fn
[../]
[]
[Materials]
active = 'constant'
[./stateful]
type = StatefulTest
prop_names = 'diffusivity'
prop_values = '1'
block = '0 1'
[../]
[./constant]
type = GenericConstantMaterial
prop_names = 'diffusivity'
prop_values = '1'
block = '0 1'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Adaptivity]
marker = 'marker'
steps = 1
[./Markers]
[./marker]
type = BoxMarker
bottom_left = '0 0 0'
top_right = '1 1 0'
inside = refine
outside = coarsen
[../]
[../]
[]
[Outputs]
exodus = true
[]
(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'
[]
[]
(test/tests/transfers/general_field/shape_evaluation/boundary/main.i)
# Base input for testing transfers. It has the following complexities:
# - more than one subapp
# - transfers both from and to the subapps
# - both nodal and elemental variables
# - subapp meshes are not aligned with the main app
# Tests derived from this input may add complexities through command line arguments
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 5
ny = 5
nz = 5
[]
[add_block]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x < 0.5 & y < 0.5'
block_id = 1
[]
[add_internal_sideset]
type = SideSetsBetweenSubdomainsGenerator
input = add_block
primary_block = 0
paired_block = 1
new_boundary = internal
[]
[]
[AuxVariables]
[from_sub]
initial_condition = -1
[]
[from_sub_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_sub]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[to_sub_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
verbose_multiapps = true
[]
[Outputs]
[out]
type = Exodus
hide = 'to_sub to_sub_elem'
overwrite = true
[]
[]
[MultiApps]
[sub]
# 1 on corner, one in the center and one close to a corner
# The subapp mesh is a 0.3-sized cube, no overlap
positions = '0.2222 0 0 0.61111 0.311111 0.31111 0.76666 0.111111 0.81111'
type = TransientMultiApp
app_type = MooseTestApp
input_files = sub.i
execute_on = timestep_end
# Facilitates debugging
output_in_position = true
[]
[]
[Transfers]
# Boundary restrictions are added in the tests specification
[to_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
source_variable = to_sub
variable = from_main
extrapolation_constant = -1
[]
[to_sub_elem]
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
source_variable = to_sub_elem
variable = from_main_elem
extrapolation_constant = -1
[]
[from_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
source_variable = to_main
variable = from_sub
extrapolation_constant = -1
[]
[from_sub_elem]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
source_variable = to_main_elem
variable = from_sub_elem
extrapolation_constant = -1
[]
[]
(test/tests/meshgenerators/refine_sideset_generator/test_multi.i)
[Mesh]
[eg]
type = CartesianMeshGenerator
dim = 3
dx = '2 1 1'
dy = '2 3'
dz = '0.4 0.5 0.6 0.7'
ix = '2 1 1'
iy = '2 3'
iz = '1 1 1 1'
subdomain_id = '0 1 1 1
1 2 0 1
0 1 1 1
2 2 2 2
3 3 1 3
1 1 1 1'
[]
[sideset]
type = SideSetsBetweenSubdomainsGenerator
input = eg
primary_block = 1
paired_block = 2
new_boundary = sideset_1
[]
[refine]
type = RefineSidesetGenerator
input = sideset
boundaries = 'sideset_1'
refinement = '2'
boundary_side = 'both'
enable_neighbor_refinement = false
[]
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/radiation_transfer_action/cavity_with_pillar_vf.i)
[Mesh]
[cartesian]
type = CartesianMeshGenerator
dim = 3
dx = '0.1 0.3 0.4 0.3 0.1'
ix = ' 1 3 4 3 1'
dy = '0.1 0.3 0.4 0.3 0.1'
iy = ' 1 3 4 3 1'
dz = '0.1 0.8 0.2 0.1'
iz = ' 1 8 2 1'
subdomain_id = '1 1 1 1 1
1 15 15 15 1
1 15 1 15 1
1 15 15 15 1
1 1 1 1 1
1 12 12 12 1
11 0 103 0 14
11 104 2 102 14
11 0 101 0 14
1 13 13 13 1
1 12 12 12 1
11 0 0 0 14
11 0 105 0 14
11 0 0 0 14
1 13 13 13 1
1 1 1 1 1
1 16 16 16 1
1 16 16 16 1
1 16 16 16 1
1 1 1 1 1'
[]
[left_interior]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 11
paired_block = '0 101 102 103 104 105'
new_boundary = left_interior_wall
input = cartesian
[]
[right_interior]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 14
paired_block = '0 101 102 103 104 105'
new_boundary = right_interior_wall
input = left_interior
[]
[bottom_interior]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 12
paired_block = '0 101 102 103 104 105'
new_boundary = bottom_interior_wall
input = right_interior
[]
[top_interior]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 13
paired_block = '0 101 102 103 104 105'
new_boundary = top_interior_wall
input = bottom_interior
[]
[front_interior]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 15
paired_block = '0 101 102 103 104 105'
new_boundary = front_interior_wall
input = top_interior
[]
[back_interior]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 16
paired_block = '0 101 102 103 104 105'
new_boundary = back_interior_wall
input = front_interior
[]
[pillar_left]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 2
paired_block = 104
new_boundary = pillar_left
input = 'back_interior'
[]
[pillar_right]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 2
paired_block = 102
new_boundary = pillar_right
input = 'pillar_left'
[]
[pillar_bottom]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 2
paired_block = 103
new_boundary = pillar_bottom
input = 'pillar_right'
[]
[pillar_top]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 2
paired_block = 101
new_boundary = pillar_top
input = 'pillar_bottom'
[]
[pillar_back]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 2
paired_block = 105
new_boundary = pillar_back
input = 'pillar_top'
[]
[rename_block]
type = RenameBlockGenerator
old_block = '2 11 12 13 14 15 16 101 102 103 104 105'
new_block = '2 1 1 1 1 1 1 0 0 0 0 0'
input = 'pillar_back'
[]
[]
[GrayDiffuseRadiation]
[cavity]
sidesets = '6 7 8 9 10 11 12 13 14 15 16'
emissivity = '0.8 0.8 0.8 0.8 0.8 eps_fn 0.8 0.8 0.8 0.8 0.8'
n_patches = '5 5 5 5 5 5 5 5 5 5 5'
partitioners = 'metis metis metis metis metis metis metis metis metis metis metis'
temperature = temperature
ray_tracing_face_order = SECOND
[]
[]
[Functions]
[eps_fn]
type = ConstantFunction
value = 0.8
[]
[]
[Variables]
[temperature]
initial_condition = 300
block = '1 2'
[]
[]
[Kernels]
[hc]
type = HeatConduction
variable = temperature
block = '1 2'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temperature
boundary = left
value = 500
[]
[front]
type = DirichletBC
variable = temperature
boundary = front
value = 300
[]
[]
[Materials]
[hcmat]
type = HeatConductionMaterial
thermal_conductivity = 25.0
specific_heat = 490.0
block = '1 2'
[]
[density]
type = GenericConstantMaterial
prop_names = 'density'
prop_values = '80'
block = '1 2'
[]
[]
[Executioner]
type = Steady
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/feature_volume_vpp_test/boundary_area_2D.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 50
ny = 50
xmin = 0
xmax = 50
ymin = 0
ymax = 50
elem_type = QUAD4
[]
[./left_side]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '24.9 50 0'
input = gen
[../]
[./right_side]
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '25.1 0 0'
top_right = '50 50 0'
input = left_side
[../]
[./iface_u]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = 10
input = right_side
[../]
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[]
[]
[AuxVariables]
[./unique_regions]
family = MONOMIAL
order = CONSTANT
[../]
[]
[ICs]
[./c]
type = SpecifiedSmoothCircleIC
variable = c
invalue = 1.0
outvalue = 0.0
radii = '4 5 10'
x_positions = '25 25 25'
y_positions = '37.5 25 0'
z_positions = '0 0 0'
int_width = 2.0
[]
[]
[Postprocessors]
[./flood_count]
type = FeatureFloodCount
variable = c
# Must be turned on to build data structures necessary for FeatureVolumeVPP
compute_var_to_feature_map = true
threshold = 0.001
execute_on = INITIAL
[../]
[]
[VectorPostprocessors]
[./features]
type = FeatureVolumeVectorPostprocessor
flood_counter = flood_count
# Turn on centroid output
output_centroids = true
execute_on = INITIAL
boundary = 10
single_feature_per_element = false
[../]
[]
[Kernels]
[diff]
type = Diffusion
variable = c
[]
[]
[AuxKernels]
[./unique_regions]
type = FeatureFloodCountAux
variable = unique_regions
flood_counter = flood_count
field_display = UNIQUE_REGION
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = INITIAL
[]
(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
[../]
[]
(modules/electromagnetics/test/tests/interfacekernels/electrostatic_contact/analytic_solution_test_three_block.i)
# Regression test for ElectrostaticContactCondition with analytic solution with
# three blocks
#
# dim = 1D
# X = [0,3]
# Interfaces at X = 1 and X = 2
#
# stainless_steel graphite stainless_steel
# +------------------+------------------+------------------+
#
# Left BC: Potential = 1
# Right BC: Potential = 0
# Left Interface: ElectrostaticContactCondition (primary = stainless_steel)
# Right Interface: ElectrostaticContactCondition (primary = graphite)
#
[Mesh]
[line]
type = GeneratedMeshGenerator
dim = 1
nx = 6
xmax = 3
[]
[break_center]
type = SubdomainBoundingBoxGenerator
input = line
block_id = 1
block_name = 'graphite'
bottom_left = '1 0 0'
top_right = '2 0 0'
[]
[break_right]
type = SubdomainBoundingBoxGenerator
input = break_center
block_id = 2
bottom_left = '2 0 0'
top_right = '3 0 0'
[]
[ssg_interface]
type = SideSetsBetweenSubdomainsGenerator
input = break_right
primary_block = 0
paired_block = 1
new_boundary = 'ssg_interface'
[]
[gss_interface]
type = SideSetsBetweenSubdomainsGenerator
input = ssg_interface
primary_block = 1
paired_block = 2
new_boundary = 'gss_interface'
[]
[block_rename]
type = RenameBlockGenerator
input = gss_interface
old_block = '0 2'
new_block = 'stainless_steel_left stainless_steel_right'
[]
[]
[Variables]
[potential_graphite]
block = graphite
[]
[potential_stainless_steel_left]
block = stainless_steel_left
[]
[potential_stainless_steel_right]
block = stainless_steel_right
[]
[]
[AuxVariables]
[analytic_potential_stainless_steel_left]
block = stainless_steel_left
[]
[analytic_potential_stainless_steel_right]
block = stainless_steel_right
[]
[analytic_potential_graphite]
block = graphite
[]
[]
[Kernels]
[electric_graphite]
type = ADMatDiffusion
variable = potential_graphite
diffusivity = electrical_conductivity
block = graphite
[]
[electric_stainless_steel_left]
type = ADMatDiffusion
variable = potential_stainless_steel_left
diffusivity = electrical_conductivity
block = stainless_steel_left
[]
[electric_stainless_steel_right]
type = ADMatDiffusion
variable = potential_stainless_steel_right
diffusivity = electrical_conductivity
block = stainless_steel_right
[]
[]
[AuxKernels]
[analytic_function_aux_stainless_steel_left]
type = FunctionAux
function = potential_fxn_stainless_steel_left
variable = analytic_potential_stainless_steel_left
block = stainless_steel_left
[]
[analytic_function_aux_stainless_steel_right]
type = FunctionAux
function = potential_fxn_stainless_steel_right
variable = analytic_potential_stainless_steel_right
block = stainless_steel_right
[]
[analytic_function_aux_graphite]
type = FunctionAux
function = potential_fxn_graphite
variable = analytic_potential_graphite
block = graphite
[]
[]
[BCs]
[elec_left]
type = ADDirichletBC
variable = potential_stainless_steel_left
boundary = left
value = 1
[]
[elec_right]
type = ADDirichletBC
variable = potential_stainless_steel_right
boundary = right
value = 0
[]
[]
[InterfaceKernels]
[electric_contact_conductance_ssg]
type = ElectrostaticContactCondition
variable = potential_stainless_steel_left
neighbor_var = potential_graphite
boundary = ssg_interface
mean_hardness = mean_hardness
mechanical_pressure = 3000
[]
[electric_contact_conductance_gss]
type = ElectrostaticContactCondition
variable = potential_graphite
neighbor_var = potential_stainless_steel_right
boundary = gss_interface
mean_hardness = mean_hardness
mechanical_pressure = 3000
[]
[]
[Materials]
#graphite (at 300 K)
[sigma_graphite]
type = ADGenericConstantMaterial
prop_names = electrical_conductivity
prop_values = 73069.2
block = graphite
[]
#stainless_steel (at 300 K)
[sigma_stainless_steel_left]
type = ADGenericConstantMaterial
prop_names = electrical_conductivity
prop_values = 1.41867e6
block = stainless_steel_left
[]
[sigma_stainless_steel_right]
type = ADGenericConstantMaterial
prop_names = electrical_conductivity
prop_values = 1.41867e6
block = stainless_steel_right
[]
# harmonic mean of graphite and stainless steel hardness
[mean_hardness]
type = ADGenericConstantMaterial
prop_names = mean_hardness
prop_values = 2.4797e9
[]
[]
[Functions]
[potential_fxn_stainless_steel_left]
type = ElectricalContactTestFunc
domain = stainless_steel
three_block = true
three_block_side = left
[]
[potential_fxn_stainless_steel_right]
type = ElectricalContactTestFunc
domain = stainless_steel
three_block = true
three_block_side = right
[]
[potential_fxn_graphite]
type = ElectricalContactTestFunc
domain = graphite
three_block = true
[]
[]
[Postprocessors]
[error_stainless_steel_left]
type = ElementL2Error
variable = potential_stainless_steel_left
function = potential_fxn_stainless_steel_left
block = stainless_steel_left
[]
[error_graphite]
type = ElementL2Error
variable = potential_graphite
function = potential_fxn_graphite
block = graphite
[]
[error_stainless_steel_right]
type = ElementL2Error
variable = potential_stainless_steel_right
function = potential_fxn_stainless_steel_right
block = stainless_steel_right
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = true
[]
[Outputs]
csv = true
perf_graph = true
[]
(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
[]
(test/tests/interfacekernels/1d_interface/single_variable_coupled_flux.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./interface_again]
type = SideSetsBetweenSubdomainsGenerator
input = interface
primary_block = '1'
paired_block = '0'
new_boundary = 'primary1_interface'
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff0]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[../]
[./diff1]
type = CoeffParamDiffusion
variable = u
D = 2
block = 1
[../]
[]
[InterfaceKernels]
[./interface]
type = InterfaceDiffusion
variable = u
neighbor_var = u
boundary = primary0_interface
D = 4
D_neighbor = 2
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left'
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 'right'
value = 0
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
[Debug]
show_var_residual_norms = true
[]
(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/fsi/test/tests/2d-small-strain-transient/ad-fsi-flat-channel.i)
[GlobalParams]
displacements = 'disp_x disp_y'
order = FIRST
preset = false
use_displaced_mesh = true
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 3.0
ymin = 0
ymax = 1.0
nx = 10
ny = 15
elem_type = QUAD4
[]
[subdomain1]
type = SubdomainBoundingBoxGenerator
bottom_left = '0.0 0.5 0'
block_id = 1
top_right = '3.0 1.0 0'
input = gmg
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'master0_interface'
input = subdomain1
[]
[break_boundary]
type = BreakBoundaryOnSubdomainGenerator
input = interface
[]
[]
[Variables]
[vel]
block = 0
family = LAGRANGE_VEC
[]
[p]
block = 0
order = FIRST
[]
[disp_x]
[]
[disp_y]
[]
[vel_x_solid]
block = 1
[]
[vel_y_solid]
block = 1
[]
[]
[Kernels]
[mass]
type = INSADMass
variable = p
block = 0
[]
[mass_pspg]
type = INSADMassPSPG
variable = p
block = 0
[]
[momentum_time]
type = INSADMomentumTimeDerivative
variable = vel
block = 0
[]
[momentum_convection]
type = INSADMomentumAdvection
variable = vel
block = 0
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = vel
block = 0
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = vel
pressure = p
integrate_p_by_parts = true
block = 0
[]
[momentum_supg]
type = INSADMomentumSUPG
variable = vel
material_velocity = relative_velocity
block = 0
[]
[momentum_mesh]
type = INSADMomentumMeshAdvection
variable = vel
disp_x = 'disp_x'
disp_y = 'disp_y'
block = 0
[]
[disp_x_fluid]
type = Diffusion
variable = disp_x
block = 0
use_displaced_mesh = false
[]
[disp_y_fluid]
type = Diffusion
variable = disp_y
block = 0
use_displaced_mesh = false
[]
[accel_tensor_x]
type = CoupledTimeDerivative
variable = disp_x
v = vel_x_solid
block = 1
use_displaced_mesh = false
[]
[accel_tensor_y]
type = CoupledTimeDerivative
variable = disp_y
v = vel_y_solid
block = 1
use_displaced_mesh = false
[]
[vxs_time_derivative_term]
type = CoupledTimeDerivative
variable = vel_x_solid
v = disp_x
block = 1
use_displaced_mesh = false
[]
[vys_time_derivative_term]
type = CoupledTimeDerivative
variable = vel_y_solid
v = disp_y
block = 1
use_displaced_mesh = false
[]
[source_vxs]
type = MatReaction
variable = vel_x_solid
block = 1
reaction_rate = 1
use_displaced_mesh = false
[]
[source_vys]
type = MatReaction
variable = vel_y_solid
block = 1
reaction_rate = 1
use_displaced_mesh = false
[]
[]
[InterfaceKernels]
[penalty]
type = ADPenaltyVelocityContinuity
variable = vel
fluid_velocity = vel
displacements = 'disp_x disp_y'
solid_velocities = 'vel_x_solid vel_y_solid'
boundary = master0_interface
penalty = 1e6
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[solid_domain]
strain = SMALL
incremental = false
# generate_output = 'strain_xx strain_yy strain_zz' ## Not at all necessary, but nice
block = '1'
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e2
poissons_ratio = 0.3
block = '1'
use_displaced_mesh = false
[]
[small_stress]
type = ComputeLinearElasticStress
block = 1
[]
[const]
type = ADGenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '1 1'
[]
[ins_mat]
type = INSADTauMaterial
velocity = vel
pressure = p
block = 0
[]
[]
[BCs]
[fluid_bottom]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'bottom'
function_x = 0
function_y = 0
[]
[fluid_left]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'left_to_0'
function_x = 'inlet_func'
function_y = 0
# The displacements actually affect the result of the function evaluation so in order to eliminate the impact
# on the Jacobian we set 'use_displaced_mesh = false' here
use_displaced_mesh = false
[]
[no_disp_x]
type = DirichletBC
variable = disp_x
boundary = 'bottom top left_to_1 right_to_1 left_to_0 right_to_0'
value = 0
[]
[no_disp_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom top left_to_1 right_to_1 left_to_0 right_to_0'
value = 0
[]
[solid_x_no_slip]
type = DirichletBC
variable = vel_x_solid
boundary = 'top left_to_1 right_to_1'
value = 0.0
[]
[solid_y_no_slip]
type = DirichletBC
variable = vel_y_solid
boundary = 'top left_to_1 right_to_1'
value = 0.0
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = 5
# num_steps = 60
dt = 0.1
dtmin = 0.1
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = none
nl_rel_tol = 1e-50
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
[Functions]
[inlet_func]
type = ParsedFunction
expression = '(-16 * (y - 0.25)^2 + 1) * (1 + cos(t))'
[]
[]
(test/tests/meshmodifiers/element_subdomain_modifier/adaptivity_moving_boundary_3d.i)
[Problem]
solve = false
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
nz = 6
[]
[left]
type = SubdomainBoundingBoxGenerator
input = 'gen'
block_id = 1
block_name = 'left'
bottom_left = '-1 -1 0'
top_right = '0 1 1'
[]
[right]
type = SubdomainBoundingBoxGenerator
input = 'left'
block_id = 2
block_name = 'right'
bottom_left = '0 -1 0'
top_right = '1 1 1'
[]
[moving_boundary]
type = SideSetsBetweenSubdomainsGenerator
input = 'right'
new_boundary = 'moving_boundary'
primary_block = 'left'
paired_block = 'right'
[]
[]
[MeshModifiers]
[moving_circle]
type = CoupledVarThresholdElementSubdomainModifier
coupled_var = 'phi'
block = 2
criterion_type = 'ABOVE'
threshold = 0.5
subdomain_id = 1
moving_boundaries = 'moving_boundary'
moving_boundary_subdomain_pairs = 'left right'
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[Functions]
[moving_gauss]
type = ParsedFunction
value = 'exp(-((x+0.5-t)^2+(y)^2)/0.25)'
[]
[]
[AuxVariables]
[phi]
[AuxKernel]
type = ParsedAux
expression = 'exp(-((x+0.5-t)^2+(y)^2)/0.25)'
use_xyzt = true
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[]
[Adaptivity]
steps = 1
marker = 'marker'
initial_marker = 'marker'
max_h_level = 1
[Indicators/indicator]
type = GradientJumpIndicator
variable = 'phi'
[]
[Markers]
[efm]
type = ErrorFractionMarker
indicator = 'indicator'
coarsen = 0.2
refine = 0.5
[]
[marker]
type = BoundaryPreservedMarker
preserved_boundary = 'moving_boundary'
marker = 'efm'
[]
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 5
[]
[Outputs]
exodus = true
[]
(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
#[../]
[]
(test/tests/postprocessors/side_average_value/side_average_functor_test.i)
[Mesh]
inactive = 'refine'
# U-shaped domains to have internal boundaries in
# a variety of directions
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1 1 1'
dy = '3 1'
ix = '4 5 3'
iy = '12 4'
subdomain_id = '1 2 1
1 1 1'
[]
[internal_boundary_dir1]
type = SideSetsBetweenSubdomainsGenerator
input = cmg
primary_block = 1
paired_block = 2
new_boundary = 'inside_1'
[]
[internal_boundary_dir2]
type = SideSetsBetweenSubdomainsGenerator
input = internal_boundary_dir1
primary_block = 2
paired_block = 1
new_boundary = 'inside_2'
[]
[refine]
type = RefineBlockGenerator
input = internal_boundary_dir2
block = '1 2'
refinement = '2 1'
[]
[]
[Variables]
[u]
type = MooseVariableFVReal
block = 1
[]
[]
[AuxVariables]
[v1]
type = MooseVariableFVReal
block = 1
[FVInitialCondition]
type = FVFunctionIC
function = 'x + y'
[]
[]
[v2]
type = MooseVariableFVReal
block = 2
[FVInitialCondition]
type = FVFunctionIC
function = '2*x*x - y'
[]
[]
[]
[Functions]
[f1]
type = ParsedFunction
expression = 'exp(x - y)'
[]
[]
[FunctorMaterials]
[m1]
type = ADGenericFunctorMaterial
prop_names = 'm1'
prop_values = 'f1'
[]
[m2]
type = ADPiecewiseByBlockFunctorMaterial
prop_name = 'm2'
subdomain_to_prop_value = '1 12
2 4'
[]
[]
[FVKernels]
[diff]
type = FVDiffusion
variable = u
coeff = '1'
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = u
boundary = 3
value = 0
[]
[right]
type = FVDirichletBC
variable = u
boundary = 1
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Postprocessors]
# Mesh external boundaries integration
[ext_u]
type = SideAverageFunctorPostprocessor
boundary = 'left top right'
functor = u
restrict_to_functors_domain = true
[]
[ext_u_int]
type = ADSideIntegralFunctorPostprocessor
boundary = 'left top right'
functor = u
restrict_to_functors_domain = true
[]
[ext_u_area]
type = AreaPostprocessor
boundary = 'left top right'
[]
[ext_u_diff]
type = ParsedPostprocessor
pp_names = 'ext_u ext_u_int ext_u_area'
function = 'ext_u - ext_u_int/ext_u_area'
[]
[ext_v1]
type = SideAverageFunctorPostprocessor
boundary = 'left right'
functor = v1
[]
[ext_v2]
type = SideAverageFunctorPostprocessor
boundary = 'top'
functor = v2
restrict_to_functors_domain = true
[]
[ext_f1]
type = SideAverageFunctorPostprocessor
boundary = 'left top right'
functor = f1
prefactor = f1
[]
[ext_m1]
type = SideAverageFunctorPostprocessor
boundary = 'left top right'
functor = m1
restrict_to_functors_domain = true
[]
[ext_m2]
type = SideAverageFunctorPostprocessor
boundary = 'left top right'
functor = m2
restrict_to_functors_domain = true
[]
# Internal to the mesh, but a side to the variables
# With orientation of normal 1->2
[int_s1_u]
type = SideAverageFunctorPostprocessor
boundary = inside_1
functor = u
[]
[int_s1_v1]
type = SideAverageFunctorPostprocessor
boundary = inside_1
functor = v1
[]
[int_s1_f1]
type = SideAverageFunctorPostprocessor
boundary = inside_1
functor = f1
[]
[int_s1_m1]
type = SideAverageFunctorPostprocessor
boundary = inside_1
functor = m1
[]
[int_s1_m2]
type = SideAverageFunctorPostprocessor
boundary = inside_1
functor = m2
[]
# With orientation of normal 2->1
[int_s2_v2]
type = SideAverageFunctorPostprocessor
boundary = inside_2
functor = v2
[]
[int_s2_f1]
type = SideAverageFunctorPostprocessor
boundary = inside_2
functor = f1
[]
[int_s2_m1]
type = SideAverageFunctorPostprocessor
boundary = inside_2
functor = m1
[]
[int_s2_m2]
type = SideAverageFunctorPostprocessor
boundary = inside_2
functor = m2
[]
[]
[Outputs]
csv = true
exodus = true
[]
[Problem]
kernel_coverage_check = false
[]
(test/tests/interfacekernels/auxiliary_variables/reaction_1D_steady.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'subdomain1'
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
block = '0'
[]
[]
[AuxVariables]
[v]
order = FIRST
family = LAGRANGE
block = '1'
initial_condition = 4
[]
[]
[Kernels]
[diff_u]
type = MatDiffusion
variable = u
block = '0'
diffusivity = D
[]
[]
[InterfaceKernels]
[interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = 'v'
boundary = 'primary0_interface'
# D = D
# D_neighbor = D
penalty = 1e3
[]
[]
[Materials]
[block0]
type = GenericConstantMaterial
block = '0'
prop_names = 'D'
prop_values = '4'
[]
[block1]
type = GenericConstantMaterial
block = '1'
prop_names = 'D'
prop_values = '2'
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_rel_tol = 1e-10
nl_forced_its = 2
[]
[Problem]
kernel_coverage_check = false
[]
[Outputs]
csv = true
[]
[Postprocessors]
[min]
type = ElementExtremeValue
variable = 'u'
value_type = 'min'
block = '0'
[]
[max]
type = ElementExtremeValue
variable = 'u'
block = '0'
[]
[]
(test/tests/interfacekernels/1d_interface/reaction_1D_transient.i)
# Transient-state test for the InterfaceReaction kernel.
#
# Same to steady-state, except the following
#
# Natural BCs are applied (i.e. NewmannBC h=0 at left and right)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'subdomain1'
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = '0'
[../]
[./v]
order = FIRST
family = LAGRANGE
block = '1'
[../]
[]
[Kernels]
[./diff_u]
type = MatDiffusion
diffusivity = D
variable = u
block = '0'
[../]
[./diff_v]
type = MatDiffusion
diffusivity = D
variable = v
block = '1'
[../]
[./diff_u_dt]
type = TimeDerivative
variable = u
block = '0'
[../]
[./diff_v_dt]
type = TimeDerivative
variable = v
block = '1'
[../]
[./source_u]
type = BodyForce
variable = u
block = '0'
[../]
[]
[InterfaceKernels]
[./interface]
type = InterfaceDiffusion
variable = u
neighbor_var = 'v'
boundary = 'primary0_interface'
D = D
D_neighbor = D
[../]
[./interface_reaction]
type = InterfaceReaction
variable = u
neighbor_var = 'v'
boundary = 'primary0_interface'
kf = 1 # Forward reaction rate coefficient
kb = 2 # Backward reaction rate coefficient
[../]
[]
[Materials]
[./block0]
type = GenericConstantMaterial
block = '0'
prop_names = 'D'
prop_values = '4'
[../]
[./block1]
type = GenericConstantMaterial
block = '1'
prop_names = 'D'
prop_values = '2'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
[Debug]
show_var_residual_norms = true
[]
(test/tests/fvbcs/fv_functor_dirichlet/fv_other_side.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1 2'
dy = '1.3'
ix = '5 10'
iy = '3'
subdomain_id = '0 1'
[]
[mid]
type = SideSetsBetweenSubdomainsGenerator
input = 'cmg'
primary_block = '0'
paired_block = '1'
new_boundary = 'mid'
[]
[]
[Variables]
[u]
type = MooseVariableFVReal
block = 0
[]
[v]
type = MooseVariableFVReal
block = 1
[]
[]
[FVKernels]
[diffu]
type = FVDiffusion
variable = u
coeff = 1
[]
[diffv]
type = FVDiffusion
variable = v
coeff = 2
block = 1
[]
[source]
type = FVBodyForce
variable = v
value = 1
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = u
boundary = left
value = 4
[]
[mid]
type = FVADFunctorDirichletBC
variable = u
functor = v
functor_only_defined_on_other_side = true
ghost_layers = 3
boundary = mid
[]
[right]
type = FVDirichletBC
variable = v
boundary = right
value = 0.5
[]
[]
[Executioner]
type = Steady
solve_type = 'Newton'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_abs_tol = 1e-12
[]
[VectorPostprocessors]
[u_sample]
type = LineValueSampler
variable = 'u'
start_point = '0.01 0.3 0'
end_point = '0.99 0.3 0'
num_points = 4
sort_by = x
[]
[v_sample]
type = LineValueSampler
variable = 'v'
start_point = '1.01 0.3 0'
end_point = '1.99 0.3 0'
num_points = 4
sort_by = x
[]
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/materials/piecewise_by_block_material/discontinuous.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[middle]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
new_boundary = middle
paired_block = 1
primary_block = 0
[]
[]
[Variables]
[dummy]
type = MooseVariableFVReal
[]
[]
# This is added to have sufficient ghosting layers, see #19534
[FVKernels]
[diff]
type = FVDiffusion
variable = 'dummy'
coeff = 1
[]
[]
[AuxVariables]
[u]
type = MooseVariableFVReal
[]
[v]
type = MooseVariableFVReal
[FVInitialCondition]
type = FVFunctionIC
function = '4 * (x - 7) * (x - 8)'
[]
[]
[]
[AuxKernels]
# to trigger off-boundary element computations
[to_var]
type = ADMaterialRealAux
variable = 'u'
property = coeff
[]
[]
[Materials]
[coeff_mat]
type = ADPiecewiseConstantByBlockMaterial
prop_name = 'coeff'
subdomain_to_prop_value = '0 4
1 2'
[]
[]
[Postprocessors]
# to trigger on boundary element computations
[flux]
type = ADNonFunctorSideDiffusiveFluxIntegral
boundary = left
variable = v
diffusivity = 'coeff'
[]
# to trigger ghost evaluations
[flux_mid]
type = ADInterfaceDiffusiveFluxIntegral
boundary = middle
variable = v
diffusivity = 'coeff'
coeff_interp_method = average
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
exodus = true
# To get level of ghosting
[console]
type = Console
system_info = 'framework mesh aux nonlinear execution relationship'
[]
[]
(modules/ray_tracing/test/tests/raykernels/errors/raykernel_errors.i)
[Mesh]
active = 'gmg'
[gmg]
type = CartesianMeshGenerator
dim = 1
dx = '0.5 0.5'
ix = '1 1'
subdomain_id = '0 1'
[]
[internal]
type = SideSetsBetweenSubdomainsGenerator
input = gmg
primary_block = 1
paired_block = 0
new_boundary = internal
[]
[]
[UserObjects]
active = 'study'
[study]
type = RepeatableRayStudy
start_points = '0 0 0'
directions = '1 0 0'
names = 'ray'
execute_on = INITIAL
ray_kernel_coverage_check = false
[]
[end_study]
type = RepeatableRayStudy
start_points = '0 0 0'
end_points = '0.25 0 0'
names = 'ray'
execute_on = INITIAL
ray_kernel_coverage_check = false
[]
[]
[RayKernels]
active = ''
[kill]
type = KillRayKernel
[]
[change_after_kill]
type = ChangeRayRayKernelTest
change_start_direction = true
depends_on = kill
[]
[change]
type = ChangeRayRayKernelTest
change_start_direction = true
[]
[change_again]
type = ChangeRayRayKernelTest
change_start_direction = true
[]
[change_out_of_elem]
type = ChangeRayRayKernelTest
change_start_out_of_elem = true
[]
[change_zero]
type = ChangeRayRayKernelTest
change_direction_zero = true
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
(test/tests/interfacekernels/1d_interface/no-failed-point-inversions.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[break]
type = BreakMeshByBlockGenerator
input = interface
[]
displacements = 'disp_x'
[]
[AuxVariables]
[disp_x][]
[]
[ICs]
[right]
type = ConstantIC
variable = disp_x
block = 1
value = 1
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
block = '0'
[]
[v]
order = FIRST
family = LAGRANGE
block = '1'
[]
[]
[Kernels]
[diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[]
[diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[]
[]
[InterfaceKernels]
[penalty_interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = 'left'
value = 1
[]
[right]
type = DirichletBC
variable = v
boundary = 'right'
value = 0
[]
[]
[Materials]
[block0]
type = GenericConstantMaterial
block = '0'
prop_names = 'D'
prop_values = '4'
[]
[block1]
type = GenericConstantMaterial
block = '1'
prop_names = 'D'
prop_values = '2'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[area]
type = AreaPostprocessor
use_displaced_mesh = true
boundary = 'right'
[]
[]
(test/tests/fviks/diffusion/multisystem.i)
[Mesh]
[gmg]
type = CartesianMeshGenerator
dim = 1
ix = '50 50'
dx = '1 1'
subdomain_id = '0 1'
[]
[sds]
type = SideSetsBetweenSubdomainsGenerator
input = gmg
new_boundary = 'between'
paired_block = '1'
primary_block = '0'
[]
[]
[Problem]
nl_sys_names = 'u v'
error_on_jacobian_nonzero_reallocation = true
[]
[Variables]
[u]
type = MooseVariableFVReal
solver_sys = 'u'
block = 0
[]
[v]
type = MooseVariableFVReal
solver_sys = 'v'
block = 1
[]
[]
[FVKernels]
[diff_u]
type = FVDiffusion
variable = u
coeff = 3.0
[]
[force_u]
type = FVBodyForce
variable = u
function = 5
[]
[diff_v]
type = FVDiffusion
variable = v
coeff = 1.0
[]
[force_v]
type = FVBodyForce
variable = v
function = 5
[]
[]
[FVInterfaceKernels]
[diff_ik]
type = FVDiffusionInterface
variable1 = u
variable2 = v
boundary = 'between'
coeff1 = 3
coeff2 = 1
subdomain1 = 0
subdomain2 = 1
[]
[diff_ik_v]
type = FVDiffusionInterface
variable1 = v
variable2 = u
boundary = 'between'
coeff1 = 1
coeff2 = 3
subdomain1 = 1
subdomain2 = 0
[]
[]
[FVBCs]
[left_u]
type = FVDirichletBC
variable = u
boundary = left
value = 0
[]
[right_v]
type = FVDirichletBC
variable = v
boundary = right
value = 1
[]
[]
[Preconditioning]
[u]
type = SMP
nl_sys = u
petsc_options = '-snes_monitor'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[v]
type = SMP
nl_sys = v
petsc_options = '-snes_monitor'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[]
[Executioner]
type = SteadySolve2
solve_type = 'NEWTON'
first_nl_sys_to_solve = 'u'
second_nl_sys_to_solve = 'v'
number_of_iterations = 200
nl_abs_tol = 1e-10
[]
[Outputs]
print_nonlinear_residuals = false
print_linear_residuals = false
exodus = true
[]
(test/tests/interfacekernels/2d_interface/coupled_value_coupled_flux_dot.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./break_boundary]
input = interface
type = BreakBoundaryOnSubdomainGenerator
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./v]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 2
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 4
block = 1
[../]
[./source_u]
type = BodyForce
variable = u
function = 0.1*t
[../]
[]
[InterfaceKernels]
[./interface]
type = PenaltyInterfaceDiffusionDot
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 right top'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1'
[../]
[]
[Postprocessors]
[./u_int]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[../]
[./v_int]
type = ElementIntegralVariablePostprocessor
variable = v
block = 1
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = TRUE
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu superlu_dist '
dt = 0.1
num_steps = 10
dtmin = 0.1
line_search = none
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
(modules/porous_flow/test/tests/actions/block_restricted.i)
PorousFlowDictatorName = 'dictator'
[GlobalParams]
time_unit = days
displacements = 'disp_x disp_y disp_z'
use_displaced_mesh = false
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Mesh]
active_block_names = 'BaseMesh Box1'
[BaseMesh]
type = GeneratedMeshGenerator
subdomain_name = 'BaseMesh'
elem_type = "TET10"
dim = 3
nx = 6
ny = 6
nz = 2
xmin = -10
xmax = +10
ymin = -10
ymax = +10
zmin = -2
zmax = +2
[]
[Box1]
type = SubdomainBoundingBoxGenerator
input = "BaseMesh"
block_id = 1
block_name = "Box1"
location = "INSIDE"
bottom_left = "-3.3 -3.3 +2"
top_right = "+3.3 +3.3 0"
[]
[Box1Boundary]
type = SideSetsBetweenSubdomainsGenerator
input = Box1
primary_block = 'BaseMesh'
paired_block = 'Box1'
new_boundary = 'Box1Boundary'
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = SMALL
incremental = true
block = ${Mesh/active_block_names}
[]
[]
[]
[]
[AuxVariables]
[stress_xx]
order = CONSTANT
family = MONOMIAL
block = 'BaseMesh'
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
block = 'BaseMesh'
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
block = 'BaseMesh'
[]
[]
[PorousFlowFullySaturated]
coupling_type = HydroMechanical
porepressure = porepressure
biot_coefficient = 1
fp = simple_fluid
stabilization = FULL
gravity = '0 0 0'
add_darcy_aux = false
dictator_name = ${PorousFlowDictatorName}
block = 'BaseMesh'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
order = SECOND
family = LAGRANGE
scaling = 1e-5
block = 'BaseMesh'
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = '2'
block = 'BaseMesh'
[]
[]
[BCs]
[fix_x]
type = DirichletBC
variable = disp_x
boundary = 'left right'
value = 0.0
[]
[fix_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom top'
value = 0.0
[]
[fix_z]
type = DirichletBC
variable = disp_z
boundary = 'back'
value = 0.0
[]
[porepressure_fix]
type = DirichletBC
variable = porepressure
boundary = 'left right bottom top'
value = 2.0
[]
[porepressure_Box1Boundary]
type = FunctionDirichletBC
variable = porepressure
boundary = 'Box1Boundary'
function = porepressure_at_Box1Boundary
[]
[]
[Functions]
[porepressure_at_Box1Boundary]
type = ParsedFunction
expression = '2 + max(0, min(1, t-0.25))'
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E3
density0 = 1000
thermal_expansion = 0
viscosity = 9.0E-10
[]
[]
[Materials]
[porosity_bulk]
type = PorousFlowPorosityConst
block = ${Mesh/active_block_names}
porosity = 0.15
PorousFlowDictator = ${PorousFlowDictatorName}
[]
[undrained_density_0]
type = GenericConstantMaterial
block = ${Mesh/active_block_names}
prop_names = density
prop_values = 2500
[]
[BaseMesh_permeability_bulk]
type = PorousFlowPermeabilityConst
block = 'BaseMesh'
permeability = '1e-5 0 0 0 1e-5 0 0 0 1e-5'
PorousFlowDictator = ${PorousFlowDictatorName}
[]
[BaseMesh_elasticity_tensor]
type = ComputeIsotropicElasticityTensor
block = 'BaseMesh'
youngs_modulus = 2500
poissons_ratio = 0.15
[]
[Box1_permeability_bulk]
type = PorousFlowPermeabilityConst
block = 'Box1'
permeability = '1e-5 0 0 0 1e-5 0 0 0 1e-5'
PorousFlowDictator = ${PorousFlowDictatorName}
[]
[Box1_elasticity_tensor]
type = ComputeIsotropicElasticityTensor
block = 'Box1'
youngs_modulus = 2500
poissons_ratio = 0.15
[]
[stress]
type = ComputeMultipleInelasticStress
inelastic_models = ''
perform_finite_strain_rotations = false
tangent_operator = 'nonlinear'
block = ${Mesh/active_block_names}
[]
[]
[Preconditioning]
[.\SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options = '-snes_converged_reason'
# best overall
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
line_search = none
nl_abs_tol = 1e-4
nl_rel_tol = 1e-6
l_max_its = 20
nl_max_its = 8
start_time = 0.0
end_time = 0.5
[TimeSteppers]
[ConstantDT1]
type = ConstantDT
dt = 0.25
[]
[]
[Quadrature]
type = SIMPSON
order = SECOND
[]
[]
[Outputs]
perf_graph = true
exodus = true
[]
(test/tests/outputs/debug/show_execution_fv_flux_objects.i)
[Mesh]
[gen_mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = 10
nx = 50
[]
[left]
type = ParsedSubdomainMeshGenerator
input = 'gen_mesh'
combinatorial_geometry = 'x < 0.5'
block_id = '2'
[]
[middle_boundary]
type = SideSetsBetweenSubdomainsGenerator
input = 'left'
primary_block = '0'
paired_block = '2'
new_boundary = 'middle'
[]
[]
[Variables]
[v]
family = MONOMIAL
order = CONSTANT
fv = true
block = 2
[]
[u]
type = MooseVariableFVReal
[]
[]
[ICs]
[v_ic]
type = FunctionIC
variable = v
function = 'if (x > 2 & x < 3, 0.5, 0)'
[]
[]
[FVKernels]
# Twice the kernel makes it not the Burgers equation, but shows the ordering
[2_burger]
type = FVBurgers1D
variable = v
[]
[1_burgers]
type = FVBurgers1D
variable = v
[]
[time]
type = FVTimeKernel
variable = v
[]
[time_u]
type = FVTimeKernel
variable = u
[]
[]
[FVBCs]
[fv_burgers_right]
type = FVBurgersOutflowBC
variable = v
boundary = 'middle'
[]
[fv_burgers_left]
type = FVBurgersOutflowBC
variable = v
boundary = 'left'
[]
[]
[FVInterfaceKernels]
[diff_ik]
type = FVOnlyAddDiffusionToOneSideOfInterface
variable1 = 'v'
variable2 = 'u'
boundary = 'middle'
coeff2 = '1'
subdomain1 = '2'
subdomain2 = '0'
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
petsc_options = '-snes_converged_reason'
nl_abs_tol = 1e-7
nl_rel_tol = 1e-8
num_steps = 1
dt = 0.05
nl_forced_its = 1
line_search = none
[]
[Debug]
show_execution_order = 'LINEAR'
[]
(test/tests/materials/functor_properties/traditional-mat-props.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[diff_u]
type = MatDiffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = 'left'
value = 1
[]
[right]
type = DirichletBC
variable = u
boundary = 'right'
value = 0
[]
[]
[Materials]
[block0]
type = GenericConstantMaterial
block = '0'
prop_names = 'D'
prop_values = '4'
[]
[block1]
type = GenericConstantMaterial
block = '1'
prop_names = 'D'
prop_values = '2'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(test/tests/interfacekernels/1d_interface/ADMatreaction_1D_steady.i)
# Steady-state test for the ADMatInterfaceReaction kernel.
#
# Specie M transport from domain 1 (0<=x<=1) to domain 2 (1<x<=2),
# u and v are concentrations in domain 1 and domain 2.
#
# Diffusion in both domains can be described by Ficks law and diffusion
# kernel is applied.
#
# Specie M has different diffusity in different domains, here set as D1=4, D2=2.
#
# Dirichlet boundary conditions are applied, i.e., u(0)=1, v(2)=0
#
# At the interface consider the following
#
# (a) Fluxes are matched from both domains (InterfaceDiffusion kernel)
#
# (b) First-order reaction is R = kf*u - kb*v = 0
#
# This results in the interfacial conditions
#
# -D1 du = -D2 dv
# kf*u = kb*v
#
# Analytical solution is
# u = -0.2*u+1, 0<=u<=1
# v = -0.4*v+0.8, 1<v<=2
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'subdomain1'
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
block = '0'
[]
[v]
order = FIRST
family = LAGRANGE
block = '1'
[]
[]
[Kernels]
[diff_u]
type = MatDiffusion
variable = u
block = '0'
diffusivity = D
[]
[diff_v]
type = MatDiffusion
variable = v
block = '1'
diffusivity = D
[]
[]
[InterfaceKernels]
[interface]
type = InterfaceDiffusion
variable = u
neighbor_var = 'v'
boundary = 'primary0_interface'
D = D
D_neighbor = D
[]
[interface_reaction]
type = ADMatInterfaceReaction
variable = u
neighbor_var = 'v'
boundary = 'primary0_interface'
forward_rate = forward_rate
backward_rate = backward_rate
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = u
boundary = 'left'
value = 1
[]
[right]
type = ADDirichletBC
variable = v
boundary = 'right'
value = 0
[]
[]
[Materials]
[block0]
type = 'ADGenericConstantMaterial'
block = '0'
prop_names = 'forward_rate backward_rate'
prop_values = '1.0 2.0'
[]
[block01]
type = 'GenericConstantMaterial'
block = '0'
prop_names = 'D'
prop_values = '4'
[]
[block1]
type = 'ADGenericConstantMaterial'
block = '1'
prop_names = 'forward_rate backward_rate'
prop_values = '1.0 2.0'
[]
[block11]
type = 'GenericConstantMaterial'
block = '1'
prop_names = 'D'
prop_values = '2'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_rel_tol = 1e-10
[]
[Outputs]
print_linear_residuals = true
execute_on = 'FINAL'
exodus = true
csv = true
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[elemental_error_u]
type = ElementL2Error
function = -0.2*x+1
variable = 'u'
block = '0'
[]
[elemental_error_v]
type = ElementL2Error
function = -0.4*x+0.8
variable = 'v'
block = '1'
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/block-restriction/two-mats-two-eqn-sets.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = 0
ymax = 1
nx = 16
ny = 8
elem_type = QUAD9
[]
[./corner_node_0]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_0'
coord = '0 0 0'
input = gen
[../]
[./corner_node_1]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_1'
coord = '1 0 0'
input = corner_node_0
[../]
[./subdomain1]
input = corner_node_1
type = SubdomainBoundingBoxGenerator
bottom_left = '1 0 0'
top_right = '2 1 0'
block_id = 1
[../]
[./break_boundary]
input = subdomain1
type = BreakBoundaryOnSubdomainGenerator
[../]
[./interface0]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '0'
paired_block = '1'
new_boundary = 'interface0'
[../]
[./interface1]
type = SideSetsBetweenSubdomainsGenerator
input = interface0
primary_block = '1'
paired_block = '0'
new_boundary = 'interface1'
[../]
[]
[Variables]
[velocity0]
order = SECOND
family = LAGRANGE_VEC
block = 0
[]
[T0]
order = SECOND
[InitialCondition]
type = ConstantIC
value = 1.0
[]
block = 0
[]
[p0]
block = 0
[]
[velocity1]
order = SECOND
family = LAGRANGE_VEC
block = 1
[]
[T1]
order = SECOND
[InitialCondition]
type = ConstantIC
value = 1.0
[]
block = 1
[]
[p1]
block = 1
[]
[]
[Kernels]
[./mass0]
type = INSADMass
variable = p0
block = 0
[../]
[./momentum_time0]
type = INSADMomentumTimeDerivative
variable = velocity0
block = 0
[../]
[./momentum_convection0]
type = INSADMomentumAdvection
variable = velocity0
block = 0
[../]
[./momentum_viscous0]
type = INSADMomentumViscous
variable = velocity0
block = 0
[../]
[./momentum_pressure0]
type = INSADMomentumPressure
variable = velocity0
pressure = p0
integrate_p_by_parts = true
block = 0
[../]
[./temperature_time0]
type = INSADHeatConductionTimeDerivative
variable = T0
block = 0
[../]
[./temperature_advection0]
type = INSADEnergyAdvection
variable = T0
block = 0
[../]
[./temperature_conduction0]
type = ADHeatConduction
variable = T0
thermal_conductivity = 'k'
block = 0
[../]
[./mass1]
type = INSADMass
variable = p1
block = 1
[../]
[./momentum_time1]
type = INSADMomentumTimeDerivative
variable = velocity1
block = 1
[../]
[./momentum_convection1]
type = INSADMomentumAdvection
variable = velocity1
block = 1
[../]
[./momentum_viscous1]
type = INSADMomentumViscous
variable = velocity1
block = 1
[../]
[./momentum_pressure1]
type = INSADMomentumPressure
variable = velocity1
pressure = p1
integrate_p_by_parts = true
block = 1
[../]
[./temperature_time1]
type = INSADHeatConductionTimeDerivative
variable = T1
block = 1
[../]
[./temperature_advection1]
type = INSADEnergyAdvection
variable = T1
block = 1
[../]
[./temperature_conduction1]
type = ADHeatConduction
variable = T1
thermal_conductivity = 'k'
block = 1
[../]
[]
[BCs]
[./no_slip0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'bottom_to_0 interface0 left'
[../]
[./lid0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'top_to_0'
function_x = 'lid_function0'
[../]
[./T_hot0]
type = DirichletBC
variable = T0
boundary = 'bottom_to_0'
value = 1
[../]
[./T_cold0]
type = DirichletBC
variable = T0
boundary = 'top_to_0'
value = 0
[../]
[./pressure_pin0]
type = DirichletBC
variable = p0
boundary = 'pinned_node_0'
value = 0
[../]
[./no_slip1]
type = VectorFunctionDirichletBC
variable = velocity1
boundary = 'bottom_to_1 interface1 right'
[../]
[./lid1]
type = VectorFunctionDirichletBC
variable = velocity1
boundary = 'top_to_1'
function_x = 'lid_function1'
[../]
[./T_hot1]
type = DirichletBC
variable = T1
boundary = 'bottom_to_1'
value = 1
[../]
[./T_cold1]
type = DirichletBC
variable = T1
boundary = 'top_to_1'
value = 0
[../]
[./pressure_pin1]
type = DirichletBC
variable = p1
boundary = 'pinned_node_1'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat0]
type = INSAD3Eqn
velocity = velocity0
pressure = p0
temperature = T0
block = 0
[]
[ins_mat1]
type = INSAD3Eqn
velocity = velocity1
pressure = p1
temperature = T1
block = 1
[]
[]
[Functions]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
[./lid_function0]
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[./lid_function1]
type = ParsedFunction
expression = '4*(x-1)*(2-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels -sub_pc_factor_shift_type'
petsc_options_value = 'asm 2 ilu 4 NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
exodus = true
[]
(test/tests/interfacekernels/ad_coupled_vector_value/coupled.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 20
xmax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[../]
[./interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[]
[Variables]
[./u]
block = '0'
family = LAGRANGE_VEC
[../]
[./v]
block = '1'
family = LAGRANGE_VEC
[../]
[w]
family = LAGRANGE_VEC
[]
[]
[Kernels]
[./diff_u]
type = VectorDiffusion
variable = u
block = 0
[../]
[./diff_v]
type = VectorDiffusion
variable = v
block = 1
[../]
[diff_w]
type = VectorDiffusion
variable = w
[]
[]
[InterfaceKernels]
[./interface]
type = ADVectorCoupledInterfacialSource
variable = u
neighbor_var = v
var_source = w
boundary = primary0_interface
D = 1
D_neighbor = 1
[../]
[]
[BCs]
[./left]
type = VectorDirichletBC
variable = u
boundary = 'left'
values = '0 0 0'
[../]
[./right]
type = VectorDirichletBC
variable = v
boundary = 'right'
values = '10 0 0'
[../]
[./middle]
type = ADVectorMatchedValueBC
variable = v
boundary = 'primary0_interface'
v = u
[../]
[w_left]
type = VectorDirichletBC
variable = w
boundary = 'left'
values = '0 0 0'
[]
[w_right]
type = VectorDirichletBC
variable = w
boundary = 'right'
values = '4 0 0'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_ktemp_1D.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
nx = 2
xmax = 2
[]
[split]
type = SubdomainBoundingBoxGenerator
input = mesh
block_id = 1
bottom_left = '1 0 0'
top_right = '2 0 0'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = split
primary_block = 1
paired_block = 0
new_boundary = 'interface0'
[]
uniform_refine = 4
[]
[Variables]
[T]
order = FIRST
family = MONOMIAL
[]
[]
[AuxVariables]
[Tbulk]
order = FIRST
family = LAGRANGE
initial_condition = 300 # K
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = T
diffusivity = conductivity
[]
[source]
type = BodyForce
variable = T
value = 1.0
[]
[]
[DGKernels]
[dg_diff]
type = DGDiffusion
variable = T
epsilon = -1
sigma = 6
diff = conductivity
exclude_boundary = 'interface0'
[]
[]
[InterfaceKernels]
[gap_var]
type = SideSetHeatTransferKernel
variable = T
neighbor_var = T
boundary = 'interface0'
Tbulk_var = Tbulk
[]
[]
[Functions]
# Defining temperature dependent fucntion for conductivity across side set
[kgap]
type = ParsedFunction
expression = 't / 200'
[]
[bc_func]
type = ConstantFunction
value = 300
[]
[exact]
type = ParsedFunction
expression = '
A := if(x < 1, -0.5, -0.25);
B := if(x < 1, -0.293209850655001, 0.0545267662299068);
C := if(x < 1, 300.206790149345, 300.19547323377);
d := -1;
A * (x+d) * (x+d) + B * (x+d) + C'
[]
[]
[BCs]
[bc_left]
type = DGFunctionDiffusionDirichletBC
boundary = 'left'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[bc_right]
type = DGFunctionDiffusionDirichletBC
boundary = 'right'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[]
[Materials]
[k0]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 1.0
block = 0
[]
[k1]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 2.0
block = 1
[]
[gap_mat]
type = SideSetHeatTransferMaterial
boundary = 'interface0'
# Using temperature dependent function for gap conductivity
conductivity_temperature_function = kgap
# Variable to evaluate conductivity with
gap_temperature = Tbulk
gap_length = 1.0
h_primary = 1
h_neighbor = 1
emissivity_primary = 1
emissivity_neighbor = 1
[]
[]
[Postprocessors]
[error]
type = ElementL2Error
variable = T
function = exact
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/block-restriction/two-mats-one-eqn-set.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = 0
ymax = 1
nx = 16
ny = 8
elem_type = QUAD9
[]
[./corner_node_0]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_0'
coord = '0 0 0'
input = gen
[../]
[./corner_node_1]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_1'
coord = '1 0 0'
input = corner_node_0
[../]
[./subdomain1]
input = corner_node_1
type = SubdomainBoundingBoxGenerator
bottom_left = '1 0 0'
top_right = '2 1 0'
block_id = 1
[../]
[./break_boundary]
input = subdomain1
type = BreakBoundaryOnSubdomainGenerator
[../]
[./interface0]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '0'
paired_block = '1'
new_boundary = 'interface0'
[../]
[./interface1]
type = SideSetsBetweenSubdomainsGenerator
input = interface0
primary_block = '1'
paired_block = '0'
new_boundary = 'interface1'
[../]
[]
[Variables]
[velocity0]
order = SECOND
family = LAGRANGE_VEC
[]
[T0]
order = SECOND
[InitialCondition]
type = ConstantIC
value = 1.0
[]
[]
[p0]
[]
[]
[Kernels]
[./mass0]
type = INSADMass
variable = p0
[../]
[./momentum_time0]
type = INSADMomentumTimeDerivative
variable = velocity0
[../]
[./momentum_convection0]
type = INSADMomentumAdvection
variable = velocity0
[../]
[./momentum_viscous0]
type = INSADMomentumViscous
variable = velocity0
[../]
[./momentum_pressure0]
type = INSADMomentumPressure
variable = velocity0
pressure = p0
integrate_p_by_parts = true
[../]
[./temperature_time0]
type = INSADHeatConductionTimeDerivative
variable = T0
[../]
[./temperature_advection0]
type = INSADEnergyAdvection
variable = T0
[../]
[./temperature_conduction0]
type = ADHeatConduction
variable = T0
thermal_conductivity = 'k'
[../]
[]
[BCs]
[./no_slip0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'bottom_to_0 interface0 left'
[../]
[./lid0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'top_to_0'
function_x = 'lid_function0'
[../]
[./T_hot0]
type = DirichletBC
variable = T0
boundary = 'bottom_to_0'
value = 1
[../]
[./T_cold0]
type = DirichletBC
variable = T0
boundary = 'top_to_0'
value = 0
[../]
[./pressure_pin0]
type = DirichletBC
variable = p0
boundary = 'pinned_node_0'
value = 0
[../]
[./no_slip1]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'bottom_to_1 interface1 right'
[../]
[./lid1]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'top_to_1'
function_x = 'lid_function1'
[../]
[./T_hot1]
type = DirichletBC
variable = T0
boundary = 'bottom_to_1'
value = 1
[../]
[./T_cold1]
type = DirichletBC
variable = T0
boundary = 'top_to_1'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat0]
type = INSAD3Eqn
velocity = velocity0
pressure = p0
temperature = T0
block = '0'
[]
[ins_mat1]
type = INSAD3Eqn
velocity = velocity0
pressure = p0
temperature = T0
block = '1'
[]
[]
[Functions]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
[./lid_function0]
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[./lid_function1]
type = ParsedFunction
expression = '4*(x-1)*(2-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels -sub_pc_factor_shift_type'
petsc_options_value = 'asm 2 ilu 4 NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
exodus = true
[]
(test/tests/interfacekernels/resid_jac_together/jump.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[break_boundary]
input = interface
type = BreakBoundaryOnSubdomainGenerator
[]
[]
[Variables]
[u]
block = 0
[]
[v]
block = 1
[]
[]
[Kernels]
[diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[]
[diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[]
[source_u]
type = BodyForce
variable = u
value = 1
[]
[]
[InterfaceKernels]
[interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[]
[]
[BCs]
[u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 right top'
[]
[v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
residual_and_jacobian_together = true
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/general_field/user_object/boundary/sub.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 5
ny = 5
nz = 5
xmax = 0.3
ymax = 0.3
zmax = 0.3
[]
[add_block]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x > 0.22 & y < 0.23'
block_id = 1
[]
[add_internal_sideset]
type = SideSetsBetweenSubdomainsGenerator
input = add_block
primary_block = 0
paired_block = 1
new_boundary = internal
[]
[]
[AuxVariables]
[from_main]
initial_condition = -1
[]
[from_main_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_main]
[InitialCondition]
type = FunctionIC
function = '3 + 2*x*x + 3*y*y*y'
[]
[]
[to_main_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '4 + 2*x*x + 3*y*y*y'
[]
[]
[]
[UserObjects]
[to_main]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_main
[]
[to_main_elem]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_main_elem
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
hide = 'to_main to_main_elem'
overwrite = true
[]
[]
(modules/phase_field/test/tests/misc/equal_gradient_lagrange.i)
#
# This test demonstrates an InterfaceKernel set that can enforce the componentwise
# continuity of the gradient of a variable using the Lagrange multiplier method.
#
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
ymax = 0.5
[]
[./box1]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '0.51 1 0'
input = gen
[../]
[./box2]
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '0.49 0 0'
top_right = '1 1 0'
input = box1
[../]
[./iface_u]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = 10
input = box2
[../]
[]
[Variables]
[./u2]
block = 1
[./InitialCondition]
type = FunctionIC
function = 'r:=sqrt((x-0.4)^2+(y-0.5)^2);if(r<0.05,5,1)'
[../]
[../]
[./v2]
block = 2
initial_condition = 0.8
[../]
[./lambda]
[../]
[]
[Kernels]
[./u2_diff]
type = Diffusion
variable = u2
block = 1
[../]
[./u2_dt]
type = TimeDerivative
variable = u2
block = 1
[../]
[./v2_diff]
type = Diffusion
variable = v2
block = 2
[../]
[./v2_dt]
type = TimeDerivative
variable = v2
block = 2
[../]
[./lambda]
type = NullKernel
variable = lambda
[../]
[]
[InterfaceKernels]
[./iface]
type = InterfaceDiffusionBoundaryTerm
boundary = 10
variable = u2
neighbor_var = v2
[../]
[./lambda]
type = EqualGradientLagrangeMultiplier
variable = lambda
boundary = 10
element_var = u2
neighbor_var = v2
component = 0
[../]
[./constraint]
type = EqualGradientLagrangeInterface
boundary = 10
lambda = lambda
variable = u2
neighbor_var = v2
component = 0
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[VectorPostprocessors]
[./uv]
type = LineValueSampler
variable = 'u2 v2'
start_point = '0 0.5 0'
end_point = '1 0.5 0'
sort_by = x
num_points = 100
[../]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pctype -sub_pc_type -sub_pc_factor_shift_type -pc_factor_shift_type'
petsc_options_value = ' asm lu nonzero nonzero'
dt = 0.002
num_steps = 10
[]
[Outputs]
exodus = true
csv = true
hide = lambda
print_linear_residuals = false
[]
(test/tests/fvkernels/mms/broken-domain/diffusion.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 2
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface_primary_side]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary_interface'
[]
[interface_secondary_side]
input = interface_primary_side
type = SideSetsBetweenSubdomainsGenerator
primary_block = '1'
paired_block = '0'
new_boundary = 'secondary_interface'
[]
[]
[Variables]
[u]
type = MooseVariableFVReal
block = 0
initial_condition = 0.5
[]
[v]
type = MooseVariableFVReal
block = 1
initial_condition = 0.5
[]
[]
[FVKernels]
[diff_left]
type = FVDiffusion
variable = u
coeff = 'left'
block = 0
[]
[diff_right]
type = FVDiffusion
variable = v
coeff = 'right'
block = 1
[]
[body_left]
type = FVBodyForce
variable = u
function = 'forcing'
block = 0
[]
[body_right]
type = FVBodyForce
variable = v
function = 'forcing'
block = 1
[]
[]
[FVInterfaceKernels]
# This will add a flux term for variable1, e.g. u
[interface]
type = FVOnlyAddDiffusionToOneSideOfInterface
variable1 = u
variable2 = v
boundary = 'primary_interface'
subdomain1 = '0'
subdomain2 = '1'
coeff2 = 'right'
[]
[]
[FVBCs]
[left]
type = FVFunctionDirichletBC
variable = u
boundary = 'left'
function = 'exact'
[]
[right]
type = FVFunctionDirichletBC
variable = v
boundary = 'right'
function = 'exact'
[]
[middle]
# by adding a dirichlet BC we ensure that flux kernels will run for variable v
type = FVADUseFunctorSideForSsfDirichletBC
variable = v
functor = u
boundary = 'secondary_interface'
[]
[]
[FunctorMaterials]
[block0]
type = ADGenericFunctorMaterial
block = '0'
prop_names = 'left'
prop_values = '1'
[]
[block1]
type = ADGenericFunctorMaterial
block = '1'
prop_names = 'right'
prop_values = '1'
[]
[composite]
type = ADPiecewiseByBlockFunctorMaterial
prop_name = 'composite'
subdomain_to_prop_value = '0 u 1 v'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm lu NONZERO'
[]
[Outputs]
exodus = true
csv = true
[]
[Functions]
[exact]
type = ParsedFunction
expression = '3*x^2 + 2*x + 1'
[]
[forcing]
type = ParsedFunction
expression = '-6'
[]
[]
[Postprocessors]
[error]
type = ElementL2FunctorError
approximate = composite
exact = exact
outputs = 'console csv'
[]
[h]
type = AverageElementSize
outputs = 'console csv'
[]
[]
(test/tests/outputs/debug/show_execution_kernels_bcs.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[left]
type = ParsedSubdomainMeshGenerator
input = 'gmg'
combinatorial_geometry = 'x < 0.5'
block_id = '2'
[]
[middle_boundary]
type = SideSetsBetweenSubdomainsGenerator
input = 'left'
primary_block = '0'
paired_block = '2'
new_boundary = 'middle'
[]
[]
[Functions]
[forcing_fnu]
type = ParsedFunction
expression = -5.8*(x+y)+x*x*x-x+y*y*y-y
[]
[forcing_fnv]
type = ParsedFunction
expression = -4
[]
[slnu]
type = ParsedGradFunction
expression = x*x*x-x+y*y*y-y
grad_x = 3*x*x-1
grad_y = 3*y*y-1
[]
[slnv]
type = ParsedGradFunction
expression = x*x+y*y
grad_x = 2*x
grad_y = 2*y
[]
# NeumannBC functions
[bc_fnut]
type = ParsedFunction
expression = 3*y*y-1
[]
[bc_fnub]
type = ParsedFunction
expression = -3*y*y+1
[]
[bc_fnul]
type = ParsedFunction
expression = -3*x*x+1
[]
[bc_fnur]
type = ParsedFunction
expression = 3*x*x-1
[]
[]
[Variables]
[u]
order = THIRD
family = HIERARCHIC
[]
[v]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
[]
[test1]
type = CoupledConvection
variable = u
velocity_vector = v
[]
[diff2]
type = Diffusion
variable = v
[]
[react]
type = Reaction
variable = u
[]
[forceu]
type = BodyForce
variable = u
function = forcing_fnu
[]
[forcev]
type = BodyForce
variable = v
function = forcing_fnv
[]
[]
[BCs]
[bc_v]
type = FunctionDirichletBC
variable = v
function = slnv
boundary = 'left right top bottom'
[]
[bc_u_tb]
type = CoupledKernelGradBC
variable = u
var2 = v
vel = '0.1 0.1'
boundary = 'top bottom left right'
[]
[bc_ul]
type = FunctionNeumannBC
variable = u
function = bc_fnul
boundary = 'left'
[]
[bc_ur]
type = FunctionNeumannBC
variable = u
function = bc_fnur
boundary = 'right'
[]
[bc_ut]
type = FunctionNeumannBC
variable = u
function = bc_fnut
boundary = 'top'
[]
[bc_ub]
type = FunctionNeumannBC
variable = u
function = bc_fnub
boundary = 'bottom'
[]
[]
[Dampers]
active = ''
[limit_v]
type = BoundingValueElementDamper
variable = v
max_value = 1.5
min_value = -20
[]
[limit_u]
type = BoundingValueElementDamper
variable = u
max_value = 1.5
min_value = -20
[]
[]
[InterfaceKernels]
[diff_ik_2]
type = InterfaceDiffusion
variable = 'u'
neighbor_var = 'v'
boundary = 'middle'
[]
[diff_ik_1]
type = InterfaceDiffusion
variable = 'v'
neighbor_var = 'u'
boundary = 'middle'
[]
[]
[DGKernels]
[diff_dg_2]
type = DGDiffusion
variable = 'u'
epsilon = -1
sigma = 6
[]
[diff_dg_1]
type = DGDiffusion
variable = 'u'
epsilon = -1
sigma = 6
[]
[]
[DiracKernels]
[source_2]
type = FunctionDiracSource
variable = 'u'
point = '0.1 0.1 0'
function = 'x + y'
[]
[source_1]
type = FunctionDiracSource
variable = 'u'
point = '0.1 0.1 0'
function = 'x + y'
block = '2'
[]
[source_0]
type = FunctionDiracSource
variable = 'u'
# in block 0, but since it's not block restricted it shows up as active in
# block 2 as well
point = '0.6 0.5 0'
function = 'x + y'
[]
[]
[Materials]
[diff]
type = GenericConstantMaterial
prop_names = 'D D_neighbor'
prop_values = '0 0'
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-15
nl_abs_tol = 1e-13
[]
[Debug]
show_execution_order = 'NONE ALWAYS INITIAL NONLINEAR LINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
[]
(test/tests/interfacekernels/1d_interface/ad-coupled-value-coupled-flux.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[]
[Variables]
[u]
block = '0'
[]
[v]
block = '1'
[]
[]
[Kernels]
[diff_u]
type = ADMatDiffusion
variable = u
diffusivity = 4
block = 0
[]
[diff_v]
type = ADMatDiffusion
variable = v
diffusivity = 2
block = 1
[]
[]
[InterfaceKernels]
[penalty_interface]
type = ADPenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
jump_prop_name = "jump"
[]
[]
[Materials]
[bulk]
type = ADPiecewiseByBlockFunctorMaterial
prop_name = 'functor_var_mat_prop'
subdomain_to_prop_value = '0 u 1 v'
[]
[bulk_traditional]
type = ScalarPropFromFunctorProp
functor = 'functor_var_mat_prop'
prop = 'var_mat_prop'
[]
[jump]
type = PropertyJumpInterfaceMaterial
property = var_mat_prop
boundary = primary0_interface
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = u
boundary = 'left'
value = 1
[]
[right]
type = ADDirichletBC
variable = v
boundary = 'right'
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]