- valueThe value to be set in IC
C++ Type:double
Controllable:No
Description:The value to be set in IC
- variableThe variable this initial condition is supposed to provide values for.
C++ Type:VariableName
Controllable:No
Description:The variable this initial condition is supposed to provide values for.
ConstantIC
Sets a constant field value.
Sets a constant initial condition described by parameter "value". It can be restricted to particular blocks and boundaries using the "block" and "boundary" parameters, respectively.
Example input syntax
In this example, constant initial conditions are set for variable u
and auxiliary array variable u_aux
. The values of u_aux
in block 1 and 2 are set differently by two ConstantIC
objects.
[ICs]
[./ic_u_1]
type = ConstantIC
variable = u
value = 42
block = '1 2'
[../]
[./ic_u_aux_1]
type = ConstantIC
variable = u_aux
value = 6.25
block = '1'
[../]
[./ic_u_aux_2]
type = ConstantIC
variable = u_aux
value = 9.99
block = '2'
[../]
[]
(test/tests/ics/constant_ic/subdomain_constant_ic_test.i)Input Parameters
- blockThe list of blocks (ids or names) that this object will be applied
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:The list of blocks (ids or names) that this object will be applied
- boundaryThe list of boundaries (ids or names) from the mesh where this object applies
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The list of boundaries (ids or names) from the mesh where this object applies
- 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
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:No
Description:Set the enabled status of the MooseObject.
- ignore_uo_dependencyFalseWhen set to true, a UserObject retrieved by this IC will not be executed before the this IC
Default:False
C++ Type:bool
Controllable:No
Description:When set to true, a UserObject retrieved by this IC will not be executed before the this IC
Advanced Parameters
Input Files
- (test/tests/outputs/debug/show_execution_ics.i)
- (modules/xfem/test/tests/moving_interface/verification/2D_rz_homog1mat.i)
- (test/tests/outputs/residual/output_residual_test.i)
- (modules/combined/test/tests/chemical_reactions_richards/langmuir_jac3.i)
- (modules/contact/test/tests/bouncing-block-contact/frictional-mortar-min-lm-mortar-disp.i)
- (modules/porous_flow/test/tests/mass_conservation/mass07.i)
- (test/tests/materials/var_coupling/var_stateful_coupling.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/bernoulli-2d-action.i)
- (modules/navier_stokes/test/tests/postprocessors/flow_rates/mass_flux_weighted_pp.i)
- (modules/porous_flow/test/tests/poroperm/PermFromPoro01.i)
- (test/tests/postprocessors/element_time_derivative/element_time_derivative_test.i)
- (modules/peridynamics/test/tests/failure_tests/2D_bond_status_convergence_H1NOSPD.i)
- (modules/contact/test/tests/bouncing-block-contact/ping-ponging/ranfs-ping-pong.i)
- (modules/richards/test/tests/gravity_head_2/gh18.i)
- (modules/richards/test/tests/pressure_pulse/pp_fu_lumped_22.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven.i)
- (modules/porous_flow/examples/flow_through_fractured_media/fine_steady.i)
- (modules/porous_flow/examples/flow_through_fractured_media/coarse.i)
- (modules/xfem/test/tests/nucleation_uo/nucleate_edge_crack_2d.i)
- (modules/functional_expansion_tools/test/tests/standard_use/volume_coupled.i)
- (modules/porous_flow/test/tests/dispersion/diff01_fv.i)
- (modules/functional_expansion_tools/examples/2D_interface_different_submesh/main.i)
- (modules/porous_flow/examples/lava_lamp/1phase_convection.i)
- (test/tests/dgkernels/2d_diffusion_dg/dg_stateful.i)
- (test/tests/transfers/multiapp_nearest_node_transfer/parallel_sub.i)
- (modules/contact/test/tests/bouncing-block-contact/grid-sequencing/grid-sequencing.i)
- (tutorials/tutorial03_verification/app/test/tests/step03_analytical/1d_analytical.i)
- (modules/xfem/test/tests/moving_interface/verification/1D_rz_lsdep1mat.i)
- (modules/porous_flow/test/tests/mass_conservation/mass06.i)
- (modules/richards/test/tests/gravity_head_2/gh_fu_06.i)
- (modules/porous_flow/test/tests/dispersion/disp01.i)
- (modules/porous_flow/test/tests/jacobian/hfrompps.i)
- (test/tests/transfers/general_field/nearest_node/duplicated_nearest_node_tests/parallel_sub.i)
- (test/tests/misc/check_error/multiple_bad_ic_test.i)
- (modules/functional_expansion_tools/examples/2D_interface_no_material/sub.i)
- (test/tests/auxkernels/projection_aux/1d.i)
- (test/tests/misc/check_error/ic_variable_not_specified.i)
- (test/tests/postprocessors/difference_pps/difference_pps.i)
- (test/tests/executioners/full_jacobian_thread_active_bcs/full_jacobian_thread_active_bcs.i)
- (modules/combined/examples/phase_field-mechanics/kks_mechanics_VTS.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/1d-rc-epsjump.i)
- (modules/porous_flow/test/tests/dirackernels/hfrompps.i)
- (test/tests/time_integrators/bdf2/bdf2.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_Cartesian_different_submesh/main.i)
- (test/tests/dgkernels/2d_diffusion_dg/no_mallocs_with_action.i)
- (test/tests/ics/check_error/two_ics_on_same_block_global.i)
- (test/tests/materials/material/material_test_dg.i)
- (modules/porous_flow/test/tests/mass_conservation/mass09.i)
- (modules/richards/test/tests/gravity_head_2/gh_fu_17.i)
- (modules/contact/test/tests/bouncing-block-contact/frictionless-penalty-weighted-gap.i)
- (test/tests/time_integrators/implicit-euler/ie-monomials.i)
- (test/tests/ics/constant_ic/subdomain_constant_ic_test.i)
- (modules/richards/test/tests/pressure_pulse/pp_fu_21.i)
- (modules/richards/test/tests/rogers_stallybrass_clements/rsc02.i)
- (modules/contact/test/tests/bouncing-block-contact/frictionless-penalty-weighted-gap-action.i)
- (modules/phase_field/test/tests/electrochem_sintering/ElectrochemicalSintering_test.i)
- (modules/richards/test/tests/gravity_head_2/gh16.i)
- (modules/solid_properties/test/tests/problems/heat_conduction/heat_conduction.i)
- (modules/functional_expansion_tools/test/tests/errors/multiapp_bad_user_object.i)
- (modules/richards/test/tests/sinks/s04.i)
- (modules/thermal_hydraulics/test/tests/auxkernels/convective_heat_flux_1phase/test.i)
- (test/tests/auxkernels/linear_combination/test.i)
- (modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-wear.i)
- (modules/functional_expansion_tools/examples/2D_interface_no_material/main.i)
- (modules/contact/test/tests/mortar_dynamics/block-dynamics-friction.i)
- (modules/misc/test/tests/fracture_flow/single.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_mean_zero_pressure.i)
- (modules/richards/test/tests/pressure_pulse/pp21.i)
- (test/tests/ics/dependency/monomial.i)
- (modules/navier_stokes/test/tests/finite_volume/fviks/convection/convection_cavity.i)
- (modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d-test-derivative-trimming.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized_with_temp_transient.i)
- (modules/porous_flow/test/tests/poroperm/PermTensorFromVar03.i)
- (python/peacock/tests/common/transient_big.i)
- (modules/contact/test/tests/non-singular-frictional-mortar/frictional-mortar.i)
- (modules/porous_flow/test/tests/dirackernels/frompps.i)
- (test/tests/auxkernels/function_scalar_aux/function_scalar_aux.i)
- (modules/phase_field/examples/multiphase/GrandPotential3Phase_AD.i)
- (python/peacock/tests/common/transient.i)
- (modules/phase_field/test/tests/actions/both_split_2vars.i)
- (modules/combined/examples/phase_field-mechanics/kks_mechanics_KHS.i)
- (test/tests/outputs/residual/output_residual_elem.i)
- (modules/combined/test/tests/poro_mechanics/borehole_highres.i)
- (modules/richards/test/tests/gravity_head_2/gh_bounded_17.i)
- (modules/porous_flow/test/tests/poroperm/PermTensorFromVar02.i)
- (modules/fsi/test/tests/2d-finite-strain-steady/thermal-me.i)
- (modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d-action.i)
- (modules/porous_flow/test/tests/poroperm/PermTensorFromVar01.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_heat_flux/main.i)
- (modules/richards/test/tests/rogers_stallybrass_clements/rsc01.i)
- (modules/contact/test/tests/mortar_aux_kernels/pressure-aux-frictionless-3d.i)
- (modules/contact/test/tests/mortar_dynamics/block-dynamics-friction-action.i)
- (test/tests/executioners/executioner/sln-time-adapt.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_external_app_1phase/phy.q_wall_transfer_3eqn.parent.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_Cartesian_direct/main.i)
- (modules/peridynamics/test/tests/failure_tests/2D_bond_status_convergence_BPD.i)
- (modules/fluid_properties/test/tests/ics/specific_enthalpy_from_pressure_temperature/test.i)
- (test/tests/time_integrators/implicit-euler/ie.i)
- (modules/chemical_reactions/test/tests/desorption/mollified_langmuir_desorption.i)
- (test/tests/ics/dependency/test.i)
- (test/tests/time_integrators/implicit-euler/ie_adapt.i)
- (modules/contact/test/tests/fieldsplit/frictionless_mortar_FS.i)
- (modules/solid_mechanics/test/tests/action/composite_eigenstrain.i)
- (modules/porous_flow/test/tests/desorption/desorption01.i)
- (modules/porous_flow/test/tests/dispersion/disp01_fv.i)
- (modules/functional_expansion_tools/examples/2D_volumetric_Cartesian/main.i)
- (test/tests/tag/2d_diffusion_dg_tag.i)
- (modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-vel.i)
- (test/tests/postprocessors/function_sideintegral/function_sideintegral.i)
- (python/peacock/tests/common/oversample.i)
- (test/tests/postprocessors/element_time_derivative/el_time_deriv_1d_test.i)
- (test/tests/dgkernels/2d_diffusion_dg/2d_diffusion_dg_test.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_split.i)
- (test/tests/auxkernels/constant_scalar_aux/constant_scalar_aux.i)
- (test/tests/ics/boundary_ic/boundary_ic.i)
- (modules/contact/test/tests/pdass_problems/frictional_bouncing_block.i)
- (modules/solid_mechanics/test/tests/umat/temperature/elastic_dtemperature.i)
- (modules/peridynamics/test/tests/failure_tests/2D_singular_shape_tensor_H1NOSPD.i)
- (modules/xfem/test/tests/moving_interface/verification/2D_xy_lsdep1mat.i)
- (test/tests/time_integrators/convergence/explicit_convergence.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_Cartesian/main.i)
- (modules/functional_expansion_tools/test/tests/errors/multiapp_missing_local_object.i)
- (modules/functional_expansion_tools/examples/2D_interface/main.i)
- (modules/porous_flow/test/tests/infiltration_and_drainage/rsc01.i)
- (modules/contact/test/tests/bouncing-block-contact/frictionless-weighted-gap-mixed-basis.i)
- (test/tests/auxkernels/projection_aux/2d.i)
- (test/tests/userobjects/postprocessor_spatial_user_object/parent.i)
- (modules/phase_field/test/tests/ad_coupled_gradient_dot/diffusion_rate.i)
- (modules/contact/test/tests/bouncing-block-contact/frictionless-nodal-reduced-active-set.i)
- (modules/contact/test/tests/multiple_contact_pairs/multiple_pairs.i)
- (modules/porous_flow/test/tests/dirackernels/theis2.i)
- (test/tests/executioners/executioner/transient.i)
- (modules/richards/test/tests/gravity_head_2/gh_fu_18.i)
- (modules/porous_flow/test/tests/dirackernels/theis1.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialMultiphase.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_cylindrical_subapp_mesh_refine/main.i)
- (modules/porous_flow/test/tests/mass_conservation/mass05.i)
- (modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-fretting-wear-test-projection_angle.i)
- (modules/porous_flow/test/tests/dispersion/diff01.i)
- (test/tests/userobjects/mortar_user_object/displaced_test.i)
- (test/tests/dgkernels/3d_diffusion_dg/3d_diffusion_p_refinement.i)
- (modules/functional_expansion_tools/test/tests/errors/multiapp_incompatible_orders.i)
- (test/tests/postprocessors/scale_pps/scale_pps.i)
- (modules/porous_flow/examples/flow_through_fractured_media/fine_transient.i)
- (modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d.i)
- (modules/functional_expansion_tools/test/tests/errors/multiapp_missing_sub_object.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_convection/plate.parent.i)
- (python/peacock/tests/common/transient_with_date.i)
- (modules/richards/test/tests/gravity_head_2/gh08.i)
- (modules/combined/test/tests/poro_mechanics/borehole_lowres.i)
- (test/tests/interfacekernels/adaptivity/adaptivity.i)
- (modules/contact/test/tests/bouncing-block-contact/variational-frictional-action.i)
- (modules/porous_flow/test/tests/dispersion/disp01_heavy.i)
- (modules/porous_flow/test/tests/density/GravDensity01.i)
- (modules/contact/test/tests/ranfs-and-scaling/bouncing-block-ranfs.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/2d-rc-epsjump.i)
- (modules/navier_stokes/examples/laser-welding/2d.i)
- (modules/contact/test/tests/pdass_problems/frictional_bouncing_block_action.i)
- (modules/navier_stokes/test/tests/finite_element/ins/nonzero-malloc/test.i)
- (modules/solid_mechanics/test/tests/gravity/block-gravity-kinetic-energy.i)
- (modules/porous_flow/test/tests/poroperm/PermFromPoro04.i)
- (modules/phase_field/examples/nucleation/refine.i)
- (modules/navier_stokes/test/tests/finite_element/ins/block-restriction/two-mats-two-eqn-sets.i)
- (test/tests/postprocessors/postprocessor_dependency/element_side_pp.i)
- (modules/contact/test/tests/mortar_cartesian_lms/frictionless-mortar-3d.i)
- (modules/porous_flow/examples/flow_through_fractured_media/fine_thick_fracture_transient.i)
- (modules/functional_expansion_tools/test/tests/standard_use/interface_sub.i)
- (modules/porous_flow/test/tests/mass_conservation/mass10.i)
- (test/tests/ics/check_error/two_ics_on_same_block.i)
- (modules/richards/test/tests/gravity_head_2/gh06.i)
- (modules/peridynamics/test/tests/failure_tests/2D_stretch_failure_BPD.i)
- (modules/thermal_hydraulics/test/tests/actions/coupled_heat_transfer_action/master.i)
- (tutorials/tutorial03_verification/app/test/tests/step04_mms/2d_main.i)
- (modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d_pg.i)
- (modules/contact/test/tests/fieldsplit/frictional_mortar_FS.i)
- (modules/functional_expansion_tools/test/tests/standard_use/multiapp_different_physical_boundaries.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_temperature_coefficients_function.i)
- (modules/chemical_reactions/test/tests/thermochimica/MoRuPd.i)
- (modules/richards/test/tests/rogers_stallybrass_clements/rsc_fu_02.i)
- (modules/contact/test/tests/bouncing-block-contact/frictional-nodal-min-normal-lm-mortar-pdass-tangential-lm-mortar-disp.i)
- (modules/contact/test/tests/mortar_dynamics/block-dynamics-action.i)
- (modules/functional_expansion_tools/test/tests/standard_use/interface_coupled.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/bernoulli-1d.i)
- (modules/functional_expansion_tools/test/tests/standard_use/multiapp_print_coefficients.i)
- (modules/richards/test/tests/gravity_head_2/gh_lumped_17.i)
- (test/tests/mesh/named_entities/named_entities_test_xda.i)
- (modules/fluid_properties/test/tests/ics/rho_vapor_mixture_from_pressure_temperature/test.i)
- (test/tests/time_integrators/convergence/implicit_convergence.i)
- (modules/porous_flow/test/tests/desorption/desorption02.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_external_app_1phase/phy.T_wall_transfer_elem_3eqn.parent.i)
- (test/tests/time_integrators/crank-nicolson/cranic.i)
- (modules/contact/test/tests/bouncing-block-contact/ping-ponging/kinematic-ping-pong.i)
- (test/tests/postprocessors/element_integral_var_pps/initial_pps.i)
- (modules/phase_field/test/tests/actions/both_direct_2vars.i)
- (test/tests/postprocessors/function_value_pps/function_value_pps.i)
- (modules/porous_flow/test/tests/poroperm/PermFromPoro03.i)
- (modules/porous_flow/test/tests/infiltration_and_drainage/rsc02.i)
- (test/tests/ics/constant_ic/constant_ic_test.i)
- (modules/richards/test/tests/rogers_stallybrass_clements/rsc_fu_01.i)
- (modules/xfem/test/tests/moving_interface/verification/2D_xy_homog1mat.i)
- (modules/contact/test/tests/bouncing-block-contact/variational-frictional.i)
- (test/tests/time_integrators/bdf2/bdf2_adapt.i)
- (modules/xfem/test/tests/moving_interface/verification/1D_rz_homog1mat.i)
- (modules/contact/test/tests/mortar_cartesian_lms/frictionless-mortar-3d-friction.i)
- (modules/contact/test/tests/bouncing-block-contact/frictional-penalty-weighted-vel.i)
- (test/tests/coord_type/coord_type_rz_integrated.i)
- (test/tests/variables/previous_newton_iteration/test.i)
- (modules/richards/test/tests/gravity_head_2/ghQ2P_pgas.i)
- (test/tests/transfers/general_field/nearest_node/nearest_position/sub_holes.i)
- (test/tests/variables/get_elemental_value/get_elemental_value.i)
- (modules/porous_flow/test/tests/poroperm/PermFromPoro05.i)
- (modules/porous_flow/test/tests/poroperm/PermFromPoro02.i)
- (modules/contact/test/tests/mortar_tm/horizontal_blocks_mortar_TM.i)
- (modules/richards/test/tests/dirac/q2p01.i)
- (modules/contact/test/tests/mortar_restart/frictional_bouncing_block_action_restart_2.i)
- (test/tests/time_integrators/dirk/dirk-2d-heat-adap.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/block-restriction/segregated/empty-block-segregated.i)
- (modules/combined/test/tests/3d-mortar-projection-tolerancing/test.i)
- (modules/contact/test/tests/mortar_aux_kernels/pressure-aux-friction-3d.i)
- (modules/porous_flow/test/tests/dispersion/diff01_action.i)
- (modules/functional_expansion_tools/test/tests/errors/multiapp_bad_function_series.i)
- (test/tests/interfacekernels/1d_interface/no-failed-point-inversions.i)
- (modules/contact/test/tests/mortar_cartesian_lms/frictionless-weighted-gap-lm.i)
- (modules/contact/test/tests/bouncing-block-contact/frictionless-weighted-gap.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_temperature_coefficients_function_variation.i)
- (test/tests/ics/check_error/two_ics_on_same_boundary.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_chorin.i)
- (modules/phase_field/test/tests/MultiPhase/switchingfunction3phasematerial.i)
- (modules/contact/test/tests/mortar_dynamics/block-dynamics-reference.i)
- (modules/richards/test/tests/gravity_head_2/gh17.i)
- (modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-wear-vel.i)
- (modules/functional_expansion_tools/examples/2D_interface_different_submesh/sub.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/mixed-transient-steady/mixed.i)
- (modules/contact/test/tests/kinematic-and-scaling/bouncing-block-kinematic.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_external_app_1phase/phy.T_wall_transfer_3eqn.parent.i)
- (modules/contact/test/tests/bouncing-block-contact/mixed-weighted-gap-swapped.i)
- (modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-fretting-wear-test-action.i)
- (modules/contact/test/tests/tan-pen-and-scaling/bouncing-block-tan-pen.i)
- (modules/chemical_reactions/test/tests/desorption/langmuir_desorption.i)
- (modules/fluid_properties/test/tests/ics/rho_from_pressure_temperature/test.i)
- (modules/navier_stokes/test/tests/finite_element/ins/block-restriction/two-mats-one-eqn-set.i)
- (modules/navier_stokes/test/tests/finite_element/ins/block-restriction/one-mat-two-eqn-sets.i)
- (test/tests/dgkernels/ad_dg_diffusion/2d_diffusion_ad_dg_test.i)
- (test/tests/misc/save_in/dg_save_in_test.i)
- (modules/peridynamics/test/tests/failure_tests/2D_stress_failure_H1NOSPD.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/lid-driven/transient-lid-driven-with-energy.i)
- (modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-fretting-wear-test.i)
- (modules/contact/test/tests/mortar_dynamics/block-dynamics-friction-creep.i)
- (test/tests/postprocessors/volume/sphere1D.i)
- (modules/porous_flow/test/tests/mass_conservation/mass08.i)
- (modules/richards/test/tests/pressure_pulse/pp_fu_22.i)
- (modules/combined/test/tests/additive_manufacturing/check_initial_condition.i)
- (modules/xfem/test/tests/moving_interface/verification/1D_xy_homog1mat.i)
- (test/tests/postprocessors/internal_side_jump/internal_side_jump.i)
- (modules/richards/test/tests/pressure_pulse/pp22.i)
- (modules/richards/test/tests/gravity_head_2/gh_lumped_08.i)
- (modules/contact/test/tests/mortar_dynamics/block-dynamics.i)
- (modules/functional_expansion_tools/examples/2D_interface/sub.i)
- (modules/porous_flow/examples/flow_through_fractured_media/fine_thick_fracture_steady.i)
- (modules/porous_flow/test/tests/dirackernels/squarepulse1.i)
- (test/tests/dgkernels/2d_diffusion_dg/no_functor_additions.i)
- (modules/phase_field/test/tests/MaskedBodyForce/MaskedBodyForce_test.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_temperature/phy.parent.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/block-restriction/with-empty-block.i)
- (test/tests/executioners/executioner/steady_state_check_test.i)
- (modules/contact/test/tests/bouncing-block-contact/frictional-nodal-min-normal-lm-mortar-pdass-tangential-lm-mortar-action.i)
- (modules/phase_field/examples/multiphase/GrandPotential3Phase.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialMultiphase_AD.i)
- (test/tests/userobjects/element_subdomain_modifier/initial_condition.i)
- (modules/porous_flow/examples/flow_through_fractured_media/coarse_3D.i)
- (modules/contact/test/tests/multiple_contact_pairs/multiple_pairs_mortar_friction.i)
- (modules/contact/test/tests/multiple_contact_pairs/multiple_pairs_mortar.i)
- (modules/chemical_reactions/test/tests/desorption/langmuir_lumping_problem.i)
- (test/tests/dgkernels/adaptivity/adaptivity.i)
- (modules/rdg/test/tests/postprocessors/boundary_flux_postprocessor/boundary_flux_postprocessor.i)
- (modules/contact/test/tests/bouncing-block-contact/ping-ponging/mortar-no-ping-pong_weighted.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/bernoulli-2d.i)
- (modules/xfem/test/tests/moving_interface/verification/1D_xy_lsdep1mat.i)
- (test/tests/mesh/named_entities/named_entities_test.i)
- (modules/contact/test/tests/bouncing-block-contact/bouncing-block-ranfs.i)
- (modules/functional_expansion_tools/test/tests/standard_use/volume_coupling_custom_norm.i)
- (modules/richards/test/tests/sinks/s_fu_04.i)
- (modules/richards/test/tests/pressure_pulse/pp_lumped_22.i)
- (test/tests/misc/check_error/wrong_displacement_order.i)
- (test/tests/dgkernels/3d_diffusion_dg/3d_diffusion_dg_test.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_cylindrical/main.i)
- (modules/xfem/test/tests/moving_interface/verification/1D_xy_discrete2mat.i)
- (modules/richards/test/tests/rogers_stallybrass_clements/rsc_lumped_01.i)
- (modules/richards/test/tests/gravity_head_2/gh_lumped_18.i)
- (test/tests/misc/check_error/ic_bnd_for_non_nodal.i)
- (modules/functional_expansion_tools/examples/1D_volumetric_Cartesian/main.i)
- (test/tests/dgkernels/dg_block_restrict/1d_dg_block_restrict.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven.i)
- (modules/xfem/test/tests/moving_interface/verification/2D_rz_lsdep1mat.i)
- (modules/thermal_hydraulics/test/tests/components/form_loss_from_external_app_1phase/phy.form_loss_1phase.parent.i)
- (modules/contact/test/tests/mortar_restart/frictional_bouncing_block_action_restart_1.i)
- (python/peacock/tests/input_tab/InputTree/gold/transient.i)
- (modules/richards/test/tests/uo_egs/seff2.i)
value
C++ Type:double
Controllable:No
Description:The value to be set in IC
block
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:The list of blocks (ids or names) that this object will be applied
boundary
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The list of boundaries (ids or names) from the mesh where this object applies
(test/tests/ics/constant_ic/subdomain_constant_ic_test.i)
[Mesh]
file = sq-2blk.e
uniform_refine = 1
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./u_aux]
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./ic_u_1]
type = ConstantIC
variable = u
value = 42
block = '1 2'
[../]
[./ic_u_aux_1]
type = ConstantIC
variable = u_aux
value = 6.25
block = '1'
[../]
[./ic_u_aux_2]
type = ConstantIC
variable = u_aux
value = 9.99
block = '2'
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(test/tests/outputs/debug/show_execution_ics.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
[]
[Debug]
show_execution_order = ALWAYS
[]
[AuxVariables]
[a]
[]
[b]
[]
[]
[Variables]
[u]
[]
[v]
[]
[]
# From dependency ics test
[ICs]
[u_ic]
type = ConstantIC
variable = u
value = -1
[]
[v_ic]
type = MTICSum
variable = v
var1 = u
var2 = a
[]
[a_ic]
type = ConstantIC
variable = a
value = 10
[]
[b_ic]
type = MTICMult
variable = b
var1 = v
factor = 2
[]
[]
[AuxKernels]
[a_ak]
type = ConstantAux
variable = a
value = 256
[]
[b_ak]
type = ConstantAux
variable = b
value = 42
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
[]
[diff_v]
type = Diffusion
variable = v
[]
[]
# From depend on uo test
[AuxVariables]
[ghost]
family = MONOMIAL
order = CONSTANT
[]
[]
[ICs]
[ghost_ic]
type = ElementUOIC
variable = ghost
element_user_object = ghost_uo
field_name = "ghosted"
field_type = long
[]
[]
[UserObjects]
[ghost_uo]
type = ElemSideNeighborLayersTester
execute_on = initial
element_side_neighbor_layers = 1
[]
[]
# From postprocessor interface ICs test
[Functions]
# The integral of this function is 2*3 + 3*6 + 5*2 = 34
[test_fn]
type = PiecewiseConstant
axis = x
x = '0 2 5'
y = '3 6 2'
[]
[]
[Postprocessors]
[integral_pp]
type = FunctionElementIntegral
function = test_fn
execute_on = 'INITIAL'
[]
[pp2]
type = FunctionValuePostprocessor
function = 6
execute_on = 'INITIAL'
[]
[]
[AuxVariables]
[test_var]
order = CONSTANT
family = MONOMIAL
[]
[]
[ICs]
[test_var_ic]
type = PostprocessorIC
variable = test_var
pp1 = integral_pp
[]
[]
# From integral preserving test
[AuxVariables]
[power]
family = MONOMIAL
order = CONSTANT
[]
[]
[ICs]
[power]
type = IntegralPreservingFunctionIC
variable = power
magnitude = 550.0
function = 'sin(pi * z / 1.9)'
integral = vol
[]
[]
[Postprocessors]
[vol]
type = FunctionElementIntegral
function = 'sin(pi * x / 1.9)'
execute_on = 'initial'
[]
[]
[BCs]
[left_u]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right_u]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 2
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_rel_tol = 1e-10
[]
(modules/xfem/test/tests/moving_interface/verification/2D_rz_homog1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: 2D
# Coordinate System: rz
# Material Numbers/Types: homogeneous 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# Transient 2D heat transfer problem in cylindrical coordinates designed with
# the Method of Manufactured Solutions. This problem was developed to verify
# XFEM performance on linear elements in the presence of a moving interface
# sweeping across the x-y coordinates of a system with homogeneous material
# properties. This problem can be exactly evaluated by FEM/Moose without the
# moving interface. Both the temperature and level set function are designed
# to be linear to attempt to minimize error between the Moose/exact solution
# and XFEM results.
# Results:
# The temperature at the bottom left boundary (x=1, y=1) exhibits the largest
# difference between the FEM/Moose solution and XFEM results. We present the
# XFEM results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 479.9998745
# 0.6 520 519.9995067
# 0.8 560 559.9989409
# 1.0 600 599.9987054
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 1.0
xmax = 2.0
ymin = 1.0
ymax = 2.0
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraints]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-100*x-100*y+400) + 100*1.5*t/x'
[../]
[./neumann_func]
type = ParsedFunction
expression = '1.5*100*t'
[../]
[./dirichlet_right_func]
type = ParsedFunction
expression = '(-100*y+200)*t+400'
[../]
[./dirichlet_top_func]
type = ParsedFunction
expression = '(-100*x+200)*t+400'
[../]
[./ls_func]
type = ParsedFunction
expression = '-0.5*(x+y) + 2.04 - 0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericConstantMaterial
prop_names = 'diffusion_coefficient'
prop_values = 1.5
[../]
[]
[BCs]
[./left_du]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = FunctionDirichletBC
variable = u
boundary = 'right'
function = dirichlet_right_func
[../]
[./bottom_du]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = neumann_func
[../]
[./top_u]
type = FunctionDirichletBC
variable = u
boundary = 'top'
function = dirichlet_top_func
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/outputs/residual/output_residual_test.i)
[Mesh]
file = sq-2blk.e
uniform_refine = 3
[]
[Variables]
# variable in the whole domain
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
# subdomain restricted variable
[./v]
order = FIRST
family = LAGRANGE
block = '1'
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[./exact_fn_v]
type = ParsedFunction
expression = t+1
[../]
[]
[Kernels]
[./ie_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = forcing_fn
[../]
[./ie_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '1 2 3 4'
function = exact_fn
[../]
[./bottom_v]
type = DirichletBC
variable = v
boundary = 5
value = 0
[../]
[./top_v]
type = FunctionDirichletBC
variable = v
boundary = 6
function = exact_fn_v
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out
exodus = true
[]
[Debug]
show_var_residual = 'u v'
show_var_residual_norms = true
[]
(modules/combined/test/tests/chemical_reactions_richards/langmuir_jac3.i)
# testing whether when we have a centre block containing 'conc' which is a CONSTANT MONOMIAL, and two-phase Richards flow, we get the correct Jacobian
[Mesh]
type = FileMesh
file = three_eles.e
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = 'DensityWater DensityGas'
relperm_UO = 'RelPermWater RelPermGas'
SUPG_UO = 'SUPGstandard SUPGstandard'
sat_UO = 'Saturation Saturation'
seff_UO = 'SeffWater SeffGas'
viscosity = '1E-3 1.1E-5'
gravity = '0 0 -10'
linear_shape_fcns = true
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./DensityGas]
type = RichardsDensityMethane20degC
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1E-5
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1E-5
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.2
n = 3
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.0
n = 3
[../]
[./Saturation]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1.0E+1
[../]
[]
[Variables]
[./pwater]
[../]
[./pgas]
[../]
[./conc]
family = MONOMIAL
order = CONSTANT
block = centre_block
[../]
[]
[ICs]
[./water]
type = ConstantIC
variable = pwater
value = 0.0
[../]
[./gas]
type = RandomIC
variable = pgas
min = 0
max = 5E5
[../]
[./conc_ic]
type = RandomIC
variable = conc
min = 0
max = 20
block = centre_block
[../]
[]
[Kernels]
[./richardstwater]
type = RichardsMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFlux
variable = pwater
[../]
[./richardstgas]
type = RichardsMassChange
variable = pgas
[../]
[./richardsfgas]
type = RichardsFlux
variable = pgas
[../]
[./c_dot]
type = TimeDerivative
block = centre_block
variable = conc
[../]
[./flow_from_matrix]
type = DesorptionFromMatrix
block = centre_block
variable = conc
pressure_var = pgas
[../]
[./flux_to_porespace]
type = DesorptionToPorespace
block = centre_block
variable = pgas
conc_var = conc
[../]
[]
[Materials]
[./all_blocks]
type = RichardsMaterial
block = 'left_block centre_block right_block'
mat_porosity = 0.02
mat_permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-16'
[../]
[./langmuir_params]
type = LangmuirMaterial
block = centre_block
one_over_desorption_time_const = 0.813
one_over_adsorption_time_const = 0.813
langmuir_density = 20.0
langmuir_pressure = 1.5E6
pressure_var = pgas
conc_var = conc
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
#petsc_options = '-snes_test_display'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E3 # get rid of the large c_dot contribution
[]
[Outputs]
execute_on = 'timestep_end'
file_base = langmuir_jac3
[]
(modules/contact/test/tests/bouncing-block-contact/frictional-mortar-min-lm-mortar-disp.i)
starting_point = 2e-1
# We offset slightly so we avoid the case where the bottom of the secondary block and the top of the
# primary block are perfectly vertically aligned which can cause the backtracking line search some
# issues for a coarse mesh (basic line search handles that fine)
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[./disp_x]
block = '1 2'
# order = SECOND
[../]
[./disp_y]
block = '1 2'
# order = SECOND
[../]
[./normal_lm]
block = 3
family = MONOMIAL
order = CONSTANT
[../]
[./tangential_lm]
block = 3
family = MONOMIAL
order = CONSTANT
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[Constraints]
[normal_lm]
type = NormalMortarLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_x
secondary_disp_y = disp_y
use_displaced_mesh = true
compute_primal_residuals = false
ncp_function_type = min
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[]
[tangential_lm]
type = TangentialMortarLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = tangential_lm
secondary_variable = disp_x
secondary_disp_y = disp_y
use_displaced_mesh = true
compute_primal_residuals = false
contact_pressure = normal_lm
friction_coefficient = .1
ncp_function_type = min
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
preset = false
boundary = 40
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
preset = false
boundary = 40
value = 0.0
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
preset = false
boundary = 50
function = '1e-2 * t'
[../]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor -snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/porous_flow/test/tests/mass_conservation/mass07.i)
# Checking that the mass postprocessor throws the correct error if
# too many phases are supplied
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[sat]
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[]
[ICs]
[pinit]
type = ConstantIC
value = 1
variable = pp
[]
[satinit]
type = FunctionIC
function = 1-x
variable = sat
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = sat
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp sat'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 1
thermal_expansion = 0
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 0.1
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = pp
phase1_saturation = sat
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[]
[Postprocessors]
[comp1_total_mass]
type = PorousFlowFluidMass
fluid_component = 1
phase = '0 1 2'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
(test/tests/materials/var_coupling/var_stateful_coupling.i)
# Test for making sure that a coupled variable can be used inside of initQpStatefulProperties
# of a Material object.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 3
[]
[Variables]
[./u]
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 1.2345
variable = u
[../]
[]
[Materials]
[./coupling_u]
type = VarCouplingMaterial
var = u
declare_old = true
outputs = exodus
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'TIMESTEP_END'
exodus = true
hide = 'u'
[]
(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/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/porous_flow/test/tests/poroperm/PermFromPoro01.i)
# Testing permeability from porosity
# Trivial test, checking calculated permeability is correct
# k = k_anisotropic * f * d^2 * phi^n / (1-phi)^m
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 3
[]
[GlobalParams]
block = 0
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[InitialCondition]
type = ConstantIC
value = 0
[]
[]
[]
[Kernels]
[flux]
type = PorousFlowAdvectiveFlux
gravity = '0 0 0'
variable = pp
[]
[]
[BCs]
[ptop]
type = DirichletBC
variable = pp
boundary = right
value = 0
[]
[pbase]
type = DirichletBC
variable = pp
boundary = left
value = 1
[]
[]
[AuxVariables]
[poro]
order = CONSTANT
family = MONOMIAL
[]
[perm_x]
order = CONSTANT
family = MONOMIAL
[]
[perm_y]
order = CONSTANT
family = MONOMIAL
[]
[perm_z]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[poro]
type = PorousFlowPropertyAux
property = porosity
variable = poro
[]
[perm_x]
type = PorousFlowPropertyAux
property = permeability
variable = perm_x
row = 0
column = 0
[]
[perm_y]
type = PorousFlowPropertyAux
property = permeability
variable = perm_y
row = 1
column = 1
[]
[perm_z]
type = PorousFlowPropertyAux
property = permeability
variable = perm_z
row = 2
column = 2
[]
[]
[Postprocessors]
[perm_x_bottom]
type = PointValue
variable = perm_x
point = '0 0 0'
[]
[perm_y_bottom]
type = PointValue
variable = perm_y
point = '0 0 0'
[]
[perm_z_bottom]
type = PointValue
variable = perm_z
point = '0 0 0'
[]
[perm_x_top]
type = PointValue
variable = perm_x
point = '3 0 0'
[]
[perm_y_top]
type = PointValue
variable = perm_y
point = '3 0 0'
[]
[perm_z_top]
type = PointValue
variable = perm_z
point = '3 0 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
# unimportant in this fully-saturated test
m = 0.8
alpha = 1e-4
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2.2e9
viscosity = 1e-3
density0 = 1000
thermal_expansion = 0
[]
[]
[Materials]
[permeability]
type = PorousFlowPermeabilityKozenyCarman
k_anisotropy = '1 0 0 0 2 0 0 0 0.1'
poroperm_function = kozeny_carman_fd2
f = 0.1
d = 5
m = 2
n = 7
[]
[temperature]
type = PorousFlowTemperature
[]
[massfrac]
type = PorousFlowMassFraction
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = Newton
type = Steady
l_tol = 1E-5
nl_abs_tol = 1E-3
nl_rel_tol = 1E-8
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
csv = true
execute_on = 'timestep_end'
[]
(test/tests/postprocessors/element_time_derivative/element_time_derivative_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
# dudt = 3*t^2*(x^2 + y^2)
type = ParsedFunction
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./forcing_fn2]
# dudt = 3*t^2*(x^2 + y^2)
type = ParsedFunction
expression = t*x*y
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn2
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./elementAvgTimeDerivative]
type = ElementAverageTimeDerivative
variable = u
[../]
[./elementAvgValue]
type = ElementAverageValue
variable = u
[../]
[]
[Executioner]
type = Transient
scheme = implicit-euler
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_elm_time_deriv
csv = true
[]
(modules/peridynamics/test/tests/failure_tests/2D_bond_status_convergence_H1NOSPD.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = PeridynamicsMesh
horizon_number = 3
cracks_start = '0.25 0.5 0'
cracks_end = '0.75 0.5 0'
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 8
ny = 8
[../]
[./gpd]
type = MeshGeneratorPD
input = gmg
retain_fe_mesh = false
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[AuxVariables]
[./critical_stress]
family = MONOMIAL
order = CONSTANT
[../]
[]
[AuxKernels]
[./bond_status]
type = RankTwoBasedFailureCriteriaNOSPD
variable = bond_status
rank_two_tensor = stress
critical_variable = critical_stress
failure_criterion = VonMisesStress
[../]
[]
[UserObjects]
[./shape_singularity]
type = SingularShapeTensorEliminatorUserObjectPD
[../]
[]
[ICs]
[./critical_stretch]
type = ConstantIC
variable = critical_stress
value = 150
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 1003
value = 0.0
[../]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = 1002
value = 0.0
[../]
[./bottom_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 1000
function = '-0.002*t'
[../]
[./rbm_x]
type = RBMPresetOldValuePD
variable = disp_x
boundary = 999
[../]
[./rbm_y]
type = RBMPresetOldValuePD
variable = disp_y
boundary = 999
[../]
[]
[Modules/Peridynamics/Mechanics/Master]
[./all]
formulation = NONORDINARY_STATE
stabilization = BOND_HORIZON_I
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2e5
poissons_ratio = 0.33
[../]
[./strain]
type = ComputeSmallStrainNOSPD
stabilization = BOND_HORIZON_I
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[]
[Postprocessors]
[./bond_status_updated_times]
type = BondStatusConvergedPostprocessorPD
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
start_time = 0
dt = 0.5
end_time = 1
fixed_point_max_its = 5
accept_on_max_fixed_point_iteration = true
custom_pp = bond_status_updated_times
custom_abs_tol = 2
disable_picard_residual_norm_check = true
[./Quadrature]
type = GAUSS_LOBATTO
order = FIRST
[../]
[]
[Outputs]
file_base = 2D_bond_status_convergence_H1NOSPD
exodus = true
[]
(modules/contact/test/tests/bouncing-block-contact/ping-ponging/ranfs-ping-pong.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-no-lower-d.e
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = false
use_automatic_differentiation = true
strain = SMALL
[]
[]
[Materials]
[elasticity]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e0
poissons_ratio = 0.3
[]
[stress]
type = ADComputeLinearElasticStress
[]
[]
[Constraints]
[./disp_x]
type = RANFSNormalMechanicalContact
secondary = 10
primary = 20
variable = disp_x
primary_variable = disp_x
component = x
[../]
[./disp_y]
type = RANFSNormalMechanicalContact
secondary = 10
primary = 20
variable = disp_y
primary_variable = disp_y
component = y
[../]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[../]
[]
[Executioner]
type = Transient
num_steps = 19
end_time = 200
dt = 5
dtmin = 5
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type -mat_mffd_err'
petsc_options_value = 'hypre boomeramg 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exo]
type = Exodus
[]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(modules/richards/test/tests/gravity_head_2/gh18.i)
# with immobile saturation
# unsaturated = true
# gravity = true
# supg = true
# transient = true
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmin = 0
xmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1E-2 1E-1 1E0 0.5E1 0.5E2 0.4E4 1E5 1E6 1E7'
x = '0 1E-1 1E0 1E1 1E2 1E3 1E4 1E5 1E6'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 1.0E2
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 0.5
bulk_mod = 0.5E2
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.4
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.3
n = 2
[../]
[./SatWater]
type = RichardsSat
s_res = 0.1
sum_s_res = 0.15
[../]
[./SatGas]
type = RichardsSat
s_res = 0.05
sum_s_res = 0.15
[../]
[./SUPGwater]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[./SUPGgas]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./water_ic]
type = ConstantIC
value = 1
variable = pwater
[../]
[./gas_ic]
type = ConstantIC
value = 2
variable = pgas
[../]
[]
[Kernels]
active = 'richardsfwater richardstwater richardsfgas richardstgas'
[./richardstwater]
type = RichardsMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFlux
variable = pwater
[../]
[./richardstgas]
type = RichardsMassChange
variable = pgas
[../]
[./richardsfgas]
type = RichardsFlux
variable = pgas
[../]
[]
[AuxVariables]
[./seffgas]
[../]
[./seffwater]
[../]
[]
[AuxKernels]
[./seffgas_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffGas
variable = seffgas
[../]
[./seffwater_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffWater
variable = seffwater
[../]
[]
[Postprocessors]
[./mwater_init]
type = RichardsMass
variable = pwater
execute_on = timestep_begin
outputs = none
[../]
[./mgas_init]
type = RichardsMass
variable = pgas
execute_on = timestep_begin
outputs = none
[../]
[./mwater_fin]
type = RichardsMass
variable = pwater
execute_on = timestep_end
outputs = none
[../]
[./mgas_fin]
type = RichardsMass
variable = pgas
execute_on = timestep_end
outputs = none
[../]
[./mass_error_water]
type = FunctionValuePostprocessor
function = fcn_mass_error_w
[../]
[./mass_error_gas]
type = FunctionValuePostprocessor
function = fcn_mass_error_g
[../]
[./pw_left]
type = PointValue
point = '0 0 0'
variable = pwater
outputs = none
[../]
[./pw_right]
type = PointValue
point = '1 0 0'
variable = pwater
outputs = none
[../]
[./error_water]
type = FunctionValuePostprocessor
function = fcn_error_water
[../]
[./pg_left]
type = PointValue
point = '0 0 0'
variable = pgas
outputs = none
[../]
[./pg_right]
type = PointValue
point = '1 0 0'
variable = pgas
outputs = none
[../]
[./error_gas]
type = FunctionValuePostprocessor
function = fcn_error_gas
[../]
[]
[Functions]
[./fcn_mass_error_w]
type = ParsedFunction
expression = 'abs(0.5*(mi-mf)/(mi+mf))'
symbol_names = 'mi mf'
symbol_values = 'mwater_init mwater_fin'
[../]
[./fcn_mass_error_g]
type = ParsedFunction
expression = 'abs(0.5*(mi-mf)/(mi+mf))'
symbol_names = 'mi mf'
symbol_values = 'mgas_init mgas_fin'
[../]
[./fcn_error_water]
type = ParsedFunction
expression = 'abs((-b*log(-(gdens0*xval+(-b*exp(-p0/b)))/b)-p1)/p1)'
symbol_names = 'b gdens0 p0 xval p1'
symbol_values = '1E2 -1 pw_left 1 pw_right'
[../]
[./fcn_error_gas]
type = ParsedFunction
expression = 'abs((-b*log(-(gdens0*xval+(-b*exp(-p0/b)))/b)-p1)/p1)'
symbol_names = 'b gdens0 p0 xval p1'
symbol_values = '0.5E2 -0.5 pg_left 1 pg_right'
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
density_UO = 'DensityWater DensityGas'
relperm_UO = 'RelPermWater RelPermGas'
SUPG_UO = 'SUPGwater SUPGgas'
sat_UO = 'SatWater SatGas'
seff_UO = 'SeffWater SeffGas'
viscosity = '1E-3 0.5E-3'
gravity = '-1 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = gh18
execute_on = 'timestep_end final'
time_step_interval = 100000
exodus = true
[./console]
type = Console
time_step_interval = 1
[../]
[]
(modules/richards/test/tests/pressure_pulse/pp_fu_lumped_22.i)
# investigating pressure pulse in 1D with 2 phase
# transient
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 100
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = 'DensityWater DensityGas'
relperm_UO = 'RelPermWater RelPermGas'
SUPG_UO = 'SUPGwater SUPGgas'
sat_UO = 'SatWater SatGas'
seff_UO = 'SeffWater SeffGas'
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 2E6
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1E-5
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1E-5
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.0
n = 3
[../]
[./SatWater]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SatGas]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGwater]
type = RichardsSUPGstandard
p_SUPG = 1E3
[../]
[./SUPGgas]
type = RichardsSUPGstandard
p_SUPG = 1E3
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./water_ic]
type = ConstantIC
value = 2E6
variable = pwater
[../]
[./gas_ic]
type = ConstantIC
value = 2E6
variable = pgas
[../]
[]
[BCs]
[./left]
type = DirichletBC
boundary = left
value = 3E6
variable = pwater
[../]
[./left_gas]
type = DirichletBC
boundary = left
value = 3E6
variable = pgas
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[Kernels]
active = 'richardsfwater richardstwater richardsfgas richardstgas pconstraint'
[./richardstwater]
type = RichardsLumpedMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFullyUpwindFlux
variable = pwater
[../]
[./richardstgas]
type = RichardsLumpedMassChange
variable = pgas
[../]
[./richardsfgas]
type = RichardsFullyUpwindFlux
variable = pgas
[../]
[./pconstraint]
type = RichardsPPenalty
variable = pgas
a = 1E-8
lower_var = pwater
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = SeffWater
pressure_vars = 'pwater pgas'
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-15'
viscosity = '1E-3 1E-5'
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options = '-snes_monitor -snes_linesearch_monitor'
petsc_options_iname = '-pc_factor_shift_type'
petsc_options_value = 'nonzero'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E3
dtmin = 1E3
end_time = 1E4
l_tol = 1.e-4
nl_rel_tol = 1.e-7
nl_max_its = 10
l_max_its = 20
line_search = 'none'
[]
[Outputs]
file_base = pp_fu_lumped_22
execute_on = 'initial timestep_end final'
time_step_interval = 10000
exodus = true
[./console]
type = Console
time_step_interval = 1
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
elem_type = QUAD9
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[AuxVariables]
[vel_x]
order = SECOND
[]
[vel_y]
order = SECOND
[]
[]
[AuxKernels]
[vel_x]
type = VectorVariableComponentAux
variable = vel_x
vector_variable = velocity
component = 'x'
[]
[vel_y]
type = VectorVariableComponentAux
variable = vel_y
vector_variable = velocity
component = 'y'
[]
[]
[Variables]
[./velocity]
order = SECOND
family = LAGRANGE_VEC
[../]
[./T]
order = SECOND
[./InitialCondition]
type = ConstantIC
value = 1.0
[../]
[../]
[./p]
[../]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./momentum_time]
type = INSADMomentumTimeDerivative
variable = velocity
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[../]
[./temperature_time]
type = INSADHeatConductionTimeDerivative
variable = T
[../]
[./temperature_advection]
type = INSADEnergyAdvection
variable = T
[../]
[./temperature_conduction]
type = ADHeatConduction
variable = T
thermal_conductivity = 'k'
[../]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left'
[../]
[./lid]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 'lid_function'
[../]
[./T_hot]
type = DirichletBC
variable = T
boundary = 'bottom'
value = 1
[../]
[./T_cold]
type = DirichletBC
variable = T
boundary = 'top'
value = 0
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat]
type = INSAD3Eqn
velocity = velocity
pressure = p
temperature = T
[]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'asm 2 ilu 4'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
file_base = lid_driven_out
exodus = true
perf_graph = true
[]
(modules/porous_flow/examples/flow_through_fractured_media/fine_steady.i)
# Using a mixed-dimensional mesh
# Steady-state porepressure distribution along a fracture in a porous matrix
# This is used to initialise the transient solute-transport simulation
[Mesh]
type = FileMesh
# The gold mesh is used to reduce the number of large files in the MOOSE repository.
# The porepressure is not read from the gold mesh
file = 'gold/fine_steady_out.e'
block_id = '1 2 3'
block_name = 'fracture matrix1 matrix2'
boundary_id = '1 2'
boundary_name = 'bottom top'
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[pp]
[]
[]
[ICs]
[pp]
type = ConstantIC
variable = pp
value = 1e6
[]
[]
[BCs]
[ptop]
type = DirichletBC
variable = pp
boundary = top
value = 1e6
[]
[pbottom]
type = DirichletBC
variable = pp
boundary = bottom
value = 1.002e6
[]
[]
[Kernels]
[adv0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[relp]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[permeability1]
type = PorousFlowPermeabilityConst
permeability = '1.8e-11 0 0 0 1.8e-11 0 0 0 1.8e-11' # kf=3e-8, a=6e-4m. 1.8e-11 = kf * a
block = 'fracture'
[]
[permeability2]
type = PorousFlowPermeabilityConst
permeability = '1e-20 0 0 0 1e-20 0 0 0 1e-20'
block = 'matrix1 matrix2'
[]
[]
[Preconditioning]
active = basic
[mumps_is_best_for_parallel_jobs]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[basic]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu NONZERO 2 '
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
# controls for nonlinear iterations
nl_abs_tol = 1e-9
nl_rel_tol = 1e-14
[]
[Outputs]
exodus = true
execute_on = 'timestep_end'
[]
(modules/porous_flow/examples/flow_through_fractured_media/coarse.i)
# Flow and solute transport along a fracture embedded in a porous matrix
# The fracture is represented by lower dimensional elements
# fracture aperture = 6e-4m
# fracture porosity = 6e-4m = phi * a
# fracture permeability = 1.8e-11 which is based on k=3e-8 from a**2/12, and k*a = 3e-8*6e-4
# matrix porosity = 0.1
# matrix permeanility = 1e-20
[Mesh]
type = FileMesh
file = 'coarse.e'
block_id = '1 2 3'
block_name = 'fracture matrix1 matrix2'
boundary_id = '1 2'
boundary_name = 'bottom top'
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[pp]
[]
[massfrac0]
[]
[]
[AuxVariables]
[velocity_x]
family = MONOMIAL
order = CONSTANT
block = 'fracture'
[]
[velocity_y]
family = MONOMIAL
order = CONSTANT
block = 'fracture'
[]
[]
[AuxKernels]
[velocity_x]
type = PorousFlowDarcyVelocityComponentLowerDimensional
variable = velocity_x
component = x
aperture = 6E-4
[]
[velocity_y]
type = PorousFlowDarcyVelocityComponentLowerDimensional
variable = velocity_y
component = y
aperture = 6E-4
[]
[]
[ICs]
[massfrac0]
type = ConstantIC
variable = massfrac0
value = 0
[]
[pp_matrix]
type = ConstantIC
variable = pp
value = 1E6
[]
[]
[BCs]
[top]
type = DirichletBC
value = 0
variable = massfrac0
boundary = top
[]
[bottom]
type = DirichletBC
value = 1
variable = massfrac0
boundary = bottom
[]
[ptop]
type = DirichletBC
variable = pp
boundary = top
value = 1e6
[]
[pbottom]
type = DirichletBC
variable = pp
boundary = bottom
value = 1.002e6
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = pp
[]
[adv0]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = pp
[]
[diff0]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = pp
disp_trans = 0
disp_long = 0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = massfrac0
[]
[adv1]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = massfrac0
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 0
variable = massfrac0
disp_trans = 0
disp_long = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = massfrac0
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[poro_fracture]
type = PorousFlowPorosityConst
porosity = 6e-4 # = a * phif
block = 'fracture'
[]
[poro_matrix]
type = PorousFlowPorosityConst
porosity = 0.1
block = 'matrix1 matrix2'
[]
[diff1]
type = PorousFlowDiffusivityConst
diffusion_coeff = '1e-9 1e-9'
tortuosity = 1.0
block = 'fracture'
[]
[diff2]
type = PorousFlowDiffusivityConst
diffusion_coeff = '1e-9 1e-9'
tortuosity = 0.1
block = 'matrix1 matrix2'
[]
[permeability_fracture]
type = PorousFlowPermeabilityConst
permeability = '1.8e-11 0 0 0 1.8e-11 0 0 0 1.8e-11' # 1.8e-11 = a * kf
block = 'fracture'
[]
[permeability_matrix]
type = PorousFlowPermeabilityConst
permeability = '1e-20 0 0 0 1e-20 0 0 0 1e-20'
block = 'matrix1 matrix2'
[]
[relp]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[]
[Preconditioning]
[basic]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 10
dt = 1
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-12
[]
[VectorPostprocessors]
[xmass]
type = LineValueSampler
start_point = '-0.5 0 0'
end_point = '0.5 0 0'
sort_by = x
num_points = 41
variable = massfrac0
outputs = csv
[]
[]
[Outputs]
[csv]
type = CSV
execute_on = 'final'
[]
[]
(modules/xfem/test/tests/nucleation_uo/nucleate_edge_crack_2d.i)
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[XFEM]
geometric_cut_userobjects = 'cut_mesh2'
qrule = volfrac
output_cut_plane = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
xmin = 0
xmax = 2
ymin = 0.0
ymax = 1.0
elem_type = QUAD4
[]
[top_left]
type = BoundingBoxNodeSetGenerator
new_boundary = pull_top_left
bottom_left = '-0.01 0.99 0'
top_right = '0.11 1.01 0'
input = gen
[]
[top_right]
type = BoundingBoxNodeSetGenerator
new_boundary = pull_top_right
bottom_left = '1.89 0.99 0'
top_right = '2.01 1.01 0'
input = top_left
[]
[top_middle_ss]
type = SideSetsFromBoundingBoxGenerator
input = top_right
bottom_left = '0.79 0.89 0'
top_right = '1.21 1.01 0'
block_id = '0'
boundary_new = top_middle_ss
boundaries_old = top
[]
[nucleate]
type = ParsedSubdomainMeshGenerator
input = top_middle_ss
combinatorial_geometry = 'y > 0.39 & y < 0.51'
block_id = 10
[]
[]
[DomainIntegral]
integrals = 'InteractionIntegralKI InteractionIntegralKII'
displacements = 'disp_x disp_y'
crack_front_points_provider = cut_mesh2
2d=true
number_points_from_provider = 0
crack_direction_method = CurvedCrackFront
radius_inner = '0.15'
radius_outer = '0.45'
poissons_ratio = 0.3
youngs_modulus = 207000
block = 0
incremental = true
used_by_xfem_to_grow_crack = true
[]
[UserObjects]
[nucleate]
type = MeshCut2DRankTwoTensorNucleation
tensor = stress
scalar_type = MaxPrincipal
nucleation_threshold = nucleation_threshold
initiate_on_boundary = 'left right'
nucleation_length = .2
[]
[cut_mesh2]
type = MeshCut2DFractureUserObject
mesh_file = make_edge_crack_in.e
k_critical=230
growth_increment = 0.11
nucleate_uo = nucleate
[]
[]
[AuxVariables]
[nucleation_threshold]
order = CONSTANT
family = MONOMIAL
[]
[]
[ICs]
[nucleation_bulk]
type = ConstantIC
value = 10000
variable = nucleation_threshold
block = 0
[]
[nucleation_weak]
type = FunctionIC
function = nucleation_x
variable = nucleation_threshold
block = 10
[]
[]
[Functions]
[nucleation_x]
type = ParsedFunction
expression = '300+x*50'
[]
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
planar_formulation = plane_strain
add_variables = true
generate_output = 'stress_xx stress_yy vonmises_stress max_principal_stress'
[../]
[]
[Functions]
[bc_pull_top]
type = ParsedFunction
expression = 0.0005*t
[]
[]
[BCs]
[top_edges]
type = FunctionDirichletBC
boundary = 'pull_top_left pull_top_right'
variable = disp_y
function = bc_pull_top
[]
[top_middle]
type = NeumannBC
boundary = top_middle_ss
variable = disp_y
value = -2000
[]
[bottom_x]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[]
[bottom_y]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
[../]
[]
[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 8'
line_search = 'none'
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
# controls for linear iterations
l_max_its = 100
l_tol = 1e-2
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
# time control
start_time = 0.0
dt = 1.0
end_time = 5
max_xfem_update = 100
[]
[Outputs]
csv=true
execute_on = TIMESTEP_END
# [xfemcutter]
# type=XFEMCutMeshOutput
# xfem_cutter_uo=cut_mesh2
# []
# console = false
[./console]
type = Console
output_linear = false
output_nonlinear = false
[../]
[]
(modules/functional_expansion_tools/test/tests/standard_use/volume_coupled.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
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 = volume_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/porous_flow/test/tests/dispersion/diff01_fv.i)
# Test diffusive part of FVPorousFlowDispersiveFlux kernel by setting dispersion
# coefficients to zero. Pressure is held constant over the mesh, and gravity is
# set to zero so that no advective transport of mass takes place.
# Mass fraction is set to 1 on the left hand side and 0 on the right hand side.
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
nx = 20
xmax = 10
bias_x = 1.2
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[pp]
type = MooseVariableFVReal
[]
[massfrac0]
type = MooseVariableFVReal
[]
[]
[AuxVariables]
[velocity]
family = MONOMIAL
order = FIRST
[]
[]
[AuxKernels]
[velocity]
type = ADPorousFlowDarcyVelocityComponent
variable = velocity
component = x
[]
[]
[ICs]
[pp]
type = ConstantIC
variable = pp
value = 1e5
[]
[massfrac0]
type = ConstantIC
variable = massfrac0
value = 0
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
value = 1
variable = massfrac0
boundary = left
[]
[right]
type = FVDirichletBC
value = 0
variable = massfrac0
boundary = right
[]
[pright]
type = FVDirichletBC
variable = pp
boundary = right
value = 1e5
[]
[pleft]
type = FVDirichletBC
variable = pp
boundary = left
value = 1e5
[]
[]
[FVKernels]
[mass0]
type = FVPorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[diff0_pp]
type = FVPorousFlowDispersiveFlux
fluid_component = 0
variable = pp
disp_trans = 0
disp_long = 0
[]
[mass1]
type = FVPorousFlowMassTimeDerivative
fluid_component = 1
variable = massfrac0
[]
[diff1_x]
type = FVPorousFlowDispersiveFlux
fluid_component = 1
variable = massfrac0
disp_trans = 0
disp_long = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1e7
density0 = 1000
viscosity = 0.001
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = ADPorousFlowTemperature
[]
[ppss]
type = ADPorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = ADPorousFlowMassFraction
mass_fraction_vars = massfrac0
[]
[simple_fluid]
type = ADPorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[poro]
type = ADPorousFlowPorosityConst
porosity = 0.3
[]
[diff]
type = ADPorousFlowDiffusivityConst
diffusion_coeff = '1 1'
tortuosity = 0.1
[]
[relp]
type = ADPorousFlowRelativePermeabilityConst
phase = 0
[]
[permeability]
type = ADPorousFlowPermeabilityConst
permeability = '1e-9 0 0 0 1e-9 0 0 0 1e-9'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu NONZERO 2 '
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 1
end_time = 20
[]
[VectorPostprocessors]
[xmass]
type = ElementValueSampler
sort_by = id
variable = massfrac0
[]
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(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/porous_flow/examples/lava_lamp/1phase_convection.i)
# Two phase density-driven convection of dissolved CO2 in brine
#
# The model starts with CO2 in the liquid phase only. The CO2 diffuses into the brine.
# As the density of the CO2-saturated brine is greater
# than the unsaturated brine, a gravitational instability arises and density-driven
# convection of CO2-rich fingers descend into the unsaturated brine.
#
# The instability is seeded by a random perturbation to the porosity field.
# Mesh adaptivity is used to refine the mesh as the fingers form.
#
# Note: this model is computationally expensive, so should be run with multiple cores.
[GlobalParams]
PorousFlowDictator = 'dictator'
gravity = '0 -9.81 0'
[]
[Adaptivity]
max_h_level = 2
marker = marker
initial_marker = initial
initial_steps = 2
[Indicators]
[indicator]
type = GradientJumpIndicator
variable = zi
[]
[]
[Markers]
[marker]
type = ErrorFractionMarker
indicator = indicator
refine = 0.8
[]
[initial]
type = BoxMarker
bottom_left = '0 1.95 0'
top_right = '2 2 0'
inside = REFINE
outside = DO_NOTHING
[]
[]
[]
[Mesh]
type = GeneratedMesh
dim = 2
ymin = 1.5
ymax = 2
xmax = 2
ny = 20
nx = 40
bias_y = 0.95
[]
[AuxVariables]
[xnacl]
initial_condition = 0.01
[]
[saturation_gas]
order = FIRST
family = MONOMIAL
[]
[xco2l]
order = FIRST
family = MONOMIAL
[]
[density_liquid]
order = FIRST
family = MONOMIAL
[]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[saturation_gas]
type = PorousFlowPropertyAux
variable = saturation_gas
property = saturation
phase = 1
execute_on = 'timestep_end'
[]
[xco2l]
type = PorousFlowPropertyAux
variable = xco2l
property = mass_fraction
phase = 0
fluid_component = 1
execute_on = 'timestep_end'
[]
[density_liquid]
type = PorousFlowPropertyAux
variable = density_liquid
property = density
phase = 0
execute_on = 'timestep_end'
[]
[]
[Variables]
[pgas]
[]
[zi]
scaling = 1e4
[]
[]
[ICs]
[pressure]
type = FunctionIC
function = 10e6-9.81*1000*y
variable = pgas
[]
[zi]
type = ConstantIC
value = 0
variable = zi
[]
[porosity]
type = RandomIC
variable = porosity
min = 0.25
max = 0.275
seed = 0
[]
[]
[BCs]
[top]
type = DirichletBC
value = 0.04
variable = zi
boundary = top
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pgas
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pgas
[]
[diff0]
type = PorousFlowDispersiveFlux
fluid_component = 0
variable = pgas
disp_long = '0 0'
disp_trans = '0 0'
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = zi
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = zi
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = zi
disp_long = '0 0'
disp_trans = '0 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pgas zi'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[fs]
type = PorousFlowBrineCO2
brine_fp = brine
co2_fp = co2
capillary_pressure = pc
[]
[]
[FluidProperties]
[co2sw]
type = CO2FluidProperties
[]
[co2]
type = TabulatedBicubicFluidProperties
fp = co2sw
[]
[brine]
type = BrineFluidProperties
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = '45'
[]
[brineco2]
type = PorousFlowFluidState
gas_porepressure = 'pgas'
z = 'zi'
temperature_unit = Celsius
xnacl = 'xnacl'
capillary_pressure = pc
fluid_state = fs
[]
[porosity]
type = PorousFlowPorosityConst
porosity = porosity
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-11 0 0 0 1e-11 0 0 0 1e-11'
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
phase = 0
n = 2
s_res = 0.1
sum_s_res = 0.2
[]
[relperm_gas]
type = PorousFlowRelativePermeabilityCorey
phase = 1
n = 2
s_res = 0.1
sum_s_res = 0.2
[]
[diffusivity]
type = PorousFlowDiffusivityConst
diffusion_coeff = '2e-9 2e-9 2e-9 2e-9'
tortuosity = '1 1'
[]
[]
[Preconditioning]
active = basic
[mumps_is_best_for_parallel_jobs]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[basic]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu NONZERO 2 '
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 1e6
nl_max_its = 25
l_max_its = 100
dtmax = 1e4
nl_abs_tol = 1e-6
[TimeStepper]
type = IterationAdaptiveDT
dt = 100
growth_factor = 2
cutback_factor = 0.5
[]
[]
[Functions]
[flux]
type = ParsedFunction
symbol_values = 'delta_xco2 dt'
symbol_names = 'dx dt'
expression = 'dx/dt'
[]
[]
[Postprocessors]
[total_co2_in_gas]
type = PorousFlowFluidMass
phase = 1
fluid_component = 1
[]
[total_co2_in_liquid]
type = PorousFlowFluidMass
phase = 0
fluid_component = 1
[]
[numdofs]
type = NumDOFs
[]
[delta_xco2]
type = ChangeOverTimePostprocessor
postprocessor = total_co2_in_liquid
[]
[dt]
type = TimestepSize
[]
[flux]
type = FunctionValuePostprocessor
function = flux
[]
[]
[Outputs]
print_linear_residuals = false
perf_graph = true
exodus = true
csv = true
[]
(test/tests/dgkernels/2d_diffusion_dg/dg_stateful.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[../]
[./exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./abs]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGKernels]
[./dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[../]
[]
[BCs]
[./all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[]
[Materials]
[./stateful]
type = StatefulMaterial
initial_diffusivity = 1
boundary = 'left'
[../]
[./general]
type = GenericConstantMaterial
block = '0'
prop_names = 'dummy'
prop_values = '1'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-10
[]
(test/tests/transfers/multiapp_nearest_node_transfer/parallel_sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 180
parallel_type = replicated
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 1.0
[../]
[../]
[]
[AuxVariables]
[./pid]
order = constant
family = monomial
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[AuxKernels]
[./pid]
type = ProcessorIDAux
variable = pid
[../]
[]
(modules/contact/test/tests/bouncing-block-contact/grid-sequencing/grid-sequencing.i)
starting_point = 2e-1
# We offset slightly so we avoid the case where the bottom of the secondary block and the top of the
# primary block are perfectly vertically aligned which can cause the backtracking line search some
# issues for a coarsest mesh (basic line search handles that fine)
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
[]
[Mesh]
[File]
type = FileMeshGenerator
file = level0.e
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[Contact]
[contact]
secondary = 10
primary = 20
formulation = mortar
model = coulomb
friction_coefficient = 0.4
c_normal = 1e+02
c_tangential = 1.0e2
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
num_steps = 3
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-6'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
nl_abs_tol = 5e-10
num_grids = 5
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exo]
type = Exodus
sync_times = '15'
sync_only = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = contact_normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(tutorials/tutorial03_verification/app/test/tests/step03_analytical/1d_analytical.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
xmax = 0.03
nx = 200
[]
[]
[Variables]
[T]
[]
[]
[ICs]
[T_O]
type = ConstantIC
variable = T
value = 300
[]
[]
[Kernels]
[T_time]
type = HeatConductionTimeDerivative
variable = T
density_name = 7800
specific_heat = 450
[]
[T_cond]
type = HeatConduction
variable = T
diffusion_coefficient = 80.2
[]
[]
[BCs]
[left]
type = NeumannBC
variable = T
boundary = left
value = 7e5
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
dt = 0.01
end_time = 1
[]
[Outputs]
exodus = true
csv = true
[]
[Functions]
[T_exact]
type = ParsedFunction
symbol_names = 'k rho cp T0 qs'
symbol_values = '80.2 7800 450 300 7e5'
expression = 'T0 + '
'qs/k*(2*sqrt(k/(rho*cp)*t/pi)*exp(-x^2/(4*k/(rho*cp)*(t+1e-50))) - '
'x*(1-erf(x/(2*sqrt(k/(rho*cp)*(t+1e-50))))))'
[]
[]
[Postprocessors]
[error]
type = NodalL2Error
variable = T
function = T_exact
[]
[h]
type = AverageElementSize
[]
[]
[VectorPostprocessors]
[T_exact]
type = LineFunctionSampler
functions = T_exact
start_point = '0 0 0'
end_point = '0.03 0 0'
num_points = 200
sort_by = x
execute_on = 'INITIAL TIMESTEP_END'
[]
[T_simulation]
type = LineValueSampler
variable = T
start_point = '0 0 0'
end_point = '0.03 0 0'
num_points = 200
sort_by = x
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
(modules/xfem/test/tests/moving_interface/verification/1D_rz_lsdep1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: quasi-1D
# Coordinate System: rz
# Material Numbers/Types: level set dep 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# A simple transient heat transfer problem in cylindrical coordinates designed
# with the Method of Manufactured Solutions. This problem was developed to
# verify XFEM performance in the presence of a moving interface for linear
# element models that can be exactly evaluated by FEM/Moose. Both the
# temperature solution and level set function are designed to be linear to
# attempt to minimize error between the Moose/exact solution and XFEM results.
# Thermal conductivity is dependent upon the value of the level set function
# at each timestep.
# Results:
# The temperature at the left boundary (x=1) exhibits the largest difference
# between the FEM/Moose solution and XFEM results. We present the XFEM
# results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 480.0008131
# 0.6 520 520.0038333
# 0.8 560 560.0088286
# 1.0 600 600.0131612
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 1
xmin = 1.0
xmax = 2.0
ymin = 0.0
ymax = 0.5
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-200*x+400) + (1/x)*(310*t - (10/1.02)*x*t - (1/1.02)*t^2)'
[../]
[./neumann_func]
type = ParsedFunction
expression = '((0.05/2.04)*(2.04-x-0.2*t) + 1.5)*200*t'
[../]
[./k_func]
type = ParsedFunction
expression = '(0.05/2.04)*(2.04-x-0.2*t) + 1.5'
[../]
[./ls_func]
type = ParsedFunction
expression = '2.04 - x -0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericFunctionMaterial
prop_names = 'diffusion_coefficient'
prop_values = 'k_func'
[../]
[]
[BCs]
[./left_u]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 'right'
value = 400
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/porous_flow/test/tests/mass_conservation/mass06.i)
# Checking that the mass postprocessor correctly calculates the mass
# of each component in each phase, as well as the total mass of each
# component in all phases. Also tests that optional saturation threshold
# gives the correct mass
# 2phase, 2component, constant porosity
# saturation_threshold set to 0.6 for phase 1
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[sat]
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[]
[ICs]
[pinit]
type = ConstantIC
value = 1
variable = pp
[]
[satinit]
type = FunctionIC
function = 1-x
variable = sat
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = sat
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp sat'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 1
thermal_expansion = 0
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 0.1
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = pp
phase1_saturation = sat
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[]
[Postprocessors]
[comp0_phase0_mass]
type = PorousFlowFluidMass
fluid_component = 0
phase = 0
[]
[comp0_phase1_mass]
type = PorousFlowFluidMass
fluid_component = 0
phase = 1
[]
[comp0_total_mass]
type = PorousFlowFluidMass
fluid_component = 0
[]
[comp1_phase0_mass]
type = PorousFlowFluidMass
fluid_component = 1
phase = 0
[]
[comp1_phase1_mass]
type = PorousFlowFluidMass
fluid_component = 1
phase = 1
[]
[comp1_total_mass]
type = PorousFlowFluidMass
fluid_component = 1
[]
[comp1_phase1_threshold_mass]
type = PorousFlowFluidMass
fluid_component = 1
phase = 1
saturation_threshold = 0.6
[]
[]
[Executioner]
type = Transient
solve_type = Newton
nl_abs_tol = 1e-16
dt = 1
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = mass06
csv = true
[]
(modules/richards/test/tests/gravity_head_2/gh_fu_06.i)
# unsaturated = true
# gravity = true
# supg = false
# transient = true
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmin = 0
xmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = 'DensityWater DensityGas'
relperm_UO = 'RelPermWater RelPermGas'
SUPG_UO = 'SUPGwater SUPGgas'
sat_UO = 'SatWater SatGas'
seff_UO = 'SeffWater SeffGas'
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1E-2 1E-1 1E0 1E1 1E3 1E4 1E5 1E6 1E7'
x = '0 1E-1 1E0 1E1 1E2 1E3 1E4 1E5 1E6'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 1.0E2
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 0.5
bulk_mod = 0.5E2
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.0
n = 3
[../]
[./SatWater]
type = RichardsSat
s_res = 0.1
sum_s_res = 0.15
[../]
[./SatGas]
type = RichardsSat
s_res = 0.05
sum_s_res = 0.15
[../]
[./SUPGwater]
type = RichardsSUPGnone
[../]
[./SUPGgas]
type = RichardsSUPGnone
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./water_ic]
type = ConstantIC
value = 1
variable = pwater
[../]
[./gas_ic]
type = ConstantIC
value = 2
variable = pgas
[../]
[]
[Kernels]
active = 'richardsfwater richardstwater richardsfgas richardstgas'
[./richardstwater]
type = RichardsMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFullyUpwindFlux
variable = pwater
[../]
[./richardstgas]
type = RichardsMassChange
variable = pgas
[../]
[./richardsfgas]
type = RichardsFullyUpwindFlux
variable = pgas
[../]
[]
[AuxVariables]
[./seffgas]
[../]
[./seffwater]
[../]
[]
[AuxKernels]
[./seffgas_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffGas
variable = seffgas
[../]
[./seffwater_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffWater
variable = seffwater
[../]
[]
[Postprocessors]
[./mwater_init]
type = RichardsMass
variable = pwater
execute_on = timestep_begin
outputs = none
[../]
[./mgas_init]
type = RichardsMass
variable = pgas
execute_on = timestep_begin
outputs = none
[../]
[./mwater_fin]
type = RichardsMass
variable = pwater
execute_on = timestep_end
outputs = none
[../]
[./mgas_fin]
type = RichardsMass
variable = pgas
execute_on = timestep_end
outputs = none
[../]
[./mass_error_water]
type = FunctionValuePostprocessor
function = fcn_mass_error_w
[../]
[./mass_error_gas]
type = FunctionValuePostprocessor
function = fcn_mass_error_g
[../]
[./pw_left]
type = PointValue
point = '0 0 0'
variable = pwater
outputs = none
[../]
[./pw_right]
type = PointValue
point = '1 0 0'
variable = pwater
outputs = none
[../]
[./error_water]
type = FunctionValuePostprocessor
function = fcn_error_water
[../]
[./pg_left]
type = PointValue
point = '0 0 0'
variable = pgas
outputs = none
[../]
[./pg_right]
type = PointValue
point = '1 0 0'
variable = pgas
outputs = none
[../]
[./error_gas]
type = FunctionValuePostprocessor
function = fcn_error_gas
[../]
[]
[Functions]
[./fcn_mass_error_w]
type = ParsedFunction
expression = 'abs(0.5*(mi-mf)/(mi+mf))'
symbol_names = 'mi mf'
symbol_values = 'mwater_init mwater_fin'
[../]
[./fcn_mass_error_g]
type = ParsedFunction
expression = 'abs(0.5*(mi-mf)/(mi+mf))'
symbol_names = 'mi mf'
symbol_values = 'mgas_init mgas_fin'
[../]
[./fcn_error_water]
type = ParsedFunction
expression = 'abs((-b*log(-(gdens0*xval+(-b*exp(-p0/b)))/b)-p1)/p1)'
symbol_names = 'b gdens0 p0 xval p1'
symbol_values = '1E2 -1 pw_left 1 pw_right'
[../]
[./fcn_error_gas]
type = ParsedFunction
expression = 'abs((-b*log(-(gdens0*xval+(-b*exp(-p0/b)))/b)-p1)/p1)'
symbol_names = 'b gdens0 p0 xval p1'
symbol_values = '0.5E2 -0.5 pg_left 1 pg_right'
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
viscosity = '1E-3 0.5E-3'
gravity = '-1 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-13 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = gh_fu_06
csv = true
[]
(modules/porous_flow/test/tests/dispersion/disp01.i)
# Test dispersive part of PorousFlowDispersiveFlux kernel by setting diffusion
# coefficients to zero. A pressure gradient is applied over the mesh to give a
# uniform velocity. Gravity is set to zero.
# Mass fraction is set to 1 on the left hand side and 0 on the right hand side.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 10
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[pp]
[]
[massfrac0]
[]
[]
[AuxVariables]
[velocity]
family = MONOMIAL
order = FIRST
[]
[]
[AuxKernels]
[velocity]
type = PorousFlowDarcyVelocityComponent
variable = velocity
component = x
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = pic
[]
[massfrac0]
type = ConstantIC
variable = massfrac0
value = 0
[]
[]
[Functions]
[pic]
type = ParsedFunction
expression = 1.1e5-x*1e3
[]
[]
[BCs]
[xleft]
type = DirichletBC
value = 1
variable = massfrac0
boundary = left
[]
[xright]
type = DirichletBC
value = 0
variable = massfrac0
boundary = right
[]
[pright]
type = DirichletBC
variable = pp
boundary = right
value = 1e5
[]
[pleft]
type = DirichletBC
variable = pp
boundary = left
value = 1.1e5
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[adv0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
[]
[diff0]
type = PorousFlowDispersiveFlux
variable = pp
disp_trans = 0
disp_long = 0.2
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = massfrac0
[]
[adv1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = massfrac0
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = massfrac0
disp_trans = 0
disp_long = 0.2
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1e9
density0 = 1000
viscosity = 0.001
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = massfrac0
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[poro]
type = PorousFlowPorosityConst
porosity = 0.3
[]
[diff]
type = PorousFlowDiffusivityConst
diffusion_coeff = '0 0'
tortuosity = 0.1
[]
[relp]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-9 0 0 0 1e-9 0 0 0 1e-9'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu NONZERO 2 '
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 1e3
dtmax = 50
[TimeStepper]
type = IterationAdaptiveDT
growth_factor = 1.5
cutback_factor = 0.5
dt = 1
[]
[]
[VectorPostprocessors]
[xmass]
type = NodalValueSampler
sort_by = id
variable = massfrac0
[]
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(modules/porous_flow/test/tests/jacobian/hfrompps.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
[]
[Variables]
[pressure]
[]
[temperature]
[]
[]
[ICs]
[pressure_ic]
type = ConstantIC
variable = pressure
value = 1
[]
[temperature_ic]
type = ConstantIC
variable = temperature
value = 4
[]
[]
[Kernels]
[p_td]
type = TimeDerivative
variable = pressure
[]
[energy_dot]
type = TimeDerivative
variable = temperature
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
thermal_expansion = 0
[]
[]
[DiracKernels]
[source_h]
type = PorousFlowPointEnthalpySourceFromPostprocessor
variable = temperature
mass_flux = mass_flux_in
point = '0.5 0.5 0'
T_in = T_in
pressure = pressure
fp = simple_fluid
[]
[]
[Preconditioning]
[preferred]
type = SMP
full = true
petsc_options_iname = '-pc_type -snes_test_err'
petsc_options_value = ' lu 1e-6'
[]
[]
[Postprocessors]
[mass_flux_in]
type = FunctionValuePostprocessor
function = 1
execute_on = 'initial timestep_end'
[]
[T_in]
type = FunctionValuePostprocessor
function = 1
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
nl_abs_tol = 1e-14
dt = 1
num_steps = 1
[]
(test/tests/transfers/general_field/nearest_node/duplicated_nearest_node_tests/parallel_sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 180
parallel_type = replicated
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 1.0
[../]
[../]
[]
[AuxVariables]
[./pid]
order = constant
family = monomial
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[AuxKernels]
[./pid]
type = ProcessorIDAux
variable = pid
[../]
[]
(test/tests/misc/check_error/multiple_bad_ic_test.i)
[Mesh]
file = sq-2blk.e
uniform_refine = 1
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./u_aux]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./ic_u_1]
type = ConstantIC
variable = u
value = 42
block = '1'
[../]
[./ic_u_2]
type = ConstantIC
variable = u
value = 24
# Oops - can't have two ICs on the same block
[../]
[./ic_u_aux_1]
type = ConstantIC
variable = u_aux
value = 6.25
block = '1'
[../]
[./ic_u_aux_2]
type = ConstantIC
variable = u_aux
value = 9.99
block = '2'
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-10
[]
(modules/functional_expansion_tools/examples/2D_interface_no_material/sub.i)
# Derived from the example '2D_interface' with the following differences:
#
# 1) No materials are used
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0.4
xmax = 2.4
nx = 30
ymin = 0.0
ymax = 10.0
ny = 20
[]
[Variables]
[./s]
[../]
[]
[Kernels]
[./diff_s]
type = Diffusion
variable = s
[../]
[./time_diff_s]
type = TimeDerivative
variable = s
[../]
[]
[ICs]
[./start_s]
type = ConstantIC
value = 2
variable = s
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = s
boundary = bottom
value = 0.1
[../]
[./interface_flux]
type = FXFluxBC
boundary = left
variable = s
function = FX_Basis_Flux_Sub
[../]
[]
[Functions]
[./FX_Basis_Value_Sub]
type = FunctionSeries
series_type = Cartesian
orders = '4'
physical_bounds = '0.0 10'
y = Legendre
[../]
[./FX_Basis_Flux_Sub]
type = FunctionSeries
series_type = Cartesian
orders = '5'
physical_bounds = '0.0 10'
y = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Sub]
type = FXBoundaryValueUserObject
function = FX_Basis_Value_Sub
variable = s
boundary = left
[../]
[./FX_Flux_UserObject_Sub]
type = FXBoundaryFluxUserObject
function = FX_Basis_Flux_Sub
variable = s
boundary = left
diffusivity = 1.0
[../]
[]
[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'
[]
(test/tests/auxkernels/projection_aux/1d.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 1
nx = 10
elem_type = EDGE3
[]
[ICs]
active = 'constant_elem constant_nodal'
[constant_elem]
type = ConstantIC
variable = base_elem
value = 4
[]
[constant_nodal]
type = ConstantIC
variable = base_nodal
value = 3.5
[]
[linear_elem]
type = FunctionIC
variable = base_elem
function = 2+2*x
[]
[linear_nodal]
type = FunctionIC
variable = base_nodal
function = 3+3*x
[]
[quadratic_elem]
type = FunctionIC
variable = base_elem
function = 2+2*x*x
[]
[quadratic_nodal]
type = FunctionIC
variable = base_nodal
function = 3+3*x*x
[]
[]
[AuxVariables]
# Families:
# LAGRANGE, MONOMIAL, HERMITE, SCALAR, HIERARCHIC, CLOUGH, XYZ, SZABAB, BERNSTEIN,
# L2_LAGRANGE, L2_HIERARCHIC, RATIONAL_BERNSTEIN, SIDE_HIERARCHIC
# Notes:
# - 'elemental': MONOMIAL, XYZ, L2_LAGRANGE, L2_HIERARCHIC
# - 'nodal': LAGRANGE, HERMITE, HIERARCHIC, CLOUGH, SZABAB, BERNSTEIN, RATIONAL_BERNSTEIN
# - Hermite, Hierachic, Clough, Bernstein, rational Bernstein cannot be created on 1D EDGE3 elements
# - Hermite, Hierarchic, Clough, Bernstein, rational Bernstein, Szabab, L2_lagrange, L2_hierarchic
# cannot be created with a constant order
[base_elem]
family = MONOMIAL
order = CONSTANT
[]
[base_nodal]
[]
[test_elem_lagrange]
[]
[test_elem_lagrange_high]
order = SECOND
[]
[test_elem_mono]
family = MONOMIAL
order = CONSTANT
[]
[test_elem_mono_high]
family = MONOMIAL
order = SECOND
[]
[test_elem_fv]
type = MooseVariableFVReal
[]
[test_elem_xyz]
family = XYZ
order = CONSTANT
[]
[test_elem_xyz_high]
family = XYZ
order = SECOND
[]
[test_elem_szabab]
family = SZABAB
order = FIRST
[]
[test_elem_l2_lagrange]
family = L2_LAGRANGE
order = FIRST
[]
[test_elem_l2_lagrange_high]
family = L2_LAGRANGE
order = SECOND
[]
[test_elem_l2_hierarchic]
family = L2_HIERARCHIC
order = FIRST
[]
[test_elem_l2_hierarchic_high]
family = L2_HIERARCHIC
order = SECOND
[]
[test_nodal_lagrange]
[]
[test_nodal_lagrange_high]
order = SECOND
[]
[test_nodal_mono]
family = MONOMIAL
order = CONSTANT
[]
[test_nodal_mono_high]
family = MONOMIAL
order = SECOND
[]
[test_nodal_fv]
type = MooseVariableFVReal
[]
[test_nodal_xyz]
family = XYZ
order = CONSTANT
[]
[test_nodal_xyz_high]
family = XYZ
order = SECOND
[]
[test_nodal_szabab]
family = SZABAB
order = FIRST
[]
[test_nodal_l2_lagrange]
family = L2_LAGRANGE
order = FIRST
[]
[test_nodal_l2_lagrange_high]
family = L2_LAGRANGE
order = SECOND
[]
[test_nodal_l2_hierarchic]
family = L2_HIERARCHIC
order = FIRST
[]
[test_nodal_l2_hierarchic_high]
family = L2_HIERARCHIC
order = SECOND
[]
[]
[AuxKernels]
# Project from constant monomial
[base_elem_proj_lagrange]
type = ProjectionAux
variable = test_elem_lagrange
v = base_elem
[]
[base_elem_proj_lagrange_high]
type = ProjectionAux
variable = test_elem_lagrange_high
v = base_elem
[]
[base_elem_proj_mono]
type = ProjectionAux
variable = test_elem_mono
v = base_elem
[]
[base_elem_proj_mono_high]
type = ProjectionAux
variable = test_elem_mono_high
v = base_elem
[]
[base_elem_proj_fv]
type = ProjectionAux
variable = test_elem_fv
v = base_elem
[]
[base_elem_proj_xyz]
type = ProjectionAux
variable = test_elem_xyz
v = base_elem
[]
[base_elem_proj_xyz_high]
type = ProjectionAux
variable = test_elem_xyz_high
v = base_elem
[]
[base_elem_proj_szabab]
type = ProjectionAux
variable = test_elem_szabab
v = base_elem
[]
[base_elem_proj_l2_lagrange]
type = ProjectionAux
variable = test_elem_l2_lagrange
v = base_elem
[]
[base_elem_proj_l2_lagrange_high]
type = ProjectionAux
variable = test_elem_l2_lagrange_high
v = base_elem
[]
[base_elem_proj_l2_hierarchic]
type = ProjectionAux
variable = test_elem_l2_hierarchic
v = base_elem
[]
[base_elem_proj_l2_hierarchic_high]
type = ProjectionAux
variable = test_elem_l2_hierarchic_high
v = base_elem
[]
# Project from constant nodal
[base_nodal_proj_lagrange]
type = ProjectionAux
variable = test_nodal_lagrange
v = base_nodal
[]
[base_nodal_proj_lagrange_high]
type = ProjectionAux
variable = test_nodal_lagrange_high
v = base_nodal
[]
[base_nodal_proj_mono]
type = ProjectionAux
variable = test_nodal_mono
v = base_nodal
[]
[base_nodal_proj_mono_high]
type = ProjectionAux
variable = test_nodal_mono_high
v = base_nodal
[]
[base_nodal_proj_fv]
type = ProjectionAux
variable = test_nodal_fv
v = base_nodal
[]
[base_nodal_proj_xyz]
type = ProjectionAux
variable = test_nodal_xyz
v = base_nodal
[]
[base_nodal_proj_xyz_high]
type = ProjectionAux
variable = test_nodal_xyz_high
v = base_nodal
[]
[base_nodal_proj_szabab]
type = ProjectionAux
variable = test_nodal_szabab
v = base_nodal
[]
[base_nodal_proj_l2_lagrange]
type = ProjectionAux
variable = test_nodal_l2_lagrange
v = base_nodal
[]
[base_nodal_proj_l2_lagrange_high]
type = ProjectionAux
variable = test_nodal_l2_lagrange_high
v = base_nodal
[]
[base_nodal_proj_l2_hierarchic]
type = ProjectionAux
variable = test_nodal_l2_hierarchic
v = base_nodal
[]
[base_nodal_proj_l2_hierarchic_high]
type = ProjectionAux
variable = test_nodal_l2_hierarchic_high
v = base_nodal
[]
[]
[Postprocessors]
[base_elem_proj_lagrange]
type = ElementL2Difference
variable = test_elem_lagrange
other_variable = base_elem
[]
[base_elem_proj_lagrange_high]
type = ElementL2Difference
variable = test_elem_lagrange_high
other_variable = base_elem
[]
[base_elem_proj_mono]
type = ElementL2Difference
variable = test_elem_mono
other_variable = base_elem
[]
[base_elem_proj_mono_high]
type = ElementL2Difference
variable = test_elem_mono_high
other_variable = base_elem
[]
[base_elem_proj_fv]
type = ElementL2Difference
variable = test_elem_fv
other_variable = base_elem
[]
[base_elem_proj_xyz]
type = ElementL2Difference
variable = test_elem_xyz
other_variable = base_elem
[]
[base_elem_proj_xyz_high]
type = ElementL2Difference
variable = test_elem_xyz_high
other_variable = base_elem
[]
[base_elem_proj_szabab]
type = ElementL2Difference
variable = test_elem_szabab
other_variable = base_elem
[]
[base_elem_proj_l2_lagrange]
type = ElementL2Difference
variable = test_elem_l2_lagrange
other_variable = base_elem
[]
[base_elem_proj_l2_lagrange_high]
type = ElementL2Difference
variable = test_elem_l2_lagrange_high
other_variable = base_elem
[]
[base_elem_proj_l2_hierarchic]
type = ElementL2Difference
variable = test_elem_l2_hierarchic
other_variable = base_elem
[]
[base_elem_proj_l2_hierarchic_high]
type = ElementL2Difference
variable = test_elem_l2_hierarchic_high
other_variable = base_elem
[]
# Project from constant nodal
[base_nodal_proj_lagrange]
type = ElementL2Difference
variable = test_nodal_lagrange
other_variable = base_nodal
[]
[base_nodal_proj_lagrange_high]
type = ElementL2Difference
variable = test_nodal_lagrange_high
other_variable = base_nodal
[]
[base_nodal_proj_mono]
type = ElementL2Difference
variable = test_nodal_mono
other_variable = base_nodal
[]
[base_nodal_proj_mono_high]
type = ElementL2Difference
variable = test_nodal_mono_high
other_variable = base_nodal
[]
[base_nodal_proj_fv]
type = ElementL2Difference
variable = test_nodal_fv
other_variable = base_nodal
[]
[base_nodal_proj_xyz]
type = ElementL2Difference
variable = test_nodal_xyz
other_variable = base_nodal
[]
[base_nodal_proj_xyz_high]
type = ElementL2Difference
variable = test_nodal_xyz_high
other_variable = base_nodal
[]
[base_nodal_proj_szabab]
type = ElementL2Difference
variable = test_nodal_szabab
other_variable = base_nodal
[]
[base_nodal_proj_l2_lagrange]
type = ElementL2Difference
variable = test_nodal_l2_lagrange
other_variable = base_nodal
[]
[base_nodal_proj_l2_lagrange_high]
type = ElementL2Difference
variable = test_nodal_l2_lagrange_high
other_variable = base_nodal
[]
[base_nodal_proj_l2_hierarchic]
type = ElementL2Difference
variable = test_nodal_l2_hierarchic
other_variable = base_nodal
[]
[base_nodal_proj_l2_hierarchic_high]
type = ElementL2Difference
variable = test_nodal_l2_hierarchic_high
other_variable = base_nodal
[]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
csv = true
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
(test/tests/misc/check_error/ic_variable_not_specified.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 1
[../]
[../]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Steady
[]
(test/tests/postprocessors/difference_pps/difference_pps.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
[]
[AuxVariables]
[./v]
[../]
[]
[Variables]
[./u]
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
variable = u
value = 2
[../]
[]
[AuxKernels]
[./one]
type = ConstantAux
variable = v
value = 1
execute_on = 'initial timestep_end'
[../]
[]
[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]
[./u_avg]
type = ElementAverageValue
variable = u
execute_on = 'initial timestep_end'
[../]
[./v_avg]
type = ElementAverageValue
variable = v
execute_on = 'initial timestep_end'
[../]
[./diff]
type = DifferencePostprocessor
value1 = v_avg
value2 = u_avg
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(test/tests/executioners/full_jacobian_thread_active_bcs/full_jacobian_thread_active_bcs.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 5
[]
[Variables]
[./u]
[../]
[]
[ICs]
[./ic]
type = ConstantIC
variable = u
value = 1
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = RobinBC
variable = u
boundary = left
enable = false
[../]
[./right]
type = RobinBC
variable = u
boundary = right
[../]
[]
[Preconditioning]
[./pc]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_max_its = 1
[]
(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/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/porous_flow/test/tests/dirackernels/hfrompps.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 3
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pressure]
[]
[temperature]
scaling = 1E-6
[]
[]
[ICs]
[pressure_ic]
type = ConstantIC
variable = pressure
value = 1e6
[]
[temperature_ic]
type = ConstantIC
variable = temperature
value = 400
[]
[]
[Kernels]
[P_time_deriv]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pressure
[]
[P_flux]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pressure
gravity = '0 -9.8 0'
[]
[energy_dot]
type = PorousFlowEnergyTimeDerivative
variable = temperature
[]
[heat_conduction]
type = PorousFlowHeatConduction
variable = temperature
[]
[heat_advection]
type = PorousFlowHeatAdvection
variable = temperature
gravity = '0 -9.8 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pressure temperature'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[]
[Functions]
[mass_flux_in_fn]
type = PiecewiseConstant
direction = left
xy_data = '
0 0
100 0.1
300 0
600 0.1
1400 0
1500 0.2'
[]
[T_in_fn]
type = PiecewiseLinear
xy_data = '
0 400
600 450'
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
at_nodes = true
[]
[fluid_props]
type = PorousFlowSingleComponentFluid
phase = 0
fp = simple_fluid
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 0
[]
[fp_mat]
type = FluidPropertiesMaterialPT
pressure = pressure
temperature = temperature
fp = simple_fluid
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 830.0
density = 2750
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '2.5 0 0 0 2.5 0 0 0 2.5'
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1.0E-15 0 0 0 1.0E-15 0 0 0 1.0E-14'
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[]
[DiracKernels]
[source]
type = PorousFlowPointSourceFromPostprocessor
variable = pressure
mass_flux = mass_flux_in
point = '0.5 0.5 0'
[]
[source_h]
type = PorousFlowPointEnthalpySourceFromPostprocessor
variable = temperature
mass_flux = mass_flux_in
point = '0.5 0.5 0'
T_in = T_in
pressure = pressure
fp = simple_fluid
[]
[]
[Preconditioning]
[preferred]
type = SMP
full = true
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu '
[]
[]
[Postprocessors]
[total_mass]
type = PorousFlowFluidMass
execute_on = 'initial timestep_end'
[]
[total_heat]
type = PorousFlowHeatEnergy
[]
[mass_flux_in]
type = FunctionValuePostprocessor
function = mass_flux_in_fn
execute_on = 'initial timestep_end'
[]
[avg_temp]
type = ElementAverageValue
variable = temperature
execute_on = 'initial timestep_end'
[]
[T_in]
type = FunctionValuePostprocessor
function = T_in_fn
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
nl_abs_tol = 1e-14
dt = 100
end_time = 2000
[]
[Outputs]
csv = true
execute_on = 'initial timestep_end'
file_base = hfrompps
[]
(test/tests/time_integrators/bdf2/bdf2.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 20
ny = 20
elem_type = QUAD9
[]
[Variables]
active = 'u'
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0.0
num_steps = 5
dt = 0.25
# [./Adaptivity]
# refine_fraction = 0.2
# coarsen_fraction = 0.3
# max_h_level = 4
# [../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/functional_expansion_tools/examples/3D_volumetric_Cartesian_different_submesh/main.i)
# Derived from the example '3D_volumetric_Cartesian' with the following differences:
#
# 1) The number of x and y divisions in the sub app is not the same as the master app
# 2) The subapp mesh is skewed in x and z
[Mesh]
type = GeneratedMesh
dim = 3
xmin = 0.0
xmax = 10.0
nx = 15
ymin = 1.0
ymax = 11.0
ny = 25
zmin = 2.0
zmax = 12.0
nz = 35
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'top bottom left right front back'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3 4 5'
physical_bounds = '0.0 10.0 1.0 11.0 2.0 12.0'
x = Legendre
y = Legendre
z = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
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
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(test/tests/dgkernels/2d_diffusion_dg/no_mallocs_with_action.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[AuxVariables]
[v]
order = FIRST
family = MONOMIAL
[]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[../]
[./exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./abs] # u * v
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGDiffusionAction]
variable = u
epsilon = -1
sigma = 6
# We couple in an auxiliary variable in order to ensure that we've properly
# ghosted both non-linear and auxiliary solution vectors
coupled_var = v
[]
[BCs]
[./all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[console]
type = Console
system_info = 'framework mesh aux nonlinear relationship execution'
[]
[]
[Problem]
error_on_jacobian_nonzero_reallocation = true
[]
[Postprocessors]
active = 'num_rm'
[num_rm]
type = NumRelationshipManagers
[]
[num_internal_sides]
type = NumInternalSides
[]
[]
(test/tests/ics/check_error/two_ics_on_same_block_global.i)
[Mesh]
type = FileMesh
file = 'rectangle.e'
[]
[Variables]
[./u]
[../]
[]
[ICs]
[./block]
type = ConstantIC
variable = u
value = 2
[../]
[./block2]
type = ConstantIC
variable = u
value = 0.5
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[Executioner]
type = Steady
[]
(test/tests/materials/material/material_test_dg.i)
[Mesh]
file = sq-2blk.e
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[Functions]
active = 'forcing_fn exact_fn'
[./forcing_fn]
type = ParsedFunction
expression = (x*x*x)-6.0*x
[../]
[./exact_fn]
type = ParsedGradFunction
value = (x*x*x)
grad_x = 3*x*x
grad_y = 0
[../]
[]
[Kernels]
active = 'diff abs forcing'
[./diff]
type = MatDiffusionTest
variable = u
prop_name = matp
[../]
[./abs]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGKernels]
active = 'dgdiff'
[./dgdiff]
type = DGDiffusion
variable = u
sigma = 6
epsilon = -1.0
diff = matp
[../]
[]
[BCs]
active = 'all'
[./all]
type = DGMDDBC
variable = u
boundary = '1 2 3 4'
function = exact_fn
prop_name = matp
sigma = 6
epsilon = -1.0
[../]
[]
[Materials]
active = 'mat_1 mat_2'
[./mat_1]
type = MTMaterial
block = 1
value = 1
[../]
[./mat_2]
type = MTMaterial
block = 2
value = 2
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out_dg
exodus = true
[]
(modules/porous_flow/test/tests/mass_conservation/mass09.i)
# Checking that the mass postprocessor throws the correct error when more than a single
# phase index is given when using the saturation_threshold parameter
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[sat]
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[]
[ICs]
[pinit]
type = ConstantIC
value = 1
variable = pp
[]
[satinit]
type = FunctionIC
function = 1-x
variable = sat
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = sat
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp sat'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 1
thermal_expansion = 0
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 0.1
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = pp
phase1_saturation = sat
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[]
[Postprocessors]
[comp1_total_mass]
type = PorousFlowFluidMass
fluid_component = 1
saturation_threshold = 0.5
phase = '0 1'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
(modules/richards/test/tests/gravity_head_2/gh_fu_17.i)
# unsaturated = false
# gravity = true
# full upwinding = true
# transient = true
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmin = 0
xmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = 'DensityWater DensityGas'
relperm_UO = 'RelPermWater RelPermGas'
SUPG_UO = 'SUPGwater SUPGgas'
sat_UO = 'SatWater SatGas'
seff_UO = 'SeffWater SeffGas'
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1E-2 1E-1 1E0 1E1 1E3 1E4 1E5 1E6 1E7'
x = '0 1E-1 1E0 1E1 1E2 1E3 1E4 1E5 1E6'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 1.0E2
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 0.5
bulk_mod = 0.5E2
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.0
n = 3
[../]
[./SatWater]
type = RichardsSat
s_res = 0.1
sum_s_res = 0.15
[../]
[./SatGas]
type = RichardsSat
s_res = 0.05
sum_s_res = 0.15
[../]
[./SUPGwater]
type = RichardsSUPGstandard
p_SUPG = 0.1
[../]
[./SUPGgas]
type = RichardsSUPGstandard
p_SUPG = 0.01
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./water_ic]
type = ConstantIC
value = 1
variable = pwater
[../]
[./gas_ic]
type = ConstantIC
value = 1
variable = pgas
[../]
[]
[Kernels]
active = 'richardsfwater richardstwater richardsfgas richardstgas'
[./richardstwater]
type = RichardsMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFullyUpwindFlux
variable = pwater
[../]
[./richardstgas]
type = RichardsMassChange
variable = pgas
[../]
[./richardsfgas]
type = RichardsFullyUpwindFlux
variable = pgas
[../]
[]
[AuxVariables]
[./seffgas]
[../]
[./seffwater]
[../]
[]
[AuxKernels]
[./seffgas_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffGas
variable = seffgas
[../]
[./seffwater_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffWater
variable = seffwater
[../]
[]
[Postprocessors]
[./mwater_init]
type = RichardsMass
variable = pwater
execute_on = timestep_begin
outputs = none
[../]
[./mgas_init]
type = RichardsMass
variable = pgas
execute_on = timestep_begin
outputs = none
[../]
[./mwater_fin]
type = RichardsMass
variable = pwater
execute_on = timestep_end
outputs = none
[../]
[./mgas_fin]
type = RichardsMass
variable = pgas
execute_on = timestep_end
outputs = none
[../]
[./mass_error_water]
type = FunctionValuePostprocessor
function = fcn_mass_error_w
[../]
[./mass_error_gas]
type = FunctionValuePostprocessor
function = fcn_mass_error_g
[../]
[./pw_left]
type = PointValue
point = '0 0 0'
variable = pwater
outputs = none
[../]
[./pw_right]
type = PointValue
point = '1 0 0'
variable = pwater
outputs = none
[../]
[./error_water]
type = FunctionValuePostprocessor
function = fcn_error_water
[../]
[]
[Functions]
[./fcn_mass_error_w]
type = ParsedFunction
expression = 'abs(0.5*(mi-mf)/(mi+mf))'
symbol_names = 'mi mf'
symbol_values = 'mwater_init mwater_fin'
[../]
[./fcn_mass_error_g]
type = ParsedFunction
expression = 'abs(0.5*(mi-mf)/(mi+mf))'
symbol_names = 'mi mf'
symbol_values = 'mgas_init mgas_fin'
[../]
[./fcn_error_water]
type = ParsedFunction
expression = 'abs((-b*log(-(gdens0*xval+(-b*exp(-p0/b)))/b)-p1)/p1)'
symbol_names = 'b gdens0 p0 xval p1'
symbol_values = '1E2 -1 pw_left 1 pw_right'
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
viscosity = '1E-3 0.5E-3'
gravity = '-1 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-15 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = gh_fu_17
csv = true
[]
(modules/contact/test/tests/bouncing-block-contact/frictionless-penalty-weighted-gap.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
preset = false
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[UserObjects]
[weighted_gap_uo]
type = PenaltyWeightedGapUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
disp_x = disp_x
disp_y = disp_y
penalty = 1e0
use_physical_gap = true
[]
[]
[Constraints]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = true
abort_on_solve_fail = true
nl_rel_tol = 1e-13
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[]
(test/tests/time_integrators/implicit-euler/ie-monomials.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
variable = u
value = 1
[../]
[]
[Functions]
active = 'forcing_fn exact_fn'
[./forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[../]
[./exact_fn]
type = ParsedGradFunction
value = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[../]
[]
[Kernels]
[./time]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./abs] # u * v
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGKernels]
[./dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[../]
[]
[BCs]
[./all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
nl_rel_tol = 1e-10
num_steps = 1
[]
[Outputs]
execute_on = 'timestep_end'
console = true
[]
(test/tests/ics/constant_ic/subdomain_constant_ic_test.i)
[Mesh]
file = sq-2blk.e
uniform_refine = 1
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./u_aux]
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./ic_u_1]
type = ConstantIC
variable = u
value = 42
block = '1 2'
[../]
[./ic_u_aux_1]
type = ConstantIC
variable = u_aux
value = 6.25
block = '1'
[../]
[./ic_u_aux_2]
type = ConstantIC
variable = u_aux
value = 9.99
block = '2'
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(modules/richards/test/tests/pressure_pulse/pp_fu_21.i)
# investigating pressure pulse in 1D with 2 phase
# steadystate
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 100
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = 'DensityWater DensityGas'
relperm_UO = 'RelPermWater RelPermGas'
SUPG_UO = 'SUPGwater SUPGgas'
sat_UO = 'SatWater SatGas'
seff_UO = 'SeffWater SeffGas'
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 2E6
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1E-5
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1E-5
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.0
n = 3
[../]
[./SatWater]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SatGas]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGwater]
type = RichardsSUPGstandard
p_SUPG = 1E3
[../]
[./SUPGgas]
type = RichardsSUPGstandard
p_SUPG = 1E3
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./water_ic]
type = ConstantIC
value = 2E6
variable = pwater
[../]
[./gas_ic]
type = ConstantIC
value = 2E6
variable = pgas
[../]
[]
[BCs]
[./left]
type = DirichletBC
boundary = left
value = 3E6
variable = pwater
[../]
[./left_gas]
type = DirichletBC
boundary = left
value = 3E6
variable = pgas
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[Kernels]
active = 'richardsfwater richardsfgas pconstraint'
[./richardstwater]
type = RichardsMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFullyUpwindFlux
variable = pwater
[../]
[./richardstgas]
type = RichardsMassChange
variable = pgas
[../]
[./richardsfgas]
type = RichardsFullyUpwindFlux
variable = pgas
[../]
[./pconstraint]
type = RichardsPPenalty
variable = pgas
a = 1E-8
lower_var = pwater
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = SeffWater
pressure_vars = 'pwater pgas'
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-15'
viscosity = '1E-3 1E-5'
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-pc_factor_shift_type'
petsc_options_value = 'nonzero'
[../]
[]
[Executioner]
type = Steady
solve_type = Newton
nl_rel_tol = 1.e-10
nl_max_its = 10
[]
[Outputs]
execute_on = 'timestep_end'
file_base = pp_fu_21
exodus = true
[]
(modules/richards/test/tests/rogers_stallybrass_clements/rsc02.i)
# RSC test with low-res time and spatial resolution
[Mesh]
type = GeneratedMesh
dim = 2
nx = 200
ny = 1
xmin = 0
xmax = 10 # x is the depth variable, called zeta in RSC
ymin = 0
ymax = 0.05
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '3E-2 5E-1 8E-1'
x = '0 1 5'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater poil'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 10
bulk_mod = 2E9
[../]
[./DensityOil]
type = RichardsDensityConstBulk
dens0 = 20
bulk_mod = 2E9
[../]
[./SeffWater]
type = RichardsSeff2waterRSC
oil_viscosity = 2E-3
scale_ratio = 2E3
shift = 10
[../]
[./SeffOil]
type = RichardsSeff2gasRSC
oil_viscosity = 2E-3
scale_ratio = 2E3
shift = 10
[../]
[./RelPerm]
type = RichardsRelPermMonomial
simm = 0
n = 1
[../]
[./Saturation]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1.0E-2
[../]
[]
[Variables]
[./pwater]
[../]
[./poil]
[../]
[]
[ICs]
[./water_init]
type = ConstantIC
variable = pwater
value = 0
[../]
[./oil_init]
type = ConstantIC
variable = poil
value = 15
[../]
[]
[Kernels]
[./richardstwater]
type = RichardsMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFlux
variable = pwater
[../]
[./richardstoil]
type = RichardsMassChange
variable = poil
[../]
[./richardsfoil]
type = RichardsFlux
variable = poil
[../]
[]
[AuxVariables]
[./SWater]
[../]
[./SOil]
[../]
[]
[AuxKernels]
[./Seff1VGwater_AuxK]
type = RichardsSeffAux
variable = SWater
seff_UO = SeffWater
pressure_vars = 'pwater poil'
[../]
[./Seff1VGoil_AuxK]
type = RichardsSeffAux
variable = SOil
seff_UO = SeffOil
pressure_vars = 'pwater poil'
[../]
[]
[BCs]
# we are pumping water into a system that has virtually incompressible fluids, hence the pressures rise enormously. this adversely affects convergence because of almost-overflows and precision-loss problems. The fixed things help keep pressures low and so prevent these awful behaviours. the movement of the saturation front is the same regardless of the fixed things.
active = 'recharge fixedoil fixedwater'
[./recharge]
type = RichardsPiecewiseLinearSink
variable = pwater
boundary = 'left'
pressures = '-1E10 1E10'
bare_fluxes = '-1 -1'
use_mobility = false
use_relperm = false
[../]
[./fixedwater]
type = DirichletBC
variable = pwater
boundary = 'right'
value = 0
[../]
[./fixedoil]
type = DirichletBC
variable = poil
boundary = 'right'
value = 15
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.25
mat_permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
density_UO = 'DensityWater DensityOil'
relperm_UO = 'RelPerm RelPerm'
SUPG_UO = 'SUPGstandard SUPGstandard'
sat_UO = 'Saturation Saturation'
seff_UO = 'SeffWater SeffOil'
viscosity = '1E-3 2E-3'
gravity = '0E-0 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
active = 'andy'
[./andy]
type = SMP
full = true
petsc_options = ''
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
petsc_options = '-snes_converged_reason'
end_time = 5
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = rsc02
time_step_interval = 100000
execute_on = 'initial timestep_end final'
exodus = true
[]
(modules/contact/test/tests/bouncing-block-contact/frictionless-penalty-weighted-gap-action.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
preset = false
[]
[Mesh]
[mesh_file]
type = FileMeshGenerator
file = long-bottom-block-1elem-blocks.e
[]
[remove_blocks]
type = BlockDeletionGenerator
input = mesh_file
block = '3 4'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[Contact]
[weighted_gap]
formulation = mortar_penalty
model = frictionless
secondary = 10
primary = 20
penalty = 1e0
use_dual = false
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = true
abort_on_solve_fail = true
nl_rel_tol = 1e-13
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[]
(modules/phase_field/test/tests/electrochem_sintering/ElectrochemicalSintering_test.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 800
xmin = 0
xmax = 80
[]
[GlobalParams]
op_num = 2
var_name_base = gr
int_width = 4
[]
[Variables]
[wvy]
[]
[wvo]
[]
[phi]
[]
[PolycrystalVariables]
[]
[V]
[]
[]
[AuxVariables]
[bnds]
[]
[negative_V]
[]
[E_x]
order = CONSTANT
family = MONOMIAL
[]
[E_y]
order = CONSTANT
family = MONOMIAL
[]
[ns_cat_aux]
order = CONSTANT
family = MONOMIAL
[]
[ns_an_aux]
order = CONSTANT
family = MONOMIAL
[]
[T]
[]
[]
[Functions]
[ic_func_gr0]
type = ParsedFunction
expression = '0.5*(1.0-tanh((x)/sqrt(2.0*2.0)))'
[]
[ic_func_gr1]
type = ParsedFunction
expression = '0.5*(1.0+tanh((x)/sqrt(2.0*2.0)))'
[]
[]
[ICs]
[gr0_IC]
type = FunctionIC
variable = gr0
function = ic_func_gr0
[]
[gr1_IC]
type = FunctionIC
variable = gr1
function = ic_func_gr1
[]
[wvy_IC]
type = ConstantIC
variable = wvy
value = 2.7827
[]
[wvo_IC]
type = ConstantIC
variable = wvo
value = 2.7827
[]
[T_IC]
type = ConstantIC
variable = T
value = 1600
[]
[]
[BCs]
[v_left]
type = DirichletBC
preset = true
variable = V
boundary = left
value = 1e-2
[]
[v_right]
type = DirichletBC
preset = true
variable = V
boundary = right
value = 0
[]
[gr0_left]
type = DirichletBC
preset = true
variable = gr0
boundary = left
value = 0.5 #Grain boundary at left hand side of domain
[]
[gr1_left]
type = DirichletBC
preset = true
variable = gr1
boundary = left
value = 0.5 #Grain boundary at left hand side of domain
[]
[wvo_right]
type = DirichletBC
preset = true
variable = wvo
boundary = right
value = 2.7827
[]
[wvy_right]
type = DirichletBC
preset = true
variable = wvy
boundary = right
value = 2.7827
[]
[]
[Materials]
# Free energy coefficients for parabolic curves
[ks_cat]
type = ParsedMaterial
property_name = ks_cat
coupled_variables = 'T'
constant_names = 'a b Va'
constant_expressions = '-0.0017 140.44 0.03726'
expression = '(a*T + b) * Va^2'
[]
[ks_an]
type = ParsedMaterial
property_name = ks_an
coupled_variables = 'T'
constant_names = 'a b Va'
constant_expressions = '-0.0017 140.44 0.03726'
expression = '(a*T + b) * Va^2'
[]
[kv_cat]
type = ParsedMaterial
property_name = kv_cat
material_property_names = 'ks_cat'
expression = '10*ks_cat'
[]
[kv_an]
type = ParsedMaterial
property_name = kv_an
material_property_names = 'ks_cat'
expression = '10*ks_cat'
[]
# Diffusivity and mobilities
[chiDy]
type = GrandPotentialTensorMaterial
f_name = chiDy
diffusivity_name = Dvy
solid_mobility = L
void_mobility = Lv
chi = chi_cat
surface_energy = 6.24
c = phi
T = T
D0 = 5.9e11
GBmob0 = 1.60e12
Q = 4.14
Em = 4.25
bulkindex = 1
gbindex = 1
surfindex = 1
[]
[chiDo]
type = GrandPotentialTensorMaterial
f_name = chiDo
diffusivity_name = Dvo
solid_mobility = Lo
void_mobility = Lvo
chi = chi_an
surface_energy = 6.24
c = phi
T = T
D0 = 5.9e11
GBmob0 = 1.60e12
Q = 4.14
Em = 4.25
bulkindex = 1
gbindex = 1
surfindex = 1
[]
# Everything else
[ns_y_min]
type = DerivativeParsedMaterial
property_name = ns_y_min
coupled_variables = 'gr0 gr1 T'
constant_names = 'Ef_B Ef_GB kB Va_Y'
constant_expressions = '4.37 4.37 8.617343e-5 0.03726'
derivative_order = 2
expression = 'bnds:=gr0^2 + gr1^2; Ef:=Ef_B + 4.0 * (Ef_GB - Ef_B) * (1.0 - bnds)^2;
'
' exp(-Ef/kB/T) / Va_Y'
[]
[ns_o_min]
type = DerivativeParsedMaterial
property_name = ns_o_min
coupled_variables = 'gr0 gr1 T'
constant_names = 'Ef_B Ef_GB kB Va_O'
constant_expressions = '4.37 4.37 8.617343e-5 0.02484'
derivative_order = 2
expression = 'bnds:=gr0^2 + gr1^2; Ef:=Ef_B + 4.0 * (Ef_GB - Ef_B) * (1.0 - bnds)^2;
'
' exp(-Ef/kB/T) / Va_O'
[]
[sintering]
type = ElectrochemicalSinteringMaterial
chemical_potentials = 'wvy wvo'
electric_potential = V
void_op = phi
Temperature = T
surface_energy = 6.24
grainboundary_energy = 5.18
solid_energy_coefficients = 'kv_cat kv_cat'
void_energy_coefficients = 'kv_cat kv_an'
min_vacancy_concentrations_solid = 'ns_y_min ns_o_min'
min_vacancy_concentrations_void = '26.837 40.256'
defect_charges = '-3 2'
solid_relative_permittivity = 30
solid_energy_model = DILUTE
[]
[density_chi_y]
type = ElectrochemicalDefectMaterial
chemical_potential = wvy
void_op = phi
Temperature = T
electric_potential = V
void_density_name = nv_cat
solid_density_name = ns_cat
chi_name = chi_cat
void_energy_coefficient = kv_cat
min_vacancy_concentration_solid = ns_y_min
min_vacancy_concentration_void = 26.837
solid_energy_model = DILUTE
defect_charge = -3
solid_relative_permittivity = 30
[]
[density_chi_o]
type = ElectrochemicalDefectMaterial
chemical_potential = wvo
void_op = phi
Temperature = T
electric_potential = V
void_density_name = nv_an
solid_density_name = ns_an
chi_name = chi_an
void_energy_coefficient = kv_an
min_vacancy_concentration_solid = ns_o_min
min_vacancy_concentration_void = 40.256
solid_energy_model = DILUTE
defect_charge = 2
solid_relative_permittivity = 30
[]
[permittivity]
type = DerivativeParsedMaterial
property_name = permittivity
coupled_variables = 'phi'
material_property_names = 'hs hv'
constant_names = 'eps_rel_solid eps_void_over_e'
constant_expressions = '30 5.52e-2' #eps_void_over_e in 1/V/nm
derivative_order = 2
expression = '-hs * eps_rel_solid * eps_void_over_e - hv * eps_void_over_e'
[]
[void_pre]
type = DerivativeParsedMaterial
property_name = void_pre
material_property_names = 'hv'
constant_names = 'Z_cat Z_an nv_y_min nv_o_min'
constant_expressions = '-3 2 26.837 40.256'
derivative_order = 2
expression = '-hv * (Z_cat * nv_y_min + Z_an * nv_o_min)'
[]
[cat_mu_pre]
type = DerivativeParsedMaterial
property_name = cat_mu_pre
material_property_names = 'hv kv_cat'
constant_names = 'Z_cat'
constant_expressions = '-3'
derivative_order = 2
expression = '-hv * Z_cat / kv_cat'
[]
[an_mu_pre]
type = DerivativeParsedMaterial
property_name = an_mu_pre
material_property_names = 'hv kv_an'
constant_names = 'Z_an'
constant_expressions = '2'
derivative_order = 2
expression = '-hv * Z_an / kv_an'
[]
[cat_V_pre]
type = DerivativeParsedMaterial
property_name = cat_V_pre
material_property_names = 'hv kv_cat'
constant_names = 'Z_cat v_scale e '
constant_expressions = '-3 1 1'
derivative_order = 2
expression = 'hv * Z_cat^2 * e * v_scale / kv_cat'
[]
[an_V_pre]
type = DerivativeParsedMaterial
property_name = an_V_pre
material_property_names = 'hv kv_an'
constant_names = 'Z_an v_scale e '
constant_expressions = '2 1 1'
derivative_order = 2
expression = 'hv * Z_an^2 * e * v_scale / kv_an'
[]
[]
#This action adds most kernels needed for grand potential model
[Modules]
[PhaseField]
[GrandPotential]
switching_function_names = 'hv hs'
anisotropic = 'true true'
chemical_potentials = 'wvy wvo'
mobilities = 'chiDy chiDo'
susceptibilities = 'chi_cat chi_an'
free_energies_w = 'nv_cat ns_cat nv_an ns_an'
gamma_gr = gamma
mobility_name_gr = L
kappa_gr = kappa
free_energies_gr = 'omegav omegas'
additional_ops = 'phi'
gamma_grxop = gamma
mobility_name_op = Lv
kappa_op = kappa
free_energies_op = 'omegav omegas'
[]
[]
[]
[Kernels]
[barrier_phi]
type = ACBarrierFunction
variable = phi
v = 'gr0 gr1'
gamma = gamma
mob_name = Lv
[]
[kappa_phi]
type = ACKappaFunction
variable = phi
mob_name = Lv
kappa_name = kappa
[]
[Laplace]
type = MatDiffusion
variable = V
diffusivity = permittivity
args = 'phi'
[]
[potential_void_constants]
type = MaskedBodyForce
variable = V
coupled_variables = 'phi'
mask = void_pre
[]
[potential_cat_mu]
type = MatReaction
variable = V
v = wvy
mob_name = cat_mu_pre
[]
[potential_an_mu]
type = MatReaction
variable = V
v = wvo
mob_name = an_mu_pre
[]
[potential_cat_V]
type = MatReaction
variable = V
mob_name = cat_V_pre
[]
[potential_an_V]
type = MatReaction
variable = V
mob_name = an_V_pre
[]
[potential_solid_cat]
type = MaskedExponential
variable = V
w = wvy
T = T
coupled_variables = 'phi gr0 gr1'
mask = hs
species_charge = -3
n_eq = ns_y_min
[]
[potential_solid_an]
type = MaskedExponential
variable = V
w = wvo
T = T
coupled_variables = 'phi gr0 gr1'
mask = hs
species_charge = 2
n_eq = ns_o_min
[]
[]
[AuxKernels]
[bnds_aux]
type = BndsCalcAux
variable = bnds
execute_on = 'initial timestep_end'
[]
[negative_V]
type = ParsedAux
variable = negative_V
coupled_variables = V
expression = '-V'
[]
[E_x]
type = VariableGradientComponent
variable = E_x
gradient_variable = negative_V
component = x
[]
[E_y]
type = VariableGradientComponent
variable = E_y
gradient_variable = negative_V
component = y
[]
[ns_cat_aux]
type = MaterialRealAux
variable = ns_cat_aux
property = ns_cat
[]
[ns_an_aux]
type = MaterialRealAux
variable = ns_an_aux
property = ns_an
[]
[]
[Postprocessors]
[ns_cat_total]
type = ElementIntegralMaterialProperty
mat_prop = ns_cat
[]
[ns_an_total]
type = ElementIntegralMaterialProperty
mat_prop = ns_an
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -sub_pc_type -pc_asm_overlap -ksp_gmres_restart -sub_ksp_type'
petsc_options_value = ' asm lu 1 31 preonly'
nl_max_its = 40
l_max_its = 30
l_tol = 1e-4
nl_rel_tol = 1e-8
nl_abs_tol = 1e-13
start_time = 0
num_steps = 2
automatic_scaling = true
[TimeStepper]
type = IterationAdaptiveDT
dt = 1
optimal_iterations = 8
iteration_window = 2
[]
[]
[Outputs]
exodus = true
[]
(modules/richards/test/tests/gravity_head_2/gh16.i)
# unsaturated = true
# gravity = true
# supg = true
# transient = true
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmin = 0
xmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1E-2 1E-1 1E0 1E1 1E3 1E4 1E5 1E6 1E7'
x = '0 1E-1 1E0 1E1 1E2 1E3 1E4 1E5 1E6'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 1.0E2
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 0.5
bulk_mod = 0.5E2
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.0
n = 3
[../]
[./SatWater]
type = RichardsSat
s_res = 0.1
sum_s_res = 0.15
[../]
[./SatGas]
type = RichardsSat
s_res = 0.05
sum_s_res = 0.15
[../]
[./SUPGwater]
type = RichardsSUPGstandard
p_SUPG = 0.1
[../]
[./SUPGgas]
type = RichardsSUPGstandard
p_SUPG = 0.01
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./water_ic]
type = ConstantIC
value = 1
variable = pwater
[../]
[./gas_ic]
type = ConstantIC
value = 2
variable = pgas
[../]
[]
[Kernels]
active = 'richardsfwater richardstwater richardsfgas richardstgas'
[./richardstwater]
type = RichardsMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFlux
variable = pwater
[../]
[./richardstgas]
type = RichardsMassChange
variable = pgas
[../]
[./richardsfgas]
type = RichardsFlux
variable = pgas
[../]
[]
[AuxVariables]
[./seffgas]
[../]
[./seffwater]
[../]
[]
[AuxKernels]
[./seffgas_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffGas
variable = seffgas
[../]
[./seffwater_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffWater
variable = seffwater
[../]
[]
[Postprocessors]
[./mwater_init]
type = RichardsMass
variable = pwater
execute_on = timestep_begin
output = none
[../]
[./mgas_init]
type = RichardsMass
variable = pgas
execute_on = timestep_begin
output = none
[../]
[./mwater_fin]
type = RichardsMass
variable = pwater
execute_on = timestep_end
output = none
[../]
[./mgas_fin]
type = RichardsMass
variable = pgas
execute_on = timestep_end
output = none
[../]
[./mass_error_water]
type = FunctionValuePostprocessor
function = fcn_mass_error_w
[../]
[./mass_error_gas]
type = FunctionValuePostprocessor
function = fcn_mass_error_g
[../]
[./pw_left]
type = PointValue
point = '0 0 0'
variable = pwater
outputs = none
[../]
[./pw_right]
type = PointValue
point = '1 0 0'
variable = pwater
outputs = none
[../]
[./error_water]
type = FunctionValuePostprocessor
function = fcn_error_water
[../]
[./pg_left]
type = PointValue
point = '0 0 0'
variable = pgas
outputs = none
[../]
[./pg_right]
type = PointValue
point = '1 0 0'
variable = pgas
outputs = none
[../]
[./error_gas]
type = FunctionValuePostprocessor
function = fcn_error_gas
[../]
[]
[Functions]
[./fcn_mass_error_w]
type = ParsedFunction
expression = 'abs(0.5*(mi-mf)/(mi+mf))'
symbol_names = 'mi mf'
symbol_values = 'mwater_init mwater_fin'
[../]
[./fcn_mass_error_g]
type = ParsedFunction
expression = 'abs(0.5*(mi-mf)/(mi+mf))'
symbol_names = 'mi mf'
symbol_values = 'mgas_init mgas_fin'
[../]
[./fcn_error_water]
type = ParsedFunction
expression = 'abs((-b*log(-(gdens0*xval+(-b*exp(-p0/b)))/b)-p1)/p1)'
symbol_names = 'b gdens0 p0 xval p1'
symbol_values = '1E2 -1 pw_left 1 pw_right'
[../]
[./fcn_error_gas]
type = ParsedFunction
expression = 'abs((-b*log(-(gdens0*xval+(-b*exp(-p0/b)))/b)-p1)/p1)'
symbol_names = 'b gdens0 p0 xval p1'
symbol_values = '0.5E2 -0.5 pg_left 1 pg_right'
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
density_UO = 'DensityWater DensityGas'
relperm_UO = 'RelPermWater RelPermGas'
SUPG_UO = 'SUPGwater SUPGgas'
sat_UO = 'SatWater SatGas'
seff_UO = 'SeffWater SeffGas'
viscosity = '1E-3 0.5E-3'
gravity = '-1 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = gh16
execute_on = 'timestep_end final'
time_step_interval = 100000
exodus = true
csv = true
[]
(modules/solid_properties/test/tests/problems/heat_conduction/heat_conduction.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[SolidProperties]
[sp]
type = ThermalSS316Properties
[]
[]
[Materials]
[thermal_mat]
type = ADThermalSolidPropertiesMaterial
temperature = T
sp = sp
density = rho
specific_heat = cp
thermal_conductivity = k
[]
[]
[Variables]
[T]
order = FIRST
family = LAGRANGE
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T
value = 300
[]
[]
[Kernels]
[time_derivative]
type = ADHeatConductionTimeDerivative
variable = T
density_name = rho
specific_heat = cp
[]
[heat_conduction]
type = ADHeatConduction
variable = T
thermal_conductivity = k
[]
[]
[BCs]
[left]
type = DirichletBC
variable = T
boundary = left
value = 500
[]
[]
[Executioner]
type = Transient
scheme = implicit-euler
dt = 100.0
num_steps = 5
abort_on_solve_fail = true
solve_type = NEWTON
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
nl_max_its = 10
l_tol = 1e-5
l_max_its = 10
[]
[Outputs]
exodus = true
[]
(modules/functional_expansion_tools/test/tests/errors/multiapp_bad_user_object.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[./AnotheruserObject]
type = EmptyPostprocessor
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
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
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = multiapp_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = AnotheruserObject
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/richards/test/tests/sinks/s04.i)
# apply a total flux (in kg/s) to two boundaries
# and check that it removes the correct amount of fluid
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 3
xmin = 0
xmax = 1
ymin = 0
ymax = 4
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = DensityConstBulk
relperm_UO = RelPermPower
SUPG_UO = SUPGstandard
sat_UO = Saturation
seff_UO = SeffVG
viscosity = 1E-3
gravity = '-1 0 0'
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 1
[../]
[./SeffVG]
type = RichardsSeff1VG
m = 0.5
al = 1
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0.1
sum_s_res = 0.2
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 0.1
[../]
[]
[Variables]
[./pressure]
[../]
[]
[ICs]
[./pressure]
type = ConstantIC
variable = pressure
value = 2
[../]
[]
[Postprocessors]
[./area_left]
type = AreaPostprocessor
boundary = left
execute_on = initial
[../]
[./area_right]
type = AreaPostprocessor
boundary = right
execute_on = initial
[../]
[./mass_fin]
type = RichardsMass
variable = pressure
execute_on = 'initial timestep_end'
[../]
[./p0]
type = PointValue
point = '0 0 0'
variable = pressure
execute_on = 'initial timestep_end'
[../]
[]
[BCs]
[./left_flux]
type = RichardsPiecewiseLinearSink
boundary = left
pressures = '0'
bare_fluxes = '0.1'
variable = pressure
use_mobility = false
use_relperm = false
area_pp = area_left
[../]
[./right_flux]
type = RichardsPiecewiseLinearSink
boundary = right
pressures = '0'
bare_fluxes = '0.1'
variable = pressure
use_mobility = false
use_relperm = false
area_pp = area_right
[../]
[]
[Kernels]
active = 'richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-12 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 13
[]
[Outputs]
file_base = s04
csv = true
[]
(modules/thermal_hydraulics/test/tests/auxkernels/convective_heat_flux_1phase/test.i)
# The test computes convective heat flux for single phase flow according to:
#
# q = Hw * (T_wall - T_fluid)
#
# where Hw = 2, T_wall = 310 and T_fluid = 300. Thus, q = 20.
#
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
allow_renumbering = false
[]
[AuxVariables]
[q_wall]
family = MONOMIAL
order = CONSTANT
[]
[T_wall]
[]
[]
[ICs]
[T_wall_ic]
type = ConstantIC
variable = T_wall
value = 310
[]
[]
[AuxKernels]
[sound_speed_aux]
type = ConvectiveHeatFlux1PhaseAux
variable = q_wall
Hw = Hw
T_wall = T_wall
T = T
[]
[]
[Materials]
[mats]
type = GenericConstantMaterial
prop_names = 'T Hw'
prop_values = '300 2'
[]
[]
[Postprocessors]
[q_wall]
type = ElementalVariableValue
variable = q_wall
elementid = 0
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[bcs]
type = DirichletBC
variable = u
boundary = 'left right'
value = 1
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 1
abort_on_solve_fail = true
[]
[Outputs]
csv = true
execute_on = TIMESTEP_END
[]
(test/tests/auxkernels/linear_combination/test.i)
# All tested logic is in the aux system
# The non-linear problem is unrelated
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -1
xmax = 1
nx = 10
[]
[Functions]
[./v1_func]
type = ParsedFunction
expression = (1-x)/2
[../]
[./v2_func]
type = ParsedFunction
expression = (1+x)/2
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./lc]
[../]
[./v1]
[../]
[./v2]
[../]
[./w1]
[../]
[./w2]
[../]
[]
[ICs]
[./v1_ic]
type = FunctionIC
variable = v1
function = v1_func
[../]
[./v2_ic]
type = FunctionIC
variable = v2
function = v2_func
[../]
[./w1_ic]
type = ConstantIC
variable = w1
value = 0.3
[../]
[./w2_ic]
type = ConstantIC
variable = w2
value = 0.5
[../]
[]
[AuxKernels]
[./lc-aux]
type = ParsedAux
variable = lc
expression = 'v1*w1+v2*w2'
coupled_variables = 'v1 w1 v2 w2'
execute_on = 'timestep_end'
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 2
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
[./out]
type = Exodus
[../]
[]
(modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-wear.i)
starting_point = 0.5e-1
offset = -0.05
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[normal_lm]
block = 3
use_dual = true
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_yy'
strain = FINITE
block = '1 2'
zeta = 1.0
hht_alpha = 0.0
[]
[inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[strain]
type = ComputeFiniteStrain
block = '1 2'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '7750'
[]
[]
[AuxVariables]
[worn_depth]
block = '3'
[]
[vel_x]
block = '1 2'
[]
[accel_x]
block = '1 2'
[]
[vel_y]
block = '1 2'
[]
[accel_y]
block = '1 2'
[]
[vel_z]
block = '1 2'
[]
[accel_z]
block = '1 2'
[]
[]
[AuxKernels]
[worn_depth]
type = MortarArchardsLawAux
variable = worn_depth
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
displacements = 'disp_x disp_y'
friction_coefficient = 0.5
energy_wear_coefficient = 1.0
normal_pressure = normal_lm
[]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable = normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeDynamicWeightedGapLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
c = 1e4
capture_tolerance = 1.0e-5
newmark_beta = 0.25
newmark_gamma = 0.5
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(8.0 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 0.675
dt = 0.075
dtmin = .075
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount '
petsc_options_value = 'lu superlu_dist NONZERO 1e-15'
nl_max_its = 30
line_search = 'l2'
snesmf_reuse_base = false
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(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/contact/test/tests/mortar_dynamics/block-dynamics-friction.i)
starting_point = 2e-1
offset = -0.19
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
allow_renumbering = false
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[mechanical_normal_lm]
block = 3
use_dual = true
[]
[mechanical_tangential_lm]
block = 3
use_dual = true
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_yy'
strain = FINITE
block = '1 2'
stiffness_damping_coefficient = 0.05
hht_alpha = 0.0
[]
[inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[strain]
type = ComputeFiniteStrain
block = '1 2'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '7750'
[]
[]
[AuxVariables]
[vel_x]
block = '1 2'
[]
[accel_x]
block = '1 2'
[]
[vel_y]
block = '1 2'
[]
[accel_y]
block = '1 2'
[]
[vel_z]
block = '1 2'
[]
[accel_z]
block = '1 2'
[]
[gap]
block = 3
[]
[]
[AuxKernels]
[gap]
type = WeightedGapAux
variable = gap
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
use_displaced_mesh = true
[]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = 'LINEAR timestep_end'
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = 'LINEAR timestep_end'
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = 'LINEAR timestep_end'
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = 'LINEAR timestep_end'
[]
[]
# User object provides the contact force (e.g. LM)
# for the application of the generalized force
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable_normal = mechanical_normal_lm
lm_variable_tangential_one = mechanical_tangential_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeDynamicFrictionalForceLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = mechanical_normal_lm
friction_lm = mechanical_tangential_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
c = 1e4
c_t = 1e4
mu = 0.5
newmark_beta = 0.25
newmark_gamma = 0.5
capture_tolerance = 1.0e-5
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = mechanical_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = mechanical_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = mechanical_tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = mechanical_tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 30 # 50
function = '0' # '1e-2*t'
[]
[]
[Executioner]
type = Transient
end_time = 75
dt = 0.05
dtmin = .005
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err '
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
nl_max_its = 50
line_search = 'none'
snesmf_reuse_base = false
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = true
checkpoint = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[mechanical_tangential_lm]
type = NodalValueSampler
block = '3'
variable = mechanical_tangential_lm
sort_by = 'x'
execute_on = TIMESTEP_END
[]
[]
(modules/misc/test/tests/fracture_flow/single.i)
# Models fluid advecting down a single fracture sitting at x=0, and 0<=y<=3.
#
[Mesh]
type = FileMesh
file = 'single.e'
[]
[Variables]
[./u]
[../]
[]
[ICs]
[./u_init]
type = ConstantIC
variable = u
value = 0
[../]
[]
[BCs]
[./inj]
type = DirichletBC
boundary = 1
variable = u
value = 1
[../]
[]
[Kernels]
[./matrix_dt]
type = CoefTimeDerivative
variable = u
Coefficient = 0.2 # matrix porosity
block = 1
[../]
[./matrix_diff]
type = AnisotropicDiffusion
variable = u
block = 1
tensor_coeff = '0.002 0 0 0 0 0 0 0 0' # matrix porosity * matrix diffusivity
[../]
[./fracture_dt]
type = CoefTimeDerivative
variable = u
Coefficient = 0.1 # fracture half-aperture * fracture porosity
block = 2
[../]
[./fracture_advect]
type = Convection
variable = u
block = 2
velocity = '0 0.08 0' # fracture half-aperture * velocity in fracture
[../]
[]
[Preconditioning]
[./standard]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
dt = 2e-1
end_time = 1.0
solve_type = Newton
nl_rel_tol = 1E-12
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_mean_zero_pressure.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
elem_type = QUAD9
[]
[]
[AuxVariables]
[vel_x]
order = SECOND
[]
[vel_y]
order = SECOND
[]
[]
[AuxKernels]
[vel_x]
type = VectorVariableComponentAux
variable = vel_x
vector_variable = velocity
component = 'x'
[]
[vel_y]
type = VectorVariableComponentAux
variable = vel_y
vector_variable = velocity
component = 'y'
[]
[]
[Variables]
[./velocity]
order = SECOND
family = LAGRANGE_VEC
[../]
[./T]
order = SECOND
[./InitialCondition]
type = ConstantIC
value = 1.0
[../]
[../]
[./p]
[../]
[./lambda]
family = SCALAR
order = FIRST
[../]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./momentum_time]
type = INSADMomentumTimeDerivative
variable = velocity
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[../]
[./temperature_time]
type = INSADHeatConductionTimeDerivative
variable = T
[../]
[./temperature_advection]
type = INSADEnergyAdvection
variable = T
[../]
[./temperature_conduction]
type = ADHeatConduction
variable = T
thermal_conductivity = 'k'
[../]
[./mean_zero_pressure]
type = ScalarLagrangeMultiplier
variable = p
lambda = lambda
[../]
[]
[ScalarKernels]
[./mean_zero_pressure_lm]
type = AverageValueConstraint
variable = lambda
pp_name = pressure_integral
value = 0
[../]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left'
[../]
[./lid]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 'lid_function'
[../]
[./T_hot]
type = DirichletBC
variable = T
boundary = 'bottom'
value = 1
[../]
[./T_cold]
type = DirichletBC
variable = T
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat]
type = INSAD3Eqn
velocity = velocity
pressure = p
temperature = T
[]
[]
[Postprocessors]
[./pressure_integral]
type = ElementIntegralVariablePostprocessor
variable = p
execute_on = linear
[../]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels -sub_pc_factor_shift_type'
petsc_options_value = 'asm 2 ilu 4 NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/richards/test/tests/pressure_pulse/pp21.i)
# investigating pressure pulse in 1D with 2 phase
# steadystate
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 100
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 2E6
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1E-5
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1E-5
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.0
n = 3
[../]
[./SatWater]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SatGas]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGwater]
type = RichardsSUPGstandard
p_SUPG = 1E3
[../]
[./SUPGgas]
type = RichardsSUPGstandard
p_SUPG = 1E3
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./water_ic]
type = ConstantIC
value = 2E6
variable = pwater
[../]
[./gas_ic]
type = ConstantIC
value = 2E6
variable = pgas
[../]
[]
[BCs]
[./left]
type = DirichletBC
boundary = left
value = 3E6
variable = pwater
[../]
[./left_gas]
type = DirichletBC
boundary = left
value = 3E6
variable = pgas
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[Kernels]
active = 'richardsfwater richardsfgas pconstraint'
[./richardstwater]
type = RichardsMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFlux
variable = pwater
[../]
[./richardstgas]
type = RichardsMassChange
variable = pgas
[../]
[./richardsfgas]
type = RichardsFlux
variable = pgas
[../]
[./pconstraint]
type = RichardsPPenalty
variable = pgas
a = 1E-8
lower_var = pwater
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = SeffWater
pressure_vars = 'pwater pgas'
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-15'
density_UO = 'DensityWater DensityGas'
relperm_UO = 'RelPermWater RelPermGas'
SUPG_UO = 'SUPGwater SUPGgas'
sat_UO = 'SatWater SatGas'
seff_UO = 'SeffWater SeffGas'
viscosity = '1E-3 1E-5'
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-pc_factor_shift_type'
petsc_options_value = 'nonzero'
[../]
[]
[Executioner]
type = Steady
solve_type = Newton
nl_rel_tol = 1.e-10
nl_max_its = 10
[]
[Outputs]
execute_on = 'timestep_end'
file_base = pp21
exodus = true
[]
(test/tests/ics/dependency/monomial.i)
[GlobalParams]
family = MONOMIAL
order = FIRST
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
[]
[AuxVariables]
[./a]
[../]
[./b]
[../]
[]
[Variables]
[./u]
[../]
[./v]
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
variable = u
value = -1
[../]
[./v_ic]
type = MTICSum
variable = v
var1 = u
var2 = a
[../]
[./a_ic]
type = ConstantIC
variable = a
value = 10
[../]
[./b_ic]
type = MTICMult
variable = b
var1 = v
factor = 2
[../]
[]
[AuxKernels]
[./a_ak]
type = ConstantAux
variable = a
value = 256
[../]
[./b_ak]
type = ConstantAux
variable = b
value = 42
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
[./left_u]
type = PenaltyDirichletBC
variable = u
boundary = left
value = 0
penalty = 1000
[../]
[./right_u]
type = PenaltyDirichletBC
variable = u
boundary = right
value = 1
penalty = 1000
[../]
[./left_v]
type = PenaltyDirichletBC
variable = v
boundary = left
value = 2
penalty = 1000
[../]
[./right_v]
type = PenaltyDirichletBC
variable = v
boundary = right
value = 1
penalty = 1000
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_rel_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/fviks/convection/convection_cavity.i)
mu = 1
rho = 1
k = .01
cp = 1
velocity_interp_method = 'rc'
advected_interp_method = 'average'
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1 0.5'
dy = '1'
ix = '8 5'
iy = '8'
subdomain_id = '0 1'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'cmg'
primary_block = 0
paired_block = 1
new_boundary = 'interface'
[]
[secondary_interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'interface'
primary_block = 1
paired_block = 0
new_boundary = 'secondary_interface'
[]
[]
[GlobalParams]
# retain behavior at time of test creation
two_term_boundary_expansion = false
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
block = 0
pressure = pressure
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
block = 0
[]
[v]
type = INSFVVelocityVariable
block = 0
[]
[pressure]
type = INSFVPressureVariable
block = 0
[]
[T]
type = INSFVEnergyVariable
block = 0
[]
[Ts]
type = INSFVEnergyVariable
block = 1
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[ICs]
[T]
type = ConstantIC
variable = T
value = 1
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
block = 0
[]
[mean_zero_pressure]
type = FVIntegralValueConstraint
variable = pressure
lambda = lambda
block = 0
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
rho = ${rho}
block = 0
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
block = 0
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
block = 0
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
rho = ${rho}
block = 0
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
block = 0
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
block = 0
[]
[temp_conduction]
type = FVDiffusion
coeff = 'k'
variable = T
block = 0
[]
[temp_advection]
type = INSFVEnergyAdvection
variable = T
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
block = 0
[]
[solid_temp_conduction]
type = FVDiffusion
coeff = 'k'
variable = Ts
block = 1
[]
[]
[FVInterfaceKernels]
[convection]
type = FVConvectionCorrelationInterface
variable1 = T
variable2 = Ts
boundary = 'interface'
h = 5
T_solid = Ts
T_fluid = T
subdomain1 = 0
subdomain2 = 1
bulk_distance = 0.3
[]
[]
[FVBCs]
[top_x]
type = INSFVNoSlipWallBC
variable = u
boundary = 'top'
function = 'lid_function'
[]
[no_slip_x]
type = INSFVNoSlipWallBC
variable = u
boundary = 'left interface bottom'
function = 0
[]
[no_slip_y]
type = INSFVNoSlipWallBC
variable = v
boundary = 'left interface top bottom'
function = 0
[]
[T_hot]
type = FVDirichletBC
variable = T
boundary = 'bottom'
value = 1
[]
[T_cold]
type = FVDirichletBC
variable = Ts
boundary = 'right'
value = 0
[]
[]
[FunctorMaterials]
[functor_constants]
type = ADGenericFunctorMaterial
prop_names = 'cp k'
prop_values = '${cp} ${k}'
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = 'T'
rho = ${rho}
block = 0
[]
[]
[Functions]
[lid_function]
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -ksp_gmres_restart'
petsc_options_value = 'asm lu NONZERO 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
l_max_its = 200
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d-test-derivative-trimming.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
second_order = false
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[mortar_normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
[]
[]
[Constraints]
[normal_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
c = 1.0e4
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = .5
dtmin = .01
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15 1e-5'
l_max_its = 100
nl_max_its = 30
# nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = mortar_normal_lm
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_normal_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized_with_temp_transient.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[temperature]
[InitialCondition]
type = ConstantIC
value = 1.0
[]
[]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./mass_pspg]
type = INSADMassPSPG
variable = p
[../]
[./momentum_time]
type = INSADMomentumTimeDerivative
variable = velocity
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[../]
[./momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[../]
[./temperature_advection]
type = INSADEnergyAdvection
variable = temperature
[../]
[temperature_time]
type = INSADHeatConductionTimeDerivative
variable = temperature
[]
[./temperature_conduction]
type = ADHeatConduction
variable = temperature
thermal_conductivity = 'k'
[../]
[temperature_supg]
type = INSADEnergySUPG
variable = temperature
velocity = velocity
[]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left'
[../]
[./lid]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 'lid_function'
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[./temperature_hot]
type = DirichletBC
variable = temperature
boundary = 'bottom'
value = 1
[../]
[./temperature_cold]
type = DirichletBC
variable = temperature
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = temperature
[]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/poroperm/PermTensorFromVar03.i)
# Testing permeability calculated from scalar and tensor
# Trivial test, checking calculated permeability is correct
# when k_anisotropy is not specified.
# k = k_anisotropy * perm
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 3
[]
[GlobalParams]
block = 0
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[InitialCondition]
type = ConstantIC
value = 0
[]
[]
[]
[Kernels]
[flux]
type = PorousFlowAdvectiveFlux
gravity = '0 0 0'
variable = pp
[]
[]
[BCs]
[ptop]
type = DirichletBC
variable = pp
boundary = right
value = 0
[]
[pbase]
type = DirichletBC
variable = pp
boundary = left
value = 1
[]
[]
[AuxVariables]
[perm_var]
order = CONSTANT
family = MONOMIAL
[]
[perm_x]
order = CONSTANT
family = MONOMIAL
[]
[perm_y]
order = CONSTANT
family = MONOMIAL
[]
[perm_z]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[perm_var]
type = ConstantAux
value = 2
variable = perm_var
[]
[perm_x]
type = PorousFlowPropertyAux
property = permeability
variable = perm_x
row = 0
column = 0
[]
[perm_y]
type = PorousFlowPropertyAux
property = permeability
variable = perm_y
row = 1
column = 1
[]
[perm_z]
type = PorousFlowPropertyAux
property = permeability
variable = perm_z
row = 2
column = 2
[]
[]
[Postprocessors]
[perm_x_left]
type = PointValue
variable = perm_x
point = '0.5 0 0'
[]
[perm_y_left]
type = PointValue
variable = perm_y
point = '0.5 0 0'
[]
[perm_z_left]
type = PointValue
variable = perm_z
point = '0.5 0 0'
[]
[perm_x_right]
type = PointValue
variable = perm_x
point = '2.5 0 0'
[]
[perm_y_right]
type = PointValue
variable = perm_y
point = '2.5 0 0'
[]
[perm_z_right]
type = PointValue
variable = perm_z
point = '2.5 0 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
# unimportant in this fully-saturated test
m = 0.8
alpha = 1e-4
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[permeability]
type = PorousFlowPermeabilityTensorFromVar
perm = perm_var
[]
[temperature]
type = PorousFlowTemperature
[]
[massfrac]
type = PorousFlowMassFraction
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = Newton
type = Steady
l_tol = 1E-5
nl_abs_tol = 1E-3
nl_rel_tol = 1E-8
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
csv = true
execute_on = 'timestep_end'
[]
(python/peacock/tests/common/transient_big.i)
###########################################################
# This is a simple test with a time-dependent problem
# demonstrating the use of a "Transient" Executioner.
#
# @Requirement F1.10
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
uniform_refine = 2
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./dt]
type = TimestepSize
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
# Preconditioned JFNK (default)
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
file_base = out_transient
exodus = true
[]
(modules/contact/test/tests/non-singular-frictional-mortar/frictional-mortar.i)
offset = 0.0202
vy = 0.15
vx = 0.040
refine = 1
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
[./original_file_mesh]
type = FileMeshGenerator
file = long_short_blocks.e
[../]
uniform_refine = ${refine}
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
scaling = 1e-6
[../]
[]
[Functions]
[./horizontal_movement]
type = ParsedFunction
expression = 'if(t<1.0,${vx}*t-${offset},${vx}-${offset})'
[../]
[./vertical_movement]
type = ParsedFunction
expression = 'if(t<1.0,${offset},${vy}*(t-1.0)+${offset})'
[../]
[]
[BCs]
[./push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 30
function = horizontal_movement
[../]
[./fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[../]
[./fix_right_y]
type = DirichletBC
variable = disp_y
boundary = '40'
value = 0.0
[../]
[./push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = '30'
function = vertical_movement
[../]
[]
[Materials]
[./elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[../]
[./stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[../]
[./elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[../]
[./stress_right]
type = ComputeFiniteStrainElasticStress
block = 2
[../]
[]
[Contact]
[leftright]
secondary = 10
primary = 20
model = coulomb
formulation = mortar
friction_coefficient = 0.2
c_tangential = 1e3
normal_lm_scaling = 1e-3
tangential_lm_scaling = 1e-3
[../]
[]
[ICs]
[./disp_y]
block = 1
variable = disp_y
value = ${offset}
type = ConstantIC
[../]
[./disp_x]
block = 1
variable = disp_x
value = -${offset}
type = ConstantIC
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor -snes_ksp_ew -pc_svd_monitor'
petsc_options_iname = '-pc_type -mat_mffd_err'
petsc_options_value = 'svd 1e-5'
dt = 0.1
dtmin = 0.1
num_steps = 7
end_time = 4
line_search = none
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[./exodus]
type = Exodus
[../]
[]
(modules/porous_flow/test/tests/dirackernels/frompps.i)
# Test PorousFlowPointSourceFromPostprocessor DiracKernel
[Mesh]
type = GeneratedMesh
dim = 2
bias_x = 1.1
bias_y = 1.1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Functions]
[mass_flux_fn]
type = PiecewiseConstant
direction = left
xy_data = '
0 0
100 -0.1
300 0
600 -0.1
1400 0
1500 0.2
2000 0.2'
[]
[]
[Variables]
[pp]
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = pp
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.2
[]
[]
[Postprocessors]
[total_mass]
type = PorousFlowFluidMass
execute_on = 'initial timestep_end'
[]
[mass_flux_in]
type = FunctionValuePostprocessor
function = mass_flux_fn
execute_on = 'initial timestep_begin'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
nl_abs_tol = 1e-14
dt = 100
end_time = 2000
[]
[Outputs]
perf_graph = true
csv = true
execute_on = 'initial timestep_end'
file_base = frompps
[]
[ICs]
[PressureIC]
variable = pp
type = ConstantIC
value = 20e6
[]
[]
[DiracKernels]
[source]
type = PorousFlowPointSourceFromPostprocessor
variable = pp
mass_flux = mass_flux_in
point = '0.5 0.5 0'
[]
[]
(test/tests/auxkernels/function_scalar_aux/function_scalar_aux.i)
#
# Testing a solution that is second order in space and first order in time
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[AuxVariables]
[./x]
family = SCALAR
order = FIRST
[../]
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = ((x*x)+(y*y))-(4*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[./x_fn]
type = ParsedFunction
expression = t
[../]
[]
[AuxScalarKernels]
[./x_saux]
type = FunctionScalarAux
variable = x
function = x_fn
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.25
[]
[Outputs]
exodus = true
[]
(modules/phase_field/examples/multiphase/GrandPotential3Phase_AD.i)
# This is an example of implementation of the multi-phase, multi-order parameter
# grand potential based phase-field model described in Phys. Rev. E, 98, 023309
# (2018). It includes 3 phases with 1 grain of each phase. This example was used
# to generate the results shown in Fig. 3 of the paper.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 60
xmin = -15
xmax = 15
[]
[Variables]
[w]
[]
[etaa0]
[]
[etab0]
[]
[etad0]
[]
[]
[ICs]
[IC_etaa0]
type = FunctionIC
variable = etaa0
function = ic_func_etaa0
[]
[IC_etab0]
type = FunctionIC
variable = etab0
function = ic_func_etab0
[]
[IC_etad0]
type = ConstantIC
variable = etad0
value = 0.1
[]
[IC_w]
type = FunctionIC
variable = w
function = ic_func_w
[]
[]
[Functions]
[ic_func_etaa0]
type = ADParsedFunction
value = '0.9*0.5*(1.0-tanh((x)/sqrt(2.0)))'
[]
[ic_func_etab0]
type = ADParsedFunction
value = '0.9*0.5*(1.0+tanh((x)/sqrt(2.0)))'
[]
[ic_func_w]
type = ADParsedFunction
value = 0
[]
[]
[Kernels]
# Order parameter eta_alpha0
[ACa0_bulk]
type = ADACGrGrMulti
variable = etaa0
v = 'etab0 etad0'
gamma_names = 'gab gad'
[]
[ACa0_sw]
type = ADACSwitching
variable = etaa0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
[]
[ACa0_int]
type = ADACInterface
variable = etaa0
kappa_name = kappa
variable_L = false
[]
[ea0_dot]
type = ADTimeDerivative
variable = etaa0
[]
# Order parameter eta_beta0
[ACb0_bulk]
type = ADACGrGrMulti
variable = etab0
v = 'etaa0 etad0'
gamma_names = 'gab gbd'
[]
[ACb0_sw]
type = ADACSwitching
variable = etab0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
[]
[ACb0_int]
type = ADACInterface
variable = etab0
kappa_name = kappa
variable_L = false
[]
[eb0_dot]
type = ADTimeDerivative
variable = etab0
[]
# Order parameter eta_delta0
[ACd0_bulk]
type = ADACGrGrMulti
variable = etad0
v = 'etaa0 etab0'
gamma_names = 'gad gbd'
[]
[ACd0_sw]
type = ADACSwitching
variable = etad0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
[]
[ACd0_int]
type = ADACInterface
variable = etad0
kappa_name = kappa
variable_L = false
[]
[ed0_dot]
type = ADTimeDerivative
variable = etad0
[]
#Chemical potential
[w_dot]
type = ADSusceptibilityTimeDerivative
variable = w
f_name = chi
[]
[Diffusion]
type = ADMatDiffusion
variable = w
diffusivity = Dchi
[]
[coupled_etaa0dot]
type = ADCoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob rhod'
hj_names = 'ha hb hd'
args = 'etaa0 etab0 etad0'
[]
[coupled_etab0dot]
type = ADCoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob rhod'
hj_names = 'ha hb hd'
args = 'etaa0 etab0 etad0'
[]
[coupled_etad0dot]
type = ADCoupledSwitchingTimeDerivative
variable = w
v = etad0
Fj_names = 'rhoa rhob rhod'
hj_names = 'ha hb hd'
args = 'etaa0 etab0 etad0'
[]
[]
[Materials]
[ha_test]
type = ADSwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etaa0'
[]
[hb_test]
type = ADSwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etab0'
[]
[hd_test]
type = ADSwitchingFunctionMultiPhaseMaterial
h_name = hd
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etad0'
[]
[omegaa]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = omegaa
material_property_names = 'Vm ka caeq'
function = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
derivative_order = 2
[]
[omegab]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = omegab
material_property_names = 'Vm kb cbeq'
function = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
derivative_order = 2
[]
[omegad]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = omegad
material_property_names = 'Vm kd cdeq'
function = '-0.5*w^2/Vm^2/kd-w/Vm*cdeq'
derivative_order = 2
[]
[rhoa]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = rhoa
material_property_names = 'Vm ka caeq'
function = 'w/Vm^2/ka + caeq/Vm'
derivative_order = 2
[]
[rhob]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = rhob
material_property_names = 'Vm kb cbeq'
function = 'w/Vm^2/kb + cbeq/Vm'
derivative_order = 2
[]
[rhod]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = rhod
material_property_names = 'Vm kd cdeq'
function = 'w/Vm^2/kd + cdeq/Vm'
derivative_order = 2
[]
[c]
type = ADParsedMaterial
material_property_names = 'Vm rhoa rhob rhod ha hb hd'
function = 'Vm * (ha * rhoa + hb * rhob + hd * rhod)'
f_name = c
[]
[const]
type = ADGenericConstantMaterial
prop_names = 'kappa_c kappa L D Vm ka caeq kb cbeq kd cdeq gab gad gbd mu tgrad_corr_mult'
prop_values = '0 1 1.0 1.0 1.0 10.0 0.1 10.0 0.9 10.0 0.5 1.5 1.5 1.5 1.0 0.0'
[]
[Mobility]
type = ADDerivativeParsedMaterial
f_name = Dchi
material_property_names = 'D chi'
function = 'D*chi'
derivative_order = 2
[]
[chi]
type = ADDerivativeParsedMaterial
f_name = chi
material_property_names = 'Vm ha(etaa0,etab0,etad0) ka hb(etaa0,etab0,etad0) kb hd(etaa0,etab0,etad0) kd'
function = '(ha/ka + hb/kb + hd/kd) / Vm^2'
args = 'etaa0 etab0 etad0'
derivative_order = 2
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[etaa0]
type = LineValueSampler
variable = etaa0
start_point = '-15 0 0'
end_point = '15 0 0'
num_points = 61
sort_by = x
execute_on = 'initial timestep_end final'
[]
[etab0]
type = LineValueSampler
variable = etab0
start_point = '-15 0 0'
end_point = '15 0 0'
num_points = 61
sort_by = x
execute_on = 'initial timestep_end final'
[]
[etad0]
type = LineValueSampler
variable = etad0
start_point = '-15 0 0'
end_point = '15 0 0'
num_points = 61
sort_by = x
execute_on = 'initial timestep_end final'
[]
[]
[Executioner]
type = Transient
nl_max_its = 15
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = -pc_type
petsc_options_value = lu
l_max_its = 15
l_tol = 1.0e-3
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 20
nl_abs_tol = 1e-10
dt = 1.0
[]
[Outputs]
[exodus]
type = Exodus
execute_on = 'initial timestep_end final'
interval = 1
[]
[csv]
type = CSV
execute_on = 'initial timestep_end final'
interval = 1
[]
[]
(python/peacock/tests/common/transient.i)
###########################################################
# This is a simple test with a time-dependent problem
# demonstrating the use of a "Transient" Executioner.
#
# @Requirement F1.10
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./dt]
type = TimestepSize
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
# Preconditioned JFNK (default)
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_transient
exodus = true
[]
(modules/phase_field/test/tests/actions/both_split_2vars.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 28
ny = 20
xmin = 10
xmax = 40
ymin = 15
ymax = 35
elem_type = QUAD
[]
[Modules]
[./PhaseField]
[./Conserved]
[./c]
free_energy = F
mobility = 1.0
kappa = 20.0
coupled_variables = 'eta'
solve_type = REVERSE_SPLIT
[../]
[../]
[./Nonconserved]
[./eta]
free_energy = F
mobility = 1.0
kappa = 20
coupled_variables = 'c'
[../]
[../]
[../]
[]
[ICs]
[./c_IC]
type = BoundingBoxIC
variable = c
x1 = 10
x2 = 25
y1 = 15
y2 = 35
inside = 0.15
outside = 0.85
[../]
[./eta_IC]
type = ConstantIC
variable = eta
value = 0.5
[../]
[]
[Materials]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'eta c'
expression = '(1 - eta)*10.0*(c - 0.1)^2 + eta*(8.0*(c - 0.9)^2) + 10.0*eta^2*(1-eta)^2'
outputs = exodus
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-11
start_time = 0.0
num_steps = 10
dt = 0.05
[]
[Outputs]
perf_graph = true
exodus = 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'
[../]
[]
(test/tests/outputs/residual/output_residual_elem.i)
[Mesh]
file = sq-2blk.e
uniform_refine = 3
[]
[Variables]
# variable in the whole domain
[./u]
order = CONSTANT
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
# subdomain restricted variable
[./v]
order = CONSTANT
family = MONOMIAL
block = '1'
[../]
[]
[Functions]
[./forcing_fn_u]
type = ParsedFunction
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./forcing_fn_v]
type = ParsedFunction
expression = t
[../]
# [./exact_fn]
# type = ParsedFunction
# expression = t*t*t*((x*x)+(y*y))
# [../]
# [./exact_fn_v]
# type = ParsedFunction
# expression = t+1
# [../]
[]
[Kernels]
[./ie_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = forcing_fn_u
[../]
[./ie_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[./ffn_v]
type = BodyForce
variable = v
function = forcing_fn_v
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_elem
exodus = true
[]
[Debug]
show_var_residual = 'u v'
show_var_residual_norms = true
[]
(modules/combined/test/tests/poro_mechanics/borehole_highres.i)
# Poroelastic response of a borehole.
#
# HIGHRES VERSION: this version gives good agreement with the analytical solution, but it takes a while so is a "heavy" test
#
# A fully-saturated medium contains a fluid with a homogeneous porepressure,
# but an anisitropic insitu stress. A infinitely-long borehole aligned with
# the $$z$$ axis is instanteously excavated. The borehole boundary is
# stress-free and allowed to freely drain. This problem is analysed using
# plane-strain conditions (no $$z$$ displacement).
#
# The solution in Laplace space is found in E Detournay and AHD Cheng "Poroelastic response of a borehole in a non-hydrostatic stress field". International Journal of Rock Mechanics and Mining Sciences and Geomechanics Abstracts 25 (1988) 171-182. In the small-time limit, the Laplace transforms may be performed. There is one typo in the paper. Equation (A4)'s final term should be -(a/r)\sqrt(4ct/(a^2\pi)), and not +(a/r)\sqrt(4ct/(a^2\pi)).
#
# Because realistic parameters are chosen (below),
# the residual for porepressure is much smaller than
# the residuals for the displacements. Therefore the
# scaling parameter is chosen. Also note that the
# insitu stresses are effective stresses, not total
# stresses, but the solution in the above paper is
# expressed in terms of total stresses.
#
# Here are the problem's parameters, and their values:
# Borehole radius. a = 1
# Rock's Lame lambda. la = 0.5E9
# Rock's Lame mu, which is also the Rock's shear modulus. mu = G = 1.5E9
# Rock bulk modulus. K = la + 2*mu/3 = 1.5E9
# Drained Poisson ratio. nu = (3K - 2G)/(6K + 2G) = 0.125
# Rock bulk compliance. 1/K = 0.66666666E-9
# Fluid bulk modulus. Kf = 0.7171315E9
# Fluid bulk compliance. 1/Kf = 1.39444444E-9
# Rock initial porosity. phi0 = 0.3
# Biot coefficient. alpha = 0.65
# Biot modulus. M = 1/(phi0/Kf + (alpha - phi0)(1 - alpha)/K) = 2E9
# Undrained bulk modulus. Ku = K + alpha^2*M = 2.345E9
# Undrained Poisson ratio. nuu = (3Ku - 2G)/(6Ku + 2G) = 0.2364
# Skempton coefficient. B = alpha*M/Ku = 0.554
# Fluid mobility (rock permeability/fluid viscosity). k = 1E-12
[Mesh]
type = FileMesh
file = borehole_highres_input.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
porepressure = porepressure
block = 1
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./porepressure]
scaling = 1E9 # Notice the scaling, to make porepressure's kernels roughly of same magnitude as disp's kernels
[../]
[]
[GlobalParams]
volumetric_locking_correction=true
[]
[ICs]
[./initial_p]
type = ConstantIC
variable = porepressure
value = 1E6
[../]
[]
[BCs]
[./fixed_outer_x]
type = DirichletBC
variable = disp_x
value = 0
boundary = outer
[../]
[./fixed_outer_y]
type = DirichletBC
variable = disp_y
value = 0
boundary = outer
[../]
[./plane_strain]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'zmin zmax'
[../]
[./borehole_wall]
type = DirichletBC
variable = porepressure
value = 0
boundary = bh_wall
[../]
[]
[AuxVariables]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./tot_yy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./tot_yy]
type = ParsedAux
coupled_variables = 'stress_yy porepressure'
execute_on = timestep_end
variable = tot_yy
expression = 'stress_yy-0.65*porepressure'
[../]
[]
[Kernels]
[./grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
[../]
[./grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
[../]
[./grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
component = 2
[../]
[./poro_x]
type = PoroMechanicsCoupling
variable = disp_x
component = 0
[../]
[./poro_y]
type = PoroMechanicsCoupling
variable = disp_y
component = 1
[../]
[./poro_z]
type = PoroMechanicsCoupling
variable = disp_z
component = 2
[../]
[./poro_timederiv]
type = PoroFullSatTimeDerivative
variable = porepressure
[../]
[./darcy_flow]
type = CoefDiffusion
variable = porepressure
coef = 1E-12
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '0.5E9 1.5E9'
# bulk modulus is lambda + 2*mu/3 = 0.5 + 2*1.5/3 = 1.5E9
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeFiniteStrain
displacements = 'disp_x disp_y disp_z'
eigenstrain_names = ini_stress
[../]
[./ini_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = '-1.35E6 0 0 0 -3.35E6 0 0 0 0' # remember this is the effective stress
eigenstrain_name = ini_stress
[../]
[./no_plasticity]
type = ComputeFiniteStrainElasticStress
[../]
[./poro_material]
type = PoroFullSatMaterial
porosity0 = 0.3
biot_coefficient = 0.65
solid_bulk_compliance = 0.6666666666667E-9
fluid_bulk_compliance = 1.3944444444444E-9
constant_porosity = false
[../]
[]
[Postprocessors]
[./p00]
type = PointValue
variable = porepressure
point = '1.00 0 0'
outputs = csv_p
[../]
[./p01]
type = PointValue
variable = porepressure
point = '1.01 0 0'
outputs = csv_p
[../]
[./p02]
type = PointValue
variable = porepressure
point = '1.02 0 0'
outputs = csv_p
[../]
[./p03]
type = PointValue
variable = porepressure
point = '1.03 0 0'
outputs = csv_p
[../]
[./p04]
type = PointValue
variable = porepressure
point = '1.04 0 0'
outputs = csv_p
[../]
[./p05]
type = PointValue
variable = porepressure
point = '1.05 0 0'
outputs = csv_p
[../]
[./p06]
type = PointValue
variable = porepressure
point = '1.06 0 0'
outputs = csv_p
[../]
[./p07]
type = PointValue
variable = porepressure
point = '1.07 0 0'
outputs = csv_p
[../]
[./p08]
type = PointValue
variable = porepressure
point = '1.08 0 0'
outputs = csv_p
[../]
[./p09]
type = PointValue
variable = porepressure
point = '1.09 0 0'
outputs = csv_p
[../]
[./p10]
type = PointValue
variable = porepressure
point = '1.10 0 0'
outputs = csv_p
[../]
[./p11]
type = PointValue
variable = porepressure
point = '1.11 0 0'
outputs = csv_p
[../]
[./p12]
type = PointValue
variable = porepressure
point = '1.12 0 0'
outputs = csv_p
[../]
[./p13]
type = PointValue
variable = porepressure
point = '1.13 0 0'
outputs = csv_p
[../]
[./p14]
type = PointValue
variable = porepressure
point = '1.14 0 0'
outputs = csv_p
[../]
[./p15]
type = PointValue
variable = porepressure
point = '1.15 0 0'
outputs = csv_p
[../]
[./p16]
type = PointValue
variable = porepressure
point = '1.16 0 0'
outputs = csv_p
[../]
[./p17]
type = PointValue
variable = porepressure
point = '1.17 0 0'
outputs = csv_p
[../]
[./p18]
type = PointValue
variable = porepressure
point = '1.18 0 0'
outputs = csv_p
[../]
[./p19]
type = PointValue
variable = porepressure
point = '1.19 0 0'
outputs = csv_p
[../]
[./p20]
type = PointValue
variable = porepressure
point = '1.20 0 0'
outputs = csv_p
[../]
[./p21]
type = PointValue
variable = porepressure
point = '1.21 0 0'
outputs = csv_p
[../]
[./p22]
type = PointValue
variable = porepressure
point = '1.22 0 0'
outputs = csv_p
[../]
[./p23]
type = PointValue
variable = porepressure
point = '1.23 0 0'
outputs = csv_p
[../]
[./p24]
type = PointValue
variable = porepressure
point = '1.24 0 0'
outputs = csv_p
[../]
[./p25]
type = PointValue
variable = porepressure
point = '1.25 0 0'
outputs = csv_p
[../]
[./s00]
type = PointValue
variable = disp_x
point = '1.00 0 0'
outputs = csv_s
[../]
[./s01]
type = PointValue
variable = disp_x
point = '1.01 0 0'
outputs = csv_s
[../]
[./s02]
type = PointValue
variable = disp_x
point = '1.02 0 0'
outputs = csv_s
[../]
[./s03]
type = PointValue
variable = disp_x
point = '1.03 0 0'
outputs = csv_s
[../]
[./s04]
type = PointValue
variable = disp_x
point = '1.04 0 0'
outputs = csv_s
[../]
[./s05]
type = PointValue
variable = disp_x
point = '1.05 0 0'
outputs = csv_s
[../]
[./s06]
type = PointValue
variable = disp_x
point = '1.06 0 0'
outputs = csv_s
[../]
[./s07]
type = PointValue
variable = disp_x
point = '1.07 0 0'
outputs = csv_s
[../]
[./s08]
type = PointValue
variable = disp_x
point = '1.08 0 0'
outputs = csv_s
[../]
[./s09]
type = PointValue
variable = disp_x
point = '1.09 0 0'
outputs = csv_s
[../]
[./s10]
type = PointValue
variable = disp_x
point = '1.10 0 0'
outputs = csv_s
[../]
[./s11]
type = PointValue
variable = disp_x
point = '1.11 0 0'
outputs = csv_s
[../]
[./s12]
type = PointValue
variable = disp_x
point = '1.12 0 0'
outputs = csv_s
[../]
[./s13]
type = PointValue
variable = disp_x
point = '1.13 0 0'
outputs = csv_s
[../]
[./s14]
type = PointValue
variable = disp_x
point = '1.14 0 0'
outputs = csv_s
[../]
[./s15]
type = PointValue
variable = disp_x
point = '1.15 0 0'
outputs = csv_s
[../]
[./s16]
type = PointValue
variable = disp_x
point = '1.16 0 0'
outputs = csv_s
[../]
[./s17]
type = PointValue
variable = disp_x
point = '1.17 0 0'
outputs = csv_s
[../]
[./s18]
type = PointValue
variable = disp_x
point = '1.18 0 0'
outputs = csv_s
[../]
[./s19]
type = PointValue
variable = disp_x
point = '1.19 0 0'
outputs = csv_s
[../]
[./s20]
type = PointValue
variable = disp_x
point = '1.20 0 0'
outputs = csv_s
[../]
[./s21]
type = PointValue
variable = disp_x
point = '1.21 0 0'
outputs = csv_s
[../]
[./s22]
type = PointValue
variable = disp_x
point = '1.22 0 0'
outputs = csv_s
[../]
[./s23]
type = PointValue
variable = disp_x
point = '1.23 0 0'
outputs = csv_s
[../]
[./s24]
type = PointValue
variable = disp_x
point = '1.24 0 0'
outputs = csv_s
[../]
[./s25]
type = PointValue
variable = disp_x
point = '1.25 0 0'
outputs = csv_s
[../]
[./t00]
type = PointValue
variable = tot_yy
point = '1.00 0 0'
outputs = csv_t
[../]
[./t01]
type = PointValue
variable = tot_yy
point = '1.01 0 0'
outputs = csv_t
[../]
[./t02]
type = PointValue
variable = tot_yy
point = '1.02 0 0'
outputs = csv_t
[../]
[./t03]
type = PointValue
variable = tot_yy
point = '1.03 0 0'
outputs = csv_t
[../]
[./t04]
type = PointValue
variable = tot_yy
point = '1.04 0 0'
outputs = csv_t
[../]
[./t05]
type = PointValue
variable = tot_yy
point = '1.05 0 0'
outputs = csv_t
[../]
[./t06]
type = PointValue
variable = tot_yy
point = '1.06 0 0'
outputs = csv_t
[../]
[./t07]
type = PointValue
variable = tot_yy
point = '1.07 0 0'
outputs = csv_t
[../]
[./t08]
type = PointValue
variable = tot_yy
point = '1.08 0 0'
outputs = csv_t
[../]
[./t09]
type = PointValue
variable = tot_yy
point = '1.09 0 0'
outputs = csv_t
[../]
[./t10]
type = PointValue
variable = tot_yy
point = '1.10 0 0'
outputs = csv_t
[../]
[./t11]
type = PointValue
variable = tot_yy
point = '1.11 0 0'
outputs = csv_t
[../]
[./t12]
type = PointValue
variable = tot_yy
point = '1.12 0 0'
outputs = csv_t
[../]
[./t13]
type = PointValue
variable = tot_yy
point = '1.13 0 0'
outputs = csv_t
[../]
[./t14]
type = PointValue
variable = tot_yy
point = '1.14 0 0'
outputs = csv_t
[../]
[./t15]
type = PointValue
variable = tot_yy
point = '1.15 0 0'
outputs = csv_t
[../]
[./t16]
type = PointValue
variable = tot_yy
point = '1.16 0 0'
outputs = csv_t
[../]
[./t17]
type = PointValue
variable = tot_yy
point = '1.17 0 0'
outputs = csv_t
[../]
[./t18]
type = PointValue
variable = tot_yy
point = '1.18 0 0'
outputs = csv_t
[../]
[./t19]
type = PointValue
variable = tot_yy
point = '1.19 0 0'
outputs = csv_t
[../]
[./t20]
type = PointValue
variable = tot_yy
point = '1.20 0 0'
outputs = csv_t
[../]
[./t21]
type = PointValue
variable = tot_yy
point = '1.21 0 0'
outputs = csv_t
[../]
[./t22]
type = PointValue
variable = tot_yy
point = '1.22 0 0'
outputs = csv_t
[../]
[./t23]
type = PointValue
variable = tot_yy
point = '1.23 0 0'
outputs = csv_t
[../]
[./t24]
type = PointValue
variable = tot_yy
point = '1.24 0 0'
outputs = csv_t
[../]
[./t25]
type = PointValue
variable = tot_yy
point = '1.25 0 0'
outputs = csv_t
[../]
[./dt]
type = FunctionValuePostprocessor
outputs = console
function = 2*t
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options = '-snes_monitor -snes_linesearch_monitor'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'gmres asm 1E0 1E-10 200 500 lu NONZERO'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 0.3
dt = 0.1
#[./TimeStepper]
# type = PostprocessorDT
# postprocessor = dt
# dt = 0.003
#[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = borehole_highres
exodus = true
sync_times = '0.003 0.3'
[./csv_p]
file_base = borehole_highres_p
type = CSV
[../]
[./csv_s]
file_base = borehole_highres_s
type = CSV
[../]
[./csv_t]
file_base = borehole_highres_t
type = CSV
[../]
[]
(modules/richards/test/tests/gravity_head_2/gh_bounded_17.i)
# unsaturated = false
# gravity = true
# supg = true
# transient = true
# using RichardsMultiphaseProblem to bound pgas. i take big timesteps to illustrate that the bounding works. Note that s_res for gas = 0, in order to prevent the simulation from trying to reduce pgas at small x in order to conserve fluid mass by decreasing the density. Because there is zero gas to begin with, but due to numerical inprecisions there is some gas at the end, the mass error for the gas is 0.5.
[Problem]
type = RichardsMultiphaseProblem
bounded_var = pgas
lower_var = pwater
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmin = 0
xmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = 'DensityWater DensityGas'
relperm_UO = 'RelPermWater RelPermGas'
SUPG_UO = 'SUPGwater SUPGgas'
sat_UO = 'SatWater SatGas'
seff_UO = 'SeffWater SeffGas'
viscosity = '1E-3 0.5E-3'
gravity = '-1 0 0'
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 1.0E2
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 0.5
bulk_mod = 0.5E2
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.0
n = 3
[../]
[./SatWater]
type = RichardsSat
s_res = 0.1
sum_s_res = 0.1
[../]
[./SatGas]
type = RichardsSat
s_res = 0.00
sum_s_res = 0.1
[../]
[./SUPGwater]
type = RichardsSUPGstandard
p_SUPG = 0.1
[../]
[./SUPGgas]
type = RichardsSUPGstandard
p_SUPG = 0.01
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./water_ic]
type = ConstantIC
value = 1
variable = pwater
[../]
[./gas_ic]
type = ConstantIC
value = 1
variable = pgas
[../]
[]
[Kernels]
active = 'richardsfwater richardstwater richardsfgas richardstgas'
[./richardstwater]
type = RichardsLumpedMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFlux
variable = pwater
[../]
[./richardstgas]
type = RichardsLumpedMassChange
variable = pgas
[../]
[./richardsfgas]
type = RichardsFlux
variable = pgas
[../]
[]
[AuxVariables]
[./seffgas]
[../]
[./seffwater]
[../]
# the following "dummy" variable is simply used for exception testing RichardsMultiphaseProblem
# It is not part of the "gravity head" simulation
[./dummy_var]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./seffgas_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffGas
variable = seffgas
[../]
[./seffwater_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffWater
variable = seffwater
[../]
[]
[Postprocessors]
[./mwater_init]
type = RichardsMass
variable = pwater
execute_on = timestep_begin
outputs = none
[../]
[./mgas_init]
type = RichardsMass
variable = pgas
execute_on = timestep_begin
outputs = none
[../]
[./mwater_fin]
type = RichardsMass
variable = pwater
execute_on = timestep_end
outputs = none
[../]
[./mgas_fin]
type = RichardsMass
variable = pgas
execute_on = timestep_end
outputs = none
[../]
[./mass_error_water]
type = FunctionValuePostprocessor
function = fcn_mass_error_w
[../]
[./pw_left]
type = PointValue
point = '0 0 0'
variable = pwater
outputs = none
[../]
[./pw_right]
type = PointValue
point = '1 0 0'
variable = pwater
outputs = none
[../]
[./error_water]
type = FunctionValuePostprocessor
function = fcn_error_water
[../]
[]
[Functions]
[./fcn_mass_error_w]
type = ParsedFunction
expression = 'abs(0.5*(mi-mf)/(mi+mf))'
symbol_names = 'mi mf'
symbol_values = 'mwater_init mwater_fin'
[../]
[./fcn_error_water]
type = ParsedFunction
expression = 'abs((-b*log(-(gdens0*xval+(-b*exp(-p0/b)))/b)-p1)/p1)'
symbol_names = 'b gdens0 p0 xval p1'
symbol_values = '1E2 -1 pw_left 1 pw_right'
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-pc_factor_shift_type'
petsc_options_value = 'nonzero'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
dt = 1E6
dtmin = 1E6
line_search = bt
nl_rel_tol = 1.e-6
nl_max_its = 10
[]
[Outputs]
execute_on = 'timestep_end'
file_base = gh_bounded_17
csv = true
[]
(modules/porous_flow/test/tests/poroperm/PermTensorFromVar02.i)
# Testing permeability calculated from scalar and tensor
# Trivial test, checking calculated permeability is correct
# when scalar is a FunctionAux.
# k = k_anisotropy * perm
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 3
[]
[GlobalParams]
block = 0
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[InitialCondition]
type = ConstantIC
value = 0
[]
[]
[]
[Kernels]
[flux]
type = PorousFlowAdvectiveFlux
gravity = '0 0 0'
variable = pp
[]
[]
[BCs]
[ptop]
type = DirichletBC
variable = pp
boundary = right
value = 0
[]
[pbase]
type = DirichletBC
variable = pp
boundary = left
value = 1
[]
[]
[Functions]
[perm_fn]
type = ParsedFunction
expression = '2*(x+1)'
[]
[]
[AuxVariables]
[perm_var]
order = CONSTANT
family = MONOMIAL
[]
[perm_x]
order = CONSTANT
family = MONOMIAL
[]
[perm_y]
order = CONSTANT
family = MONOMIAL
[]
[perm_z]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[perm_var]
type = FunctionAux
function = perm_fn
variable = perm_var
[]
[perm_x]
type = PorousFlowPropertyAux
property = permeability
variable = perm_x
row = 0
column = 0
[]
[perm_y]
type = PorousFlowPropertyAux
property = permeability
variable = perm_y
row = 1
column = 1
[]
[perm_z]
type = PorousFlowPropertyAux
property = permeability
variable = perm_z
row = 2
column = 2
[]
[]
[Postprocessors]
[perm_x_left]
type = PointValue
variable = perm_x
point = '0.5 0 0'
[]
[perm_y_left]
type = PointValue
variable = perm_y
point = '0.5 0 0'
[]
[perm_z_left]
type = PointValue
variable = perm_z
point = '0.5 0 0'
[]
[perm_x_right]
type = PointValue
variable = perm_x
point = '2.5 0 0'
[]
[perm_y_right]
type = PointValue
variable = perm_y
point = '2.5 0 0'
[]
[perm_z_right]
type = PointValue
variable = perm_z
point = '2.5 0 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
# unimportant in this fully-saturated test
m = 0.8
alpha = 1e-4
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[permeability]
type = PorousFlowPermeabilityTensorFromVar
k_anisotropy = '1 0 0 0 2 0 0 0 0.1'
perm = perm_var
[]
[temperature]
type = PorousFlowTemperature
[]
[massfrac]
type = PorousFlowMassFraction
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = Newton
type = Steady
l_tol = 1E-5
nl_abs_tol = 1E-3
nl_rel_tol = 1E-8
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
csv = true
execute_on = 'timestep_end'
[]
(modules/fsi/test/tests/2d-finite-strain-steady/thermal-me.i)
# Units: specific_heat_capacity--cp--J/(kg.K); density--rho--kg/(cm^3);
# dynamic_viscosity--mu--kg/(cm.s); thermal_conductivity--k--W/(cm.K);
# pressure--kg/(cm.s^2); force--kg.cm/s^2
outlet_pressure = 0
inlet_velocity = 150 # cm/s
ini_temp = 593 # K
heat_transfer_coefficient = 9 # W/(cm2.K)
g = -981 # cm/s2
alpha_fluid = 2e-4 # thermal expansion coefficient of fluid used in INSADBoussinesqBodyForce
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = '2layers_2d_midline.msh'
[]
[Variables]
[velocity]
family = LAGRANGE_VEC
order = FIRST
block = 'fluid'
[]
[p]
family = LAGRANGE
order = FIRST
block = 'fluid'
[]
[Tf]
family = LAGRANGE
order = FIRST
block = 'fluid'
[]
[Ts]
family = LAGRANGE
order = FIRST
block = 'solid'
[]
[disp_x]
family = LAGRANGE
order = FIRST
block = 'solid fluid'
[]
[disp_y]
family = LAGRANGE
order = FIRST
block = 'solid fluid'
[]
[]
[AuxVariables]
[heat_source]
family = MONOMIAL
order = FIRST
block = 'solid'
[]
[]
[ICs]
[initial_velocity]
type = VectorConstantIC
variable = velocity
x_value = 0
y_value = ${inlet_velocity}
z_value = 0
[]
[initial_p]
type = FunctionIC
variable = p
function = ini_p
[]
[initial_Tf]
type = ConstantIC
variable = Tf
value = ${ini_temp}
[]
[initial_Ts]
type = ConstantIC
variable = Ts
value = ${ini_temp}
[]
[]
[Kernels]
[fluid_mass]
type = INSADMass
variable = p
use_displaced_mesh = true
[]
[fluid_mass_pspg]
type = INSADMassPSPG
variable = p
use_displaced_mesh = true
[]
[fluid_momentum_time]
type = INSADMomentumTimeDerivative
variable = velocity
use_displaced_mesh = true
[]
[fluid_momentum_convection]
type = INSADMomentumAdvection
variable = velocity
use_displaced_mesh = true
[]
[fluid_momentum_viscous]
type = INSADMomentumViscous
variable = velocity
use_displaced_mesh = true
[]
[fluid_momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
use_displaced_mesh = true
[]
[fluid_momentum_gravity]
type = INSADGravityForce
variable = velocity
gravity = '0 ${g} 0'
use_displaced_mesh = true
[]
[fluid_momentum_buoyancy]
type = INSADBoussinesqBodyForce
variable = velocity
gravity = '0 ${g} 0'
alpha_name = 'alpha_fluid'
ref_temp = 'T_ref'
temperature = Tf
use_displaced_mesh = true
[]
[fluid_momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
use_displaced_mesh = true
[]
[fluid_temperature_time]
type = INSADHeatConductionTimeDerivative
variable = Tf
use_displaced_mesh = true
[]
[fluid_temperature_conduction]
type = ADHeatConduction
variable = Tf
thermal_conductivity = 'k'
use_displaced_mesh = true
[]
[fluid_temperature_advection]
type = INSADEnergyAdvection
variable = Tf
use_displaced_mesh = true
[]
[fluid_temperature_supg]
type = INSADEnergySUPG
variable = Tf
velocity = velocity
use_displaced_mesh = true
[]
[solid_temperature_time]
type = ADHeatConductionTimeDerivative
variable = Ts
density_name = 'rho'
specific_heat = 'cp'
block = 'solid'
use_displaced_mesh = true
[]
[solid_temperature_conduction]
type = ADHeatConduction
variable = Ts
thermal_conductivity = 'k'
block = 'solid'
use_displaced_mesh = true
[]
[heat_source]
type = ADCoupledForce
variable = Ts
v = heat_source
block = 'solid'
use_displaced_mesh = true
[]
[disp_x_smooth]
type = Diffusion
variable = disp_x
block = fluid
[]
[disp_y_smooth]
type = Diffusion
variable = disp_y
block = fluid
[]
[]
[Modules/TensorMechanics/Master]
strain = FINITE
material_output_order = FIRST
generate_output = 'vonmises_stress stress_xx stress_yy stress_zz strain_xx strain_yy strain_zz'
[solid]
block = 'solid'
temperature = Ts
automatic_eigenstrain_names = true
[]
[]
[InterfaceKernels]
[convection_heat_transfer]
type = ConjugateHeatTransfer
variable = Tf
T_fluid = Tf
neighbor_var = 'Ts'
boundary = 'solid_wall'
htc = 'htc'
use_displaced_mesh = true
[]
[]
[AuxKernels]
[heat_source_distribution_auxk]
type = FunctionAux
variable = heat_source
function = heat_source_distribution_function
block = 'solid'
use_displaced_mesh = true
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[BCs]
[no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'solid_wall'
use_displaced_mesh = true
[]
[inlet_velocity]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'fluid_bottom'
function_y = ${inlet_velocity}
use_displaced_mesh = true
[]
[symmetry]
type = ADVectorFunctionDirichletBC
variable = velocity
boundary = 'fluid_wall'
function_x = 0
set_x_comp = true
set_y_comp = false
set_z_comp = false
use_displaced_mesh = true
[]
[outlet_p]
type = DirichletBC
variable = p
boundary = 'fluid_top'
value = ${outlet_pressure}
use_displaced_mesh = true
[]
[inlet_T]
type = DirichletBC
variable = Tf
boundary = 'fluid_bottom'
value = ${ini_temp}
use_displaced_mesh = true
[]
[pin1_y]
type = DirichletBC
variable = disp_y
boundary = 'pin1'
value = 0
use_displaced_mesh = true
[]
[pin1_x]
type = DirichletBC
variable = disp_x
boundary = 'pin1'
value = 0
use_displaced_mesh = true
[]
[top_and_bottom_y]
type = DirichletBC
variable = disp_y
boundary = 'solid_bottom solid_top fluid_top fluid_bottom'
value = 0
use_displaced_mesh = true
[]
[left_and_right_x]
type = DirichletBC
variable = disp_x
boundary = 'fluid_wall fluid_bottom'
value = 0
use_displaced_mesh = true
[]
[]
[Materials]
[rho_solid]
type = ADParsedMaterial
property_name = rho
expression = '0.0110876 * pow(9.9672e-1 + 1.179e-5 * Ts - 2.429e-9 * pow(Ts,2) + 1.219e-12 * pow(Ts,3),-3)'
coupled_variables = 'Ts'
block = 'solid'
use_displaced_mesh = true
[]
[cp_solid]
type = ADParsedMaterial
property_name = cp
expression = '0.76 * ((302.27 * pow((548.68 / Ts),2) * exp(548.68 / Ts)) / pow((exp(548.68 / Ts) - 1),2) + 2 * 8.463e-3 * Ts + 8.741e7 * 18531.7 * exp(-18531.7 / Ts) / pow(Ts,2)) + 0.24 * ((322.49 * pow((587.41/Ts),2) * exp(587.41 / Ts)) / pow((exp(587.41 / Ts) - 1),2) + 2 * 1.4679e-2 * Ts)'
coupled_variables = 'Ts'
block = 'solid'
use_displaced_mesh = true
[]
[k_solid]
type = ADParsedMaterial
property_name = k
expression = '1.158/(7.5408 + 17.692 * (Ts / 1000) + 3.6142 * pow((Ts/1000),2)) + 74.105 * pow((Ts / 1000),-2.5) * exp(-16.35 / (Ts / 1000))'
coupled_variables = 'Ts'
block = 'solid'
use_displaced_mesh = true
[]
[rho_fluid]
type = ADParsedMaterial
property_name = rho
expression = '(11096 - 1.3236 * Tf) * 1e-6'
coupled_variables = 'Tf'
block = 'fluid'
use_displaced_mesh = true
[]
[cp_fluid]
type = ADParsedMaterial
property_name = cp
expression = '159 - 2.72e-2 * Tf + 7.12e-6 * pow(Tf,2)'
coupled_variables = 'Tf'
block = 'fluid'
use_displaced_mesh = true
[]
[k_fluid]
type = ADParsedMaterial
property_name = k
expression = '(3.61 + 1.517e-2 * Tf - 1.741e-6 * pow(Tf,2)) * 1e-2'
coupled_variables = 'Tf'
block = 'fluid'
use_displaced_mesh = true
[]
[mu_fluid]
type = ADParsedMaterial
property_name = mu
expression = '4.94e-6 * exp(754.1/Tf)'
coupled_variables = 'Tf'
block = 'fluid'
use_displaced_mesh = true
[]
[buoyancy_thermal_expansion_coefficient_fluid]
type = ADGenericConstantMaterial
prop_names = 'alpha_fluid'
prop_values = '${alpha_fluid}'
block = 'fluid'
use_displaced_mesh = true
[]
[buoyancy_reference_temperature_fluid]
type = GenericConstantMaterial
prop_names = 'T_ref'
prop_values = '${ini_temp}'
block = 'fluid'
use_displaced_mesh = true
[]
[ins_mat_fluid]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = Tf
block = 'fluid'
use_displaced_mesh = true
[]
[htc]
type = ADGenericFunctionMaterial
prop_names = htc
prop_values = htc_function
use_displaced_mesh = true
[]
[elasticity_solid]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2e7
poissons_ratio = 0.32
block = 'solid'
use_displaced_mesh = true
[]
[thermal_expansion_solid]
type = ComputeThermalExpansionEigenstrain
temperature = Ts
thermal_expansion_coeff = 2e-4
stress_free_temperature = 593
eigenstrain_name = thermal_expansion
block = 'solid'
use_displaced_mesh = true
[]
[stress_solid]
type = ComputeFiniteStrainElasticStress
block = 'solid'
[]
[]
[Functions]
[htc_function]
type = ParsedFunction
expression = ${heat_transfer_coefficient}
[]
[ini_p]
type = ParsedFunction
expression = '0.010302 * 981 * (10 - y)'
[]
[heat_source_distribution_function]
type = ParsedFunction
expression = '300 * sin(pi * y / 10)'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
solve_type = 'PJFNK'
[]
[]
[Executioner]
type = Transient
end_time = 1e4
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_max_its = 30
l_max_its = 100
automatic_scaling = true
compute_scaling_once = true
off_diagonals_in_auto_scaling = true
dtmin = 1
nl_abs_tol = 1e-12
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 6
growth_factor = 1.5
dt = 1
[]
[]
[Outputs]
[csv]
type = CSV
file_base = 'thermal-me'
execute_on = 'final'
[]
[]
[Postprocessors]
[average_solid_Ts]
type = ElementAverageValue
variable = Ts
block = 'solid'
use_displaced_mesh = true
[]
[average_fluid_Tf]
type = ElementAverageValue
variable = Tf
block = 'fluid'
use_displaced_mesh = true
[]
[max_solid_Ts]
type = ElementExtremeValue
variable = Ts
value_type = max
block = 'solid'
use_displaced_mesh = true
[]
[max_fluid_Tf]
type = ElementExtremeValue
variable = Tf
value_type = max
block = 'fluid'
use_displaced_mesh = true
[]
[min_solid_Ts]
type = ElementExtremeValue
variable = Ts
value_type = min
block = 'solid'
use_displaced_mesh = true
[]
[min_fluid_Tf]
type = ElementExtremeValue
variable = Tf
value_type = min
block = 'fluid'
use_displaced_mesh = true
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d-action.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[Contact]
[mortar]
primary = 'bottom_top'
secondary = 'top_bottom'
formulation = mortar
model = frictionless
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = .5
dtmin = .01
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15 1e-5'
l_max_its = 100
nl_max_its = 30
nl_abs_tol = 1e-12
nl_rel_tol = 1e-9
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = mortar_normal_lm
subdomain = 'mortar_secondary_subdomain'
execute_on = 'nonlinear timestep_end'
[]
[lambda]
type = ElementAverageValue
variable = mortar_normal_lm
block = 'mortar_secondary_subdomain'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = mortar_secondary_subdomain
variable = mortar_normal_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[]
(modules/porous_flow/test/tests/poroperm/PermTensorFromVar01.i)
# Testing permeability calculated from scalar and tensor
# Trivial test, checking calculated permeability is correct
# k = k_anisotropy * perm
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 3
[]
[GlobalParams]
block = 0
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[InitialCondition]
type = ConstantIC
value = 0
[]
[]
[]
[Kernels]
[flux]
type = PorousFlowAdvectiveFlux
gravity = '0 0 0'
variable = pp
[]
[]
[BCs]
[ptop]
type = DirichletBC
variable = pp
boundary = right
value = 0
[]
[pbase]
type = DirichletBC
variable = pp
boundary = left
value = 1
[]
[]
[AuxVariables]
[perm_var]
order = CONSTANT
family = MONOMIAL
[]
[perm_x]
order = CONSTANT
family = MONOMIAL
[]
[perm_y]
order = CONSTANT
family = MONOMIAL
[]
[perm_z]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[perm_var]
type = ConstantAux
value = 2
variable = perm_var
[]
[perm_x]
type = PorousFlowPropertyAux
property = permeability
variable = perm_x
row = 0
column = 0
[]
[perm_y]
type = PorousFlowPropertyAux
property = permeability
variable = perm_y
row = 1
column = 1
[]
[perm_z]
type = PorousFlowPropertyAux
property = permeability
variable = perm_z
row = 2
column = 2
[]
[]
[Postprocessors]
[perm_x_left]
type = PointValue
variable = perm_x
point = '0.5 0 0'
[]
[perm_y_left]
type = PointValue
variable = perm_y
point = '0.5 0 0'
[]
[perm_z_left]
type = PointValue
variable = perm_z
point = '0.5 0 0'
[]
[perm_x_right]
type = PointValue
variable = perm_x
point = '2.5 0 0'
[]
[perm_y_right]
type = PointValue
variable = perm_y
point = '2.5 0 0'
[]
[perm_z_right]
type = PointValue
variable = perm_z
point = '2.5 0 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
# unimportant in this fully-saturated test
m = 0.8
alpha = 1e-4
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[permeability]
type = PorousFlowPermeabilityTensorFromVar
k_anisotropy = '1 0 0 0 2 0 0 0 0.1'
perm = perm_var
[]
[temperature]
type = PorousFlowTemperature
[]
[massfrac]
type = PorousFlowMassFraction
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = Newton
type = Steady
l_tol = 1E-5
nl_abs_tol = 1E-3
nl_rel_tol = 1E-8
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
csv = true
execute_on = 'timestep_end'
[]
(modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_heat_flux/main.i)
# Main input file.
#
# Run mesh.i first to produce a mesh file that this input uses:
#
# thermal_hydraulics-opt -i mesh.i --mesh-only mesh.e
length = 5.0
n_elems_axial = 10
rho_name = density
cp_name = specific_heat
k_name = thermal_conductivity
rho = 8000.0
cp = 500.0
k = 15.0
T_initial = 500.0
power = 1000.0
[Mesh]
type = FileMesh
file = mesh.e
[]
[Variables]
[T_solid]
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T_solid
value = ${T_initial}
[]
[]
[Kernels]
[time_derivative]
type = ADHeatConductionTimeDerivative
variable = T_solid
density_name = ${rho_name}
specific_heat = ${cp_name}
[]
[heat_conduction]
type = ADHeatConduction
variable = T_solid
thermal_conductivity = ${k_name}
[]
[]
[BCs]
[bc]
type = FunctorNeumannBC
variable = T_solid
boundary = 'inner'
functor = heat_flux_fn
flux_is_inward = false
[]
[]
[Materials]
[ad_constant_mat]
type = ADGenericConstantMaterial
prop_names = '${rho_name} ${cp_name} ${k_name}'
prop_values = '${rho} ${cp} ${k}'
[]
[]
[Functions]
[heat_flux_fn]
type = ParsedFunction
symbol_names = 'S'
symbol_values = 'inner_surface_area'
expression = '${power} / S'
[]
[]
[Postprocessors]
[inner_surface_area]
type = AreaPostprocessor
boundary = 'inner'
execute_on = 'INITIAL'
[]
[inner_perimeter]
type = ParsedPostprocessor
pp_names = 'inner_surface_area'
expression = 'inner_surface_area / ${length}'
execute_on = 'INITIAL'
[]
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = ThermalHydraulicsApp
input_files = 'sub.i'
positions = '0 0 0'
max_procs_per_app = 1
output_in_position = true
execute_on = 'TIMESTEP_END'
[]
[]
[UserObjects]
[layered_average_heat_flux]
type = NearestPointLayeredSideAverageFunctor
direction = z
points='0 0 0'
num_layers = ${n_elems_axial}
functor = heat_flux_fn
boundary = 'inner'
execute_on = 'TIMESTEP_END'
[]
[]
[Transfers]
[heat_flux_transfer]
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub
source_user_object = layered_average_heat_flux
variable = q_ext
error_on_miss = true
[]
[perimeter_transfer]
type = MultiAppPostprocessorTransfer
to_multi_app = sub
from_postprocessor = inner_perimeter
to_postprocessor = P_ext
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 10.0
num_steps = 1
abort_on_solve_fail = true
solve_type = NEWTON
nl_abs_tol = 1e-10
nl_rel_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 10
[]
(modules/richards/test/tests/rogers_stallybrass_clements/rsc01.i)
# RSC test with high-res time and spatial resolution
[Mesh]
type = GeneratedMesh
dim = 2
nx = 600
ny = 1
xmin = 0
xmax = 10 # x is the depth variable, called zeta in RSC
ymin = 0
ymax = 0.05
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '3E-3 3E-2 0.05'
x = '0 1 5'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater poil'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 10
bulk_mod = 2E9
[../]
[./DensityOil]
type = RichardsDensityConstBulk
dens0 = 20
bulk_mod = 2E9
[../]
[./SeffWater]
type = RichardsSeff2waterRSC
oil_viscosity = 2E-3
scale_ratio = 2E3
shift = 10
[../]
[./SeffOil]
type = RichardsSeff2gasRSC
oil_viscosity = 2E-3
scale_ratio = 2E3
shift = 10
[../]
[./RelPerm]
type = RichardsRelPermMonomial
simm = 0
n = 1
[../]
[./Saturation]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1.0E-2
[../]
[]
[Variables]
[./pwater]
[../]
[./poil]
[../]
[]
[ICs]
[./water_init]
type = ConstantIC
variable = pwater
value = 0
[../]
[./oil_init]
type = ConstantIC
variable = poil
value = 15
[../]
[]
[Kernels]
[./richardstwater]
type = RichardsMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFlux
variable = pwater
[../]
[./richardstoil]
type = RichardsMassChange
variable = poil
[../]
[./richardsfoil]
type = RichardsFlux
variable = poil
[../]
[]
[AuxVariables]
[./SWater]
[../]
[./SOil]
[../]
[]
[AuxKernels]
[./Seff1VGwater_AuxK]
type = RichardsSeffAux
variable = SWater
seff_UO = SeffWater
pressure_vars = 'pwater poil'
[../]
[./Seff1VGoil_AuxK]
type = RichardsSeffAux
variable = SOil
seff_UO = SeffOil
pressure_vars = 'pwater poil'
[../]
[]
[BCs]
# we are pumping water into a system that has virtually incompressible fluids, hence the pressures rise enormously. this adversely affects convergence because of almost-overflows and precision-loss problems. The fixed things help keep pressures low and so prevent these awful behaviours. the movement of the saturation front is the same regardless of the fixed things.
active = 'recharge fixedoil fixedwater'
[./recharge]
type = RichardsPiecewiseLinearSink
variable = pwater
boundary = 'left'
pressures = '-1E10 1E10'
bare_fluxes = '-1 -1'
use_mobility = false
use_relperm = false
[../]
[./fixedwater]
type = DirichletBC
variable = pwater
boundary = 'right'
value = 0
[../]
[./fixedoil]
type = DirichletBC
variable = poil
boundary = 'right'
value = 15
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.25
mat_permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
density_UO = 'DensityWater DensityOil'
relperm_UO = 'RelPerm RelPerm'
SUPG_UO = 'SUPGstandard SUPGstandard'
sat_UO = 'Saturation Saturation'
seff_UO = 'SeffWater SeffOil'
viscosity = '1E-3 2E-3'
gravity = '0E-0 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
active = 'andy'
[./andy]
type = SMP
full = true
petsc_options = ''
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
petsc_options = '-snes_converged_reason'
end_time = 5
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = rsc01
time_step_interval = 100000
execute_on = 'initial final'
exodus = true
[]
(modules/contact/test/tests/mortar_aux_kernels/pressure-aux-frictionless-3d.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Problem]
# error_on_jacobian_nonzero_reallocation = true
[]
[Mesh]
second_order = false
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[lm_z]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[normal_lm]
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[normal_lm]
type = MortarPressureComponentAux
variable = normal_lm
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
lm_var_x = lm_x
lm_var_y = lm_y
lm_var_z = lm_z
component = 'NORMAL'
boundary = 'top_bottom'
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapCartesianLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
lm_z = lm_z
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
correct_edge_dropping = true
c = 1e+02
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_z]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_z
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -mat_mffd_err -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist 1e-5 NONZERO 1e-10'
end_time = 1
dt = .5
dtmin = .01
l_max_its = 100
nl_max_its = 30
# nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = false
csv = true
execute_on = 'FINAL'
[]
[VectorPostprocessors]
[normal_lm]
type = NodalValueSampler
block = secondary_lower
variable = normal_lm
sort_by = 'id'
[]
[]
(modules/contact/test/tests/mortar_dynamics/block-dynamics-friction-action.i)
starting_point = 2e-1
offset = -0.19
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = long-bottom-block-no-lower-d.e
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_yy'
strain = FINITE
block = '1 2'
zeta = 0.05
alpha = 0.0
[]
[inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[strain]
type = ComputeFiniteStrain
block = '1 2'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '7750'
[]
[]
[AuxVariables]
[vel_x]
block = '1 2'
[]
[accel_x]
block = '1 2'
[]
[vel_y]
block = '1 2'
[]
[accel_y]
block = '1 2'
[]
[vel_z]
block = '1 2'
[]
[accel_z]
block = '1 2'
[]
[]
[AuxKernels]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = 'LINEAR timestep_end'
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = 'LINEAR timestep_end'
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = 'LINEAR timestep_end'
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = 'LINEAR timestep_end'
[]
[]
[Contact]
[mechanical]
formulation = mortar
model = coulomb
primary = 20
secondary = 10
friction_coefficient = 0.5
c_normal = 1.0e4
c_tangential = 1.0e4
mortar_dynamics = true
newmark_beta = 0.25
newmark_gamma = 0.5
capture_tolerance = 1.0e-5
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 30 # 50
function = '0' # '1e-2*t'
[]
[]
[Executioner]
type = Transient
end_time = 75
dt = 0.05
dtmin = .005
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err '
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
nl_max_its = 50
line_search = 'none'
snesmf_reuse_base = false
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[VectorPostprocessors]
[mechanical_tangential_lm]
type = NodalValueSampler
block = 'mechanical_secondary_subdomain'
variable = mechanical_tangential_lm
sort_by = 'x'
execute_on = TIMESTEP_END
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
(test/tests/executioners/executioner/sln-time-adapt.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./dt]
type = TimestepSize
[../]
[]
[Executioner]
type = Transient
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.1
[../]
scheme = 'implicit-euler'
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_sta
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_external_app_1phase/phy.q_wall_transfer_3eqn.parent.i)
# This tests a heat flux transfer using the MultiApp system. Simple heat
# conduction problem is solved, then the heat flux is picked up by the child
# side of the solve, child side solves and transfers its variables back to the
# master
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 1
nx = 10
[]
[Functions]
[sin_fn]
type = ParsedFunction
expression = '1000*t*sin(pi*x)'
[]
[]
[Variables]
[T]
[]
[]
[AuxVariables]
[q_wall]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[q_wal_ak]
type = FunctionAux
variable = q_wall
function = sin_fn
execute_on = 'initial timestep_end'
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T
value = 300
[]
[]
[Kernels]
[td]
type = TimeDerivative
variable = T
[]
[diff]
type = Diffusion
variable = T
[]
[]
[BCs]
[left]
type = DirichletBC
variable = T
boundary = 'left right'
value = 300
[]
[]
[Executioner]
type = Transient
dt = 0.5
num_steps = 2
nl_abs_tol = 1e-10
abort_on_solve_fail = true
[]
[MultiApps]
[thm]
type = TransientMultiApp
app_type = ThermalHydraulicsApp
input_files = phy.q_wall_transfer_3eqn.child.i
execute_on = 'initial timestep_end'
[]
[]
[Transfers]
[q_to_thm]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = thm
source_variable = q_wall
variable = q_wall
[]
[]
[Outputs]
exodus = true
show = 'q_wall'
[]
(modules/functional_expansion_tools/examples/3D_volumetric_Cartesian_direct/main.i)
# Derived from the example '3D_volumetric_Cartesian' with the following differences:
#
# 1) The coupling is performed via BodyForce instead of the
# FunctionSeriesToAux+CoupledForce approach
[Mesh]
type = GeneratedMesh
dim = 3
xmin = 0.0
xmax = 10.0
nx = 15
ymin = 1.0
ymax = 11.0
ny = 25
zmin = 2.0
zmax = 12.0
nz = 35
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = BodyForce
variable = m
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'top bottom left right front back'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3 4 5'
physical_bounds = '0.0 10.0 1.0 11.0 2.0 12.0'
x = Legendre
y = Legendre
z = Legendre
enable_cache = true
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
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
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/peridynamics/test/tests/failure_tests/2D_bond_status_convergence_BPD.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = PeridynamicsMesh
horizon_number = 3
cracks_start = '0.25 0.5 0'
cracks_end = '0.75 0.5 0'
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 8
ny = 8
[../]
[./gpd]
type = MeshGeneratorPD
input = gmg
retain_fe_mesh = false
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[AuxVariables]
[./critical_stretch]
family = MONOMIAL
order = CONSTANT
[../]
[]
[AuxKernels]
[./bond_status]
type = StretchBasedFailureCriterionPD
critical_variable = critical_stretch
variable = bond_status
[../]
[]
[ICs]
[./critical_stretch]
type = ConstantIC
variable = critical_stretch
value = 0.001
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 1003
value = 0.0
[../]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = 1002
value = 0.0
[../]
[./bottom_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 1000
function = '-0.001*t'
[../]
[./rbm_x]
type = RBMPresetOldValuePD
variable = disp_x
boundary = 999
[../]
[./rbm_y]
type = RBMPresetOldValuePD
variable = disp_y
boundary = 999
[../]
[]
[Modules/Peridynamics/Mechanics/Master]
[./all]
formulation = BOND
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2e5
poissons_ratio = 0.33
[../]
[./force_density]
type = ComputeSmallStrainConstantHorizonMaterialBPD
[../]
[]
[Postprocessors]
[./bond_status_updated_times]
type = BondStatusConvergedPostprocessorPD
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
start_time = 0
dt = 0.5
end_time = 1
fixed_point_max_its = 5
accept_on_max_fixed_point_iteration = true
custom_pp = bond_status_updated_times
custom_abs_tol = 2
disable_fixed_point_residual_norm_check = true
[]
[Outputs]
file_base = 2D_bond_status_convergence_BPD
exodus = true
[]
(modules/fluid_properties/test/tests/ics/specific_enthalpy_from_pressure_temperature/test.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
allow_renumbering = false
[]
[FluidProperties]
[fp_steam]
type = StiffenedGasFluidProperties
gamma = 1.43
cv = 1040.0
q = 2.03e6
p_inf = 0.0
q_prime = -2.3e4
k = 0.026
mu = 134.4e-7
M = 0.01801488
rho_c = 322.0
[]
[]
[AuxVariables]
[h]
[]
[p]
[]
[T]
[]
[]
[ICs]
[h_ic]
type = SpecificEnthalpyFromPressureTemperatureIC
variable = h
p = p
T = T
fp = fp_steam
[]
[p_ic]
type = ConstantIC
variable = p
value = 100e3
[]
[T_ic]
type = ConstantIC
variable = T
value = 500
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[h_test]
type = ElementalVariableValue
elementid = 0
variable = h
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
csv = true
execute_on = 'INITIAL'
[]
[Problem]
solve = false
[]
(test/tests/time_integrators/implicit-euler/ie.i)
###########################################################
# This is a simple test with a time-dependent problem
# demonstrating the use of the TimeIntegrator system.
#
# Testing a solution that is second order in space
# and first order in time
#
# @Requirement F1.30
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = ((x*x)+(y*y))-(4*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
# Test of the TimeIntegrator System
scheme = 'implicit-euler'
start_time = 0.0
num_steps = 5
dt = 0.25
[]
[Outputs]
exodus = true
[]
(modules/chemical_reactions/test/tests/desorption/mollified_langmuir_desorption.i)
# testing the entire desorption DEs with mollification
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
xmin = 0
xmax = 1
[]
[Variables]
[./pressure]
[../]
[./conc]
family = MONOMIAL
order = CONSTANT
[../]
[]
[ICs]
[./p_ic]
type = ConstantIC
variable = pressure
value = 1.0
[../]
[./conc_ic]
type = ConstantIC
variable = conc
value = 1.0
[../]
[]
[Kernels]
[./c_dot]
type = TimeDerivative
variable = conc
[../]
[./flow_from_matrix]
type = DesorptionFromMatrix
variable = conc
pressure_var = pressure
[../]
[./rho_dot]
type = TimeDerivative
variable = pressure
[../]
[./flux_to_porespace]
type = DesorptionToPorespace
variable = pressure
conc_var = conc
[../]
[]
[Postprocessors]
[./mass_rho]
type = ElementIntegralVariablePostprocessor
block = 0
variable = pressure
execute_on = 'initial timestep_end'
[../]
[./mass_conc]
type = ElementIntegralVariablePostprocessor
block = 0
variable = conc
execute_on = 'initial timestep_end'
[../]
[./mass_tot]
type = FunctionValuePostprocessor
function = mass_fcn
execute_on = 'initial timestep_end'
[../]
[./p0]
type = PointValue
variable = pressure
point = '0 0 0'
execute_on = 'initial timestep_end'
[../]
[./c0]
type = PointValue
variable = conc
point = '0 0 0'
execute_on = 'initial timestep_end'
[../]
[]
[Functions]
[./mass_fcn]
type = ParsedFunction
expression = a+b
symbol_names = 'a b'
symbol_values = 'mass_rho mass_conc'
[../]
[]
[Materials]
[./lang_stuff]
type = MollifiedLangmuirMaterial
block = 0
one_over_desorption_time_const = 0.90909091
one_over_adsorption_time_const = 0.90909091
langmuir_density = 0.88
langmuir_pressure = 1.23
pressure_var = pressure
conc_var = conc
mollifier = 1E-4
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
#petsc_options = '-snes_test_display'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.01
end_time = 2
[]
[Outputs]
file_base = mollified_langmuir_desorption
time_step_interval = 10
csv = 10
[] # Outputs
(test/tests/ics/dependency/test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
[]
[AuxVariables]
[./a]
[../]
[./b]
[../]
[]
[Variables]
[./u]
[../]
[./v]
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
variable = u
value = -1
[../]
[./v_ic]
type = MTICSum
variable = v
var1 = u
var2 = a
[../]
[./a_ic]
type = ConstantIC
variable = a
value = 10
[../]
[./b_ic]
type = MTICMult
variable = b
var1 = v
factor = 2
[../]
[]
[AuxKernels]
[./a_ak]
type = ConstantAux
variable = a
value = 256
[../]
[./b_ak]
type = ConstantAux
variable = b
value = 42
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
[./left_u]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left_v]
type = DirichletBC
variable = v
boundary = left
value = 2
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = right
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_rel_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(test/tests/time_integrators/implicit-euler/ie_adapt.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 4
ny = 4
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.25
[./Adaptivity]
refine_fraction = 0.2
coarsen_fraction = 0.3
max_h_level = 4
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/contact/test/tests/fieldsplit/frictionless_mortar_FS.i)
offset = 0.021
vy = 0.15
vx = 0.04
refine = 1
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
[original_file_mesh]
type = FileMeshGenerator
file = long_short_blocks.e
[]
uniform_refine = ${refine}
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
use_automatic_differentiation = true
[]
[]
[Functions]
[horizontal_movement]
type = ParsedFunction
value = 'if(t<0.5,${vx}*t-${offset},${vx}-${offset})'
[]
[vertical_movement]
type = ParsedFunction
value = 'if(t<0.5,${offset},${vy}*(t-0.5)+${offset})'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 30
function = horizontal_movement
preset = false
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = '40'
value = 0.0
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = '30'
function = vertical_movement
preset = false
[]
[]
[Materials]
[elasticity_tensor_left]
type = ADComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_left]
type = ADComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ADComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_right]
type = ADComputeFiniteStrainElasticStress
block = 2
[]
[]
[Contact]
[leftright]
secondary = 10
primary = 20
model = frictionless
formulation = mortar
c_normal = 1e6
[]
[]
[ICs]
[disp_y]
block = 1
variable = disp_y
value = ${offset}
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = -${offset}
type = ConstantIC
[]
[]
[Preconditioning]
[FSP]
type = FSP
topsplit = 'contact_interior'
[contact_interior]
splitting = 'interior contact'
splitting_type = schur
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart -pc_fieldsplit_schur_fact_type -mat_mffd_err'
petsc_options_value = '200 full 1e-5'
schur_pre = 'S'
[]
[interior]
vars = 'disp_x disp_y'
petsc_options_iname = '-ksp_type -pc_type -pc_hypre_type '
petsc_options_value = 'gmres hypre boomeramg'
[]
[contact]
vars = 'leftright_normal_lm'
[]
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
end_time = 1
abort_on_solve_fail = true
l_max_its = 200
nl_abs_tol = 1e-8
line_search = 'none'
nl_max_its = 20
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[lin]
type = NumLinearIterations
outputs = 'console'
[]
[cum]
type = CumulativeValuePostprocessor
postprocessor = 'lin'
outputs = 'console'
[]
[]
(modules/solid_mechanics/test/tests/action/composite_eigenstrain.i)
# The primary purpose of this test is to verify that the ability to combine
# multiple eigenstrains works correctly. It should behave identically to the
# constant_expansion_coeff.i model in the thermal_expansion directory. Instead
# of having the eigenstrain names passed directly to the SolidMechanics QuasiStatic Physics,
# the QuasiStatic Physics should be able to extract the necessary eigenstrains and apply
# to their respective blocks without reduncacy.
# This test involves only thermal expansion strains on a 2x2x2 cube of approximate
# steel material. An initial temperature of 25 degrees C is given for the material,
# and an auxkernel is used to calculate the temperature in the entire cube to
# raise the temperature each time step. After the first timestep,in which the
# temperature jumps, the temperature increases by 6.25C each timestep.
# The thermal strain increment should therefore be
# 6.25 C * 1.3e-5 1/C = 8.125e-5 m/m.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./temp]
[../]
[./c]
[../]
[]
[Problem]
solve = false
[]
[ICs]
[./InitialCondition]
type = ConstantIC
value = 1
variable = c
[../]
[]
[Functions]
[./temperature_load]
type = ParsedFunction
expression = t*(500.0)+300.0
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./solid]
strain = SMALL
incremental = true
add_variables = true
automatic_eigenstrain_names = true
generate_output = 'strain_xx strain_yy strain_zz'
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = temperature_load
[../]
[]
[BCs]
[./x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./z_bot]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain1]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 298
thermal_expansion_coeff = 1.0e-5
temperature = temp
eigenstrain_name = eigenstrain1
[../]
[./thermal_expansion_strain2]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 298
thermal_expansion_coeff = 0.3e-5
temperature = temp
eigenstrain_name = eigenstrain2
[../]
[./composite]
type = CompositeEigenstrain
tensors = ' eigenstrain1 eigenstrain2'
weights = 'weight1 weight2'
eigenstrain_name = 'eigenstrain'
coupled_variables = c
[../]
[./weights]
type = GenericConstantMaterial
prop_names = 'weight1 weight2'
prop_values = '1.0 1.0'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
end_time = 0.075
dt = 0.0125
dtmin = 0.0001
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Postprocessors]
[./strain_xx]
type = ElementAverageValue
variable = strain_xx
block = 0
[../]
[./strain_yy]
type = ElementAverageValue
variable = strain_yy
block = 0
[../]
[./strain_zz]
type = ElementAverageValue
variable = strain_zz
block = 0
[../]
[./temperature]
type = AverageNodalVariableValue
variable = temp
block = 0
[../]
[]
(modules/porous_flow/test/tests/desorption/desorption01.i)
# Illustrates desorption works as planned.
#
# A mesh contains 3 elements in arranged in a line.
# The central element contains desorped fluid.
# This desorps to the nodes of that element.
#
# In the central element, of volume V, the following occurs.
# The initial porepressure=1, and concentration=1.
# The initial mass of fluid is
# V * (2 * porosity * density + (1 - porosity) * concentration)
# = V * 1.289547
# Notice the factor of "2" in the porespace contribution:
# it is because the porepressure is evaluated at nodes, so
# the nodes on the exterior of the centre_block have
# nodal-volume contributions from the elements not in centre_block.
#
# The mass-conservation equation reads
# 2 * porosity * density + (1 - porosity) * concentration = 1.289547
# and the desorption equation reads
# d( (1-porosity)C )/dt = - (1/tau)(C - dens_L * P / (P_L + P))
# where C = concentration, P = porepressure, P_L = Langmuir pressure
# dens_L = Langmuir density, tau = time constant.
# Using the mass-conservation equation in the desorption equation
# yields a nonlinear equation of P. For dt=1, and the numerical values
# given below this yields
# P = 1.83697
# and
# C = 0.676616
# The desired result is achieved by MOOSE
[Mesh]
type = FileMesh
file = three_eles.e
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[conc]
family = MONOMIAL
order = CONSTANT
block = centre_block
[]
[]
[ICs]
[p_ic]
type = ConstantIC
variable = pp
value = 1.0
[]
[conc_ic]
type = ConstantIC
variable = conc
value = 1.0
block = centre_block
[]
[]
[Kernels]
[porespace_mass_dot]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[desorped_mass_dot]
type = PorousFlowDesorpedMassTimeDerivative
block = centre_block
conc_var = conc
variable = pp
[]
[desorped_mass_dot_conc_var]
type = PorousFlowDesorpedMassTimeDerivative
block = centre_block
conc_var = conc
variable = conc
[]
[flow_from_matrix]
type = DesorptionFromMatrix
block = centre_block
variable = conc
pressure_var = pp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp conc'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.5
viscosity = 1
density0 = 1
thermal_expansion = 0
[]
[]
[Materials]
[lang_stuff]
type = LangmuirMaterial
block = centre_block
one_over_adsorption_time_const = 10.0
one_over_desorption_time_const = 10.0
langmuir_density = 1
langmuir_pressure = 1
pressure_var = pp
conc_var = conc
[]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/dispersion/disp01_fv.i)
# Test dispersive part of FVPorousFlowDispersiveFlux kernel by setting diffusion
# coefficients to zero. A pressure gradient is applied over the mesh to give a
# uniform velocity. Gravity is set to zero.
# Mass fraction is set to 1 on the left hand side and 0 on the right hand side.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
xmax = 10
bias_x = 1.1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[pp]
type = MooseVariableFVReal
[]
[massfrac0]
type = MooseVariableFVReal
[]
[]
[AuxVariables]
[velocity]
family = MONOMIAL
order = FIRST
[]
[]
[AuxKernels]
[velocity]
type = ADPorousFlowDarcyVelocityComponent
variable = velocity
component = x
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = pic
[]
[massfrac0]
type = ConstantIC
variable = massfrac0
value = 0
[]
[]
[Functions]
[pic]
type = ParsedFunction
expression = '1.1e5-x*1e3'
[]
[]
[FVBCs]
[xleft]
type = FVDirichletBC
value = 1
variable = massfrac0
boundary = left
[]
[xright]
type = FVDirichletBC
value = 0
variable = massfrac0
boundary = right
[]
[pright]
type = FVDirichletBC
variable = pp
boundary = right
value = 1e5
[]
[pleft]
type = FVDirichletBC
variable = pp
boundary = left
value = 1.1e5
[]
[]
[FVKernels]
[mass0]
type = FVPorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[adv0]
type = FVPorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
[]
[diff0]
type = FVPorousFlowDispersiveFlux
variable = pp
disp_trans = 0
disp_long = 0.2
[]
[mass1]
type = FVPorousFlowMassTimeDerivative
fluid_component = 1
variable = massfrac0
[]
[adv1]
type = FVPorousFlowAdvectiveFlux
fluid_component = 1
variable = massfrac0
[]
[diff1]
type = FVPorousFlowDispersiveFlux
fluid_component = 1
variable = massfrac0
disp_trans = 0
disp_long = 0.2
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1e9
density0 = 1000
viscosity = 0.001
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = ADPorousFlowTemperature
[]
[ppss]
type = ADPorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = ADPorousFlowMassFraction
mass_fraction_vars = massfrac0
[]
[simple_fluid]
type = ADPorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[poro]
type = ADPorousFlowPorosityConst
porosity = 0.3
[]
[diff]
type = ADPorousFlowDiffusivityConst
diffusion_coeff = '0 0'
tortuosity = 0.1
[]
[relp]
type = ADPorousFlowRelativePermeabilityConst
phase = 0
[]
[permeability]
type = ADPorousFlowPermeabilityConst
permeability = '1e-9 0 0 0 1e-9 0 0 0 1e-9'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'gmres asm lu NONZERO'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 3e2
dtmax = 100
nl_abs_tol = 1e-12
[TimeStepper]
type = IterationAdaptiveDT
growth_factor = 2
cutback_factor = 0.5
dt = 10
[]
[]
[VectorPostprocessors]
[xmass]
type = ElementValueSampler
sort_by = id
variable = 'massfrac0 velocity'
[]
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(modules/functional_expansion_tools/examples/2D_volumetric_Cartesian/main.i)
# Basic example coupling a master and sub app in a 2D Cartesian volume.
#
# The master app provides field values to the sub app via Functional Expansions, which then performs
# its calculations. The sub app's solution field values are then transferred back to the master app
# and coupled into the solution of the master app solution.
#
# This example couples Functional Expansions via AuxVariable.
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0.0
xmax = 10.0
nx = 15
ymin = 1.0
ymax = 11.0
ny = 25
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'top bottom left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3 4'
physical_bounds = '0.0 10.0 1.0 11.0'
x = Legendre
y = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
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
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(test/tests/tag/2d_diffusion_dg_tag.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[AuxVariables]
[./tag_variable1]
order = FIRST
family = MONOMIAL
[../]
[./tag_variable2]
order = FIRST
family = MONOMIAL
[../]
[]
[AuxKernels]
[./TagVectorAux1]
type = TagVectorAux
variable = tag_variable1
v = u
vector_tag = vec_tag2
execute_on = timestep_end
[../]
[./TagVectorAux2]
type = TagMatrixAux
variable = tag_variable2
v = u
matrix_tag = mat_tag2
execute_on = timestep_end
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[../]
[./exact_fn]
type = ParsedGradFunction
value = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1 vec_tag2'
[../]
[./abs]
type = Reaction
variable = u
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1 vec_tag2'
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1'
[../]
[]
[DGKernels]
[./dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1 vec_tag2'
[../]
[]
[BCs]
[./all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1 vec_tag2'
[../]
[]
[Problem]
type = TagTestProblem
test_tag_vectors = 'nontime residual vec_tag1 vec_tag2'
test_tag_matrices = 'mat_tag1 mat_tag2'
extra_tag_matrices = 'mat_tag1 mat_tag2'
extra_tag_vectors = 'vec_tag1 vec_tag2'
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_rel_tol = 1e-10
[]
[Postprocessors]
[./h]
type = AverageElementSize
[../]
[./dofs]
type = NumDOFs
[../]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-vel.i)
starting_point = 2e-1
offset = -0.19
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[normal_lm]
block = 3
use_dual = true
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_yy'
strain = FINITE
block = '1 2'
zeta = 1.0
alpha = 0.0
[]
[inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[strain]
type = ComputeFiniteStrain
block = '1 2'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '7750'
[]
[]
[AuxVariables]
[gap_vel]
block = '3'
[]
[vel_x]
block = '1 2'
[]
[accel_x]
block = '1 2'
[]
[vel_y]
block = '1 2'
[]
[accel_y]
block = '1 2'
[]
[vel_z]
block = '1 2'
[]
[accel_z]
block = '1 2'
[]
[]
[AuxKernels]
[gap_vel]
type = WeightedGapVelAux
variable = gap_vel
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
disp_x = disp_x
disp_y = disp_y
correct_edge_dropping = true
execute_on = 'TIMESTEP_END'
[]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable = normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeDynamicWeightedGapLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
c = 1e4
capture_tolerance = 1.0e-5
newmark_beta = 0.25
newmark_gamma = 0.5
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 0.1
dt = 0.05
dtmin = 0.05
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err '
petsc_options_value = 'lu superlu_dist NONZERO 1e-15 1e-5'
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = false
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(test/tests/postprocessors/function_sideintegral/function_sideintegral.i)
# calculates the integral of various functions over
# boundaries of the mesh. See [Postprocessors] for
# a description of the functions
[Mesh]
type = GeneratedMesh
dim = 3
nx = 5
ny = 5
nz = 5
xmin = -1
xmax = 1
ymin = -2
ymax = 2
zmin = 0
zmax = 6
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[ICs]
[./u]
type = ConstantIC
variable = u
value = 0
[../]
[]
[Postprocessors]
[./zmin]
# no function is provided, so it should default to 1
# yielding postprocessor = 8
type = FunctionSideIntegral
boundary = back
[../]
[./zmax]
# result should be -6*area_of_zmax_sideset = -48
type = FunctionSideIntegral
boundary = front
function = '-z'
[../]
[./ymin]
# since the integrand is odd in x, the result should be zero
type = FunctionSideIntegral
boundary = bottom
function = 'x*pow(z,4)'
[../]
[./ymax]
# result should be 24
type = FunctionSideIntegral
boundary = top
function = 'y*(1+x)*(z-2)'
[../]
[./xmin_and_xmax]
# here the integral is over two sidesets
# result should be 432
type = FunctionSideIntegral
boundary = 'left right'
function = '(3+x)*z'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
execute_on = 'timestep_end'
file_base = function_sideintegral
[./csv]
type = CSV
[../]
[]
(python/peacock/tests/common/oversample.i)
###########################################################
# This is a simple test with a time-dependent problem
# demonstrating the use of a "Transient" Executioner.
#
# @Requirement F1.10
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./dt]
type = TimestepSize
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
# Preconditioned JFNK (default)
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_transient
exodus = true
[./refine_2]
type = Exodus
file_base = oversample_2
refinements = 2
[../]
[]
(test/tests/postprocessors/element_time_derivative/el_time_deriv_1d_test.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -5
xmax = 5
ymin = -1
nx = 5
elem_type = EDGE
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = t*x+1
[../]
[]
[Kernels]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[./diffusion]
type = Diffusion
variable = u
[../]
[./timeDer]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./all]
type = DirichletBC
variable = u
boundary = '0 1'
value = 0
[../]
[]
[Postprocessors]
[./elementAvgTimeDerivative]
type = ElementAverageTimeDerivative
variable = u
[../]
[./elementAvgValue]
type = ElementAverageValue
variable = u
[../]
[]
[Executioner]
type = Transient
scheme = implicit-euler
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_el_time_deriv_1d
csv = true
[]
(test/tests/dgkernels/2d_diffusion_dg/2d_diffusion_dg_test.i)
###########################################################
# This is a test of the Discontinuous Galerkin System.
# Discontinous basis functions are used (Monomials) and
# a Laplacian DGKernel contributes to the
# internal edges around each element. Jumps are allowed
# but penalized by this method.
#
# @Requirement F3.60
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
# xmin = -1
# xmax = 1
# ymin = -1
# ymax = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
active = 'u'
[u]
order = FIRST
family = MONOMIAL
[InitialCondition]
type = ConstantIC
value = 1
[]
[]
[]
[Functions]
active = 'forcing_fn exact_fn'
[forcing_fn]
type = ParsedFunction
# function = -4.0+(x*x)+(y*y)
# function = x
# function = (x*x)-2.0
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
# function = (x*x*x)-6.0*x
[]
[exact_fn]
type = ParsedGradFunction
# function = x
# grad_x = 1
# grad_y = 0
# function = (x*x)+(y*y)
# grad_x = 2*x
# grad_y = 2*y
# function = (x*x)
# grad_x = 2*x
# grad_y = 0
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
# function = (x*x*x)
# grad_x = 3*x*x
# grad_y = 0
[]
[]
[Kernels]
active = 'diff abs forcing'
[diff]
type = Diffusion
variable = u
[]
[abs] # u * v
type = Reaction
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[DGKernels]
active = 'dg_diff'
[dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[]
[]
[BCs]
active = 'all'
[all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
# petsc_options = '-snes_mf'
# petsc_options_iname = '-pc_type -pc_hypre_type'
# petsc_options_value = 'hypre boomeramg'
# petsc_options = '-snes_mf'
# max_r_steps = 2
[Adaptivity]
steps = 2
refine_fraction = 1.0
coarsen_fraction = 0
max_h_level = 8
[]
nl_rel_tol = 1e-10
# nl_rel_tol = 1e-12
[]
[Postprocessors]
active = 'h dofs l2_err'
[h]
type = AverageElementSize
[]
[dofs]
type = NumDOFs
[]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[]
[]
[Outputs]
file_base = out
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_split.i)
[GlobalParams]
gravity = '0 0 0'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 40
ny = 40
elem_type = QUAD4
[]
[./corner_node]
type = ExtraNodesetGenerator
boundary = 99
nodes = '0'
input = gen
[../]
[]
[Variables]
# x-velocity
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0.0
[../]
[../]
# y-velocity
[./v]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0.0
[../]
[../]
# x-acceleration
[./a1]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0.0
[../]
[../]
# y-acceleration
[./a2]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0.0
[../]
[../]
# Pressure
[./p]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Kernels]
# split-momentum, x
[./x_split_momentum]
type = INSSplitMomentum
variable = a1
u = u
v = v
a1 = a1
a2 = a2
component = 0
[../]
# split-momentum, y
[./y_split_momentum]
type = INSSplitMomentum
variable = a2
u = u
v = v
a1 = a1
a2 = a2
component = 1
[../]
# projection-x, space
[./x_proj_space]
type = INSProjection
variable = u
a1 = a1
a2 = a2
pressure = p
component = 0
[../]
# projection-y, space
[./y_proj_space]
type = INSProjection
variable = v
a1 = a1
a2 = a2
pressure = p
component = 1
[../]
# projection-x, time
[./x_proj_time]
type = TimeDerivative
variable = u
[../]
# projection-y, time
[./y_proj_time]
type = TimeDerivative
variable = v
[../]
# Pressure
[./pressure_poisson]
type = INSPressurePoisson
variable = p
a1 = a1
a2 = a2
[../]
[]
[BCs]
[./x_no_slip]
type = DirichletBC
variable = u
boundary = 'bottom right left'
value = 0.0
[../]
[./lid]
type = DirichletBC
variable = u
boundary = 'top'
value = 100.0
[../]
[./y_no_slip]
type = DirichletBC
variable = v
boundary = 'bottom right top left'
value = 0.0
[../]
# Acceleration boundary conditions. What should these
# be on the lid? What should they be in general? I tried pinning
# values of acceleration at one node but that didn't seem to work.
# I also tried setting non-zero acceleration values on the lid but
# that didn't converge.
[./x_no_accel]
type = DirichletBC
variable = a1
boundary = 'bottom right top left'
value = 0.0
[../]
[./y_no_accel]
type = DirichletBC
variable = a2
boundary = 'bottom right top left'
value = 0.0
[../]
# With solid walls everywhere, we specify dp/dn=0, i.e the
# "natural BC" for pressure. Technically the problem still
# solves without pinning the pressure somewhere, but the pressure
# bounces around a lot during the solve, possibly because of
# the addition of arbitrary constants.
[./pressure_pin]
type = DirichletBC
variable = p
boundary = '99'
value = 0
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
# rho = 1000 # kg/m^3
# mu = 0.798e-3 # Pa-s at 30C
# cp = 4.179e3 # J/kg-K at 30C
# k = 0.58 # W/m-K at ?C
# Dummy parameters
prop_names = 'rho mu cp k'
prop_values = '1 1 1 1'
[../]
[]
[Preconditioning]
# [./FDP_Newton]
# type = FDP
# full = true
# petsc_options = '-snes'
# #petsc_options_iname = '-mat_fd_coloring_err'
# #petsc_options_value = '1.e-10'
# [../]
[./SMP_PJFNK]
type = SMP
full = true
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
[../]
[]
[Executioner]
type = Transient
dt = 1.e-4
dtmin = 1.e-6
petsc_options_iname = '-ksp_gmres_restart '
petsc_options_value = '300 '
line_search = 'none'
nl_rel_tol = 1e-5
nl_max_its = 6
l_tol = 1e-6
l_max_its = 100
start_time = 0.0
num_steps = 1000
[]
[Outputs]
file_base = lid_driven_split_out
exodus = true
[]
(test/tests/auxkernels/constant_scalar_aux/constant_scalar_aux.i)
#
# Testing a solution that is second order in space and first order in time
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[AuxVariables]
[./x]
family = SCALAR
order = FIRST
[../]
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[ICs]
[./ic_x]
type = ScalarConstantIC
variable = x
value = 11
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = ((x*x)+(y*y))-(4*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[]
[AuxScalarKernels]
[./const_x]
type = ConstantScalarAux
variable = x
value = 11
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.25
# [./Adaptivity]
# refine_fraction = 0.2
# coarsen_fraction = 0.3
# max_h_level = 4
# [../]
[]
[Outputs]
exodus = true
[]
(test/tests/ics/boundary_ic/boundary_ic.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 4
ny = 4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
variable = u
block = 0
value = -1
[../]
[./u_ic_bnd]
type = ConstantIC
variable = u
boundary = 'left right'
value = -2
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/pdass_problems/frictional_bouncing_block.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
uniform_refine = 0 # 1,2
patch_update_strategy = always
allow_renumbering = false
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[frictional_normal_lm]
block = 3
use_dual = true
[]
[frictional_tangential_lm]
block = 3
use_dual = true
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
generate_output = 'stress_xx stress_yy'
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e3
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable_normal = frictional_normal_lm
lm_variable_tangential_one = frictional_tangential_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeFrictionalForceLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
friction_lm = frictional_tangential_lm
mu = 0.4
c = 1.0e1
c_t = 1.0e1
weighted_gap_uo = weighted_vel_uo
weighted_velocities_uo = weighted_vel_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = '40'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = '40'
value = 0.0
[]
[topy]
type = ADFunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 20 * t) + ${offset}'
preset = false
[]
[leftx]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 30
function = '2e-2 * t'
# function = '0'
preset = false
[]
[]
[Executioner]
type = Transient
end_time = 7 # 70
dt = 0.25 # 0.1 for finer meshes (uniform_refine)
dtmin = .01
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 40
line_search = 'none'
snesmf_reuse_base = false
nl_abs_tol = 1e-9
nl_rel_tol = 1e-9
l_tol = 1e-07 # Tightening l_tol can help with friction
[]
[Debug]
show_var_residual_norms = true
[]
[VectorPostprocessors]
[cont_press]
type = NodalValueSampler
variable = frictional_normal_lm
boundary = '10'
sort_by = x
execute_on = FINAL
[]
[friction]
type = NodalValueSampler
variable = frictional_tangential_lm
boundary = '10'
sort_by = x
execute_on = FINAL
[]
[]
[Outputs]
exodus = false
[checkfile]
type = CSV
show = 'cont_press friction'
start_time = 0.0
execute_vector_postprocessors_on = FINAL
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative_nli contact cumulative_li num_l'
[num_nl]
type = NumNonlinearIterations
[]
[num_l]
type = NumLinearIterations
[]
[cumulative_nli]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[cumulative_li]
type = CumulativeValuePostprocessor
postprocessor = num_l
[]
[contact]
type = ContactDOFSetSize
variable = frictional_normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/solid_mechanics/test/tests/umat/temperature/elastic_dtemperature.i)
# Testing the UMAT Interface - linear elastic model using the large strain formulation.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[]
[Functions]
[top_pull]
type = ParsedFunction
expression = t/100
[]
# Forced evolution of temperature
[temperature_load]
type = ParsedFunction
expression = '273 + 10*t'
[]
# Factor to multiply the elasticity tensor in MOOSE
[elasticity_prefactor]
type = ParsedFunction
expression = '273/(273 + 10*t + 10)'
[]
[]
[AuxVariables]
[temperature]
[]
[]
[AuxKernels]
[temperature_function]
type = FunctionAux
variable = temperature
function = temperature_load
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
generate_output = 'stress_yy'
[]
[]
[ICs]
[ic_temperature]
type = ConstantIC
value = 273
variable = temperature
[]
[]
[BCs]
[y_pull_function]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = top_pull
[]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[z_bot]
type = DirichletBC
variable = disp_z
boundary = front
value = 0.0
[]
[]
[Materials]
# This input file is used to compare the MOOSE and UMAT models, activating
# specific ones with cli variable_names.
# 1. Active for umat calculation
[umat]
type = AbaqusUMATStress
constant_properties = '1000 0.3'
plugin = '../../../plugins/elastic_dtemperature'
num_state_vars = 0
temperature = temperature
use_one_based_indexing = true
[]
# 2. Active for reference MOOSE computations
[elastic]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1000
poissons_ratio = 0.3
elasticity_tensor_prefactor = 'elasticity_prefactor'
[]
[stress]
type = ComputeFiniteStrainElasticStress
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
num_steps = 30
dt = 1.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(modules/peridynamics/test/tests/failure_tests/2D_singular_shape_tensor_H1NOSPD.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = PeridynamicsMesh
horizon_number = 3
cracks_start = '0.25 0.5 0'
cracks_end = '0.75 0.5 0'
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 8
ny = 8
[../]
[./gpd]
type = MeshGeneratorPD
input = gmg
retain_fe_mesh = false
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[AuxVariables]
[./critical_stress]
family = MONOMIAL
order = CONSTANT
[../]
[]
[AuxKernels]
[./bond_status]
type = RankTwoBasedFailureCriteriaNOSPD
variable = bond_status
rank_two_tensor = stress
critical_variable = critical_stress
failure_criterion = VonMisesStress
[../]
[]
[UserObjects]
[./singular_shape_tensor]
type = SingularShapeTensorEliminatorUserObjectPD
[../]
[]
[ICs]
[./critical_stretch]
type = ConstantIC
variable = critical_stress
value = 150
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 1003
value = 0.0
[../]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = 1002
value = 0.0
[../]
[./bottom_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 1000
function = '-0.002*t'
[../]
[./rbm_x]
type = RBMPresetOldValuePD
variable = disp_x
boundary = 999
[../]
[./rbm_y]
type = RBMPresetOldValuePD
variable = disp_y
boundary = 999
[../]
[]
[Modules/Peridynamics/Mechanics/Master]
[./all]
formulation = NONORDINARY_STATE
stabilization = BOND_HORIZON_I
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2e5
poissons_ratio = 0.33
[../]
[./strain]
type = ComputeSmallStrainNOSPD
stabilization = BOND_HORIZON_I
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
start_time = 0
dt = 1
end_time = 1
[./Quadrature]
type = GAUSS_LOBATTO
order = FIRST
[../]
[]
[Outputs]
file_base = 2D_singular_shape_tensor_H1NOSPD
exodus = true
[]
(modules/xfem/test/tests/moving_interface/verification/2D_xy_lsdep1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: 2D
# Coordinate System: xy
# Material Numbers/Types: level set dep 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# Transient 2D heat transfer problem in Cartesian coordinates designed with
# the Method of Manufactured Solutions. This problem was developed to verify
# XFEM performance on linear elements in the presence of a moving interface
# sweeping across the x-y coordinates of a system with thermal conductivity
# dependent upon the transient level set function. This problem can be
# exactly evaluated by FEM/Moose without the moving interface. Both the
# temperature and level set function are designed to be linear to attempt to
# minimize the error between the Moose/exact solution and XFEM results.
# Results:
# The temperature at the bottom left boundary (x=0, y=0) exhibits the largest
# difference between the FEM/Moose solution and XFEM results. We present the
# XFEM results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 479.9998738
# 0.6 520 519.9995114
# 0.8 560 559.9989360
# 1.0 600 599.9983833
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraints]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-100*x-100*y+200)-(5*t/1.04)'
[../]
[./neumann_func]
type = ParsedFunction
expression = '((0.01/1.04)*(-2.5*x-2.5*y-t)+1.55)*100*t'
[../]
[./dirichlet_right_func]
type = ParsedFunction
expression = '(-100*y+100)*t+400'
[../]
[./dirichlet_top_func]
type = ParsedFunction
expression = '(-100*x+100)*t+400'
[../]
[./k_func]
type = ParsedFunction
expression = '(0.01/1.04)*(-2.5*x-2.5*y-t)+1.55'
[../]
[./ls_func]
type = ParsedFunction
expression = '-0.5*(x+y) + 1.04 -0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericFunctionMaterial
prop_names = 'diffusion_coefficient'
prop_values = 'k_func'
[../]
[]
[BCs]
[./left_du]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = FunctionDirichletBC
variable = u
boundary = 'right'
function = dirichlet_right_func
[../]
[./bottom_du]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = neumann_func
[../]
[./top_u]
type = FunctionDirichletBC
variable = u
boundary = 'top'
function = dirichlet_top_func
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/time_integrators/convergence/explicit_convergence.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 4
ny = 4
elem_type = QUAD9
[]
[Variables]
active = 'u'
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[./forcing_fn]
type = ParsedFunction
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
implicit = false
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
implicit = false
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
# We are solving only mass matrices in this problem. The Jacobi
# preconditioner is a bit faster than ILU or AMG for this.
petsc_options_iname = '-pc_type'
petsc_options_value = 'jacobi'
start_time = 0.0
end_time = 0.03125
dt = 0.00390625
[./TimeIntegrator]
type = Heun
[../]
# For explicit methods, we use the LINEAR solve type.
solve_type = 'LINEAR'
l_tol = 1e-13
[]
[Outputs]
execute_on = 'initial timestep_end'
exodus = true
[]
(modules/functional_expansion_tools/examples/3D_volumetric_Cartesian/main.i)
# Basic example coupling a master and sub app in a 3D Cartesian volume.
#
# The master app provides field values to the sub app via Functional Expansions, which then performs
# its calculations. The sub app's solution field values are then transferred back to the master app
# and coupled into the solution of the master app solution.
#
# This example couples Functional Expansions via AuxVariable.
#
# Note: this problem is not light, and may take a few minutes to solve.
[Mesh]
type = GeneratedMesh
dim = 3
xmin = 0.0
xmax = 10.0
nx = 15
ymin = 1.0
ymax = 11.0
ny = 25
zmin = 2.0
zmax = 12.0
nz = 35
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'top bottom left right front back'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3 4 5'
physical_bounds = '0.0 10.0 1.0 11.0 2.0 12.0'
x = Legendre
y = Legendre
z = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
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
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/functional_expansion_tools/test/tests/errors/multiapp_missing_local_object.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
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
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = multiapp_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(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/porous_flow/test/tests/infiltration_and_drainage/rsc01.i)
# RSC test with high-res time and spatial resolution
[Mesh]
type = GeneratedMesh
dim = 2
nx = 600
ny = 1
xmin = 0
xmax = 10 # x is the depth variable, called zeta in RSC
ymin = 0
ymax = 0.05
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Functions]
[dts]
type = PiecewiseLinear
y = '3E-3 3E-2 0.05'
x = '0 1 5'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pwater poil'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureRSC
oil_viscosity = 2E-3
scale_ratio = 2E3
shift = 10
[]
[]
[FluidProperties]
[water]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 10
thermal_expansion = 0
viscosity = 1e-3
[]
[oil]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 20
thermal_expansion = 0
viscosity = 2e-3
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = pwater
phase1_porepressure = poil
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[water]
type = PorousFlowSingleComponentFluid
fp = water
phase = 0
compute_enthalpy = false
compute_internal_energy = false
[]
[oil]
type = PorousFlowSingleComponentFluid
fp = oil
phase = 1
compute_enthalpy = false
compute_internal_energy = false
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 0
[]
[relperm_oil]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.25
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
[]
[]
[Variables]
[pwater]
[]
[poil]
[]
[]
[ICs]
[water_init]
type = ConstantIC
variable = pwater
value = 0
[]
[oil_init]
type = ConstantIC
variable = poil
value = 15
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pwater
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pwater
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = poil
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = poil
[]
[]
[AuxVariables]
[SWater]
family = MONOMIAL
order = CONSTANT
[]
[SOil]
family = MONOMIAL
order = CONSTANT
[]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[]
[AuxKernels]
[SWater]
type = MaterialStdVectorAux
property = PorousFlow_saturation_qp
index = 0
variable = SWater
[]
[SOil]
type = MaterialStdVectorAux
property = PorousFlow_saturation_qp
index = 1
variable = SOil
[]
[]
[BCs]
# we are pumping water into a system that has virtually incompressible fluids, hence the pressures rise enormously. this adversely affects convergence because of almost-overflows and precision-loss problems. The fixed things help keep pressures low and so prevent these awful behaviours. the movement of the saturation front is the same regardless of the fixed things.
active = 'recharge fixedoil fixedwater'
[recharge]
type = PorousFlowSink
variable = pwater
boundary = 'left'
flux_function = -1.0
[]
[fixedwater]
type = DirichletBC
variable = pwater
boundary = 'right'
value = 0
[]
[fixedoil]
type = DirichletBC
variable = poil
boundary = 'right'
value = 15
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options = '-snes_converged_reason -ksp_diagonal_scale -ksp_diagonal_scale_fix -ksp_gmres_modifiedgramschmidt -snes_linesearch_monitor'
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'gmres asm lu NONZERO 2 1E-10 1E-10 10000'
[]
[]
[VectorPostprocessors]
[swater]
type = LineValueSampler
warn_discontinuous_face_values = false
variable = SWater
start_point = '0 0 0'
end_point = '7 0 0'
sort_by = x
num_points = 21
execute_on = timestep_end
[]
[]
[Executioner]
type = Transient
solve_type = Newton
petsc_options = '-snes_converged_reason'
end_time = 5
[TimeStepper]
type = FunctionDT
function = dts
[]
[]
[Outputs]
file_base = rsc01
[along_line]
type = CSV
execute_vector_postprocessors_on = final
[]
[exodus]
type = Exodus
execute_on = 'initial final'
[]
[]
(modules/contact/test/tests/bouncing-block-contact/frictionless-weighted-gap-mixed-basis.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
second_order = true
patch_update_strategy = always
[]
[Variables]
[./disp_x]
block = '1 2'
order = SECOND
[../]
[./disp_y]
block = '1 2'
order = SECOND
[../]
[./normal_lm]
block = 3
[../]
[]
# [AuxVariables]
# [pid]
# order = CONSTANT
# family = MONOMIAL
# []
# []
# [AuxKernels]
# [pid]
# type = ProcessorIDAux
# variable = pid
# []
# []
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable = normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[./weighted_gap_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
c = 1
weighted_gap_uo = weighted_gap_uo
[../]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
preset = false
[../]
[./boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
preset = false
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
preset = false
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
preset = false
[../]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor -snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = false
abort_on_solve_fail = true
nl_rel_tol = 1e-12
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(test/tests/auxkernels/projection_aux/2d.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 20
elem_type = QUAD9
[]
[ICs]
active = 'constant_elem constant_nodal'
[constant_elem]
type = ConstantIC
variable = base_elem
value = 4
[]
[constant_nodal]
type = ConstantIC
variable = base_nodal
value = 3.5
[]
[linear_elem]
type = FunctionIC
variable = base_elem
function = 2+2*x-y
[]
[linear_nodal]
type = FunctionIC
variable = base_nodal
function = 3+3*x-y
[]
[cubic_elem]
type = FunctionIC
variable = base_elem
function = 2+2*x*x-3*y*y*y
[]
[cubic_nodal]
type = FunctionIC
variable = base_nodal
function = 3+3*x*x-4*y*y*y
[]
[]
[AuxVariables]
# Families:
# LAGRANGE, MONOMIAL, HERMITE, SCALAR, HIERARCHIC, CLOUGH, XYZ, SZABAB, BERNSTEIN,
# L2_LAGRANGE, L2_HIERARCHIC, RATIONAL_BERNSTEIN, SIDE_HIERARCHIC
# Notes:
# - 'elemental': MONOMIAL, XYZ, L2_LAGRANGE, L2_HIERARCHIC
# - 'nodal': LAGRANGE, HERMITE, HIERARCHIC, CLOUGH, SZABAB, BERNSTEIN, RATIONAL_BERNSTEIN
# - Clough, rational Berstein cannot be created in 2D QUAD9
# - Hermite cannot be created on 2D Tri6
# - Clough, Szabab, Hermite, hierarchic, L2_lagrange, L2_hierarchic, Bernstein cannot be created as constant
[base_elem]
family = MONOMIAL
order = CONSTANT
[]
[base_nodal]
[]
[test_elem_lagrange]
[]
[test_elem_lagrange_high]
order = SECOND
[]
[test_elem_mono]
family = MONOMIAL
order = CONSTANT
[]
[test_elem_mono_high]
family = MONOMIAL
order = SECOND
[]
[test_elem_fv]
type = MooseVariableFVReal
[]
[test_elem_hierarchic]
family = HIERARCHIC
order = FIRST
[]
[test_elem_xyz]
family = XYZ
order = CONSTANT
[]
[test_elem_xyz_high]
family = XYZ
order = SECOND
[]
[test_elem_szabab]
family = SZABAB
order = FIRST
[]
[test_elem_bernstein]
family = BERNSTEIN
order = FIRST
[]
[test_elem_l2_lagrange]
family = L2_LAGRANGE
order = FIRST
[]
[test_elem_l2_lagrange_high]
family = L2_LAGRANGE
order = SECOND
[]
[test_elem_l2_hierarchic]
family = L2_HIERARCHIC
order = FIRST
[]
[test_elem_l2_hierarchic_high]
family = L2_HIERARCHIC
order = SECOND
[]
[test_nodal_lagrange]
[]
[test_nodal_lagrange_high]
order = SECOND
[]
[test_nodal_mono]
family = MONOMIAL
order = CONSTANT
[]
[test_nodal_mono_high]
family = MONOMIAL
order = SECOND
[]
[test_nodal_fv]
type = MooseVariableFVReal
[]
[test_nodal_hierarchic]
family = HIERARCHIC
order = FIRST
[]
[test_nodal_xyz]
family = XYZ
order = CONSTANT
[]
[test_nodal_xyz_high]
family = XYZ
order = SECOND
[]
[test_nodal_szabab]
family = SZABAB
order = FIRST
[]
[test_nodal_bernstein]
family = BERNSTEIN
order = FIRST
[]
[test_nodal_l2_lagrange]
family = L2_LAGRANGE
order = FIRST
[]
[test_nodal_l2_lagrange_high]
family = L2_LAGRANGE
order = SECOND
[]
[test_nodal_l2_hierarchic]
family = L2_HIERARCHIC
order = FIRST
[]
[test_nodal_l2_hierarchic_high]
family = L2_HIERARCHIC
order = SECOND
[]
[]
[AuxKernels]
# Project from constant monomial
[base_elem_proj_lagrange]
type = ProjectionAux
variable = test_elem_lagrange
v = base_elem
[]
[base_elem_proj_lagrange_high]
type = ProjectionAux
variable = test_elem_lagrange_high
v = base_elem
[]
[base_elem_proj_mono]
type = ProjectionAux
variable = test_elem_mono
v = base_elem
[]
[base_elem_proj_mono_high]
type = ProjectionAux
variable = test_elem_mono_high
v = base_elem
[]
[base_elem_proj_fv]
type = ProjectionAux
variable = test_elem_fv
v = base_elem
[]
[base_elem_proj_hierarchic]
type = ProjectionAux
variable = test_elem_hierarchic
v = base_elem
[]
[base_elem_proj_xyz]
type = ProjectionAux
variable = test_elem_xyz
v = base_elem
[]
[base_elem_proj_xyz_high]
type = ProjectionAux
variable = test_elem_xyz_high
v = base_elem
[]
[base_elem_proj_szabab]
type = ProjectionAux
variable = test_elem_szabab
v = base_elem
[]
[base_elem_proj_bernstein]
type = ProjectionAux
variable = test_elem_bernstein
v = base_elem
[]
[base_elem_proj_l2_lagrange]
type = ProjectionAux
variable = test_elem_l2_lagrange
v = base_elem
[]
[base_elem_proj_l2_lagrange_high]
type = ProjectionAux
variable = test_elem_l2_lagrange_high
v = base_elem
[]
[base_elem_proj_l2_hierarchic]
type = ProjectionAux
variable = test_elem_l2_hierarchic
v = base_elem
[]
[base_elem_proj_l2_hierarchic_high]
type = ProjectionAux
variable = test_elem_l2_hierarchic_high
v = base_elem
[]
# Project from constant nodal
[base_nodal_proj_lagrange]
type = ProjectionAux
variable = test_nodal_lagrange
v = base_nodal
[]
[base_nodal_proj_lagrange_high]
type = ProjectionAux
variable = test_nodal_lagrange_high
v = base_nodal
[]
[base_nodal_proj_mono]
type = ProjectionAux
variable = test_nodal_mono
v = base_nodal
[]
[base_nodal_proj_mono_high]
type = ProjectionAux
variable = test_nodal_mono_high
v = base_nodal
[]
[base_nodal_proj_fv]
type = ProjectionAux
variable = test_nodal_fv
v = base_nodal
[]
[base_nodal_proj_hierarchic]
type = ProjectionAux
variable = test_nodal_hierarchic
v = base_nodal
[]
[base_nodal_proj_xyz]
type = ProjectionAux
variable = test_nodal_xyz
v = base_nodal
[]
[base_nodal_proj_xyz_high]
type = ProjectionAux
variable = test_nodal_xyz_high
v = base_nodal
[]
[base_nodal_proj_szabab]
type = ProjectionAux
variable = test_nodal_szabab
v = base_nodal
[]
[base_nodal_proj_bernstein]
type = ProjectionAux
variable = test_nodal_bernstein
v = base_nodal
[]
[base_nodal_proj_l2_lagrange]
type = ProjectionAux
variable = test_nodal_l2_lagrange
v = base_nodal
[]
[base_nodal_proj_l2_lagrange_high]
type = ProjectionAux
variable = test_nodal_l2_lagrange_high
v = base_nodal
[]
[base_nodal_proj_l2_hierarchic]
type = ProjectionAux
variable = test_nodal_l2_hierarchic
v = base_nodal
[]
[base_nodal_proj_l2_hierarchic_high]
type = ProjectionAux
variable = test_nodal_l2_hierarchic_high
v = base_nodal
[]
[]
[Postprocessors]
[base_elem_proj_lagrange]
type = ElementL2Difference
variable = test_elem_lagrange
other_variable = base_elem
[]
[base_elem_proj_lagrange_high]
type = ElementL2Difference
variable = test_elem_lagrange_high
other_variable = base_elem
[]
[base_elem_proj_mono]
type = ElementL2Difference
variable = test_elem_mono
other_variable = base_elem
[]
[base_elem_proj_mono_high]
type = ElementL2Difference
variable = test_elem_mono_high
other_variable = base_elem
[]
[base_elem_proj_fv]
type = ElementL2Difference
variable = test_elem_fv
other_variable = base_elem
[]
[base_elem_proj_hierarchic]
type = ElementL2Difference
variable = test_elem_hierarchic
other_variable = base_elem
[]
[base_elem_proj_xyz]
type = ElementL2Difference
variable = test_elem_xyz
other_variable = base_elem
[]
[base_elem_proj_xyz_high]
type = ElementL2Difference
variable = test_elem_xyz_high
other_variable = base_elem
[]
[base_elem_proj_szabab]
type = ElementL2Difference
variable = test_elem_szabab
other_variable = base_elem
[]
[base_elem_proj_bernstein]
type = ElementL2Difference
variable = test_elem_bernstein
other_variable = base_elem
[]
[base_elem_proj_l2_lagrange]
type = ElementL2Difference
variable = test_elem_l2_lagrange
other_variable = base_elem
[]
[base_elem_proj_l2_lagrange_high]
type = ElementL2Difference
variable = test_elem_l2_lagrange_high
other_variable = base_elem
[]
[base_elem_proj_l2_hierarchic]
type = ElementL2Difference
variable = test_elem_l2_hierarchic
other_variable = base_elem
[]
[base_elem_proj_l2_hierarchic_high]
type = ElementL2Difference
variable = test_elem_l2_hierarchic_high
other_variable = base_elem
[]
[base_nodal_proj_lagrange]
type = ElementL2Difference
variable = test_nodal_lagrange
other_variable = base_nodal
[]
[base_nodal_proj_lagrange_high]
type = ElementL2Difference
variable = test_nodal_lagrange_high
other_variable = base_nodal
[]
[base_nodal_proj_mono]
type = ElementL2Difference
variable = test_nodal_mono
other_variable = base_nodal
[]
[base_nodal_proj_mono_high]
type = ElementL2Difference
variable = test_nodal_mono_high
other_variable = base_nodal
[]
[base_nodal_proj_fv]
type = ElementL2Difference
variable = test_nodal_fv
other_variable = base_nodal
[]
[base_nodal_proj_hierarchic]
type = ElementL2Difference
variable = test_nodal_hierarchic
other_variable = base_nodal
[]
[base_nodal_proj_xyz]
type = ElementL2Difference
variable = test_nodal_xyz
other_variable = base_nodal
[]
[base_nodal_proj_xyz_high]
type = ElementL2Difference
variable = test_nodal_xyz_high
other_variable = base_nodal
[]
[base_nodal_proj_szabab]
type = ElementL2Difference
variable = test_nodal_szabab
other_variable = base_nodal
[]
[base_nodal_proj_bernstein]
type = ElementL2Difference
variable = test_nodal_bernstein
other_variable = base_nodal
[]
[base_nodal_proj_l2_lagrange]
type = ElementL2Difference
variable = test_nodal_l2_lagrange
other_variable = base_nodal
[]
[base_nodal_proj_l2_lagrange_high]
type = ElementL2Difference
variable = test_nodal_l2_lagrange_high
other_variable = base_nodal
[]
[base_nodal_proj_l2_hierarchic]
type = ElementL2Difference
variable = test_nodal_l2_hierarchic
other_variable = base_nodal
[]
[base_nodal_proj_l2_hierarchic_high]
type = ElementL2Difference
variable = test_nodal_l2_hierarchic_high
other_variable = base_nodal
[]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
csv = true
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
(test/tests/userobjects/postprocessor_spatial_user_object/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
[]
[Functions]
[./ic_fn]
type = ParsedFunction
expression = 'x * y'
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = FIRST
[../]
[]
[ICs]
[./u_ic]
type = FunctionIC
variable = u
function = ic_fn
[../]
[./a_ic]
type = ConstantIC
variable = a
value = 1
[../]
[]
[AuxVariables]
[./a]
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./rhs]
type = BodyForce
variable = u
function = 1
[../]
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
input_files = 'sub.i'
positions = '
0.25 0.25 0
0.75 0.75 0'
execute_on = 'initial timestep_end'
[../]
[]
[Transfers]
[./master_to_sub]
type = MultiAppNearestNodeTransfer
to_multi_app = sub
source_variable = u
variable = a
[../]
[./sub_to_master]
type = MultiAppUserObjectTransfer
from_multi_app = sub
user_object = fn_uo
variable = a
[../]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 10
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/ad_coupled_gradient_dot/diffusion_rate.i)
# Solves the problem
# -mu * Lap(u_dot) + u_dot = alpha * Lap(u) - 2*u*(1-3*u+2*u^2)
# for mu = 1 and alpha = 0.01
# (see appendix B of A. Guevel et al. "Viscous phase-field modeling for chemo-mechanical microstructural evolution: application to geomaterials and pressure solution." In print.)
n_elem = 100
alpha = 0.01
mu = 1
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 1
nx = '${n_elem}'
elem_type = EDGE2
[]
[Variables]
[u]
[InitialCondition]
type = ConstantIC
value = 0.51
[]
[]
[]
[Kernels]
[Lap]
type = ADMatDiffusion
variable = u
diffusivity = '${alpha}'
[]
[LapDot]
type = ADDiffusionRate
variable = u
mu = '${mu}'
[]
[Reac]
type = ADMatReaction
variable = u
reaction_rate = L
[]
[Visc]
type = ADTimeDerivative
variable = u
[]
[]
[Materials]
[parsed]
type = ADParsedMaterial
expression = '-2*(1-3*u+2*u*u)'
coupled_variables = 'u'
property_name = 'L'
[]
[]
[BCs]
[both]
type = ADDirichletBC
variable = u
value = 0.51
boundary = 'left right'
[]
[]
[Postprocessors]
[mid_u]
type = PointValue
variable = u
point = '0.5 0 0'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
num_steps = 1000
dt = 0.1
nl_abs_tol = 1e-9
[]
[Outputs]
print_linear_residuals = false
[csv]
type = CSV
file_base = 'diffusion_rate'
[]
[]
(modules/contact/test/tests/bouncing-block-contact/frictionless-nodal-reduced-active-set.i)
starting_point = .5
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1
[]
[Mesh]
file = square-blocks-no-offset.e
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${starting_point}
type = ConstantIC
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[Constraints]
[./disp_x]
type = RANFSNormalMechanicalContact
secondary = 10
primary = 20
variable = disp_x
primary_variable = disp_x
component = x
[../]
[./disp_y]
type = RANFSNormalMechanicalContact
secondary = 10
primary = 20
variable = disp_y
primary_variable = disp_y
component = y
[../]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
preset = false
boundary = 40
value = 0.0
[../]
[./topx]
type = DirichletBC
variable = disp_x
preset = false
boundary = 30
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
preset = false
boundary = 40
value = 0.0
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = 30
function = '${starting_point} - t'
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
dtmin = 1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -ksp_monitor_true_residual -snes_view'
petsc_options_iname = '-mat_mffd_err -pc_type -pc_hypre_type'
petsc_options_value = '1e-5 hypre boomeramg'
l_max_its = 30
nl_max_its = 20
line_search = 'project'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exo]
type = Exodus
execute_on = 'nonlinear'
[]
print_linear_residuals = false
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Postprocessors]
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[]
(modules/contact/test/tests/multiple_contact_pairs/multiple_pairs.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = multiple_pairs.e
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = true
strain = FINITE
generate_output = 'stress_xx'
[]
[]
[Materials]
[stiffStuff]
type = ComputeIsotropicElasticityTensor
block = '1 2 3'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stiffStuff_stress]
type = ComputeFiniteStrainElasticStress
block = '1 2 3'
[]
[]
[ICs]
[disp_y]
block = '2 3'
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Contact]
[action_name]
primary = '20 20'
secondary = '10 101'
penalty = 1e7
formulation = penalty
tangential_tolerance = 0.0001
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
preset = false
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
preset = false
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = '30 301'
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
preset = false
boundary = '50 501'
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 60
dt = 2.0
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
nl_abs_tol = 1e-9
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[]
[VectorPostprocessors]
[cont_press]
type = NodalValueSampler
variable = contact_pressure
boundary = '10 101'
sort_by = x
execute_on = NONLINEAR
[]
[]
(modules/porous_flow/test/tests/dirackernels/theis2.i)
# Theis problem: Flow to single sink
# Constant rate injection between 200 and 1000 s.
# Cartesian mesh with logarithmic distribution in x and y.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
bias_x = 1.1
bias_y = 1.1
ymax = 100
xmax = 100
[]
[GlobalParams]
PorousFlowDictator = dictator
compute_enthalpy = false
compute_internal_energy = false
[]
[Variables]
[pp]
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[flux]
type = PorousFlowAdvectiveFlux
variable = pp
gravity = '0 0 0'
fluid_component = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
viscosity = 0.001
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.2
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0
phase = 0
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 200
end_time = 1000
nl_abs_tol = 1e-10
[]
[Outputs]
perf_graph = true
file_base = theis2
[csv]
type = CSV
execute_on = final
[]
[]
[ICs]
[PressureIC]
variable = pp
type = ConstantIC
value = 20e6
[]
[]
[DiracKernels]
[sink]
type = PorousFlowSquarePulsePointSource
start_time = 200
end_time = 1000
point = '0 0 0'
mass_flux = -0.04
variable = pp
[]
[]
[BCs]
[right]
type = DirichletBC
variable = pp
value = 20e6
boundary = right
[]
[top]
type = DirichletBC
variable = pp
value = 20e6
boundary = top
[]
[]
[VectorPostprocessors]
[pressure]
type = SideValueSampler
variable = pp
sort_by = x
execute_on = timestep_end
boundary = bottom
[]
[]
(test/tests/executioners/executioner/transient.i)
###########################################################
# This is a simple test with a time-dependent problem
# demonstrating the use of a "Transient" Executioner.
#
# @Requirement F1.10
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./dt]
type = TimestepSize
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_transient
exodus = true
[]
(modules/richards/test/tests/gravity_head_2/gh_fu_18.i)
# with immobile saturation - this illustrates a perfect case of fullyupwind working very well
# unsaturated = true
# gravity = true
# full upwinding = true
# transient = true
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmin = 0
xmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = 'DensityWater DensityGas'
relperm_UO = 'RelPermWater RelPermGas'
SUPG_UO = 'SUPGwater SUPGgas'
sat_UO = 'SatWater SatGas'
seff_UO = 'SeffWater SeffGas'
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1E-2 1E-1 1E0 0.5E1 0.5E2 0.4E4 1E5 1E6 1E7'
x = '0 1E-1 1E0 1E1 1E2 1E3 1E4 1E5 1E6'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 1.0E2
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 0.5
bulk_mod = 0.5E2
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.4
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.3
n = 2
[../]
[./SatWater]
type = RichardsSat
s_res = 0.1
sum_s_res = 0.15
[../]
[./SatGas]
type = RichardsSat
s_res = 0.05
sum_s_res = 0.15
[../]
[./SUPGwater]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[./SUPGgas]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./water_ic]
type = ConstantIC
value = 1
variable = pwater
[../]
[./gas_ic]
type = ConstantIC
value = 2
variable = pgas
[../]
[]
[Kernels]
active = 'richardsfwater richardstwater richardsfgas richardstgas'
[./richardstwater]
type = RichardsMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFullyUpwindFlux
variable = pwater
[../]
[./richardstgas]
type = RichardsMassChange
variable = pgas
[../]
[./richardsfgas]
type = RichardsFullyUpwindFlux
variable = pgas
[../]
[]
[AuxVariables]
[./seffgas]
[../]
[./seffwater]
[../]
[]
[AuxKernels]
[./seffgas_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffGas
variable = seffgas
[../]
[./seffwater_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffWater
variable = seffwater
[../]
[]
[Postprocessors]
[./mwater_init]
type = RichardsMass
variable = pwater
execute_on = timestep_begin
outputs = none
[../]
[./mgas_init]
type = RichardsMass
variable = pgas
execute_on = timestep_begin
outputs = none
[../]
[./mwater_fin]
type = RichardsMass
variable = pwater
execute_on = timestep_end
outputs = none
[../]
[./mgas_fin]
type = RichardsMass
variable = pgas
execute_on = timestep_end
outputs = none
[../]
[./mass_error_water]
type = FunctionValuePostprocessor
function = fcn_mass_error_w
[../]
[./mass_error_gas]
type = FunctionValuePostprocessor
function = fcn_mass_error_g
[../]
[./pw_left]
type = PointValue
point = '0 0 0'
variable = pwater
outputs = none
[../]
[./pw_right]
type = PointValue
point = '1 0 0'
variable = pwater
outputs = none
[../]
[./error_water]
type = FunctionValuePostprocessor
function = fcn_error_water
[../]
[./pg_left]
type = PointValue
point = '0 0 0'
variable = pgas
outputs = none
[../]
[./pg_right]
type = PointValue
point = '1 0 0'
variable = pgas
outputs = none
[../]
[./error_gas]
type = FunctionValuePostprocessor
function = fcn_error_gas
[../]
[]
[Functions]
[./fcn_mass_error_w]
type = ParsedFunction
expression = 'abs(0.5*(mi-mf)/(mi+mf))'
symbol_names = 'mi mf'
symbol_values = 'mwater_init mwater_fin'
[../]
[./fcn_mass_error_g]
type = ParsedFunction
expression = 'abs(0.5*(mi-mf)/(mi+mf))'
symbol_names = 'mi mf'
symbol_values = 'mgas_init mgas_fin'
[../]
[./fcn_error_water]
type = ParsedFunction
expression = 'abs((-b*log(-(gdens0*xval+(-b*exp(-p0/b)))/b)-p1)/p1)'
symbol_names = 'b gdens0 p0 xval p1'
symbol_values = '1E2 -1 pw_left 1 pw_right'
[../]
[./fcn_error_gas]
type = ParsedFunction
expression = 'abs((-b*log(-(gdens0*xval+(-b*exp(-p0/b)))/b)-p1)/p1)'
symbol_names = 'b gdens0 p0 xval p1'
symbol_values = '0.5E2 -0.5 pg_left 1 pg_right'
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
viscosity = '1E-3 0.5E-3'
gravity = '-1 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = gh_fu_18
execute_on = 'timestep_end final'
time_step_interval = 100000
exodus = true
[]
(modules/porous_flow/test/tests/dirackernels/theis1.i)
# Theis problem: Flow to single sink
# SinglePhase
# Cartesian mesh with logarithmic distribution in x and y.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
bias_x = 1.1
bias_y = 1.1
ymax = 100
xmax = 100
[]
[GlobalParams]
PorousFlowDictator = dictator
compute_enthalpy = false
compute_internal_energy = false
[]
[Variables]
[pp]
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[flux]
type = PorousFlowAdvectiveFlux
variable = pp
gravity = '0 0 0'
fluid_component = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
viscosity = 0.001
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.2
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0
phase = 0
[]
[]
[Postprocessors]
[porepressure]
type = PointValue
point = '0 0 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[total_mass]
type = PorousFlowFluidMass
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 200
end_time = 1E3
nl_abs_tol = 1e-10
[]
[Outputs]
perf_graph = true
file_base = theis1
[csv]
type = CSV
execute_on = final
[]
[]
[ICs]
[PressureIC]
variable = pp
type = ConstantIC
value = 20e6
[]
[]
[DiracKernels]
[sink]
type = PorousFlowSquarePulsePointSource
end_time = 1000
point = '0 0 0'
mass_flux = -0.04
variable = pp
[]
[]
[BCs]
[right]
type = DirichletBC
variable = pp
value = 20e6
boundary = right
[]
[top]
type = DirichletBC
variable = pp
value = 20e6
boundary = top
[]
[]
[VectorPostprocessors]
[pressure]
type = SideValueSampler
variable = pp
sort_by = x
execute_on = timestep_end
boundary = bottom
[]
[]
(modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialMultiphase.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = -20
xmax = 20
ymin = -20
ymax = 20
[]
[GlobalParams]
op_num = 2
var_name_base = etab
[]
[Variables]
[./w]
[../]
[./etaa0]
[../]
[./etab0]
[../]
[./etab1]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./IC_etaa0]
type = FunctionIC
variable = etaa0
function = ic_func_etaa0
[../]
[./IC_etab0]
type = FunctionIC
variable = etab0
function = ic_func_etab0
[../]
[./IC_etab1]
type = FunctionIC
variable = etab1
function = ic_func_etab1
[../]
[./IC_w]
type = ConstantIC
value = -0.05
variable = w
[../]
[]
[Functions]
[./ic_func_etaa0]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2);0.5*(1.0-tanh((r-10.0)/sqrt(2.0)))'
[../]
[./ic_func_etab0]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2);0.5*(1.0+tanh((r-10)/sqrt(2.0)))*0.5*(1.0+tanh((y)/sqrt(2.0)))'
[../]
[./ic_func_etab1]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2);0.5*(1.0+tanh((r-10)/sqrt(2.0)))*0.5*(1.0-tanh((y)/sqrt(2.0)))'
[../]
[]
[BCs]
[]
[Kernels]
# Order parameter eta_alpha0
[./ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0 etab1'
gamma_names = 'gab gab'
[../]
[./ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etab0 etab1 w'
[../]
[./ACa0_int]
type = ACInterface
variable = etaa0
kappa_name = kappa
[../]
[./ea0_dot]
type = TimeDerivative
variable = etaa0
[../]
# Order parameter eta_beta0
[./ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etaa0 etab1'
gamma_names = 'gab gbb'
[../]
[./ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab1 w'
[../]
[./ACb0_int]
type = ACInterface
variable = etab0
kappa_name = kappa
[../]
[./eb0_dot]
type = TimeDerivative
variable = etab0
[../]
# Order parameter eta_beta1
[./ACb1_bulk]
type = ACGrGrMulti
variable = etab1
v = 'etaa0 etab0'
gamma_names = 'gab gbb'
[../]
[./ACb1_sw]
type = ACSwitching
variable = etab1
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0 w'
[../]
[./ACb1_int]
type = ACInterface
variable = etab1
kappa_name = kappa
[../]
[./eb1_dot]
type = TimeDerivative
variable = etab1
[../]
#Chemical potential
[./w_dot]
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
coupled_variables = '' # in this case chi (the susceptibility) is simply a constant
[../]
[./Diffusion]
type = MatDiffusion
variable = w
diffusivity = Dchi
args = ''
[../]
[./coupled_etaa0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0 etab1'
[../]
[./coupled_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0 etab1'
[../]
[./coupled_etab1dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab1
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0 etab1'
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[]
# enable_jit set to false in many materials to make this test start up faster.
# It is recommended to set enable_jit = true or just remove these lines for
# production runs with this model
[Materials]
[./ha]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0 etab1'
phase_etas = 'etaa0'
[../]
[./hb]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0 etab1'
phase_etas = 'etab0 etab1'
[../]
[./omegaa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
derivative_order = 2
enable_jit = false
[../]
[./omegab]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegab
material_property_names = 'Vm kb cbeq'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
derivative_order = 2
enable_jit = false
[../]
[./rhoa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
derivative_order = 2
enable_jit = false
[../]
[./rhob]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
derivative_order = 2
enable_jit = false
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'kappa_c kappa L D chi Vm ka caeq kb cbeq gab gbb mu'
prop_values = '0 1 1.0 1.0 1.0 1.0 10.0 0.1 10.0 0.9 4.5 1.5 1.0'
[../]
[./Mobility]
type = DerivativeParsedMaterial
property_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
derivative_order = 2
enable_jit = false
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 lu 1'
l_tol = 1.0e-3
nl_rel_tol = 1.0e-8
nl_abs_tol = 1e-8
num_steps = 2
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.1
[../]
[]
[Outputs]
exodus = true
[]
(modules/functional_expansion_tools/examples/3D_volumetric_cylindrical_subapp_mesh_refine/main.i)
# Derived from the example '3D_volumetric_cylindrical' with the following differences:
#
# 1) The model mesh is refined in the MasterApp by 1
# 2) Mesh adaptivity is enabled for the SubApp
# 3) Output from the SubApp is enabled so that the mesh changes can be visualized
[Mesh]
type = FileMesh
file = cyl-tet.e
uniform_refine = 1
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'top bottom outside'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = CylindricalDuo
orders = '5 3' # Axial first, then (r, t) FX
physical_bounds = '-2.5 2.5 0 0 1' # z_min z_max x_center y_center radius
z = Legendre # Axial in z
disc = Zernike # (r, t) default to unit disc in x-y plane
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
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
output_sub_cycles = true
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/porous_flow/test/tests/mass_conservation/mass05.i)
# Checking that the mass postprocessor correctly calculates the mass
# of each component in each phase, as well as the total mass of each
# component in all phases.
# 2phase, 2component, constant porosity
[Mesh]
type = GeneratedMesh
dim = 1
nx = 2
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[sat]
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
initial_condition = 0.3
[]
[massfrac_ph1_sp0]
initial_condition = 0.55
[]
[]
[ICs]
[pinit]
type = ConstantIC
value = 1
variable = pp
[]
[satinit]
type = FunctionIC
function = 1-x
variable = sat
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = sat
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp sat'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 1
thermal_expansion = 0
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 0.1
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = pp
phase1_saturation = sat
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[]
[Postprocessors]
[comp0_phase0_mass]
type = PorousFlowFluidMass
fluid_component = 0
phase = 0
[]
[comp0_phase1_mass]
type = PorousFlowFluidMass
fluid_component = 0
phase = 1
[]
[comp0_total_mass]
type = PorousFlowFluidMass
fluid_component = 0
[]
[comp0_total_mass2]
type = PorousFlowFluidMass
fluid_component = 0
phase = '0 1'
[]
[comp1_phase0_mass]
type = PorousFlowFluidMass
fluid_component = 1
phase = 0
[]
[comp1_phase1_mass]
type = PorousFlowFluidMass
fluid_component = 1
phase = 1
[]
[comp1_total_mass]
type = PorousFlowFluidMass
fluid_component = 1
[]
[comp1_total_mass2]
type = PorousFlowFluidMass
fluid_component = 1
phase = '0 1'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
nl_abs_tol = 1e-16
dt = 1
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = mass05
csv = true
[]
(modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-fretting-wear-test-projection_angle.i)
starting_point = 0.5e-1
offset = -0.045
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-1elem-blocks-multiple-projections-lowerd.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[normal_lm]
block = 3
use_dual = true
# scaling = 1.0e-5
[]
[frictional_lm]
block = 3
use_dual = true
# scaling = 1.0e-5
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_yy'
strain = FINITE
block = '1 2'
zeta = 1.0
hht_alpha = 0.0
[]
[inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[strain]
type = ComputeFiniteStrain
block = '1 2'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '7750'
[]
[]
[AuxVariables]
[worn_depth]
block = '3'
[]
[gap_vel]
block = '3'
[]
[vel_x]
block = '1 2'
[]
[accel_x]
block = '1 2'
[]
[vel_y]
block = '1 2'
[]
[accel_y]
block = '1 2'
[]
[vel_z]
block = '1 2'
[]
[accel_z]
block = '1 2'
[]
[]
[AuxKernels]
[gap_vel]
type = WeightedGapVelAux
variable = gap_vel
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
disp_x = disp_x
disp_y = disp_y
debug_mesh = true
minimum_projection_angle = 0.0
[]
[worn_depth]
type = MortarArchardsLawAux
variable = worn_depth
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
displacements = 'disp_x disp_y'
friction_coefficient = 0.5
energy_wear_coefficient = 1.0e-6
normal_pressure = normal_lm
execute_on = 'TIMESTEP_END'
debug_mesh = true
minimum_projection_angle = 0.0
[]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
secondary_variable = disp_x
lm_variable_normal = normal_lm
lm_variable_tangential_one = frictional_lm
disp_x = disp_x
disp_y = disp_y
debug_mesh = true
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeDynamicFrictionalForceLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
wear_depth = worn_depth
c = 1e6
c_t = 1e6
normalize_c = true
mu = 0.5
friction_lm = frictional_lm
capture_tolerance = 1.0e-5
newmark_beta = 0.25
newmark_gamma = 0.5
debug_mesh = true
minimum_projection_angle = 0.0
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
minimum_projection_angle = 0.0
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
minimum_projection_angle = 0.0
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
minimum_projection_angle = 0.0
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
minimum_projection_angle = 0.0
weighted_velocities_uo = weighted_vel_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(4.0 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * (cos(32.0 * pi / 4 * t) - 1.0)'
[]
[]
[Executioner]
type = Transient
end_time = 0.0
dt = 0.05
dtmin = .002
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15'
nl_max_its = 40
l_max_its = 15
line_search = 'l2'
snesmf_reuse_base = true
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/porous_flow/test/tests/dispersion/diff01.i)
# Test diffusive part of PorousFlowDispersiveFlux kernel by setting dispersion
# coefficients to zero. Pressure is held constant over the mesh, and gravity is
# set to zero so that no advective transport of mass takes place.
# Mass fraction is set to 1 on the left hand side and 0 on the right hand side.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmax = 10
bias_x = 1.1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[pp]
[]
[massfrac0]
[]
[]
[AuxVariables]
[velocity]
family = MONOMIAL
order = FIRST
[]
[]
[AuxKernels]
[velocity]
type = PorousFlowDarcyVelocityComponent
variable = velocity
component = x
[]
[]
[ICs]
[pp]
type = ConstantIC
variable = pp
value = 1e5
[]
[massfrac0]
type = ConstantIC
variable = massfrac0
value = 0
[]
[]
[BCs]
[left]
type = DirichletBC
value = 1
variable = massfrac0
boundary = left
[]
[right]
type = DirichletBC
value = 0
variable = massfrac0
boundary = right
[]
[pright]
type = DirichletBC
variable = pp
boundary = right
value = 1e5
[]
[pleft]
type = DirichletBC
variable = pp
boundary = left
value = 1e5
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[adv0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
[]
[diff0]
type = PorousFlowDispersiveFlux
fluid_component = 0
variable = pp
disp_trans = 0
disp_long = 0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = massfrac0
[]
[adv1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = massfrac0
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = massfrac0
disp_trans = 0
disp_long = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1e7
density0 = 1000
viscosity = 0.001
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = massfrac0
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[poro]
type = PorousFlowPorosityConst
porosity = 0.3
[]
[diff]
type = PorousFlowDiffusivityConst
diffusion_coeff = '1 1'
tortuosity = 0.1
[]
[relp]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-9 0 0 0 1e-9 0 0 0 1e-9'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu NONZERO 2 '
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 1
end_time = 20
[]
[VectorPostprocessors]
[xmass]
type = NodalValueSampler
sort_by = id
variable = massfrac0
[]
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(test/tests/userobjects/mortar_user_object/displaced_test.i)
[Mesh]
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[]
[secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[]
displacements = 'disp_x disp_y'
[]
[Problem]
solve = false
[]
[UserObjects]
[weighted_gap_uo]
type = TestWeightedGapUserObject
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
weighted_gap_aux_var = "gap2"
execute_on = 'linear nonlinear timestep_end'
[]
[]
[AuxVariables]
[gap]
block = '10'
[]
[gap2]
block = '10'
[]
[disp_x]
block = 'left right'
[]
[disp_y]
block = 'left right'
[]
[]
[ICs]
[disp_x]
block = 'left'
type = ConstantIC
value = '-1e-2'
variable = disp_x
[]
[]
[AuxKernels]
[gap]
type = WeightedGapAux
variable = gap
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
use_displaced_mesh = true
[]
[gap2]
type = GetMortarGapUOValue
variable = gap2
boundary = 1
weighted_gap_uo = weighted_gap_uo
execute_on = 'linear nonlinear timestep_end'
[]
[]
[Postprocessors]
[gap]
type = ElementAverageValue
block = 10
variable = gap
execute_on = 'timestep_end'
force_postaux = true
[]
[gap2]
type = ElementAverageValue
block = 10
variable = gap2
execute_on = 'timestep_end'
force_postaux = true
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/dgkernels/3d_diffusion_dg/3d_diffusion_p_refinement.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 1
elem_type = HEX8
[]
[Variables]
[u]
order = FIRST
family = MONOMIAL
[InitialCondition]
type = ConstantIC
value = 0.5
[]
[]
[]
[Functions]
[forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[]
[exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[abs]
type = Reaction
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[DGKernels]
[dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[]
[]
[BCs]
[all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3 4 5'
function = exact_fn
epsilon = -1
sigma = 6
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[Adaptivity]
switch_h_to_p_refinement = true
steps = 2
refine_fraction = 1.0
coarsen_fraction = 0
max_h_level = 8
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = 'initial timestep_end'
[]
[dofs]
type = NumDOFs
execute_on = 'initial timestep_end'
[]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
exodus = true
[]
(modules/functional_expansion_tools/test/tests/errors/multiapp_incompatible_orders.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '36'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
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
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = multiapp_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(test/tests/postprocessors/scale_pps/scale_pps.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
[]
[Variables]
[./u]
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
variable = u
value = 2
[../]
[]
[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]
[./u_avg]
type = ElementAverageValue
variable = u
execute_on = 'initial timestep_end'
[../]
[./scaled_u]
type = ScalePostprocessor
value = u_avg
scaling_factor = 2
execute_on = 'initial timestep_end'
[../]
[./scaled_scaled_u]
type = ScalePostprocessor
value = scaled_u
scaling_factor = 2
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/examples/flow_through_fractured_media/fine_transient.i)
# Using a mixed-dimensional mesh
# Transient flow and solute transport along a fracture in a porous matrix
# advective dominated flow in the fracture and diffusion into the porous matrix
#
# Note that fine_steady.i must be run to initialise the porepressure properly
[Mesh]
file = 'gold/fine_steady_out.e'
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[pp]
initial_from_file_var = pp
initial_from_file_timestep = 1
[]
[massfrac0]
[]
[]
[AuxVariables]
[velocity_x]
family = MONOMIAL
order = CONSTANT
block = fracture
[]
[velocity_y]
family = MONOMIAL
order = CONSTANT
block = fracture
[]
[]
[AuxKernels]
[velocity_x]
type = PorousFlowDarcyVelocityComponentLowerDimensional
variable = velocity_x
component = x
aperture = 6E-4
[]
[velocity_y]
type = PorousFlowDarcyVelocityComponentLowerDimensional
variable = velocity_y
component = y
aperture = 6E-4
[]
[]
[Problem]
# massfrac0 has an initial condition despite the restart
allow_initial_conditions_with_restart = true
[]
[ICs]
[massfrac0]
type = ConstantIC
variable = massfrac0
value = 0
[]
[]
[BCs]
[top]
type = DirichletBC
value = 0
variable = massfrac0
boundary = top
[]
[bottom]
type = DirichletBC
value = 1
variable = massfrac0
boundary = bottom
[]
[ptop]
type = DirichletBC
variable = pp
boundary = top
value = 1e6
[]
[pbottom]
type = DirichletBC
variable = pp
boundary = bottom
value = 1.002e6
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[adv0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
[]
[diff0]
type = PorousFlowDispersiveFlux
fluid_component = 0
variable = pp
disp_trans = 0
disp_long = 0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = massfrac0
[]
[adv1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = massfrac0
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = massfrac0
disp_trans = 0
disp_long = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = massfrac0
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[poro_fracture]
type = PorousFlowPorosityConst
porosity = 6e-4 # = a * phif
block = 'fracture'
[]
[poro_matrix]
type = PorousFlowPorosityConst
porosity = 0.1
block = 'matrix1 matrix2'
[]
[diff1]
type = PorousFlowDiffusivityConst
diffusion_coeff = '1e-9 1e-9'
tortuosity = 1.0
block = 'fracture'
[]
[diff2]
type = PorousFlowDiffusivityConst
diffusion_coeff = '1e-9 1e-9'
tortuosity = 0.1
block = 'matrix1 matrix2'
[]
[relp]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[permeability_fracture]
type = PorousFlowPermeabilityConst
permeability = '1.8e-11 0 0 0 1.8e-11 0 0 0 1.8e-11' # kf=3e-8, a=6e-4m. 1.8e-11 = kf * a
block = 'fracture'
[]
[permeability_matrix]
type = PorousFlowPermeabilityConst
permeability = '1e-20 0 0 0 1e-20 0 0 0 1e-20'
block = 'matrix1 matrix2'
[]
[]
[Functions]
[dt_controller]
type = PiecewiseConstant
x = '0 30 40 100 200 83200'
y = '0.01 0.1 1 10 100 32'
[]
[]
[Preconditioning]
active = basic
[mumps_is_best_for_parallel_jobs]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[basic]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu NONZERO 2 '
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 86400
[TimeStepper]
type = FunctionDT
function = dt_controller
[]
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-9
[]
[VectorPostprocessors]
[xmass]
type = LineValueSampler
start_point = '0.4 0 0'
end_point = '0.5 0 0'
sort_by = x
num_points = 167
variable = massfrac0
[]
[]
[Outputs]
perf_graph = true
console = true
csv = true
exodus = true
[]
(modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
second_order = false
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[mortar_normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
[]
[]
[Constraints]
[normal_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = .5
dtmin = .01
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15 1e-5'
l_max_its = 100
nl_max_its = 30
# nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = mortar_normal_lm
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_normal_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[]
(modules/functional_expansion_tools/test/tests/errors/multiapp_missing_sub_object.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
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
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = multiapp_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_convection/plate.parent.i)
# This tests a temperature and heat transfer coefficient using the MultiApp system.
# Simple heat conduction problem with heat source is solved,
# to obtain an analytical solution:
# T(x,t) = 300 + 20t(x-1)^2
# The temperature is picked up by the child
# side of the solve, to use as ambiant temperature in a convective BC.
htc = 100
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 1
nx = 10
[]
[Functions]
[left_bc_fn]
type = PiecewiseLinear
x = '0 10'
y = '300 500'
[]
[]
[Variables]
[T]
[]
[]
[AuxVariables]
[htc_ext]
initial_condition = ${htc}
[]
[]
[Functions]
[source_term]
type = ParsedFunction
expression = '20 * x * x - 40 * x + 20 - 40 * t'
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T
value = 300
[]
[]
[Kernels]
[td]
type = ADTimeDerivative
variable = T
[]
[diff]
type = ADDiffusion
variable = T
[]
[source]
type = BodyForce
function = 'source_term'
variable = T
[]
[]
[BCs]
[left]
type = FunctionDirichletBC
variable = T
boundary = left
function = left_bc_fn
[]
[right]
type = NeumannBC
variable = T
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
dt = 0.5
end_time = 10
nl_abs_tol = 1e-10
abort_on_solve_fail = true
[]
[MultiApps]
[thm]
type = TransientMultiApp
app_type = ThermalHydraulicsApp
input_files = plate.i
execute_on = TIMESTEP_END
[]
[]
[Transfers]
[T_to_child]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = thm
source_variable = T
variable = T_ext
[]
[htc_to_child]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = thm
source_variable = htc_ext
variable = htc_ext
[]
[]
[Outputs]
exodus = true
[]
(python/peacock/tests/common/transient_with_date.i)
###########################################################
# This is a simple test with a time-dependent problem
# demonstrating the use of a "Transient" Executioner.
#
# @Requirement F1.10
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./dt]
type = TimestepSize
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
# Preconditioned JFNK (default)
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = with_date
exodus = true
[./with_date]
type = Exodus
file_base = with_date
append_date = true
append_date_format = '%Y-%m-%d'
[../]
[]
(modules/richards/test/tests/gravity_head_2/gh08.i)
# unsaturated = true
# gravity = true
# supg = true
# transient = true
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmin = 0
xmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1E-2 1E-1 1E0 1E1 1E3 1E4 1E5 1E6 1E7'
x = '0 1E-1 1E0 1E1 1E2 1E3 1E4 1E5 1E6'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 1.0E2
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 0.5
bulk_mod = 0.5E2
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.0
n = 3
[../]
[./SatWater]
type = RichardsSat
s_res = 0.1
sum_s_res = 0.15
[../]
[./SatGas]
type = RichardsSat
s_res = 0.05
sum_s_res = 0.15
[../]
[./SUPGwater]
type = RichardsSUPGstandard
p_SUPG = 1E-3
[../]
[./SUPGgas]
type = RichardsSUPGstandard
p_SUPG = 1E-3
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./water_ic]
type = ConstantIC
value = 1
variable = pwater
[../]
[./gas_ic]
type = ConstantIC
value = 2
variable = pgas
[../]
[]
[Kernels]
active = 'richardsfwater richardstwater richardsfgas richardstgas'
[./richardstwater]
type = RichardsMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFlux
variable = pwater
[../]
[./richardstgas]
type = RichardsMassChange
variable = pgas
[../]
[./richardsfgas]
type = RichardsFlux
variable = pgas
[../]
[]
[AuxVariables]
[./seffgas]
[../]
[./seffwater]
[../]
[]
[AuxKernels]
[./seffgas_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffGas
variable = seffgas
[../]
[./seffwater_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffWater
variable = seffwater
[../]
[]
[Postprocessors]
[./mwater_init]
type = RichardsMass
variable = pwater
execute_on = timestep_begin
outputs = none
[../]
[./mgas_init]
type = RichardsMass
variable = pgas
execute_on = timestep_begin
outputs = none
[../]
[./mwater_fin]
type = RichardsMass
variable = pwater
execute_on = timestep_end
outputs = none
[../]
[./mgas_fin]
type = RichardsMass
variable = pgas
execute_on = timestep_end
outputs = none
[../]
[./mass_error_water]
type = FunctionValuePostprocessor
function = fcn_mass_error_w
[../]
[./mass_error_gas]
type = FunctionValuePostprocessor
function = fcn_mass_error_g
[../]
[./pw_left]
type = PointValue
point = '0 0 0'
variable = pwater
outputs = none
[../]
[./pw_right]
type = PointValue
point = '1 0 0'
variable = pwater
outputs = none
[../]
[./error_water]
type = FunctionValuePostprocessor
function = fcn_error_water
[../]
[./pg_left]
type = PointValue
point = '0 0 0'
variable = pgas
outputs = none
[../]
[./pg_right]
type = PointValue
point = '1 0 0'
variable = pgas
outputs = none
[../]
[./error_gas]
type = FunctionValuePostprocessor
function = fcn_error_gas
[../]
[]
[Functions]
[./fcn_mass_error_w]
type = ParsedFunction
expression = 'abs(0.5*(mi-mf)/(mi+mf))'
symbol_names = 'mi mf'
symbol_values = 'mwater_init mwater_fin'
[../]
[./fcn_mass_error_g]
type = ParsedFunction
expression = 'abs(0.5*(mi-mf)/(mi+mf))'
symbol_names = 'mi mf'
symbol_values = 'mgas_init mgas_fin'
[../]
[./fcn_error_water]
type = ParsedFunction
expression = 'abs((-b*log(-(gdens0*xval+(-b*exp(-p0/b)))/b)-p1)/p1)'
symbol_names = 'b gdens0 p0 xval p1'
symbol_values = '1E2 -1 pw_left 1 pw_right'
[../]
[./fcn_error_gas]
type = ParsedFunction
expression = 'abs((-b*log(-(gdens0*xval+(-b*exp(-p0/b)))/b)-p1)/p1)'
symbol_names = 'b gdens0 p0 xval p1'
symbol_values = '0.5E2 -0.5 pg_left 1 pg_right'
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
density_UO = 'DensityWater DensityGas'
relperm_UO = 'RelPermWater RelPermGas'
SUPG_UO = 'SUPGwater SUPGgas'
sat_UO = 'SatWater SatGas'
seff_UO = 'SeffWater SeffGas'
viscosity = '1E-3 0.5E-3'
gravity = '-1 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = gh08
csv = true
[]
(modules/combined/test/tests/poro_mechanics/borehole_lowres.i)
# Poroelastic response of a borehole.
#
# LOWRES VERSION: this version does not give perfect agreement with the analytical solution
#
# A fully-saturated medium contains a fluid with a homogeneous porepressure,
# but an anisitropic insitu stress. A infinitely-long borehole aligned with
# the $$z$$ axis is instanteously excavated. The borehole boundary is
# stress-free and allowed to freely drain. This problem is analysed using
# plane-strain conditions (no $$z$$ displacement).
#
# The solution in Laplace space is found in E Detournay and AHD Cheng "Poroelastic response of a borehole in a non-hydrostatic stress field". International Journal of Rock Mechanics and Mining Sciences and Geomechanics Abstracts 25 (1988) 171-182. In the small-time limit, the Laplace transforms may be performed. There is one typo in the paper. Equation (A4)'s final term should be -(a/r)\sqrt(4ct/(a^2\pi)), and not +(a/r)\sqrt(4ct/(a^2\pi)).
#
# Because realistic parameters are chosen (below),
# the residual for porepressure is much smaller than
# the residuals for the displacements. Therefore the
# scaling parameter is chosen. Also note that the
# insitu stresses are effective stresses, not total
# stresses, but the solution in the above paper is
# expressed in terms of total stresses.
#
# Here are the problem's parameters, and their values:
# Borehole radius. a = 1
# Rock's Lame lambda. la = 0.5E9
# Rock's Lame mu, which is also the Rock's shear modulus. mu = G = 1.5E9
# Rock bulk modulus. K = la + 2*mu/3 = 1.5E9
# Drained Poisson ratio. nu = (3K - 2G)/(6K + 2G) = 0.125
# Rock bulk compliance. 1/K = 0.66666666E-9
# Fluid bulk modulus. Kf = 0.7171315E9
# Fluid bulk compliance. 1/Kf = 1.39444444E-9
# Rock initial porosity. phi0 = 0.3
# Biot coefficient. alpha = 0.65
# Biot modulus. M = 1/(phi0/Kf + (alpha - phi0)(1 - alpha)/K) = 2E9
# Undrained bulk modulus. Ku = K + alpha^2*M = 2.345E9
# Undrained Poisson ratio. nuu = (3Ku - 2G)/(6Ku + 2G) = 0.2364
# Skempton coefficient. B = alpha*M/Ku = 0.554
# Fluid mobility (rock permeability/fluid viscosity). k = 1E-12
[Mesh]
type = FileMesh
file = borehole_lowres_input.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
porepressure = porepressure
block = 1
[]
[GlobalParams]
volumetric_locking_correction=true
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./porepressure]
scaling = 1E9 # Notice the scaling, to make porepressure's kernels roughly of same magnitude as disp's kernels
[../]
[]
[ICs]
[./initial_p]
type = ConstantIC
variable = porepressure
value = 1E6
[../]
[]
[BCs]
[./fixed_outer_x]
type = DirichletBC
variable = disp_x
value = 0
boundary = outer
[../]
[./fixed_outer_y]
type = DirichletBC
variable = disp_y
value = 0
boundary = outer
[../]
[./plane_strain]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'zmin zmax'
[../]
[./borehole_wall]
type = DirichletBC
variable = porepressure
value = 0
boundary = bh_wall
[../]
[]
[AuxVariables]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./tot_yy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./tot_yy]
type = ParsedAux
coupled_variables = 'stress_yy porepressure'
execute_on = timestep_end
variable = tot_yy
expression = 'stress_yy-0.65*porepressure'
[../]
[]
[Kernels]
[./grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
[../]
[./grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
[../]
[./grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
component = 2
[../]
[./poro_x]
type = PoroMechanicsCoupling
variable = disp_x
component = 0
[../]
[./poro_y]
type = PoroMechanicsCoupling
variable = disp_y
component = 1
[../]
[./poro_z]
type = PoroMechanicsCoupling
variable = disp_z
component = 2
[../]
[./poro_timederiv]
type = PoroFullSatTimeDerivative
variable = porepressure
[../]
[./darcy_flow]
type = CoefDiffusion
variable = porepressure
coef = 1E-12
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '0.5E9 1.5E9'
# bulk modulus is lambda + 2*mu/3 = 0.5 + 2*1.5/3 = 1.5E9
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeFiniteStrain
displacements = 'disp_x disp_y disp_z'
eigenstrain_names = ini_stress
[../]
[./ini_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = '-1.35E6 0 0 0 -3.35E6 0 0 0 0' # remember this is the effective stress
eigenstrain_name = ini_stress
[../]
[./no_plasticity]
type = ComputeFiniteStrainElasticStress
[../]
[./poro_material]
type = PoroFullSatMaterial
porosity0 = 0.3
biot_coefficient = 0.65
solid_bulk_compliance = 0.6666666666667E-9
fluid_bulk_compliance = 1.3944444444444E-9
constant_porosity = false
[../]
[]
[Postprocessors]
[./p00]
type = PointValue
variable = porepressure
point = '1.00 0 0'
outputs = csv_p
[../]
[./p01]
type = PointValue
variable = porepressure
point = '1.01 0 0'
outputs = csv_p
[../]
[./p02]
type = PointValue
variable = porepressure
point = '1.02 0 0'
outputs = csv_p
[../]
[./p03]
type = PointValue
variable = porepressure
point = '1.03 0 0'
outputs = csv_p
[../]
[./p04]
type = PointValue
variable = porepressure
point = '1.04 0 0'
outputs = csv_p
[../]
[./p05]
type = PointValue
variable = porepressure
point = '1.05 0 0'
outputs = csv_p
[../]
[./p06]
type = PointValue
variable = porepressure
point = '1.06 0 0'
outputs = csv_p
[../]
[./p07]
type = PointValue
variable = porepressure
point = '1.07 0 0'
outputs = csv_p
[../]
[./p08]
type = PointValue
variable = porepressure
point = '1.08 0 0'
outputs = csv_p
[../]
[./p09]
type = PointValue
variable = porepressure
point = '1.09 0 0'
outputs = csv_p
[../]
[./p10]
type = PointValue
variable = porepressure
point = '1.10 0 0'
outputs = csv_p
[../]
[./p11]
type = PointValue
variable = porepressure
point = '1.11 0 0'
outputs = csv_p
[../]
[./p12]
type = PointValue
variable = porepressure
point = '1.12 0 0'
outputs = csv_p
[../]
[./p13]
type = PointValue
variable = porepressure
point = '1.13 0 0'
outputs = csv_p
[../]
[./p14]
type = PointValue
variable = porepressure
point = '1.14 0 0'
outputs = csv_p
[../]
[./p15]
type = PointValue
variable = porepressure
point = '1.15 0 0'
outputs = csv_p
[../]
[./p16]
type = PointValue
variable = porepressure
point = '1.16 0 0'
outputs = csv_p
[../]
[./p17]
type = PointValue
variable = porepressure
point = '1.17 0 0'
outputs = csv_p
[../]
[./p18]
type = PointValue
variable = porepressure
point = '1.18 0 0'
outputs = csv_p
[../]
[./p19]
type = PointValue
variable = porepressure
point = '1.19 0 0'
outputs = csv_p
[../]
[./p20]
type = PointValue
variable = porepressure
point = '1.20 0 0'
outputs = csv_p
[../]
[./p21]
type = PointValue
variable = porepressure
point = '1.21 0 0'
outputs = csv_p
[../]
[./p22]
type = PointValue
variable = porepressure
point = '1.22 0 0'
outputs = csv_p
[../]
[./p23]
type = PointValue
variable = porepressure
point = '1.23 0 0'
outputs = csv_p
[../]
[./p24]
type = PointValue
variable = porepressure
point = '1.24 0 0'
outputs = csv_p
[../]
[./p25]
type = PointValue
variable = porepressure
point = '1.25 0 0'
outputs = csv_p
[../]
[./s00]
type = PointValue
variable = disp_x
point = '1.00 0 0'
outputs = csv_s
[../]
[./s01]
type = PointValue
variable = disp_x
point = '1.01 0 0'
outputs = csv_s
[../]
[./s02]
type = PointValue
variable = disp_x
point = '1.02 0 0'
outputs = csv_s
[../]
[./s03]
type = PointValue
variable = disp_x
point = '1.03 0 0'
outputs = csv_s
[../]
[./s04]
type = PointValue
variable = disp_x
point = '1.04 0 0'
outputs = csv_s
[../]
[./s05]
type = PointValue
variable = disp_x
point = '1.05 0 0'
outputs = csv_s
[../]
[./s06]
type = PointValue
variable = disp_x
point = '1.06 0 0'
outputs = csv_s
[../]
[./s07]
type = PointValue
variable = disp_x
point = '1.07 0 0'
outputs = csv_s
[../]
[./s08]
type = PointValue
variable = disp_x
point = '1.08 0 0'
outputs = csv_s
[../]
[./s09]
type = PointValue
variable = disp_x
point = '1.09 0 0'
outputs = csv_s
[../]
[./s10]
type = PointValue
variable = disp_x
point = '1.10 0 0'
outputs = csv_s
[../]
[./s11]
type = PointValue
variable = disp_x
point = '1.11 0 0'
outputs = csv_s
[../]
[./s12]
type = PointValue
variable = disp_x
point = '1.12 0 0'
outputs = csv_s
[../]
[./s13]
type = PointValue
variable = disp_x
point = '1.13 0 0'
outputs = csv_s
[../]
[./s14]
type = PointValue
variable = disp_x
point = '1.14 0 0'
outputs = csv_s
[../]
[./s15]
type = PointValue
variable = disp_x
point = '1.15 0 0'
outputs = csv_s
[../]
[./s16]
type = PointValue
variable = disp_x
point = '1.16 0 0'
outputs = csv_s
[../]
[./s17]
type = PointValue
variable = disp_x
point = '1.17 0 0'
outputs = csv_s
[../]
[./s18]
type = PointValue
variable = disp_x
point = '1.18 0 0'
outputs = csv_s
[../]
[./s19]
type = PointValue
variable = disp_x
point = '1.19 0 0'
outputs = csv_s
[../]
[./s20]
type = PointValue
variable = disp_x
point = '1.20 0 0'
outputs = csv_s
[../]
[./s21]
type = PointValue
variable = disp_x
point = '1.21 0 0'
outputs = csv_s
[../]
[./s22]
type = PointValue
variable = disp_x
point = '1.22 0 0'
outputs = csv_s
[../]
[./s23]
type = PointValue
variable = disp_x
point = '1.23 0 0'
outputs = csv_s
[../]
[./s24]
type = PointValue
variable = disp_x
point = '1.24 0 0'
outputs = csv_s
[../]
[./s25]
type = PointValue
variable = disp_x
point = '1.25 0 0'
outputs = csv_s
[../]
[./t00]
type = PointValue
variable = tot_yy
point = '1.00 0 0'
outputs = csv_t
[../]
[./t01]
type = PointValue
variable = tot_yy
point = '1.01 0 0'
outputs = csv_t
[../]
[./t02]
type = PointValue
variable = tot_yy
point = '1.02 0 0'
outputs = csv_t
[../]
[./t03]
type = PointValue
variable = tot_yy
point = '1.03 0 0'
outputs = csv_t
[../]
[./t04]
type = PointValue
variable = tot_yy
point = '1.04 0 0'
outputs = csv_t
[../]
[./t05]
type = PointValue
variable = tot_yy
point = '1.05 0 0'
outputs = csv_t
[../]
[./t06]
type = PointValue
variable = tot_yy
point = '1.06 0 0'
outputs = csv_t
[../]
[./t07]
type = PointValue
variable = tot_yy
point = '1.07 0 0'
outputs = csv_t
[../]
[./t08]
type = PointValue
variable = tot_yy
point = '1.08 0 0'
outputs = csv_t
[../]
[./t09]
type = PointValue
variable = tot_yy
point = '1.09 0 0'
outputs = csv_t
[../]
[./t10]
type = PointValue
variable = tot_yy
point = '1.10 0 0'
outputs = csv_t
[../]
[./t11]
type = PointValue
variable = tot_yy
point = '1.11 0 0'
outputs = csv_t
[../]
[./t12]
type = PointValue
variable = tot_yy
point = '1.12 0 0'
outputs = csv_t
[../]
[./t13]
type = PointValue
variable = tot_yy
point = '1.13 0 0'
outputs = csv_t
[../]
[./t14]
type = PointValue
variable = tot_yy
point = '1.14 0 0'
outputs = csv_t
[../]
[./t15]
type = PointValue
variable = tot_yy
point = '1.15 0 0'
outputs = csv_t
[../]
[./t16]
type = PointValue
variable = tot_yy
point = '1.16 0 0'
outputs = csv_t
[../]
[./t17]
type = PointValue
variable = tot_yy
point = '1.17 0 0'
outputs = csv_t
[../]
[./t18]
type = PointValue
variable = tot_yy
point = '1.18 0 0'
outputs = csv_t
[../]
[./t19]
type = PointValue
variable = tot_yy
point = '1.19 0 0'
outputs = csv_t
[../]
[./t20]
type = PointValue
variable = tot_yy
point = '1.20 0 0'
outputs = csv_t
[../]
[./t21]
type = PointValue
variable = tot_yy
point = '1.21 0 0'
outputs = csv_t
[../]
[./t22]
type = PointValue
variable = tot_yy
point = '1.22 0 0'
outputs = csv_t
[../]
[./t23]
type = PointValue
variable = tot_yy
point = '1.23 0 0'
outputs = csv_t
[../]
[./t24]
type = PointValue
variable = tot_yy
point = '1.24 0 0'
outputs = csv_t
[../]
[./t25]
type = PointValue
variable = tot_yy
point = '1.25 0 0'
outputs = csv_t
[../]
[./dt]
type = FunctionValuePostprocessor
outputs = console
function = 2*t
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options = '-snes_monitor -snes_linesearch_monitor'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'gmres asm 1E0 1E-10 200 500 lu NONZERO'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 0.3
dt = 0.3
#[./TimeStepper]
# type = PostprocessorDT
# postprocessor = dt
# dt = 0.003
#[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = borehole_lowres
exodus = true
sync_times = '0.003 0.3'
[./csv_p]
file_base = borehole_lowres_p
type = CSV
[../]
[./csv_s]
file_base = borehole_lowres_s
type = CSV
[../]
[./csv_t]
file_base = borehole_lowres_t
type = CSV
[../]
[]
(test/tests/interfacekernels/adaptivity/adaptivity.i)
# This input file is used for two tests:
# 1) Check that InterfaceKernels work with mesh adaptivity
# 2) Error out when InterfaceKernels are used with adaptivity
# and stateful material prpoerties
[Mesh]
parallel_type = 'replicated'
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0.5 0 0'
top_right = '1 1 0'
block_id = 1
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./break_boundary]
input = interface
type = BreakBoundaryOnSubdomainGenerator
[../]
[]
[Variables]
[./u]
[./InitialCondition]
type = ConstantIC
value = 1
[../]
block = 0
[../]
[./u_neighbor]
[./InitialCondition]
type = ConstantIC
value = 1
[../]
block = 1
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = (x*x*x)-6.0*x
[../]
[./bc_fn]
type = ParsedFunction
expression = (x*x*x)
[../]
[]
[Kernels]
[./diff]
type = MatDiffusionTest
variable = u
prop_name = diffusivity
block = 0
[../]
[./abs]
type = Reaction
variable = u
block = 0
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
block = 0
[../]
[./diffn]
type = MatDiffusionTest
variable = u_neighbor
prop_name = diffusivity
block = 1
[../]
[./absn]
type = Reaction
variable = u_neighbor
block = 1
[../]
[./forcingn]
type = BodyForce
variable = u_neighbor
function = forcing_fn
block = 1
[../]
[]
[InterfaceKernels]
[./flux_match]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = u_neighbor
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = FunctionDirichletBC
variable = u
boundary = 'left'
function = bc_fn
[../]
[./u_neighbor]
type = FunctionDirichletBC
variable = u_neighbor
boundary = 'right'
function = bc_fn
[../]
[]
[Materials]
active = 'constant'
[./stateful]
type = StatefulTest
prop_names = 'diffusivity'
prop_values = '1'
block = '0 1'
[../]
[./constant]
type = GenericConstantMaterial
prop_names = 'diffusivity'
prop_values = '1'
block = '0 1'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Adaptivity]
marker = 'marker'
steps = 1
[./Markers]
[./marker]
type = BoxMarker
bottom_left = '0 0 0'
top_right = '1 1 0'
inside = refine
outside = coarsen
[../]
[../]
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/bouncing-block-contact/variational-frictional-action.i)
starting_point = 2e-1
# We offset slightly so we avoid the case where the bottom of the secondary block and the top of the
# primary block are perfectly vertically aligned which can cause the backtracking line search some
# issues for a coarse mesh (basic line search handles that fine)
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
[]
[Mesh]
[file_mesh]
type = FileMeshGenerator
file = long-bottom-block-1elem-blocks-coarse.e
[]
[remove]
type = BlockDeletionGenerator
input = file_mesh
block = '3 4'
[]
patch_update_strategy = iteration
[]
# [Problem]
# type = DumpObjectsProblem
# dump_path = Contact/contact_action
# []
[Variables]
[disp_x]
block = '1 2'
scaling = 1e1
[]
[disp_y]
block = '1 2'
scaling = 1e1
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[AuxVariables]
[procid]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[procid]
type = ProcessorIDAux
variable = procid
[]
[]
[Contact]
[contact_action]
model = coulomb
formulation = mortar
c_normal = 1.0e-2
c_tangential = 1.0e-1
friction_coefficient = 0.1
primary = 10
secondary = 20
normalize_c = true
normal_lm_scaling = 1e3
tangential_lm_scaling = 1e2
correct_edge_dropping = true
use_dual = false
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-15'
l_max_its = 30
nl_max_its = 25
line_search = 'none'
nl_rel_tol = 1e-12
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exodus]
type = Exodus
hide = 'procid contact_pressure nodal_area penetration'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
(modules/porous_flow/test/tests/dispersion/disp01_heavy.i)
# Test dispersive part of PorousFlowDispersiveFlux kernel by setting diffusion
# coefficients to zero. A pressure gradient is applied over the mesh to give a
# uniform velocity. Gravity is set to zero.
# Mass fraction is set to 1 on the left hand side and 0 on the right hand side.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 200
xmax = 10
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
compute_enthalpy = false
compute_internal_energy = false
[]
[Variables]
[pp]
[]
[massfrac0]
[]
[]
[AuxVariables]
[velocity]
family = MONOMIAL
order = FIRST
[]
[]
[AuxKernels]
[velocity]
type = PorousFlowDarcyVelocityComponent
variable = velocity
component = x
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = pic
[]
[massfrac0]
type = ConstantIC
variable = massfrac0
value = 0
[]
[]
[Functions]
[pic]
type = ParsedFunction
expression = 1.1e5-x*1e3
[]
[]
[BCs]
[xleft]
type = DirichletBC
value = 1
variable = massfrac0
boundary = left
[]
[xright]
type = DirichletBC
value = 0
variable = massfrac0
boundary = right
[]
[pright]
type = DirichletBC
variable = pp
boundary = right
value = 1e5
[]
[pleft]
type = DirichletBC
variable = pp
boundary = left
value = 1.1e5
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[adv0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
[]
[diff0]
type = PorousFlowDispersiveFlux
variable = pp
disp_trans = 0
disp_long = 0.2
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = massfrac0
[]
[adv1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = massfrac0
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = massfrac0
disp_trans = 0
disp_long = 0.2
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1e9
density0 = 1000
viscosity = 0.001
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = massfrac0
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[poro]
type = PorousFlowPorosityConst
porosity = 0.3
[]
[diff]
type = PorousFlowDiffusivityConst
diffusion_coeff = '0 0'
tortuosity = 0.1
[]
[relp]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-9 0 0 0 1e-9 0 0 0 1e-9'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu NONZERO 2 '
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 1e3
dtmax = 10
[TimeStepper]
type = IterationAdaptiveDT
growth_factor = 1.5
cutback_factor = 0.5
dt = 1
[]
[]
[VectorPostprocessors]
[xmass]
type = NodalValueSampler
sort_by = id
variable = massfrac0
[]
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(modules/porous_flow/test/tests/density/GravDensity01.i)
# Trivial test of PorousFlowTotalGravitationalDensityFullySaturatedFromPorosity
# Porosity = 0.1
# Solid density = 3
# Fluid density = 2
# Fluid bulk modulus = 4
# Fluid pressure = 0
# Bulk density: rho = 3 * (1 - 0.1) + 2 * 0.1 = 2.9
# Derivative wrt fluid pressure: d_rho / d_pp = d_rho / d_rho_f * d_rho_f / d_pp
# = phi * rho_f / B
# where rho_f = rho_0 * exp(pp / B) is fluid density, pp is fluid pressure, phi is
# porosity and B is fluid bulk modulus
# With pp = 0, d_rho / d_pp = phi * rho_0 / B = 0.1 * 2 / 4 = 0.05
[Mesh]
type = GeneratedMesh
dim = 3
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = -1
zmax = 0
nx = 1
ny = 1
nz = 1
# This test uses ElementalVariableValue postprocessors on specific
# elements, so element numbering needs to stay unchanged
allow_renumbering = false
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0
bulk_modulus = 4
density0 = 2
[]
[]
[Variables]
[pp]
[InitialCondition]
type = ConstantIC
value = 0
[]
[]
[]
[Kernels]
[dummy]
type = Diffusion
variable = pp
[]
[]
[BCs]
[p]
type = DirichletBC
variable = pp
boundary = 'front back'
value = 0
[]
[]
[AuxVariables]
[density]
order = CONSTANT
family = MONOMIAL
[]
[ddensity_dpp]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[density]
type = MaterialRealAux
property = density
variable = density
[]
[ddensity_dpp]
type = MaterialStdVectorAux
property = ddensity_dvar
variable = ddensity_dpp
index = 0
[]
[]
[Postprocessors]
[density]
type = ElementalVariableValue
elementid = 0
variable = density
execute_on = 'timestep_end'
[]
[ddensity_dpp]
type = ElementalVariableValue
elementid = 0
variable = ddensity_dpp
execute_on = 'timestep_end'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss_qp]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[density]
type = PorousFlowTotalGravitationalDensityFullySaturatedFromPorosity
rho_s = 3
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = Newton
type = Steady
[]
[Outputs]
file_base = GravDensity01
csv = true
execute_on = 'timestep_end'
[]
(modules/contact/test/tests/ranfs-and-scaling/bouncing-block-ranfs.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-no-lower-d-coarse.e
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = false
use_automatic_differentiation = true
strain = SMALL
[]
[]
[Materials]
[elasticity]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e3
poissons_ratio = 0.3
[]
[stress]
type = ADComputeLinearElasticStress
[]
[]
[Constraints]
[./disp_x]
type = RANFSNormalMechanicalContact
secondary = 10
primary = 20
variable = disp_x
primary_variable = disp_x
component = x
normal_smoothing_distance = 0.1
[../]
[./disp_y]
type = RANFSNormalMechanicalContact
secondary = 10
primary = 20
variable = disp_y
primary_variable = disp_y
component = y
normal_smoothing_distance = 0.1
[../]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[../]
[]
[Executioner]
type = Transient
end_time = 100
dt = 5
dtmin = 2.5
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type -mat_mffd_err'
petsc_options_value = 'hypre boomeramg 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
automatic_scaling = true
verbose = true
scaling_group_variables = 'disp_x disp_y'
resid_vs_jac_scaling_param = 1
nl_rel_tol = 1e-12
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exo]
type = Exodus
[]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[nl]
type = NumNonlinearIterations
[]
[lin]
type = NumLinearIterations
[]
[tot_nl]
type = CumulativeValuePostprocessor
postprocessor = nl
[]
[tot_lin]
type = CumulativeValuePostprocessor
postprocessor = lin
[]
[]
(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/examples/laser-welding/2d.i)
endtime=5e-4 # s
timestep=${fparse endtime/100} # s
surfacetemp=300 # K
power=190 # W
R=1.8257418583505537e-4 # m
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -.45e-3 # m
xmax = 0.45e-3 # m
ymin = -.9e-4 # m
ymax = 0
nx = 25
ny = 5
displacements = 'disp_x disp_y'
[]
[GlobalParams]
temperature = T
[]
[Variables]
[vel]
family = LAGRANGE_VEC
[]
[T]
[]
[p]
[]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[vel_x_aux]
[InitialCondition]
type = ConstantIC
value = 1e-15
[]
[]
[vel_y_aux]
[InitialCondition]
type = ConstantIC
value = 1e-15
[]
[]
[]
[AuxKernels]
[vel_x_value]
type = VectorVariableComponentAux
variable = vel_x_aux
vector_variable = vel
component = x
[]
[vel_y_value]
type = VectorVariableComponentAux
variable = vel_y_aux
vector_variable = vel
component = y
[]
[]
[ICs]
[T]
type = FunctionIC
variable = T
function = '(${surfacetemp} - 300) / .7e-3 * y + ${surfacetemp}'
[]
[]
[Kernels]
[disp_x]
type = Diffusion
variable = disp_x
[]
[disp_y]
type = Diffusion
variable = disp_y
[]
[mass]
type = INSADMass
variable = p
use_displaced_mesh = true
[]
[mass_pspg]
type = INSADMassPSPG
variable = p
use_displaced_mesh = true
[]
[momentum_time]
type = INSADMomentumTimeDerivative
variable = vel
use_displaced_mesh = true
[]
[momentum_advection]
type = INSADMomentumAdvection
variable = vel
use_displaced_mesh = true
[]
[momentum_mesh_advection]
type = INSADMomentumMeshAdvection
variable = vel
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = vel
use_displaced_mesh = true
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = vel
pressure = p
integrate_p_by_parts = true
use_displaced_mesh = true
[]
[momentum_supg]
type = INSADMomentumSUPG
variable = vel
material_velocity = relative_velocity
use_displaced_mesh = true
[]
[temperature_time]
type = INSADHeatConductionTimeDerivative
variable = T
use_displaced_mesh = true
[]
[temperature_advection]
type = INSADEnergyAdvection
variable = T
use_displaced_mesh = true
[]
[temperature_mesh_advection]
type = INSADEnergyMeshAdvection
variable = T
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
[]
[temperature_conduction]
type = ADHeatConduction
variable = T
thermal_conductivity = 'k'
use_displaced_mesh = true
[]
[temperature_supg]
type = INSADEnergySUPG
variable = T
velocity = vel
use_displaced_mesh = true
[]
[]
[BCs]
[x_no_disp]
type = DirichletBC
variable = disp_x
boundary = 'bottom'
value = 0
[]
[y_no_disp]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[]
[no_slip]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'bottom right left'
[]
[T_cold]
type = DirichletBC
variable = T
boundary = 'bottom'
value = 300
[]
[radiation_flux]
type = FunctionRadiativeBC
variable = T
boundary = 'top'
emissivity_function = '1'
Tinfinity = 300
stefan_boltzmann_constant = 5.67e-8
use_displaced_mesh = true
[]
[weld_flux]
type = GaussianEnergyFluxBC
variable = T
boundary = 'top'
P0 = ${power}
R = ${R}
x_beam_coord = '-0.35e-3 +0.7e-3*t/${endtime}'
y_beam_coord = '0'
use_displaced_mesh = true
[]
[vapor_recoil]
type = INSADVaporRecoilPressureMomentumFluxBC
variable = vel
boundary = 'top'
use_displaced_mesh = true
[]
[displace_x_top]
type = INSADDisplaceBoundaryBC
boundary = 'top'
variable = 'disp_x'
velocity = 'vel'
component = 0
associated_subdomain = 0
[]
[displace_y_top]
type = INSADDisplaceBoundaryBC
boundary = 'top'
variable = 'disp_y'
velocity = 'vel'
component = 1
associated_subdomain = 0
[]
[displace_x_top_dummy]
type = INSADDummyDisplaceBoundaryIntegratedBC
boundary = 'top'
variable = 'disp_x'
velocity = 'vel'
component = 0
[]
[displace_y_top_dummy]
type = INSADDummyDisplaceBoundaryIntegratedBC
boundary = 'top'
variable = 'disp_y'
velocity = 'vel'
component = 1
[]
[]
[Materials]
[ins_mat]
type = INSADStabilized3Eqn
velocity = vel
pressure = p
temperature = T
use_displaced_mesh = true
[]
[steel]
type = AriaLaserWeld304LStainlessSteel
temperature = T
beta = 1e7
use_displaced_mesh = true
[]
[steel_boundary]
type = AriaLaserWeld304LStainlessSteelBoundary
boundary = 'top'
temperature = T
use_displaced_mesh = true
[]
[const]
type = GenericConstantMaterial
prop_names = 'abs sb_constant'
prop_values = '1 5.67e-8'
use_displaced_mesh = true
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO strumpack'
[]
[]
[Executioner]
type = Transient
end_time = ${endtime}
dtmin = 1e-8
dtmax = ${timestep}
petsc_options = '-snes_converged_reason -ksp_converged_reason -options_left'
solve_type = 'NEWTON'
line_search = 'none'
nl_max_its = 12
l_max_its = 100
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 7
dt = ${timestep}
linear_iteration_ratio = 1e6
growth_factor = 1.5
[]
[]
[Outputs]
[exodus]
type = Exodus
output_material_properties = true
show_material_properties = 'mu'
[]
checkpoint = true
perf_graph = true
[]
[Debug]
show_var_residual_norms = true
[]
[Adaptivity]
marker = combo
max_h_level = 4
[Indicators]
[error_T]
type = GradientJumpIndicator
variable = T
[]
[error_dispz]
type = GradientJumpIndicator
variable = disp_y
[]
[]
[Markers]
[errorfrac_T]
type = ErrorFractionMarker
refine = 0.4
coarsen = 0.2
indicator = error_T
[]
[errorfrac_dispz]
type = ErrorFractionMarker
refine = 0.4
coarsen = 0.2
indicator = error_dispz
[]
[combo]
type = ComboMarker
markers = 'errorfrac_T errorfrac_dispz'
[]
[]
[]
[Postprocessors]
[num_dofs]
type = NumDOFs
system = 'NL'
[]
[nl]
type = NumNonlinearIterations
[]
[tot_nl]
type = CumulativeValuePostprocessor
postprocessor = 'nl'
[]
[]
(modules/contact/test/tests/pdass_problems/frictional_bouncing_block_action.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = long-bottom-block-1elem-blocks.e
[]
allow_renumbering = false
uniform_refine = 0 # 1,2
patch_update_strategy = always
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
generate_output = 'stress_xx stress_yy'
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e3
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[]
[Contact]
[frictional]
primary = 20
secondary = 10
formulation = mortar
model = coulomb
friction_coefficient = 0.4
c_normal = 1.0e1
c_tangential = 1.0e1
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = '40'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = '40'
value = 0.0
[]
[topy]
type = ADFunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 20 * t) + ${offset}'
preset = false
[]
[leftx]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 30
function = '2e-2 * t'
# function = '0'
preset = false
[]
[]
[Executioner]
type = Transient
end_time = 7 # 70
dt = 0.25 # 0.1 for finer meshes (uniform_refine)
dtmin = .01
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 40
line_search = 'basic'
snesmf_reuse_base = false
nl_abs_tol = 1e-9
nl_rel_tol = 1e-9
l_tol = 1e-07 # Tightening l_tol can help with friction
[]
[Debug]
show_var_residual_norms = true
[]
[VectorPostprocessors]
[cont_press]
type = NodalValueSampler
variable = frictional_normal_lm
boundary = '10'
sort_by = x
execute_on = FINAL
[]
[friction]
type = NodalValueSampler
variable = frictional_tangential_lm
boundary = '10'
sort_by = x
execute_on = FINAL
[]
[]
[Outputs]
[checkfile]
type = CSV
show = 'cont_press friction'
start_time = 0.0
execute_vector_postprocessors_on = FINAL
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative_nli contact cumulative_li num_l'
[num_nl]
type = NumNonlinearIterations
[]
[num_l]
type = NumLinearIterations
[]
[cumulative_nli]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[cumulative_li]
type = CumulativeValuePostprocessor
postprocessor = num_l
[]
[contact]
type = ContactDOFSetSize
variable = frictional_normal_lm
subdomain = 'frictional_secondary_subdomain'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/nonzero-malloc/test.i)
[GlobalParams]
gravity = '0 0 0'
pspg = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 5
ny = 5
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./vel_x]
[../]
[./vel_y]
[../]
[./T]
[./InitialCondition]
type = ConstantIC
value = 1.0
[../]
[../]
[./p]
[../]
[]
[Kernels]
# mass
[./mass]
type = INSMass
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
# x-momentum, time
[./x_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_x
[../]
# x-momentum, space
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
# y-momentum, time
[./y_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_y
[../]
# y-momentum, space
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
# temperature
[./temperature_time]
type = INSTemperatureTimeDerivative
variable = T
[../]
[./temperature_space]
type = INSTemperature
variable = T
u = vel_x
v = vel_y
[../]
[malloc]
type = MallocKernel
# Variable choice doesn't matter
variable = vel_x
[]
[]
[BCs]
[./x_no_slip]
type = DirichletBC
variable = vel_x
boundary = 'bottom right left'
value = 0.0
[../]
[./lid]
type = FunctionDirichletBC
variable = vel_x
boundary = 'top'
function = 'lid_function'
[../]
[./y_no_slip]
type = DirichletBC
variable = vel_y
boundary = 'bottom right top left'
value = 0.0
[../]
[./T_hot]
type = DirichletBC
variable = T
boundary = 'bottom'
value = 1
[../]
[./T_cold]
type = DirichletBC
variable = T
boundary = 'top'
value = 0
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'asm 2 ilu 4'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
file_base = lid_driven_out
perf_graph = true
[]
(modules/solid_mechanics/test/tests/gravity/block-gravity-kinetic-energy.i)
starting_point = 2e-1
offset = 1.0
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[AuxVariables]
[pid]
order = CONSTANT
family = MONOMIAL
[]
[kinetic_energy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[pid]
type = ProcessorIDAux
variable = pid
execute_on = 'initial timestep_end'
[]
[kinetic_energy]
type = KineticEnergyAux
block = '1 2'
variable = kinetic_energy
newmark_velocity_x = vel_x
newmark_velocity_y = vel_y
newmark_velocity_z = 0.0
density = density
[]
[]
[ICs]
[disp_y]
type = ConstantIC
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
[]
[]
[Physics/SolidMechanics/Dynamic]
[all]
add_variables = true
hht_alpha = 0.0
beta = 0.25
gamma = 0.5
mass_damping_coefficient = 0.0
stiffness_damping_coefficient = 0.0
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_yy'
block = '1 2'
strain = FINITE
[]
[]
[Kernels]
[gravity]
type = Gravity
value = -9.81
variable = disp_y
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e4
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e7
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '7750'
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 0.01
dtmin = .05
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err '
'-ksp_gmres_restart'
petsc_options_value = 'lu NONZERO 1e-15 1e-5 100'
l_max_its = 100
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = false
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = false
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'total_kinetic_energy'
[total_kinetic_energy]
type = ElementIntegralVariablePostprocessor
variable = kinetic_energy
block = '1 2'
[]
[]
(modules/porous_flow/test/tests/poroperm/PermFromPoro04.i)
# Testing permeability from porosity
# Trivial test, checking calculated permeability is correct
# k = k_anisotropic * k
# with log k = A * phi + B
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 3
[]
[GlobalParams]
block = 0
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[InitialCondition]
type = ConstantIC
value = 0
[]
[]
[]
[Kernels]
[flux]
type = PorousFlowAdvectiveFlux
gravity = '0 0 0'
variable = pp
[]
[]
[BCs]
[ptop]
type = DirichletBC
variable = pp
boundary = right
value = 0
[]
[pbase]
type = DirichletBC
variable = pp
boundary = left
value = 1
[]
[]
[AuxVariables]
[poro]
order = CONSTANT
family = MONOMIAL
[]
[perm_x]
order = CONSTANT
family = MONOMIAL
[]
[perm_y]
order = CONSTANT
family = MONOMIAL
[]
[perm_z]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[poro]
type = PorousFlowPropertyAux
property = porosity
variable = poro
[]
[perm_x]
type = PorousFlowPropertyAux
property = permeability
variable = perm_x
row = 0
column = 0
[]
[perm_y]
type = PorousFlowPropertyAux
property = permeability
variable = perm_y
row = 1
column = 1
[]
[perm_z]
type = PorousFlowPropertyAux
property = permeability
variable = perm_z
row = 2
column = 2
[]
[]
[Postprocessors]
[perm_x_bottom]
type = PointValue
variable = perm_x
point = '0 0 0'
[]
[perm_y_bottom]
type = PointValue
variable = perm_y
point = '0 0 0'
[]
[perm_z_bottom]
type = PointValue
variable = perm_z
point = '0 0 0'
[]
[perm_x_top]
type = PointValue
variable = perm_x
point = '3 0 0'
[]
[perm_y_top]
type = PointValue
variable = perm_y
point = '3 0 0'
[]
[perm_z_top]
type = PointValue
variable = perm_z
point = '3 0 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
# unimportant in this fully-saturated test
m = 0.8
alpha = 1e-4
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2.2e9
viscosity = 1e-3
density0 = 1000
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[massfrac]
type = PorousFlowMassFraction
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityExponential
k_anisotropy = '1 0 0 0 2 0 0 0 0.1'
poroperm_function = log_k
A = 4.342945
B = -8
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = Newton
type = Steady
l_tol = 1E-5
nl_abs_tol = 1E-3
nl_rel_tol = 1E-8
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
csv = true
execute_on = 'timestep_end'
[]
(modules/phase_field/examples/nucleation/refine.i)
#
# Example derived from cahn_hilliard.i demonstrating the use of Adaptivity
# with the DiscreteNucleation system. The DiscreteNucleationMarker triggers
# mesh refinement for the nucleus geometry. It is up to the user to specify
# refinement for the physics. In this example this is done using a GradientJumpIndicator
# with a ValueThresholdMarker. The nucleation system marker and the physics marker
# must be combined using a ComboMarker to combine their effect.
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 500
ymax = 500
elem_type = QUAD
[]
[Modules]
[./PhaseField]
[./Conserved]
[./c]
free_energy = F
mobility = M
kappa = kappa_c
solve_type = REVERSE_SPLIT
[../]
[../]
[../]
[]
[ICs]
[./c_IC]
type = ConstantIC
variable = c
value = 0.2
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1 25'
[../]
[./chemical_free_energy]
# simple double well free energy
type = DerivativeParsedMaterial
property_name = Fc
coupled_variables = 'c'
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 0'
expression = 16*barr_height*c^2*(1-c)^2 # +0.01*(c*plog(c,0.005)+(1-c)*plog(1-c,0.005))
derivative_order = 2
outputs = exodus
[../]
[./probability]
# This is a made up toy nucleation rate it should be replaced by
# classical nucleation theory in a real simulation.
type = ParsedMaterial
property_name = P
coupled_variables = c
expression = 'if(c<0.21,c*1e-8,0)'
outputs = exodus
[../]
[./nucleation]
# The nucleation material is configured to insert nuclei into the free energy
# tht force the concentration to go to 0.95, and holds this enforcement for 500
# time units.
type = DiscreteNucleation
property_name = Fn
op_names = c
op_values = 0.90
penalty = 5
penalty_mode = MIN
map = map
outputs = exodus
[../]
[./free_energy]
# add the chemical and nucleation free energy contributions together
type = DerivativeSumMaterial
derivative_order = 2
coupled_variables = c
sum_materials = 'Fc Fn'
[../]
[]
[UserObjects]
[./inserter]
# The inserter runs at the end of each time step to add nucleation events
# that happened during the timestep (if it converged) to the list of nuclei
type = DiscreteNucleationInserter
hold_time = 50
probability = P
radius = 10
[../]
[./map]
# The map UO runs at the beginning of a timestep and generates a per-element/qp
# map of nucleus locations. The map is only regenerated if the mesh changed or
# the list of nuclei was modified.
# The map converts the nucleation points into finite area objects with a given radius.
type = DiscreteNucleationMap
periodic = c
inserter = inserter
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
[./ndof]
type = NumDOFs
[../]
[./rate]
type = DiscreteNucleationData
value = RATE
inserter = inserter
[../]
[./dtnuc]
type = DiscreteNucleationTimeStep
inserter = inserter
p2nucleus = 0.0005
dt_max = 10
[../]
[./update]
type = DiscreteNucleationData
value = UPDATE
inserter = inserter
[../]
[./count]
type = DiscreteNucleationData
value = COUNT
inserter = inserter
[../]
[]
[Adaptivity]
[./Indicators]
[./jump]
type = GradientJumpIndicator
variable = c
[../]
[../]
[./Markers]
[./nuc]
type = DiscreteNucleationMarker
map = map
[../]
[./grad]
type = ValueThresholdMarker
variable = jump
coarsen = 0.1
refine = 0.2
[../]
[./combo]
type = ComboMarker
markers = 'nuc grad'
[../]
[../]
marker = combo
cycles_per_step = 3
recompute_markers_during_cycles = true
max_h_level = 3
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu '
nl_max_its = 20
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-10
start_time = 0.0
num_steps = 120
[./TimeStepper]
type = IterationAdaptiveDT
dt = 10
growth_factor = 1.5
cutback_factor = 0.5
optimal_iterations = 8
iteration_window = 2
timestep_limiting_postprocessor = dtnuc
[../]
[]
[Outputs]
exodus = true
csv = true
print_linear_residuals = false
[]
(modules/navier_stokes/test/tests/finite_element/ins/block-restriction/two-mats-two-eqn-sets.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = 0
ymax = 1
nx = 16
ny = 8
elem_type = QUAD9
[]
[./corner_node_0]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_0'
coord = '0 0 0'
input = gen
[../]
[./corner_node_1]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_1'
coord = '1 0 0'
input = corner_node_0
[../]
[./subdomain1]
input = corner_node_1
type = SubdomainBoundingBoxGenerator
bottom_left = '1 0 0'
top_right = '2 1 0'
block_id = 1
[../]
[./break_boundary]
input = subdomain1
type = BreakBoundaryOnSubdomainGenerator
[../]
[./interface0]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '0'
paired_block = '1'
new_boundary = 'interface0'
[../]
[./interface1]
type = SideSetsBetweenSubdomainsGenerator
input = interface0
primary_block = '1'
paired_block = '0'
new_boundary = 'interface1'
[../]
[]
[Variables]
[velocity0]
order = SECOND
family = LAGRANGE_VEC
block = 0
[]
[T0]
order = SECOND
[InitialCondition]
type = ConstantIC
value = 1.0
[]
block = 0
[]
[p0]
block = 0
[]
[velocity1]
order = SECOND
family = LAGRANGE_VEC
block = 1
[]
[T1]
order = SECOND
[InitialCondition]
type = ConstantIC
value = 1.0
[]
block = 1
[]
[p1]
block = 1
[]
[]
[Kernels]
[./mass0]
type = INSADMass
variable = p0
block = 0
[../]
[./momentum_time0]
type = INSADMomentumTimeDerivative
variable = velocity0
block = 0
[../]
[./momentum_convection0]
type = INSADMomentumAdvection
variable = velocity0
block = 0
[../]
[./momentum_viscous0]
type = INSADMomentumViscous
variable = velocity0
block = 0
[../]
[./momentum_pressure0]
type = INSADMomentumPressure
variable = velocity0
pressure = p0
integrate_p_by_parts = true
block = 0
[../]
[./temperature_time0]
type = INSADHeatConductionTimeDerivative
variable = T0
block = 0
[../]
[./temperature_advection0]
type = INSADEnergyAdvection
variable = T0
block = 0
[../]
[./temperature_conduction0]
type = ADHeatConduction
variable = T0
thermal_conductivity = 'k'
block = 0
[../]
[./mass1]
type = INSADMass
variable = p1
block = 1
[../]
[./momentum_time1]
type = INSADMomentumTimeDerivative
variable = velocity1
block = 1
[../]
[./momentum_convection1]
type = INSADMomentumAdvection
variable = velocity1
block = 1
[../]
[./momentum_viscous1]
type = INSADMomentumViscous
variable = velocity1
block = 1
[../]
[./momentum_pressure1]
type = INSADMomentumPressure
variable = velocity1
pressure = p1
integrate_p_by_parts = true
block = 1
[../]
[./temperature_time1]
type = INSADHeatConductionTimeDerivative
variable = T1
block = 1
[../]
[./temperature_advection1]
type = INSADEnergyAdvection
variable = T1
block = 1
[../]
[./temperature_conduction1]
type = ADHeatConduction
variable = T1
thermal_conductivity = 'k'
block = 1
[../]
[]
[BCs]
[./no_slip0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'bottom_to_0 interface0 left'
[../]
[./lid0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'top_to_0'
function_x = 'lid_function0'
[../]
[./T_hot0]
type = DirichletBC
variable = T0
boundary = 'bottom_to_0'
value = 1
[../]
[./T_cold0]
type = DirichletBC
variable = T0
boundary = 'top_to_0'
value = 0
[../]
[./pressure_pin0]
type = DirichletBC
variable = p0
boundary = 'pinned_node_0'
value = 0
[../]
[./no_slip1]
type = VectorFunctionDirichletBC
variable = velocity1
boundary = 'bottom_to_1 interface1 right'
[../]
[./lid1]
type = VectorFunctionDirichletBC
variable = velocity1
boundary = 'top_to_1'
function_x = 'lid_function1'
[../]
[./T_hot1]
type = DirichletBC
variable = T1
boundary = 'bottom_to_1'
value = 1
[../]
[./T_cold1]
type = DirichletBC
variable = T1
boundary = 'top_to_1'
value = 0
[../]
[./pressure_pin1]
type = DirichletBC
variable = p1
boundary = 'pinned_node_1'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat0]
type = INSAD3Eqn
velocity = velocity0
pressure = p0
temperature = T0
block = 0
[]
[ins_mat1]
type = INSAD3Eqn
velocity = velocity1
pressure = p1
temperature = T1
block = 1
[]
[]
[Functions]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
[./lid_function0]
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[./lid_function1]
type = ParsedFunction
expression = '4*(x-1)*(2-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels -sub_pc_factor_shift_type'
petsc_options_value = 'asm 2 ilu 4 NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/postprocessor_dependency/element_side_pp.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 3
ny = 3
elem_type = QUAD9
[]
[Variables]
active = 'u v'
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 2.8
[../]
[../]
[./v]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 5.4
[../]
[../]
[]
[Functions]
active = 'force_fn exact_fn left_bc'
[./force_fn]
type = ParsedFunction
expression = '1-x*x+2*t'
[../]
[./exact_fn]
type = ParsedFunction
expression = '(1-x*x)*t'
[../]
[./left_bc]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
active = '
time_u diff_u ffn_u
time_v diff_v'
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'all_u left_v right_v'
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '1'
value = 0
[../]
[]
[Postprocessors]
[./sidepp]
type = SideIntegralVariablePostprocessor
variable = v
execute_on = timestep_end
boundary = '0 1 2 3'
[../]
[./passsidepp]
type = ElementSidePP
side_pp = sidepp
execute_on = timestep_end
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
end_time = 0.3
[]
[Outputs]
file_base = out
csv = true
[]
(modules/contact/test/tests/mortar_cartesian_lms/frictionless-mortar-3d.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
second_order = false
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[lm_z]
block = 'secondary_lower'
use_dual = true
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapCartesianLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
lm_z = lm_z
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
correct_edge_dropping = true
c = 1e+02
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_z]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_z
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Preconditioning]
[vcp]
type = VCP
full = true
lm_variable = 'lm_x lm_y lm_z'
primary_variable = 'disp_x disp_y disp_z'
preconditioner = 'LU'
is_lm_coupling_diagonal = true
adaptive_condensation = true
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = .5
dtmin = .01
solve_type = 'NEWTON'
petsc_options_iname = '-mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = '1e-5 NONZERO 1e-10'
l_max_its = 100
nl_max_its = 30
# nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
perf_graph = true
exodus = true
csv = true
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = lm_z
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = lm_z
sort_by = 'id'
execute_on = NONLINEAR
[]
[]
(modules/porous_flow/examples/flow_through_fractured_media/fine_thick_fracture_transient.i)
# Using a single-dimensional mesh
# Transient flow and solute transport along a fracture in a porous matrix
# advective dominated flow in the fracture and diffusion into the porous matrix
#
# Note that fine_thick_fracture_steady.i must be run to initialise the porepressure properly
[Mesh]
file = 'gold/fine_thick_fracture_steady_out.e'
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[pp]
initial_from_file_var = pp
initial_from_file_timestep = 1
[]
[massfrac0]
[]
[]
[AuxVariables]
[velocity_x]
family = MONOMIAL
order = CONSTANT
block = fracture
[]
[velocity_y]
family = MONOMIAL
order = CONSTANT
block = fracture
[]
[]
[AuxKernels]
[velocity_x]
type = PorousFlowDarcyVelocityComponent
variable = velocity_x
component = x
[]
[velocity_y]
type = PorousFlowDarcyVelocityComponent
variable = velocity_y
component = y
[]
[]
[Problem]
# massfrac0 has an initial condition despite the restart
allow_initial_conditions_with_restart = true
[]
[ICs]
[massfrac0]
type = ConstantIC
variable = massfrac0
value = 0
[]
[]
[BCs]
[top]
type = DirichletBC
value = 0
variable = massfrac0
boundary = top
[]
[bottom]
type = DirichletBC
value = 1
variable = massfrac0
boundary = bottom
[]
[ptop]
type = DirichletBC
variable = pp
boundary = top
value = 1e6
[]
[pbottom]
type = DirichletBC
variable = pp
boundary = bottom
value = 1.002e6
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[adv0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
[]
[diff0]
type = PorousFlowDispersiveFlux
fluid_component = 0
variable = pp
disp_trans = 0
disp_long = 0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = massfrac0
[]
[adv1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = massfrac0
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = massfrac0
disp_trans = 0
disp_long = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = massfrac0
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[poro_fracture]
type = PorousFlowPorosityConst
porosity = 1.0 # this is the true porosity of the fracture
block = 'fracture'
[]
[poro_matrix]
type = PorousFlowPorosityConst
porosity = 0.1
block = 'matrix1 matrix2'
[]
[diff1]
type = PorousFlowDiffusivityConst
diffusion_coeff = '1e-9 1e-9'
tortuosity = 1.0
block = 'fracture'
[]
[diff2]
type = PorousFlowDiffusivityConst
diffusion_coeff = '1e-9 1e-9'
tortuosity = 0.1
block = 'matrix1 matrix2'
[]
[relp]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[permeability1]
type = PorousFlowPermeabilityConst
permeability = '3e-8 0 0 0 3e-8 0 0 0 3e-8' # this is the true permeability of the fracture
block = 'fracture'
[]
[permeability2]
type = PorousFlowPermeabilityConst
permeability = '1e-20 0 0 0 1e-20 0 0 0 1e-20'
block = 'matrix1 matrix2'
[]
[]
[Functions]
[dt_controller]
type = PiecewiseConstant
x = '0 30 40 100 200 83200'
y = '0.01 0.1 1 10 100 32'
[]
[]
[Preconditioning]
active = basic
[mumps_is_best_for_parallel_jobs]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[basic]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu NONZERO 2 '
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 86400
#dt = 0.01
[TimeStepper]
type = FunctionDT
function = dt_controller
[]
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-9
[]
[VectorPostprocessors]
[xmass]
type = LineValueSampler
start_point = '0.4 0 0'
end_point = '0.5 0 0'
sort_by = x
num_points = 167
variable = massfrac0
[]
[]
[Outputs]
perf_graph = true
console = true
csv = true
exodus = true
[]
(modules/functional_expansion_tools/test/tests/standard_use/interface_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0.4
xmax = 2.4
nx = 30
ymin = 0.0
ymax = 10.0
ny = 20
[]
[Variables]
[./s]
[../]
[]
[Kernels]
[./diff_s]
type = Diffusion
variable = s
[../]
[./time_diff_s]
type = TimeDerivative
variable = s
[../]
[]
[ICs]
[./start_s]
type = ConstantIC
value = 2
variable = s
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = s
boundary = bottom
value = 0.1
[../]
[./interface_flux]
type = FXFluxBC
boundary = left
variable = s
function = FX_Basis_Flux_Sub
[../]
[]
[Functions]
[./FX_Basis_Value_Sub]
type = FunctionSeries
series_type = Cartesian
orders = '4'
physical_bounds = '0.0 10'
y = Legendre
[../]
[./FX_Basis_Flux_Sub]
type = FunctionSeries
series_type = Cartesian
orders = '5'
physical_bounds = '0.0 10'
y = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Sub]
type = FXBoundaryValueUserObject
function = FX_Basis_Value_Sub
variable = s
boundary = left
[../]
[./FX_Flux_UserObject_Sub]
type = FXBoundaryFluxUserObject
function = FX_Basis_Flux_Sub
variable = s
boundary = left
diffusivity = 1.0
[../]
[]
[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'
[]
(modules/porous_flow/test/tests/mass_conservation/mass10.i)
# Checking that the mass postprocessor throws the correct error when kernel_variable_numer is illegal
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[sat]
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[]
[ICs]
[pinit]
type = ConstantIC
value = 1
variable = pp
[]
[satinit]
type = FunctionIC
function = 1-x
variable = sat
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = sat
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp sat'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 1
thermal_expansion = 0
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 0.1
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = pp
phase1_saturation = sat
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[]
[Postprocessors]
[comp1_total_mass]
type = PorousFlowFluidMass
fluid_component = 1
kernel_variable_number = 2
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
(test/tests/ics/check_error/two_ics_on_same_block.i)
[Mesh]
type = FileMesh
file = 'rectangle.e'
[]
[Variables]
[./u]
[../]
[]
[ICs]
[./block]
type = ConstantIC
variable = u
block = 1
value = 0.5
[../]
[./block2]
type = ConstantIC
variable = u
block = 1
value = 2
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[Executioner]
type = Steady
[]
(modules/richards/test/tests/gravity_head_2/gh06.i)
# unsaturated = true
# gravity = true
# supg = false
# transient = true
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmin = 0
xmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1E-2 1E-1 1E0 1E1 1E3 1E4 1E5 1E6 1E7'
x = '0 1E-1 1E0 1E1 1E2 1E3 1E4 1E5 1E6'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 1.0E2
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 0.5
bulk_mod = 0.5E2
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.0
n = 3
[../]
[./SatWater]
type = RichardsSat
s_res = 0.1
sum_s_res = 0.15
[../]
[./SatGas]
type = RichardsSat
s_res = 0.05
sum_s_res = 0.15
[../]
[./SUPGwater]
type = RichardsSUPGnone
[../]
[./SUPGgas]
type = RichardsSUPGnone
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./water_ic]
type = ConstantIC
value = 1
variable = pwater
[../]
[./gas_ic]
type = ConstantIC
value = 2
variable = pgas
[../]
[]
[Kernels]
active = 'richardsfwater richardstwater richardsfgas richardstgas'
[./richardstwater]
type = RichardsMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFlux
variable = pwater
[../]
[./richardstgas]
type = RichardsMassChange
variable = pgas
[../]
[./richardsfgas]
type = RichardsFlux
variable = pgas
[../]
[]
[AuxVariables]
[./seffgas]
[../]
[./seffwater]
[../]
[]
[AuxKernels]
[./seffgas_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffGas
variable = seffgas
[../]
[./seffwater_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffWater
variable = seffwater
[../]
[]
[Postprocessors]
[./mwater_init]
type = RichardsMass
variable = pwater
execute_on = timestep_begin
outputs = none
[../]
[./mgas_init]
type = RichardsMass
variable = pgas
execute_on = timestep_begin
outputs = none
[../]
[./mwater_fin]
type = RichardsMass
variable = pwater
execute_on = timestep_end
outputs = none
[../]
[./mgas_fin]
type = RichardsMass
variable = pgas
execute_on = timestep_end
outputs = none
[../]
[./mass_error_water]
type = FunctionValuePostprocessor
function = fcn_mass_error_w
[../]
[./mass_error_gas]
type = FunctionValuePostprocessor
function = fcn_mass_error_g
[../]
[./pw_left]
type = PointValue
point = '0 0 0'
variable = pwater
outputs = none
[../]
[./pw_right]
type = PointValue
point = '1 0 0'
variable = pwater
outputs = none
[../]
[./error_water]
type = FunctionValuePostprocessor
function = fcn_error_water
[../]
[./pg_left]
type = PointValue
point = '0 0 0'
variable = pgas
outputs = none
[../]
[./pg_right]
type = PointValue
point = '1 0 0'
variable = pgas
outputs = none
[../]
[./error_gas]
type = FunctionValuePostprocessor
function = fcn_error_gas
[../]
[]
[Functions]
[./fcn_mass_error_w]
type = ParsedFunction
expression = 'abs(0.5*(mi-mf)/(mi+mf))'
symbol_names = 'mi mf'
symbol_values = 'mwater_init mwater_fin'
[../]
[./fcn_mass_error_g]
type = ParsedFunction
expression = 'abs(0.5*(mi-mf)/(mi+mf))'
symbol_names = 'mi mf'
symbol_values = 'mgas_init mgas_fin'
[../]
[./fcn_error_water]
type = ParsedFunction
expression = 'abs((-b*log(-(gdens0*xval+(-b*exp(-p0/b)))/b)-p1)/p1)'
symbol_names = 'b gdens0 p0 xval p1'
symbol_values = '1E2 -1 pw_left 1 pw_right'
[../]
[./fcn_error_gas]
type = ParsedFunction
expression = 'abs((-b*log(-(gdens0*xval+(-b*exp(-p0/b)))/b)-p1)/p1)'
symbol_names = 'b gdens0 p0 xval p1'
symbol_values = '0.5E2 -0.5 pg_left 1 pg_right'
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
density_UO = 'DensityWater DensityGas'
relperm_UO = 'RelPermWater RelPermGas'
SUPG_UO = 'SUPGwater SUPGgas'
sat_UO = 'SatWater SatGas'
seff_UO = 'SeffWater SeffGas'
viscosity = '1E-3 0.5E-3'
gravity = '-1 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-13 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = gh06
csv = true
[]
(modules/peridynamics/test/tests/failure_tests/2D_stretch_failure_BPD.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = PeridynamicsMesh
horizon_number = 3
cracks_start = '0.25 0.5 0'
cracks_end = '0.75 0.5 0'
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 8
ny = 8
[../]
[./gpd]
type = MeshGeneratorPD
input = gmg
retain_fe_mesh = false
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[AuxVariables]
[./damage]
[../]
[./intact_bonds_num]
[../]
[./critical_stretch]
family = MONOMIAL
order = CONSTANT
[../]
[]
[AuxKernels]
[./bond_status]
type = StretchBasedFailureCriterionPD
critical_variable = critical_stretch
variable = bond_status
[../]
[]
[UserObjects]
[./damage]
type = NodalDamageIndexPD
variable = damage
[../]
[./intact_bonds]
type = NodalNumIntactBondsPD
variable = intact_bonds_num
[../]
[]
[ICs]
[./critical_stretch]
type = ConstantIC
variable = critical_stretch
value = 0.001
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 1003
value = 0.0
[../]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = 1002
value = 0.0
[../]
[./bottom_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 1000
function = '-0.001*t'
[../]
[./rbm_x]
type = RBMPresetOldValuePD
variable = disp_x
boundary = 999
[../]
[./rbm_y]
type = RBMPresetOldValuePD
variable = disp_y
boundary = 999
[../]
[]
[Modules/Peridynamics/Mechanics/Master]
[./all]
formulation = BOND
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2e5
poissons_ratio = 0.33
[../]
[./force_density]
type = ComputeSmallStrainConstantHorizonMaterialBPD
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
start_time = 0
dt = 0.5
end_time = 1
[]
[Outputs]
file_base = 2D_stretch_failure_BPD
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'
[]
[]
(tutorials/tutorial03_verification/app/test/tests/step04_mms/2d_main.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
ymax = 0
ymin = -0.2
nx = 20
ny = 4
[]
[]
[Variables]
[T]
[]
[]
[ICs]
[T_O]
type = ConstantIC
variable = T
value = 263.15
[]
[]
[Functions]
[source]
type = ParsedFunction
symbol_names = 'hours shortwave kappa'
symbol_values = '9 650 40'
expression = 'shortwave*sin(0.5*x*pi)*exp(kappa*y)*sin(1/(hours*3600)*pi*t)'
[]
[]
[Kernels]
[T_time]
type = HeatConductionTimeDerivative
variable = T
density_name = 150
specific_heat = 2000
[]
[T_cond]
type = HeatConduction
variable = T
diffusion_coefficient = 0.01
[]
[T_source]
type = HeatSource
variable = T
function = source
[]
[]
[BCs]
[top]
type = NeumannBC
boundary = top
variable = T
value = -5
[]
[bottom]
type = DirichletBC
boundary = bottom
variable = T
value = 263.15
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
dt = 600 # 10 min
end_time = 32400 # 9 hour
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d_pg.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[mortar_normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[aux_lm]
block = 'secondary_lower'
use_dual = false
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_petrov_galerkin = true
aux_lm = aux_lm
[]
[]
[Constraints]
[normal_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = .5
dtmin = .01
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15 1e-5'
l_max_its = 100
nl_max_its = 30
nl_abs_tol = 1e-12
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[contact]
type = ContactDOFSetSize
variable = mortar_normal_lm
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[lambda]
type = ElementAverageValue
variable = mortar_normal_lm
block = 'secondary_lower'
[]
[]
(modules/contact/test/tests/fieldsplit/frictional_mortar_FS.i)
offset = 0.021
vy = 0.15
vx = 0.04
refine = 1
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
[original_file_mesh]
type = FileMeshGenerator
file = long_short_blocks.e
[]
uniform_refine = ${refine}
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
use_automatic_differentiation = true
[]
[]
[Functions]
[horizontal_movement]
type = ParsedFunction
expression = 'if(t<0.5,${vx}*t-${offset},${vx}-${offset})'
[]
[vertical_movement]
type = ParsedFunction
expression = 'if(t<0.5,${offset},${vy}*(t-0.5)+${offset})'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 30
function = horizontal_movement
preset = false
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = '40'
value = 0.0
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = '30'
function = vertical_movement
preset = false
[]
[]
[Materials]
[elasticity_tensor_left]
type = ADComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_left]
type = ADComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ADComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_right]
type = ADComputeFiniteStrainElasticStress
block = 2
[]
[]
[Contact]
[leftright]
secondary = 10
primary = 20
model = coulomb
friction_coefficient = 0.2
formulation = mortar
c_normal = 1e5
c_tangential = 1e4
[]
[]
[ICs]
[disp_y]
block = 1
variable = disp_y
value = ${offset}
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = -${offset}
type = ConstantIC
[]
[]
[Preconditioning]
[FSP]
type = FSP
topsplit = 'contact_interior'
[contact_interior]
splitting = 'interior contact'
splitting_type = schur
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart -pc_fieldsplit_schur_fact_type -mat_mffd_err'
petsc_options_value = '200 full 1e-5'
schur_pre = 'S'
[]
[interior]
vars = 'disp_x disp_y'
petsc_options_iname = '-ksp_type -pc_type -pc_hypre_type '
petsc_options_value = 'gmres hypre boomeramg'
[]
[contact]
vars = 'leftright_normal_lm leftright_tangential_lm'
[]
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
end_time = 1
abort_on_solve_fail = true
l_max_its = 200
nl_abs_tol = 1e-8
line_search = 'none'
nl_max_its = 20
[]
[Outputs]
exodus = true
[]
(modules/functional_expansion_tools/test/tests/standard_use/multiapp_different_physical_boundaries.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '1.0 9.0'
x = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
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 = multiapp_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_temperature_coefficients_function.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 2
nz = 2
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 10.0
ymax = 1.0
zmax = 1.0
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = '100'
nodes = '3 69'
input = gen
[]
[corner_node_2]
type = ExtraNodesetGenerator
new_boundary = '101'
nodes = '4 47'
input = corner_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[temperature]
order = CONSTANT
family = MONOMIAL
[]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xz]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[temperature]
type = ConstantAux
variable = temperature
value = 50
[]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[creep_strain_xx]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xx
index_i = 0
index_j = 0
[]
[creep_strain_xy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xy
index_i = 0
index_j = 1
[]
[creep_strain_yy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yy
index_i = 1
index_j = 1
[]
[creep_strain_zz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_zz
index_i = 2
index_j = 2
[]
[creep_strain_xz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xz
index_i = 0
index_j = 2
[]
[creep_strain_yz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yz
index_i = 1
index_j = 2
[]
[sigma_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 1
index_j = 1
[]
[]
[ICs]
[temp]
type = ConstantIC
variable = temperature
value = 50.0
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1.0e-9 1.0'
y = '0 -4e1 -4e1'
[]
[F]
type = PiecewiseLinear
x = '-1000 10000'
y = '0.5 0.5'
[]
[G]
type = PiecewiseLinear
x = '-1000 10000'
y = '0.5 0.5'
[]
[H]
type = PiecewiseLinear
x = '-1000 10000'
y = '0.5 0.5'
[]
[L]
type = PiecewiseLinear
x = '-1000 10000'
y = '1.5 1.5'
[]
[M]
type = PiecewiseLinear
x = '-1000 10000'
y = '1.5 1.5'
[]
[N]
type = PiecewiseLinear
x = '-1000 10000'
y = '1.5 1.5'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_xx stress_xx'
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 700
poissons_ratio = 0.0
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = 'trial_creep_aniso_iso'
max_iterations = 50
[]
[hill_constants]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5 0.5 0.5 1.5 1.5 1.5"
function_names = 'F G H L M N'
temperature = temperature
[]
[trial_creep_aniso_iso]
type = ADHillCreepStressUpdate
coefficient = 1e-16
n_exponent = 9
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 0.00003
relative_tolerance = 1e-20
absolute_tolerance = 1e-20
internal_solve_output_on = never
# Force it to not use integration error
max_integration_error = 1.0
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = 100
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = 101
value = 0.0
[]
[Pressure]
[Side1]
boundary = right
function = pull
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-13
nl_abs_tol = 1.0e-14
l_max_its = 90
num_steps = 50
dt = 5.0e-4
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[creep_strain_xx]
type = ElementalVariableValue
variable = creep_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_yy]
type = ElementalVariableValue
variable = creep_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_zz]
type = ElementalVariableValue
variable = creep_strain_zz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_xy]
type = ElementalVariableValue
variable = creep_strain_xy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_yz]
type = ElementalVariableValue
variable = creep_strain_yz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_xz]
type = ElementalVariableValue
variable = creep_strain_xz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_xx]
type = ElementalVariableValue
variable = elastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_xx]
type = ElementalVariableValue
variable = stress_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[]
[Outputs]
csv = true
exodus = true
perf_graph = true
[]
(modules/chemical_reactions/test/tests/thermochimica/MoRuPd.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 1
ny = 1
[]
[]
[GlobalParams]
elements = 'Mo Ru Pd'
output_phases = 'BCCN HCPN'
output_species = 'HCPN:Pd'
output_element_potentials = 'mu:Pd'
output_vapor_pressures = 'vp:gas_ideal:Pd'
output_element_phases = 'ep:BCCN:Pd'
[]
[ChemicalComposition]
[thermo]
thermofile = Kaye_NobleMetals.dat
tunit = K
punit = atm
munit = moles
temperature = 2250
output_species_unit = mole_fraction
[]
[]
[ICs]
[Mo]
type = FunctionIC
variable = Mo
function = '800*(1-x)+4.3*x'
[]
[Ru]
type = FunctionIC
variable = Ru
function = '200*(1-x)+4.5*x'
[]
[Pd]
type = ConstantIC
variable = Pd
value = 1.0e-8
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/richards/test/tests/rogers_stallybrass_clements/rsc_fu_02.i)
# RSC test with low-res time and spatial resolution
[Mesh]
type = GeneratedMesh
dim = 2
nx = 200
ny = 1
xmin = 0
xmax = 10 # x is the depth variable, called zeta in RSC
ymin = 0
ymax = 0.05
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = 'DensityWater DensityOil'
relperm_UO = 'RelPerm RelPerm'
SUPG_UO = 'SUPGstandard SUPGstandard'
sat_UO = 'Saturation Saturation'
seff_UO = 'SeffWater SeffOil'
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '3E-2 5E-1 8E-1'
x = '0 1 5'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater poil'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 10
bulk_mod = 2E9
[../]
[./DensityOil]
type = RichardsDensityConstBulk
dens0 = 20
bulk_mod = 2E9
[../]
[./SeffWater]
type = RichardsSeff2waterRSC
oil_viscosity = 2E-3
scale_ratio = 2E3
shift = 10
[../]
[./SeffOil]
type = RichardsSeff2gasRSC
oil_viscosity = 2E-3
scale_ratio = 2E3
shift = 10
[../]
[./RelPerm]
type = RichardsRelPermMonomial
simm = 0
n = 1
[../]
[./Saturation]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1.0E-2
[../]
[]
[Variables]
[./pwater]
[../]
[./poil]
[../]
[]
[ICs]
[./water_init]
type = ConstantIC
variable = pwater
value = 0
[../]
[./oil_init]
type = ConstantIC
variable = poil
value = 15
[../]
[]
[Kernels]
[./richardstwater]
type = RichardsMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFullyUpwindFlux
variable = pwater
[../]
[./richardstoil]
type = RichardsMassChange
variable = poil
[../]
[./richardsfoil]
type = RichardsFullyUpwindFlux
variable = poil
[../]
[]
[AuxVariables]
[./SWater]
[../]
[./SOil]
[../]
[]
[AuxKernels]
[./Seff1VGwater_AuxK]
type = RichardsSeffAux
variable = SWater
seff_UO = SeffWater
pressure_vars = 'pwater poil'
[../]
[./Seff1VGoil_AuxK]
type = RichardsSeffAux
variable = SOil
seff_UO = SeffOil
pressure_vars = 'pwater poil'
[../]
[]
[BCs]
# we are pumping water into a system that has virtually incompressible fluids, hence the pressures rise enormously. this adversely affects convergence because of almost-overflows and precision-loss problems. The fixed things help keep pressures low and so prevent these awful behaviours. the movement of the saturation front is the same regardless of the fixed things.
active = 'recharge fixedoil fixedwater'
[./recharge]
type = RichardsPiecewiseLinearSink
variable = pwater
boundary = 'left'
pressures = '-1E10 1E10'
bare_fluxes = '-1 -1'
use_mobility = false
use_relperm = false
[../]
[./fixedwater]
type = DirichletBC
variable = pwater
boundary = 'right'
value = 0
[../]
[./fixedoil]
type = DirichletBC
variable = poil
boundary = 'right'
value = 15
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.25
mat_permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
viscosity = '1E-3 2E-3'
gravity = '0E-0 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
active = 'andy'
[./andy]
type = SMP
full = true
petsc_options = ''
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
petsc_options = '-snes_converged_reason'
end_time = 5
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = rsc_fu_02
time_step_interval = 100000
execute_on = 'initial timestep_end final'
exodus = true
[]
(modules/contact/test/tests/bouncing-block-contact/frictional-nodal-min-normal-lm-mortar-pdass-tangential-lm-mortar-disp.i)
starting_point = 2e-1
# We offset slightly so we avoid the case where the bottom of the secondary block and the top of the
# primary block are perfectly vertically aligned which can cause the backtracking line search some
# issues for a coarse mesh (basic line search handles that fine)
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
[file_mesh]
type = FileMeshGenerator
file = long-bottom-block-1elem-blocks-coarse.e
[]
[]
[Variables]
[disp_x]
block = '1 2'
# order = SECOND
[]
[disp_y]
block = '1 2'
# order = SECOND
[]
[frictional_normal_lm]
block = 3
use_dual = true
[]
[frictional_tangential_lm]
block = 3
use_dual = true
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[UserObjects]
[weighted_velocities_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable_normal = frictional_normal_lm
lm_variable_tangential_one = frictional_tangential_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[frictional_normal_lm]
type = ComputeFrictionalForceLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_normal_lm
friction_lm = frictional_tangential_lm
disp_x = disp_x
disp_y = disp_y
mu = 0.1
c = 1.0e-2
c_t = 1.0e-1
weighted_gap_uo = weighted_velocities_uo
weighted_velocities_uo = weighted_velocities_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_velocities_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_velocities_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_velocities_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_velocities_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[]
(modules/contact/test/tests/mortar_dynamics/block-dynamics-action.i)
starting_point = 2e-1
offset = -0.19
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = long-bottom-block-no-lower-d.e
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_yy'
strain = FINITE
block = '1 2'
stiffness_damping_coefficient = 1.0
hht_alpha = 0.0
[]
[inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[strain]
type = ComputeFiniteStrain
block = '1 2'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '7750'
[]
[]
[AuxVariables]
[vel_x]
block = '1 2'
[]
[accel_x]
block = '1 2'
[]
[vel_y]
block = '1 2'
[]
[accel_y]
block = '1 2'
[]
[vel_z]
block = '1 2'
[]
[accel_z]
block = '1 2'
[]
[]
[AuxKernels]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = 'LINEAR timestep_end'
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = 'LINEAR timestep_end'
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = 'LINEAR timestep_end'
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = 'LINEAR timestep_end'
[]
[]
[Contact]
[mechanical]
primary = 20
secondary = 10
formulation = mortar
model = frictionless
c_normal = 1e4
capture_tolerance = 1.0e-5
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 75
dt = 0.05
dtmin = .05
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err '
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = false
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = ''
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[]
(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/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/functional_expansion_tools/test/tests/standard_use/multiapp_print_coefficients.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
print_when_set = true # Print coefficients when a MultiAppFXTransfer is executed
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
print_state = true # Print after the FX coefficients are computer
print_when_set = true # Print coefficients when a MultiAppFXTransfer is executed
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
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 = multiapp_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/richards/test/tests/gravity_head_2/gh_lumped_17.i)
# unsaturated = false
# gravity = true
# supg = true
# transient = true
# lumped = true
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmin = 0
xmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = 'DensityWater DensityGas'
relperm_UO = 'RelPermWater RelPermGas'
SUPG_UO = 'SUPGwater SUPGgas'
sat_UO = 'SatWater SatGas'
seff_UO = 'SeffWater SeffGas'
viscosity = '1E-3 0.5E-3'
gravity = '-1 0 0'
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1E-2 1E-1 1E0 1E1 1E3 1E4 1E5 1E6 1E7'
x = '0 1E-1 1E0 1E1 1E2 1E3 1E4 1E5 1E6'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 1.0E2
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 0.5
bulk_mod = 0.5E2
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.0
n = 3
[../]
[./SatWater]
type = RichardsSat
s_res = 0.1
sum_s_res = 0.15
[../]
[./SatGas]
type = RichardsSat
s_res = 0.05
sum_s_res = 0.15
[../]
[./SUPGwater]
type = RichardsSUPGstandard
p_SUPG = 0.1
[../]
[./SUPGgas]
type = RichardsSUPGstandard
p_SUPG = 0.01
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./water_ic]
type = ConstantIC
value = 1
variable = pwater
[../]
[./gas_ic]
type = ConstantIC
value = 1
variable = pgas
[../]
[]
[Kernels]
active = 'richardsfwater richardstwater richardsfgas richardstgas'
[./richardstwater]
type = RichardsLumpedMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFlux
variable = pwater
[../]
[./richardstgas]
type = RichardsLumpedMassChange
variable = pgas
[../]
[./richardsfgas]
type = RichardsFlux
variable = pgas
[../]
[]
[AuxVariables]
[./seffgas]
[../]
[./seffwater]
[../]
[]
[AuxKernels]
[./seffgas_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffGas
variable = seffgas
[../]
[./seffwater_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffWater
variable = seffwater
[../]
[]
[Postprocessors]
[./mwater_init]
type = RichardsMass
variable = pwater
execute_on = timestep_begin
outputs = none
[../]
[./mgas_init]
type = RichardsMass
variable = pgas
execute_on = timestep_begin
outputs = none
[../]
[./mwater_fin]
type = RichardsMass
variable = pwater
execute_on = timestep_end
outputs = none
[../]
[./mgas_fin]
type = RichardsMass
variable = pgas
execute_on = timestep_end
outputs = none
[../]
[./mass_error_water]
type = FunctionValuePostprocessor
function = fcn_mass_error_w
[../]
[./mass_error_gas]
type = FunctionValuePostprocessor
function = fcn_mass_error_g
[../]
[./pw_left]
type = PointValue
point = '0 0 0'
variable = pwater
outputs = none
[../]
[./pw_right]
type = PointValue
point = '1 0 0'
variable = pwater
outputs = none
[../]
[./error_water]
type = FunctionValuePostprocessor
function = fcn_error_water
[../]
[]
[Functions]
[./fcn_mass_error_w]
type = ParsedFunction
expression = 'abs(0.5*(mi-mf)/(mi+mf))'
symbol_names = 'mi mf'
symbol_values = 'mwater_init mwater_fin'
[../]
[./fcn_mass_error_g]
type = ParsedFunction
expression = 'abs(0.5*(mi-mf)/(mi+mf))'
symbol_names = 'mi mf'
symbol_values = 'mgas_init mgas_fin'
[../]
[./fcn_error_water]
type = ParsedFunction
expression = 'abs((-b*log(-(gdens0*xval+(-b*exp(-p0/b)))/b)-p1)/p1)'
symbol_names = 'b gdens0 p0 xval p1'
symbol_values = '1E2 -1 pw_left 1 pw_right'
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-15 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = gh_lumped_17
csv = true
[]
(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/fluid_properties/test/tests/ics/rho_vapor_mixture_from_pressure_temperature/test.i)
# Tests the initial condition for mixture density from pressure and temperature.
# This test uses the general vapor mixture fluid properties with steam, air,
# and helium with mass fractions 0.5, 0.3, and 0.2, respectively. The individual
# specific volumes (in m^3/kg) at p = 100 kPa, T = 500 K are:
# steam: 2.298113001
# air: 1.43525
# helium: 10.3855
# For the general vapor mixture, the mixture specific volume is computed as
# v = \sum\limits_i x_i v_i ,
# where x_i is the mass fraction of component i, and v_i is the specific volume
# of component i. Therefore, the correct value for specific volume of the mixture is
# v = 3.65673150050 m^3/kg
# and thus density is
# rho = 0.27346825980066236 kg/m^3
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
allow_renumbering = false
[]
[FluidProperties]
[fp_steam]
type = StiffenedGasFluidProperties
gamma = 1.43
cv = 1040.0
q = 2.03e6
p_inf = 0.0
q_prime = -2.3e4
k = 0.026
mu = 134.4e-7
M = 0.01801488
rho_c = 322.0
[]
[fp_air]
type = IdealGasFluidProperties
gamma = 1.4
molar_mass = 28.965197004e-3
[]
[fp_helium]
type = IdealGasFluidProperties
gamma = 1.66
molar_mass = 4.002917432959e-3
[]
[fp_vapor_mixture]
type = IdealRealGasMixtureFluidProperties
fp_primary = fp_steam
fp_secondary = 'fp_air fp_helium'
[]
[]
[AuxVariables]
[rho]
[]
[p]
[]
[T]
[]
[x_air]
[]
[x_helium]
[]
[]
[ICs]
[rho_ic]
type = RhoVaporMixtureFromPressureTemperatureIC
variable = rho
p = p
T = T
x_secondary_vapors = 'x_air x_helium'
fp_vapor_mixture = fp_vapor_mixture
[]
[p_ic]
type = ConstantIC
variable = p
value = 100e3
[]
[T_ic]
type = ConstantIC
variable = T
value = 500
[]
[x_air_ic]
type = ConstantIC
variable = x_air
value = 0.3
[]
[x_helium_ic]
type = ConstantIC
variable = x_helium
value = 0.2
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[rho_test]
type = ElementalVariableValue
elementid = 0
variable = rho
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
csv = true
execute_on = 'INITIAL'
[]
[Problem]
solve = false
[]
(test/tests/time_integrators/convergence/implicit_convergence.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 4
ny = 4
elem_type = QUAD9
[]
[Variables]
active = 'u'
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[./forcing_fn]
type = ParsedFunction
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
preset = false
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
start_time = 0.0
end_time = 1.0
dt = 0.0625
[./TimeIntegrator]
type = ImplicitMidpoint
[../]
[]
[Outputs]
execute_on = 'initial timestep_end'
exodus = true
[]
(modules/porous_flow/test/tests/desorption/desorption02.i)
# Illustrates desorption works as planned.
#
# A mesh contains 3 elements in arranged in a line.
# The central element contains desorped fluid.
# This desorps to the nodes of that element.
#
# In the central element, of volume V, the following occurs.
# The initial porepressure=1, and concentration=1.
# The initial mass of fluid is
# V * (2 * porosity * density + (1 - porosity) * concentration)
# = V * 1.289547
# Notice the factor of "2" in the porespace contribution:
# it is because the porepressure is evaluated at nodes, so
# the nodes on the exterior of the centre_block have
# nodal-volume contributions from the elements not in centre_block.
#
# The mass-conservation equation reads
# 2 * porosity * density + (1 - porosity) * concentration = 1.289547
# and the desorption equation reads
# d( (1-porosity)C )/dt = - (1/tau)(C - dens_L * P / (P_L + P))
# where C = concentration, P = porepressure, P_L = Langmuir pressure
# dens_L = Langmuir density, tau = time constant.
# Using the mass-conservation equation in the desorption equation
# yields a nonlinear equation of P. For dt=1, and the numerical values
# given below this yields
# P = 1.83697
# and
# C = 0.676616
# The desired result is achieved by MOOSE
[Mesh]
type = FileMesh
file = three_eles.e
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[conc]
family = MONOMIAL
order = CONSTANT
block = centre_block
[]
[]
[ICs]
[p_ic]
type = ConstantIC
variable = pp
value = 1.0
[]
[conc_ic]
type = ConstantIC
variable = conc
value = 1.0
block = centre_block
[]
[]
[Kernels]
[porespace_mass_dot]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[fluid_flow]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
gravity = '0 0 0'
[]
[desorped_mass_dot]
type = PorousFlowDesorpedMassTimeDerivative
block = centre_block
conc_var = conc
variable = pp
[]
[desorped_mass_dot_conc_var]
type = PorousFlowDesorpedMassTimeDerivative
block = centre_block
conc_var = conc
variable = conc
[]
[flow_from_matrix]
type = DesorptionFromMatrix
block = centre_block
variable = conc
pressure_var = pp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp conc'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.5
viscosity = 1
density0 = 1
thermal_expansion = 0
[]
[]
[Materials]
[lang_stuff]
type = LangmuirMaterial
block = centre_block
one_over_adsorption_time_const = 10.0
one_over_desorption_time_const = 10.0
langmuir_density = 1
langmuir_pressure = 1
pressure_var = pp
conc_var = conc
[]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0 0 0 0 0 0 0 0 0'
[]
[relperm]
type = PorousFlowRelativePermeabilityFLAC
m = 1
phase = 0
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_external_app_1phase/phy.T_wall_transfer_elem_3eqn.parent.i)
# This tests a temperature transfer using the MultiApp system. Simple heat
# conduction problem is solved, then the layered average is computed and
# transferred into the child side of the solve
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 1
nx = 10
parallel_type = replicated
[]
[Functions]
[left_bc_fn]
type = PiecewiseLinear
x = '0 1'
y = '300 310'
[]
[]
[Variables]
[T]
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T
value = 300
[]
[]
[Kernels]
[td]
type = TimeDerivative
variable = T
[]
[diff]
type = Diffusion
variable = T
[]
[]
[BCs]
[left]
type = FunctionDirichletBC
variable = T
boundary = left
function = left_bc_fn
[]
[]
[UserObjects]
[T_avg_uo]
type = LayeredAverage
variable = T
direction = x
num_layers = 5
[]
[]
[Executioner]
type = Transient
dt = 0.5
end_time = 5
nl_abs_tol = 1e-10
abort_on_solve_fail = true
[]
[MultiApps]
[thm]
type = TransientMultiApp
app_type = ThermalHydraulicsApp
input_files = phy.T_wall_transfer_elem_3eqn.child.i
execute_on = TIMESTEP_END
[]
[]
[Transfers]
[T_to_child]
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = thm
source_user_object = T_avg_uo
variable = T_wall
greedy_search = true
use_bounding_boxes = false
error_on_miss = true
[]
[]
[Outputs]
exodus = true
[]
(test/tests/time_integrators/crank-nicolson/cranic.i)
#
# Testing a solution that is second order in space and second order in time
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 2*t*((x*x)+(y*y))-(4*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'crank-nicolson'
start_time = 0.0
num_steps = 5
dt = 0.25
# [./Adaptivity]
# refine_fraction = 0.2
# coarsen_fraction = 0.3
# max_h_level = 4
# [../]
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/bouncing-block-contact/ping-ponging/kinematic-ping-pong.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-no-lower-d.e
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = false
use_automatic_differentiation = true
strain = SMALL
[]
[]
[Materials]
[elasticity]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e0
poissons_ratio = 0.3
[]
[stress]
type = ADComputeLinearElasticStress
[]
[]
[Contact]
[leftright]
secondary = 10
primary = 20
model = frictionless
formulation = kinematic
penalty = 1e0
[]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[../]
[]
[Executioner]
type = Transient
num_steps = 19
end_time = 200
dt = 5
dtmin = 5
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type -mat_mffd_err'
petsc_options_value = 'hypre boomeramg 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exo]
type = Exodus
[]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(test/tests/postprocessors/element_integral_var_pps/initial_pps.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 3
ny = 3
elem_type = QUAD9
[]
[Variables]
active = 'u v'
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 2.8
[../]
[../]
[./v]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 5.4
[../]
[../]
[]
[Functions]
active = 'force_fn exact_fn left_bc'
[./force_fn]
type = ParsedFunction
expression = '1-x*x+2*t'
[../]
[./exact_fn]
type = ParsedFunction
expression = '(1-x*x)*t'
[../]
[./left_bc]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
active = '
time_u diff_u ffn_u
time_v diff_v'
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'all_u left_v right_v'
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '1'
value = 0
[../]
[]
[Postprocessors]
[./initial_u]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = initial
[../]
[./initial_v]
type = ElementIntegralVariablePostprocessor
variable = v
execute_on = initial
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
end_time = 0.3
[]
[Outputs]
file_base = out_initial_pps
exodus = true
[]
(modules/phase_field/test/tests/actions/both_direct_2vars.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 9
ny = 6
xmin = 10
xmax = 40
ymin = 15
ymax = 35
elem_type = QUAD
[]
[Modules]
[./PhaseField]
[./Conserved]
[./c]
free_energy = F
mobility = 1.0
kappa = 20.0
coupled_variables = 'eta'
solve_type = direct
[../]
[../]
[./Nonconserved]
[./eta]
free_energy = F
mobility = 1.0
kappa = 20
coupled_variables = 'c'
family = HERMITE
order = THIRD
[../]
[../]
[../]
[]
[ICs]
[./c_IC]
type = BoundingBoxIC
variable = c
x1 = 10
x2 = 25
y1 = 15
y2 = 35
inside = 0.1
outside = 0.9
[../]
[./eta_IC]
type = ConstantIC
variable = eta
value = 0.5
[../]
[]
[Materials]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'eta c'
expression = '(1 - eta)*10.0*(c - 0.1)^2 + eta*(8.0*(c - 0.9)^2) + 10.0*eta^2*(1-eta)^2'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-11
start_time = 0.0
num_steps = 5
dt = 0.05
[]
[Outputs]
perf_graph = true
[./out]
type = Exodus
refinements = 2
[../]
[]
(test/tests/postprocessors/function_value_pps/function_value_pps.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
[]
[AuxVariables]
[./v]
[../]
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./constant_func]
type = ConstantFunction
value = 2.798
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
variable = u
value = 2
[../]
[]
[AuxKernels]
[./one]
type = ConstantAux
variable = v
value = 1
execute_on = 'initial timestep_end'
[../]
[]
[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]
[./value1]
type = FunctionValuePostprocessor
function = constant_func
execute_on = 'initial timestep_end'
[../]
[./value2]
type = FunctionValuePostprocessor
function = 2*t
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
num_steps = 5
[]
[Outputs]
csv = true
[]
[Problem]
solve = false
[]
(modules/porous_flow/test/tests/poroperm/PermFromPoro03.i)
# Testing permeability from porosity
# Trivial test, checking calculated permeability is correct
# k = k_anisotropic * B * exp(A * phi)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 3
[]
[GlobalParams]
block = 0
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[InitialCondition]
type = ConstantIC
value = 0
[]
[]
[]
[Kernels]
[flux]
type = PorousFlowAdvectiveFlux
gravity = '0 0 0'
variable = pp
[]
[]
[BCs]
[ptop]
type = DirichletBC
variable = pp
boundary = right
value = 0
[]
[pbase]
type = DirichletBC
variable = pp
boundary = left
value = 1
[]
[]
[AuxVariables]
[poro]
order = CONSTANT
family = MONOMIAL
[]
[perm_x]
order = CONSTANT
family = MONOMIAL
[]
[perm_y]
order = CONSTANT
family = MONOMIAL
[]
[perm_z]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[poro]
type = PorousFlowPropertyAux
property = porosity
variable = poro
[]
[perm_x]
type = PorousFlowPropertyAux
property = permeability
variable = perm_x
row = 0
column = 0
[]
[perm_y]
type = PorousFlowPropertyAux
property = permeability
variable = perm_y
row = 1
column = 1
[]
[perm_z]
type = PorousFlowPropertyAux
property = permeability
variable = perm_z
row = 2
column = 2
[]
[]
[Postprocessors]
[perm_x_bottom]
type = PointValue
variable = perm_x
point = '0 0 0'
[]
[perm_y_bottom]
type = PointValue
variable = perm_y
point = '0 0 0'
[]
[perm_z_bottom]
type = PointValue
variable = perm_z
point = '0 0 0'
[]
[perm_x_top]
type = PointValue
variable = perm_x
point = '3 0 0'
[]
[perm_y_top]
type = PointValue
variable = perm_y
point = '3 0 0'
[]
[perm_z_top]
type = PointValue
variable = perm_z
point = '3 0 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
# unimportant in this fully-saturated test
m = 0.8
alpha = 1e-4
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2.2e9
viscosity = 1e-3
density0 = 1000
thermal_expansion = 0
[]
[]
[Materials]
[permeability]
type = PorousFlowPermeabilityExponential
k_anisotropy = '1 0 0 0 2 0 0 0 0.1'
poroperm_function = exp_k
A = 10
B = 1e-8
[]
[temperature]
type = PorousFlowTemperature
[]
[massfrac]
type = PorousFlowMassFraction
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = Newton
type = Steady
l_tol = 1E-5
nl_abs_tol = 1E-3
nl_rel_tol = 1E-8
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
csv = true
execute_on = 'timestep_end'
[]
(modules/porous_flow/test/tests/infiltration_and_drainage/rsc02.i)
# RSC test with low-res time and spatial resolution
[Mesh]
type = GeneratedMesh
dim = 2
nx = 200
ny = 1
xmin = 0
xmax = 10 # x is the depth variable, called zeta in RSC
ymin = 0
ymax = 0.05
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Functions]
[dts]
type = PiecewiseLinear
y = '3E-2 5E-1 8E-1'
x = '0 1 5'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pwater poil'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureRSC
oil_viscosity = 2E-3
scale_ratio = 2E3
shift = 10
[]
[]
[FluidProperties]
[water]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 10
thermal_expansion = 0
viscosity = 1e-3
[]
[oil]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 20
thermal_expansion = 0
viscosity = 2e-3
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = pwater
phase1_porepressure = poil
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[water]
type = PorousFlowSingleComponentFluid
fp = water
phase = 0
compute_enthalpy = false
compute_internal_energy = false
[]
[oil]
type = PorousFlowSingleComponentFluid
fp = oil
phase = 1
compute_enthalpy = false
compute_internal_energy = false
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 0
[]
[relperm_oil]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.25
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
[]
[]
[Variables]
[pwater]
[]
[poil]
[]
[]
[ICs]
[water_init]
type = ConstantIC
variable = pwater
value = 0
[]
[oil_init]
type = ConstantIC
variable = poil
value = 15
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pwater
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pwater
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = poil
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = poil
[]
[]
[AuxVariables]
[SWater]
family = MONOMIAL
order = CONSTANT
[]
[SOil]
family = MONOMIAL
order = CONSTANT
[]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[]
[AuxKernels]
[SWater]
type = MaterialStdVectorAux
property = PorousFlow_saturation_qp
index = 0
variable = SWater
[]
[SOil]
type = MaterialStdVectorAux
property = PorousFlow_saturation_qp
index = 1
variable = SOil
[]
[]
[BCs]
# we are pumping water into a system that has virtually incompressible fluids, hence the pressures rise enormously. this adversely affects convergence because of almost-overflows and precision-loss problems. The fixed things help keep pressures low and so prevent these awful behaviours. the movement of the saturation front is the same regardless of the fixed things.
active = 'recharge fixedoil fixedwater'
[recharge]
type = PorousFlowSink
variable = pwater
boundary = 'left'
flux_function = -1.0
[]
[fixedwater]
type = DirichletBC
variable = pwater
boundary = 'right'
value = 0
[]
[fixedoil]
type = DirichletBC
variable = poil
boundary = 'right'
value = 15
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options = '-snes_converged_reason -ksp_diagonal_scale -ksp_diagonal_scale_fix -ksp_gmres_modifiedgramschmidt -snes_linesearch_monitor'
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'gmres asm lu NONZERO 2 1E-10 1E-10 10000'
[]
[]
[VectorPostprocessors]
[swater]
type = LineValueSampler
warn_discontinuous_face_values = false
variable = SWater
start_point = '0 0 0'
end_point = '7 0 0'
sort_by = x
num_points = 21
execute_on = timestep_end
[]
[]
[Executioner]
type = Transient
solve_type = Newton
petsc_options = '-snes_converged_reason'
end_time = 5
[TimeStepper]
type = FunctionDT
function = dts
[]
[]
[Outputs]
file_base = rsc02
[along_line]
type = CSV
execute_vector_postprocessors_on = final
[]
[exodus]
type = Exodus
execute_on = 'initial final'
[]
[]
(test/tests/ics/constant_ic/constant_ic_test.i)
###########################################################
# This is a simple test demonstrating the use of the
# user-defined initial condition system.
#
# @Requirement F3.20
# @Requirement F5.20
###########################################################
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
# Initial Condition on Nonlinear variable
[./InitialCondition]
type = ConstantIC
value = 6.2
[../]
[../]
[]
[AuxVariables]
active = 'u_aux'
[./u_aux]
order = FIRST
family = LAGRANGE
# Initial Condition on Auxiliary variable
[./InitialCondition]
type = ConstantIC
value = 9.3
[../]
[../]
[]
[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'
nl_rel_tol = 1e-10
[]
[Outputs]
file_base = out
exodus = true
[]
(modules/richards/test/tests/rogers_stallybrass_clements/rsc_fu_01.i)
# RSC test with high-res time and spatial resolution
[Mesh]
type = GeneratedMesh
dim = 2
nx = 600
ny = 1
xmin = 0
xmax = 10 # x is the depth variable, called zeta in RSC
ymin = 0
ymax = 0.05
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = 'DensityWater DensityOil'
relperm_UO = 'RelPerm RelPerm'
SUPG_UO = 'SUPGstandard SUPGstandard'
sat_UO = 'Saturation Saturation'
seff_UO = 'SeffWater SeffOil'
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '3E-3 3E-2 0.05'
x = '0 1 5'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater poil'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 10
bulk_mod = 2E9
[../]
[./DensityOil]
type = RichardsDensityConstBulk
dens0 = 20
bulk_mod = 2E9
[../]
[./SeffWater]
type = RichardsSeff2waterRSC
oil_viscosity = 2E-3
scale_ratio = 2E3
shift = 10
[../]
[./SeffOil]
type = RichardsSeff2gasRSC
oil_viscosity = 2E-3
scale_ratio = 2E3
shift = 10
[../]
[./RelPerm]
type = RichardsRelPermMonomial
simm = 0
n = 1
[../]
[./Saturation]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1.0E-2
[../]
[]
[Variables]
[./pwater]
[../]
[./poil]
[../]
[]
[ICs]
[./water_init]
type = ConstantIC
variable = pwater
value = 0
[../]
[./oil_init]
type = ConstantIC
variable = poil
value = 15
[../]
[]
[Kernels]
[./richardstwater]
type = RichardsMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFullyUpwindFlux
variable = pwater
[../]
[./richardstoil]
type = RichardsMassChange
variable = poil
[../]
[./richardsfoil]
type = RichardsFullyUpwindFlux
variable = poil
[../]
[]
[AuxVariables]
[./SWater]
[../]
[./SOil]
[../]
[]
[AuxKernels]
[./Seff1VGwater_AuxK]
type = RichardsSeffAux
variable = SWater
seff_UO = SeffWater
pressure_vars = 'pwater poil'
[../]
[./Seff1VGoil_AuxK]
type = RichardsSeffAux
variable = SOil
seff_UO = SeffOil
pressure_vars = 'pwater poil'
[../]
[]
[BCs]
# we are pumping water into a system that has virtually incompressible fluids, hence the pressures rise enormously. this adversely affects convergence because of almost-overflows and precision-loss problems. The fixed things help keep pressures low and so prevent these awful behaviours. the movement of the saturation front is the same regardless of the fixed things.
active = 'recharge fixedoil fixedwater'
[./recharge]
type = RichardsPiecewiseLinearSink
variable = pwater
boundary = 'left'
pressures = '-1E10 1E10'
bare_fluxes = '-1 -1'
use_mobility = false
use_relperm = false
[../]
[./fixedwater]
type = DirichletBC
variable = pwater
boundary = 'right'
value = 0
[../]
[./fixedoil]
type = DirichletBC
variable = poil
boundary = 'right'
value = 15
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.25
mat_permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
viscosity = '1E-3 2E-3'
gravity = '0E-0 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
active = 'andy'
[./andy]
type = SMP
full = true
petsc_options = ''
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
petsc_options = '-snes_converged_reason'
end_time = 5
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = rsc_fu_01
time_step_interval = 100000
execute_on = 'initial timestep_end final'
exodus = true
[]
(modules/xfem/test/tests/moving_interface/verification/2D_xy_homog1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: 2D
# Coordinate System: xy
# Material Numbers/Types: homogeneous 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# Transient 2D heat transfer problem in Cartesian coordinates designed with
# the Method of Manufactured Solutions. This problem was developed to verify
# XFEM performance on linear elements in the presence of a moving interface
# sweeping across the x-y coordinates of a system with homogeneous material
# properties. This problem can be exactly evaluated by FEM/Moose without the
# moving interface. Both the temperature and level set function are designed
# to be linear to attempt to minimize error between the Moose/exact solution
# and XFEM results.
# Results:
# The temperature at the bottom left boundary (x=0, y=0) exhibits the largest
# difference between the FEM/Moose solution and XFEM results. We present the
# XFEM results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 479.9998791
# 0.6 520 519.9995307
# 0.8 560 559.9989724
# 1.0 600 599.9984541
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraints]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-100*x-100*y+200)'
[../]
[./neumann_func]
type = ParsedFunction
expression = '1.5*100*t'
[../]
[./dirichlet_right_func]
type = ParsedFunction
expression = '(-100*y+100)*t+400'
[../]
[./dirichlet_top_func]
type = ParsedFunction
expression = '(-100*x+100)*t+400'
[../]
[./ls_func]
type = ParsedFunction
expression = '-0.5*(x+y) + 1.04 - 0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericConstantMaterial
prop_names = 'diffusion_coefficient'
prop_values = 1.5
[../]
[]
[BCs]
[./left_du]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = FunctionDirichletBC
variable = u
boundary = 'right'
function = dirichlet_right_func
[../]
[./bottom_du]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = neumann_func
[../]
[./top_u]
type = FunctionDirichletBC
variable = u
boundary = 'top'
function = dirichlet_top_func
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/contact/test/tests/bouncing-block-contact/variational-frictional.i)
starting_point = 2e-1
# We offset slightly so we avoid the case where the bottom of the secondary block and the top of the
# primary block are perfectly vertically aligned which can cause the backtracking line search some
# issues for a coarse mesh (basic line search handles that fine)
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
correct_edge_dropping = true
[]
[Mesh]
[file_mesh]
type = FileMeshGenerator
file = long-bottom-block-1elem-blocks-coarse.e
[]
[]
[Variables]
[disp_x]
block = '1 2'
scaling = 1e1
[]
[disp_y]
block = '1 2'
scaling = 1e1
[]
[contact_action_normal_lm]
block = 4
scaling = 1e3
[]
[contact_action_tangential_lm]
block = 4
scaling = 1e2
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[AuxVariables]
[procid]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[procid]
type = ProcessorIDAux
variable = procid
[]
[]
[UserObjects]
[weighted_velocities_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 10
secondary_boundary = 20
primary_subdomain = 3
secondary_subdomain = 4
lm_variable_normal = contact_action_normal_lm
lm_variable_tangential_one = contact_action_tangential_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
correct_edge_dropping = true
[]
[]
[Constraints]
[frictional_normal_lm]
type = ComputeFrictionalForceLMMechanicalContact
primary_boundary = 10
secondary_boundary = 20
primary_subdomain = 3
secondary_subdomain = 4
variable = contact_action_normal_lm
friction_lm = contact_action_tangential_lm
disp_x = disp_x
disp_y = disp_y
mu = 0.1
normalize_c = true
c = 1.0e-2
c_t = 1.0e-1
correct_edge_dropping = true
weighted_velocities_uo = weighted_velocities_uo
weighted_gap_uo = weighted_velocities_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 10
secondary_boundary = 20
primary_subdomain = 3
secondary_subdomain = 4
variable = contact_action_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_velocities_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 10
secondary_boundary = 20
primary_subdomain = 3
secondary_subdomain = 4
variable = contact_action_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_velocities_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 10
secondary_boundary = 20
primary_subdomain = 3
secondary_subdomain = 4
variable = contact_action_tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_velocities_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 10
secondary_boundary = 20
primary_subdomain = 3
secondary_subdomain = 4
variable = contact_action_tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_velocities_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-15'
l_max_its = 30
nl_max_its = 25
line_search = 'none'
nl_rel_tol = 1e-12
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
hide = procid
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
(test/tests/time_integrators/bdf2/bdf2_adapt.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 4
ny = 4
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.25
[./Adaptivity]
refine_fraction = 0.2
coarsen_fraction = 0.3
max_h_level = 4
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/xfem/test/tests/moving_interface/verification/1D_rz_homog1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: quasi-1D
# Coordinate System: rz
# Material Numbers/Types: homogeneous 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# A simple transient heat transfer problem in cylindrical coordinates designed
# with the Method of Manufactured Solutions. This problem was developed to
# verify XFEM performance in the presence of a moving interface for linear
# element models that can be exactly evaluated by FEM/Moose. Both the
# temperature solution and level set function are designed to be linear to
# attempt to minimize error between the Moose/exact solution and XFEM results.
# Thermal conductivity is a single, constant value at all points in the system.
# Results:
# The temperature at the left boundary (x=1) exhibits the largest difference
# between the FEM/Moose solution and XFEM results. We present the XFEM results
# at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 480.0008118
# 0.6 520 520.0038529
# 0.8 560 560.0089177
# 1.0 600 600.0133344
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 1
xmin = 1.0
xmax = 2.0
ymin = 0.0
ymax = 0.5
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-200*x+400) + 200*1.5*t/x'
[../]
[./neumann_func]
type = ParsedFunction
expression = '1.5*200*t'
[../]
[./ls_func]
type = ParsedFunction
expression = '2.04 - x - 0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericConstantMaterial
prop_names = 'diffusion_coefficient'
prop_values = 1.5
[../]
[]
[BCs]
[./left_u]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 'right'
value = 400
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/contact/test/tests/mortar_cartesian_lms/frictionless-mortar-3d-friction.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
second_order = false
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[lm_z]
block = 'secondary_lower'
use_dual = true
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeFrictionalForceCartesianLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
lm_z = lm_z
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
correct_edge_dropping = true
c = 1e+02
c_t = 1e+2
mu = 0.10
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_z]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_z
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Preconditioning]
[vcp]
type = VCP
full = true
lm_variable = 'lm_x lm_y lm_z'
primary_variable = 'disp_x disp_y disp_z'
preconditioner = 'LU'
is_lm_coupling_diagonal = true
adaptive_condensation = true
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = .5
dtmin = .01
solve_type = 'NEWTON'
petsc_options_iname = '-pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' NONZERO 1e-10'
l_max_its = 100
nl_max_its = 30
# nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
perf_graph = true
exodus = true
csv = true
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = lm_z
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = lm_z
sort_by = 'id'
execute_on = NONLINEAR
[]
[]
(modules/contact/test/tests/bouncing-block-contact/frictional-penalty-weighted-vel.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
preset = false
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[UserObjects]
[weighted_vel_uo]
type = PenaltyFrictionUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
penalty = 5e1
penalty_friction = 1e0
friction_coefficient = 0.4
[]
[]
[Constraints]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[tangent_x]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangent_y]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = true
abort_on_solve_fail = true
nl_rel_tol = 1e-12
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[]
(test/tests/coord_type/coord_type_rz_integrated.i)
[Mesh]
type = GeneratedMesh
nx = 10
xmax = 1
ny = 10
ymax = 1
dim = 2
allow_renumbering = false
[]
[Problem]
type = FEProblem
coord_type = RZ
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
[./out]
type = Exodus
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[]
[DGKernels]
[./dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[../]
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[../]
[]
[BCs]
[./source]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = 'right'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[./vacuum]
boundary = 'top'
type = VacuumBC
variable = u
[../]
[]
[Functions]
[./exact_fn]
type = ConstantFunction
value = 1
[../]
[]
[ICs]
[./u]
type = ConstantIC
value = 1
variable = u
[../]
[]
(test/tests/variables/previous_newton_iteration/test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Problem]
previous_nl_solution_required = true
[]
[Functions]
[./v_fn]
type = ParsedFunction
expression = -4+(x*x+y*y)+1
[../]
[./left_u_bc_fn]
type = ParsedFunction
expression = -2*x
[../]
[./top_u_bc_fn]
type = ParsedFunction
expression = 2*y
[../]
[./right_u_bc_fn]
type = ParsedFunction
expression = 2*x
[../]
[./bottom_u_bc_fn]
type = ParsedFunction
expression = -2*y
[../]
[]
[AuxVariables]
[./a]
order = SECOND
[../]
[./v]
order = SECOND
[../]
[]
[AuxKernels]
[./ak_a]
type = QuotientAux
variable = a
numerator = v
denominator = u
[../]
[./ak_v]
type = FunctionAux
variable = v
function = v_fn
[../]
[]
[Variables]
[./u]
order = SECOND
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
variable = u
value = 1
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./react]
type = Reaction
variable = u
[../]
[./cv_u]
type = CoupledForceLagged
variable = u
v = v
[../]
[]
[BCs]
[./u_bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = left_u_bc_fn
[../]
[./u_bc_top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = top_u_bc_fn
[../]
[./u_bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = right_u_bc_fn
[../]
[./u_bc_bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bottom_u_bc_fn
[../]
[]
[Preconditioning]
[./pc]
type = SMP
full = true
solve_type = PJFNK
[../]
[]
[Executioner]
type = Steady
# to get multiple NL iterations
l_tol = 1e-3
nl_rel_tol = 1e-10
[]
[Outputs]
[./out]
type = Exodus
execute_on = 'nonlinear'
[../]
[]
(modules/richards/test/tests/gravity_head_2/ghQ2P_pgas.i)
# quick two phase with Pgas and Swater being variables
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmin = 0
xmax = 1
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1E-2 1E-1 1E0 1E1 1E3 1E4 1E5 1E6 1E7'
x = '0 1E-1 1E0 1E1 1E2 1E3 1E4 1E5 1E6'
[../]
[]
[UserObjects]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 1.0E2
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 0.5
bulk_mod = 0.5E2
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = Q2PRelPermPowerGas
simm = 0.0
n = 3
[../]
[]
[Variables]
[./pgas]
[../]
[./swater]
[../]
[]
[ICs]
[./pp_ic]
type = ConstantIC
value = 1
variable = pgas
[../]
[./sat_ic]
type = ConstantIC
value = 0.5
variable = swater
[../]
[]
[Q2P]
porepressure = pgas
saturation = swater
water_density = DensityWater
water_relperm = RelPermWater
water_viscosity = 1
gas_density = DensityGas
gas_relperm = RelPermGas
gas_viscosity = 1
diffusivity = 0
[]
[Postprocessors]
[./pp_left]
type = PointValue
point = '0 0 0'
variable = pgas
[../]
[./pp_right]
type = PointValue
point = '1 0 0'
variable = pgas
[../]
[./sat_left]
type = PointValue
point = '0 0 0'
variable = swater
[../]
[./sat_right]
type = PointValue
point = '1 0 0'
variable = swater
[../]
[]
[Materials]
[./rock]
type = Q2PMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
gravity = '-1 0 0'
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = ghQ2P_pgas
csv = true
exodus = true
[]
(test/tests/transfers/general_field/nearest_node/nearest_position/sub_holes.i)
[Mesh]
# Create a 4 rectangle pin lattice
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 100
xmax = 1
ymax = 1
[]
[pin_1]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x > 0.1 & x < 0.2 & y > 0.1 & y < 0.2'
block_id = 1
[]
[pin_2]
type = ParsedSubdomainMeshGenerator
input = pin_1
combinatorial_geometry = 'x > 0.5 & x < 0.7 & y > 0.1 & y < 0.2'
block_id = 2
[]
[pin_3]
type = ParsedSubdomainMeshGenerator
input = pin_2
combinatorial_geometry = 'x > 0.1 & x < 0.2 & y > 0.4 & y < 0.6'
block_id = 3
[]
[pin_4]
type = ParsedSubdomainMeshGenerator
input = pin_3
combinatorial_geometry = 'x > 0.8 & x < 0.9 & y > 0.7 & y < 0.9'
block_id = 4
[]
[delete_back]
type = BlockDeletionGenerator
input = pin_4
block = '0'
[]
[]
[AuxVariables]
[to_main]
[]
[to_main_elem]
order = CONSTANT
family = MONOMIAL
[]
[]
[ICs]
[pin_1]
type = ConstantIC
variable = to_main
value = 1
block = 1
[]
[pin_2]
type = ConstantIC
variable = to_main
value = 2
block = 2
[]
[pin_3]
type = ConstantIC
variable = to_main
value = 3
block = 3
[]
[pin_4]
type = ConstantIC
variable = to_main
value = 4
block = 4
[]
[pin_1_elem]
type = ConstantIC
variable = to_main_elem
value = 1
block = 1
[]
[pin_2_elem]
type = ConstantIC
variable = to_main_elem
value = 2
block = 2
[]
[pin_3_elem]
type = ConstantIC
variable = to_main_elem
value = 3
block = 3
[]
[pin_4_elem]
type = ConstantIC
variable = to_main_elem
value = 4
block = 4
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
overwrite = true
[]
[]
(test/tests/variables/get_elemental_value/get_elemental_value.i)
# Tests the getElementalValue function of MooseVariableFE.
#
# The tested aux copies the first elemental value of another variable. The
# setup is the following IVP:
# du/dt = 1
# u(0) = 0
# Therefore the solution is u(t) = t. Five time steps of dt = 1 are taken.
# The expected output for each time level is thus the following:
# current: [0,1,2,3,4,5]
# old: [0,0,1,2,3,4]
# older: [0,0,0,1,2,3]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 2
[]
[Variables]
[./copied_var]
[../]
[]
[AuxVariables]
[./test_var]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./test_var_aux]
type = GetElementalValueAux
variable = test_var
copied_variable = copied_var
# The parameter "time_level" is provided by tests file
[../]
[]
[ICs]
[./copied_var_ic]
type = ConstantIC
variable = copied_var
value = 0
[../]
[]
[Kernels]
[./time_der]
type = TimeDerivative
variable = copied_var
[../]
[./src]
type = BodyForce
variable = copied_var
function = 1
[../]
[]
[Executioner]
type = Transient
scheme = implicit-euler
dt = 1
num_steps = 5
abort_on_solve_fail = true
solve_type = NEWTON
[]
[Postprocessors]
[./test_pp]
type = ElementAverageValue
variable = test_var
[../]
[]
[Outputs]
csv = true
[]
(modules/porous_flow/test/tests/poroperm/PermFromPoro05.i)
# Testing permeability from porosity
# Trivial test, checking calculated permeability is correct
# k = k_anisotropic * k
# with ln k = A * phi + B
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 3
[]
[GlobalParams]
block = 0
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[InitialCondition]
type = ConstantIC
value = 0
[]
[]
[]
[Kernels]
[flux]
type = PorousFlowAdvectiveFlux
gravity = '0 0 0'
variable = pp
[]
[]
[BCs]
[ptop]
type = DirichletBC
variable = pp
boundary = right
value = 0
[]
[pbase]
type = DirichletBC
variable = pp
boundary = left
value = 1
[]
[]
[AuxVariables]
[poro]
order = CONSTANT
family = MONOMIAL
[]
[perm_x]
order = CONSTANT
family = MONOMIAL
[]
[perm_y]
order = CONSTANT
family = MONOMIAL
[]
[perm_z]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[poro]
type = PorousFlowPropertyAux
property = porosity
variable = poro
[]
[perm_x]
type = PorousFlowPropertyAux
property = permeability
variable = perm_x
row = 0
column = 0
[]
[perm_y]
type = PorousFlowPropertyAux
property = permeability
variable = perm_y
row = 1
column = 1
[]
[perm_z]
type = PorousFlowPropertyAux
property = permeability
variable = perm_z
row = 2
column = 2
[]
[]
[Postprocessors]
[perm_x_bottom]
type = PointValue
variable = perm_x
point = '0 0 0'
[]
[perm_y_bottom]
type = PointValue
variable = perm_y
point = '0 0 0'
[]
[perm_z_bottom]
type = PointValue
variable = perm_z
point = '0 0 0'
[]
[perm_x_top]
type = PointValue
variable = perm_x
point = '3 0 0'
[]
[perm_y_top]
type = PointValue
variable = perm_y
point = '3 0 0'
[]
[perm_z_top]
type = PointValue
variable = perm_z
point = '3 0 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
# unimportant in this fully-saturated test
m = 0.8
alpha = 1e-4
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2.2e9
viscosity = 1e-3
density0 = 1000
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[massfrac]
type = PorousFlowMassFraction
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability]
type = PorousFlowPermeabilityExponential
k_anisotropy = '1 0 0 0 2 0 0 0 0.1'
poroperm_function = ln_k
A = 10.0
B = -18.420681
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = Newton
type = Steady
l_tol = 1E-5
nl_abs_tol = 1E-3
nl_rel_tol = 1E-8
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
csv = true
execute_on = 'timestep_end'
[]
(modules/porous_flow/test/tests/poroperm/PermFromPoro02.i)
# Testing permeability from porosity
# Trivial test, checking calculated permeability is correct
# k = k_anisotropic * k0 * (1-phi0)^m/phi0^n * phi^n/(1-phi)^m
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 3
[]
[GlobalParams]
block = 0
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[InitialCondition]
type = ConstantIC
value = 0
[]
[]
[]
[Kernels]
[flux]
type = PorousFlowAdvectiveFlux
gravity = '0 0 0'
variable = pp
[]
[]
[BCs]
[ptop]
type = DirichletBC
variable = pp
boundary = right
value = 0
[]
[pbase]
type = DirichletBC
variable = pp
boundary = left
value = 1
[]
[]
[AuxVariables]
[poro]
order = CONSTANT
family = MONOMIAL
[]
[perm_x]
order = CONSTANT
family = MONOMIAL
[]
[perm_y]
order = CONSTANT
family = MONOMIAL
[]
[perm_z]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[poro]
type = PorousFlowPropertyAux
property = porosity
variable = poro
[]
[perm_x]
type = PorousFlowPropertyAux
property = permeability
variable = perm_x
row = 0
column = 0
[]
[perm_y]
type = PorousFlowPropertyAux
property = permeability
variable = perm_y
row = 1
column = 1
[]
[perm_z]
type = PorousFlowPropertyAux
property = permeability
variable = perm_z
row = 2
column = 2
[]
[]
[Postprocessors]
[perm_x_bottom]
type = PointValue
variable = perm_x
point = '0 0 0'
[]
[perm_y_bottom]
type = PointValue
variable = perm_y
point = '0 0 0'
[]
[perm_z_bottom]
type = PointValue
variable = perm_z
point = '0 0 0'
[]
[perm_x_top]
type = PointValue
variable = perm_x
point = '3 0 0'
[]
[perm_y_top]
type = PointValue
variable = perm_y
point = '3 0 0'
[]
[perm_z_top]
type = PointValue
variable = perm_z
point = '3 0 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
# unimportant in this fully-saturated test
m = 0.8
alpha = 1e-4
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2.2e9
viscosity = 1e-3
density0 = 1000
thermal_expansion = 0
[]
[]
[Materials]
[permeability]
type = PorousFlowPermeabilityKozenyCarman
k_anisotropy = '1 0 0 0 2 0 0 0 0.1'
poroperm_function = kozeny_carman_phi0
k0 = 1e-10
phi0 = 0.05
m = 2
n = 7
[]
[temperature]
type = PorousFlowTemperature
[]
[massfrac]
type = PorousFlowMassFraction
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = Newton
type = Steady
l_tol = 1E-5
nl_abs_tol = 1E-3
nl_rel_tol = 1E-8
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
csv = true
execute_on = 'timestep_end'
[]
(modules/contact/test/tests/mortar_tm/horizontal_blocks_mortar_TM.i)
offset = 0.01
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
[./left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 0.0
ymin = -0.5
ymax = 0.5
nx = 1
ny = 1
elem_type = QUAD4
boundary_name_prefix = lb
[../]
[./left_block_id]
type = SubdomainIDGenerator
input = left_block
subdomain_id = 1
[../]
[./right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.0
xmax = 1.0
ymin = -0.6
ymax = 0.6
nx = 1
ny = 1
elem_type = QUAD4
boundary_name_prefix = rb
boundary_id_offset = 10
[../]
[./right_block_id]
type = SubdomainIDGenerator
input = right_block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'left_block right_block'
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
[../]
[]
[Functions]
[./horizontal_movement]
type = ParsedFunction
expression = t/10.0
[../]
[]
[BCs]
[./push_x]
type = FunctionDirichletBC
preset = true
variable = disp_x
boundary = lb_left
function = horizontal_movement
[../]
[./fix_x]
type = DirichletBC
preset = true
variable = disp_x
boundary = rb_right
value = 0.0
[../]
[./fix_y]
type = DirichletBC
preset = true
variable = disp_y
boundary = rb_right
value = 0.0
[../]
[./fix_y_offset]
type = DirichletBC
preset = true
variable = disp_y
boundary = lb_left
value = ${offset}
[../]
[]
[Materials]
[./elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = left_block
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[../]
[./stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[../]
[./elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = right_block
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[../]
[./stress_right]
type = ComputeFiniteStrainElasticStress
block = right_block
[../]
[]
[Contact]
[./leftright]
secondary = lb_right
primary = rb_left
model = frictionless
formulation = mortar
friction_coefficient = 0.0
normal_smoothing_distance = 0.1
penalty = 1e+8
normalize_penalty = true
[../]
[]
[ICs]
[./disp_x]
type = ConstantIC
block = left_block
variable = disp_x
value = -${offset}
[../]
[./disp_y]
block = left_block
variable = disp_y
value = ${offset}
type = ConstantIC
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15 20'
dt = 0.1
dtmin = 0.1
end_time = 0.1
l_tol = 1e-4
l_max_its = 100
nl_rel_tol = 1e-10
nl_abs_tol = 1e-6
nl_max_its = 100
[]
(modules/richards/test/tests/dirac/q2p01.i)
# unsaturated
# production
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1E-2 1E-1 1 1E1 1E2 1E3'
x = '0 1E-1 1 1E1 1E2 1E3'
[../]
[]
[UserObjects]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 0.5
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 0.5
bulk_mod = 0.3
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.2
n = 2
[../]
[./RelPermGas]
type = Q2PRelPermPowerGas
simm = 0.1
n = 3
[../]
[./borehole_total_outflow_water]
type = RichardsSumQuantity
[../]
[./borehole_total_outflow_gas]
type = RichardsSumQuantity
[../]
[]
[Variables]
[./pp]
[../]
[./sat]
[../]
[]
[ICs]
[./p_ic]
type = ConstantIC
variable = pp
value = 1
[../]
[./s_ic]
type = ConstantIC
variable = sat
value = 0.5
[../]
[]
[Q2P]
porepressure = pp
saturation = sat
water_density = DensityWater
water_relperm = RelPermWater
water_viscosity = 0.8
gas_density = DensityGas
gas_relperm = RelPermGas
gas_viscosity = 0.5
diffusivity = 0.0
output_total_masses_to = 'CSV'
[]
[DiracKernels]
[./bh_water]
type = Q2PBorehole
bottom_pressure = 0
point_file = bh02.bh
SumQuantityUO = borehole_total_outflow_water
variable = sat
unit_weight = '0 0 0'
character = 8E9
fluid_density = DensityWater
fluid_relperm = RelPermWater
other_var = pp
var_is_porepressure = false
fluid_viscosity = 0.8
[../]
[./bh_gas]
type = Q2PBorehole
bottom_pressure = 0
point_file = bh02.bh
SumQuantityUO = borehole_total_outflow_gas
variable = pp
unit_weight = '0 0 0'
character = 1E10
fluid_density = DensityGas
fluid_relperm = RelPermGas
other_var = sat
var_is_porepressure = true
fluid_viscosity = 0.5
[../]
[]
[Postprocessors]
[./bh_report_water]
type = RichardsPlotQuantity
uo = borehole_total_outflow_water
[../]
[./bh_report_gas]
type = RichardsPlotQuantity
uo = borehole_total_outflow_gas
[../]
[./p0]
type = PointValue
variable = pp
point = '1 1 1'
execute_on = timestep_end
[../]
[./sat0]
type = PointValue
variable = sat
point = '1 1 1'
execute_on = timestep_end
[../]
[]
[Materials]
[./rock]
type = Q2PMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
gravity = '0 0 0'
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 1E3
solve_type = NEWTON
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = q2p01
execute_on = timestep_end
[./CSV]
type = CSV
[../]
[]
(modules/contact/test/tests/mortar_restart/frictional_bouncing_block_action_restart_2.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = frictional_bouncing_block_action_restart_1_checkpoint_cp/0021-mesh.cpr
skip_partitioning = true
allow_renumbering = false
[]
uniform_refine = 0 # 1,2
patch_update_strategy = always
[]
[Problem]
#Note that the suffix is left off in the parameter below.
restart_file_base = frictional_bouncing_block_action_restart_1_checkpoint_cp/LATEST # You may also use a specific number here
kernel_coverage_check = false
material_coverage_check = false
# disp_y has an initial condition despite the checkpoint restart
allow_initial_conditions_with_restart = true
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
generate_output = 'stress_xx stress_yy'
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e3
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[]
[Contact]
[frictional]
primary = 20
secondary = 10
formulation = mortar
model = coulomb
friction_coefficient = 0.4
c_normal = 1.0e1
c_tangential = 1.0e6
generate_mortar_mesh = false
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = '40'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = '40'
value = 0.0
[]
[topy]
type = ADFunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 20 * t) + ${offset}'
preset = false
[]
[leftx]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 30
function = '2e-2 * t'
# function = '0'
preset = false
[]
[]
[Executioner]
type = Transient
end_time = 6 # 70
start_time = 5.25
dt = 0.25 # 0.1 for finer meshes (uniform_refine)
dtmin = .01
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor -snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-13 1e-5'
l_max_its = 30
nl_max_its = 40
line_search = 'basic'
snesmf_reuse_base = false
nl_abs_tol = 1e-9
nl_rel_tol = 1e-9
l_tol = 1e-07 # Tightening l_tol can help with friction
[]
[Debug]
show_var_residual_norms = true
[]
[VectorPostprocessors]
[cont_press]
type = NodalValueSampler
variable = frictional_normal_lm
boundary = '10'
sort_by = x
execute_on = FINAL
[]
[friction]
type = NodalValueSampler
variable = frictional_tangential_lm
boundary = '10'
sort_by = x
execute_on = FINAL
[]
[]
[Outputs]
exodus = true
[checkfile]
type = CSV
show = 'cont_press friction'
start_time = 0.0
execute_vector_postprocessors_on = FINAL
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative_nli contact cumulative_li num_l'
[num_nl]
type = NumNonlinearIterations
[]
[num_l]
type = NumLinearIterations
[]
[cumulative_nli]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[cumulative_li]
type = CumulativeValuePostprocessor
postprocessor = num_l
[]
[contact]
type = ContactDOFSetSize
variable = frictional_normal_lm
subdomain = 'frictional_secondary_subdomain'
execute_on = 'nonlinear timestep_end'
[]
[]
(test/tests/time_integrators/dirk/dirk-2d-heat-adap.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 4
ny = 4
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
start_time = 0.0
num_steps = 5
dt = 0.25
[./TimeIntegrator]
type = LStableDirk2
[../]
[./Adaptivity]
refine_fraction = 0.07
coarsen_fraction = 0.
max_h_level = 4
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/block-restriction/segregated/empty-block-segregated.i)
mu = 1.2
rho_fluid = 0.2
k_fluid = 1.1
cp_fluid = 2.3
T_cold = 310
alpha = 1e-3
Q = 200
pressure_tag = "pressure_grad"
[Problem]
kernel_coverage_check = false
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
velocity_interp_method = 'rc'
advected_interp_method = 'average'
[]
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '0.3683 0.0127'
dy = '0.0127 0.2292 2.5146 0.2292 0.0127'
ix = '2 1'
iy = '1 2 3 2 1'
subdomain_id = '0 0
1 0
2 0
1 0
0 0
'
[]
[rename_block_name]
type = RenameBlockGenerator
input = cmg
old_block = '0 1 2'
new_block = 'wall_block spacer_block porous_block'
[]
[solid_fluid_interface_1]
type = SideSetsBetweenSubdomainsGenerator
input = rename_block_name
primary_block = porous_block
paired_block = wall_block
new_boundary = 'solid_fluid_interface'
[]
[solid_fluid_interface_2]
type = SideSetsBetweenSubdomainsGenerator
input = solid_fluid_interface_1
primary_block = spacer_block
paired_block = wall_block
new_boundary = 'solid_fluid_interface'
[]
[wall_left_boundary_1]
type = SideSetsFromBoundingBoxGenerator
input = solid_fluid_interface_2
bottom_left = '0 0 0'
top_right = '0.1 0.0127 0'
included_boundaries = left
boundary_new = wall_left
[]
[wall_left_boundary_2]
type = SideSetsFromBoundingBoxGenerator
input = wall_left_boundary_1
bottom_left = '0 2.9857 0'
top_right = '0.1 2.9984 0'
included_boundaries = left
boundary_new = wall_left
[]
[fluid_left_boundary]
type = SideSetsFromBoundingBoxGenerator
input = wall_left_boundary_2
bottom_left = '0 0.0127 0'
top_right = '0.1 2.9857 0'
included_boundaries = left
boundary_new = fluid_left
[]
coord_type = RZ
rz_coord_axis = Y
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolatorSegregated
u = superficial_vel_x
v = superficial_vel_y
pressure = pressure
porosity = porosity
block = 'spacer_block porous_block'
[]
[]
[Problem]
nl_sys_names = 'u_system v_system pressure_system t_system'
previous_nl_solution_required = true
error_on_jacobian_nonzero_reallocation = true
[]
[Variables]
[superficial_vel_x]
type = PINSFVSuperficialVelocityVariable
block = 'spacer_block porous_block'
solver_sys = u_system
[]
[superficial_vel_y]
type = PINSFVSuperficialVelocityVariable
block = 'spacer_block porous_block'
solver_sys = v_system
[]
[pressure]
type = INSFVPressureVariable
block = 'spacer_block porous_block'
solver_sys = pressure_system
[]
[T_fluid]
type = INSFVEnergyVariable
block = 'spacer_block porous_block'
solver_sys = t_system
[]
[]
[AuxVariables]
[porosity]
type = MooseVariableFVReal
block = 'spacer_block porous_block'
[]
[]
[FVKernels]
[u_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_x
rho = ${rho_fluid}
momentum_component = 'x'
block = 'spacer_block porous_block'
porosity = porosity
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_x
mu = ${mu}
momentum_component = 'x'
block = 'spacer_block porous_block'
porosity = porosity
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_x
momentum_component = 'x'
pressure = pressure
block = 'spacer_block porous_block'
porosity = porosity
extra_vector_tags = ${pressure_tag}
[]
[u_buoyancy]
type = PINSFVMomentumBoussinesq
variable = superficial_vel_x
T_fluid = T_fluid
gravity = '0 -1 0'
rho = ${rho_fluid}
ref_temperature = ${T_cold}
momentum_component = 'x'
block = 'spacer_block porous_block'
porosity = porosity
[]
[u_gravity]
type = PINSFVMomentumGravity
variable = superficial_vel_x
gravity = '0 -1 0'
rho = ${rho_fluid}
momentum_component = 'x'
block = 'spacer_block porous_block'
porosity = porosity
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_y
rho = ${rho_fluid}
momentum_component = 'y'
block = 'spacer_block porous_block'
porosity = porosity
[]
[v_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_y
mu = ${mu}
momentum_component = 'y'
block = 'spacer_block porous_block'
porosity = porosity
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_y
momentum_component = 'y'
pressure = pressure
block = 'spacer_block porous_block'
porosity = porosity
extra_vector_tags = ${pressure_tag}
[]
[v_buoyancy]
type = PINSFVMomentumBoussinesq
variable = superficial_vel_y
T_fluid = T_fluid
gravity = '0 -1 0'
rho = ${rho_fluid}
ref_temperature = ${T_cold}
momentum_component = 'y'
block = 'spacer_block porous_block'
porosity = porosity
[]
[v_gravity]
type = PINSFVMomentumGravity
variable = superficial_vel_y
gravity = '0 -1 0'
rho = ${rho_fluid}
momentum_component = 'y'
block = 'spacer_block porous_block'
porosity = porosity
[]
[temp_conduction]
type = PINSFVEnergyDiffusion
k = 'k_fluid'
variable = T_fluid
block = 'spacer_block porous_block'
porosity = porosity
[]
[temp_advection]
type = PINSFVEnergyAdvection
variable = T_fluid
block = 'spacer_block porous_block'
boundaries_to_force = fluid_left
[]
[heat_source]
type = FVBodyForce
variable = T_fluid
function = ${Q}
block = 'porous_block'
[]
[p_diffusion]
type = FVAnisotropicDiffusion
variable = pressure
coeff = "Ainv"
coeff_interp_method = 'average'
block = 'spacer_block porous_block'
[]
[p_source]
type = FVDivergence
variable = pressure
vector_field = "HbyA"
force_boundary_execution = true
block = 'spacer_block porous_block'
[]
[]
[FVBCs]
[no_slip_x]
type = INSFVNoSlipWallBC
variable = superficial_vel_x
boundary = 'solid_fluid_interface'
function = 0
[]
[no_slip_y]
type = INSFVNoSlipWallBC
variable = superficial_vel_y
boundary = 'solid_fluid_interface'
function = 0
[]
[reflective_x]
type = INSFVSymmetryVelocityBC
variable = superficial_vel_x
boundary = fluid_left
momentum_component = 'x'
mu = ${mu}
u = superficial_vel_x
v = superficial_vel_y
[]
[reflective_y]
type = INSFVSymmetryVelocityBC
variable = superficial_vel_y
boundary = fluid_left
momentum_component = 'y'
mu = ${mu}
u = superficial_vel_x
v = superficial_vel_y
[]
[reflective_p]
type = INSFVSymmetryPressureBC
boundary = fluid_left
variable = pressure
[]
[T_reflective]
type = FVNeumannBC
variable = T_fluid
boundary = fluid_left
value = 0
[]
[T_cold_boundary]
type = FVDirichletBC
variable = T_fluid
boundary = solid_fluid_interface
value = ${T_cold}
[]
[]
[ICs]
[porosity_spacer]
type = ConstantIC
variable = porosity
block = spacer_block
value = 1.0
[]
[porosity_fuel]
type = ConstantIC
variable = porosity
block = porous_block
value = 0.1
[]
[temp_ic_fluid]
type = ConstantIC
variable = T_fluid
value = ${T_cold}
block = 'spacer_block porous_block'
[]
[superficial_vel_x]
type = ConstantIC
variable = superficial_vel_x
value = 1E-5
block = 'spacer_block porous_block'
[]
[superficial_vel_y]
type = ConstantIC
variable = superficial_vel_y
value = 1E-5
block = 'spacer_block porous_block'
[]
[]
[FunctorMaterials]
[functor_constants_fluid]
type = ADGenericFunctorMaterial
prop_names = 'alpha_b cp k_fluid'
prop_values = '${alpha} ${cp_fluid} ${k_fluid}'
block = 'spacer_block porous_block'
[]
[density_fluid]
type = INSFVEnthalpyFunctorMaterial
temperature = 'T_fluid'
rho = ${rho_fluid}
block = 'spacer_block porous_block'
[]
[functor_constants_steel]
# We need this to avoid errors for materials not existing on every block
type = ADGenericFunctorMaterial
prop_names = 'dummy'
prop_values = 0.0
block = wall_block
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-14
pressure_l_abs_tol = 1e-14
energy_l_abs_tol = 1e-14
momentum_l_tol = 0
pressure_l_tol = 0
energy_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
energy_system = 't_system'
pressure_gradient_tag = ${pressure_tag}
momentum_equation_relaxation = 0.85
energy_equation_relaxation = 0.95
pressure_variable_relaxation = 0.45
num_iterations = 150
pressure_absolute_tolerance = 1e-13
momentum_absolute_tolerance = 1e-13
pin_pressure = true
pressure_pin_point = '0.2 1.5 0.0'
pressure_pin_value = 0
print_fields = false
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/3d-mortar-projection-tolerancing/test.i)
stress_free_temperature = 300
thermal_expansion_coeff = 6.66e-6
[Problem]
type = FEProblem
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
temperature = T_K
[]
[Mesh]
patch_update_strategy = iteration
use_displaced_mesh = true
patch_size = 40
[ori]
type = FileMeshGenerator
file = 'test.msh'
[]
[]
[Variables]
[disp_x]
block = 'pellet_inner pellet_outer'
[]
[disp_y]
block = 'pellet_inner pellet_outer'
[]
[disp_z]
block = 'pellet_inner pellet_outer'
[]
[T_K]
[InitialCondition]
type = ConstantIC
value = 300.0
[]
[]
[lm_pellet]
block = 'pellet_secondary_subdomain'
[]
[]
[Kernels]
[solid_x]
type = ADStressDivergenceTensors
variable = disp_x
component = 0
block = 'pellet_inner pellet_outer'
use_displaced_mesh = false
[]
[solid_y]
type = ADStressDivergenceTensors
variable = disp_y
component = 1
block = 'pellet_inner pellet_outer'
use_displaced_mesh = false
[]
[solid_z]
type = ADStressDivergenceTensors
variable = disp_z
component = 2
block = 'pellet_inner pellet_outer'
use_displaced_mesh = false
[]
[timeder]
type = ADHeatConductionTimeDerivative
variable = 'T_K'
density_name = density
specific_heat = specific_heat
block = 'pellet_inner pellet_outer'
use_displaced_mesh = true
[]
[diff]
type = ADHeatConduction
variable = 'T_K'
thermal_conductivity = thermal_conductivity
block = 'pellet_inner pellet_outer'
use_displaced_mesh = true
[]
[heatsource]
type = ADMatHeatSource
variable = 'T_K'
material_property = radial_source
block = 'pellet_inner pellet_outer'
use_displaced_mesh = true
[]
[]
[Debug]
show_var_residual_norms = TRUE
[]
[BCs]
[mirror_z]
type = ADDirichletBC
variable = disp_z
boundary = 'mirror_innerp mirror_outerp'
value = 0
[]
[mirror_x]
type = ADDirichletBC
variable = disp_x
boundary = 'mirror_innerp mirror_outerp'
value = 0
[]
[mirror_y]
type = ADDirichletBC
variable = disp_y
boundary = 'mirror_innerp mirror_outerp'
value = 0
[]
[]
[Materials]
[pellet_properties]
type = ADGenericConstantMaterial
prop_names = 'density thermal_conductivity specific_heat'
prop_values = '3.3112e3 34 1.2217e3'
block = 'pellet_inner pellet_outer'
[]
[pulse_shape_linear]
type = ADGenericFunctionMaterial
prop_values = '5e10*max(11455*(t)/7,1e-9)'
prop_names = 'radial_source'
output_properties = 'radial_source'
block = 'pellet_inner pellet_outer'
use_displaced_mesh = false
[]
[strain]
type = ADComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
eigenstrain_names = eigenstrain #nameS!
block = 'pellet_inner pellet_outer'
[]
[thermal_strain]
type = ADComputeThermalExpansionEigenstrain
stress_free_temperature = ${stress_free_temperature}
thermal_expansion_coeff = ${thermal_expansion_coeff}
eigenstrain_name = eigenstrain
block = 'pellet_inner pellet_outer'
[]
[elasticity]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 3.306e11
poissons_ratio = 0.329
[]
[stress]
type = ADComputeLinearElasticStress
block = 'pellet_inner pellet_outer'
[]
[]
[Contact]
[pellet]
primary = void_pellet_0
secondary = void_pellet_1
model = frictionless
formulation = mortar
c_normal = 1e6
correct_edge_dropping = true
[]
[]
[UserObjects]
[conduction]
type = GapFluxModelConduction
temperature = T_K
boundary = 'void_pellet_0 void_pellet_1'
gap_conductivity = 0.4
use_displaced_mesh = true
[]
[rad_pellet]
type = GapFluxModelRadiation
temperature = T_K
boundary = void_pellet_0
primary_emissivity = 0.37
secondary_emissivity = 0.37
use_displaced_mesh = true
[]
[]
[Constraints]
[gap_pellet]
type = ModularGapConductanceConstraint
variable = lm_pellet
secondary_variable = T_K
primary_boundary = 'void_pellet_0'
primary_subdomain = pellet_primary_subdomain
secondary_boundary = 'void_pellet_1'
secondary_subdomain = pellet_secondary_subdomain
gap_flux_models = 'conduction rad_pellet' #closed_pellet
gap_geometry_type = 'CYLINDER'
cylinder_axis_point_1 = '0 0 0'
cylinder_axis_point_2 = '0 0 1'
use_displaced_mesh = true
quadrature = SECOND
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -pc_factor_shift_type'
petsc_options_value = 'lu superlu_dist NONZERO'
automatic_scaling = true
line_search = none
ignore_variables_for_autoscaling = 'pellet_normal_lm'
compute_scaling_once = true
scaling_group_variables = 'disp_x disp_y disp_z; T_K'
nl_rel_tol = 1e-50
nl_abs_tol = 1e-8
nl_max_its = 20
dtmin = 1e-3
dt = 1e-3
start_time = 0e-3
end_time = 1
[]
[Outputs]
[exodus]
type = Exodus
file_base = constMat
[]
print_linear_residuals = false
[]
(modules/contact/test/tests/mortar_aux_kernels/pressure-aux-friction-3d.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
second_order = false
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[lm_z]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[normal_lm]
family = LAGRANGE
order = FIRST
[]
[tangent1_lm]
family = LAGRANGE
order = FIRST
[]
[tangent2_lm]
family = LAGRANGE
order = FIRST
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[AuxKernels]
[tangent2_lm]
type = MortarPressureComponentAux
variable = tangent2_lm
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
lm_var_x = lm_x
lm_var_y = lm_y
lm_var_z = lm_z
component = 'tangent2'
boundary = 'top_bottom'
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeFrictionalForceCartesianLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
lm_z = lm_z
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
correct_edge_dropping = true
c = 1e+02
c_t = 1e+2
mu = 0.10
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_z]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_z
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = .5
dtmin = .01
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_view'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' lu superlu_dist NONZERO 1e-15'
l_max_its = 100
nl_max_its = 30
# nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = false
csv = true
execute_on = 'FINAL'
[]
[VectorPostprocessors]
[tangent2_lm]
type = NodalValueSampler
block = secondary_lower
variable = tangent2_lm
sort_by = 'id'
[]
[]
(modules/porous_flow/test/tests/dispersion/diff01_action.i)
# Test diffusive part of PorousFlowDispersiveFlux kernel by setting dispersion
# coefficients to zero. Pressure is held constant over the mesh, and gravity is
# set to zero so that no advective transport of mass takes place.
# Mass fraction is set to 1 on the left hand side and 0 on the right hand side.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmax = 10
bias_x = 1.1
[]
[GlobalParams]
PorousFlowDictator = andy_heheheh
[]
[Variables]
[pp]
[]
[massfrac0]
[]
[]
[ICs]
[pp]
type = ConstantIC
variable = pp
value = 1e5
[]
[massfrac0]
type = ConstantIC
variable = massfrac0
value = 0
[]
[]
[BCs]
[left]
type = DirichletBC
value = 1
variable = massfrac0
boundary = left
[]
[right]
type = DirichletBC
value = 0
variable = massfrac0
boundary = right
[]
[pright]
type = DirichletBC
variable = pp
boundary = right
value = 1e5
[]
[pleft]
type = DirichletBC
variable = pp
boundary = left
value = 1e5
[]
[]
[Kernels]
[diff0]
type = PorousFlowDispersiveFlux
fluid_component = 0
variable = massfrac0
disp_trans = 0
disp_long = 0
gravity = '0 0 0'
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = pp
disp_trans = 0
disp_long = 0
gravity = '0 0 0'
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.0
bulk_modulus = 1E7
viscosity = 0.001
density0 = 1000.0
[]
[]
[PorousFlowUnsaturated]
porepressure = pp
gravity = '0 0 0'
fp = the_simple_fluid
dictator_name = andy_heheheh
relative_permeability_type = Corey
relative_permeability_exponent = 0.0
mass_fraction_vars = massfrac0
[]
[Materials]
[poro]
type = PorousFlowPorosityConst
porosity = 0.3
[]
[diff]
type = PorousFlowDiffusivityConst
diffusion_coeff = '1 1'
tortuosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-9 0 0 0 1e-9 0 0 0 1e-9'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu NONZERO 2 '
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 1
end_time = 20
[]
[VectorPostprocessors]
[xmass]
type = NodalValueSampler
sort_by = id
variable = massfrac0
[]
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(modules/functional_expansion_tools/test/tests/errors/multiapp_bad_function_series.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[./AnotherFunction]
type = ConstantFunction
value = -1
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
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
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = multiapp_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = AnotherFunction
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(test/tests/interfacekernels/1d_interface/no-failed-point-inversions.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[break]
type = BreakMeshByBlockGenerator
input = interface
[]
displacements = 'disp_x'
[]
[AuxVariables]
[disp_x][]
[]
[ICs]
[right]
type = ConstantIC
variable = disp_x
block = 1
value = 1
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
block = '0'
[]
[v]
order = FIRST
family = LAGRANGE
block = '1'
[]
[]
[Kernels]
[diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[]
[diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[]
[]
[InterfaceKernels]
[penalty_interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = 'left'
value = 1
[]
[right]
type = DirichletBC
variable = v
boundary = 'right'
value = 0
[]
[]
[Materials]
[block0]
type = GenericConstantMaterial
block = '0'
prop_names = 'D'
prop_values = '4'
[]
[block1]
type = GenericConstantMaterial
block = '1'
prop_names = 'D'
prop_values = '2'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[area]
type = AreaPostprocessor
use_displaced_mesh = true
boundary = 'right'
[]
[]
(modules/contact/test/tests/mortar_cartesian_lms/frictionless-weighted-gap-lm.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[lm_x]
block = 3
[]
[lm_y]
block = 3
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapCartesianLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_x = lm_x
lm_y = lm_y
variable = lm_x # Shouldn't be needed, but forced by framework
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
c = 1
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = 5
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
l_tol = 1e-03
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = true
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = lm_y
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/contact/test/tests/bouncing-block-contact/frictionless-weighted-gap.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[normal_lm]
block = 3
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable = normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
c = 1
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = true
nl_rel_tol = 1e-12
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_temperature_coefficients_function_variation.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 2
nz = 2
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 10.0
ymax = 1.0
zmax = 1.0
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = '100'
nodes = '3 69'
input = gen
[]
[corner_node_2]
type = ExtraNodesetGenerator
new_boundary = '101'
nodes = '4 47'
input = corner_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[temperature]
order = CONSTANT
family = MONOMIAL
[]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xz]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yz]
order = CONSTANT
family = MONOMIAL
[]
[hill_constants_f]
order = CONSTANT
family = MONOMIAL
[]
[hill_constants_g]
order = CONSTANT
family = MONOMIAL
[]
[hill_constants_h]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[temperature]
type = FunctionAux
variable = temperature
function = time_temperature
[]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[creep_strain_xx]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xx
index_i = 0
index_j = 0
[]
[creep_strain_xy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xy
index_i = 0
index_j = 1
[]
[creep_strain_yy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yy
index_i = 1
index_j = 1
[]
[creep_strain_zz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_zz
index_i = 2
index_j = 2
[]
[creep_strain_xz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xz
index_i = 0
index_j = 2
[]
[creep_strain_yz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yz
index_i = 1
index_j = 2
[]
[sigma_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 1
index_j = 1
[]
[hill_constant_f]
type = MaterialStdVectorAux
property = hill_constants
variable = hill_constants_f
index = 0
[]
[hill_constant_g]
type = MaterialStdVectorAux
property = hill_constants
variable = hill_constants_g
index = 1
[]
[hill_constant_h]
type = MaterialStdVectorAux
property = hill_constants
variable = hill_constants_h
index = 2
[]
[]
[ICs]
[temp]
type = ConstantIC
variable = temperature
value = 50.0
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1.0e-9 1.0'
y = '0 -4e1 -4e1'
[]
[F]
type = PiecewiseLinear
x = '50 200'
y = '0.2 0.5'
[]
[G]
type = PiecewiseLinear
x = '50 200'
y = '0.9 0.6'
[]
[H]
type = PiecewiseLinear
x = '50 200'
y = '0.5 0.3'
[]
[L]
type = PiecewiseLinear
x = '50 200'
y = '1.5 1.5'
[]
[M]
type = PiecewiseLinear
x = '50 200'
y = '1.5 1.5'
[]
[N]
type = PiecewiseLinear
x = '50 200'
y = '1.5 1.5'
[]
[time_temperature]
type = PiecewiseLinear
x = '0 1.0e-2'
y = '50 200'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_xx stress_xx'
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 700
poissons_ratio = 0.0
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = 'trial_creep_aniso_iso'
max_iterations = 50
[]
[hill_constants]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5 0.5 0.5 1.5 1.5 1.5"
function_names = 'F G H L M N'
temperature = temperature
[]
[trial_creep_aniso_iso]
type = ADHillCreepStressUpdate
coefficient = 1e-16
n_exponent = 9
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 0.00003
relative_tolerance = 1e-20
absolute_tolerance = 1e-20
internal_solve_output_on = never
# Force it to not use integration error
max_integration_error = 1.0
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = 100
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = 101
value = 0.0
[]
[Pressure]
[Side1]
boundary = right
function = pull
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-13
nl_abs_tol = 1.0e-14
l_max_its = 90
num_steps = 20
dt = 5.0e-4
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[creep_strain_xx]
type = ElementalVariableValue
variable = creep_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_yy]
type = ElementalVariableValue
variable = creep_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_zz]
type = ElementalVariableValue
variable = creep_strain_zz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_xy]
type = ElementalVariableValue
variable = creep_strain_xy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_yz]
type = ElementalVariableValue
variable = creep_strain_yz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_xz]
type = ElementalVariableValue
variable = creep_strain_xz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_xx]
type = ElementalVariableValue
variable = elastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_xx]
type = ElementalVariableValue
variable = stress_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[]
[Outputs]
csv = true
exodus = true
perf_graph = true
[]
(test/tests/ics/check_error/two_ics_on_same_boundary.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[ICs]
[./left]
type = ConstantIC
variable = u
boundary = left
value = 0.5
[../]
[./left2]
type = ConstantIC
variable = u
boundary = left
value = 2
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Steady
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_chorin.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 40
ny = 40
elem_type = QUAD4
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 99
nodes = '0'
input = gen
[]
[]
[Variables]
# x-velocity
[u]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = ConstantIC
value = 0.0
[]
[]
# y-velocity
[v]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = ConstantIC
value = 0.0
[]
[]
# x-star velocity
[u_star]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = ConstantIC
value = 0.0
[]
[]
# y-star velocity
[v_star]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = ConstantIC
value = 0.0
[]
[]
# Pressure
[p]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = ConstantIC
value = 0
[]
[]
[]
[Kernels]
[x_chorin_predictor]
type = INSChorinPredictor
variable = u_star
u = u
v = v
u_star = u_star
v_star = v_star
component = 0
predictor_type = 'new'
[]
[y_chorin_predictor]
type = INSChorinPredictor
variable = v_star
u = u
v = v
u_star = u_star
v_star = v_star
component = 1
predictor_type = 'new'
[]
[x_chorin_corrector]
type = INSChorinCorrector
variable = u
u_star = u_star
v_star = v_star
pressure = p
component = 0
[]
[y_chorin_corrector]
type = INSChorinCorrector
variable = v
u_star = u_star
v_star = v_star
pressure = p
component = 1
[]
[chorin_pressure_poisson]
type = INSChorinPressurePoisson
variable = p
u_star = u_star
v_star = v_star
[]
[]
[BCs]
[u_no_slip]
type = DirichletBC
variable = u
preset = false
boundary = 'bottom right left'
value = 0.0
[]
[u_lid]
type = DirichletBC
variable = u
preset = false
boundary = 'top'
value = 100.0
[]
[v_no_slip]
type = DirichletBC
variable = v
preset = false
boundary = 'bottom right top left'
value = 0.0
[]
# Make u_star satsify all the same variables as the real velocity.
[u_star_no_slip]
type = DirichletBC
variable = u_star
preset = false
boundary = 'bottom right left'
value = 0.0
[]
[u_star_lid]
type = DirichletBC
variable = u_star
preset = false
boundary = 'top'
value = 100.0
[]
[v_star_no_slip]
type = DirichletBC
variable = v_star
preset = false
boundary = 'bottom right top left'
value = 0.0
[]
# With solid walls everywhere, we specify dp/dn=0, i.e the
# "natural BC" for pressure. Technically the problem still
# solves without pinning the pressure somewhere, but the pressure
# bounces around a lot during the solve, possibly because of
# the addition of arbitrary constants.
[pressure_pin]
type = DirichletBC
variable = p
preset = false
boundary = '99'
value = 0
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
block = 0
# rho = 1000 # kg/m^3
# mu = 0.798e-3 # Pa-s at 30C
# cp = 4.179e3 # J/kg-K at 30C
# k = 0.58 # W/m-K at ?C
# Dummy parameters
prop_names = 'rho mu cp k'
prop_values = '1 1 1 1'
[]
[]
[Preconditioning]
#active = 'FDP_Newton'
#active = 'SMP_PJFNK'
active = 'SMP_Newton'
[FDP_Newton]
type = FDP
full = true
solve_type = 'NEWTON'
#petsc_options_iname = '-mat_fd_coloring_err'
#petsc_options_value = '1.e-10'
[]
# For some reason, nonlinear convergence with JFNK is poor, but it
# seems to be OK for SMP_Newton. This may indicate a a scaling issue
# in the JFNK case....
[SMP_PJFNK]
type = SMP
full = true
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
[]
[SMP_Newton]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Transient
# Note: the explicit case with lid velocity = 100 and a 40x40 was unstable
# for dt=1.e-4, even though the restriction should be dt < dx/|u| = 1/4000 = 2.5e-4
#
dt = 1.e-3
dtmin = 1.e-6
petsc_options_iname = '-ksp_gmres_restart '
petsc_options_value = '300 '
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
l_max_its = 300
start_time = 0.0
num_steps = 5
automatic_scaling = true
verbose = true
compute_scaling_once = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
file_base = lid_driven_chorin_out
exodus = true
[]
(modules/phase_field/test/tests/MultiPhase/switchingfunction3phasematerial.i)
# This is a test of the SwitchingFunction3PhaseMaterial, a switching function
# used in a 3-phase phase-field model to prevent formation of the third phase
# at the interface between the two other phases
# See Folch and Plapp, Phys. Rev. E, v 72, 011602 (2005) for details
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 0.1
nx = 20
ny = 2
elem_type = QUAD4
[]
[GlobalParams]
derivative_order = 0
outputs = exodus
[]
[AuxVariables]
[./eta1]
[./InitialCondition]
type = FunctionIC
function = x
[../]
[../]
[./eta2]
[./InitialCondition]
type = FunctionIC
function = 1.0-x
[../]
[../]
[./eta3]
[./InitialCondition]
type = ConstantIC
value = 0.0
[../]
[../]
[]
[Materials]
[./h_material_1]
type = SwitchingFunction3PhaseMaterial
property_name = h_i1
eta_i = eta1
eta_j = eta2
eta_k = eta3
outputs = exodus
[../]
# Next we reverse eta2 and eta3 to make sure the switching function is symmetric
# with respect to interchanging these two, as it is designed to be
[./h_material_2]
type = SwitchingFunction3PhaseMaterial
property_name = h_i2
eta_i = eta1
eta_j = eta3
eta_k = eta2
outputs = exodus
[../]
[]
[Problem]
solve = false
kernel_coverage_check = false
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
execute_on = 'TIMESTEP_END'
exodus = true
[]
(modules/contact/test/tests/mortar_dynamics/block-dynamics-reference.i)
starting_point = 2e-1
offset = -0.19
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[normal_lm]
block = 3
use_dual = true
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_yy'
strain = FINITE
block = '1 2'
zeta = 1.0
alpha = 0.0
[]
[inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[strain]
type = ComputeFiniteStrain
block = '1 2'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '7750'
[]
[]
[AuxVariables]
[vel_x]
block = '1 2'
[]
[accel_x]
block = '1 2'
[]
[vel_y]
block = '1 2'
[]
[accel_y]
block = '1 2'
[]
[vel_z]
block = '1 2'
[]
[accel_z]
block = '1 2'
[]
[kinetic_energy]
order = CONSTANT
family = MONOMIAL
[]
[elastic_energy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = 'timestep_end'
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = 'timestep_end'
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = 'timestep_end'
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = 'timestep_end'
[]
[kinetic_energy]
type = KineticEnergyAux
block = '1 2'
variable = kinetic_energy
newmark_velocity_x = vel_x
newmark_velocity_y = vel_y
newmark_velocity_z = 0.0
density = density
[]
[elastic_energy]
type = ElasticEnergyAux
variable = elastic_energy
block = '1 2'
[]
[]
# User object provides the contact force (e.g. LM)
# for the application of the generalized force
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable = normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
# Not using 'dynamic' constraints results in poor enforcement of contact
# constraints and lack of kinetic and elastic energy conservation.
[weighted_gap_lm]
type = ComputeDynamicWeightedGapLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
newmark_beta = 0.25
newmark_gamma = 0.5
use_displaced_mesh = true
# Capture tolerance is important. If too small, stabilization takes longer
capture_tolerance = 1.0e-5
c = 1.0e6
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 30 # 50
function = '0' # '1e-2*t'
[]
[]
[Executioner]
type = Transient
end_time = 0.275 # 8.0
dt = 0.025
dtmin = .025
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-15'
nl_max_its = 50
line_search = 'none'
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
csv = true
[]
[Postprocessors]
active = 'contact total_kinetic_energy total_elastic_energy'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[total_kinetic_energy]
type = ElementIntegralVariablePostprocessor
variable = kinetic_energy
block = '1 2'
[]
[total_elastic_energy]
type = ElementIntegralVariablePostprocessor
variable = elastic_energy
block = '1 2'
[]
[]
(modules/richards/test/tests/gravity_head_2/gh17.i)
# unsaturated = false
# gravity = true
# supg = true
# transient = true
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmin = 0
xmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1E-2 1E-1 1E0 1E1 1E3 1E4 1E5 1E6 1E7'
x = '0 1E-1 1E0 1E1 1E2 1E3 1E4 1E5 1E6'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 1.0E2
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 0.5
bulk_mod = 0.5E2
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.0
n = 3
[../]
[./SatWater]
type = RichardsSat
s_res = 0.1
sum_s_res = 0.15
[../]
[./SatGas]
type = RichardsSat
s_res = 0.05
sum_s_res = 0.15
[../]
[./SUPGwater]
type = RichardsSUPGstandard
p_SUPG = 0.1
[../]
[./SUPGgas]
type = RichardsSUPGstandard
p_SUPG = 0.01
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./water_ic]
type = ConstantIC
value = 1
variable = pwater
[../]
[./gas_ic]
type = ConstantIC
value = 1
variable = pgas
[../]
[]
[Kernels]
active = 'richardsfwater richardstwater richardsfgas richardstgas'
[./richardstwater]
type = RichardsMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFlux
variable = pwater
[../]
[./richardstgas]
type = RichardsMassChange
variable = pgas
[../]
[./richardsfgas]
type = RichardsFlux
variable = pgas
[../]
[]
[AuxVariables]
[./seffgas]
[../]
[./seffwater]
[../]
[]
[AuxKernels]
[./seffgas_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffGas
variable = seffgas
[../]
[./seffwater_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffWater
variable = seffwater
[../]
[]
[Postprocessors]
[./mwater_init]
type = RichardsMass
variable = pwater
execute_on = timestep_begin
outputs = none
[../]
[./mgas_init]
type = RichardsMass
variable = pgas
execute_on = timestep_begin
outputs = none
[../]
[./mwater_fin]
type = RichardsMass
variable = pwater
execute_on = timestep_end
outputs = none
[../]
[./mgas_fin]
type = RichardsMass
variable = pgas
execute_on = timestep_end
outputs = none
[../]
[./mass_error_water]
type = FunctionValuePostprocessor
function = fcn_mass_error_w
[../]
[./mass_error_gas]
type = FunctionValuePostprocessor
function = fcn_mass_error_g
[../]
[./pw_left]
type = PointValue
point = '0 0 0'
variable = pwater
outputs = none
[../]
[./pw_right]
type = PointValue
point = '1 0 0'
variable = pwater
outputs = none
[../]
[./error_water]
type = FunctionValuePostprocessor
function = fcn_error_water
[../]
[]
[Functions]
[./fcn_mass_error_w]
type = ParsedFunction
expression = 'abs(0.5*(mi-mf)/(mi+mf))'
symbol_names = 'mi mf'
symbol_values = 'mwater_init mwater_fin'
[../]
[./fcn_mass_error_g]
type = ParsedFunction
expression = 'abs(0.5*(mi-mf)/(mi+mf))'
symbol_names = 'mi mf'
symbol_values = 'mgas_init mgas_fin'
[../]
[./fcn_error_water]
type = ParsedFunction
expression = 'abs((-b*log(-(gdens0*xval+(-b*exp(-p0/b)))/b)-p1)/p1)'
symbol_names = 'b gdens0 p0 xval p1'
symbol_values = '1E2 -1 pw_left 1 pw_right'
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
density_UO = 'DensityWater DensityGas'
relperm_UO = 'RelPermWater RelPermGas'
SUPG_UO = 'SUPGwater SUPGgas'
sat_UO = 'SatWater SatGas'
seff_UO = 'SeffWater SeffGas'
viscosity = '1E-3 0.5E-3'
gravity = '-1 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-15 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = gh17
csv = true
[]
(modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-wear-vel.i)
starting_point = 0.5e-1
offset = -0.05
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[normal_lm]
block = 3
use_dual = true
scaling = 1.0e3
[]
[frictional_lm]
block = 3
use_dual = true
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_yy'
strain = FINITE
block = '1 2'
zeta = 1.0
hht_alpha = 0.0
[]
[inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[strain]
type = ComputeFiniteStrain
block = '1 2'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '7750'
[]
[]
[AuxVariables]
[worn_depth]
block = '3'
[]
[gap_vel]
block = '3'
[]
[vel_x]
block = '1 2'
[]
[accel_x]
block = '1 2'
[]
[vel_y]
block = '1 2'
[]
[accel_y]
block = '1 2'
[]
[vel_z]
block = '1 2'
[]
[accel_z]
block = '1 2'
[]
[]
[AuxKernels]
[gap_vel]
type = WeightedGapVelAux
variable = gap_vel
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
disp_x = disp_x
disp_y = disp_y
[]
[worn_depth]
type = MortarArchardsLawAux
variable = worn_depth
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
displacements = 'disp_x disp_y'
friction_coefficient = 0.5
energy_wear_coefficient = 1.0
normal_pressure = normal_lm
[]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
secondary_variable = disp_x
lm_variable_normal = normal_lm
lm_variable_tangential_one = frictional_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeDynamicFrictionalForceLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
c = 1e4
c_t = 1e6
mu = 0.15
friction_lm = frictional_lm
capture_tolerance = 1.0e-5
newmark_beta = 0.25
newmark_gamma = 0.5
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(16.0 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 0.3
dt = 0.03
dtmin = .002
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15'
nl_max_its = 40
nl_abs_tol = 1.0e-11
nl_rel_tol = 1.0e-11
line_search = 'none'
snesmf_reuse_base = true
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/functional_expansion_tools/examples/2D_interface_different_submesh/sub.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.4
xmax = 2.4
nx = 30
ymin = 0.0
ymax = 10.0
ny = 23
bias_y = 1.2
[]
[Variables]
[./s]
[../]
[]
[Kernels]
[./diff_s]
type = HeatConduction
variable = s
[../]
[./time_diff_s]
type = HeatConductionTimeDerivative
variable = s
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_s]
type = ConstantIC
value = 2
variable = s
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = s
boundary = bottom
value = 0.1
[../]
[./interface_flux]
type = FXFluxBC
boundary = left
variable = s
function = FX_Basis_Flux_Sub
[../]
[]
[Functions]
[./FX_Basis_Value_Sub]
type = FunctionSeries
series_type = Cartesian
orders = '4'
physical_bounds = '0.0 10'
y = Legendre
[../]
[./FX_Basis_Flux_Sub]
type = FunctionSeries
series_type = Cartesian
orders = '7'
physical_bounds = '0.0 10'
y = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Sub]
type = FXBoundaryValueUserObject
function = FX_Basis_Value_Sub
variable = s
boundary = left
[../]
[./FX_Flux_UserObject_Sub]
type = FXBoundaryFluxUserObject
function = FX_Basis_Flux_Sub
variable = s
boundary = left
diffusivity = thermal_conductivity
[../]
[]
[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'
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/mixed-transient-steady/mixed.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[temperature]
[InitialCondition]
type = ConstantIC
value = 1.0
[]
[]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./mass_pspg]
type = INSADMassPSPG
variable = p
[../]
[./momentum_time]
type = INSADMomentumTimeDerivative
variable = velocity
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[../]
[./momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[../]
[./temperature_advection]
type = INSADEnergyAdvection
variable = temperature
[../]
[./temperature_conduction]
type = ADHeatConduction
variable = temperature
thermal_conductivity = 'k'
[../]
[temperature_supg]
type = INSADEnergySUPG
variable = temperature
velocity = velocity
[]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left'
[../]
[./lid]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 'lid_function'
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[./temperature_hot]
type = DirichletBC
variable = temperature
boundary = 'bottom'
value = 1
[../]
[./temperature_cold]
type = DirichletBC
variable = temperature
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = temperature
[]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/kinematic-and-scaling/bouncing-block-kinematic.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-no-lower-d-coarse.e
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = false
use_automatic_differentiation = true
strain = SMALL
[]
[]
[Materials]
[elasticity]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e3
poissons_ratio = 0.3
[]
[stress]
type = ADComputeLinearElasticStress
[]
[]
[Contact]
[leftright]
secondary = 10
primary = 20
model = frictionless
formulation = kinematic
penalty = 1e3
normal_smoothing_distance = 0.1
[]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[../]
[]
[Executioner]
type = Transient
end_time = 100
dt = 5
dtmin = 5
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 200'
l_max_its = 200
nl_max_its = 20
line_search = 'none'
automatic_scaling = true
verbose = true
scaling_group_variables = 'disp_x disp_y'
resid_vs_jac_scaling_param = 1
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exo]
type = Exodus
[]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[nl]
type = NumNonlinearIterations
[]
[lin]
type = NumLinearIterations
[]
[tot_nl]
type = CumulativeValuePostprocessor
postprocessor = nl
[]
[tot_lin]
type = CumulativeValuePostprocessor
postprocessor = lin
[]
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_external_app_1phase/phy.T_wall_transfer_3eqn.parent.i)
# This tests a temperature transfer using the MultiApp system. Simple heat
# conduction problem is solved, then the temperature is picked up by the child
# side of the solve, child side solves and transfers its variables back to the
# master
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 1
nx = 10
[]
[Functions]
[left_bc_fn]
type = PiecewiseLinear
x = '0 1'
y = '300 310'
[]
[]
[Variables]
[T]
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T
value = 300
[]
[]
[Kernels]
[td]
type = TimeDerivative
variable = T
[]
[diff]
type = Diffusion
variable = T
[]
[]
[BCs]
[left]
type = FunctionDirichletBC
variable = T
boundary = left
function = left_bc_fn
[]
[]
[Executioner]
type = Transient
dt = 0.5
end_time = 5
nl_abs_tol = 1e-10
abort_on_solve_fail = true
[]
[MultiApps]
[thm]
type = TransientMultiApp
app_type = ThermalHydraulicsApp
input_files = phy.T_wall_transfer_3eqn.child.i
execute_on = TIMESTEP_END
[]
[]
[Transfers]
[T_to_child]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = thm
source_variable = T
variable = T_wall
[]
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/bouncing-block-contact/mixed-weighted-gap-swapped.i)
starting_point = 2e-1
# We offset slightly so we avoid the case where the bottom of the secondary block and the top of the
# primary block are perfectly vertically aligned which can cause the backtracking line search some
# issues for a coarse mesh (basic line search handles that fine)
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
correct_edge_dropping = true
[]
[Mesh]
second_order = true
[file_mesh]
type = FileMeshGenerator
file = long-bottom-block-1elem-blocks-coarse.e
[]
[]
[Variables]
[disp_x]
block = '1 2'
scaling = 1e1
order = SECOND
[]
[disp_y]
block = '1 2'
scaling = 1e1
order = SECOND
[]
[frictional_normal_lm]
block = 4
scaling = 1e3
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = 10
secondary_boundary = 20
primary_subdomain = 3
secondary_subdomain = 4
lm_variable = frictional_normal_lm
disp_x = disp_x
disp_y = disp_y
correct_edge_dropping = true
[]
[]
[Constraints]
[frictional_normal_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = 10
secondary_boundary = 20
primary_subdomain = 3
secondary_subdomain = 4
variable = frictional_normal_lm
disp_x = disp_x
disp_y = disp_y
normalize_c = true
c = 1.0e-2
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 10
secondary_boundary = 20
primary_subdomain = 3
secondary_subdomain = 4
variable = frictional_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 10
secondary_boundary = 20
primary_subdomain = 3
secondary_subdomain = 4
variable = frictional_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-15'
l_max_its = 30
nl_max_its = 25
line_search = 'none'
nl_rel_tol = 1e-12
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
(modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-fretting-wear-test-action.i)
starting_point = 0.5e-1
offset = -0.045
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = long-bottom-block-1elem-blocks.e
[]
[remote]
type = BlockDeletionGenerator
input = file
block = '3 4'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[Problem]
material_coverage_check = false
kernel_coverage_check = false
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Modules/TensorMechanics/DynamicMaster]
[all]
add_variables = true
hht_alpha = 0.0
newmark_beta = 0.25
newmark_gamma = 0.5
mass_damping_coefficient = 0.0
stiffness_damping_coefficient = 1.0
generate_output = 'stress_xx stress_yy'
block = '1 2'
strain = FINITE
density = density
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '7750'
[]
[]
[AuxVariables]
[worn_depth]
block = 'normal_secondary_subdomain'
[]
[gap_vel]
block = 'normal_secondary_subdomain'
[]
[]
[AuxKernels]
[gap_vel]
type = WeightedGapVelAux
variable = gap_vel
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = normal_primary_subdomain
secondary_subdomain = normal_secondary_subdomain
disp_x = disp_x
disp_y = disp_y
[]
[worn_depth]
type = MortarArchardsLawAux
variable = worn_depth
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = normal_primary_subdomain
secondary_subdomain = normal_secondary_subdomain
displacements = 'disp_x disp_y'
friction_coefficient = 0.5
energy_wear_coefficient = 1.0e-6
normal_pressure = normal_normal_lm
execute_on = 'TIMESTEP_END'
[]
[]
[Contact]
[normal]
formulation = mortar
model = coulomb
primary = 20
secondary = 10
c_normal = 1e+06
c_tangential = 1.0e+6
capture_tolerance = 1.0e-5
newmark_beta = 0.25
newmark_gamma = 0.5
mortar_dynamics = true
wear_depth = worn_depth
friction_coefficient = 0.5
normalize_c = true
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(4.0 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * (cos(32.0 * pi / 4 * t) - 1.0)'
[]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 0.05
dtmin = .002
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15'
nl_max_its = 40
l_max_its = 15
line_search = 'l2'
snesmf_reuse_base = true
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/contact/test/tests/tan-pen-and-scaling/bouncing-block-tan-pen.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-no-lower-d-coarse.e
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = false
use_automatic_differentiation = true
strain = SMALL
[]
[]
[Materials]
[elasticity]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e3
poissons_ratio = 0.3
constant_on = SUBDOMAIN
[]
[stress]
type = ADComputeLinearElasticStress
[]
[]
[Contact]
[leftright]
secondary = 10
primary = 20
model = coulomb
formulation = tangential_penalty
penalty = 1e3
friction_coefficient = 0.4
normal_smoothing_distance = 0.2
[]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[../]
[]
[Executioner]
type = Transient
end_time = 100
dt = 5
dtmin = 5
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type -mat_mffd_err -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 1e-5 200'
l_max_its = 200
nl_max_its = 20
line_search = 'none'
automatic_scaling = true
verbose = true
scaling_group_variables = 'disp_x disp_y'
resid_vs_jac_scaling_param = 1
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exo]
type = Exodus
[]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[nl]
type = NumNonlinearIterations
[]
[lin]
type = NumLinearIterations
[]
[tot_nl]
type = CumulativeValuePostprocessor
postprocessor = nl
[]
[tot_lin]
type = CumulativeValuePostprocessor
postprocessor = lin
[]
[]
(modules/chemical_reactions/test/tests/desorption/langmuir_desorption.i)
# testing the entire desorption DEs
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
xmin = 0
xmax = 1
[]
[Variables]
[./pressure]
[../]
[./conc]
family = MONOMIAL
order = CONSTANT
[../]
[]
[ICs]
[./p_ic]
type = ConstantIC
variable = pressure
value = 1.0
[../]
[./conc_ic]
type = ConstantIC
variable = conc
value = 1.0
[../]
[]
[Kernels]
[./c_dot]
type = TimeDerivative
variable = conc
[../]
[./flow_from_matrix]
type = DesorptionFromMatrix
variable = conc
pressure_var = pressure
[../]
[./rho_dot]
type = TimeDerivative
variable = pressure
[../]
[./flux_to_porespace]
type = DesorptionToPorespace
variable = pressure
conc_var = conc
[../]
[]
[Postprocessors]
[./mass_rho]
type = ElementIntegralVariablePostprocessor
block = 0
variable = pressure
execute_on = 'initial timestep_end'
[../]
[./mass_conc]
type = ElementIntegralVariablePostprocessor
block = 0
variable = conc
execute_on = 'initial timestep_end'
[../]
[./mass_tot]
type = FunctionValuePostprocessor
function = mass_fcn
execute_on = 'initial timestep_end'
[../]
[./p0]
type = PointValue
variable = pressure
point = '0 0 0'
execute_on = 'initial timestep_end'
[../]
[./c0]
type = PointValue
variable = conc
point = '0 0 0'
execute_on = 'initial timestep_end'
[../]
[]
[Functions]
[./mass_fcn]
type = ParsedFunction
expression = a+b
symbol_names = 'a b'
symbol_values = 'mass_rho mass_conc'
[../]
[]
[Materials]
[./lang_stuff]
type = LangmuirMaterial
block = 0
one_over_desorption_time_const = 0.90909091
one_over_adsorption_time_const = 0.90909091
langmuir_density = 0.88
langmuir_pressure = 1.23
pressure_var = pressure
conc_var = conc
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
#petsc_options = '-snes_test_display'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.01
end_time = 2
[]
[Outputs]
file_base = langmuir_desorption
time_step_interval = 10
csv = 10
[] # Outputs
(modules/fluid_properties/test/tests/ics/rho_from_pressure_temperature/test.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
allow_renumbering = false
[]
[FluidProperties]
[fp_steam]
type = StiffenedGasFluidProperties
gamma = 1.43
cv = 1040.0
q = 2.03e6
p_inf = 0.0
q_prime = -2.3e4
k = 0.026
mu = 134.4e-7
M = 0.01801488
rho_c = 322.0
[]
[]
[AuxVariables]
[rho]
[]
[p]
[]
[T]
[]
[]
[ICs]
[rho_ic]
type = RhoFromPressureTemperatureIC
variable = rho
p = p
T = T
fp = fp_steam
[]
[p_ic]
type = ConstantIC
variable = p
value = 100e3
[]
[T_ic]
type = ConstantIC
variable = T
value = 500
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[rho_test]
type = ElementalVariableValue
elementid = 0
variable = rho
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
csv = true
execute_on = 'INITIAL'
[]
[Problem]
solve = false
[]
(modules/navier_stokes/test/tests/finite_element/ins/block-restriction/two-mats-one-eqn-set.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = 0
ymax = 1
nx = 16
ny = 8
elem_type = QUAD9
[]
[./corner_node_0]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_0'
coord = '0 0 0'
input = gen
[../]
[./corner_node_1]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_1'
coord = '1 0 0'
input = corner_node_0
[../]
[./subdomain1]
input = corner_node_1
type = SubdomainBoundingBoxGenerator
bottom_left = '1 0 0'
top_right = '2 1 0'
block_id = 1
[../]
[./break_boundary]
input = subdomain1
type = BreakBoundaryOnSubdomainGenerator
[../]
[./interface0]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '0'
paired_block = '1'
new_boundary = 'interface0'
[../]
[./interface1]
type = SideSetsBetweenSubdomainsGenerator
input = interface0
primary_block = '1'
paired_block = '0'
new_boundary = 'interface1'
[../]
[]
[Variables]
[velocity0]
order = SECOND
family = LAGRANGE_VEC
[]
[T0]
order = SECOND
[InitialCondition]
type = ConstantIC
value = 1.0
[]
[]
[p0]
[]
[]
[Kernels]
[./mass0]
type = INSADMass
variable = p0
[../]
[./momentum_time0]
type = INSADMomentumTimeDerivative
variable = velocity0
[../]
[./momentum_convection0]
type = INSADMomentumAdvection
variable = velocity0
[../]
[./momentum_viscous0]
type = INSADMomentumViscous
variable = velocity0
[../]
[./momentum_pressure0]
type = INSADMomentumPressure
variable = velocity0
pressure = p0
integrate_p_by_parts = true
[../]
[./temperature_time0]
type = INSADHeatConductionTimeDerivative
variable = T0
[../]
[./temperature_advection0]
type = INSADEnergyAdvection
variable = T0
[../]
[./temperature_conduction0]
type = ADHeatConduction
variable = T0
thermal_conductivity = 'k'
[../]
[]
[BCs]
[./no_slip0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'bottom_to_0 interface0 left'
[../]
[./lid0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'top_to_0'
function_x = 'lid_function0'
[../]
[./T_hot0]
type = DirichletBC
variable = T0
boundary = 'bottom_to_0'
value = 1
[../]
[./T_cold0]
type = DirichletBC
variable = T0
boundary = 'top_to_0'
value = 0
[../]
[./pressure_pin0]
type = DirichletBC
variable = p0
boundary = 'pinned_node_0'
value = 0
[../]
[./no_slip1]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'bottom_to_1 interface1 right'
[../]
[./lid1]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'top_to_1'
function_x = 'lid_function1'
[../]
[./T_hot1]
type = DirichletBC
variable = T0
boundary = 'bottom_to_1'
value = 1
[../]
[./T_cold1]
type = DirichletBC
variable = T0
boundary = 'top_to_1'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat0]
type = INSAD3Eqn
velocity = velocity0
pressure = p0
temperature = T0
block = '0'
[]
[ins_mat1]
type = INSAD3Eqn
velocity = velocity0
pressure = p0
temperature = T0
block = '1'
[]
[]
[Functions]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
[./lid_function0]
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[./lid_function1]
type = ParsedFunction
expression = '4*(x-1)*(2-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels -sub_pc_factor_shift_type'
petsc_options_value = 'asm 2 ilu 4 NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/block-restriction/one-mat-two-eqn-sets.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = 0
ymax = 1
nx = 16
ny = 8
elem_type = QUAD9
[]
[./corner_node_0]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_0'
coord = '0 0 0'
input = gen
[../]
[./corner_node_1]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_1'
coord = '1 0 0'
input = corner_node_0
[../]
[./subdomain1]
input = corner_node_1
type = SubdomainBoundingBoxGenerator
bottom_left = '1 0 0'
top_right = '2 1 0'
block_id = 1
[../]
[./break_boundary]
input = subdomain1
type = BreakBoundaryOnSubdomainGenerator
[../]
[./interface0]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '0'
paired_block = '1'
new_boundary = 'interface0'
[../]
[./interface1]
type = SideSetsBetweenSubdomainsGenerator
input = interface0
primary_block = '1'
paired_block = '0'
new_boundary = 'interface1'
[../]
[]
[Variables]
[velocity0]
order = SECOND
family = LAGRANGE_VEC
[]
[T0]
order = SECOND
[InitialCondition]
type = ConstantIC
value = 1.0
[]
[]
[p0]
[]
[]
[Kernels]
[./mass0]
type = INSADMass
variable = p0
block = 0
[../]
[./momentum_time0]
type = INSADMomentumTimeDerivative
variable = velocity0
block = 0
[../]
[./momentum_convection0]
type = INSADMomentumAdvection
variable = velocity0
block = 0
[../]
[./momentum_viscous0]
type = INSADMomentumViscous
variable = velocity0
block = 0
[../]
[./momentum_pressure0]
type = INSADMomentumPressure
variable = velocity0
pressure = p0
integrate_p_by_parts = true
block = 0
[../]
[./temperature_time0]
type = INSADHeatConductionTimeDerivative
variable = T0
block = 0
[../]
[./temperature_advection0]
type = INSADEnergyAdvection
variable = T0
block = 0
[../]
[./temperature_conduction0]
type = ADHeatConduction
variable = T0
thermal_conductivity = 'k'
block = 0
[../]
[./mass1]
type = INSADMass
variable = p0
block = 1
[../]
[./momentum_time1]
type = INSADMomentumTimeDerivative
variable = velocity0
block = 1
[../]
[./momentum_convection1]
type = INSADMomentumAdvection
variable = velocity0
block = 1
[../]
[./momentum_viscous1]
type = INSADMomentumViscous
variable = velocity0
block = 1
[../]
[./momentum_pressure1]
type = INSADMomentumPressure
variable = velocity0
pressure = p0
integrate_p_by_parts = true
block = 1
[../]
[./temperature_time1]
type = INSADHeatConductionTimeDerivative
variable = T0
block = 1
[../]
[./temperature_advection1]
type = INSADEnergyAdvection
variable = T0
block = 1
[../]
[./temperature_conduction1]
type = ADHeatConduction
variable = T0
thermal_conductivity = 'k'
block = 1
[../]
[]
[BCs]
[./no_slip0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'bottom_to_0 interface0 left'
[../]
[./lid0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'top_to_0'
function_x = 'lid_function0'
[../]
[./T_hot0]
type = DirichletBC
variable = T0
boundary = 'bottom_to_0'
value = 1
[../]
[./T_cold0]
type = DirichletBC
variable = T0
boundary = 'top_to_0'
value = 0
[../]
[./pressure_pin0]
type = DirichletBC
variable = p0
boundary = 'pinned_node_0'
value = 0
[../]
[./no_slip1]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'bottom_to_1 interface1 right'
[../]
[./lid1]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'top_to_1'
function_x = 'lid_function1'
[../]
[./T_hot1]
type = DirichletBC
variable = T0
boundary = 'bottom_to_1'
value = 1
[../]
[./T_cold1]
type = DirichletBC
variable = T0
boundary = 'top_to_1'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat0]
type = INSAD3Eqn
velocity = velocity0
pressure = p0
temperature = T0
block = '0 1'
[]
[]
[Functions]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
[./lid_function0]
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[./lid_function1]
type = ParsedFunction
expression = '4*(x-1)*(2-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels -sub_pc_factor_shift_type'
petsc_options_value = 'asm 2 ilu 4 NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
exodus = true
[]
(test/tests/dgkernels/ad_dg_diffusion/2d_diffusion_ad_dg_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[u]
order = FIRST
family = MONOMIAL
[InitialCondition]
type = ConstantIC
value = 1
[]
[]
[]
[Functions]
[forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[]
[exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[abs] # u * v
type = Reaction
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[DGKernels]
[dg_diff]
type = ADDGDiffusion
variable = u
epsilon = -1
sigma = 6
diff = diff
[]
[]
[Materials]
[ad_coupled_mat]
type = ADCoupledMaterial
coupled_var = u
ad_mat_prop = diff
regular_mat_prop = diff_regular
[]
[]
[BCs]
[all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[Adaptivity]
steps = 2
refine_fraction = 1.0
coarsen_fraction = 0
max_h_level = 8
[]
nl_rel_tol = 1e-10
[]
[Postprocessors]
[h]
type = AverageElementSize
[]
[dofs]
type = NumDOFs
[]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[]
[]
[Outputs]
exodus = true
[]
(test/tests/misc/save_in/dg_save_in_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 9
ny = 9
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[AuxVariables]
[./tot_resid]
order = FIRST
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
save_in = 'tot_resid'
[../]
[./forcing]
type = BodyForce
variable = u
function = 1
save_in = 'tot_resid'
[../]
[]
[DGKernels]
[./dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
save_in = 'tot_resid'
[../]
[]
[BCs]
[./robin]
type = RobinBC
boundary = 'left right top bottom'
variable = u
save_in = 'tot_resid'
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_rel_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(modules/peridynamics/test/tests/failure_tests/2D_stress_failure_H1NOSPD.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = PeridynamicsMesh
horizon_number = 3
cracks_start = '0.25 0.5 0'
cracks_end = '0.75 0.5 0'
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 8
ny = 8
[../]
[./gpd]
type = MeshGeneratorPD
input = gmg
retain_fe_mesh = false
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[AuxVariables]
[./damage]
[../]
[./intact_bonds_num]
[../]
[./critical_stress]
family = MONOMIAL
order = CONSTANT
[../]
[]
[AuxKernels]
[./bond_status]
type = RankTwoBasedFailureCriteriaNOSPD
variable = bond_status
rank_two_tensor = stress
critical_variable = critical_stress
failure_criterion = VonMisesStress
[../]
[]
[UserObjects]
[./damage]
type = NodalDamageIndexPD
variable = damage
[../]
[./intact_bonds]
type = NodalNumIntactBondsPD
variable = intact_bonds_num
[../]
[]
[ICs]
[./critical_stretch]
type = ConstantIC
variable = critical_stress
value = 150
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 1003
value = 0.0
[../]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = 1002
value = 0.0
[../]
[./bottom_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 1000
function = '-0.001*t'
[../]
[./rbm_x]
type = RBMPresetOldValuePD
variable = disp_x
boundary = 999
[../]
[./rbm_y]
type = RBMPresetOldValuePD
variable = disp_y
boundary = 999
[../]
[]
[Modules/Peridynamics/Mechanics/Master]
[./all]
formulation = NONORDINARY_STATE
stabilization = BOND_HORIZON_I
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2e5
poissons_ratio = 0.33
[../]
[./strain]
type = ComputePlaneSmallStrainNOSPD
stabilization = BOND_HORIZON_I
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
start_time = 0
dt = 0.5
end_time = 1
[./Quadrature]
type = GAUSS_LOBATTO
order = FIRST
[../]
[]
[Outputs]
file_base = 2D_stress_failure_H1NOSPD
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/lid-driven/transient-lid-driven-with-energy.i)
mu = 1
rho = 1
k = .01
cp = 1
velocity_interp_method = 'rc'
advected_interp_method = 'average'
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
[]
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 32
ny = 32
[]
[pin]
type = ExtraNodesetGenerator
input = gen
new_boundary = 'pin'
nodes = '0'
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
[]
[v]
type = INSFVVelocityVariable
[]
[pressure]
type = INSFVPressureVariable
[]
[T]
type = INSFVEnergyVariable
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[ICs]
[T]
type = ConstantIC
variable = T
value = 1
[]
[]
[AuxVariables]
[U]
order = CONSTANT
family = MONOMIAL
fv = true
[]
[]
[AuxKernels]
[mag]
type = VectorMagnitudeAux
variable = U
x = u
y = v
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[mean_zero_pressure]
type = FVIntegralValueConstraint
variable = pressure
lambda = lambda
[]
[u_time]
type = INSFVMomentumTimeDerivative
variable = 'u'
rho = ${rho}
momentum_component = 'x'
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[v_time]
type = INSFVMomentumTimeDerivative
variable = v
rho = ${rho}
momentum_component = 'y'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[temp_time]
type = INSFVEnergyTimeDerivative
variable = T
rho = ${rho}
dh_dt = dh_dt
[]
[temp_conduction]
type = FVDiffusion
coeff = 'k'
variable = T
[]
[temp_advection]
type = INSFVEnergyAdvection
variable = T
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
[]
[]
[FVBCs]
[top_x]
type = INSFVNoSlipWallBC
variable = u
boundary = 'top'
function = 'lid_function'
[]
[no_slip_x]
type = INSFVNoSlipWallBC
variable = u
boundary = 'left right bottom'
function = 0
[]
[no_slip_y]
type = INSFVNoSlipWallBC
variable = v
boundary = 'left right top bottom'
function = 0
[]
[T_hot]
type = FVDirichletBC
variable = T
boundary = 'bottom'
value = 1
[]
[T_cold]
type = FVDirichletBC
variable = T
boundary = 'top'
value = 0
[]
[]
[FunctorMaterials]
[functor_constants]
type = ADGenericFunctorMaterial
prop_names = 'cp k'
prop_values = '${cp} ${k}'
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = 'T'
rho = ${rho}
[]
[]
[Functions]
[lid_function]
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-fretting-wear-test.i)
starting_point = 0.5e-1
offset = -0.045
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[normal_lm]
block = 3
use_dual = true
# scaling = 1.0e-5
[]
[frictional_lm]
block = 3
use_dual = true
scaling = 1.0e-5
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_yy'
strain = FINITE
block = '1 2'
zeta = 0.04
hht_alpha = 0.0
[]
[inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[strain]
type = ComputeFiniteStrain
block = '1 2'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '7750'
[]
[]
[AuxVariables]
[worn_depth]
block = '3'
[]
[gap_vel]
block = '3'
[]
[vel_x]
block = '1 2'
[]
[accel_x]
block = '1 2'
[]
[vel_y]
block = '1 2'
[]
[accel_y]
block = '1 2'
[]
[vel_z]
block = '1 2'
[]
[accel_z]
block = '1 2'
[]
[]
[AuxKernels]
[gap_vel]
type = WeightedGapVelAux
variable = gap_vel
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
disp_x = disp_x
disp_y = disp_y
[]
[worn_depth]
type = MortarArchardsLawAux
variable = worn_depth
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
displacements = 'disp_x disp_y'
friction_coefficient = 0.5
energy_wear_coefficient = 1.0e-6
normal_pressure = normal_lm
execute_on = 'TIMESTEP_END'
[]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
secondary_variable = disp_x
lm_variable_normal = normal_lm
lm_variable_tangential_one = frictional_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeDynamicFrictionalForceLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
wear_depth = worn_depth
c = 1e6
c_t = 1e6
normalize_c = true
mu = 0.5
friction_lm = frictional_lm
capture_tolerance = 1.0e-5
newmark_beta = 0.25
newmark_gamma = 0.5
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(4.0 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-5 * (cos(32.0 * pi / 4 * t) - 1.0)'
[]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 0.05
dtmin = .002
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15'
nl_max_its = 40
l_max_its = 15
line_search = none
snesmf_reuse_base = true
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'contact'
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/contact/test/tests/mortar_dynamics/block-dynamics-friction-creep.i)
starting_point = 1e-1
offset = -0.095
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[normal_lm]
block = 3
use_dual = true
[]
[frictional_lm]
block = 3
use_dual = true
[]
[]
[AuxVariables]
[creep_strain_xx]
order = CONSTANT
family = MONOMIAL
block = '2'
[]
[creep_strain_yy]
order = CONSTANT
family = MONOMIAL
block = '2'
[]
[creep_strain_xy]
order = CONSTANT
family = MONOMIAL
block = '2'
[]
[]
[AuxKernels]
[creep_strain_xx]
type = RankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xx
index_i = 0
index_j = 0
block = '2'
[]
[creep_strain_yy]
type = RankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yy
index_i = 1
index_j = 1
block = '2'
[]
[creep_strain_xy]
type = RankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xy
index_i = 0
index_j = 1
block = '2'
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Modules/TensorMechanics/DynamicMaster]
[all]
add_variables = true
alpha = 0.0
newmark_beta = 0.25
newmark_gamma = 0.5
mass_damping_coefficient = 0.0
stiffness_damping_coefficient = 0.01
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_yy'
block = '1 2'
strain = FINITE
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.3
[]
[multiple_inelastic]
type = ComputeMultipleInelasticStress
inelastic_models = 'creep'
block = '2'
[]
[creep]
type = PowerLawCreepStressUpdate
coefficient = 1.0e-23 # 10e-24
n_exponent = 4
activation_energy = 0
block = '2'
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '775'
[]
[]
# User object provides the contact force (e.g. LM)
# for the application of the generalized force
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable_normal = normal_lm
lm_variable_tangential_one = frictional_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeDynamicFrictionalForceLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
friction_lm = frictional_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
c = 1e4
c_t = 1e4
mu = 0.5
interpolate_normals = false
newmark_beta = 0.25
newmark_gamma = 0.5
capture_tolerance = 1e-04
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 30 # 50
function = '1e-2*t' #'0.1 *sin(2 * pi / 12 * t)'
[]
[]
[Executioner]
type = Transient
end_time = 0.25
dt = 0.05
dtmin = 0.05
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err '
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
nl_max_its = 50
line_search = 'none'
snesmf_reuse_base = false
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(test/tests/postprocessors/volume/sphere1D.i)
# The volume of each block should be 3
[Mesh]
file = sphere1D.e
coord_type = RSPHERICAL
[]
[Functions]
[fred]
type = ParsedFunction
expression = '200'
[]
[]
[AuxVariables]
[constantVar]
order = FIRST
family = LAGRANGE
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
initial_condition = 100
[]
[]
[AuxKernels]
[fred]
type = ConstantAux
variable = constantVar
block = 1
value = 1
[]
[]
[ICs]
[ic1]
type = ConstantIC
variable = constantVar
value = 1
block = 1
[]
[]
[Kernels]
[heat_r]
type = Diffusion
variable = u
[]
[]
[BCs]
[temps]
type = FunctionDirichletBC
variable = u
boundary = 1
function = fred
[]
[]
[Materials]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -snes_ls -ksp_gmres_restart'
petsc_options_value = 'lu basic 101'
line_search = 'none'
nl_abs_tol = 1e-11
nl_rel_tol = 1e-10
l_max_its = 20
[]
[Postprocessors]
[should_be_one]
type = ElementAverageValue
block = 1
variable = constantVar
execute_on = 'initial timestep_end'
[]
[volume1]
type = VolumePostprocessor
block = 1
execute_on = 'initial timestep_end'
[]
[volume2]
type = VolumePostprocessor
block = 2
execute_on = 'initial timestep_end'
[]
[volume3]
type = VolumePostprocessor
block = 3
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/mass_conservation/mass08.i)
# Checking that the mass postprocessor throws the correct error when a given phase index
# is too large
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[sat]
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[]
[ICs]
[pinit]
type = ConstantIC
value = 1
variable = pp
[]
[satinit]
type = FunctionIC
function = 1-x
variable = sat
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = sat
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp sat'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 1
thermal_expansion = 0
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 0.1
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = pp
phase1_saturation = sat
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[]
[Postprocessors]
[comp1_total_mass]
type = PorousFlowFluidMass
fluid_component = 1
phase = 2
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
(modules/richards/test/tests/pressure_pulse/pp_fu_22.i)
# investigating pressure pulse in 1D with 2 phase
# transient
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 100
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = 'DensityWater DensityGas'
relperm_UO = 'RelPermWater RelPermGas'
SUPG_UO = 'SUPGwater SUPGgas'
sat_UO = 'SatWater SatGas'
seff_UO = 'SeffWater SeffGas'
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 2E6
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1E-5
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1E-5
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.0
n = 3
[../]
[./SatWater]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SatGas]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGwater]
type = RichardsSUPGstandard
p_SUPG = 1E3
[../]
[./SUPGgas]
type = RichardsSUPGstandard
p_SUPG = 1E3
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./water_ic]
type = ConstantIC
value = 2E6
variable = pwater
[../]
[./gas_ic]
type = ConstantIC
value = 2E6
variable = pgas
[../]
[]
[BCs]
[./left]
type = DirichletBC
boundary = left
value = 3E6
variable = pwater
[../]
[./left_gas]
type = DirichletBC
boundary = left
value = 3E6
variable = pgas
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[Kernels]
active = 'richardsfwater richardstwater richardsfgas richardstgas pconstraint'
[./richardstwater]
type = RichardsMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFullyUpwindFlux
variable = pwater
[../]
[./richardstgas]
type = RichardsMassChange
variable = pgas
[../]
[./richardsfgas]
type = RichardsFullyUpwindFlux
variable = pgas
[../]
[./pconstraint]
type = RichardsPPenalty
variable = pgas
a = 1E-8
lower_var = pwater
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = SeffWater
pressure_vars = 'pwater pgas'
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-15'
viscosity = '1E-3 1E-5'
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-pc_factor_shift_type'
petsc_options_value = 'nonzero'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
nl_rel_tol = 1.e-9
nl_max_its = 20
dt = 1E3
dtmin = 1E3
end_time = 1E4
[]
[Outputs]
file_base = pp_fu_22
execute_on = 'initial timestep_end final'
time_step_interval = 10000
exodus = true
[]
(modules/combined/test/tests/additive_manufacturing/check_initial_condition.i)
[Problem]
kernel_coverage_check = false
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 10
ymin = 0
ymax = 10
zmin = 0
zmax = 0.5
nx = 20
ny = 20
nz = 1
[]
[left_domain]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '2.5 10 0.5'
block_id = 1
[]
[middle_domain]
input = left_domain
type = SubdomainBoundingBoxGenerator
bottom_left = '2.5 0 0'
top_right = '5 10 0.5'
block_id = 2
[]
[right_domain]
input = middle_domain
type = SubdomainBoundingBoxGenerator
bottom_left = '5 0 0'
top_right = '10 10 0.5'
block_id = 3
[]
[sidesets]
input = right_domain
type = SideSetsAroundSubdomainGenerator
normal = '1 0 0'
block = 2
new_boundary = 'moving_interface'
[]
[]
[Variables]
[temp]
block = '1 2'
[]
[]
[ICs]
[temp_block1]
type = ConstantIC
variable = temp
value = 300
block = 1
[]
[temp_block2]
type = ConstantIC
variable = temp
value = 1000
block = 2
[]
[]
[Functions]
[fx]
type = ParsedFunction
expression = '5.25'
[]
[fy]
type = ParsedFunction
expression = '2.5*t'
[]
[fz]
type = ParsedFunction
expression = '0.25'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
automatic_scaling = true
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_max_its = 10
nl_max_its = 20
nl_rel_tol = 1e-4
start_time = 0.0
end_time = 1.0
dt = 1e-1
dtmin = 1e-4
[]
[UserObjects]
[activated_elem_uo]
type = ActivateElementsByPath
execute_on = timestep_begin
function_x = fx
function_y = fy
function_z = fz
active_subdomain_id = 2
expand_boundary_name = 'moving_interface'
[]
[]
[Outputs]
exodus = true
[]
(modules/xfem/test/tests/moving_interface/verification/1D_xy_homog1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: quasi-1D
# Coordinate System: xy
# Material Numbers/Types: homogeneous 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed linear level set function
# Description:
# A simple transient heat transfer problem in Cartesian coordinates designed
# with the Method of Manufactured Solutions. This problem was developed to
# verify XFEM performance in the presence of a moving interface for linear
# element models that can be exactly evaluated by FEM/Moose. Both the
# temperature solution and level set function are designed to be linear to
# attempt to minimize error between the Moose/exact solution and XFEM results.
# Thermal conductivity is a single, constant value at all points in the system.
# Results:
# The temperature at the left boundary (x=0) exhibits the largest difference
# between the FEM/Moose solution and XFEM results. We present the XFEM results
# at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 480.0000064
# 0.6 520 520.0000323
# 0.8 560 560.0000896
# 1.0 600 600.0001870
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 1
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 0.5
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-200*x+200)'
[../]
[./ls_func]
type = ParsedFunction
expression = '1-(x-0.04)-0.2*t'
[../]
[./neumann_func]
type = ParsedFunction
expression = '1.5*200*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericConstantMaterial
prop_names = 'diffusion_coefficient'
prop_values = 1.5
[../]
[]
[BCs]
[./left_du]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 'right'
value = 400
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/postprocessors/internal_side_jump/internal_side_jump.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
[]
[./box]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '0.5 0.5 0'
block_id = 1
[../]
[]
[Variables]
[./u]
family = L2_LAGRANGE
order = FIRST
[../]
[]
[ICs]
[./ic0]
type = ConstantIC
variable = u
block = 0
value = 4
[../]
[./ic1]
type = ConstantIC
variable = u
block = 1
value = 6
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[DGKernels]
[./dgdiff]
type = DGDiffusion
variable = u
sigma = 4
epsilon = 1
[../]
[]
[BCs]
[./all]
type = VacuumBC
variable = u
boundary = '0 1 2 3'
[../]
[]
[Postprocessors]
[./L2_norm]
type = ElementL2Norm
variable = u
[../]
[./jump]
type = InternalSideJump
variable = u
execute_on = 'initial timestep_end'
[../]
[./jumpold]
type = InternalSideJump
variable = u
implicit = false
[../]
[]
[Executioner]
type = Transient
num_steps = 3
nl_abs_tol = 1e-12
[]
[Outputs]
csv = true
[]
(modules/richards/test/tests/pressure_pulse/pp22.i)
# investigating pressure pulse in 1D with 2 phase
# transient
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 100
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 2E6
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1E-5
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1E-5
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.0
n = 3
[../]
[./SatWater]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SatGas]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGwater]
type = RichardsSUPGstandard
p_SUPG = 1E3
[../]
[./SUPGgas]
type = RichardsSUPGstandard
p_SUPG = 1E3
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./water_ic]
type = ConstantIC
value = 2E6
variable = pwater
[../]
[./gas_ic]
type = ConstantIC
value = 2E6
variable = pgas
[../]
[]
[BCs]
[./left]
type = DirichletBC
boundary = left
value = 3E6
variable = pwater
[../]
[./left_gas]
type = DirichletBC
boundary = left
value = 3E6
variable = pgas
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[Kernels]
active = 'richardsfwater richardstwater richardsfgas richardstgas pconstraint'
[./richardstwater]
type = RichardsMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFlux
variable = pwater
[../]
[./richardstgas]
type = RichardsMassChange
variable = pgas
[../]
[./richardsfgas]
type = RichardsFlux
variable = pgas
[../]
[./pconstraint]
type = RichardsPPenalty
variable = pgas
a = 1E-8
lower_var = pwater
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = SeffWater
pressure_vars = 'pwater pgas'
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-15'
density_UO = 'DensityWater DensityGas'
relperm_UO = 'RelPermWater RelPermGas'
SUPG_UO = 'SUPGwater SUPGgas'
sat_UO = 'SatWater SatGas'
seff_UO = 'SeffWater SeffGas'
viscosity = '1E-3 1E-5'
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-pc_factor_shift_type'
petsc_options_value = 'nonzero'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E3
dtmin = 1E3
nl_rel_tol=1.e-10
nl_max_its=20
end_time = 1E4
[]
[Outputs]
file_base = pp22
execute_on = 'initial timestep_end final'
time_step_interval = 10000
exodus = true
[]
(modules/richards/test/tests/gravity_head_2/gh_lumped_08.i)
# unsaturated = true
# gravity = true
# supg = true
# transient = true
# lumped = true
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmin = 0
xmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = 'DensityWater DensityGas'
relperm_UO = 'RelPermWater RelPermGas'
SUPG_UO = 'SUPGwater SUPGgas'
sat_UO = 'SatWater SatGas'
seff_UO = 'SeffWater SeffGas'
viscosity = '1E-3 0.5E-3'
gravity = '-1 0 0'
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1E-2 1E-1 1E0 1E1 1E3 1E4 1E5 1E6 1E7'
x = '0 1E-1 1E0 1E1 1E2 1E3 1E4 1E5 1E6'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 1.0E2
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 0.5
bulk_mod = 0.5E2
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.0
n = 3
[../]
[./SatWater]
type = RichardsSat
s_res = 0.1
sum_s_res = 0.15
[../]
[./SatGas]
type = RichardsSat
s_res = 0.05
sum_s_res = 0.15
[../]
[./SUPGwater]
type = RichardsSUPGstandard
p_SUPG = 1E-3
[../]
[./SUPGgas]
type = RichardsSUPGstandard
p_SUPG = 1E-3
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./water_ic]
type = ConstantIC
value = 1
variable = pwater
[../]
[./gas_ic]
type = ConstantIC
value = 2
variable = pgas
[../]
[]
[Kernels]
active = 'richardsfwater richardstwater richardsfgas richardstgas'
[./richardstwater]
type = RichardsLumpedMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFlux
variable = pwater
[../]
[./richardstgas]
type = RichardsLumpedMassChange
variable = pgas
[../]
[./richardsfgas]
type = RichardsFlux
variable = pgas
[../]
[]
[AuxVariables]
[./seffgas]
[../]
[./seffwater]
[../]
[]
[AuxKernels]
[./seffgas_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffGas
variable = seffgas
[../]
[./seffwater_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffWater
variable = seffwater
[../]
[]
[Postprocessors]
[./mwater_init]
type = RichardsMass
variable = pwater
execute_on = timestep_begin
outputs = none
[../]
[./mgas_init]
type = RichardsMass
variable = pgas
execute_on = timestep_begin
outputs = none
[../]
[./mwater_fin]
type = RichardsMass
variable = pwater
execute_on = timestep_end
outputs = none
[../]
[./mgas_fin]
type = RichardsMass
variable = pgas
execute_on = timestep_end
outputs = none
[../]
[./mass_error_water]
type = FunctionValuePostprocessor
function = fcn_mass_error_w
[../]
[./mass_error_gas]
type = FunctionValuePostprocessor
function = fcn_mass_error_g
[../]
[./pw_left]
type = PointValue
point = '0 0 0'
variable = pwater
outputs = none
[../]
[./pw_right]
type = PointValue
point = '1 0 0'
variable = pwater
outputs = none
[../]
[./error_water]
type = FunctionValuePostprocessor
function = fcn_error_water
[../]
[./pg_left]
type = PointValue
point = '0 0 0'
variable = pgas
outputs = none
[../]
[./pg_right]
type = PointValue
point = '1 0 0'
variable = pgas
outputs = none
[../]
[./error_gas]
type = FunctionValuePostprocessor
function = fcn_error_gas
[../]
[]
[Functions]
[./fcn_mass_error_w]
type = ParsedFunction
expression = 'abs(0.5*(mi-mf)/(mi+mf))'
symbol_names = 'mi mf'
symbol_values = 'mwater_init mwater_fin'
[../]
[./fcn_mass_error_g]
type = ParsedFunction
expression = 'abs(0.5*(mi-mf)/(mi+mf))'
symbol_names = 'mi mf'
symbol_values = 'mgas_init mgas_fin'
[../]
[./fcn_error_water]
type = ParsedFunction
expression = 'abs((-b*log(-(gdens0*xval+(-b*exp(-p0/b)))/b)-p1)/p1)'
symbol_names = 'b gdens0 p0 xval p1'
symbol_values = '1E2 -1 pw_left 1 pw_right'
[../]
[./fcn_error_gas]
type = ParsedFunction
expression = 'abs((-b*log(-(gdens0*xval+(-b*exp(-p0/b)))/b)-p1)/p1)'
symbol_names = 'b gdens0 p0 xval p1'
symbol_values = '0.5E2 -0.5 pg_left 1 pg_right'
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = gh_lumped_08
csv = true
[]
(modules/contact/test/tests/mortar_dynamics/block-dynamics.i)
starting_point = 2e-1
offset = -0.19
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[normal_lm]
block = 3
use_dual = true
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_yy'
strain = FINITE
block = '1 2'
zeta = 1.0
alpha = 0.0
[]
[inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[strain]
type = ComputeFiniteStrain
block = '1 2'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '7750'
[]
[]
[AuxVariables]
[vel_x]
block = '1 2'
[]
[accel_x]
block = '1 2'
[]
[vel_y]
block = '1 2'
[]
[accel_y]
block = '1 2'
[]
[vel_z]
block = '1 2'
[]
[accel_z]
block = '1 2'
[]
[]
[AuxKernels]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = 'LINEAR timestep_end'
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = 'LINEAR timestep_end'
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = 'LINEAR timestep_end'
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = 'LINEAR timestep_end'
[]
[]
# User object provides the contact force (e.g. LM)
# for the application of the generalized force
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable = normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeDynamicWeightedGapLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
c = 1e4
capture_tolerance = 1.0e-5
newmark_beta = 0.25
newmark_gamma = 0.5
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 75
dt = 0.05
dtmin = .05
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err '
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = false
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/functional_expansion_tools/examples/2D_interface/sub.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.4
xmax = 2.4
nx = 30
ymin = 0.0
ymax = 10.0
ny = 20
[]
[Variables]
[./s]
[../]
[]
[Kernels]
[./diff_s]
type = HeatConduction
variable = s
[../]
[./time_diff_s]
type = HeatConductionTimeDerivative
variable = s
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_s]
type = ConstantIC
value = 2
variable = s
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = s
boundary = bottom
value = 0.1
[../]
[./interface_flux]
type = FXFluxBC
boundary = left
variable = s
function = FX_Basis_Flux_Sub
[../]
[]
[Functions]
[./FX_Basis_Value_Sub]
type = FunctionSeries
series_type = Cartesian
orders = '4'
physical_bounds = '0.0 10'
y = Legendre
[../]
[./FX_Basis_Flux_Sub]
type = FunctionSeries
series_type = Cartesian
orders = '5'
physical_bounds = '0.0 10'
y = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Sub]
type = FXBoundaryValueUserObject
function = FX_Basis_Value_Sub
variable = s
boundary = left
[../]
[./FX_Flux_UserObject_Sub]
type = FXBoundaryFluxUserObject
function = FX_Basis_Flux_Sub
variable = s
boundary = left
diffusivity = thermal_conductivity
[../]
[]
[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'
[]
(modules/porous_flow/examples/flow_through_fractured_media/fine_thick_fracture_steady.i)
# Using a single-dimensional mesh
# Steady-state porepressure distribution along a fracture in a porous matrix
# This is used to initialise the transient solute-transport simulation
[Mesh]
type = FileMesh
# The gold mesh is used to reduce the number of large files in the MOOSE repository.
# The porepressure is not read from the gold mesh
file = 'gold/fine_thick_fracture_steady_out.e'
block_id = '1 2 3'
block_name = 'fracture matrix1 matrix2'
boundary_id = '1 2'
boundary_name = 'bottom top'
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[pp]
[]
[]
[ICs]
[pp]
type = ConstantIC
variable = pp
value = 1e6
[]
[]
[BCs]
[ptop]
type = DirichletBC
variable = pp
boundary = top
value = 1e6
[]
[pbottom]
type = DirichletBC
variable = pp
boundary = bottom
value = 1.002e6
[]
[]
[Kernels]
[adv0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[relp]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[permeability1]
type = PorousFlowPermeabilityConst
permeability = '3e-8 0 0 0 3e-8 0 0 0 3e-8' # the true permeability is used without scaling by aperture
block = 'fracture'
[]
[permeability2]
type = PorousFlowPermeabilityConst
permeability = '1e-20 0 0 0 1e-20 0 0 0 1e-20'
block = 'matrix1 matrix2'
[]
[]
[Preconditioning]
active = basic
[mumps_is_best_for_parallel_jobs]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[basic]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu NONZERO 2 '
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
# controls for nonlinear iterations
nl_abs_tol = 1e-9
nl_rel_tol = 1e-10
[]
[Outputs]
exodus = true
execute_on = 'timestep_end'
[]
(modules/porous_flow/test/tests/dirackernels/squarepulse1.i)
# Test PorousFlowSquarePulsePointSource DiracKernel
[Mesh]
type = GeneratedMesh
dim = 2
bias_x = 1.1
bias_y = 1.1
ymax = 1
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = pp
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.2
[]
[]
[Postprocessors]
[total_mass]
type = PorousFlowFluidMass
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
nl_abs_tol = 1e-14
dt = 200
end_time = 2000
[]
[Outputs]
perf_graph = true
file_base = squarepulse1
csv = true
execute_on = 'initial timestep_end'
[con]
output_linear = true
type = Console
[]
[]
[ICs]
[PressureIC]
variable = pp
type = ConstantIC
value = 20e6
[]
[]
[DiracKernels]
[sink1]
type = PorousFlowSquarePulsePointSource
start_time = 100
end_time = 300
point = '0.5 0.5 0'
mass_flux = -0.1
variable = pp
[]
[sink]
type = PorousFlowSquarePulsePointSource
start_time = 600
end_time = 1400
point = '0.5 0.5 0'
mass_flux = -0.1
variable = pp
[]
[source]
point = '0.5 0.5 0'
start_time = 1500
mass_flux = 0.2
end_time = 2000
variable = pp
type = PorousFlowSquarePulsePointSource
[]
[]
(test/tests/dgkernels/2d_diffusion_dg/no_functor_additions.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[AuxVariables]
[v]
order = FIRST
family = MONOMIAL
[]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[../]
[./exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./abs] # u * v
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGKernels]
[regular_dg_diffusion]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[]
[]
[DGDiffusionAction]
variable = u
kernels_to_add = 'COUPLED'
coupled_var = v
[]
[BCs]
[./all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[console]
type = Console
system_info = 'framework mesh aux nonlinear relationship execution'
[]
[]
[Problem]
error_on_jacobian_nonzero_reallocation = true
[]
[Postprocessors]
[num_rm]
type = NumRelationshipManagers
[]
[]
(modules/phase_field/test/tests/MaskedBodyForce/MaskedBodyForce_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
elem_type = QUAD
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./c]
[../]
[]
[ICs]
[./initial]
value = 1.0
variable = u
type = ConstantIC
[../]
[./c_IC]
int_width = 0.1
x1 = 0.5
y1 = 0.5
radius = 0.25
outvalue = 0
variable = c
invalue = 1
type = SmoothCircleIC
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[./source]
type = MaskedBodyForce
variable = u
value = 1
mask = mask
[../]
[]
[Materials]
[./mask]
type = ParsedMaterial
expression = if(c>0.5,0,1)
property_name = mask
coupled_variables = c
[../]
[]
[Executioner]
type = Transient
num_steps = 1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_temperature/phy.parent.i)
# This tests a transfer of temperature values computed by master app and used by a child app
# as a heat structure boundary condition
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 1
nx = 10
[]
[Functions]
[T_bc_fn]
type = ParsedFunction
expression = '300+t*x*10'
[]
[T_ffn]
type = ParsedFunction
expression = 'x*10'
[]
[]
[Variables]
[T]
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T
value = 300
[]
[]
[Kernels]
[td]
type = ADTimeDerivative
variable = T
[]
[diff]
type = ADDiffusion
variable = T
[]
[ffn]
type = BodyForce
variable = T
function = T_ffn
[]
[]
[BCs]
[left]
type = FunctionDirichletBC
variable = T
boundary = 'left right'
function = T_bc_fn
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 2
nl_abs_tol = 1e-10
abort_on_solve_fail = true
solve_type = NEWTON
[]
[MultiApps]
[thm]
type = TransientMultiApp
app_type = ThermalHydraulicsApp
input_files = phy.child.i
execute_on = 'initial timestep_end'
[]
[]
[Transfers]
[T_to_thm]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = thm
source_variable = T
variable = T_ext
to_boundaries = 'hs:outer'
[]
[]
[Outputs]
exodus = true
show = 'T'
[]
(modules/navier_stokes/test/tests/finite_volume/pins/block-restriction/with-empty-block.i)
mu = 1.2
rho_fluid = 0.2
k_fluid = 1.1
cp_fluid = 2.3
T_cold = 310
alpha = 1e-3
Q = 200
[Problem]
kernel_coverage_check = false
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
velocity_interp_method = 'rc'
advected_interp_method = 'average'
[]
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '0.3683 0.0127'
dy = '0.0127 0.2292 2.5146 0.2292 0.0127'
ix = '2 1'
iy = '1 2 3 2 1'
subdomain_id = '0 0
1 0
2 0
1 0
0 0
'
[]
[rename_block_name]
type = RenameBlockGenerator
input = cmg
old_block = '0 1 2'
new_block = 'wall_block spacer_block porous_block'
[]
[solid_fluid_interface_1]
type = SideSetsBetweenSubdomainsGenerator
input = rename_block_name
primary_block = porous_block
paired_block = wall_block
new_boundary = 'solid_fluid_interface'
[]
[solid_fluid_interface_2]
type = SideSetsBetweenSubdomainsGenerator
input = solid_fluid_interface_1
primary_block = spacer_block
paired_block = wall_block
new_boundary = 'solid_fluid_interface'
[]
[wall_left_boundary_1]
type = SideSetsFromBoundingBoxGenerator
input = solid_fluid_interface_2
bottom_left = '0 0 0'
top_right = '0.1 0.0127 0'
included_boundaries = left
boundary_new = wall_left
[]
[wall_left_boundary_2]
type = SideSetsFromBoundingBoxGenerator
input = wall_left_boundary_1
bottom_left = '0 2.9857 0'
top_right = '0.1 2.9984 0'
included_boundaries = left
boundary_new = wall_left
[]
[fluid_left_boundary]
type = SideSetsFromBoundingBoxGenerator
input = wall_left_boundary_2
bottom_left = '0 0.0127 0'
top_right = '0.1 2.9857 0'
included_boundaries = left
boundary_new = fluid_left
[]
coord_type = RZ
rz_coord_axis = Y
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = superficial_vel_x
v = superficial_vel_y
pressure = pressure
porosity = porosity
block = 'spacer_block porous_block'
[]
[]
[Variables]
[superficial_vel_x]
type = PINSFVSuperficialVelocityVariable
block = 'spacer_block porous_block'
[]
[superficial_vel_y]
type = PINSFVSuperficialVelocityVariable
block = 'spacer_block porous_block'
[]
[pressure]
type = INSFVPressureVariable
block = 'spacer_block porous_block'
[]
[T_fluid]
type = INSFVEnergyVariable
block = 'spacer_block porous_block'
[]
[lambda]
family = SCALAR
order = FIRST
block = 'spacer_block porous_block'
[]
[]
[AuxVariables]
[porosity]
type = MooseVariableFVReal
block = 'spacer_block porous_block'
[]
[]
[FVKernels]
# No mass time derivative because imcompressible (derivative = 0)
[mass]
type = PINSFVMassAdvection
variable = pressure
rho = ${rho_fluid}
block = 'spacer_block porous_block'
[]
[mean_zero_pressure]
type = FVIntegralValueConstraint
variable = pressure
lambda = lambda
block = 'spacer_block porous_block'
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_x
rho = ${rho_fluid}
momentum_component = 'x'
block = 'spacer_block porous_block'
porosity = porosity
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_x
mu = ${mu}
momentum_component = 'x'
block = 'spacer_block porous_block'
porosity = porosity
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_x
momentum_component = 'x'
pressure = pressure
block = 'spacer_block porous_block'
porosity = porosity
[]
[u_buoyancy]
type = PINSFVMomentumBoussinesq
variable = superficial_vel_x
T_fluid = T_fluid
gravity = '0 -1 0'
rho = ${rho_fluid}
ref_temperature = ${T_cold}
momentum_component = 'x'
block = 'spacer_block porous_block'
porosity = porosity
[]
[u_gravity]
type = PINSFVMomentumGravity
variable = superficial_vel_x
gravity = '0 -1 0'
rho = ${rho_fluid}
momentum_component = 'x'
block = 'spacer_block porous_block'
porosity = porosity
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = superficial_vel_y
rho = ${rho_fluid}
momentum_component = 'y'
block = 'spacer_block porous_block'
porosity = porosity
[]
[v_viscosity]
type = PINSFVMomentumDiffusion
variable = superficial_vel_y
mu = ${mu}
momentum_component = 'y'
block = 'spacer_block porous_block'
porosity = porosity
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = superficial_vel_y
momentum_component = 'y'
pressure = pressure
block = 'spacer_block porous_block'
porosity = porosity
[]
[v_buoyancy]
type = PINSFVMomentumBoussinesq
variable = superficial_vel_y
T_fluid = T_fluid
gravity = '0 -1 0'
rho = ${rho_fluid}
ref_temperature = ${T_cold}
momentum_component = 'y'
block = 'spacer_block porous_block'
porosity = porosity
[]
[v_gravity]
type = PINSFVMomentumGravity
variable = superficial_vel_y
gravity = '0 -1 0'
rho = ${rho_fluid}
momentum_component = 'y'
block = 'spacer_block porous_block'
porosity = porosity
[]
[temp_conduction]
type = PINSFVEnergyDiffusion
k = 'k_fluid'
variable = T_fluid
block = 'spacer_block porous_block'
porosity = porosity
[]
[temp_advection]
type = PINSFVEnergyAdvection
variable = T_fluid
block = 'spacer_block porous_block'
[]
[heat_source]
type = FVBodyForce
variable = T_fluid
function = ${Q}
block = 'porous_block'
[]
[]
[FVBCs]
[no_slip_x]
type = INSFVNoSlipWallBC
variable = superficial_vel_x
boundary = 'solid_fluid_interface'
function = 0
[]
[no_slip_y]
type = INSFVNoSlipWallBC
variable = superficial_vel_y
boundary = 'solid_fluid_interface'
function = 0
[]
[reflective_x]
type = INSFVSymmetryVelocityBC
variable = superficial_vel_x
boundary = fluid_left
momentum_component = 'x'
mu = ${mu}
u = superficial_vel_x
v = superficial_vel_y
[]
[reflective_y]
type = INSFVSymmetryVelocityBC
variable = superficial_vel_y
boundary = fluid_left
momentum_component = 'y'
mu = ${mu}
u = superficial_vel_x
v = superficial_vel_y
[]
[reflective_p]
type = INSFVSymmetryPressureBC
boundary = fluid_left
variable = pressure
[]
[T_reflective]
type = FVNeumannBC
variable = T_fluid
boundary = fluid_left
value = 0
[]
[T_cold_boundary]
type = FVDirichletBC
variable = T_fluid
boundary = solid_fluid_interface
value = ${T_cold}
[]
[]
[ICs]
[porosity_spacer]
type = ConstantIC
variable = porosity
block = spacer_block
value = 1.0
[]
[porosity_fuel]
type = ConstantIC
variable = porosity
block = porous_block
value = 0.1
[]
[temp_ic_fluid]
type = ConstantIC
variable = T_fluid
value = ${T_cold}
block = 'spacer_block porous_block'
[]
[superficial_vel_x]
type = ConstantIC
variable = superficial_vel_x
value = 1E-5
block = 'spacer_block porous_block'
[]
[superficial_vel_y]
type = ConstantIC
variable = superficial_vel_y
value = 1E-5
block = 'spacer_block porous_block'
[]
[]
[FunctorMaterials]
[functor_constants_fluid]
type = ADGenericFunctorMaterial
prop_names = 'alpha_b cp k_fluid'
prop_values = '${alpha} ${cp_fluid} ${k_fluid}'
block = 'spacer_block porous_block'
[]
[density_fluid]
type = INSFVEnthalpyFunctorMaterial
temperature = 'T_fluid'
rho = ${rho_fluid}
block = 'spacer_block porous_block'
[]
[functor_constants_steel]
# We need this to avoid errors for materials not existing on every block
type = ADGenericFunctorMaterial
prop_names = 'dummy'
prop_values = 0.0
block = wall_block
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = none
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
[Debug]
show_var_residual_norms = true
[]
(test/tests/executioners/executioner/steady_state_check_test.i)
#
# Run transient simulation into steady state
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Variables]
active = 'u'
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
# expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
expression = -4
[../]
[./exact_fn]
type = ParsedFunction
# expression = t*t*t*((x*x)+(y*y))
expression = ((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
solve_type = 'PJFNK'
nl_abs_tol = 1e-14
start_time = 0.0
num_steps = 12
dt = 1
steady_state_detection = true
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_ss_check
exodus = true
[]
(modules/contact/test/tests/bouncing-block-contact/frictional-nodal-min-normal-lm-mortar-pdass-tangential-lm-mortar-action.i)
starting_point = 2e-1
# We offset slightly so we avoid the case where the bottom of the secondary block and the top of the
# primary block are perfectly vertically aligned which can cause the backtracking line search some
# issues for a coarse mesh (basic line search handles that fine)
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
[original_file_mesh]
type = FileMeshGenerator
file = long-bottom-block-1elem-blocks-coarse.e
[]
# These sidesets need to be deleted because the contact action adds them automatically. For this
# particular mesh, the new IDs will be identical to the deleted ones and will conflict if we don't
# remove the original ones.
[delete_3]
type = BlockDeletionGenerator
input = original_file_mesh
block = 3
[]
[revised_file_mesh]
type = BlockDeletionGenerator
input = delete_3
block = 4
[]
[]
[Variables]
[disp_x]
block = '1 2'
# order = SECOND
[]
[disp_y]
block = '1 2'
# order = SECOND
[]
[]
[Contact]
[frictional]
primary = 20
secondary = 10
formulation = mortar
model = coulomb
friction_coefficient = 0.1
c_normal = 1.0e-2
c_tangential = 1.0e-1
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
hide = 'contact_pressure nodal_area penetration'
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = frictional_normal_lm
subdomain = frictional_secondary_subdomain
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/phase_field/examples/multiphase/GrandPotential3Phase.i)
# This is an example of implementation of the multi-phase, multi-order parameter
# grand potential based phase-field model described in Phys. Rev. E, 98, 023309
# (2018). It includes 3 phases with 1 grain of each phase. This example was used
# to generate the results shown in Fig. 3 of the paper.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 60
xmin = -15
xmax = 15
[]
[Variables]
[./w]
[../]
[./etaa0]
[../]
[./etab0]
[../]
[./etad0]
[../]
[]
[ICs]
[./IC_etaa0]
type = FunctionIC
variable = etaa0
function = ic_func_etaa0
[../]
[./IC_etab0]
type = FunctionIC
variable = etab0
function = ic_func_etab0
[../]
[./IC_etad0]
type = ConstantIC
variable = etad0
value = 0.1
[../]
[./IC_w]
type = FunctionIC
variable = w
function = ic_func_w
[../]
[]
[Functions]
[./ic_func_etaa0]
type = ParsedFunction
expression = '0.9*0.5*(1.0-tanh((x)/sqrt(2.0)))'
[../]
[./ic_func_etab0]
type = ParsedFunction
expression = '0.9*0.5*(1.0+tanh((x)/sqrt(2.0)))'
[../]
[./ic_func_w]
type = ParsedFunction
expression = 0
[../]
[]
[Kernels]
# Order parameter eta_alpha0
[./ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0 etad0'
gamma_names = 'gab gad'
[../]
[./ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
coupled_variables = 'etab0 etad0 w'
[../]
[./ACa0_int]
type = ACInterface
variable = etaa0
kappa_name = kappa
[../]
[./ea0_dot]
type = TimeDerivative
variable = etaa0
[../]
# Order parameter eta_beta0
[./ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etaa0 etad0'
gamma_names = 'gab gbd'
[../]
[./ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etad0 w'
[../]
[./ACb0_int]
type = ACInterface
variable = etab0
kappa_name = kappa
[../]
[./eb0_dot]
type = TimeDerivative
variable = etab0
[../]
# Order parameter eta_delta0
[./ACd0_bulk]
type = ACGrGrMulti
variable = etad0
v = 'etaa0 etab0'
gamma_names = 'gad gbd'
[../]
[./ACd0_sw]
type = ACSwitching
variable = etad0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etab0 w'
[../]
[./ACd0_int]
type = ACInterface
variable = etad0
kappa_name = kappa
[../]
[./ed0_dot]
type = TimeDerivative
variable = etad0
[../]
#Chemical potential
[./w_dot]
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
coupled_variables = 'etaa0 etab0 etad0'
[../]
[./Diffusion]
type = MatDiffusion
variable = w
diffusivity = Dchi
args = ''
[../]
[./coupled_etaa0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob rhod'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etab0 etad0'
[../]
[./coupled_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob rhod'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etab0 etad0'
[../]
[./coupled_etad0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etad0
Fj_names = 'rhoa rhob rhod'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etab0 etad0'
[../]
[]
[Materials]
[./ha_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etaa0'
[../]
[./hb_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etab0'
[../]
[./hd_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hd
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etad0'
[../]
[./omegaa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
derivative_order = 2
[../]
[./omegab]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegab
material_property_names = 'Vm kb cbeq'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
derivative_order = 2
[../]
[./omegad]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegad
material_property_names = 'Vm kd cdeq'
expression = '-0.5*w^2/Vm^2/kd-w/Vm*cdeq'
derivative_order = 2
[../]
[./rhoa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
derivative_order = 2
[../]
[./rhob]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
derivative_order = 2
[../]
[./rhod]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhod
material_property_names = 'Vm kd cdeq'
expression = 'w/Vm^2/kd + cdeq/Vm'
derivative_order = 2
[../]
[./c]
type = ParsedMaterial
material_property_names = 'Vm rhoa rhob rhod ha hb hd'
expression = 'Vm * (ha * rhoa + hb * rhob + hd * rhod)'
property_name = c
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'kappa_c kappa L D Vm ka caeq kb cbeq kd cdeq gab gad gbd mu tgrad_corr_mult'
prop_values = '0 1 1.0 1.0 1.0 10.0 0.1 10.0 0.9 10.0 0.5 1.5 1.5 1.5 1.0 0.0'
[../]
[./Mobility]
type = DerivativeParsedMaterial
property_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
derivative_order = 2
[../]
[./chi]
type = DerivativeParsedMaterial
property_name = chi
material_property_names = 'Vm ha(etaa0,etab0,etad0) ka hb(etaa0,etab0,etad0) kb hd(etaa0,etab0,etad0) kd'
expression = '(ha/ka + hb/kb + hd/kd) / Vm^2'
coupled_variables = 'etaa0 etab0 etad0'
derivative_order = 2
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[VectorPostprocessors]
[./etaa0]
type = LineValueSampler
variable = etaa0
start_point = '-15 0 0'
end_point = '15 0 0'
num_points = 61
sort_by = x
execute_on = 'initial timestep_end final'
[../]
[./etab0]
type = LineValueSampler
variable = etab0
start_point = '-15 0 0'
end_point = '15 0 0'
num_points = 61
sort_by = x
execute_on = 'initial timestep_end final'
[../]
[./etad0]
type = LineValueSampler
variable = etad0
start_point = '-15 0 0'
end_point = '15 0 0'
num_points = 61
sort_by = x
execute_on = 'initial timestep_end final'
[../]
[]
[Executioner]
type = Transient
nl_max_its = 15
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = -pc_type
petsc_options_value = asm
l_max_its = 15
l_tol = 1.0e-3
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 20
nl_abs_tol = 1e-10
dt = 1.0
[]
[Outputs]
[./exodus]
type = Exodus
execute_on = 'initial timestep_end final'
time_step_interval = 1
[../]
[./csv]
type = CSV
execute_on = 'initial timestep_end final'
time_step_interval = 1
[../]
[]
(modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialMultiphase_AD.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = -20
xmax = 20
ymin = -20
ymax = 20
[]
[GlobalParams]
op_num = 2
var_name_base = etab
[]
[Variables]
[w]
[]
[etaa0]
[]
[etab0]
[]
[etab1]
[]
[]
[AuxVariables]
[bnds]
order = FIRST
family = LAGRANGE
[]
[]
[ICs]
[IC_etaa0]
type = FunctionIC
variable = etaa0
function = ic_func_etaa0
[]
[IC_etab0]
type = FunctionIC
variable = etab0
function = ic_func_etab0
[]
[IC_etab1]
type = FunctionIC
variable = etab1
function = ic_func_etab1
[]
[IC_w]
type = ConstantIC
value = -0.05
variable = w
[]
[]
[Functions]
[ic_func_etaa0]
type = ADParsedFunction
value = 'r:=sqrt(x^2+y^2);0.5*(1.0-tanh((r-10.0)/sqrt(2.0)))'
[]
[ic_func_etab0]
type = ADParsedFunction
value = 'r:=sqrt(x^2+y^2);0.5*(1.0+tanh((r-10)/sqrt(2.0)))*0.5*(1.0+tanh((y)/sqrt(2.0)))'
[]
[ic_func_etab1]
type = ADParsedFunction
value = 'r:=sqrt(x^2+y^2);0.5*(1.0+tanh((r-10)/sqrt(2.0)))*0.5*(1.0-tanh((y)/sqrt(2.0)))'
[]
[]
[BCs]
[]
[Kernels]
# Order parameter eta_alpha0
[ACa0_bulk]
type = ADACGrGrMulti
variable = etaa0
v = 'etab0 etab1'
gamma_names = 'gab gab'
[]
[ACa0_sw]
type = ADACSwitching
variable = etaa0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
[]
[ACa0_int]
type = ADACInterface
variable = etaa0
kappa_name = kappa
variable_L = false
[]
[ea0_dot]
type = ADTimeDerivative
variable = etaa0
[]
# Order parameter eta_beta0
[ACb0_bulk]
type = ADACGrGrMulti
variable = etab0
v = 'etaa0 etab1'
gamma_names = 'gab gbb'
[]
[ACb0_sw]
type = ADACSwitching
variable = etab0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
[]
[ACb0_int]
type = ADACInterface
variable = etab0
kappa_name = kappa
variable_L = false
[]
[eb0_dot]
type = ADTimeDerivative
variable = etab0
[]
# Order parameter eta_beta1
[ACb1_bulk]
type = ADACGrGrMulti
variable = etab1
v = 'etaa0 etab0'
gamma_names = 'gab gbb'
[]
[ACb1_sw]
type = ADACSwitching
variable = etab1
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
[]
[ACb1_int]
type = ADACInterface
variable = etab1
kappa_name = kappa
variable_L = false
[]
[eb1_dot]
type = ADTimeDerivative
variable = etab1
[]
#Chemical potential
[w_dot]
type = ADSusceptibilityTimeDerivative
variable = w
f_name = chi
[]
[Diffusion]
type = ADMatDiffusion
variable = w
diffusivity = Dchi
[]
[coupled_etaa0dot]
type = ADCoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
args = 'etaa0 etab0 etab1'
[]
[coupled_etab0dot]
type = ADCoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
args = 'etaa0 etab0 etab1'
[]
[coupled_etab1dot]
type = ADCoupledSwitchingTimeDerivative
variable = w
v = etab1
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
args = 'etaa0 etab0 etab1'
[]
[]
[AuxKernels]
[BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[]
[]
# enable_jit set to false in many materials to make this test start up faster.
# It is recommended to set enable_jit = true or just remove these lines for
# production runs with this model
[Materials]
[ha]
type = ADSwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0 etab1'
phase_etas = 'etaa0'
[]
[hb]
type = ADSwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0 etab1'
phase_etas = 'etab0 etab1'
[]
[omegaa]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
derivative_order = 2
[]
[omegab]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = omegab
material_property_names = 'Vm kb cbeq'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
derivative_order = 2
[]
[rhoa]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
derivative_order = 2
[]
[rhob]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
derivative_order = 2
[]
[const]
type = ADGenericConstantMaterial
prop_names = 'kappa_c kappa L D chi Vm ka caeq kb cbeq gab gbb mu'
prop_values = '0 1 1.0 1.0 1.0 1.0 10.0 0.1 10.0 0.9 4.5 1.5 1.0'
[]
[Mobility]
type = ADDerivativeParsedMaterial
f_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
derivative_order = 2
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type '
petsc_options_value = 'lu '
l_tol = 1.0e-3
nl_rel_tol = 1.0e-8
nl_abs_tol = 1e-8
num_steps = 2
[TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.1
[]
[]
[Outputs]
exodus = true
file_base = GrandPotentialMultiphase_out
[]
(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/porous_flow/examples/flow_through_fractured_media/coarse_3D.i)
# Flow and solute transport along 2 2D eliptical fractures embedded in a 3D porous matrix
# the model domain has dimensions 1 x 1 x 0.3m and the two fracture have r1 = 0.45 and r2 = 0.2
# The fractures intersect each other and the domain boundaries on two opposite sides
# fracture aperture = 6e-4m
# fracture porosity = 6e-4m
# fracture permeability = 1.8e-11 which is based in k=3e-8 from a**2/12, and k*a = 3e-8*6e-4;
# matrix porosity = 0.1;
# matrix permeanility = 1e-20;
[Mesh]
type = FileMesh
file = coarse_3D.e
block_id = '1 2 3'
block_name = 'matrix f1 f2'
boundary_id = '1 2 3 4'
boundary_name = 'rf2 lf1 right_matrix left_matrix'
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[pp]
[]
[tracer]
[]
[]
[AuxVariables]
[velocity_x]
family = MONOMIAL
order = CONSTANT
block = 'f1 f2'
[]
[velocity_y]
family = MONOMIAL
order = CONSTANT
block = 'f1 f2'
[]
[velocity_z]
family = MONOMIAL
order = CONSTANT
block = 'f1 f2'
[]
[]
[AuxKernels]
[velocity_x]
type = PorousFlowDarcyVelocityComponentLowerDimensional
variable = velocity_x
component = x
aperture = 6E-4
[]
[velocity_y]
type = PorousFlowDarcyVelocityComponentLowerDimensional
variable = velocity_y
component = y
aperture = 6E-4
[]
[velocity_z]
type = PorousFlowDarcyVelocityComponentLowerDimensional
variable = velocity_z
component = z
aperture = 6E-4
[]
[]
[ICs]
[pp]
type = ConstantIC
variable = pp
value = 1e6
[]
[tracer]
type = ConstantIC
variable = tracer
value = 0
[]
[]
[BCs]
[top]
type = DirichletBC
value = 0
variable = tracer
boundary = rf2
[]
[bottom]
type = DirichletBC
value = 1
variable = tracer
boundary = lf1
[]
[ptop]
type = DirichletBC
variable = pp
boundary = rf2
value = 1e6
[]
[pbottom]
type = DirichletBC
variable = pp
boundary = lf1
value = 1.02e6
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[adv0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
[]
[diff0]
type = PorousFlowDispersiveFlux
fluid_component = 0
variable = pp
disp_trans = 0
disp_long = 0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = tracer
[]
[adv1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = tracer
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = tracer
disp_trans = 0
disp_long = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp tracer'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'tracer'
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[poro1]
type = PorousFlowPorosityConst
porosity = 6e-4 # = a * phif
block = 'f1 f2'
[]
[diff1]
type = PorousFlowDiffusivityConst
diffusion_coeff = '1.e-9 1.e-9'
tortuosity = 1.0
block = 'f1 f2'
[]
[poro2]
type = PorousFlowPorosityConst
porosity = 0.1
block = 'matrix'
[]
[diff2]
type = PorousFlowDiffusivityConst
diffusion_coeff = '1.e-9 1.e-9'
tortuosity = 0.1
block = 'matrix'
[]
[relp]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[permeability1]
type = PorousFlowPermeabilityConst
permeability = '1.8e-11 0 0 0 1.8e-11 0 0 0 1.8e-11' # 1.8e-11 = a * kf
block = 'f1 f2'
[]
[permeability2]
type = PorousFlowPermeabilityConst
permeability = '1e-20 0 0 0 1e-20 0 0 0 1e-20'
block = 'matrix'
[]
[]
[Preconditioning]
active = basic
[mumps_is_best_for_parallel_jobs]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[basic]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu NONZERO 2 '
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 20
dt = 1
[]
[VectorPostprocessors]
[xmass]
type = LineValueSampler
start_point = '-0.5 0 0'
end_point = '0.5 0 0'
sort_by = x
num_points = 41
variable = tracer
outputs = csv
[]
[]
[Outputs]
[csv]
type = CSV
execute_on = 'final'
[]
[]
(modules/contact/test/tests/multiple_contact_pairs/multiple_pairs_mortar_friction.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = multiple_pairs.e
[]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = true
strain = FINITE
generate_output = 'stress_xx'
block = '1 2 3'
[]
[]
[Materials]
[stiffStuff]
type = ComputeIsotropicElasticityTensor
block = '1 2 3'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stiffStuff_stress]
type = ComputeFiniteStrainElasticStress
block = '1 2 3'
[]
[]
[ICs]
[disp_y]
block = '2 3'
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Contact]
[first_pair]
primary = '20'
secondary = '10 '
model = coulomb
formulation = mortar
c_normal = 1e+04
c_tangential = 1.0e2
friction_coefficient = 0.2
tangential_lm_scaling = 1.0e-6
normal_lm_scaling = 1.0e-6
[]
[second_pair]
primary = '20'
secondary = '101'
model = coulomb
formulation = mortar
c_normal = 1e+04
c_tangential = 1.0e2
friction_coefficient = 0.2
tangential_lm_scaling = 1.0e-6
normal_lm_scaling = 1.0e-6
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
preset = false
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
preset = false
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = '30 301'
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
preset = false
boundary = '50 501'
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
dt = 2.0
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
nl_abs_tol = 1e-7
line_search = 'none'
end_time = 18
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[]
[VectorPostprocessors]
[cont_press]
type = NodalValueSampler
variable = contact_pressure
boundary = '10 101'
sort_by = x
execute_on = NONLINEAR
[]
[]
(modules/contact/test/tests/multiple_contact_pairs/multiple_pairs_mortar.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = multiple_pairs.e
[]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = true
strain = FINITE
generate_output = 'stress_xx'
block = '1 2 3'
[]
[]
[Materials]
[stiffStuff]
type = ComputeIsotropicElasticityTensor
block = '1 2 3'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stiffStuff_stress]
type = ComputeFiniteStrainElasticStress
block = '1 2 3'
[]
[]
[ICs]
[disp_y]
block = '2 3'
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Contact]
[first_pair]
primary = '20'
secondary = '10 '
model = frictionless
formulation = mortar
c_normal = 1e+06
[]
[second_pair]
primary = '20'
secondary = '101'
model = frictionless
formulation = mortar
c_normal = 1e+06
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
preset = false
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
preset = false
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = '30 301'
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
preset = false
boundary = '50 501'
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
dt = 2.0
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
nl_abs_tol = 1e-9
line_search = 'none'
end_time = 18
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[]
[VectorPostprocessors]
[cont_press]
type = NodalValueSampler
variable = contact_pressure
boundary = '10 101'
sort_by = x
execute_on = NONLINEAR
[]
[]
(modules/chemical_reactions/test/tests/desorption/langmuir_lumping_problem.i)
# exploring CONSTANT MONOMIAL
[Mesh]
type = FileMesh
file = three_eles.e
[]
[Variables]
[./pressure]
# try with and without the CONSTANT MONOMIAL to see that
# CONSTANT MONOMIAL yields the correct result that pressure(x=0) is unchanged
# but LINEAR LAGRANGE changes pressure(x=0) since pressure is not lumped at x=0
# (the x=0 eqn is a*dot(p0)+b*dot(p10)=0, and x=10 eqn a*dot(p10)+b*dot(p20)=desorption,
# and since dot(p10)>0, we get dot(p0)<0)
family = MONOMIAL
order = CONSTANT
[../]
[./conc]
family = MONOMIAL
order = CONSTANT
block = centre_block
[../]
[]
[ICs]
[./p_ic]
type = ConstantIC
variable = pressure
value = 1.0
[../]
[./conc_ic]
type = ConstantIC
variable = conc
value = 1.0
block = centre_block
[../]
[]
[Kernels]
[./c_dot]
type = TimeDerivative
block = centre_block
variable = conc
[../]
[./flow_from_matrix]
type = DesorptionFromMatrix
block = centre_block
variable = conc
pressure_var = pressure
[../]
[./rho_dot]
type = TimeDerivative
variable = pressure
[../]
[./flux_to_porespace]
type = DesorptionToPorespace
block = centre_block
variable = pressure
conc_var = conc
[../]
[]
[Materials]
[./rock]
type = GenericConstantMaterial
block = 'left_block centre_block right_block'
[../]
[./lang_stuff]
type = LangmuirMaterial
block = centre_block
mat_desorption_time_const = 0.1
mat_adsorption_time_const = 0.1
mat_langmuir_density = 1
mat_langmuir_pressure = 1
pressure_var = pressure
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
#petsc_options = '-snes_test_display'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1
[]
[Outputs]
file_base = langmuir_lumping_problem
[]
(test/tests/dgkernels/adaptivity/adaptivity.i)
# This input file is used for two tests:
# 1) Check that DGKernels work with mesh adaptivity
# 2) Error out when DGKernels are used with adaptivity
# and stateful material prpoerties
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
parallel_type = 'replicated'
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = (x*x*x)-6.0*x
[../]
[./bc_fn]
type = ParsedFunction
expression = (x*x*x)
[../]
[]
[Kernels]
[./diff]
type = MatDiffusionTest
variable = u
prop_name = diffusivity
[../]
[./abs]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGKernels]
[./dgdiff]
type = DGDiffusion
variable = u
sigma = 6
epsilon = -1.0
diff = diffusivity
[../]
[]
[BCs]
active = 'all'
[./all]
type = DGMDDBC
variable = u
boundary = '1 2 3 4'
function = bc_fn
prop_name = diffusivity
sigma = 6
epsilon = -1.0
[../]
[]
[Materials]
active = 'constant'
[./stateful]
type = StatefulTest
prop_names = 'diffusivity'
prop_values = '1'
[../]
[./constant]
type = GenericConstantMaterial
prop_names = 'diffusivity'
prop_values = '1'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Adaptivity]
marker = 'marker'
steps = 1
[./Indicators]
[./error]
type = GradientJumpIndicator
variable = u
[../]
[../]
[./Markers]
[./marker]
type = ErrorFractionMarker
coarsen = 0.5
indicator = error
refine = 0.5
[../]
[../]
[]
[Outputs]
exodus = true
[]
(modules/rdg/test/tests/postprocessors/boundary_flux_postprocessor/boundary_flux_postprocessor.i)
# This input file is used to test BoundaryFluxPostprocessor, which queries
# fluxes computed using user objects derived from BoundaryFluxBase. The boundary
# flux used in this test is TestBoundaryFlux, which expects a solution vector
# of size 3 (call this U = {A, B, C}) and computes a flux of size 2 with the
# following entries:
#
# flux[0] = (A - B) * C * nx
# flux[1] = A * B * nx
#
# where the normal vector used is {nx, ny, nz}.
A = 1
B = 2
C = 3
# Multiple cases are computed in this test. Each corresponds to a different PP object:
# * flux0_boundary0: boundary 0, flux entry 0, default normal ({-1, 0, 0})
# * flux0_boundary1: boundary 1, flux entry 0, default normal ({1, 0, 0})
# * flux0_provided: boundary 0, flux entry 0, user-provided normal ({2, 0, 0})
# * flux1_boundary0: boundary 0, flux entry 1, default normal ({-1, 0, 0})
nx_boundary0 = -1
nx_boundary1 = 1
nx_provided = 2
flux0_boundary0 = ${fparse (A - B) * C * nx_boundary0}
flux0_boundary1 = ${fparse (A - B) * C * nx_boundary1}
flux0_provided = ${fparse (A - B) * C * nx_provided}
flux1_boundary0 = ${fparse A * B * nx_boundary0}
[GlobalParams]
order = CONSTANT
family = MONOMIAL
execute_on = 'initial timestep_end'
variables = 'A B C'
[]
[Postprocessors]
[./flux0_boundary0]
type = BoundaryFluxPostprocessor
boundary_flux_uo = boundary_flux_flux0_boundary0
boundary = 0
flux_index = 0
[../]
[./flux0_boundary1]
type = BoundaryFluxPostprocessor
boundary_flux_uo = boundary_flux_flux0_boundary1
boundary = 1
flux_index = 0
[../]
[./flux0_provided]
type = BoundaryFluxPostprocessor
boundary_flux_uo = boundary_flux_flux0_provided
boundary = 0
flux_index = 0
normal = '${nx_provided} 0 0'
[../]
[./flux1_boundary0]
type = BoundaryFluxPostprocessor
boundary_flux_uo = boundary_flux_flux1_boundary0
boundary = 0
flux_index = 1
[../]
[./flux0_boundary0_err]
type = RelativeDifferencePostprocessor
value1 = flux0_boundary0
value2 = ${flux0_boundary0}
[../]
[./flux0_boundary1_err]
type = RelativeDifferencePostprocessor
value1 = flux0_boundary1
value2 = ${flux0_boundary1}
[../]
[./flux0_provided_err]
type = RelativeDifferencePostprocessor
value1 = flux0_provided
value2 = ${flux0_provided}
[../]
[./flux1_boundary0_err]
type = RelativeDifferencePostprocessor
value1 = flux1_boundary0
value2 = ${flux1_boundary0}
[../]
[]
[UserObjects]
[./boundary_flux_flux0_boundary0]
type = TestBoundaryFlux
[../]
[./boundary_flux_flux0_boundary1]
type = TestBoundaryFlux
[../]
[./boundary_flux_flux0_provided]
type = TestBoundaryFlux
[../]
[./boundary_flux_flux1_boundary0]
type = TestBoundaryFlux
[../]
[]
[Variables]
[./A]
[../]
[./B]
[../]
[./C]
[../]
[]
[ICs]
[./A_ic]
type = ConstantIC
variable = A
value = ${A}
[../]
[./B_ic]
type = ConstantIC
variable = B
value = ${B}
[../]
[./C_ic]
type = ConstantIC
variable = C
value = ${C}
[../]
[]
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[Executioner]
type = Transient
scheme = implicit-euler
dt = 1
num_steps = 1
[]
[Outputs]
csv = true
show = 'flux0_boundary0_err flux0_boundary1_err flux0_provided_err flux1_boundary0_err'
[]
(modules/contact/test/tests/bouncing-block-contact/ping-ponging/mortar-no-ping-pong_weighted.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = long-bottom-block-no-lower-d.e
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = false
use_automatic_differentiation = true
strain = SMALL
[]
[]
[Materials]
[elasticity]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e0
poissons_ratio = 0.3
[]
[stress]
type = ADComputeLinearElasticStress
[]
[]
[Contact]
[leftright]
secondary = 10
primary = 20
model = frictionless
formulation = mortar
c_normal = 1e-1
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
num_steps = 40
end_time = 200
dt = 5
dtmin = 5
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_ksp_ew'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type'
petsc_options_value = 'lu 1e-5 NONZERO'
l_max_its = 30
nl_max_its = 20
nl_abs_tol = 1e-10
nl_rel_tol = 1e-10
line_search = 'none'
snesmf_reuse_base = true
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exo]
type = Exodus
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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
[]
(modules/xfem/test/tests/moving_interface/verification/1D_xy_lsdep1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: quasi-1D
# Coordinate System: xy
# Material Numbers/Types: level set dep 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# A simple transient heat transfer problem in Cartesian coordinates designed
# with the Method of Manufactured Solutions. This problem was developed to
# verify XFEM performance in the presence of a moving interface for linear
# element models that can be exactly evaluated by FEM/Moose. Both the
# temperature solution and level set function are designed to be linear to
# attempt to minimize error between the Moose/exact solution and XFEM results.
# Thermal conductivity is dependent upon the value of the level set function
# at each timestep.
# Results:
# The temperature at the left boundary (x=0) exhibits the largest difference
# between the FEM/Moose solution and XFEM results. We present the XFEM
# results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 479.9999722
# 0.6 520 519.9998726
# 0.8 560 559.9997314
# 1.0 600 599.9996885
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 1
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 0.5
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = 'rhoCp*(-200*x+200)-(0.05*200*t/1.04)'
symbol_names = 'rhoCp'
symbol_values = 10
[../]
[./neumann_func]
type = ParsedFunction
expression = '((0.05/1.04)*(1-(x-0.04)-0.2*t) + 1.5)*200*t'
[../]
[./k_func]
type = ParsedFunction
expression = '(0.05/1.04)*(1-(x-0.04)-0.2*t) + 1.5'
[../]
[./ls_func]
type = ParsedFunction
expression = '1.04 - x - 0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericFunctionMaterial
prop_names = 'diffusion_coefficient'
prop_values = 'k_func'
[../]
[]
[BCs]
[./left_u]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 'right'
value = 400
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(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/contact/test/tests/bouncing-block-contact/bouncing-block-ranfs.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
ping_pong_protection = true
[]
[Mesh]
file = long-bottom-block-no-lower-d.e
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[Contact]
[./top_bottom]
secondary = 10
primary = 20
model = frictionless
formulation = ranfs
[../]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[../]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = 2.5
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type -mat_mffd_err'
petsc_options_value = 'hypre boomeramg 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exo]
type = Exodus
[]
checkpoint = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[]
(modules/functional_expansion_tools/test/tests/standard_use/volume_coupling_custom_norm.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
generation_type = 'sqrt_mu'
expansion_type = 'sqrt_mu'
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
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
file_base = 'volume_coupled_out'
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = volume_coupling_custom_norm_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/richards/test/tests/sinks/s_fu_04.i)
# apply a total flux (in kg/s) to two boundaries
# and check that it removes the correct amount of fluid
# fully-upwind sink
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 3
xmin = 0
xmax = 1
ymin = 0
ymax = 4
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = DensityConstBulk
relperm_UO = RelPermPower
SUPG_UO = SUPGstandard
sat_UO = Saturation
seff_UO = SeffVG
viscosity = 1E-3
gravity = '-1 0 0'
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 1
[../]
[./SeffVG]
type = RichardsSeff1VG
m = 0.5
al = 1 # same deal with PETSc constant state
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0.1
sum_s_res = 0.2
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 0.1
[../]
[]
[Variables]
[./pressure]
[../]
[]
[ICs]
[./pressure]
type = ConstantIC
variable = pressure
value = 2
[../]
[]
[Postprocessors]
[./area_left]
type = AreaPostprocessor
boundary = left
execute_on = initial
[../]
[./area_right]
type = AreaPostprocessor
boundary = right
execute_on = initial
[../]
[./mass_fin]
type = RichardsMass
variable = pressure
execute_on = 'initial timestep_end'
[../]
[./p0]
type = PointValue
point = '0 0 0'
variable = pressure
execute_on = 'initial timestep_end'
[../]
[]
[BCs]
[./left_flux]
type = RichardsPiecewiseLinearSink
boundary = left
pressures = '0'
bare_fluxes = '0.1'
variable = pressure
use_mobility = false
use_relperm = false
area_pp = area_left
fully_upwind = true
[../]
[./right_flux]
type = RichardsPiecewiseLinearSink
boundary = right
pressures = '0'
bare_fluxes = '0.1'
variable = pressure
use_mobility = false
use_relperm = false
area_pp = area_right
fully_upwind = true
[../]
[]
[Kernels]
active = 'richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-12 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 13
[]
[Outputs]
file_base = s_fu_04
csv = true
[]
(modules/richards/test/tests/pressure_pulse/pp_lumped_22.i)
# investigating pressure pulse in 1D with 2 phase
# transient
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 100
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = 'DensityWater DensityGas'
relperm_UO = 'RelPermWater RelPermGas'
SUPG_UO = 'SUPGwater SUPGgas'
sat_UO = 'SatWater SatGas'
seff_UO = 'SeffWater SeffGas'
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 2E6
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1E-5
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1E-5
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.0
n = 3
[../]
[./SatWater]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SatGas]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGwater]
type = RichardsSUPGstandard
p_SUPG = 1E3
[../]
[./SUPGgas]
type = RichardsSUPGstandard
p_SUPG = 1E3
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./water_ic]
type = ConstantIC
value = 2E6
variable = pwater
[../]
[./gas_ic]
type = ConstantIC
value = 2E6
variable = pgas
[../]
[]
[BCs]
[./left]
type = DirichletBC
boundary = left
value = 3E6
variable = pwater
[../]
[./left_gas]
type = DirichletBC
boundary = left
value = 3E6
variable = pgas
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[Kernels]
active = 'richardsfwater richardstwater richardsfgas richardstgas pconstraint'
[./richardstwater]
type = RichardsLumpedMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFlux
variable = pwater
[../]
[./richardstgas]
type = RichardsLumpedMassChange
variable = pgas
[../]
[./richardsfgas]
type = RichardsFlux
variable = pgas
[../]
[./pconstraint]
type = RichardsPPenalty
variable = pgas
a = 1E-8
lower_var = pwater
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = SeffWater
pressure_vars = 'pwater pgas'
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-15'
viscosity = '1E-3 1E-5'
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-pc_factor_shift_type'
petsc_options_value = 'nonzero'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E3
dtmin = 1E3
nl_rel_tol = 1.e-9
nl_max_its = 10
end_time = 1E4
[]
[Outputs]
file_base = pp_lumped_22
execute_on = 'initial timestep_end final'
time_step_interval = 10000
exodus = true
[]
(test/tests/misc/check_error/wrong_displacement_order.i)
[Mesh]
type = GeneratedMesh
dim = 2
# Mesh uses second-order elements
elem_type = QUAD8
displacements = 'disp_x disp_y'
block_name = pore
block_id = 0
[]
[Variables]
[./temperature]
order = SECOND
[./InitialCondition]
type = ConstantIC
value = 0.0
[../]
[../]
[]
# We are *not* allowed to use FIRST-order displacement vars!
[AuxVariables]
[./disp_x]
[../]
[./disp_y]
[./InitialCondition]
type = FunctionIC
function = displ
[../]
[../]
[]
[Functions]
[./displ]
type = ParsedFunction
expression = -1/2*x*(y-0.5)
[../]
[]
[Kernels]
[./diffusion]
type = Diffusion
variable = temperature
use_displaced_mesh = true
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = temperature
boundary = left
value = 1
use_displaced_mesh = true
[../]
[./right]
type = DirichletBC
variable = temperature
boundary = right
value = 0
use_displaced_mesh = true
[../]
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = PJFNK
[../]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
line_search = none
nl_rel_tol = 1e-6
nl_max_its = 10
l_tol = 1e-8
l_max_its = 50
num_steps = 2 # 200
nl_abs_tol = 1e-10
nl_rel_step_tol = 1e-10
nl_abs_step_tol = 1e-10
[./TimeStepper]
type = ConstantDT
dt = 0.001
[../]
dtmin = .001
[]
(test/tests/dgkernels/3d_diffusion_dg/3d_diffusion_dg_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 5
ny = 5
nz = 5
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 1
elem_type = HEX8
[]
[Variables]
active = 'u'
[u]
order = FIRST
family = MONOMIAL
[InitialCondition]
type = ConstantIC
value = 0.5
[]
[]
[]
[Functions]
active = 'forcing_fn exact_fn'
[forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[]
[exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[]
[]
[Kernels]
active = 'diff abs forcing'
[diff]
type = Diffusion
variable = u
[]
[abs] # u * v
type = Reaction
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[DGKernels]
active = 'dg_diff'
[dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[]
[]
[BCs]
active = 'all'
[all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3 4 5'
function = exact_fn
epsilon = -1
sigma = 6
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Postprocessors]
active = 'h dofs l2_err'
[h]
type = AverageElementSize
execute_on = 'initial timestep_end'
[]
[dofs]
type = NumDOFs
execute_on = 'initial timestep_end'
[]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
file_base = out
exodus = true
[]
(modules/functional_expansion_tools/examples/3D_volumetric_cylindrical/main.i)
# Basic example coupling a master and sub app in a 3D cylindrical mesh from an input file
#
# The master app provides field values to the sub app via Functional Expansions, which then performs
# its calculations. The sub app's solution field values are then transferred back to the master app
# and coupled into the solution of the master app solution.
#
# This example couples Functional Expansions via AuxVariable, the recommended approach.
#
# Note: this problem is not light, and may take a few minutes to solve.
[Mesh]
type = FileMesh
file = cyl-tet.e
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'top bottom outside'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = CylindricalDuo
orders = '5 3' # Axial first, then (r, t) FX
physical_bounds = '-2.5 2.5 0 0 1' # z_min z_max x_center y_center radius
z = Legendre # Axial in z
disc = Zernike # (r, t) default to unit disc in x-y plane
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
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
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/xfem/test/tests/moving_interface/verification/1D_xy_discrete2mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: quasi-1D
# Coordinate System: xy
# Material Numbers/Types:discrete homog 2 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description
# A transient heat transfer problem in Cartesian coordinates designed with
# the Method of Manufactured Solutions. This problem was developed to verify
# XFEM performance in the presence of a moving interface separating two
# discrete material regions for linear element models. Both the temperature
# solution and level set function are designed to be linear to attempt to
# minimize error between the exact solution and XFEM results. Thermal
# conductivity, density, and heat capacity are homogeneous in each material
# region with a discontinuous jump in thermal flux between the two material
# regions.
# Results:
# The temperature at the left boundary is determined by the analytical
# solution, so temperature at the right boundary (x=1) should exhibit the
# largest difference between the analytical solution and XFEM results. We
# present the analytical and XFEM results at the material interface position
# and right side boundary at various times.
# Interface:
# Time Expected Temperature XFEM Calculated Temperature
# 20 746.75 746.7235521
# 40 893.05 893.0379081
# 60 1040.15 1040.1527530
#
# Right Boundary (x=1):
# Time Expected Temperature XFEM Calculated Temperature
# 20 720 719.9708681
# 40 840 839.9913293
# 60 960 960.0100886
#
# IMPORTANT NOTE:
# When running this input file, add the --allow-test-objects tag!!!
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 1
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 0.5
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = phi
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./phi]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = 'diffusion_coefficient'
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = phi
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
jump_flux = jump_flux_func
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = 'phi:=(0.75-x-0.001*t);
i:=(0.75-0.001*t);
if (phi>=0,
10*(8-x),
(7/(1-i))*((i-2)*x + (8-7*i)) )'
[../]
[./right_du_func]
type = ParsedFunction
expression = 'i:=(0.75-0.001*t);
(2.0/(1-i))*(-5+5*i+i*t-2*t)'
[../]
[./exact_u_func]
type = ParsedFunction
expression = 'phi:=(0.75-x-0.001*t);
i:=(0.75-0.001*t);
if (phi>=0,
605 - 5*x + t*(8-x),
(1/(1-i))*((-5+5*i+i*t-2*t)*x + (605-605*i+8*t-7*t*i)) )'
[../]
[./jump_flux_func]
type = ParsedFunction
expression = 'i:=(0.75-0.001*t);
k_1:=(20.0);
k_2:=(2.0);
k_1*(5+t) + (k_2/(1-i))*(-5+5*i+i*t-2*t)'
[../]
[./ls_func]
type = ParsedFunction
expression = '0.75 - x - 0.001*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'A_rhoCp B_rhoCp'
prop_values = '10 7'
[../]
[./therm_cond_prop]
type = GenericConstantMaterial
prop_names = 'A_diffusion_coefficient B_diffusion_coefficient'
prop_values = '20.0 2.0'
[../]
[./combined_rhoCp]
type = LevelSetBiMaterialReal
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = phi
prop_name = rhoCp
[../]
[./combined_diffusion_coefficient]
type = LevelSetBiMaterialReal
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = phi
prop_name = diffusion_coefficient
[../]
[]
[BCs]
[./left_u]
type = FunctionDirichletBC
variable = u
boundary = 'left'
function = exact_u_func
[../]
[./right_du]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = right_du_func
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 600
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
# petsc_options_iname = '-pc_type -pc_hypre_type'
# petsc_options_value = 'hypre boomeramg'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 20
end_time = 60.0
max_xfem_update = 2
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/richards/test/tests/rogers_stallybrass_clements/rsc_lumped_01.i)
# RSC test with high-res time and spatial resolution
[Mesh]
type = GeneratedMesh
dim = 2
nx = 600
ny = 1
xmin = 0
xmax = 10 # x is the depth variable, called zeta in RSC
ymin = 0
ymax = 0.05
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = 'DensityWater DensityOil'
relperm_UO = 'RelPerm RelPerm'
SUPG_UO = 'SUPGstandard SUPGstandard'
sat_UO = 'Saturation Saturation'
seff_UO = 'SeffWater SeffOil'
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '3E-3 3E-2 0.05'
x = '0 1 5'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater poil'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 10
bulk_mod = 2E9
[../]
[./DensityOil]
type = RichardsDensityConstBulk
dens0 = 20
bulk_mod = 2E9
[../]
[./SeffWater]
type = RichardsSeff2waterRSC
oil_viscosity = 2E-3
scale_ratio = 2E3
shift = 10
[../]
[./SeffOil]
type = RichardsSeff2gasRSC
oil_viscosity = 2E-3
scale_ratio = 2E3
shift = 10
[../]
[./RelPerm]
type = RichardsRelPermMonomial
simm = 0
n = 1
[../]
[./Saturation]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1.0E-2
[../]
[]
[Variables]
[./pwater]
[../]
[./poil]
[../]
[]
[ICs]
[./water_init]
type = ConstantIC
variable = pwater
value = 0
[../]
[./oil_init]
type = ConstantIC
variable = poil
value = 15
[../]
[]
[Kernels]
[./richardstwater]
type = RichardsLumpedMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFlux
variable = pwater
[../]
[./richardstoil]
type = RichardsLumpedMassChange
variable = poil
[../]
[./richardsfoil]
type = RichardsFlux
variable = poil
[../]
[]
[AuxVariables]
[./SWater]
[../]
[./SOil]
[../]
[]
[AuxKernels]
[./Seff1VGwater_AuxK]
type = RichardsSeffAux
variable = SWater
seff_UO = SeffWater
pressure_vars = 'pwater poil'
[../]
[./Seff1VGoil_AuxK]
type = RichardsSeffAux
variable = SOil
seff_UO = SeffOil
pressure_vars = 'pwater poil'
[../]
[]
[BCs]
# we are pumping water into a system that has virtually incompressible fluids, hence the pressures rise enormously. this adversely affects convergence because of almost-overflows and precision-loss problems. The fixed things help keep pressures low and so prevent these awful behaviours. the movement of the saturation front is the same regardless of the fixed things.
active = 'recharge fixedoil fixedwater'
[./recharge]
type = RichardsPiecewiseLinearSink
variable = pwater
boundary = 'left'
pressures = '-1E10 1E10'
bare_fluxes = '-1 -1'
use_mobility = false
use_relperm = false
[../]
[./fixedwater]
type = DirichletBC
variable = pwater
boundary = 'right'
value = 0
[../]
[./fixedoil]
type = DirichletBC
variable = poil
boundary = 'right'
value = 15
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.25
mat_permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
viscosity = '1E-3 2E-3'
gravity = '0E-0 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
active = 'andy'
[./andy]
type = SMP
full = true
petsc_options = ''
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
petsc_options = '-snes_converged_reason'
end_time = 5
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = rsc_lumped_01
time_step_interval = 100000
execute_on = 'initial final'
exodus = true
[]
(modules/richards/test/tests/gravity_head_2/gh_lumped_18.i)
# with immobile saturation
# unsaturated = true
# gravity = true
# supg = true
# transient = true
# lumped = true
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmin = 0
xmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = 'DensityWater DensityGas'
relperm_UO = 'RelPermWater RelPermGas'
SUPG_UO = 'SUPGwater SUPGgas'
sat_UO = 'SatWater SatGas'
seff_UO = 'SeffWater SeffGas'
viscosity = '1E-3 0.5E-3'
gravity = '-1 0 0'
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1E-2 1E-1 1E0 0.5E1 0.5E2 0.4E4 1E5 1E6 1E7'
x = '0 1E-1 1E0 1E1 1E2 1E3 1E4 1E5 1E6'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 1.0E2
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 0.5
bulk_mod = 0.5E2
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.4
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.3
n = 2
[../]
[./SatWater]
type = RichardsSat
s_res = 0.1
sum_s_res = 0.15
[../]
[./SatGas]
type = RichardsSat
s_res = 0.05
sum_s_res = 0.15
[../]
[./SUPGwater]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[./SUPGgas]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./water_ic]
type = ConstantIC
value = 1
variable = pwater
[../]
[./gas_ic]
type = ConstantIC
value = 2
variable = pgas
[../]
[]
[Kernels]
active = 'richardsfwater richardstwater richardsfgas richardstgas'
[./richardstwater]
type = RichardsLumpedMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFlux
variable = pwater
[../]
[./richardstgas]
type = RichardsLumpedMassChange
variable = pgas
[../]
[./richardsfgas]
type = RichardsFlux
variable = pgas
[../]
[]
[AuxVariables]
[./seffgas]
[../]
[./seffwater]
[../]
[]
[AuxKernels]
[./seffgas_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffGas
variable = seffgas
[../]
[./seffwater_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffWater
variable = seffwater
[../]
[]
[Postprocessors]
[./mwater_init]
type = RichardsMass
variable = pwater
execute_on = timestep_begin
outputs = none
[../]
[./mgas_init]
type = RichardsMass
variable = pgas
execute_on = timestep_begin
outputs = none
[../]
[./mwater_fin]
type = RichardsMass
variable = pwater
execute_on = timestep_end
outputs = none
[../]
[./mgas_fin]
type = RichardsMass
variable = pgas
execute_on = timestep_end
outputs = none
[../]
[./mass_error_water]
type = FunctionValuePostprocessor
function = fcn_mass_error_w
[../]
[./mass_error_gas]
type = FunctionValuePostprocessor
function = fcn_mass_error_g
[../]
[./pw_left]
type = PointValue
point = '0 0 0'
variable = pwater
outputs = none
[../]
[./pw_right]
type = PointValue
point = '1 0 0'
variable = pwater
outputs = none
[../]
[./error_water]
type = FunctionValuePostprocessor
function = fcn_error_water
[../]
[./pg_left]
type = PointValue
point = '0 0 0'
variable = pgas
outputs = none
[../]
[./pg_right]
type = PointValue
point = '1 0 0'
variable = pgas
outputs = none
[../]
[./error_gas]
type = FunctionValuePostprocessor
function = fcn_error_gas
[../]
[]
[Functions]
[./fcn_mass_error_w]
type = ParsedFunction
expression = 'abs(0.5*(mi-mf)/(mi+mf))'
symbol_names = 'mi mf'
symbol_values = 'mwater_init mwater_fin'
[../]
[./fcn_mass_error_g]
type = ParsedFunction
expression = 'abs(0.5*(mi-mf)/(mi+mf))'
symbol_names = 'mi mf'
symbol_values = 'mgas_init mgas_fin'
[../]
[./fcn_error_water]
type = ParsedFunction
expression = 'abs((-b*log(-(gdens0*xval+(-b*exp(-p0/b)))/b)-p1)/p1)'
symbol_names = 'b gdens0 p0 xval p1'
symbol_values = '1E2 -1 pw_left 1 pw_right'
[../]
[./fcn_error_gas]
type = ParsedFunction
expression = 'abs((-b*log(-(gdens0*xval+(-b*exp(-p0/b)))/b)-p1)/p1)'
symbol_names = 'b gdens0 p0 xval p1'
symbol_values = '0.5E2 -0.5 pg_left 1 pg_right'
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = gh_lumped_18
execute_on = 'timestep_end final'
time_step_interval = 100000
exodus = true
[]
(test/tests/misc/check_error/ic_bnd_for_non_nodal.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
[]
[Variables]
[./u]
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 1
variable = u
boundary = top
[../]
[../]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Steady
[]
(modules/functional_expansion_tools/examples/1D_volumetric_Cartesian/main.i)
# Basic example coupling a master and sub app in a 1D Cartesian volume.
#
# The master app provides field values to the sub app via Functional Expansions, which then performs
# its calculations. The sub app's solution field values are then transferred back to the master app
# and coupled into the solution of the master app solution.
#
# This example couples Functional Expansions via AuxVariable.
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
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
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(test/tests/dgkernels/dg_block_restrict/1d_dg_block_restrict.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 100
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 0 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[interface_again]
type = SideSetsBetweenSubdomainsGenerator
input = interface
primary_block = '1'
paired_block = '0'
new_boundary = 'primary1_interface'
show_info = true
[]
# skip_partitioning = true
[]
[Variables]
[u]
order = FIRST
family = MONOMIAL
block = 0
[]
[v]
order = FIRST
family = MONOMIAL
block = 1
[]
[]
[Kernels]
[test_u]
type = Diffusion
variable = u
block = 0
[]
[adv_u]
type = ConservativeAdvection
variable = u
velocity = '1 0 0'
block = 0
[]
[test_v]
type = Diffusion
variable = v
block = 1
[]
[adv_v]
type = ConservativeAdvection
variable = v
velocity = '1 0 0'
block = 1
[]
[]
[DGKernels]
[dg_advection_u]
type = DGConvection
variable = u
velocity = '1 0 0'
block = 0
[]
[dg_diffusion_u]
type = DGDiffusion
variable = u
sigma = 0
epsilon = -1
block = 0
[]
[dg_advection_v]
type = DGConvection
variable = v
velocity = '1 0 0'
block = 1
[]
[dg_diffusion_v]
type = DGDiffusion
variable = v
sigma = 0
epsilon = -1
block = 1
[]
[]
[BCs]
[left]
type = InflowBC
variable = u
boundary = 'left'
inlet_conc = 2
velocity = '1 0 0'
[]
[primary0_inteface]
type = RobinBC
variable = u
boundary = 'primary0_interface'
[]
[primary1_interface]
type = InflowBC
variable = v
boundary = 'primary1_interface'
inlet_conc = 4
velocity = '1 0 0'
[]
[right]
type = RobinBC
variable = v
boundary = 'right'
[]
[]
[ICs]
[u_ic]
type = ConstantIC
variable = u
value = 0
[]
[v_ic]
type = ConstantIC
variable = v
value = 0
[]
[]
[Preconditioning]
[fdp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
nl_abs_tol = 1e-12
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
exodus = true
print_linear_residuals = false
[]
[Debug]
show_var_residual_norms = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven.i)
[GlobalParams]
gravity = '0 0 0'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
elem_type = QUAD9
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./vel_x]
order = SECOND
family = LAGRANGE
[../]
[./vel_y]
order = SECOND
family = LAGRANGE
[../]
[./T]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 1.0
[../]
[../]
[./p]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
# mass
[./mass]
type = INSMass
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
# x-momentum, time
[./x_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_x
[../]
# x-momentum, space
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
# y-momentum, time
[./y_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_y
[../]
# y-momentum, space
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
# temperature
[./temperature_time]
type = INSTemperatureTimeDerivative
variable = T
[../]
[./temperature_space]
type = INSTemperature
variable = T
u = vel_x
v = vel_y
[../]
[]
[BCs]
[./x_no_slip]
type = DirichletBC
variable = vel_x
boundary = 'bottom right left'
value = 0.0
[../]
[./lid]
type = FunctionDirichletBC
variable = vel_x
boundary = 'top'
function = 'lid_function'
[../]
[./y_no_slip]
type = DirichletBC
variable = vel_y
boundary = 'bottom right top left'
value = 0.0
[../]
[./T_hot]
type = DirichletBC
variable = T
boundary = 'bottom'
value = 1
[../]
[./T_cold]
type = DirichletBC
variable = T
boundary = 'top'
value = 0
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'asm 2 ilu 4'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
file_base = lid_driven_out
exodus = true
perf_graph = true
[]
(modules/xfem/test/tests/moving_interface/verification/2D_rz_lsdep1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: 2D
# Coordinate System: rz
# Material Numbers/Types: level set dep 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# Transient 2D heat transfer problem in cylindrical coordinates designed with
# the Method of Manufactured Solutions. This problem was developed to verify
# XFEM performance on linear elements in the presence of a moving interface
# sweeping across the x-y coordinates of a system with thermal conductivity
# dependent upon the transient level set function. This problem can be
# exactly evaluated by FEM/Moose without the moving interface. Both the
# temperature and level set function are designed to be linear to attempt to
# minimize the error between the Moose/exact solution and XFEM results.
# Results:
# The temperature at the bottom left boundary (x=1, y=1) exhibits the largest
# difference between the FEM/Moose solution and XFEM results. We present the
# XFEM results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 479.9998717
# 0.6 520 519.9994963
# 0.8 560 559.9989217
# 1.0 600 599.9986735
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 1.0
xmax = 2.0
ymin = 1.0
ymax = 2.0
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-100*x-100*y+400) + t*(-2.5*y/(2.04*x) + 155/x - t/(2.04*x)
- 7.5/2.04)'
[../]
[./neumann_func]
type = ParsedFunction
expression = '((0.01/2.04)*(-2.5*x-2.5*y-t)+1.55)*100*t'
[../]
[./dirichlet_right_func]
type = ParsedFunction
expression = '(-100*y+200)*t+400'
[../]
[./dirichlet_top_func]
type = ParsedFunction
expression = '(-100*x+200)*t+400'
[../]
[./k_func]
type = ParsedFunction
expression = '(0.01/2.04)*(-2.5*x-2.5*y-t) + 1.55'
[../]
[./ls_func]
type = ParsedFunction
expression = '-0.5*(x+y) + 2.04 -0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericFunctionMaterial
prop_names = 'diffusion_coefficient'
prop_values = 'k_func'
[../]
[]
[BCs]
[./left_du]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = FunctionDirichletBC
variable = u
boundary = 'right'
function = dirichlet_right_func
[../]
[./bottom_du]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = neumann_func
[../]
[./top_u]
type = FunctionDirichletBC
variable = u
boundary = 'top'
function = dirichlet_top_func
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/thermal_hydraulics/test/tests/components/form_loss_from_external_app_1phase/phy.form_loss_1phase.parent.i)
# This tests a form loss transfer using the MultiApp system. A dummy heat
# conduction problem is solved, then the form loss evaluated and transferred
# to the child app side of the solve, then the child app solves and then the
# parent continues solving
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 2
nx = 10
[]
[Functions]
[left_bc_fn]
type = PiecewiseLinear
x = '0 1'
y = '300 310'
[]
[K_prime_fn]
type = ParsedFunction
expression = 't*(2-x)*x'
[]
[]
[AuxVariables]
[K_prime]
[]
[]
[AuxKernels]
[K_prime_ak]
type = FunctionAux
variable = K_prime
function = K_prime_fn
[]
[]
[Variables]
[T]
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T
value = 300
[]
[]
[Kernels]
[td]
type = TimeDerivative
variable = T
[]
[diff]
type = Diffusion
variable = T
[]
[]
[BCs]
[left]
type = FunctionDirichletBC
variable = T
boundary = left
function = left_bc_fn
[]
[]
[Executioner]
type = Transient
dt = 0.5
end_time = 5
nl_abs_tol = 1e-10
abort_on_solve_fail = true
[]
[MultiApps]
[child]
type = TransientMultiApp
app_type = ThermalHydraulicsApp
input_files = phy.form_loss_1phase.child.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[K_to_s]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = child
source_variable = K_prime
variable = K_prime
[]
[]
(modules/contact/test/tests/mortar_restart/frictional_bouncing_block_action_restart_1.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = long-bottom-block-no-lower-d.e
[]
allow_renumbering = false
uniform_refine = 0 # 1,2
patch_update_strategy = always
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
generate_output = 'stress_xx stress_yy'
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e3
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[]
[Contact]
[frictional]
primary = 20
secondary = 10
formulation = mortar
model = coulomb
friction_coefficient = 0.4
c_normal = 1.0e1
c_tangential = 1.0e6
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = '40'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = '40'
value = 0.0
[]
[topy]
type = ADFunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 20 * t) + ${offset}'
preset = false
[]
[leftx]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 30
function = '2e-2 * t'
# function = '0'
preset = false
[]
[]
[Executioner]
type = Transient
end_time = 5.25 # 70
dt = 0.25 # 0.1 for finer meshes (uniform_refine)
dtmin = .01
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type '
'-pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15 '
' 1e-5'
l_max_its = 30
nl_max_its = 40
line_search = 'basic'
snesmf_reuse_base = false
nl_abs_tol = 1e-9
nl_rel_tol = 1e-9
l_tol = 1e-07 # Tightening l_tol can help with friction
[]
[Debug]
show_var_residual_norms = true
[]
[VectorPostprocessors]
[cont_press]
type = NodalValueSampler
variable = frictional_normal_lm
boundary = '10'
sort_by = x
execute_on = FINAL
[]
[friction]
type = NodalValueSampler
variable = frictional_tangential_lm
boundary = '10'
sort_by = x
execute_on = FINAL
[]
[]
[Outputs]
exodus = true
[checkfile]
type = CSV
show = 'cont_press friction'
start_time = 0.0
execute_vector_postprocessors_on = FINAL
[]
[checkpoint]
type = Checkpoint
num_files = 2
time_step_interval = 1
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative_nli contact cumulative_li num_l'
[num_nl]
type = NumNonlinearIterations
[]
[num_l]
type = NumLinearIterations
[]
[cumulative_nli]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[cumulative_li]
type = CumulativeValuePostprocessor
postprocessor = num_l
[]
[contact]
type = ContactDOFSetSize
variable = frictional_normal_lm
subdomain = 'frictional_secondary_subdomain'
execute_on = 'nonlinear timestep_end'
[]
[]
(python/peacock/tests/input_tab/InputTree/gold/transient.i)
# ##########################################################
# This is a simple test with a time-dependent problem
# demonstrating the use of a "Transient" Executioner.
#
# @Requirement F1.10
# ##########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = ConstantIC
value = 0
[]
[]
[]
[Functions]
[forcing_fn]
# dudt = 3*t^2*(x^2 + y^2)
type = ParsedFunction
expression = '3*t*t*((x*x)+(y*y))-(4*t*t*t)'
[]
[exact_fn]
type = ParsedFunction
expression = 't*t*t*((x*x)+(y*y))'
[]
[]
[Kernels]
[ie]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[BCs]
inactive = 'left right'
[all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[]
[left]
type = DirichletBC
variable = u
boundary = '3'
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = '1'
value = 1
[]
[]
[Postprocessors]
[l2_err]
type = ElementL2Error
variable = 'u'
function = exact_fn
[]
[dt]
type = TimestepSize
[]
[]
[Executioner]
# Preconditioned JFNK (default)
type = Transient
scheme = implicit-euler
solve_type = PJFNK
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_transient
exodus = true
[]
(modules/richards/test/tests/uo_egs/seff2.i)
# Outputs a 2phase effective saturation relationship into an exodus file
# and into a CSV file.
# In the exodus file, the Seff will be a function of "x", and
# this "x" is actually the difference in porepressures,
# say P_gas - P_water (so "x" should be positive).
# In the CSV file you will find the Seff at the "x" point
# specified by you below.
#
# You may specify:
# - the "type" of Seff in the UserObjects block
# - the parameters of this Seff function in the UserObjects block
# - the "x" point (which is del_porepressure) that you want to extract
# the Seff at, if you want a value at a particular point
# - the range of "x" values (which is porepressure values) may be
# changed in the Mesh block, below
[UserObjects]
[./seff]
type = RichardsSeff2waterVG
al = 1E-6
m = 0.8
[../]
[]
[Postprocessors]
[./point_val]
type = PointValue
execute_on = timestep_begin
# note this point must lie inside the mesh below
point = '1 0 0'
variable = seff
[../]
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
# the following specify the range of porepressure
xmin = 0
xmax = 3E6
[]
############################
# You should not need to change any of the stuff below
############################
[Variables]
[./u]
[../]
[./v]
[../]
[]
[ICs]
[./u_init]
type = FunctionIC
variable = u
function = x
[../]
[./v_init]
type = ConstantIC
variable = v
value = 0
[../]
[]
[AuxVariables]
[./seff]
[../]
[]
[AuxKernels]
[./seff_AuxK]
type = RichardsSeffAux
variable = seff
seff_UO = seff
execute_on = timestep_begin
pressure_vars = 'v u'
[../]
[]
[Kernels]
[./dummy_u]
type = Diffusion
variable = u
[../]
[./dummy_v]
type = Diffusion
variable = v
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
num_steps = 0
[]
[Outputs]
file_base = seff2
[./csv]
type = CSV
[../]
[./exodus]
type = Exodus
hide = 'u v'
[../]
[]