- boundaryThe list of boundary IDs from the mesh where this object applies
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The list of boundary IDs from the mesh where this object applies
- variableThe name of the variable which this postprocessor integrates
C++ Type:std::vector<VariableName>
Controllable:No
Description:The name of the variable which this postprocessor integrates
SideAverageValue
Computes the average value of a variable on a sideset. Note that this cannot be used on the centerline of an axisymmetric model.
Description
SideAverageValue
computes the area- or volume-weighted average of the integral of the specified variable. It may be used, for example, to calculate the average temperature over a side set.
SideAverageValue
is not suitable for use when computing the average integral value of a variable when one of the coordinates in the sideset has a value of zero. In those cases, such as when computing the value of a variable on the centerline of an axisymmetric simulation, use AxisymmetricCenterlineAverageValue
Example Input Syntax
[Postprocessors]
[./ave_stress_bottom]
type = SideAverageValue
variable = stress_yy
boundary = bottom
[../]
[./ave_strain_bottom]
type = SideAverageValue
variable = strain_yy
boundary = bottom
[../]
[]
(modules/solid_mechanics/tutorials/basics/part_2.3.i)Input Parameters
- execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
Default:TIMESTEP_END
C++ Type:ExecFlagEnum
Options:FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, TRANSFER
Controllable:No
Description:The list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Default:False
C++ Type:bool
Controllable:No
Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Optional Parameters
- allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
Default:False
C++ Type:bool
Controllable:No
Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
Default:0
C++ Type:int
Controllable:No
Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
- force_postauxFalseForces the UserObject to be executed in POSTAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in POSTAUX
- force_preauxFalseForces the UserObject to be executed in PREAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREAUX
- force_preicFalseForces the UserObject to be executed in PREIC during initial setup
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREIC during initial setup
- outputsVector of output names where you would like to restrict the output of variables(s) associated with this object
C++ Type:std::vector<OutputName>
Controllable:No
Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Advanced Parameters
Input Files
- (modules/heat_transfer/test/tests/multiple_contact_pairs/multiple_contact_pairs.i)
- (modules/combined/examples/phase_field-mechanics/kks_mechanics_VTS.i)
- (modules/thermal_hydraulics/test/tests/components/volume_junction_1phase/phy.form_loss.i)
- (test/tests/mesh/named_entities/named_entities_test_xda.i)
- (modules/combined/test/tests/ad_cavity_pressure/additional_volume.i)
- (modules/navier_stokes/test/tests/finite_volume/two_phase/mixture_model/channel-drift-flux-transient.i)
- (modules/navier_stokes/test/tests/finite_volume/pwcns/channel-flow/2d-transient.i)
- (test/tests/multiapps/secant_postprocessor/transient_sub.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_radiation_test.i)
- (test/tests/functions/pps_function/pp_function.i)
- (test/tests/multiapps/secant_postprocessor/transient_main.i)
- (modules/navier_stokes/test/tests/postprocessors/flow_rates/mass_flux_weighted_pp.i)
- (modules/functional_expansion_tools/examples/2D_interface_no_material/main.i)
- (modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/lps_single.i)
- (modules/navier_stokes/test/tests/postprocessors/pressure_drop/drop_insfv.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_base/interior_axial_boundaries.i)
- (modules/heat_transfer/test/tests/radiation_transfer_action/radiative_transfer_no_action.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/mms/porosity_change/1d-rc-continuous.i)
- (modules/thermal_hydraulics/tutorials/single_phase_flow/05_secondary_side.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_htonly/cyl2D.i)
- (modules/combined/test/tests/cavity_pressure/rz.i)
- (modules/heat_transfer/test/tests/heat_source_bar/ad_heat_source_bar.i)
- (test/tests/postprocessors/side_average_value/side_average_value_test.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_htonly/planar_yz.i)
- (modules/combined/test/tests/misc/re_init_face.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_2d_radiation_coupler_rz/heat_structure_2d_radiation_coupler_rz.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_3D_mortar.i)
- (modules/thermal_hydraulics/test/tests/components/volume_junction_1phase/phy.deadend.i)
- (modules/solid_mechanics/test/tests/uel/test.i)
- (modules/heat_transfer/test/tests/radiation_transfer_action/radiative_transfer_action_external_boundary_ray_tracing.i)
- (modules/solid_mechanics/test/tests/ad_thermal_expansion_function/mean.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_sphere3D_mortar.i)
- (modules/solid_mechanics/test/tests/uel/small.i)
- (modules/heat_transfer/test/tests/directional_flux_bc/2d.i)
- (modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/gtn_single.i)
- (modules/solid_mechanics/test/tests/radial_disp_aux/sphere_3d_cartesian.i)
- (modules/heat_transfer/test/tests/radiative_bcs/function_radiative_bc.i)
- (modules/navier_stokes/test/tests/finite_volume/pwcns/channel-flow/2d-transient-action.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_htonly/cyl2D_xz.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/heated/2d-transient.i)
- (modules/thermal_hydraulics/test/tests/components/junction_one_to_one_1phase/junction_one_to_one_1phase.i)
- (test/tests/multiapps/picard_postprocessor/transient_sub.i)
- (modules/navier_stokes/test/tests/finite_element/pins/channel-flow/pressure_gradient.i)
- (modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/creep.i)
- (modules/thermal_hydraulics/test/tests/postprocessors/specific_impulse_1phase/Isp_1ph.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_sphere3D.i)
- (modules/thermal_hydraulics/tutorials/single_phase_flow/02_core.i)
- (modules/combined/test/tests/ad_cavity_pressure/3d.i)
- (modules/heat_transfer/test/tests/convective_heat_flux/t_inf.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_htonly/gap_heat_transfer_htonly_syntax.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/heated/2d-rc-heated-disp-system.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/heated/2d-rc-heated.i)
- (modules/combined/test/tests/phase_field_fracture/crack2d_aniso_hist_false.i)
- (modules/thermal_hydraulics/test/tests/components/junction_parallel_channels_1phase/phy.unequal_area.i)
- (modules/functional_expansion_tools/examples/2D_interface/main.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/heated/2d-rc-heated-effective-action.i)
- (modules/solid_mechanics/tutorials/basics/part_3_1.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere.i)
- (modules/solid_mechanics/test/tests/thermal_expansion_function/mean.i)
- (modules/thermal_hydraulics/test/tests/components/junction_parallel_channels_1phase/conservation.i)
- (modules/combined/test/tests/cavity_pressure/multiple_postprocessors.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/bernoulli-2d.i)
- (test/tests/multiapps/steffensen_postprocessor/steady_main.i)
- (modules/navier_stokes/test/tests/finite_volume/pwcns/channel-flow/2d-transient-gas.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/2d-rc-epsjump.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/heated/2d-rc-heated-action.i)
- (modules/combined/test/tests/cavity_pressure/3d.i)
- (modules/combined/test/tests/ad_cavity_pressure/initial_temperature.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/bernoulli-1d.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/1d-rc-epsjump.i)
- (modules/thermal_hydraulics/test/tests/components/form_loss_from_function_1phase/phy.form_loss_1phase.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/bernoulli-1d-parsed-function.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_htonly/planar_xy.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_radiation/gap_heat_transfer_radiation_test.i)
- (modules/thermal_hydraulics/tutorials/single_phase_flow/01_flow_channel.i)
- (test/tests/functions/parsed/steady.i)
- (modules/combined/test/tests/cavity_pressure/initial_temperature.i)
- (modules/navier_stokes/test/tests/finite_element/pins/channel-flow/pm_friction.i)
- (modules/combined/test/tests/ad_cavity_pressure/rz.i)
- (test/tests/userobjects/side_user_object_no_boundary_error/side_no_boundary.i)
- (test/tests/multiapps/steffensen_postprocessor/steady_sub.i)
- (modules/thermal_hydraulics/test/tests/misc/coupling_mD_flow/thm_non_overlapping.i)
- (modules/combined/examples/effective_properties/effective_th_cond.i)
- (modules/combined/test/tests/phase_field_fracture/crack2d_computeCrackedStress_smallstrain.i)
- (modules/combined/test/tests/phase_field_fracture/crack2d_computeCrackedStress_finitestrain_plastic.i)
- (modules/solid_mechanics/test/tests/radial_disp_aux/sphere_2d_axisymmetric.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/materials/2d-rc-action.i)
- (modules/solid_mechanics/test/tests/thermal_expansion_function/dilatation.i)
- (modules/navier_stokes/test/tests/finite_volume/controls/switch-pressure-bc/test.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/mms/1d-rc.i)
- (modules/heat_transfer/test/tests/convective_heat_flux/coupled.i)
- (test/tests/userobjects/interface_user_object/interface_value_user_object_QP.i)
- (test/tests/mesh/named_entities/named_entities_test.i)
- (modules/solid_mechanics/test/tests/uel/small_test_uel_states_fields_gradient.i)
- (modules/solid_mechanics/test/tests/uel/small_test_expanded_umat.i)
- (modules/solid_mechanics/test/tests/radial_disp_aux/cylinder_2d_axisymmetric.i)
- (test/tests/multiapps/secant_postprocessor/steady_sub.i)
- (modules/solid_mechanics/test/tests/torque/ad_torque_small.i)
- (modules/combined/test/tests/cavity_pressure/rz_abs_ref.i)
- (modules/solid_mechanics/test/tests/radial_disp_aux/cylinder_2d_cartesian.i)
- (modules/thermal_hydraulics/test/tests/components/simple_turbine_1phase/phy.conservation.i)
- (modules/heat_transfer/test/tests/convective_heat_flux/equilibrium.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/heated/2d-rc-heated-boussinesq.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/heated/2d-transient-action.i)
- (modules/solid_mechanics/test/tests/uel/small_test_uel_states_fields.i)
- (modules/thermal_hydraulics/tutorials/single_phase_flow/04_loop.i)
- (modules/navier_stokes/test/tests/finite_volume/materials/ergun/ergun.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/heated/2d-rc-heated-boussinesq-action.i)
- (modules/heat_transfer/test/tests/directional_flux_bc/3d.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/stagnation_inlet/supersonic_nozzle_hllc.i)
- (modules/scalar_transport/test/tests/multiple-species/single-specie.i)
- (modules/heat_transfer/test/tests/radiation_transfer_action/radiative_transfer_action_external_boundary.i)
- (modules/thermal_hydraulics/test/tests/actions/coupled_heat_transfer_action/master.i)
- (test/tests/misc/ad_curvature/test.i)
- (modules/solid_mechanics/test/tests/radial_disp_aux/cylinder_3d_cartesian.i)
- (modules/combined/test/tests/cavity_pressure/additional_volume.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/1d-rc.i)
- (modules/combined/test/tests/phase_field_fracture/crack2d_aniso_cleavage_plane.i)
- (modules/solid_mechanics/test/tests/uel/reference.i)
- (modules/heat_transfer/test/tests/recover/ad_recover.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_htonly/gap_heat_transfer_htonly_rspherical.i)
- (modules/solid_mechanics/test/tests/action/material_output_order.i)
- (test/tests/multiapps/steffensen_postprocessor/transient_main.i)
- (modules/solid_mechanics/test/tests/uel/small_test_umat_states_fields.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/stress_update_material_based/use_substep_dt.i)
- (test/tests/userobjects/side_user_object_no_boundary_error/lower_d_side_boundary.i)
- (modules/thermal_hydraulics/test/tests/components/volume_junction_1phase/phy.unequal_area.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/2d-rc-rz-by-parts.i)
- (modules/solid_mechanics/test/tests/ad_thermal_expansion_function/mean_complex.i)
- (modules/navier_stokes/test/tests/finite_element/pins/channel-flow/pm_heat_source.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_htonly/sphere2DRZ.i)
- (modules/thermal_hydraulics/test/tests/components/volume_junction_1phase/junction_with_calorifically_imperfect_gas.i)
- (modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/lps_dual.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/bernoulli-2d-action.i)
- (modules/combined/examples/phase_field-mechanics/kks_mechanics_KHS.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_htonly/gap_heat_transfer_htonly_test.i)
- (test/tests/controls/time_periods/user_objects/user_object.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_htonly/planar_xz.i)
- (modules/heat_transfer/test/tests/heat_source_bar/heat_source_bar.i)
- (modules/heat_transfer/test/tests/ad_convective_heat_flux/coupled.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_htonly/cyl2D_yz.i)
- (modules/navier_stokes/test/tests/finite_element/pins/channel-flow/pm_reverse_flow.i)
- (modules/thermal_hydraulics/test/tests/components/pump_1phase/pump_pressure_check.i)
- (modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/lps_single_split.i)
- (test/tests/misc/ad_curvature/test-circle.i)
- (tutorials/darcy_thermo_mech/step10_multiapps/problems/step10_micro.i)
- (modules/porous_flow/test/tests/sinks/PorousFlowPiecewiseLinearSink_BC_eg1.i)
- (modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/negative_porosity.i)
- (test/tests/multiapps/picard_postprocessor/transient_main.i)
- (test/tests/multiapps/secant_postprocessor/steady_main.i)
- (modules/heat_transfer/test/tests/radiation_transfer_action/radiative_transfer_action.i)
- (modules/solid_mechanics/tutorials/basics/part_2.4.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/2d-rc-friction.i)
- (modules/navier_stokes/test/tests/postprocessors/pressure_drop/drop_insad.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_htonly/cyl3D.i)
- (modules/heat_transfer/test/tests/recover/recover.i)
- (test/tests/multiapps/picard_postprocessor/steady_main.i)
- (modules/thermal_hydraulics/test/tests/controls/copy_postprocessor_value_control/test.i)
- (modules/solid_mechanics/test/tests/uel/small_test_umat_states_fields_gradient.i)
- (test/tests/multiapps/picard_postprocessor/steady_sub.i)
- (modules/solid_mechanics/test/tests/uel/small_test_expanded.i)
- (test/tests/multiapps/steffensen_postprocessor/transient_sub.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/pressure_outlet/subsonic_nozzle_fixed_inflow_hllc.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/heated/2d-rc-heated-effective.i)
- (modules/functional_expansion_tools/examples/2D_interface_different_submesh/main.i)
- (modules/solid_mechanics/test/tests/thermal_expansion_function/instantaneous.i)
- (modules/solid_mechanics/test/tests/ad_thermal_expansion_function/instantaneous_complex.i)
- (modules/thermal_hydraulics/test/tests/components/junction_parallel_channels_1phase/junction_with_calorifically_imperfect_gas.i)
- (modules/porous_flow/examples/ates/ates.i)
- (modules/solid_mechanics/test/tests/ad_thermal_expansion_function/dilatation.i)
- (modules/thermal_hydraulics/test/tests/components/flow_component_ns/flow_component_ns_pinc.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/bernoulli-1d-functor-material.i)
- (modules/combined/test/tests/ad_cavity_pressure/multiple_postprocessors.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_htonly/sphere3D.i)
- (test/tests/controls/pid_control/pid_control.i)
- (modules/heat_transfer/test/tests/radiative_bcs/ad_function_radiative_bc.i)
- (modules/solid_mechanics/test/tests/uel/small_test.i)
- (modules/solid_mechanics/test/tests/ad_thermal_expansion_function/instantaneous.i)
- (modules/functional_expansion_tools/test/tests/standard_use/interface_coupled.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_htonly/gap_heat_transfer_htonly_rz_test.i)
- (modules/combined/test/tests/phase_field_fracture/crack2d_aniso.i)
- (test/tests/userobjects/element_subdomain_modifier/initial_condition.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere_mortar_error.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere_mortar.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/materials/2d-rc.i)
- (modules/navier_stokes/test/tests/finite_volume/wcns/boundary_conditions/with-direction/flux_bcs-direction-action.i)
- (modules/solid_mechanics/test/tests/torque/torque_small.i)
- (modules/solid_mechanics/tutorials/basics/part_2.3.i)
- (modules/phase_field/examples/measure_interface_energy/1Dinterface_energy.i)
- (modules/combined/test/tests/phase_field_fracture/crack2d_computeCrackedStress_finitestrain_elastic.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_htonly/gap_heat_transfer_htonly_it_plot_test.i)
- (modules/heat_transfer/test/tests/thermal_materials/2d.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_3D.i)
- (modules/thermal_hydraulics/tutorials/single_phase_flow/06_custom_closures.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/user_object_based/use_substep_dt.i)
- (modules/heat_transfer/test/tests/ad_convective_heat_flux/equilibrium.i)
- (modules/thermal_hydraulics/tutorials/single_phase_flow/03_upper_loop.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_balance/large_gap_heat_transfer_test_sphere.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/linear_friction.i)
Child Objects
(modules/solid_mechanics/tutorials/basics/part_2.3.i)
#Tensor Mechanics tutorial: the basics
#Step 2, part 3
#2D axisymmetric RZ simulation of uniaxial tension with J2 plasticity with no
#hardening
[GlobalParams]
displacements = 'disp_r disp_z'
[]
[Problem]
coord_type = RZ
[]
[Mesh]
file = necking_quad4.e
uniform_refine = 0
second_order = true
[]
[Physics/SolidMechanics/QuasiStatic]
[./block1]
strain = FINITE
add_variables = true
generate_output = 'stress_yy strain_yy' #use the yy option to get the zz component in axisymmetric coords
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeMultiPlasticityStress
ep_plastic_tolerance = 1e-9
plastic_models = J2
[../]
[]
[UserObjects]
[./str]
type = SolidMechanicsHardeningConstant
value = 2.4e2
[../]
[./J2]
type = SolidMechanicsPlasticJ2
yield_strength = str
yield_function_tolerance = 1E-3
internal_constraint_tolerance = 1E-9
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = disp_r
boundary = left
value = 0.0
[../]
[./bottom]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0.0
[../]
[./top]
type = FunctionDirichletBC
variable = disp_z
boundary = top
function = '0.0007*t'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
dt = 0.25
end_time = 20
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -sub_pc_type -pc_asm_overlap -ksp_gmres_restart'
petsc_options_value = 'asm lu 1 101'
[]
[Postprocessors]
[./ave_stress_bottom]
type = SideAverageValue
variable = stress_yy
boundary = bottom
[../]
[./ave_strain_bottom]
type = SideAverageValue
variable = strain_yy
boundary = bottom
[../]
[]
[Outputs]
exodus = true
perf_graph = true
csv = true
print_linear_residuals = false
[]
(modules/heat_transfer/test/tests/multiple_contact_pairs/multiple_contact_pairs.i)
[Mesh]
file = 3blk.e
[]
[Functions]
[temperature]
type = PiecewiseLinear
x = '0 1 2'
y = '100 300 300'
[]
[]
[ThermalContact]
[thermal_contact]
type = GapHeatTransfer
variable = temperature
primary = '101 201'
secondary = '100 200'
emissivity_primary = 0
emissivity_secondary = 0
gap_conductance = 1.0e9
[]
[]
[Variables]
[temperature]
order = FIRST
family = LAGRANGE
initial_condition = 100
[]
[]
[AuxVariables]
[gap_cond]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[heat]
type = HeatConduction
variable = temperature
[]
[]
[BCs]
[temp_far_left]
type = FunctionDirichletBC
boundary = '101 201'
variable = temperature
function = temperature
[]
[temp_far_right]
type = DirichletBC
boundary = 'left right'
variable = temperature
value = 100
[]
[]
[AuxKernels]
[conductance]
type = MaterialRealAux
property = gap_conductance
variable = gap_cond
boundary = 100
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2 3'
specific_heat = 1.0
thermal_conductivity = 100000000.0
[]
[density]
type = GenericConstantMaterial
block = '1 2 3'
prop_names = 'density'
prop_values = '1.0'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 4'
line_search = 'none'
nl_rel_tol = 1e-8
l_tol = 1e-3
l_max_its = 100
dt = 1e-1
end_time = 1.0
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = 100
variable = temperature
execute_on = 'initial timestep_end'
[]
[temp_right]
type = SideAverageValue
boundary = 200
variable = temperature
execute_on = 'initial timestep_end'
[]
[flux_left]
type = SideDiffusiveFluxIntegral
variable = temperature
boundary = 100
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[]
[flux_right]
type = SideDiffusiveFluxIntegral
variable = temperature
boundary = 200
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/combined/examples/phase_field-mechanics/kks_mechanics_VTS.i)
# KKS phase-field model coupled with elasticity using the Voigt-Taylor scheme as
# described in L.K. Aagesen et al., Computational Materials Science, 140, 10-21 (2017)
# Original run #170329e
[Mesh]
type = GeneratedMesh
dim = 3
nx = 640
ny = 1
nz = 1
xmin = -10
xmax = 10
ymin = 0
ymax = 0.03125
zmin = 0
zmax = 0.03125
elem_type = HEX8
[]
[Variables]
# order parameter
[./eta]
order = FIRST
family = LAGRANGE
[../]
# solute concentration
[./c]
order = FIRST
family = LAGRANGE
[../]
# chemical potential
[./w]
order = FIRST
family = LAGRANGE
[../]
# solute phase concentration (matrix)
[./cm]
order = FIRST
family = LAGRANGE
[../]
# solute phase concentration (precipitate)
[./cp]
order = FIRST
family = LAGRANGE
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./eta_ic]
variable = eta
type = FunctionIC
function = ic_func_eta
block = 0
[../]
[./c_ic]
variable = c
type = FunctionIC
function = ic_func_c
block = 0
[../]
[./w_ic]
variable = w
type = ConstantIC
value = 0.00991
block = 0
[../]
[./cm_ic]
variable = cm
type = ConstantIC
value = 0.131
block = 0
[../]
[./cp_ic]
variable = cp
type = ConstantIC
value = 0.236
block = 0
[../]
[]
[Functions]
[./ic_func_eta]
type = ParsedFunction
expression = '0.5*(1.0+tanh((x)/delta_eta/sqrt(2.0)))'
symbol_names = 'delta_eta'
symbol_values = '0.8034'
[../]
[./ic_func_c]
type = ParsedFunction
expression = '0.2388*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^3*(6*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^2-15*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))+10)+0.1338*(1-(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^3*(6*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^2-15*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))+10))'
symbol_names = 'delta'
symbol_values = '0.8034'
[../]
[./psi_eq_int]
type = ParsedFunction
expression = 'volume*psi_alpha'
symbol_names = 'volume psi_alpha'
symbol_values = 'volume psi_alpha'
[../]
[./gamma]
type = ParsedFunction
expression = '(psi_int - psi_eq_int) / dy / dz'
symbol_names = 'psi_int psi_eq_int dy dz'
symbol_values = 'psi_int psi_eq_int 0.03125 0.03125'
[../]
[]
[AuxVariables]
[./sigma11]
order = CONSTANT
family = MONOMIAL
[../]
[./sigma22]
order = CONSTANT
family = MONOMIAL
[../]
[./sigma33]
order = CONSTANT
family = MONOMIAL
[../]
[./e11]
order = CONSTANT
family = MONOMIAL
[../]
[./e12]
order = CONSTANT
family = MONOMIAL
[../]
[./e22]
order = CONSTANT
family = MONOMIAL
[../]
[./e33]
order = CONSTANT
family = MONOMIAL
[../]
[./e_el11]
order = CONSTANT
family = MONOMIAL
[../]
[./e_el12]
order = CONSTANT
family = MONOMIAL
[../]
[./e_el22]
order = CONSTANT
family = MONOMIAL
[../]
[./f_el]
order = CONSTANT
family = MONOMIAL
[../]
[./eigen_strain00]
order = CONSTANT
family = MONOMIAL
[../]
[./Fglobal]
order = CONSTANT
family = MONOMIAL
[../]
[./psi]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./matl_sigma11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = sigma11
[../]
[./matl_sigma22]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = sigma22
[../]
[./matl_sigma33]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = sigma33
[../]
[./matl_e11]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 0
index_j = 0
variable = e11
[../]
[./matl_e12]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 0
index_j = 1
variable = e12
[../]
[./matl_e22]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 1
index_j = 1
variable = e22
[../]
[./matl_e33]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 2
index_j = 2
variable = e33
[../]
[./f_el]
type = MaterialRealAux
variable = f_el
property = f_el_mat
execute_on = timestep_end
[../]
[./GlobalFreeEnergy]
variable = Fglobal
type = KKSGlobalFreeEnergy
fa_name = fm
fb_name = fp
w = 0.0264
kappa_names = kappa
interfacial_vars = eta
[../]
[./psi_potential]
variable = psi
type = ParsedAux
coupled_variables = 'Fglobal w c f_el sigma11 e11'
expression = 'Fglobal - w*c + f_el - sigma11*e11'
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = right
value = 0
[../]
[./front_y]
type = DirichletBC
variable = disp_y
boundary = front
value = 0
[../]
[./back_y]
type = DirichletBC
variable = disp_y
boundary = back
value = 0
[../]
[./top_z]
type = DirichletBC
variable = disp_z
boundary = top
value = 0
[../]
[./bottom_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0
[../]
[]
[Materials]
# Chemical free energy of the matrix
[./fm]
type = DerivativeParsedMaterial
property_name = fm
coupled_variables = 'cm'
expression = '6.55*(cm-0.13)^2'
[../]
# Elastic energy of the matrix
[./elastic_free_energy_m]
type = ElasticEnergyMaterial
base_name = matrix
f_name = fe_m
args = ' '
outputs = exodus
[../]
# Total free energy of the matrix
[./Total_energy_matrix]
type = DerivativeSumMaterial
property_name = f_total_matrix
sum_materials = 'fm fe_m'
coupled_variables = 'cm'
[../]
# Free energy of the precipitate phase
[./fp]
type = DerivativeParsedMaterial
property_name = fp
coupled_variables = 'cp'
expression = '6.55*(cp-0.235)^2'
[../]
# Elastic energy of the precipitate
[./elastic_free_energy_p]
type = ElasticEnergyMaterial
base_name = ppt
f_name = fe_p
args = ' '
outputs = exodus
[../]
# Total free energy of the precipitate
[./Total_energy_ppt]
type = DerivativeSumMaterial
property_name = f_total_ppt
sum_materials = 'fp fe_p'
coupled_variables = 'cp'
[../]
# Total elastic energy
[./Total_elastic_energy]
type = DerivativeTwoPhaseMaterial
eta = eta
f_name = f_el_mat
fa_name = fe_m
fb_name = fe_p
outputs = exodus
W = 0
[../]
# h(eta)
[./h_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta
[../]
# g(eta)
[./g_eta]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'M L kappa misfit'
prop_values = '0.7 0.7 0.01704 0.00377'
[../]
#Mechanical properties
[./Stiffness_matrix]
type = ComputeElasticityTensor
C_ijkl = '103.3 74.25 74.25 103.3 74.25 103.3 46.75 46.75 46.75'
base_name = matrix
fill_method = symmetric9
[../]
[./Stiffness_ppt]
type = ComputeElasticityTensor
C_ijkl = '100.7 71.45 71.45 100.7 71.45 100.7 50.10 50.10 50.10'
base_name = ppt
fill_method = symmetric9
[../]
[./stress_matrix]
type = ComputeLinearElasticStress
base_name = matrix
[../]
[./stress_ppt]
type = ComputeLinearElasticStress
base_name = ppt
[../]
[./strain_matrix]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
base_name = matrix
[../]
[./strain_ppt]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
base_name = ppt
eigenstrain_names = 'eigenstrain_ppt'
[../]
[./eigen_strain]
type = ComputeEigenstrain
base_name = ppt
eigen_base = '1 1 1 0 0 0'
prefactor = misfit
eigenstrain_name = 'eigenstrain_ppt'
[../]
[./global_stress]
type = TwoPhaseStressMaterial
base_A = matrix
base_B = ppt
[../]
[./global_strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
[../]
[]
[Kernels]
[./TensorMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
# enforce c = (1-h(eta))*cm + h(eta)*cp
[./PhaseConc]
type = KKSPhaseConcentration
ca = cm
variable = cp
c = c
eta = eta
[../]
# enforce pointwise equality of chemical potentials
[./ChemPotVacancies]
type = KKSPhaseChemicalPotential
variable = cm
cb = cp
fa_name = f_total_matrix
fb_name = f_total_ppt
[../]
#
# Cahn-Hilliard Equation
#
[./CHBulk]
type = KKSSplitCHCRes
variable = c
ca = cm
fa_name = f_total_matrix
w = w
[../]
[./dcdt]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./ckernel]
type = SplitCHWRes
mob_name = M
variable = w
[../]
#
# Allen-Cahn Equation
#
[./ACBulkF]
type = KKSACBulkF
variable = eta
fa_name = f_total_matrix
fb_name = f_total_ppt
w = 0.0264
args = 'cp cm'
[../]
[./ACBulkC]
type = KKSACBulkC
variable = eta
ca = cm
cb = cp
fa_name = f_total_matrix
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = kappa
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm ilu nonzero'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-11
num_steps = 200
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.5
[../]
[]
[VectorPostprocessors]
#[./eta]
# type = LineValueSampler
# start_point = '-10 0 0'
# end_point = '10 0 0'
# variable = eta
# num_points = 321
# sort_by = id
#[../]
#[./eta_position]
# type = FindValueOnLineSample
# vectorpostprocessor = eta
# variable_name = eta
# search_value = 0.5
#[../]
# [./f_el]
# type = LineMaterialRealSampler
# start = '-20 0 0'
# end = '20 0 0'
# sort_by = id
# property = f_el
# [../]
# [./f_el_a]
# type = LineMaterialRealSampler
# start = '-20 0 0'
# end = '20 0 0'
# sort_by = id
# property = fe_m
# [../]
# [./f_el_b]
# type = LineMaterialRealSampler
# start = '-20 0 0'
# end = '20 0 0'
# sort_by = id
# property = fe_p
# [../]
# [./h_out]
# type = LineMaterialRealSampler
# start = '-20 0 0'
# end = '20 0 0'
# sort_by = id
# property = h
# [../]
# [./fm_out]
# type = LineMaterialRealSampler
# start = '-20 0 0'
# end = '20 0 0'
# sort_by = id
# property = fm
# [../]
[]
[Postprocessors]
[./f_el_int]
type = ElementIntegralMaterialProperty
mat_prop = f_el_mat
[../]
[./c_alpha]
type = SideAverageValue
boundary = left
variable = c
[../]
[./c_beta]
type = SideAverageValue
boundary = right
variable = c
[../]
[./e11_alpha]
type = SideAverageValue
boundary = left
variable = e11
[../]
[./e11_beta]
type = SideAverageValue
boundary = right
variable = e11
[../]
[./s11_alpha]
type = SideAverageValue
boundary = left
variable = sigma11
[../]
[./s22_alpha]
type = SideAverageValue
boundary = left
variable = sigma22
[../]
[./s33_alpha]
type = SideAverageValue
boundary = left
variable = sigma33
[../]
[./s11_beta]
type = SideAverageValue
boundary = right
variable = sigma11
[../]
[./s22_beta]
type = SideAverageValue
boundary = right
variable = sigma22
[../]
[./s33_beta]
type = SideAverageValue
boundary = right
variable = sigma33
[../]
[./f_el_alpha]
type = SideAverageValue
boundary = left
variable = f_el
[../]
[./f_el_beta]
type = SideAverageValue
boundary = right
variable = f_el
[../]
[./f_c_alpha]
type = SideAverageValue
boundary = left
variable = Fglobal
[../]
[./f_c_beta]
type = SideAverageValue
boundary = right
variable = Fglobal
[../]
[./chem_pot_alpha]
type = SideAverageValue
boundary = left
variable = w
[../]
[./chem_pot_beta]
type = SideAverageValue
boundary = right
variable = w
[../]
[./psi_alpha]
type = SideAverageValue
boundary = left
variable = psi
[../]
[./psi_beta]
type = SideAverageValue
boundary = right
variable = psi
[../]
[./total_energy]
type = ElementIntegralVariablePostprocessor
variable = Fglobal
[../]
# Get simulation cell size from postprocessor
[./volume]
type = ElementIntegralMaterialProperty
mat_prop = 1
[../]
[./psi_eq_int]
type = FunctionValuePostprocessor
function = psi_eq_int
[../]
[./psi_int]
type = ElementIntegralVariablePostprocessor
variable = psi
[../]
[./gamma]
type = FunctionValuePostprocessor
function = gamma
[../]
[]
#
# Precondition using handcoded off-diagonal terms
#
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Outputs]
[./exodus]
type = Exodus
time_step_interval = 20
[../]
[./csv]
type = CSV
execute_on = 'final'
[../]
#[./console]
# type = Console
# output_file = true
# [../]
[]
(modules/thermal_hydraulics/test/tests/components/volume_junction_1phase/phy.form_loss.i)
# This test measures the pressure drop across the volume junction with K=1.
A = 0.1
[GlobalParams]
gravity_vector = '0 0 0'
scaling_factor_1phase = '1 1 1e-5'
scaling_factor_rhoV = 1
scaling_factor_rhouV = 1
scaling_factor_rhovV = 1
scaling_factor_rhowV = 1
scaling_factor_rhoEV = 1e-5
initial_T = 300
initial_p = 1e5
initial_vel = 1
n_elems = 20
length = 1
f = 0
fp = fp
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 1.4
cv = 725
q = 0
q_prime = 0
p_inf = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[K_fn]
type = TimeRampFunction
initial_value = 0
initial_time = 2
ramp_duration = 5
final_value = 1
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
A = ${A}
[]
[pipe2]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '1 0 0'
A = ${A}
initial_p = 1e5
[]
[junction]
type = VolumeJunction1Phase
connections = 'pipe1:out pipe2:in'
position = '1 0 0'
volume = 0.005
initial_p = 1e5
initial_vel_x = 1
initial_vel_y = 0
initial_vel_z = 0
[]
[pipe1_in]
type = InletVelocityTemperature1Phase
input = 'pipe1:in'
vel = 1
T = 300
[]
[pipe2_out]
type = Outlet1Phase
input = 'pipe2:out'
p = 1e5
[]
[]
[ControlLogic]
active = ''
[K_crtl]
type = TimeFunctionComponentControl
component = junction
parameter = K
function = K_fn
[]
[]
[Postprocessors]
[pJ_in]
type = SideAverageValue
variable = p
boundary = pipe1:out
[]
[pJ_out]
type = SideAverageValue
variable = p
boundary = pipe2:in
[]
[dpJ]
type = DifferencePostprocessor
value1 = pJ_in
value2 = pJ_out
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
end_time = 20
dt = 0.5
abort_on_solve_fail = true
solve_type = 'NEWTON'
nl_rel_tol = 0
nl_abs_tol = 1e-8
nl_max_its = 15
l_tol = 1e-3
l_max_its = 10
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
csv = true
execute_on = 'final'
show = 'dpJ'
[]
(test/tests/mesh/named_entities/named_entities_test_xda.i)
[Mesh]
file = named_entities.xda
uniform_refine = 1
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
block = '1 center_block 3'
[./InitialCondition]
type = ConstantIC
value = 20
block = 'center_block 3'
[../]
[../]
[]
[AuxVariables]
[./reporter]
order = CONSTANT
family = MONOMIAL
block = 'left_block 3'
[../]
[]
[ICs]
[./reporter_ic]
type = ConstantIC
variable = reporter
value = 10
[../]
[]
[Kernels]
active = 'diff body_force'
[./diff]
type = Diffusion
variable = u
# Note we are using both names and numbers here
block = 'left_block 2 right_block'
[../]
[./body_force]
type = BodyForce
variable = u
block = 'center_block'
value = 10
[../]
[]
[AuxKernels]
[./hardness]
type = MaterialRealAux
variable = reporter
property = 'hardness'
block = 'left_block 3'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left_side'
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 'right_side'
value = 1
[../]
[]
[Postprocessors]
[./elem_average]
type = ElementAverageValue
variable = u
block = 'center_block'
execute_on = 'initial timestep_end'
[../]
[./side_average]
type = SideAverageValue
variable = u
boundary = 'right_side'
execute_on = 'initial timestep_end'
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'hardness'
prop_values = 10
block = '1 right_block'
[../]
[./empty]
type = MTMaterial
block = 'center_block'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/ad_cavity_pressure/additional_volume.i)
#
# Cavity Pressure Test using using automatic differentiation
#
# This test is designed to compute an internal pressure based on
# p = n * R * / (V_cavity / T_cavity + V_add / T_add)
# where
# p is the pressure
# n is the amount of material in the volume (moles)
# R is the universal gas constant
# T_cavity is the temperature in the cavity
# T_add is the temperature of the additional volume
#
# The mesh is composed of one block (1) with an interior cavity of volume 8.
# Block 2 sits in the cavity and has a volume of 1. Thus, the total
# initial volume is 7. An additional volume of 2 is added.
#
# The test adjusts n, T, and V in the following way:
# n => n0 + alpha * t
# T => T0 + beta * t
# V => V_cavity0 + gamma * t + V_add
# with
# alpha = n0
# beta = T0 / 2
# gamma = -(0.003322259...) * V0
# T0 = 240.54443866068704
# V_cavity0 = 7
# V_add = 2
# T_add = 100
# n0 = f(p0)
# p0 = 100
# R = 8.314472 J * K^(-1) * mol^(-1)
#
# An additional volume of 2 with a temperature of 100.0 is included.
#
# So, n0 = p0 * (V_cavity / T_cavity + V_add / T_add) / R
# = 100 * (7 / 240.544439 + 2 / 100) / 8.314472
# = 0.59054
#
# The parameters combined at t = 1 gives p = 249.647.
#
# This test sets the initial temperature to 500, but the CavityPressure
# is told that that initial temperature is T0. Thus, the final solution
# is unchanged.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
file = 3d.e
[]
[GlobalParams]
volumetric_locking_correction = true
[]
[Functions]
[./displ_positive]
type = PiecewiseLinear
x = '0 1'
y = '0 0.0029069767441859684'
[../]
[./displ_negative]
type = PiecewiseLinear
x = '0 1'
y = '0 -0.0029069767441859684'
[../]
[./temp1]
type = PiecewiseLinear
x = '0 1'
y = '1 1.5'
scale_factor = 240.54443866068704
[../]
[./material_input_function]
type = PiecewiseLinear
x = '0 1'
y = '0 0.59054'
[../]
[./additional_volume]
type = ConstantFunction
value = 2
[../]
[./temperature_of_additional_volume]
type = ConstantFunction
value = 100
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./temp]
initial_condition = 500
[../]
[./material_input]
[../]
[]
[AuxVariables]
[./pressure_residual_x]
[../]
[./pressure_residual_y]
[../]
[./pressure_residual_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./TensorMechanics]
use_displaced_mesh = true
use_automatic_differentiation = true
[../]
[./heat]
type = ADDiffusion
variable = temp
use_displaced_mesh = true
[../]
[./material_input_dummy]
type = ADDiffusion
variable = material_input
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_xx]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = stress_xx
[../]
[./stress_yy]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = stress_yy
[../]
[./stress_zz]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = stress_zz
[../]
[./stress_xy]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 1
variable = stress_xy
[../]
[./stress_yz]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 2
variable = stress_yz
[../]
[./stress_zx]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 0
variable = stress_zx
[../]
[]
[BCs]
[./no_x_exterior]
type = DirichletBC
variable = disp_x
boundary = '7 8'
value = 0.0
[../]
[./no_y_exterior]
type = DirichletBC
variable = disp_y
boundary = '9 10'
value = 0.0
[../]
[./no_z_exterior]
type = DirichletBC
variable = disp_z
boundary = '11 12'
value = 0.0
[../]
[./prescribed_left]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = displ_positive
[../]
[./prescribed_right]
type = FunctionDirichletBC
variable = disp_x
boundary = 14
function = displ_negative
[../]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '15 16'
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '17 18'
value = 0.0
[../]
[./no_x_interior]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[../]
[./no_y_interior]
type = DirichletBC
variable = disp_y
boundary = '3 4'
value = 0.0
[../]
[./no_z_interior]
type = DirichletBC
variable = disp_z
boundary = '5 6'
value = 0.0
[../]
[./temperatureInterior]
type = ADFunctionDirichletBC
boundary = 100
function = temp1
variable = temp
[../]
[./MaterialInput]
type = ADFunctionDirichletBC
boundary = '100 13 14 15 16'
function = material_input_function
variable = material_input
[../]
[./CavityPressure]
[./1]
boundary = 100
initial_pressure = 100
material_input = materialInput
R = 8.314472
temperature = aveTempInterior
initial_temperature = 240.54443866068704
volume = internalVolume
startup_time = 0.5
output = ppress
save_in = 'pressure_residual_x pressure_residual_y pressure_residual_z'
additional_volumes = volume1
temperature_of_additional_volumes = temperature1
use_automatic_differentiation = true
[../]
[../]
[]
[Materials]
[./elast_tensor1]
type = ADComputeElasticityTensor
C_ijkl = '0 5'
fill_method = symmetric_isotropic
block = 1
[../]
[./strain1]
type = ADComputeFiniteStrain
block = 1
[../]
[./stress1]
type = ADComputeFiniteStrainElasticStress
block = 1
[../]
[./elast_tensor2]
type = ADComputeElasticityTensor
C_ijkl = '0 5'
fill_method = symmetric_isotropic
block = 2
[../]
[./strain2]
type = ADComputeFiniteStrain
block = 2
[../]
[./stress2]
type = ADComputeFiniteStrainElasticStress
block = 2
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
nl_rel_tol = 1e-12
l_tol = 1e-12
l_max_its = 20
dt = 0.5
end_time = 1.0
[]
[Postprocessors]
[./internalVolume]
type = InternalVolume
boundary = 100
execute_on = 'initial linear'
[../]
[./aveTempInterior]
type = SideAverageValue
boundary = 100
variable = temp
execute_on = 'initial linear'
[../]
[./materialInput]
type = SideAverageValue
boundary = '7 8 9 10 11 12'
variable = material_input
execute_on = linear
[../]
[./volume1]
type = FunctionValuePostprocessor
function = additional_volume
execute_on = 'initial linear'
[../]
[./temperature1]
type = FunctionValuePostprocessor
function = temperature_of_additional_volume
execute_on = 'initial linear'
[../]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/two_phase/mixture_model/channel-drift-flux-transient.i)
mu = 1.0
rho = 10.0
mu_d = 0.1
rho_d = 1.0
l = 2
U = 1
dp = 0.01
inlet_phase_2 = 0.1
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[GlobalParams]
rhie_chow_user_object = 'rc'
density_interp_method = 'average'
mu_interp_method = 'average'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = vel_x
v = vel_y
pressure = pressure
[]
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = '${fparse l * 5}'
ymin = '${fparse -l / 2}'
ymax = '${fparse l / 2}'
nx = 10
ny = 4
[]
uniform_refine = 0
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
initial_condition = 0
[]
[vel_y]
type = INSFVVelocityVariable
initial_condition = 0
[]
[pressure]
type = INSFVPressureVariable
[]
[phase_2]
type = INSFVScalarFieldVariable
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = 'rho_mixture'
[]
[u_time]
type = INSFVMomentumTimeDerivative
variable = vel_x
rho = 'rho_mixture'
momentum_component = 'x'
[]
[u_advection]
type = INSFVMomentumAdvection
variable = vel_x
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = 'rho_mixture'
momentum_component = 'x'
[]
[u_drift]
type = WCNSFV2PMomentumDriftFlux
variable = vel_x
rho_d = ${rho_d}
fd = 'rho_mixture_var'
u_slip = 'vel_slip_x'
v_slip = 'vel_slip_y'
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = vel_x
mu = 'mu_mixture'
limit_interpolation = true
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = vel_x
momentum_component = 'x'
pressure = pressure
[]
[v_time]
type = INSFVMomentumTimeDerivative
variable = vel_y
rho = 'rho_mixture'
momentum_component = 'y'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = vel_y
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = 'rho_mixture'
momentum_component = 'y'
[]
[v_drift]
type = WCNSFV2PMomentumDriftFlux
variable = vel_y
rho_d = ${rho_d}
fd = 'rho_mixture_var'
u_slip = 'vel_slip_x'
v_slip = 'vel_slip_y'
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = vel_y
mu = 'mu_mixture'
limit_interpolation = true
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = vel_y
momentum_component = 'y'
pressure = pressure
[]
[phase_2_time]
type = FVFunctorTimeKernel
variable = phase_2
functor = phase_2
[]
[phase_2_advection]
type = INSFVScalarFieldAdvection
variable = phase_2
u_slip = 'vel_x'
v_slip = 'vel_y'
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = 'upwind'
[]
[phase_2_src]
type = NSFVMixturePhaseInterface
variable = phase_2
phase_coupled = phase_1
alpha = 0.1
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = vel_x
functor = '${U}'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = vel_y
functor = '0'
[]
[walls-u]
type = INSFVNoSlipWallBC
boundary = 'top bottom'
variable = vel_x
function = 0
[]
[walls-v]
type = INSFVNoSlipWallBC
boundary = 'top bottom'
variable = vel_y
function = 0
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = '0'
[]
[inlet_phase_2]
type = FVDirichletBC
boundary = 'left'
variable = phase_2
value = ${inlet_phase_2}
[]
[]
[AuxVariables]
[drag_coefficient]
type = MooseVariableFVReal
[]
[rho_mixture_var]
type = MooseVariableFVReal
[]
[mu_mixture_var]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[populate_cd]
type = FunctorAux
variable = drag_coefficient
functor = 'Darcy_coefficient'
[]
[populate_rho_mixture_var]
type = FunctorAux
variable = rho_mixture_var
functor = 'rho_mixture'
[]
[populate_mu_mixture_var]
type = FunctorAux
variable = mu_mixture_var
functor = 'mu_mixture'
[]
[]
[FunctorMaterials]
[populate_u_slip]
type = WCNSFV2PSlipVelocityFunctorMaterial
slip_velocity_name = 'vel_slip_x'
momentum_component = 'x'
u = 'vel_x'
v = 'vel_y'
rho = ${rho}
mu = 'mu_mixture'
rho_d = ${rho_d}
particle_diameter = ${dp}
linear_coef_name = 'Darcy_coefficient'
[]
[populate_v_slip]
type = WCNSFV2PSlipVelocityFunctorMaterial
slip_velocity_name = 'vel_slip_y'
momentum_component = 'y'
u = 'vel_x'
v = 'vel_y'
rho = ${rho}
mu = 'mu_mixture'
rho_d = ${rho_d}
particle_diameter = ${dp}
linear_coef_name = 'Darcy_coefficient'
[]
[compute_phase_1]
type = ADParsedFunctorMaterial
property_name = phase_1
functor_names = 'phase_2'
expression = '1 - phase_2'
[]
[CD]
type = NSFVDispersePhaseDragFunctorMaterial
rho = 'rho_mixture'
mu = mu_mixture
u = 'vel_x'
v = 'vel_y'
particle_diameter = ${dp}
[]
[mixing_material]
type = NSFVMixtureFunctorMaterial
phase_2_names = '${rho} ${mu}'
phase_1_names = '${rho_d} ${mu_d}'
prop_names = 'rho_mixture mu_mixture'
phase_1_fraction = 'phase_2'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
nl_rel_tol = 1e-10
dt = 0.1
end_time = 1.0
[]
[Preconditioning]
[SMP]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[]
[Outputs]
exodus = false
[CSV]
type = CSV
execute_on = 'TIMESTEP_END'
[]
[]
[Postprocessors]
[Re]
type = ParsedPostprocessor
function = '${rho} * ${l} * ${U}'
pp_names = ''
[]
[rho_outlet]
type = SideAverageValue
boundary = 'right'
variable = 'rho_mixture_var'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/pwcns/channel-flow/2d-transient.i)
# Fluid properties
mu = 'mu'
rho = 'rho'
cp = 'cp'
k = 'k'
# Solid properties
cp_s = 2
rho_s = 4
k_s = 1e-2
h_fs = 10
# Operating conditions
u_inlet = 1
T_inlet = 200
p_outlet = 10
top_side_temperature = 150
# Numerical scheme
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 1
nx = 20
ny = 5
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = superficial_vel_x
v = superficial_vel_y
pressure = pressure
porosity = porosity
[]
[]
[Variables]
[superficial_vel_x]
type = PINSFVSuperficialVelocityVariable
initial_condition = ${u_inlet}
[]
[superficial_vel_y]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1e-6
[]
[pressure]
type = INSFVPressureVariable
initial_condition = ${p_outlet}
[]
[T_fluid]
type = INSFVEnergyVariable
initial_condition = ${T_inlet}
[]
[T_solid]
type = MooseVariableFVReal
initial_condition = 100
[]
[]
[AuxVariables]
[porosity]
type = MooseVariableFVReal
initial_condition = 0.5
[]
[velocity_norm]
type = MooseVariableFVReal
[]
[]
[FVKernels]
[mass_time]
type = PWCNSFVMassTimeDerivative
variable = pressure
porosity = 'porosity'
drho_dt = 'drho_dt'
[]
[mass]
type = PWCNSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_time]
type = WCNSFVMomentumTimeDerivative
variable = superficial_vel_x
rho = ${rho}
drho_dt = 'drho_dt'
momentum_component = 'x'
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_x
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_x
mu = ${mu}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_x
momentum_component = 'x'
pressure = pressure
porosity = porosity
[]
[v_time]
type = WCNSFVMomentumTimeDerivative
variable = superficial_vel_y
rho = ${rho}
drho_dt = 'drho_dt'
momentum_component = 'y'
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_y
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'y'
[]
[v_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_y
mu = ${mu}
porosity = porosity
momentum_component = 'y'
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_y
momentum_component = 'y'
pressure = pressure
porosity = porosity
[]
[energy_time]
type = PINSFVEnergyTimeDerivative
variable = T_fluid
cp = ${cp}
rho = ${rho}
drho_dt = 'drho_dt'
is_solid = false
porosity = porosity
[]
[energy_advection]
type = PINSFVEnergyAdvection
variable = T_fluid
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
[]
[energy_diffusion]
type = PINSFVEnergyDiffusion
variable = T_fluid
k = ${k}
porosity = porosity
[]
[energy_convection]
type = PINSFVEnergyAmbientConvection
variable = T_fluid
is_solid = false
T_fluid = T_fluid
T_solid = T_solid
h_solid_fluid = 'h_cv'
[]
[solid_energy_time]
type = PINSFVEnergyTimeDerivative
variable = T_solid
cp = ${cp_s}
rho = ${rho_s}
is_solid = true
porosity = porosity
[]
[solid_energy_diffusion]
type = FVDiffusion
variable = T_solid
coeff = ${k_s}
[]
[solid_energy_convection]
type = PINSFVEnergyAmbientConvection
variable = T_solid
is_solid = true
T_fluid = T_fluid
T_solid = T_solid
h_solid_fluid = 'h_cv'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = superficial_vel_x
function = ${u_inlet}
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = superficial_vel_y
function = 0
[]
[inlet-T]
type = FVDirichletBC
variable = T_fluid
value = ${T_inlet}
boundary = 'left'
[]
[no-slip-u]
type = INSFVNoSlipWallBC
boundary = 'top'
variable = superficial_vel_x
function = 0
[]
[no-slip-v]
type = INSFVNoSlipWallBC
boundary = 'top'
variable = superficial_vel_y
function = 0
[]
[heated-side]
type = FVDirichletBC
boundary = 'top'
variable = 'T_solid'
value = ${top_side_temperature}
[]
[symmetry-u]
type = PINSFVSymmetryVelocityBC
boundary = 'bottom'
variable = superficial_vel_x
u = superficial_vel_x
v = superficial_vel_y
mu = ${mu}
momentum_component = 'x'
[]
[symmetry-v]
type = PINSFVSymmetryVelocityBC
boundary = 'bottom'
variable = superficial_vel_y
u = superficial_vel_x
v = superficial_vel_y
mu = ${mu}
momentum_component = 'y'
[]
[symmetry-p]
type = INSFVSymmetryPressureBC
boundary = 'bottom'
variable = pressure
[]
[outlet-p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = ${p_outlet}
[]
[]
[FluidProperties]
[fp]
type = FlibeFluidProperties
[]
[]
[FunctorMaterials]
[fluid_props_to_mat_props]
type = GeneralFunctorFluidProps
fp = fp
pressure = 'pressure'
T_fluid = 'T_fluid'
speed = 'velocity_norm'
# To initialize with a high viscosity
mu_rampdown = 'mu_rampdown'
# For porous flow
characteristic_length = 1
porosity = 'porosity'
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
rho = ${rho}
temperature = 'T_fluid'
[]
[constants]
type = ADGenericFunctorMaterial
prop_names = 'h_cv'
prop_values = '${h_fs}'
[]
[]
[Functions]
[mu_rampdown]
type = PiecewiseLinear
x = '1 2 3 4'
y = '1e3 1e2 1e1 1'
[]
[]
[AuxKernels]
[speed]
type = ParsedAux
variable = 'velocity_norm'
coupled_variables = 'superficial_vel_x superficial_vel_y porosity'
expression = 'sqrt(superficial_vel_x*superficial_vel_x + superficial_vel_y*superficial_vel_y) / '
'porosity'
[]
[]
[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-12
end_time = 3.0
[]
# Some basic Postprocessors to examine the solution
[Postprocessors]
[inlet-p]
type = SideAverageValue
variable = pressure
boundary = 'left'
[]
[outlet-u]
type = SideAverageValue
variable = superficial_vel_x
boundary = 'right'
[]
[outlet-temp]
type = SideAverageValue
variable = T_fluid
boundary = 'right'
[]
[solid-temp]
type = ElementAverageValue
variable = T_solid
[]
[]
[Outputs]
exodus = true
csv = false
[]
(test/tests/multiapps/secant_postprocessor/transient_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[time]
type = TimeDerivative
variable = u
[]
[sink]
type = BodyForce
variable = u
value = -1
[]
[]
[BCs]
[right]
type = PostprocessorDirichletBC
variable = u
boundary = right
postprocessor = 'from_main'
[]
[]
[Postprocessors]
[from_main]
type = Receiver
default = 0
[]
[to_main]
type = SideAverageValue
variable = u
boundary = left
[]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
fixed_point_algorithm = 'secant'
[]
[Outputs]
[csv]
type = CSV
start_step = 6
[]
exodus = false
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_radiation_test.i)
#
# This test replicates the legacy heat transfter test
# gap_heat_transfer_radiation/gap_heat_transfer_radiation_test.i
# The flux post processors give 3.753945e+01
#
[Mesh]
[file]
type = FileMeshGenerator
file = gap_heat_transfer_radiation_test.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '200'
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '3'
new_block_id = '300'
new_block_name = 'primary_lower'
input = secondary
[]
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '200 200'
[]
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
initial_condition = 100
scaling = 1e-8
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
scaling = 1e-1
[]
[]
[Kernels]
[heat]
type = HeatConduction
variable = temp
block = '1 2'
[]
[]
[BCs]
[temp_far_left]
type = FunctionDirichletBC
boundary = 1
variable = temp
function = temp
[]
[temp_far_right]
type = DirichletBC
boundary = 4
variable = temp
value = 100
[]
[]
[UserObjects]
[radiative]
type = GapFluxModelRadiative
secondary_emissivity = 0.5
primary_emissivity = 0.5
temperature = temp
boundary = 3
[]
[simple]
type = GapFluxModelSimple
k = 0.09187557
temperature = temp
boundary = 3
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
primary_boundary = 3
primary_subdomain = 300
secondary_boundary = 2
secondary_subdomain = 200
gap_flux_models = 'simple radiative'
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 10000000.0
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
end_time = 1.0
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = 2
variable = temp
execute_on = 'initial timestep_end'
[]
[temp_right]
type = SideAverageValue
boundary = 3
variable = temp
execute_on = 'initial timestep_end'
[]
[flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[]
[flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[]
[]
[Outputs]
exodus = true
[]
(test/tests/functions/pps_function/pp_function.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./function_force]
function = pp_func
variable = u
type = BodyForce
[../]
[]
[BCs]
active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out
exodus = true
[]
[Functions]
[./pp_func]
pp = right_value
type = PostprocessorFunction
[../]
[]
[Postprocessors]
[./right_value]
variable = u
execute_on = linear
boundary = 1
type = SideAverageValue
[../]
[]
(test/tests/multiapps/secant_postprocessor/transient_main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[time]
type = TimeDerivative
variable = u
[]
[source]
type = BodyForce
variable = u
value = 1
[]
[]
[BCs]
[left]
type = PostprocessorDirichletBC
variable = u
boundary = left
postprocessor = 'from_sub'
[]
[]
[Postprocessors]
[coupling_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[from_sub]
type = Receiver
default = 0
[]
[to_sub]
type = SideAverageValue
variable = u
boundary = right
[]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
# App coupling parameters
fixed_point_algorithm = 'secant'
fixed_point_max_its = 30
transformed_postprocessors = 'from_sub'
[]
[Outputs]
csv = true
exodus = false
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = 'transient_sub.i'
clone_parent_mesh = true
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[left_from_sub]
type = MultiAppPostprocessorTransfer
from_multi_app = sub
from_postprocessor = 'to_main'
to_postprocessor = 'from_sub'
reduction_type = 'average'
[]
[right_to_sub]
type = MultiAppPostprocessorTransfer
to_multi_app = sub
from_postprocessor = 'to_sub'
to_postprocessor = 'from_main'
[]
[]
(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'
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
[]
(modules/functional_expansion_tools/examples/2D_interface_no_material/main.i)
# Derived from the example '2D_interface' with the following differences:
#
# 1) No materials are used
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0.0
xmax = 0.4
nx = 6
ymin = 0.0
ymax = 10.0
ny = 20
[]
[Variables]
[./m]
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./source_m]
type = BodyForce
variable = m
value = 100
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
value = 2
variable = m
[../]
[]
[BCs]
[./interface_value]
type = FXValueBC
variable = m
boundary = right
function = FX_Basis_Value_Main
[../]
[./interface_flux]
type = FXFluxBC
boundary = right
variable = m
function = FX_Basis_Flux_Main
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '4'
physical_bounds = '0.0 10'
y = Legendre
[../]
[./FX_Basis_Flux_Main]
type = FunctionSeries
series_type = Cartesian
orders = '5'
physical_bounds = '0.0 10'
y = Legendre
[../]
[]
[UserObjects]
[./FX_Flux_UserObject_Main]
type = FXBoundaryFluxUserObject
function = FX_Basis_Flux_Main
variable = m
boundary = right
diffusivity = 0.1
[../]
[]
[Postprocessors]
[./average_interface_value]
type = SideAverageValue
variable = m
boundary = right
[../]
[./total_flux]
type = SideDiffusiveFluxIntegral
variable = m
boundary = right
diffusivity = 0.1
[../]
[./picard_iterations]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1.0
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
sub_cycling = true
[../]
[]
[Transfers]
[./FluxToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Flux_UserObject_Main
multi_app_object_name = FX_Basis_Flux_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[./FluxToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Flux_Main
multi_app_object_name = FX_Flux_UserObject_Sub
[../]
[]
(modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/lps_single.i)
# This test provides an example of an individual LPS viscoplasticity model
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmax = 0.002
ymax = 0.002
[]
[Physics/SolidMechanics/QuasiStatic/All]
strain = FINITE
add_variables = true
generate_output = 'strain_xx strain_yy strain_xy hydrostatic_stress vonmises_stress'
use_automatic_differentiation = true
[]
[Functions]
[./pull]
type = PiecewiseLinear
x = '0 0.1'
y = '0 1e-5'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.3
[../]
[./stress]
type = ADComputeMultipleInelasticStress
inelastic_models = lps
outputs = all
[../]
[./porosity]
type = ADPorosityFromStrain
initial_porosity = 0.1
inelastic_strain = 'combined_inelastic_strain'
outputs = 'all'
[../]
[./lps]
type = ADViscoplasticityStressUpdate
coefficient = 'coef'
power = 3
outputs = all
relative_tolerance = 1e-11
[../]
[./coef]
type = ADParsedMaterial
property_name = coef
# Example of creep power law
expression = '1e-18 * exp(-4e4 / 1.987 / 1200)'
[../]
[]
[BCs]
[./no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./pull_disp_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = top
function = pull
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 0.01
end_time = 0.12
[]
[Postprocessors]
[./disp_x]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./disp_y]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
[../]
[./dt]
type = TimestepSize
[../]
[./num_lin]
type = NumLinearIterations
outputs = console
[../]
[./num_nonlin]
type = NumNonlinearIterations
outputs = console
[../]
[./eff_creep_strain]
type = ElementAverageValue
variable = effective_viscoplasticity
[../]
[./porosity]
type = ElementAverageValue
variable = porosity
[../]
[]
[Outputs]
csv = 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
function = '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/thermal_hydraulics/test/tests/components/heat_structure_base/interior_axial_boundaries.i)
# This input file is used to test that the interior axial boundaries of a
# heat structure are being created correctly.
#
# To test this, an arbitrary temperature distribution is imposed on the heat
# structure, and the average temperature on the interior axial boundaries is
# tested against expected values.
#
# The interior axial boundaries are located at x={20,40}, and radial boundaries
# are located at y={0,0.5,1,1.5}. The temperature is set to be T(x,y) = xy. The
# following table gives the resulting expected average temperature values on
# each face:
# Boundary T_avg
# -----------------------------------
# hs:radial1:axial1:axial2 5
# hs:radial1:axial2:axial3 10
# hs:radial2:axial1:axial2 15
# hs:radial2:axial2:axial3 30
# hs:radial3:axial1:axial2 25
# hs:radial3:axial2:axial3 50
[Functions]
[initial_T_fn]
type = ParsedFunction
expression = 'x * y'
[]
[]
[SolidProperties]
[hs_mat]
type = ThermalFunctionSolidProperties
k = 1
cp = 1
rho = 1
[]
[]
[Components]
[hs]
type = HeatStructurePlate
position = '0 0 0'
orientation = '1 0 0'
length = '20 20 20'
n_elems = '2 2 2'
axial_region_names = 'axial1 axial2 axial3'
names = 'radial1 radial2 radial3'
widths = '0.5 0.5 0.5'
n_part_elems = '2 2 2'
solid_properties = 'hs_mat hs_mat hs_mat'
solid_properties_T_ref = '300 300 300'
depth = 1.0
initial_T = initial_T_fn
[]
[]
[Postprocessors]
[T_avg_radial1_axial1_axial2]
type = SideAverageValue
variable = T_solid
boundary = 'hs:radial1:axial1:axial2'
execute_on = 'INITIAL'
[]
[T_avg_radial1_axial2_axial3]
type = SideAverageValue
variable = T_solid
boundary = 'hs:radial1:axial2:axial3'
execute_on = 'INITIAL'
[]
[T_avg_radial2_axial1_axial2]
type = SideAverageValue
variable = T_solid
boundary = 'hs:radial2:axial1:axial2'
execute_on = 'INITIAL'
[]
[T_avg_radial2_axial2_axial3]
type = SideAverageValue
variable = T_solid
boundary = 'hs:radial2:axial2:axial3'
execute_on = 'INITIAL'
[]
[T_avg_radial3_axial1_axial2]
type = SideAverageValue
variable = T_solid
boundary = 'hs:radial3:axial1:axial2'
execute_on = 'INITIAL'
[]
[T_avg_radial3_axial2_axial3]
type = SideAverageValue
variable = T_solid
boundary = 'hs:radial3:axial2:axial3'
execute_on = 'INITIAL'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
csv = true
execute_on = 'INITIAL'
[]
(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
[]
(modules/navier_stokes/test/tests/finite_volume/pins/mms/porosity_change/1d-rc-continuous.i)
mu = 1.5
rho = 1.1
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 1
dx = '1 1'
ix = '15 15'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
porosity = porosity
pressure = pressure
[]
[]
[Problem]
error_on_jacobian_nonzero_reallocation = true
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[]
[ICs]
[porosity_continuous]
type = FunctionIC
variable = porosity
function = smooth_jump
[]
[]
[Functions]
[smooth_jump]
type = ParsedFunction
expression = '1 - 0.5 * 1 / (1 + exp(-30*(x-1)))'
[]
# Generated by compute-functions-1d.py
[exact_u]
type = ParsedFunction
expression = 'cos((1/2)*x*pi)'
[]
[forcing_u]
type = ParsedFunction
expression = '-mu*(1 - 0.5/(exp(30 - 30*x) + 1))*(-1/4*pi^2*cos((1/2)*x*pi)/(1 - 0.5/(exp(30 - 30*x) + 1)) - 15.0*pi*exp(30 - 30*x)*sin((1/2)*x*pi)/((1 - 0.5/(exp(30 - 30*x) + 1))^2*(exp(30 - 30*x) + 1)^2) - 450.0*exp(30 - 30*x)*cos((1/2)*x*pi)/((1 - 0.5/(exp(30 - 30*x) + 1))^2*(exp(30 - 30*x) + 1)^2) + 900.0*exp(60 - 60*x)*cos((1/2)*x*pi)/((1 - 0.5/(exp(30 - 30*x) + 1))^2*(exp(30 - 30*x) + 1)^3) + 450.0*exp(60 - 60*x)*cos((1/2)*x*pi)/((1 - 0.5/(exp(30 - 30*x) + 1))^3*(exp(30 - 30*x) + 1)^4)) + 15.0*mu*(-1/2*pi*sin((1/2)*x*pi)/(1 - 0.5/(exp(30 - 30*x) + 1)) + 15.0*exp(30 - 30*x)*cos((1/2)*x*pi)/((1 - 0.5/(exp(30 - 30*x) + 1))^2*(exp(30 - 30*x) + 1)^2))*exp(30 - 30*x)/(exp(30 - 30*x) + 1)^2 - pi*rho*sin((1/2)*x*pi)*cos((1/2)*x*pi)/(1 - 0.5/(exp(30 - 30*x) + 1)) + 15.0*rho*exp(30 - 30*x)*cos((1/2)*x*pi)^2/((1 - 0.5/(exp(30 - 30*x) + 1))^2*(exp(30 - 30*x) + 1)^2) + (1 - 0.5/(exp(30 - 30*x) + 1))*cos(x)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'sin(x)'
[]
[forcing_p]
type = ParsedFunction
expression = '-1/2*pi*rho*sin((1/2)*x*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[mass_forcing]
type = FVBodyForce
variable = pressure
function = forcing_p
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = u
mu = ${mu}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = u
pressure = pressure
porosity = porosity
momentum_component = 'x'
[]
[u_forcing]
type = INSFVBodyForce
variable = u
functor = forcing_u
momentum_component = 'x'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
functor = 'exact_u'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 'exact_p'
[]
[]
[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'
# ksp_gmres_restart bumped to 200 for linear convergence
nl_max_its = 100
[]
[Postprocessors]
[inlet_p]
type = SideAverageValue
variable = 'pressure'
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 'right'
[]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2FunctorError
approximate = u
exact = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
approximate = pressure
exact = exact_p
type = ElementL2FunctorError
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
[Outputs]
csv = true
[]
(modules/thermal_hydraulics/tutorials/single_phase_flow/05_secondary_side.i)
T_in = 300. # K
m_dot_in = 1e-2 # kg/s
press = 10e5 # Pa
# core parameters
core_length = 1. # m
core_n_elems = 25
core_dia = '${units 2. cm -> m}'
core_pitch = '${units 8.7 cm -> m}'
A_core = '${fparse core_pitch^2 - 0.25 *pi * core_dia^2}'
P_wet_core = '${fparse 4*core_pitch + pi * core_dia}'
Dh_core = '${fparse 4 * A_core / P_wet_core}'
# pipe parameters
pipe_dia = '${units 10. cm -> m}'
A_pipe = '${fparse 0.25 * pi * pipe_dia^2}'
tot_power = 2000 # W
# heat exchanger parameters
hx_dia_inner = '${units 12. cm -> m}'
hx_wall_thickness = '${units 5. mm -> m}'
hx_dia_outer = '${units 50. cm -> m}'
hx_radius_wall = '${fparse hx_dia_inner / 2. + hx_wall_thickness}'
hx_length = 1.5 # m
hx_n_elems = 25
m_dot_sec_in = 1. # kg/s
[GlobalParams]
initial_p = ${press}
initial_vel = 0.0001
initial_T = ${T_in}
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
gravity_vector = '0 0 0'
rdg_slope_reconstruction = minmod
scaling_factor_1phase = '1 1e-2 1e-4'
scaling_factor_rhoV = 1
scaling_factor_rhouV = 1e-2
scaling_factor_rhovV = 1e-2
scaling_factor_rhowV = 1e-2
scaling_factor_rhoEV = 1e-4
closures = thm_closures
fp = he
[]
[Functions]
[m_dot_sec_fn]
type = PiecewiseLinear
xy_data = '
0 0
10 ${m_dot_sec_in}'
[]
[]
[FluidProperties]
[he]
type = IdealGasFluidProperties
molar_mass = 4e-3
gamma = 1.67
k = 0.2556
mu = 3.22639e-5
[]
[water]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[]
[Closures]
[thm_closures]
type = Closures1PhaseTHM
[]
[]
[SolidProperties]
[steel]
type = ThermalFunctionSolidProperties
rho = 8050
k = 45
cp = 466
[]
[]
[Components]
[total_power]
type = TotalPower
power = ${tot_power}
[]
[up_pipe_1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
length = 0.5
n_elems = 15
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct1]
type = JunctionParallelChannels1Phase
position = '0 0 0.5'
connections = 'up_pipe_1:out core_chan:in'
volume = 1e-5
[]
[core_chan]
type = FlowChannel1Phase
position = '0 0 0.5'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
roughness = .0001
A = ${A_core}
D_h = ${Dh_core}
[]
[core_hs]
type = HeatStructureCylindrical
position = '0 0 0.5'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
names = 'block'
widths = '${fparse core_dia / 2.}'
solid_properties = 'steel'
solid_properties_T_ref = '300'
n_part_elems = 3
[]
[core_heating]
type = HeatSourceFromTotalPower
hs = core_hs
regions = block
power = total_power
[]
[core_ht]
type = HeatTransferFromHeatStructure1Phase
flow_channel = core_chan
hs = core_hs
hs_side = outer
P_hf = '${fparse pi * core_dia}'
[]
[jct2]
type = JunctionParallelChannels1Phase
position = '0 0 1.5'
connections = 'core_chan:out up_pipe_2:in'
volume = 1e-5
[]
[up_pipe_2]
type = FlowChannel1Phase
position = '0 0 1.5'
orientation = '0 0 1'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct3]
type = JunctionOneToOne1Phase
connections = 'up_pipe_2:out top_pipe_1:in'
[]
[top_pipe_1]
type = FlowChannel1Phase
position = '0 0 2'
orientation = '1 0 0'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[top_pipe_2]
type = FlowChannel1Phase
position = '0.5 0 2'
orientation = '1 0 0'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct4]
type = VolumeJunction1Phase
position = '0.5 0 2'
volume = 1e-5
connections = 'top_pipe_1:out top_pipe_2:in press_pipe:in'
[]
[press_pipe]
type = FlowChannel1Phase
position = '0.5 0 2'
orientation = '0 1 0'
length = 0.2
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[pressurizer]
type = InletStagnationPressureTemperature1Phase
p0 = ${press}
T0 = ${T_in}
input = press_pipe:out
[]
[jct5]
type = JunctionOneToOne1Phase
connections = 'top_pipe_2:out down_pipe_1:in'
[]
[down_pipe_1]
type = FlowChannel1Phase
position = '1 0 2'
orientation = '0 0 -1'
length = 0.25
A = ${A_pipe}
n_elems = 5
[]
[jct6]
type = JunctionParallelChannels1Phase
position = '1 0 1.75'
connections = 'down_pipe_1:out hx/pri:in'
volume = 1e-5
[]
[hx]
[pri]
type = FlowChannel1Phase
position = '1 0 1.75'
orientation = '0 0 -1'
length = ${hx_length}
n_elems = ${hx_n_elems}
roughness = 1e-5
A = '${fparse pi * hx_dia_inner * hx_dia_inner / 4.}'
D_h = ${hx_dia_inner}
[]
[ht_pri]
type = HeatTransferFromHeatStructure1Phase
hs = hx/wall
hs_side = inner
flow_channel = hx/pri
P_hf = '${fparse pi * hx_dia_inner}'
[]
[wall]
type = HeatStructureCylindrical
position = '1 0 1.75'
orientation = '0 0 -1'
length = ${hx_length}
n_elems = ${hx_n_elems}
widths = '${hx_wall_thickness}'
n_part_elems = '3'
solid_properties = 'steel'
solid_properties_T_ref = '300'
names = '0'
inner_radius = '${fparse hx_dia_inner / 2.}'
[]
[ht_sec]
type = HeatTransferFromHeatStructure1Phase
hs = hx/wall
hs_side = outer
flow_channel = hx/sec
P_hf = '${fparse 2 * pi * hx_radius_wall}'
[]
[sec]
type = FlowChannel1Phase
position = '${fparse 1 + hx_wall_thickness} 0 0.25'
orientation = '0 0 1'
length = ${hx_length}
n_elems = ${hx_n_elems}
A = '${fparse pi * (hx_dia_outer * hx_dia_outer / 4. - hx_radius_wall * hx_radius_wall)}'
D_h = '${fparse hx_dia_outer - (2 * hx_radius_wall)}'
fp = water
initial_T = 300
[]
[]
[jct7]
type = JunctionParallelChannels1Phase
position = '1 0 0.5'
connections = 'hx/pri:out down_pipe_2:in'
volume = 1e-5
[]
[down_pipe_2]
type = FlowChannel1Phase
position = '1 0 0.25'
orientation = '0 0 -1'
length = 0.25
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct8]
type = JunctionOneToOne1Phase
connections = 'down_pipe_2:out bottom_1:in'
[]
[bottom_1]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '-1 0 0'
length = 0.5
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[pump]
type = Pump1Phase
position = '0.5 0 0'
connections = 'bottom_1:out bottom_2:in'
volume = 1e-4
A_ref = ${A_pipe}
head = 0
[]
[bottom_2]
type = FlowChannel1Phase
position = '0.5 0 0'
orientation = '-1 0 0'
length = 0.5
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct9]
type = JunctionOneToOne1Phase
connections = 'bottom_2:out up_pipe_1:in'
[]
[inlet_sec]
type = InletMassFlowRateTemperature1Phase
input = 'hx/sec:in'
m_dot = 0
T = 300
[]
[outlet_sec]
type = Outlet1Phase
input = 'hx/sec:out'
p = 1e5
[]
[]
[ControlLogic]
[set_point]
type = GetFunctionValueControl
function = ${m_dot_in}
[]
[pid]
type = PIDControl
initial_value = 0.0
set_point = set_point:value
input = m_dot_pump
K_p = 1.
K_i = 4.
K_d = 0
[]
[set_pump_head]
type = SetComponentRealValueControl
component = pump
parameter = head
value = pid:output
[]
[m_dot_sec_inlet_ctrl]
type = GetFunctionValueControl
function = m_dot_sec_fn
[]
[set_m_dot_sec_ctrl]
type = SetComponentRealValueControl
component = inlet_sec
parameter = m_dot
value = m_dot_sec_inlet_ctrl:value
[]
[]
[Postprocessors]
[power_to_coolant]
type = ADHeatRateConvection1Phase
block = core_chan
P_hf = '${fparse pi *core_dia}'
[]
[m_dot_pump]
type = ADFlowJunctionFlux1Phase
boundary = core_chan:in
connection_index = 1
equation = mass
junction = jct7
[]
[core_T_out]
type = SideAverageValue
boundary = core_chan:out
variable = T
[]
[core_p_in]
type = SideAverageValue
boundary = core_chan:in
variable = p
[]
[core_p_out]
type = SideAverageValue
boundary = core_chan:out
variable = p
[]
[core_delta_p]
type = ParsedPostprocessor
pp_names = 'core_p_in core_p_out'
function = 'core_p_in - core_p_out'
[]
[hx_pri_T_out]
type = SideAverageValue
boundary = hx/pri:out
variable = T
[]
[hx_sec_T_in]
type = SideAverageValue
boundary = inlet_sec
variable = T
[]
[hx_sec_T_out]
type = SideAverageValue
boundary = outlet_sec
variable = T
[]
[m_dot_sec]
type = ADFlowBoundaryFlux1Phase
boundary = inlet_sec
equation = mass
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
start_time = 0
[TimeStepper]
type = IterationAdaptiveDT
dt = 1
[]
dtmax = 5
end_time = 500
line_search = basic
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 25
[]
[Outputs]
exodus = true
[console]
type = Console
max_rows = 1
outlier_variable_norms = false
[]
print_linear_residuals = false
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_htonly/cyl2D.i)
#
# 2D Cylindrical Gap Heat Transfer Test.
#
# This test exercises 2D gap heat transfer for a constant conductivity gap.
#
# The mesh consists of an inner solid cylinder of radius = 1 unit, and outer
# hollow cylinder with an inner radius of 2 in the x-y plane. In other words,
# the gap between them is 1 radial unit in length.
#
# The conductivity of both cylinders is set very large to achieve a uniform
# temperature in each cylinder. The temperature of the center node of the
# inner cylinder is ramped from 100 to 200 over one time unit. The temperature
# of the outside of the outer, hollow cylinder is held fixed at 100.
#
# A simple analytical solution is possible for the integrated heat flux
# between the inner and outer cylinders:
#
# Integrated Flux = (T_left - T_right) * (gapK/(r*ln(r2/r1))) * Area
#
# For gapK = 1 (default value)
#
# The area is taken as the area of the secondary (inner) surface:
#
# Area = 2 * pi * h * r, where h is the height of the cylinder.
#
# The integrated heat flux across the gap at time 1 is then:
#
# 2*pi*h*k*delta_T/(ln(r2/r1))
# 2*pi*1*1*100/(ln(2/1)) = 906.5 watts
#
# For comparison, see results from the integrated flux post processors.
# This simulation makes use of symmetry, so only 1/4 of the cylinders is meshed
# As such, the integrated flux from the post processors is 1/4 of the total,
# or 226.6 watts.
# The value coming from the post processor is slightly less than this
# but converges as mesh refinement increases.
# Note that the 2D and 3D results are the same.
#
# Simulating contact is challenging. Regression tests that exercise
# contact features can be difficult to solve consistently across multiple
# platforms. While designing these tests, we felt it worth while to note
# some aspects of these tests. The following applies to:
# sphere3D.i, sphere2DRZ.i, cyl2D.i, and cyl3D.i.
# 1. We decided that to perform consistently across multiple platforms we
# would use very small convergence tolerance. In this test we chose an
# nl_rel_tol of 1e-12.
# 2. Due to such a high value for thermal conductivity (used here so that the
# domains come to a uniform temperature) the integrated flux at time = 0
# was relatively large (the value coming from SideIntegralFlux =
# -_diffusion_coef[_qp]*_grad_u[_qp]*_normals[_qp] where the diffusion coefficient
# here is thermal conductivity).
# Even though _grad_u[_qp] is small, in this case the diffusion coefficient
# is large. The result is a number that isn't exactly zero and tends to
# fail exodiff. For this reason the parameter execute_on = initial should not
# be used. That parameter is left to default settings in these regression tests.
#
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Mesh]
file = cyl2D.e
[]
[Functions]
[./temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[../]
[]
[Variables]
[./temp]
initial_condition = 100
[../]
[]
[AuxVariables]
[./gap_conductance]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./heat_conduction]
type = HeatConduction
variable = temp
[../]
[]
[AuxKernels]
[./gap_cond]
type = MaterialRealAux
property = gap_conductance
variable = gap_conductance
boundary = 2
[../]
[]
[Materials]
[./heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 1000000.0
[../]
[]
[ThermalContact]
[./thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
gap_conductivity = 1
quadrature = true
gap_geometry_type = CYLINDER
cylinder_axis_point_1 = '0 0 0'
cylinder_axis_point_2 = '0 0 1'
[../]
[]
[BCs]
[./mid]
type = FunctionDirichletBC
boundary = 1
variable = temp
function = temp
[../]
[./temp_far_right]
type = DirichletBC
boundary = 4
variable = temp
value = 100
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-7
[./Quadrature]
order = fifth
side_order = seventh
[../]
[]
[Outputs]
exodus = true
[./Console]
type = Console
[../]
[]
[Postprocessors]
[./temp_left]
type = SideAverageValue
boundary = 2
variable = temp
[../]
[./temp_right]
type = SideAverageValue
boundary = 3
variable = temp
[../]
[./flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[../]
[./flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[../]
[]
(modules/combined/test/tests/cavity_pressure/rz.i)
#
# Cavity Pressure Test
#
# This test is designed to compute an internal pressure based on
# p = n * R * T / V
# where
# p is the pressure
# n is the amount of material in the volume (moles)
# R is the universal gas constant
# T is the temperature
# V is the volume
#
# The mesh is composed of one block (2) with an interior cavity of volume 8.
# Block 1 sits in the cavity and has a volume of 1. Thus, the total
# initial volume is 7.
# The test adjusts T in the following way:
# T => T0 + beta * t
# with
# beta = T0
# T0 = 240.54443866068704
# V0 = 7
# n0 = f(p0)
# p0 = 100
# R = 8.314472 J * K^(-1) * mol^(-1)
#
# So, n0 = p0 * V0 / R / T0 = 100 * 7 / 8.314472 / 240.544439
# = 0.35
#
# At t = 1, p = 200.
[Problem]
coord_type = RZ
[]
[GlobalParams]
displacements = 'disp_r disp_z'
[]
[Mesh]
file = rz.e
[]
[Functions]
[./temperature]
type = PiecewiseLinear
x = '0 1'
y = '1 2'
scale_factor = 240.54443866068704
[../]
[]
[Variables]
[./disp_r]
[../]
[./disp_z]
[../]
[./temp]
initial_condition = 240.54443866068704
[../]
[]
[Kernels]
[./TensorMechanics]
use_displaced_mesh = true
[../]
[./heat]
type = Diffusion
variable = temp
use_displaced_mesh = true
[../]
[]
[BCs]
[./no_x]
type = DirichletBC
variable = disp_r
boundary = '1 2'
value = 0.0
[../]
[./no_y]
type = DirichletBC
variable = disp_z
boundary = '1 2'
value = 0.0
[../]
[./temperatureInterior]
type = FunctionDirichletBC
boundary = 2
function = temperature
variable = temp
[../]
[./CavityPressure]
[./1]
boundary = 2
initial_pressure = 100
R = 8.314472
temperature = aveTempInterior
volume = internalVolume
startup_time = 0.5
output = ppress
[../]
[../]
[]
[Materials]
[./elastic_tensor1]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.3
block = 1
[../]
[./strain1]
type = ComputeAxisymmetricRZFiniteStrain
block = 1
[../]
[./stress1]
type = ComputeFiniteStrainElasticStress
block = 1
[../]
[./elastic_tensor2]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.3
block = 2
[../]
[./strain2]
type = ComputeAxisymmetricRZFiniteStrain
block = 2
[../]
[./stress2]
type = ComputeFiniteStrainElasticStress
block = 2
[../]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
nl_abs_tol = 1e-10
l_max_its = 20
dt = 0.5
end_time = 1.0
[]
[Postprocessors]
[./internalVolume]
type = InternalVolume
boundary = 2
execute_on = 'initial linear'
[../]
[./aveTempInterior]
type = SideAverageValue
boundary = 2
variable = temp
execute_on = 'initial linear'
[../]
[]
[Outputs]
exodus = true
[./checkpoint]
type = Checkpoint
num_files = 1
[../]
[]
(modules/heat_transfer/test/tests/heat_source_bar/ad_heat_source_bar.i)
# This is a simple 1D test of the volumetric heat source with material properties
# of a representative ceramic material. A bar is uniformly heated, and a temperature
# boundary condition is applied to the left side of the bar.
# Important properties of problem:
# Length: 0.01 m
# Thermal conductivity = 3.0 W/(mK)
# Specific heat = 300.0 J/K
# density = 10431.0 kg/m^3
# Prescribed temperature on left side: 600 K
# When it has reached steady state, the temperature as a function of position is:
# T = -q/(2*k) (x^2 - 2*x*length) + 600
# or
# T = -6.3333e+7 * (x^2 - 0.02*x) + 600
# on left side: T=600, on right side, T=6933.3
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 0.01
nx = 20
[]
[Variables]
[./temp]
initial_condition = 300.0
[../]
[]
[Kernels]
[./heat]
type = ADHeatConduction
variable = temp
thermal_conductivity = thermal_conductivity
[../]
[./heatsource]
type = ADMatHeatSource
material_property = volumetric_heat
variable = temp
scalar = 10
[../]
[]
[BCs]
[./lefttemp]
type = DirichletBC
boundary = left
variable = temp
value = 600
[../]
[]
[Materials]
[./density]
type = ADGenericConstantMaterial
prop_names = 'density thermal_conductivity volumetric_heat '
prop_values = '10431.0 3.0 3.8e7'
[../]
[]
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./right]
type = SideAverageValue
variable = temp
boundary = right
[../]
[./error]
type = NodalL2Error
function = '-3.8e+8/(2*3) * (x^2 - 2*x*0.01) + 600'
variable = temp
[../]
[]
[Outputs]
execute_on = FINAL
exodus = true
[]
(test/tests/postprocessors/side_average_value/side_average_value_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = 0
xmax = 2
ymin = 0
ymax = 1
[]
[Variables]
active = 'u'
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
active = 'diff'
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
active = 'left right'
[left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Postprocessors]
[average]
type = SideAverageValue
boundary = 0
variable = u
[]
[]
[Outputs]
file_base = out
exodus = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_htonly/planar_yz.i)
# 1-D Gap Heat Transfer Test without mechanics
#
# This test exercises 1-D gap heat transfer for a constant conductivity gap.
#
# The mesh consists of two element blocks in the y-z plane. Each element block
# is a square. They sit next to one another with a unit between them.
#
# The conductivity of both blocks is set very large to achieve a uniform temperature
# across each block. The temperature of the far bottom boundary
# is ramped from 100 to 200 over one time unit. The temperature of the far top
# boundary is held fixed at 100.
#
# A simple analytical solution is possible for the heat flux between the blocks:
#
# Flux = (T_left - T_right) * (gapK/gap_width)
#
# The gap conductivity is specified as 1, thus
#
# gapK(Tavg) = 1.0*Tavg
#
# The heat flux across the gap at time = 1 is then:
#
# Flux = 100 * (1.0/1.0) = 100
#
# For comparison, see results from the flux post processors. These results
# are the same as for the unit 1-D gap heat transfer between two unit cubes.
[Mesh]
[file]
type = FileMeshGenerator
file = simple_2D.e
[]
[./rotate]
type = TransformGenerator
transform = ROTATE
vector_value = '0 90 90'
input = file
[../]
[]
[Functions]
[./temp]
type = PiecewiseLinear
x = '0 1 2'
y = '100 200 200'
[../]
[]
[ThermalContact]
[./thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
[../]
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
initial_condition = 100
[../]
[]
[AuxVariables]
[./gap_cond]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[]
[BCs]
[./temp_far_bottom]
type = FunctionDirichletBC
boundary = 1
variable = temp
function = temp
[../]
[./temp_far_top]
type = DirichletBC
boundary = 4
variable = temp
value = 100
[../]
[]
[AuxKernels]
[./conductance]
type = MaterialRealAux
property = gap_conductance
variable = gap_cond
boundary = 2
[../]
[]
[Materials]
[./heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 100000000.0
[../]
[./density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 4'
line_search = 'none'
nl_rel_tol = 1e-12
l_tol = 1e-3
l_max_its = 100
dt = 1e-1
end_time = 1.0
[]
[Postprocessors]
[./temp_bottom]
type = SideAverageValue
boundary = 2
variable = temp
execute_on = 'initial timestep_end'
[../]
[./temp_top]
type = SideAverageValue
boundary = 3
variable = temp
execute_on = 'initial timestep_end'
[../]
[./flux_bottom]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[./flux_top]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/misc/re_init_face.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 16
ny = 16
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Modules/TensorMechanics/Master]
[all]
use_automatic_differentiation = false
strain = FINITE
add_variables = true
[]
[]
[Variables]
[disp_x]
order = FIRST
[]
[disp_y]
order = FIRST
[]
[]
[Materials]
[elastic_tensor_cover]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 10
poissons_ratio = 0.3
use_displaced_mesh = true
[]
[stress]
type = ComputeFiniteStrainElasticStress
[]
[density]
type = GenericConstantMaterial
prop_names = 'density'
prop_values = '1'
[]
[]
[Executioner]
type = Transient
dt = 0.3
num_steps = 3
[]
[Postprocessors]
[side_average]
type = SideAverageValue
boundary = right
variable = disp_x
[]
[]
(modules/thermal_hydraulics/test/tests/components/heat_structure_2d_radiation_coupler_rz/heat_structure_2d_radiation_coupler_rz.i)
emissivity1 = 0.75
emissivity2 = 0.5
[SolidProperties]
[hs_mat]
type = ThermalFunctionSolidProperties
k = 15
cp = 500
rho = 8000
[]
[]
[Components]
[hs1]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 1 0'
length = 0.5
n_elems = 25
inner_radius = 0.1
names = 'region1'
widths = '0.1'
n_part_elems = '5'
solid_properties = 'hs_mat'
solid_properties_T_ref = '300'
initial_T = 300
[]
[hs2]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 1 0'
length = '0.5 0.5'
n_elems = '25 25'
axial_region_names = 'axregion1 axregion2'
inner_radius = 0.5
names = 'region1'
widths = '0.1'
n_part_elems = '5'
solid_properties = 'hs_mat'
solid_properties_T_ref = '300'
initial_T = 1000
[]
[hs_coupler]
type = HeatStructure2DRadiationCouplerRZ
primary_heat_structure = hs1
secondary_heat_structure = hs2
primary_boundary = hs1:outer
secondary_boundary = hs2:axregion1:inner
primary_emissivity = ${emissivity1}
secondary_emissivity = ${emissivity2}
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Postprocessors]
[E_tot]
type = ADHeatStructureEnergyRZ
block = 'hs1:region1 hs2:region1'
axis_dir = '1 1 0'
axis_point = '0 0 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_tot_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = E_tot
execute_on = 'INITIAL TIMESTEP_END'
[]
[T1]
type = SideAverageValue
variable = T_solid
boundary = hs1:outer
execute_on = 'INITIAL TIMESTEP_END'
[]
[T2]
type = SideAverageValue
variable = T_solid
boundary = hs2:axregion1:inner
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 10
num_steps = 10
abort_on_solve_fail = true
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
nl_max_its = 10
l_tol = 1e-4
l_max_its = 10
[]
[Outputs]
file_base = 'heat_structure_2d_radiation_coupler_rz'
[csv]
type = CSV
show = 'E_tot_change T1 T2'
[]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_3D_mortar.i)
outer_htc = 10 # W/m^2/K
outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 6
nz = 6
xmin = -1
xmax = -0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
elem_type = HEX27
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'left_bottom left_back left_right left_front left_left left_top'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 8
nz = 8
xmin = 0.5
xmax = 1
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
elem_type = HEX27
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3 4 5'
# new_boundary = 'right_bottom right_back right_right right_front right_left right_top'
new_boundary = '100 101 102 103 104 105'
[]
[right_block_sidesets_rename]
type = RenameBoundaryGenerator
input = right_block_sidesets
old_boundary = '100 101 102 103 104 105'
new_boundary = 'right_bottom right_back right_right right_front right_left right_top'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sidesets_rename
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[left_lower]
type = LowerDBlockFromSidesetGenerator
input = combined_mesh
sidesets = 'left_right'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[right_lower]
type = LowerDBlockFromSidesetGenerator
input = left_lower
sidesets = 'right_left'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[lm]
order = SECOND
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[AuxVariables]
[power_density]
block = 1
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
block = '1 2'
[]
[heat_source]
type = CoupledForce
variable = temp
block = '1'
v = power_density
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = temp
boundary = 'left_right'
primary_emissivity = 0.0
secondary_emissivity = 0.0
[]
[conduction]
type = GapFluxModelConduction
temperature = temp
boundary = 'left_right'
gap_conductivity = 5.0
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
primary_boundary = 'right_left'
primary_subdomain = 'primary_lower'
secondary_boundary = 'left_right'
secondary_subdomain = 'secondary_lower'
gap_flux_models = 'radiation conduction'
gap_geometry_type = PLATE
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = 'right_right' # outer RPV
coefficient = ${outer_htc}
T_infinity = ${outer_Tinf}
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-8
[]
[Outputs]
exodus = true
csv = true
[Console]
type = Console
[]
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = 'left_right'
variable = temp
[]
[temp_right]
type = SideAverageValue
boundary = 'right_left'
variable = temp
[]
[flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 'left_right'
diffusivity = thermal_conductivity
[]
[flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 'right_left'
diffusivity = thermal_conductivity
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 1
[]
[convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = 'right_right' # outer RVP
T_fluid = ${outer_Tinf}
htc = ${outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(convective_out - ptot) / ptot'
pp_names = 'convective_out ptot'
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = 'left_right right_left'
variable = temp
[]
[]
(modules/thermal_hydraulics/test/tests/components/volume_junction_1phase/phy.deadend.i)
# Junction between 3 pipes, 1 of which goes to a dead-end. In the steady-state,
# no flow should go into the dead-end pipe.
[GlobalParams]
gravity_vector = '0 0 0'
scaling_factor_1phase = '1 1 1e-5'
initial_T = 250
initial_p = 1e5
initial_vel_x = 1
initial_vel_y = 0
initial_vel_z = 0
closures = simple_closures
[]
[AuxVariables]
[p0]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[p0_kernel]
type = StagnationPressureAux
variable = p0
fp = eos
e = e
v = v
vel = vel
[]
[]
[FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 1.4
cv = 725
q = 0
q_prime = 0
p_inf = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[T0]
type = ParsedFunction
expression = 'if (x < 1, 300 + 50 * sin(2*pi*x + 1.5*pi), 250)'
[]
[]
[Components]
[inlet]
type = InletDensityVelocity1Phase
input = 'inlet_pipe:in'
rho = 1.37931034483
vel = 1
[]
[inlet_pipe]
type = FlowChannel1Phase
fp = eos
position = '0 0 0'
orientation = '1 0 0'
length = 1
A = 1
f = 0
initial_T = T0
initial_p = 1e5
initial_vel = 1
n_elems = 20
[]
[junction1]
type = VolumeJunction1Phase
connections = 'inlet_pipe:out deadend_pipe:in outlet_pipe:in'
position = '1 0 0'
volume = 1e-8
[]
[outlet_pipe]
type = FlowChannel1Phase
fp = eos
position = '1 0 0'
orientation = '1 0 0'
length = 1
A = 1
f = 0
initial_T = 250
initial_p = 1e5
initial_vel = 1
n_elems = 20
[]
[outlet]
type = Outlet1Phase
input = 'outlet_pipe:out'
p = 1e5
[]
[deadend_pipe]
type = FlowChannel1Phase
fp = eos
position = '1 0 0'
orientation = '0 1 0'
length = 1
A = 1
f = 0
initial_T = 250
initial_p = 1e5
initial_vel = 0
n_elems = 20
[]
[deadend]
type = SolidWall1Phase
input = 'deadend_pipe:out'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 0
nl_abs_tol = 1e-6
nl_max_its = 10
l_tol = 1e-6
l_max_its = 10
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
start_time = 0
end_time = 5
dt = 0.1
abort_on_solve_fail = true
[]
[Postprocessors]
# These post-processors are used for testing that the stagnation pressure in
# the dead-end pipe is equal to the inlet stagnation pressure.
[p0_inlet]
type = SideAverageValue
variable = p0
boundary = inlet_pipe:in
[]
[p0_deadend]
type = SideAverageValue
variable = p0
boundary = deadend_pipe:out
[]
[test_rel_err]
type = RelativeDifferencePostprocessor
value1 = p0_deadend
value2 = p0_inlet
[]
[]
[Outputs]
[out]
type = CSV
show = test_rel_err
sync_only = true
sync_times = '1 2 3 4 5'
[]
velocity_as_vector = false
[]
(modules/solid_mechanics/test/tests/uel/test.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
xmax = 10
ymax = 3
elem_type = TRI3
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = left
value = 0
[]
inactive = 'right_dirichlet'
[right_neumann]
type = FunctionNeumannBC
variable = disp_x
function = t
boundary = right
[]
[right_dirichlet]
type = FunctionDirichletBC
variable = disp_x
function = t/10
boundary = right
[]
[]
[UserObjects]
[uel]
type = AbaqusUserElement
variables = 'disp_x disp_y'
plugin = ../../plugins/elastic_uel_tri
use_displaced_mesh = false
num_state_vars = 8
constant_properties = '100 0.3' # E nu
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Executioner]
type = Transient
dt = 1
num_steps = 15
[]
[Postprocessors]
[delta_l]
type = SideAverageValue
variable = disp_x
boundary = right
[]
[V]
type = ElementIntegralMaterialProperty
mat_prop = 1
[]
[]
[Outputs]
exodus = true
csv = true
print_linear_residuals = false
[]
(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/solid_mechanics/test/tests/ad_thermal_expansion_function/mean.i)
# This test checks the thermal expansion calculated via a mean thermal expansion coefficient.
# The coefficient is selected so as to result in a 1e-4 strain in the x-axis, and to cross over
# from positive to negative strain.
[Mesh]
[./gen]
type = GeneratedMeshGenerator
dim = 3
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./temp]
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = SMALL
add_variables = true
eigenstrain_names = eigenstrain
generate_output = 'strain_xx strain_yy strain_zz'
use_automatic_differentiation = true
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./bottom]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./back]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[]
[AuxKernels]
[./temp]
type = FunctionAux
variable = temp
function = '1 + t'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1
poissons_ratio = 0.3
[../]
[./stress]
type = ADComputeLinearElasticStress
[../]
[./thermal_expansion_strain]
type = ADComputeMeanThermalExpansionFunctionEigenstrain
thermal_expansion_function = cte_func_mean
thermal_expansion_function_reference_temperature = 1.2
stress_free_temperature = 1.5
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Functions]
[./cte_func_mean]
type = ParsedFunction
symbol_names = 'T T_stress_free T_ref end_strain'
symbol_values = '2 1.5 1.2 1e-4'
expression = 'end_strain / (T - T_stress_free - end_strain * (T_stress_free - T_ref))'
[../]
[]
[Postprocessors]
[./disp_x_max]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./temp_avg]
type = ElementAverageValue
variable = temp
[../]
[]
[Executioner]
type = Transient
end_time = 1.0
dt = 0.1
[]
[Outputs]
csv = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_sphere3D_mortar.i)
sphere_outer_htc = 10 # W/m^2/K
sphere_outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Mesh]
[file]
type = FileMeshGenerator
file = sphere3D.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '3'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[AuxVariables]
# [gap_conductance]
# order = CONSTANT
# family = MONOMIAL
# []
[power_density]
block = 'fuel'
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
block = '1 2'
[]
[heat_source]
type = CoupledForce
variable = temp
block = 'fuel'
v = power_density
[]
[]
# [AuxKernels]
# [gap_cond]
# type = MaterialRealAux
# property = gap_conductance
# variable = gap_conductance
# boundary = 2
# []
# []
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = temp
boundary = 2
primary_emissivity = 0.0
secondary_emissivity = 0.0
[]
[conduction]
type = GapFluxModelConduction
temperature = temp
boundary = 2
gap_conductivity = 5.0
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
primary_boundary = 3
primary_subdomain = 10000
secondary_boundary = 2
secondary_subdomain = 10001
gap_flux_models = 'radiation conduction'
gap_geometry_type = SPHERE
sphere_origin = '0 0 0'
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = '4' # outer RPV
coefficient = ${sphere_outer_htc}
T_infinity = ${sphere_outer_Tinf}
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-7
[]
[Outputs]
exodus = true
csv = true
[Console]
type = Console
[]
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = 2
variable = temp
[]
[temp_right]
type = SideAverageValue
boundary = 3
variable = temp
[]
[flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[]
[flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 'fuel'
[]
[sphere_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = '4' # outer RVP
T_fluid = ${sphere_outer_Tinf}
htc = ${sphere_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(sphere_convective_out - ptot) / ptot'
pp_names = 'sphere_convective_out ptot'
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '2 3'
variable = temp
[]
[]
(modules/solid_mechanics/test/tests/uel/small.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
xmax = 10
ymax = 3
elem_type = TRI3
[]
[pin]
type = ExtraNodesetGenerator
nodes = 106
new_boundary = pin
input = gen
[]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = pin
value = 0
[]
inactive = 'right_dirichlet'
[right_neumann]
type = FunctionNeumannBC
variable = disp_x
function = t
boundary = right
[]
[right_dirichlet]
type = FunctionDirichletBC
variable = disp_x
function = t/10
boundary = right
[]
[]
[UserObjects]
[uel]
type = AbaqusUserElement
variables = 'disp_x disp_y'
plugin = ../../plugins/small_strain_tri_uel
use_displaced_mesh = false
num_state_vars = 8
constant_properties = '100 0.3' # E nu
extra_vector_tags = 'kernel_residual'
[]
[]
[Problem]
kernel_coverage_check = false
extra_tag_vectors = 'kernel_residual'
[]
[AuxVariables]
[res_x]
[]
[res_y]
[]
[]
[AuxKernels]
[res_x]
type = TagVectorAux
variable = res_x
v = disp_x
vector_tag = kernel_residual
[]
[res_y]
type = TagVectorAux
variable = res_y
v = disp_y
vector_tag = kernel_residual
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
dt = 1
num_steps = 15
[]
[Postprocessors]
[delta_l]
type = SideAverageValue
variable = disp_x
boundary = right
execute_on = 'INITIAL TIMESTEP_END'
[]
[V]
type = ElementIntegralMaterialProperty
mat_prop = 1
use_displaced_mesh = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/heat_transfer/test/tests/directional_flux_bc/2d.i)
[Mesh]
[planet]
type = ConcentricCircleMeshGenerator
has_outer_square = false
radii = 1
num_sectors = 10
rings = 2
preserve_volumes = false
[]
[moon]
type = ConcentricCircleMeshGenerator
has_outer_square = false
radii = 0.5
num_sectors = 8
rings = 2
preserve_volumes = false
[]
[combine]
type = CombinerGenerator
inputs = 'planet moon'
positions = '0 0 0 -1.5 -0.5 0'
[]
[]
[GlobalParams]
illumination_flux = '1 1 0'
[]
[Variables]
[u]
[]
[v]
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
[]
[dt_u]
type = TimeDerivative
variable = u
[]
[diff_v]
type = Diffusion
variable = v
[]
[dt_v]
type = TimeDerivative
variable = v
[]
[]
[BCs]
[flux_u]
type = DirectionalFluxBC
variable = u
boundary = outer
[]
[flux_v]
type = DirectionalFluxBC
variable = v
boundary = outer
self_shadow_uo = shadow
[]
[]
[Postprocessors]
[ave_v_all]
type = SideAverageValue
variable = v
boundary = outer
[]
[ave_v_exposed]
type = ExposedSideAverageValue
variable = v
boundary = outer
self_shadow_uo = shadow
[]
[]
[UserObjects]
[shadow]
type = SelfShadowSideUserObject
boundary = outer
execute_on = INITIAL
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/gtn_single.i)
# This test provides an example of an individual GTN viscoplasticity model
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmax = 0.002
ymax = 0.002
[]
[Physics/SolidMechanics/QuasiStatic/All]
strain = FINITE
add_variables = true
base_name = 'total'
generate_output = 'strain_xx strain_yy strain_xy hydrostatic_stress vonmises_stress'
use_automatic_differentiation = true
[]
[Functions]
[./pull]
type = PiecewiseLinear
x = '0 0.1'
y = '0 1e-5'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.3
base_name = 'total'
[../]
[./stress]
type = ADComputeMultipleInelasticStress
inelastic_models = gtn
outputs = all
base_name = 'total'
[../]
[./porosity]
type = ADPorosityFromStrain
initial_porosity = 0.1
inelastic_strain = 'total_combined_inelastic_strain'
outputs = 'all'
[../]
[./gtn]
type = ADViscoplasticityStressUpdate
total_strain_base_name = 'total'
coefficient = 'coef'
power = 3
viscoplasticity_model = GTN
outputs = all
relative_tolerance = 1e-11
[../]
[./coef]
type = ADParsedMaterial
property_name = coef
# Example of creep power law
expression = '1e-18 * exp(-4e4 / 1.987 / 1200)'
[../]
[]
[BCs]
[./no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./pull_disp_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = top
function = pull
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 0.01
end_time = 0.12
[]
[Postprocessors]
[./disp_x]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./disp_y]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[./avg_hydro]
type = ElementAverageValue
variable = total_hydrostatic_stress
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = total_vonmises_stress
[../]
[./dt]
type = TimestepSize
[../]
[./num_lin]
type = NumLinearIterations
outputs = console
[../]
[./num_nonlin]
type = NumNonlinearIterations
outputs = console
[../]
[./eff_creep_strain]
type = ElementAverageValue
variable = effective_viscoplasticity
[../]
[./porosity]
type = ElementAverageValue
variable = porosity
[../]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/radial_disp_aux/sphere_3d_cartesian.i)
# The purpose of this set of tests is to check the values computed
# by the RadialDisplacementAux AuxKernel. They should match the
# radial component of the displacment for a cylindrical or spherical
# model.
# This particular model is of a sphere subjected to uniform thermal
# expansion represented using a 3D Cartesian model.
[Mesh]
type = FileMesh
file = sphere_sector_3d.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
order = SECOND
family = LAGRANGE
[]
[AuxVariables]
[./temp]
[../]
[./rad_disp]
[../]
[]
[Functions]
[./temperature_load]
type = ParsedFunction
expression = t+300.0
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
eigenstrain_names = eigenstrain
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = temperature_load
use_displaced_mesh = false
[../]
[./raddispaux]
type = RadialDisplacementSphereAux
variable = rad_disp
origin = '0 0 0'
[../]
[]
[BCs]
[./x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./y]
type = DirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[./z]
type = DirichletBC
variable = disp_z
boundary = 3
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 300
thermal_expansion_coeff = 1.3e-5
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '51'
line_search = 'none'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
start_time = 0.0
end_time = 1
dt = 1
dtmin = 1
[]
[Outputs]
csv = true
exodus = true
[]
#[Postprocessors]
# [./strain_xx]
# type = SideAverageValue
# variable =
# block = 0
# [../]
#[]
(modules/heat_transfer/test/tests/radiative_bcs/function_radiative_bc.i)
#
# If we assume that epsilon*sigma*(T_inf^4-T_s^4) is approximately equal to
# epsilon*sigma*4*T_inf^3*(T_inf-T_s), that form is equivalent to
# h*(T_inf-T_s), the convective flux bc. So, the radiative and convective
# flux bcs should give nearly the same answer if the leading terms are equal.
#
[Mesh]
[top]
type = GeneratedMeshGenerator
dim = 3
nx = 10
bias_x = 0.8
ymin = 1.2
ymax = 2.2
boundary_name_prefix = top
[]
[bottom]
type = GeneratedMeshGenerator
dim = 3
nx = 10
bias_x = 0.8
boundary_name_prefix = bot
boundary_id_offset = 6
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'top bottom'
[]
[]
[Variables]
[temp]
initial_condition = 600.0
[]
[]
[Kernels]
[heat_dt]
type = TimeDerivative
variable = temp
[]
[heat_conduction]
type = HeatConduction
variable = temp
[]
[]
[BCs]
[./top_right]
type = ConvectiveHeatFluxBC
variable = temp
boundary = top_right
T_infinity = 300.0
heat_transfer_coefficient = 3.0
heat_transfer_coefficient_dT = 0
[../]
[./bot_right]
type = FunctionRadiativeBC
variable = temp
boundary = bot_right
# htc/(stefan-boltzmann*4*T_inf^3)
emissivity_function = '3/(5.670367e-8*4*300*300*300)'
[../]
[]
[Materials]
[./thermal]
type = GenericConstantMaterial
prop_names = 'density thermal_conductivity specific_heat'
prop_values = '1 10 100'
[../]
[]
[Postprocessors]
[./top_left_temp]
type = SideAverageValue
variable = temp
boundary = top_left
execute_on = 'TIMESTEP_END initial'
[../]
[./bot_left_temp]
type = SideAverageValue
variable = temp
boundary = bot_left
execute_on = 'TIMESTEP_END initial'
[../]
[./top_right_temp]
type = SideAverageValue
variable = temp
boundary = top_right
[../]
[./bot_right_temp]
type = SideAverageValue
variable = temp
boundary = bot_right
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1e1
nl_abs_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/pwcns/channel-flow/2d-transient-action.i)
# Solid properties
cp_s = 2
rho_s = 4
k_s = 1e-2
h_fs = 10
# Operating conditions
u_inlet = 1
T_inlet = 200
p_outlet = 10
top_side_temperature = 150
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 1
nx = 20
ny = 5
[]
[]
[Variables]
[T_solid]
type = MooseVariableFVReal
initial_condition = 100
[]
[]
[AuxVariables]
[porosity]
type = MooseVariableFVReal
initial_condition = 0.5
[]
[velocity_norm]
type = MooseVariableFVReal
[]
[]
[FluidProperties]
[fp]
type = FlibeFluidProperties
[]
[]
[Modules]
[NavierStokesFV]
compressibility = 'weakly-compressible'
add_energy_equation = true
porous_medium_treatment = true
density = 'rho'
dynamic_viscosity = 'mu'
thermal_conductivity = 'k'
specific_heat = 'cp'
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}'
ambient_convection_alpha = 'h_cv'
ambient_temperature = 'T_solid'
mass_advection_interpolation = 'average'
momentum_advection_interpolation = 'average'
energy_advection_interpolation = 'average'
[]
[]
[FVKernels]
[solid_energy_time]
type = PINSFVEnergyTimeDerivative
variable = T_solid
cp = ${cp_s}
rho = ${rho_s}
is_solid = true
porosity = 'porosity'
[]
[solid_energy_diffusion]
type = FVDiffusion
variable = T_solid
coeff = ${k_s}
[]
[solid_energy_convection]
type = PINSFVEnergyAmbientConvection
variable = T_solid
is_solid = true
T_fluid = 'T_fluid'
T_solid = 'T_solid'
h_solid_fluid = 'h_cv'
[]
[]
[FVBCs]
[heated-side]
type = FVDirichletBC
boundary = 'top'
variable = 'T_solid'
value = ${top_side_temperature}
[]
[]
[FunctorMaterials]
[const_functor]
type = ADGenericFunctorMaterial
prop_names = 'h_cv'
prop_values = '${h_fs}'
[]
[fluid_props_to_mat_props]
type = GeneralFunctorFluidProps
fp = fp
pressure = 'pressure'
T_fluid = 'T_fluid'
speed = 'velocity_norm'
# To initialize with a high viscosity
mu_rampdown = 'mu_rampdown'
# For porous flow
characteristic_length = 1
porosity = 'porosity'
[]
[]
[Functions]
[mu_rampdown]
type = PiecewiseLinear
x = '1 2 3 4'
y = '1e3 1e2 1e1 1'
[]
[]
[AuxKernels]
[speed]
type = ParsedAux
variable = 'velocity_norm'
coupled_variables = 'superficial_vel_x superficial_vel_y porosity'
expression = 'sqrt(superficial_vel_x*superficial_vel_x + superficial_vel_y*superficial_vel_y) / '
'porosity'
[]
[]
[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-12
end_time = 3.0
[]
# Some basic Postprocessors to examine the solution
[Postprocessors]
[inlet-p]
type = SideAverageValue
variable = pressure
boundary = 'left'
[]
[outlet-u]
type = SideAverageValue
variable = superficial_vel_x
boundary = 'right'
[]
[outlet-temp]
type = SideAverageValue
variable = T_fluid
boundary = 'right'
[]
[solid-temp]
type = ElementAverageValue
variable = T_solid
[]
[]
[Outputs]
exodus = true
csv = false
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_htonly/cyl2D_xz.i)
#
# 2D Cylindrical Gap Heat Transfer Test.
#
# This test exercises 2D gap heat transfer for a constant conductivity gap.
#
# The mesh consists of an inner solid cylinder of radius = 1 unit, and outer
# hollow cylinder with an inner radius of 2 in the x-z plane. In other words,
# the gap between them is 1 radial unit in length.
#
# The calculated results are the same as for the cyl2D.i case in the x-y plane.
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Mesh]
[file]
type = FileMeshGenerator
file = cyl2D.e
[]
[./rotate]
type = TransformGenerator
transform = ROTATE
vector_value = '0 90 0'
input = file
[../]
[]
[Functions]
[./temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[../]
[]
[Variables]
[./temp]
initial_condition = 100
[../]
[]
[AuxVariables]
[./gap_conductance]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./heat_conduction]
type = HeatConduction
variable = temp
[../]
[]
[AuxKernels]
[./gap_cond]
type = MaterialRealAux
property = gap_conductance
variable = gap_conductance
boundary = 2
[../]
[]
[Materials]
[./heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 1000000.0
[../]
[]
[ThermalContact]
[./thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
gap_conductivity = 1
quadrature = true
gap_geometry_type = CYLINDER
cylinder_axis_point_1 = '0 0 0'
cylinder_axis_point_2 = '0 1 0'
[../]
[]
[BCs]
[./mid]
type = FunctionDirichletBC
boundary = 1
variable = temp
function = temp
[../]
[./temp_far_right]
type = DirichletBC
boundary = 4
variable = temp
value = 100
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-7
[./Quadrature]
order = fifth
side_order = seventh
[../]
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[./temp_left]
type = SideAverageValue
boundary = 2
variable = temp
[../]
[./temp_right]
type = SideAverageValue
boundary = 3
variable = temp
[../]
[./flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[../]
[./flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[../]
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/heated/2d-transient.i)
# Fluid properties
mu = 1
rho = 1
cp = 1
k = 1e-3
# Solid properties
cp_s = 2
rho_s = 4
k_s = 1e-2
h_fs = 10
# Operating conditions
u_inlet = 1
T_inlet = 200
p_outlet = 10
top_side_temperature = 150
# Numerical scheme
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 1
nx = 100
ny = 20
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = superficial_vel_x
v = superficial_vel_y
pressure = pressure
porosity = porosity
[]
[]
[Variables]
[superficial_vel_x]
type = PINSFVSuperficialVelocityVariable
initial_condition = ${u_inlet}
[]
[superficial_vel_y]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1e-6
[]
[pressure]
type = INSFVPressureVariable
initial_condition = ${p_outlet}
[]
[T_fluid]
type = INSFVEnergyVariable
[]
[T_solid]
type = MooseVariableFVReal
initial_condition = 100
[]
[]
[AuxVariables]
[porosity]
type = MooseVariableFVReal
initial_condition = 0.5
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_time]
type = INSFVMomentumTimeDerivative
variable = superficial_vel_x
rho = ${rho}
momentum_component = 'x'
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_x
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_x
mu = ${mu}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_x
momentum_component = 'x'
pressure = pressure
porosity = porosity
[]
[v_time]
type = INSFVMomentumTimeDerivative
variable = superficial_vel_y
rho = ${rho}
momentum_component = 'y'
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_y
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'y'
[]
[v_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_y
mu = ${mu}
porosity = porosity
momentum_component = 'y'
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_y
momentum_component = 'y'
pressure = pressure
porosity = porosity
[]
[energy_time]
type = PINSFVEnergyTimeDerivative
variable = T_fluid
cp = ${cp}
rho = ${rho}
is_solid = false
porosity = porosity
[]
[energy_advection]
type = PINSFVEnergyAdvection
variable = T_fluid
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
[]
[energy_diffusion]
type = PINSFVEnergyDiffusion
variable = T_fluid
k = ${k}
porosity = porosity
[]
[energy_convection]
type = PINSFVEnergyAmbientConvection
variable = T_fluid
is_solid = false
T_fluid = 'T_fluid'
T_solid = 'T_solid'
h_solid_fluid = 'h_cv'
[]
[solid_energy_time]
type = PINSFVEnergyTimeDerivative
variable = T_solid
cp = ${cp_s}
rho = ${rho_s}
is_solid = true
porosity = porosity
[]
[solid_energy_diffusion]
type = FVDiffusion
variable = T_solid
coeff = ${k_s}
[]
[solid_energy_convection]
type = PINSFVEnergyAmbientConvection
variable = T_solid
is_solid = true
T_fluid = 'T_fluid'
T_solid = 'T_solid'
h_solid_fluid = 'h_cv'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = superficial_vel_x
function = ${u_inlet}
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = superficial_vel_y
function = 0
[]
[inlet-T]
type = FVNeumannBC
variable = T_fluid
value = '${fparse u_inlet * rho * cp * T_inlet}'
boundary = 'left'
[]
[no-slip-u]
type = INSFVNoSlipWallBC
boundary = 'top'
variable = superficial_vel_x
function = 0
[]
[no-slip-v]
type = INSFVNoSlipWallBC
boundary = 'top'
variable = superficial_vel_y
function = 0
[]
[heated-side]
type = FVDirichletBC
boundary = 'top'
variable = 'T_solid'
value = ${top_side_temperature}
[]
[symmetry-u]
type = PINSFVSymmetryVelocityBC
boundary = 'bottom'
variable = superficial_vel_x
u = superficial_vel_x
v = superficial_vel_y
mu = ${mu}
momentum_component = 'x'
[]
[symmetry-v]
type = PINSFVSymmetryVelocityBC
boundary = 'bottom'
variable = superficial_vel_y
u = superficial_vel_x
v = superficial_vel_y
mu = ${mu}
momentum_component = 'y'
[]
[symmetry-p]
type = INSFVSymmetryPressureBC
boundary = 'bottom'
variable = pressure
[]
[outlet-p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = ${p_outlet}
[]
[]
[FunctorMaterials]
[constants]
type = ADGenericFunctorMaterial
prop_names = 'h_cv'
prop_values = '${h_fs}'
[]
[functor_constants]
type = ADGenericFunctorMaterial
prop_names = 'cp'
prop_values = '${cp}'
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
rho = ${rho}
temperature = 'T_fluid'
[]
[]
[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
end_time = 1.5
[]
# Some basic Postprocessors to examine the solution
[Postprocessors]
[inlet-p]
type = SideAverageValue
variable = pressure
boundary = 'left'
[]
[outlet-u]
type = SideAverageValue
variable = superficial_vel_x
boundary = 'right'
[]
[outlet-temp]
type = SideAverageValue
variable = T_fluid
boundary = 'right'
[]
[solid-temp]
type = ElementAverageValue
variable = T_solid
[]
[]
[Outputs]
exodus = true
csv = false
[]
(modules/thermal_hydraulics/test/tests/components/junction_one_to_one_1phase/junction_one_to_one_1phase.i)
# This input file simulates the Sod shock tube using a junction in the middle
# of the domain. The solution should be exactly equivalent to the problem with
# no junction. This test examines the solutions at the junction connections
# and compares them to gold values generated from a version of this input file
# that has no junction.
[GlobalParams]
gravity_vector = '0 0 0'
closures = simple_closures
[]
[Functions]
[p_ic_fn]
type = PiecewiseConstant
axis = x
direction = right
x = '0.5 1.0'
y = '1.0 0.1'
[]
[T_ic_fn]
type = PiecewiseConstant
axis = x
direction = right
x = '0.5 1.0'
y = '1.4 1.12'
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
gamma = 1.4
molar_mass = 11.64024372
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[left_boundary]
type = FreeBoundary1Phase
input = 'left_channel:in'
[]
[left_channel]
type = FlowChannel1Phase
fp = fp
position = '0 0 0'
orientation = '1 0 0'
length = 0.5
n_elems = 50
A = 1.0
initial_T = T_ic_fn
initial_p = p_ic_fn
initial_vel = 0
f = 0
[]
[junction]
type = JunctionOneToOne1Phase
connections = 'left_channel:out right_channel:in'
[]
[right_channel]
type = FlowChannel1Phase
fp = fp
position = '0.5 0 0'
orientation = '1 0 0'
length = 0.5
n_elems = 50
A = 1.0
initial_T = T_ic_fn
initial_p = p_ic_fn
initial_vel = 0
f = 0
[]
[right_boundary]
type = FreeBoundary1Phase
input = 'right_channel:out'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
nl_rel_tol = 1e-10
nl_abs_tol = 1e-8
nl_max_its = 60
l_tol = 1e-4
start_time = 0.0
dt = 1e-3
num_steps = 5
abort_on_solve_fail = true
[]
[Postprocessors]
[rhoA_left]
type = SideAverageValue
variable = rhoA
boundary = left_channel:out
execute_on = 'initial timestep_end'
[]
[rhouA_left]
type = SideAverageValue
variable = rhouA
boundary = left_channel:out
execute_on = 'initial timestep_end'
[]
[rhoEA_left]
type = SideAverageValue
variable = rhoEA
boundary = left_channel:out
execute_on = 'initial timestep_end'
[]
[rhoA_right]
type = SideAverageValue
variable = rhoA
boundary = right_channel:in
execute_on = 'initial timestep_end'
[]
# rhouA_right is added by tests file
[rhoEA_right]
type = SideAverageValue
variable = rhoEA
boundary = right_channel:in
execute_on = 'initial timestep_end'
[]
# This is present to test that junction sidesets work properly
[p_avg_junction]
type = SideAverageValue
boundary = 'junction'
variable = p
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
csv = true
show = 'rhoA_left rhouA_left rhoEA_left rhoA_right rhouA_right rhoEA_right'
execute_on = 'initial timestep_end'
[]
(test/tests/multiapps/picard_postprocessor/transient_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[time]
type = TimeDerivative
variable = u
[]
[sink]
type = BodyForce
variable = u
value = -1
[]
[]
[BCs]
[right]
type = PostprocessorDirichletBC
variable = u
boundary = right
postprocessor = 'from_main'
[]
[]
[Postprocessors]
[from_main]
type = Receiver
default = 0
[]
[to_main]
type = SideAverageValue
variable = u
boundary = left
[]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
[]
[Outputs]
[csv]
type = CSV
start_step = 6
[]
exodus = false
[]
(modules/navier_stokes/test/tests/finite_element/pins/channel-flow/pressure_gradient.i)
# This test case tests the porous-medium flow driven by pressure gradient
#
# At the steady state, eps * grad_p = alpha * u + beta * u^2
# With eps = 0.4, L = 1, grad_p = 1e3/1 = 1e3, alpha = 0, beta = 1000
# u = (eps * grad_p) / beta = 0.4 * 1e3 / 1000 = 0.4 m/s
# This can be verified by check the vel_x at the steady state
[GlobalParams]
gravity = '0 0 0'
order = FIRST
family = LAGRANGE
u = vel_x
v = vel_y
pressure = p
temperature = T
porosity = porosity
eos = eos
conservative_form = false
p_int_by_parts = true
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 0.1
nx = 10
ny = 4
elem_type = QUAD4
[]
[FluidProperties]
[./eos]
type = SimpleFluidProperties
density0 = 100 # kg/m^3
thermal_expansion = 0 # K^{-1}
cp = 100
viscosity = 0.1 # Pa-s, Re=rho*u*L/mu = 100*1*0.1/0.1 = 100
[../]
[]
[Variables]
# velocity
[vel_x]
initial_condition = 1
[]
[vel_y]
initial_condition = 0
[]
# Pressure
[p]
initial_condition = 1e5
[]
[]
[AuxVariables]
[rho]
initial_condition = 100
[]
# Temperature
[T]
initial_condition = 630
[]
[porosity]
initial_condition = 0.4
[]
[]
[Materials]
[mat]
type = PINSFEMaterial
alpha = 0
beta = 1000
[]
[]
[Kernels]
[mass_time]
type = PINSFEFluidPressureTimeDerivative
variable = p
[]
[mass_space]
type = INSFEFluidMassKernel
variable = p
[]
[x_momentum_time]
type = PINSFEFluidVelocityTimeDerivative
variable = vel_x
[]
[x_momentum_space]
type = INSFEFluidMomentumKernel
variable = vel_x
component = 0
[]
[y_momentum_time]
type = PINSFEFluidVelocityTimeDerivative
variable = vel_y
[]
[y_momentum_space]
type = INSFEFluidMomentumKernel
variable = vel_y
component = 1
[]
[]
[AuxKernels]
[rho_aux]
type = FluidDensityAux
variable = rho
p = p
T = T
fp = eos
[]
[]
[BCs]
# BCs for mass equation
# Inlet
[mass_inlet]
type = INSFEFluidMassBC
variable = p
boundary = 'left'
[]
# Outlet
[mass_outlet]
type = INSFEFluidMassBC
variable = p
boundary = 'right'
[]
# BCs for x-momentum equation
# Inlet
[vx_in]
type = INSFEFluidMomentumBC
variable = vel_x
component = 0
boundary = 'left'
p_fn = 1.01e5
[]
# Outlet
[vx_out]
type = INSFEFluidMomentumBC
variable = vel_x
component = 0
boundary = 'right'
p_fn = 1e5
[]
# BCs for y-momentum equation
# Both Inlet and Outlet, and Top and Bottom
[vy]
type = DirichletBC
variable = vel_y
boundary = 'left right bottom top'
value = 0
[]
[]
[Postprocessors]
[v_in]
type = SideAverageValue
variable = vel_x
boundary = 'left'
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
solve_type = 'PJFNK'
[]
[]
[Executioner]
type = Transient
dt = 5
dtmin = 1.e-3
petsc_options_iname = '-pc_type -ksp_gmres_restart'
petsc_options_value = 'lu 100'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-8
nl_max_its = 20
l_tol = 1e-5
l_max_its = 100
start_time = 0.0
end_time = 50
num_steps = 5
[]
[Outputs]
perf_graph = true
print_linear_residuals = false
time_step_interval = 1
execute_on = 'initial timestep_end'
[console]
type = Console
output_linear = false
[]
[out]
type = Exodus
use_displaced = false
[]
[]
(modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/creep.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmax = 0.002
ymax = 0.002
[]
[Physics/SolidMechanics/QuasiStatic/All]
strain = FINITE
add_variables = true
base_name = 'total'
generate_output = 'strain_xx strain_yy strain_xy hydrostatic_stress vonmises_stress'
use_automatic_differentiation = true
[]
[Functions]
[./pull]
type = PiecewiseLinear
x = '0 0.1'
y = '0 1e-5'
[../]
[]
[Materials]
active='elasticity_tensor porous_stress porosity creep'
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.3
base_name = 'total'
[../]
[./porous_stress]
type = ADComputeMultipleInelasticStress
inelastic_models = creep
outputs = all
base_name = 'total'
[../]
[./regular_stress]
type = ADComputeMultipleInelasticStress
inelastic_models = creep
outputs = all
base_name = 'total'
[../]
[./porosity]
type = ADGenericConstantMaterial
prop_names = porosity
prop_values = 0.1
outputs = all
[../]
[./creep]
type = ADPowerLawCreepStressUpdate
activation_energy = 4e4
temperature = 1200
coefficient = 1e-18
gas_constant = 1.987
n_exponent = 3
base_name = 'creep'
outputs = all
[../]
[]
[BCs]
[./no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./pull_disp_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = top
function = pull
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 0.01
end_time = 0.12
[]
[Postprocessors]
[./disp_x]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./disp_y]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[./avg_hydro]
type = ElementAverageValue
variable = total_hydrostatic_stress
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = total_vonmises_stress
[../]
[./dt]
type = TimestepSize
[../]
[./num_lin]
type = NumLinearIterations
outputs = console
[../]
[./num_nonlin]
type = NumNonlinearIterations
outputs = console
[../]
[./eff_creep_strain]
type = ElementAverageValue
variable = creep_effective_creep_strain
[../]
[./porosity]
type = ElementAverageValue
variable = porosity
[../]
[]
[Outputs]
csv = true
[]
(modules/thermal_hydraulics/test/tests/postprocessors/specific_impulse_1phase/Isp_1ph.i)
[GlobalParams]
gravity_vector = '0 0 0'
initial_p = 6e6
initial_T = 600
initial_vel = 0
scaling_factor_1phase = '1 1 1e-5'
closures = simple_closures
[]
[FluidProperties]
[eos]
type = IdealGasFluidProperties
gamma = 1.3066
molar_mass = 2.016e-3
k = 0.437
mu = 3e-5
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
fp = eos
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 10
A = 0.1
f = 0.
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
m_dot = 0.1
T = 800
input = 'pipe1:in'
[]
[outlet]
type = Outlet1Phase
input = 'pipe1:out'
p = 6e6
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.01
growth_factor = 1.4
optimal_iterations = 6
iteration_window = 2
[]
start_time = 0.0
end_time = 100
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
nl_max_its = 10
l_tol = 1e-3
l_max_its = 10
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Postprocessors]
# hand calcs show that Isp should start at 274.3 at 600 K
# and rise to 316.7 at 800 K.
[Isp]
type = ADSpecificImpulse1Phase
p_exit = 1e6
fp = eos
boundary = outlet
[]
[Isp_inst]
type = ADSpecificImpulse1Phase
p_exit = 1e6
fp = eos
cumulative = false
boundary = outlet
[]
[outletT]
type = SideAverageValue
variable = T
boundary = pipe1:out
[]
[]
[Outputs]
[out]
type = CSV
show = 'Isp Isp_inst'
execute_on = 'INITIAL FINAL'
[]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_sphere3D.i)
sphere_outer_htc = 10 # W/m^2/K
sphere_outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Mesh]
file = sphere3D.e
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[]
[AuxVariables]
[gap_conductance]
order = CONSTANT
family = MONOMIAL
[]
[power_density]
block = 'fuel'
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
[]
[heat_source]
type = CoupledForce
variable = temp
block = 'fuel'
v = power_density
[]
[]
[AuxKernels]
[gap_cond]
type = MaterialRealAux
property = gap_conductance
variable = gap_conductance
boundary = 2
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[ThermalContact]
[thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
gap_conductivity = 5
gap_geometry_type = SPHERE
sphere_origin = '0 0 0'
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = '4' # outer RPV
coefficient = ${sphere_outer_htc}
T_infinity = ${sphere_outer_Tinf}
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-7
[Quadrature]
order = fifth
side_order = seventh
[]
[]
[Outputs]
exodus = true
csv = true
[Console]
type = Console
[]
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = 2
variable = temp
[]
[temp_right]
type = SideAverageValue
boundary = 3
variable = temp
[]
[flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[]
[flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 'fuel'
[]
[sphere_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = '4' # outer RVP
T_fluid = ${sphere_outer_Tinf}
htc = ${sphere_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(sphere_convective_out - ptot) / ptot'
pp_names = 'sphere_convective_out ptot'
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '2 3'
variable = temp
[]
[]
(modules/thermal_hydraulics/tutorials/single_phase_flow/02_core.i)
T_in = 300. # K
m_dot_in = 1e-2 # kg/s
press = 10e5 # Pa
# core parameters
core_length = 1. # m
core_n_elems = 25
core_dia = '${units 2. cm -> m}'
core_pitch = '${units 8.7 cm -> m}'
A_core = '${fparse core_pitch^2 - 0.25 *pi * core_dia^2}'
P_wet_core = '${fparse 4*core_pitch + pi * core_dia}'
Dh_core = '${fparse 4 * A_core / P_wet_core}'
tot_power = 2000 # W
[GlobalParams]
initial_p = ${press}
initial_vel = 0.0001
initial_T = ${T_in}
gravity_vector = '0 0 0'
rdg_slope_reconstruction = minmod
scaling_factor_1phase = '1 1e-2 1e-4'
closures = thm_closures
fp = he
[]
[FluidProperties]
[he]
type = IdealGasFluidProperties
molar_mass = 4e-3
gamma = 1.67
k = 0.2556
mu = 3.22639e-5
[]
[]
[Closures]
[thm_closures]
type = Closures1PhaseTHM
[]
[]
[SolidProperties]
[steel]
type = ThermalFunctionSolidProperties
rho = 8050
k = 45
cp = 466
[]
[]
[Components]
[total_power]
type = TotalPower
power = ${tot_power}
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'core_chan:in'
m_dot = ${m_dot_in}
T = ${T_in}
[]
[core_chan]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
roughness = .0001
A = '${A_core}'
D_h = ${Dh_core}
[]
[core_hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
names = 'block'
widths = '${fparse core_dia / 2.}'
solid_properties = 'steel'
solid_properties_T_ref = '300'
n_part_elems = 3
[]
[core_heating]
type = HeatSourceFromTotalPower
hs = core_hs
regions = block
power = total_power
[]
[core_ht]
type = HeatTransferFromHeatStructure1Phase
flow_channel = core_chan
hs = core_hs
hs_side = outer
P_hf = '${fparse pi * core_dia}'
[]
[outlet]
type = Outlet1Phase
input = 'core_chan:out'
p = ${press}
[]
[]
[Postprocessors]
[power_to_coolant]
type = ADHeatRateConvection1Phase
block = core_chan
P_hf = '${fparse pi *core_dia}'
[]
[core_T_out]
type = SideAverageValue
boundary = core_chan:out
variable = T
[]
[core_p_in]
type = SideAverageValue
boundary = core_chan:in
variable = p
[]
[core_p_out]
type = SideAverageValue
boundary = core_chan:out
variable = p
[]
[core_delta_p]
type = ParsedPostprocessor
pp_names = 'core_p_in core_p_out'
function = 'core_p_in - core_p_out'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
start_time = 0
[TimeStepper]
type = IterationAdaptiveDT
dt = 10
[]
end_time = 5000
line_search = basic
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 25
[]
[Outputs]
exodus = true
[console]
type = Console
max_rows = 1
outlier_variable_norms = false
[]
print_linear_residuals = false
[]
(modules/combined/test/tests/ad_cavity_pressure/3d.i)
#
# Cavity Pressure Test
#
# This test is designed to compute an internal pressure based on
# p = n * R * T / V
# where
# p is the pressure
# n is the amount of material in the volume (moles)
# R is the universal gas constant
# T is the temperature
# V is the volume
#
# The mesh is composed of one block (1) with an interior cavity of volume 8.
# Block 2 sits in the cavity and has a volume of 1. Thus, the total
# initial volume is 7.
# The test adjusts n, T, and V in the following way:
# n => n0 + alpha * t
# T => T0 + beta * t
# V => V0 + gamma * t
# with
# alpha = n0
# beta = T0 / 2
# gamma = - (0.003322259...) * V0
# T0 = 240.54443866068704
# V0 = 7
# n0 = f(p0)
# p0 = 100
# R = 8.314472 J * K^(-1) * mol^(-1)
#
# So, n0 = p0 * V0 / R / T0 = 100 * 7 / 8.314472 / 240.544439
# = 0.35
#
# The parameters combined at t = 1 gives p = 301.
#
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[Mesh]
file = 3d.e
[]
[Functions]
[./displ_positive]
type = PiecewiseLinear
x = '0 1'
y = '0 0.0029069767441859684'
[../]
[./displ_negative]
type = PiecewiseLinear
x = '0 1'
y = '0 -0.0029069767441859684'
[../]
[./temp1]
type = PiecewiseLinear
x = '0 1'
y = '1 1.5'
scale_factor = 240.54443866068704
[../]
[./material_input_function]
type = PiecewiseLinear
x = '0 1'
y = '0 0.35'
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./temp]
initial_condition = 240.54443866068704
[../]
[./material_input]
[../]
[]
[AuxVariables]
[./pressure_residual_x]
[../]
[./pressure_residual_y]
[../]
[./pressure_residual_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./TensorMechanics]
use_displaced_mesh = true
use_automatic_differentiation = true
[../]
[./heat]
type = ADDiffusion
variable = temp
use_displaced_mesh = true
[../]
[./material_input_dummy]
type = ADDiffusion
variable = material_input
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_xx]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = stress_xx
[../]
[./stress_yy]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = stress_yy
[../]
[./stress_zz]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = stress_zz
[../]
[./stress_xy]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 1
variable = stress_xy
[../]
[./stress_yz]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 2
variable = stress_yz
[../]
[./stress_zx]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 0
variable = stress_zx
[../]
[]
[BCs]
[./no_x_exterior]
type = DirichletBC
variable = disp_x
boundary = '7 8'
value = 0.0
[../]
[./no_y_exterior]
type = DirichletBC
variable = disp_y
boundary = '9 10'
value = 0.0
[../]
[./no_z_exterior]
type = DirichletBC
variable = disp_z
boundary = '11 12'
value = 0.0
[../]
[./prescribed_left]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 13
function = displ_positive
[../]
[./prescribed_right]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 14
function = displ_negative
[../]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '15 16'
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '17 18'
value = 0.0
[../]
[./no_x_interior]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[../]
[./no_y_interior]
type = DirichletBC
variable = disp_y
boundary = '3 4'
value = 0.0
[../]
[./no_z_interior]
type = DirichletBC
variable = disp_z
boundary = '5 6'
value = 0.0
[../]
[./temperatureInterior]
type = ADFunctionDirichletBC
boundary = 100
function = temp1
variable = temp
[../]
[./MaterialInput]
type = ADFunctionDirichletBC
boundary = '100 13 14 15 16'
function = material_input_function
variable = material_input
[../]
[./CavityPressure]
[./1]
boundary = 100
initial_pressure = 100
material_input = materialInput
R = 8.314472
temperature = aveTempInterior
volume = internalVolume
startup_time = 0.5
output = ppress
save_in = 'pressure_residual_x pressure_residual_y pressure_residual_z'
use_automatic_differentiation = true
[../]
[../]
[]
[Materials]
[./elast_tensor1]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e1
poissons_ratio = 0
block = 1
[../]
[./strain1]
type = ADComputeFiniteStrain
block = 1
[../]
[./stress1]
type = ADComputeFiniteStrainElasticStress
block = 1
[../]
[./elast_tensor2]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0
block = 2
[../]
[./strain2]
type = ADComputeFiniteStrain
block = 2
[../]
[./stress2]
type = ADComputeFiniteStrainElasticStress
block = 2
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
nl_rel_tol = 1e-12
l_tol = 1e-12
l_max_its = 20
dt = 0.5
end_time = 1.0
[]
[Postprocessors]
[./internalVolume]
type = InternalVolume
boundary = 100
execute_on = 'initial linear'
[../]
[./aveTempInterior]
type = SideAverageValue
boundary = 100
variable = temp
execute_on = 'initial linear'
[../]
[./materialInput]
type = SideAverageValue
boundary = '7 8 9 10 11 12'
variable = material_input
execute_on = linear
[../]
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/convective_heat_flux/t_inf.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
[]
[Variables]
[./temp]
initial_condition = 200.0
[../]
[]
[Kernels]
[./heat_dt]
type = TimeDerivative
variable = temp
[../]
[./heat_conduction]
type = HeatConduction
variable = temp
diffusion_coefficient = 1
[../]
[./heat]
type = BodyForce
variable = temp
value = 0
[../]
[]
[BCs]
[./right]
type = ConvectiveHeatFluxBC
variable = temp
boundary = 'right'
T_infinity = 100.0
heat_transfer_coefficient = 1
heat_transfer_coefficient_dT = 0
[../]
[]
[Postprocessors]
[./left_temp]
type = SideAverageValue
variable = temp
boundary = left
execute_on = 'TIMESTEP_END initial'
[../]
[./right_temp]
type = SideAverageValue
variable = temp
boundary = right
[../]
[./right_flux]
type = SideDiffusiveFluxAverage
variable = temp
boundary = right
diffusivity = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1e1
nl_abs_tol = 1e-12
[]
[Outputs]
# csv = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_htonly/gap_heat_transfer_htonly_syntax.i)
#
# 1-D Gap Heat Transfer Test without mechanics
#
# This test exercises 1-D gap heat transfer for a constant conductivity gap.
#
# The mesh consists of two element blocks containing one element each. Each
# element is a unit cube. They sit next to one another with a unit between them.
#
# The conductivity of both blocks is set very large to achieve a uniform temperature
# across each block. The temperature of the far left boundary
# is ramped from 100 to 200 over one time unit. The temperature of the far right
# boundary is held fixed at 100.
#
# A simple analytical solution is possible for the heat flux between the blocks:
#
# Flux = (T_left - T_right) * (gapK/gap_width)
#
# The gap conductivity is specified as 1, thus
#
# gapK(Tavg) = 1.0*Tavg
#
#
# The heat flux across the gap at time = 1 is then:
#
# Flux(2) = 100 * (1.0/1.0) = 100
#
# For comparison, see results from the flux post processors
#
# This test has been augmented with a second scalar field that solves nearly
# the same problem. The conductivity has been changed to 10. Thus, the
# flux for the second field is 1000.
#
[Mesh]
file = gap_heat_transfer_htonly_test.e
[]
[Functions]
[./temp]
type = PiecewiseLinear
x = '0 1 2'
y = '100 200 200'
[../]
[]
[Modules/HeatTransfer/ThermalContact/BC]
[./thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
[../]
[./awesomium_contact]
type = GapHeatTransfer
variable = awesomium
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
gap_conductivity = 10
appended_property_name = _awesomium
[../]
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
initial_condition = 100
[../]
[./awesomium]
order = FIRST
family = LAGRANGE
initial_condition = 100
[../]
[]
[AuxVariables]
[./gap_cond]
order = CONSTANT
family = MONOMIAL
[../]
[./gap_cond_awesomium]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[./awe]
type = HeatConduction
variable = awesomium
[../]
[]
[BCs]
[./temp_far_left]
type = FunctionDirichletBC
boundary = 1
variable = temp
function = temp
[../]
[./temp_far_right]
type = DirichletBC
boundary = 4
variable = temp
value = 100
[../]
[./awesomium_far_left]
type = FunctionDirichletBC
boundary = 1
variable = awesomium
function = temp
[../]
[./awesomium_far_right]
type = DirichletBC
boundary = 4
variable = awesomium
value = 100
[../]
[]
[AuxKernels]
[./conductance]
type = MaterialRealAux
property = gap_conductance
variable = gap_cond
boundary = 2
[../]
[./conductance_awe]
type = MaterialRealAux
property = gap_conductance_awesomium
variable = gap_cond_awesomium
boundary = 2
[../]
[]
[Materials]
[./heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 100000000.0
[../]
[./density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 4'
line_search = 'none'
nl_rel_tol = 1e-12
l_tol = 1e-3
l_max_its = 100
dt = 1e-1
end_time = 1.0
[]
[Postprocessors]
[./temp_left]
type = SideAverageValue
boundary = 2
variable = temp
execute_on = 'initial timestep_end'
[../]
[./temp_right]
type = SideAverageValue
boundary = 3
variable = temp
execute_on = 'initial timestep_end'
[../]
[./flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[./flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[./awe_left]
type = SideAverageValue
boundary = 2
variable = awesomium
execute_on = 'initial timestep_end'
[../]
[./awe_right]
type = SideAverageValue
boundary = 3
variable = awesomium
execute_on = 'initial timestep_end'
[../]
[./awe_flux_left]
type = SideDiffusiveFluxIntegral
variable = awesomium
boundary = 2
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[./awe_flux_right]
type = SideDiffusiveFluxIntegral
variable = awesomium
boundary = 3
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/heated/2d-rc-heated-disp-system.i)
mu = 1
rho = 1
k = 1e-3
cp = 1
u_inlet = 1
T_inlet = 200
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '5 5'
dy = '1.0'
ix = '50 50'
iy = '20'
subdomain_id = '1 2'
[]
displacements = 'disp_x disp_y'
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
use_displaced_mesh = true
[]
[AuxVariables]
[disp_x][]
[disp_y][]
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = superficial_vel_x
v = superficial_vel_y
pressure = pressure
porosity = porosity
disp_x = disp_x
disp_y = disp_y
[]
[]
[Variables]
[superficial_vel_x]
type = PINSFVSuperficialVelocityVariable
initial_condition = ${u_inlet}
[]
[superficial_vel_y]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1e-6
[]
[pressure]
type = INSFVPressureVariable
[]
[T_fluid]
type = INSFVEnergyVariable
[]
[]
[AuxVariables]
[T_solid]
family = 'MONOMIAL'
order = 'CONSTANT'
fv = true
initial_condition = 100
[]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 0.5
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_x
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_x
mu = ${mu}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_x
momentum_component = 'x'
pressure = pressure
porosity = porosity
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_y
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'y'
[]
[v_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_y
mu = ${mu}
porosity = porosity
momentum_component = 'y'
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_y
momentum_component = 'y'
pressure = pressure
porosity = porosity
[]
[energy_advection]
type = PINSFVEnergyAdvection
variable = T_fluid
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
[]
[energy_diffusion]
type = PINSFVEnergyDiffusion
k = ${k}
variable = T_fluid
porosity = porosity
[]
[energy_convection]
type = PINSFVEnergyAmbientConvection
variable = T_fluid
is_solid = false
T_fluid = 'T_fluid'
T_solid = 'T_solid'
h_solid_fluid = 'h_cv'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = superficial_vel_x
function = ${u_inlet}
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = superficial_vel_y
function = 0
[]
[inlet-T]
type = FVNeumannBC
variable = T_fluid
value = '${fparse u_inlet * rho * cp * T_inlet}'
boundary = 'left'
[]
[no-slip-u]
type = INSFVNoSlipWallBC
boundary = 'top'
variable = superficial_vel_x
function = 0
[]
[no-slip-v]
type = INSFVNoSlipWallBC
boundary = 'top'
variable = superficial_vel_y
function = 0
[]
[symmetry-u]
type = PINSFVSymmetryVelocityBC
boundary = 'bottom'
variable = superficial_vel_x
u = superficial_vel_x
v = superficial_vel_y
mu = ${mu}
momentum_component = 'x'
[]
[symmetry-v]
type = PINSFVSymmetryVelocityBC
boundary = 'bottom'
variable = superficial_vel_y
u = superficial_vel_x
v = superficial_vel_y
mu = ${mu}
momentum_component = 'y'
[]
[symmetry-p]
type = INSFVSymmetryPressureBC
boundary = 'bottom'
variable = pressure
[]
[outlet-p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 0.1
[]
[]
[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
num_steps = 1
dtmin = 1
[]
[FunctorMaterials]
[constants]
type = ADGenericFunctorMaterial
prop_names = 'h_cv'
prop_values = '1'
[]
[functor_constants]
type = ADGenericFunctorMaterial
prop_names = 'cp'
prop_values = '${cp}'
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
rho = ${rho}
temperature = 'T_fluid'
[]
[]
# Some basic Postprocessors to examine the solution
[Postprocessors]
[inlet-p]
type = SideAverageValue
variable = pressure
boundary = 'left'
[]
[outlet-u]
type = SideAverageValue
variable = superficial_vel_x
boundary = 'right'
[]
[outlet-temp]
type = SideAverageValue
variable = T_fluid
boundary = 'right'
[]
[solid-temp]
type = ElementAverageValue
variable = T_solid
[]
[]
[Outputs]
hide = 'disp_x disp_y'
exodus = true
csv = false
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/heated/2d-rc-heated.i)
mu = 1
rho = 1
k = 1e-3
cp = 1
u_inlet = 1
T_inlet = 200
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '5 5'
dy = '1.0'
ix = '50 50'
iy = '20'
subdomain_id = '1 2'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = superficial_vel_x
v = superficial_vel_y
pressure = pressure
porosity = porosity
[]
[]
[Variables]
inactive = 'T_solid'
[superficial_vel_x]
type = PINSFVSuperficialVelocityVariable
initial_condition = ${u_inlet}
[]
[superficial_vel_y]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1e-6
[]
[pressure]
type = INSFVPressureVariable
[]
[T_fluid]
type = INSFVEnergyVariable
[]
[T_solid]
family = 'MONOMIAL'
order = 'CONSTANT'
fv = true
[]
[]
[AuxVariables]
[T_solid]
family = 'MONOMIAL'
order = 'CONSTANT'
fv = true
initial_condition = 100
[]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 0.5
[]
[]
[FVKernels]
inactive = 'solid_energy_diffusion solid_energy_convection'
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_x
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_x
mu = ${mu}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_x
momentum_component = 'x'
pressure = pressure
porosity = porosity
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_y
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'y'
[]
[v_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_y
mu = ${mu}
porosity = porosity
momentum_component = 'y'
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_y
momentum_component = 'y'
pressure = pressure
porosity = porosity
[]
[energy_advection]
type = PINSFVEnergyAdvection
variable = T_fluid
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
[]
[energy_diffusion]
type = PINSFVEnergyDiffusion
k = ${k}
variable = T_fluid
porosity = porosity
[]
[energy_convection]
type = PINSFVEnergyAmbientConvection
variable = T_fluid
is_solid = false
T_fluid = 'T_fluid'
T_solid = 'T_solid'
h_solid_fluid = 'h_cv'
[]
[solid_energy_diffusion]
type = FVDiffusion
coeff = ${k}
variable = T_solid
[]
[solid_energy_convection]
type = PINSFVEnergyAmbientConvection
variable = T_solid
is_solid = true
T_fluid = 'T_fluid'
T_solid = 'T_solid'
h_solid_fluid = 'h_cv'
[]
[]
[FVBCs]
inactive = 'heated-side'
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = superficial_vel_x
function = ${u_inlet}
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = superficial_vel_y
function = 0
[]
[inlet-T]
type = FVNeumannBC
variable = T_fluid
value = '${fparse u_inlet * rho * cp * T_inlet}'
boundary = 'left'
[]
[no-slip-u]
type = INSFVNoSlipWallBC
boundary = 'top'
variable = superficial_vel_x
function = 0
[]
[no-slip-v]
type = INSFVNoSlipWallBC
boundary = 'top'
variable = superficial_vel_y
function = 0
[]
[heated-side]
type = FVDirichletBC
boundary = 'top'
variable = 'T_solid'
value = 150
[]
[symmetry-u]
type = PINSFVSymmetryVelocityBC
boundary = 'bottom'
variable = superficial_vel_x
u = superficial_vel_x
v = superficial_vel_y
mu = ${mu}
momentum_component = 'x'
[]
[symmetry-v]
type = PINSFVSymmetryVelocityBC
boundary = 'bottom'
variable = superficial_vel_y
u = superficial_vel_x
v = superficial_vel_y
mu = ${mu}
momentum_component = 'y'
[]
[symmetry-p]
type = INSFVSymmetryPressureBC
boundary = 'bottom'
variable = pressure
[]
[outlet-p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 0.1
[]
[]
[FunctorMaterials]
[constants]
type = ADGenericFunctorMaterial
prop_names = 'h_cv'
prop_values = '1'
[]
[functor_constants]
type = ADGenericFunctorMaterial
prop_names = 'cp'
prop_values = '${cp}'
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
rho = ${rho}
temperature = 'T_fluid'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-14
[]
# Some basic Postprocessors to examine the solution
[Postprocessors]
[inlet-p]
type = SideAverageValue
variable = pressure
boundary = 'left'
[]
[outlet-u]
type = SideAverageValue
variable = superficial_vel_x
boundary = 'right'
[]
[outlet-temp]
type = SideAverageValue
variable = T_fluid
boundary = 'right'
[]
[solid-temp]
type = ElementAverageValue
variable = T_solid
[]
[]
[Outputs]
exodus = true
csv = false
[]
(modules/combined/test/tests/phase_field_fracture/crack2d_aniso_hist_false.i)
#This input uses PhaseField-Nonconserved Action to add phase field fracture bulk rate kernels
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 20
ymax = 0.5
[]
[./noncrack]
type = BoundingBoxNodeSetGenerator
new_boundary = noncrack
bottom_left = '0.5 0 0'
top_right = '1 0 0'
input = gen
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Modules]
[./TensorMechanics]
[./Master]
[./All]
add_variables = true
strain = SMALL
additional_generate_output = 'strain_yy stress_yy'
planar_formulation = PLANE_STRAIN
[../]
[../]
[../]
[./PhaseField]
[./Nonconserved]
[./c]
free_energy = F
kappa = kappa_op
mobility = L
[../]
[../]
[../]
[]
[Kernels]
[./solid_x]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_x
component = 0
c = c
[../]
[./solid_y]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_y
component = 1
c = c
[../]
[]
[BCs]
[./ydisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = 't'
[../]
[./yfix]
type = DirichletBC
variable = disp_y
boundary = noncrack
value = 0
[../]
[./xfix]
type = DirichletBC
variable = disp_x
boundary = right
value = 0
[../]
[]
[Materials]
[./pfbulkmat]
type = GenericConstantMaterial
prop_names = 'gc_prop l visco'
prop_values = '1e-3 0.05 1e-6'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '127.0 70.8 70.8 127.0 70.8 127.0 73.55 73.55 73.55'
fill_method = symmetric9
euler_angle_1 = 30
euler_angle_2 = 0
euler_angle_3 = 0
[../]
[./define_mobility]
type = ParsedMaterial
material_property_names = 'gc_prop visco'
property_name = L
expression = '1.0/(gc_prop * visco)'
[../]
[./define_kappa]
type = ParsedMaterial
material_property_names = 'gc_prop l'
property_name = kappa_op
expression = 'gc_prop * l'
[../]
[./damage_stress]
type = ComputeLinearElasticPFFractureStress
c = c
E_name = 'elastic_energy'
D_name = 'degradation'
F_name = 'local_fracture_energy'
decomposition_type = stress_spectral
[../]
[./degradation]
type = DerivativeParsedMaterial
property_name = degradation
coupled_variables = 'c'
expression = '(1.0-c)^2*(1.0 - eta) + eta'
constant_names = 'eta'
constant_expressions = '1.0e-6'
derivative_order = 2
[../]
[./local_fracture_energy]
type = DerivativeParsedMaterial
property_name = local_fracture_energy
coupled_variables = 'c'
material_property_names = 'gc_prop l'
expression = 'c^2 * gc_prop / 2 / l'
derivative_order = 2
[../]
[./fracture_driving_energy]
type = DerivativeSumMaterial
coupled_variables = c
sum_materials = 'elastic_energy local_fracture_energy'
derivative_order = 2
property_name = F
[../]
[]
[Postprocessors]
[./av_stress_yy]
type = ElementAverageValue
variable = stress_yy
[../]
[./av_strain_yy]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_factor_mat_solving_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-8
l_tol = 1e-4
l_max_its = 100
nl_max_its = 10
dt = 2e-6
num_steps = 5
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/junction_parallel_channels_1phase/phy.unequal_area.i)
# Junction between 2 pipes where the second has half the area of the first.
# The momentum density of the second should be twice that of the first.
[GlobalParams]
gravity_vector = '0 0 0'
initial_T = 300
initial_p = 1e5
initial_vel_x = 50
initial_vel_y = 0
initial_vel_z = 0
f = 0
fp = eos
scaling_factor_1phase = '1 1e-2 1e-5'
closures = simple_closures
[]
[FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 1.4
cv = 725
p_inf = 0
q = 0
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe1:in'
m_dot = 10
T = 250
[]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
A = 1
n_elems = 20
initial_vel = 20
[]
[junction]
type = JunctionParallelChannels1Phase
connections = 'pipe1:out pipe2:in'
scaling_factor_rhouV = 1e-4
scaling_factor_rhoEV = 1e-5
position = '1 0 0'
volume = 1e-8
[]
[pipe2]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '1 0 0'
length = 1
A = 0.5
n_elems = 20
initial_vel = 15
[]
[outlet]
type = Outlet1Phase
input = 'pipe2:out'
p = 1e5
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 0
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-10
l_max_its = 10
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
start_time = 0
end_time = 3
dt = 0.1
abort_on_solve_fail = true
[]
[Postprocessors]
# These post-processors are used to test that the outlet side of the junction,
# which has half the area of the inlet side, has twice the momentum density
# that the inlet side does.
[rhouA_pipe1]
type = SideAverageValue
variable = rhouA
boundary = pipe1:out
[]
[rhouA_pipe2]
type = SideAverageValue
variable = rhouA
boundary = pipe2:out
[]
[test_rel_err]
type = RelativeDifferencePostprocessor
value1 = rhouA_pipe1
value2 = rhouA_pipe2
[]
[]
[Outputs]
[out]
type = CSV
show = test_rel_err
execute_on = 'final'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/functional_expansion_tools/examples/2D_interface/main.i)
# Basic example coupling a master and sub app at an interface in a 2D model.
# The master app provides a flux term to the sub app via Functional Expansions, which then performs
# its calculations. The sub app's interface conditions, both value and flux, are transferred back
# to the master app
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0.0
xmax = 0.4
nx = 6
ymin = 0.0
ymax = 10.0
ny = 20
[]
[Variables]
[./m]
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./source_m]
type = BodyForce
variable = m
value = 100
[../]
[]
[Materials]
[./Impervium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '0.00001 50.0 100.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
value = 2
variable = m
[../]
[]
[BCs]
[./interface_value]
type = FXValueBC
variable = m
boundary = right
function = FX_Basis_Value_Main
[../]
[./interface_flux]
type = FXFluxBC
boundary = right
variable = m
function = FX_Basis_Flux_Main
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '4'
physical_bounds = '0.0 10'
y = Legendre
[../]
[./FX_Basis_Flux_Main]
type = FunctionSeries
series_type = Cartesian
orders = '5'
physical_bounds = '0.0 10'
y = Legendre
[../]
[]
[UserObjects]
[./FX_Flux_UserObject_Main]
type = FXBoundaryFluxUserObject
function = FX_Basis_Flux_Main
variable = m
boundary = right
diffusivity = thermal_conductivity
[../]
[]
[Postprocessors]
[./average_interface_value]
type = SideAverageValue
variable = m
boundary = right
[../]
[./total_flux]
type = SideDiffusiveFluxIntegral
variable = m
boundary = right
diffusivity = thermal_conductivity
[../]
[./picard_iterations]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1.0
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
sub_cycling = true
[../]
[]
[Transfers]
[./FluxToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Flux_UserObject_Main
multi_app_object_name = FX_Basis_Flux_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[./FluxToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Flux_Main
multi_app_object_name = FX_Flux_UserObject_Sub
[../]
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/heated/2d-rc-heated-effective-action.i)
mu = 1
rho = 1
cp = 1
u_inlet = 1
T_inlet = 200
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 1
nx = 100
ny = 20
[]
[left]
type = ParsedSubdomainMeshGenerator
input = gen
combinatorial_geometry = 'x > 3 & x < 6'
block_id = 1
[]
[right]
type = ParsedSubdomainMeshGenerator
input = left
combinatorial_geometry = 'x < 3'
block_id = 2
[]
[more-right]
type = ParsedSubdomainMeshGenerator
input = right
combinatorial_geometry = 'x > 6'
block_id = 3
[]
[]
[AuxVariables]
[porosity]
type = MooseVariableFVReal
initial_condition = 0.5
[]
[T_solid]
family = 'MONOMIAL'
order = 'CONSTANT'
fv = true
initial_condition = 100
[]
[]
[Modules]
[NavierStokesFV]
compressibility = 'incompressible'
porous_medium_treatment = true
add_energy_equation = true
density = ${rho}
dynamic_viscosity = ${mu}
thermal_conductivity_blocks = '1 2; 3'
thermal_conductivity = 'kappa kappa'
specific_heat = ${cp}
porosity = 'porosity'
initial_velocity = '${u_inlet} 1e-6 0'
initial_pressure = 0.0
initial_temperature = 0.0
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_function = '${u_inlet} 0'
energy_inlet_types = 'heatflux'
energy_inlet_function = '${fparse u_inlet * rho * cp * 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 = '0.1'
ambient_convection_alpha = 'h_cv'
ambient_temperature = 'T_solid'
mass_advection_interpolation = 'average'
momentum_advection_interpolation = 'average'
energy_advection_interpolation = 'average'
[]
[]
[FunctorMaterials]
[kappa]
type = ADGenericVectorFunctorMaterial
prop_names = 'kappa'
prop_values = '1e-3 1e-2 1e-1'
[]
[constants]
type = ADGenericFunctorMaterial
prop_names = 'h_cv'
prop_values = '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-12
[]
# Some basic Postprocessors to examine the solution
[Postprocessors]
[inlet-p]
type = SideAverageValue
variable = pressure
boundary = 'left'
[]
[outlet-u]
type = SideAverageValue
variable = superficial_vel_x
boundary = 'right'
[]
[outlet-temp]
type = SideAverageValue
variable = T_fluid
boundary = 'right'
[]
[solid-temp]
type = ElementAverageValue
variable = T_solid
[]
[]
[Outputs]
exodus = true
csv = false
[]
(modules/solid_mechanics/tutorials/basics/part_3_1.i)
#Tensor Mechanics tutorial: the basics
#Step 3, part 1
#3D simulation of uniaxial tension with J2 plasticity
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[file_mesh]
type = FileMeshGenerator
file = necking_quad4.e
[]
[extrude]
type = MeshExtruderGenerator
extrusion_vector = '0 0 0.5'
num_layers = 2
bottom_sideset = 'back'
top_sideset = 'front'
input = file_mesh
[]
uniform_refine = 0
second_order = true
[]
[Physics/SolidMechanics/QuasiStatic]
[./block1]
strain = FINITE
add_variables = true
generate_output = 'stress_yy strain_yy'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeMultiPlasticityStress
ep_plastic_tolerance = 1e-9
plastic_models = J2
[../]
[]
[UserObjects]
[./hardening]
type = SolidMechanicsHardeningCubic
value_0 = 2.4e2
value_residual = 3.0e2
internal_0 = 0
internal_limit = 0.005
[../]
[./J2]
type = SolidMechanicsPlasticJ2
yield_strength = hardening
yield_function_tolerance = 1E-3
internal_constraint_tolerance = 1E-9
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = disp_x #change the variable to reflect the new displacement names
boundary = 1
value = 0.0
[../]
[./back]
type = DirichletBC
variable = disp_z #change the variable to reflect the new displacement names
boundary = back
value = 0.0
[../]
[./bottom]
type = DirichletBC
variable = disp_y #change the variable to reflect the new displacement names
boundary = 3
value = 0.0
[../]
[./top]
type = FunctionDirichletBC
variable = disp_y #change the variable to reflect the new displacement names
boundary = 4
function = '0.0007*t'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
dt = 0.25
end_time = 16
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -sub_pc_type -pc_asm_overlap -ksp_gmres_restart'
petsc_options_value = 'asm lu 1 101'
[]
[Postprocessors]
[./ave_stress_bottom]
type = SideAverageValue
variable = stress_yy
boundary = 3
[../]
[./ave_strain_bottom]
type = SideAverageValue
variable = strain_yy
boundary = 3
[../]
[]
[Outputs]
exodus = true
perf_graph = true
csv = true
print_linear_residuals = false
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere.i)
sphere_outer_htc = 10 # W/m^2/K
sphere_outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
[file]
type = FileMeshGenerator
file = cyl2D.e
[]
allow_renumbering = false
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[]
[AuxVariables]
[gap_conductance]
order = CONSTANT
family = MONOMIAL
[]
[power_density]
block = 'fuel'
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
[]
[heat_source]
type = CoupledForce
variable = temp
block = 'fuel'
v = power_density
[]
[]
[AuxKernels]
[gap_cond]
type = MaterialRealAux
property = gap_conductance
variable = gap_conductance
boundary = 2
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[ThermalContact]
[thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0.0
emissivity_secondary = 0.0
gap_conductivity = 5
# quadrature = true
gap_geometry_type = SPHERE
sphere_origin = '0 0 0'
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = '4' # outer RPV
coefficient = ${sphere_outer_htc}
T_infinity = ${sphere_outer_Tinf}
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '2 3'
variable = temp
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-7
[Quadrature]
order = fifth
side_order = seventh
[]
[]
[Outputs]
exodus = true
csv = true
[Console]
type = Console
[]
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = 2
variable = temp
[]
[temp_right]
type = SideAverageValue
boundary = 3
variable = temp
[]
[flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[]
[flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 'fuel'
[]
[sphere_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = '4' # outer RVP
T_fluid = ${sphere_outer_Tinf}
htc = ${sphere_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(sphere_convective_out - ptot) / ptot'
pp_names = 'sphere_convective_out ptot'
[]
[]
(modules/solid_mechanics/test/tests/thermal_expansion_function/mean.i)
# This test checks the thermal expansion calculated via a mean thermal expansion coefficient.
# The coefficient is selected so as to result in a 1e-4 strain in the x-axis, and to cross over
# from positive to negative strain.
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[temp]
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = SMALL
add_variables = true
eigenstrain_names = eigenstrain
generate_output = 'strain_xx strain_yy strain_zz'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[bottom]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[back]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
[]
[AuxKernels]
[temp]
type = FunctionAux
variable = temp
function = '1 + t'
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1
poissons_ratio = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[thermal_expansion_strain]
type = ComputeMeanThermalExpansionFunctionEigenstrain
thermal_expansion_function = cte_func_mean
thermal_expansion_function_reference_temperature = 1.2
stress_free_temperature = 1.5
temperature = temp
eigenstrain_name = eigenstrain
[]
[]
[Functions]
[cte_func_mean]
type = ParsedFunction
symbol_names = 'T T_stress_free T_ref end_strain'
symbol_values = '2 1.5 1.2 1e-4'
expression = 'end_strain / (T - T_stress_free - end_strain * (T_stress_free - T_ref))'
[]
[]
[Postprocessors]
[disp_x_max]
type = SideAverageValue
variable = disp_x
boundary = right
[]
[temp_avg]
type = ElementAverageValue
variable = temp
[]
[]
[Executioner]
type = Transient
end_time = 1.0
dt = 0.1
[]
[Outputs]
csv = true
[]
(modules/thermal_hydraulics/test/tests/components/junction_parallel_channels_1phase/conservation.i)
# Junction between 2 pipes where the second has half the area of the first.
# The momentum density of the second should be twice that of the first.
[GlobalParams]
gravity_vector = '0 0 0'
initial_T = 300
initial_p = 1e5
initial_vel = 20
initial_vel_x = 20
initial_vel_y = 0
initial_vel_z = 0
f = 0
fp = eos
scaling_factor_1phase = '1 1e-2 1e-5'
closures = simple_closures
[]
[FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 1.4
cv = 725
p_inf = 0
q = 0
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[K_loss_fn]
type = PiecewiseLinear
x = '0 0.2'
y = '0 1'
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
A = 1
n_elems = 20
[]
[junction1]
type = JunctionParallelChannels1Phase
connections = 'pipe1:out pipe2:in'
position = '1 0 0'
volume = 1e-2
K = 0
[]
[pipe2]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '1 0 0'
length = 1
A = 0.5
n_elems = 20
[]
[junction2]
type = JunctionParallelChannels1Phase
connections = 'pipe2:out pipe1:in'
position = '1 0 0'
volume = 1e-2
[]
[]
[ControlLogic]
active = ''
[K_crtl]
type = TimeFunctionComponentControl
component = junction1
parameter = K
function = K_loss_fn
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 0.05
num_steps = 5
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = basic
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
nl_rel_tol = 0
nl_abs_tol = 1e-8
nl_max_its = 20
l_tol = 1e-3
l_max_its = 20
[]
[Postprocessors]
# mass conservation
[mass_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoA
block = 'pipe1 pipe2'
execute_on = 'initial timestep_end'
[]
[mass_junction1]
type = ScalarVariable
variable = junction1:rhoV
execute_on = 'initial timestep_end'
[]
[mass_junction2]
type = ScalarVariable
variable = junction2:rhoV
execute_on = 'initial timestep_end'
[]
[mass_tot]
type = SumPostprocessor
values = 'mass_pipes mass_junction1 mass_junction2'
execute_on = 'initial timestep_end'
[]
[mass_tot_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = mass_tot
compute_relative_change = true
execute_on = 'initial timestep_end'
[]
# energy conservation
[E_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoEA
block = 'pipe1 pipe2'
execute_on = 'initial timestep_end'
[]
[E_junction1]
type = ScalarVariable
variable = junction1:rhoEV
execute_on = 'initial timestep_end'
[]
[E_junction2]
type = ScalarVariable
variable = junction2:rhoEV
execute_on = 'initial timestep_end'
[]
[E_tot]
type = SumPostprocessor
values = 'E_pipes E_junction1 E_junction2'
execute_on = 'initial timestep_end'
[]
[E_tot_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = E_tot
compute_relative_change = true
execute_on = 'initial timestep_end'
[]
[p_pipe1_out]
type = SideAverageValue
boundary = pipe1:out
variable = p
[]
[p_pipe2_in]
type = SideAverageValue
boundary = pipe2:in
variable = p
[]
[dp_junction]
type = DifferencePostprocessor
value1 = p_pipe1_out
value2 = p_pipe2_in
[]
[]
[Outputs]
[out]
type = CSV
show = 'mass_tot_change E_tot_change'
[]
[]
(modules/combined/test/tests/cavity_pressure/multiple_postprocessors.i)
#
# Cavity Pressure Test (Volume input as a vector of postprocessors)
#
# This test is designed to compute an internal pressure based on
# p = n * R * T / V
# where
# p is the pressure
# n is the amount of material in the volume (moles)
# R is the universal gas constant
# T is the temperature
# V is the volume
#
# The mesh is composed of one block (1) with an interior cavity of volume 8.
# Block 2 sits in the cavity and has a volume of 1. Thus, the total
# initial volume is 7.
# The test adjusts n, T, and V in the following way:
# n => n0 + alpha * t
# T => T0 + beta * t
# V => V0 + gamma * t
# with
# alpha = n0
# beta = T0 / 2
# gamma = - (0.003322259...) * V0
# T0 = 240.54443866068704
# V0 = 7
# n0 = f(p0)
# p0 = 100
# R = 8.314472 J * K^(-1) * mol^(-1)
#
# So, n0 = p0 * V0 / R / T0 = 100 * 7 / 8.314472 / 240.544439
# = 0.35
#
# In this test the internal volume is calculated as the sum of two Postprocessors
# internalVolumeInterior and internalVolumeExterior. This sum equals the value
# reported by the internalVolume postprocessor.
#
# The parameters combined at t = 1 gives p = 301.
#
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[Mesh]
file = 3d.e
[]
[Functions]
[./displ_positive]
type = PiecewiseLinear
x = '0 1'
y = '0 0.0029069767441859684'
[../]
[./displ_negative]
type = PiecewiseLinear
x = '0 1'
y = '0 -0.0029069767441859684'
[../]
[./temp1]
type = PiecewiseLinear
x = '0 1'
y = '1 1.5'
scale_factor = 240.54443866068704
[../]
[./material_input_function]
type = PiecewiseLinear
x = '0 1'
y = '0 0.35'
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./temp]
initial_condition = 240.54443866068704
[../]
[./material_input]
[../]
[]
[AuxVariables]
[./pressure_residual_x]
[../]
[./pressure_residual_y]
[../]
[./pressure_residual_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./TensorMechanics]
use_displaced_mesh = true
[../]
[./heat]
type = Diffusion
variable = temp
use_displaced_mesh = true
[../]
[./material_input_dummy]
type = Diffusion
variable = material_input
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = stress_xx
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = stress_yy
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = stress_zz
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 1
variable = stress_xy
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 2
variable = stress_yz
[../]
[./stress_zx]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 0
variable = stress_zx
[../]
[]
[BCs]
[./no_x_exterior]
type = DirichletBC
variable = disp_x
boundary = '7 8'
value = 0.0
[../]
[./no_y_exterior]
type = DirichletBC
variable = disp_y
boundary = '9 10'
value = 0.0
[../]
[./no_z_exterior]
type = DirichletBC
variable = disp_z
boundary = '11 12'
value = 0.0
[../]
[./prescribed_left]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = displ_positive
[../]
[./prescribed_right]
type = FunctionDirichletBC
variable = disp_x
boundary = 14
function = displ_negative
[../]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '15 16'
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '17 18'
value = 0.0
[../]
[./no_x_interior]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[../]
[./no_y_interior]
type = DirichletBC
variable = disp_y
boundary = '3 4'
value = 0.0
[../]
[./no_z_interior]
type = DirichletBC
variable = disp_z
boundary = '5 6'
value = 0.0
[../]
[./temperatureInterior]
type = FunctionDirichletBC
boundary = 100
function = temp1
variable = temp
[../]
[./MaterialInput]
type = FunctionDirichletBC
boundary = '100 13 14 15 16'
function = material_input_function
variable = material_input
[../]
[./CavityPressure]
[./1]
boundary = 100
initial_pressure = 100
material_input = materialInput
R = 8.314472
temperature = aveTempInterior
volume = 'internalVolumeInterior internalVolumeExterior'
startup_time = 0.5
output = ppress
save_in = 'pressure_residual_x pressure_residual_y pressure_residual_z'
[../]
[../]
[]
[Materials]
[./elast_tensor1]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e1
poissons_ratio = 0
block = 1
[../]
[./strain1]
type = ComputeFiniteStrain
block = 1
[../]
[./stress1]
type = ComputeFiniteStrainElasticStress
block = 1
[../]
[./elast_tensor2]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0
block = 2
[../]
[./strain2]
type = ComputeFiniteStrain
block = 2
[../]
[./stress2]
type = ComputeFiniteStrainElasticStress
block = 2
[../]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
nl_rel_tol = 1e-12
l_tol = 1e-12
l_max_its = 20
dt = 0.5
end_time = 1.0
[]
[Postprocessors]
[./internalVolume]
type = InternalVolume
boundary = 100
execute_on = 'initial linear'
[../]
[./aveTempInterior]
type = SideAverageValue
boundary = 100
variable = temp
execute_on = 'initial linear'
[../]
[./internalVolumeInterior]
type = InternalVolume
boundary = '1 2 3 4 5 6'
execute_on = 'initial linear'
[../]
[./internalVolumeExterior]
type = InternalVolume
boundary = '13 14 15 16 17 18'
execute_on = 'initial linear'
[../]
[./materialInput]
type = SideAverageValue
boundary = '7 8 9 10 11 12'
variable = material_input
execute_on = linear
[../]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/bernoulli-2d.i)
rho=1.1
advected_interp_method='upwind'
velocity_interp_method='rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '1 1'
dy = '0.5'
ix = '3 3'
iy = '2'
subdomain_id = '1 2'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
porosity = porosity
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
v = v
porosity = porosity
pressure = pressure
[]
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[v]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1e-6
[]
[pressure]
type = BernoulliPressureVariable
u = u
v = v
porosity = porosity
rho = ${rho}
[]
[]
[AuxVariables]
[porosity]
type = PiecewiseConstantVariable
[]
[]
[ICs]
[porosity_1]
type = ConstantIC
variable = porosity
block = 1
value = 1
[]
[porosity_2]
type = ConstantIC
variable = porosity
block = 2
value = 0.5
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = u
pressure = pressure
momentum_component = 'x'
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = v
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = v
pressure = pressure
momentum_component = 'y'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = '1'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = v
function = 0
[]
[walls-u]
type = INSFVNaturalFreeSlipBC
boundary = 'top bottom'
variable = u
momentum_component = 'x'
[]
[walls-v]
type = INSFVNaturalFreeSlipBC
boundary = 'top bottom'
variable = v
momentum_component = 'y'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 0.4
[]
[]
[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
[]
[Postprocessors]
[inlet_p]
type = SideAverageValue
variable = 'pressure'
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 'right'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/multiapps/steffensen_postprocessor/steady_main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[source]
type = BodyForce
variable = u
value = 1
[]
[]
[BCs]
[left]
type = PostprocessorDirichletBC
variable = u
boundary = left
postprocessor = 'from_sub'
[]
[]
[Postprocessors]
[from_sub]
type = Receiver
default = 0
[]
[to_sub]
type = SideAverageValue
variable = u
boundary = right
[]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Steady
# Solve parameters
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
# App coupling parameters
fixed_point_algorithm = 'steffensen'
fixed_point_max_its = 100
transformed_postprocessors = 'from_sub'
[]
[Outputs]
csv = true
exodus = false
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = steady_sub.i
clone_parent_mesh = true
execute_on = 'timestep_begin'
# we keep the full postprocessor output history of the subapp
keep_full_output_history = true
transformed_postprocessors = 'from_main'
[]
[]
[Transfers]
[left_from_sub]
type = MultiAppPostprocessorTransfer
from_multi_app = sub
from_postprocessor = 'to_main'
to_postprocessor = 'from_sub'
reduction_type = 'average'
[]
[right_to_sub]
type = MultiAppPostprocessorTransfer
to_multi_app = sub
from_postprocessor = 'to_sub'
to_postprocessor = 'from_main'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/pwcns/channel-flow/2d-transient-gas.i)
# Fluid properties
mu = 'mu'
rho = 'rho'
k = 'k'
# Solid properties
cp_s = 2
rho_s = 4
k_s = 1e-2
h_fs = 10
# Operating conditions
u_inlet = 1
T_inlet = 200
p_outlet = 10
top_side_temperature = 150
# Numerical scheme
advected_interp_method = 'upwind'
velocity_interp_method = 'rc'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 1
nx = 20
ny = 5
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = superficial_vel_x
v = superficial_vel_y
pressure = pressure
porosity = porosity
[]
[]
[Variables]
[superficial_vel_x]
type = PINSFVSuperficialVelocityVariable
initial_condition = ${u_inlet}
[]
[superficial_vel_y]
type = PINSFVSuperficialVelocityVariable
[]
[pressure]
type = INSFVPressureVariable
initial_condition = ${p_outlet}
[]
[T_fluid]
type = INSFVEnergyVariable
initial_condition = ${T_inlet}
[]
[T_solid]
type = MooseVariableFVReal
initial_condition = 100
[]
[]
[AuxVariables]
[porosity]
type = MooseVariableFVReal
initial_condition = 0.5
[]
[]
[FVKernels]
[mass_time]
type = PWCNSFVMassTimeDerivative
variable = pressure
porosity = 'porosity'
drho_dt = 'drho_dt'
[]
[mass]
type = PWCNSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_time]
type = WCNSFVMomentumTimeDerivative
variable = superficial_vel_x
rho = ${rho}
drho_dt = 'drho_dt'
momentum_component = 'x'
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_x
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_x
mu = ${mu}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_x
momentum_component = 'x'
pressure = pressure
porosity = porosity
[]
[v_time]
type = WCNSFVMomentumTimeDerivative
variable = superficial_vel_y
rho = ${rho}
drho_dt = 'drho_dt'
momentum_component = 'y'
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_y
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'y'
[]
[v_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_y
mu = ${mu}
porosity = porosity
momentum_component = 'y'
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_y
momentum_component = 'y'
pressure = pressure
porosity = porosity
[]
[energy_time]
type = PINSFVEnergyTimeDerivative
variable = T_fluid
h = 'h'
dh_dt = 'dh_dt'
rho = ${rho}
drho_dt = 'drho_dt'
is_solid = false
porosity = porosity
[]
[energy_advection]
type = PINSFVEnergyAdvection
variable = T_fluid
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
[]
[energy_diffusion]
type = PINSFVEnergyDiffusion
variable = T_fluid
k = ${k}
porosity = porosity
[]
[energy_convection]
type = PINSFVEnergyAmbientConvection
variable = T_fluid
is_solid = false
T_fluid = T_fluid
T_solid = T_solid
h_solid_fluid = 'h_cv'
[]
[solid_energy_time]
type = PINSFVEnergyTimeDerivative
variable = T_solid
cp = ${cp_s}
rho = ${rho_s}
is_solid = true
porosity = porosity
[]
[solid_energy_diffusion]
type = FVDiffusion
variable = T_solid
coeff = ${k_s}
[]
[solid_energy_convection]
type = PINSFVEnergyAmbientConvection
variable = T_solid
is_solid = true
T_fluid = T_fluid
T_solid = T_solid
h_solid_fluid = 'h_cv'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = superficial_vel_x
function = ${u_inlet}
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = superficial_vel_y
function = 0
[]
[inlet-T]
type = FVDirichletBC
variable = T_fluid
value = ${T_inlet}
boundary = 'left'
[]
[no-slip-u]
type = INSFVNoSlipWallBC
boundary = 'top'
variable = superficial_vel_x
function = 0
[]
[no-slip-v]
type = INSFVNoSlipWallBC
boundary = 'top'
variable = superficial_vel_y
function = 0
[]
[heated-side]
type = FVDirichletBC
boundary = 'top'
variable = 'T_solid'
value = ${top_side_temperature}
[]
[symmetry-u]
type = PINSFVSymmetryVelocityBC
boundary = 'bottom'
variable = superficial_vel_x
u = superficial_vel_x
v = superficial_vel_y
mu = ${mu}
momentum_component = 'x'
[]
[symmetry-v]
type = PINSFVSymmetryVelocityBC
boundary = 'bottom'
variable = superficial_vel_y
u = superficial_vel_x
v = superficial_vel_y
mu = ${mu}
momentum_component = 'y'
[]
[symmetry-p]
type = INSFVSymmetryPressureBC
boundary = 'bottom'
variable = pressure
[]
[outlet-p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = ${p_outlet}
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
gamma = 1.4
[]
[]
[FunctorMaterials]
[fluid_props_to_mat_props]
type = GeneralFunctorFluidProps
fp = fp
pressure = 'pressure'
T_fluid = 'T_fluid'
speed = 'speed'
# To initialize with a high viscosity
mu_rampdown = 'mu_rampdown'
# For porous flow
characteristic_length = 1
porosity = 'porosity'
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
rho = ${rho}
temperature = 'T_fluid'
[]
[constants]
type = ADGenericFunctorMaterial
prop_names = 'h_cv'
prop_values = '${h_fs}'
[]
[speed]
type = PINSFVSpeedFunctorMaterial
porosity = 'porosity'
superficial_vel_x = 'superficial_vel_x'
superficial_vel_y = 'superficial_vel_y'
[]
[]
[Functions]
[mu_rampdown]
type = PiecewiseLinear
x = '1 2 3 4'
y = '1e3 1e2 1e1 1'
[]
[]
[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-12
nl_abs_tol = 1e-10
automatic_scaling = true
end_time = 3.0
[]
# Some basic Postprocessors to examine the solution
[Postprocessors]
[inlet-p]
type = SideAverageValue
variable = pressure
boundary = 'left'
[]
[outlet-u]
type = VolumetricFlowRate
boundary = 'right'
advected_quantity = '1'
advected_interp_method = ${advected_interp_method}
vel_x = 'superficial_vel_x'
vel_y = 'superficial_vel_y'
[]
[outlet-temp]
type = SideAverageValue
variable = T_fluid
boundary = 'right'
[]
[solid-temp]
type = ElementAverageValue
variable = T_solid
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/2d-rc-epsjump.i)
mu=1.1
rho=1.1
advected_interp_method='upwind'
velocity_interp_method='rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '1 1'
dy = '0.5'
ix = '30 30'
iy = '20'
subdomain_id = '1 2'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
porosity = porosity
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
v = v
porosity = porosity
pressure = pressure
[]
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[v]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1e-6
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[AuxVariables]
[porosity]
type = MooseVariableFVReal
[]
[]
[ICs]
inactive = 'porosity_continuous'
[porosity_1]
type = ConstantIC
variable = porosity
block = 1
value = 1
[]
[porosity_2]
type = ConstantIC
variable = porosity
block = 2
value = 0.5
[]
[porosity_continuous]
type = FunctionIC
variable = porosity
block = '1 2'
function = smooth_jump
[]
[]
[Functions]
[smooth_jump]
type = ParsedFunction
expression = '1 - 0.5 * 1 / (1 + exp(-30*(x-1)))'
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = u
pressure = pressure
momentum_component = 'x'
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = v
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = PINSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = v
pressure = pressure
momentum_component = 'y'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = '1'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = v
function = 0
[]
[walls-u]
type = INSFVNaturalFreeSlipBC
boundary = 'top bottom'
variable = u
momentum_component = 'x'
[]
[walls-v]
type = INSFVNaturalFreeSlipBC
boundary = 'top bottom'
variable = v
momentum_component = 'y'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 0.4
[]
[]
[FunctorMaterials]
inactive = 'smooth'
[jump]
type = ADPiecewiseByBlockFunctorMaterial
prop_name = 'porosity'
subdomain_to_prop_value = '1 1
2 0.5'
[]
[smooth]
type = ADGenericFunctionFunctorMaterial
prop_names = 'porosity'
prop_values = 'smooth_jump'
[]
[]
[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
[]
[Postprocessors]
[inlet_p]
type = SideAverageValue
variable = 'pressure'
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 'right'
[]
[]
[Outputs]
exodus = true
csv = false
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/heated/2d-rc-heated-action.i)
mu = 1
rho = 1
k = 1e-3
cp = 1
u_inlet = 1
T_inlet = 200
h_cv = 1.0
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '5 5'
dy = '1.0'
ix = '50 50'
iy = '20'
subdomain_id = '1 2'
[]
[]
[Variables]
[T_solid]
type = MooseVariableFVReal
[]
[]
[AuxVariables]
[porosity]
type = MooseVariableFVReal
initial_condition = 0.5
[]
[]
[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'
initial_velocity = '${u_inlet} 1e-6 0'
initial_pressure = 0.0
initial_temperature = 0.0
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_function = '${u_inlet} 0'
energy_inlet_types = 'heatflux'
energy_inlet_function = '${fparse u_inlet * rho * cp * 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 = '0.1'
ambient_convection_alpha = ${h_cv}
ambient_temperature = 'T_solid'
mass_advection_interpolation = 'average'
momentum_advection_interpolation = 'average'
energy_advection_interpolation = 'average'
[]
[]
[FVKernels]
[solid_energy_diffusion]
type = FVDiffusion
coeff = ${k}
variable = T_solid
[]
[solid_energy_convection]
type = PINSFVEnergyAmbientConvection
variable = 'T_solid'
is_solid = true
T_fluid = 'T_fluid'
T_solid = 'T_solid'
h_solid_fluid = ${h_cv}
[]
[]
[FVBCs]
[heated-side]
type = FVDirichletBC
boundary = 'top'
variable = 'T_solid'
value = 150
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-14
[]
# Some basic Postprocessors to examine the solution
[Postprocessors]
[inlet-p]
type = SideAverageValue
variable = pressure
boundary = 'left'
[]
[outlet-u]
type = SideAverageValue
variable = superficial_vel_x
boundary = 'right'
[]
[outlet-temp]
type = SideAverageValue
variable = T_fluid
boundary = 'right'
[]
[solid-temp]
type = ElementAverageValue
variable = T_solid
[]
[]
[Outputs]
exodus = true
csv = false
[]
(modules/combined/test/tests/cavity_pressure/3d.i)
#
# Cavity Pressure Test
#
# This test is designed to compute an internal pressure based on
# p = n * R * T / V
# where
# p is the pressure
# n is the amount of material in the volume (moles)
# R is the universal gas constant
# T is the temperature
# V is the volume
#
# The mesh is composed of one block (1) with an interior cavity of volume 8.
# Block 2 sits in the cavity and has a volume of 1. Thus, the total
# initial volume is 7.
# The test adjusts n, T, and V in the following way:
# n => n0 + alpha * t
# T => T0 + beta * t
# V => V0 + gamma * t
# with
# alpha = n0
# beta = T0 / 2
# gamma = - (0.003322259...) * V0
# T0 = 240.54443866068704
# V0 = 7
# n0 = f(p0)
# p0 = 100
# R = 8.314472 J * K^(-1) * mol^(-1)
#
# So, n0 = p0 * V0 / R / T0 = 100 * 7 / 8.314472 / 240.544439
# = 0.35
#
# The parameters combined at t = 1 gives p = 301.
#
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[Mesh]
file = 3d.e
[]
[Functions]
[./displ_positive]
type = PiecewiseLinear
x = '0 1'
y = '0 0.0029069767441859684'
[../]
[./displ_negative]
type = PiecewiseLinear
x = '0 1'
y = '0 -0.0029069767441859684'
[../]
[./temp1]
type = PiecewiseLinear
x = '0 1'
y = '1 1.5'
scale_factor = 240.54443866068704
[../]
[./material_input_function]
type = PiecewiseLinear
x = '0 1'
y = '0 0.35'
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./temp]
initial_condition = 240.54443866068704
[../]
[./material_input]
[../]
[]
[AuxVariables]
[./pressure_residual_x]
[../]
[./pressure_residual_y]
[../]
[./pressure_residual_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./TensorMechanics]
use_displaced_mesh = true
[../]
[./heat]
type = Diffusion
variable = temp
use_displaced_mesh = true
[../]
[./material_input_dummy]
type = Diffusion
variable = material_input
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = stress_xx
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = stress_yy
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = stress_zz
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 1
variable = stress_xy
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 2
variable = stress_yz
[../]
[./stress_zx]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 0
variable = stress_zx
[../]
[]
[BCs]
[./no_x_exterior]
type = DirichletBC
variable = disp_x
boundary = '7 8'
value = 0.0
[../]
[./no_y_exterior]
type = DirichletBC
variable = disp_y
boundary = '9 10'
value = 0.0
[../]
[./no_z_exterior]
type = DirichletBC
variable = disp_z
boundary = '11 12'
value = 0.0
[../]
[./prescribed_left]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = displ_positive
[../]
[./prescribed_right]
type = FunctionDirichletBC
variable = disp_x
boundary = 14
function = displ_negative
[../]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '15 16'
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '17 18'
value = 0.0
[../]
[./no_x_interior]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[../]
[./no_y_interior]
type = DirichletBC
variable = disp_y
boundary = '3 4'
value = 0.0
[../]
[./no_z_interior]
type = DirichletBC
variable = disp_z
boundary = '5 6'
value = 0.0
[../]
[./temperatureInterior]
type = FunctionDirichletBC
boundary = 100
function = temp1
variable = temp
[../]
[./MaterialInput]
type = FunctionDirichletBC
boundary = '100 13 14 15 16'
function = material_input_function
variable = material_input
[../]
[./CavityPressure]
[./1]
boundary = 100
initial_pressure = 100
material_input = materialInput
R = 8.314472
temperature = aveTempInterior
volume = internalVolume
startup_time = 0.5
output = ppress
save_in = 'pressure_residual_x pressure_residual_y pressure_residual_z'
[../]
[../]
[]
[Materials]
[./elast_tensor1]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e1
poissons_ratio = 0
block = 1
[../]
[./strain1]
type = ComputeFiniteStrain
block = 1
[../]
[./stress1]
type = ComputeFiniteStrainElasticStress
block = 1
[../]
[./elast_tensor2]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0
block = 2
[../]
[./strain2]
type = ComputeFiniteStrain
block = 2
[../]
[./stress2]
type = ComputeFiniteStrainElasticStress
block = 2
[../]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
nl_rel_tol = 1e-12
l_tol = 1e-12
l_max_its = 20
dt = 0.5
end_time = 1.0
[]
[Postprocessors]
[./internalVolume]
type = InternalVolume
boundary = 100
execute_on = 'initial linear'
[../]
[./aveTempInterior]
type = SideAverageValue
boundary = 100
variable = temp
execute_on = 'initial linear'
[../]
[./materialInput]
type = SideAverageValue
boundary = '7 8 9 10 11 12'
variable = material_input
execute_on = linear
[../]
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/ad_cavity_pressure/initial_temperature.i)
#
# Cavity Pressure Test
#
# This test is designed to compute an internal pressure based on
# p = n * R * T / V
# where
# p is the pressure
# n is the amount of material in the volume (moles)
# R is the universal gas constant
# T is the temperature
# V is the volume
#
# The mesh is composed of one block (1) with an interior cavity of volume 8.
# Block 2 sits in the cavity and has a volume of 1. Thus, the total
# initial volume is 7.
# The test adjusts n, T, and V in the following way:
# n => n0 + alpha * t
# T => T0 + beta * t
# V => V0 + gamma * t
# with
# alpha = n0
# beta = T0 / 2
# gamma = -(0.003322259...) * V0
# T0 = 240.54443866068704
# V0 = 7
# n0 = f(p0)
# p0 = 100
# R = 8.314472 J * K^(-1) * mol^(-1)
#
# So, n0 = p0 * V0 / R / T0 = 100 * 7 / 8.314472 / 240.544439
# = 0.35
#
# The parameters combined at t = 1 gives p = 301.
#
# This test sets the initial temperature to 500, but the CavityPressure
# is told that that initial temperature is T0. Thus, the final solution
# is unchanged.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
file = 3d.e
[]
[GlobalParams]
volumetric_locking_correction = true
[]
[Functions]
[./displ_positive]
type = PiecewiseLinear
x = '0 1'
y = '0 0.0029069767441859684'
[../]
[./displ_negative]
type = PiecewiseLinear
x = '0 1'
y = '0 -0.0029069767441859684'
[../]
[./temp1]
type = PiecewiseLinear
x = '0 1'
y = '1 1.5'
scale_factor = 240.54443866068704
[../]
[./material_input_function]
type = PiecewiseLinear
x = '0 1'
y = '0 0.35'
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./temp]
initial_condition = 500
[../]
[./material_input]
[../]
[]
[AuxVariables]
[./pressure_residual_x]
[../]
[./pressure_residual_y]
[../]
[./pressure_residual_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./TensorMechanics]
use_displaced_mesh = true
use_automatic_differentiation = true
[../]
[./heat]
type = ADDiffusion
variable = temp
use_displaced_mesh = true
[../]
[./material_input_dummy]
type = ADDiffusion
variable = material_input
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_xx]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = stress_xx
[../]
[./stress_yy]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = stress_yy
[../]
[./stress_zz]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = stress_zz
[../]
[./stress_xy]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 1
variable = stress_xy
[../]
[./stress_yz]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 2
variable = stress_yz
[../]
[./stress_zx]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 0
variable = stress_zx
[../]
[]
[BCs]
[./no_x_exterior]
type = DirichletBC
variable = disp_x
boundary = '7 8'
value = 0.0
[../]
[./no_y_exterior]
type = DirichletBC
variable = disp_y
boundary = '9 10'
value = 0.0
[../]
[./no_z_exterior]
type = DirichletBC
variable = disp_z
boundary = '11 12'
value = 0.0
[../]
[./prescribed_left]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 13
function = displ_positive
[../]
[./prescribed_right]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 14
function = displ_negative
[../]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '15 16'
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '17 18'
value = 0.0
[../]
[./no_x_interior]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[../]
[./no_y_interior]
type = DirichletBC
variable = disp_y
boundary = '3 4'
value = 0.0
[../]
[./no_z_interior]
type = DirichletBC
variable = disp_z
boundary = '5 6'
value = 0.0
[../]
[./temperatureInterior]
type = ADFunctionDirichletBC
boundary = 100
function = temp1
variable = temp
[../]
[./MaterialInput]
type = ADFunctionDirichletBC
boundary = '100 13 14 15 16'
function = material_input_function
variable = material_input
[../]
[./CavityPressure]
[./1]
boundary = 100
initial_pressure = 100
material_input = materialInput
R = 8.314472
temperature = aveTempInterior
initial_temperature = 240.54443866068704
volume = internalVolume
startup_time = 0.5
output = ppress
save_in = 'pressure_residual_x pressure_residual_y pressure_residual_z'
use_automatic_differentiation = true
[../]
[../]
[]
[Materials]
[./elast_tensor1]
type = ADComputeElasticityTensor
C_ijkl = '0 5'
fill_method = symmetric_isotropic
block = 1
[../]
[./strain1]
type = ADComputeFiniteStrain
block = 1
[../]
[./stress1]
type = ADComputeFiniteStrainElasticStress
block = 1
[../]
[./elast_tensor2]
type = ADComputeElasticityTensor
C_ijkl = '0 5'
fill_method = symmetric_isotropic
block = 2
[../]
[./strain2]
type = ADComputeFiniteStrain
block = 2
[../]
[./stress2]
type = ADComputeFiniteStrainElasticStress
block = 2
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
nl_rel_tol = 1e-12
l_tol = 1e-12
l_max_its = 20
dt = 0.5
end_time = 1.0
[]
[Postprocessors]
[./internalVolume]
type = InternalVolume
boundary = 100
execute_on = 'initial linear'
[../]
[./aveTempInterior]
type = SideAverageValue
boundary = 100
variable = temp
execute_on = 'initial linear'
[../]
[./materialInput]
type = SideAverageValue
boundary = '7 8 9 10 11 12'
variable = material_input
execute_on = linear
[../]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/bernoulli-1d.i)
rho = 1.1
advected_interp_method = 'upwind'
velocity_interp_method = 'rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 1
dx = '1 1'
ix = '3 3'
subdomain_id = '1 2'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
pressure = pressure
porosity = porosity
[]
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[pressure]
type = BernoulliPressureVariable
u = u
porosity = porosity
rho = ${rho}
[]
[]
[AuxVariables]
[porosity]
type = PiecewiseConstantVariable
[]
[has_porosity_jump_face]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[has_porosity_jump_face]
type = HasPorosityJumpFace
porosity = porosity
execute_on = 'initial timestep_end'
variable = has_porosity_jump_face
[]
[]
[ICs]
[porosity_1]
type = ConstantIC
variable = porosity
block = 1
value = 1
[]
[porosity_2]
type = ConstantIC
variable = porosity
block = 2
value = 0.5
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = u
pressure = pressure
porosity = porosity
momentum_component = 'x'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = '1'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
[]
[Postprocessors]
[inlet_p]
type = SideAverageValue
variable = 'pressure'
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 'right'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/1d-rc-epsjump.i)
mu = 1.1
rho = 1.1
advected_interp_method = 'upwind'
velocity_interp_method = 'rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 1
dx = '1 1'
ix = '30 30'
subdomain_id = '1 2'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
pressure = pressure
porosity = porosity
[]
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[]
[ICs]
inactive = 'porosity_continuous'
[porosity_1]
type = ConstantIC
variable = porosity
block = 1
value = 1
[]
[porosity_2]
type = ConstantIC
variable = porosity
block = 2
value = 0.5
[]
[porosity_continuous]
type = FunctionIC
variable = porosity
block = '1 2'
function = smooth_jump
[]
[]
[Functions]
[smooth_jump]
type = ParsedFunction
expression = '1 - 0.5 * 1 / (1 + exp(-30*(x-1)))'
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = u
mu = ${mu}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = u
pressure = pressure
porosity = porosity
momentum_component = 'x'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = '1'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
[]
[Postprocessors]
[inlet_p]
type = SideAverageValue
variable = 'pressure'
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 'right'
[]
[]
[Outputs]
exodus = true
csv = false
[]
(modules/thermal_hydraulics/test/tests/components/form_loss_from_function_1phase/phy.form_loss_1phase.i)
# Tests the form loss kernel for 1-phase flow.
#
# This test uses the following parameters and boundary data:
# Inlet: (rho = 996.5563397 kg/m^3, vel = 0.5 m/s)
# Outlet: p_out = 100 kPa
# Length: L = 2 m
# Form loss coefficient: K = 0.5, => K_prime = 0.25 m^-1 (uniform along length)
#
# The inlet pressure is
#
# p_in = p_out + dp ,
#
# where dp is given by the definition of the form loss coefficient:
#
# dp = K * 0.5 * rho * u^2
# = 0.5 * 0.5 * 996.5563397 * 0.5^2
# = 62.28477123125 Pa
#
# This value is output to CSV.
p_out = 100e3
[GlobalParams]
initial_p = ${p_out}
initial_vel = 0.5
initial_T = 300.0
gravity_vector = '0 0 0'
scaling_factor_1phase = '1 1 1e-4'
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
k = 0.5
mu = 281.8e-6
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = fp
position = '0 0 0'
orientation = '1 0 0'
length = 2
A = 1
n_elems = 5
f = 0
[]
[form_loss]
type = FormLossFromFunction1Phase
flow_channel = pipe
K_prime = 0.25
[]
[inlet]
type = InletDensityVelocity1Phase
input = 'pipe:in'
rho = 996.5563397
vel = 0.5
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = ${p_out}
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 0.1
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-8
nl_abs_tol = 5e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 20
start_time = 0.0
num_steps = 100
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Postprocessors]
# this is not the right value, should be the value from the inlet ghost cell
[p_in]
type = SideAverageValue
boundary = inlet
variable = p
execute_on = TIMESTEP_END
[]
[p_out]
type = FunctionValuePostprocessor
function = ${p_out}
execute_on = TIMESTEP_END
[]
[dp]
type = DifferencePostprocessor
value1 = p_in
value2 = p_out
execute_on = TIMESTEP_END
[]
[]
[Outputs]
[out]
type = CSV
show = 'dp'
execute_postprocessors_on = final
[]
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/bernoulli-1d-parsed-function.i)
rho = 1.1
advected_interp_method = 'upwind'
velocity_interp_method = 'rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 1
dx = '1 1'
ix = '3 3'
subdomain_id = '1 2'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
pressure = pressure
porosity = porosity
[]
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[pressure]
type = BernoulliPressureVariable
u = u
porosity = porosity
rho = ${rho}
[]
[]
[Functions]
[porosity]
type = ParsedFunction
expression = 'if(x > 1, 0.5, 1)'
[]
[]
[AuxVariables]
[has_porosity_jump_face]
type = MooseVariableFVReal
[]
[porosity_out]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[has_porosity_jump_face]
type = HasPorosityJumpFace
porosity = porosity
execute_on = 'initial timestep_end'
variable = has_porosity_jump_face
[]
[porosity_out]
type = FunctorAux
variable = porosity_out
functor = porosity
execute_on = 'initial timestep_end'
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = u
pressure = pressure
porosity = porosity
momentum_component = 'x'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = '1'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
[]
[Postprocessors]
[inlet_p]
type = SideAverageValue
variable = 'pressure'
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 'right'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_htonly/planar_xy.i)
# 1-D Gap Heat Transfer Test without mechanics
#
# This test exercises 1-D gap heat transfer for a constant conductivity gap.
#
# The mesh consists of two element blocks in the x-y plane. Each element block
# is a square. They sit next to one another with a unit between them.
#
# The conductivity of both blocks is set very large to achieve a uniform temperature
# across each block. The temperature of the far bottom boundary
# is ramped from 100 to 200 over one time unit. The temperature of the far top
# boundary is held fixed at 100.
#
# A simple analytical solution is possible for the heat flux between the blocks:
#
# Flux = (T_left - T_right) * (gapK/gap_width)
#
# The gap conductivity is specified as 1, thus
#
# gapK(Tavg) = 1.0*Tavg
#
# The heat flux across the gap at time = 1 is then:
#
# Flux = 100 * (1.0/1.0) = 100
#
# For comparison, see results from the flux post processors. These results
# are the same as for the unit 1-D gap heat transfer between two unit cubes.
[Mesh]
file = simple_2D.e
[]
[Functions]
[./temp]
type = PiecewiseLinear
x = '0 1 2'
y = '100 200 200'
[../]
[]
[ThermalContact]
[./thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
[../]
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
initial_condition = 100
[../]
[]
[AuxVariables]
[./gap_cond]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[]
[BCs]
[./temp_far_bottom]
type = FunctionDirichletBC
boundary = 1
variable = temp
function = temp
[../]
[./temp_far_top]
type = DirichletBC
boundary = 4
variable = temp
value = 100
[../]
[]
[AuxKernels]
[./conductance]
type = MaterialRealAux
property = gap_conductance
variable = gap_cond
boundary = 2
[../]
[]
[Materials]
[./heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 100000000.0
[../]
[./density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 4'
line_search = 'none'
nl_rel_tol = 1e-14
l_tol = 1e-3
l_max_its = 100
dt = 1e-1
end_time = 1.0
[]
[Postprocessors]
[./temp_bottom]
type = SideAverageValue
boundary = 2
variable = temp
execute_on = 'initial timestep_end'
[../]
[./temp_top]
type = SideAverageValue
boundary = 3
variable = temp
execute_on = 'initial timestep_end'
[../]
[./flux_bottom]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[./flux_top]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_radiation/gap_heat_transfer_radiation_test.i)
#
# 1-D Gap Heat Transfer Test without mechanics
#
# This test exercises 1-D gap heat transfer for a helium-filled gap including radiation.
#
# The mesh consists of two element blocks containing one element each. Each
# element is a unit cube. They sit next to one another with a unit between them.
#
# The conductivity of both blocks is set very large to achieve a uniform temperature
# across each block. The temperature of the far left boundary
# is ramped from 100 to 200 over one time unit, and then held fixed for an additional
# time unit. The temperature of the far right boundary is held fixed at 100.
#
# A simple analytical solution is possible for the heat flux between the blocks:
#
# Flux = (T_left - T_right) * h_gap
#
# where h_gap = h_gas + h_cont + h_rad
#
# By setting the contact pressure, roughnesses, and jump distances to zero, the gap
# conductance simplifies to:
#
# h_gap = gapK/d_gap + sigma*Fe*(T_left^2 + T_right^2)*(T_left + T_right)
#
# where Fe = 1/(1/eps_left + 1/eps_right - 1)
# eps = emissivity
#
# For pure helium, BISON computes the gas conductivity as:
#
# gapK(Tavg) = 2.639e-3*Tavg^0.7085
#
# For the test, the final (t=2) average gas temperature is (200 +100)/2 = 150,
# giving gapK(150) = 0.09187557
#
# Assuming ems_left = ems_right = 0.5, Fe = 1/3
#
# The heat flux across the gap at that time is then:
#
# Flux(2) = 100 * ((0.09187557/1.0) + (5.669e-8/3)*(200^2 + 100^2)*(200 + 100))
# = 37.532557
#
# The flux post processors give 37.53255
#
[Mesh]
file = gap_heat_transfer_radiation_test.e
[]
[Functions]
[./temp]
type = PiecewiseLinear
x = '0 1'
y = '200 200'
[../]
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
initial_condition = 100
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[]
[BCs]
[./temp_far_left]
type = FunctionDirichletBC
boundary = 1
variable = temp
function = temp
[../]
[./temp_far_right]
type = DirichletBC
boundary = 4
variable = temp
value = 100
[../]
[]
[ThermalContact]
[./gap]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
gap_conductivity = 0.09187557
emissivity_primary = 0.5
emissivity_secondary = 0.5
[../]
[]
[Materials]
[./heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 10000000.0
[../]
[./density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 4'
line_search = 'none'
nl_abs_tol = 1e-6
nl_rel_tol = 1e-10
l_tol = 1e-3
l_max_its = 100
start_time = 0.0
dt = 1
end_time = 1.0
[]
[Postprocessors]
[./temp_left]
type = SideAverageValue
boundary = 2
variable = temp
execute_on = 'initial timestep_end'
[../]
[./temp_right]
type = SideAverageValue
boundary = 3
variable = temp
execute_on = 'initial timestep_end'
[../]
[./flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[../]
[./flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[../]
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/tutorials/single_phase_flow/01_flow_channel.i)
T_in = 300. # K
m_dot_in = 1e-2 # kg/s
press = 10e5 # Pa
[GlobalParams]
initial_p = ${press}
initial_vel = 0.0001
initial_T = ${T_in}
gravity_vector = '0 0 0'
rdg_slope_reconstruction = minmod
scaling_factor_1phase = '1 1e-2 1e-4'
closures = thm_closures
fp = he
[]
[FluidProperties]
[he]
type = IdealGasFluidProperties
molar_mass = 4e-3
gamma = 1.67
k = 0.2556
mu = 3.22639e-5
[]
[]
[Closures]
[thm_closures]
type = Closures1PhaseTHM
[]
[]
[Components]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'core_chan:in'
m_dot = ${m_dot_in}
T = ${T_in}
[]
[core_chan]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
length = 1
n_elems = 25
A = 7.2548e-3
D_h = 7.0636e-2
[]
[outlet]
type = Outlet1Phase
input = 'core_chan:out'
p = ${press}
[]
[]
[Postprocessors]
[core_p_in]
type = SideAverageValue
boundary = core_chan:in
variable = p
[]
[core_p_out]
type = SideAverageValue
boundary = core_chan:out
variable = p
[]
[core_delta_p]
type = ParsedPostprocessor
pp_names = 'core_p_in core_p_out'
function = 'core_p_in - core_p_out'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
line_search = basic
start_time = 0
end_time = 1000
dt = 10
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 25
[]
[Outputs]
exodus = true
[console]
type = Console
max_rows = 1
outlier_variable_norms = false
[]
print_linear_residuals = false
[]
(test/tests/functions/parsed/steady.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
initial_condition = 2
[../]
[]
[Functions]
[./right_bc]
type = ParsedFunction
expression = a+1
symbol_values = left_avg
symbol_names = a
[../]
[./left_bc]
type = ParsedFunction
expression = a
symbol_values = left_avg
symbol_names = a
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = FunctionDirichletBC
variable = u
boundary = left
function = left_bc
[../]
[./right]
type = FunctionDirichletBC
variable = u
boundary = 'right right'
function = right_bc
[../]
[]
[Postprocessors]
[./left_avg]
type = SideAverageValue
variable = u
execute_on = initial
boundary = left
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/cavity_pressure/initial_temperature.i)
#
# Cavity Pressure Test
#
# This test is designed to compute an internal pressure based on
# p = n * R * T / V
# where
# p is the pressure
# n is the amount of material in the volume (moles)
# R is the universal gas constant
# T is the temperature
# V is the volume
#
# The mesh is composed of one block (1) with an interior cavity of volume 8.
# Block 2 sits in the cavity and has a volume of 1. Thus, the total
# initial volume is 7.
# The test adjusts n, T, and V in the following way:
# n => n0 + alpha * t
# T => T0 + beta * t
# V => V0 + gamma * t
# with
# alpha = n0
# beta = T0 / 2
# gamma = -(0.003322259...) * V0
# T0 = 240.54443866068704
# V0 = 7
# n0 = f(p0)
# p0 = 100
# R = 8.314472 J * K^(-1) * mol^(-1)
#
# So, n0 = p0 * V0 / R / T0 = 100 * 7 / 8.314472 / 240.544439
# = 0.35
#
# The parameters combined at t = 1 gives p = 301.
#
# This test sets the initial temperature to 500, but the CavityPressure
# is told that that initial temperature is T0. Thus, the final solution
# is unchanged.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
file = 3d.e
[]
[GlobalParams]
volumetric_locking_correction = true
[]
[Functions]
[./displ_positive]
type = PiecewiseLinear
x = '0 1'
y = '0 0.0029069767441859684'
[../]
[./displ_negative]
type = PiecewiseLinear
x = '0 1'
y = '0 -0.0029069767441859684'
[../]
[./temp1]
type = PiecewiseLinear
x = '0 1'
y = '1 1.5'
scale_factor = 240.54443866068704
[../]
[./material_input_function]
type = PiecewiseLinear
x = '0 1'
y = '0 0.35'
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./temp]
initial_condition = 500
[../]
[./material_input]
[../]
[]
[AuxVariables]
[./pressure_residual_x]
[../]
[./pressure_residual_y]
[../]
[./pressure_residual_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./TensorMechanics]
use_displaced_mesh = true
[../]
[./heat]
type = Diffusion
variable = temp
use_displaced_mesh = true
[../]
[./material_input_dummy]
type = Diffusion
variable = material_input
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = stress_xx
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = stress_yy
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = stress_zz
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 1
variable = stress_xy
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 2
variable = stress_yz
[../]
[./stress_zx]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 0
variable = stress_zx
[../]
[]
[BCs]
[./no_x_exterior]
type = DirichletBC
variable = disp_x
boundary = '7 8'
value = 0.0
[../]
[./no_y_exterior]
type = DirichletBC
variable = disp_y
boundary = '9 10'
value = 0.0
[../]
[./no_z_exterior]
type = DirichletBC
variable = disp_z
boundary = '11 12'
value = 0.0
[../]
[./prescribed_left]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = displ_positive
[../]
[./prescribed_right]
type = FunctionDirichletBC
variable = disp_x
boundary = 14
function = displ_negative
[../]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '15 16'
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '17 18'
value = 0.0
[../]
[./no_x_interior]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[../]
[./no_y_interior]
type = DirichletBC
variable = disp_y
boundary = '3 4'
value = 0.0
[../]
[./no_z_interior]
type = DirichletBC
variable = disp_z
boundary = '5 6'
value = 0.0
[../]
[./temperatureInterior]
type = FunctionDirichletBC
boundary = 100
function = temp1
variable = temp
[../]
[./MaterialInput]
type = FunctionDirichletBC
boundary = '100 13 14 15 16'
function = material_input_function
variable = material_input
[../]
[./CavityPressure]
[./1]
boundary = 100
initial_pressure = 100
material_input = materialInput
R = 8.314472
temperature = aveTempInterior
initial_temperature = 240.54443866068704
volume = internalVolume
startup_time = 0.5
output = ppress
save_in = 'pressure_residual_x pressure_residual_y pressure_residual_z'
[../]
[../]
[]
[Materials]
[./elast_tensor1]
type = ComputeElasticityTensor
C_ijkl = '0 5'
fill_method = symmetric_isotropic
block = 1
[../]
[./strain1]
type = ComputeFiniteStrain
block = 1
[../]
[./stress1]
type = ComputeFiniteStrainElasticStress
block = 1
[../]
[./elast_tensor2]
type = ComputeElasticityTensor
C_ijkl = '0 5'
fill_method = symmetric_isotropic
block = 2
[../]
[./strain2]
type = ComputeFiniteStrain
block = 2
[../]
[./stress2]
type = ComputeFiniteStrainElasticStress
block = 2
[../]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
nl_rel_tol = 1e-12
l_tol = 1e-12
l_max_its = 20
dt = 0.5
end_time = 1.0
[]
[Postprocessors]
[./internalVolume]
type = InternalVolume
boundary = 100
execute_on = 'initial linear'
[../]
[./aveTempInterior]
type = SideAverageValue
boundary = 100
variable = temp
execute_on = 'initial linear'
[../]
[./materialInput]
type = SideAverageValue
boundary = '7 8 9 10 11 12'
variable = material_input
execute_on = linear
[../]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/pins/channel-flow/pm_friction.i)
# This test case tests the porous-medium flow pressure drop due to friction (both viscous and inertia effect)
#
# At the steady state, eps * grad_p = alpha * u + beta * u^2
# With eps = 0.4, L = 1, u = 1, alpha = 1000, beta = 100
# dp = (1000 + 100) / 0.4 = 2,750
# This can be verified by check the p_in - p_out
[GlobalParams]
gravity = '0 0 0'
order = FIRST
family = LAGRANGE
u = vel_x
v = vel_y
pressure = p
temperature = T
porosity = porosity
eos = eos
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 0.1
nx = 10
ny = 4
elem_type = QUAD4
[]
[FluidProperties]
[./eos]
type = SimpleFluidProperties
density0 = 100 # kg/m^3
thermal_expansion = 0 # K^{-1}
cp = 100
viscosity = 0.1 # Pa-s, Re=rho*u*L/mu = 100*1*0.1/0.1 = 100
[../]
[]
[Functions]
[v_in]
type = PiecewiseLinear
x = '0 1e5'
y = '1 1'
[]
[]
[Variables]
# velocity
[vel_x]
initial_condition = 1
[]
[vel_y]
initial_condition = 0
[]
# Pressure
[p]
initial_condition = 1e5
[]
[]
[AuxVariables]
[rho]
initial_condition = 100
[]
# Temperature
[T]
initial_condition = 630
[]
[porosity]
initial_condition = 0.4
[]
[]
[Materials]
[mat]
type = PINSFEMaterial
alpha = 1000
beta = 100
[]
[]
[Kernels]
[mass_time]
type = PINSFEFluidPressureTimeDerivative
variable = p
[]
[mass_space]
type = INSFEFluidMassKernel
variable = p
[]
[x_momentum_time]
type = PINSFEFluidVelocityTimeDerivative
variable = vel_x
[]
[x_momentum_space]
type = INSFEFluidMomentumKernel
variable = vel_x
component = 0
[]
[y_momentum_time]
type = PINSFEFluidVelocityTimeDerivative
variable = vel_y
[]
[y_momentum_space]
type = INSFEFluidMomentumKernel
variable = vel_y
component = 1
[]
[]
[AuxKernels]
[rho_aux]
type = FluidDensityAux
variable = rho
p = p
T = T
fp = eos
[]
[]
[BCs]
# BCs for mass equation
# Inlet
[mass_inlet]
type = INSFEFluidMassBC
variable = p
boundary = 'left'
v_fn = v_in
[]
# Outlet
[./pressure_out]
type = DirichletBC
variable = p
boundary = 'right'
value = 1e5
[../]
# BCs for x-momentum equation
# Inlet
[vx_in]
type = FunctionDirichletBC
variable = vel_x
boundary = 'left'
function = v_in
[]
# Outlet (no BC is needed)
# BCs for y-momentum equation
# Both Inlet and Outlet, and Top and Bottom
[vy]
type = DirichletBC
variable = vel_y
boundary = 'left right bottom top'
value = 0
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
solve_type = 'PJFNK'
[]
[]
[Postprocessors]
[p_in]
type = SideAverageValue
variable = p
boundary = left
[]
[p_out]
type = SideAverageValue
variable = p
boundary = right
[]
[]
[Executioner]
type = Transient
dt = 0.1
dtmin = 1.e-3
petsc_options_iname = '-pc_type -ksp_gmres_restart'
petsc_options_value = 'lu 100'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-8
nl_max_its = 20
l_tol = 1e-5
l_max_its = 100
start_time = 0.0
end_time = 0.5
num_steps = 10
[]
[Outputs]
perf_graph = true
print_linear_residuals = false
time_step_interval = 1
execute_on = 'initial timestep_end'
[console]
type = Console
output_linear = false
[]
[out]
type = Exodus
use_displaced = false
[]
[]
(modules/combined/test/tests/ad_cavity_pressure/rz.i)
#
# Cavity Pressure Test
#
# This test is designed to compute an internal pressure based on
# p = n * R * T / V
# where
# p is the pressure
# n is the amount of material in the volume (moles)
# R is the universal gas constant
# T is the temperature
# V is the volume
#
# The mesh is composed of one block (2) with an interior cavity of volume 8.
# Block 1 sits in the cavity and has a volume of 1. Thus, the total
# initial volume is 7.
# The test adjusts T in the following way:
# T => T0 + beta * t
# with
# beta = T0
# T0 = 240.54443866068704
# V0 = 7
# n0 = f(p0)
# p0 = 100
# R = 8.314472 J * K^(-1) * mol^(-1)
#
# So, n0 = p0 * V0 / R / T0 = 100 * 7 / 8.314472 / 240.544439
# = 0.35
#
# At t = 1, p = 200.
[Problem]
coord_type = RZ
[]
[GlobalParams]
displacements = 'disp_r disp_z'
[]
[Mesh]
file = rz.e
[]
[Functions]
[./temperature]
type = PiecewiseLinear
x = '0 1'
y = '1 2'
scale_factor = 240.54443866068704
[../]
[]
[Variables]
[./disp_r]
[../]
[./disp_z]
[../]
[./temp]
initial_condition = 240.54443866068704
[../]
[]
[Kernels]
[./TensorMechanics]
use_displaced_mesh = true
use_automatic_differentiation = true
[../]
[./heat]
type = ADDiffusion
variable = temp
use_displaced_mesh = true
[../]
[]
[BCs]
[./no_x]
type = DirichletBC
variable = disp_r
boundary = '1 2'
value = 0.0
[../]
[./no_y]
type = DirichletBC
variable = disp_z
boundary = '1 2'
value = 0.0
[../]
[./temperatureInterior]
type = ADFunctionDirichletBC
preset = false
boundary = 2
function = temperature
variable = temp
[../]
[./CavityPressure]
[./1]
boundary = 2
initial_pressure = 100
R = 8.314472
temperature = aveTempInterior
volume = internalVolume
startup_time = 0.5
output = ppress
use_automatic_differentiation = true
[../]
[../]
[]
[Materials]
[./elastic_tensor1]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.3
block = 1
[../]
[./strain1]
type = ADComputeAxisymmetricRZFiniteStrain
block = 1
[../]
[./stress1]
type = ADComputeFiniteStrainElasticStress
block = 1
[../]
[./elastic_tensor2]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.3
block = 2
[../]
[./strain2]
type = ADComputeAxisymmetricRZFiniteStrain
block = 2
[../]
[./stress2]
type = ADComputeFiniteStrainElasticStress
block = 2
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
nl_abs_tol = 1e-10
l_max_its = 20
dt = 0.5
end_time = 1.0
[]
[Postprocessors]
[./internalVolume]
type = InternalVolume
boundary = 2
execute_on = 'initial linear'
[../]
[./aveTempInterior]
type = SideAverageValue
boundary = 2
variable = temp
execute_on = 'initial linear'
[../]
[]
[Outputs]
exodus = true
[./checkpoint]
type = Checkpoint
num_files = 1
[../]
[]
(test/tests/userobjects/side_user_object_no_boundary_error/side_no_boundary.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Postprocessors]
[./avg]
type = SideAverageValue
variable = u
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
(test/tests/multiapps/steffensen_postprocessor/steady_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[sink]
type = BodyForce
variable = u
value = -1
[]
[]
[BCs]
[right]
type = PostprocessorDirichletBC
variable = u
boundary = right
postprocessor = 'from_main'
[]
[]
[Postprocessors]
[from_main]
type = Receiver
default = 0
[]
[to_main]
type = SideAverageValue
variable = u
boundary = left
[]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
fixed_point_algorithm = 'steffensen'
[]
[Outputs]
csv = true
exodus = false
[]
(modules/thermal_hydraulics/test/tests/misc/coupling_mD_flow/thm_non_overlapping.i)
T_in = 523.0
mdot = 10
pout = 7e6
[GlobalParams]
initial_p = ${pout}
initial_vel = 1
initial_T = ${T_in}
gravity_vector = '0 0 0'
closures = simple_closures
n_elems = 5
scaling_factor_1phase = '1 1e-2 1e-5'
f = 1
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
gamma = 1.66
molar_mass = 0.004
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[inlet_bc]
type = InletMassFlowRateTemperature1Phase
input = 'inlet:in'
m_dot = ${mdot}
T = ${T_in}
[]
[inlet]
type = FlowChannel1Phase
fp = fp
position = '0 0 11'
orientation = '0 0 -1'
length = 1
A = 1
[]
[inlet_plenum]
type = VolumeJunction1Phase
position = '0 0 10'
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 1
connections = 'inlet:out bypass:in core_top:in'
volume = 1
[]
[bypass]
type = FlowChannel1Phase
fp = fp
position = '2 0 10'
orientation = '0 0 -1'
length = 10
A = 0.01
[]
[core_top]
type = FlowChannel1Phase
fp = fp
position = '0 0 10'
orientation = '0 0 -1'
length = 0.1
A = 9
[]
[core_top_bc]
type = Outlet1Phase
p = ${pout}
input = 'core_top:out'
[]
[core_bottom_bc]
type = InletMassFlowRateTemperature1Phase
input = 'core_bottom:in'
m_dot = ${mdot}
T = ${T_in}
[]
[core_bottom]
type = FlowChannel1Phase
fp = fp
position = '0 0 0.1'
orientation = '0 0 -1'
length = 0.1
A = 9
[]
[outlet_plenum]
type = VolumeJunction1Phase
position = '0 0 0'
initial_vel_x = 1
initial_vel_y = 0
initial_vel_z = 1
connections = 'bypass:out core_bottom:out outlet:in'
volume = 1
[]
[outlet]
type = FlowChannel1Phase
fp = fp
position = '0 0 0'
orientation = '0 0 -1'
length = 1
A = 1
[]
[outlet_bc]
type = Outlet1Phase
p = ${pout}
input = 'outlet:out'
[]
[]
[ControlLogic]
[set_core_inlet_pressure]
type = SetComponentRealValueControl
component = core_top_bc
parameter = p
value = core_inlet_pressure
[]
[set_core_outlet_mdot]
type = SetComponentRealValueControl
component = core_bottom_bc
parameter = m_dot
value = core_outlet_mdot
[]
[set_core_outlet_temperature]
type = SetComponentRealValueControl
component = core_bottom_bc
parameter = T
value = core_outlet_temperature
[]
[]
[Postprocessors]
[core_inlet_pressure]
type = Receiver
default = ${pout}
[]
[core_outlet_mdot]
type = Receiver
default = ${mdot}
[]
[core_outlet_temperature]
type = Receiver
default = ${T_in}
[]
[core_outlet_pressure]
type = SideAverageValue
variable = p
boundary = 'core_bottom:in'
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[]
[core_inlet_mdot]
type = SideAverageValue
variable = rhouA
boundary = 'core_top:out'
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[]
[core_inlet_temperature]
type = SideAverageValue
variable = T
boundary = 'core_top:out'
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[]
[bypass_inlet_pressure]
type = SideAverageValue
variable = p
boundary = 'bypass:in'
[]
[bypass_outlet_pressure]
type = SideAverageValue
variable = p
boundary = 'bypass:out'
[]
[bypass_pressure_drop]
type = DifferencePostprocessor
value1 = bypass_inlet_pressure
value2 = bypass_outlet_pressure
[]
[bypass_mdot]
type = SideAverageValue
variable = rhouA
boundary = 'bypass:out'
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[]
[inlet_mdot]
type = SideAverageValue
variable = rhouA
boundary = 'inlet:in'
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[]
[outlet_mdot]
type = SideAverageValue
variable = rhouA
boundary = 'outlet:out'
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
timestep_tolerance = 1e-6
start_time = 0
end_time = 100
dt = 0.01
line_search = l2
nl_rel_tol = 1e-6
nl_abs_tol = 1e-4
nl_max_its = 25
l_tol = 1e-3
l_max_its = 20
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu '
[]
[Outputs]
exodus = true
[]
(modules/combined/examples/effective_properties/effective_th_cond.i)
# This example calculates the effective thermal conductivity across a microstructure
# with circular second phase precipitates. Two methods are used to calculate the effective thermal conductivity,
# the direct method that applies a temperature to one side and a heat flux to the other,
# and the AEH method.
[Mesh] #Sets mesh size to 10 microns by 10 microns
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 100
xmax = 10
ymax = 10
[]
[new_nodeset]
input = gen
type = ExtraNodesetGenerator
coord = '5 5'
new_boundary = 100
[]
[]
[Variables] #Adds variables needed for two ways of calculating effective thermal cond.
[T] #Temperature used for the direct calculation
initial_condition = 800
[]
[Tx_AEH] #Temperature used for the x-component of the AEH solve
initial_condition = 800
scaling = 1.0e4 #Scales residual to improve convergence
[]
[Ty_AEH] #Temperature used for the y-component of the AEH solve
initial_condition = 800
scaling = 1.0e4 #Scales residual to improve convergence
[]
[]
[AuxVariables] #Creates second constant phase
[phase2]
[]
[]
[ICs] #Sets the IC for the second constant phase
[phase2_IC] #Creates circles with smooth interfaces at random locations
variable = phase2
type = MultiSmoothCircleIC
int_width = 0.3
numbub = 20
bubspac = 1.5
radius = 0.5
outvalue = 0
invalue = 1
block = 0
[]
[]
[Kernels]
[HtCond] #Kernel for direct calculation of thermal cond
type = HeatConduction
variable = T
[]
[heat_x] #All other kernels are for AEH approach to calculate thermal cond.
type = HeatConduction
variable = Tx_AEH
[]
[heat_rhs_x]
type = HomogenizedHeatConduction
variable = Tx_AEH
component = 0
[]
[heat_y]
type = HeatConduction
variable = Ty_AEH
[]
[heat_rhs_y]
type = HomogenizedHeatConduction
variable = Ty_AEH
component = 1
[]
[]
[BCs]
[Periodic]
[all]
auto_direction = 'x y'
variable = 'Tx_AEH Ty_AEH'
[]
[]
[left_T] #Fix temperature on the left side
type = DirichletBC
variable = T
boundary = left
value = 800
[]
[right_flux] #Set heat flux on the right side
type = NeumannBC
variable = T
boundary = right
value = 5e-6
[]
[fix_x] #Fix Tx_AEH at a single point
type = DirichletBC
variable = Tx_AEH
value = 800
boundary = 100
[]
[fix_y] #Fix Ty_AEH at a single point
type = DirichletBC
variable = Ty_AEH
value = 800
boundary = 100
[]
[]
[Materials]
[thcond] #The equation defining the thermal conductivity is defined here, using two ifs
# The k in the bulk is k_b, in the precipitate k_p2, and across the interaface k_int
type = ParsedMaterial
block = 0
constant_names = 'length_scale k_b k_p2 k_int'
constant_expressions = '1e-6 5 1 0.1'
expression = 'sk_b:= length_scale*k_b; sk_p2:= length_scale*k_p2; sk_int:= k_int*length_scale; if(phase2>0.1,if(phase2>0.95,sk_p2,sk_int),sk_b)'
outputs = exodus
f_name = thermal_conductivity
coupled_variables = phase2
[]
[]
[Postprocessors]
[right_T]
type = SideAverageValue
variable = T
boundary = right
[]
[k_x_direct] #Effective thermal conductivity from direct method
# This value is lower than the AEH value because it is impacted by second phase
# on the right boundary
type = ThermalConductivity
variable = T
flux = 5e-6
length_scale = 1e-06
T_hot = 800
dx = 10
boundary = right
[]
[k_x_AEH] #Effective thermal conductivity in x-direction from AEH
type = HomogenizedThermalConductivity
chi = 'Tx_AEH Ty_AEH'
row = 0
col = 0
scale_factor = 1e6 #Scale due to length scale of problem
[]
[k_y_AEH] #Effective thermal conductivity in x-direction from AEH
type = HomogenizedThermalConductivity
chi = 'Tx_AEH Ty_AEH'
row = 1
col = 1
scale_factor = 1e6 #Scale due to length scale of problem
[]
[]
[Preconditioning]
[SMP]
type = SMP
off_diag_row = 'Tx_AEH Ty_AEH'
off_diag_column = 'Ty_AEH Tx_AEH'
[]
[]
[Executioner]
type = Steady
l_max_its = 15
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -pc_hypre_boomeramg_strong_threshold'
petsc_options_value = 'hypre boomeramg 31 0.7'
l_tol = 1e-04
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
csv = true
[]
(modules/combined/test/tests/phase_field_fracture/crack2d_computeCrackedStress_smallstrain.i)
#This input uses PhaseField-Nonconserved Action to add phase field fracture bulk rate kernels
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 20
ymax = 0.5
[]
[./noncrack]
type = BoundingBoxNodeSetGenerator
new_boundary = noncrack
bottom_left = '0.5 0 0'
top_right = '1 0 0'
input = gen
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./strain_yy]
family = MONOMIAL
order = CONSTANT
[../]
[]
[Modules]
[./TensorMechanics]
[./Master]
[./All]
add_variables = true
strain = SMALL
planar_formulation = PLANE_STRAIN
additional_generate_output = 'stress_yy'
strain_base_name = uncracked
[../]
[../]
[../]
[./PhaseField]
[./Nonconserved]
[./c]
free_energy = E_el
kappa = kappa_op
mobility = L
[../]
[../]
[../]
[]
[Kernels]
[./solid_x]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_x
component = 0
c = c
[../]
[./solid_y]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_y
component = 1
c = c
[../]
[./off_disp]
type = AllenCahnElasticEnergyOffDiag
variable = c
displacements = 'disp_x disp_y'
mob_name = L
[../]
[]
[AuxKernels]
[./strain_yy]
type = RankTwoAux
variable = strain_yy
rank_two_tensor = uncracked_mechanical_strain
index_i = 1
index_j = 1
[../]
[]
[BCs]
[./ydisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = 't'
[../]
[./yfix]
type = DirichletBC
variable = disp_y
boundary = noncrack
value = 0
[../]
[./xfix]
type = DirichletBC
variable = disp_x
boundary = right
value = 0
[../]
[]
[Materials]
[./pfbulkmat]
type = GenericConstantMaterial
prop_names = 'gc_prop l visco'
prop_values = '1e-3 0.05 1e-6'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '127.0 70.8 70.8 127.0 70.8 127.0 73.55 73.55 73.55'
fill_method = symmetric9
base_name = uncracked
euler_angle_1 = 30
euler_angle_2 = 0
euler_angle_3 = 0
[../]
[./elastic]
type = ComputeLinearElasticStress
base_name = uncracked
[../]
[./cracked_stress]
type = ComputeCrackedStress
c = c
kdamage = 1e-6
F_name = E_el
use_current_history_variable = true
uncracked_base_name = uncracked
[../]
[]
[Postprocessors]
[./av_stress_yy]
type = ElementAverageValue
variable = stress_yy
[../]
[./av_strain_yy]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_factor_mat_solving_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-8
l_tol = 1e-4
l_max_its = 100
nl_max_its = 10
dt = 5e-5
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/phase_field_fracture/crack2d_computeCrackedStress_finitestrain_plastic.i)
#This input uses PhaseField-Nonconserved Action to add phase field fracture bulk rate kernels
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 20
ymax = 0.5
[]
[./noncrack]
type = BoundingBoxNodeSetGenerator
new_boundary = noncrack
bottom_left = '0.5 0 0'
top_right = '1 0 0'
input = gen
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./strain_yy]
family = MONOMIAL
order = CONSTANT
[../]
[./elastic_strain_yy]
family = MONOMIAL
order = CONSTANT
[../]
[./plastic_strain_yy]
family = MONOMIAL
order = CONSTANT
[../]
[./uncracked_stress_yy]
family = MONOMIAL
order = CONSTANT
[../]
[]
[Modules]
[./TensorMechanics]
[./Master]
[./All]
add_variables = true
strain = FINITE
planar_formulation = PLANE_STRAIN
additional_generate_output = 'stress_yy vonmises_stress'
strain_base_name = uncracked
[../]
[../]
[../]
[./PhaseField]
[./Nonconserved]
[./c]
free_energy = E_el
kappa = kappa_op
mobility = L
[../]
[../]
[../]
[]
[Kernels]
[./solid_x]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_x
component = 0
c = c
[../]
[./solid_y]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_y
component = 1
c = c
[../]
[./off_disp]
type = AllenCahnElasticEnergyOffDiag
variable = c
displacements = 'disp_x disp_y'
mob_name = L
[../]
[]
[AuxKernels]
[./strain_yy]
type = RankTwoAux
variable = strain_yy
rank_two_tensor = uncracked_mechanical_strain
index_i = 1
index_j = 1
execute_on = TIMESTEP_END
[../]
[./elastic_strain_yy]
type = RankTwoAux
variable = elastic_strain_yy
rank_two_tensor = uncracked_elastic_strain
index_i = 1
index_j = 1
execute_on = TIMESTEP_END
[../]
[./plastic_strain_yy]
type = RankTwoAux
variable = plastic_strain_yy
rank_two_tensor = uncracked_plastic_strain
index_i = 1
index_j = 1
execute_on = TIMESTEP_END
[../]
[./uncracked_stress_yy]
type = RankTwoAux
variable = uncracked_stress_yy
rank_two_tensor = uncracked_stress
index_i = 1
index_j = 1
execute_on = TIMESTEP_END
[../]
[]
[BCs]
[./ydisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = 't'
[../]
[./yfix]
type = DirichletBC
variable = disp_y
boundary = noncrack
value = 0
[../]
[./xfix]
type = DirichletBC
variable = disp_x
boundary = right
value = 0
[../]
[]
[Functions]
[./hf]
type = PiecewiseLinear
x = '0 0.001 0.003 0.023'
y = '0.85 1.0 1.25 1.5'
[../]
[]
[Materials]
[./pfbulkmat]
type = GenericConstantMaterial
prop_names = 'gc_prop l visco'
prop_values = '1e-3 0.05 5e-3'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '120.0 80.0'
fill_method = symmetric_isotropic
base_name = uncracked
[../]
[./isotropic_plasticity]
type = IsotropicPlasticityStressUpdate
yield_stress = 0.85
hardening_function = hf
base_name = uncracked
[../]
[./radial_return_stress]
type = ComputeMultipleInelasticStress
tangent_operator = elastic
inelastic_models = 'isotropic_plasticity'
base_name = uncracked
[../]
[./cracked_stress]
type = ComputeCrackedStress
c = c
F_name = E_el
use_current_history_variable = true
uncracked_base_name = uncracked
finite_strain_model = true
[../]
[]
[Postprocessors]
[./av_stress_yy]
type = ElementAverageValue
variable = stress_yy
[../]
[./av_strain_yy]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[./av_uncracked_stress_yy]
type = ElementAverageValue
variable = uncracked_stress_yy
[../]
[./max_c]
type = ElementExtremeValue
variable = c
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_factor_mat_solving_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-8
l_tol = 1e-4
l_max_its = 100
nl_max_its = 10
dt = 2.0e-5
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/radial_disp_aux/sphere_2d_axisymmetric.i)
# The purpose of this set of tests is to check the values computed
# by the RadialDisplacementAux AuxKernel. They should match the
# radial component of the displacment for a cylindrical or spherical
# model.
# This particular model is of a sphere subjected to uniform thermal
# expansion represented using a 2D axisymmetric model.
[Mesh]
type = FileMesh
file = circle_sector_2d.e
[]
[GlobalParams]
displacements = 'disp_x disp_y'
order = SECOND
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[AuxVariables]
[./temp]
[../]
[./rad_disp]
[../]
[]
[Functions]
[./temperature_load]
type = ParsedFunction
expression = t+300.0
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
eigenstrain_names = eigenstrain
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = temperature_load
use_displaced_mesh = false
[../]
[./raddispaux]
type = RadialDisplacementSphereAux
variable = rad_disp
origin = '0 0 0'
[../]
[]
[BCs]
[./x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./y]
type = DirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 300
thermal_expansion_coeff = 1.3e-5
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '51'
line_search = 'none'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
start_time = 0.0
end_time = 1
dt = 1
dtmin = 1
[]
[Outputs]
csv = true
exodus = true
[]
#[Postprocessors]
# [./strain_xx]
# type = SideAverageValue
# variable =
# block = 0
# [../]
#[]
(modules/navier_stokes/test/tests/finite_volume/pins/materials/2d-rc-action.i)
mu = 0.01
rho = 2000
u_inlet = 1
advected_interp_method = 'upwind'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 1
nx = 10
ny = 6
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 0.5
[]
[speed_output]
type = MooseVariableFVReal
[]
[vel_x_output]
type = MooseVariableFVReal
[]
[vel_y_output]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[speed]
type = FunctorAux
variable = 'speed_output'
functor = 'speed'
[]
[vel_x]
type = ADFunctorVectorElementalAux
variable = 'vel_x_output'
functor = 'velocity'
component = 0
[]
[vel_y]
type = ADFunctorVectorElementalAux
variable = 'vel_y_output'
functor = 'velocity'
component = 1
[]
[]
[Modules]
[NavierStokesFV]
compressibility = 'incompressible'
porous_medium_treatment = true
density = ${rho}
dynamic_viscosity = ${mu}
porosity = 'porosity'
initial_velocity = '${u_inlet} 1e-6 0'
initial_pressure = 0.0
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_function = '${u_inlet} 0'
wall_boundaries = 'top bottom'
momentum_wall_types = 'noslip symmetry'
outlet_boundaries = 'right'
momentum_outlet_types = 'fixed-pressure'
pressure_function = '0.1'
momentum_advection_interpolation = ${advected_interp_method}
mass_advection_interpolation = ${advected_interp_method}
[]
[]
[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
nl_abs_tol = 1e-11
[]
# Some basic Postprocessors to examine the solution
[Postprocessors]
[inlet-p]
type = SideAverageValue
variable = pressure
boundary = 'left'
[]
[outlet-u]
type = SideAverageValue
variable = superficial_vel_x
boundary = 'right'
[]
[]
[Outputs]
exodus = true
csv = false
[]
(modules/solid_mechanics/test/tests/thermal_expansion_function/dilatation.i)
# This test checks the thermal expansion calculated via an dilatation function.
# The coefficient is selected so as to result in a 1e-4 strain in the x-axis, and to cross over
# from positive to negative strain.
[Mesh]
[./gen]
type = GeneratedMeshGenerator
dim = 3
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./temp]
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = SMALL
add_variables = true
eigenstrain_names = eigenstrain
generate_output = 'strain_xx strain_yy strain_zz'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./bottom]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./back]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[]
[AuxKernels]
[./temp]
type = FunctionAux
variable = temp
function = '1 + t'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./thermal_expansion_strain]
type = ComputeDilatationThermalExpansionFunctionEigenstrain
dilatation_function = cte_dilatation
stress_free_temperature = 1.5
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Functions]
[./cte_dilatation]
type = PiecewiseLinear
x = '1 2'
y = '-1e-4 1e-4'
[../]
[]
[Postprocessors]
[./disp_x_max]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./temp_avg]
type = ElementAverageValue
variable = temp
[../]
[]
[Executioner]
type = Transient
end_time = 1.0
dt = 0.1
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/controls/switch-pressure-bc/test.i)
rho = 1
mu = 1
l = 1
velocity_interp_method = 'rc'
advected_interp_method = 'upwind'
outlet_pressure = 1e5
inlet_v = 1
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${l}
ymin = 0
ymax = 1
nx = 4
ny = 2
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = vel_x
v = vel_y
pressure = pressure
[]
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
initial_condition = ${inlet_v}
[]
[vel_y]
type = INSFVVelocityVariable
[]
[pressure]
type = INSFVPressureVariable
initial_condition = ${outlet_pressure}
[]
[]
[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 = 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
[]
[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
momentum_component = 'y'
mu = ${mu}
[]
[v_pressure]
type = INSFVMomentumPressure
variable = vel_y
momentum_component = 'y'
pressure = pressure
[]
[]
[FVBCs]
[free_slip_x]
type = INSFVNaturalFreeSlipBC
variable = vel_x
boundary = 'top bottom'
momentum_component = 'x'
[]
[free_slip_y]
type = INSFVNaturalFreeSlipBC
variable = vel_y
boundary = 'top bottom'
momentum_component = 'y'
[]
# Inlet
[inlet_u]
type = INSFVInletVelocityBC
variable = vel_x
boundary = 'left'
function = ${inlet_v}
[]
[inlet_u_later]
type = INSFVInletVelocityBC
variable = vel_x
boundary = 'right'
function = ${fparse -1 * inlet_v}
enable = false
[]
[inlet_v]
type = INSFVInletVelocityBC
variable = vel_y
boundary = 'left'
function = 0
[]
[inlet_v_later]
type = INSFVInletVelocityBC
variable = vel_y
boundary = 'right'
function = 0
enable = false
[]
[outlet_p]
type = INSFVOutletPressureBC
variable = pressure
boundary = 'right'
function = ${outlet_pressure}
[]
[outlet_p_later]
type = INSFVOutletPressureBC
variable = pressure
boundary = 'left'
function = ${fparse 2 * outlet_pressure}
enable = false
[]
[]
[Functions]
[conditional_function]
type = ParsedFunction
expression = 't > 1.5'
[]
[]
[Controls]
[p_threshold]
type = ConditionalFunctionEnableControl
conditional_function = conditional_function
disable_objects = 'FVBCs::outlet_p FVBCs::inlet_u FVBCs::inlet_v'
enable_objects = 'FVBCs::outlet_p_later FVBCs::inlet_u_later FVBCs::inlet_v_later'
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[FunctorMaterials]
[const_functor]
type = ADGenericFunctorMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[]
[Postprocessors]
[pressure_right]
type = SideAverageValue
variable = pressure
boundary = right
[]
[pressure_left]
type = SideAverageValue
variable = pressure
boundary = right
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
end_time = 3
line_search = 'bt'
nl_abs_tol = 1e-8
abort_on_solve_fail = true
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/mms/1d-rc.i)
mu = 1.1
rho = 1.1
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 1
dx = '1 1'
ix = '5 5'
subdomain_id = '1 2'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
pressure = pressure
porosity = porosity
[]
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 0.8
[]
[]
[Problem]
error_on_jacobian_nonzero_reallocation = true
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'cos((1/2)*x*pi)'
[]
[forcing_u]
type = ParsedFunction
expression = '0.25*pi^2*mu*cos((1/2)*x*pi) - 1.25*pi*rho*sin((1/2)*x*pi)*cos((1/2)*x*pi) + 0.8*cos(x)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'sin(x)'
[]
[forcing_p]
type = ParsedFunction
expression = '-1/2*pi*rho*sin((1/2)*x*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[mass_forcing]
type = FVBodyForce
variable = pressure
function = forcing_p
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = u
mu = ${mu}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressureFlux
variable = u
pressure = pressure
porosity = porosity
momentum_component = 'x'
[]
[u_forcing]
type = INSFVBodyForce
variable = u
functor = forcing_u
momentum_component = 'x'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
functor = 'exact_u'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 'exact_p'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[Postprocessors]
[inlet_p]
type = SideAverageValue
variable = 'pressure'
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 'right'
[]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2FunctorError
approximate = u
exact = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
approximate = pressure
exact = exact_p
type = ElementL2FunctorError
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
[Outputs]
csv = true
[]
(modules/heat_transfer/test/tests/convective_heat_flux/coupled.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
[]
[Variables]
[./temp]
initial_condition = 200.0
[../]
[]
[Kernels]
[./heat_dt]
type = TimeDerivative
variable = temp
[../]
[./heat_conduction]
type = Diffusion
variable = temp
[../]
[./heat]
type = BodyForce
variable = temp
value = 0
[../]
[]
[BCs]
[./right]
type = ConvectiveHeatFluxBC
variable = temp
boundary = 'right'
T_infinity = T_inf
heat_transfer_coefficient = htc
heat_transfer_coefficient_dT = dhtc_dT
[../]
[]
[Materials]
[./T_inf]
type = ParsedMaterial
property_name = T_inf
coupled_variables = temp
expression = 'temp + 1'
[../]
[./htc]
type = ParsedMaterial
property_name = htc
coupled_variables = temp
expression = 'temp / 100 + 1'
[../]
[./dhtc_dT]
type = ParsedMaterial
property_name = dhtc_dT
coupled_variables = temp
expression = '1 / 100'
[../]
[]
[Postprocessors]
[./left_temp]
type = SideAverageValue
variable = temp
boundary = left
execute_on = 'TIMESTEP_END initial'
[../]
[./right_temp]
type = SideAverageValue
variable = temp
boundary = right
[../]
[./right_flux]
type = SideDiffusiveFluxAverage
variable = temp
boundary = right
diffusivity = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1
nl_abs_tol = 1e-12
[]
[Outputs]
[./out]
type = CSV
time_step_interval = 10
[../]
[]
(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'
[../]
[]
(test/tests/mesh/named_entities/named_entities_test.i)
[Mesh]
file = named_entities.e
uniform_refine = 1
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
block = '1 center_block 3'
[./InitialCondition]
type = ConstantIC
value = 20
block = 'center_block 3'
[../]
[../]
[]
[AuxVariables]
[./reporter]
order = CONSTANT
family = MONOMIAL
block = 'left_block 3'
[../]
[]
[ICs]
[./reporter_ic]
type = ConstantIC
variable = reporter
value = 10
[../]
[]
[Kernels]
active = 'diff body_force'
[./diff]
type = Diffusion
variable = u
# Note we are using both names and numbers here
block = 'left_block 2 right_block'
[../]
[./body_force]
type = BodyForce
variable = u
block = 'center_block'
value = 10
[../]
[]
[AuxKernels]
[./hardness]
type = MaterialRealAux
variable = reporter
property = 'hardness'
block = 'left_block 3'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left_side'
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 'right_side'
value = 1
[../]
[]
[Postprocessors]
[./elem_average]
type = ElementAverageValue
variable = u
block = 'center_block'
execute_on = 'initial timestep_end'
[../]
[./side_average]
type = SideAverageValue
variable = u
boundary = 'right_side'
execute_on = 'initial timestep_end'
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'hardness'
prop_values = 10
block = '1 right_block'
[../]
[./empty]
type = MTMaterial
block = 'center_block'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/uel/small_test_uel_states_fields_gradient.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
xmax = 10
ymax = 3
elem_type = TRI3
[]
[pin]
type = ExtraNodesetGenerator
nodes = 106
new_boundary = pin
input = gen
[]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[temperature]
initial_condition = 400
[]
[voltage]
initial_condition = 210
[]
[]
[AuxKernels]
[temperature]
type = FunctionAux
function = '25* x + 40 * y + 400'
variable = temperature
[]
[voltage]
type = FunctionAux
function = '10 * x + 4 * y + 210'
variable = voltage
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = pin
value = 0
[]
inactive = 'right_dirichlet'
[right_neumann]
type = FunctionNeumannBC
variable = disp_x
function = t/10
boundary = right
[]
[right_dirichlet]
type = FunctionDirichletBC
variable = disp_x
function = t/10
boundary = right
[]
[]
[UserObjects]
[uel]
type = AbaqusUserElement
variables = 'disp_x disp_y'
plugin = ../../../examples/uel_tri_states_tests/uel
use_displaced_mesh = false
num_state_vars = 8
constant_properties = '100 0.3' # E nu
external_fields = 'temperature voltage'
extra_vector_tags = 'kernel_residual'
[]
[]
[Problem]
kernel_coverage_check = false
extra_tag_vectors = 'kernel_residual'
[]
[AuxVariables]
[res_x]
[]
[res_y]
[]
[]
[AuxKernels]
[res_x]
type = TagVectorAux
variable = res_x
v = disp_x
vector_tag = kernel_residual
[]
[res_y]
type = TagVectorAux
variable = res_y
v = disp_y
vector_tag = kernel_residual
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
dt = 1
num_steps = 15
[]
[Postprocessors]
[delta_l]
type = SideAverageValue
variable = disp_x
boundary = right
execute_on = 'INITIAL TIMESTEP_END'
[]
[V]
type = ElementIntegralMaterialProperty
mat_prop = 1
use_displaced_mesh = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/solid_mechanics/test/tests/uel/small_test_expanded_umat.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
xmax = 10
ymax = 3
elem_type = TRI3
[]
[pin]
type = ExtraNodesetGenerator
nodes = 106
new_boundary = pin
input = gen
[]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = pin
value = 0
[]
inactive = 'right_dirichlet'
[right_neumann]
type = FunctionNeumannBC
variable = disp_x
function = t
boundary = right
[]
[right_dirichlet]
type = FunctionDirichletBC
variable = disp_x
function = t/10
boundary = right
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = SMALL
incremental = true
extra_vector_tags = 'kernel_residual'
[]
[]
[Materials]
[umat]
type = AbaqusUMATStress
constant_properties = '100 0.3'
plugin = '../../plugins/small_elastic_tri'
num_state_vars = 8
use_one_based_indexing = false
[]
[]
[Problem]
kernel_coverage_check = false
extra_tag_vectors = 'kernel_residual'
[]
[AuxVariables]
[res_x]
[]
[res_y]
[]
[]
[AuxKernels]
[res_x]
type = TagVectorAux
variable = res_x
v = disp_x
vector_tag = kernel_residual
[]
[res_y]
type = TagVectorAux
variable = res_y
v = disp_y
vector_tag = kernel_residual
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
dt = 1
num_steps = 15
[]
[Postprocessors]
[delta_l]
type = SideAverageValue
variable = disp_x
boundary = right
execute_on = 'INITIAL TIMESTEP_END'
[]
[V]
type = ElementIntegralMaterialProperty
mat_prop = 1
use_displaced_mesh = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/solid_mechanics/test/tests/radial_disp_aux/cylinder_2d_axisymmetric.i)
# The purpose of this set of tests is to check the values computed
# by the RadialDisplacementAux AuxKernel. They should match the
# radial component of the displacment for a cylindrical or spherical
# model.
# This particular model is of a cylinder subjected to uniform thermal
# expansion represented using a 2D axisymmetric model.
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD8
nx = 4
ny = 4
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
coord_type = RZ
[]
[AuxVariables]
[./temp]
[../]
[./rad_disp]
[../]
[]
[Functions]
[./temperature_load]
type = ParsedFunction
expression = t+300.0
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
eigenstrain_names = eigenstrain
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = temperature_load
use_displaced_mesh = false
[../]
[./raddispaux]
type = RadialDisplacementCylinderAux
variable = rad_disp
[../]
[]
[BCs]
[./x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./y]
type = DirichletBC
variable = disp_y
boundary = 'bottom top'
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 300
thermal_expansion_coeff = 1.3e-5
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '51'
line_search = 'none'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
start_time = 0.0
end_time = 1
dt = 1
dtmin = 1
[]
[Outputs]
csv = true
exodus = true
[]
#[Postprocessors]
# [./strain_xx]
# type = SideAverageValue
# variable =
# block = 0
# [../]
#[]
(test/tests/multiapps/secant_postprocessor/steady_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[sink]
type = BodyForce
variable = u
value = -1
[]
[]
[BCs]
[right]
type = PostprocessorDirichletBC
variable = u
boundary = right
postprocessor = 'from_main'
[]
[]
[Postprocessors]
[from_main]
type = Receiver
default = 0
[]
[to_main]
type = SideAverageValue
variable = u
boundary = left
[]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
fixed_point_algorithm = 'secant'
[]
[Outputs]
csv = true
exodus = false
[]
(modules/solid_mechanics/test/tests/torque/ad_torque_small.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
origin = '0 0 2'
direction = '0 0 1'
polar_moment_of_inertia = pmi
factor = t
[]
[Mesh]
[ring]
type = AnnularMeshGenerator
nr = 1
nt = 30
rmin = 0.95
rmax = 1
[]
[extrude]
type = MeshExtruderGenerator
input = ring
extrusion_vector = '0 0 2'
bottom_sideset = 'bottom'
top_sideset = 'top'
num_layers = 5
[]
[]
[AuxVariables]
[alpha_var]
[]
[shear_stress_var]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[alpha]
type = RotationAngle
variable = alpha_var
[]
[shear_stress]
type = ParsedAux
variable = shear_stress_var
coupled_variables = 'stress_yz stress_xz'
expression = 'sqrt(stress_yz^2 + stress_xz^2)'
[]
[]
[BCs]
# fix bottom
[fix_x]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0
[]
[fix_y]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0
[]
[fix_z]
type = DirichletBC
boundary = bottom
variable = disp_z
value = 0
[]
# twist top
[twist_x]
type = ADTorque
boundary = top
variable = disp_x
[]
[twist_y]
type = ADTorque
boundary = top
variable = disp_y
[]
[twist_z]
type = ADTorque
boundary = top
variable = disp_z
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = SMALL
use_automatic_differentiation = true
generate_output = 'vonmises_stress stress_yz stress_xz'
[]
[]
[Postprocessors]
[pmi]
type = PolarMomentOfInertia
boundary = top
# execute_on = 'INITIAL NONLINEAR'
execute_on = 'INITIAL'
[]
[alpha]
type = SideAverageValue
variable = alpha_var
boundary = top
[]
[shear_stress]
type = ElementAverageValue
variable = shear_stress_var
[]
[]
[Materials]
[stress]
type = ADComputeLinearElasticStress
[]
[elastic]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 0.3
shear_modulus = 100
[]
[]
[Executioner]
# type = Steady
type = Transient
num_steps = 1
solve_type = NEWTON
petsc_options_iname = '-pctype'
petsc_options_value = 'lu'
nl_max_its = 150
[]
[Outputs]
exodus = true
print_linear_residuals = false
perf_graph = true
[]
(modules/combined/test/tests/cavity_pressure/rz_abs_ref.i)
#
# Cavity Pressure Test
#
# This test is designed to compute an internal pressure based on
# p = n * R * T / V
# where
# p is the pressure
# n is the amount of material in the volume (moles)
# R is the universal gas constant
# T is the temperature
# V is the volume
#
# The mesh is composed of one block (2) with an interior cavity of volume 8.
# Block 1 sits in the cavity and has a volume of 1. Thus, the total
# initial volume is 7.
# The test adjusts T in the following way:
# T => T0 + beta * t
# with
# beta = T0
# T0 = 240.54443866068704
# V0 = 7
# n0 = f(p0)
# p0 = 100
# R = 8.314472 J * K^(-1) * mol^(-1)
#
# So, n0 = p0 * V0 / R / T0 = 100 * 7 / 8.314472 / 240.544439
# = 0.35
#
# At t = 1, p = 200.
[Problem]
coord_type = RZ
type = ReferenceResidualProblem
reference_vector = ref
extra_tag_vectors = ref
[]
[GlobalParams]
displacements = 'disp_r disp_z'
absolute_value_vector_tags = ref
[]
[Mesh]
file = rz.e
[]
[Functions]
[temperature]
type = PiecewiseLinear
x = '0 1'
y = '1 2'
scale_factor = 240.54443866068704
[]
[]
[Variables]
[disp_r]
[]
[disp_z]
[]
[temp]
initial_condition = 240.54443866068704
[]
[]
[Kernels]
[TensorMechanics]
use_displaced_mesh = true
[]
[heat]
type = Diffusion
variable = temp
use_displaced_mesh = true
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_r
boundary = '1 2'
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_z
boundary = '1 2'
value = 0.0
[]
[temperatureInterior]
type = FunctionDirichletBC
boundary = 2
function = temperature
variable = temp
[]
[CavityPressure]
[1]
boundary = 2
initial_pressure = 100
R = 8.314472
temperature = aveTempInterior
volume = internalVolume
startup_time = 0.5
output = ppress
[]
[]
[]
[Materials]
[elastic_tensor1]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.3
block = 1
[]
[strain1]
type = ComputeAxisymmetricRZFiniteStrain
block = 1
[]
[stress1]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elastic_tensor2]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.3
block = 2
[]
[strain2]
type = ComputeAxisymmetricRZFiniteStrain
block = 2
[]
[stress2]
type = ComputeFiniteStrainElasticStress
block = 2
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
nl_abs_tol = 1e-10
l_max_its = 20
dt = 0.5
end_time = 1.0
[]
[Postprocessors]
[internalVolume]
type = InternalVolume
boundary = 2
execute_on = 'initial linear'
[]
[aveTempInterior]
type = SideAverageValue
boundary = 2
variable = temp
execute_on = 'initial linear'
[]
[]
[Outputs]
exodus = true
[checkpoint]
type = Checkpoint
num_files = 1
[]
[]
(modules/solid_mechanics/test/tests/radial_disp_aux/cylinder_2d_cartesian.i)
# The purpose of this set of tests is to check the values computed
# by the RadialDisplacementAux AuxKernel. They should match the
# radial component of the displacment for a cylindrical or spherical
# model.
# This particular model is of a cylinder subjected to uniform thermal
# expansion represented using a 2D Cartesian model.
[Mesh]
type = FileMesh
file = circle_sector_2d.e
[]
[GlobalParams]
displacements = 'disp_x disp_y'
order = SECOND
family = LAGRANGE
[]
[AuxVariables]
[./temp]
[../]
[./rad_disp]
[../]
[]
[Functions]
[./temperature_load]
type = ParsedFunction
expression = t+300.0
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
eigenstrain_names = eigenstrain
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = temperature_load
use_displaced_mesh = false
[../]
[./raddispaux]
type = RadialDisplacementCylinderAux
variable = rad_disp
origin = '0 0 0'
[../]
[]
[BCs]
[./x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./y]
type = DirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 300
thermal_expansion_coeff = 1.3e-5
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '51'
line_search = 'none'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
start_time = 0.0
end_time = 1
dt = 1
dtmin = 1
[]
[Outputs]
csv = true
exodus = true
[]
#[Postprocessors]
# [./strain_xx]
# type = SideAverageValue
# variable =
# block = 0
# [../]
#[]
(modules/thermal_hydraulics/test/tests/components/simple_turbine_1phase/phy.conservation.i)
[GlobalParams]
initial_p = 1e6
initial_T = 517
initial_vel = 4.3
initial_vel_x = 4.3
initial_vel_y = 0
initial_vel_z = 0
fp = fp
closures = simple_closures
f = 0
rdg_slope_reconstruction = minmod
gravity_vector = '0 0 0'
scaling_factor_1phase = '1 1 1e-5'
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
gamma = 1.4
molar_mass = 0.01
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe1:in'
m_dot = 10
T = 517
[]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 10
A = 1
[]
[turbine]
type = SimpleTurbine1Phase
connections = 'pipe1:out pipe2:in'
position = '1 0 0'
volume = 1
A_ref = 1.0
K = 0
on = true
power = 1000
[]
[pipe2]
type = FlowChannel1Phase
position = '1. 0 0'
orientation = '1 0 0'
length = 1
n_elems = 10
A = 1
[]
[outlet]
type = Outlet1Phase
input = 'pipe2:out'
p = 1e6
[]
[]
[Postprocessors]
[mass_in]
type = ADFlowBoundaryFlux1Phase
equation = mass
boundary = inlet
[]
[mass_out]
type = ADFlowBoundaryFlux1Phase
equation = mass
boundary = outlet
[]
[mass_diff]
type = LinearCombinationPostprocessor
pp_coefs = '1 -1'
pp_names = 'mass_in mass_out'
[]
[p_in]
type = SideAverageValue
boundary = pipe1:in
variable = p
[]
[vel_in]
type = SideAverageValue
boundary = pipe1:in
variable = vel_x
[]
[momentum_in]
type = ADFlowBoundaryFlux1Phase
equation = momentum
boundary = inlet
[]
[momentum_out]
type = ADFlowBoundaryFlux1Phase
equation = momentum
boundary = outlet
[]
[dP]
type = ParsedPostprocessor
pp_names = 'p_in W_dot'
function = 'p_in * (1 - (1-W_dot/(10*2910.06*517))^(1.4/0.4))'
[]
[momentum_diff]
type = LinearCombinationPostprocessor
pp_coefs = '1 -1 -1'
pp_names = 'momentum_in momentum_out dP' # momentum source = -dP * A and A=1
[]
[energy_in]
type = ADFlowBoundaryFlux1Phase
equation = energy
boundary = inlet
[]
[energy_out]
type = ADFlowBoundaryFlux1Phase
equation = energy
boundary = outlet
[]
[W_dot]
type = ScalarVariable
variable = turbine:W_dot
[]
[energy_diff]
type = LinearCombinationPostprocessor
pp_coefs = '1 -1 -1'
pp_names = 'energy_in energy_out W_dot'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
start_time = 0
end_time = 10
dt = 0.5
abort_on_solve_fail = true
solve_type = 'newton'
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
nl_rel_tol = 1e-7
nl_abs_tol = 2e-6
nl_max_its = 10
l_tol = 1e-3
# automatic_scaling = true
# compute_scaling_once = false
# off_diagonals_in_auto_scaling = true
[]
[Outputs]
[csv]
type = CSV
show = 'mass_diff energy_diff momentum_diff'
execute_on = 'final'
[]
[]
(modules/heat_transfer/test/tests/convective_heat_flux/equilibrium.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
[]
[Variables]
[./temp]
initial_condition = 200.0
[../]
[]
[Kernels]
[./heat_dt]
type = TimeDerivative
variable = temp
[../]
[./heat_conduction]
type = Diffusion
variable = temp
[../]
[]
[BCs]
[./right]
type = ConvectiveHeatFluxBC
variable = temp
boundary = 'right'
T_infinity = 100.0
heat_transfer_coefficient = 1
heat_transfer_coefficient_dT = 0
[../]
[]
[Postprocessors]
[./left_temp]
type = SideAverageValue
variable = temp
boundary = left
execute_on = 'TIMESTEP_END initial'
[../]
[./right_temp]
type = SideAverageValue
variable = temp
boundary = right
[../]
[./right_flux]
type = SideDiffusiveFluxAverage
variable = temp
boundary = right
diffusivity = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1e1
nl_abs_tol = 1e-12
[]
[Outputs]
[./out]
type = CSV
time_step_interval = 10
[../]
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/heated/2d-rc-heated-boussinesq.i)
mu = 1
rho = 1
k = 1e-3
cp = 1
v_inlet = 1
T_inlet = 200
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = 0
ymax = 10
nx = 20
ny = 100
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = superficial_vel_x
v = superficial_vel_y
pressure = pressure
porosity = porosity
[]
[]
[Variables]
[superficial_vel_x]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1e-6
[]
[superficial_vel_y]
type = PINSFVSuperficialVelocityVariable
initial_condition = ${v_inlet}
[]
[pressure]
type = INSFVPressureVariable
[]
[T_fluid]
type = INSFVEnergyVariable
[]
[]
[AuxVariables]
[T_solid]
family = 'MONOMIAL'
order = 'CONSTANT'
fv = true
initial_condition = 100
[]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 0.4
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_x
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_x
mu = ${mu}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_x
momentum_component = 'x'
pressure = pressure
porosity = porosity
[]
[u_gravity]
type = PINSFVMomentumGravity
variable = superficial_vel_x
rho = ${rho}
gravity = '0 -9.81 0'
momentum_component = 'x'
porosity = porosity
[]
[u_boussinesq]
type = PINSFVMomentumBoussinesq
variable = superficial_vel_x
T_fluid = 'T_fluid'
rho = ${rho}
ref_temperature = 150
gravity = '0 -9.81 0'
momentum_component = 'x'
alpha_name = 'alpha_b'
porosity = porosity
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_y
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'y'
[]
[v_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_y
mu = ${mu}
porosity = porosity
momentum_component = 'y'
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_y
momentum_component = 'y'
pressure = pressure
porosity = porosity
[]
[v_gravity]
type = PINSFVMomentumGravity
variable = superficial_vel_y
rho = ${rho}
gravity = '-0 -9.81 0'
momentum_component = 'y'
porosity = porosity
[]
[v_boussinesq]
type = PINSFVMomentumBoussinesq
variable = superficial_vel_y
T_fluid = 'T_fluid'
rho = ${rho}
ref_temperature = 150
gravity = '0 -9.81 0'
momentum_component = 'y'
alpha_name = 'alpha_b'
porosity = porosity
[]
[energy_advection]
type = PINSFVEnergyAdvection
variable = T_fluid
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
[]
[energy_diffusion]
type = PINSFVEnergyDiffusion
k = ${k}
variable = T_fluid
porosity = porosity
[]
[energy_convection]
type = PINSFVEnergyAmbientConvection
variable = T_fluid
is_solid = false
T_fluid = T_fluid
T_solid = T_solid
h_solid_fluid = 'h_cv'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'bottom'
variable = superficial_vel_x
function = 0
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'bottom'
variable = superficial_vel_y
function = ${v_inlet}
[]
[inlet-T]
type = FVNeumannBC
variable = T_fluid
value = '${fparse v_inlet * rho * cp * T_inlet}'
boundary = 'bottom'
[]
[no-slip-u]
type = INSFVNoSlipWallBC
boundary = 'right'
variable = superficial_vel_x
function = 0
[]
[no-slip-v]
type = INSFVNoSlipWallBC
boundary = 'right'
variable = superficial_vel_y
function = 0
[]
[symmetry-u]
type = PINSFVSymmetryVelocityBC
boundary = 'left'
variable = superficial_vel_x
u = superficial_vel_x
v = superficial_vel_y
mu = ${mu}
momentum_component = 'x'
[]
[symmetry-v]
type = PINSFVSymmetryVelocityBC
boundary = 'left'
variable = superficial_vel_y
u = superficial_vel_x
v = superficial_vel_y
mu = ${mu}
momentum_component = 'y'
[]
[symmetry-p]
type = INSFVSymmetryPressureBC
boundary = 'left'
variable = pressure
[]
[outlet-p]
type = INSFVOutletPressureBC
boundary = 'top'
variable = pressure
function = 0
[]
[]
[FunctorMaterials]
[constants]
type = ADGenericFunctorMaterial
prop_names = 'h_cv alpha_b'
prop_values = '1e-3 8e-4'
[]
[functor_constants]
type = ADGenericFunctorMaterial
prop_names = 'cp'
prop_values = '${cp}'
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
rho = ${rho}
temperature = 'T_fluid'
[]
[]
[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
[]
# Some basic Postprocessors to examine the solution
[Postprocessors]
[inlet-p]
type = SideAverageValue
variable = pressure
boundary = 'top'
[]
[outlet-v]
type = SideAverageValue
variable = superficial_vel_y
boundary = 'top'
[]
[outlet-temp]
type = SideAverageValue
variable = T_fluid
boundary = 'top'
[]
[]
[Outputs]
exodus = true
csv = false
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/heated/2d-transient-action.i)
# Fluid properties
mu = 1
rho = 1
cp = 1
k = 1e-3
# Solid properties
cp_s = 2
rho_s = 4
k_s = 1e-2
h_fs = 10
# Operating conditions
u_inlet = 1
T_inlet = 200
p_outlet = 10
top_side_temperature = 150
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 1
nx = 100
ny = 20
[]
[]
[Variables]
[T_solid]
type = MooseVariableFVReal
initial_condition = 100
[]
[]
[AuxVariables]
[porosity]
type = MooseVariableFVReal
initial_condition = 0.5
[]
[]
[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'
initial_velocity = '${u_inlet} 1e-6 0'
initial_pressure = ${p_outlet}
initial_temperature = 0.0
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_function = '${u_inlet} 0'
energy_inlet_types = 'heatflux'
energy_inlet_function = '${fparse u_inlet * rho * cp * 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}'
ambient_convection_alpha = 'h_cv'
ambient_temperature = 'T_solid'
mass_advection_interpolation = 'average'
momentum_advection_interpolation = 'average'
energy_advection_interpolation = 'average'
[]
[]
[FVKernels]
[solid_energy_time]
type = PINSFVEnergyTimeDerivative
variable = T_solid
cp = ${cp_s}
rho = ${rho_s}
is_solid = true
porosity = porosity
[]
[solid_energy_diffusion]
type = FVDiffusion
variable = T_solid
coeff = ${k_s}
[]
[solid_energy_convection]
type = PINSFVEnergyAmbientConvection
variable = T_solid
is_solid = true
T_fluid = T_fluid
T_solid = T_solid
h_solid_fluid = 'h_cv'
[]
[]
[FVBCs]
[heated-side]
type = FVDirichletBC
boundary = 'top'
variable = 'T_solid'
value = ${top_side_temperature}
[]
[]
[FunctorMaterials]
[constants]
type = ADGenericFunctorMaterial
prop_names = 'h_cv cp rho mu k'
prop_values = '${h_fs} ${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
end_time = 1.5
[]
# Some basic Postprocessors to examine the solution
[Postprocessors]
[inlet-p]
type = SideAverageValue
variable = pressure
boundary = 'left'
[]
[outlet-u]
type = SideAverageValue
variable = superficial_vel_x
boundary = 'right'
[]
[outlet-temp]
type = SideAverageValue
variable = T_fluid
boundary = 'right'
[]
[solid-temp]
type = ElementAverageValue
variable = T_solid
[]
[]
[Outputs]
exodus = true
csv = false
[]
(modules/solid_mechanics/test/tests/uel/small_test_uel_states_fields.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
# nx = 10
# ny = 3
xmax = 10
ymax = 3
elem_type = TRI3
[]
[pin]
type = ExtraNodesetGenerator
nodes = 106
new_boundary = pin
input = gen
[]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[temperature]
initial_condition = 1500
[]
[voltage]
initial_condition = 210
[]
[]
[AuxKernels]
[temperature]
type = FunctionAux
function = temperature_function
variable = temperature
[]
[voltage]
type = FunctionAux
function = voltage_function
variable = voltage
[]
[]
[Functions]
[voltage_function]
type = PiecewiseLinear
x = '0 15'
y = '210 450'
[]
[temperature_function]
type = PiecewiseLinear
x = '0 15'
y = '1500 800'
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = pin
value = 0
[]
inactive = 'right_dirichlet'
# inactive = 'right_neumann'
[right_neumann]
type = FunctionNeumannBC
variable = disp_x
function = t
boundary = right
[]
[right_dirichlet]
type = FunctionDirichletBC
variable = disp_x
function = t/10
boundary = right
[]
[]
[UserObjects]
[uel]
type = AbaqusUserElement
variables = 'disp_x disp_y'
plugin = ../../../examples/uel_tri_states_tests/uel
use_displaced_mesh = false
num_state_vars = 8
constant_properties = '100 0.3' # E nu
external_fields = 'temperature voltage'
extra_vector_tags = 'kernel_residual'
[]
[]
[Problem]
kernel_coverage_check = false
extra_tag_vectors = 'kernel_residual'
[]
[AuxVariables]
[res_x]
[]
[res_y]
[]
[]
[AuxKernels]
[res_x]
type = TagVectorAux
variable = res_x
v = disp_x
vector_tag = kernel_residual
[]
[res_y]
type = TagVectorAux
variable = res_y
v = disp_y
vector_tag = kernel_residual
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
dt = 1
num_steps = 15
[]
[Postprocessors]
[delta_l]
type = SideAverageValue
variable = disp_x
boundary = right
execute_on = 'INITIAL TIMESTEP_END'
[]
[V]
type = ElementIntegralMaterialProperty
mat_prop = 1
use_displaced_mesh = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/thermal_hydraulics/tutorials/single_phase_flow/04_loop.i)
T_in = 300. # K
m_dot_in = 1e-2 # kg/s
press = 10e5 # Pa
# core parameters
core_length = 1. # m
core_n_elems = 25
core_dia = '${units 2. cm -> m}'
core_pitch = '${units 8.7 cm -> m}'
# pipe parameters
pipe_dia = '${units 10. cm -> m}'
A_pipe = '${fparse 0.25 * pi * pipe_dia^2}'
A_core = '${fparse core_pitch^2 - 0.25 *pi * core_dia^2}'
P_wet_core = '${fparse 4*core_pitch + pi * core_dia}'
Dh_core = '${fparse 4 * A_core / P_wet_core}'
tot_power = 2000 # W
[GlobalParams]
initial_p = ${press}
initial_vel = 0.0001
initial_T = ${T_in}
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
gravity_vector = '0 0 0'
rdg_slope_reconstruction = minmod
scaling_factor_1phase = '1 1e-2 1e-4'
scaling_factor_rhoV = 1
scaling_factor_rhouV = 1e-2
scaling_factor_rhovV = 1e-2
scaling_factor_rhowV = 1e-2
scaling_factor_rhoEV = 1e-4
closures = simple_closures
fp = he
[]
[FluidProperties]
[he]
type = IdealGasFluidProperties
molar_mass = 4e-3
gamma = 1.67
k = 0.2556
mu = 3.22639e-5
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseTHM
[]
[]
[SolidProperties]
[steel]
type = ThermalFunctionSolidProperties
rho = 8050
k = 45
cp = 466
[]
[]
[Components]
[total_power]
type = TotalPower
power = ${tot_power}
[]
[up_pipe_1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
length = 0.5
n_elems = 15
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct1]
type = JunctionParallelChannels1Phase
position = '0 0 0.5'
connections = 'up_pipe_1:out core_chan:in'
volume = 1e-5
[]
[core_chan]
type = FlowChannel1Phase
position = '0 0 0.5'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
roughness = .0001
A = '${A_core}'
D_h = ${Dh_core}
[]
[core_hs]
type = HeatStructureCylindrical
position = '0 0 0.5'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
names = 'block'
widths = '${fparse core_dia / 2.}'
solid_properties = 'steel'
solid_properties_T_ref = '300'
n_part_elems = 3
[]
[core_heating]
type = HeatSourceFromTotalPower
hs = core_hs
regions = block
power = total_power
[]
[core_ht]
type = HeatTransferFromHeatStructure1Phase
flow_channel = core_chan
hs = core_hs
hs_side = outer
P_hf = '${fparse pi * core_dia}'
[]
[jct2]
type = JunctionParallelChannels1Phase
position = '0 0 1.5'
connections = 'core_chan:out up_pipe_2:in'
volume = 1e-5
[]
[up_pipe_2]
type = FlowChannel1Phase
position = '0 0 1.5'
orientation = '0 0 1'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct3]
type = JunctionOneToOne1Phase
connections = 'up_pipe_2:out top_pipe_1:in'
[]
[top_pipe_1]
type = FlowChannel1Phase
position = '0 0 2'
orientation = '1 0 0'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[top_pipe_2]
type = FlowChannel1Phase
position = '0.5 0 2'
orientation = '1 0 0'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct4]
type = VolumeJunction1Phase
position = '0.5 0 2'
volume = 1e-5
connections = 'top_pipe_1:out top_pipe_2:in press_pipe:in'
[]
[press_pipe]
type = FlowChannel1Phase
position = '0.5 0 2'
orientation = '0 0 1'
length = 0.2
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[pressurizer]
type = InletStagnationPressureTemperature1Phase
p0 = ${press}
T0 = ${T_in}
input = press_pipe:out
[]
[jct5]
type = JunctionOneToOne1Phase
connections = 'top_pipe_2:out down_pipe_1:in'
[]
[down_pipe_1]
type = FlowChannel1Phase
position = '1 0 2'
orientation = '0 0 -1'
length = 0.25
A = ${A_pipe}
n_elems = 5
[]
[jct6]
type = JunctionOneToOne1Phase
connections = 'down_pipe_1:out cooling_pipe:in'
[]
[cooling_pipe]
type = FlowChannel1Phase
position = '1 0 1.75'
orientation = '0 0 -1'
length = 1.5
n_elems = 25
A = ${A_pipe}
[]
[cold_wall]
type = HeatTransferFromSpecifiedTemperature1Phase
flow_channel = cooling_pipe
T_wall = 300
P_hf = '${fparse pi * pipe_dia}'
[]
[jct7]
type = JunctionOneToOne1Phase
connections = 'cooling_pipe:out down_pipe_2:in'
[]
[down_pipe_2]
type = FlowChannel1Phase
position = '1 0 0.25'
orientation = '0 0 -1'
length = 0.25
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct8]
type = JunctionOneToOne1Phase
connections = 'down_pipe_2:out bottom_1:in'
[]
[bottom_1]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '-1 0 0'
length = 0.5
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[pump]
type = Pump1Phase
position = '0.5 0 0'
connections = 'bottom_1:out bottom_2:in'
volume = 1e-4
A_ref = ${A_pipe}
head = 0
[]
[bottom_2]
type = FlowChannel1Phase
position = '0.5 0 0'
orientation = '-1 0 0'
length = 0.5
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct10]
type = JunctionOneToOne1Phase
connections = 'bottom_2:out up_pipe_1:in'
[]
[]
[ControlLogic]
[set_point]
type = GetFunctionValueControl
function = ${m_dot_in}
[]
[pid]
type = PIDControl
initial_value = 0
set_point = set_point:value
input = m_dot_pump
K_p = 1.
K_i = 4.
K_d = 0
[]
[set_pump_head]
type = SetComponentRealValueControl
component = pump
parameter = head
value = pid:output
[]
[]
[Postprocessors]
[power_to_coolant]
type = ADHeatRateConvection1Phase
block = core_chan
P_hf = '${fparse pi *core_dia}'
[]
[m_dot_pump]
type = ADFlowJunctionFlux1Phase
boundary = core_chan:in
connection_index = 1
equation = mass
junction = jct7
[]
[core_T_out]
type = SideAverageValue
boundary = core_chan:out
variable = T
[]
[core_p_in]
type = SideAverageValue
boundary = core_chan:in
variable = p
[]
[core_p_out]
type = SideAverageValue
boundary = core_chan:out
variable = p
[]
[core_delta_p]
type = ParsedPostprocessor
pp_names = 'core_p_in core_p_out'
function = 'core_p_in - core_p_out'
[]
[hx_pri_T_out]
type = SideAverageValue
boundary = cooling_pipe:out
variable = T
[]
[pump_head]
type = RealComponentParameterValuePostprocessor
component = pump
parameter = head
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
start_time = 0
[TimeStepper]
type = IterationAdaptiveDT
dt = 1
[]
dtmax = 5
end_time = 500
line_search = basic
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 25
[]
[Outputs]
exodus = true
[console]
type = Console
max_rows = 1
outlier_variable_norms = false
[]
print_linear_residuals = false
[]
(modules/navier_stokes/test/tests/finite_volume/materials/ergun/ergun.i)
# This file simulates flow of fluid in a porous elbow for the purpose of verifying
# correct implementation of the various different solution variable sets. This input
# tests correct implementation of the primitive superficial variable set. Flow enters on the top
# and exits on the right. Because the purpose is only to test the equivalence of
# different equation sets, no solid energy equation is included.
porosity_left = 0.4
porosity_right = 0.6
pebble_diameter = 0.06
mu = 1.81e-5 # This has been increased to avoid refining the mesh
M = 28.97e-3
R = 8.3144598
# inlet mass flowrate, kg/s
mdot = -10.0
# inlet mass flux (superficial)
mflux_in_superficial = ${fparse mdot / (pi * 0.5 * 0.5)}
# inlet mass flux (interstitial)
mflux_in_interstitial = ${fparse mflux_in_superficial / porosity_left}
p_initial = 201325.0
T_initial = 300.0
rho_initial = ${fparse p_initial / T_initial * M / R}
vel_y_initial = ${fparse mflux_in_interstitial / rho_initial}
vel_x_initial = 0.0
superficial_vel_y_initial = ${fparse mflux_in_superficial / rho_initial}
superficial_vel_x_initial = 1e-12
# Computation parameters
velocity_interp_method = 'rc'
advected_interp_method = 'upwind'
# ==============================================================================
# GEOMETRY AND MESH
# ==============================================================================
[Mesh]
[fmg]
type = FileMeshGenerator
file = 'ergun_in.e'
[]
coord_type = RZ
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = superficial_vel_x
v = superficial_vel_y
pressure = pressure
porosity = porosity
[]
[]
[GlobalParams]
porosity = porosity
pebble_diameter = ${pebble_diameter}
fp = fp
# rho for the kernels. Must match fluid property!
rho = ${rho_initial}
fv = true
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
# behavior at time of test creation
two_term_boundary_expansion = false
rhie_chow_user_object = 'rc'
[]
# ==============================================================================
# VARIABLES AND KERNELS
# ==============================================================================
[Variables]
[pressure]
type = INSFVPressureVariable
initial_condition = ${p_initial}
[]
[superficial_vel_x]
type = PINSFVSuperficialVelocityVariable
initial_condition = ${superficial_vel_x_initial}
[]
[superficial_vel_y]
type = PINSFVSuperficialVelocityVariable
initial_condition = ${superficial_vel_y_initial}
[]
[]
[FVKernels]
# Mass Equation.
[mass]
type = PINSFVMassAdvection
variable = 'pressure'
[]
# Momentum x component equation.
[vel_x_time]
type = PINSFVMomentumTimeDerivative
variable = 'superficial_vel_x'
momentum_component = 'x'
[]
[vel_x_advection]
type = PINSFVMomentumAdvection
variable = 'superficial_vel_x'
momentum_component = 'x'
[]
[vel_x_viscosity]
type = PINSFVMomentumDiffusion
variable = 'superficial_vel_x'
momentum_component = 'x'
mu = 'mu'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = 'superficial_vel_x'
pressure = pressure
momentum_component = 'x'
[]
[u_friction]
type = PINSFVMomentumFriction
variable = 'superficial_vel_x'
Darcy_name = 'Darcy_coefficient'
Forchheimer_name = 'Forchheimer_coefficient'
momentum_component = 'x'
speed = speed
mu = 'mu'
[]
# Momentum y component equation.
[vel_y_time]
type = PINSFVMomentumTimeDerivative
variable = 'superficial_vel_y'
momentum_component = 'y'
[]
[vel_y_advection]
type = PINSFVMomentumAdvection
variable = 'superficial_vel_y'
momentum_component = 'y'
[]
[vel_y_viscosity]
type = PINSFVMomentumDiffusion
variable = 'superficial_vel_y'
momentum_component = 'y'
mu = 'mu'
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = 'superficial_vel_y'
pressure = pressure
momentum_component = 'y'
[]
[v_friction]
type = PINSFVMomentumFriction
variable = 'superficial_vel_y'
Darcy_name = 'Darcy_coefficient'
Forchheimer_name = 'Forchheimer_coefficient'
momentum_component = 'y'
mu = 'mu'
speed = speed
[]
[gravity]
type = PINSFVMomentumGravity
variable = 'superficial_vel_y'
gravity = '0 -9.81 0'
momentum_component = 'y'
[]
[]
# ==============================================================================
# AUXVARIABLES AND AUXKERNELS
# ==============================================================================
[AuxVariables]
[T_fluid]
initial_condition = ${T_initial}
order = CONSTANT
family = MONOMIAL
[]
[vel_x]
initial_condition = ${fparse vel_x_initial}
order = CONSTANT
family = MONOMIAL
[]
[vel_y]
initial_condition = ${fparse vel_y_initial}
order = CONSTANT
family = MONOMIAL
[]
[porosity_out]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[vel_x]
type = FunctorAux
variable = vel_x
functor = vel_x_mat
[]
[vel_y]
type = FunctorAux
variable = vel_y
functor = vel_y_mat
[]
[porosity_out]
type = FunctorAux
variable = porosity_out
functor = porosity
[]
[]
# ==============================================================================
# FLUID PROPERTIES, MATERIALS AND USER OBJECTS
# ==============================================================================
[FluidProperties]
[fp]
type = IdealGasFluidProperties
k = 0.0
mu = ${mu}
gamma = 1.4
molar_mass = ${M}
[]
[]
[FunctorMaterials]
[enthalpy]
type = INSFVEnthalpyMaterial
temperature = 'T_fluid'
[]
[speed]
type = PINSFVSpeedFunctorMaterial
superficial_vel_x = 'superficial_vel_x'
superficial_vel_y = 'superficial_vel_y'
porosity = porosity
vel_x = vel_x_mat
vel_y = vel_y_mat
[]
[kappa]
type = FunctorKappaFluid
[]
[const_Fdrags_mat]
type = FunctorErgunDragCoefficients
porosity = porosity
[]
[fluidprops]
type = GeneralFunctorFluidProps
mu_rampdown = mu_func
porosity = porosity
characteristic_length = ${pebble_diameter}
T_fluid = 'T_fluid'
pressure = 'pressure'
speed = 'speed'
[]
[]
d = 0.05
[Functions]
[mu_func]
type = PiecewiseLinear
x = '1 3 5 10 15 20'
y = '1e5 1e4 1e3 1e2 1e1 1'
[]
[real_porosity_function]
type = ParsedFunction
expression = 'if (x < 0.6 - ${d}, ${porosity_left}, if (x > 0.6 + ${d}, ${porosity_right},
(x-(0.6-${d}))/(2*${d})*(${porosity_right}-${porosity_left}) + ${porosity_left}))'
[]
[porosity]
type = ParsedFunction
expression = 'if (x < 0.6 - ${d}, ${porosity_left}, if (x > 0.6 + ${d}, ${porosity_right},
(x-(0.6-${d}))/(2*${d})*(${porosity_right}-${porosity_left}) + ${porosity_left}))'
[]
[]
# ==============================================================================
# BOUNDARY CONDITIONS
# ==============================================================================
[FVBCs]
[outlet_p]
type = INSFVOutletPressureBC
variable = 'pressure'
function = ${p_initial}
boundary = 'right'
[]
## No or Free slip BC
[free-slip-wall-x]
type = INSFVNaturalFreeSlipBC
boundary = 'bottom wall_1 wall_2 left'
variable = superficial_vel_x
momentum_component = 'x'
[]
[free-slip-wall-y]
type = INSFVNaturalFreeSlipBC
boundary = 'bottom wall_1 wall_2 left'
variable = superficial_vel_y
momentum_component = 'y'
[]
## Symmetry
[symmetry-x]
type = PINSFVSymmetryVelocityBC
boundary = 'left'
variable = superficial_vel_x
u = superficial_vel_x
v = superficial_vel_y
mu = 'mu'
momentum_component = 'x'
[]
[symmetry-y]
type = PINSFVSymmetryVelocityBC
boundary = 'left'
variable = superficial_vel_y
u = superficial_vel_x
v = superficial_vel_y
mu = 'mu'
momentum_component = 'y'
[]
[symmetry-p]
type = INSFVSymmetryPressureBC
boundary = 'left'
variable = 'pressure'
[]
## inlet
[inlet_vel_x]
type = INSFVInletVelocityBC
variable = 'superficial_vel_x'
function = ${superficial_vel_x_initial}
boundary = 'top'
[]
[inlet_vel_y]
type = INSFVInletVelocityBC
variable = 'superficial_vel_y'
function = ${superficial_vel_y_initial}
boundary = 'top'
[]
[]
# ==============================================================================
# EXECUTION PARAMETERS
# ==============================================================================
[Executioner]
type = Transient
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'
# Problem time parameters
dtmin = 0.01
dtmax = 2000
end_time = 3000
# must be the same as the fluid
# Iterations parameters
l_max_its = 50
l_tol = 1e-8
nl_max_its = 25
# nl_rel_tol = 5e-7
nl_abs_tol = 2e-7
# Automatic scaling
automatic_scaling = true
verbose = true
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.025
cutback_factor = 0.5
growth_factor = 2.0
[]
# Steady state detection.
steady_state_detection = true
steady_state_tolerance = 1e-7
steady_state_start_time = 400
[]
# ==============================================================================
# POSTPROCESSORS DEBUG AND OUTPUTS
# ==============================================================================
[Postprocessors]
[mass_flow_in]
type = VolumetricFlowRate
boundary = 'top'
vel_x = 'superficial_vel_x'
vel_y = 'superficial_vel_y'
advected_quantity = ${rho_initial}
execute_on = 'INITIAL TIMESTEP_END'
[]
[mass_flow_out]
type = VolumetricFlowRate
boundary = 'right'
vel_x = 'superficial_vel_x'
vel_y = 'superficial_vel_y'
advected_quantity = ${rho_initial}
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_in]
type = SideAverageValue
variable = pressure
boundary = 'top'
[]
[dP]
type = LinearCombinationPostprocessor
pp_names = 'p_in'
pp_coefs = '1.0'
b = ${fparse -p_initial}
[]
[]
[Outputs]
exodus = true
print_linear_residuals = false
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/heated/2d-rc-heated-boussinesq-action.i)
mu = 1
rho = 1
k = 1e-3
cp = 1
v_inlet = 1
T_inlet = 200
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = 0
ymax = 10
nx = 20
ny = 100
[]
[]
[AuxVariables]
[T_solid]
type = MooseVariableFVReal
initial_condition = 100
[]
[porosity]
type = MooseVariableFVReal
initial_condition = 0.4
[]
[]
[Modules]
[NavierStokesFV]
compressibility = 'incompressible'
porous_medium_treatment = true
add_energy_equation = true
boussinesq_approximation = true
density = ${rho}
dynamic_viscosity = ${mu}
thermal_conductivity = ${k}
specific_heat = ${cp}
porosity = 'porosity'
thermal_expansion = 8e-4
gravity = '0 -9.81 0'
ref_temperature = 150
initial_velocity = '1e-6 ${v_inlet} 0'
initial_pressure = 0.0
initial_temperature = 0.0
inlet_boundaries = 'bottom'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_function = '0 ${v_inlet}'
energy_inlet_types = 'heatflux'
energy_inlet_function = '${fparse v_inlet * rho * cp * T_inlet}'
wall_boundaries = 'right left'
momentum_wall_types = 'noslip symmetry'
energy_wall_types = 'heatflux heatflux'
energy_wall_function = '0 0'
outlet_boundaries = 'top'
momentum_outlet_types = 'fixed-pressure'
pressure_function = '0'
ambient_convection_alpha = 1e-3
ambient_temperature = 'T_solid'
mass_advection_interpolation = 'average'
momentum_advection_interpolation = 'average'
energy_advection_interpolation = 'average'
[]
[]
[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
[]
# Some basic Postprocessors to examine the solution
[Postprocessors]
[inlet-p]
type = SideAverageValue
variable = pressure
boundary = 'top'
[]
[outlet-v]
type = SideAverageValue
variable = superficial_vel_y
boundary = 'top'
[]
[outlet-temp]
type = SideAverageValue
variable = T_fluid
boundary = 'top'
[]
[]
[Outputs]
exodus = true
csv = false
[]
(modules/heat_transfer/test/tests/directional_flux_bc/3d.i)
[Mesh]
[planet]
type = SphereMeshGenerator
radius = 1
nr = 2 # increase for a better visualization
[]
[moon]
type = SphereMeshGenerator
radius = 0.3
nr = 1 # increase for a better visualization
[]
[combine]
type = CombinerGenerator
inputs = 'planet moon'
positions = '0 0 0 -1.2 -1 -1'
[]
[]
[GlobalParams]
illumination_flux = '1 1 1'
[]
[Variables]
[u]
[]
[v]
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
[]
[dt_u]
type = TimeDerivative
variable = u
[]
[diff_v]
type = Diffusion
variable = v
[]
[dt_v]
type = TimeDerivative
variable = v
[]
[]
[BCs]
[flux_u]
type = DirectionalFluxBC
variable = u
boundary = 0
[]
[flux_v]
type = DirectionalFluxBC
variable = v
boundary = 0
self_shadow_uo = shadow
[]
[]
[Postprocessors]
[ave_v_all]
type = SideAverageValue
variable = v
boundary = 0
[]
[ave_v_exposed]
type = ExposedSideAverageValue
variable = v
boundary = 0
self_shadow_uo = shadow
[]
[]
[UserObjects]
[shadow]
type = SelfShadowSideUserObject
boundary = 0
execute_on = INITIAL
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 1
[]
[Outputs]
[out]
type = Exodus
execute_on = FINAL
[]
[]
(modules/navier_stokes/test/tests/finite_volume/cns/stagnation_inlet/supersonic_nozzle_hllc.i)
stagnation_pressure = 1
stagnation_temperature = 1
[GlobalParams]
fp = fp
[]
[Debug]
show_material_props = true
[]
[Mesh]
[file]
type = FileMeshGenerator
file = supersonic_nozzle.e
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Variables]
[rho]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 0.0034
[]
[rho_u]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 1e-4
outputs = none
[]
[rho_v]
family = MONOMIAL
order = CONSTANT
fv = true
outputs = none
[]
[rho_E]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 2.5
[]
[]
[FVKernels]
# Mass conservation
[mass_time]
type = FVTimeKernel
variable = rho
[]
[mass_advection]
type = CNSFVMassHLLC
variable = rho
[]
# Momentum x conservation
[momentum_x_time]
type = FVTimeKernel
variable = rho_u
[]
[momentum_x_advection]
type = CNSFVMomentumHLLC
variable = rho_u
momentum_component = x
[]
# Momentum y conservation
[momentum_y_time]
type = FVTimeKernel
variable = rho_v
[]
[momentum_y_advection]
type = CNSFVMomentumHLLC
variable = rho_v
momentum_component = y
[]
# Fluid energy conservation
[fluid_energy_time]
type = FVTimeKernel
variable = rho_E
[]
[fluid_energy_advection]
type = CNSFVFluidEnergyHLLC
variable = rho_E
[]
[]
[FVBCs]
## inflow stagnation boundaries
[mass_stagnation_inflow]
type = CNSFVHLLCMassStagnationInletBC
variable = rho
stagnation_pressure = ${stagnation_pressure}
stagnation_temperature = ${stagnation_temperature}
boundary = left
[]
[momentum_x_stagnation_inflow]
type = CNSFVHLLCMomentumStagnationInletBC
variable = rho_u
momentum_component = x
stagnation_pressure = ${stagnation_pressure}
stagnation_temperature = ${stagnation_temperature}
boundary = left
[]
[momentum_y_stagnation_inflow]
type = CNSFVHLLCMomentumStagnationInletBC
variable = rho_v
momentum_component = y
stagnation_pressure = ${stagnation_pressure}
stagnation_temperature = ${stagnation_temperature}
boundary = left
[../]
[fluid_energy_stagnation_inflow]
type = CNSFVHLLCFluidEnergyStagnationInletBC
variable = rho_E
stagnation_pressure = ${stagnation_pressure}
stagnation_temperature = ${stagnation_temperature}
boundary = left
[]
## outflow implicit conditions
[mass_outflow]
type = CNSFVHLLCMassImplicitBC
variable = rho
boundary = right
[]
[momentum_x_outflow]
type = CNSFVHLLCMomentumImplicitBC
variable = rho_u
momentum_component = x
boundary = right
[]
[momentum_y_outflow]
type = CNSFVHLLCMomentumImplicitBC
variable = rho_v
momentum_component = y
boundary = right
[]
[fluid_energy_outflow]
type = CNSFVHLLCFluidEnergyImplicitBC
variable = rho_E
boundary = right
[]
# wall conditions
[momentum_x_pressure_wall]
type = CNSFVMomImplicitPressureBC
variable = rho_u
momentum_component = x
boundary = wall
[]
[momentum_y_pressure_wall]
type = CNSFVMomImplicitPressureBC
variable = rho_v
momentum_component = y
boundary = wall
[]
[]
[AuxVariables]
[Ma]
family = MONOMIAL
order = CONSTANT
[]
[Ma_layered]
family = MONOMIAL
order = CONSTANT
[]
[]
[UserObjects]
[layered_Ma_UO]
type = LayeredAverage
variable = Ma
num_layers = 100
direction = x
[]
[]
[AuxKernels]
[Ma_aux]
type = NSMachAux
variable = Ma
fluid_properties = fp
use_material_properties = true
[]
[Ma_layered_aux]
type = SpatialUserObjectAux
variable = Ma_layered
user_object = layered_Ma_UO
[]
[]
[Materials]
[var_mat]
type = ConservedVarValuesMaterial
rho = rho
rhou = rho_u
rhov = rho_v
rho_et = rho_E
[]
[fluid_props]
type = GeneralFluidProps
porosity = 1
characteristic_length = 1
[]
[sound_speed]
type = SoundspeedMat
fp = fp
[]
[]
[Postprocessors]
[cfl_dt]
type = ADCFLTimeStepSize
c_names = 'sound_speed'
vel_names = 'speed'
CFL = 0.5
[]
[outflow_Ma]
type = SideAverageValue
variable = Ma
boundary = right
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[]
[Executioner]
type = Transient
end_time = 0.1
[TimeIntegrator]
type = ExplicitSSPRungeKutta
order = 2
[]
l_tol = 1e-8
[TimeStepper]
type = PostprocessorDT
postprocessor = cfl_dt
[]
[]
[VectorPostprocessors]
[Ma_layered]
type = LineValueSampler
variable = Ma_layered
start_point = '0 0 0'
end_point = '10 0 0'
num_points = 100
sort_by = x
[]
[]
[Outputs]
exodus = true
[]
(modules/scalar_transport/test/tests/multiple-species/single-specie.i)
Krtt=0.
Kdt2=1
Pt2_left=1
Pt2_right=0
d_t=1
l=1
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmax = ${l}
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = ref
[]
[Variables]
[t][]
[]
[Kernels]
[time_t]
type = TimeDerivative
variable = t
extra_vector_tags = ref
[]
[diff_t]
type = MatDiffusion
variable = t
diffusivity = ${d_t}
extra_vector_tags = ref
[]
[]
[BCs]
[tt_recombination]
type = BinaryRecombinationBC
variable = t
v = t
Kr = Krtt
boundary = 'left right'
[]
[t_from_t2_left]
type = DissociationFluxBC
variable = t
v = ${Pt2_left} # Partial pressure of T2
Kd = Kdt2
boundary = left
[]
[t_from_t2_right]
type = DissociationFluxBC
variable = t
v = ${Pt2_right} # Partial pressure of T2
Kd = Kdt2
boundary = right
[]
[]
[Materials]
[Krtt]
type = ADConstantMaterial
property_name = 'Krtt'
value = ${Krtt}
[]
[Kdt2]
type = ADConstantMaterial
property_name = 'Kdt2'
value = '${Kdt2}'
[]
[]
[Postprocessors]
[downstream_t_flux]
type = SideFluxAverage
variable = t
boundary = right
diffusivity = ${d_t}
[]
[downstream_t_conc]
type = SideAverageValue
variable = t
boundary = right
outputs = 'none'
[]
[upstream_t_conc]
type = SideAverageValue
variable = t
boundary = left
outputs = 'none'
[]
[difference]
type = DifferencePostprocessor
value1 = upstream_t_conc
value2 = downstream_t_conc
outputs = 'none'
[]
[domain_averaged_flux]
type = ScalePostprocessor
scaling_factor = ${fparse d_t / l}
value = difference
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
num_steps = 40
steady_state_detection = true
dt = .1
[]
[Outputs]
exodus = 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/thermal_hydraulics/test/tests/actions/coupled_heat_transfer_action/master.i)
# This tests an action used to exchange T_wall, T_fluid and HTC between
# a heat conduction simulation and a THM simulation
[Mesh]
type = GeneratedMesh
dim = 2
xmax = 0.1
nx = 2
ymax = 1
ny = 10
parallel_type = replicated
coord_type = RZ
[]
[Variables]
[T]
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T
value = 300
[]
[]
[AuxVariables]
[T_fluid]
family = MONOMIAL
order = CONSTANT
initial_condition = 300
[]
[htc]
family = MONOMIAL
order = CONSTANT
initial_condition = 0
[]
[]
[Kernels]
[td]
type = TimeDerivative
variable = T
[]
[diff]
type = Diffusion
variable = T
[]
[]
[CoupledHeatTransfers]
[right]
boundary = right
T_fluid = 'T_fluid'
T = T
T_wall = T_wall
htc = 'htc'
multi_app = thm
T_fluid_user_objects = 'T_uo'
htc_user_objects = 'Hw_uo'
position = '0 0 0'
orientation = '0 1 0'
length = 1
n_elems = 10
skip_coordinate_collapsing = true
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 10
nl_abs_tol = 1e-10
abort_on_solve_fail = true
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
[]
[MultiApps]
[thm]
type = TransientMultiApp
app_type = ThermalHydraulicsApp
input_files = sub.i
execute_on = 'TIMESTEP_END'
[]
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[T_wall_avg]
type = SideAverageValue
variable = T
boundary = right
execute_on = 'INITIAL TIMESTEP_END'
[]
[T_fluid_avg]
type = ElementAverageValue
variable = T_fluid
execute_on = 'INITIAL TIMESTEP_END'
[]
[htc_avg]
type = ElementAverageValue
variable = htc
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
(test/tests/misc/ad_curvature/test.i)
[Mesh]
[sphere]
type = SphereMeshGenerator
radius = 1
nr = 1
elem_type = HEX27
[]
[]
[Problem]
solve = false
[]
[AuxVariables]
[curvature]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[curvature]
variable = curvature
type = ADCurvatureAux
execute_on = 'initial'
boundary = 0
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
[Postprocessors]
[average]
type = SideAverageValue
execute_on = 'initial'
variable = curvature
boundary = 0
[]
[]
(modules/solid_mechanics/test/tests/radial_disp_aux/cylinder_3d_cartesian.i)
# The purpose of this set of tests is to check the values computed
# by the RadialDisplacementAux AuxKernel. They should match the
# radial component of the displacment for a cylindrical or spherical
# model.
# This particular model is of a cylinder subjected to uniform thermal
# expansion represented using a 3D Cartesian model.
[Mesh]
type = FileMesh
file = cylinder_sector_3d.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
order = SECOND
family = LAGRANGE
[]
[AuxVariables]
[./temp]
[../]
[./rad_disp]
[../]
[]
[Functions]
[./temperature_load]
type = ParsedFunction
expression = t+300.0
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
eigenstrain_names = eigenstrain
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = temperature_load
use_displaced_mesh = false
[../]
[./raddispaux]
type = RadialDisplacementCylinderAux
variable = rad_disp
origin = '0 0 0'
axis_vector = '0 0 1'
[../]
[]
[BCs]
[./x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./y]
type = DirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[./z]
type = DirichletBC
variable = disp_z
boundary = '3 4'
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 300
thermal_expansion_coeff = 1.3e-5
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '51'
line_search = 'none'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
start_time = 0.0
end_time = 1
dt = 1
dtmin = 1
[]
[Outputs]
csv = true
exodus = true
[]
#[Postprocessors]
# [./strain_xx]
# type = SideAverageValue
# variable =
# block = 0
# [../]
#[]
(modules/combined/test/tests/cavity_pressure/additional_volume.i)
#
# Cavity Pressure Test
#
# This test is designed to compute an internal pressure based on
# p = n * R * / (V_cavity / T_cavity + V_add / T_add)
# where
# p is the pressure
# n is the amount of material in the volume (moles)
# R is the universal gas constant
# T_cavity is the temperature in the cavity
# T_add is the temperature of the additional volume
#
# The mesh is composed of one block (1) with an interior cavity of volume 8.
# Block 2 sits in the cavity and has a volume of 1. Thus, the total
# initial volume is 7. An additional volume of 2 is added.
#
# The test adjusts n, T, and V in the following way:
# n => n0 + alpha * t
# T => T0 + beta * t
# V => V_cavity0 + gamma * t + V_add
# with
# alpha = n0
# beta = T0 / 2
# gamma = -(0.003322259...) * V0
# T0 = 240.54443866068704
# V_cavity0 = 7
# V_add = 2
# T_add = 100
# n0 = f(p0)
# p0 = 100
# R = 8.314472 J * K^(-1) * mol^(-1)
#
# An additional volume of 2 with a temperature of 100.0 is included.
#
# So, n0 = p0 * (V_cavity / T_cavity + V_add / T_add) / R
# = 100 * (7 / 240.544439 + 2 / 100) / 8.314472
# = 0.59054
#
# The parameters combined at t = 1 gives p = 249.647.
#
# This test sets the initial temperature to 500, but the CavityPressure
# is told that that initial temperature is T0. Thus, the final solution
# is unchanged.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
file = 3d.e
[]
[GlobalParams]
volumetric_locking_correction = true
[]
[Functions]
[./displ_positive]
type = PiecewiseLinear
x = '0 1'
y = '0 0.0029069767441859684'
[../]
[./displ_negative]
type = PiecewiseLinear
x = '0 1'
y = '0 -0.0029069767441859684'
[../]
[./temp1]
type = PiecewiseLinear
x = '0 1'
y = '1 1.5'
scale_factor = 240.54443866068704
[../]
[./material_input_function]
type = PiecewiseLinear
x = '0 1'
y = '0 0.59054'
[../]
[./additional_volume]
type = ConstantFunction
value = 2
[../]
[./temperature_of_additional_volume]
type = ConstantFunction
value = 100
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./temp]
initial_condition = 500
[../]
[./material_input]
[../]
[]
[AuxVariables]
[./pressure_residual_x]
[../]
[./pressure_residual_y]
[../]
[./pressure_residual_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./TensorMechanics]
use_displaced_mesh = true
[../]
[./heat]
type = Diffusion
variable = temp
use_displaced_mesh = true
[../]
[./material_input_dummy]
type = Diffusion
variable = material_input
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = stress_xx
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = stress_yy
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = stress_zz
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 1
variable = stress_xy
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 2
variable = stress_yz
[../]
[./stress_zx]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 0
variable = stress_zx
[../]
[]
[BCs]
[./no_x_exterior]
type = DirichletBC
variable = disp_x
boundary = '7 8'
value = 0.0
[../]
[./no_y_exterior]
type = DirichletBC
variable = disp_y
boundary = '9 10'
value = 0.0
[../]
[./no_z_exterior]
type = DirichletBC
variable = disp_z
boundary = '11 12'
value = 0.0
[../]
[./prescribed_left]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = displ_positive
[../]
[./prescribed_right]
type = FunctionDirichletBC
variable = disp_x
boundary = 14
function = displ_negative
[../]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '15 16'
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '17 18'
value = 0.0
[../]
[./no_x_interior]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[../]
[./no_y_interior]
type = DirichletBC
variable = disp_y
boundary = '3 4'
value = 0.0
[../]
[./no_z_interior]
type = DirichletBC
variable = disp_z
boundary = '5 6'
value = 0.0
[../]
[./temperatureInterior]
type = FunctionDirichletBC
boundary = 100
function = temp1
variable = temp
[../]
[./MaterialInput]
type = FunctionDirichletBC
boundary = '100 13 14 15 16'
function = material_input_function
variable = material_input
[../]
[./CavityPressure]
[./1]
boundary = 100
initial_pressure = 100
material_input = materialInput
R = 8.314472
temperature = aveTempInterior
initial_temperature = 240.54443866068704
volume = internalVolume
startup_time = 0.5
output = ppress
save_in = 'pressure_residual_x pressure_residual_y pressure_residual_z'
additional_volumes = volume1
temperature_of_additional_volumes = temperature1
[../]
[../]
[]
[Materials]
[./elast_tensor1]
type = ComputeElasticityTensor
C_ijkl = '0 5'
fill_method = symmetric_isotropic
block = 1
[../]
[./strain1]
type = ComputeFiniteStrain
block = 1
[../]
[./stress1]
type = ComputeFiniteStrainElasticStress
block = 1
[../]
[./elast_tensor2]
type = ComputeElasticityTensor
C_ijkl = '0 5'
fill_method = symmetric_isotropic
block = 2
[../]
[./strain2]
type = ComputeFiniteStrain
block = 2
[../]
[./stress2]
type = ComputeFiniteStrainElasticStress
block = 2
[../]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
nl_rel_tol = 1e-12
l_tol = 1e-12
l_max_its = 20
dt = 0.5
end_time = 1.0
snesmf_reuse_base = false
[]
[Postprocessors]
[./internalVolume]
type = InternalVolume
boundary = 100
execute_on = 'initial linear'
[../]
[./aveTempInterior]
type = SideAverageValue
boundary = 100
variable = temp
execute_on = 'initial linear'
[../]
[./materialInput]
type = SideAverageValue
boundary = '7 8 9 10 11 12'
variable = material_input
execute_on = linear
[../]
[./volume1]
type = FunctionValuePostprocessor
function = additional_volume
execute_on = 'initial linear'
[../]
[./temperature1]
type = FunctionValuePostprocessor
function = temperature_of_additional_volume
execute_on = 'initial linear'
[../]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/1d-rc.i)
mu = 1.1
rho = 1.1
advected_interp_method = 'upwind'
velocity_interp_method = 'rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 1
dx = '1 1'
ix = '30 30'
subdomain_id = '1 2'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
pressure = pressure
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[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
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = '1'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 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-12
[]
[Postprocessors]
[inlet_p]
type = SideAverageValue
variable = 'pressure'
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 'right'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/combined/test/tests/phase_field_fracture/crack2d_aniso_cleavage_plane.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 20
ymax = 0.5
[]
[./noncrack]
type = BoundingBoxNodeSetGenerator
new_boundary = noncrack
bottom_left = '0.5 0 0'
top_right = '1 0 0'
input = gen
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./c]
family = LAGRANGE
order = FIRST
[../]
[]
[Modules]
[./TensorMechanics]
[./Master]
[./All]
add_variables = true
strain = SMALL
additional_generate_output = 'strain_yy stress_yy'
planar_formulation = PLANE_STRAIN
[../]
[../]
[../]
[]
[Kernels]
[./ACbulk]
type = AllenCahn
variable = c
f_name = F
[../]
[./ACInterfaceCleavageFracture]
type = ACInterfaceCleavageFracture
variable = c
beta_penalty = 1
cleavage_plane_normal = '-0.707 0.707 0.0'
[../]
[./dcdt]
type = TimeDerivative
variable = c
[../]
[./solid_x]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_x
component = 0
c = c
[../]
[./solid_y]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_y
component = 1
c = c
[../]
[./off_disp]
type = AllenCahnElasticEnergyOffDiag
variable = c
displacements = 'disp_x disp_y'
mob_name = L
[../]
[]
[BCs]
[./ydisp]
type = FunctionDirichletBC
preset = true
variable = disp_y
boundary = top
function = 't'
[../]
[./yfix]
type = DirichletBC
preset = true
variable = disp_y
boundary = noncrack
value = 0
[../]
[./xfix]
type = DirichletBC
preset = true
variable = disp_x
boundary = right
value = 0
[../]
[]
[Materials]
[./pfbulkmat]
type = GenericConstantMaterial
prop_names = 'gc_prop l visco'
prop_values = '1e-3 0.05 1e-6'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '127.0 70.8 70.8 127.0 70.8 127.0 73.55 73.55 73.55'
fill_method = symmetric9
euler_angle_1 = 30
euler_angle_2 = 0
euler_angle_3 = 0
[../]
[./define_mobility]
type = ParsedMaterial
material_property_names = 'gc_prop visco'
property_name = L
expression = '1.0/(gc_prop * visco)'
[../]
[./define_kappa]
type = ParsedMaterial
material_property_names = 'gc_prop l'
property_name = kappa_op
expression = 'gc_prop * l'
[../]
[./damage_stress]
type = ComputeLinearElasticPFFractureStress
c = c
E_name = 'elastic_energy'
D_name = 'degradation'
F_name = 'local_fracture_energy'
decomposition_type = stress_spectral
[../]
[./degradation]
type = DerivativeParsedMaterial
property_name = degradation
coupled_variables = 'c'
expression = '(1.0-c)^2*(1.0 - eta) + eta'
constant_names = 'eta'
constant_expressions = '1.0e-6'
derivative_order = 2
[../]
[./local_fracture_energy]
type = DerivativeParsedMaterial
property_name = local_fracture_energy
coupled_variables = 'c'
material_property_names = 'gc_prop l'
expression = 'c^2 * gc_prop / 2 / l'
derivative_order = 2
[../]
[./fracture_driving_energy]
type = DerivativeSumMaterial
coupled_variables = c
sum_materials = 'elastic_energy local_fracture_energy'
derivative_order = 2
property_name = F
[../]
[]
[Postprocessors]
[./av_stress_yy]
type = ElementAverageValue
variable = stress_yy
[../]
[./av_strain_yy]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_factor_mat_solving_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-8
l_tol = 1e-4
l_max_its = 100
nl_max_its = 10
dt = 5e-5
num_steps = 5
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/uel/reference.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
xmax = 10
ymax = 3
elem_type = TRI3
[]
[pin]
type = ExtraNodesetGenerator
nodes = 106
new_boundary = pin
input = gen
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = SMALL
incremental = false
add_variables = true
extra_vector_tags = 'kernel_residual'
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = pin
value = 0
[]
inactive = 'right_dirichlet'
[right_neumann]
type = FunctionNeumannBC
variable = disp_x
function = t
boundary = right
[]
[right_dirichlet]
type = FunctionDirichletBC
variable = disp_x
function = t/10
boundary = right
[]
[]
[Materials]
[stress]
type = ComputeLinearElasticStress
[]
[elasticity]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100
poissons_ratio = 0.3
[]
[]
[Problem]
extra_tag_vectors = 'kernel_residual'
[]
[AuxVariables]
[res_x]
[]
[res_y]
[]
[]
[AuxKernels]
[res_x]
type = TagVectorAux
variable = res_x
v = disp_x
vector_tag = kernel_residual
[]
[res_y]
type = TagVectorAux
variable = res_y
v = disp_y
vector_tag = kernel_residual
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
dt = 1
num_steps = 15
[]
[Postprocessors]
[delta_l]
type = SideAverageValue
variable = disp_x
boundary = right
execute_on = 'INITIAL TIMESTEP_END'
[]
[V]
type = ElementIntegralMaterialProperty
mat_prop = 1
use_displaced_mesh = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/heat_transfer/test/tests/recover/ad_recover.i)
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
file = recover_in.e
[]
[Variables]
[./temp]
initial_condition = 580.0
[../]
[]
[AuxVariables]
[./gap_cond]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./heat]
type = ADHeatConduction
variable = temp
[../]
[./heat_source]
type = ADMatHeatSource
material_property = volumetric_heat
variable = temp
scalar = 1e3
block = pellet_type_1
[../]
[]
[ThermalContact]
[./thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 5
secondary = 10
emissivity_primary = 0
emissivity_secondary = 0
quadrature = true
[../]
[]
[BCs]
[./outside]
type = DirichletBC
value = 580
boundary = '1 2 3'
variable = temp
[../]
[./edge]
type = DirichletBC
value = 700
boundary = 10
variable = temp
[../]
[]
[Materials]
[./volumetric_heat]
type = ADGenericFunctionMaterial
prop_names = 'volumetric_heat'
prop_values = 't'
[../]
[./thermal_3]
type = ADHeatConductionMaterial
block = 3
thermal_conductivity = 5
specific_heat = 12
[../]
[./thermal_1]
type = ADHeatConductionMaterial
block = 1
thermal_conductivity = 16.0
specific_heat = 330.0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu superlu_dist'
nl_rel_tol = 1e-9
nl_abs_tol = 1e-11
start_time = -200
n_startup_steps = 1
end_time = 1.02e5
num_steps = 10
dtmax = 2e6
dtmin = 1
[./TimeStepper]
type = IterationAdaptiveDT
dt = 2.0e2
optimal_iterations = 15
iteration_window = 2
[../]
[./Quadrature]
order = FIFTH
side_order = SEVENTH
[../]
[]
[Postprocessors]
[./ave_temp_interior]
type = SideAverageValue
boundary = 9
variable = temp
execute_on = 'initial linear'
[../]
[./avg_clad_temp]
type = SideAverageValue
boundary = 7
variable = temp
execute_on = 'initial timestep_end'
[../]
[./flux_from_clad]
type = ADSideDiffusiveFluxIntegral
variable = temp
boundary = 5
diffusivity = thermal_conductivity
[../]
[./_dt]
type = TimestepSize
[../]
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_htonly/gap_heat_transfer_htonly_rspherical.i)
#
# 1-D spherical Gap Heat Transfer Test
#
# This test exercises 1-D gap heat transfer for a constant conductivity gap.
#
# The mesh consists of two "blocks" with a mesh biased toward the gap
# between them. Each block is unit length. The gap between them is one
# unit in length.
#
# The conductivity of both blocks is set very large to achieve a uniform temperature
# across each block. The temperature of the far left boundary
# is ramped from 100 to 200 over one time unit, and then held fixed for an additional
# time unit. The temperature of the far right boundary is held fixed at 100.
#
# A simple analytical solution is possible for the heat flux between the blocks, or spheres in the case of RSPHERICAL.:
#
# Flux = (T_left - T_right) * (gapK/(r^2*((1/r1)-(1/r2))))
#
# For gapK = 1 (default value)
#
# The area is taken as the area of the secondary (inner) surface:
#
# Area = 4 * pi * 1 * 1
#
# The integrated heat flux across the gap at time 2 is then:
#
# 4*pi*k*delta_T/((1/r1)-(1/r2))
# 4*pi*1*100/((1/1) - (1/2)) = 2513.3 watts
#
# For comparison, see results from the flux post processors.
#
#
[Problem]
coord_type = RSPHERICAL
[]
[Mesh]
file = gap_heat_transfer_htonly_rspherical.e
construct_side_list_from_node_list = true
[]
[Functions]
[./temp]
type = PiecewiseLinear
x = '0 1 2'
y = '100 200 200'
[../]
[]
[ThermalContact]
[./thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
gap_geometry_type = sphere
[../]
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
initial_condition = 100
[../]
[]
[AuxVariables]
[./gap_cond]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[]
[BCs]
[./temp_far_left]
type = FunctionDirichletBC
boundary = 1
variable = temp
function = temp
[../]
[./temp_far_right]
type = DirichletBC
boundary = 4
variable = temp
value = 100
[../]
[]
[AuxKernels]
[./conductance]
type = MaterialRealAux
property = gap_conductance
variable = gap_cond
boundary = 2
[../]
[]
[Materials]
[./heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 1e6
[../]
[./density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
# I don't know enough about this test to say why it needs such a
# loose nl_abs_tol... after timestep 10 the residual basically can't
# be reduced much beyond the initial residual. The test probably
# needs to be revisited to determine why.
nl_abs_tol = 1e-3
nl_rel_tol = 1e-10
l_tol = 1e-6
l_max_its = 100
line_search = 'none'
nl_max_its = 10
dt = 1e-1
dtmin = 1e-1
end_time = 2.0
[]
[Postprocessors]
[./temp_left]
type = SideAverageValue
boundary = 2
variable = temp
execute_on = 'initial timestep_end'
[../]
[./temp_right]
type = SideAverageValue
boundary = 3
variable = temp
execute_on = 'initial timestep_end'
[../]
[./flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[../]
[./flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[../]
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/action/material_output_order.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
origin = '0 0 2'
direction = '0 0 1'
polar_moment_of_inertia = pmi
factor = t
[]
[Mesh]
[ring]
type = AnnularMeshGenerator
nr = 1
nt = 30
rmin = 0.95
rmax = 1
[]
[extrude]
type = MeshExtruderGenerator
input = ring
extrusion_vector = '0 0 2'
bottom_sideset = 'bottom'
top_sideset = 'top'
num_layers = 5
[]
[]
[AuxVariables]
[alpha_var]
[]
[shear_stress_var]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[alpha]
type = RotationAngle
variable = alpha_var
[]
[shear_stress]
type = ParsedAux
variable = shear_stress_var
coupled_variables = 'stress_yz stress_xz'
expression = 'sqrt(stress_yz^2 + stress_xz^2)'
[]
[]
[BCs]
# fix bottom
[fix_x]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0
[]
[fix_y]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0
[]
[fix_z]
type = DirichletBC
boundary = bottom
variable = disp_z
value = 0
[]
# twist top
[twist_x]
type = Torque
boundary = top
variable = disp_x
[]
[twist_y]
type = Torque
boundary = top
variable = disp_y
[]
[twist_z]
type = Torque
boundary = top
variable = disp_z
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = SMALL
generate_output = 'vonmises_stress stress_yz stress_xz'
[]
[]
[Postprocessors]
[pmi]
type = PolarMomentOfInertia
boundary = top
# execute_on = 'INITIAL NONLINEAR'
execute_on = 'INITIAL'
[]
[alpha]
type = SideAverageValue
variable = alpha_var
boundary = top
[]
[shear_stress]
type = ElementAverageValue
variable = shear_stress_var
[]
[]
[Materials]
[stress]
type = ComputeLinearElasticStress
[]
[elastic]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 0.3
shear_modulus = 100
[]
[]
[Executioner]
# type = Steady
type = Transient
num_steps = 1
solve_type = PJFNK
petsc_options_iname = '-pctype'
petsc_options_value = 'lu'
nl_max_its = 150
[]
[Outputs]
exodus = true
print_linear_residuals = false
perf_graph = true
[]
(test/tests/multiapps/steffensen_postprocessor/transient_main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[time]
type = TimeDerivative
variable = u
[]
[source]
type = BodyForce
variable = u
value = 1
[]
[]
[BCs]
[left]
type = PostprocessorDirichletBC
variable = u
boundary = left
postprocessor = 'from_sub'
[]
[]
[Postprocessors]
[coupling_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[from_sub]
type = Receiver
default = 0
[]
[to_sub]
type = SideAverageValue
variable = u
boundary = right
[]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
# App coupling parameters
fixed_point_algorithm = 'steffensen'
fixed_point_max_its = 30
transformed_postprocessors = 'from_sub'
[]
[Outputs]
csv = true
exodus = false
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = 'transient_sub.i'
clone_parent_mesh = true
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[left_from_sub]
type = MultiAppPostprocessorTransfer
from_multi_app = sub
from_postprocessor = 'to_main'
to_postprocessor = 'from_sub'
reduction_type = 'average'
[]
[right_to_sub]
type = MultiAppPostprocessorTransfer
to_multi_app = sub
from_postprocessor = 'to_sub'
to_postprocessor = 'from_main'
[]
[]
(modules/solid_mechanics/test/tests/uel/small_test_umat_states_fields.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
xmax = 10
ymax = 3
elem_type = TRI3
[]
[pin]
type = ExtraNodesetGenerator
nodes = 106
new_boundary = pin
input = gen
[]
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[temperature]
initial_condition = 1500
[]
[voltage]
initial_condition = 210
[]
[]
[AuxKernels]
[temperature]
type = FunctionAux
function = temperature_function
variable = temperature
[]
[voltage]
type = FunctionAux
function = voltage_function
variable = voltage
[]
[]
[Functions]
[voltage_function]
type = PiecewiseLinear
x = '0 15'
y = '210 450'
[]
[temperature_function]
type = PiecewiseLinear
x = '0 15'
y = '1500 800'
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = pin
value = 0
[]
inactive = 'right_dirichlet'
[right_neumann]
type = FunctionNeumannBC
variable = disp_x
function = t
boundary = right
[]
[right_dirichlet]
type = FunctionDirichletBC
variable = disp_x
function = t/10
boundary = right
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = SMALL
incremental = true
extra_vector_tags = 'kernel_residual'
[]
[]
[Materials]
[umat]
type = AbaqusUMATStress
constant_properties = '100 0.3'
plugin = '../../plugins/small_elastic_tri_states'
num_state_vars = 2
use_one_based_indexing = false
temperature = 'temperature'
external_fields = 'voltage'
[]
[]
[Problem]
kernel_coverage_check = false
extra_tag_vectors = 'kernel_residual'
[]
[AuxVariables]
[res_x]
[]
[res_y]
[]
[]
[AuxKernels]
[res_x]
type = TagVectorAux
variable = res_x
v = disp_x
vector_tag = kernel_residual
[]
[res_y]
type = TagVectorAux
variable = res_y
v = disp_y
vector_tag = kernel_residual
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
dt = 1
num_steps = 15
[]
[Postprocessors]
[delta_l]
type = SideAverageValue
variable = disp_x
boundary = right
execute_on = 'INITIAL TIMESTEP_END'
[]
[V]
type = ElementIntegralMaterialProperty
mat_prop = 1
use_displaced_mesh = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/stress_update_material_based/use_substep_dt.i)
[GlobalParams]
displacements = 'ux uy uz'
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 4
ny = 4
nz = 4
elem_type = HEX8
displacements = 'ux uy uz'
[]
[AuxVariables]
[pk2]
order = CONSTANT
family = MONOMIAL
[]
[fp_zz]
order = CONSTANT
family = MONOMIAL
[]
[rotout]
order = CONSTANT
family = MONOMIAL
[]
[e_zz]
order = CONSTANT
family = MONOMIAL
[]
[gss]
order = CONSTANT
family = MONOMIAL
[]
[slip_increment]
order = CONSTANT
family = MONOMIAL
[]
[]
[Physics/SolidMechanics/QuasiStatic/all]
strain = FINITE
add_variables = true
generate_output = stress_zz
[]
[AuxKernels]
[stress_zz]
type = RankTwoAux
variable = stress_zz
rank_two_tensor = stress
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[pk2]
type = RankTwoAux
variable = pk2
rank_two_tensor = second_piola_kirchhoff_stress
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[fp_zz]
type = RankTwoAux
variable = fp_zz
rank_two_tensor = plastic_deformation_gradient
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[e_zz]
type = RankTwoAux
variable = e_zz
rank_two_tensor = total_lagrangian_strain
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[gss]
type = MaterialStdVectorAux
variable = gss
property = slip_resistance
index = 0
execute_on = timestep_end
[]
[slip_inc]
type = MaterialStdVectorAux
variable = slip_increment
property = slip_increment
index = 0
execute_on = timestep_end
[]
[]
[BCs]
[symmy]
type = DirichletBC
variable = uy
boundary = bottom
value = 0
[]
[symmx]
type = DirichletBC
variable = ux
boundary = left
value = 0
[]
[symmz]
type = DirichletBC
variable = uz
boundary = back
value = 0
[]
[pushy]
type = FunctionDirichletBC
variable = uy
boundary = top
function = '-0.1*t'
[]
[pullz]
type = FunctionDirichletBC
variable = uz
boundary = front
function = '0.1*t'
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensorCP
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
[]
[stress]
type = ComputeMultipleCrystalPlasticityStress
crystal_plasticity_models = 'trial_xtalpl'
tan_mod_type = exact
maximum_substep_iteration = 1
[]
[trial_xtalpl]
type = CrystalPlasticityKalidindiUpdate
number_slip_systems = 12
slip_sys_file_name = input_slip_sys.txt
[]
[]
[Postprocessors]
[stress_zz]
type = ElementAverageValue
variable = stress_zz
[]
[pk2]
type = ElementAverageValue
variable = pk2
[]
[fp_zz]
type = ElementAverageValue
variable = fp_zz
[]
[e_zz]
type = ElementAverageValue
variable = e_zz
[]
[gss]
type = ElementAverageValue
variable = gss
[]
[slip_increment]
type = ElementAverageValue
variable = slip_increment
[]
[uy_avg_top]
type = SideAverageValue
variable = uy
boundary = top
[]
[uz_avg_front]
type = SideAverageValue
variable = uz
boundary = front
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
dt = 0.05
solve_type = 'NEWTON'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu superlu_dist'
line_search = 'none'
nl_abs_tol = 1e-10
nl_rel_step_tol = 1e-10
dtmax = 10.0
nl_rel_tol = 1e-10
end_time = 1.0
num_steps = 5
dtmin = 0.001
nl_abs_step_tol = 1e-10
[]
[Outputs]
csv = true
[]
(test/tests/userobjects/side_user_object_no_boundary_error/lower_d_side_boundary.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 3
ny = 3
dim = 2
[]
build_all_side_lowerd_mesh = true
[]
[Variables]
[u]
order = THIRD
family = MONOMIAL
block = 0
[]
[uhat]
order = CONSTANT
family = MONOMIAL
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[lambda]
order = CONSTANT
family = MONOMIAL
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[lambdab]
order = CONSTANT
family = MONOMIAL
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[]
[AuxVariables]
[v]
order = CONSTANT
family = MONOMIAL
block = 0
initial_condition = '1'
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
block = 0
[]
[source]
type = CoupledForce
variable = u
v = v
coef = '1'
block = 0
[]
[reaction]
type = Reaction
variable = uhat
rate = '1'
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[uhat_coupled]
type = CoupledForce
variable = uhat
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
v = lambdab
coef = '1'
[]
[]
[DGKernels]
[surface]
type = HFEMDiffusion
variable = u
lowerd_variable = lambda
[]
[]
[BCs]
[all]
type = HFEMDirichletBC
boundary = 'left right top bottom'
variable = u
lowerd_variable = lambdab
uhat = uhat
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
[Postprocessors]
[avg]
type = SideAverageValue
boundary = 'left right top bottom'
[]
[]
(modules/thermal_hydraulics/test/tests/components/volume_junction_1phase/phy.unequal_area.i)
# Junction between 2 pipes where the second has half the area of the first.
# The momentum density of the second should be twice that of the first.
[GlobalParams]
gravity_vector = '0 0 0'
initial_T = 250
initial_p = 1e5
initial_vel = 1
initial_vel_x = 1
initial_vel_y = 0
initial_vel_z = 0
f = 0
fp = eos
scaling_factor_1phase = '1 1 1e-5'
closures = simple_closures
[]
[FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 1.4
cv = 725
p_inf = 0
q = 0
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[inlet]
type = InletDensityVelocity1Phase
input = 'pipe1:in'
rho = 1.37931034483
vel = 1
[]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
A = 1
n_elems = 20
[]
[junction]
type = VolumeJunction1Phase
connections = 'pipe1:out pipe2:in'
position = '1 0 0'
volume = 1e-8
[]
[pipe2]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '1 0 0'
length = 1
A = 0.5
n_elems = 20
[]
[outlet]
type = Outlet1Phase
input = 'pipe2:out'
p = 1e5
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 0
nl_abs_tol = 1e-6
nl_max_its = 10
l_tol = 1e-10
l_max_its = 10
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
start_time = 0
end_time = 3
dt = 0.1
abort_on_solve_fail = true
[]
[Postprocessors]
# These post-processors are used to test that the outlet side of the junction,
# which has half the area of the inlet side, has twice the momentum density
# that the inlet side does.
[rhouA_pipe1]
type = SideAverageValue
variable = rhouA
boundary = pipe1:out
[]
[rhouA_pipe2]
type = SideAverageValue
variable = rhouA
boundary = pipe2:out
[]
[test_rel_err]
type = RelativeDifferencePostprocessor
value1 = rhouA_pipe1
value2 = rhouA_pipe2
[]
[]
[Outputs]
[out]
type = CSV
show = test_rel_err
execute_on = 'final'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/2d-rc-rz-by-parts.i)
mu = 1.1
rho = 1
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 5
ymin = 0
ymax = 1
nx = 40
ny = 10
[]
coord_type = 'RZ'
rz_coord_axis = 'X'
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
porosity = porosity
[]
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[v]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1e-6
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 0.5
[]
[]
[FVKernels]
inactive = 'v_pressure_volumetric'
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = u
mu = ${mu}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressureFlux
variable = u
momentum_component = 'x'
pressure = pressure
porosity = porosity
[]
[u_friction]
type = PINSFVMomentumFriction
variable = u
momentum_component = 'x'
Darcy_name = 'Darcy_coefficient'
Forchheimer_name = 'Forchheimer_coefficient'
rho = ${rho}
speed = speed
mu = ${mu}
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = v
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'y'
[]
[v_viscosity]
type = PINSFVMomentumDiffusion
variable = v
mu = ${mu}
porosity = porosity
momentum_component = 'y'
[]
[v_pressure_volumetric]
type = PINSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
porosity = porosity
[]
[v_pressure_by_parts_flux]
type = PINSFVMomentumPressureFlux
variable = v
momentum_component = 'y'
pressure = pressure
porosity = porosity
[]
[v_pressure_by_parts_volume_term]
type = PNSFVMomentumPressureFluxRZ
variable = v
pressure = pressure
porosity = porosity
momentum_component = 'y'
[]
[v_friction]
type = PINSFVMomentumFriction
variable = v
momentum_component = 'y'
Darcy_name = 'Darcy_coefficient'
Forchheimer_name = 'Forchheimer_coefficient'
rho = ${rho}
speed = speed
mu = ${mu}
[]
[]
[FVBCs]
inactive = 'free-slip-u free-slip-v'
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = '1'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = v
function = 0
[]
[no-slip-u]
type = INSFVNoSlipWallBC
boundary = 'top'
variable = u
function = 0
[]
[no-slip-v]
type = INSFVNoSlipWallBC
boundary = 'top'
variable = v
function = 0
[]
[free-slip-u]
type = INSFVNaturalFreeSlipBC
boundary = 'top'
variable = u
momentum_component = 'x'
[]
[free-slip-v]
type = INSFVNaturalFreeSlipBC
boundary = 'top'
variable = v
momentum_component = 'y'
[]
[symmetry-u]
type = PINSFVSymmetryVelocityBC
boundary = 'bottom'
variable = u
u = u
v = v
mu = ${mu}
momentum_component = 'x'
[]
[symmetry-v]
type = PINSFVSymmetryVelocityBC
boundary = 'bottom'
variable = v
u = u
v = v
mu = ${mu}
momentum_component = 'y'
[]
[symmetry-p]
type = INSFVSymmetryPressureBC
boundary = 'bottom'
variable = pressure
[]
[outlet-p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 0
[]
[]
[FunctorMaterials]
[darcy]
type = ADGenericVectorFunctorMaterial
prop_names = 'Darcy_coefficient Forchheimer_coefficient'
prop_values = '0.1 0.1 0.1 0.1 0.1 0.1'
[]
[speed]
type = PINSFVSpeedFunctorMaterial
superficial_vel_x = u
superficial_vel_y = v
porosity = porosity
[]
[]
[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-11
nl_abs_tol = 1e-14
[]
# Some basic Postprocessors to visually examine the solution
[Postprocessors]
[inlet-p]
type = SideAverageValue
variable = pressure
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 'right'
[]
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/ad_thermal_expansion_function/mean_complex.i)
# This test checks the thermal expansion calculated via a mean thermal expansion coefficient.
# The coefficient is selected so as to result in a 1e-4 strain in the x-axis, and to cross over
# from positive to negative strain.
[Mesh]
[./gen]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 4
nz = 4
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./temp]
[../]
[]
[Kernels]
[./temp_diff]
type = ADDiffusion
variable = temp
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = SMALL
add_variables = true
eigenstrain_names = eigenstrain
generate_output = 'strain_xx strain_yy strain_zz'
use_automatic_differentiation = true
[../]
[]
[BCs]
[./left]
type = ADDirichletBC
variable = disp_x
boundary = 'left'
value = 0.0
[../]
[./bottom]
type = ADDirichletBC
variable = disp_y
boundary = 'bottom'
value = 0.0
[../]
[./back]
type = ADDirichletBC
variable = disp_z
boundary = 'back'
value = 0.0
[../]
[./temp]
type = ADFunctionDirichletBC
variable = temp
boundary = 'front back top bottom left right'
function = '1 + t'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1
poissons_ratio = 0.3
[../]
[./stress]
type = ADComputeLinearElasticStress
[../]
[./thermal_expansion_strain]
type = ADComputeMeanThermalExpansionFunctionEigenstrain
thermal_expansion_function = cte_func_mean
thermal_expansion_function_reference_temperature = 1
stress_free_temperature = 1
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Functions]
[./cte_func_mean]
type = ParsedFunction
expression = '1e-6 + 1e-8 * t + 1e-8 * t^2 + exp(t) * 1e-2'
[../]
[]
[Postprocessors]
[./disp_x_max]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./temp_avg]
type = ElementAverageValue
variable = temp
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
num_steps = 1
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/pins/channel-flow/pm_heat_source.i)
# This test case tests the porous-medium flow with volumetric heat source
#
# At the steady state, the energy balance is given by
# rho * u * (h_out - h_in) = q''' * L
#
# with rho * u = 100; cp = 100; q''' = 1e6, L = 1, it is easy to obtain:
# T_out - T_in = 1e6 / (100 * 100) = 100
#
# This can be verified by check the T_out - T_in
[GlobalParams]
gravity = '0 0 0'
order = FIRST
family = LAGRANGE
u = vel_x
v = vel_y
pressure = p
temperature = T
porosity = porosity
eos = eos
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 0.1
nx = 10
ny = 4
elem_type = QUAD4
[]
[FluidProperties]
[./eos]
type = SimpleFluidProperties
density0 = 100 # kg/m^3
thermal_expansion = 0 # K^{-1}
cp = 100
viscosity = 0.1 # Pa-s, Re=rho*u*L/mu = 100*1*0.1/0.1 = 100
thermal_conductivity = 0.1
[../]
[]
[Functions]
[v_in]
type = PiecewiseLinear
x = '0 1e5'
y = '1 1'
[]
[T_in]
type = PiecewiseLinear
x = '0 1e5'
y = '630 630'
[]
[]
[Variables]
# velocity
[vel_x]
initial_condition = 1
[]
[vel_y]
initial_condition = 0
[]
[p]
initial_condition = 1e5
[]
[T]
scaling = 1e-3
initial_condition = 630
[]
[]
[AuxVariables]
[rho]
initial_condition = 100
[]
[porosity]
initial_condition = 0.4
[]
[vol_heat]
initial_condition = 1e6
[]
[]
[Materials]
[mat]
type = PINSFEMaterial
alpha = 1000
beta = 100
[]
[]
[Kernels]
[mass_time]
type = PINSFEFluidPressureTimeDerivative
variable = p
[]
[mass_space]
type = INSFEFluidMassKernel
variable = p
[]
[x_momentum_time]
type = PINSFEFluidVelocityTimeDerivative
variable = vel_x
[]
[x_momentum_space]
type = INSFEFluidMomentumKernel
variable = vel_x
component = 0
[]
[y_momentum_time]
type = PINSFEFluidVelocityTimeDerivative
variable = vel_y
[]
[y_momentum_space]
type = INSFEFluidMomentumKernel
variable = vel_y
component = 1
[]
[temperature_time]
type = PINSFEFluidTemperatureTimeDerivative
variable = T
[../]
[temperature_space]
type = INSFEFluidEnergyKernel
variable = T
power_density = vol_heat
[]
[]
[AuxKernels]
[rho_aux]
type = FluidDensityAux
variable = rho
p = p
T = T
fp = eos
[]
[]
[BCs]
# BCs for mass equation
# Inlet
[mass_inlet]
type = INSFEFluidMassBC
variable = p
boundary = 'left'
v_fn = v_in
[]
# Outlet
[./pressure_out]
type = DirichletBC
variable = p
boundary = 'right'
value = 1e5
[../]
# BCs for x-momentum equation
# Inlet
[vx_in]
type = FunctionDirichletBC
variable = vel_x
boundary = 'left'
function = v_in
[]
# Outlet (no BC is needed)
# BCs for y-momentum equation
# Both Inlet and Outlet, and Top and Bottom
[vy]
type = DirichletBC
variable = vel_y
boundary = 'left right bottom top'
value = 0
[]
# BCs for energy equation
[T_in]
type = FunctionDirichletBC
variable = T
boundary = 'left'
function = T_in
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
solve_type = 'PJFNK'
[]
[]
[Postprocessors]
[p_in]
type = SideAverageValue
variable = p
boundary = left
[]
[p_out]
type = SideAverageValue
variable = p
boundary = right
[]
[T_in]
type = SideAverageValue
variable = T
boundary = left
[]
[T_out]
type = SideAverageValue
variable = T
boundary = right
[]
[]
[Executioner]
type = Transient
dt = 1
dtmin = 1.e-3
petsc_options_iname = '-pc_type -ksp_gmres_restart'
petsc_options_value = 'lu 100'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-8
nl_max_its = 20
l_tol = 1e-5
l_max_its = 100
start_time = 0.0
end_time = 10
num_steps = 10
[]
[Outputs]
perf_graph = true
print_linear_residuals = false
time_step_interval = 1
execute_on = 'initial timestep_end'
[console]
type = Console
output_linear = false
[]
[out]
type = Exodus
use_displaced = false
[]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_htonly/sphere2DRZ.i)
#
# 2DRZ Spherical Gap Heat Transfer Test.
#
# This test exercises 2D gap heat transfer for a constant conductivity gap.
#
# The mesh consists of an inner solid sphere of radius = 1 unit, and outer
# hollow sphere with an inner radius of 2. In other words, the gap between
# them is 1 radial unit in length.
#
# The conductivity of both spheres is set very large to achieve a uniform
# temperature in each sphere. The temperature of the center node of the
# inner sphere is ramped from 100 to 200 over one time unit. The
# temperature of the outside of the outer, hollow sphere is held fixed
# at 100.
#
# A simple analytical solution is possible for the integrated heat flux
# between the inner and outer spheres:
#
# Integrated Flux = (T_left - T_right) * (gapK/(r^2*((1/r1)-(1/r2)))) * Area
#
# For gapK = 1 (default value)
#
# The area is taken as the area of the secondary (inner) surface:
#
# Area = 4 * pi * 1^2 (4*pi*r^2)
#
# The integrated heat flux across the gap at time 1 is then:
#
# 4*pi*k*delta_T/((1/r1)-(1/r2))
# 4*pi*1*100/((1/1) - (1/2)) = 2513.3 watts
#
# For comparison, see results from the integrated flux post processors.
# This simulation makes use of symmetry, so only 1/2 of the spheres is meshed
# As such, the integrated flux from the post processors is 1/2 of the total,
# or 1256.6 watts... i.e. 400*pi.
# The value coming from the post processor is slightly less than this
# but converges as mesh refinement increases.
#
# Simulating contact is challenging. Regression tests that exercise
# contact features can be difficult to solve consistently across multiple
# platforms. While designing these tests, we felt it worth while to note
# some aspects of these tests. The following applies to:
# sphere3D.i, sphere2DRZ.i, cyl2D.i, and cyl3D.i.
# 1. We decided that to perform consistently across multiple platforms we
# would use very small convergence tolerance. In this test we chose an
# nl_rel_tol of 1e-12.
# 2. Due to such a high value for thermal conductivity (used here so that the
# domains come to a uniform temperature) the integrated flux at time = 0
# was relatively large (the value coming from SideIntegralFlux =
# -_diffusion_coef[_qp]*_grad_u[_qp]*_normals[_qp] where the diffusion coefficient
# here is thermal conductivity).
# Even though _grad_u[_qp] is small, in this case the diffusion coefficient
# is large. The result is a number that isn't exactly zero and tends to
# fail exodiff. For this reason the parameter execute_on = initial should not
# be used. That parameter is left to default settings in these regression tests.
#
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
file = cyl2D.e
[]
[Functions]
[./temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[../]
[]
[Variables]
[./temp]
initial_condition = 100
[../]
[]
[AuxVariables]
[./gap_conductance]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./heat_conduction]
type = HeatConduction
variable = temp
[../]
[]
[AuxKernels]
[./gap_cond]
type = MaterialRealAux
property = gap_conductance
variable = gap_conductance
boundary = 2
[../]
[]
[Materials]
[./heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 1000000.0
[../]
[]
[ThermalContact]
[./thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
gap_conductivity = 1
quadrature = true
gap_geometry_type = SPHERE
sphere_origin = '0 0 0'
[../]
[]
[BCs]
[./mid]
type = FunctionDirichletBC
boundary = 1
variable = temp
function = temp
[../]
[./temp_far_right]
type = DirichletBC
boundary = 4
variable = temp
value = 100
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-7
[./Quadrature]
order = fifth
side_order = seventh
[../]
[]
[Outputs]
exodus = true
[./Console]
type = Console
[../]
[]
[Postprocessors]
[./temp_left]
type = SideAverageValue
boundary = 2
variable = temp
[../]
[./temp_right]
type = SideAverageValue
boundary = 3
variable = temp
[../]
[./flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[../]
[./flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[../]
[]
(modules/thermal_hydraulics/test/tests/components/volume_junction_1phase/junction_with_calorifically_imperfect_gas.i)
# This input file tests compatibility of VolumeJunction1Phase and CaloricallyImperfectGas.
# Loss coefficient is applied in first junction.
# Expected pressure drop ~0.5*K*rho_in*vel_in^2=0.5*100*3.219603*1 = 160.9 Pa
T_in = 523.0
vel = 1
p_out = 7e6
[GlobalParams]
initial_p = ${p_out}
initial_vel = ${vel}
initial_T = ${T_in}
gravity_vector = '0 0 0'
closures = simple_closures
n_elems = 3
f = 0
scaling_factor_1phase = '1 1 1e-5'
scaling_factor_rhoV = '1e2'
scaling_factor_rhowV = '1e-2'
scaling_factor_rhoEV = '1e-5'
[]
[Functions]
[e_fn]
type = PiecewiseLinear
x = '100 280 300 350 400 450 500 550 600 700 800 900 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 5000'
y = '783.9 2742.3 2958.6 3489.2 4012.7 4533.3 5053.8 5574 6095.1 7140.2 8192.9 9256.3 10333.6 12543.9 14836.6 17216.3 19688.4 22273.7 25018.3 28042.3 31544.2 35818.1 41256.5 100756.5'
scale_factor = 1e3
[]
[mu_fn]
type = PiecewiseLinear
x = '100 280 300 350 400 450 500 550 600 700 800 900 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 5000'
y = '85.42 85.42 89.53 99.44 108.9 117.98 126.73 135.2 143.43 159.25 174.36 188.9 202.96 229.88 255.5 280.05 303.67 326.45 344.97 366.49 387.87 409.48 431.86 431.86'
scale_factor = 1e-7
[]
[k_fn]
type = PiecewiseLinear
x = '100 280 300 350 400 450 500 550 600 700 800 900 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 5000'
y = '186.82 186.82 194.11 212.69 231.55 250.38 268.95 287.19 305.11 340.24 374.92 409.66 444.75 511.13 583.42 656.44 733.32 826.53 961.15 1180.38 1546.31 2135.49 3028.08 3028.08'
scale_factor = 1e-3
[]
[]
[FluidProperties]
[fp]
type = CaloricallyImperfectGas
molar_mass = 0.002
e = e_fn
k = k_fn
mu = mu_fn
min_temperature = 100
max_temperature = 5000
out_of_bound_error = false
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[inlet_bc]
type = InletVelocityTemperature1Phase
input = 'inlet:in'
vel = ${vel}
T = ${T_in}
[]
[inlet]
type = FlowChannel1Phase
fp = fp
position = '0 0 11'
orientation = '0 0 -1'
length = 1
A = 5
[]
[inlet_plenum]
type = VolumeJunction1Phase
position = '0 0 10'
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = ${vel}
K = 100
connections = 'inlet:out channel1:in channel2:in'
volume = 1
[]
[channel1]
type = FlowChannel1Phase
fp = fp
position = '0 0 10'
orientation = '0 0 -1'
length = 10
A = 4
D_h = 1
[]
[channel2]
type = FlowChannel1Phase
fp = fp
position = '0 0 10'
orientation = '0 0 -1'
length = 10
A = 1
D_h = 1
[]
[outlet_plenum]
type = VolumeJunction1Phase
position = '0 0 0'
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = ${vel}
connections = 'channel1:out channel2:out outlet:in'
volume = 1
[]
[outlet]
type = FlowChannel1Phase
fp = fp
position = '0 0 0'
orientation = '0 0 -1'
length = 1
A = 5
[]
[outlet_bc]
type = Outlet1Phase
p = ${p_out}
input = 'outlet:out'
[]
[]
[Postprocessors]
[p_in]
type = SideAverageValue
variable = p
boundary = inlet:in
[]
[p_out]
type = SideAverageValue
variable = p
boundary = outlet:out
[]
[Delta_p]
type = DifferencePostprocessor
value1 = p_out
value2 = p_in
[]
[inlet_in_m_dot]
type = ADFlowBoundaryFlux1Phase
boundary = 'inlet_bc'
equation = mass
[]
[inlet_out_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'inlet:out'
connection_index = 0
junction = inlet_plenum
equation = mass
[]
[channel1_in_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'channel1:in'
connection_index = 1
junction = inlet_plenum
equation = mass
[]
[channel1_out_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'channel1:out'
connection_index = 0
junction = outlet_plenum
equation = mass
[]
[channel2_in_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'channel2:in'
connection_index = 2
junction = inlet_plenum
equation = mass
[]
[channel2_out_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'channel2:out'
connection_index = 1
junction = outlet_plenum
equation = mass
[]
[outlet_in_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'outlet:in'
connection_index = 2
junction = outlet_plenum
equation = mass
[]
[outlet_out_m_dot]
type = ADFlowBoundaryFlux1Phase
boundary = 'outlet_bc'
equation = mass
[]
[net_mass_flow_rate_domain]
type = LinearCombinationPostprocessor
pp_names = 'inlet_in_m_dot outlet_out_m_dot'
pp_coefs = '1 -1'
[]
[net_mass_flow_rate_volume_junction]
type = LinearCombinationPostprocessor
pp_names = 'inlet_out_m_dot channel1_in_m_dot channel2_in_m_dot'
pp_coefs = '1 -1 -1'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
start_time = 0
end_time = 20
[TimeStepper]
type = IterationAdaptiveDT
dt = 1
optimal_iterations = 8
iteration_window = 2
[]
timestep_tolerance = 1e-6
abort_on_solve_fail = true
line_search = basic
nl_rel_tol = 1e-8
nl_abs_tol = 4e-8
nl_max_its = 25
l_tol = 1e-3
l_max_its = 5
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu '
[]
[Outputs]
[out]
type = CSV
execute_on = 'FINAL'
show = 'net_mass_flow_rate_domain net_mass_flow_rate_volume_junction Delta_p'
[]
[]
(modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/lps_dual.i)
# This test provides an example of combining two LPS viscoplasticity models with different stress
# exponents.
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmax = 0.002
ymax = 0.002
[]
[Variables]
[./temp]
initial_condition = 1000
[../]
[]
[Kernels]
[./dt]
type = ADTimeDerivative
variable = temp
[../]
[./diff]
type = ADDiffusion
variable = temp
[../]
[]
[Physics/SolidMechanics/QuasiStatic/All]
strain = FINITE
add_variables = true
generate_output = 'strain_xx strain_yy strain_xy hydrostatic_stress vonmises_stress'
use_automatic_differentiation = true
[]
[Functions]
[./pull]
type = PiecewiseLinear
x = '0 0.1'
y = '0 1e-5'
[../]
[./tot_effective_viscoplasticity]
type = ParsedFunction
symbol_values = 'lps_1_eff_creep_strain lps_3_eff_creep_strain'
symbol_names = 'lps_1_eff_creep_strain lps_3_eff_creep_strain'
expression = 'lps_1_eff_creep_strain+lps_3_eff_creep_strain'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.3
[../]
[./stress]
type = ADComputeMultipleInelasticStress
inelastic_models = 'one two'
outputs = all
[../]
[./porosity]
type = ADPorosityFromStrain
initial_porosity = 0.1
inelastic_strain = 'combined_inelastic_strain'
outputs = 'all'
[../]
[./one]
type = ADViscoplasticityStressUpdate
coefficient = 'coef_3'
power = 3
base_name = 'lps_1'
outputs = all
relative_tolerance = 1e-11
[../]
[./two]
type = ADViscoplasticityStressUpdate
coefficient = 1e-10
power = 1
base_name = 'lps_3'
outputs = all
relative_tolerance = 1e-11
[../]
[./coef]
type = ADParsedMaterial
property_name = coef_3
# Example of creep power law
coupled_variables = temp
expression = '0.5e-18 * exp(-4e4 / 1.987 / temp)'
[../]
[]
[BCs]
[./no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./pull_disp_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = top
function = pull
[../]
[./temp_ramp]
type = ADFunctionDirichletBC
boundary = right
function = '1000 + 400 * t / 0.12'
variable = temp
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 0.01
end_time = 0.12
[]
[Postprocessors]
[./disp_x]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./disp_y]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
[../]
[./dt]
type = TimestepSize
[../]
[./num_lin]
type = NumLinearIterations
outputs = console
[../]
[./num_nonlin]
type = NumNonlinearIterations
outputs = console
[../]
[./lps_1_eff_creep_strain]
type = ElementAverageValue
variable = lps_1_effective_viscoplasticity
[../]
[./lps_3_eff_creep_strain]
type = ElementAverageValue
variable = lps_3_effective_viscoplasticity
[../]
[./lps_1_gauge_stress]
type = ElementAverageValue
variable = lps_1_gauge_stress
[../]
[./lps_3_gauge_stress]
type = ElementAverageValue
variable = lps_3_gauge_stress
[../]
[./eff_creep_strain_tot]
type = FunctionValuePostprocessor
function = tot_effective_viscoplasticity
[../]
[./porosity]
type = ElementAverageValue
variable = porosity
[../]
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/bernoulli-2d-action.i)
rho=1.1
mu=0
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '1 1'
dy = '0.5'
ix = '3 3'
iy = '2'
subdomain_id = '1 2'
[]
[]
[Modules]
[NavierStokesFV]
compressibility = 'incompressible'
porous_medium_treatment = true
density = 'rho'
dynamic_viscosity = 'mu'
porosity = 'porosity'
initial_velocity = '1 1e-6 0'
initial_pressure = 0.0
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_function = '1 0'
wall_boundaries = 'top bottom'
momentum_wall_types = 'slip slip'
outlet_boundaries = 'right'
momentum_outlet_types = 'fixed-pressure'
pressure_function = '0.4'
porosity_interface_pressure_treatment = 'bernoulli'
mass_advection_interpolation = 'upwind'
momentum_advection_interpolation = 'upwind'
[]
[]
[FunctorMaterials]
[const]
type = ADGenericFunctorMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[]
[AuxVariables]
[porosity]
type = PiecewiseConstantVariable
[]
[]
[ICs]
[porosity_1]
type = ConstantIC
variable = porosity
block = 1
value = 1
[]
[porosity_2]
type = ConstantIC
variable = porosity
block = 2
value = 0.5
[]
[]
[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
[]
[Postprocessors]
[inlet_p]
type = SideAverageValue
variable = 'pressure'
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = superficial_vel_x
boundary = 'right'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/combined/examples/phase_field-mechanics/kks_mechanics_KHS.i)
# KKS phase-field model coupled with elasticity using Khachaturyan's scheme as
# described in L.K. Aagesen et al., Computational Materials Science, 140, 10-21 (2017)
# Original run #170403a
[Mesh]
type = GeneratedMesh
dim = 3
nx = 640
ny = 1
nz = 1
xmin = -10
xmax = 10
ymin = 0
ymax = 0.03125
zmin = 0
zmax = 0.03125
elem_type = HEX8
[]
[Variables]
# order parameter
[./eta]
order = FIRST
family = LAGRANGE
[../]
# solute concentration
[./c]
order = FIRST
family = LAGRANGE
[../]
# chemical potential
[./w]
order = FIRST
family = LAGRANGE
[../]
# solute phase concentration (matrix)
[./cm]
order = FIRST
family = LAGRANGE
[../]
# solute phase concentration (precipitate)
[./cp]
order = FIRST
family = LAGRANGE
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./eta_ic]
variable = eta
type = FunctionIC
function = ic_func_eta
block = 0
[../]
[./c_ic]
variable = c
type = FunctionIC
function = ic_func_c
block = 0
[../]
[./w_ic]
variable = w
type = ConstantIC
value = 0.00991
block = 0
[../]
[./cm_ic]
variable = cm
type = ConstantIC
value = 0.131
block = 0
[../]
[./cp_ic]
variable = cp
type = ConstantIC
value = 0.236
block = 0
[../]
[]
[Functions]
[./ic_func_eta]
type = ParsedFunction
expression = '0.5*(1.0+tanh((x)/delta_eta/sqrt(2.0)))'
symbol_names = 'delta_eta'
symbol_values = '0.8034'
[../]
[./ic_func_c]
type = ParsedFunction
expression = '0.2389*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^3*(6*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^2-15*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))+10)+0.1339*(1-(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^3*(6*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^2-15*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))+10))'
symbol_names = 'delta'
symbol_values = '0.8034'
[../]
[./psi_eq_int]
type = ParsedFunction
expression = 'volume*psi_alpha'
symbol_names = 'volume psi_alpha'
symbol_values = 'volume psi_alpha'
[../]
[./gamma]
type = ParsedFunction
expression = '(psi_int - psi_eq_int) / dy / dz'
symbol_names = 'psi_int psi_eq_int dy dz'
symbol_values = 'psi_int psi_eq_int 0.03125 0.03125'
[../]
[]
[AuxVariables]
[./sigma11]
order = CONSTANT
family = MONOMIAL
[../]
[./sigma22]
order = CONSTANT
family = MONOMIAL
[../]
[./sigma33]
order = CONSTANT
family = MONOMIAL
[../]
[./e11]
order = CONSTANT
family = MONOMIAL
[../]
[./e12]
order = CONSTANT
family = MONOMIAL
[../]
[./e22]
order = CONSTANT
family = MONOMIAL
[../]
[./e33]
order = CONSTANT
family = MONOMIAL
[../]
[./e_el11]
order = CONSTANT
family = MONOMIAL
[../]
[./e_el12]
order = CONSTANT
family = MONOMIAL
[../]
[./e_el22]
order = CONSTANT
family = MONOMIAL
[../]
[./f_el]
order = CONSTANT
family = MONOMIAL
[../]
[./eigen_strain00]
order = CONSTANT
family = MONOMIAL
[../]
[./Fglobal]
order = CONSTANT
family = MONOMIAL
[../]
[./psi]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./matl_sigma11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = sigma11
[../]
[./matl_sigma22]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = sigma22
[../]
[./matl_sigma33]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = sigma33
[../]
[./matl_e11]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 0
index_j = 0
variable = e11
[../]
[./f_el]
type = MaterialRealAux
variable = f_el
property = f_el_mat
execute_on = timestep_end
[../]
[./GlobalFreeEnergy]
variable = Fglobal
type = KKSGlobalFreeEnergy
fa_name = fm
fb_name = fp
w = 0.0264
kappa_names = kappa
interfacial_vars = eta
[../]
[./psi_potential]
variable = psi
type = ParsedAux
coupled_variables = 'Fglobal w c f_el sigma11 e11'
expression = 'Fglobal - w*c + f_el - sigma11*e11'
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = right
value = 0
[../]
[./front_y]
type = DirichletBC
variable = disp_y
boundary = front
value = 0
[../]
[./back_y]
type = DirichletBC
variable = disp_y
boundary = back
value = 0
[../]
[./top_z]
type = DirichletBC
variable = disp_z
boundary = top
value = 0
[../]
[./bottom_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0
[../]
[]
[Materials]
# Chemical free energy of the matrix
[./fm]
type = DerivativeParsedMaterial
property_name = fm
coupled_variables = 'cm'
expression = '6.55*(cm-0.13)^2'
[../]
# Chemical Free energy of the precipitate phase
[./fp]
type = DerivativeParsedMaterial
property_name = fp
coupled_variables = 'cp'
expression = '6.55*(cp-0.235)^2'
[../]
# Elastic energy of the precipitate
[./elastic_free_energy_p]
type = ElasticEnergyMaterial
f_name = f_el_mat
args = 'eta'
outputs = exodus
[../]
# h(eta)
[./h_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta
[../]
# 1- h(eta), putting in function explicitly
[./one_minus_h_eta_explicit]
type = DerivativeParsedMaterial
property_name = one_minus_h_explicit
coupled_variables = eta
expression = 1-eta^3*(6*eta^2-15*eta+10)
outputs = exodus
[../]
# g(eta)
[./g_eta]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'M L kappa misfit'
prop_values = '0.7 0.7 0.01704 0.00377'
[../]
#Mechanical properties
[./Stiffness_matrix]
type = ComputeElasticityTensor
base_name = C_matrix
C_ijkl = '103.3 74.25 74.25 103.3 74.25 103.3 46.75 46.75 46.75'
fill_method = symmetric9
[../]
[./Stiffness_ppt]
type = ComputeElasticityTensor
C_ijkl = '100.7 71.45 71.45 100.7 71.45 100.7 50.10 50.10 50.10'
base_name = C_ppt
fill_method = symmetric9
[../]
[./C]
type = CompositeElasticityTensor
args = eta
tensors = 'C_matrix C_ppt'
weights = 'one_minus_h_explicit h'
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
eigenstrain_names = 'eigenstrain_ppt'
[../]
[./eigen_strain]
type = ComputeVariableEigenstrain
eigen_base = '0.00377 0.00377 0.00377 0 0 0'
prefactor = h
args = eta
eigenstrain_name = 'eigenstrain_ppt'
[../]
[]
[Kernels]
[./TensorMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
# enforce c = (1-h(eta))*cm + h(eta)*cp
[./PhaseConc]
type = KKSPhaseConcentration
ca = cm
variable = cp
c = c
eta = eta
[../]
# enforce pointwise equality of chemical potentials
[./ChemPotVacancies]
type = KKSPhaseChemicalPotential
variable = cm
cb = cp
fa_name = fm
fb_name = fp
[../]
#
# Cahn-Hilliard Equation
#
[./CHBulk]
type = KKSSplitCHCRes
variable = c
ca = cm
fa_name = fm
w = w
[../]
[./dcdt]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./ckernel]
type = SplitCHWRes
mob_name = M
variable = w
[../]
#
# Allen-Cahn Equation
#
[./ACBulkF]
type = KKSACBulkF
variable = eta
fa_name = fm
fb_name = fp
w = 0.0264
args = 'cp cm'
[../]
[./ACBulkC]
type = KKSACBulkC
variable = eta
ca = cm
cb = cp
fa_name = fm
[../]
[./ACBulk_el] #This adds df_el/deta for strain interpolation
type = AllenCahn
variable = eta
f_name = f_el_mat
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = kappa
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm ilu nonzero'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-11
num_steps = 200
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.5
[../]
[]
[Postprocessors]
[./f_el_int]
type = ElementIntegralMaterialProperty
mat_prop = f_el_mat
[../]
[./c_alpha]
type = SideAverageValue
boundary = left
variable = c
[../]
[./c_beta]
type = SideAverageValue
boundary = right
variable = c
[../]
[./e11_alpha]
type = SideAverageValue
boundary = left
variable = e11
[../]
[./e11_beta]
type = SideAverageValue
boundary = right
variable = e11
[../]
[./s11_alpha]
type = SideAverageValue
boundary = left
variable = sigma11
[../]
[./s22_alpha]
type = SideAverageValue
boundary = left
variable = sigma22
[../]
[./s33_alpha]
type = SideAverageValue
boundary = left
variable = sigma33
[../]
[./s11_beta]
type = SideAverageValue
boundary = right
variable = sigma11
[../]
[./s22_beta]
type = SideAverageValue
boundary = right
variable = sigma22
[../]
[./s33_beta]
type = SideAverageValue
boundary = right
variable = sigma33
[../]
[./f_el_alpha]
type = SideAverageValue
boundary = left
variable = f_el
[../]
[./f_el_beta]
type = SideAverageValue
boundary = right
variable = f_el
[../]
[./f_c_alpha]
type = SideAverageValue
boundary = left
variable = Fglobal
[../]
[./f_c_beta]
type = SideAverageValue
boundary = right
variable = Fglobal
[../]
[./chem_pot_alpha]
type = SideAverageValue
boundary = left
variable = w
[../]
[./chem_pot_beta]
type = SideAverageValue
boundary = right
variable = w
[../]
[./psi_alpha]
type = SideAverageValue
boundary = left
variable = psi
[../]
[./psi_beta]
type = SideAverageValue
boundary = right
variable = psi
[../]
[./total_energy]
type = ElementIntegralVariablePostprocessor
variable = Fglobal
[../]
# Get simulation cell size from postprocessor
[./volume]
type = ElementIntegralMaterialProperty
mat_prop = 1
[../]
[./psi_eq_int]
type = FunctionValuePostprocessor
function = psi_eq_int
[../]
[./psi_int]
type = ElementIntegralVariablePostprocessor
variable = psi
[../]
[./gamma]
type = FunctionValuePostprocessor
function = gamma
[../]
[./int_position]
type = FindValueOnLine
start_point = '-10 0 0'
end_point = '10 0 0'
v = eta
target = 0.5
[../]
[]
#
# Precondition using handcoded off-diagonal terms
#
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Outputs]
[./exodus]
type = Exodus
time_step_interval = 20
[../]
checkpoint = true
[./csv]
type = CSV
execute_on = 'final'
[../]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_htonly/gap_heat_transfer_htonly_test.i)
#
# 1-D Gap Heat Transfer Test without mechanics
#
# This test exercises 1-D gap heat transfer for a constant conductivity gap.
#
# The mesh consists of two element blocks containing one element each. Each
# element is a unit cube. They sit next to one another with a unit between them.
#
# The conductivity of both blocks is set very large to achieve a uniform temperature
# across each block. The temperature of the far left boundary
# is ramped from 100 to 200 over one time unit. The temperature of the far right
# boundary is held fixed at 100.
#
# A simple analytical solution is possible for the heat flux between the blocks:
#
# Flux = (T_left - T_right) * (gapK/gap_width)
#
# The gap conductivity is specified as 1, thus
#
# gapK(Tavg) = 1.0*Tavg
#
#
# The heat flux across the gap at time = 1 is then:
#
# Flux(2) = 100 * (1.0/1.0) = 100
#
# For comparison, see results from the flux post processors
#
# This test has been augmented with a second scalar field that solves nearly
# the same problem. The conductivity has been changed to 10. Thus, the
# flux for the second field is 1000.
#
[Mesh]
file = gap_heat_transfer_htonly_test.e
[]
[Functions]
[./temp]
type = PiecewiseLinear
x = '0 1 2'
y = '100 200 200'
[../]
[]
[ThermalContact]
[./thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
[../]
[./awesomium_contact]
type = GapHeatTransfer
variable = awesomium
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
gap_conductivity = 10
appended_property_name = _awesomium
[../]
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
initial_condition = 100
[../]
[./awesomium]
order = FIRST
family = LAGRANGE
initial_condition = 100
[../]
[]
[AuxVariables]
[./gap_cond]
order = CONSTANT
family = MONOMIAL
[../]
[./gap_cond_awesomium]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[./awe]
type = HeatConduction
variable = awesomium
[../]
[]
[BCs]
[./temp_far_left]
type = FunctionDirichletBC
boundary = 1
variable = temp
function = temp
[../]
[./temp_far_right]
type = DirichletBC
boundary = 4
variable = temp
value = 100
[../]
[./awesomium_far_left]
type = FunctionDirichletBC
boundary = 1
variable = awesomium
function = temp
[../]
[./awesomium_far_right]
type = DirichletBC
boundary = 4
variable = awesomium
value = 100
[../]
[]
[AuxKernels]
[./conductance]
type = MaterialRealAux
property = gap_conductance
variable = gap_cond
boundary = 2
[../]
[./conductance_awe]
type = MaterialRealAux
property = gap_conductance_awesomium
variable = gap_cond_awesomium
boundary = 2
[../]
[]
[Materials]
[./heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 100000000.0
[../]
[./density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 4'
line_search = 'none'
nl_rel_tol = 1e-12
l_tol = 1e-3
l_max_its = 100
dt = 1e-1
end_time = 1.0
[]
[Postprocessors]
[./temp_left]
type = SideAverageValue
boundary = 2
variable = temp
execute_on = 'initial timestep_end'
[../]
[./temp_right]
type = SideAverageValue
boundary = 3
variable = temp
execute_on = 'initial timestep_end'
[../]
[./flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[./flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[./awe_left]
type = SideAverageValue
boundary = 2
variable = awesomium
execute_on = 'initial timestep_end'
[../]
[./awe_right]
type = SideAverageValue
boundary = 3
variable = awesomium
execute_on = 'initial timestep_end'
[../]
[./awe_flux_left]
type = SideDiffusiveFluxIntegral
variable = awesomium
boundary = 2
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[./awe_flux_right]
type = SideDiffusiveFluxIntegral
variable = awesomium
boundary = 3
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/controls/time_periods/user_objects/user_object.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
initial_condition = 0.01
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Postprocessors]
[./nodal]
type = AverageNodalVariableValue
variable = u
execute_on = 'TIMESTEP_END'
[../]
[./elemental]
type = ElementAverageValue
variable = u
execute_on = 'TIMESTEP_END'
[../]
[./general]
type = PointValue
point = '0.5 0.5 0'
variable = u
execute_on = 'TIMESTEP_END'
[../]
[./internal_side]
type = NumInternalSides
[../]
[./side]
type = SideAverageValue
boundary = right
variable = u
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
[]
[Controls]
[./pp_control]
type = TimePeriod
enable_objects = '*/nodal */elemental */general */internal_side */side'
start_time = 0.5
end_time = 1
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_htonly/planar_xz.i)
# 1-D Gap Heat Transfer Test without mechanics
#
# This test exercises 1-D gap heat transfer for a constant conductivity gap.
#
# The mesh consists of two element blocks in the x-z plane. Each element block
# is a square. They sit next to one another with a unit between them.
#
# The conductivity of both blocks is set very large to achieve a uniform temperature
# across each block. The temperature of the far bottom boundary
# is ramped from 100 to 200 over one time unit. The temperature of the far top
# boundary is held fixed at 100.
#
# A simple analytical solution is possible for the heat flux between the blocks:
#
# Flux = (T_left - T_right) * (gapK/gap_width)
#
# The gap conductivity is specified as 1, thus
#
# gapK(Tavg) = 1.0*Tavg
#
# The heat flux across the gap at time = 1 is then:
#
# Flux = 100 * (1.0/1.0) = 100
#
# For comparison, see results from the flux post processors. These results
# are the same as for the unit 1-D gap heat transfer between two unit cubes.
[Mesh]
[file]
type = FileMeshGenerator
file = simple_2D.e
[]
[./rotate]
type = TransformGenerator
transform = ROTATE
vector_value = '0 90 0'
input = file
[../]
[]
[Functions]
[./temp]
type = PiecewiseLinear
x = '0 1 2'
y = '100 200 200'
[../]
[]
[ThermalContact]
[./thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
[../]
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
initial_condition = 100
[../]
[]
[AuxVariables]
[./gap_cond]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[]
[BCs]
[./temp_far_bottom]
type = FunctionDirichletBC
boundary = 1
variable = temp
function = temp
[../]
[./temp_far_top]
type = DirichletBC
boundary = 4
variable = temp
value = 100
[../]
[]
[AuxKernels]
[./conductance]
type = MaterialRealAux
property = gap_conductance
variable = gap_cond
boundary = 2
[../]
[]
[Materials]
[./heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 100000000.0
[../]
[./density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 4'
line_search = 'none'
nl_rel_tol = 1e-12
l_tol = 1e-3
l_max_its = 100
dt = 1e-1
end_time = 1.0
[]
[Postprocessors]
[./temp_bottom]
type = SideAverageValue
boundary = 2
variable = temp
execute_on = 'initial timestep_end'
[../]
[./temp_top]
type = SideAverageValue
boundary = 3
variable = temp
execute_on = 'initial timestep_end'
[../]
[./flux_bottom]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[./flux_top]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/heat_source_bar/heat_source_bar.i)
# This is a simple 1D test of the volumetric heat source with material properties
# of a representative ceramic material. A bar is uniformly heated, and a temperature
# boundary condition is applied to the left side of the bar.
# Important properties of problem:
# Length: 0.01 m
# Thermal conductivity = 3.0 W/(mK)
# Specific heat = 300.0 J/K
# density = 10431.0 kg/m^3
# Prescribed temperature on left side: 600 K
# When it has reached steady state, the temperature as a function of position is:
# T = -q/(2*k) (x^2 - 2*x*length) + 600
# or
# T = -6.3333e+7 * (x^2 - 0.02*x) + 600
# on left side: T=600, on right side, T=6933.3
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 0.01
nx = 20
[]
[Variables]
[./temp]
initial_condition = 300.0
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[./heatsource]
type = HeatSource
function = volumetric_heat
variable = temp
[../]
[]
[BCs]
[./lefttemp]
type = DirichletBC
boundary = left
variable = temp
value = 600
[../]
[]
[Materials]
[./density]
type = GenericConstantMaterial
prop_names = 'density thermal_conductivity'
prop_values = '10431.0 3.0'
[../]
[]
[Functions]
[./volumetric_heat]
type = ParsedFunction
expression = 3.8e+8
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./right]
type = SideAverageValue
variable = temp
boundary = right
[../]
[./error]
type = NodalL2Error
function = '-3.8e+8/(2*3) * (x^2 - 2*x*0.01) + 600'
variable = temp
[../]
[]
[Outputs]
execute_on = FINAL
exodus = true
[]
(modules/heat_transfer/test/tests/ad_convective_heat_flux/coupled.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
[]
[Variables]
[./temp]
initial_condition = 200.0
[../]
[]
[Kernels]
[./heat_dt]
type = ADTimeDerivative
variable = temp
[../]
[./heat_conduction]
type = Diffusion
variable = temp
[../]
[./heat]
type = ADBodyForce
variable = temp
value = 0
[../]
[]
[BCs]
[./right]
type = ADConvectiveHeatFluxBC
variable = temp
boundary = 'right'
T_infinity = T_inf
heat_transfer_coefficient = htc
[../]
[]
[Materials]
[chf_mat]
type = ADConvectiveHeatFluxTest
temperature = temp
boundary = 'right'
[]
[]
[Postprocessors]
[./left_temp]
type = SideAverageValue
variable = temp
boundary = left
execute_on = 'TIMESTEP_END initial'
[../]
[./right_temp]
type = SideAverageValue
variable = temp
boundary = right
[../]
[./right_flux]
type = SideDiffusiveFluxAverage
variable = temp
boundary = right
diffusivity = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1
nl_abs_tol = 1e-12
[]
[Outputs]
[./out]
type = CSV
time_step_interval = 10
[../]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_htonly/cyl2D_yz.i)
#
# 2D Cylindrical Gap Heat Transfer Test.
#
# This test exercises 2D gap heat transfer for a constant conductivity gap.
#
# The mesh consists of an inner solid cylinder of radius = 1 unit, and outer
# hollow cylinder with an inner radius of 2 in the y-z plane. In other words,
# the gap between them is 1 radial unit in length.
#
# The calculated results are the same as for the cyl2D.i case in the x-y plane.
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Mesh]
[file]
type = FileMeshGenerator
file = cyl2D.e
[]
[./rotate]
type = TransformGenerator
transform = ROTATE
vector_value = '0 90 90'
input = file
[../]
[]
[Functions]
[./temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[../]
[]
[Variables]
[./temp]
initial_condition = 100
[../]
[]
[AuxVariables]
[./gap_conductance]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./heat_conduction]
type = HeatConduction
variable = temp
[../]
[]
[AuxKernels]
[./gap_cond]
type = MaterialRealAux
property = gap_conductance
variable = gap_conductance
boundary = 2
[../]
[]
[Materials]
[./heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 1000000.0
[../]
[]
[ThermalContact]
[./thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
gap_conductivity = 1
quadrature = true
gap_geometry_type = CYLINDER
cylinder_axis_point_1 = '0 0 0'
cylinder_axis_point_2 = '1 0 0'
[../]
[]
[BCs]
[./mid]
type = FunctionDirichletBC
boundary = 1
variable = temp
function = temp
[../]
[./temp_far_right]
type = DirichletBC
boundary = 4
variable = temp
value = 100
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-7
[./Quadrature]
order = fifth
side_order = seventh
[../]
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[./temp_left]
type = SideAverageValue
boundary = 2
variable = temp
[../]
[./temp_right]
type = SideAverageValue
boundary = 3
variable = temp
[../]
[./flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[../]
[./flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[../]
[]
(modules/navier_stokes/test/tests/finite_element/pins/channel-flow/pm_reverse_flow.i)
# This test case tests the porous-medium flow when flow reversal happens
[GlobalParams]
gravity = '0 0 0'
order = FIRST
family = LAGRANGE
u = vel_x
v = vel_y
pressure = p
temperature = T
porosity = porosity
eos = eos
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 0.1
nx = 10
ny = 4
elem_type = QUAD4
[]
[FluidProperties]
[eos]
type = SimpleFluidProperties
density0 = 100 # kg/m^3
thermal_expansion = 0 # K^{-1}
cp = 100
viscosity = 0.1 # Pa-s, Re=rho*u*L/mu = 100*1*0.1/0.1 = 100
thermal_conductivity = 0.1
[]
[]
[Functions]
[v_in]
type = PiecewiseLinear
x = '0 5 10 1e5'
y = '1 0 -1 -1'
[]
[T_in]
type = PiecewiseLinear
x = '0 1e5'
y = '630 630'
[]
[]
[Variables]
# velocity
[vel_x]
initial_condition = 1
[]
[vel_y]
initial_condition = 0
[]
[p]
initial_condition = 1e5
[]
[T]
scaling = 1e-3
initial_condition = 630
[]
[]
[AuxVariables]
[rho]
initial_condition = 100
[]
[porosity]
initial_condition = 0.4
[]
[vol_heat]
initial_condition = 1e6
[]
[T_out_scalar]
family = SCALAR
order = FIRST
initial_condition = 630
[]
[]
[Materials]
[mat]
type = PINSFEMaterial
alpha = 1000
beta = 100
[]
[]
[Kernels]
[mass_time]
type = PINSFEFluidPressureTimeDerivative
variable = p
[]
[mass_space]
type = INSFEFluidMassKernel
variable = p
[]
[x_momentum_time]
type = PINSFEFluidVelocityTimeDerivative
variable = vel_x
[]
[x_momentum_space]
type = INSFEFluidMomentumKernel
variable = vel_x
component = 0
[]
[y_momentum_time]
type = PINSFEFluidVelocityTimeDerivative
variable = vel_y
[]
[y_momentum_space]
type = INSFEFluidMomentumKernel
variable = vel_y
component = 1
[]
[temperature_time]
type = PINSFEFluidTemperatureTimeDerivative
variable = T
[../]
[temperature_space]
type = INSFEFluidEnergyKernel
variable = T
power_density = vol_heat
[]
[]
[AuxKernels]
[rho_aux]
type = FluidDensityAux
variable = rho
p = p
T = T
fp = eos
[]
[]
[BCs]
# BCs for mass equation
# Inlet
[mass_inlet]
type = INSFEFluidMassBC
variable = p
boundary = 'left'
v_fn = v_in
[]
# Outlet
[./pressure_out]
type = DirichletBC
variable = p
boundary = 'right'
value = 1e5
[../]
# BCs for x-momentum equation
# Inlet
[vx_in]
type = FunctionDirichletBC
variable = vel_x
boundary = 'left'
function = v_in
[]
# Outlet (no BC is needed)
# BCs for y-momentum equation
# Both Inlet and Outlet, and Top and Bottom
[vy]
type = DirichletBC
variable = vel_y
boundary = 'left right bottom top'
value = 0
[]
# BCs for energy equation
[T_in]
type = INSFEFluidEnergyDirichletBC
variable = T
boundary = 'left'
out_norm = '-1 0 0'
T_fn = 630
[]
[T_out]
type = INSFEFluidEnergyDirichletBC
variable = T
boundary = 'right'
out_norm = '1 0 0'
T_scalar = T_out_scalar
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
solve_type = 'PJFNK'
[]
[]
[Postprocessors]
[p_in]
type = SideAverageValue
variable = p
boundary = left
[]
[p_out]
type = SideAverageValue
variable = p
boundary = right
[]
[T_in]
type = SideAverageValue
variable = T
boundary = left
[]
[T_out]
type = SideAverageValue
variable = T
boundary = right
[]
[]
[Executioner]
type = Transient
dt = 0.5
dtmin = 1.e-3
petsc_options_iname = '-pc_type -ksp_gmres_restart'
petsc_options_value = 'lu 100'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-8
nl_max_its = 20
l_tol = 1e-5
l_max_its = 100
start_time = 0.0
end_time = 10
num_steps = 20
[]
[Outputs]
perf_graph = true
print_linear_residuals = false
time_step_interval = 1
execute_on = 'initial timestep_end'
[console]
type = Console
output_linear = false
[]
[out]
type = Exodus
use_displaced = false
hide = 'T_out_scalar'
[]
[]
(modules/thermal_hydraulics/test/tests/components/pump_1phase/pump_pressure_check.i)
# This test checks that the expected pressure rise due to the user supplied
# pump head matches the actual pressure rise across the pump.
# The orientation of flow channels in this test have no components in the z-direction
# due to the expected_pressure_rise_fcn not accounting for hydrostatic pressure.
head = 95.
dt = 0.1
g = 9.81
volume = 0.567
[GlobalParams]
initial_T = 393.15
initial_vel = 0.0372
A = 0.567
f = 0
fp = fp
scaling_factor_1phase = '1 1 1e-5'
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[expected_pressure_rise_fcn]
type = ParsedFunction
expression = 'rhoV * g * head / volume'
symbol_names = 'rhoV g head volume'
symbol_values = 'pump:rhoV ${g} ${head} ${volume}'
[]
[]
[Components]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe1:in'
m_dot = 20
T = 393.15
[]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
initial_p = 1.318964e+07
n_elems = 10
[]
[pump]
type = Pump1Phase
connections = 'pipe1:out pipe2:in'
position = '1.02 0 0'
initial_p = 1.318964e+07
scaling_factor_rhoEV = 1e-5
head = ${head}
volume = ${volume}
A_ref = 0.567
initial_vel_x = 1
initial_vel_y = 1
initial_vel_z = 0
[]
[pipe2]
type = FlowChannel1Phase
position = '1.04 0 0'
orientation = '0 2 0'
length = 0.96
initial_p = 1.4072E+07
n_elems = 10
[]
[outlet]
type = Outlet1Phase
input = 'pipe2:out'
p = 1.4072E+07
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
start_time = 0
dt = ${dt}
num_steps = 4
abort_on_solve_fail = true
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-4
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Postprocessors]
[pump_rhoV]
type = ScalarVariable
variable = pump:rhoV
execute_on = 'initial timestep_end'
[]
[expected_pressure_rise]
type = FunctionValuePostprocessor
function = expected_pressure_rise_fcn
execute_on = 'initial linear'
[]
[p_inlet]
type = SideAverageValue
variable = p
boundary = 'pipe1:out'
execute_on = 'initial linear'
[]
[p_outlet]
type = SideAverageValue
variable = p
boundary = 'pipe2:in'
execute_on = 'initial linear'
[]
[actual_pressure_rise]
type = DifferencePostprocessor
value1 = p_outlet
value2 = p_inlet
execute_on = 'timestep_end'
[]
[pressure_rise_diff]
type = RelativeDifferencePostprocessor
value1 = actual_pressure_rise
value2 = expected_pressure_rise
execute_on = 'timestep_end'
[]
[]
[Outputs]
[out]
type = CSV
execute_on = 'FINAL'
show = 'pressure_rise_diff'
[]
[]
(modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/lps_single_split.i)
# This test provides an example of combining two LPS viscoplasticity model.
# The answer should be close, but not exactly the same, as lps_single.i
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmax = 0.002
ymax = 0.002
[]
[Physics/SolidMechanics/QuasiStatic/All]
strain = FINITE
add_variables = true
generate_output = 'strain_xx strain_yy strain_xy hydrostatic_stress vonmises_stress'
use_automatic_differentiation = true
[]
[Functions]
[./pull]
type = PiecewiseLinear
x = '0 0.1'
y = '0 1e-5'
[../]
[./tot_effective_viscoplasticity]
type = ParsedFunction
symbol_values = 'lps_1_eff_creep_strain lps_2_eff_creep_strain'
symbol_names = 'lps_1_eff_creep_strain lps_2_eff_creep_strain'
expression = 'lps_1_eff_creep_strain+lps_2_eff_creep_strain'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.3
[../]
[./stress]
type = ADComputeMultipleInelasticStress
inelastic_models = 'one two'
outputs = all
[../]
[./porosity]
type = ADPorosityFromStrain
initial_porosity = 0.1
inelastic_strain = 'combined_inelastic_strain'
outputs = 'all'
[../]
[./one]
type = ADViscoplasticityStressUpdate
coefficient = 'coef'
power = 3
base_name = 'lps_first'
outputs = all
relative_tolerance = 1e-11
[../]
[./two]
type = ADViscoplasticityStressUpdate
coefficient = 'coef'
power = 3
base_name = 'lps_second'
outputs = all
relative_tolerance = 1e-11
[../]
[./coef]
type = ADParsedMaterial
property_name = coef
# Example of creep power law
expression = '0.5e-18 * exp(-4e4 / 1.987 / 1200)'
[../]
[]
[BCs]
[./no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./pull_disp_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = top
function = pull
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 0.01
end_time = 0.12
[]
[Postprocessors]
[./disp_x]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./disp_y]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
[../]
[./dt]
type = TimestepSize
[../]
[./num_lin]
type = NumLinearIterations
outputs = console
[../]
[./num_nonlin]
type = NumNonlinearIterations
outputs = console
[../]
[./lps_1_eff_creep_strain]
type = ElementAverageValue
variable = lps_first_effective_viscoplasticity
outputs = none
[../]
[./lps_2_eff_creep_strain]
type = ElementAverageValue
variable = lps_second_effective_viscoplasticity
outputs = none
[../]
[./eff_creep_strain_tot]
type = FunctionValuePostprocessor
function = tot_effective_viscoplasticity
[../]
[./porosity]
type = ElementAverageValue
variable = porosity
[../]
[]
[Outputs]
csv = true
[]
(test/tests/misc/ad_curvature/test-circle.i)
[Mesh]
[circle]
type = FileMeshGenerator
file = circle.msh
[]
[]
[Problem]
solve = false
[]
[AuxVariables]
[curvature]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[curvature]
variable = curvature
type = ADCurvatureAux
execute_on = 'initial'
boundary = outer
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
[Postprocessors]
[average]
type = SideAverageValue
execute_on = 'initial'
variable = curvature
boundary = outer
[]
[]
(tutorials/darcy_thermo_mech/step10_multiapps/problems/step10_micro.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
ymax = 0.1
xmax = 0.1
[]
uniform_refine = 0
[]
[Adaptivity]
max_h_level = 4
initial_steps = 6
initial_marker = error_marker
cycles_per_step = 2
marker = error_marker
[Indicators]
[phi_jump]
type = GradientJumpIndicator
variable = phi
[]
[]
[Markers]
[error_marker]
type = ErrorFractionMarker
indicator = phi_jump
refine = 0.8
coarsen = 0.1
[]
[]
[]
[Variables]
[temperature]
initial_condition = 300
[]
[]
[AuxVariables]
[phi]
[]
[]
[AuxKernels]
[corrosion]
type = RandomCorrosion
variable = phi
reference_temperature = 300
temperature = temperature_in
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Kernels]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[]
[BCs]
[left]
type = PostprocessorDirichletBC
variable = temperature
boundary = left
postprocessor = temperature_in
[]
[right]
type = NeumannBC
variable = temperature
boundary = right
value = 100 # prescribed flux
[]
[]
[Materials]
[column]
type = PackedColumn
temperature = temperature
radius = 1 # mm
phase = phi
[]
[]
[Postprocessors]
[temperature_in]
type = Receiver
default = 301
[]
[k_eff]
type = ThermalConductivity
variable = temperature
T_hot = temperature_in
flux = 100
dx = 0.1
boundary = right
length_scale = 1
k0 = 12.05
execute_on = 'INITIAL TIMESTEP_END'
[]
[average_porosity]
type = ADElementAverageMaterialProperty
mat_prop = porosity
execute_on = 'INITIAL TIMESTEP_END'
[]
[t_right]
type = SideAverageValue
boundary = right
variable = temperature
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
end_time = 1000
dt = 1
steady_state_tolerance = 1e-9
steady_state_detection = true
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
automatic_scaling = true
[]
[Outputs]
execute_on = 'initial timestep_end'
exodus = true
[]
[ICs]
[close_pack]
radius = 0.01 # meter
outvalue = 0 # water
variable = phi
invalue = 1 # steel
type = ClosePackIC
[]
[]
(modules/porous_flow/test/tests/sinks/PorousFlowPiecewiseLinearSink_BC_eg1.i)
## This is an example input file showing how to set a Type I (Dirichlet) BC with PorousFlowPiecewiseLinearSink
##
## Problem setup:
## - The boundaries are set to P(x = 0) = 2e6 Pa, P(x = 1) = 1e6 and run to steady state.
## - The 2d domain is 1 m x 1 m
## - The permeability is set to 1E-15 m2, fluid viscosity = 1E-3 Pa-s
## - The steady state flux is calculated q = -k/mu*grad(P) = 1e-6 m/s
##
## Problem verification (in csv output):
## - The flux in and out of the domain are 1e-6 m/s (matching steady state solution)
## - The pressure at the left and right boundaries are set to 2e6 and 1e6 Pa, respectively
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
xmin = 0
xmax = 1
ny = 2
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[porepressure]
initial_condition = 1.5e6 # initial pressure in domain
[]
[]
[PorousFlowBasicTHM]
porepressure = porepressure
coupling_type = Hydro
gravity = '0 0 0'
fp = the_simple_fluid
[]
[AuxVariables]
[fluxes_out]
[]
[fluxes_in]
[]
[]
[BCs]
[in_left]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = 'left'
pt_vals = '-1e9 1e9' # x coordinates defining g
multipliers = '-1e9 1e9' # y coordinates defining g
PT_shift = 2.E6 # BC pressure
flux_function = 1E-5 # Variable C
fluid_phase = 0
save_in = fluxes_out
[]
[out_right]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = 'right'
pt_vals = '-1e9 1e9' # x coordinates defining g
multipliers = '-1e9 1e9' # y coordinates defining g
PT_shift = 1.E6 # BC pressure
flux_function = 1E-6 # Variable C
fluid_phase = 0
save_in = fluxes_in
[]
[]
[Postprocessors]
[left_flux]
type = NodalSum
boundary = 'left'
variable = fluxes_out
execute_on = 'timestep_end'
[]
[right_flux]
type = NodalSum
boundary = 'right'
variable = fluxes_in
execute_on = 'timestep_end'
[]
[left_pressure]
type = SideAverageValue
boundary = 'left'
variable = porepressure
execute_on = 'timestep_end'
[]
[right_pressure]
type = SideAverageValue
boundary = 'right'
variable = porepressure
execute_on = 'timestep_end'
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0
viscosity = 1.0E-3
density0 = 1000.0
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[biot_modulus]
type = PorousFlowConstantBiotModulus
biot_coefficient = 0.8
solid_bulk_compliance = 2E-7
fluid_bulk_modulus = 1E7
[]
[permeability_aquifer]
type = PorousFlowPermeabilityConst
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-15'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
dt = 1E5
nl_abs_tol = 1E-10
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/negative_porosity.i)
# This test provides an example of an individual LPS viscoplasticity model
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmax = 0.002
ymax = 0.002
[]
[Physics/SolidMechanics/QuasiStatic/All]
strain = FINITE
add_variables = true
generate_output = 'strain_xx strain_yy strain_xy hydrostatic_stress vonmises_stress'
use_automatic_differentiation = true
[]
[Functions]
[./pull]
type = PiecewiseLinear
x = '0 0.1'
y = '0 1e-5'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.3
[../]
[./stress]
type = ADComputeMultipleInelasticStress
inelastic_models = lps
outputs = all
[../]
[./porosity]
type = ADGenericConstantMaterial
prop_names = 'porosity'
prop_values = '-0.1'
outputs = 'all'
[../]
[./lps]
type = ADViscoplasticityStressUpdate
coefficient = 'coef'
power = 3
outputs = all
relative_tolerance = 1e-11
initial_porosity = 0.1
negative_behavior = ZERO
[../]
[./coef]
type = ADParsedMaterial
property_name = coef
# Example of creep power law
expression = '1e-18 * exp(-4e4 / 1.987 / 1200)'
[../]
[]
[BCs]
[./no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./pull_disp_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = top
function = pull
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 0.01
end_time = 0.12
[]
[Postprocessors]
[./disp_x]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./disp_y]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
[../]
[./dt]
type = TimestepSize
[../]
[./num_lin]
type = NumLinearIterations
outputs = console
[../]
[./num_nonlin]
type = NumNonlinearIterations
outputs = console
[../]
[./eff_creep_strain]
type = ElementAverageValue
variable = effective_viscoplasticity
[../]
[./porosity]
type = ElementAverageValue
variable = porosity
[../]
[]
[Outputs]
csv = true
[]
(test/tests/multiapps/picard_postprocessor/transient_main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[time]
type = TimeDerivative
variable = u
[]
[source]
type = BodyForce
variable = u
value = 1
[]
[]
[BCs]
[left]
type = PostprocessorDirichletBC
variable = u
boundary = left
postprocessor = 'from_sub'
[]
[]
[Postprocessors]
[coupling_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[from_sub]
type = Receiver
default = 0
[]
[to_sub]
type = SideAverageValue
variable = u
boundary = right
[]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
# App coupling parameters
fixed_point_max_its = 30
relaxation_factor = 0.8
transformed_postprocessors = 'from_sub'
[]
[Outputs]
csv = true
exodus = false
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = 'transient_sub.i'
clone_parent_mesh = true
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[left_from_sub]
type = MultiAppPostprocessorTransfer
from_multi_app = sub
from_postprocessor = 'to_main'
to_postprocessor = 'from_sub'
reduction_type = 'average'
[]
[right_to_sub]
type = MultiAppPostprocessorTransfer
to_multi_app = sub
from_postprocessor = 'to_sub'
to_postprocessor = 'from_main'
[]
[]
(test/tests/multiapps/secant_postprocessor/steady_main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[source]
type = BodyForce
variable = u
value = 1
[]
[]
[BCs]
[left]
type = PostprocessorDirichletBC
variable = u
boundary = left
postprocessor = 'from_sub'
[]
[]
[Postprocessors]
[from_sub]
type = Receiver
default = 0
[]
[to_sub]
type = SideAverageValue
variable = u
boundary = right
[]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Steady
# Solve parameters
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
# App coupling parameters
fixed_point_algorithm = 'secant'
fixed_point_max_its = 100
transformed_postprocessors = 'from_sub'
[]
[Outputs]
csv = true
exodus = false
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = steady_sub.i
clone_parent_mesh = true
execute_on = 'timestep_begin'
# we keep the full postprocessor output history of the subapp
keep_full_output_history = true
transformed_postprocessors = 'from_main'
[]
[]
[Transfers]
[left_from_sub]
type = MultiAppPostprocessorTransfer
from_multi_app = sub
from_postprocessor = 'to_main'
to_postprocessor = 'from_sub'
reduction_type = 'average'
[]
[right_to_sub]
type = MultiAppPostprocessorTransfer
to_multi_app = sub
from_postprocessor = 'to_sub'
to_postprocessor = 'from_main'
[]
[]
(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/solid_mechanics/tutorials/basics/part_2.4.i)
#Tensor Mechanics tutorial: the basics
#Step 2, part 4
#2D axisymmetric RZ simulation of uniaxial tension with J2 plasticity with
#hardening
[GlobalParams]
displacements = 'disp_r disp_z'
[]
[Problem]
coord_type = RZ
[]
[Mesh]
file = necking_quad4.e
uniform_refine = 0
second_order = true
[]
[Physics/SolidMechanics/QuasiStatic]
[./block1]
strain = FINITE
add_variables = true
generate_output = 'stress_yy strain_yy vonmises_stress'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeMultiPlasticityStress
ep_plastic_tolerance = 1e-9
plastic_models = J2
[../]
[]
[UserObjects]
[./hardening]
type = SolidMechanicsHardeningCubic
value_0 = 2.4e2
value_residual = 3.0e2
internal_0 = 0
internal_limit = 0.005
[../]
[./J2]
type = SolidMechanicsPlasticJ2
yield_strength = hardening
yield_function_tolerance = 1E-9
internal_constraint_tolerance = 1E-9
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = disp_r
boundary = left
value = 0.0
[../]
[./bottom]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0.0
[../]
[./top]
type = FunctionDirichletBC
variable = disp_z
boundary = top
function = '0.0007*t'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
dt = 0.25
end_time = 20
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -sub_pc_type -pc_asm_overlap -ksp_gmres_restart'
petsc_options_value = 'asm lu 1 101'
[]
[Postprocessors]
[./ave_stress_bottom]
type = SideAverageValue
variable = stress_yy
boundary = bottom
[../]
[./ave_strain_bottom]
type = SideAverageValue
variable = strain_yy
boundary = bottom
[../]
[]
[Outputs]
exodus = true
perf_graph = true
csv = true
print_linear_residuals = false
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/2d-rc-friction.i)
mu = 1.1
rho = 1
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '2.5 2.5'
dy = '1.0'
ix = '20 20'
iy = '20'
subdomain_id = '1 2'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = superficial_vel_x
v = superficial_vel_y
pressure = pressure
porosity = porosity
[]
[]
[Variables]
inactive = 'lambda'
[superficial_vel_x]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[superficial_vel_y]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1e-6
[]
[pressure]
type = INSFVPressureVariable
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 0.5
[]
[]
[FVKernels]
inactive = 'mean-pressure'
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_x
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_x
mu = ${mu}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_x
momentum_component = 'x'
pressure = pressure
porosity = porosity
[]
[u_friction]
type = PINSFVMomentumFriction
variable = superficial_vel_x
momentum_component = 'x'
Darcy_name = 'Darcy_coefficient'
Forchheimer_name = 'Forchheimer_coefficient'
mu = ${mu}
rho = ${rho}
speed = speed
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_y
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'y'
[]
[v_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_y
mu = ${mu}
porosity = porosity
momentum_component = 'y'
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_y
momentum_component = 'y'
pressure = pressure
porosity = porosity
[]
[v_friction]
type = PINSFVMomentumFriction
variable = superficial_vel_y
momentum_component = 'y'
Darcy_name = 'Darcy_coefficient'
Forchheimer_name = 'Forchheimer_coefficient'
rho = ${rho}
speed = speed
mu = ${mu}
[]
[mean-pressure]
type = FVIntegralValueConstraint
variable = pressure
lambda = lambda
phi0 = 0.01
[]
[]
[FVBCs]
inactive = 'free-slip-u free-slip-v'
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = superficial_vel_x
function = '1'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = superficial_vel_y
function = 0
[]
[no-slip-u]
type = INSFVNoSlipWallBC
boundary = 'top'
variable = superficial_vel_x
function = 0
[]
[no-slip-v]
type = INSFVNoSlipWallBC
boundary = 'top'
variable = superficial_vel_y
function = 0
[]
[free-slip-u]
type = INSFVNaturalFreeSlipBC
boundary = 'top'
variable = superficial_vel_x
momentum_component = 'x'
[]
[free-slip-v]
type = INSFVNaturalFreeSlipBC
boundary = 'top'
variable = superficial_vel_y
momentum_component = 'y'
[]
[symmetry-u]
type = PINSFVSymmetryVelocityBC
boundary = 'bottom'
variable = superficial_vel_x
u = superficial_vel_x
v = superficial_vel_y
mu = ${mu}
momentum_component = 'x'
[]
[symmetry-v]
type = PINSFVSymmetryVelocityBC
boundary = 'bottom'
variable = superficial_vel_y
u = superficial_vel_x
v = superficial_vel_y
mu = ${mu}
momentum_component = 'y'
[]
[symmetry-p]
type = INSFVSymmetryPressureBC
boundary = 'bottom'
variable = pressure
[]
[outlet-p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 0
[]
[]
[FunctorMaterials]
[darcy]
type = ADGenericVectorFunctorMaterial
prop_names = 'Darcy_coefficient Forchheimer_coefficient'
prop_values = '0.1 0.1 0.1 0.1 0.1 0.1'
[]
[speec]
type = PINSFVSpeedFunctorMaterial
superficial_vel_x = superficial_vel_x
superficial_vel_y = superficial_vel_y
porosity = porosity
[]
[]
[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-p]
type = SideAverageValue
variable = pressure
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = superficial_vel_x
boundary = 'right'
[]
[]
[Outputs]
exodus = 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
function = '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/heat_transfer/test/tests/gap_heat_transfer_htonly/cyl3D.i)
#
# 3D Cylindrical Gap Heat Transfer Test.
#
# This test exercises 3D gap heat transfer for a constant conductivity gap.
#
# The mesh consists of an inner solid cylinder of radius = 1 unit, and outer
# hollow cylinder with an inner radius of 2. In other words, the gap between
# them is 1 radial unit in length.
#
# The conductivity of both cylinders is set very large to achieve a uniform
# temperature in each cylinder. The temperature of the center node of the
# inner cylinder is ramped from 100 to 200 over one time unit. The temperature
# of the outside of the outer, hollow cylinder is held fixed at 100.
#
# A simple analytical solution is possible for the integrated heat flux
# between the inner and outer cylinders:
#
# Integrated Flux = (T_left - T_right) * (gapK/(r*ln(r2/r1))) * Area
#
# For gapK = 1 (default value)
#
# The area is taken as the area of the secondary (inner) surface:
#
# Area = 2 * pi * h * r, where h is the height of the cylinder.
#
# The integrated heat flux across the gap at time 1 is then:
#
# 2*pi*h*k*delta_T/(ln(r2/r1))
# 2*pi*1*1*100/(ln(2/1)) = 906.5 watts
#
# For comparison, see results from the integrated flux post processors.
# This simulation makes use of symmetry, so only 1/4 of the cylinders is meshed
# As such, the integrated flux from the post processors is 1/4 of the total,
# or 226.6 watts.
# The value coming from the post processor is slightly less than this
# but converges as mesh refinement increases.
#
# Simulating contact is challenging. Regression tests that exercise
# contact features can be difficult to solve consistently across multiple
# platforms. While designing these tests, we felt it worth while to note
# some aspects of these tests. The following applies to:
# sphere3D.i, sphere2DRZ.i, cyl2D.i, and cyl3D.i.
# 1. We decided that to perform consistently across multiple platforms we
# would use very small convergence tolerance. In this test we chose an
# nl_rel_tol of 1e-12.
# 2. Due to such a high value for thermal conductivity (used here so that the
# domains come to a uniform temperature) the integrated flux at time = 0
# was relatively large (the value coming from SideIntegralFlux =
# -_diffusion_coef[_qp]*_grad_u[_qp]*_normals[_qp] where the diffusion coefficient
# here is thermal conductivity).
# Even though _grad_u[_qp] is small, in this case the diffusion coefficient
# is large. The result is a number that isn't exactly zero and tends to
# fail exodiff. For this reason the parameter execute_on = initial should not
# be used. That parameter is left to default settings in these regression tests.
#
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Mesh]
file = cyl3D.e
[]
[Functions]
[./temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[../]
[]
[Variables]
[./temp]
initial_condition = 100
[../]
[]
[AuxVariables]
[./gap_conductance]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./heat_conduction]
type = HeatConduction
variable = temp
[../]
[]
[AuxKernels]
[./gap_cond]
type = MaterialRealAux
property = gap_conductance
variable = gap_conductance
boundary = 2
[../]
[]
[Materials]
[./heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 1000000.0
[../]
[]
[ThermalContact]
[./thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
gap_conductivity = 1
quadrature = true
gap_geometry_type = CYLINDER
cylinder_axis_point_1 = '0 0 0'
cylinder_axis_point_2 = '0 1 0'
[../]
[]
[BCs]
[./mid]
type = FunctionDirichletBC
boundary = 5
variable = temp
function = temp
[../]
[./temp_far_right]
type = DirichletBC
boundary = 4
variable = temp
value = 100
[../]
[]
[Executioner]
type = Transient
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-7
[./Quadrature]
order = fifth
side_order = seventh
[../]
[]
[Outputs]
exodus = true
[./Console]
type = Console
[../]
[]
[Postprocessors]
[./temp_left]
type = SideAverageValue
boundary = 2
variable = temp
[../]
[./temp_right]
type = SideAverageValue
boundary = 3
variable = temp
[../]
[./flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[../]
[./flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[../]
[]
(modules/heat_transfer/test/tests/recover/recover.i)
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
file = recover_in.e
[]
[Variables]
[./temp]
initial_condition = 580.0
[../]
[]
[AuxVariables]
[./gap_cond]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[./heat_source]
type = BodyForce
variable = temp
block = pellet_type_1
value = 1e3
function = 't'
[../]
[]
[ThermalContact]
[./thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 5
secondary = 10
emissivity_primary = 0
emissivity_secondary = 0
quadrature = true
[../]
[]
[BCs]
[./outside]
type = DirichletBC
value = 580
boundary = '1 2 3'
variable = temp
[../]
[./edge]
type = DirichletBC
value = 700
boundary = 10
variable = temp
[../]
[]
[Materials]
[./thermal_3]
type = HeatConductionMaterial
block = 3
thermal_conductivity = 5
specific_heat = 12
[../]
[./thermal_1]
type = HeatConductionMaterial
block = 1
thermal_conductivity = 16.0
specific_heat = 330.0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu superlu_dist'
nl_rel_tol = 1e-9
nl_abs_tol = 1e-11
start_time = -200
n_startup_steps = 1
end_time = 1.02e5
num_steps = 10
dtmax = 2e6
dtmin = 1
[./TimeStepper]
type = IterationAdaptiveDT
dt = 2.0e2
optimal_iterations = 15
iteration_window = 2
[../]
[./Quadrature]
order = FIFTH
side_order = SEVENTH
[../]
[]
[Postprocessors]
[./ave_temp_interior]
type = SideAverageValue
boundary = 9
variable = temp
execute_on = 'initial linear'
[../]
[./avg_clad_temp]
type = SideAverageValue
boundary = 7
variable = temp
execute_on = 'initial timestep_end'
[../]
[./flux_from_clad]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 5
diffusivity = thermal_conductivity
[../]
[./_dt]
type = TimestepSize
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/picard_postprocessor/steady_main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[source]
type = BodyForce
variable = u
value = 1
[]
[]
[BCs]
[left]
type = PostprocessorDirichletBC
variable = u
boundary = left
postprocessor = 'from_sub'
[]
[]
[Postprocessors]
[from_sub]
type = Receiver
default = 0
[]
[to_sub]
type = SideAverageValue
variable = u
boundary = right
[]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Steady
# Solve parameters
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
# App coupling parameters
fixed_point_max_its = 100
fixed_point_rel_tol = 0.5 # pseudo transient is slow to converge
relaxation_factor = 0.8
transformed_postprocessors = 'from_sub'
[]
[Outputs]
csv = true
exodus = false
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = steady_sub.i
clone_parent_mesh = true
execute_on = 'timestep_begin'
# we keep the full postprocessor output history of the subapp
keep_full_output_history = true
relaxation_factor = 0.8
transformed_postprocessors = 'from_main'
[]
[]
[Transfers]
[left_from_sub]
type = MultiAppPostprocessorTransfer
from_multi_app = sub
from_postprocessor = 'to_main'
to_postprocessor = 'from_sub'
reduction_type = 'average'
[]
[right_to_sub]
type = MultiAppPostprocessorTransfer
to_multi_app = sub
from_postprocessor = 'to_sub'
to_postprocessor = 'from_main'
[]
[]
(modules/thermal_hydraulics/test/tests/controls/copy_postprocessor_value_control/test.i)
# This is testing that the values copied by CopyPostprocessorValueControl are used.
# A postprocessor T_pt samples value at point (0, 0, 0), those values are then
# read in by CopyPostprocessorValueControl and then we output this value. The values
# are lagged by one time step, because controls are executed at the beginning
# of the time step and postprocessors at the end of the time step. Note that
# CopyPostprocessorValueControl is added when a postprocessor is created. That's why
# you do not see the object in this input file.
[GlobalParams]
initial_p = 100.e3
initial_vel = 1.0
initial_T = 350.
scaling_factor_1phase = '1 1e-2 1e-4'
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
fp = fp
position = '0 0 0'
orientation = '1 0 0'
length = 15.0
n_elems = 10
A = 0.01
D_h = 0.1
f = 0.01
[]
[inlet]
type = InletStagnationPressureTemperature1Phase
input = 'pipe1:in'
p0 = 100.e3
T0 = 340.
[]
[outlet]
type = Outlet1Phase
input = 'pipe1:out'
p = 100.0e3
[]
[]
[Postprocessors]
[T_pt]
type = SideAverageValue
boundary = pipe1:in
variable = T
execute_on = 'initial timestep_end'
[]
[T_ctrl]
type = RealControlDataValuePostprocessor
control_data_name = T_pt
execute_on = timestep_end
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
start_time = 0
dt = 1e-5
num_steps = 3
abort_on_solve_fail = true
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
nl_max_its = 20
l_tol = 1e-3
l_max_its = 5
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/uel/small_test_umat_states_fields_gradient.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
xmax = 10
ymax = 3
elem_type = TRI3
[]
[pin]
type = ExtraNodesetGenerator
nodes = 106
new_boundary = pin
input = gen
[]
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[temperature]
initial_condition = 400
[]
[voltage]
initial_condition = 210
[]
[]
[AuxKernels]
[temperature]
type = FunctionAux
function = '25* x + 40 * y + 400'
variable = temperature
[]
[voltage]
type = FunctionAux
function = '10 * x + 4 * y + 210'
variable = voltage
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = pin
value = 0
[]
inactive = 'right_dirichlet'
[right_neumann]
type = FunctionNeumannBC
variable = disp_x
function = t/10
boundary = right
[]
[right_dirichlet]
type = FunctionDirichletBC
variable = disp_x
function = t/10
boundary = right
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = SMALL
incremental = true
extra_vector_tags = 'kernel_residual'
[]
[]
[Materials]
[umat]
type = AbaqusUMATStress
constant_properties = '100 0.3'
plugin = '../../plugins/small_elastic_tri_states'
num_state_vars = 2
use_one_based_indexing = true
temperature = 'temperature'
external_fields = 'voltage'
[]
[]
[Problem]
kernel_coverage_check = false
extra_tag_vectors = 'kernel_residual'
[]
[AuxVariables]
[res_x]
[]
[res_y]
[]
[]
[AuxKernels]
[res_x]
type = TagVectorAux
variable = res_x
v = disp_x
vector_tag = kernel_residual
[]
[res_y]
type = TagVectorAux
variable = res_y
v = disp_y
vector_tag = kernel_residual
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
dt = 1
num_steps = 15
[Quadrature]
type = GAUSS
order = CONSTANT
[]
[]
[Postprocessors]
[delta_l]
type = SideAverageValue
variable = disp_x
boundary = right
execute_on = 'INITIAL TIMESTEP_END'
[]
[V]
type = ElementIntegralMaterialProperty
mat_prop = 1
use_displaced_mesh = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/multiapps/picard_postprocessor/steady_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[sink]
type = BodyForce
variable = u
value = -1
[]
[]
[BCs]
[right]
type = PostprocessorDirichletBC
variable = u
boundary = right
postprocessor = 'from_main'
[]
[]
[Postprocessors]
[from_main]
type = Receiver
default = 0
[]
[to_main]
type = SideAverageValue
variable = u
boundary = left
[]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
[]
[Outputs]
csv = true
exodus = false
[]
(modules/solid_mechanics/test/tests/uel/small_test_expanded.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
xmax = 10
ymax = 3
elem_type = TRI3
[]
[pin]
type = ExtraNodesetGenerator
nodes = 106
new_boundary = pin
input = gen
[]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = pin
value = 0
[]
inactive = 'right_dirichlet'
[right_neumann]
type = FunctionNeumannBC
variable = disp_x
function = t
boundary = right
[]
[right_dirichlet]
type = FunctionDirichletBC
variable = disp_x
function = t/10
boundary = right
[]
[]
[UserObjects]
[uel]
type = AbaqusUserElement
variables = 'disp_x disp_y'
plugin = ../../../examples/uel_tri_tests/uel
use_displaced_mesh = false
num_state_vars = 18
constant_properties = '100 0.3' # E nu
extra_vector_tags = 'kernel_residual'
[]
[]
[Problem]
kernel_coverage_check = false
extra_tag_vectors = 'kernel_residual'
[]
[AuxVariables]
[res_x]
[]
[res_y]
[]
[]
[AuxKernels]
[res_x]
type = TagVectorAux
variable = res_x
v = disp_x
vector_tag = kernel_residual
[]
[res_y]
type = TagVectorAux
variable = res_y
v = disp_y
vector_tag = kernel_residual
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
dt = 1
num_steps = 15
[]
[Postprocessors]
[delta_l]
type = SideAverageValue
variable = disp_x
boundary = right
execute_on = 'INITIAL TIMESTEP_END'
[]
[V]
type = ElementIntegralMaterialProperty
mat_prop = 1
use_displaced_mesh = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/multiapps/steffensen_postprocessor/transient_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[time]
type = TimeDerivative
variable = u
[]
[sink]
type = BodyForce
variable = u
value = -1
[]
[]
[BCs]
[right]
type = PostprocessorDirichletBC
variable = u
boundary = right
postprocessor = 'from_main'
[]
[]
[Postprocessors]
[from_main]
type = Receiver
default = 0
[]
[to_main]
type = SideAverageValue
variable = u
boundary = left
[]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
fixed_point_algorithm = 'steffensen'
[]
[Outputs]
[csv]
type = CSV
start_step = 6
[]
exodus = false
[]
(modules/navier_stokes/test/tests/finite_volume/cns/pressure_outlet/subsonic_nozzle_fixed_inflow_hllc.i)
inlet_vel = 120
rho_in = 0.8719748696
H_in = 4.0138771448e+05
gamma = 1.4
R = 8.3145
molar_mass = 29e-3
R_specific = ${fparse R / molar_mass}
cp = ${fparse gamma * R_specific / (gamma - 1)}
cv = ${fparse cp / gamma}
T_in = ${fparse H_in / gamma / cv}
mass_flux = ${fparse inlet_vel * rho_in}
outlet_pressure = 0.9e5
[GlobalParams]
fp = fp
[]
[Debug]
show_material_props = true
[]
[Mesh]
[file]
type = FileMeshGenerator
file = subsonic_nozzle.e
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Variables]
[rho]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 0.8719748696
[]
[rho_u]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 1e-4
[]
[rho_v]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[rho_E]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 2.5e5
[]
[]
[FVKernels]
# Mass conservation
[mass_time]
type = FVTimeKernel
variable = rho
[]
[mass_advection]
type = CNSFVMassHLLC
variable = rho
[]
# Momentum x conservation
[momentum_x_time]
type = FVTimeKernel
variable = rho_u
[]
[momentum_x_advection]
type = CNSFVMomentumHLLC
variable = rho_u
momentum_component = x
[]
# Momentum y conservation
[momentum_y_time]
type = FVTimeKernel
variable = rho_v
[]
[momentum_y_advection]
type = CNSFVMomentumHLLC
variable = rho_v
momentum_component = y
[]
# Fluid energy conservation
[fluid_energy_time]
type = FVTimeKernel
variable = rho_E
[]
[fluid_energy_advection]
type = CNSFVFluidEnergyHLLC
variable = rho_E
[]
[]
[FVBCs]
## inflow boundaries
[mass_inflow]
type = CNSFVHLLCSpecifiedMassFluxAndTemperatureMassBC
variable = rho
boundary = left
rhou = ${mass_flux}
rhov = 0
temperature = ${T_in}
[]
[momentum_x_inflow]
type = CNSFVHLLCSpecifiedMassFluxAndTemperatureMomentumBC
variable = rho_u
boundary = left
rhou = ${mass_flux}
rhov = 0
temperature = ${T_in}
momentum_component = x
[]
[momentum_y_inflow]
type = CNSFVHLLCSpecifiedMassFluxAndTemperatureMomentumBC
variable = rho_v
boundary = left
rhou = ${mass_flux}
rhov = 0
temperature = ${T_in}
momentum_component = y
[]
[fluid_energy_inflow]
type = CNSFVHLLCSpecifiedMassFluxAndTemperatureFluidEnergyBC
variable = rho_E
boundary = left
rhou = ${mass_flux}
rhov = 0
temperature = ${T_in}
[]
## outflow conditions
[mass_outflow]
type = CNSFVHLLCSpecifiedPressureMassBC
variable = rho
boundary = right
pressure = ${outlet_pressure}
[]
[momentum_x_outflow]
type = CNSFVHLLCSpecifiedPressureMomentumBC
variable = rho_u
boundary = right
momentum_component = x
pressure = ${outlet_pressure}
[]
[momentum_y_outflow]
type = CNSFVHLLCSpecifiedPressureMomentumBC
variable = rho_v
boundary = right
momentum_component = y
pressure = ${outlet_pressure}
[]
[fluid_energy_outflow]
type = CNSFVHLLCSpecifiedPressureFluidEnergyBC
variable = rho_E
boundary = right
pressure = ${outlet_pressure}
[]
# wall conditions
[momentum_x_pressure_wall]
type = CNSFVMomImplicitPressureBC
variable = rho_u
momentum_component = x
boundary = wall
[]
[momentum_y_pressure_wall]
type = CNSFVMomImplicitPressureBC
variable = rho_v
momentum_component = y
boundary = wall
[]
[]
[AuxVariables]
[Ma]
family = MONOMIAL
order = CONSTANT
[]
[p]
family = MONOMIAL
order = CONSTANT
[]
[Ma_layered]
family = MONOMIAL
order = CONSTANT
[]
[]
[UserObjects]
[layered_Ma_UO]
type = LayeredAverage
variable = Ma
num_layers = 10
direction = x
[]
[]
[AuxKernels]
[Ma_aux]
type = NSMachAux
variable = Ma
fluid_properties = fp
use_material_properties = true
[]
[p_aux]
type = ADMaterialRealAux
variable = p
property = pressure
[]
[Ma_layered_aux]
type = SpatialUserObjectAux
variable = Ma_layered
user_object = layered_Ma_UO
[]
[]
[Materials]
[var_mat]
type = ConservedVarValuesMaterial
rho = rho
rhou = rho_u
rhov = rho_v
rho_et = rho_E
[]
[sound_speed]
type = SoundspeedMat
[]
[]
[Postprocessors]
[outflow_Ma]
type = SideAverageValue
variable = Ma
boundary = right
[]
[outflow_pressure]
type = SideAverageValue
variable = p
boundary = right
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[]
[Executioner]
type = Transient
end_time = 10
solve_type = NEWTON
nl_abs_tol = 1e-7
[TimeIntegrator]
type = ImplicitEuler
[]
[TimeStepper]
type = IterationAdaptiveDT
dt = 5e-3
optimal_iterations = 6
growth_factor = 1.5
[]
[]
[VectorPostprocessors]
[Ma_layered]
type = LineValueSampler
variable = Ma_layered
start_point = '0 0 0'
end_point = '3 0 0'
num_points = 100
sort_by = x
warn_discontinuous_face_values = false
[]
[]
[Outputs]
[out]
type = Exodus
execute_on = 'final'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/heated/2d-rc-heated-effective.i)
mu = 1
rho = 1
cp = 1
u_inlet = 1
T_inlet = 200
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 1
nx = 100
ny = 20
[]
[left]
type = ParsedSubdomainMeshGenerator
input = gen
combinatorial_geometry = 'x > 3 & x < 6'
block_id = 1
[]
[right]
type = ParsedSubdomainMeshGenerator
input = left
combinatorial_geometry = 'x < 3'
block_id = 2
[]
[more-right]
type = ParsedSubdomainMeshGenerator
input = right
combinatorial_geometry = 'x > 6'
block_id = 3
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = superficial_vel_x
v = superficial_vel_y
pressure = pressure
porosity = porosity
[]
[]
[Variables]
[superficial_vel_x]
type = PINSFVSuperficialVelocityVariable
initial_condition = ${u_inlet}
[]
[superficial_vel_y]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1e-6
[]
[pressure]
type = INSFVPressureVariable
[]
[T_fluid]
type = INSFVEnergyVariable
[]
[]
[AuxVariables]
[T_solid]
family = 'MONOMIAL'
order = 'CONSTANT'
fv = true
initial_condition = 100
[]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 0.5
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_x
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_x
mu = ${mu}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_x
momentum_component = 'x'
pressure = pressure
porosity = porosity
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_y
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'y'
[]
[v_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_y
mu = ${mu}
porosity = porosity
momentum_component = 'y'
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_y
momentum_component = 'y'
pressure = pressure
porosity = porosity
[]
[energy_advection]
type = PINSFVEnergyAdvection
variable = T_fluid
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
[]
[energy_diffusion_1]
type = PINSFVEnergyAnisotropicDiffusion
kappa = 'kappa'
variable = T_fluid
porosity = porosity
block = '1 2'
[]
[energy_diffusion_2]
type = PINSFVEnergyAnisotropicDiffusion
kappa = 'kappa'
variable = T_fluid
porosity = porosity
block = '3'
[]
[energy_convection]
type = PINSFVEnergyAmbientConvection
variable = T_fluid
is_solid = false
T_fluid = T_fluid
T_solid = T_solid
h_solid_fluid = 'h_cv'
[]
[]
[FVBCs]
inactive = 'inlet-T-dirichlet'
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = superficial_vel_x
function = ${u_inlet}
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = superficial_vel_y
function = 0
[]
[inlet-T]
type = FVNeumannBC
variable = T_fluid
value = '${fparse u_inlet * rho * cp * T_inlet}'
boundary = 'left'
[]
[inlet-T-dirichlet]
type = FVDirichletBC
variable = T_fluid
value = '${T_inlet}'
boundary = 'left'
[]
[no-slip-u]
type = INSFVNoSlipWallBC
boundary = 'top'
variable = superficial_vel_x
function = 0
[]
[no-slip-v]
type = INSFVNoSlipWallBC
boundary = 'top'
variable = superficial_vel_y
function = 0
[]
[symmetry-u]
type = PINSFVSymmetryVelocityBC
boundary = 'bottom'
variable = superficial_vel_x
u = superficial_vel_x
v = superficial_vel_y
mu = ${mu}
momentum_component = 'x'
[]
[symmetry-v]
type = PINSFVSymmetryVelocityBC
boundary = 'bottom'
variable = superficial_vel_y
u = superficial_vel_x
v = superficial_vel_y
mu = ${mu}
momentum_component = 'y'
[]
[symmetry-p]
type = INSFVSymmetryPressureBC
boundary = 'bottom'
variable = pressure
[]
[outlet-p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 0.1
[]
[]
[FunctorMaterials]
[constants]
type = ADGenericFunctorMaterial
prop_names = 'h_cv'
prop_values = '1'
[]
[functor_constants]
type = ADGenericFunctorMaterial
prop_names = 'cp'
prop_values = '${cp}'
[]
[kappa]
type = ADGenericVectorFunctorMaterial
prop_names = 'kappa'
prop_values = '1e-3 1e-2 1e-1'
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
rho = ${rho}
temperature = 'T_fluid'
[]
[]
[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
[]
# Some basic Postprocessors to examine the solution
[Postprocessors]
[inlet-p]
type = SideAverageValue
variable = pressure
boundary = 'left'
[]
[outlet-u]
type = SideAverageValue
variable = superficial_vel_x
boundary = 'right'
[]
[outlet-temp]
type = SideAverageValue
variable = T_fluid
boundary = 'right'
[]
[solid-temp]
type = ElementAverageValue
variable = T_solid
[]
[]
[Outputs]
exodus = true
csv = false
[]
(modules/functional_expansion_tools/examples/2D_interface_different_submesh/main.i)
# Derived from the example '2D_interface' with the following differences:
#
# 1) The number of y divisions in the sub app is not the same as the master app
# 2) The subapp mesh is skewed in y
# 3) The Functional Expansion order for the flux term was increased to 7
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0.0
xmax = 0.4
nx = 6
ymin = 0.0
ymax = 10.0
ny = 20
[]
[Variables]
[./m]
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./source_m]
type = BodyForce
variable = m
value = 100
[../]
[]
[Materials]
[./Impervium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '0.00001 50.0 100.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
value = 2
variable = m
[../]
[]
[BCs]
[./interface_value]
type = FXValueBC
variable = m
boundary = right
function = FX_Basis_Value_Main
[../]
[./interface_flux]
type = FXFluxBC
boundary = right
variable = m
function = FX_Basis_Flux_Main
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '4'
physical_bounds = '0.0 10'
y = Legendre
[../]
[./FX_Basis_Flux_Main]
type = FunctionSeries
series_type = Cartesian
orders = '7'
physical_bounds = '0.0 10'
y = Legendre
[../]
[]
[UserObjects]
[./FX_Flux_UserObject_Main]
type = FXBoundaryFluxUserObject
function = FX_Basis_Flux_Main
variable = m
boundary = right
diffusivity = thermal_conductivity
[../]
[]
[Postprocessors]
[./average_interface_value]
type = SideAverageValue
variable = m
boundary = right
[../]
[./total_flux]
type = SideDiffusiveFluxIntegral
variable = m
boundary = right
diffusivity = thermal_conductivity
[../]
[./picard_iterations]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1.0
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
sub_cycling = true
[../]
[]
[Transfers]
[./FluxToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Flux_UserObject_Main
multi_app_object_name = FX_Basis_Flux_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[./FluxToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Flux_Main
multi_app_object_name = FX_Flux_UserObject_Sub
[../]
[]
(modules/solid_mechanics/test/tests/thermal_expansion_function/instantaneous.i)
# This test checks the thermal expansion calculated via a instantaneous thermal expansion coefficient.
# The coefficient is selected so as to result in a 1e-4 strain in the x-axis, and to cross over
# from positive to negative strain.
[Mesh]
[./gen]
type = GeneratedMeshGenerator
dim = 3
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./temp]
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = SMALL
add_variables = true
eigenstrain_names = eigenstrain
generate_output = 'strain_xx strain_yy strain_zz'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./bottom]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./back]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[]
[AuxKernels]
[./temp]
type = FunctionAux
variable = temp
function = '1 + t'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./thermal_expansion_strain]
type = ComputeInstantaneousThermalExpansionFunctionEigenstrain
thermal_expansion_function = 4e-4
stress_free_temperature = 1.5
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Postprocessors]
[./disp_x_max]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./temp_avg]
type = ElementAverageValue
variable = temp
[../]
[]
[Executioner]
type = Transient
end_time = 1.0
dt = 0.1
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/ad_thermal_expansion_function/instantaneous_complex.i)
# This test checks the thermal expansion calculated via a mean thermal expansion coefficient.
# The coefficient is selected so as to result in a 1e-4 strain in the x-axis, and to cross over
# from positive to negative strain.
[Mesh]
[./gen]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 4
nz = 4
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./temp]
[../]
[]
[Kernels]
[./temp_diff]
type = ADDiffusion
variable = temp
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = SMALL
add_variables = true
eigenstrain_names = eigenstrain
generate_output = 'strain_xx strain_yy strain_zz'
use_automatic_differentiation = true
[../]
[]
[BCs]
[./left]
type = ADDirichletBC
variable = disp_x
boundary = 'left'
value = 0.0
[../]
[./bottom]
type = ADDirichletBC
variable = disp_y
boundary = 'bottom'
value = 0.0
[../]
[./back]
type = ADDirichletBC
variable = disp_z
boundary = 'back'
value = 0.0
[../]
[./temp]
type = ADFunctionDirichletBC
variable = temp
boundary = 'front back top bottom left right'
function = '1 + t'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1
poissons_ratio = 0.3
[../]
[./stress]
type = ADComputeLinearElasticStress
[../]
[./thermal_expansion_strain]
type = ADComputeInstantaneousThermalExpansionFunctionEigenstrain
thermal_expansion_function = cte_func_mean
stress_free_temperature = 1
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Functions]
[./cte_func_mean]
type = ParsedFunction
expression = '1e-6 + 1e-8 * t + 1e-8 * t^2 + exp(t) * 1e-2'
[../]
[]
[Postprocessors]
[./disp_x_max]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./temp_avg]
type = ElementAverageValue
variable = temp
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
num_steps = 1
[]
[Outputs]
csv = true
[]
(modules/thermal_hydraulics/test/tests/components/junction_parallel_channels_1phase/junction_with_calorifically_imperfect_gas.i)
# This input file tests compatibility of JunctionParallelChannels1Phase and CaloricallyImperfectGas.
# Loss coefficient is applied in first junction.
# Expected pressure drop from form loss ~0.5*K*rho_in*vel_in^2=0.5*100*3.219603*1 = 160.9 Pa
# Pressure drop from averall flow area change ~ 21.9 Pa
# Expected pressure drop ~ 182.8 Pa
T_in = 523.0
vel = 1
p_out = 7e6
[GlobalParams]
initial_p = ${p_out}
initial_vel = ${vel}
initial_T = ${T_in}
gravity_vector = '0 0 0'
closures = simple_closures
n_elems = 3
f = 0
scaling_factor_1phase = '1 1 1e-5'
scaling_factor_rhoV = '1e2'
scaling_factor_rhowV = '1e-2'
scaling_factor_rhoEV = '1e-5'
[]
[Functions]
[e_fn]
type = PiecewiseLinear
x = '100 280 300 350 400 450 500 550 600 700 800 900 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 5000'
y = '783.9 2742.3 2958.6 3489.2 4012.7 4533.3 5053.8 5574 6095.1 7140.2 8192.9 9256.3 10333.6 12543.9 14836.6 17216.3 19688.4 22273.7 25018.3 28042.3 31544.2 35818.1 41256.5 100756.5'
scale_factor = 1e3
[]
[mu_fn]
type = PiecewiseLinear
x = '100 280 300 350 400 450 500 550 600 700 800 900 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 5000'
y = '85.42 85.42 89.53 99.44 108.9 117.98 126.73 135.2 143.43 159.25 174.36 188.9 202.96 229.88 255.5 280.05 303.67 326.45 344.97 366.49 387.87 409.48 431.86 431.86'
scale_factor = 1e-7
[]
[k_fn]
type = PiecewiseLinear
x = '100 280 300 350 400 450 500 550 600 700 800 900 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 5000'
y = '186.82 186.82 194.11 212.69 231.55 250.38 268.95 287.19 305.11 340.24 374.92 409.66 444.75 511.13 583.42 656.44 733.32 826.53 961.15 1180.38 1546.31 2135.49 3028.08 3028.08'
scale_factor = 1e-3
[]
[]
[FluidProperties]
[fp]
type = CaloricallyImperfectGas
molar_mass = 0.002
e = e_fn
k = k_fn
mu = mu_fn
min_temperature = 100
max_temperature = 5000
out_of_bound_error = false
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[inlet_bc]
type = InletVelocityTemperature1Phase
input = 'inlet:in'
vel = ${vel}
T = ${T_in}
[]
[inlet]
type = FlowChannel1Phase
fp = fp
position = '0 0 11'
orientation = '0 0 -1'
length = 1
A = 3
[]
[inlet_plenum]
type = JunctionParallelChannels1Phase
position = '0 0 10'
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = ${vel}
K = 100
connections = 'inlet:out channel1:in channel2:in'
volume = 1
[]
[channel1]
type = FlowChannel1Phase
fp = fp
position = '0 0 10'
orientation = '0 0 -1'
length = 10
A = 4
D_h = 1
[]
[channel2]
type = FlowChannel1Phase
fp = fp
position = '0 0 10'
orientation = '0 0 -1'
length = 10
A = 1
D_h = 1
[]
[outlet_plenum]
type = JunctionParallelChannels1Phase
position = '0 0 0'
initial_vel_x = 1
initial_vel_y = 0
initial_vel_z = ${vel}
connections = 'channel1:out channel2:out outlet:in'
volume = 1
[]
[outlet]
type = FlowChannel1Phase
fp = fp
position = '0 0 0'
orientation = '0 0 -1'
length = 1
A = 1
[]
[outlet_bc]
type = Outlet1Phase
p = ${p_out}
input = 'outlet:out'
[]
[]
[Postprocessors]
[p_in]
type = SideAverageValue
variable = p
boundary = inlet:in
[]
[p_out]
type = SideAverageValue
variable = p
boundary = outlet:out
[]
[Delta_p]
type = DifferencePostprocessor
value1 = p_out
value2 = p_in
[]
[inlet_in_m_dot]
type = ADFlowBoundaryFlux1Phase
boundary = 'inlet_bc'
equation = mass
[]
[inlet_out_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'inlet:out'
connection_index = 0
junction = inlet_plenum
equation = mass
[]
[channel1_in_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'channel1:in'
connection_index = 1
junction = inlet_plenum
equation = mass
[]
[channel1_out_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'channel1:out'
connection_index = 0
junction = outlet_plenum
equation = mass
[]
[channel2_in_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'channel2:in'
connection_index = 2
junction = inlet_plenum
equation = mass
[]
[channel2_out_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'channel2:out'
connection_index = 1
junction = outlet_plenum
equation = mass
[]
[outlet_in_m_dot]
type = ADFlowJunctionFlux1Phase
boundary = 'outlet:in'
connection_index = 2
junction = outlet_plenum
equation = mass
[]
[outlet_out_m_dot]
type = ADFlowBoundaryFlux1Phase
boundary = 'outlet_bc'
equation = mass
[]
[net_mass_flow_rate_domain]
type = LinearCombinationPostprocessor
pp_names = 'inlet_in_m_dot outlet_out_m_dot'
pp_coefs = '1 -1'
[]
[net_mass_flow_rate_volume_junction]
type = LinearCombinationPostprocessor
pp_names = 'inlet_out_m_dot channel1_in_m_dot channel2_in_m_dot'
pp_coefs = '1 -1 -1'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
start_time = 0
end_time = 20
[TimeStepper]
type = IterationAdaptiveDT
dt = 1
optimal_iterations = 8
iteration_window = 2
[]
timestep_tolerance = 1e-6
abort_on_solve_fail = true
line_search = basic
nl_rel_tol = 1e-8
nl_abs_tol = 2e-8
nl_max_its = 25
l_tol = 1e-3
l_max_its = 5
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu '
[]
[Outputs]
[out]
type = CSV
execute_on = 'FINAL'
show = 'net_mass_flow_rate_domain net_mass_flow_rate_volume_junction Delta_p'
[]
[]
(modules/porous_flow/examples/ates/ates.i)
# Simulation designed to assess the recovery efficiency of a single-well ATES system
# Using KT stabilisation
# Boundary conditions: fixed porepressure and temperature at top, bottom and far end of model.
#####################################
flux_limiter = minmod # minmod, vanleer, mc, superbee, none
# depth of top of aquifer (m)
depth = 400
inject_fluid_mass = 1E8 # kg
produce_fluid_mass = ${inject_fluid_mass} # kg
inject_temp = 90 # degC
inject_time = 91 # days
store_time = 91 # days
produce_time = 91 # days
rest_time = 91 # days
num_cycles = 5 # Currently needs to be <= 10
cycle_length = ${fparse inject_time + store_time + produce_time + rest_time}
end_simulation = ${fparse cycle_length * num_cycles}
# Note: I have setup 10 cycles but you can set num_cycles less than 10.
start_injection1 = 0
start_injection2 = ${cycle_length}
start_injection3 = ${fparse cycle_length * 2}
start_injection4 = ${fparse cycle_length * 3}
start_injection5 = ${fparse cycle_length * 4}
start_injection6 = ${fparse cycle_length * 5}
start_injection7 = ${fparse cycle_length * 6}
start_injection8 = ${fparse cycle_length * 7}
start_injection9 = ${fparse cycle_length * 8}
start_injection10 = ${fparse cycle_length * 9}
end_injection1 = ${fparse start_injection1 + inject_time}
end_injection2 = ${fparse start_injection2 + inject_time}
end_injection3 = ${fparse start_injection3 + inject_time}
end_injection4 = ${fparse start_injection4 + inject_time}
end_injection5 = ${fparse start_injection5 + inject_time}
end_injection6 = ${fparse start_injection6 + inject_time}
end_injection7 = ${fparse start_injection7 + inject_time}
end_injection8 = ${fparse start_injection8 + inject_time}
end_injection9 = ${fparse start_injection9 + inject_time}
end_injection10 = ${fparse start_injection10 + inject_time}
start_production1 = ${fparse end_injection1 + store_time}
start_production2 = ${fparse end_injection2 + store_time}
start_production3 = ${fparse end_injection3 + store_time}
start_production4 = ${fparse end_injection4 + store_time}
start_production5 = ${fparse end_injection5 + store_time}
start_production6 = ${fparse end_injection6 + store_time}
start_production7 = ${fparse end_injection7 + store_time}
start_production8 = ${fparse end_injection8 + store_time}
start_production9 = ${fparse end_injection9 + store_time}
start_production10 = ${fparse end_injection10 + store_time}
end_production1 = ${fparse start_production1 + produce_time}
end_production2 = ${fparse start_production2 + produce_time}
end_production3 = ${fparse start_production3 + produce_time}
end_production4 = ${fparse start_production4 + produce_time}
end_production5 = ${fparse start_production5 + produce_time}
end_production6 = ${fparse start_production6 + produce_time}
end_production7 = ${fparse start_production7 + produce_time}
end_production8 = ${fparse start_production8 + produce_time}
end_production9 = ${fparse start_production9 + produce_time}
end_production10 = ${fparse start_production10 + produce_time}
synctimes = '${start_injection1} ${end_injection1} ${start_production1} ${end_production1}
${start_injection2} ${end_injection2} ${start_production2} ${end_production2}
${start_injection3} ${end_injection3} ${start_production3} ${end_production3}
${start_injection4} ${end_injection4} ${start_production4} ${end_production4}
${start_injection5} ${end_injection5} ${start_production5} ${end_production5}
${start_injection6} ${end_injection6} ${start_production6} ${end_production6}
${start_injection7} ${end_injection7} ${start_production7} ${end_production7}
${start_injection8} ${end_injection8} ${start_production8} ${end_production8}
${start_injection9} ${end_injection9} ${start_production9} ${end_production9}
${start_injection10} ${end_injection10} ${start_production10} ${end_production10}'
#####################################
# Geometry in RZ coordinates
# borehole radius (m)
bh_r = 0.1
# model radius (m)
max_r = 1000
# aquifer thickness (m)
aq_thickness = 20
# cap thickness (m)
cap_thickness = 40
# injection region top and bottom (m). Note, the mesh is created with the aquifer in y = (-0.5 * aq_thickness, 0.5 * aq_thickness), irrespective of depth (depth only sets the insitu porepressure and temperature)
screen_top = ${fparse 0.5 * aq_thickness}
screen_bottom = ${fparse -0.5 * aq_thickness}
# number of elements in radial direction
num_r = 25
# number of elements across half height of aquifer
num_y_aq = 10
# number of elements across height of cap
num_y_cap = 8
# mesh bias in radial direction
bias_r = 1.22
# mesh bias in vertical direction in aquifer top
bias_y_aq_top = 0.9
# mesh bias in vertical direction in cap top
bias_y_cap_top = 1.3
# mesh bias in vertical direction in aquifer bottom
bias_y_aq_bottom = ${fparse 1.0 / bias_y_aq_top}
# mesh bias in vertical direction in cap bottom
bias_y_cap_bottom = ${fparse 1.0 / bias_y_cap_top}
depth_centre = ${fparse depth + aq_thickness/2}
#####################################
# temperature at ground surface (degC)
temp0 = 20
# Vertical geothermal gradient (K/m). A positive number means temperature increases downwards.
geothermal_gradient = 20E-3
#####################################
# Gravity
gravity = -9.81
#####################################
half_aq_thickness = ${fparse aq_thickness * 0.5}
half_height = ${fparse half_aq_thickness + cap_thickness}
approx_screen_length = ${fparse screen_top - screen_bottom}
# Thermal radius (note this is not strictly correct, it should use the bulk specific heat
# capacity as defined below, but it doesn't matter here because this is purely for
# defining the region of refined mesh)
th_r = ${fparse sqrt(inject_fluid_mass / 1000 * 4.12e6 / (approx_screen_length * 3.1416 * aq_specific_heat_cap * aq_density))}
# radius of fine mesh
fine_r = ${fparse th_r * 2}
bias_r_fine = 1
num_r_fine = ${fparse int(fine_r/1)}
######################################
# aquifer properties
aq_porosity = 0.25
aq_hor_perm = 1E-11 # m^2
aq_ver_perm = 2E-12 # m^2
aq_density = 2650 # kg/m^3
aq_specific_heat_cap = 800 # J/Kg/K
aq_hor_thermal_cond = 3 # W/m/K
aq_ver_thermal_cond = 3 # W/m/K
aq_disp_parallel = 0 # m
aq_disp_perp = 0 # m
# Bulk volumetric heat capacity of aquifer:
aq_vol_cp = ${fparse aq_specific_heat_cap * aq_density * (1 - aq_porosity) + 4180 * 1000 * aq_porosity}
# Thermal radius (correct version using bulk cp):
R_th = ${fparse sqrt(inject_fluid_mass * 4180 / (approx_screen_length * 3.1416 * aq_vol_cp))}
aq_lambda_eff_hor = ${fparse aq_hor_thermal_cond + 0.3 * aq_disp_parallel * R_th * aq_vol_cp / (inject_time * 60 * 60 * 24)}
aq_lambda_eff_ver = ${fparse aq_ver_thermal_cond + 0.3 * aq_disp_perp * R_th * aq_vol_cp / (inject_time * 60 * 60 * 24)}
aq_hor_dry_thermal_cond = ${fparse aq_lambda_eff_hor * 60 * 60 * 24} # J/day/m/K
aq_ver_dry_thermal_cond = ${fparse aq_lambda_eff_ver * 60 * 60 * 24} # J/day/m/K
aq_hor_wet_thermal_cond = ${fparse aq_lambda_eff_hor * 60 * 60 * 24} # J/day/m/K
aq_ver_wet_thermal_cond = ${fparse aq_lambda_eff_ver * 60 * 60 * 24} # J/day/m/K
# cap-rock properties
cap_porosity = 0.25
cap_hor_perm = 1E-16 # m^2
cap_ver_perm = 1E-17 # m^2
cap_density = 2650 # kg/m^3
cap_specific_heat_cap = 800 # J/kg/K
cap_hor_thermal_cond = 3 # W/m/K
cap_ver_thermal_cond = 3 # W/m/K
cap_hor_dry_thermal_cond = ${fparse cap_hor_thermal_cond * 60 * 60 * 24} # J/day/m/K
cap_ver_dry_thermal_cond = ${fparse cap_ver_thermal_cond * 60 * 60 * 24} # J/day/m/K
cap_hor_wet_thermal_cond = ${fparse cap_hor_thermal_cond * 60 * 60 * 24} # J/day/m/K
cap_ver_wet_thermal_cond = ${fparse cap_ver_thermal_cond * 60 * 60 * 24} # J/day/m/K
######################################
[Mesh]
coord_type = RZ
[aq_top_fine]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r_fine}
xmin = ${bh_r}
xmax = ${fine_r}
bias_x = ${bias_r_fine}
bias_y = ${bias_y_aq_top}
ny = ${num_y_aq}
ymin = 0
ymax = ${half_aq_thickness}
[]
[cap_top_fine]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r_fine}
xmin = ${bh_r}
xmax = ${fine_r}
bias_x = ${bias_r_fine}
bias_y = ${bias_y_cap_top}
ny = ${num_y_cap}
ymax = ${half_height}
ymin = ${half_aq_thickness}
[]
[aq_and_cap_top_fine]
type = StitchedMeshGenerator
inputs = 'aq_top_fine cap_top_fine'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'top bottom'
[]
[aq_bottom_fine]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r_fine}
xmin = ${bh_r}
xmax = ${fine_r}
bias_x = ${bias_r_fine}
bias_y = ${bias_y_aq_bottom}
ny = ${num_y_aq}
ymax = 0
ymin = -${half_aq_thickness}
[]
[cap_bottom_fine]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r_fine}
xmin = ${bh_r}
xmax = ${fine_r}
bias_x = ${bias_r_fine}
bias_y = ${bias_y_cap_bottom}
ny = ${num_y_cap}
ymin = -${half_height}
ymax = -${half_aq_thickness}
[]
[aq_and_cap_bottom_fine]
type = StitchedMeshGenerator
inputs = 'aq_bottom_fine cap_bottom_fine'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'bottom top'
[]
[aq_and_cap_fine]
type = StitchedMeshGenerator
inputs = 'aq_and_cap_bottom_fine aq_and_cap_top_fine'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'top bottom'
[]
[aq_top]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r}
xmin = ${fine_r}
xmax = ${max_r}
bias_x = ${bias_r}
bias_y = ${bias_y_aq_top}
ny = ${num_y_aq}
ymin = 0
ymax = ${half_aq_thickness}
[]
[cap_top]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r}
xmin = ${fine_r}
xmax = ${max_r}
bias_x = ${bias_r}
bias_y = ${bias_y_cap_top}
ny = ${num_y_cap}
ymax = ${half_height}
ymin = ${half_aq_thickness}
[]
[aq_and_cap_top]
type = StitchedMeshGenerator
inputs = 'aq_top cap_top'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'top bottom'
[]
[aq_bottom]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r}
xmin = ${fine_r}
xmax = ${max_r}
bias_x = ${bias_r}
bias_y = ${bias_y_aq_bottom}
ny = ${num_y_aq}
ymax = 0
ymin = -${half_aq_thickness}
[]
[cap_bottom]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r}
xmin = ${fine_r}
xmax = ${max_r}
bias_x = ${bias_r}
bias_y = ${bias_y_cap_bottom}
ny = ${num_y_cap}
ymin = -${half_height}
ymax = -${half_aq_thickness}
[]
[aq_and_cap_bottom]
type = StitchedMeshGenerator
inputs = 'aq_bottom cap_bottom'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'bottom top'
[]
[aq_and_cap]
type = StitchedMeshGenerator
inputs = 'aq_and_cap_bottom aq_and_cap_top'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'top bottom'
[]
[aq_and_cap_all]
type = StitchedMeshGenerator
inputs = 'aq_and_cap_fine aq_and_cap'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'right left'
[]
[aquifer]
type = ParsedSubdomainMeshGenerator
input = aq_and_cap_all
combinatorial_geometry = 'y >= -${half_aq_thickness} & y <= ${half_aq_thickness}'
block_id = 1
[]
[top_cap]
type = ParsedSubdomainMeshGenerator
input = aquifer
combinatorial_geometry = 'y >= ${half_aq_thickness}'
block_id = 2
[]
[bottom_cap]
type = ParsedSubdomainMeshGenerator
input = top_cap
combinatorial_geometry = 'y <= -${half_aq_thickness}'
block_id = 3
[]
[injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x<=${bh_r}*1.000001 & y >= ${screen_bottom} & y <= ${screen_top}'
included_subdomains = 1
new_sideset_name = 'injection_area'
input = 'bottom_cap'
[]
[rename]
type = RenameBlockGenerator
old_block = '1 2 3'
new_block = 'aquifer caps caps'
input = 'injection_area'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 ${gravity} 0'
[]
[Variables]
[porepressure]
[]
[temperature]
scaling = 1E-5
[]
[]
[PorousFlowFullySaturated]
coupling_type = ThermoHydro
porepressure = porepressure
temperature = temperature
fp = tabulated_water
stabilization = KT
flux_limiter_type = ${flux_limiter}
use_displaced_mesh = false
temperature_unit = Celsius
pressure_unit = Pa
time_unit = days
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = insitu_pressure
[]
[temperature]
type = FunctionIC
variable = temperature
function = insitu_temperature
[]
[]
[BCs]
[outer_boundary_porepressure]
type = FunctionDirichletBC
preset = true
variable = porepressure
function = insitu_pressure
boundary = 'bottom right top'
[]
[outer_boundary_temperature]
type = FunctionDirichletBC
preset = true
variable = temperature
function = insitu_temperature
boundary = 'bottom right top'
[]
[inject_heat]
type = FunctionDirichletBC
variable = temperature
function = ${inject_temp}
boundary = 'injection_area'
[]
[inject_fluid]
type = PorousFlowSink
variable = porepressure
boundary = injection_area
flux_function = injection_rate_value
[]
[produce_heat]
type = PorousFlowSink
variable = temperature
boundary = injection_area
flux_function = production_rate_value
fluid_phase = 0
use_enthalpy = true
save_in = heat_flux_out
[]
[produce_fluid]
type = PorousFlowSink
variable = porepressure
boundary = injection_area
flux_function = production_rate_value
[]
[]
[Controls]
[inject_on]
type = ConditionalFunctionEnableControl
enable_objects = 'BCs::inject_heat BCs::inject_fluid'
conditional_function = inject
implicit = false
execute_on = 'initial timestep_begin'
[]
[produce_on]
type = ConditionalFunctionEnableControl
enable_objects = 'BCs::produce_heat BCs::produce_fluid'
conditional_function = produce
implicit = false
execute_on = 'initial timestep_begin'
[]
[]
[Functions]
[insitu_pressure]
type = ParsedFunction
expression = '(y - ${depth_centre}) * 1000 * ${gravity} + 1E5' # approx insitu pressure in Pa
[]
[insitu_temperature]
type = ParsedFunction
expression = '${temp0} + (${depth_centre} - y) * ${geothermal_gradient}'
[]
[inject]
type = ParsedFunction
expression = 'if(t >= ${start_injection1} & t < ${end_injection1}, 1,
if(t >= ${start_injection2} & t < ${end_injection2}, 1,
if(t >= ${start_injection3} & t < ${end_injection3}, 1,
if(t >= ${start_injection4} & t < ${end_injection4}, 1,
if(t >= ${start_injection5} & t < ${end_injection5}, 1,
if(t >= ${start_injection6} & t < ${end_injection6}, 1,
if(t >= ${start_injection7} & t < ${end_injection7}, 1,
if(t >= ${start_injection8} & t < ${end_injection8}, 1,
if(t >= ${start_injection9} & t < ${end_injection9}, 1,
if(t >= ${start_injection10} & t < ${end_injection10}, 1, 0))))))))))'
[]
[produce]
type = ParsedFunction
expression = 'if(t >= ${start_production1} & t < ${end_production1}, 1,
if(t >= ${start_production2} & t < ${end_production2}, 1,
if(t >= ${start_production3} & t < ${end_production3}, 1,
if(t >= ${start_production4} & t < ${end_production4}, 1,
if(t >= ${start_production5} & t < ${end_production5}, 1,
if(t >= ${start_production6} & t < ${end_production6}, 1,
if(t >= ${start_production7} & t < ${end_production7}, 1,
if(t >= ${start_production8} & t < ${end_production8}, 1,
if(t >= ${start_production9} & t < ${end_production9}, 1,
if(t >= ${start_production10} & t < ${end_production10}, 1, 0))))))))))'
[]
[injection_rate_value]
type = ParsedFunction
symbol_names = true_screen_area
symbol_values = true_screen_area
expression = '-${inject_fluid_mass}/(true_screen_area * ${inject_time})'
[]
[production_rate_value]
type = ParsedFunction
symbol_names = true_screen_area
symbol_values = true_screen_area
expression = '${produce_fluid_mass}/(true_screen_area * ${produce_time})'
[]
[heat_out_in_timestep]
type = ParsedFunction
symbol_names = 'dt heat_out'
symbol_values = 'dt heat_out_fromBC'
expression = 'dt*heat_out'
[]
[produced_T_time_integrated]
type = ParsedFunction
symbol_names = 'dt produced_T'
symbol_values = 'dt produced_T'
expression = 'dt*produced_T / ${produce_time}'
[]
[]
[AuxVariables]
[density]
family = MONOMIAL
order = CONSTANT
[]
[porosity]
family = MONOMIAL
order = CONSTANT
[]
[heat_flux_out]
outputs = none
[]
[]
[AuxKernels]
[density]
type = PorousFlowPropertyAux
variable = density
property = density
[]
[porosity]
type = PorousFlowPropertyAux
variable = porosity
property = porosity
[]
[]
[FluidProperties]
[true_water]
type = Water97FluidProperties
[]
[tabulated_water]
type = TabulatedFluidProperties
fp = true_water
temperature_min = 275 # K
temperature_max = 600
interpolated_properties = 'density viscosity enthalpy internal_energy'
fluid_property_file = water97_tabulated_modified.csv
[]
[]
[Materials]
[porosity_aq]
type = PorousFlowPorosityConst
porosity = ${aq_porosity}
block = aquifer
[]
[porosity_caps]
type = PorousFlowPorosityConst
porosity = ${cap_porosity}
block = caps
[]
[permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '${aq_hor_perm} 0 0 0 ${aq_ver_perm} 0 0 0 0'
[]
[permeability_caps]
type = PorousFlowPermeabilityConst
block = caps
permeability = '${cap_hor_perm} 0 0 0 ${cap_ver_perm} 0 0 0 0'
[]
[aq_internal_energy]
type = PorousFlowMatrixInternalEnergy
block = aquifer
density = ${aq_density}
specific_heat_capacity = ${aq_specific_heat_cap}
[]
[caps_internal_energy]
type = PorousFlowMatrixInternalEnergy
block = caps
density = ${cap_density}
specific_heat_capacity = ${cap_specific_heat_cap}
[]
[aq_thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
block = aquifer
dry_thermal_conductivity = '${aq_hor_dry_thermal_cond} 0 0 0 ${aq_ver_dry_thermal_cond} 0 0 0 0'
wet_thermal_conductivity = '${aq_hor_wet_thermal_cond} 0 0 0 ${aq_ver_wet_thermal_cond} 0 0 0 0'
[]
[caps_thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
block = caps
dry_thermal_conductivity = '${cap_hor_dry_thermal_cond} 0 0 0 ${cap_ver_dry_thermal_cond} 0 0 0 0'
wet_thermal_conductivity = '${cap_hor_wet_thermal_cond} 0 0 0 ${cap_ver_wet_thermal_cond} 0 0 0 0'
[]
[]
[Postprocessors]
[true_screen_area] # this accounts for meshes that do not match screen_top and screen_bottom exactly
type = AreaPostprocessor
boundary = injection_area
execute_on = 'initial'
outputs = 'none'
[]
[dt]
type = TimestepSize
[]
[heat_out_fromBC]
type = NodalSum
variable = heat_flux_out
boundary = injection_area
execute_on = 'initial timestep_end'
outputs = 'none'
[]
[heat_out_per_timestep]
type = FunctionValuePostprocessor
function = heat_out_in_timestep
execute_on = 'timestep_end'
outputs = 'none'
[]
[heat_out_cumulative]
type = CumulativeValuePostprocessor
postprocessor = heat_out_per_timestep
execute_on = 'timestep_end'
outputs = 'csv console'
[]
[produced_T]
type = SideAverageValue
boundary = injection_area
variable = temperature
execute_on = 'initial timestep_end'
outputs = 'csv console'
[]
[produced_T_time_integrated]
type = FunctionValuePostprocessor
function = produced_T_time_integrated
execute_on = 'timestep_end'
outputs = 'none'
[]
[produced_T_cumulative]
type = CumulativeValuePostprocessor
postprocessor = produced_T_time_integrated
execute_on = 'timestep_end'
outputs = 'csv console'
[]
[]
[Preconditioning]
[basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = ${end_simulation}
timestep_tolerance = 1e-5
[TimeStepper]
type = IterationAdaptiveDT
dt = 1e-3
growth_factor = 2
[]
dtmax = 1
dtmin = 1e-5
# rough calc for fluid, |R| ~ V*k*1E6 ~ V*1E-5
# rough calc for heat, |R| ~ V*(lam*1E-3 + h*1E-5) ~ V*(1E3 + 1E-2)
# so scale heat by 1E-7 and go for nl_abs_tol = 1E-4, which should give a max error of
# ~1Pa and ~0.1K in the first metre around the borehole
nl_abs_tol = 1E-4
nl_rel_tol = 1E-5
[]
[Outputs]
sync_times = ${synctimes}
[ex]
type = Exodus
time_step_interval = 20
[]
[csv]
type = CSV
execute_postprocessors_on = 'initial timestep_end'
[]
[]
(modules/solid_mechanics/test/tests/ad_thermal_expansion_function/dilatation.i)
# This test checks the thermal expansion calculated via an dilatation function.
# The coefficient is selected so as to result in a 1e-4 strain in the x-axis, and to cross over
# from positive to negative strain.
[Mesh]
[./gen]
type = GeneratedMeshGenerator
dim = 3
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./temp]
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = SMALL
add_variables = true
eigenstrain_names = eigenstrain
generate_output = 'strain_xx strain_yy strain_zz'
use_automatic_differentiation = true
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./bottom]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./back]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[]
[AuxKernels]
[./temp]
type = FunctionAux
variable = temp
function = '1 + t'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1
poissons_ratio = 0.3
[../]
[./stress]
type = ADComputeLinearElasticStress
[../]
[./thermal_expansion_strain]
type = ADComputeDilatationThermalExpansionFunctionEigenstrain
dilatation_function = cte_dilatation
stress_free_temperature = 1.5
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Functions]
[./cte_dilatation]
type = PiecewiseLinear
x = '1 2'
y = '-1e-4 1e-4'
[../]
[]
[Postprocessors]
[./disp_x_max]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./temp_avg]
type = ElementAverageValue
variable = temp
[../]
[]
[Executioner]
type = Transient
end_time = 1.0
dt = 0.1
[]
[Outputs]
csv = true
[]
(modules/thermal_hydraulics/test/tests/components/flow_component_ns/flow_component_ns_pinc.i)
# Operating conditions
u_inlet = 1
p_outlet = 0
[AuxVariables]
[porosity]
type = MooseVariableFVReal
initial_condition = 0.5
[]
[velocity_norm]
type = MooseVariableFVReal
[]
[]
[Components]
[comp1]
type = FlowComponentNS
file = rectangle.e
position = '0 0 0'
compressibility = 'incompressible'
porous_medium_treatment = true
density = 'rho'
dynamic_viscosity = 'mu'
initial_velocity = '${u_inlet} 0 0'
initial_pressure = '${p_outlet}'
mass_advection_interpolation = 'upwind'
momentum_advection_interpolation = 'upwind'
inlet_boundaries = 'comp1:left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_function = '${u_inlet} 0'
wall_boundaries = 'comp1:top comp1:bottom'
momentum_wall_types = 'noslip symmetry'
outlet_boundaries = 'comp1:right'
momentum_outlet_types = 'fixed-pressure'
pressure_function = '${p_outlet}'
[]
[comp2]
type = FlowComponentNS
file = rectangle.e
position = '0 2 0'
compressibility = 'incompressible'
porous_medium_treatment = true
density = 'rho'
dynamic_viscosity = 'mu'
initial_velocity = '${u_inlet} 0 0'
initial_pressure = '${p_outlet}'
inlet_boundaries = 'comp2:left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_function = '${u_inlet} 0'
wall_boundaries = 'comp2:top comp2:bottom'
momentum_wall_types = 'noslip symmetry'
outlet_boundaries = 'comp2:right'
momentum_outlet_types = 'fixed-pressure'
pressure_function = '${p_outlet}'
mass_advection_interpolation = 'average'
momentum_advection_interpolation = 'average'
[]
[]
[FunctorMaterials]
[const_functor]
type = ADGenericFunctorMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[]
[]
[AuxKernels]
[speed]
type = ParsedAux
variable = 'velocity_norm'
coupled_variables = 'superficial_vel_x superficial_vel_y porosity'
expression = 'sqrt(superficial_vel_x*superficial_vel_x + superficial_vel_y*superficial_vel_y) / porosity'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO mumps'
line_search = 'none'
nl_rel_tol = 1e-12
automatic_scaling = true
off_diagonals_in_auto_scaling = true
verbose = true
scaling_group_variables = 'superficial_vel_x superficial_vel_y'
[]
[Debug]
show_var_residual_norms = true
[]
# Some basic Postprocessors to examine the solution
[Postprocessors]
[inlet-p]
type = SideAverageValue
variable = pressure
boundary = 'comp1:left'
[]
[outlet-u]
type = SideAverageValue
variable = superficial_vel_x
boundary = 'comp1:right'
[]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/bernoulli-1d-functor-material.i)
rho = 1.1
advected_interp_method = 'upwind'
velocity_interp_method = 'rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 1
dx = '1 1'
ix = '3 3'
subdomain_id = '1 2'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
pressure = pressure
porosity = porosity
[]
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[pressure]
type = BernoulliPressureVariable
u = u
porosity = porosity
rho = ${rho}
[]
[]
[AuxVariables]
[has_porosity_jump_face]
type = MooseVariableFVReal
[]
[porosity_out]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[has_porosity_jump_face]
type = HasPorosityJumpFace
porosity = porosity
execute_on = 'initial timestep_end'
variable = has_porosity_jump_face
[]
[porosity_out]
type = FunctorAux
variable = porosity_out
functor = porosity
execute_on = 'initial timestep_end'
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = u
pressure = pressure
porosity = porosity
momentum_component = 'x'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = '1'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 1
[]
[]
[FunctorMaterials]
[porosity]
type = ADPiecewiseByBlockFunctorMaterial
prop_name = 'porosity'
subdomain_to_prop_value = '1 1 2 0.5'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
[]
[Postprocessors]
[inlet_p]
type = SideAverageValue
variable = 'pressure'
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 'right'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/combined/test/tests/ad_cavity_pressure/multiple_postprocessors.i)
#
# Cavity Pressure Test (Volume input as a vector of postprocessors)
#
# This test is designed to compute an internal pressure based on
# p = n * R * T / V
# where
# p is the pressure
# n is the amount of material in the volume (moles)
# R is the universal gas constant
# T is the temperature
# V is the volume
#
# The mesh is composed of one block (1) with an interior cavity of volume 8.
# Block 2 sits in the cavity and has a volume of 1. Thus, the total
# initial volume is 7.
# The test adjusts n, T, and V in the following way:
# n => n0 + alpha * t
# T => T0 + beta * t
# V => V0 + gamma * t
# with
# alpha = n0
# beta = T0 / 2
# gamma = - (0.003322259...) * V0
# T0 = 240.54443866068704
# V0 = 7
# n0 = f(p0)
# p0 = 100
# R = 8.314472 J * K^(-1) * mol^(-1)
#
# So, n0 = p0 * V0 / R / T0 = 100 * 7 / 8.314472 / 240.544439
# = 0.35
#
# In this test the internal volume is calculated as the sum of two Postprocessors
# internalVolumeInterior and internalVolumeExterior. This sum equals the value
# reported by the internalVolume postprocessor.
#
# The parameters combined at t = 1 gives p = 301.
#
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[Mesh]
file = 3d.e
[]
[Functions]
[./displ_positive]
type = PiecewiseLinear
x = '0 1'
y = '0 0.0029069767441859684'
[../]
[./displ_negative]
type = PiecewiseLinear
x = '0 1'
y = '0 -0.0029069767441859684'
[../]
[./temp1]
type = PiecewiseLinear
x = '0 1'
y = '1 1.5'
scale_factor = 240.54443866068704
[../]
[./material_input_function]
type = PiecewiseLinear
x = '0 1'
y = '0 0.35'
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./temp]
initial_condition = 240.54443866068704
[../]
[./material_input]
[../]
[]
[AuxVariables]
[./pressure_residual_x]
[../]
[./pressure_residual_y]
[../]
[./pressure_residual_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./TensorMechanics]
use_displaced_mesh = true
use_automatic_differentiation = true
[../]
[./heat]
type = ADDiffusion
variable = temp
use_displaced_mesh = true
[../]
[./material_input_dummy]
type = ADDiffusion
variable = material_input
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_xx]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = stress_xx
[../]
[./stress_yy]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = stress_yy
[../]
[./stress_zz]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = stress_zz
[../]
[./stress_xy]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 1
variable = stress_xy
[../]
[./stress_yz]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 2
variable = stress_yz
[../]
[./stress_zx]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 0
variable = stress_zx
[../]
[]
[BCs]
[./no_x_exterior]
type = DirichletBC
variable = disp_x
boundary = '7 8'
value = 0.0
[../]
[./no_y_exterior]
type = DirichletBC
variable = disp_y
boundary = '9 10'
value = 0.0
[../]
[./no_z_exterior]
type = DirichletBC
variable = disp_z
boundary = '11 12'
value = 0.0
[../]
[./prescribed_left]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 13
function = displ_positive
[../]
[./prescribed_right]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 14
function = displ_negative
[../]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '15 16'
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '17 18'
value = 0.0
[../]
[./no_x_interior]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[../]
[./no_y_interior]
type = DirichletBC
variable = disp_y
boundary = '3 4'
value = 0.0
[../]
[./no_z_interior]
type = DirichletBC
variable = disp_z
boundary = '5 6'
value = 0.0
[../]
[./temperatureInterior]
type = ADFunctionDirichletBC
boundary = 100
function = temp1
variable = temp
[../]
[./MaterialInput]
type = ADFunctionDirichletBC
boundary = '100 13 14 15 16'
function = material_input_function
variable = material_input
[../]
[./CavityPressure]
[./1]
boundary = 100
initial_pressure = 100
material_input = materialInput
R = 8.314472
temperature = aveTempInterior
volume = 'internalVolumeInterior internalVolumeExterior'
startup_time = 0.5
output = ppress
save_in = 'pressure_residual_x pressure_residual_y pressure_residual_z'
use_automatic_differentiation = true
[../]
[../]
[]
[Materials]
[./elast_tensor1]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e1
poissons_ratio = 0
block = 1
[../]
[./strain1]
type = ADComputeFiniteStrain
block = 1
[../]
[./stress1]
type = ADComputeFiniteStrainElasticStress
block = 1
[../]
[./elast_tensor2]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0
block = 2
[../]
[./strain2]
type = ADComputeFiniteStrain
block = 2
[../]
[./stress2]
type = ADComputeFiniteStrainElasticStress
block = 2
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
nl_rel_tol = 1e-12
l_tol = 1e-12
l_max_its = 20
dt = 0.5
end_time = 1.0
[]
[Postprocessors]
[./internalVolume]
type = InternalVolume
boundary = 100
execute_on = 'initial linear'
[../]
[./aveTempInterior]
type = SideAverageValue
boundary = 100
variable = temp
execute_on = 'initial linear'
[../]
[./internalVolumeInterior]
type = InternalVolume
boundary = '1 2 3 4 5 6'
execute_on = 'initial linear'
[../]
[./internalVolumeExterior]
type = InternalVolume
boundary = '13 14 15 16 17 18'
execute_on = 'initial linear'
[../]
[./materialInput]
type = SideAverageValue
boundary = '7 8 9 10 11 12'
variable = material_input
execute_on = linear
[../]
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_htonly/sphere3D.i)
#
# 3D Spherical Gap Heat Transfer Test.
#
# This test exercises 3D gap heat transfer for a constant conductivity gap.
#
# The mesh consists of an inner solid sphere of radius = 1 unit, and outer
# hollow sphere with an inner radius of 2. In other words, the gap between
# them is 1 radial unit in length.
#
# The conductivity of both spheres is set very large to achieve a uniform
# temperature in each sphere. The temperature of the center node of the
# inner sphere is ramped from 100 to 200 over one time unit. The
# temperature of the outside of the outer, hollow sphere is held fixed
# at 100.
#
# A simple analytical solution is possible for the integrated heat flux
# between the inner and outer spheres:
#
# Integrated Flux = (T_left - T_right) * (gapK/(r^2*((1/r1)-(1/r2)))) * Area
#
# For gapK = 1 (default value)
#
# The area is taken as the area of the secondary (inner) surface:
#
# Area = 4 * pi * 1^2 (4*pi*r^2)
#
# The integrated heat flux across the gap at time 1 is then:
#
# 4*pi*k*delta_T/((1/r1)-(1/r2))
# 4*pi*1*100/((1/1) - (1/2)) = 2513.3 watts
#
# For comparison, see results from the integrated flux post processors.
# This simulation makes use of symmetry, so only 1/8 of the spheres is meshed
# As such, the integrated flux from the post processors is 1/8 of the total,
# or 314.159 watts... i.e. 100*pi.
# The value coming from the post processor is slightly less than this
# but converges as mesh refinement increases.
#
# Simulating contact is challenging. Regression tests that exercise
# contact features can be difficult to solve consistently across multiple
# platforms. While designing these tests, we felt it worth while to note
# some aspects of these tests. The following applies to:
# sphere3D.i, sphere2DRZ.i, cyl2D.i, and cyl3D.i.
# 1. We decided that to perform consistently across multiple platforms we
# would use very small convergence tolerance. In this test we chose an
# nl_rel_tol of 1e-12.
# 2. Due to such a high value for thermal conductivity (used here so that the
# domains come to a uniform temperature) the integrated flux at time = 0
# was relatively large (the value coming from SideIntegralFlux =
# -_diffusion_coef[_qp]*_grad_u[_qp]*_normals[_qp] where the diffusion coefficient
# here is thermal conductivity).
# Even though _grad_u[_qp] is small, in this case the diffusion coefficient
# is large. The result is a number that isn't exactly zero and tends to
# fail exodiff. For this reason the parameter execute_on = initial should not
# be used. That parameter is left to default settings in these regression tests.
#
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Mesh]
file = sphere3D.e
[]
[Functions]
[./temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[../]
[]
[Variables]
[./temp]
initial_condition = 100
[../]
[]
[AuxVariables]
[./gap_conductance]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./heat_conduction]
type = HeatConduction
variable = temp
[../]
[]
[AuxKernels]
[./gap_cond]
type = MaterialRealAux
property = gap_conductance
variable = gap_conductance
boundary = 2
[../]
[]
[Materials]
[./heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 100000000.0
[../]
[]
[ThermalContact]
[./thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
gap_conductivity = 1
quadrature = true
gap_geometry_type = SPHERE
sphere_origin = '0 0 0'
[../]
[]
[BCs]
[./mid]
type = FunctionDirichletBC
boundary = 5
variable = temp
function = temp
[../]
[./temp_far_right]
type = DirichletBC
boundary = 4
variable = temp
value = 100
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-7
[./Quadrature]
order = fifth
side_order = seventh
[../]
[]
[Outputs]
exodus = true
[./Console]
type = Console
[../]
[]
[Postprocessors]
[./temp_left]
type = SideAverageValue
boundary = 2
variable = temp
[../]
[./temp_right]
type = SideAverageValue
boundary = 3
variable = temp
[../]
[./flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[../]
[./flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[../]
[]
(test/tests/controls/pid_control/pid_control.i)
c = 0
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = 3
value = '${c}'
[]
[right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
start_time = 0.0
end_time = 20
dt = 1
[]
[Postprocessors]
[integral]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = 'initial timestep_end'
[]
[left_boundary_average]
type = SideAverageValue
variable = u
boundary = 3
execute_on = 'initial timestep_end'
[]
[]
[Controls]
[integral_value]
type = PIDTransientControl
postprocessor = integral
target = 1.5
parameter = 'BCs/left/value'
K_integral = -1
K_proportional = -1
K_derivative = -0.1
execute_on = 'initial timestep_begin'
[]
[]
[Outputs]
file_base = out
exodus = false
csv = true
[]
(modules/heat_transfer/test/tests/radiative_bcs/ad_function_radiative_bc.i)
#
# If we assume that epsilon*sigma*(T_inf^4-T_s^4) is approximately equal to
# epsilon*sigma*4*T_inf^3*(T_inf-T_s), that form is equivalent to
# h*(T_inf-T_s), the convective flux bc. So, the radiative and convective
# flux bcs should give nearly the same answer if the leading terms are equal.
#
[Mesh]
[top]
type = GeneratedMeshGenerator
dim = 3
nx = 10
bias_x = 0.8
ymin = 1.2
ymax = 2.2
boundary_name_prefix = top
[]
[bottom]
type = GeneratedMeshGenerator
dim = 3
nx = 10
bias_x = 0.8
boundary_name_prefix = bot
boundary_id_offset = 6
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'top bottom'
[]
[]
[Variables]
[temp]
initial_condition = 600.0
[]
[]
[Kernels]
[heat_dt]
type = ADTimeDerivative
variable = temp
[]
[heat_conduction]
type = ADHeatConduction
variable = temp
[]
[]
[BCs]
[top_right]
type = ADConvectiveHeatFluxBC
variable = temp
boundary = top_right
T_infinity = 300.0
heat_transfer_coefficient = 3.0
[]
[bot_right]
type = ADFunctionRadiativeBC
variable = temp
boundary = bot_right
# htc/(stefan-boltzmann*4*T_inf^3)
emissivity_function = '3/(5.670367e-8*4*300*300*300)'
[]
[]
[Materials]
[thermal]
type = ADGenericConstantMaterial
prop_names = 'density thermal_conductivity specific_heat'
prop_values = '1 10 100'
[]
[]
[Postprocessors]
[top_left_temp]
type = SideAverageValue
variable = temp
boundary = top_left
execute_on = 'TIMESTEP_END initial'
[]
[bot_left_temp]
type = SideAverageValue
variable = temp
boundary = bot_left
execute_on = 'TIMESTEP_END initial'
[]
[top_right_temp]
type = SideAverageValue
variable = temp
boundary = top_right
[]
[bot_right_temp]
type = SideAverageValue
variable = temp
boundary = bot_right
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1e1
nl_abs_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/uel/small_test.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
xmax = 10
ymax = 3
elem_type = TRI3
[]
[pin]
type = ExtraNodesetGenerator
nodes = 106
new_boundary = pin
input = gen
[]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = pin
value = 0
[]
inactive = 'right_dirichlet'
[right_neumann]
type = FunctionNeumannBC
variable = disp_x
function = t
boundary = right
[]
[right_dirichlet]
type = FunctionDirichletBC
variable = disp_x
function = t/10
boundary = right
[]
[]
[UserObjects]
[uel]
type = AbaqusUserElement
variables = 'disp_x disp_y'
plugin = ../../../examples/uel_tri_tests/uel
use_displaced_mesh = false
num_state_vars = 6
constant_properties = '100 0.3' # E nu
extra_vector_tags = 'kernel_residual'
[]
[]
[Problem]
kernel_coverage_check = false
extra_tag_vectors = 'kernel_residual'
[]
[AuxVariables]
[res_x]
[]
[res_y]
[]
[]
[AuxKernels]
[res_x]
type = TagVectorAux
variable = res_x
v = disp_x
vector_tag = kernel_residual
[]
[res_y]
type = TagVectorAux
variable = res_y
v = disp_y
vector_tag = kernel_residual
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
dt = 1
num_steps = 15
[]
[Postprocessors]
[delta_l]
type = SideAverageValue
variable = disp_x
boundary = right
execute_on = 'INITIAL TIMESTEP_END'
[]
[V]
type = ElementIntegralMaterialProperty
mat_prop = 1
use_displaced_mesh = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/solid_mechanics/test/tests/ad_thermal_expansion_function/instantaneous.i)
# This test checks the thermal expansion calculated via a instantaneous thermal expansion coefficient.
# The coefficient is selected so as to result in a 1e-4 strain in the x-axis, and to cross over
# from positive to negative strain.
[Mesh]
[./gen]
type = GeneratedMeshGenerator
dim = 3
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./temp]
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = SMALL
add_variables = true
eigenstrain_names = eigenstrain
generate_output = 'strain_xx strain_yy strain_zz'
use_automatic_differentiation = true
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./bottom]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./back]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[]
[AuxKernels]
[./temp]
type = FunctionAux
variable = temp
function = '1 + t'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1
poissons_ratio = 0.3
[../]
[./stress]
type = ADComputeLinearElasticStress
[../]
[./thermal_expansion_strain]
type = ADComputeInstantaneousThermalExpansionFunctionEigenstrain
thermal_expansion_function = 4e-4
stress_free_temperature = 1.5
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Postprocessors]
[./disp_x_max]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./temp_avg]
type = ElementAverageValue
variable = temp
[../]
[]
[Executioner]
type = Transient
end_time = 1.0
dt = 0.1
[]
[Outputs]
csv = true
[]
(modules/functional_expansion_tools/test/tests/standard_use/interface_coupled.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0.0
xmax = 0.4
nx = 6
ymin = 0.0
ymax = 10.0
ny = 20
[]
[Variables]
[./m]
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./source_m]
type = BodyForce
variable = m
value = 100
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
value = 2
variable = m
[../]
[]
[BCs]
[./interface_value]
type = FXValueBC
variable = m
boundary = right
function = FX_Basis_Value_Main
[../]
[./interface_flux]
type = FXFluxBC
boundary = right
variable = m
function = FX_Basis_Flux_Main
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '4'
physical_bounds = '0.0 10'
y = Legendre
[../]
[./FX_Basis_Flux_Main]
type = FunctionSeries
series_type = Cartesian
orders = '5'
physical_bounds = '0.0 10'
y = Legendre
[../]
[]
[UserObjects]
[./FX_Flux_UserObject_Main]
type = FXBoundaryFluxUserObject
function = FX_Basis_Flux_Main
variable = m
boundary = right
diffusivity = 0.1
[../]
[]
[Postprocessors]
[./average_interface_value]
type = SideAverageValue
variable = m
boundary = right
[../]
[./total_flux]
type = SideDiffusiveFluxIntegral
variable = m
boundary = right
diffusivity = 0.1
[../]
[./picard_iterations]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1.0
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = interface_sub.i
sub_cycling = true
[../]
[]
[Transfers]
[./FluxToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Flux_UserObject_Main
multi_app_object_name = FX_Basis_Flux_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[./FluxToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Flux_Main
multi_app_object_name = FX_Flux_UserObject_Sub
[../]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_htonly/gap_heat_transfer_htonly_rz_test.i)
#
# 2-D RZ Gap Heat Transfer Test without mechanics
#
# This test exercises 1-D gap heat transfer for a constant conductivity gap.
#
# The mesh consists of two element blocks containing one element each. Each
# element is a unit cube. They sit next to one another with a unit between them.
#
# The conductivity of both blocks is set very large to achieve a uniform temperature
# across each block. The temperature of the far left boundary
# is ramped from 100 to 200 over one time unit, and then held fixed for an additional
# time unit. The temperature of the far right boundary is held fixed at 100.
#
# A simple analytical solution is possible for the heat flux between the blocks, or cylinders in the case of RZ.:
#
# Flux = (T_left - T_right) * (gapK/(r*ln(r2/r1)))
#
# For gapK = 1 (default value)
#
# The integrated heat flux across the gap at time 2 is then:
#
# 2*pi*h*k*delta_T/(ln(r2/r1))
# 2*pi*1*1*100/(ln(2/1)) = 906.5 watts
#
# For comparison, see results from the flux post processors.
#
# As a second test, use the rectilinear (parallel plate) form of the gap heat transfer.
#
# Flux = (T_left - T_right) * (gapK/gapL)
#
# For gapK = 1 (default value)
#
# The integrated heat flux across the gap at time 2 is then:
#
# 2*pi*h*k*delta_T/(1)
# 2*pi*1*1*100/(1) = 628.3 watts
#
# For comparison, see results from the flux post processors.
#
[Problem]
coord_type = RZ
rz_coord_axis = Y # this is modified through CLI args to test Z-R as opposed to R-Z
[]
[Mesh]
active = 'file'
[file]
type = FileMeshGenerator
file = gap_heat_transfer_htonly_rz_test.e
[]
[rotate]
type = TransformGenerator
transform = ROTATE
vector_value = '90 0 0'
input = file
[]
[]
[Functions]
[./ramp]
type = PiecewiseLinear
x = '0 1 2'
y = '100 200 200'
[../]
[]
[ThermalContact]
[./thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
[../]
[./thermal_contact2]
type = GapHeatTransfer
variable = temp2
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
gap_geometry_type = PLATE
appended_property_name = 2
[../]
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
initial_condition = 100
[../]
[./temp2]
order = FIRST
family = LAGRANGE
initial_condition = 100
[../]
[]
[AuxVariables]
[./gap_cond]
order = CONSTANT
family = MONOMIAL
[../]
[./gap_cond2]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[./heat2]
type = HeatConduction
variable = temp2
[../]
[]
[BCs]
[./temp_far_left]
type = FunctionDirichletBC
boundary = 1
variable = temp
function = ramp
[../]
[./temp_far_right]
type = DirichletBC
boundary = 4
variable = temp
value = 100
[../]
[./temp_far_left2]
type = FunctionDirichletBC
boundary = 1
variable = temp2
function = ramp
[../]
[./temp_far_right2]
type = DirichletBC
boundary = 4
variable = temp2
value = 100
[../]
[]
[AuxKernels]
[./conductance]
type = MaterialRealAux
property = gap_conductance
variable = gap_cond
boundary = 2
[../]
[./conductance2]
type = MaterialRealAux
property = gap_conductance
variable = gap_cond2
boundary = 2
[../]
[]
[Materials]
[./heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 1e6
[../]
[./density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[../]
[]
[Executioner]
type = Transient
# petsc_options = '-snes_mf_operator -ksp_monitor -snes_ksp_ew'
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
# petsc_options_iname = '-snes_type -snes_ls -snes_linesearch_type -ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
# petsc_options_value = 'ls basic basic 201 hypre boomeramg 4'
# petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
# petsc_options_value = '201 hypre boomeramg 4'
nl_abs_tol = 1e-3
nl_rel_tol = 1e-8
l_tol = 1e-6
l_max_its = 100
start_time = 0.0
dt = 1e-1
dtmin = 1e-1
end_time = 2.0
[]
[Postprocessors]
[./temp_left]
type = SideAverageValue
boundary = 2
variable = temp
execute_on = 'initial timestep_end'
[../]
[./temp_right]
type = SideAverageValue
boundary = 3
variable = temp
execute_on = 'initial timestep_end'
[../]
[./flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[../]
[./flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[../]
[./temp_left2]
type = SideAverageValue
boundary = 2
variable = temp2
execute_on = 'initial timestep_end'
[../]
[./temp_right2]
type = SideAverageValue
boundary = 3
variable = temp2
execute_on = 'initial timestep_end'
[../]
[./flux_left2]
type = SideDiffusiveFluxIntegral
variable = temp2
boundary = 2
diffusivity = thermal_conductivity
[../]
[./flux_right2]
type = SideDiffusiveFluxIntegral
variable = temp2
boundary = 3
diffusivity = thermal_conductivity
[../]
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/phase_field_fracture/crack2d_aniso.i)
#This input uses PhaseField-Nonconserved Action to add phase field fracture bulk rate kernels
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 20
ymax = 0.5
[]
[./noncrack]
type = BoundingBoxNodeSetGenerator
new_boundary = noncrack
bottom_left = '0.5 0 0'
top_right = '1 0 0'
input = gen
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Modules]
[./TensorMechanics]
[./Master]
[./All]
add_variables = true
strain = SMALL
additional_generate_output = 'strain_yy stress_yy'
planar_formulation = PLANE_STRAIN
[../]
[../]
[../]
[./PhaseField]
[./Nonconserved]
[./c]
free_energy = F
kappa = kappa_op
mobility = L
[../]
[../]
[../]
[]
[Kernels]
[./solid_x]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_x
component = 0
c = c
[../]
[./solid_y]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_y
component = 1
c = c
[../]
[./off_disp]
type = AllenCahnElasticEnergyOffDiag
variable = c
displacements = 'disp_x disp_y'
mob_name = L
[../]
[]
[BCs]
[./ydisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = 't'
[../]
[./yfix]
type = DirichletBC
variable = disp_y
boundary = noncrack
value = 0
[../]
[./xfix]
type = DirichletBC
variable = disp_x
boundary = right
value = 0
[../]
[]
[Materials]
[./pfbulkmat]
type = GenericConstantMaterial
prop_names = 'gc_prop l visco'
prop_values = '1e-3 0.05 1e-6'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '127.0 70.8 70.8 127.0 70.8 127.0 73.55 73.55 73.55'
fill_method = symmetric9
euler_angle_1 = 30
euler_angle_2 = 0
euler_angle_3 = 0
[../]
[./define_mobility]
type = ParsedMaterial
material_property_names = 'gc_prop visco'
property_name = L
expression = '1.0/(gc_prop * visco)'
[../]
[./define_kappa]
type = ParsedMaterial
material_property_names = 'gc_prop l'
property_name = kappa_op
expression = 'gc_prop * l'
[../]
[./damage_stress]
type = ComputeLinearElasticPFFractureStress
c = c
E_name = 'elastic_energy'
D_name = 'degradation'
F_name = 'local_fracture_energy'
decomposition_type = stress_spectral
use_current_history_variable = true
[../]
[./degradation]
type = DerivativeParsedMaterial
property_name = degradation
coupled_variables = 'c'
expression = '(1.0-c)^2*(1.0 - eta) + eta'
constant_names = 'eta'
constant_expressions = '1.0e-6'
derivative_order = 2
[../]
[./local_fracture_energy]
type = DerivativeParsedMaterial
property_name = local_fracture_energy
coupled_variables = 'c'
material_property_names = 'gc_prop l'
expression = 'c^2 * gc_prop / 2 / l'
derivative_order = 2
[../]
[./fracture_driving_energy]
type = DerivativeSumMaterial
coupled_variables = c
sum_materials = 'elastic_energy local_fracture_energy'
derivative_order = 2
property_name = F
[../]
[]
[Postprocessors]
[./av_stress_yy]
type = ElementAverageValue
variable = stress_yy
[../]
[./av_strain_yy]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_factor_mat_solving_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-8
l_tol = 1e-4
l_max_its = 100
nl_max_its = 10
dt = 5e-5
num_steps = 2
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/element_subdomain_modifier/initial_condition.i)
[Problem]
solve = false
[]
[Mesh]
[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'
[]
[]
[UserObjects]
[moving_circle]
type = CoupledVarThresholdElementSubdomainModifier
coupled_var = 'phi'
block = 2
criterion_type = BELOW
threshold = 0
subdomain_id = 1
moving_boundary_name = moving_boundary
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[Functions]
[moving_circle]
type = ParsedFunction
expression = '(x-t)^2+(y)^2-0.5^2'
[]
[]
[AuxVariables]
[u]
[InitialCondition]
type = ConstantIC
value = 1
[]
[]
[phi]
[]
# for the 'displaced' test only
inactive = 'disp_x disp_y'
[disp_x]
[]
[disp_y]
[]
[]
[AuxKernels]
[phi]
type = FunctionAux
variable = phi
function = moving_circle
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[double_u]
type = StatefulAux
variable = u
coupled = u
block = 1
[]
[]
[Postprocessors]
# for the 'subdomain_caching' test only
active = ''
[average]
type = SideAverageValue
variable = u
boundary = bottom
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 3
[]
[Outputs]
[out]
type = Exodus
[]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere_mortar_error.i)
sphere_outer_htc = 10 # W/m^2/K
sphere_outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Problem]
coord_type = RZ
kernel_coverage_check = false
material_coverage_check = false
[]
[Mesh]
[file]
type = FileMeshGenerator
file = cyl2D.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '3'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[lm]
order = SECOND
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[AuxVariables]
[power_density]
block = 'fuel'
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
block = '1 2'
[]
[heat_source]
type = CoupledForce
variable = temp
block = 'fuel'
v = power_density
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = temp
boundary = 2
primary_emissivity = 0.0
secondary_emissivity = 0.0
[]
[conduction]
type = GapFluxModelConduction
temperature = temp
boundary = 2
gap_conductivity = 5.0
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
primary_boundary = 3
primary_subdomain = 10000
secondary_boundary = 2
secondary_subdomain = 10001
gap_flux_models = 'radiation conduction'
gap_geometry_type = SPHERE
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = '4' # outer RPV
coefficient = ${sphere_outer_htc}
T_infinity = ${sphere_outer_Tinf}
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-7
[]
[Outputs]
exodus = true
csv = true
[Console]
type = Console
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '2 3'
variable = temp
[]
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = 2
variable = temp
[]
[temp_right]
type = SideAverageValue
boundary = 3
variable = temp
[]
[flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[]
[flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 'fuel'
[]
[sphere_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = '4' # outer RVP
T_fluid = ${sphere_outer_Tinf}
htc = ${sphere_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(sphere_convective_out - ptot) / ptot'
pp_names = 'sphere_convective_out ptot'
[]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere_mortar.i)
sphere_outer_htc = 10 # W/m^2/K
sphere_outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Problem]
coord_type = RZ
kernel_coverage_check = false
material_coverage_check = false
[]
[Mesh]
[file]
type = FileMeshGenerator
file = cyl2D.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '3'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[lm]
order = SECOND
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[AuxVariables]
[power_density]
block = 'fuel'
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
block = '1 2'
[]
[heat_source]
type = CoupledForce
variable = temp
block = 'fuel'
v = power_density
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = temp
boundary = 2
primary_emissivity = 0.0
secondary_emissivity = 0.0
[]
[conduction]
type = GapFluxModelConduction
temperature = temp
boundary = 2
gap_conductivity = 5.0
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
primary_boundary = 3
primary_subdomain = 10000
secondary_boundary = 2
secondary_subdomain = 10001
gap_flux_models = 'radiation conduction'
gap_geometry_type = SPHERE
sphere_origin = '0 0 0'
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = '4' # outer RPV
coefficient = ${sphere_outer_htc}
T_infinity = ${sphere_outer_Tinf}
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-7
[]
[Outputs]
exodus = true
csv = true
[Console]
type = Console
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '2 3'
variable = temp
[]
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = 2
variable = temp
[]
[temp_right]
type = SideAverageValue
boundary = 3
variable = temp
[]
[flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[]
[flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 'fuel'
[]
[sphere_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = '4' # outer RVP
T_fluid = ${sphere_outer_Tinf}
htc = ${sphere_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(sphere_convective_out - ptot) / ptot'
pp_names = 'sphere_convective_out ptot'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/pins/materials/2d-rc.i)
mu = 0.01
rho = 2000
u_inlet = 1
advected_interp_method = 'upwind'
velocity_interp_method = 'rc'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 1
nx = 10
ny = 6
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = superficial_vel_x
v = superficial_vel_y
pressure = pressure
porosity = porosity
[]
[]
[Variables]
[superficial_vel_x]
type = PINSFVSuperficialVelocityVariable
initial_condition = ${u_inlet}
[]
[superficial_vel_y]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1e-6
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 0.5
[]
[speed_output]
type = MooseVariableFVReal
[]
[vel_x_output]
type = MooseVariableFVReal
[]
[vel_y_output]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[speed]
type = FunctorAux
variable = 'speed_output'
functor = 'speed'
[]
[vel_x]
type = ADFunctorVectorElementalAux
variable = 'vel_x_output'
functor = 'velocity'
component = 0
[]
[vel_y]
type = ADFunctorVectorElementalAux
variable = 'vel_y_output'
functor = 'velocity'
component = 1
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_x
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_x
mu = ${mu}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_x
momentum_component = 'x'
pressure = pressure
porosity = porosity
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_y
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'y'
[]
[v_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_y
mu = ${mu}
porosity = porosity
momentum_component = 'y'
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_y
momentum_component = 'y'
pressure = pressure
porosity = porosity
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = superficial_vel_x
function = ${u_inlet}
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = superficial_vel_y
function = 0
[]
[no-slip-u]
type = INSFVNoSlipWallBC
boundary = 'top'
variable = superficial_vel_x
function = 0
[]
[no-slip-v]
type = INSFVNoSlipWallBC
boundary = 'top'
variable = superficial_vel_y
function = 0
[]
[symmetry-u]
type = PINSFVSymmetryVelocityBC
boundary = 'bottom'
variable = superficial_vel_x
u = superficial_vel_x
v = superficial_vel_y
mu = ${mu}
momentum_component = 'x'
[]
[symmetry-v]
type = PINSFVSymmetryVelocityBC
boundary = 'bottom'
variable = superficial_vel_y
u = superficial_vel_x
v = superficial_vel_y
mu = ${mu}
momentum_component = 'y'
[]
[symmetry-p]
type = INSFVSymmetryPressureBC
boundary = 'bottom'
variable = pressure
[]
[outlet-p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 0.1
[]
[]
[FunctorMaterials]
# Testing this object
[var_mat]
type = PINSFVSpeedFunctorMaterial
superficial_vel_x = 'superficial_vel_x'
superficial_vel_y = 'superficial_vel_y'
porosity = porosity
[]
[]
[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
nl_abs_tol = 1e-11
[]
# Some basic Postprocessors to examine the solution
[Postprocessors]
[inlet-p]
type = SideAverageValue
variable = pressure
boundary = 'left'
[]
[outlet-u]
type = SideAverageValue
variable = superficial_vel_x
boundary = 'right'
[]
[]
[Outputs]
exodus = true
csv = false
[]
(modules/navier_stokes/test/tests/finite_volume/wcns/boundary_conditions/with-direction/flux_bcs-direction-action.i)
l = 2
inlet_area = 2
# Artificial fluid properties
# For a real case, use a GeneralFluidFunctorProperties and a viscosity rampdown
# or initialize very well!
k = 1
cp = 1000
mu = 5e1
rho = 1000
# Operating conditions
inlet_temp = 300
outlet_pressure = 1e5
inlet_velocity = 0.2
inlet_scalar = 1.2
# The inlet angle, we will modify this and expect two things:
# 1. If we use a velocity postprocessor for the flux terms, we expect the mass flow
# to be proportional with "direction \cdot surface_normal".
# 2. If a mass flow is specified, it should not change, only the direction and magnitude of the
# inlet vleocity which is inferred based on the supplied massflow.
# direction = "0.86602540378 -0.5 0.0"
# direction = "1.0 0.0 0.0"
# cos_angle = 0.86602540378
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${l}
ymin = 0
ymax = ${inlet_area}
nx = 10
ny = 10
[]
[]
[Modules]
[NavierStokesFV]
compressibility = 'weakly-compressible'
add_energy_equation = true
add_scalar_equation = true
passive_scalar_names = 'scalar'
density = 'rho'
dynamic_viscosity = 'mu'
thermal_conductivity = 'k'
specific_heat = 'cp'
passive_scalar_diffusivity = '10.0'
passive_scalar_schmidt_number = '1.0'
initial_velocity = '${inlet_velocity} 1e-15 0'
initial_temperature = '${inlet_temp}'
initial_pressure = '${outlet_pressure}'
initial_scalar_variables = 1.0
inlet_boundaries = 'left'
momentum_inlet_types = 'flux-mass'
flux_inlet_pps = 'inlet_mdot'
energy_inlet_types = 'flux-mass'
energy_inlet_function = 'inlet_T'
passive_scalar_inlet_types = 'flux-mass'
passive_scalar_inlet_function = 'inlet_scalar'
wall_boundaries = 'top bottom'
momentum_wall_types = 'slip slip'
energy_wall_types = 'heatflux heatflux'
energy_wall_function = '0 0'
outlet_boundaries = 'right'
momentum_outlet_types = 'fixed-pressure'
pressure_function = '${outlet_pressure}'
external_heat_source = 'power_density'
mass_advection_interpolation = 'average'
momentum_advection_interpolation = 'average'
[]
[]
[Postprocessors]
[inlet_mdot]
type = Receiver
default = '${fparse rho * inlet_velocity * inlet_area}'
[]
[inlet_velocity]
type = Receiver
default = ${inlet_velocity}
[]
[inlet_T]
type = Receiver
default = ${inlet_temp}
[]
[inlet_scalar]
type = Receiver
default = ${inlet_scalar}
[]
[outlet_mdot]
type = VolumetricFlowRate
advected_quantity = rho
vel_x = vel_x
vel_y = vel_y
boundary = right
rhie_chow_user_object = ins_rhie_chow_interpolator
[]
[inlet_mdot_check]
type = VolumetricFlowRate
advected_quantity = rho
vel_x = vel_x
vel_y = vel_y
boundary = left
rhie_chow_user_object = ins_rhie_chow_interpolator
[]
[inlet_vel_x_check]
type = SideAverageValue
variable = vel_x
boundary = left
[]
[inlet_vel_y_check]
type = SideAverageValue
variable = vel_y
boundary = left
[]
[]
[AuxVariables]
[power_density]
type = MooseVariableFVReal
initial_condition = 1e4
[]
[]
[FunctorMaterials]
[const_functor]
type = ADGenericFunctorMaterial
prop_names = 'rho cp k mu'
prop_values = '${rho} ${cp} ${k} ${mu}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-9
nl_max_its = 50
line_search = 'none'
automatic_scaling = true
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/torque/torque_small.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
origin = '0 0 2'
direction = '0 0 1'
polar_moment_of_inertia = pmi
factor = t
[]
[Mesh]
[ring]
type = AnnularMeshGenerator
nr = 1
nt = 30
rmin = 0.95
rmax = 1
[]
[extrude]
type = MeshExtruderGenerator
input = ring
extrusion_vector = '0 0 2'
bottom_sideset = 'bottom'
top_sideset = 'top'
num_layers = 5
[]
[]
[AuxVariables]
[alpha_var]
[]
[shear_stress_var]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[alpha]
type = RotationAngle
variable = alpha_var
[]
[shear_stress]
type = ParsedAux
variable = shear_stress_var
coupled_variables = 'stress_yz stress_xz'
expression = 'sqrt(stress_yz^2 + stress_xz^2)'
[]
[]
[BCs]
# fix bottom
[fix_x]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0
[]
[fix_y]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0
[]
[fix_z]
type = DirichletBC
boundary = bottom
variable = disp_z
value = 0
[]
# twist top
[twist_x]
type = Torque
boundary = top
variable = disp_x
[]
[twist_y]
type = Torque
boundary = top
variable = disp_y
[]
[twist_z]
type = Torque
boundary = top
variable = disp_z
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = SMALL
generate_output = 'vonmises_stress stress_yz stress_xz'
[]
[]
[Postprocessors]
[pmi]
type = PolarMomentOfInertia
boundary = top
# execute_on = 'INITIAL NONLINEAR'
execute_on = 'INITIAL'
[]
[alpha]
type = SideAverageValue
variable = alpha_var
boundary = top
[]
[shear_stress]
type = ElementAverageValue
variable = shear_stress_var
[]
[]
[Materials]
[stress]
type = ComputeLinearElasticStress
[]
[elastic]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 0.3
shear_modulus = 100
[]
[]
[Executioner]
# type = Steady
type = Transient
num_steps = 1
solve_type = PJFNK
petsc_options_iname = '-pctype'
petsc_options_value = 'lu'
nl_max_its = 150
[]
[Outputs]
exodus = true
print_linear_residuals = false
perf_graph = true
[]
(modules/solid_mechanics/tutorials/basics/part_2.3.i)
#Tensor Mechanics tutorial: the basics
#Step 2, part 3
#2D axisymmetric RZ simulation of uniaxial tension with J2 plasticity with no
#hardening
[GlobalParams]
displacements = 'disp_r disp_z'
[]
[Problem]
coord_type = RZ
[]
[Mesh]
file = necking_quad4.e
uniform_refine = 0
second_order = true
[]
[Physics/SolidMechanics/QuasiStatic]
[./block1]
strain = FINITE
add_variables = true
generate_output = 'stress_yy strain_yy' #use the yy option to get the zz component in axisymmetric coords
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeMultiPlasticityStress
ep_plastic_tolerance = 1e-9
plastic_models = J2
[../]
[]
[UserObjects]
[./str]
type = SolidMechanicsHardeningConstant
value = 2.4e2
[../]
[./J2]
type = SolidMechanicsPlasticJ2
yield_strength = str
yield_function_tolerance = 1E-3
internal_constraint_tolerance = 1E-9
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = disp_r
boundary = left
value = 0.0
[../]
[./bottom]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0.0
[../]
[./top]
type = FunctionDirichletBC
variable = disp_z
boundary = top
function = '0.0007*t'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
dt = 0.25
end_time = 20
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -sub_pc_type -pc_asm_overlap -ksp_gmres_restart'
petsc_options_value = 'asm lu 1 101'
[]
[Postprocessors]
[./ave_stress_bottom]
type = SideAverageValue
variable = stress_yy
boundary = bottom
[../]
[./ave_strain_bottom]
type = SideAverageValue
variable = strain_yy
boundary = bottom
[../]
[]
[Outputs]
exodus = true
perf_graph = true
csv = true
print_linear_residuals = false
[]
(modules/phase_field/examples/measure_interface_energy/1Dinterface_energy.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 100
xmin = 0
elem_type = EDGE
[]
[AuxVariables]
[./local_energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./local_free_energy]
type = TotalFreeEnergy
variable = local_energy
kappa_names = kappa_c
interfacial_vars = c
[../]
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
scaling = 1e1
[./InitialCondition]
type = RampIC
variable = c
value_left = 0
value_right = 1
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
[Functions]
[./Int_energy]
type = ParsedFunction
symbol_values = 'total_solute Cleft Cright Fleft Fright volume'
expression = '((total_solute-Cleft*volume)/(Cright-Cleft))*Fright+(volume-(total_solute-Cleft*volume)/(Cright-Cleft))*Fleft'
symbol_names = 'total_solute Cleft Cright Fleft Fright volume'
[../]
[./Diff]
type = ParsedFunction
symbol_values = 'total_free_energy total_no_int'
symbol_names = 'total_free_energy total_no_int'
expression = total_free_energy-total_no_int
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'kappa_c M'
prop_values = '25 150'
[../]
[./Free_energy]
type = DerivativeParsedMaterial
property_name = F
expression = 'c^2*(c-1)^2'
coupled_variables = c
derivative_order = 2
[../]
[]
[Postprocessors]
# The total free energy of the simulation cell to observe the energy reduction.
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
variable = local_energy
[../]
# for testing we also monitor the total solute amount, which should be conserved,
# gives Cavg in % for this problem.
[./total_solute]
type = ElementIntegralVariablePostprocessor
variable = c
[../]
# Get simulation cell size (1D volume) from postprocessor
[./volume]
type = ElementIntegralMaterialProperty
mat_prop = 1
[../]
# Find concentration in each phase using SideAverageValue
[./Cleft]
type = SideAverageValue
boundary = left
variable = c
[../]
[./Cright]
type = SideAverageValue
boundary = right
variable = c
[../]
# Find local energy in each phase by checking boundaries
[./Fleft]
type = SideAverageValue
boundary = left
variable = local_energy
[../]
[./Fright]
type = SideAverageValue
boundary = right
variable = local_energy
[../]
# Use concentrations and energies to find total free energy without any interface,
# only applies once equilibrium is reached!!
# Difference between energy with and without interface
# gives interface energy per unit area.
[./total_no_int]
type = FunctionValuePostprocessor
function = Int_energy
[../]
[./Energy_of_Interface]
type = FunctionValuePostprocessor
function = Diff
[../]
[]
[Preconditioning]
# This preconditioner makes sure the Jacobian Matrix is fully populated. Our
# kernels compute all Jacobian matrix entries.
# This allows us to use the Newton solver below.
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
# Automatic differentiation provides a _full_ Jacobian in this example
# so we can safely use NEWTON for a fast solve
solve_type = 'NEWTON'
l_max_its = 15
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-4
start_time = 0.0
# make sure that the result obtained for the interfacial free energy is fully converged
end_time = 40
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.5
[../]
[]
[Outputs]
gnuplot = true
csv = true
[./exodus]
type = Exodus
show = 'c local_energy'
execute_on = 'failed initial nonlinear timestep_end final'
[../]
[./console]
type = Console
execute_on = 'FAILED INITIAL NONLINEAR TIMESTEP_END final'
[../]
perf_graph = true
[]
(modules/combined/test/tests/phase_field_fracture/crack2d_computeCrackedStress_finitestrain_elastic.i)
#This input uses PhaseField-Nonconserved Action to add phase field fracture bulk rate kernels
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 20
ymax = 0.5
[]
[./noncrack]
type = BoundingBoxNodeSetGenerator
new_boundary = noncrack
bottom_left = '0.5 0 0'
top_right = '1 0 0'
input = gen
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./strain_yy]
family = MONOMIAL
order = CONSTANT
[../]
[]
[Modules]
[./TensorMechanics]
[./Master]
[./All]
add_variables = true
strain = FINITE
planar_formulation = PLANE_STRAIN
additional_generate_output = 'stress_yy'
strain_base_name = uncracked
[../]
[../]
[../]
[./PhaseField]
[./Nonconserved]
[./c]
free_energy = E_el
kappa = kappa_op
mobility = L
[../]
[../]
[../]
[]
[Kernels]
[./solid_x]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_x
component = 0
c = c
[../]
[./solid_y]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_y
component = 1
c = c
[../]
[./off_disp]
type = AllenCahnElasticEnergyOffDiag
variable = c
displacements = 'disp_x disp_y'
mob_name = L
[../]
[]
[AuxKernels]
[./strain_yy]
type = RankTwoAux
variable = strain_yy
rank_two_tensor = uncracked_mechanical_strain
index_i = 1
index_j = 1
execute_on = TIMESTEP_END
[../]
[]
[BCs]
[./ydisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = 't'
[../]
[./yfix]
type = DirichletBC
variable = disp_y
boundary = noncrack
value = 0
[../]
[./xfix]
type = DirichletBC
variable = disp_x
boundary = right
value = 0
[../]
[]
[Materials]
[./pfbulkmat]
type = GenericConstantMaterial
prop_names = 'gc_prop l visco'
prop_values = '1e-3 0.05 1e-4'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '120.0 80.0'
fill_method = symmetric_isotropic
base_name = uncracked
[../]
[./elastic]
type = ComputeFiniteStrainElasticStress
base_name = uncracked
[../]
[./cracked_stress]
type = ComputeCrackedStress
c = c
kdamage = 1e-5
F_name = E_el
use_current_history_variable = true
uncracked_base_name = uncracked
finite_strain_model = true
[../]
[]
[Postprocessors]
[./av_stress_yy]
type = ElementAverageValue
variable = stress_yy
[../]
[./av_strain_yy]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_factor_mat_solving_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-8
l_tol = 1e-4
l_max_its = 100
nl_max_its = 10
dt = 3e-5
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_htonly/gap_heat_transfer_htonly_it_plot_test.i)
#
# 1-D Gap Heat Transfer Test without mechanics
#
# This test exercises 1-D gap heat transfer for a constant conductivity gap.
#
# The mesh consists of two element blocks containing one element each. Each
# element is a unit cube. They sit next to one another with a unit between them.
#
# The conductivity of both blocks is set very large to achieve a uniform temperature
# across each block. The temperature of the far left boundary
# is ramped from 100 to 200 over one time unit, and then held fixed for an additional
# time unit. The temperature of the far right boundary is held fixed at 100.
#
# A simple analytical solution is possible for the heat flux between the blocks:
#
# Flux = (T_left - T_right) * (gapK/gap_width)
#
# The gap conductivity is specified as 1, thus
#
# gapK(Tavg) = 1.0*Tavg
#
#
# The heat flux across the gap at time = 2 is then:
#
# Flux(2) = 100 * (1.0/1.0) = 100
#
# For comparison, see results from the flux post processors
#
[Mesh]
file = gap_heat_transfer_htonly_test.e
[]
[Functions]
[./temp]
type = PiecewiseLinear
x = '0 1 2'
y = '100 200 200'
[../]
[]
[ThermalContact]
[./thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
[../]
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
initial_condition = 100
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[]
[BCs]
[./temp_far_left]
type = FunctionDirichletBC
boundary = 1
variable = temp
function = temp
[../]
[./temp_far_right]
type = DirichletBC
boundary = 4
variable = temp
value = 100
[../]
[]
[Materials]
[./heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 100000000.0
[../]
[./density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[../]
[]
[Executioner]
type = Transient
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 4'
line_search = 'none'
nl_abs_tol = 1e-5
nl_rel_tol = 1e-12
l_tol = 1e-10
l_max_its = 100
start_time = 0.0
dt = 1e-1
end_time = 2.0
[]
[Postprocessors]
[./temp_left]
type = SideAverageValue
boundary = 2
variable = temp
[../]
[./temp_right]
type = SideAverageValue
boundary = 3
variable = temp
[../]
[./flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[../]
[./flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[../]
[]
[Outputs]
file_base = out_it_plot
[./exodus]
type = Exodus
execute_on = 'initial timestep_end nonlinear'
nonlinear_residual_dt_divisor = 100
[../]
[]
(modules/heat_transfer/test/tests/thermal_materials/2d.i)
power = 2.0
rho0 = 0.0
rho1 = 1.0
TC0 = 1.0e-16
TC1 = 1.0
[Mesh]
[planet]
type = ConcentricCircleMeshGenerator
has_outer_square = false
radii = 1
num_sectors = 10
rings = 2
preserve_volumes = false
[]
[moon]
type = ConcentricCircleMeshGenerator
has_outer_square = false
radii = 0.5
num_sectors = 8
rings = 2
preserve_volumes = false
[]
[combine]
type = CombinerGenerator
inputs = 'planet moon'
positions = '0 0 0 -1.5 -0.5 0'
[]
[]
[GlobalParams]
illumination_flux = '1 1 0'
[]
[AuxVariables]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = 0.1
[]
[]
[Variables]
[u]
[]
[v]
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
[]
[dt_u]
type = TimeDerivative
variable = u
[]
[diff_v]
type = Diffusion
variable = v
[]
[dt_v]
type = TimeDerivative
variable = v
[]
[]
[Materials]
[thermal_compliance]
type = ThermalCompliance
temperature = u
thermal_conductivity = thermal_cond
outputs = 'exodus'
[]
[thermal_cond]
type = DerivativeParsedMaterial
expression = "A1:=(${TC0}-${TC1})/(${rho0}^${power}-${rho1}^${power}); "
"B1:=${TC0}-A1*${rho0}^${power}; TC1:=A1*mat_den^${power}+B1; TC1"
coupled_variables = 'mat_den'
property_name = thermal_cond
outputs = 'exodus'
[]
[thermal_compliance_sensitivity]
type = ThermalSensitivity
design_density = mat_den
thermal_conductivity = thermal_cond
temperature = u
outputs = 'exodus'
[]
[]
[BCs]
[flux_u]
type = DirectionalFluxBC
variable = u
boundary = outer
[]
[flux_v]
type = DirectionalFluxBC
variable = v
boundary = outer
self_shadow_uo = shadow
[]
[]
[Postprocessors]
[ave_v_all]
type = SideAverageValue
variable = v
boundary = outer
[]
[ave_v_exposed]
type = ExposedSideAverageValue
variable = v
boundary = outer
self_shadow_uo = shadow
[]
[]
[UserObjects]
[shadow]
type = SelfShadowSideUserObject
boundary = outer
execute_on = INITIAL
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 1
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_3D.i)
outer_htc = 10 # W/m^2/K
outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 6
nz = 6
xmin = -1
xmax = -0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
elem_type = HEX27
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'left_bottom left_back left_right left_front left_left left_top'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 8
nz = 8
xmin = 0.5
xmax = 1
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
elem_type = HEX27
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3 4 5'
# new_boundary = 'right_bottom right_back right_right right_front right_left right_top'
new_boundary = '100 101 102 103 104 105'
[]
[right_block_sidesets_rename]
type = RenameBoundaryGenerator
input = right_block_sidesets
old_boundary = '100 101 102 103 104 105'
new_boundary = 'right_bottom right_back right_right right_front right_left right_top'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sidesets_rename
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[]
[AuxVariables]
[gap_conductance]
order = CONSTANT
family = MONOMIAL
[]
[power_density]
block = 1
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
[]
[heat_source]
type = CoupledForce
variable = temp
block = 1
v = power_density
[]
[]
[AuxKernels]
[gap_cond]
type = MaterialRealAux
property = gap_conductance
variable = gap_conductance
boundary = 'left_right'
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[ThermalContact]
[thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 'right_left'
secondary = 'left_right'
emissivity_primary = 0
emissivity_secondary = 0
gap_conductivity = 5
gap_geometry_type = PLATE
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = 'right_right' # outer RPV
coefficient = ${outer_htc}
T_infinity = ${outer_Tinf}
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-8
[Quadrature]
order = fifth
side_order = seventh
[]
[]
[Outputs]
exodus = true
csv = true
[Console]
type = Console
[]
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = 'left_right'
variable = temp
[]
[temp_right]
type = SideAverageValue
boundary = 'right_left'
variable = temp
[]
[flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 'left_right'
diffusivity = thermal_conductivity
[]
[flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 'right_left'
diffusivity = thermal_conductivity
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 1
[]
[convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = 'right_right' # outer RVP
T_fluid = ${outer_Tinf}
htc = ${outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(convective_out - ptot) / ptot'
pp_names = 'convective_out ptot'
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = 'left_right right_left'
variable = temp
[]
[]
(modules/thermal_hydraulics/tutorials/single_phase_flow/06_custom_closures.i)
T_in = 300. # K
m_dot_in = 1e-2 # kg/s
press = 10e5 # Pa
# core parameters
core_length = 1. # m
core_n_elems = 25
core_dia = '${units 2. cm -> m}'
core_pitch = '${units 8.7 cm -> m}'
A_core = '${fparse core_pitch^2 - 0.25 *pi * core_dia^2}'
P_wet_core = '${fparse 4*core_pitch + pi * core_dia}'
Dh_core = '${fparse 4 * A_core / P_wet_core}'
# pipe parameters
pipe_dia = '${units 10. cm -> m}'
A_pipe = '${fparse 0.25 * pi * pipe_dia^2}'
tot_power = 2000 # W
# heat exchanger parameters
hx_dia_inner = '${units 12. cm -> m}'
hx_wall_thickness = '${units 5. mm -> m}'
hx_dia_outer = '${units 50. cm -> m}'
hx_radius_wall = '${fparse hx_dia_inner / 2. + hx_wall_thickness}'
hx_length = 1.5 # m
hx_n_elems = 25
m_dot_sec_in = 1. # kg/s
[GlobalParams]
initial_p = ${press}
initial_vel = 0.0001
initial_T = ${T_in}
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
gravity_vector = '0 0 0'
rdg_slope_reconstruction = minmod
scaling_factor_1phase = '1 1e-2 1e-4'
scaling_factor_rhoV = 1
scaling_factor_rhouV = 1e-2
scaling_factor_rhovV = 1e-2
scaling_factor_rhowV = 1e-2
scaling_factor_rhoEV = 1e-4
closures = thm_closures
fp = he
[]
[Functions]
[m_dot_sec_fn]
type = PiecewiseLinear
xy_data = '
0 0
10 ${m_dot_sec_in}'
[]
[]
[FluidProperties]
[he]
type = IdealGasFluidProperties
molar_mass = 4e-3
gamma = 1.67
k = 0.2556
mu = 3.22639e-5
[]
[water]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[]
[Closures]
[thm_closures]
type = Closures1PhaseTHM
[]
[none_closures]
type = Closures1PhaseNone
[]
[]
[Materials]
[Re_mat]
type = ADReynoldsNumberMaterial
Re = Re
rho = rho
vel = vel
D_h = D_h
mu = mu
block = hx/pri
[]
[f_mat]
type = ADParsedMaterial
property_name = f_D
constant_names = 'a b c'
constant_expressions = '1 0.1 -0.5'
material_property_names = 'Re'
expression = 'a + b * Re^c'
block = hx/pri
[]
[Pr_mat]
type = ADPrandtlNumberMaterial
Pr = Pr
cp = cp
mu = mu
k = k
block = hx/pri
[]
[Nu_mat]
type = ADParsedMaterial
property_name = 'Nu'
constant_names = 'a b c'
constant_expressions = '0.03 0.9 0.5'
material_property_names = 'Re Pr'
expression = 'a * Re ^b * Pr^c'
block = hx/pri
[]
[Hw_mat]
type = ADConvectiveHeatTransferCoefficientMaterial
D_h = D_h
k = k
Nu = Nu
Hw = Hw
block = hx/pri
[]
[]
[SolidProperties]
[steel]
type = ThermalFunctionSolidProperties
rho = 8050
k = 45
cp = 466
[]
[]
[Components]
[total_power]
type = TotalPower
power = ${tot_power}
[]
[up_pipe_1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
length = 0.5
n_elems = 15
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct1]
type = JunctionParallelChannels1Phase
position = '0 0 0.5'
connections = 'up_pipe_1:out core_chan:in'
volume = 1e-5
[]
[core_chan]
type = FlowChannel1Phase
position = '0 0 0.5'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
roughness = .0001
A = ${A_core}
D_h = ${Dh_core}
[]
[core_hs]
type = HeatStructureCylindrical
position = '0 0 0.5'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
names = 'block'
widths = '${fparse core_dia / 2.}'
solid_properties = 'steel'
solid_properties_T_ref = '300'
n_part_elems = 3
[]
[core_heating]
type = HeatSourceFromTotalPower
hs = core_hs
regions = block
power = total_power
[]
[core_ht]
type = HeatTransferFromHeatStructure1Phase
flow_channel = core_chan
hs = core_hs
hs_side = outer
P_hf = '${fparse pi * core_dia}'
[]
[jct2]
type = JunctionParallelChannels1Phase
position = '0 0 1.5'
connections = 'core_chan:out up_pipe_2:in'
volume = 1e-5
[]
[up_pipe_2]
type = FlowChannel1Phase
position = '0 0 1.5'
orientation = '0 0 1'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct3]
type = JunctionOneToOne1Phase
connections = 'up_pipe_2:out top_pipe_1:in'
[]
[top_pipe_1]
type = FlowChannel1Phase
position = '0 0 2'
orientation = '1 0 0'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[top_pipe_2]
type = FlowChannel1Phase
position = '0.5 0 2'
orientation = '1 0 0'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct4]
type = VolumeJunction1Phase
position = '0.5 0 2'
volume = 1e-5
connections = 'top_pipe_1:out top_pipe_2:in press_pipe:in'
[]
[press_pipe]
type = FlowChannel1Phase
position = '0.5 0 2'
orientation = '0 1 0'
length = 0.2
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[pressurizer]
type = InletStagnationPressureTemperature1Phase
p0 = ${press}
T0 = ${T_in}
input = press_pipe:out
[]
[jct5]
type = JunctionOneToOne1Phase
connections = 'top_pipe_2:out down_pipe_1:in'
[]
[down_pipe_1]
type = FlowChannel1Phase
position = '1 0 2'
orientation = '0 0 -1'
length = 0.25
A = ${A_pipe}
n_elems = 5
[]
[jct6]
type = JunctionParallelChannels1Phase
position = '1 0 1.75'
connections = 'down_pipe_1:out hx/pri:in'
volume = 1e-5
[]
[hx]
[pri]
type = FlowChannel1Phase
position = '1 0 1.75'
orientation = '0 0 -1'
length = ${hx_length}
n_elems = ${hx_n_elems}
roughness = 1e-5
A = '${fparse pi * hx_dia_inner * hx_dia_inner / 4.}'
D_h = ${hx_dia_inner}
closures = none_closures
[]
[ht_pri]
type = HeatTransferFromHeatStructure1Phase
hs = hx/wall
hs_side = inner
flow_channel = hx/pri
P_hf = '${fparse pi * hx_dia_inner}'
[]
[wall]
type = HeatStructureCylindrical
position = '1 0 1.75'
orientation = '0 0 -1'
length = ${hx_length}
n_elems = ${hx_n_elems}
widths = '${hx_wall_thickness}'
n_part_elems = '3'
solid_properties = 'steel'
solid_properties_T_ref = '300'
names = '0'
inner_radius = '${fparse hx_dia_inner / 2.}'
[]
[ht_sec]
type = HeatTransferFromHeatStructure1Phase
hs = hx/wall
hs_side = outer
flow_channel = hx/sec
P_hf = '${fparse 2 * pi * hx_radius_wall}'
[]
[sec]
type = FlowChannel1Phase
position = '${fparse 1 + hx_wall_thickness} 0 0.25'
orientation = '0 0 1'
length = ${hx_length}
n_elems = ${hx_n_elems}
A = '${fparse pi * (hx_dia_outer * hx_dia_outer / 4. - hx_radius_wall * hx_radius_wall)}'
D_h = '${fparse hx_dia_outer - (2 * hx_radius_wall)}'
fp = water
initial_T = 300
[]
[]
[jct7]
type = JunctionParallelChannels1Phase
position = '1 0 0.5'
connections = 'hx/pri:out down_pipe_2:in'
volume = 1e-5
[]
[down_pipe_2]
type = FlowChannel1Phase
position = '1 0 0.25'
orientation = '0 0 -1'
length = 0.25
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct8]
type = JunctionOneToOne1Phase
connections = 'down_pipe_2:out bottom_1:in'
[]
[bottom_1]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '-1 0 0'
length = 0.5
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[pump]
type = Pump1Phase
position = '0.5 0 0'
connections = 'bottom_1:out bottom_2:in'
volume = 1e-4
A_ref = ${A_pipe}
head = 0
[]
[bottom_2]
type = FlowChannel1Phase
position = '0.5 0 0'
orientation = '-1 0 0'
length = 0.5
n_elems = 5
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct9]
type = JunctionOneToOne1Phase
connections = 'bottom_2:out up_pipe_1:in'
[]
[inlet_sec]
type = InletMassFlowRateTemperature1Phase
input = 'hx/sec:in'
m_dot = 0
T = 300
[]
[outlet_sec]
type = Outlet1Phase
input = 'hx/sec:out'
p = 1e5
[]
[]
[ControlLogic]
[set_point]
type = GetFunctionValueControl
function = ${m_dot_in}
[]
[pid]
type = PIDControl
initial_value = 0.0
set_point = set_point:value
input = m_dot_pump
K_p = 1.
K_i = 4.
K_d = 0
[]
[set_pump_head]
type = SetComponentRealValueControl
component = pump
parameter = head
value = pid:output
[]
[m_dot_sec_inlet_ctrl]
type = GetFunctionValueControl
function = m_dot_sec_fn
[]
[set_m_dot_sec_ctrl]
type = SetComponentRealValueControl
component = inlet_sec
parameter = m_dot
value = m_dot_sec_inlet_ctrl:value
[]
[]
[Postprocessors]
[power_to_coolant]
type = ADHeatRateConvection1Phase
block = core_chan
P_hf = '${fparse pi *core_dia}'
[]
[m_dot_pump]
type = ADFlowJunctionFlux1Phase
boundary = core_chan:in
connection_index = 1
equation = mass
junction = jct7
[]
[core_T_out]
type = SideAverageValue
boundary = core_chan:out
variable = T
[]
[core_p_in]
type = SideAverageValue
boundary = core_chan:in
variable = p
[]
[core_p_out]
type = SideAverageValue
boundary = core_chan:out
variable = p
[]
[core_delta_p]
type = ParsedPostprocessor
pp_names = 'core_p_in core_p_out'
function = 'core_p_in - core_p_out'
[]
[hx_pri_T_out]
type = SideAverageValue
boundary = hx/pri:out
variable = T
[]
[hx_sec_T_in]
type = SideAverageValue
boundary = inlet_sec
variable = T
[]
[hx_sec_T_out]
type = SideAverageValue
boundary = outlet_sec
variable = T
[]
[m_dot_sec]
type = ADFlowBoundaryFlux1Phase
boundary = inlet_sec
equation = mass
[]
[Hw_hx_pri]
type = ADElementAverageMaterialProperty
mat_prop = Hw
block = hx/pri
[]
[fD_hx_pri]
type = ADElementAverageMaterialProperty
mat_prop = f_D
block = hx/pri
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
start_time = 0
[TimeStepper]
type = IterationAdaptiveDT
dt = 1
[]
dtmax = 5
end_time = 500
line_search = basic
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 25
[]
[Outputs]
exodus = true
[console]
type = Console
max_rows = 1
outlier_variable_norms = false
[]
print_linear_residuals = false
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/user_object_based/use_substep_dt.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 4
ny = 4
nz = 4
elem_type = HEX8
displacements = 'ux uy uz'
[]
[Variables]
[ux]
[]
[uy]
[]
[uz]
[]
[]
[AuxVariables]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[pk2]
order = CONSTANT
family = MONOMIAL
[]
[fp_zz]
order = CONSTANT
family = MONOMIAL
[]
[rotout]
order = CONSTANT
family = MONOMIAL
[]
[e_zz]
order = CONSTANT
family = MONOMIAL
[]
[gss]
order = CONSTANT
family = MONOMIAL
[]
[slip_increment]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[SolidMechanics]
displacements = 'ux uy uz'
use_displaced_mesh = true
[]
[]
[AuxKernels]
[stress_zz]
type = RankTwoAux
variable = stress_zz
rank_two_tensor = stress
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[pk2]
type = RankTwoAux
variable = pk2
rank_two_tensor = pk2
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[fp_zz]
type = RankTwoAux
variable = fp_zz
rank_two_tensor = fp
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[e_zz]
type = RankTwoAux
variable = e_zz
rank_two_tensor = lage
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[gss]
type = MaterialStdVectorAux
variable = gss
property = state_var_gss
index = 0
execute_on = timestep_end
[]
[slip_inc]
type = MaterialStdVectorAux
variable = slip_increment
property = slip_rate_gss
index = 0
execute_on = timestep_end
[]
[]
[BCs]
[symmy]
type = DirichletBC
variable = uy
boundary = bottom
value = 0
[]
[symmx]
type = DirichletBC
variable = ux
boundary = left
value = 0
[]
[symmz]
type = DirichletBC
variable = uz
boundary = back
value = 0
[]
[pushy]
type = FunctionDirichletBC
variable = uy
boundary = top
function = '-0.1*t'
[]
[pullz]
type = FunctionDirichletBC
variable = uz
boundary = front
function = '0.1*t'
[]
[]
[UserObjects]
[slip_rate_gss]
type = CrystalPlasticitySlipRateGSS
variable_size = 12
slip_sys_file_name = input_slip_sys.txt
num_slip_sys_flowrate_props = 2
flowprops = '1 4 0.001 0.1 5 8 0.001 0.1 9 12 0.001 0.1'
uo_state_var_name = state_var_gss
[]
[slip_resistance_gss]
type = CrystalPlasticitySlipResistanceGSS
variable_size = 12
uo_state_var_name = state_var_gss
[]
[state_var_gss]
type = CrystalPlasticityStateVariable
variable_size = 12
groups = '0 4 8 12'
group_values = '60.8 60.8 60.8'
uo_state_var_evol_rate_comp_name = state_var_evol_rate_comp_gss
scale_factor = 1.0
[]
[state_var_evol_rate_comp_gss]
type = CrystalPlasticityStateVarRateComponentGSS
variable_size = 12
hprops = '1.0 541.5 109.8 2.5'
uo_slip_rate_name = slip_rate_gss
uo_state_var_name = state_var_gss
[]
[]
[Materials]
[crysp]
type = FiniteStrainUObasedCP
block = 0
stol = 1e-2
tan_mod_type = exact
uo_slip_rates = 'slip_rate_gss'
uo_slip_resistances = 'slip_resistance_gss'
uo_state_vars = 'state_var_gss'
uo_state_var_evol_rate_comps = 'state_var_evol_rate_comp_gss'
[]
[strain]
type = ComputeFiniteStrain
block = 0
displacements = 'ux uy uz'
[]
[elasticity_tensor]
type = ComputeElasticityTensorCP
block = 0
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
[]
[]
[Postprocessors]
[stress_zz]
type = ElementAverageValue
variable = stress_zz
[]
[pk2]
type = ElementAverageValue
variable = pk2
[]
[fp_zz]
type = ElementAverageValue
variable = fp_zz
[]
[e_zz]
type = ElementAverageValue
variable = e_zz
[]
[gss]
type = ElementAverageValue
variable = gss
[]
[slip_increment]
type = ElementAverageValue
variable = slip_increment
[]
[uy_avg_top]
type = SideAverageValue
variable = uy
boundary = top
[]
[uz_avg_front]
type = SideAverageValue
variable = uz
boundary = front
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
dt = 0.05
solve_type = 'NEWTON'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu superlu_dist'
line_search = 'none'
nl_abs_tol = 1e-10
nl_rel_step_tol = 1e-10
dtmax = 10.0
nl_rel_tol = 1e-10
end_time = 1.0
num_steps = 5
dtmin = 0.001
nl_abs_step_tol = 1e-10
[]
[Outputs]
csv = true
[]
(modules/heat_transfer/test/tests/ad_convective_heat_flux/equilibrium.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
[]
[Variables]
[./temp]
initial_condition = 200.0
[../]
[]
[Kernels]
[./heat_dt]
type = ADTimeDerivative
variable = temp
[../]
[./heat_conduction]
type = ADDiffusion
variable = temp
[../]
[]
[BCs]
[./right]
type = ADConvectiveHeatFluxBC
variable = temp
boundary = 'right'
T_infinity = 100.0
heat_transfer_coefficient = 1
[../]
[]
[Postprocessors]
[./left_temp]
type = SideAverageValue
variable = temp
boundary = left
execute_on = 'TIMESTEP_END initial'
[../]
[./right_temp]
type = SideAverageValue
variable = temp
boundary = right
[../]
[./right_flux]
type = SideDiffusiveFluxAverage
variable = temp
boundary = right
diffusivity = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1e1
nl_abs_tol = 1e-12
[]
[Outputs]
[./out]
type = CSV
time_step_interval = 10
[../]
[]
(modules/thermal_hydraulics/tutorials/single_phase_flow/03_upper_loop.i)
T_in = 300. # K
m_dot_in = 1e-2 # kg/s
press = 10e5 # Pa
# core parameters
core_length = 1. # m
core_n_elems = 25
core_dia = '${units 2. cm -> m}'
core_pitch = '${units 8.7 cm -> m}'
A_core = '${fparse core_pitch^2 - 0.25 *pi * core_dia^2}'
P_wet_core = '${fparse 4*core_pitch + pi * core_dia}'
Dh_core = '${fparse 4 * A_core / P_wet_core}'
# pipe parameters
pipe_dia = '${units 10. cm -> m}'
A_pipe = '${fparse 0.25 * pi * pipe_dia^2}'
tot_power = 2000 # W
[GlobalParams]
initial_p = ${press}
initial_vel = 0.0001
initial_T = ${T_in}
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
gravity_vector = '0 0 0'
rdg_slope_reconstruction = minmod
scaling_factor_1phase = '1 1e-2 1e-4'
scaling_factor_rhoV = 1
scaling_factor_rhouV = 1e-2
scaling_factor_rhovV = 1e-2
scaling_factor_rhowV = 1e-2
scaling_factor_rhoEV = 1e-4
closures = thm_closures
fp = he
[]
[FluidProperties]
[he]
type = IdealGasFluidProperties
molar_mass = 4e-3
gamma = 1.67
k = 0.2556
mu = 3.22639e-5
[]
[]
[Closures]
[thm_closures]
type = Closures1PhaseTHM
[]
[]
[SolidProperties]
[steel]
type = ThermalFunctionSolidProperties
rho = 8050
k = 45
cp = 466
[]
[]
[Components]
[total_power]
type = TotalPower
power = ${tot_power}
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'up_pipe_1:in'
m_dot = ${m_dot_in}
T = ${T_in}
[]
[up_pipe_1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
length = 0.5
n_elems = 15
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct1]
type = JunctionParallelChannels1Phase
position = '0 0 0.5'
connections = 'up_pipe_1:out core_chan:in'
volume = 1e-5
[]
[core_chan]
type = FlowChannel1Phase
position = '0 0 0.5'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
roughness = .0001
A = '${A_core}'
D_h = ${Dh_core}
[]
[core_hs]
type = HeatStructureCylindrical
position = '0 0 0.5'
orientation = '0 0 1'
length = ${core_length}
n_elems = ${core_n_elems}
names = 'block'
widths = '${fparse core_dia / 2.}'
solid_properties = 'steel'
solid_properties_T_ref = '300'
n_part_elems = 3
[]
[core_heating]
type = HeatSourceFromTotalPower
hs = core_hs
regions = block
power = total_power
[]
[core_ht]
type = HeatTransferFromHeatStructure1Phase
flow_channel = core_chan
hs = core_hs
hs_side = outer
P_hf = '${fparse pi * core_dia}'
[]
[jct2]
type = JunctionParallelChannels1Phase
position = '0 0 1.5'
connections = 'core_chan:out up_pipe_2:in'
volume = 1e-5
[]
[up_pipe_2]
type = FlowChannel1Phase
position = '0 0 1.5'
orientation = '0 0 1'
length = 0.5
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct3]
type = JunctionOneToOne1Phase
connections = 'up_pipe_2:out top_pipe:in'
[]
[top_pipe]
type = FlowChannel1Phase
position = '0 0 2'
orientation = '1 0 0'
length = 1
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[jct4]
type = JunctionOneToOne1Phase
connections = 'top_pipe:out down_pipe_1:in'
[]
[down_pipe_1]
type = FlowChannel1Phase
position = '1 0 2'
orientation = '0 0 -1'
length = 0.25
A = ${A_pipe}
n_elems = 5
[]
[jct5]
type = JunctionOneToOne1Phase
connections = 'down_pipe_1:out cooling_pipe:in'
[]
[cooling_pipe]
type = FlowChannel1Phase
position = '1 0 1.75'
orientation = '0 0 -1'
length = 1.5
n_elems = 25
A = ${A_pipe}
[]
[cold_wall]
type = HeatTransferFromSpecifiedTemperature1Phase
flow_channel = cooling_pipe
T_wall = 300
P_hf = '${fparse pi * pipe_dia}'
[]
[jct6]
type = JunctionOneToOne1Phase
connections = 'cooling_pipe:out down_pipe_2:in'
[]
[down_pipe_2]
type = FlowChannel1Phase
position = '1 0 0.25'
orientation = '0 0 -1'
length = 0.25
n_elems = 10
A = ${A_pipe}
D_h = ${pipe_dia}
[]
[outlet]
type = Outlet1Phase
input = 'down_pipe_2:out'
p = ${press}
[]
[]
[Postprocessors]
[power_to_coolant]
type = ADHeatRateConvection1Phase
block = core_chan
P_hf = '${fparse pi *core_dia}'
[]
[core_T_out]
type = SideAverageValue
boundary = core_chan:out
variable = T
[]
[core_p_in]
type = SideAverageValue
boundary = core_chan:in
variable = p
[]
[core_p_out]
type = SideAverageValue
boundary = core_chan:out
variable = p
[]
[core_delta_p]
type = ParsedPostprocessor
pp_names = 'core_p_in core_p_out'
function = 'core_p_in - core_p_out'
[]
[hx_pri_T_out]
type = SideAverageValue
boundary = cooling_pipe:out
variable = T
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
start_time = 0
[TimeStepper]
type = IterationAdaptiveDT
dt = 1
[]
end_time = 500
line_search = basic
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 25
[]
[Outputs]
exodus = true
[console]
type = Console
max_rows = 1
outlier_variable_norms = false
[]
print_linear_residuals = false
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_balance/large_gap_heat_transfer_test_sphere.i)
sphere_outer_htc = 10 # W/m^2/K
sphere_outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
[file]
type = FileMeshGenerator
file = cyl2D.e
[]
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[]
[AuxVariables]
[gap_conductance]
order = CONSTANT
family = MONOMIAL
[]
[power_density]
block = 'fuel'
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
[]
[heat_source]
type = CoupledForce
variable = temp
block = 'fuel'
v = power_density
[]
[]
[AuxKernels]
[gap_cond]
type = MaterialRealAux
property = gap_conductance
variable = gap_conductance
boundary = 2
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[ThermalContact]
[thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0.8
emissivity_secondary = 0.8
gap_conductivity = 0.1
quadrature = true
gap_geometry_type = SPHERE
sphere_origin = '0 0 0'
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = '4' # outer RPV
coefficient = ${sphere_outer_htc}
T_infinity = ${sphere_outer_Tinf}
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-7
[Quadrature]
order = fifth
side_order = seventh
[]
[]
[Outputs]
exodus = false
csv = true
[Console]
type = Console
[]
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = 2
variable = temp
[]
[temp_right]
type = SideAverageValue
boundary = 3
variable = temp
[]
[flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[]
[flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 'fuel'
[]
[sphere_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = '4' # outer RVP
T_fluid = ${sphere_outer_Tinf}
htc = ${sphere_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(sphere_convective_out - ptot) / ptot'
pp_names = 'sphere_convective_out ptot'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/linear_friction.i)
mu = 1.1
rho = 1
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '20'
dy = '1.0'
ix = '10'
iy = '4'
[]
[]
[Modules]
[NavierStokesFV]
compressibility = 'incompressible'
porous_medium_treatment = true
density = 'rho'
dynamic_viscosity = 'mu'
porosity = 'porosity'
initial_velocity = '1 0 0'
initial_pressure = 0.0
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_function = '1 0'
wall_boundaries = 'top bottom'
momentum_wall_types = 'slip slip'
outlet_boundaries = 'right'
momentum_outlet_types = 'fixed-pressure'
pressure_function = '0'
friction_types = 'darcy'
friction_coeffs = 'friction_W'
mass_advection_interpolation = 'average'
momentum_advection_interpolation = 'average'
[]
[]
[FunctorMaterials]
[const]
type = ADGenericFunctorMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[friction]
type = LinearFrictionFactorFunctorMaterial
porosity = porosity
functor_name = friction_W
superficial_vel_x = superficial_vel_x
superficial_vel_y = superficial_vel_y
f = '0'
g = '11'
A = '1 1 1'
B = '1 1 1'
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[]
[ICs]
[porosity_ic]
type = FunctionIC
variable = porosity
function = '1 - x / 40'
[]
[]
[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
[]
[Postprocessors]
# solution is dp/dx = -11 / (1 - x/40)^3
# dp = -11 * integral_{0}^{20} (1 - x/40)^3 dx = 660
#
[inlet-p]
type = SideAverageValue
variable = pressure
boundary = 'left'
[]
[]
[Outputs]
exodus = true
[]
(framework/include/postprocessors/AxisymmetricCenterlineAverageValue.h)
// This file is part of the MOOSE framework
// https://www.mooseframework.org
//
// All rights reserved, see COPYRIGHT for full restrictions
// https://github.com/idaholab/moose/blob/master/COPYRIGHT
//
// Licensed under LGPL 2.1, please see LICENSE for details
// https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
#include "SideAverageValue.h"
/**
* This postprocessor computes a line integral of the specified variable
* along the centerline of an axisymmetric domain.
*/
class AxisymmetricCenterlineAverageValue : public SideAverageValue
{
public:
static InputParameters validParams();
AxisymmetricCenterlineAverageValue(const InputParameters & parameters);
protected:
virtual Real computeIntegral() override;
virtual Real volume() override;
};
(modules/heat_transfer/include/postprocessors/ThermalConductivity.h)
// This file is part of the MOOSE framework
// https://www.mooseframework.org
//
// All rights reserved, see COPYRIGHT for full restrictions
// https://github.com/idaholab/moose/blob/master/COPYRIGHT
//
// Licensed under LGPL 2.1, please see LICENSE for details
// https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
#include "SideAverageValue.h"
// Forward Declarations
/**
* This postprocessor computes the thermal conductivity of the bulk.
*/
class ThermalConductivity : public SideAverageValue
{
public:
static InputParameters validParams();
ThermalConductivity(const InputParameters & parameters);
virtual void finalize() override;
virtual Real getValue() const override;
protected:
const Real _dx;
const PostprocessorValue & _flux;
const PostprocessorValue & _T_hot;
const Real _length_scale;
const Real _k0;
private:
/// True if this is the zeroth timestep (timestep < 1). At the zero
/// timestep, the initial value of thermal conductivity should be returned.
/// This boolean is delcared as a reference so that the variable is restartable
/// data: if we restart, the code will not think it is the zero timestep again.
bool & _step_zero;
/// The value of this post-processor
Real _value;
};
(modules/heat_transfer/include/postprocessors/ExposedSideAverageValue.h)
// This file is part of the MOOSE framework
// https://www.mooseframework.org
//
// All rights reserved, see COPYRIGHT for full restrictions
// https://github.com/idaholab/moose/blob/master/COPYRIGHT
//
// Licensed under LGPL 2.1, please see LICENSE for details
// https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
#include "SideAverageValue.h"
class SelfShadowSideUserObject;
/**
* This postprocessor computes a volume integral of the specified variable
* on the exposed portion of a surface.
*/
class ExposedSideAverageValue : public SideAverageValue
{
public:
static InputParameters validParams();
ExposedSideAverageValue(const InputParameters & parameters);
Real computeQpIntegral() override;
protected:
/**
* Instead of computing the total face volume (as the base class does), compute
* the volume of the exposed QPs on that face.
* @return exposed face volume
*/
virtual Real volume() override;
/// Reference to SelfShadowSideUserObject, which does the determination of which
/// QPs are exposed.
const SelfShadowSideUserObject & _self_shadow;
};