- functionThe function which supplies the postprocessor value.
C++ Type:FunctionName
Controllable:No
Description:The function which supplies the postprocessor value.
FunctionValuePostprocessor
Computes the value of a supplied function at a single point (scalable)
If FunctionValuePostprocessor
uses something like a ParsedFunction, it may have indirect dependencies on other user objects/postprocessors, since ParsedFunction
supports postprocessor values. If this is the case, the "indirect_dependencies" parameter should be used to supply these indirect dependencies, otherwise these dependencies may execute after this postprocessor, and this postprocessor may have inaccurate values.
This object allows to supply postprocessors as arguments to the time and space arguments of the function. Use the "time" to specify the postprocessor passed to the time argument. Use the "point" to specify postprocessors passed to the space argument.
Input Parameters
- execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
Default:TIMESTEP_END
C++ Type:ExecFlagEnum
Options:FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, TRANSFER
Controllable:No
Description:The list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
- indirect_dependenciesIf the evaluated function depends on other postprocessors they must be listed here to ensure proper dependency resolution
C++ Type:std::vector<PostprocessorName>
Controllable:No
Description:If the evaluated function depends on other postprocessors they must be listed here to ensure proper dependency resolution
- pointA set of three PostprocessorNames or constant values (or any mixture thereof) that will be passed to the function in the space argument
C++ Type:std::vector<PostprocessorName>
Controllable:No
Description:A set of three PostprocessorNames or constant values (or any mixture thereof) that will be passed to the function in the space argument
- 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.
- scale_factor1A scale factor to be applied to the function
Default:1
C++ Type:double
Controllable:Yes
Description:A scale factor to be applied to the function
- timeThe PostprocessorName or constant value that will be passed to the function in the time argument.
C++ Type:PostprocessorName
Controllable:No
Description:The PostprocessorName or constant value that will be passed to the function in the time argument.
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Default:False
C++ Type:bool
Controllable:No
Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Optional Parameters
- allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
Default:False
C++ Type:bool
Controllable:No
Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
Default:0
C++ Type:int
Controllable:No
Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
- force_postauxFalseForces the UserObject to be executed in POSTAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in POSTAUX
- force_preauxFalseForces the UserObject to be executed in PREAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREAUX
- force_preicFalseForces the UserObject to be executed in PREIC during initial setup
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREIC during initial setup
- outputsVector of output names where you would like to restrict the output of variables(s) associated with this object
C++ Type:std::vector<OutputName>
Controllable:No
Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Advanced Parameters
Input Files
- (test/tests/functions/parsed/mms_transient_coupled.i)
- (modules/combined/examples/phase_field-mechanics/kks_mechanics_VTS.i)
- (modules/porous_flow/test/tests/hysteresis/2phasePP_2.i)
- (modules/combined/test/tests/ad_cavity_pressure/additional_volume.i)
- (modules/porous_flow/test/tests/sinks/s04.i)
- (modules/thermal_hydraulics/test/tests/scalarkernels/postprocessor_source/postprocessor_source.i)
- (modules/optimization/test/tests/optimizationreporter/general_opt/function_optimization/forward.i)
- (modules/stochastic_tools/test/tests/functions/drl_reward/drl_reward.i)
- (modules/stochastic_tools/test/tests/multiapps/partitioning/sub_transient.i)
- (modules/thermal_hydraulics/test/tests/components/shaft_connected_pump_1phase/pump_coastdown.i)
- (modules/richards/test/tests/gravity_head_2/gh16.i)
- (modules/porous_flow/examples/ates/ates.i)
- (modules/chemical_reactions/test/tests/desorption/mollified_langmuir_desorption.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except10.i)
- (modules/solid_mechanics/test/tests/porosity/ad.i)
- (modules/porous_flow/test/tests/gravity/fully_saturated_grav01a.i)
- (modules/porous_flow/test/tests/sinks/s07.i)
- (modules/combined/examples/stochastic/graphite_ring_thermomechanics.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except05.i)
- (modules/richards/test/tests/sinks/s02.i)
- (modules/thermal_hydraulics/test/tests/controls/get_function_value_control/test.i)
- (modules/richards/test/tests/excav/ex01.i)
- (modules/porous_flow/test/tests/gravity/grav02b_fv.i)
- (modules/fluid_properties/test/tests/functions/saturation_pressure_function/saturation_pressure_function.i)
- (modules/porous_flow/test/tests/gravity/grav02a.i)
- (modules/richards/test/tests/excav/ex02.i)
- (modules/porous_flow/test/tests/hysteresis/2phasePS_2.i)
- (modules/solid_mechanics/test/tests/mohr_coulomb/random.i)
- (modules/stochastic_tools/test/tests/multiapps/partitioning/sub.i)
- (modules/solid_mechanics/test/tests/mohr_coulomb/planar_hard5.i)
- (modules/richards/test/tests/gravity_head_2/gh17.i)
- (modules/solid_mechanics/test/tests/porosity/negative_porosity.i)
- (modules/porous_flow/test/tests/energy_conservation/heat04.i)
- (test/tests/postprocessors/change_over_time/change_over_time.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/ad_verification.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except07.i)
- (modules/porous_flow/test/tests/hysteresis/2phasePS_relperm_2.i)
- (modules/porous_flow/test/tests/energy_conservation/heat04_action.i)
- (test/tests/postprocessors/function_value_pps/function_value_pps.i)
- (modules/thermal_hydraulics/test/tests/controls/unit_trip_control/test.i)
- (modules/solid_mechanics/test/tests/weak_plane_shear/large_deform3.i)
- (modules/fluid_properties/test/tests/temperature_pressure_function/example.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except16.i)
- (modules/porous_flow/test/tests/gravity/fully_saturated_grav01c.i)
- (modules/richards/test/tests/dirac/st01.i)
- (modules/optimization/test/tests/executioners/constrained/shape_optimization/forward.i)
- (examples/ex18_scalar_kernel/ex18_parsed.i)
- (modules/porous_flow/test/tests/gravity/grav01a.i)
- (modules/combined/test/tests/poro_mechanics/terzaghi.i)
- (modules/richards/test/tests/sinks/s_fu_03.i)
- (modules/stochastic_tools/test/tests/controls/libtorch_drl_control/libtorch_drl_control.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except03.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except09.i)
- (test/tests/reporters/accumulated_reporter/accumulate_reporter.i)
- (modules/solid_mechanics/test/tests/recompute_radial_return/cp_affine_plasticity.i)
- (modules/combined/test/tests/optimization/invOpt_multiExperiment/forward.i)
- (test/tests/fvkernels/constraints/integral_transient.i)
- (modules/richards/test/tests/gravity_head_2/gh18.i)
- (modules/porous_flow/test/tests/sinks/s03.i)
- (modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined_fully_saturated.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/3tile.i)
- (modules/richards/test/tests/gravity_head_2/gh_fu_17.i)
- (modules/solid_mechanics/test/tests/mean_cap_TC/random01.i)
- (modules/thermal_hydraulics/test/tests/controls/parsed_function_control/test.i)
- (modules/porous_flow/test/tests/hysteresis/1phase_3rd.i)
- (modules/porous_flow/test/tests/gravity/fully_saturated_upwinded_grav01c.i)
- (modules/porous_flow/test/tests/poro_elasticity/mandel.i)
- (modules/porous_flow/examples/tutorial/11_2D.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/nonad_verification.i)
- (test/tests/outputs/pp_as_reporter/pp_as_reporter.i)
- (modules/solid_mechanics/test/tests/mohr_coulomb/planar_hard4.i)
- (modules/porous_flow/examples/tutorial/11.i)
- (modules/porous_flow/test/tests/sinks/s01.i)
- (test/tests/auxkernels/pp_depend/pp_depend.i)
- (modules/porous_flow/test/tests/dirackernels/frompps.i)
- (modules/porous_flow/test/tests/hysteresis/hys_order_02.i)
- (test/tests/markers/reporter_point_marker/reporter_marker_adapt_test.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except15.i)
- (modules/richards/test/tests/gravity_head_2/gh07.i)
- (modules/porous_flow/test/tests/poro_elasticity/mandel_fully_saturated.i)
- (test/tests/postprocessors/geometry/2d_geometry.i)
- (modules/solid_mechanics/test/tests/tensile/random_planar.i)
- (modules/combined/test/tests/poro_mechanics/borehole_lowres.i)
- (modules/richards/test/tests/gravity_head_2/gh06.i)
- (modules/thermal_hydraulics/test/tests/components/form_loss_from_function_1phase/phy.form_loss_1phase.i)
- (test/tests/multiapps/initial_transfer/parent.i)
- (modules/solid_mechanics/test/tests/porosity/nan.i)
- (test/tests/ics/postprocessor_interface/postprocessor_interface.i)
- (modules/porous_flow/test/tests/hysteresis/hys_order_09.i)
- (modules/stochastic_tools/test/tests/auxkernels/surrogate_aux/surrogate_aux.i)
- (test/tests/postprocessors/execute_on_final/execute_on_final.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/lower_limit.i)
- (test/tests/controls/output/controllable_clear.i)
- (modules/solid_mechanics/test/tests/capped_mohr_coulomb/random3.i)
- (modules/porous_flow/test/tests/poro_elasticity/pp_generation_fullysat_action.i)
- (modules/porous_flow/test/tests/gravity/grav01a_fv.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/ADlower_limit.i)
- (modules/richards/test/tests/dirac/bh_fu_04.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/verification.i)
- (modules/richards/test/tests/gravity_head_2/gh_lumped_17.i)
- (modules/porous_flow/test/tests/dirackernels/hfrompps.i)
- (test/tests/actions/debug_show_reporters/debug_show_reporters.i)
- (modules/porous_flow/examples/groundwater/ex02_steady_state.i)
- (modules/porous_flow/test/tests/hysteresis/hys_order_05.i)
- (modules/stochastic_tools/test/tests/transfers/libtorch_nn_transfer/libtorch_drl_control_sub.i)
- (test/tests/kernels/ode/parsedode_pp_test.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except06.i)
- (modules/porous_flow/test/tests/dirackernels/bh02reporter.i)
- (python/chigger/tests/simple/mug_blocks.i)
- (modules/porous_flow/test/tests/gravity/grav02d.i)
- (modules/solid_mechanics/test/tests/capped_mohr_coulomb/random4.i)
- (modules/solid_mechanics/test/tests/mohr_coulomb/many_deforms_cap.i)
- (modules/porous_flow/test/tests/hysteresis/hys_order_01.i)
- (test/tests/auxkernels/pp_depend/pp_depend_indirect_wrong.i)
- (modules/solid_mechanics/test/tests/mean_cap_TC/random03.i)
- (modules/porous_flow/examples/multiapp_fracture_flow/3dFracture/fracture_only_aperture_changing.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except13.i)
- (modules/solid_mechanics/test/tests/multi/rock1.i)
- (modules/porous_flow/examples/groundwater/ex01.i)
- (python/chigger/tests/input/mug_blocks.i)
- (modules/porous_flow/test/tests/dirackernels/bh03.i)
- (modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined_basicthm.i)
- (modules/richards/test/tests/dirac/bh05.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except01.i)
- (test/tests/postprocessors/function_value_pps/pps_args_function_value_pps.i)
- (modules/stochastic_tools/test/tests/multiapps/user_cli_args/sub_steady.i)
- (modules/richards/test/tests/gravity_head_2/gh02.i)
- (modules/porous_flow/test/tests/hysteresis/hys_order_03.i)
- (test/tests/kernels/ode/parsedode_sys_impl_test.i)
- (modules/porous_flow/examples/lava_lamp/1phase_convection.i)
- (test/tests/time_steppers/iteration_adaptive/adapt_tstep_reject_large_dt.i)
- (modules/porous_flow/examples/groundwater/ex02_abstraction.i)
- (modules/richards/test/tests/dirac/bh08.i)
- (test/tests/postprocessors/geometry/3d_geometry.i)
- (modules/solid_mechanics/test/tests/mean_cap/random.i)
- (modules/thermal_hydraulics/test/tests/misc/coupling_mD_flow/parent_non_overlapping.i)
- (test/tests/functions/piecewise_constant/piecewise_constant_simple.i)
- (modules/fluid_properties/test/tests/sodium/exact.i)
- (modules/richards/test/tests/gravity_head_2/gh_lumped_07.i)
- (modules/thermal_hydraulics/test/tests/components/pump_1phase/pump_mass_energy_conservation.i)
- (modules/thermal_hydraulics/test/tests/components/shaft_connected_turbine_1phase/shaft_motor_turbine.i)
- (modules/porous_flow/test/tests/dirackernels/pls03_action.i)
- (modules/porous_flow/test/tests/poro_elasticity/pp_generation_action.i)
- (modules/porous_flow/test/tests/energy_conservation/heat04_action_KT.i)
- (modules/geochemistry/test/tests/kinetics/bio_arsenate1.i)
- (test/tests/time_steppers/iteration_adaptive/adapt_tstep_multi_pps_lim.i)
- (test/tests/functions/piecewise_linear_from_vectorpostprocessor/vpp_time_interpolation.i)
- (modules/porous_flow/test/tests/hysteresis/hys_order_08.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_radiation/sphere.i)
- (examples/ex18_scalar_kernel/ex18.i)
- (modules/solid_mechanics/test/tests/tensile/random_smoothed.i)
- (modules/porous_flow/test/tests/hysteresis/1phase.i)
- (modules/porous_flow/test/tests/dirackernels/bh02.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/special/area.i)
- (modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/exact.i)
- (modules/ray_tracing/test/tests/raykernels/line_source_ray_kernel/line_source_ray_kernel.i)
- (modules/porous_flow/test/tests/hysteresis/1phase_bc.i)
- (modules/richards/test/tests/gravity_head_2/gh01.i)
- (test/tests/time_steppers/iteration_adaptive/adapt_tstep_pps_lim.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except11.i)
- (modules/solid_mechanics/test/tests/capped_mohr_coulomb/random2.i)
- (modules/stochastic_tools/test/tests/multiapps/user_cli_args/sub_transient.i)
- (modules/richards/test/tests/dirac/bh10.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except08.i)
- (modules/combined/test/tests/cavity_pressure/additional_volume.i)
- (modules/richards/test/tests/gravity_head_2/gh_bounded_17.i)
- (modules/richards/test/tests/gravity_head_2/gh_lumped_08.i)
- (modules/richards/test/tests/gravity_head_2/gh05.i)
- (modules/porous_flow/test/tests/dirackernels/pls02reporter.i)
- (modules/porous_flow/test/tests/poro_elasticity/mandel_constM.i)
- (test/tests/time_integrators/explicit_ssp_runge_kutta/explicit_ssp_runge_kutta.i)
- (modules/solid_mechanics/test/tests/weak_plane_shear/small_deform3.i)
- (modules/porous_flow/test/tests/gravity/grav01c.i)
- (modules/richards/test/tests/gravity_head_2/gh03.i)
- (modules/porous_flow/test/tests/sinks/s08.i)
- (modules/chemical_reactions/test/tests/desorption/langmuir_desorption.i)
- (modules/porous_flow/test/tests/poro_elasticity/terzaghi_basicthm.i)
- (modules/richards/test/tests/gravity_head_2/gh04.i)
- (modules/porous_flow/test/tests/hysteresis/2phasePP.i)
- (modules/porous_flow/test/tests/gravity/fully_saturated_grav01b.i)
- (test/tests/functions/piecewise_linear_from_vectorpostprocessor/vector_postprocessor_function.i)
- (modules/thermal_hydraulics/test/tests/controls/set_component_real_value_control/test.i)
- (modules/richards/test/tests/sinks/s01.i)
- (modules/richards/test/tests/dirac/bh04.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except12.i)
- (modules/porous_flow/test/tests/gravity/grav01c_action.i)
- (modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/lps_dual.i)
- (modules/fluid_properties/test/tests/functions/saturation_temperature_function/saturation_temperature_function.i)
- (test/tests/userobjects/postprocessor_spatial_user_object/sub.i)
- (modules/stochastic_tools/test/tests/reporters/stochastic_matrix/sub.i)
- (test/tests/functions/parsed/combined.i)
- (modules/porous_flow/test/tests/gravity/grav02b.i)
- (modules/solid_mechanics/test/tests/drucker_prager/random_hyperbolic.i)
- (modules/richards/test/tests/gravity_head_2/gh_fu_02.i)
- (modules/thermal_hydraulics/test/tests/problems/brayton_cycle/recuperated_brayton_cycle.i)
- (modules/thermal_hydraulics/test/tests/problems/brayton_cycle/open_brayton_cycle.i)
- (modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined_fully_saturated_volume.i)
- (modules/combined/test/tests/poro_mechanics/borehole_highres.i)
- (modules/combined/examples/phase_field-mechanics/kks_mechanics_KHS.i)
- (modules/solid_mechanics/test/tests/capped_drucker_prager/random.i)
- (modules/solid_mechanics/test/tests/mean_cap_TC/random04.i)
- (modules/porous_flow/test/tests/dirackernels/pls03.i)
- (modules/combined/test/tests/poro_mechanics/mandel.i)
- (modules/thermal_hydraulics/test/tests/controls/thm_solve_postprocessor_control/test.i)
- (modules/porous_flow/examples/lava_lamp/2phase_convection.i)
- (modules/porous_flow/test/tests/hysteresis/1phase_relperm_2.i)
- (modules/thermal_hydraulics/test/tests/components/pump_1phase/pump_pressure_check.i)
- (modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/lps_single_split.i)
- (modules/porous_flow/test/tests/sinks/s05.i)
- (modules/porous_flow/test/tests/poro_elasticity/terzaghi_fully_saturated_volume.i)
- (modules/solid_mechanics/test/tests/mean_cap_TC/random02.i)
- (modules/thermal_hydraulics/test/tests/components/shaft_connected_pump_1phase/shaft_motor_pump.i)
- (modules/solid_mechanics/test/tests/weak_plane_shear/large_deform4.i)
- (modules/combined/examples/geochem-porous_flow/geotes_2D/porous_flow.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/ADverification.i)
- (test/tests/parser/param_substitution/unit_conversion.i)
- (modules/richards/test/tests/sinks/s03.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/3tile_json.i)
- (modules/fluid_properties/test/tests/temperature_pressure_function/exact.i)
- (modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined.i)
- (modules/solid_mechanics/test/tests/recompute_radial_return/affine_plasticity.i)
- (modules/porous_flow/test/tests/hysteresis/hys_order_04.i)
- (test/tests/controls/output/controllable.i)
- (modules/porous_flow/test/tests/energy_conservation/heat04_fullysat_action.i)
- (modules/porous_flow/test/tests/jacobian/hfrompps.i)
- (modules/richards/test/tests/dirac/bh09.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_radiation/cylinder.i)
- (modules/fluid_properties/test/tests/functions/saturation_density_function/saturation_density_function.i)
- (modules/richards/test/tests/sinks/s05.i)
- (modules/porous_flow/test/tests/poro_elasticity/mandel_basicthm.i)
- (modules/solid_mechanics/test/tests/weak_plane_shear/large_deform_harden3.i)
- (modules/heat_transfer/test/tests/heat_conduction_ortho/heat_conduction_ortho.i)
- (modules/solid_mechanics/test/tests/porosity/reg.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except02.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except14.i)
- (test/tests/outputs/debug/show_execution_ics.i)
- (modules/porous_flow/test/tests/poro_elasticity/terzaghi.i)
- (modules/richards/test/tests/gravity_head_2/gh08.i)
- (modules/richards/test/tests/gravity_head_2/gh_lumped_18.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except04.i)
- (modules/richards/test/tests/dirac/bh02.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/special/area.i)
- (test/tests/kernels/ad_2d_diffusion/2d_diffusion_bodyforce_test.i)
- (modules/porous_flow/test/tests/hysteresis/hys_order_06.i)
- (modules/porous_flow/test/tests/radioactive_decay/radioactive_decay01.i)
- (modules/combined/examples/geochem-porous_flow/geotes_weber_tensleep/porous_flow.i)
- (modules/stochastic_tools/test/tests/auxkernels/surrogate_aux/surrogate_array_aux.i)
- (modules/porous_flow/test/tests/dirackernels/bh05.i)
- (modules/solid_mechanics/test/tests/mohr_coulomb/planar_hard3.i)
- (modules/porous_flow/test/tests/dirackernels/bh04.i)
- (modules/richards/test/tests/dirac/bh_fu_05.i)
- (test/tests/kernels/ode/ode_sys_impl_test.i)
- (modules/porous_flow/test/tests/hysteresis/2phasePS.i)
- (modules/thermal_hydraulics/test/tests/components/shaft_connected_compressor_1phase/shaft_motor_compressor.i)
- (modules/porous_flow/test/tests/hysteresis/2phasePS_relperm.i)
- (modules/porous_flow/test/tests/poro_elasticity/mandel_fully_saturated_volume.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/phy.heat_structure_multiple_3eqn.i)
- (test/tests/kernels/2d_diffusion/2d_diffusion_bodyforce_test.i)
- (modules/porous_flow/test/tests/dirackernels/pls02.i)
- (modules/porous_flow/test/tests/gravity/grav01d.i)
- (test/tests/coord_type/coord_type_rz_general.i)
- (modules/richards/test/tests/dirac/bh_fu_03.i)
- (modules/thermal_hydraulics/test/tests/functions/smooth_transition/time.i)
- (modules/porous_flow/test/tests/hysteresis/hys_order_07.i)
- (modules/porous_flow/test/tests/gravity/fully_saturated_upwinded_grav01c_action.i)
- (modules/porous_flow/test/tests/dirackernels/pls01.i)
- (test/tests/functions/piecewise_constant/piecewise_constant_json.i)
- (modules/porous_flow/test/tests/sinks/s06.i)
- (modules/solid_mechanics/test/tests/tensile/random_update.i)
- (test/tests/auxkernels/pp_depend/pp_depend_indirect_correct.i)
- (modules/porous_flow/test/tests/hysteresis/1phase_relperm.i)
- (modules/porous_flow/test/tests/poro_elasticity/terzaghi_constM.i)
- (modules/porous_flow/test/tests/poro_elasticity/pp_generation.i)
- (modules/porous_flow/test/tests/gravity/grav01b.i)
- (modules/porous_flow/test/tests/gravity/fully_saturated_upwinded_nodens_grav01c_action.i)
- (modules/richards/test/tests/dirac/bh_fu_02.i)
- (modules/richards/test/tests/gravity_head_2/gh_fu_18.i)
- (test/tests/reporters/base/special_types.i)
- (modules/solid_mechanics/test/tests/capped_mohr_coulomb/random1.i)
- (modules/richards/test/tests/gravity_head_2/gh_fu_05.i)
- (modules/solid_mechanics/test/tests/mohr_coulomb/random_planar.i)
- (modules/porous_flow/test/tests/gravity/grav02c.i)
- (modules/phase_field/examples/measure_interface_energy/1Dinterface_energy.i)
- (modules/thermal_hydraulics/test/tests/problems/brayton_cycle/closed_brayton_cycle.i)
- (modules/richards/test/tests/dirac/bh03.i)
- (modules/thermal_hydraulics/test/tests/controls/delay_control/test.i)
- (modules/stochastic_tools/examples/libtorch_drl_control/libtorch_drl_control_sub.i)
- (modules/porous_flow/test/tests/sinks/s02.i)
- (test/tests/controls/moose_base_naming_access/base_object_param.i)
- (modules/richards/test/tests/gravity_head_2/gh_fu_01.i)
- (modules/richards/test/tests/gravity_head_2/gh_fu_06.i)
- (modules/richards/test/tests/sinks/s_fu_01.i)
indirect_dependencies
C++ Type:std::vector<PostprocessorName>
Controllable:No
Description:If the evaluated function depends on other postprocessors they must be listed here to ensure proper dependency resolution
time
C++ Type:PostprocessorName
Controllable:No
Description:The PostprocessorName or constant value that will be passed to the function in the time argument.
point
C++ Type:std::vector<PostprocessorName>
Controllable:No
Description:A set of three PostprocessorNames or constant values (or any mixture thereof) that will be passed to the function in the space argument
(test/tests/functions/parsed/mms_transient_coupled.i)
###########################################################
# This is a simple test of the Function System. This
# test uses forcing terms produced from analytical
# functions of space and time to verify a solution
# using MMS.
#
# @Requirement F6.20
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0.0
xmax = 1.0
nx = 10
ymin = 0.0
ymax = 1.0
ny = 10
uniform_refine = 2
elem_type = QUAD4
[]
[Variables]
[./u]
[../]
[./v]
[../]
[]
[Functions]
[./v_left_bc]
# Left-side boundary condition for v equation, v(0,y,t) = u(0.5,y,t). This is accomplished using a PointValue postprocessor, which is what this input file was designed to test.
type = ParsedFunction
expression = a
symbol_values = u_midpoint
symbol_names = a
[../]
[./u_mms_func]
# MMS Forcing function for the u equation.
type = ParsedFunction
expression = ' 20*exp(20*t)*x*x*x-6*exp(20*t)*x-(2-0.125*exp(20*t))*sin(5/2*x*pi)-0.125*exp(20*t)-1
'
[../]
[./v_mms_func]
# MMS forcing function for the v equation.
type = ParsedFunction
expression = -2.5*exp(20*t)*sin(5/2*x*pi)+2.5*exp(20*t)+25/4*(2-0.125*exp(20*t))*sin(5/2*x*pi)*pi*pi
[../]
[./u_right_bc]
type = ParsedFunction
expression = 3*exp(20*t) # \nabla{u}|_{x=1} = 3\exp(20*t)
[../]
[./u_exact]
# Exact solution for the MMS function for the u variable.
type = ParsedFunction
expression = exp(20*t)*pow(x,3)+1
[../]
[./v_exact]
# Exact MMS solution for v.
type = ParsedFunction
expression = (2-0.125*exp(20*t))*sin(5/2*pi*x)+0.125*exp(20*t)+1
[../]
[]
[Kernels]
# Strong Form:
# \frac{\partial u}{\partial t} - \nabla \cdot 0.5 \nabla u - v = 0
# \frac{\partial u}{\partial t} - \nabla \cdot \nabla v = 0
#
# BCs:
# u(0,y,t) = 1
# \nabla u |_{x=1} = 3\exp(20*t)
# v(0,y,t) = u(0.5,y,t)
# v(1,y,t) = 3
# \nabla u |_{y=0,1} = 0
# \nabla v |_{y=0,1} = 0
#
[./u_time]
type = TimeDerivative
variable = u
[../]
[./u_diff]
type = Diffusion
variable = u
[../]
[./u_source]
type = CoupledForce
variable = u
v = v
[../]
[./v_diff]
type = Diffusion
variable = v
[../]
[./u_mms]
type = BodyForce
variable = u
function = u_mms_func
[../]
[./v_mms]
type = BodyForce
variable = v
function = v_mms_func
[../]
[./v_time]
type = TimeDerivative
variable = v
[../]
[]
[BCs]
[./u_left]
type = DirichletBC
variable = u
boundary = left # x=0
value = 1 # u(0,y,t)=1
[../]
[./u_right]
type = FunctionNeumannBC
variable = u
boundary = right # x=1
function = u_right_bc # \nabla{u}|_{x=1}=3\exp(20t)
[../]
[./v_left]
type = FunctionDirichletBC
variable = v
boundary = left # x=0
function = v_left_bc # v(0,y,t) = u(0.5,y,t)
[../]
[./v_right]
type = DirichletBC
variable = v
boundary = right # x=1
value = 3 # v(1,y,t) = 3
[../]
[]
[Postprocessors]
[./u_midpoint]
type = PointValue
variable = u
point = '0.5 0.5 0'
execute_on = 'initial timestep_end'
[../]
[./u_midpoint_exact]
type = FunctionValuePostprocessor
function = u_exact
point = '0.5 0.5 0.0'
execute_on = 'initial timestep_end'
[../]
[./u_error]
type = ElementL2Error
variable = u
function = u_exact
execute_on = 'initial timestep_end'
[../]
[./v_error]
type = ElementL2Error
variable = v
function = v_exact
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
dt = 0.01
solve_type = NEWTON
end_time = 0.1
scheme = crank-nicolson
[]
[Outputs]
exodus = true
[]
[ICs]
[./u_initial]
# Use the MMS exact solution to compute the initial conditions.
function = u_exact
variable = u
type = FunctionIC
[../]
[./v_exact]
# Use the MMS exact solution to compute the initial condition.
function = v_exact
variable = v
type = FunctionIC
[../]
[]
(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/porous_flow/test/tests/hysteresis/2phasePP_2.i)
# Simple example of a 2-phase situation with hysteretic capillary pressure. Gas is added to, removed from, and added to the system in order to observe the hysteresis
# All liquid water exists in component 0
# All gas exists in component 1
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
number_fluid_phases = 2
number_fluid_components = 2
porous_flow_vars = 'pp0 pp1'
[]
[]
[Variables]
[pp0]
initial_condition = 0
[]
[pp1]
initial_condition = 1E-4
[]
[]
[Kernels]
[mass_conservation0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp0
[]
[mass_conservation1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = pp1
[]
[]
[DiracKernels]
[pump]
type = PorousFlowPointSourceFromPostprocessor
mass_flux = flux
point = '0.5 0 0'
variable = pp1
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[sat0]
family = MONOMIAL
order = CONSTANT
[]
[sat1]
family = MONOMIAL
order = CONSTANT
[]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[sat0]
type = PorousFlowPropertyAux
variable = sat0
phase = 0
property = saturation
[]
[sat1]
type = PorousFlowPropertyAux
variable = sat1
phase = 1
property = saturation
[]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[]
[FluidProperties]
[simple_fluid] # same properties used for both phases
type = SimpleFluidProperties
bulk_modulus = 10 # so pumping does not result in excessive porepressure
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[temperature]
type = PorousFlowTemperature
temperature = 20
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 1
[]
[hys_order_material]
type = PorousFlowHysteresisOrder
[]
[pc_calculator]
type = PorousFlow2PhaseHysPP
alpha_d = 10.0
alpha_w = 7.0
n_d = 1.5
n_w = 1.9
S_l_min = 0.1
S_lr = 0.2
S_gr_max = 0.3
Pc_max = 12.0
high_ratio = 0.9
low_extension_type = quadratic
high_extension_type = power
phase0_porepressure = pp0
phase1_porepressure = pp1
[]
[]
[Postprocessors]
[flux]
type = FunctionValuePostprocessor
function = 'if(t <= 14, 10, if(t <= 25, -10, 10))'
[]
[hys_order]
type = PointValue
point = '0 0 0'
variable = hys_order
[]
[sat0]
type = PointValue
point = '0 0 0'
variable = sat0
[]
[sat1]
type = PointValue
point = '0 0 0'
variable = sat1
[]
[pp0]
type = PointValue
point = '0 0 0'
variable = pp0
[]
[pp1]
type = PointValue
point = '0 0 0'
variable = pp1
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = ' lu NONZERO'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 4
end_time = 46
nl_abs_tol = 1E-10
[]
[Outputs]
csv = true
sync_times = '13 14 15 24 25 25.5 26 27 28 29'
[]
(modules/combined/test/tests/ad_cavity_pressure/additional_volume.i)
#
# Cavity Pressure Test using using automatic differentiation
#
# This test is designed to compute an internal pressure based on
# p = n * R * / (V_cavity / T_cavity + V_add / T_add)
# where
# p is the pressure
# n is the amount of material in the volume (moles)
# R is the universal gas constant
# T_cavity is the temperature in the cavity
# T_add is the temperature of the additional volume
#
# The mesh is composed of one block (1) with an interior cavity of volume 8.
# Block 2 sits in the cavity and has a volume of 1. Thus, the total
# initial volume is 7. An additional volume of 2 is added.
#
# The test adjusts n, T, and V in the following way:
# n => n0 + alpha * t
# T => T0 + beta * t
# V => V_cavity0 + gamma * t + V_add
# with
# alpha = n0
# beta = T0 / 2
# gamma = -(0.003322259...) * V0
# T0 = 240.54443866068704
# V_cavity0 = 7
# V_add = 2
# T_add = 100
# n0 = f(p0)
# p0 = 100
# R = 8.314472 J * K^(-1) * mol^(-1)
#
# An additional volume of 2 with a temperature of 100.0 is included.
#
# So, n0 = p0 * (V_cavity / T_cavity + V_add / T_add) / R
# = 100 * (7 / 240.544439 + 2 / 100) / 8.314472
# = 0.59054
#
# The parameters combined at t = 1 gives p = 249.647.
#
# This test sets the initial temperature to 500, but the CavityPressure
# is told that that initial temperature is T0. Thus, the final solution
# is unchanged.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
file = 3d.e
[]
[GlobalParams]
volumetric_locking_correction = true
[]
[Functions]
[./displ_positive]
type = PiecewiseLinear
x = '0 1'
y = '0 0.0029069767441859684'
[../]
[./displ_negative]
type = PiecewiseLinear
x = '0 1'
y = '0 -0.0029069767441859684'
[../]
[./temp1]
type = PiecewiseLinear
x = '0 1'
y = '1 1.5'
scale_factor = 240.54443866068704
[../]
[./material_input_function]
type = PiecewiseLinear
x = '0 1'
y = '0 0.59054'
[../]
[./additional_volume]
type = ConstantFunction
value = 2
[../]
[./temperature_of_additional_volume]
type = ConstantFunction
value = 100
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./temp]
initial_condition = 500
[../]
[./material_input]
[../]
[]
[AuxVariables]
[./pressure_residual_x]
[../]
[./pressure_residual_y]
[../]
[./pressure_residual_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./TensorMechanics]
use_displaced_mesh = true
use_automatic_differentiation = true
[../]
[./heat]
type = ADDiffusion
variable = temp
use_displaced_mesh = true
[../]
[./material_input_dummy]
type = ADDiffusion
variable = material_input
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_xx]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = stress_xx
[../]
[./stress_yy]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = stress_yy
[../]
[./stress_zz]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = stress_zz
[../]
[./stress_xy]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 1
variable = stress_xy
[../]
[./stress_yz]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 2
variable = stress_yz
[../]
[./stress_zx]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 0
variable = stress_zx
[../]
[]
[BCs]
[./no_x_exterior]
type = DirichletBC
variable = disp_x
boundary = '7 8'
value = 0.0
[../]
[./no_y_exterior]
type = DirichletBC
variable = disp_y
boundary = '9 10'
value = 0.0
[../]
[./no_z_exterior]
type = DirichletBC
variable = disp_z
boundary = '11 12'
value = 0.0
[../]
[./prescribed_left]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = displ_positive
[../]
[./prescribed_right]
type = FunctionDirichletBC
variable = disp_x
boundary = 14
function = displ_negative
[../]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '15 16'
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '17 18'
value = 0.0
[../]
[./no_x_interior]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[../]
[./no_y_interior]
type = DirichletBC
variable = disp_y
boundary = '3 4'
value = 0.0
[../]
[./no_z_interior]
type = DirichletBC
variable = disp_z
boundary = '5 6'
value = 0.0
[../]
[./temperatureInterior]
type = ADFunctionDirichletBC
boundary = 100
function = temp1
variable = temp
[../]
[./MaterialInput]
type = ADFunctionDirichletBC
boundary = '100 13 14 15 16'
function = material_input_function
variable = material_input
[../]
[./CavityPressure]
[./1]
boundary = 100
initial_pressure = 100
material_input = materialInput
R = 8.314472
temperature = aveTempInterior
initial_temperature = 240.54443866068704
volume = internalVolume
startup_time = 0.5
output = ppress
save_in = 'pressure_residual_x pressure_residual_y pressure_residual_z'
additional_volumes = volume1
temperature_of_additional_volumes = temperature1
use_automatic_differentiation = true
[../]
[../]
[]
[Materials]
[./elast_tensor1]
type = ADComputeElasticityTensor
C_ijkl = '0 5'
fill_method = symmetric_isotropic
block = 1
[../]
[./strain1]
type = ADComputeFiniteStrain
block = 1
[../]
[./stress1]
type = ADComputeFiniteStrainElasticStress
block = 1
[../]
[./elast_tensor2]
type = ADComputeElasticityTensor
C_ijkl = '0 5'
fill_method = symmetric_isotropic
block = 2
[../]
[./strain2]
type = ADComputeFiniteStrain
block = 2
[../]
[./stress2]
type = ADComputeFiniteStrainElasticStress
block = 2
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
nl_rel_tol = 1e-12
l_tol = 1e-12
l_max_its = 20
dt = 0.5
end_time = 1.0
[]
[Postprocessors]
[./internalVolume]
type = InternalVolume
boundary = 100
execute_on = 'initial linear'
[../]
[./aveTempInterior]
type = SideAverageValue
boundary = 100
variable = temp
execute_on = 'initial linear'
[../]
[./materialInput]
type = SideAverageValue
boundary = '7 8 9 10 11 12'
variable = material_input
execute_on = linear
[../]
[./volume1]
type = FunctionValuePostprocessor
function = additional_volume
execute_on = 'initial linear'
[../]
[./temperature1]
type = FunctionValuePostprocessor
function = temperature_of_additional_volume
execute_on = 'initial linear'
[../]
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/sinks/s04.i)
# apply a piecewise-linear sink flux and observe the correct behavior
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 2
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[Variables]
[pp]
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = y+1
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.3
density0 = 1.1
thermal_expansion = 0
viscosity = 1.1
[]
[]
[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.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[AuxVariables]
[flux_out]
[]
[xval]
[]
[yval]
[]
[pt_shift]
initial_condition = 0.3
[]
[]
[ICs]
[xval]
type = FunctionIC
variable = xval
function = x
[]
[yval]
type = FunctionIC
variable = yval
function = y
[]
[]
[Functions]
[mass10]
type = ParsedFunction
expression = 'vol*por*dens0*exp(pp/bulk)'
symbol_names = 'vol por dens0 pp bulk'
symbol_values = '0.25 0.1 1.1 p10 1.3'
[]
[rate10]
type = ParsedFunction
expression = 'fcn*if(pp>0.8,1,if(pp<0.3,0.5,0.2+pp))'
symbol_names = 'fcn pp'
symbol_values = '8 p10'
[]
[mass10_expect]
type = ParsedFunction
expression = 'mass_prev-rate*area*dt'
symbol_names = 'mass_prev rate area dt'
symbol_values = 'm10_prev m10_rate 0.5 1E-3'
[]
[mass11]
type = ParsedFunction
expression = 'vol*por*dens0*exp(pp/bulk)'
symbol_names = 'vol por dens0 pp bulk'
symbol_values = '0.25 0.1 1.1 p11 1.3'
[]
[rate11]
type = ParsedFunction
expression = 'fcn*if(pp>0.8,1,if(pp<0.3,0.5,0.2+pp))'
symbol_names = 'fcn pp'
symbol_values = '8 p11'
[]
[mass11_expect]
type = ParsedFunction
expression = 'mass_prev-rate*area*dt'
symbol_names = 'mass_prev rate area dt'
symbol_values = 'm11_prev m11_rate 0.5 1E-3'
[]
[]
[Postprocessors]
[p00]
type = PointValue
point = '0 0 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[p10]
type = PointValue
point = '1 0 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[m10]
type = FunctionValuePostprocessor
function = mass10
execute_on = 'initial timestep_end'
[]
[m10_prev]
type = FunctionValuePostprocessor
function = mass10
execute_on = 'timestep_begin'
outputs = 'console'
[]
[m10_rate]
type = FunctionValuePostprocessor
function = rate10
execute_on = 'timestep_end'
[]
[m10_expect]
type = FunctionValuePostprocessor
function = mass10_expect
execute_on = 'timestep_end'
[]
[p01]
type = PointValue
point = '0 1 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[p11]
type = PointValue
point = '1 1 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[m11]
type = FunctionValuePostprocessor
function = mass11
execute_on = 'initial timestep_end'
[]
[m11_prev]
type = FunctionValuePostprocessor
function = mass11
execute_on = 'timestep_begin'
outputs = 'console'
[]
[m11_rate]
type = FunctionValuePostprocessor
function = rate11
execute_on = 'timestep_end'
[]
[m11_expect]
type = FunctionValuePostprocessor
function = mass11_expect
execute_on = 'timestep_end'
[]
[]
[BCs]
[flux]
type = PorousFlowPiecewiseLinearSink
boundary = 'right'
PT_shift = pt_shift
pt_vals = '0.0 0.5'
multipliers = '0.5 1'
variable = pp
use_mobility = false
use_relperm = false
fluid_phase = 0
flux_function = 8
save_in = flux_out
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -snes_max_it -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu 10000 NONZERO 2'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E-3
end_time = 1E-2
nl_rel_tol = 1E-12
nl_abs_tol = 1E-12
[]
[Outputs]
file_base = s04
[console]
type = Console
execute_on = 'nonlinear linear'
[]
[csv]
type = CSV
execute_on = 'timestep_end'
[]
[]
(modules/thermal_hydraulics/test/tests/scalarkernels/postprocessor_source/postprocessor_source.i)
# This input file tests PostprocessorSourceScalarKernel.
#
# The following initial value problem is modeled here:
# du/dt = t, u(0) = 0
# Using backward Euler time integration with dt=1, the solution values should
# be as follows:
# u(0) = 0
# u(1) = 1
# u(2) = 3
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[Variables]
[u]
family = SCALAR
order = FIRST
[]
[]
[ICs]
[ic_u]
type = ScalarConstantIC
variable = u
value = 0
[]
[]
[ScalarKernels]
[sk_time]
type = ODETimeDerivative
variable = u
[]
[sk_source]
type = PostprocessorSourceScalarKernel
variable = u
pp = pp_source
[]
[]
[Functions]
[fn_source]
type = ParsedFunction
expression = 't'
[]
[]
[Postprocessors]
[pp_source]
type = FunctionValuePostprocessor
function = fn_source
execute_on = 'LINEAR NONLINEAR'
[]
[]
[Executioner]
type = Transient
scheme = implicit-euler
dt = 1
num_steps = 2
[]
[Outputs]
csv = true
show = 'u'
execute_on = 'INITIAL TIMESTEP_END'
[]
(modules/optimization/test/tests/optimizationreporter/general_opt/function_optimization/forward.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Functions]
[obj_func]
type = ParsedOptimizationFunction
expression = 'pow(x_val + 2 * y_val - 7, 2) + pow(2 * x_val + y_val - 5, 2)'
param_symbol_names = 'x_val y_val'
param_vector_name = vals/vals
[]
[df_dx]
type = ParsedOptimizationFunction
expression = '2 * (x_val + 2 * y_val - 7) + 4 * (2 * x_val + y_val - 5)'
param_symbol_names = 'x_val y_val'
param_vector_name = vals/vals
[]
[df_dy]
type = ParsedOptimizationFunction
expression = '4 * (x_val + 2 * y_val - 7) + 2 * (2 * x_val + y_val - 5)'
param_symbol_names = 'x_val y_val'
param_vector_name = vals/vals
[]
[]
[Postprocessors]
[obj_pp]
type = FunctionValuePostprocessor
function = obj_func
execute_on = 'INITIAL TIMESTEP_END'
outputs = console
[]
[df_dx]
type = FunctionValuePostprocessor
function = df_dx
[]
[df_dy]
type = FunctionValuePostprocessor
function = df_dy
[]
[]
[VectorPostprocessors]
[grad_f]
type = VectorOfPostprocessors
postprocessors = 'df_dx df_dy'
[]
[]
[Reporters]
[vals]
type = ConstantReporter
real_vector_names = 'vals'
real_vector_values = '0 4'
[]
[]
(modules/stochastic_tools/test/tests/functions/drl_reward/drl_reward.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 0.0
xmax = 7.0
nx = 3
[]
[]
[Variables]
[temp]
initial_condition = 300
[]
[]
[Kernels]
[time]
type = CoefTimeDerivative
variable = temp
Coefficient = '${fparse 1.00630182*1.225}'
[]
[heat_conduc]
type = MatDiffusion
variable = temp
diffusivity = 'k'
[]
[]
[BCs]
[dirichlet]
type = FunctionDirichletBC
function = "200"
variable = temp
boundary = 'right'
[]
[]
[Functions]
[design_function]
type = ParsedFunction
value = 't/3600*297'
[]
[reward_function]
type = ScaledAbsDifferenceDRLRewardFunction
design_function = design_function
observed_value = center_temp_tend
c1 = 1
c2 = 10
[]
[]
[Materials]
[constant]
type = GenericConstantMaterial
prop_names = 'k'
prop_values = 26.53832364
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-8
start_time = 0.0
end_time = 3600
dt = 1800
[]
[Postprocessors]
[center_temp_tend]
type = PointValue
variable = temp
point = '3.5 0.0 0.0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[reward]
type = FunctionValuePostprocessor
function = reward_function
execute_on = 'INITIAL TIMESTEP_END'
indirect_dependencies = 'center_temp_tend'
[]
[]
[Outputs]
csv = true
[]
(modules/stochastic_tools/test/tests/multiapps/partitioning/sub_transient.i)
[StochasticTools]
[]
[Postprocessors]
[pp1]
type = FunctionValuePostprocessor
function = 't'
scale_factor = 1
[]
[pp2]
type = FunctionValuePostprocessor
function = 't'
scale_factor = 1
[]
[]
[Executioner]
type = Transient
num_steps = 3
[]
[Controls/receiver]
type = SamplerReceiver
[]
(modules/thermal_hydraulics/test/tests/components/shaft_connected_pump_1phase/pump_coastdown.i)
# Pump data used in this test comes from the Semiscale Program, summarized in NUREG/CR-4945
initial_T = 393.15
area = 1e-2
dt = 0.005
[GlobalParams]
initial_p = 1.4E+07
initial_T = ${initial_T}
initial_vel = 0.01
initial_vel_x = 0.01
initial_vel_y = 0
initial_vel_z = 0
A = ${area}
A_ref = ${area}
f = 100
scaling_factor_1phase = '1 1 1e-3'
closures = simple_closures
rdg_slope_reconstruction = minmod
fp = fp
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pump]
type = ShaftConnectedPump1Phase
inlet = 'pipe:out'
outlet = 'pipe:in'
position = '0 0 0'
scaling_factor_rhoEV = 1e-5
volume = 0.3
inertia_coeff = '1 1 1 1'
inertia_const = 0.5
omega_rated = 314
speed_cr_I = 1e12
speed_cr_fr = 0.001
torque_rated = 47.1825
volumetric_rated = 1
head_rated = 58.52
tau_fr_coeff = '4 0 80 0'
tau_fr_const = 8
head = head_fcn
torque_hydraulic = torque_fcn
density_rated = 124.2046
[]
[pipe]
type = FlowChannel1Phase
position = '0.6096 0 0'
orientation = '1 0 0'
length = 10
n_elems = 20
[]
[shaft]
type = Shaft
connected_components = 'pump'
initial_speed = 1
[]
[]
[Functions]
[head_fcn]
type = PiecewiseLinear
data_file = semiscale_head_data.csv
format = columns
[]
[torque_fcn]
type = PiecewiseLinear
data_file = semiscale_torque_data.csv
format = columns
[]
[S_energy_fcn]
type = ParsedFunction
expression = '-tau_hyd * omega'
symbol_names = 'tau_hyd omega'
symbol_values = 'pump:hydraulic_torque shaft:omega'
[]
[energy_conservation_fcn]
type = ParsedFunction
expression = '(E_change - S_energy * dt) / E_tot'
symbol_names = 'E_change S_energy dt E_tot'
symbol_values = 'E_change S_energy ${dt} E_tot'
[]
[]
[Postprocessors]
# mass conservation
[mass_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoA
block = 'pipe'
execute_on = 'initial timestep_end'
[]
[mass_pump]
type = ScalarVariable
variable = pump:rhoV
execute_on = 'initial timestep_end'
[]
[mass_tot]
type = SumPostprocessor
values = 'mass_pipes mass_pump'
execute_on = 'initial timestep_end'
[]
[mass_conservation]
type = ChangeOverTimePostprocessor
postprocessor = mass_tot
change_with_respect_to_initial = true
compute_relative_change = true
execute_on = 'initial timestep_end'
[]
# energy conservation
[E_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoEA
block = 'pipe'
execute_on = 'initial timestep_end'
[]
[E_pump]
type = ScalarVariable
variable = pump:rhoEV
execute_on = 'initial timestep_end'
[]
[E_tot]
type = LinearCombinationPostprocessor
pp_coefs = '1 1'
pp_names = 'E_pipes E_pump'
execute_on = 'initial timestep_end'
[]
[S_energy]
type = FunctionValuePostprocessor
function = S_energy_fcn
execute_on = 'initial timestep_end'
[]
[E_change]
type = ChangeOverTimePostprocessor
postprocessor = E_tot
execute_on = 'initial timestep_end'
[]
# This should also execute on initial. This value is
# lagged by one timestep as a workaround to moose issue #13262.
[energy_conservation]
type = FunctionValuePostprocessor
function = energy_conservation_fcn
execute_on = 'timestep_end'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
dt = ${dt}
num_steps = 40
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 15
l_tol = 1e-4
l_max_its = 10
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Outputs]
velocity_as_vector = false
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/porous_flow/examples/ates/ates.i)
# Simulation designed to assess the recovery efficiency of a single-well ATES system
# Using KT stabilisation
# Boundary conditions: fixed porepressure and temperature at top, bottom and far end of model.
#####################################
flux_limiter = minmod # minmod, vanleer, mc, superbee, none
# depth of top of aquifer (m)
depth = 400
inject_fluid_mass = 1E8 # kg
produce_fluid_mass = ${inject_fluid_mass} # kg
inject_temp = 90 # degC
inject_time = 91 # days
store_time = 91 # days
produce_time = 91 # days
rest_time = 91 # days
num_cycles = 5 # Currently needs to be <= 10
cycle_length = ${fparse inject_time + store_time + produce_time + rest_time}
end_simulation = ${fparse cycle_length * num_cycles}
# Note: I have setup 10 cycles but you can set num_cycles less than 10.
start_injection1 = 0
start_injection2 = ${cycle_length}
start_injection3 = ${fparse cycle_length * 2}
start_injection4 = ${fparse cycle_length * 3}
start_injection5 = ${fparse cycle_length * 4}
start_injection6 = ${fparse cycle_length * 5}
start_injection7 = ${fparse cycle_length * 6}
start_injection8 = ${fparse cycle_length * 7}
start_injection9 = ${fparse cycle_length * 8}
start_injection10 = ${fparse cycle_length * 9}
end_injection1 = ${fparse start_injection1 + inject_time}
end_injection2 = ${fparse start_injection2 + inject_time}
end_injection3 = ${fparse start_injection3 + inject_time}
end_injection4 = ${fparse start_injection4 + inject_time}
end_injection5 = ${fparse start_injection5 + inject_time}
end_injection6 = ${fparse start_injection6 + inject_time}
end_injection7 = ${fparse start_injection7 + inject_time}
end_injection8 = ${fparse start_injection8 + inject_time}
end_injection9 = ${fparse start_injection9 + inject_time}
end_injection10 = ${fparse start_injection10 + inject_time}
start_production1 = ${fparse end_injection1 + store_time}
start_production2 = ${fparse end_injection2 + store_time}
start_production3 = ${fparse end_injection3 + store_time}
start_production4 = ${fparse end_injection4 + store_time}
start_production5 = ${fparse end_injection5 + store_time}
start_production6 = ${fparse end_injection6 + store_time}
start_production7 = ${fparse end_injection7 + store_time}
start_production8 = ${fparse end_injection8 + store_time}
start_production9 = ${fparse end_injection9 + store_time}
start_production10 = ${fparse end_injection10 + store_time}
end_production1 = ${fparse start_production1 + produce_time}
end_production2 = ${fparse start_production2 + produce_time}
end_production3 = ${fparse start_production3 + produce_time}
end_production4 = ${fparse start_production4 + produce_time}
end_production5 = ${fparse start_production5 + produce_time}
end_production6 = ${fparse start_production6 + produce_time}
end_production7 = ${fparse start_production7 + produce_time}
end_production8 = ${fparse start_production8 + produce_time}
end_production9 = ${fparse start_production9 + produce_time}
end_production10 = ${fparse start_production10 + produce_time}
synctimes = '${start_injection1} ${end_injection1} ${start_production1} ${end_production1}
${start_injection2} ${end_injection2} ${start_production2} ${end_production2}
${start_injection3} ${end_injection3} ${start_production3} ${end_production3}
${start_injection4} ${end_injection4} ${start_production4} ${end_production4}
${start_injection5} ${end_injection5} ${start_production5} ${end_production5}
${start_injection6} ${end_injection6} ${start_production6} ${end_production6}
${start_injection7} ${end_injection7} ${start_production7} ${end_production7}
${start_injection8} ${end_injection8} ${start_production8} ${end_production8}
${start_injection9} ${end_injection9} ${start_production9} ${end_production9}
${start_injection10} ${end_injection10} ${start_production10} ${end_production10}'
#####################################
# Geometry in RZ coordinates
# borehole radius (m)
bh_r = 0.1
# model radius (m)
max_r = 1000
# aquifer thickness (m)
aq_thickness = 20
# cap thickness (m)
cap_thickness = 40
# injection region top and bottom (m). Note, the mesh is created with the aquifer in y = (-0.5 * aq_thickness, 0.5 * aq_thickness), irrespective of depth (depth only sets the insitu porepressure and temperature)
screen_top = ${fparse 0.5 * aq_thickness}
screen_bottom = ${fparse -0.5 * aq_thickness}
# number of elements in radial direction
num_r = 25
# number of elements across half height of aquifer
num_y_aq = 10
# number of elements across height of cap
num_y_cap = 8
# mesh bias in radial direction
bias_r = 1.22
# mesh bias in vertical direction in aquifer top
bias_y_aq_top = 0.9
# mesh bias in vertical direction in cap top
bias_y_cap_top = 1.3
# mesh bias in vertical direction in aquifer bottom
bias_y_aq_bottom = ${fparse 1.0 / bias_y_aq_top}
# mesh bias in vertical direction in cap bottom
bias_y_cap_bottom = ${fparse 1.0 / bias_y_cap_top}
depth_centre = ${fparse depth + aq_thickness/2}
#####################################
# temperature at ground surface (degC)
temp0 = 20
# Vertical geothermal gradient (K/m). A positive number means temperature increases downwards.
geothermal_gradient = 20E-3
#####################################
# Gravity
gravity = -9.81
#####################################
half_aq_thickness = ${fparse aq_thickness * 0.5}
half_height = ${fparse half_aq_thickness + cap_thickness}
approx_screen_length = ${fparse screen_top - screen_bottom}
# Thermal radius (note this is not strictly correct, it should use the bulk specific heat
# capacity as defined below, but it doesn't matter here because this is purely for
# defining the region of refined mesh)
th_r = ${fparse sqrt(inject_fluid_mass / 1000 * 4.12e6 / (approx_screen_length * 3.1416 * aq_specific_heat_cap * aq_density))}
# radius of fine mesh
fine_r = ${fparse th_r * 2}
bias_r_fine = 1
num_r_fine = ${fparse int(fine_r/1)}
######################################
# aquifer properties
aq_porosity = 0.25
aq_hor_perm = 1E-11 # m^2
aq_ver_perm = 2E-12 # m^2
aq_density = 2650 # kg/m^3
aq_specific_heat_cap = 800 # J/Kg/K
aq_hor_thermal_cond = 3 # W/m/K
aq_ver_thermal_cond = 3 # W/m/K
aq_disp_parallel = 0 # m
aq_disp_perp = 0 # m
# Bulk volumetric heat capacity of aquifer:
aq_vol_cp = ${fparse aq_specific_heat_cap * aq_density * (1 - aq_porosity) + 4180 * 1000 * aq_porosity}
# Thermal radius (correct version using bulk cp):
R_th = ${fparse sqrt(inject_fluid_mass * 4180 / (approx_screen_length * 3.1416 * aq_vol_cp))}
aq_lambda_eff_hor = ${fparse aq_hor_thermal_cond + 0.3 * aq_disp_parallel * R_th * aq_vol_cp / (inject_time * 60 * 60 * 24)}
aq_lambda_eff_ver = ${fparse aq_ver_thermal_cond + 0.3 * aq_disp_perp * R_th * aq_vol_cp / (inject_time * 60 * 60 * 24)}
aq_hor_dry_thermal_cond = ${fparse aq_lambda_eff_hor * 60 * 60 * 24} # J/day/m/K
aq_ver_dry_thermal_cond = ${fparse aq_lambda_eff_ver * 60 * 60 * 24} # J/day/m/K
aq_hor_wet_thermal_cond = ${fparse aq_lambda_eff_hor * 60 * 60 * 24} # J/day/m/K
aq_ver_wet_thermal_cond = ${fparse aq_lambda_eff_ver * 60 * 60 * 24} # J/day/m/K
# cap-rock properties
cap_porosity = 0.25
cap_hor_perm = 1E-16 # m^2
cap_ver_perm = 1E-17 # m^2
cap_density = 2650 # kg/m^3
cap_specific_heat_cap = 800 # J/kg/K
cap_hor_thermal_cond = 3 # W/m/K
cap_ver_thermal_cond = 3 # W/m/K
cap_hor_dry_thermal_cond = ${fparse cap_hor_thermal_cond * 60 * 60 * 24} # J/day/m/K
cap_ver_dry_thermal_cond = ${fparse cap_ver_thermal_cond * 60 * 60 * 24} # J/day/m/K
cap_hor_wet_thermal_cond = ${fparse cap_hor_thermal_cond * 60 * 60 * 24} # J/day/m/K
cap_ver_wet_thermal_cond = ${fparse cap_ver_thermal_cond * 60 * 60 * 24} # J/day/m/K
######################################
[Mesh]
coord_type = RZ
[aq_top_fine]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r_fine}
xmin = ${bh_r}
xmax = ${fine_r}
bias_x = ${bias_r_fine}
bias_y = ${bias_y_aq_top}
ny = ${num_y_aq}
ymin = 0
ymax = ${half_aq_thickness}
[]
[cap_top_fine]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r_fine}
xmin = ${bh_r}
xmax = ${fine_r}
bias_x = ${bias_r_fine}
bias_y = ${bias_y_cap_top}
ny = ${num_y_cap}
ymax = ${half_height}
ymin = ${half_aq_thickness}
[]
[aq_and_cap_top_fine]
type = StitchedMeshGenerator
inputs = 'aq_top_fine cap_top_fine'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'top bottom'
[]
[aq_bottom_fine]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r_fine}
xmin = ${bh_r}
xmax = ${fine_r}
bias_x = ${bias_r_fine}
bias_y = ${bias_y_aq_bottom}
ny = ${num_y_aq}
ymax = 0
ymin = -${half_aq_thickness}
[]
[cap_bottom_fine]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r_fine}
xmin = ${bh_r}
xmax = ${fine_r}
bias_x = ${bias_r_fine}
bias_y = ${bias_y_cap_bottom}
ny = ${num_y_cap}
ymin = -${half_height}
ymax = -${half_aq_thickness}
[]
[aq_and_cap_bottom_fine]
type = StitchedMeshGenerator
inputs = 'aq_bottom_fine cap_bottom_fine'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'bottom top'
[]
[aq_and_cap_fine]
type = StitchedMeshGenerator
inputs = 'aq_and_cap_bottom_fine aq_and_cap_top_fine'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'top bottom'
[]
[aq_top]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r}
xmin = ${fine_r}
xmax = ${max_r}
bias_x = ${bias_r}
bias_y = ${bias_y_aq_top}
ny = ${num_y_aq}
ymin = 0
ymax = ${half_aq_thickness}
[]
[cap_top]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r}
xmin = ${fine_r}
xmax = ${max_r}
bias_x = ${bias_r}
bias_y = ${bias_y_cap_top}
ny = ${num_y_cap}
ymax = ${half_height}
ymin = ${half_aq_thickness}
[]
[aq_and_cap_top]
type = StitchedMeshGenerator
inputs = 'aq_top cap_top'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'top bottom'
[]
[aq_bottom]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r}
xmin = ${fine_r}
xmax = ${max_r}
bias_x = ${bias_r}
bias_y = ${bias_y_aq_bottom}
ny = ${num_y_aq}
ymax = 0
ymin = -${half_aq_thickness}
[]
[cap_bottom]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r}
xmin = ${fine_r}
xmax = ${max_r}
bias_x = ${bias_r}
bias_y = ${bias_y_cap_bottom}
ny = ${num_y_cap}
ymin = -${half_height}
ymax = -${half_aq_thickness}
[]
[aq_and_cap_bottom]
type = StitchedMeshGenerator
inputs = 'aq_bottom cap_bottom'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'bottom top'
[]
[aq_and_cap]
type = StitchedMeshGenerator
inputs = 'aq_and_cap_bottom aq_and_cap_top'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'top bottom'
[]
[aq_and_cap_all]
type = StitchedMeshGenerator
inputs = 'aq_and_cap_fine aq_and_cap'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'right left'
[]
[aquifer]
type = ParsedSubdomainMeshGenerator
input = aq_and_cap_all
combinatorial_geometry = 'y >= -${half_aq_thickness} & y <= ${half_aq_thickness}'
block_id = 1
[]
[top_cap]
type = ParsedSubdomainMeshGenerator
input = aquifer
combinatorial_geometry = 'y >= ${half_aq_thickness}'
block_id = 2
[]
[bottom_cap]
type = ParsedSubdomainMeshGenerator
input = top_cap
combinatorial_geometry = 'y <= -${half_aq_thickness}'
block_id = 3
[]
[injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x<=${bh_r}*1.000001 & y >= ${screen_bottom} & y <= ${screen_top}'
included_subdomains = 1
new_sideset_name = 'injection_area'
input = 'bottom_cap'
[]
[rename]
type = RenameBlockGenerator
old_block = '1 2 3'
new_block = 'aquifer caps caps'
input = 'injection_area'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 ${gravity} 0'
[]
[Variables]
[porepressure]
[]
[temperature]
scaling = 1E-5
[]
[]
[PorousFlowFullySaturated]
coupling_type = ThermoHydro
porepressure = porepressure
temperature = temperature
fp = tabulated_water
stabilization = KT
flux_limiter_type = ${flux_limiter}
use_displaced_mesh = false
temperature_unit = Celsius
pressure_unit = Pa
time_unit = days
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = insitu_pressure
[]
[temperature]
type = FunctionIC
variable = temperature
function = insitu_temperature
[]
[]
[BCs]
[outer_boundary_porepressure]
type = FunctionDirichletBC
preset = true
variable = porepressure
function = insitu_pressure
boundary = 'bottom right top'
[]
[outer_boundary_temperature]
type = FunctionDirichletBC
preset = true
variable = temperature
function = insitu_temperature
boundary = 'bottom right top'
[]
[inject_heat]
type = FunctionDirichletBC
variable = temperature
function = ${inject_temp}
boundary = 'injection_area'
[]
[inject_fluid]
type = PorousFlowSink
variable = porepressure
boundary = injection_area
flux_function = injection_rate_value
[]
[produce_heat]
type = PorousFlowSink
variable = temperature
boundary = injection_area
flux_function = production_rate_value
fluid_phase = 0
use_enthalpy = true
save_in = heat_flux_out
[]
[produce_fluid]
type = PorousFlowSink
variable = porepressure
boundary = injection_area
flux_function = production_rate_value
[]
[]
[Controls]
[inject_on]
type = ConditionalFunctionEnableControl
enable_objects = 'BCs::inject_heat BCs::inject_fluid'
conditional_function = inject
implicit = false
execute_on = 'initial timestep_begin'
[]
[produce_on]
type = ConditionalFunctionEnableControl
enable_objects = 'BCs::produce_heat BCs::produce_fluid'
conditional_function = produce
implicit = false
execute_on = 'initial timestep_begin'
[]
[]
[Functions]
[insitu_pressure]
type = ParsedFunction
expression = '(y - ${depth_centre}) * 1000 * ${gravity} + 1E5' # approx insitu pressure in Pa
[]
[insitu_temperature]
type = ParsedFunction
expression = '${temp0} + (${depth_centre} - y) * ${geothermal_gradient}'
[]
[inject]
type = ParsedFunction
expression = 'if(t >= ${start_injection1} & t < ${end_injection1}, 1,
if(t >= ${start_injection2} & t < ${end_injection2}, 1,
if(t >= ${start_injection3} & t < ${end_injection3}, 1,
if(t >= ${start_injection4} & t < ${end_injection4}, 1,
if(t >= ${start_injection5} & t < ${end_injection5}, 1,
if(t >= ${start_injection6} & t < ${end_injection6}, 1,
if(t >= ${start_injection7} & t < ${end_injection7}, 1,
if(t >= ${start_injection8} & t < ${end_injection8}, 1,
if(t >= ${start_injection9} & t < ${end_injection9}, 1,
if(t >= ${start_injection10} & t < ${end_injection10}, 1, 0))))))))))'
[]
[produce]
type = ParsedFunction
expression = 'if(t >= ${start_production1} & t < ${end_production1}, 1,
if(t >= ${start_production2} & t < ${end_production2}, 1,
if(t >= ${start_production3} & t < ${end_production3}, 1,
if(t >= ${start_production4} & t < ${end_production4}, 1,
if(t >= ${start_production5} & t < ${end_production5}, 1,
if(t >= ${start_production6} & t < ${end_production6}, 1,
if(t >= ${start_production7} & t < ${end_production7}, 1,
if(t >= ${start_production8} & t < ${end_production8}, 1,
if(t >= ${start_production9} & t < ${end_production9}, 1,
if(t >= ${start_production10} & t < ${end_production10}, 1, 0))))))))))'
[]
[injection_rate_value]
type = ParsedFunction
symbol_names = true_screen_area
symbol_values = true_screen_area
expression = '-${inject_fluid_mass}/(true_screen_area * ${inject_time})'
[]
[production_rate_value]
type = ParsedFunction
symbol_names = true_screen_area
symbol_values = true_screen_area
expression = '${produce_fluid_mass}/(true_screen_area * ${produce_time})'
[]
[heat_out_in_timestep]
type = ParsedFunction
symbol_names = 'dt heat_out'
symbol_values = 'dt heat_out_fromBC'
expression = 'dt*heat_out'
[]
[produced_T_time_integrated]
type = ParsedFunction
symbol_names = 'dt produced_T'
symbol_values = 'dt produced_T'
expression = 'dt*produced_T / ${produce_time}'
[]
[]
[AuxVariables]
[density]
family = MONOMIAL
order = CONSTANT
[]
[porosity]
family = MONOMIAL
order = CONSTANT
[]
[heat_flux_out]
outputs = none
[]
[]
[AuxKernels]
[density]
type = PorousFlowPropertyAux
variable = density
property = density
[]
[porosity]
type = PorousFlowPropertyAux
variable = porosity
property = porosity
[]
[]
[FluidProperties]
[true_water]
type = Water97FluidProperties
[]
[tabulated_water]
type = TabulatedFluidProperties
fp = true_water
temperature_min = 275 # K
temperature_max = 600
interpolated_properties = 'density viscosity enthalpy internal_energy'
fluid_property_file = water97_tabulated_modified.csv
[]
[]
[Materials]
[porosity_aq]
type = PorousFlowPorosityConst
porosity = ${aq_porosity}
block = aquifer
[]
[porosity_caps]
type = PorousFlowPorosityConst
porosity = ${cap_porosity}
block = caps
[]
[permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '${aq_hor_perm} 0 0 0 ${aq_ver_perm} 0 0 0 0'
[]
[permeability_caps]
type = PorousFlowPermeabilityConst
block = caps
permeability = '${cap_hor_perm} 0 0 0 ${cap_ver_perm} 0 0 0 0'
[]
[aq_internal_energy]
type = PorousFlowMatrixInternalEnergy
block = aquifer
density = ${aq_density}
specific_heat_capacity = ${aq_specific_heat_cap}
[]
[caps_internal_energy]
type = PorousFlowMatrixInternalEnergy
block = caps
density = ${cap_density}
specific_heat_capacity = ${cap_specific_heat_cap}
[]
[aq_thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
block = aquifer
dry_thermal_conductivity = '${aq_hor_dry_thermal_cond} 0 0 0 ${aq_ver_dry_thermal_cond} 0 0 0 0'
wet_thermal_conductivity = '${aq_hor_wet_thermal_cond} 0 0 0 ${aq_ver_wet_thermal_cond} 0 0 0 0'
[]
[caps_thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
block = caps
dry_thermal_conductivity = '${cap_hor_dry_thermal_cond} 0 0 0 ${cap_ver_dry_thermal_cond} 0 0 0 0'
wet_thermal_conductivity = '${cap_hor_wet_thermal_cond} 0 0 0 ${cap_ver_wet_thermal_cond} 0 0 0 0'
[]
[]
[Postprocessors]
[true_screen_area] # this accounts for meshes that do not match screen_top and screen_bottom exactly
type = AreaPostprocessor
boundary = injection_area
execute_on = 'initial'
outputs = 'none'
[]
[dt]
type = TimestepSize
[]
[heat_out_fromBC]
type = NodalSum
variable = heat_flux_out
boundary = injection_area
execute_on = 'initial timestep_end'
outputs = 'none'
[]
[heat_out_per_timestep]
type = FunctionValuePostprocessor
function = heat_out_in_timestep
execute_on = 'timestep_end'
outputs = 'none'
[]
[heat_out_cumulative]
type = CumulativeValuePostprocessor
postprocessor = heat_out_per_timestep
execute_on = 'timestep_end'
outputs = 'csv console'
[]
[produced_T]
type = SideAverageValue
boundary = injection_area
variable = temperature
execute_on = 'initial timestep_end'
outputs = 'csv console'
[]
[produced_T_time_integrated]
type = FunctionValuePostprocessor
function = produced_T_time_integrated
execute_on = 'timestep_end'
outputs = 'none'
[]
[produced_T_cumulative]
type = CumulativeValuePostprocessor
postprocessor = produced_T_time_integrated
execute_on = 'timestep_end'
outputs = 'csv console'
[]
[]
[Preconditioning]
[basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = ${end_simulation}
timestep_tolerance = 1e-5
[TimeStepper]
type = IterationAdaptiveDT
dt = 1e-3
growth_factor = 2
[]
dtmax = 1
dtmin = 1e-5
# rough calc for fluid, |R| ~ V*k*1E6 ~ V*1E-5
# rough calc for heat, |R| ~ V*(lam*1E-3 + h*1E-5) ~ V*(1E3 + 1E-2)
# so scale heat by 1E-7 and go for nl_abs_tol = 1E-4, which should give a max error of
# ~1Pa and ~0.1K in the first metre around the borehole
nl_abs_tol = 1E-4
nl_rel_tol = 1E-5
[]
[Outputs]
sync_times = ${synctimes}
[ex]
type = Exodus
time_step_interval = 20
[]
[csv]
type = CSV
execute_postprocessors_on = 'initial timestep_end'
[]
[]
(modules/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
(modules/porous_flow/test/tests/dirackernels/bh_except10.i)
# PorousFlowPeacemanBorehole exception test
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = 1E7
[]
[]
[Kernels]
[mass0]
type = TimeDerivative
variable = pp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
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
compute_internal_energy = false
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[DiracKernels]
[bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
point_file = bh02.bh
use_mobility = true
use_internal_energy = true
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[]
[]
[Postprocessors]
[bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[]
[fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[]
[fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[]
[zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[]
[p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[]
[]
[Functions]
[mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[]
[]
[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 = 0.5
dt = 1E-2
solve_type = NEWTON
[]
(modules/solid_mechanics/test/tests/porosity/ad.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Problem]
solve = false
[]
[Functions]
[volumetric]
type = ParsedFunction
expression = t
[]
[exact]
type = ParsedFunction
symbol_names = 'f'
symbol_values = 'porosity_old'
expression = '(1 - f) * 3e-3 + f'
[]
[]
[Materials]
[porosity]
type = ADPorosityFromStrain
initial_porosity = 0
inelastic_strain = strain
outputs = all
[]
[strain]
type = ADGenericFunctionRankTwoTensor
tensor_name = strain
tensor_functions = 'volumetric'
outputs = all
[]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 1e-3
[]
[Postprocessors]
[porosity]
type = ElementAverageValue
variable = porosity
execute_on = 'initial timestep_end'
[]
[porosity_old]
type = ElementAverageValue
variable = porosity
execute_on = 'initial timestep_begin'
outputs = none
[]
[exact]
type = FunctionValuePostprocessor
function = exact
[]
[00]
type = ElementAverageValue
variable = strain_00
execute_on = 'initial timestep_end'
[]
[11]
type = ElementAverageValue
variable = strain_11
execute_on = 'initial timestep_end'
[]
[22]
type = ElementAverageValue
variable = strain_22
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
csv = true
[]
(modules/porous_flow/test/tests/gravity/fully_saturated_grav01a.i)
# Checking that gravity head is established
# 1phase, constant fluid-bulk, constant viscosity, constant permeability
# fully saturated
# For better agreement with the analytical solution (ana_pp), just increase nx
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = -1
xmax = 0
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[InitialCondition]
type = RandomIC
min = 0
max = 1
[]
[]
[]
[Kernels]
[flux0]
type = PorousFlowFullySaturatedDarcyBase
variable = pp
gravity = '-1 0 0'
[]
[]
[Functions]
[ana_pp]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 1.2 0 1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[]
[BCs]
[z]
type = DirichletBC
variable = pp
boundary = right
value = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.2
density0 = 1
viscosity = 1
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[]
[Postprocessors]
[pp_base]
type = PointValue
variable = pp
point = '-1 0 0'
[]
[pp_analytical]
type = FunctionValuePostprocessor
function = ana_pp
point = '-1 0 0'
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Outputs]
execute_on = 'timestep_end'
file_base = fully_saturated_grav01a
[csv]
type = CSV
[]
[]
(modules/porous_flow/test/tests/sinks/s07.i)
# apply a sink flux on just one component of a 3-component system and observe the correct behavior
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 2
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp frac0 frac1'
number_fluid_phases = 1
number_fluid_components = 3
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1.1
[]
[]
[Variables]
[pp]
[]
[frac0]
initial_condition = 0.1
[]
[frac1]
initial_condition = 0.6
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = y
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = frac0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = frac1
[]
[mass2]
type = PorousFlowMassTimeDerivative
fluid_component = 2
variable = pp
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.3
density0 = 1.1
thermal_expansion = 0
viscosity = 1.1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'frac0 frac1'
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0.2 0 0 0 0.1 0 0 0 0.1'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[AuxVariables]
[flux_out]
[]
[]
[Functions]
[mass1_00]
type = ParsedFunction
expression = 'frac*vol*por*dens0*exp(pp/bulk)*pow(1+pow(-al*pp,1.0/(1-m)),-m)'
symbol_names = 'frac vol por dens0 pp bulk al m'
symbol_values = 'f1_00 0.25 0.1 1.1 p00 1.3 1.1 0.5'
[]
[expected_mass_change1_00]
type = ParsedFunction
expression = 'frac*fcn*area*dt'
symbol_names = 'frac fcn area dt'
symbol_values = 'f1_00 6 0.5 1E-3'
[]
[mass1_00_expect]
type = ParsedFunction
expression = 'mass_prev-mass_change'
symbol_names = 'mass_prev mass_change'
symbol_values = 'm1_00_prev del_m1_00'
[]
[mass1_01]
type = ParsedFunction
expression = 'frac*vol*por*dens0*exp(pp/bulk)*pow(1+pow(-al*pp,1.0/(1-m)),-m)'
symbol_names = 'frac vol por dens0 pp bulk al m'
symbol_values = 'f1_01 0.25 0.1 1.1 p01 1.3 1.1 0.5'
[]
[expected_mass_change1_01]
type = ParsedFunction
expression = 'frac*fcn*area*dt'
symbol_names = 'frac fcn area dt'
symbol_values = 'f1_01 6 0.5 1E-3'
[]
[mass1_01_expect]
type = ParsedFunction
expression = 'mass_prev-mass_change'
symbol_names = 'mass_prev mass_change'
symbol_values = 'm1_01_prev del_m1_01'
[]
[]
[Postprocessors]
[f1_00]
type = PointValue
point = '0 0 0'
variable = frac1
execute_on = 'initial timestep_end'
[]
[flux_00]
type = PointValue
point = '0 0 0'
variable = flux_out
execute_on = 'initial timestep_end'
[]
[p00]
type = PointValue
point = '0 0 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[m1_00]
type = FunctionValuePostprocessor
function = mass1_00
execute_on = 'initial timestep_end'
[]
[m1_00_prev]
type = FunctionValuePostprocessor
function = mass1_00
execute_on = 'timestep_begin'
outputs = 'console'
[]
[del_m1_00]
type = FunctionValuePostprocessor
function = expected_mass_change1_00
execute_on = 'timestep_end'
outputs = 'console'
[]
[m1_00_expect]
type = FunctionValuePostprocessor
function = mass1_00_expect
execute_on = 'timestep_end'
[]
[f1_01]
type = PointValue
point = '0 1 0'
variable = frac1
execute_on = 'initial timestep_end'
[]
[flux_01]
type = PointValue
point = '0 1 0'
variable = flux_out
execute_on = 'initial timestep_end'
[]
[p01]
type = PointValue
point = '0 1 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[m1_01]
type = FunctionValuePostprocessor
function = mass1_01
execute_on = 'initial timestep_end'
[]
[m1_01_prev]
type = FunctionValuePostprocessor
function = mass1_01
execute_on = 'timestep_begin'
outputs = 'console'
[]
[del_m1_01]
type = FunctionValuePostprocessor
function = expected_mass_change1_01
execute_on = 'timestep_end'
outputs = 'console'
[]
[m1_01_expect]
type = FunctionValuePostprocessor
function = mass1_01_expect
execute_on = 'timestep_end'
[]
[f1_11]
type = PointValue
point = '1 1 0'
variable = frac1
execute_on = 'initial timestep_end'
[]
[flux_11]
type = PointValue
point = '1 1 0'
variable = flux_out
execute_on = 'initial timestep_end'
[]
[p11]
type = PointValue
point = '1 1 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[]
[BCs]
[flux]
type = PorousFlowSink
boundary = 'left'
variable = frac1
use_mobility = false
use_relperm = false
mass_fraction_component = 1
fluid_phase = 0
flux_function = 6
save_in = flux_out
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -snes_max_it -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu 10 NONZERO 2'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E-3
end_time = 0.01
nl_rel_tol = 1E-12
nl_abs_tol = 1E-12
[]
[Outputs]
file_base = s07
[console]
type = Console
execute_on = 'nonlinear linear'
[]
[csv]
type = CSV
execute_on = 'timestep_end'
[]
[]
(modules/combined/examples/stochastic/graphite_ring_thermomechanics.i)
# Generate 1/4 of a 2-ring disk and extrude it by half to obtain
# 1/8 of a 3D tube. Mirror boundary conditions will exist on the
# cut portions.
[Mesh]
[disk]
type = ConcentricCircleMeshGenerator
num_sectors = 10
radii = '1.0 1.1 1.2'
rings = '1 1 1'
has_outer_square = false
preserve_volumes = false
portion = top_right
[]
[ring]
type = BlockDeletionGenerator
input = disk
block = 1
new_boundary = 'inner'
[]
[cylinder]
type = MeshExtruderGenerator
input = ring
extrusion_vector = '0 0 1.5'
num_layers = 15
bottom_sideset = 'back'
top_sideset = 'front'
[]
[]
[Variables]
[T]
initial_condition = 300
[]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Kernels]
[hc]
type = HeatConduction
variable = T
[]
[TensorMechanics]
displacements = 'disp_x disp_y disp_z'
[]
[]
[BCs]
[temp_inner]
type = FunctionNeumannBC
variable = T
boundary = 'inner'
function = surface_source
[]
[temp_front]
type = ConvectiveHeatFluxBC
variable = T
boundary = 'front'
T_infinity = 300
heat_transfer_coefficient = 10
[]
[temp_outer]
type = ConvectiveHeatFluxBC
variable = T
boundary = 'outer'
T_infinity = 300
heat_transfer_coefficient = 10
[]
# mirror boundary conditions.
[disp_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0.0
[]
[disp_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0.0
[]
[disp_z]
type = DirichletBC
variable = disp_z
boundary = 'back'
value = 0.0
[]
[]
[Materials]
[cond_inner]
type = GenericConstantMaterial
block = 2
prop_names = thermal_conductivity
prop_values = 25
[]
[cond_outer]
type = GenericConstantMaterial
block = 3
prop_names = thermal_conductivity
prop_values = 100
[]
[elasticity_tensor_inner]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
block = 2
[]
[elasticity_tensor_outer]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 3.1e5
poissons_ratio = 0.2
block = 3
[]
[thermal_strain_inner]
type = ComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 2e-6
temperature = T
stress_free_temperature = 300
eigenstrain_name = eigenstrain_inner
block = 2
[]
[thermal_strain_outer]
type = ComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 1e-6
temperature = T
stress_free_temperature = 300
eigenstrain_name = eigenstrain_outer
block = 3
[]
[strain_inner] #We use small deformation mechanics
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
eigenstrain_names = 'eigenstrain_inner'
block = 2
[]
[strain_outer] #We use small deformation mechanics
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
eigenstrain_names = 'eigenstrain_outer'
block = 3
[]
[stress] #We use linear elasticity
type = ComputeLinearElasticStress
[]
[]
[Functions]
[surface_source]
type = ParsedFunction
expression = 'Q_t*pi/2.0/3.0 * cos(pi/3.0*z)'
symbol_names = 'Q_t'
symbol_values = heat_source
[]
[]
[Executioner]
type = Steady
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 101'
l_max_its = 30
nl_max_its = 100
nl_abs_tol = 1e-9
l_tol = 1e-04
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[VectorPostprocessors]
[temp_center]
type = LineValueSampler
variable = T
start_point = '1 0 0'
end_point = '1.2 0 0'
num_points = 11
sort_by = 'x'
[]
[temp_end]
type = LineValueSampler
variable = T
start_point = '1 0 1.5'
end_point = '1.2 0 1.5'
num_points = 11
sort_by = 'x'
[]
[dispx_center]
type = LineValueSampler
variable = disp_x
start_point = '1 0 0'
end_point = '1.2 0 0'
num_points = 11
sort_by = 'x'
[]
[dispx_end]
type = LineValueSampler
variable = disp_x
start_point = '1 0 1.5'
end_point = '1.2 0 1.5'
num_points = 11
sort_by = 'x'
[]
[dispz_end]
type = LineValueSampler
variable = disp_z
start_point = '1 0 1.5'
end_point = '1.2 0 1.5'
num_points = 11
sort_by = 'x'
[]
[]
[Postprocessors]
[heat_source]
type = FunctionValuePostprocessor
function = 1
scale_factor = 10000
execute_on = linear
[]
[temp_center_inner]
type = PointValue
variable = T
point = '1 0 0'
[]
[temp_center_outer]
type = PointValue
variable = T
point = '1.2 0 0'
[]
[temp_end_inner]
type = PointValue
variable = T
point = '1 0 1.5'
[]
[temp_end_outer]
type = PointValue
variable = T
point = '1.2 0 1.5'
[]
[dispx_center_inner]
type = PointValue
variable = disp_x
point = '1 0 0'
[]
[dispx_center_outer]
type = PointValue
variable = disp_x
point = '1.2 0 0'
[]
[dispx_end_inner]
type = PointValue
variable = disp_x
point = '1 0 1.5'
[]
[dispx_end_outer]
type = PointValue
variable = disp_x
point = '1.2 0 1.5'
[]
[dispz_inner]
type = PointValue
variable = disp_z
point = '1 0 1.5'
[]
[dispz_outer]
type = PointValue
variable = disp_z
point = '1.2 0 1.5'
[]
[]
[Outputs]
exodus = false
csv = false
[]
(modules/porous_flow/test/tests/dirackernels/bh_except05.i)
# PorousFlowPeacemanBorehole exception test
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = 1E7
[]
[]
[Kernels]
[mass0]
type = TimeDerivative
variable = pp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
density0 = 1000
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[DiracKernels]
[bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
mass_fraction_component = 0
point_file = bh02.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[]
[]
[Postprocessors]
[bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[]
[fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[]
[fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[]
[zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[]
[p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[]
[]
[Functions]
[mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[]
[]
[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 = 0.5
dt = 1E-2
solve_type = NEWTON
[]
(modules/richards/test/tests/sinks/s02.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[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]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_pressure
[../]
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 2
[../]
[./mass_bal_fcn]
type = ParsedFunction
expression = abs((mi-lfout-rfout-mf)/2/(mi+mf))
symbol_names = 'mi mf lfout rfout'
symbol_values = 'mass_init mass_fin left_flux_out right_flux_out'
[../]
[]
[Postprocessors]
[./mass_init]
type = RichardsMass
variable = pressure
execute_on = timestep_begin
[../]
[./mass_fin]
type = RichardsMass
variable = pressure
execute_on = timestep_end
[../]
[./left_flux_out]
type = RichardsHalfGaussianSinkFlux
boundary = left
variable = pressure
centre = 1
max = 2
sd = 1
[../]
[./right_flux_out]
type = RichardsHalfGaussianSinkFlux
boundary = right
variable = pressure
centre = 1
max = 2
sd = 1
[../]
[./p0]
type = PointValue
point = '0 0 0'
variable = pressure
[../]
[./mass_bal]
type = FunctionValuePostprocessor
function = mass_bal_fcn
[../]
[]
[BCs]
[./left_flux]
type = RichardsHalfGaussianSink
boundary = left
variable = pressure
centre = 1
max = 2
sd = 1
[../]
[./right_flux]
type = RichardsHalfGaussianSink
boundary = right
variable = pressure
centre = 1
max = 2
sd = 1
[../]
[]
[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'
density_UO = DensityConstBulk
relperm_UO = RelPermPower
SUPG_UO = SUPGstandard
sat_UO = Saturation
seff_UO = SeffVG
viscosity = 1E-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-12 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 4E-3
end_time = 0.4
[]
[Outputs]
file_base = s02
csv = true
execute_on = timestep_end
[]
(modules/thermal_hydraulics/test/tests/controls/get_function_value_control/test.i)
# This is testing that the values obtained by GetFunctionValueControl are used.
# Function T0_fn prescribes values for T_inlet_fn control. We output the function
# values via a postprocessor `T_fn` and the control data values via another
# postprocessor `T_ctrl`. Those two values have to be equal.
[GlobalParams]
initial_p = 100.e3
initial_vel = 1.0
initial_T = 350.
scaling_factor_1phase = '1 1e-2 1e-4'
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
fp = fp
position = '0 0 0'
orientation = '1 0 0'
length = 15.0
n_elems = 10
A = 0.01
D_h = 0.1
f = 0.01
[]
[inlet]
type = InletStagnationPressureTemperature1Phase
input = 'pipe1:in'
p0 = 100.e3
T0 = 350.
[]
[outlet]
type = Outlet1Phase
input = 'pipe1:out'
p = 100.0e3
[]
[]
[Functions]
[T0_fn]
type = PiecewiseLinear
x = '0 1'
y = '350 345'
[]
[]
[ControlLogic]
[T_inlet_fn]
type = GetFunctionValueControl
function = T0_fn
[]
[]
[Postprocessors]
[T_fn]
type = FunctionValuePostprocessor
function = T0_fn
[]
[T_ctrl]
type = RealControlDataValuePostprocessor
control_data_name = T_inlet_fn:value
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
dt = 0.1
abort_on_solve_fail = true
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
nl_max_its = 20
l_tol = 1e-3
l_max_its = 5
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
start_time = 0.0
end_time = 1
[]
[Outputs]
csv = true
[]
(modules/richards/test/tests/excav/ex01.i)
###########################################
# #
# THIS EXAMPLE CONTAINS AN EXCAVATION #
# #
###########################################
# Easiest way of figuring out what's happening:
# Run this example, load into paraview, take
# a slice through (0,0,0) with normal (0,0,1),
# colour by pressure and play the animation.
# This mesh has an interior sideset called excav_bdy
[Mesh]
type = FileMesh
file = ex01_input.e
[]
# This is a boundary condition acting on excav_bdy
# All it does is to set the pressure to p_excav=0
# at places on excav_bdy wherever excav_fcn tells it to.
[BCs]
[./excav_bdy]
type = RichardsExcav
boundary = excav_bdy
p_excav = 0.0
variable = pressure
excav_geom_function = excav_fcn
[../]
[]
[Functions]
# excav_fcn controls where to set pressure=p_excav
# You supply start and end positions and times and
# by a linear interpolation these define the position
# of the coal face at all times
[./excav_fcn]
type = RichardsExcavGeom
start_posn = '0 -500 0'
start_time = 0
end_posn = '0 -300 0'
end_time = 6E6
active_length = 1E4
[../]
# mass_bal_fcn calculates the mass balance
[./mass_bal_fcn]
type = ParsedFunction
expression = abs((mi-fout-mf)/2/(mi+mf))
symbol_names = 'mi mf fout'
symbol_values = 'mass_init mass_final flux_out'
[../]
# initial pressure - unimportant in this example
[./initial_pressure]
type = ParsedFunction
expression = -10000*(z-100)
[../]
[]
# following is needed by postprocessors, kernels, etc
# unimportant in this example
[GlobalParams]
richardsVarNames_UO = PPNames
[]
# following does the calculation of relevant
# masses and mass-flux to the excavation
[Postprocessors]
# note that this is calculated at beginning of timestep
[./mass_init]
type = RichardsMass
variable = pressure
execute_on = 'initial timestep_begin'
[../]
# note this is calculated at end of timestep
[./mass_final]
type = RichardsMass
variable = pressure
execute_on = timestep_end
[../]
# this is what calculates the mass flux to the excavation
# it is calculating it for boundary=excav_bdy, and the
# excavation time-dependence is set through the excav_fcn
[./flux_out]
type = RichardsExcavFlow
boundary = excav_bdy
variable = pressure
excav_geom_function = excav_fcn
[../]
# mass_bal just outputs the result to screen
[./mass_bal]
type = FunctionValuePostprocessor
function = mass_bal_fcn
[../]
[]
######################################
# #
# THE FOLLOWING STUFF IS STANDARD #
# #
######################################
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./Seff1VG]
type = RichardsSeff1VG
m = 0.8
al = 1E-5
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0
sum_s_res = 0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E+2
[../]
[]
[Variables]
active = 'pressure'
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./p_ic]
type = FunctionIC
variable = pressure
function = initial_pressure
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
variable = pressure
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = '1 2 3 4'
viscosity = 1E-3
mat_porosity = 0.1
mat_permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-15'
density_UO = DensityConstBulk
relperm_UO = RelPermPower
sat_UO = Saturation
seff_UO = Seff1VG
SUPG_UO = SUPGstandard
gravity = '0 0 -10'
linear_shape_fcns = true
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = Seff1VG
pressure_vars = pressure
[../]
[]
[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-13 1E-14 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 6E6
dt = 3E6
solve_type = NEWTON
[]
[Outputs]
file_base = ex01
exodus = true
[]
(modules/porous_flow/test/tests/gravity/grav02b_fv.i)
# Checking that gravity head is established in the steady-state situation when 0<saturation<1 (note the strictly less-than).
# 2phase (PP), 2components, vanGenuchten, constant fluid bulk-moduli for each phase, constant viscosity, constant permeability, Corey relative perm
# For better agreement with the analytical solution (ana_pp), just increase nx
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = -1
xmax = 0
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
type = MooseVariableFVReal
initial_condition = -1.0
[]
[ppgas]
type = MooseVariableFVReal
initial_condition = 0
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
type = MooseVariableFVReal
initial_condition = 1
[]
[massfrac_ph1_sp0]
type = MooseVariableFVReal
initial_condition = 0
[]
[]
[FVKernels]
[flux0]
type = FVPorousFlowAdvectiveFlux
fluid_component = 0
variable = ppwater
gravity = '-1 0 0'
[]
[flux1]
type = FVPorousFlowAdvectiveFlux
fluid_component = 1
variable = ppgas
gravity = '-1 0 0'
[]
[]
[FVBCs]
[ppwater]
type = FVDirichletBC
boundary = right
variable = ppwater
value = -1
[]
[ppgas]
type = FVDirichletBC
boundary = right
variable = ppgas
value = 0
[]
[]
[Functions]
[ana_ppwater]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 2 pp_water_top 1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[ana_ppgas]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 1 pp_gas_top 0.1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 2
density0 = 1
viscosity = 1
thermal_expansion = 0
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 0.1
viscosity = 0.5
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = ADPorousFlowTemperature
[]
[ppss]
type = ADPorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
capillary_pressure = pc
[]
[massfrac]
type = ADPorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = ADPorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = ADPorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[permeability]
type = ADPorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm_water]
type = ADPorousFlowRelativePermeabilityCorey
n = 1
phase = 0
[]
[relperm_gas]
type = ADPorousFlowRelativePermeabilityCorey
n = 1
phase = 1
[]
[]
[Postprocessors]
[pp_water_top]
type = PointValue
variable = ppwater
point = '0 0 0'
[]
[pp_water_base]
type = PointValue
variable = ppwater
point = '-1 0 0'
[]
[pp_water_analytical]
type = FunctionValuePostprocessor
function = ana_ppwater
point = '-1 0 0'
[]
[pp_gas_top]
type = PointValue
variable = ppgas
point = '0 0 0'
[]
[pp_gas_base]
type = PointValue
variable = ppgas
point = '-1 0 0'
[]
[pp_gas_analytical]
type = FunctionValuePostprocessor
function = ana_ppgas
point = '-1 0 0'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Outputs]
[csv]
type = CSV
[]
[]
(modules/fluid_properties/test/tests/functions/saturation_pressure_function/saturation_pressure_function.i)
# TestTwoPhaseFluidProperties has the following saturation pressure function:
# p_sat(p) = 3 T
# Thus for T = 5, p_sat should be 15.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[FluidProperties]
[./fp_liquid]
type = IdealGasFluidProperties
[../]
[./fp_vapor]
type = IdealGasFluidProperties
[../]
[./fp_2phase]
type = TestTwoPhaseFluidProperties
fp_liquid = fp_liquid
fp_vapor = fp_vapor
[../]
[]
[Functions]
[./T]
type = ConstantFunction
value = 5
[../]
[./p_sat]
type = SaturationPressureFunction
T = T
fp_2phase = fp_2phase
[../]
[]
[Postprocessors]
[./p_sat_pp]
type = FunctionValuePostprocessor
function = p_sat
execute_on = 'INITIAL'
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(modules/porous_flow/test/tests/gravity/grav02a.i)
# Checking that gravity head is established in the transient situation when 0<saturation<1 (note the strictly less-than).
# 2phase (PP), 2components, vanGenuchten, constant fluid bulk-moduli for each phase, constant viscosity, constant permeability, Corey relative perm
# For better agreement with the analytical solution (ana_pp), just increase nx
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = -1
xmax = 0
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
initial_condition = -1.0
[]
[ppgas]
initial_condition = 0
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = ppwater
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = ppwater
gravity = '-1 0 0'
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = ppgas
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = ppgas
gravity = '-1 0 0'
[]
[]
[Functions]
[ana_ppwater]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 2 pp_water_top 1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[ana_ppgas]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 1 pp_gas_top 0.1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 2
density0 = 1
viscosity = 1
thermal_expansion = 0
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 0.1
viscosity = 0.5
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
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
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 0
[]
[relperm_gas]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 1
[]
[]
[Postprocessors]
[pp_water_top]
type = PointValue
variable = ppwater
point = '0 0 0'
[]
[pp_water_base]
type = PointValue
variable = ppwater
point = '-1 0 0'
[]
[pp_water_analytical]
type = FunctionValuePostprocessor
function = ana_ppwater
point = '-1 0 0'
[]
[pp_gas_top]
type = PointValue
variable = ppgas
point = '0 0 0'
[]
[pp_gas_base]
type = PointValue
variable = ppgas
point = '-1 0 0'
[]
[pp_gas_analytical]
type = FunctionValuePostprocessor
function = ana_ppgas
point = '-1 0 0'
[]
[mass_ph0]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'initial timestep_end'
[]
[mass_ph1]
type = PorousFlowFluidMass
fluid_component = 1
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.1
end_time = 1.0
nl_rel_tol = 1E-10
nl_abs_tol = 1E-12
[]
[Outputs]
[csv]
type = CSV
file_base = grav02a
execute_on = 'initial final'
[]
[]
(modules/richards/test/tests/excav/ex02.i)
###########################################
# #
# THIS EXAMPLE CONTAINS AN EXCAVATION #
# #
###########################################
# Easiest way of figuring out what's happening:
# Run this example, load into paraview, take
# a slice through (0,0,0) with normal (0,0,1),
# colour by pressure and play the animation.
# This mesh has an interior sideset called excav_bdy
[Mesh]
type = FileMesh
file = ex01_input.e
[]
# This is a boundary condition acting on excav_bdy
# All it does is to set the pressure to p_excav=0
# at places on excav_bdy wherever excav_fcn tells it to.
[BCs]
[./excav_bdy]
type = RichardsExcav
boundary = excav_bdy
p_excav = 0.0
variable = pressure
excav_geom_function = excav_fcn
[../]
[]
[Functions]
# excav_fcn controls where to set pressure=p_excav
# You supply start and end positions and times and
# by a linear interpolation these define the position
# of the coal face at all times
[./excav_fcn]
type = RichardsExcavGeom
start_posn = '0 -500 0'
start_time = 0
end_posn = '0 500 0'
end_time = 3E7
active_length = 1E4
[../]
# mass_bal_fcn calculates the mass balance
[./mass_bal_fcn]
type = ParsedFunction
expression = abs((mi-fout-mf)/2/(mi+mf))
symbol_names = 'mi mf fout'
symbol_values = 'mass_init mass_final flux_out'
[../]
# initial pressure - unimportant in this example
[./initial_pressure]
type = ParsedFunction
expression = -10000*(z-100)
[../]
[]
# following is needed by postprocessors, kernels, etc
# unimportant in this example
[GlobalParams]
richardsVarNames_UO = PPNames
[]
# following does the calculation of relevant
# masses and mass-flux to the excavation
[Postprocessors]
# note that this is calculated at beginning of timestep
[./mass_init]
type = RichardsMass
variable = pressure
execute_on = timestep_begin
[../]
# note this is calculated at end of timestep
[./mass_final]
type = RichardsMass
variable = pressure
execute_on = timestep_end
[../]
# this is what calculates the mass flux to the excavation
# it is calculating it for boundary=excav_bdy, and the
# excavation time-dependence is set through the excav_fcn
[./flux_out]
type = RichardsExcavFlow
boundary = excav_bdy
variable = pressure
excav_geom_function = excav_fcn
[../]
# mass_bal just outputs the result to screen
[./mass_bal]
type = FunctionValuePostprocessor
function = mass_bal_fcn
[../]
[]
######################################
# #
# THE FOLLOWING STUFF IS STANDARD #
# #
######################################
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./Seff1VG]
type = RichardsSeff1VG
m = 0.8
al = 1E-5
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0
sum_s_res = 0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E+2
[../]
[]
[Variables]
active = 'pressure'
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./p_ic]
type = FunctionIC
variable = pressure
function = initial_pressure
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
variable = pressure
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = '1 2 3 4'
viscosity = 1E-3
mat_porosity = 0.1
mat_permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-15'
density_UO = DensityConstBulk
relperm_UO = RelPermPower
sat_UO = Saturation
seff_UO = Seff1VG
SUPG_UO = SUPGstandard
gravity = '0 0 -10'
linear_shape_fcns = true
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = Seff1VG
pressure_vars = pressure
[../]
[]
[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 = 3E7
dt = 1E6
solve_type = NEWTON
[]
[Outputs]
execute_on = 'timestep_end'
file_base = ex02
exodus = true
[]
(modules/porous_flow/test/tests/hysteresis/2phasePS_2.i)
# Simple example of a 2-phase situation with hysteretic capillary pressure. Gas is added to, removed from, and added to the system in order to observe the hysteresis
# All liquid water exists in component 0
# All gas exists in component 1
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
number_fluid_phases = 2
number_fluid_components = 2
porous_flow_vars = 'pp0 sat1'
[]
[]
[Variables]
[pp0]
[]
[sat1]
initial_condition = 0
[]
[]
[Kernels]
[mass_conservation0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp0
[]
[mass_conservation1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = sat1
[]
[]
[DiracKernels]
[pump]
type = PorousFlowPointSourceFromPostprocessor
mass_flux = flux
point = '0.5 0 0'
variable = sat1
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[sat0]
family = MONOMIAL
order = CONSTANT
[]
[pp1]
family = MONOMIAL
order = CONSTANT
[]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[sat0]
type = PorousFlowPropertyAux
variable = sat0
phase = 0
property = saturation
[]
[pp1]
type = PorousFlowPropertyAux
variable = pp1
phase = 1
property = pressure
[]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[]
[FluidProperties]
[simple_fluid] # same properties used for both phases
type = SimpleFluidProperties
bulk_modulus = 10 # so pumping does not result in excessive porepressure
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[temperature]
type = PorousFlowTemperature
temperature = 20
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 1
[]
[hys_order_material]
type = PorousFlowHysteresisOrder
[]
[pc_calculator]
type = PorousFlow2PhaseHysPS
alpha_d = 10.0
alpha_w = 7.0
n_d = 1.5
n_w = 1.9
S_l_min = 0.1
S_lr = 0.2
S_gr_max = 0.3
Pc_max = 12.0
high_ratio = 0.9
low_extension_type = quadratic
high_extension_type = power
phase0_porepressure = pp0
phase1_saturation = sat1
[]
[]
[Postprocessors]
[flux]
type = FunctionValuePostprocessor
function = 'if(t <= 14, 10, if(t <= 25, -10, 10))'
[]
[hys_order]
type = PointValue
point = '0 0 0'
variable = hys_order
[]
[sat0]
type = PointValue
point = '0 0 0'
variable = sat0
[]
[sat1]
type = PointValue
point = '0 0 0'
variable = sat1
[]
[pp0]
type = PointValue
point = '0 0 0'
variable = pp0
[]
[pp1]
type = PointValue
point = '0 0 0'
variable = pp1
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = ' lu NONZERO'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 4
end_time = 46
nl_abs_tol = 1E-10
[]
[Outputs]
csv = true
sync_times = '13 14 15 24 25 25.5 26 27 28 29'
[]
(modules/solid_mechanics/test/tests/mohr_coulomb/random.i)
# apply many random large deformations, checking that the algorithm returns correctly to
# the yield surface each time.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1000
ny = 125
nz = 1
xmin = 0
xmax = 1000
ymin = 0
ymax = 125
zmin = 0
zmax = 1
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[]
[ICs]
[./x]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_x
[../]
[./y]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_y
[../]
[./z]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_z
[../]
[]
[BCs]
[./x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'front back'
function = '0'
[../]
[./y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'front back'
function = '0'
[../]
[./z]
type = FunctionDirichletBC
variable = disp_z
boundary = 'front back'
function = '0'
[../]
[]
[AuxVariables]
[./yield_fcn]
order = CONSTANT
family = MONOMIAL
[../]
[./iter]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./yield_fcn_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_yield_function
variable = yield_fcn
[../]
[./iter]
type = MaterialRealAux
property = plastic_NR_iterations
variable = iter
[../]
[]
[Postprocessors]
[./yield_fcn_at_zero]
type = PointValue
point = '0 0 0'
variable = yield_fcn
outputs = 'console'
[../]
[./should_be_zero]
type = FunctionValuePostprocessor
function = should_be_zero_fcn
[../]
[./av_iter]
type = ElementAverageValue
variable = iter
outputs = 'console'
[../]
[]
[Functions]
[./should_be_zero_fcn]
type = ParsedFunction
expression = 'if(a<1E-3,0,a)'
symbol_names = 'a'
symbol_values = 'yield_fcn_at_zero'
[../]
[]
[UserObjects]
[./mc_coh]
type = SolidMechanicsHardeningConstant
value = 1E3
[../]
[./mc_phi]
type = SolidMechanicsHardeningConstant
value = 30
convert_to_radians = true
[../]
[./mc_psi]
type = SolidMechanicsHardeningConstant
value = 5
convert_to_radians = true
[../]
[./mc]
type = SolidMechanicsPlasticMohrCoulomb
cohesion = mc_coh
friction_angle = mc_phi
dilation_angle = mc_psi
mc_tip_smoother = 0.1E3
mc_edge_smoother = 25
yield_function_tolerance = 1E-3
internal_constraint_tolerance = 1E-6
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
fill_method = symmetric_isotropic
C_ijkl = '0.7E7 1E7'
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./mc]
type = ComputeMultiPlasticityStress
block = 0
max_NR_iterations = 1000
ep_plastic_tolerance = 1E-6
min_stepsize = 1E-3
plastic_models = mc
debug_fspb = crash
deactivation_scheme = safe
[../]
[]
[Executioner]
end_time = 1
dt = 1
type = Transient
[]
[Outputs]
file_base = random
exodus = false
[./csv]
type = CSV
[../]
[]
(modules/stochastic_tools/test/tests/multiapps/partitioning/sub.i)
[StochasticTools]
[]
[Postprocessors]
[pp1]
type = FunctionValuePostprocessor
function = 1
scale_factor = 1
[]
[pp2]
type = FunctionValuePostprocessor
function = 1
scale_factor = 1
[]
[]
[Controls/receiver]
type = SamplerReceiver
[]
(modules/solid_mechanics/test/tests/mohr_coulomb/planar_hard5.i)
# apply repeated stretches in z direction, and smaller stretches along the y direction, and compression along x direction
# Both return to the plane and edge (lode angle = 30deg, ie 010100) are experienced.
#
# It is checked that the yield functions are less than their tolerance values
# It is checked that the cohesion hardens correctly
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[]
[BCs]
[./x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'front back'
function = '-1E-6*x*t'
[../]
[./y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'front back'
function = '0.05E-6*y*t'
[../]
[./z]
type = FunctionDirichletBC
variable = disp_z
boundary = 'front back'
function = '1E-6*z*t'
[../]
[]
[Functions]
[./should_be_zero_fcn]
type = ParsedFunction
expression = 'if((a<1E-5)&(b<1E-5)&(c<1E-5)&(d<1E-5)&(g<1E-5)&(h<1E-5),0,abs(a)+abs(b)+abs(c)+abs(d)+abs(g)+abs(h))'
symbol_names = 'a b c d g h'
symbol_values = 'f0 f1 f2 f3 f4 f5'
[../]
[./coh_analytic]
type = ParsedFunction
expression = '20-10*exp(-1E6*intnl)'
symbol_names = intnl
symbol_values = internal
[../]
[./coh_from_yieldfcns]
type = ParsedFunction
expression = '(f0+f1-(sxx+syy)*sin(phi))/(-2)/cos(phi)'
symbol_names = 'f0 f1 sxx syy phi'
symbol_values = 'f0 f1 s_xx s_yy 0.8726646'
[../]
[./should_be_zero_coh]
type = ParsedFunction
expression = 'if(abs(a-b)<1E-6,0,1E6*abs(a-b))'
symbol_names = 'a b'
symbol_values = 'Coh_analytic Coh_moose'
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_int]
order = CONSTANT
family = MONOMIAL
[../]
[./yield_fcn0]
order = CONSTANT
family = MONOMIAL
[../]
[./yield_fcn1]
order = CONSTANT
family = MONOMIAL
[../]
[./yield_fcn2]
order = CONSTANT
family = MONOMIAL
[../]
[./yield_fcn3]
order = CONSTANT
family = MONOMIAL
[../]
[./yield_fcn4]
order = CONSTANT
family = MONOMIAL
[../]
[./yield_fcn5]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./mc_int_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_internal_parameter
variable = mc_int
[../]
[./yield_fcn0]
type = MaterialStdVectorAux
index = 0
property = plastic_yield_function
variable = yield_fcn0
[../]
[./yield_fcn1]
type = MaterialStdVectorAux
index = 1
property = plastic_yield_function
variable = yield_fcn1
[../]
[./yield_fcn2]
type = MaterialStdVectorAux
index = 2
property = plastic_yield_function
variable = yield_fcn2
[../]
[./yield_fcn3]
type = MaterialStdVectorAux
index = 3
property = plastic_yield_function
variable = yield_fcn3
[../]
[./yield_fcn4]
type = MaterialStdVectorAux
index = 4
property = plastic_yield_function
variable = yield_fcn4
[../]
[./yield_fcn5]
type = MaterialStdVectorAux
index = 5
property = plastic_yield_function
variable = yield_fcn5
[../]
[]
[Postprocessors]
[./s_xx]
type = PointValue
point = '0 0 0'
variable = stress_xx
[../]
[./s_xy]
type = PointValue
point = '0 0 0'
variable = stress_xy
[../]
[./s_xz]
type = PointValue
point = '0 0 0'
variable = stress_xz
[../]
[./s_yy]
type = PointValue
point = '0 0 0'
variable = stress_yy
[../]
[./s_yz]
type = PointValue
point = '0 0 0'
variable = stress_yz
[../]
[./s_zz]
type = PointValue
point = '0 0 0'
variable = stress_zz
[../]
[./internal]
type = PointValue
point = '0 0 0'
variable = mc_int
[../]
[./f0]
type = PointValue
point = '0 0 0'
variable = yield_fcn0
[../]
[./f1]
type = PointValue
point = '0 0 0'
variable = yield_fcn1
[../]
[./f2]
type = PointValue
point = '0 0 0'
variable = yield_fcn2
[../]
[./f3]
type = PointValue
point = '0 0 0'
variable = yield_fcn3
[../]
[./f4]
type = PointValue
point = '0 0 0'
variable = yield_fcn4
[../]
[./f5]
type = PointValue
point = '0 0 0'
variable = yield_fcn5
[../]
[./yfcns_should_be_zero]
type = FunctionValuePostprocessor
function = should_be_zero_fcn
[../]
[./Coh_analytic]
type = FunctionValuePostprocessor
function = coh_analytic
[../]
[./Coh_moose]
type = FunctionValuePostprocessor
function = coh_from_yieldfcns
[../]
[./cohesion_difference_should_be_zero]
type = FunctionValuePostprocessor
function = should_be_zero_coh
[../]
[]
[UserObjects]
[./mc_coh]
type = SolidMechanicsHardeningExponential
value_0 = 10
value_residual = 20
rate = 1E6
[../]
[./mc_phi]
type = SolidMechanicsHardeningConstant
value = 0.8726646
[../]
[./mc_psi]
type = SolidMechanicsHardeningConstant
value = 1 #0.8726646 # 50deg
[../]
[./mc]
type = SolidMechanicsPlasticMohrCoulombMulti
cohesion = mc_coh
friction_angle = mc_phi
dilation_angle = mc_psi
use_custom_returnMap = true
yield_function_tolerance = 1E-5
internal_constraint_tolerance = 1E-9
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
fill_method = symmetric_isotropic
C_ijkl = '0 1E7'
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./mc]
type = ComputeMultiPlasticityStress
block = 0
ep_plastic_tolerance = 1E-12
plastic_models = mc
[../]
[]
[Executioner]
end_time = 5
dt = 1
type = Transient
[]
[Outputs]
file_base = planar_hard5
exodus = false
[./csv]
type = CSV
hide = 'f0 f1 f2 f3 f4 f5 s_xy s_xz s_yz Coh_analytic Coh_moose'
execute_on = 'timestep_end'
[../]
[]
(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/solid_mechanics/test/tests/porosity/negative_porosity.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Problem]
solve = false
[]
[Functions]
[volumetric]
type = ParsedFunction
expression = -t
[]
[exact]
type = ParsedFunction
symbol_names = 'f'
symbol_values = 'porosity_old'
expression = '(1 - f) * 3e-3 + f'
[]
[]
[Materials]
[porosity]
type = PorosityFromStrain
initial_porosity = 1e-10
inelastic_strain = strain
outputs = all
[]
[strain]
type = GenericFunctionRankTwoTensor
tensor_name = strain
tensor_functions = 'volumetric'
outputs = all
[]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 1e-3
[]
[Postprocessors]
[porosity]
type = ElementAverageValue
variable = porosity
execute_on = 'initial timestep_end'
[]
[porosity_old]
type = ElementAverageValue
variable = porosity
execute_on = 'initial timestep_begin'
outputs = none
[]
[exact]
type = FunctionValuePostprocessor
function = exact
[]
[00]
type = ElementAverageValue
variable = strain_00
execute_on = 'initial timestep_end'
[]
[11]
type = ElementAverageValue
variable = strain_11
execute_on = 'initial timestep_end'
[]
[22]
type = ElementAverageValue
variable = strain_22
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
csv = true
[]
(modules/porous_flow/test/tests/energy_conservation/heat04.i)
# The sample is a single unit element, with fixed displacements on
# all sides. A heat source of strength S (J/m^3/s) is applied into
# the element. There is no fluid flow or heat flow. The rise
# in temperature, porepressure and stress, and the change in porosity is
# matched with theory.
#
# In this case, fluid mass must be conserved, and there is no
# volumetric strain, so
# porosity * fluid_density = constant
# Also, the energy-density in the rock-fluid system increases with S:
# d/dt [(1 - porosity) * rock_density * rock_heat_cap * T + porosity * fluid_density * fluid_heat_cap * T] = S
# Also, the porosity evolves according to THM as
# porosity = biot + (porosity0 - biot) * exp( (biot - 1) * P / fluid_bulk + rock_thermal_exp * T)
# Finally, the effective stress must be exactly zero (as there is
# no strain).
#
# Let us assume that
# fluid_density = dens0 * exp(P / fluid_bulk - fluid_thermal_exp * T)
# Then the conservation of fluid mass means
# porosity = por0 * exp(- P / fluid_bulk + fluid_thermal_exp * T)
# where dens0 * por0 = the initial fluid mass.
# The last expression for porosity, combined with the THM one,
# and assuming that biot = 1 for simplicity, gives
# porosity = 1 + (porosity0 - 1) * exp(rock_thermal_exp * T) = por0 * exp(- P / fluid_bulk + fluid_thermal_exp * T) .... (A)
#
# This stuff may be substituted into the heat energy-density equation:
# S = d/dt [(1 - porosity0) * exp(rock_thermal_exp * T) * rock_density * rock_heat_cap * T + porosity * fluid_density * fluid_heat_cap * T]
#
# If S is constant then
# S * t = (1 - porosity0) * exp(rock_thermal_exp * T) * rock_density * rock_heat_cap * T + porosity * fluid_density * fluid_heat_cap * T
# with T(t=0) = 0 then Eqn(A) implies that por0 = porosity0 and
# P / fluid_bulk = fluid_thermal_exp * T - log(1 + (por0 - 1) * exp(rock_thermal_exp * T)) + log(por0)
#
# Parameters:
# A = 2
# fluid_bulk = 2.0
# dens0 = 3.0
# fluid_thermal_exp = 0.5
# fluid_heat_cap = 2
# por0 = 0.5
# rock_thermal_exp = 0.25
# rock_density = 5
# rock_heat_capacity = 0.2
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.5
cv = 2
cp = 2
bulk_modulus = 2.0
density0 = 3.0
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[pp]
[]
[temp]
[]
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[]
[]
[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 = PorousFlowEffectiveStressCoupling
biot_coefficient = 1.0
variable = disp_x
component = 0
[]
[poro_y]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 1.0
variable = disp_y
component = 1
[]
[poro_z]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 1.0
component = 2
variable = disp_z
[]
[poro_vol_exp]
type = PorousFlowMassVolumetricExpansion
variable = pp
fluid_component = 0
[]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[temp]
type = PorousFlowEnergyTimeDerivative
variable = temp
[]
[poro_vol_exp_temp]
type = PorousFlowHeatVolumetricExpansion
variable = temp
[]
[heat_source]
type = BodyForce
function = 1
variable = temp
[]
[]
[Functions]
[err_T_fcn]
type = ParsedFunction
symbol_names = 'por0 rte temp rd rhc m0 fhc source'
symbol_values = '0.5 0.25 t0 5 0.2 1.5 2 1'
expression = '((1-por0)*exp(rte*temp)*rd*rhc*temp+m0*fhc*temp-source*t)/(source*t)'
[]
[err_pp_fcn]
type = ParsedFunction
symbol_names = 'por0 rte temp rd rhc m0 fhc source bulk pp fte'
symbol_values = '0.5 0.25 t0 5 0.2 1.5 2 1 2 p0 0.5'
expression = '(bulk*(fte*temp-log(1+(por0-1)*exp(rte*temp))+log(por0))-pp)/pp'
[]
[]
[AuxVariables]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xz]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_yz]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[]
[porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp pp disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = ComputeLinearElasticStress
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[porosity]
type = PorousFlowPorosity
thermal = true
fluid = true
mechanical = true
ensure_positive = false
biot_coefficient = 1.0
porosity_zero = 0.5
thermal_expansion_coeff = 0.25
solid_bulk = 2
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 0.2
density = 5.0
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
temperature_unit = Kelvin
fp = the_simple_fluid
phase = 0
[]
[]
[Postprocessors]
[p0]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = pp
[]
[t0]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = temp
[]
[porosity]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = porosity
[]
[stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[]
[stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[]
[stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[]
[fluid_mass]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'timestep_end'
outputs = 'console csv'
[]
[total_heat]
type = PorousFlowHeatEnergy
phase = 0
execute_on = 'timestep_end'
outputs = 'console csv'
[]
[err_T]
type = FunctionValuePostprocessor
function = err_T_fcn
[]
[err_P]
type = FunctionValuePostprocessor
function = err_pp_fcn
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-12 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 5
[]
[Outputs]
execute_on = 'initial timestep_end'
file_base = heat04
[csv]
type = CSV
[]
[]
(test/tests/postprocessors/change_over_time/change_over_time.i)
# This test tests the ChangeOverTimePostprocessor, which computes the change
# in a postprocessor value with respect to the previous value or with respect to
# the initial value. This test creates a time-dependent function postprocessor
# and then computes its change over a timestep. The FE problem used here is a
# dummy problem and has no effect on the test.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 5
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./time_derivative]
type = TimeDerivative
variable = u
[../]
[./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
start_time = 0.0
dt = 1.0
num_steps = 2
[]
[Functions]
[./my_function]
type = ParsedFunction
expression = '1 + t * t'
[../]
[]
[Postprocessors]
[./my_postprocessor]
type = FunctionValuePostprocessor
function = my_function
execute_on = 'initial timestep_end'
[../]
[./change_over_time]
type = ChangeOverTimePostprocessor
postprocessor = my_postprocessor
change_with_respect_to_initial = false
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
file_base = 'change_over_time_previous'
csv = true
[]
(modules/solid_mechanics/test/tests/rom_stress_update/ad_verification.i)
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[temperature]
[]
[]
[AuxKernels]
[temp_aux]
type = FunctionAux
variable = temperature
function = temp_fcn
execute_on = 'initial timestep_begin'
[]
[]
[Functions]
[rhom_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 1
format = columns
xy_in_file_only = false
direction = LEFT_INCLUSIVE
[]
[rhoi_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 2
format = columns
xy_in_file_only = false
direction = LEFT_INCLUSIVE
[]
[vmJ2_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 3
format = columns
xy_in_file_only = false
direction = LEFT_INCLUSIVE
[]
[evm_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 4
format = columns
xy_in_file_only = false
direction = LEFT_INCLUSIVE
[]
[temp_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 5
format = columns
xy_in_file_only = false
direction = LEFT_INCLUSIVE
[]
[rhom_soln_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 7
format = columns
xy_in_file_only = false
direction = LEFT_INCLUSIVE
[]
[rhoi_soln_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 8
format = columns
xy_in_file_only = false
direction = LEFT_INCLUSIVE
[]
[creep_rate_soln_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 10
format = columns
xy_in_file_only = false
direction = LEFT_INCLUSIVE
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
generate_output = 'vonmises_stress'
use_automatic_differentiation = true
[]
[]
[BCs]
[symmx]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0
[]
[symmy]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[symmz]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0
[]
[pull_x]
type = ADDirichletBC
variable = disp_x
boundary = right
value = 1e-5 # This is required to make a non-zero effective trial stress so radial return is engaged
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
shear_modulus = 1e13
poissons_ratio = 0.3
[]
[stress]
type = ADComputeMultipleInelasticStress
inelastic_models = rom_stress_prediction
[]
[rom_stress_prediction]
type = ADSS316HLAROMANCEStressUpdateTest
temperature = temperature
effective_inelastic_strain_name = effective_creep_strain
internal_solve_full_iteration_history = true
apply_strain = false
outputs = all
wall_dislocation_density_forcing_function = rhoi_fcn
cell_dislocation_density_forcing_function = rhom_fcn
old_creep_strain_forcing_function = evm_fcn
wall_input_window_low_failure = ERROR
wall_input_window_high_failure = ERROR
cell_input_window_low_failure = ERROR
cell_input_window_high_failure = ERROR
temperature_input_window_low_failure = ERROR
temperature_input_window_high_failure = ERROR
stress_input_window_low_failure = ERROR
stress_input_window_high_failure = ERROR
old_strain_input_window_low_failure = ERROR
old_strain_input_window_high_failure = ERROR
environment_input_window_low_failure = ERROR
environment_input_window_high_failure = ERROR
effective_stress_forcing_function = vmJ2_fcn
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_abs_tol = 1e-1 # Nothing is really being solved here, so loose tolerances are okay
dt = 1e-3
end_time = 1e-2
timestep_tolerance = 1e-3
[]
[Postprocessors]
[extrapolation]
type = ElementAverageValue
variable = ROM_extrapolation
outputs = console
[]
[old_strain_in]
type = FunctionValuePostprocessor
function = evm_fcn
execute_on = 'TIMESTEP_END initial'
outputs = console
[]
[temperature]
type = ElementAverageValue
variable = temperature
outputs = console
[]
[rhom]
type = ElementAverageValue
variable = cell_dislocations
[]
[rhoi]
type = ElementAverageValue
variable = wall_dislocations
[]
[creep_rate]
type = ElementAverageValue
variable = creep_rate
[]
[rhom_in]
type = FunctionValuePostprocessor
function = rhom_fcn
execute_on = 'TIMESTEP_END initial'
outputs = console
[]
[rhoi_in]
type = FunctionValuePostprocessor
function = rhoi_fcn
execute_on = 'TIMESTEP_END initial'
outputs = console
[]
[vmJ2_in]
type = FunctionValuePostprocessor
function = vmJ2_fcn
execute_on = 'TIMESTEP_END initial'
outputs = console
[]
[rhom_soln]
type = FunctionValuePostprocessor
function = rhom_soln_fcn
outputs = console
[]
[rhoi_soln]
type = FunctionValuePostprocessor
function = rhoi_soln_fcn
outputs = console
[]
[creep_rate_soln]
type = FunctionValuePostprocessor
function = creep_rate_soln_fcn
[]
[rhom_diff]
type = ParsedPostprocessor
pp_names = 'rhom_soln rhom'
function = '(rhom_soln - rhom) / rhom_soln'
outputs = console
[]
[rhoi_diff]
type = ParsedPostprocessor
pp_names = 'rhoi_soln rhoi'
function = '(rhoi_soln - rhoi) / rhoi_soln'
outputs = console
[]
[creep_rate_diff]
type = ParsedPostprocessor
pp_names = 'creep_rate creep_rate_soln'
function = '(creep_rate_soln - creep_rate) / creep_rate_soln'
outputs = console
[]
[z_rhom_max_diff]
type = TimeExtremeValue
postprocessor = rhom_diff
value_type = abs_max
[]
[z_rhoi_max_diff]
type = TimeExtremeValue
postprocessor = rhoi_diff
value_type = abs_max
[]
[z_creep_rate_max_diff]
type = TimeExtremeValue
postprocessor = creep_rate_diff
value_type = abs_max
[]
[]
[Outputs]
csv = true
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
(modules/porous_flow/test/tests/dirackernels/bh_except07.i)
# PorousFlowPeacemanBorehole exception test
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = 1E7
[]
[]
[Kernels]
[mass0]
type = TimeDerivative
variable = pp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
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.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[]
[DiracKernels]
[bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
point_file = bh02.bh
use_mobility = true
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[]
[]
[Postprocessors]
[bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[]
[fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[]
[fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[]
[zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[]
[p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[]
[]
[Functions]
[mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[]
[]
[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 = 0.5
dt = 1E-2
solve_type = NEWTON
[]
(modules/porous_flow/test/tests/hysteresis/2phasePS_relperm_2.i)
# Simple example of a 2-phase situation with hysteretic relative permeability. Gas is added to and removed from the system in order to observe the hysteresis
# All liquid water exists in component 0
# All gas exists in component 1
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
number_fluid_phases = 2
number_fluid_components = 2
porous_flow_vars = 'pp0 sat1'
[]
[pc]
type = PorousFlowCapillaryPressureVG
alpha = 10.0
m = 0.33
[]
[]
[Variables]
[pp0]
[]
[sat1]
initial_condition = 0
[]
[]
[Kernels]
[mass_conservation0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp0
[]
[mass_conservation1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = sat1
[]
[]
[DiracKernels]
[pump]
type = PorousFlowPointSourceFromPostprocessor
mass_flux = flux
point = '0.5 0 0'
variable = sat1
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[sat0]
family = MONOMIAL
order = CONSTANT
[]
[pp1]
family = MONOMIAL
order = CONSTANT
[]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[relperm_liquid]
family = MONOMIAL
order = CONSTANT
[]
[relperm_gas]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[sat0]
type = PorousFlowPropertyAux
variable = sat0
phase = 0
property = saturation
[]
[relperm_liquid]
type = PorousFlowPropertyAux
variable = relperm_liquid
property = relperm
phase = 0
[]
[relperm_gas]
type = PorousFlowPropertyAux
variable = relperm_gas
property = relperm
phase = 1
[]
[pp1]
type = PorousFlowPropertyAux
variable = pp1
phase = 1
property = pressure
[]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[]
[FluidProperties]
[simple_fluid] # same properties used for both phases
type = SimpleFluidProperties
bulk_modulus = 10 # so pumping does not result in excessive porepressure
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[temperature]
type = PorousFlowTemperature
temperature = 20
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 1
[]
[pc_calculator]
type = PorousFlow2PhasePS
capillary_pressure = pc
phase0_porepressure = pp0
phase1_saturation = sat1
[]
[hys_order_material]
type = PorousFlowHysteresisOrder
[]
[relperm_liquid]
type = PorousFlowHystereticRelativePermeabilityLiquid
phase = 0
S_lr = 0.4
S_gr_max = 0.2
m = 0.9
liquid_modification_range = 0.9
[]
[relperm_gas]
type = PorousFlowHystereticRelativePermeabilityGas
phase = 1
S_lr = 0.4
S_gr_max = 0.2
m = 0.9
gamma = 0.33
k_rg_max = 1.0
gas_low_extension_type = linear_like
[]
[]
[Postprocessors]
[flux]
type = FunctionValuePostprocessor
function = 'if(t <= 15, 20, -20)'
[]
[hys_order]
type = PointValue
point = '0 0 0'
variable = hys_order
[]
[sat0]
type = PointValue
point = '0 0 0'
variable = sat0
[]
[sat1]
type = PointValue
point = '0 0 0'
variable = sat1
[]
[kr_liq]
type = PointValue
point = '0 0 0'
variable = relperm_liquid
[]
[kr_gas]
type = PointValue
point = '0 0 0'
variable = relperm_gas
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = ' lu NONZERO'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 5
end_time = 29
nl_abs_tol = 1E-10
[]
[Outputs]
[csv]
type = CSV
sync_times = '0 1 2 3 8 12 13 14 15 16 17 18 20 24 25 26 27 28 29'
sync_only = true
file_base = '2phasePS_relperm_2_none'
[]
[]
(modules/porous_flow/test/tests/energy_conservation/heat04_action.i)
# heat04, but using an action
#
# The sample is a single unit element, with fixed displacements on
# all sides. A heat source of strength S (J/m^3/s) is applied into
# the element. There is no fluid flow or heat flow. The rise
# in temperature, porepressure and stress, and the change in porosity is
# matched with theory.
#
# In this case, fluid mass must be conserved, and there is no
# volumetric strain, so
# porosity * fluid_density = constant
# Also, the energy-density in the rock-fluid system increases with S:
# d/dt [(1 - porosity) * rock_density * rock_heat_cap * T + porosity * fluid_density * fluid_heat_cap * T] = S
# Also, the porosity evolves according to THM as
# porosity = biot + (porosity0 - biot) * exp( (biot - 1) * P / fluid_bulk + rock_thermal_exp * T)
# Finally, the effective stress must be exactly zero (as there is
# no strain).
#
# Let us assume that
# fluid_density = dens0 * exp(P / fluid_bulk - fluid_thermal_exp * T)
# Then the conservation of fluid mass means
# porosity = por0 * exp(- P / fluid_bulk + fluid_thermal_exp * T)
# where dens0 * por0 = the initial fluid mass.
# The last expression for porosity, combined with the THM one,
# and assuming that biot = 1 for simplicity, gives
# porosity = 1 + (porosity0 - 1) * exp(rock_thermal_exp * T) = por0 * exp(- P / fluid_bulk + fluid_thermal_exp * T) .... (A)
#
# This stuff may be substituted into the heat energy-density equation:
# S = d/dt [(1 - porosity0) * exp(rock_thermal_exp * T) * rock_density * rock_heat_cap * T + porosity * fluid_density * fluid_heat_cap * T]
#
# If S is constant then
# S * t = (1 - porosity0) * exp(rock_thermal_exp * T) * rock_density * rock_heat_cap * T + porosity * fluid_density * fluid_heat_cap * T
# with T(t=0) = 0 then Eqn(A) implies that por0 = porosity0 and
# P / fluid_bulk = fluid_thermal_exp * T - log(1 + (por0 - 1) * exp(rock_thermal_exp * T)) + log(por0)
#
# Parameters:
# A = 2
# fluid_bulk = 2.0
# dens0 = 3.0
# fluid_thermal_exp = 0.5
# fluid_heat_cap = 2
# por0 = 0.5
# rock_thermal_exp = 0.25
# rock_density = 5
# rock_heat_capacity = 0.2
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.5
cv = 2
cp = 2
bulk_modulus = 2.0
density0 = 3.0
[]
[]
[PorousFlowUnsaturated]
coupling_type = ThermoHydroMechanical
displacements = 'disp_x disp_y disp_z'
porepressure = pp
temperature = temp
dictator_name = Sir
biot_coefficient = 1.0
gravity = '0 0 0'
fp = the_simple_fluid
van_genuchten_alpha = 1.0E-12
van_genuchten_m = 0.5
relative_permeability_type = Corey
relative_permeability_exponent = 0.0
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = Sir
block = 0
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[pp]
[]
[temp]
[]
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[]
[]
[Kernels]
[heat_source]
type = BodyForce
function = 1
variable = temp
[]
[]
[Functions]
[err_T_fcn]
type = ParsedFunction
symbol_names = 'por0 rte temp rd rhc m0 fhc source'
symbol_values = '0.5 0.25 t0 5 0.2 1.5 2 1'
expression = '((1-por0)*exp(rte*temp)*rd*rhc*temp+m0*fhc*temp-source*t)/(source*t)'
[]
[err_pp_fcn]
type = ParsedFunction
symbol_names = 'por0 rte temp rd rhc m0 fhc source bulk pp fte'
symbol_values = '0.5 0.25 t0 5 0.2 1.5 2 1 2 p0 0.5'
expression = '(bulk*(fte*temp-log(1+(por0-1)*exp(rte*temp))+log(por0))-pp)/pp'
[]
[]
[AuxVariables]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = ComputeLinearElasticStress
[]
[porosity]
type = PorousFlowPorosity
thermal = true
fluid = true
mechanical = true
ensure_positive = false
biot_coefficient = 1.0
porosity_zero = 0.5
thermal_expansion_coeff = 0.25
solid_bulk = 2
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 0.2
density = 5.0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0 0 0 0 0 0 0 0 0'
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0 0 0 0 0 0 0 0 0'
[]
[]
[Postprocessors]
[p0]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = pp
[]
[t0]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = temp
[]
[porosity]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = porosity
[]
[stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[]
[stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[]
[stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[]
[fluid_mass]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'timestep_end'
outputs = 'console csv'
[]
[total_heat]
type = PorousFlowHeatEnergy
phase = 0
execute_on = 'timestep_end'
outputs = 'console csv'
[]
[err_T]
type = FunctionValuePostprocessor
function = err_T_fcn
[]
[err_P]
type = FunctionValuePostprocessor
function = err_pp_fcn
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-12 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 5
[]
[Outputs]
execute_on = 'initial timestep_end'
file_base = heat04_action
csv = true
[]
(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/thermal_hydraulics/test/tests/controls/unit_trip_control/test.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[Functions]
[fn]
type = ParsedFunction
expression = 'sin(pi*t)'
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Components]
[]
[Postprocessors]
[a]
type = FunctionValuePostprocessor
function = fn
execute_on = 'timestep_begin'
[]
[trip_state]
type = BoolControlDataValuePostprocessor
control_data_name = trip_ctrl:state
execute_on = 'timestep_end'
[]
[]
[ControlLogic]
[trip_ctrl]
type = UnitTripControl
condition = 'a > 0.6'
symbol_names = 'a'
symbol_values = 'a'
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 10
abort_on_solve_fail = true
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/weak_plane_shear/large_deform3.i)
# apply a number of "random" configurations and
# check that the algorithm returns to the yield surface
#
# must be careful here - we cannot put in arbitrary values of C_ijkl, otherwise the condition
# df/dsigma * C * flow_dirn < 0 for some stresses
# The important features that must be obeyed are:
# 0 = C_0222 = C_1222 (holds for transversely isotropic, for instance)
# C_0212 < C_0202 = C_1212 (holds for transversely isotropic)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[Physics/SolidMechanics/QuasiStatic/all]
strain = FINITE
add_variables = true
[]
[BCs]
[bottomx]
type = DirichletBC
variable = disp_x
boundary = back
value = 0.0
[]
[bottomy]
type = DirichletBC
variable = disp_y
boundary = back
value = 0.0
[]
[bottomz]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
# the following are "random" deformations
# each is O(1E-1) to provide large deformations
[topx]
type = FunctionDirichletBC
variable = disp_x
boundary = front
function = '(sin(0.1*t)+x)/1E1'
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = front
function = '(cos(t)+x*y)/1E1'
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = front
function = 'sin(0.4321*t)*x*y*z/1E1'
[]
[]
[AuxVariables]
[yield_fcn]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[yield_fcn_auxk]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 0
variable = yield_fcn
[]
[]
[Postprocessors]
[yield_fcn_at_zero]
type = PointValue
point = '0 0 0'
variable = yield_fcn
outputs = 'console'
[]
[should_be_zero]
type = FunctionValuePostprocessor
function = should_be_zero_fcn
[]
[]
[Functions]
[should_be_zero_fcn]
type = ParsedFunction
expression = 'if(a<1E-3,0,a)'
symbol_names = 'a'
symbol_values = 'yield_fcn_at_zero'
[]
[]
[UserObjects]
[coh]
type = SolidMechanicsHardeningConstant
value = 1E3
[]
[tanphi]
type = SolidMechanicsHardeningConstant
value = 0.577350269
[]
[tanpsi]
type = SolidMechanicsHardeningConstant
value = 0.08748866
[]
[wps]
type = SolidMechanicsPlasticWeakPlaneShear
cohesion = coh
tan_friction_angle = tanphi
tan_dilation_angle = tanpsi
smoother = 100
yield_function_tolerance = 1E-3
internal_constraint_tolerance = 1E-3
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensor
# the following is transversely isotropic, i think.
fill_method = symmetric9
C_ijkl = '3E9 1E9 3E9 3E9 3E9 6E9 1E9 1E9 9E9'
[]
[mc]
type = ComputeMultiPlasticityStress
plastic_models = wps
transverse_direction = '0 0 1'
max_NR_iterations = 100
ep_plastic_tolerance = 1E-3
debug_fspb = crash
[]
[]
[Executioner]
end_time = 1E4
dt = 1
type = Transient
[]
[Outputs]
csv = true
[]
(modules/fluid_properties/test/tests/temperature_pressure_function/example.i)
# Test implementation of TemperaturePressureFunctionFluidProperties properties by comparison to analytical functions.
cv = 4000
T_initial = 400
p_initial = 1e5
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Problem]
solve = false
[]
[AuxVariables]
[temperature]
initial_condition = ${T_initial}
[]
[pressure]
initial_condition = 1e5
[]
[]
[Functions]
# This demonstrates how to define fluid properties that are functions
# of the LOCAL value of the (p,T) variables
# x for temperature
# y for pressure
[k]
type = ParsedFunction
expression = '14 + 1e-2 * x + 1e-5 * y'
[]
[rho]
type = ParsedFunction
expression = '1.5e3 + 0.13 * x - 1.5e-4 * y'
[]
[mu]
type = ParsedFunction
expression = '1e-3 + 2e-6 * x - 3e-9 * y'
[]
[]
[FluidProperties]
[fp]
type = TemperaturePressureFunctionFluidProperties
cv = ${cv}
k = k
rho = rho
mu = mu
[]
[]
[Materials]
[to_vars]
type = FluidPropertiesMaterialPT
fp = fp
outputs = 'all'
output_properties = 'density k cp cv viscosity e h'
pressure = pressure
temperature = temperature
compute_entropy = false
compute_sound_speed = false
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[k_exact]
type = FunctionValuePostprocessor
function = k
outputs = none
point = '${T_initial} ${p_initial} 0'
[]
[rho_exact]
type = FunctionValuePostprocessor
function = rho
outputs = none
point = '${T_initial} ${p_initial} 0'
[]
[mu_exact]
type = FunctionValuePostprocessor
function = mu
outputs = none
point = '${T_initial} ${p_initial} 0'
[]
[e_exact]
type = Receiver
default = '${fparse cv * T_initial}'
outputs = none
[]
[cv_exact]
type = Receiver
default = '${fparse cv}'
outputs = none
[]
# Postprocessors to get from the fluid property object
[k_avg]
type = ElementAverageValue
variable = k
outputs = none
[]
[rho_avg]
type = ElementAverageValue
variable = density
outputs = none
[]
[mu_avg]
type = ElementAverageValue
variable = viscosity
outputs = none
[]
[cv_avg]
type = ElementAverageValue
variable = cv
outputs = none
[]
[e_avg]
type = ElementAverageValue
variable = e
outputs = none
[]
# We output these directly, cant compare to anything analytical though
[cp_avg]
type = ElementAverageValue
variable = cp
[]
[h_avg]
type = ElementAverageValue
variable = h
[]
# Postprocessors to compare the two
[k_diff]
type = DifferencePostprocessor
value1 = k_exact
value2 = k_avg
[]
[mu_diff]
type = DifferencePostprocessor
value1 = mu_exact
value2 = mu_avg
[]
[rho_diff]
type = DifferencePostprocessor
value1 = rho_exact
value2 = rho_avg
[]
[e_diff]
type = DifferencePostprocessor
value1 = e_exact
value2 = e_avg
[]
[cv_diff]
type = DifferencePostprocessor
value1 = cv_exact
value2 = cv_avg
[]
[]
[Outputs]
# Note that diffs wont be settled until timestep 2 because of order of execution
csv = true
[]
(modules/porous_flow/test/tests/dirackernels/bh_except16.i)
# fully-saturated
# production
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = 1E7
[]
[]
[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
[]
[borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
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.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[DiracKernels]
[bh]
type = PorousFlowPeacemanBorehole
function_of = temperature
bottom_p_or_t = 0
fluid_phase = 0
point_file = bh02.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[]
[]
[Postprocessors]
[bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[]
[fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[]
[fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[]
[zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[]
[p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[]
[]
[Functions]
[mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[]
[]
[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 = 0.5
dt = 1E-2
solve_type = NEWTON
[]
(modules/porous_flow/test/tests/gravity/fully_saturated_grav01c.i)
# Checking that gravity head is established
# 1phase, 2-component, constant fluid-bulk, constant viscosity, constant permeability
# fully saturated with fully-saturated Kernel
# For better agreement with the analytical solution (ana_pp), just increase nx
# NOTE: the numerics described by this input file is quite delicate. Firstly, the steady-state solution does not depend on the mass-fraction distribution, so the mass-fraction variable can assume any values (with the constraint that its integral is the same as the initial condition). Secondly, because the PorousFlowFullySaturatedDarcyFlow does no upwinding, the steady-state porepressure distribution can contain non-physical oscillations. The solver choice and mesh choice used below mean the result is as expected, but changing these can produce different results.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = -1
xmax = 0
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[InitialCondition]
type = RandomIC
min = 0
max = 1
[]
[]
[frac]
[InitialCondition]
type = RandomIC
min = 0
max = 1
[]
[]
[]
[Kernels]
[flux1]
type = PorousFlowFullySaturatedDarcyFlow
variable = pp
fluid_component = 0
gravity = '-1 0 0'
[]
[flux0]
type = PorousFlowFullySaturatedDarcyFlow
variable = frac
fluid_component = 1
gravity = '-1 0 0'
[]
[]
[Functions]
[ana_pp]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 1.2 0 1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[]
[BCs]
[z]
type = DirichletBC
variable = pp
boundary = right
value = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp frac'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.2
density0 = 1
viscosity = 1
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = frac
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[]
[Postprocessors]
[pp_base]
type = PointValue
variable = pp
point = '-1 0 0'
[]
[pp_analytical]
type = FunctionValuePostprocessor
function = ana_pp
point = '-1 0 0'
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = Newton
nl_rel_tol = 1E-12
petsc_options_iname = '-pc_factor_shift_type'
petsc_options_value = 'NONZERO'
[]
[Outputs]
execute_on = 'timestep_end'
file_base = fully_saturated_grav01c
[csv]
type = CSV
[]
[]
(modules/richards/test/tests/dirac/st01.i)
# fully-saturated
# production
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./Seff1VG]
type = RichardsSeff1VG
m = 0.8
al = 1E-5
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0
sum_s_res = 0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E8
[../]
[./stream_total_outflow_mass]
type = RichardsSumQuantity
[../]
[]
[Variables]
active = 'pressure'
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./p_ic]
type = FunctionIC
variable = pressure
function = initial_pressure
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
variable = pressure
[../]
[]
[DiracKernels]
[./stream]
type = RichardsPolyLineSink
pressures = '0.2E7 0.8E7'
fluxes = '1 2'
point_file = st01.stream
SumQuantityUO = stream_total_outflow_mass
variable = pressure
[../]
[]
[Postprocessors]
[./stream_report]
type = RichardsPlotQuantity
uo = stream_total_outflow_mass
[../]
[./fluid_mass0]
type = RichardsMass
variable = pressure
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = RichardsMass
variable = pressure
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
indirect_dependencies = 'fluid_mass1 fluid_mass0 stream_report'
[../]
[./p0]
type = PointValue
variable = pressure
point = '0 0 0'
execute_on = timestep_end
[../]
[]
[Functions]
active = 'mass_bal_fcn initial_pressure'
[./initial_pressure]
type = ParsedFunction
expression = 1E7
[../]
[./mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 stream_report'
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = 0
viscosity = 1E-3
mat_porosity = 0.1
mat_permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
density_UO = DensityConstBulk
relperm_UO = RelPermPower
sat_UO = Saturation
seff_UO = Seff1VG
SUPG_UO = SUPGstandard
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = Seff1VG
pressure_vars = pressure
[../]
[]
[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 = 2.5
dt = 0.1
solve_type = NEWTON
[]
[Outputs]
file_base = st01
exodus = false
csv = true
execute_on = timestep_end
[]
(modules/optimization/test/tests/executioners/constrained/shape_optimization/forward.i)
# This test is documented as an example for ConstrainedShapeOptimization. This
# test should not be changed without updating the documentation.
inner_radius = 6
outer_radius = 10
volume_constraint = 200
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[mesh]
type = ConcentricCircleMeshGenerator
has_outer_square = no
num_sectors = 16
radii = '${inner_radius} ${outer_radius}'
rings = '16 16'
preserve_volumes = false
[]
[inner_radius]
type = SideSetsBetweenSubdomainsGenerator
input = mesh
new_boundary = inner
primary_block = 2
paired_block = 1
[]
[delete]
type = BlockDeletionGenerator
input = inner_radius
block = 1
[]
[gather_all]
type = BoundingBoxNodeSetGenerator
input = delete
bottom_left = '-100 -100 -100'
top_right = '100 100 100'
new_boundary = total
[]
[combine]
type = SideSetsFromBoundingBoxGenerator
input = gather_all
bottom_left = '-100 -100 -100'
top_right = '100 100 100'
boundaries_old = 'inner outer'
boundary_new = moving
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[T]
[]
[]
[AuxVariables]
[dist_between]
[AuxKernel]
type = NearestNodeDistanceAux
variable = dist_between
paired_boundary = moving
boundary = total
block = 2
use_displaced_mesh = false
execute_on = "INITIAL"
[]
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
use_displaced_mesh = false
diffusivity = diff_coef
[]
[disp_y]
type = MatDiffusion
variable = disp_y
use_displaced_mesh = false
diffusivity = diff_coef
[]
# run physics of interest on deformed mesh
[Diffusion]
type = FunctionDiffusion
variable = T
use_displaced_mesh = true
[]
[Source]
type = BodyForce
variable = T
value = 1
use_displaced_mesh = true
[]
[]
[Materials]
# perserve elements near the boundary
[diff_coef]
type = ParsedMaterial
coupled_variables = 'dist_between'
expression = '1/(dist_between+0.5)'
property_name = 'diff_coef'
[]
[h]
type = ADGenericFunctionMaterial
prop_names = h
prop_values = h
[]
# convection type boundary condition
[convection_bc]
type = ADParsedMaterial
coupled_variables = "T"
expression = "h*(100-T)"
material_property_names = "h"
property_name = convection
[]
[]
[Functions]
[r1_x]
type = ParsedOptimizationFunction
expression = 'r1 * cos((atan(y/x)))'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[r1_y]
type = ParsedOptimizationFunction
expression = 'r1 * sin((atan(y/x)))'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[r0_x]
type = ParsedOptimizationFunction
expression = 'r0 * cos((atan(y/x)))'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[r0_y]
type = ParsedOptimizationFunction
expression = 'r0 * sin((atan(y/x)))'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[h]
type = ParsedOptimizationFunction
# r0+${inner_radius} is the true current inner radius
expression = '10 /(pi * (r0+${inner_radius})^3)'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[eq_grad_r0]
type = ParsedOptimizationFunction
expression = '-2 * pi * (r0 + ${inner_radius})'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[eq_grad_r1]
type = ParsedOptimizationFunction
# r1+${outer_radius} is the true current outer radius
expression = '2 * pi * (r1+${outer_radius})'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[]
[BCs]
[diffuse_r1_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 'outer'
function = r1_x
preset = false
[]
[diffuse_r1_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = 'outer'
function = r1_y
preset = false
[]
[diffuse_r0_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 'inner'
function = r0_x
preset = false
[]
[diffuse_r0_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = 'inner'
function = r0_y
preset = false
[]
# run physics on deformed mesh
[convection]
type = ADMatNeumannBC
variable = T
boundary = inner
boundary_material = convection
use_displaced_mesh = true
value = 1
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Reporters]
[params]
type = ConstantReporter
real_vector_names = 'radii'
real_vector_values = '0 0'
dof_id_type_vector_names = 'num_params'
dof_id_type_vector_values = '2'
[]
[]
[Postprocessors]
[current_volume]
type = VolumePostprocessor
use_displaced_mesh = true
[]
# objective function
[objective]
type = NodalExtremeValue
variable = T
[]
[eq_constraint]
type = ParsedPostprocessor
pp_names = current_volume
function = 'current_volume - ${volume_constraint}'
[]
[func_r0]
type = FunctionValuePostprocessor
function = eq_grad_r0
[]
[func_r1]
type = FunctionValuePostprocessor
function = eq_grad_r1
[]
[]
[VectorPostprocessors]
# convert "Real" postprocessors to vectors
[vol_constraint]
type = VectorOfPostprocessors
postprocessors = 'eq_constraint'
force_postaux = true
[]
[eq_grad]
type = VectorOfPostprocessors
postprocessors = 'func_r0 func_r1'
force_postaux = true
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = none
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
[]
[Outputs]
console = false
[]
(examples/ex18_scalar_kernel/ex18_parsed.i)
#
# Example 18 modified to use parsed ODE kernels.
#
# The ParsedODEKernel takes expression expressions in the input file and computes
# Jacobian entries via automatic differentiation. It allows for rapid development
# of new models without the need for code recompilation.
#
# This input file should produce the exact same result as ex18.i
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Functions]
# ODEs
[./exact_x_fn]
type = ParsedFunction
expression = (-1/3)*exp(-t)+(4/3)*exp(5*t)
[../]
[./exact_y_fn]
type = ParsedFunction
expression = (2/3)*exp(-t)+(4/3)*exp(5*t)
[../]
[]
[Variables]
[./diffused]
order = FIRST
family = LAGRANGE
[../]
# ODE variables
[./x]
family = SCALAR
order = FIRST
initial_condition = 1
[../]
[./y]
family = SCALAR
order = FIRST
initial_condition = 2
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = diffused
[../]
[./diff]
type = Diffusion
variable = diffused
[../]
[]
[ScalarKernels]
[./td1]
type = ODETimeDerivative
variable = x
[../]
#
# This parsed expression ODE Kernel behaves exactly as the ImplicitODEx kernel
# in the main example. Checkout ImplicitODEx::computeQpResidual() in the
# source code file ImplicitODEx.C to see the matching residual function.
#
# The ParsedODEKernel automaticaly generates the On- and Off-Diagonal Jacobian
# entries.
#
[./ode1]
type = ParsedODEKernel
expression = '-3*x - 2*y'
variable = x
coupled_variables = y
[../]
[./td2]
type = ODETimeDerivative
variable = y
[../]
#
# This parsed expression ODE Kernel behaves exactly as the ImplicitODEy Kernel
# in the main example.
#
[./ode2]
type = ParsedODEKernel
expression = '-4*x - y'
variable = y
coupled_variables = x
[../]
[]
[BCs]
[./right]
type = ScalarDirichletBC
variable = diffused
boundary = 1
scalar_var = x
[../]
[./left]
type = ScalarDirichletBC
variable = diffused
boundary = 3
scalar_var = y
[../]
[]
[Postprocessors]
# to print the values of x, y into a file so we can plot it
[./x_pp]
type = ScalarVariable
variable = x
execute_on = timestep_end
[../]
[./y_pp]
type = ScalarVariable
variable = y
execute_on = timestep_end
[../]
[./exact_x]
type = FunctionValuePostprocessor
function = exact_x_fn
execute_on = timestep_end
[../]
[./exact_y]
type = FunctionValuePostprocessor
function = exact_y_fn
execute_on = timestep_end
point = '0 0 0'
[../]
# Measure the error in ODE solution for 'x'.
[./l2err_x]
type = ScalarL2Error
variable = x
function = exact_x_fn
[../]
# Measure the error in ODE solution for 'y'.
[./l2err_y]
type = ScalarL2Error
variable = y
function = exact_y_fn
[../]
[]
[Executioner]
type = Transient
start_time = 0
dt = 0.01
num_steps = 10
solve_type = 'PJFNK'
[]
[Outputs]
file_base = 'ex18_out'
exodus = true
[]
(modules/porous_flow/test/tests/gravity/grav01a.i)
# Checking that gravity head is established
# 1phase, vanGenuchten, constant fluid-bulk, constant viscosity, constant permeability, Corey relative perm
# fully saturated
# For better agreement with the analytical solution (ana_pp), just increase nx
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = -1
xmax = 0
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[InitialCondition]
type = RandomIC
min = 0
max = 1
[]
[]
[]
[Kernels]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
gravity = '-1 0 0'
[]
[]
[Functions]
[ana_pp]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 1.2 0 1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[]
[BCs]
[z]
type = DirichletBC
variable = pp
boundary = right
value = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.2
density0 = 1
viscosity = 1
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
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 0
[]
[]
[Postprocessors]
[pp_base]
type = PointValue
variable = pp
point = '-1 0 0'
[]
[pp_analytical]
type = FunctionValuePostprocessor
function = ana_pp
point = '-1 0 0'
[]
[pp_00]
type = PointValue
variable = pp
point = '0 0 0'
[]
[pp_01]
type = PointValue
variable = pp
point = '-0.1 0 0'
[]
[pp_02]
type = PointValue
variable = pp
point = '-0.2 0 0'
[]
[pp_03]
type = PointValue
variable = pp
point = '-0.3 0 0'
[]
[pp_04]
type = PointValue
variable = pp
point = '-0.4 0 0'
[]
[pp_05]
type = PointValue
variable = pp
point = '-0.5 0 0'
[]
[pp_06]
type = PointValue
variable = pp
point = '-0.6 0 0'
[]
[pp_07]
type = PointValue
variable = pp
point = '-0.7 0 0'
[]
[pp_08]
type = PointValue
variable = pp
point = '-0.8 0 0'
[]
[pp_09]
type = PointValue
variable = pp
point = '-0.9 0 0'
[]
[pp_10]
type = PointValue
variable = pp
point = '-1 0 0'
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Outputs]
execute_on = 'timestep_end'
file_base = grav01a
[csv]
type = CSV
[]
[]
(modules/combined/test/tests/poro_mechanics/terzaghi.i)
# Terzaghi's problem of consolodation of a drained medium
#
# A saturated soil sample sits in a bath of water.
# It is constrained on its sides, and bottom.
# Its sides and bottom are also impermeable.
# Initially it is unstressed.
# A normal stress, q, is applied to the soil's top.
# The soil then slowly compresses as water is squeezed
# out from the sample from its top (the top BC for
# the porepressure is porepressure = 0).
#
# See, for example. Section 2.2 of the online manuscript
# Arnold Verruijt "Theory and Problems of Poroelasticity" Delft University of Technology 2013
# but note that the "sigma" in that paper is the negative
# of the stress in TensorMechanics
#
# Here are the problem's parameters, and their values:
# Soil height. h = 10
# Soil's Lame lambda. la = 2
# Soil's Lame mu, which is also the Soil's shear modulus. mu = 3
# Soil bulk modulus. K = la + 2*mu/3 = 4
# Soil confined compressibility. m = 1/(K + 4mu/3) = 0.125
# Soil bulk compliance. 1/K = 0.25
# Fluid bulk modulus. Kf = 8
# Fluid bulk compliance. 1/Kf = 0.125
# Fluid mobility (soil permeability/fluid viscosity). k = 1.5
# Soil initial porosity. phi0 = 0.1
# Biot coefficient. alpha = 0.6
# Soil initial storativity, which is the reciprocal of the initial Biot modulus. S = phi0/Kf + (alpha - phi0)(1 - alpha)/K = 0.0625
# Consolidation coefficient. c = k/(S + alpha^2 m) = 13.95348837
# Normal stress on top. q = 1
# Initial porepressure, resulting from instantaneous application of q, assuming corresponding instantaneous increase of porepressure (Note that this is calculated by MOOSE: we only need it for the analytical solution). p0 = alpha*m*q/(S + alpha^2 m) = 0.69767442
# Initial vertical displacement (down is positive), resulting from instantaneous application of q (Note this is calculated by MOOSE: we only need it for the analytical solution). uz0 = q*m*h*S/(S + alpha^2 m)
# Final vertical displacement (down in positive) (Note this is calculated by MOOSE: we only need it for the analytical solution). uzinf = q*m*h
#
# The solution for porepressure is
# P = 4*p0/\pi \sum_{k=1}^{\infty} \frac{(-1)^{k-1}}{2k-1} \cos ((2k-1)\pi z/(2h)) \exp(-(2k-1)^2 \pi^2 ct/(4 h^2))
# This series converges very slowly for ct/h^2 small, so in that domain
# P = p0 erf( (1-(z/h))/(2 \sqrt(ct/h^2)) )
#
# The degree of consolidation is defined as
# U = (uz - uz0)/(uzinf - uz0)
# where uz0 and uzinf are defined above, and
# uz = the vertical displacement of the top (down is positive)
# U = 1 - (8/\pi^2)\sum_{k=1}^{\infty} \frac{1}{(2k-1)^2} \exp(-(2k-1)^2 \pi^2 ct/(4 h^2))
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 10
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = 0
zmax = 10
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
porepressure = porepressure
block = 0
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./porepressure]
[../]
[]
[BCs]
[./confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[../]
[./confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[../]
[./basefixed]
type = DirichletBC
variable = disp_z
value = 0
boundary = back
[../]
[./topdrained]
type = DirichletBC
variable = porepressure
value = 0
boundary = front
[../]
[./topload]
type = NeumannBC
variable = disp_z
value = -1
boundary = front
[../]
[]
[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 = 1.5
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '2 3'
# bulk modulus is lambda + 2*mu/3 = 2 + 2*3/3 = 4
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./poro_material]
type = PoroFullSatMaterial
porosity0 = 0.1
biot_coefficient = 0.6
solid_bulk_compliance = 0.25
fluid_bulk_compliance = 0.125
constant_porosity = true
[../]
[]
[Postprocessors]
[./p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
[../]
[./p1]
type = PointValue
outputs = csv
point = '0 0 1'
variable = porepressure
[../]
[./p2]
type = PointValue
outputs = csv
point = '0 0 2'
variable = porepressure
[../]
[./p3]
type = PointValue
outputs = csv
point = '0 0 3'
variable = porepressure
[../]
[./p4]
type = PointValue
outputs = csv
point = '0 0 4'
variable = porepressure
[../]
[./p5]
type = PointValue
outputs = csv
point = '0 0 5'
variable = porepressure
[../]
[./p6]
type = PointValue
outputs = csv
point = '0 0 6'
variable = porepressure
[../]
[./p7]
type = PointValue
outputs = csv
point = '0 0 7'
variable = porepressure
[../]
[./p8]
type = PointValue
outputs = csv
point = '0 0 8'
variable = porepressure
[../]
[./p9]
type = PointValue
outputs = csv
point = '0 0 9'
variable = porepressure
[../]
[./p99]
type = PointValue
outputs = csv
point = '0 0 10'
variable = porepressure
[../]
[./zdisp]
type = PointValue
outputs = csv
point = '0 0 10'
variable = disp_z
[../]
[./dt]
type = FunctionValuePostprocessor
outputs = console
function = if(0.5*t<0.1,0.5*t,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-14 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
[./TimeStepper]
type = PostprocessorDT
postprocessor = dt
dt = 0.0001
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = terzaghi
[./csv]
type = CSV
[../]
[]
(modules/richards/test/tests/sinks/s_fu_03.i)
# with fully_upwind = true
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = DensityConstBulk
relperm_UO = RelPermPower
SUPG_UO = SUPGstandard
sat_UO = Saturation
seff_UO = SeffVG
fully_upwind = true
[]
[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]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_pressure
[../]
[../]
[]
[AuxVariables]
[./seff]
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 2
[../]
[./mass_bal_fcn]
type = ParsedFunction
expression = abs((mi-lfout-rfout-mf)/2/(mi+mf))
symbol_names = 'mi mf lfout rfout'
symbol_values = 'mass_init mass_fin left_flux_out right_flux_out'
[../]
[]
[Postprocessors]
[./mass_init]
type = RichardsMass
variable = pressure
execute_on = timestep_begin
[../]
[./mass_fin]
type = RichardsMass
variable = pressure
execute_on = timestep_end
[../]
[./left_flux_out]
type = RichardsPiecewiseLinearSinkFlux
boundary = left
variable = pressure
pressures = '-1 1'
bare_fluxes = '1E2 2E2'
use_mobility = true
use_relperm = true
[../]
[./right_flux_out]
type = RichardsPiecewiseLinearSinkFlux
boundary = right
variable = pressure
pressures = '-1 1'
bare_fluxes = '1E2 2E2'
use_mobility = true
use_relperm = true
[../]
[./p0]
type = PointValue
point = '0 0 0'
variable = pressure
[../]
[./s0]
type = PointValue
point = '0 0 0'
variable = seff
[../]
[./mass_bal]
type = FunctionValuePostprocessor
function = mass_bal_fcn
[../]
[]
[BCs]
[./left_flux]
type = RichardsPiecewiseLinearSink
boundary = left
pressures = '-1 1'
bare_fluxes = '1E2 2E2'
variable = pressure
use_mobility = true
use_relperm = true
[../]
[./right_flux]
type = RichardsPiecewiseLinearSink
boundary = right
pressures = '-1 1'
bare_fluxes = '1E2 2E2'
variable = pressure
use_mobility = true
use_relperm = true
[../]
[]
[Kernels]
active = 'richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[]
[AuxKernels]
[./seff_auxk]
type = RichardsSeffAux
variable = seff
seff_UO = SeffVG
pressure_vars = 'pressure'
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-5 2.1E-5 2.2E-5 2.1E-5 0.1E-5 3.3E-5 2.2E-5 3.3E-5 2E-5'
viscosity = 1E-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-12 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 2E-3
end_time = 0.2
[]
[Outputs]
file_base = s_fu_03
csv = true
execute_on = timestep_end
[]
(modules/stochastic_tools/test/tests/controls/libtorch_drl_control/libtorch_drl_control.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 0.0
xmax = 7.0
nx = 20
[]
[]
[Variables]
[temp]
initial_condition = 300
[]
[]
[Kernels]
[time]
type = CoefTimeDerivative
variable = temp
Coefficient = '${fparse 1.00630182*1.225}'
[]
[heat_conduc]
type = MatDiffusion
variable = temp
diffusivity = 'k'
[]
[]
[BCs]
[left_flux]
type = NeumannBC
value = 0.0
boundary = 'left'
variable = temp
[]
[dirichlet]
type = FunctionDirichletBC
function = temp_env
variable = temp
boundary = 'right'
[]
[]
[Functions]
[temp_env]
type = ParsedFunction
value = '15.0*sin(t/86400.0 *pi) + 273.0'
[]
[]
[Materials]
[constant]
type = GenericConstantMaterial
prop_names = 'k'
prop_values = 26.53832364
[]
[]
[Postprocessors]
[center_temp]
type = PointValue
variable = temp
point = '3.5 0.0 0.0'
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[center_temp_tend]
type = PointValue
variable = temp
point = '3.5 0.0 0.0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[env_temp]
type = FunctionValuePostprocessor
function = temp_env
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[left_flux]
type = LibtorchControlValuePostprocessor
control_name = src_control
execute_on = 'INITIAL TIMESTEP_END'
[]
[log_prob_left_flux]
type = LibtorchDRLLogProbabilityPostprocessor
control_name = src_control
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Controls]
inactive = src_control_empty
[src_control]
seed = 11
type = LibtorchDRLControl
parameters = "BCs/left_flux/value"
responses = 'center_temp env_temp'
input_timesteps = 2
response_scaling_factors = '0.03 0.03'
response_shift_factors = '270 270'
action_standard_deviations = '0.1'
action_scaling_factors = 200
filename = 'mynet_control.net'
torch_script_format = false
num_neurons_per_layer = '16 6'
activation_function = 'relu'
execute_on = 'TIMESTEP_BEGIN'
[]
[src_control_empty]
type = LibtorchDRLControl
parameters = "BCs/left_flux/value"
responses = 'center_temp env_temp'
input_timesteps = 2
response_scaling_factors = '0.03 0.03'
response_shift_factors = '270 270'
action_standard_deviations = '0.1'
action_scaling_factors = 100
execute_on = 'TIMESTEP_BEGIN'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-8
start_time = 0.0
end_time = 18000
dt = 1800.0
[]
[Outputs]
csv = true
[]
(modules/porous_flow/test/tests/dirackernels/bh_except03.i)
# PorousFlowPeacemanBorehole exception test
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = 1E7
[]
[]
[Kernels]
[mass0]
type = TimeDerivative
variable = pp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
density0 = 1000
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
at_nodes = true # Needed to force expected error
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[DiracKernels]
[bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
point_file = bh02.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[]
[]
[Postprocessors]
[bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[]
[fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[]
[fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[]
[zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[]
[p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[]
[]
[Functions]
[mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[]
[]
[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 = 0.5
dt = 1E-2
solve_type = NEWTON
[]
(modules/porous_flow/test/tests/dirackernels/bh_except09.i)
# PorousFlowPeacemanBorehole exception test
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = 1E7
[]
[]
[Kernels]
[mass0]
type = TimeDerivative
variable = pp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
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
compute_enthalpy = false
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[DiracKernels]
[bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
point_file = bh02.bh
use_mobility = true
use_enthalpy = true
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[]
[]
[Postprocessors]
[bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[]
[fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[]
[fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[]
[zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[]
[p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[]
[]
[Functions]
[mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[]
[]
[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 = 0.5
dt = 1E-2
solve_type = NEWTON
[]
(test/tests/reporters/accumulated_reporter/accumulate_reporter.i)
[Mesh/mesh]
type = GeneratedMeshGenerator
dim = 1
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[Functions/fun]
type = ParsedFunction
expression = 't * x'
[]
[Postprocessors/pp]
type = FunctionValuePostprocessor
function = fun
point = '1 0 0'
execute_on = 'initial timestep_end'
[]
[VectorPostprocessors/vpp]
type = LineFunctionSampler
functions = fun
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 6
sort_by = x
execute_on = 'initial timestep_end'
[]
[Reporters]
[rep]
type = ConstantReporter
dof_id_type_names = 'dofid'
dof_id_type_values = '1'
integer_names = 'int'
integer_values = '1'
string_names = 'str'
string_values = 'two'
integer_vector_names = 'int_vec'
integer_vector_values = '3 4'
string_vector_names = 'str_vec'
string_vector_values = 'five six seven eight'
dof_id_type_vector_names = 'dofid_vec'
dof_id_type_vector_values = '1 2 3'
outputs = none
[]
[accumulate]
type = AccumulateReporter
reporters = 'pp/value vpp/fun rep/int rep/str rep/int_vec rep/str_vec rep/dofid rep/dofid_vec'
[]
[]
[Executioner]
type = Transient
num_steps = 5
# This is just testing that AccumulateReporter doesn't accumulate picard iterations
fixed_point_max_its = 3
custom_pp = pp
direct_pp_value = true
disable_fixed_point_residual_norm_check = true
accept_on_max_fixed_point_iteration = true
[]
[Outputs]
[out]
type = JSON
[]
[]
(modules/solid_mechanics/test/tests/recompute_radial_return/cp_affine_plasticity.i)
# Affine Plasticity Test for Transient Stress Eigenvalues with Stationary Eigenvectors
# This test is taken from K. Jamojjala, R. Brannon, A. Sadeghirad, J. Guilkey,
# "Verification tests in solid mechanics," Engineering with Computers, Vol 31.,
# p. 193-213.
# The test involves applying particular strains and expecting particular stresses.
# The material properties are:
# Yield in shear 165 MPa
# Shear modulus 79 GPa
# Poisson's ratio 1/3
# The strains are:
# Time e11 e22 e33
# 0 0 0 0
# 1 -0.003 -0.003 0.006
# 2 -0.0103923 0 0.0103923
# The expected stresses are:
# sigma11:
# -474*t 0 < t <= 0.201
# -95.26 0.201 < t <= 1
# (189.4+0.1704*sqrt(a)-0.003242*a)
# --------------------------------- 1 < t <= 2
# 1+0.00001712*a
# -189.4 t > 2 (paper erroneously gives a positive value)
#
# sigma22:
# -474*t 0 < t <= 0.201
# -95.26 0.201 < t <= 1
# -(76.87+1.443*sqrt(a)-0.001316*a)
# --------------------------------- 1 < t <= 2 (paper gives opposite sign)
# 1+0.00001712*a
# 76.87 t > 2
#
# sigma33:
# 948*t 0 < t <= 0.201
# 190.5 0.201 < t <= 1
# -(112.5-1.272*sqrt(a)-0.001926*a)
# --------------------------------- 1 < t <= 2 (paper has two sign errors here)
# 1+0.00001712*a
# 112.5 t > 2
#
# where a = exp(12.33*t).
#
# Note: If planning to run this case with strain type ComputeFiniteStrain, the
# displacement function must be adjusted. Instead of
# strain = (l - l0)/l0 = (u+l0 - l0)/l0 = u/l0
# with l0=1.0, we would have
# strain = log(l/l0) = log((u+l0)/l0)
# with l0=1.0. So, for strain = -0.003,
# -0.003 = log((u+l0)/l0) ->
# u = exp(-0.003)*l0 - l0 = -0.0029955044966269995.
#
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
block = '0'
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
# This test uses ElementalVariableValue postprocessors on specific
# elements, so element numbering needs to stay unchanged
allow_renumbering = false
[]
[Functions]
[disp_x]
type = PiecewiseLinear
x = '0. 1. 2.'
y = '0. -0.003 -0.0103923'
[]
[disp_y]
type = PiecewiseLinear
x = '0. 1. 2.'
y = '0. -0.003 0.'
[]
[disp_z]
type = PiecewiseLinear
x = '0. 1. 2.'
y = '0. 0.006 0.0103923'
[]
[stress_xx]
type = ParsedFunction
# The paper gives 0.201 as the time at initial yield, but 0.20097635952803425 is the exact value.
# The paper gives -95.26 MPa as the stress at yield, but -95.26279441628823 is the exact value.
# The paper gives 12.33 as the factor in the exponential, but 12.332921390339125 is the exact value.
# 189.409039923814000, 0.170423791206825, -0.003242011311945, 1.711645501845780E-05 - exact values
symbol_names = 'timeAtYield stressAtYield expFac a b c d'
symbol_values = '0.20097635952803425 -95.26279441628823 12.332921390339125 189.409039923814000 0.170423791206825 -0.003242011311945 1.711645501845780E-05'
value = '1e6*
if(t<=timeAtYield, -474*t,
if(t<=1, stressAtYield,
(a+b*sqrt(exp(expFac*t))+c*exp(expFac*t))/(1.0+d*exp(expFac*t))))' # tends to -a
[]
[stress_yy]
type = ParsedFunction
# The paper gives 0.201 as the time at initial yield, but 0.20097635952803425 is the exact value.
# the paper gives -95.26 MPa as the stress at yield, but -95.26279441628823 is the exact value.
# The paper gives 12.33 as the factor in the exponential, but 12.332921390339125 is the exact value.
# -76.867432297315000, -1.442488120272900, 0.001315697947301, 1.711645501845780E-05 - exact values
symbol_names = 'timeAtYield stressAtYield expFac a b c d'
symbol_values = '0.20097635952803425 -95.26279441628823 12.332921390339125 -76.867432297315000 -1.442488120272900 0.001315697947301 1.711645501845780E-05'
value = '1e6*
if(t<=timeAtYield, -474*t,
if(t<=1, stressAtYield,
(a+b*sqrt(exp(expFac*t))+c*exp(expFac*t))/(1.0+d*exp(expFac*t))))' # tends to -a
[]
[stress_zz]
type = ParsedFunction
# The paper gives 0.201 as the time at initial yield, but 0.20097635952803425 is the exact value.
# the paper gives 190.5 MPa as the stress at yield, but 190.52558883257645 is the exact value.
# The paper gives 12.33 as the factor in the exponential, but 12.332921390339125 is the exact value.
# -112.541607626499000, 1.272064329066080, 0.001926313364644, 1.711645501845780E-05 - exact values
symbol_names = 'timeAtYield stressAtYield expFac a b c d'
symbol_values = '0.20097635952803425 190.52558883257645 12.332921390339125 -112.541607626499000 1.272064329066080 0.001926313364644 1.711645501845780E-05'
value = '1e6*
if(t<=timeAtYield, 948*t,
if(t<=1, stressAtYield,
(a+b*sqrt(exp(expFac*t))+c*exp(expFac*t))/(1.0+d*exp(expFac*t))))' # tends to -a
[]
[]
[Variables]
[disp_x]
order = FIRST
family = LAGRANGE
[]
[disp_y]
order = FIRST
family = LAGRANGE
[]
[disp_z]
order = FIRST
family = LAGRANGE
[]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./vonmises]
order = CONSTANT
family = MONOMIAL
[../]
[./plastic_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./plastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./plastic_strain_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[SolidMechanics]
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = 'timestep_end'
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = 'timestep_end'
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
execute_on = 'timestep_end'
[../]
[./vonmises]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = vonmises
scalar_type = vonmisesStress
execute_on = 'timestep_end'
[../]
[./plastic_strain_xx]
type = RankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xx
index_i = 0
index_j = 0
execute_on = 'timestep_end'
[../]
[./plastic_strain_yy]
type = RankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_yy
index_i = 1
index_j = 1
execute_on = 'timestep_end'
[../]
[./plastic_strain_zz]
type = RankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_zz
index_i = 2
index_j = 2
execute_on = 'timestep_end'
[../]
[]
[BCs]
[fixed_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[fixed_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[fixed_z]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
[disp_x]
type = FunctionDirichletBC
variable = disp_x
boundary = right
function = disp_x
[]
[disp_y]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = disp_y
[]
[disp_z]
type = FunctionDirichletBC
variable = disp_z
boundary = front
function = disp_z
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 210666666666.666667
poissons_ratio = 0.3333333333333333
[../]
[./strain]
type = ComputeIncrementalSmallStrain
[../]
[creep]
type = PowerLawCreepStressUpdate
coefficient = 0
n_exponent = 1
m_exponent = 1
activation_energy = 0
temperature = 1
[]
[isotropic_plasticity]
type = IsotropicPlasticityStressUpdate
yield_stress = 285788383.2488647 # = sqrt(3)*165e6 = sqrt(3) * yield in shear
hardening_constant = 0.0
[]
[radial_return_stress]
type = ComputeCreepPlasticityStress
tangent_operator = elastic
creep_model = creep
plasticity_model = isotropic_plasticity
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_abs_tol = 1e-10
l_max_its = 20
start_time = 0.0
dt = 0.01 # use 0.0001 for a nearly exact match
end_time = 2.0
[]
[Postprocessors]
[analytic_xx]
type = FunctionValuePostprocessor
function = stress_xx
[]
[analytic_yy]
type = FunctionValuePostprocessor
function = stress_yy
[]
[analytic_zz]
type = FunctionValuePostprocessor
function = stress_zz
[]
[stress_xx]
type = ElementalVariableValue
variable = stress_xx
elementid = 0
[]
[stress_yy]
type = ElementalVariableValue
variable = stress_yy
elementid = 0
[]
[stress_zz]
type = ElementalVariableValue
variable = stress_zz
elementid = 0
[]
[stress_xx_l2_error]
type = ElementL2Error
variable = stress_xx
function = stress_xx
[]
[stress_yy_l2_error]
type = ElementL2Error
variable = stress_yy
function = stress_yy
[]
[stress_zz_l2_error]
type = ElementL2Error
variable = stress_zz
function = stress_zz
[]
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/optimization/invOpt_multiExperiment/forward.i)
omega = 1
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Functions]
[obj_func]
type = ParsedOptimizationFunction
expression = 'pow(x_val + 2 * y_val - ${omega}-5, 2) + pow(2 * x_val + y_val - ${omega}, 2)'
param_symbol_names = 'x_val y_val'
param_vector_name = vals/vals
[]
[df_dx]
type = ParsedOptimizationFunction
expression = '2 * (x_val + 2 * y_val - ${omega}-5) + 4 * (2 * x_val + y_val - ${omega})'
param_symbol_names = 'x_val y_val'
param_vector_name = vals/vals
[]
[df_dy]
type = ParsedOptimizationFunction
expression = '4 * (x_val + 2 * y_val - ${omega}-5) + 2 * (2 * x_val + y_val - ${omega})'
param_symbol_names = 'x_val y_val'
param_vector_name = vals/vals
[]
[]
[Postprocessors]
[obj_pp]
type = FunctionValuePostprocessor
function = obj_func
execute_on = 'INITIAL TIMESTEP_END'
# outputs = console
[]
[df_dx]
type = FunctionValuePostprocessor
function = df_dx
[]
[df_dy]
type = FunctionValuePostprocessor
function = df_dy
[]
[omega]
type=ConstantPostprocessor
value = ${omega}
[]
[]
[VectorPostprocessors]
[grad_f]
type = VectorOfPostprocessors
postprocessors = 'df_dx df_dy'
[]
[]
[Reporters]
[vals]
type = ConstantReporter
real_vector_names = 'vals'
real_vector_values = '0 0'
[]
[]
[Outputs]
console = false
[]
(test/tests/fvkernels/constraints/integral_transient.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 4
[]
[Variables]
[v]
type = MooseVariableFVReal
[]
[lambda]
type = MooseVariableScalar
[]
[]
[FVKernels]
[diff]
type = FVDiffusion
variable = v
coeff = coeff
[]
[average]
type = FVIntegralValueConstraint
variable = v
phi0 = phi0_pp
lambda = lambda
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = v
boundary = left
value = 7
[]
[]
[Materials]
[diff]
type = ADGenericFunctorMaterial
prop_names = 'coeff'
prop_values = '1'
[]
[]
[Postprocessors]
[phi0_pp]
type = FunctionValuePostprocessor
function = 't + 13'
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[Outputs]
exodus = 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/porous_flow/test/tests/sinks/s03.i)
# apply a sink flux with use_relperm=true and observe the correct behavior
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 2
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1.1
[]
[]
[Variables]
[pp]
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = -y
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.3
density0 = 1.1
thermal_expansion = 0
viscosity = 1.1
[]
[]
[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.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0.2 0 0 0 0.1 0 0 0 0.1'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[AuxVariables]
[flux_out]
[]
[xval]
[]
[yval]
[]
[]
[ICs]
[xval]
type = FunctionIC
variable = xval
function = x
[]
[yval]
type = FunctionIC
variable = yval
function = y
[]
[]
[Functions]
[mass00]
type = ParsedFunction
expression = 'vol*por*dens0*exp(pp/bulk)*pow(1+pow(-al*pp,1.0/(1-m)),-m)'
symbol_names = 'vol por dens0 pp bulk al m'
symbol_values = '0.25 0.1 1.1 p00 1.3 1.1 0.5'
[]
[sat00]
type = ParsedFunction
expression = 'pow(1+pow(-al*pp,1.0/(1-m)),-m)'
symbol_names = 'pp al m'
symbol_values = 'p00 1.1 0.5'
[]
[mass01]
type = ParsedFunction
expression = 'vol*por*dens0*exp(pp/bulk)*pow(1+pow(-al*pp,1.0/(1-m)),-m)'
symbol_names = 'vol por dens0 pp bulk al m'
symbol_values = '0.25 0.1 1.1 p01 1.3 1.1 0.5'
[]
[expected_mass_change00]
type = ParsedFunction
expression = 'fcn*pow(pow(1+pow(-al*pp,1.0/(1-m)),-m),2)*area*dt'
symbol_names = 'fcn perm dens0 pp bulk visc area dt al m'
symbol_values = '6 0.2 1.1 p00 1.3 1.1 0.5 1E-3 1.1 0.5'
[]
[expected_mass_change01]
type = ParsedFunction
expression = 'fcn*pow(pow(1+pow(-al*pp,1.0/(1-m)),-m),2)*area*dt'
symbol_names = 'fcn perm dens0 pp bulk visc area dt al m'
symbol_values = '6 0.2 1.1 p01 1.3 1.1 0.5 1E-3 1.1 0.5'
[]
[mass00_expect]
type = ParsedFunction
expression = 'mass_prev-mass_change'
symbol_names = 'mass_prev mass_change'
symbol_values = 'm00_prev del_m00'
[]
[mass01_expect]
type = ParsedFunction
expression = 'mass_prev-mass_change'
symbol_names = 'mass_prev mass_change'
symbol_values = 'm01_prev del_m01'
[]
[sat01]
type = ParsedFunction
expression = 'pow(1+pow(-al*pp,1.0/(1-m)),-m)'
symbol_names = 'pp al m'
symbol_values = 'p01 1.1 0.5'
[]
[expected_mass_change_rate]
type = ParsedFunction
expression = 'fcn*pow(pow(1+pow(-al*pp,1.0/(1-m)),-m),2)*area'
symbol_names = 'fcn perm dens0 pp bulk visc area dt al m'
symbol_values = '6 0.2 1.1 p00 1.3 1.1 0.5 1E-3 1.1 0.5'
[]
[]
[Postprocessors]
[p00]
type = PointValue
point = '0 0 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[m00]
type = FunctionValuePostprocessor
function = mass00
execute_on = 'initial timestep_end'
[]
[m00_prev]
type = FunctionValuePostprocessor
function = mass00
execute_on = 'timestep_begin'
outputs = 'console'
[]
[del_m00]
type = FunctionValuePostprocessor
function = expected_mass_change00
execute_on = 'timestep_end'
outputs = 'console'
[]
[m00_expect]
type = FunctionValuePostprocessor
function = mass00_expect
execute_on = 'timestep_end'
[]
[p10]
type = PointValue
point = '1 0 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[p01]
type = PointValue
point = '0 1 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[m01]
type = FunctionValuePostprocessor
function = mass01
execute_on = 'initial timestep_end'
[]
[m01_prev]
type = FunctionValuePostprocessor
function = mass01
execute_on = 'timestep_begin'
outputs = 'console'
[]
[del_m01]
type = FunctionValuePostprocessor
function = expected_mass_change01
execute_on = 'timestep_end'
outputs = 'console'
[]
[m01_expect]
type = FunctionValuePostprocessor
function = mass01_expect
execute_on = 'timestep_end'
[]
[p11]
type = PointValue
point = '1 1 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[s00]
type = FunctionValuePostprocessor
function = sat00
execute_on = 'initial timestep_end'
[]
[mass00_rate]
type = FunctionValuePostprocessor
function = expected_mass_change_rate
execute_on = 'initial timestep_end'
[]
[]
[BCs]
[flux]
type = PorousFlowSink
boundary = 'left'
variable = pp
use_mobility = false
use_relperm = true
fluid_phase = 0
flux_function = 6
save_in = flux_out
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -snes_max_it -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu 10 NONZERO 2'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E-3
end_time = 0.018
nl_rel_tol = 1E-12
nl_abs_tol = 1E-12
[]
[Outputs]
file_base = s03
[console]
type = Console
execute_on = 'nonlinear linear'
time_step_interval = 5
[]
[csv]
type = CSV
execute_on = 'timestep_end'
time_step_interval = 2
[]
[]
(modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined_fully_saturated.i)
# A sample is constrained on all sides, except its top
# and its boundaries are
# also impermeable. Fluid is pumped into the sample via a
# volumetric source (ie kg/second per cubic meter), and the
# rise in the top surface, porepressure, and stress are observed.
#
# In the standard poromechanics scenario, the Biot Modulus is held
# fixed and the source has units 1/time. Then the expected result
# is
# strain_zz = disp_z = BiotCoefficient*BiotModulus*s*t/((bulk + 4*shear/3) + BiotCoefficient^2*BiotModulus)
# porepressure = BiotModulus*(s*t - BiotCoefficient*strain_zz)
# stress_xx = (bulk - 2*shear/3)*strain_zz (remember this is effective stress)
# stress_zz = (bulk + 4*shear/3)*strain_zz (remember this is effective stress)
#
# In porous_flow, however, the source has units kg/s/m^3. The ratios remain
# fixed:
# stress_xx/strain_zz = (bulk - 2*shear/3) = 1 (for the parameters used here)
# stress_zz/strain_zz = (bulk + 4*shear/3) = 4 (for the parameters used here)
# porepressure/strain_zz = 13.3333333 (for the parameters used here)
#
# Expect
# disp_z = 0.3*10*s*t/((2 + 4*1.5/3) + 0.3^2*10) = 0.612245*s*t
# porepressure = 10*(s*t - 0.3*0.612245*s*t) = 8.163265*s*t
# stress_xx = (2 - 2*1.5/3)*0.612245*s*t = 0.612245*s*t
# stress_zz = (2 + 4*shear/3)*0.612245*s*t = 2.44898*s*t
# The relationship between the constant poroelastic source
# s (m^3/second/m^3) and the PorousFlow source, S (kg/second/m^3) is
# S = fluid_density * s = s * exp(porepressure/fluid_bulk)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back'
[]
[]
[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 = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
variable = disp_x
component = 0
[]
[poro_y]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
variable = disp_y
component = 1
[]
[poro_z]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
component = 2
variable = disp_z
[]
[mass0]
type = PorousFlowFullySaturatedMassTimeDerivative
variable = porepressure
coupling_type = HydroMechanical
biot_coefficient = 0.3
[]
[source]
type = BodyForce
function = '0.1*exp(8.163265306*0.1*t/3.3333333333)'
variable = porepressure
[]
[]
[AuxVariables]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xz]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_yz]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 3.3333333333
density0 = 1
thermal_expansion = 0
[]
[]
[Materials]
[temperature_qp]
type = PorousFlowTemperature
[]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
[]
[stress]
type = ComputeLinearElasticStress
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = porepressure
[]
[simple_fluid_qp]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst # the "const" is irrelevant here: all that uses Porosity is the BiotModulus, which just uses the initial value of porosity
porosity = 0.1
[]
[biot_modulus]
type = PorousFlowConstantBiotModulus
biot_coefficient = 0.3
fluid_bulk_modulus = 3.3333333333
solid_bulk_compliance = 0.5
[]
[]
[Postprocessors]
[p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
[]
[zdisp]
type = PointValue
outputs = csv
point = '0 0 0.5'
variable = disp_z
[]
[stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[]
[stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[]
[stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[]
[stress_xx_over_strain]
type = FunctionValuePostprocessor
function = stress_xx_over_strain_fcn
outputs = csv
[]
[stress_zz_over_strain]
type = FunctionValuePostprocessor
function = stress_zz_over_strain_fcn
outputs = csv
[]
[p_over_strain]
type = FunctionValuePostprocessor
function = p_over_strain_fcn
outputs = csv
[]
[]
[Functions]
[stress_xx_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'stress_xx zdisp'
[]
[stress_zz_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'stress_zz zdisp'
[]
[p_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'p0 zdisp'
[]
[]
[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-14 1E-10 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = pp_generation_unconfined_fully_saturated
[csv]
type = CSV
[]
[]
(modules/solid_mechanics/test/tests/rom_stress_update/3tile.i)
# Tests the tile and partition assembly for overlapping partitions and
# a variety of different overlapping tile conditions.
# Creep_rate should always be 2.718281828459
endtime = 1.9
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[temperature]
[]
[]
[AuxKernels]
[temp_aux]
type = FunctionAux
variable = temperature
function = temp_fcn
execute_on = 'initial timestep_begin'
[]
[]
[Functions]
[rhom_fcn]
type = PiecewiseConstant
x = '0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9'
y = '5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12'
direction = LEFT_INCLUSIVE
[]
[rhoi_fcn]
type = PiecewiseConstant
x = '0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9'
y = '4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11'
direction = LEFT_INCLUSIVE
[]
[vmJ2_fcn]
type = PiecewiseConstant
x = '0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9'
y = '25.68 25.68 45.0 55.28 63.0 67.12 85.0 85.0 85.0 85.0 85.0 85.0 55.28 63.0 67.12 63.0 63.0 55.28 96.72 63.0'
direction = LEFT_INCLUSIVE
[]
[evm_fcn]
type = PiecewiseConstant
x = '0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9'
y = '0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01'
direction = LEFT_INCLUSIVE
[]
[temp_fcn]
type = PiecewiseConstant
x = '0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9'
y = '940.0 940.0 940.0 940.0 940.0 940.0 940.0 905.0 897.0 881.0 860.0 821.0 860.0 881.0 897.0 897.0 905.0 897.0 860.0 860.0'
direction = LEFT_INCLUSIVE
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
generate_output = 'vonmises_stress'
[]
[]
[BCs]
[symmx]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[symmy]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[symmz]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[]
[pull_x]
type = DirichletBC
variable = disp_x
boundary = right
value = 1e-5 # This is required to make a non-zero effective trial stress so radial return is engaged
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
shear_modulus = 1e13
poissons_ratio = 0.3
[]
[stress]
type = ComputeMultipleInelasticStress
inelastic_models = rom_stress_prediction
[]
[rom_stress_prediction]
type = LAROMANCE3TileTest
temperature = temperature
effective_inelastic_strain_name = effective_creep_strain
internal_solve_full_iteration_history = true
apply_strain = false
outputs = all
verbose = true
wall_dislocation_density_forcing_function = rhoi_fcn
cell_dislocation_density_forcing_function = rhom_fcn
old_creep_strain_forcing_function = evm_fcn
wall_input_window_low_failure = ERROR
wall_input_window_high_failure = ERROR
cell_input_window_low_failure = ERROR
cell_input_window_high_failure = ERROR
temperature_input_window_low_failure = DONOTHING
temperature_input_window_high_failure = ERROR
stress_input_window_low_failure = DONOTHING
stress_input_window_high_failure = ERROR
old_strain_input_window_low_failure = ERROR
old_strain_input_window_high_failure = ERROR
environment_input_window_low_failure = ERROR
environment_input_window_high_failure = ERROR
effective_stress_forcing_function = vmJ2_fcn
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_abs_tol = 1e-1 # Nothing is really being solved here, so loose tolerances are okay
dt = 0.1
end_time = ${endtime}
timestep_tolerance = 1e-3
[]
[Postprocessors]
[extrapolation]
type = ElementAverageValue
variable = ROM_extrapolation
outputs = console
[]
[old_strain_in]
type = FunctionValuePostprocessor
function = evm_fcn
execute_on = 'TIMESTEP_END initial'
outputs = console
[]
[temperature]
type = ElementAverageValue
variable = temperature
[]
[partition_weight]
type = ElementAverageMaterialProperty
mat_prop = partition_weight
[]
[rhom_in]
type = FunctionValuePostprocessor
function = rhom_fcn
execute_on = 'TIMESTEP_END initial'
outputs = console
[]
[rhoi_in]
type = FunctionValuePostprocessor
function = rhoi_fcn
execute_on = 'TIMESTEP_END initial'
outputs = console
[]
[vmJ2_in]
type = FunctionValuePostprocessor
function = vmJ2_fcn
execute_on = 'TIMESTEP_END initial'
[]
[creep_rate]
type = ElementAverageMaterialProperty
mat_prop = creep_rate
[]
[rhom_rate]
type = ElementAverageMaterialProperty
mat_prop = cell_dislocation_rate
[]
[rhoi_rate]
type = ElementAverageMaterialProperty
mat_prop = wall_dislocation_rate
[]
[]
[Outputs]
csv = true
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
(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/solid_mechanics/test/tests/mean_cap_TC/random01.i)
# apply many random large deformations, checking that the algorithm returns correctly to
# the yield surface each time.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1000
ny = 125
nz = 1
xmin = 0
xmax = 1000
ymin = 0
ymax = 125
zmin = 0
zmax = 1
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[]
[ICs]
[./x]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_x
[../]
[./y]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_y
[../]
[./z]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_z
[../]
[]
[BCs]
[./x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'front back'
function = '0'
[../]
[./y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'front back'
function = '0'
[../]
[./z]
type = FunctionDirichletBC
variable = disp_z
boundary = 'front back'
function = '0'
[../]
[]
[AuxVariables]
[./yield_fcn]
order = CONSTANT
family = MONOMIAL
[../]
[./iter]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./yield_fcn_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_yield_function
variable = yield_fcn
[../]
[./iter]
type = MaterialRealAux
property = plastic_NR_iterations
variable = iter
[../]
[]
[Postprocessors]
[./max_yield_fcn]
type = ElementExtremeValue
variable = yield_fcn
outputs = 'console'
[../]
[./should_be_zero]
type = FunctionValuePostprocessor
function = should_be_zero_fcn
[../]
[./av_iter]
type = ElementAverageValue
variable = iter
outputs = 'console'
[../]
[]
[Functions]
[./should_be_zero_fcn]
type = ParsedFunction
expression = 'if(a<1E-3,0,a)'
symbol_names = 'a'
symbol_values = 'max_yield_fcn'
[../]
[]
[UserObjects]
[./tensile_strength]
type = SolidMechanicsHardeningConstant
value = 1
[../]
[./compressive_strength]
type = SolidMechanicsHardeningConstant
value = -1.5
[../]
[./cap]
type = SolidMechanicsPlasticMeanCapTC
tensile_strength = tensile_strength
compressive_strength = compressive_strength
yield_function_tolerance = 1E-3
internal_constraint_tolerance = 1E-9
use_custom_returnMap = false
use_custom_cto = false
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
fill_method = symmetric_isotropic
C_ijkl = '0.7E7 1E7'
[../]
[./strain]
type = ComputeIncrementalSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./mc]
type = ComputeMultiPlasticityStress
block = 0
max_NR_iterations = 2
ep_plastic_tolerance = 1E-6
plastic_models = cap
[../]
[]
[Executioner]
end_time = 1
dt = 1
type = Transient
[]
[Outputs]
file_base = random01
exodus = false
[./csv]
type = CSV
[../]
[]
(modules/thermal_hydraulics/test/tests/controls/parsed_function_control/test.i)
# This test takes a value of (a) function, (b) postprocessor, (c) scalar variable,
# (d) real-valued control value and (f) bool-valued control value and evaluates it via
# ParsedFunctionControl object
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[Functions]
[pps_fn]
type = ConstantFunction
value = 4
[]
[fn]
type = ConstantFunction
value = 5
[]
[]
[AuxVariables]
[sv]
family = SCALAR
order = FIRST
initial_condition = 0
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[]
[AuxScalarKernels]
[sv_ak]
type = ConstantScalarAux
variable = sv
value = 3
execute_on = 'timestep_begin'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Components]
[]
[Postprocessors]
[pps]
type = FunctionValuePostprocessor
function = pps_fn
execute_on = 'timestep_begin'
[]
[result]
type = RealControlDataValuePostprocessor
control_data_name = eval_ctrl:value
execute_on = 'timestep_end'
[]
[]
[ControlLogic]
[ctrl]
type = GetFunctionValueControl
function = 2
[]
[trip]
type = UnitTripControl
condition = 't > 0'
[]
[eval_ctrl]
type = ParsedFunctionControl
function = 'a + b + c + d + f'
symbol_names = 'a b c d f'
symbol_values = 'fn pps sv ctrl:value trip:state'
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 2
abort_on_solve_fail = true
[]
[Outputs]
csv = true
show = 'result'
[]
(modules/porous_flow/test/tests/hysteresis/1phase_3rd.i)
# Simple example of a 1-phase situation with hysteretic capillary pressure that involves a 3rd-order curve. Water is removed, added, removed and added to the system in order to observe the hysteresis
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
number_fluid_phases = 1
number_fluid_components = 1
porous_flow_vars = 'pp'
[]
[]
[Variables]
[pp]
initial_condition = 0
[]
[]
[Kernels]
[mass_conservation]
type = PorousFlowMassTimeDerivative
variable = pp
[]
[]
[DiracKernels]
[pump]
type = PorousFlowPointSourceFromPostprocessor
mass_flux = flux
point = '0.5 0 0'
variable = pp
[]
[]
[AuxVariables]
[sat]
family = MONOMIAL
order = CONSTANT
[]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[sat]
type = PorousFlowPropertyAux
variable = sat
property = saturation
[]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[temperature]
type = PorousFlowTemperature
temperature = 20
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[hys_order_material]
type = PorousFlowHysteresisOrder
[]
[pc_calculator]
type = PorousFlow1PhaseHysP
alpha_d = 10.0
alpha_w = 7.0
n_d = 1.5
n_w = 1.9
S_l_min = 0.1
S_lr = 0.2
S_gr_max = 0.3
Pc_max = 12.0
high_ratio = 0.9
low_extension_type = quadratic
high_extension_type = power
porepressure = pp
[]
[]
[Postprocessors]
[flux]
type = FunctionValuePostprocessor
function = 'if(t <= 9, -10, if(t <= 16, 10, if(t <= 22, -10, 10)))'
[]
[hys_order]
type = PointValue
point = '0 0 0'
variable = hys_order
[]
[sat]
type = PointValue
point = '0 0 0'
variable = sat
[]
[pp]
type = PointValue
point = '0 0 0'
variable = pp
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.5
end_time = 30.5
nl_abs_tol = 1E-10
[]
[Outputs]
csv = true
[]
(modules/porous_flow/test/tests/gravity/fully_saturated_upwinded_grav01c.i)
# Checking that gravity head is established
# 1phase, 2-component, constant fluid-bulk, constant viscosity, constant permeability
# fully saturated with fully-saturated Kernel with upwinding
# For better agreement with the analytical solution (ana_pp), just increase nx
# NOTE: this test is numerically delicate because the steady-state configuration is independent of the mass fraction, so the frac variable can assume any value as long as mass-fraction is conserved
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = -1
xmax = 0
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[InitialCondition]
type = RandomIC
min = 0
max = 1
[]
[]
[frac]
[InitialCondition]
type = RandomIC
min = 0
max = 1
[]
[]
[]
[Kernels]
[flux1]
type = PorousFlowFullySaturatedAdvectiveFlux
variable = pp
fluid_component = 1
gravity = '-1 0 0'
[]
[flux0]
type = PorousFlowFullySaturatedAdvectiveFlux
variable = frac
fluid_component = 0
gravity = '-1 0 0'
[]
[]
[Functions]
[ana_pp]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 1.2 0 1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[]
[BCs]
[z]
type = DirichletBC
variable = pp
boundary = right
value = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp frac'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.2
density0 = 1
viscosity = 1
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = frac
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[]
[Postprocessors]
[pp_base]
type = PointValue
variable = pp
point = '-1 0 0'
[]
[pp_analytical]
type = FunctionValuePostprocessor
function = ana_pp
point = '-1 0 0'
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = Newton
nl_rel_tol = 1E-12
petsc_options_iname = '-pc_factor_shift_type'
petsc_options_value = 'NONZERO'
nl_max_its = 100
[]
[Outputs]
csv = true
[]
(modules/porous_flow/test/tests/poro_elasticity/mandel.i)
# Mandel's problem of consolodation of a drained medium
#
# A sample is in plane strain.
# -a <= x <= a
# -b <= y <= b
# It is squashed with constant force by impermeable, frictionless plattens on its top and bottom surfaces (at y=+/-b)
# Fluid is allowed to leak out from its sides (at x=+/-a)
# The porepressure within the sample is monitored.
#
# As is common in the literature, this is simulated by
# considering the quarter-sample, 0<=x<=a and 0<=y<=b, with
# impermeable, roller BCs at x=0 and y=0 and y=b.
# Porepressure is fixed at zero on x=a.
# Porepressure and displacement are initialised to zero.
# Then the top (y=b) is moved downwards with prescribed velocity,
# so that the total force that is inducing this downwards velocity
# is fixed. The velocity is worked out by solving Mandel's problem
# analytically, and the total force is monitored in the simulation
# to check that it indeed remains constant.
#
# Here are the problem's parameters, and their values:
# Soil width. a = 1
# Soil height. b = 0.1
# Soil's Lame lambda. la = 0.5
# Soil's Lame mu, which is also the Soil's shear modulus. mu = G = 0.75
# Soil bulk modulus. K = la + 2*mu/3 = 1
# Drained Poisson ratio. nu = (3K - 2G)/(6K + 2G) = 0.2
# Soil bulk compliance. 1/K = 1
# Fluid bulk modulus. Kf = 8
# Fluid bulk compliance. 1/Kf = 0.125
# Soil initial porosity. phi0 = 0.1
# Biot coefficient. alpha = 0.6
# Biot modulus. M = 1/(phi0/Kf + (alpha - phi0)(1 - alpha)/K) = 4.705882
# Undrained bulk modulus. Ku = K + alpha^2*M = 2.694118
# Undrained Poisson ratio. nuu = (3Ku - 2G)/(6Ku + 2G) = 0.372627
# Skempton coefficient. B = alpha*M/Ku = 1.048035
# Fluid mobility (soil permeability/fluid viscosity). k = 1.5
# Consolidation coefficient. c = 2*k*B^2*G*(1-nu)*(1+nuu)^2/9/(1-nuu)/(nuu-nu) = 3.821656
# Normal stress on top. F = 1
#
# The solution for porepressure and displacements is given in
# AHD Cheng and E Detournay "A direct boundary element method for plane strain poroelasticity" International Journal of Numerical and Analytical Methods in Geomechanics 12 (1988) 551-572.
# The solution involves complicated infinite series, so I shall not write it here
#
# FINAL NOTE: The above solution assumes constant Biot Modulus.
# In porous_flow this is not true. Therefore the solution is
# a little different than in the paper. This test was therefore
# validated against MOOSE's poromechanics, which can choose either
# a constant Biot Modulus (which has been shown to agree with
# the analytic solution), or a non-constant Biot Modulus (which
# gives the same results as porous_flow).
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 0.1
zmin = 0
zmax = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.8
alpha = 1e-5
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[]
[BCs]
[roller_xmin]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left'
[]
[roller_ymin]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom'
[]
[plane_strain]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[]
[xmax_drained]
type = DirichletBC
variable = porepressure
value = 0
boundary = right
[]
[top_velocity]
type = FunctionDirichletBC
variable = disp_y
function = top_velocity
boundary = top
[]
[]
[Functions]
[top_velocity]
type = PiecewiseLinear
x = '0 0.002 0.006 0.014 0.03 0.046 0.062 0.078 0.094 0.11 0.126 0.142 0.158 0.174 0.19 0.206 0.222 0.238 0.254 0.27 0.286 0.302 0.318 0.334 0.35 0.366 0.382 0.398 0.414 0.43 0.446 0.462 0.478 0.494 0.51 0.526 0.542 0.558 0.574 0.59 0.606 0.622 0.638 0.654 0.67 0.686 0.702'
y = '-0.041824842 -0.042730269 -0.043412712 -0.04428867 -0.045509181 -0.04645965 -0.047268246 -0.047974749 -0.048597109 -0.0491467 -0.049632388 -0.050061697 -0.050441198 -0.050776675 -0.051073238 -0.0513354 -0.051567152 -0.051772022 -0.051953128 -0.052113227 -0.052254754 -0.052379865 -0.052490464 -0.052588233 -0.052674662 -0.052751065 -0.052818606 -0.052878312 -0.052931093 -0.052977751 -0.053018997 -0.053055459 -0.053087691 -0.053116185 -0.053141373 -0.05316364 -0.053183324 -0.053200724 -0.053216106 -0.053229704 -0.053241725 -0.053252351 -0.053261745 -0.053270049 -0.053277389 -0.053283879 -0.053289615'
[]
[]
[AuxVariables]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[tot_force]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[tot_force]
type = ParsedAux
coupled_variables = 'stress_yy porepressure'
execute_on = timestep_end
variable = tot_force
expression = '-stress_yy+0.6*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 = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.6
variable = disp_x
component = 0
[]
[poro_y]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.6
variable = disp_y
component = 1
[]
[poro_z]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.6
component = 2
variable = disp_z
[]
[poro_vol_exp]
type = PorousFlowMassVolumetricExpansion
variable = porepressure
fluid_component = 0
[]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = porepressure
[]
[flux]
type = PorousFlowAdvectiveFlux
variable = porepressure
gravity = '0 0 0'
fluid_component = 0
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 8
density0 = 1
thermal_expansion = 0
viscosity = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '0.5 0.75'
# bulk modulus is lambda + 2*mu/3 = 0.5 + 2*0.75/3 = 1
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = ComputeLinearElasticStress
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
ensure_positive = false
porosity_zero = 0.1
biot_coefficient = 0.6
solid_bulk = 1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1.5 0 0 0 1.5 0 0 0 1.5'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[]
[]
[Postprocessors]
[p0]
type = PointValue
outputs = csv
point = '0.0 0 0'
variable = porepressure
[]
[p1]
type = PointValue
outputs = csv
point = '0.1 0 0'
variable = porepressure
[]
[p2]
type = PointValue
outputs = csv
point = '0.2 0 0'
variable = porepressure
[]
[p3]
type = PointValue
outputs = csv
point = '0.3 0 0'
variable = porepressure
[]
[p4]
type = PointValue
outputs = csv
point = '0.4 0 0'
variable = porepressure
[]
[p5]
type = PointValue
outputs = csv
point = '0.5 0 0'
variable = porepressure
[]
[p6]
type = PointValue
outputs = csv
point = '0.6 0 0'
variable = porepressure
[]
[p7]
type = PointValue
outputs = csv
point = '0.7 0 0'
variable = porepressure
[]
[p8]
type = PointValue
outputs = csv
point = '0.8 0 0'
variable = porepressure
[]
[p9]
type = PointValue
outputs = csv
point = '0.9 0 0'
variable = porepressure
[]
[p99]
type = PointValue
outputs = csv
point = '1 0 0'
variable = porepressure
[]
[xdisp]
type = PointValue
outputs = csv
point = '1 0.1 0'
variable = disp_x
[]
[ydisp]
type = PointValue
outputs = csv
point = '1 0.1 0'
variable = disp_y
[]
[total_downwards_force]
type = ElementAverageValue
outputs = csv
variable = tot_force
[]
[dt]
type = FunctionValuePostprocessor
outputs = console
function = if(0.15*t<0.01,0.15*t,0.01)
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'gmres asm lu 1E-14 1E-10 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 0.7
[TimeStepper]
type = PostprocessorDT
postprocessor = dt
dt = 0.001
[]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = mandel
[csv]
time_step_interval = 3
type = CSV
[]
[]
(modules/porous_flow/examples/tutorial/11_2D.i)
# Two-phase borehole injection problem in RZ coordinates
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
xmin = 1.0
xmax = 10
bias_x = 1.4
ny = 3
ymin = -6
ymax = 6
[]
[aquifer]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 -2 0'
top_right = '10 2 0'
[]
[injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x<1.0001'
included_subdomains = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[]
[rename]
type = RenameBlockGenerator
old_block = '0 1'
new_block = 'caps aquifer'
input = 'injection_area'
[]
coord_type = RZ
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pwater pgas T disp_r'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
alpha = 1E-6
m = 0.6
[]
[]
[GlobalParams]
displacements = 'disp_r disp_z'
gravity = '0 0 0'
biot_coefficient = 1.0
PorousFlowDictator = dictator
[]
[Variables]
[pwater]
initial_condition = 20E6
[]
[pgas]
initial_condition = 20.1E6
[]
[T]
initial_condition = 330
scaling = 1E-5
[]
[disp_r]
scaling = 1E-5
[]
[]
[Kernels]
[mass_water_dot]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pwater
[]
[flux_water]
type = PorousFlowAdvectiveFlux
fluid_component = 0
use_displaced_mesh = false
variable = pwater
[]
[vol_strain_rate_water]
type = PorousFlowMassVolumetricExpansion
fluid_component = 0
variable = pwater
[]
[mass_co2_dot]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = pgas
[]
[flux_co2]
type = PorousFlowAdvectiveFlux
fluid_component = 1
use_displaced_mesh = false
variable = pgas
[]
[vol_strain_rate_co2]
type = PorousFlowMassVolumetricExpansion
fluid_component = 1
variable = pgas
[]
[energy_dot]
type = PorousFlowEnergyTimeDerivative
variable = T
[]
[advection]
type = PorousFlowHeatAdvection
use_displaced_mesh = false
variable = T
[]
[conduction]
type = PorousFlowHeatConduction
use_displaced_mesh = false
variable = T
[]
[vol_strain_rate_heat]
type = PorousFlowHeatVolumetricExpansion
variable = T
[]
[grad_stress_r]
type = StressDivergenceRZTensors
temperature = T
variable = disp_r
eigenstrain_names = thermal_contribution
use_displaced_mesh = false
component = 0
[]
[poro_r]
type = PorousFlowEffectiveStressCoupling
variable = disp_r
use_displaced_mesh = false
component = 0
[]
[]
[AuxVariables]
[disp_z]
[]
[effective_fluid_pressure]
family = MONOMIAL
order = CONSTANT
[]
[mass_frac_phase0_species0]
initial_condition = 1 # all water in phase=0
[]
[mass_frac_phase1_species0]
initial_condition = 0 # no water in phase=1
[]
[sgas]
family = MONOMIAL
order = CONSTANT
[]
[swater]
family = MONOMIAL
order = CONSTANT
[]
[stress_rr]
family = MONOMIAL
order = CONSTANT
[]
[stress_tt]
family = MONOMIAL
order = CONSTANT
[]
[stress_zz]
family = MONOMIAL
order = CONSTANT
[]
[porosity]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[effective_fluid_pressure]
type = ParsedAux
coupled_variables = 'pwater pgas swater sgas'
expression = 'pwater * swater + pgas * sgas'
variable = effective_fluid_pressure
[]
[swater]
type = PorousFlowPropertyAux
variable = swater
property = saturation
phase = 0
execute_on = timestep_end
[]
[sgas]
type = PorousFlowPropertyAux
variable = sgas
property = saturation
phase = 1
execute_on = timestep_end
[]
[stress_rr_aux]
type = RankTwoAux
variable = stress_rr
rank_two_tensor = stress
index_i = 0
index_j = 0
[]
[stress_tt]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_tt
index_i = 2
index_j = 2
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 1
index_j = 1
[]
[porosity]
type = PorousFlowPropertyAux
variable = porosity
property = porosity
execute_on = timestep_end
[]
[]
[BCs]
[pinned_top_bottom_r]
type = DirichletBC
variable = disp_r
value = 0
boundary = 'top bottom'
[]
[cavity_pressure_r]
type = Pressure
boundary = injection_area
variable = disp_r
postprocessor = constrained_effective_fluid_pressure_at_wellbore
use_displaced_mesh = false
[]
[cold_co2]
type = DirichletBC
boundary = injection_area
variable = T
value = 290 # injection temperature
use_displaced_mesh = false
[]
[constant_co2_injection]
type = PorousFlowSink
boundary = injection_area
variable = pgas
fluid_phase = 1
flux_function = -1E-4
use_displaced_mesh = false
[]
[outer_water_removal]
type = PorousFlowPiecewiseLinearSink
boundary = right
variable = pwater
fluid_phase = 0
pt_vals = '0 1E9'
multipliers = '0 1E8'
PT_shift = 20E6
use_mobility = true
use_relperm = true
use_displaced_mesh = false
[]
[outer_co2_removal]
type = PorousFlowPiecewiseLinearSink
boundary = right
variable = pgas
fluid_phase = 1
pt_vals = '0 1E9'
multipliers = '0 1E8'
PT_shift = 20.1E6
use_mobility = true
use_relperm = true
use_displaced_mesh = false
[]
[]
[FluidProperties]
[true_water]
type = Water97FluidProperties
[]
[tabulated_water]
type = TabulatedBicubicFluidProperties
fp = true_water
temperature_min = 275
pressure_max = 1E8
fluid_property_file = water97_tabulated_11.csv
[]
[true_co2]
type = CO2FluidProperties
[]
[tabulated_co2]
type = TabulatedBicubicFluidProperties
fp = true_co2
temperature_min = 275
pressure_max = 1E8
fluid_property_file = co2_tabulated_11.csv
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = T
[]
[saturation_calculator]
type = PorousFlow2PhasePP
phase0_porepressure = pwater
phase1_porepressure = pgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'mass_frac_phase0_species0 mass_frac_phase1_species0'
[]
[water]
type = PorousFlowSingleComponentFluid
fp = tabulated_water
phase = 0
[]
[co2]
type = PorousFlowSingleComponentFluid
fp = tabulated_co2
phase = 1
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
n = 4
s_res = 0.1
sum_s_res = 0.2
phase = 0
[]
[relperm_co2]
type = PorousFlowRelativePermeabilityBC
nw_phase = true
lambda = 2
s_res = 0.1
sum_s_res = 0.2
phase = 1
[]
[porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
thermal = true
porosity_zero = 0.1
reference_temperature = 330
reference_porepressure = 20E6
thermal_expansion_coeff = 15E-6 # volumetric
solid_bulk = 8E9 # unimportant since biot = 1
[]
[permeability_aquifer]
type = PorousFlowPermeabilityKozenyCarman
block = aquifer
poroperm_function = kozeny_carman_phi0
phi0 = 0.1
n = 2
m = 2
k0 = 1E-12
[]
[permeability_caps]
type = PorousFlowPermeabilityKozenyCarman
block = caps
poroperm_function = kozeny_carman_phi0
phi0 = 0.1
n = 2
m = 2
k0 = 1E-15
k_anisotropy = '1 0 0 0 1 0 0 0 0.1'
[]
[rock_thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '2 0 0 0 2 0 0 0 2'
[]
[rock_internal_energy]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 1100
density = 2300
[]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 5E9
poissons_ratio = 0.0
[]
[strain]
type = ComputeAxisymmetricRZSmallStrain
eigenstrain_names = 'thermal_contribution initial_stress'
[]
[thermal_contribution]
type = ComputeThermalExpansionEigenstrain
temperature = T
thermal_expansion_coeff = 5E-6 # this is the linear thermal expansion coefficient
eigenstrain_name = thermal_contribution
stress_free_temperature = 330
[]
[initial_strain]
type = ComputeEigenstrainFromInitialStress
initial_stress = '20E6 0 0 0 20E6 0 0 0 20E6'
eigenstrain_name = initial_stress
[]
[stress]
type = ComputeLinearElasticStress
[]
[effective_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[volumetric_strain]
type = PorousFlowVolumetricStrain
[]
[]
[Postprocessors]
[effective_fluid_pressure_at_wellbore]
type = PointValue
variable = effective_fluid_pressure
point = '1 0 0'
execute_on = timestep_begin
use_displaced_mesh = false
[]
[constrained_effective_fluid_pressure_at_wellbore]
type = FunctionValuePostprocessor
function = constrain_effective_fluid_pressure
execute_on = timestep_begin
[]
[]
[Functions]
[constrain_effective_fluid_pressure]
type = ParsedFunction
symbol_names = effective_fluid_pressure_at_wellbore
symbol_values = effective_fluid_pressure_at_wellbore
expression = 'max(effective_fluid_pressure_at_wellbore, 20E6)'
[]
[]
[Preconditioning]
active = basic
[basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E3
[TimeStepper]
type = IterationAdaptiveDT
dt = 1E3
growth_factor = 1.2
optimal_iterations = 10
[]
nl_abs_tol = 1E-7
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/rom_stress_update/nonad_verification.i)
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[temperature]
[]
[]
[AuxKernels]
[temp_aux]
type = FunctionAux
variable = temperature
function = temp_fcn
execute_on = 'initial timestep_begin'
[]
[]
[Functions]
[rhom_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 1
format = columns
xy_in_file_only = false
direction = LEFT_INCLUSIVE
[]
[rhoi_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 2
format = columns
xy_in_file_only = false
direction = LEFT_INCLUSIVE
[]
[vmJ2_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 3
format = columns
xy_in_file_only = false
direction = LEFT_INCLUSIVE
[]
[evm_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 4
format = columns
xy_in_file_only = false
direction = LEFT_INCLUSIVE
[]
[temp_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 5
format = columns
xy_in_file_only = false
direction = LEFT_INCLUSIVE
[]
[rhom_soln_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 7
format = columns
xy_in_file_only = false
direction = LEFT_INCLUSIVE
[]
[rhoi_soln_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 8
format = columns
xy_in_file_only = false
direction = LEFT_INCLUSIVE
[]
[creep_rate_soln_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 10
format = columns
xy_in_file_only = false
direction = LEFT_INCLUSIVE
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
generate_output = 'vonmises_stress'
[]
[]
[BCs]
[symmx]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[symmy]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[symmz]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[]
[pull_x]
type = DirichletBC
variable = disp_x
boundary = right
value = 1e-5 # This is required to make a non-zero effective trial stress so radial return is engaged
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
shear_modulus = 1e13
poissons_ratio = 0.3
[]
[stress]
type = ComputeMultipleInelasticStress
inelastic_models = rom_stress_prediction
[]
[rom_stress_prediction]
type = SS316HLAROMANCEStressUpdateTest
temperature = temperature
effective_inelastic_strain_name = effective_creep_strain
internal_solve_full_iteration_history = true
apply_strain = false
outputs = all
wall_dislocation_density_forcing_function = rhoi_fcn
cell_dislocation_density_forcing_function = rhom_fcn
old_creep_strain_forcing_function = evm_fcn
wall_input_window_low_failure = ERROR
wall_input_window_high_failure = ERROR
cell_input_window_low_failure = ERROR
cell_input_window_high_failure = ERROR
temperature_input_window_low_failure = ERROR
temperature_input_window_high_failure = ERROR
stress_input_window_low_failure = ERROR
stress_input_window_high_failure = ERROR
old_strain_input_window_low_failure = ERROR
old_strain_input_window_high_failure = ERROR
environment_input_window_low_failure = ERROR
environment_input_window_high_failure = ERROR
effective_stress_forcing_function = vmJ2_fcn
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_abs_tol = 1e-1 # Nothing is really being solved here, so loose tolerances are okay
dt = 1e-3
end_time = 1e-2
timestep_tolerance = 1e-3
[]
[Postprocessors]
[extrapolation]
type = ElementAverageValue
variable = ROM_extrapolation
outputs = console
[]
[old_strain_in]
type = FunctionValuePostprocessor
function = evm_fcn
execute_on = 'TIMESTEP_END initial'
outputs = console
[]
[temperature]
type = ElementAverageValue
variable = temperature
outputs = console
[]
[rhom]
type = ElementAverageValue
variable = cell_dislocations
[]
[rhoi]
type = ElementAverageValue
variable = wall_dislocations
[]
[creep_rate]
type = ElementAverageValue
variable = creep_rate
[]
[rhom_in]
type = FunctionValuePostprocessor
function = rhom_fcn
execute_on = 'TIMESTEP_END initial'
outputs = console
[]
[rhoi_in]
type = FunctionValuePostprocessor
function = rhoi_fcn
execute_on = 'TIMESTEP_END initial'
outputs = console
[]
[vmJ2_in]
type = FunctionValuePostprocessor
function = vmJ2_fcn
execute_on = 'TIMESTEP_END initial'
outputs = console
[]
[rhom_soln]
type = FunctionValuePostprocessor
function = rhom_soln_fcn
outputs = console
[]
[rhoi_soln]
type = FunctionValuePostprocessor
function = rhoi_soln_fcn
outputs = console
[]
[creep_rate_soln]
type = FunctionValuePostprocessor
function = creep_rate_soln_fcn
[]
[rhom_diff]
type = ParsedPostprocessor
pp_names = 'rhom_soln rhom'
function = '(rhom_soln - rhom) / rhom_soln'
outputs = console
[]
[rhoi_diff]
type = ParsedPostprocessor
pp_names = 'rhoi_soln rhoi'
function = '(rhoi_soln - rhoi) / rhoi_soln'
outputs = console
[]
[creep_rate_diff]
type = ParsedPostprocessor
pp_names = 'creep_rate creep_rate_soln'
function = '(creep_rate_soln - creep_rate) / creep_rate_soln'
outputs = console
[]
[z_rhom_max_diff]
type = TimeExtremeValue
postprocessor = rhom_diff
value_type = abs_max
[]
[z_rhoi_max_diff]
type = TimeExtremeValue
postprocessor = rhoi_diff
value_type = abs_max
[]
[z_creep_rate_max_diff]
type = TimeExtremeValue
postprocessor = creep_rate_diff
value_type = abs_max
[]
[]
[Outputs]
csv = true
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
(test/tests/outputs/pp_as_reporter/pp_as_reporter.i)
[Mesh/gen]
type = GeneratedMeshGenerator
dim = 1
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Postprocessors/data]
type = FunctionValuePostprocessor
function = 1980
[]
[Outputs]
[out]
type = JSON
postprocessors_as_reporters = true
[]
[]
(modules/solid_mechanics/test/tests/mohr_coulomb/planar_hard4.i)
# apply repeated stretches in x direction, and smaller stretches along the y and z directions,
# so that sigma_II = sigma_III,
# which means that lode angle = -30deg.
# Both return to the edge (at lode_angle=-30deg, ie 000101) and tip are experienced.
#
# It is checked that the yield functions are less than their tolerance values
# It is checked that the cohesion hardens correctly
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[]
[BCs]
[./x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'front back'
function = '0.05E-6*x*t'
[../]
[./y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'front back'
function = '0.05E-6*y*t'
[../]
[./z]
type = FunctionDirichletBC
variable = disp_z
boundary = 'front back'
function = '1E-6*z*t'
[../]
[]
[Functions]
[./should_be_zero_fcn]
type = ParsedFunction
expression = 'if((a<1E-5)&(b<1E-5)&(c<1E-5)&(d<1E-5)&(g<1E-5)&(h<1E-5),0,abs(a)+abs(b)+abs(c)+abs(d)+abs(g)+abs(h))'
symbol_names = 'a b c d g h'
symbol_values = 'f0 f1 f2 f3 f4 f5'
[../]
[./coh_analytic]
type = ParsedFunction
expression = '20-10*exp(-1E5*intnl)'
symbol_names = intnl
symbol_values = internal
[../]
[./coh_from_yieldfcns]
type = ParsedFunction
expression = '(f0+f1-(sxx+syy)*sin(phi))/(-2)/cos(phi)'
symbol_names = 'f0 f1 sxx syy phi'
symbol_values = 'f0 f1 s_xx s_yy 0.8726646'
[../]
[./should_be_zero_coh]
type = ParsedFunction
expression = 'if(abs(a-b)<1E-6,0,1E6*abs(a-b))'
symbol_names = 'a b'
symbol_values = 'Coh_analytic Coh_moose'
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_int]
order = CONSTANT
family = MONOMIAL
[../]
[./yield_fcn0]
order = CONSTANT
family = MONOMIAL
[../]
[./yield_fcn1]
order = CONSTANT
family = MONOMIAL
[../]
[./yield_fcn2]
order = CONSTANT
family = MONOMIAL
[../]
[./yield_fcn3]
order = CONSTANT
family = MONOMIAL
[../]
[./yield_fcn4]
order = CONSTANT
family = MONOMIAL
[../]
[./yield_fcn5]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./mc_int_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_internal_parameter
variable = mc_int
[../]
[./yield_fcn0]
type = MaterialStdVectorAux
index = 0
property = plastic_yield_function
variable = yield_fcn0
[../]
[./yield_fcn1]
type = MaterialStdVectorAux
index = 1
property = plastic_yield_function
variable = yield_fcn1
[../]
[./yield_fcn2]
type = MaterialStdVectorAux
index = 2
property = plastic_yield_function
variable = yield_fcn2
[../]
[./yield_fcn3]
type = MaterialStdVectorAux
index = 3
property = plastic_yield_function
variable = yield_fcn3
[../]
[./yield_fcn4]
type = MaterialStdVectorAux
index = 4
property = plastic_yield_function
variable = yield_fcn4
[../]
[./yield_fcn5]
type = MaterialStdVectorAux
index = 5
property = plastic_yield_function
variable = yield_fcn5
[../]
[]
[Postprocessors]
[./s_xx]
type = PointValue
point = '0 0 0'
variable = stress_xx
[../]
[./s_xy]
type = PointValue
point = '0 0 0'
variable = stress_xy
[../]
[./s_xz]
type = PointValue
point = '0 0 0'
variable = stress_xz
[../]
[./s_yy]
type = PointValue
point = '0 0 0'
variable = stress_yy
[../]
[./s_yz]
type = PointValue
point = '0 0 0'
variable = stress_yz
[../]
[./s_zz]
type = PointValue
point = '0 0 0'
variable = stress_zz
[../]
[./internal]
type = PointValue
point = '0 0 0'
variable = mc_int
[../]
[./f0]
type = PointValue
point = '0 0 0'
variable = yield_fcn0
[../]
[./f1]
type = PointValue
point = '0 0 0'
variable = yield_fcn1
[../]
[./f2]
type = PointValue
point = '0 0 0'
variable = yield_fcn2
[../]
[./f3]
type = PointValue
point = '0 0 0'
variable = yield_fcn3
[../]
[./f4]
type = PointValue
point = '0 0 0'
variable = yield_fcn4
[../]
[./f5]
type = PointValue
point = '0 0 0'
variable = yield_fcn5
[../]
[./yfcns_should_be_zero]
type = FunctionValuePostprocessor
function = should_be_zero_fcn
[../]
[./Coh_analytic]
type = FunctionValuePostprocessor
function = coh_analytic
[../]
[./Coh_moose]
type = FunctionValuePostprocessor
function = coh_from_yieldfcns
[../]
[./cohesion_difference_should_be_zero]
type = FunctionValuePostprocessor
function = should_be_zero_coh
[../]
[]
[UserObjects]
[./mc_coh]
type = SolidMechanicsHardeningExponential
value_0 = 10
value_residual = 20
rate = 1E5
[../]
[./mc_phi]
type = SolidMechanicsHardeningConstant
value = 0.8726646
[../]
[./mc_psi]
type = SolidMechanicsHardeningConstant
value = 1 #0.8726646 # 50deg
[../]
[./mc]
type = SolidMechanicsPlasticMohrCoulombMulti
cohesion = mc_coh
friction_angle = mc_phi
dilation_angle = mc_psi
use_custom_returnMap = true
yield_function_tolerance = 1E-5
internal_constraint_tolerance = 1E-9
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
fill_method = symmetric_isotropic
C_ijkl = '0 1E7'
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./mc]
type = ComputeMultiPlasticityStress
block = 0
ep_plastic_tolerance = 1E-12
plastic_models = mc
[../]
[]
[Executioner]
end_time = 10
dt = 2
type = Transient
[]
[Outputs]
file_base = planar_hard4
exodus = false
[./csv]
type = CSV
hide = 'f0 f1 f2 f3 f4 f5 s_xy s_xz s_yz Coh_analytic Coh_moose'
execute_on = 'timestep_end'
[../]
[]
(modules/porous_flow/examples/tutorial/11.i)
# Two-phase borehole injection problem
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[make3D]
input = annular
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
[]
[shift_down]
type = TransformGenerator
transform = TRANSLATE
vector_value = '0 0 -6'
input = make3D
[]
[aquifer]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 -2'
top_right = '10 10 2'
input = shift_down
[]
[injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x*x+y*y<1.01'
included_subdomains = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[]
[rename]
type = RenameBlockGenerator
old_block = '0 1'
new_block = 'caps aquifer'
input = 'injection_area'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pwater pgas T disp_x disp_y'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
alpha = 1E-6
m = 0.6
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
gravity = '0 0 0'
biot_coefficient = 1.0
PorousFlowDictator = dictator
[]
[Variables]
[pwater]
initial_condition = 20E6
[]
[pgas]
initial_condition = 20.1E6
[]
[T]
initial_condition = 330
scaling = 1E-5
[]
[disp_x]
scaling = 1E-5
[]
[disp_y]
scaling = 1E-5
[]
[]
[Kernels]
[mass_water_dot]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pwater
[]
[flux_water]
type = PorousFlowAdvectiveFlux
fluid_component = 0
use_displaced_mesh = false
variable = pwater
[]
[vol_strain_rate_water]
type = PorousFlowMassVolumetricExpansion
fluid_component = 0
variable = pwater
[]
[mass_co2_dot]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = pgas
[]
[flux_co2]
type = PorousFlowAdvectiveFlux
fluid_component = 1
use_displaced_mesh = false
variable = pgas
[]
[vol_strain_rate_co2]
type = PorousFlowMassVolumetricExpansion
fluid_component = 1
variable = pgas
[]
[energy_dot]
type = PorousFlowEnergyTimeDerivative
variable = T
[]
[advection]
type = PorousFlowHeatAdvection
use_displaced_mesh = false
variable = T
[]
[conduction]
type = PorousFlowHeatConduction
use_displaced_mesh = false
variable = T
[]
[vol_strain_rate_heat]
type = PorousFlowHeatVolumetricExpansion
variable = T
[]
[grad_stress_x]
type = StressDivergenceTensors
temperature = T
variable = disp_x
eigenstrain_names = thermal_contribution
use_displaced_mesh = false
component = 0
[]
[poro_x]
type = PorousFlowEffectiveStressCoupling
variable = disp_x
use_displaced_mesh = false
component = 0
[]
[grad_stress_y]
type = StressDivergenceTensors
temperature = T
variable = disp_y
eigenstrain_names = thermal_contribution
use_displaced_mesh = false
component = 1
[]
[poro_y]
type = PorousFlowEffectiveStressCoupling
variable = disp_y
use_displaced_mesh = false
component = 1
[]
[]
[AuxVariables]
[disp_z]
[]
[effective_fluid_pressure]
family = MONOMIAL
order = CONSTANT
[]
[mass_frac_phase0_species0]
initial_condition = 1 # all water in phase=0
[]
[mass_frac_phase1_species0]
initial_condition = 0 # no water in phase=1
[]
[sgas]
family = MONOMIAL
order = CONSTANT
[]
[swater]
family = MONOMIAL
order = CONSTANT
[]
[stress_rr]
family = MONOMIAL
order = CONSTANT
[]
[stress_tt]
family = MONOMIAL
order = CONSTANT
[]
[stress_zz]
family = MONOMIAL
order = CONSTANT
[]
[porosity]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[effective_fluid_pressure]
type = ParsedAux
coupled_variables = 'pwater pgas swater sgas'
expression = 'pwater * swater + pgas * sgas'
variable = effective_fluid_pressure
[]
[swater]
type = PorousFlowPropertyAux
variable = swater
property = saturation
phase = 0
execute_on = timestep_end
[]
[sgas]
type = PorousFlowPropertyAux
variable = sgas
property = saturation
phase = 1
execute_on = timestep_end
[]
[stress_rr]
type = RankTwoScalarAux
variable = stress_rr
rank_two_tensor = stress
scalar_type = RadialStress
point1 = '0 0 0'
point2 = '0 0 1'
execute_on = timestep_end
[]
[stress_tt]
type = RankTwoScalarAux
variable = stress_tt
rank_two_tensor = stress
scalar_type = HoopStress
point1 = '0 0 0'
point2 = '0 0 1'
execute_on = timestep_end
[]
[stress_zz]
type = RankTwoAux
variable = stress_zz
rank_two_tensor = stress
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[porosity]
type = PorousFlowPropertyAux
variable = porosity
property = porosity
execute_on = timestep_end
[]
[]
[BCs]
[roller_tmax]
type = DirichletBC
variable = disp_x
value = 0
boundary = dmax
[]
[roller_tmin]
type = DirichletBC
variable = disp_y
value = 0
boundary = dmin
[]
[pinned_top_bottom_x]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'top bottom'
[]
[pinned_top_bottom_y]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'top bottom'
[]
[cavity_pressure_x]
type = Pressure
boundary = injection_area
variable = disp_x
component = 0
postprocessor = constrained_effective_fluid_pressure_at_wellbore
use_displaced_mesh = false
[]
[cavity_pressure_y]
type = Pressure
boundary = injection_area
variable = disp_y
component = 1
postprocessor = constrained_effective_fluid_pressure_at_wellbore
use_displaced_mesh = false
[]
[cold_co2]
type = DirichletBC
boundary = injection_area
variable = T
value = 290 # injection temperature
use_displaced_mesh = false
[]
[constant_co2_injection]
type = PorousFlowSink
boundary = injection_area
variable = pgas
fluid_phase = 1
flux_function = -1E-4
use_displaced_mesh = false
[]
[outer_water_removal]
type = PorousFlowPiecewiseLinearSink
boundary = rmax
variable = pwater
fluid_phase = 0
pt_vals = '0 1E9'
multipliers = '0 1E8'
PT_shift = 20E6
use_mobility = true
use_relperm = true
use_displaced_mesh = false
[]
[outer_co2_removal]
type = PorousFlowPiecewiseLinearSink
boundary = rmax
variable = pgas
fluid_phase = 1
pt_vals = '0 1E9'
multipliers = '0 1E8'
PT_shift = 20.1E6
use_mobility = true
use_relperm = true
use_displaced_mesh = false
[]
[]
[FluidProperties]
[true_water]
type = Water97FluidProperties
[]
[tabulated_water]
type = TabulatedFluidProperties
fp = true_water
temperature_min = 275
pressure_max = 1E8
interpolated_properties = 'density viscosity enthalpy internal_energy'
fluid_property_file = water97_tabulated_11.csv
[]
[true_co2]
type = CO2FluidProperties
[]
[tabulated_co2]
type = TabulatedFluidProperties
fp = true_co2
temperature_min = 275
pressure_max = 1E8
interpolated_properties = 'density viscosity enthalpy internal_energy'
fluid_property_file = co2_tabulated_11.csv
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = T
[]
[saturation_calculator]
type = PorousFlow2PhasePP
phase0_porepressure = pwater
phase1_porepressure = pgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'mass_frac_phase0_species0 mass_frac_phase1_species0'
[]
[water]
type = PorousFlowSingleComponentFluid
fp = tabulated_water
phase = 0
[]
[co2]
type = PorousFlowSingleComponentFluid
fp = tabulated_co2
phase = 1
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
n = 4
s_res = 0.1
sum_s_res = 0.2
phase = 0
[]
[relperm_co2]
type = PorousFlowRelativePermeabilityBC
nw_phase = true
lambda = 2
s_res = 0.1
sum_s_res = 0.2
phase = 1
[]
[porosity_mat]
type = PorousFlowPorosity
fluid = true
mechanical = true
thermal = true
porosity_zero = 0.1
reference_temperature = 330
reference_porepressure = 20E6
thermal_expansion_coeff = 15E-6 # volumetric
solid_bulk = 8E9 # unimportant since biot = 1
[]
[permeability_aquifer]
type = PorousFlowPermeabilityKozenyCarman
block = aquifer
poroperm_function = kozeny_carman_phi0
phi0 = 0.1
n = 2
m = 2
k0 = 1E-12
[]
[permeability_caps]
type = PorousFlowPermeabilityKozenyCarman
block = caps
poroperm_function = kozeny_carman_phi0
phi0 = 0.1
n = 2
m = 2
k0 = 1E-15
k_anisotropy = '1 0 0 0 1 0 0 0 0.1'
[]
[rock_thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '2 0 0 0 2 0 0 0 2'
[]
[rock_internal_energy]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 1100
density = 2300
[]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 5E9
poissons_ratio = 0.0
[]
[strain]
type = ComputeSmallStrain
eigenstrain_names = 'thermal_contribution initial_stress'
[]
[thermal_contribution]
type = ComputeThermalExpansionEigenstrain
temperature = T
thermal_expansion_coeff = 5E-6 # this is the linear thermal expansion coefficient
eigenstrain_name = thermal_contribution
stress_free_temperature = 330
[]
[initial_strain]
type = ComputeEigenstrainFromInitialStress
initial_stress = '20E6 0 0 0 20E6 0 0 0 20E6'
eigenstrain_name = initial_stress
[]
[stress]
type = ComputeLinearElasticStress
[]
[effective_fluid_pressure_mat]
type = PorousFlowEffectiveFluidPressure
[]
[volumetric_strain]
type = PorousFlowVolumetricStrain
[]
[]
[Postprocessors]
[effective_fluid_pressure_at_wellbore]
type = PointValue
variable = effective_fluid_pressure
point = '1 0 0'
execute_on = timestep_begin
use_displaced_mesh = false
[]
[constrained_effective_fluid_pressure_at_wellbore]
type = FunctionValuePostprocessor
function = constrain_effective_fluid_pressure
execute_on = timestep_begin
[]
[]
[Functions]
[constrain_effective_fluid_pressure]
type = ParsedFunction
symbol_names = effective_fluid_pressure_at_wellbore
symbol_values = effective_fluid_pressure_at_wellbore
expression = 'max(effective_fluid_pressure_at_wellbore, 20E6)'
[]
[]
[Preconditioning]
active = basic
[basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E3
[TimeStepper]
type = IterationAdaptiveDT
dt = 1E3
growth_factor = 1.2
optimal_iterations = 10
[]
nl_abs_tol = 1E-7
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/sinks/s01.i)
# apply a sink flux and observe the correct behavior
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 2
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[Variables]
[pp]
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = y+1
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.3
density0 = 1.1
thermal_expansion = 0
viscosity = 1.1
[]
[]
[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.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[AuxVariables]
[flux_out]
[]
[xval]
[]
[yval]
[]
[]
[ICs]
[xval]
type = FunctionIC
variable = xval
function = x
[]
[yval]
type = FunctionIC
variable = yval
function = y
[]
[]
[Functions]
[mass00]
type = ParsedFunction
expression = 'vol*por*dens0*exp(pp/bulk)'
symbol_names = 'vol por dens0 pp bulk'
symbol_values = '0.25 0.1 1.1 p00 1.3'
[]
[mass01]
type = ParsedFunction
expression = 'vol*por*dens0*exp(pp/bulk)'
symbol_names = 'vol por dens0 pp bulk'
symbol_values = '0.25 0.1 1.1 p01 1.3'
[]
[expected_mass_change00]
type = ParsedFunction
expression = 'fcn*perm*dens0*exp(pp/bulk)/visc*area*dt'
symbol_names = 'fcn perm dens0 pp bulk visc area dt'
symbol_values = '6 1 1 0 1.3 1 0.5 1E-3'
[]
[]
[Postprocessors]
[p00]
type = PointValue
point = '0 0 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[m00]
type = FunctionValuePostprocessor
function = mass00
execute_on = 'initial timestep_end'
[]
[del_m00]
type = FunctionValuePostprocessor
function = expected_mass_change00
execute_on = 'timestep_end'
[]
[p10]
type = PointValue
point = '1 0 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[p01]
type = PointValue
point = '0 1 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[m01]
type = FunctionValuePostprocessor
function = mass01
execute_on = 'initial timestep_end'
[]
[p11]
type = PointValue
point = '1 1 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[]
[BCs]
[flux]
type = PorousFlowSink
boundary = 'left'
variable = pp
use_mobility = false
use_relperm = true
fluid_phase = 0
flux_function = 6
save_in = flux_out
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -snes_max_it -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu 10000 NONZERO 2'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E-3
end_time = 1E-2
nl_rel_tol = 1E-12
nl_abs_tol = 1E-12
[]
[Outputs]
file_base = s01
[console]
type = Console
execute_on = 'nonlinear linear'
[]
[csv]
type = CSV
execute_on = 'initial timestep_end'
[]
[]
(test/tests/auxkernels/pp_depend/pp_depend.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./pp_aux]
[../]
[]
[Functions]
[./t_func]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.01
[../]
[]
[AuxKernels]
[./pp_aux]
type = PostprocessorAux
variable = pp_aux
execute_on = timestep_end
pp = t_pp
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Postprocessors]
[./t_pp]
type = FunctionValuePostprocessor
function = t_func
[../]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
solve_type = PJFNK
dt = 1
num_steps = 5
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(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'
[]
[]
(modules/porous_flow/test/tests/hysteresis/hys_order_02.i)
# Test that PorousFlowHysteresisOrder correctly calculates hysteresis order
# Water is removed from the system (so order = 0) until saturation = 0.55
# Then, water is added to the system (so order = 1) until saturation = 0.74
# Then, water is removed from the system (so order = 2) until saturation = 0.62
# Then, water is added to the system (so order = 3)
# Then, water is added to the system so that saturation exceeds 0.74, so order = 1
# Then, water is added to the system to saturation becomes 1, so order = 0
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = 0.0
[]
[]
[PorousFlowUnsaturated]
porepressure = pp
fp = simple_fluid
[]
[DiracKernels]
[source_sink_0]
type = PorousFlowPointSourceFromPostprocessor
point = '0 0 0'
mass_flux = sink_strength
variable = pp
[]
[source_sink_1]
type = PorousFlowPointSourceFromPostprocessor
point = '1 0 0'
mass_flux = sink_strength
variable = pp
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 1.0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0 0 0 0 0 0 0 0 0'
[]
[hys_order]
type = PorousFlowHysteresisOrder
[]
[]
[AuxVariables]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[tp0]
family = MONOMIAL
order = CONSTANT
[]
[tp1]
family = MONOMIAL
order = CONSTANT
[]
[tp2]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[tp0]
type = PorousFlowPropertyAux
variable = tp0
property = hysteresis_saturation_turning_point
hysteresis_turning_point = 0
[]
[tp1]
type = PorousFlowPropertyAux
variable = tp1
property = hysteresis_saturation_turning_point
hysteresis_turning_point = 1
[]
[tp2]
type = PorousFlowPropertyAux
variable = tp2
property = hysteresis_saturation_turning_point
hysteresis_turning_point = 2
[]
[]
[Functions]
[sink_strength_fcn]
type = ParsedFunction
expression = '30 * if(t <= 7, -1, if(t <= 10, 1, if(t <= 12, -1, 1)))'
[]
[]
[Postprocessors]
[sink_strength]
type = FunctionValuePostprocessor
function = sink_strength_fcn
outputs = 'none'
[]
[saturation]
type = PointValue
point = '0 0 0'
variable = saturation0
[]
[hys_order]
type = PointValue
point = '0 0 0'
variable = hys_order
[]
[tp0]
type = PointValue
point = '0 0 0'
variable = tp0
[]
[tp1]
type = PointValue
point = '0 0 0'
variable = tp1
[]
[tp2]
type = PointValue
point = '0 0 0'
variable = tp2
[]
[]
[Preconditioning]
[basic]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 21
nl_abs_tol = 1E-7
[]
[Outputs]
[csv]
type = CSV
sync_times = '0 1 2 9 10 11 12 13 14 15 17 18 19 21' # cut out t=16 and t=20 because numerical roundoff might mean order is not reduced exactly at these times
sync_only = true
[]
[]
(test/tests/markers/reporter_point_marker/reporter_marker_adapt_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 6
dt = 0.1
[]
[Reporters]
[coords]
type=ConstantReporter
real_vector_names = 'y z'
real_vector_values = '.51 .91; 0 0;'
outputs=none
[]
[]
[Functions]
[xfcn]
type = ParsedFunction
expression = t+0.01 #offset so marker is not on element edge
[]
[]
[Postprocessors]
[xfcn_pp]
type = FunctionValuePostprocessor
function = xfcn
execute_on = timestep_end
outputs = none
[]
[x_pp]
type = Receiver
default = .91
outputs = none
[]
[n_elements]
type = NumElems
execute_on = 'timestep_end'
[]
[]
[VectorPostprocessors]
[xfcn_vpp]
type = VectorOfPostprocessors
postprocessors = 'xfcn_pp x_pp'
outputs = none
[]
[]
[Adaptivity]
marker = x_moving
max_h_level = 2
[Markers]
[x_moving]
type = ReporterPointMarker
x_coord_name = xfcn_vpp/xfcn_vpp
y_coord_name = coords/y
z_coord_name = coords/z
inside = REFINE
empty = COARSEN
[]
[]
[]
[Outputs]
csv = true
[]
(modules/porous_flow/test/tests/dirackernels/bh_except15.i)
# fully-saturated
# production
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = 1E7
[]
[]
[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
[]
[borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
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.1
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[DiracKernels]
[bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
point_file = bh02.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[]
[]
[Postprocessors]
[bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[]
[fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[]
[fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[]
[zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[]
[p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[]
[]
[Functions]
[mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[]
[]
[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 = 0.5
dt = 1E-2
solve_type = NEWTON
[]
(modules/richards/test/tests/gravity_head_2/gh07.i)
# unsaturated = true
# gravity = false
# 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 = RandomIC
min = 0.2
max = 0.8
variable = pwater
[../]
[./gas_ic]
type = RandomIC
min = 1.2
max = 1.8
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((p0-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((p0-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 = '0 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 = gh07
csv = true
[]
(modules/porous_flow/test/tests/poro_elasticity/mandel_fully_saturated.i)
# Mandel's problem of consolodation of a drained medium
# Using the FullySaturatedDarcyBase and FullySaturatedMassTimeDerivative kernels
#
# A sample is in plane strain.
# -a <= x <= a
# -b <= y <= b
# It is squashed with constant force by impermeable, frictionless plattens on its top and bottom surfaces (at y=+/-b)
# Fluid is allowed to leak out from its sides (at x=+/-a)
# The porepressure within the sample is monitored.
#
# As is common in the literature, this is simulated by
# considering the quarter-sample, 0<=x<=a and 0<=y<=b, with
# impermeable, roller BCs at x=0 and y=0 and y=b.
# Porepressure is fixed at zero on x=a.
# Porepressure and displacement are initialised to zero.
# Then the top (y=b) is moved downwards with prescribed velocity,
# so that the total force that is inducing this downwards velocity
# is fixed. The velocity is worked out by solving Mandel's problem
# analytically, and the total force is monitored in the simulation
# to check that it indeed remains constant.
#
# Here are the problem's parameters, and their values:
# Soil width. a = 1
# Soil height. b = 0.1
# Soil's Lame lambda. la = 0.5
# Soil's Lame mu, which is also the Soil's shear modulus. mu = G = 0.75
# Soil bulk modulus. K = la + 2*mu/3 = 1
# Drained Poisson ratio. nu = (3K - 2G)/(6K + 2G) = 0.2
# Soil bulk compliance. 1/K = 1
# Fluid bulk modulus. Kf = 8
# Fluid bulk compliance. 1/Kf = 0.125
# Soil initial porosity. phi0 = 0.1
# Biot coefficient. alpha = 0.6
# Biot modulus. M = 1/(phi0/Kf + (alpha - phi0)(1 - alpha)/K) = 4.705882
# Undrained bulk modulus. Ku = K + alpha^2*M = 2.694118
# Undrained Poisson ratio. nuu = (3Ku - 2G)/(6Ku + 2G) = 0.372627
# Skempton coefficient. B = alpha*M/Ku = 1.048035
# Fluid mobility (soil permeability/fluid viscosity). k = 1.5
# Consolidation coefficient. c = 2*k*B^2*G*(1-nu)*(1+nuu)^2/9/(1-nuu)/(nuu-nu) = 3.821656
# Normal stress on top. F = 1
#
# The solution for porepressure and displacements is given in
# AHD Cheng and E Detournay "A direct boundary element method for plane strain poroelasticity" International Journal of Numerical and Analytical Methods in Geomechanics 12 (1988) 551-572.
# The solution involves complicated infinite series, so I shall not write it here
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 0.1
zmin = 0
zmax = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[]
[BCs]
[roller_xmin]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left'
[]
[roller_ymin]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom'
[]
[plane_strain]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[]
[xmax_drained]
type = DirichletBC
variable = porepressure
value = 0
boundary = right
[]
[top_velocity]
type = FunctionDirichletBC
variable = disp_y
function = top_velocity
boundary = top
[]
[]
[Functions]
[top_velocity]
type = PiecewiseLinear
x = '0 0.002 0.006 0.014 0.03 0.046 0.062 0.078 0.094 0.11 0.126 0.142 0.158 0.174 0.19 0.206 0.222 0.238 0.254 0.27 0.286 0.302 0.318 0.334 0.35 0.366 0.382 0.398 0.414 0.43 0.446 0.462 0.478 0.494 0.51 0.526 0.542 0.558 0.574 0.59 0.606 0.622 0.638 0.654 0.67 0.686 0.702'
y = '-0.041824842 -0.042730269 -0.043412712 -0.04428867 -0.045509181 -0.04645965 -0.047268246 -0.047974749 -0.048597109 -0.0491467 -0.049632388 -0.050061697 -0.050441198 -0.050776675 -0.051073238 -0.0513354 -0.051567152 -0.051772022 -0.051953128 -0.052113227 -0.052254754 -0.052379865 -0.052490464 -0.052588233 -0.052674662 -0.052751065 -0.052818606 -0.052878312 -0.052931093 -0.052977751 -0.053018997 -0.053055459 -0.053087691 -0.053116185 -0.053141373 -0.05316364 -0.053183324 -0.053200724 -0.053216106 -0.053229704 -0.053241725 -0.053252351 -0.053261745 -0.053270049 -0.053277389 -0.053283879 -0.053289615'
[]
[]
[AuxVariables]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[tot_force]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[tot_force]
type = ParsedAux
coupled_variables = 'stress_yy porepressure'
execute_on = timestep_end
variable = tot_force
expression = '-stress_yy+0.6*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 = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.6
variable = disp_x
component = 0
[]
[poro_y]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.6
variable = disp_y
component = 1
[]
[poro_z]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.6
component = 2
variable = disp_z
[]
[mass0]
type = PorousFlowFullySaturatedMassTimeDerivative
biot_coefficient = 0.6
coupling_type = HydroMechanical
variable = porepressure
[]
[flux]
type = PorousFlowFullySaturatedDarcyBase
variable = porepressure
gravity = '0 0 0'
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 8
density0 = 1
thermal_expansion = 0
viscosity = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '0.5 0.75'
# bulk modulus is lambda + 2*mu/3 = 0.5 + 2*0.75/3 = 1
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = ComputeLinearElasticStress
[]
[eff_fluid_pressure_qp]
type = PorousFlowEffectiveFluidPressure
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = porepressure
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid_qp]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst # only the initial value of this is ever used
porosity = 0.1
[]
[biot_modulus]
type = PorousFlowConstantBiotModulus
biot_coefficient = 0.6
solid_bulk_compliance = 1
fluid_bulk_modulus = 8
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1.5 0 0 0 1.5 0 0 0 1.5'
[]
[]
[Postprocessors]
[p0]
type = PointValue
outputs = csv
point = '0.0 0 0'
variable = porepressure
[]
[p1]
type = PointValue
outputs = csv
point = '0.1 0 0'
variable = porepressure
[]
[p2]
type = PointValue
outputs = csv
point = '0.2 0 0'
variable = porepressure
[]
[p3]
type = PointValue
outputs = csv
point = '0.3 0 0'
variable = porepressure
[]
[p4]
type = PointValue
outputs = csv
point = '0.4 0 0'
variable = porepressure
[]
[p5]
type = PointValue
outputs = csv
point = '0.5 0 0'
variable = porepressure
[]
[p6]
type = PointValue
outputs = csv
point = '0.6 0 0'
variable = porepressure
[]
[p7]
type = PointValue
outputs = csv
point = '0.7 0 0'
variable = porepressure
[]
[p8]
type = PointValue
outputs = csv
point = '0.8 0 0'
variable = porepressure
[]
[p9]
type = PointValue
outputs = csv
point = '0.9 0 0'
variable = porepressure
[]
[p99]
type = PointValue
outputs = csv
point = '1 0 0'
variable = porepressure
[]
[xdisp]
type = PointValue
outputs = csv
point = '1 0.1 0'
variable = disp_x
[]
[ydisp]
type = PointValue
outputs = csv
point = '1 0.1 0'
variable = disp_y
[]
[total_downwards_force]
type = ElementAverageValue
outputs = csv
variable = tot_force
[]
[dt]
type = FunctionValuePostprocessor
outputs = console
function = if(0.15*t<0.01,0.15*t,0.01)
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'gmres asm lu 1E-14 1E-10 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 0.7
[TimeStepper]
type = PostprocessorDT
postprocessor = dt
dt = 0.001
[]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = mandel_fully_saturated
[csv]
time_step_interval = 3
type = CSV
[]
[]
(test/tests/postprocessors/geometry/2d_geometry.i)
radius = 0.5
inner_box_length = 2.2
outer_box_length = 3
sides = 16
alpha = ${fparse 2 * pi / ${sides}}
perimeter_correction = ${fparse alpha / 2 / sin(alpha / 2)}
area_correction = ${fparse alpha / sin(alpha)}
[Mesh]
file = 2d.e
construct_side_list_from_node_list = true
[]
[Variables]
[./u]
initial_condition = 1
block = circle
[../]
[./v]
initial_condition = 2
block = 'inside outside'
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
[./circle]
type = DirichletBC
variable = u
boundary = circle_side_wrt_inside
value = 2
[../]
[./inner]
type = DirichletBC
variable = v
boundary = circle_side_wrt_circle
value = 4
[../]
[./outer]
type = DirichletBC
variable = v
boundary = outside_side
value = 6
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./u_avg]
type = ElementAverageValue
variable = u
block = circle
[../]
[./v_avg]
type = ElementAverageValue
variable = v
block = 'inside outside'
[../]
[./circle_perimeter_wrt_circle]
type = AreaPostprocessor
boundary = circle_side_wrt_circle
[../]
[./circle_perimeter_wrt_inside]
type = AreaPostprocessor
boundary = circle_side_wrt_inside
[../]
[./inside_perimeter_wrt_inside]
type = AreaPostprocessor
boundary = inside_side_wrt_inside
[../]
[./inside_perimeter_wrt_outside]
type = AreaPostprocessor
boundary = inside_side_wrt_outside
[../]
[./outside_perimeter]
type = AreaPostprocessor
boundary = outside_side
[../]
[./circle_area]
type = VolumePostprocessor
block = circle
[../]
[./inside_area]
type = VolumePostprocessor
block = inside
[../]
[./outside_area]
type = VolumePostprocessor
block = outside
[../]
[./total_area]
type = VolumePostprocessor
block = 'circle inside outside'
[../]
[./circle_perimeter_exact]
type = FunctionValuePostprocessor
function = 'circle_perimeter_exact'
[../]
[./inside_perimeter_exact]
type = FunctionValuePostprocessor
function = 'inside_perimeter_exact'
[../]
[./outside_perimeter_exact]
type = FunctionValuePostprocessor
function = 'outside_perimeter_exact'
[../]
[./circle_area_exact]
type = FunctionValuePostprocessor
function = 'circle_area_exact'
[../]
[./inside_area_exact]
type = FunctionValuePostprocessor
function = 'inside_area_exact'
[../]
[./outside_area_exact]
type = FunctionValuePostprocessor
function = 'outside_area_exact'
[../]
[./total_area_exact]
type = FunctionValuePostprocessor
function = 'total_area_exact'
[../]
[]
[Functions]
[./circle_perimeter_exact]
type = ParsedFunction
expression = '2 * pi * ${radius} / ${perimeter_correction}'
[../]
[./inside_perimeter_exact]
type = ParsedFunction
expression = '${inner_box_length} * 4'
[../]
[./outside_perimeter_exact]
type = ParsedFunction
expression = '${outer_box_length} * 4'
[../]
[./circle_area_exact]
type = ParsedFunction
expression = 'pi * ${radius}^2 / ${area_correction}'
[../]
[./inside_area_exact]
type = ParsedFunction
expression = '${inner_box_length}^2 - pi * ${radius}^2 / ${area_correction}'
[../]
[./outside_area_exact]
type = ParsedFunction
expression = '${outer_box_length}^2 - ${inner_box_length}^2'
[../]
[./total_area_exact]
type = ParsedFunction
expression = '${outer_box_length}^2'
[../]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/tensile/random_planar.i)
# Plasticity models:
# Planar tensile with strength = 1MPa
#
# Lame lambda = 1GPa. Lame mu = 1.3GPa
#
# A line of elements is perturbed randomly, and return to the yield surface at each quadpoint is checked
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1000
ny = 1250
nz = 1
xmin = 0
xmax = 1000
ymin = 0
ymax = 1250
zmin = 0
zmax = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
add_variables = true
incremental = true
strain = finite
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_yz stress_zz'
[../]
[]
[ICs]
[./x]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_x
[../]
[./y]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_y
[../]
[./z]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_z
[../]
[]
[BCs]
[./x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'front back'
function = '0'
[../]
[./y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'front back'
function = '0'
[../]
[./z]
type = FunctionDirichletBC
variable = disp_z
boundary = 'front back'
function = '0'
[../]
[]
[AuxVariables]
[./f0]
order = CONSTANT
family = MONOMIAL
[../]
[./f1]
order = CONSTANT
family = MONOMIAL
[../]
[./f2]
order = CONSTANT
family = MONOMIAL
[../]
[./int0]
order = CONSTANT
family = MONOMIAL
[../]
[./iter]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./f0]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 0
variable = f0
[../]
[./f1]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 1
variable = f1
[../]
[./f2]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 2
variable = f2
[../]
[./int0]
type = MaterialStdVectorAux
property = plastic_internal_parameter
factor = 1E6
index = 0
variable = int0
[../]
[./iter]
type = MaterialRealAux
property = plastic_NR_iterations
variable = iter
[../]
[]
[Postprocessors]
[./tot_iters]
type = ElementIntegralMaterialProperty
mat_prop = plastic_NR_iterations
outputs = console
[../]
[./raw_f0]
type = ElementExtremeValue
variable = f0
outputs = console
[../]
[./raw_f1]
type = ElementExtremeValue
variable = f1
outputs = console
[../]
[./raw_f2]
type = ElementExtremeValue
variable = f2
outputs = console
[../]
[./iter]
type = ElementExtremeValue
variable = iter
outputs = console
[../]
[./f0]
type = FunctionValuePostprocessor
function = should_be_zero0_fcn
[../]
[./f1]
type = FunctionValuePostprocessor
function = should_be_zero1_fcn
[../]
[./f2]
type = FunctionValuePostprocessor
function = should_be_zero2_fcn
[../]
[]
[Functions]
[./should_be_zero0_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f0'
[../]
[./should_be_zero1_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f1'
[../]
[./should_be_zero2_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f2'
[../]
[]
[UserObjects]
[./hard]
type = SolidMechanicsHardeningCubic
value_0 = 1E6
value_residual = 0
internal_limit = 1
[../]
[./tensile]
type = SolidMechanicsPlasticTensileMulti
tensile_strength = hard
yield_function_tolerance = 1.0E-1
shift = 1.0E-1
internal_constraint_tolerance = 1.0E-7
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
fill_method = symmetric_isotropic
C_ijkl = '1E9 1.3E9'
[../]
[./multi]
type = ComputeMultiPlasticityStress
block = 0
deactivation_scheme = 'safe_to_dumb'
ep_plastic_tolerance = 1E-7
plastic_models = 'tensile'
max_NR_iterations = 5
min_stepsize = 1E-3
max_stepsize_for_dumb = 1
debug_fspb = crash
debug_jac_at_stress = '10 0 0 0 10 0 0 0 10'
debug_jac_at_pm = '1 1 1'
debug_jac_at_intnl = '1 1 1'
debug_stress_change = 1E1
debug_pm_change = '1E-6 1E-6 1E-6'
debug_intnl_change = '1E-6 1E-6 1E-6'
[../]
[]
[Executioner]
end_time = 1
dt = 1
type = Transient
[]
[Outputs]
file_base = random_planar
exodus = false
[./csv]
type = CSV
[../]
[]
(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
[../]
[]
(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/thermal_hydraulics/test/tests/components/form_loss_from_function_1phase/phy.form_loss_1phase.i)
# Tests the form loss kernel for 1-phase flow.
#
# This test uses the following parameters and boundary data:
# Inlet: (rho = 996.5563397 kg/m^3, vel = 0.5 m/s)
# Outlet: p_out = 100 kPa
# Length: L = 2 m
# Form loss coefficient: K = 0.5, => K_prime = 0.25 m^-1 (uniform along length)
#
# The inlet pressure is
#
# p_in = p_out + dp ,
#
# where dp is given by the definition of the form loss coefficient:
#
# dp = K * 0.5 * rho * u^2
# = 0.5 * 0.5 * 996.5563397 * 0.5^2
# = 62.28477123125 Pa
#
# This value is output to CSV.
p_out = 100e3
[GlobalParams]
initial_p = ${p_out}
initial_vel = 0.5
initial_T = 300.0
gravity_vector = '0 0 0'
scaling_factor_1phase = '1 1 1e-4'
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
k = 0.5
mu = 281.8e-6
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = fp
position = '0 0 0'
orientation = '1 0 0'
length = 2
A = 1
n_elems = 5
f = 0
[]
[form_loss]
type = FormLossFromFunction1Phase
flow_channel = pipe
K_prime = 0.25
[]
[inlet]
type = InletDensityVelocity1Phase
input = 'pipe:in'
rho = 996.5563397
vel = 0.5
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = ${p_out}
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 0.1
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-8
nl_abs_tol = 5e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 20
start_time = 0.0
num_steps = 100
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Postprocessors]
# this is not the right value, should be the value from the inlet ghost cell
[p_in]
type = SideAverageValue
boundary = inlet
variable = p
execute_on = TIMESTEP_END
[]
[p_out]
type = FunctionValuePostprocessor
function = ${p_out}
execute_on = TIMESTEP_END
[]
[dp]
type = DifferencePostprocessor
value1 = p_in
value2 = p_out
execute_on = TIMESTEP_END
[]
[]
[Outputs]
[out]
type = CSV
show = 'dp'
execute_postprocessors_on = final
[]
[]
(test/tests/multiapps/initial_transfer/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
[]
[Problem]
kernel_coverage_check = false
[]
[Variables][dummy][][]
[Functions]
[func]
type = ConstantFunction
value = 1
[]
[]
[Postprocessors]
[c]
type = FunctionValuePostprocessor
function = func
execute_on = initial
# this will force this postprocessor to be evaluated before transfer on initial
force_preic = true
[]
[]
[Executioner]
type = Steady
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
input_files = sub.i
execute_on = initial
[../]
[]
[Transfers]
[to_sub]
type = MultiAppPostprocessorTransfer
to_multi_app = sub
from_postprocessor = c
to_postprocessor = receiver
[]
[]
(modules/solid_mechanics/test/tests/porosity/nan.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Problem]
solve = false
[]
[Functions]
[volumetric]
type = ParsedFunction
expression = 't * sqrt(-1)'
# expression = 0
# expression =
[]
[exact]
type = ParsedFunction
symbol_names = 'f'
symbol_values = 'porosity_old'
expression = '(1 - f) * 3e-3 + f'
[]
[]
[Materials]
[porosity]
type = PorosityFromStrain
initial_porosity = 0
negative_behavior = zero
inelastic_strain = strain
outputs = all
[]
[strain]
type = GenericFunctionRankTwoTensor
tensor_name = strain
tensor_functions = 'volumetric'
outputs = all
[]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 1e-3
[]
[Postprocessors]
[porosity]
type = ElementAverageValue
variable = porosity
execute_on = 'initial timestep_end'
[]
[porosity_old]
type = ElementAverageValue
variable = porosity
execute_on = 'initial timestep_begin'
outputs = none
[]
[exact]
type = FunctionValuePostprocessor
function = exact
[]
[00]
type = ElementAverageValue
variable = strain_00
execute_on = 'initial timestep_end'
[]
[11]
type = ElementAverageValue
variable = strain_11
execute_on = 'initial timestep_end'
[]
[22]
type = ElementAverageValue
variable = strain_22
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
csv = true
[]
(test/tests/ics/postprocessor_interface/postprocessor_interface.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 10
nx = 10
[]
[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
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Postprocessors]
# This PP should have the sum of the other two PPs: 34 + 6 = 40
[test_var_pp]
type = ElementAverageValue
variable = test_var
execute_on = 'INITIAL'
[]
[]
[Outputs]
csv = true
[]
(modules/porous_flow/test/tests/hysteresis/hys_order_09.i)
# Test that PorousFlowHysteresisOrder correctly calculates hysteresis order
# Hysteresis order is initialised = 3, with turning points = (0.5, 0.8, 0.66)
# Initial saturation is 0.71
# A large amount of water is removed in one timestep so the saturation becomes 0.58 (and order = 0)
# Then, water is added to the system (order = 1, with turning point = 0.58) until saturation = 0.67
# Then, water is removed from the system so order becomes 2 with turning point = 0.67
# Then, water is removed from the system until saturation < 0.58 and order = 0
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = -9E5
[]
[]
[PorousFlowUnsaturated]
porepressure = pp
fp = simple_fluid
[]
[DiracKernels]
[source_sink_0]
type = PorousFlowPointSourceFromPostprocessor
point = '0 0 0'
mass_flux = sink_strength
variable = pp
[]
[source_sink_1]
type = PorousFlowPointSourceFromPostprocessor
point = '1 0 0'
mass_flux = sink_strength
variable = pp
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 1.0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0 0 0 0 0 0 0 0 0'
[]
[hys_order]
type = PorousFlowHysteresisOrder
initial_order = 3
previous_turning_points = '0.6 0.8 0.66'
[]
[]
[AuxVariables]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[tp0]
family = MONOMIAL
order = CONSTANT
[]
[tp1]
family = MONOMIAL
order = CONSTANT
[]
[tp2]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[tp0]
type = PorousFlowPropertyAux
variable = tp0
property = hysteresis_saturation_turning_point
hysteresis_turning_point = 0
[]
[tp1]
type = PorousFlowPropertyAux
variable = tp1
property = hysteresis_saturation_turning_point
hysteresis_turning_point = 1
[]
[tp2]
type = PorousFlowPropertyAux
variable = tp2
property = hysteresis_saturation_turning_point
hysteresis_turning_point = 2
[]
[]
[Functions]
[sink_strength_fcn]
type = ParsedFunction
expression = '30 * if(t <= 1, -2, if(t <= 2, 1.5, -1))'
[]
[]
[Postprocessors]
[sink_strength]
type = FunctionValuePostprocessor
function = sink_strength_fcn
outputs = 'none'
[]
[saturation]
type = PointValue
point = '0 0 0'
variable = saturation0
[]
[hys_order]
type = PointValue
point = '0 0 0'
variable = hys_order
[]
[tp0]
type = PointValue
point = '0 0 0'
variable = tp0
[]
[tp1]
type = PointValue
point = '0 0 0'
variable = tp1
[]
[tp2]
type = PointValue
point = '0 0 0'
variable = tp2
[]
[]
[Preconditioning]
[basic]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 6
nl_abs_tol = 1E-7
[]
[Outputs]
[csv]
type = CSV
[]
[]
(modules/stochastic_tools/test/tests/auxkernels/surrogate_aux/surrogate_aux.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 10
[]
[]
[Surrogates]
[surrogate]
type = PolynomialRegressionSurrogate
filename = surrogate_trainer_poly_regression.rd
[]
[]
[AuxVariables]
[u]
family = MONOMIAL
order = CONSTANT
[]
[var]
family = MONOMIAL
order = CONSTANT
[]
[reference]
family = MONOMIAL
order = CONSTANT
[]
[]
[ICs]
[var_ic]
type = FunctionIC
variable = var
function = funz
[]
[]
[Functions]
[funx]
type = ParsedFunction
expression = 'x'
[]
[funz]
type = ParsedFunction
expression = 'z'
[]
[funt]
type = ParsedFunction
expression = 't'
[]
[reference]
type = ParsedFunction
expression = '1 + x + c + z + t +
x*x + x*c + x*z + x*t +
c*c + c*z + c*t +
z*z + z*t +
t*t'
symbol_names = c
symbol_values = 3.14
[]
[]
[Postprocessors]
[pp]
type = FunctionValuePostprocessor
function = funt
point = '0 0 0'
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[AuxKernels]
[u_aux]
type = SurrogateModelAuxKernel
variable = u
model = surrogate
parameters = 'funx 3.14 var pp'
scalar_parameters = 'funx pp'
coupled_variables = 'var'
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Postprocessors]
[diff]
type = ElementL2Error
variable = u
function = reference
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 10
[]
[UserObjects]
[terminator]
type = Terminator
expression = 'diff > 1e-8'
error_level = ERROR
[]
[]
(test/tests/postprocessors/execute_on_final/execute_on_final.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
dt = 1
num_steps = 4
[]
[Functions]
[func]
type = ConstantFunction
value = 5
[]
[]
[Postprocessors]
[timestep_end]
type = FunctionValuePostprocessor
function = 't'
execute_on = 'initial timestep_end'
[]
[final]
type = FunctionValuePostprocessor
function = '2*t'
execute_on = 'final'
[]
[]
[Outputs]
csv = true
[on_final]
type = CSV
execute_on = final
[]
[]
(modules/solid_mechanics/test/tests/rom_stress_update/lower_limit.i)
temp = 800.0160634
disp = 1.0053264195e6
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[temperature]
initial_condition = ${temp}
[]
[]
[Functions]
[temp_weight]
type = ParsedFunction
symbol_names = 'lower_limit avg'
symbol_values = '800.0160634 temp_avg'
expression = 'val := 2 * avg / lower_limit - 1;
clamped := if(val <= -1, -0.99999, if(val >= 1, 0.99999, val));
plus := exp(-2 / (1 + clamped));
minus := exp(-2 / (1 - clamped));
plus / (plus + minus)'
[]
[stress_weight]
type = ParsedFunction
symbol_names = 'lower_limit avg'
symbol_values = '2.010652839e6 vonmises_stress'
expression = 'val := 2 * avg / lower_limit - 1;
clamped := if(val <= -1, -0.99999, if(val >= 1, 0.99999, val));
plus := exp(-2 / (1 + clamped));
minus := exp(-2 / (1 - clamped));
plus / (plus + minus)'
[]
[creep_rate_exact]
type = ParsedFunction
symbol_names = 'lower_limit_strain temp_weight stress_weight'
symbol_values = '3.370764e-12 temp_weight stress_weight'
expression = 'lower_limit_strain * temp_weight * stress_weight'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
generate_output = vonmises_stress
[]
[]
[BCs]
[symmy]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[symmx]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[symmz]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[]
[pressure_x]
type = Pressure
variable = disp_x
boundary = right
factor = ${disp}
[]
[pressure_y]
type = Pressure
variable = disp_y
boundary = top
factor = -${disp}
[]
[pressure_z]
type = Pressure
variable = disp_z
boundary = front
factor = -${disp}
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 3.30e11
poissons_ratio = 0.3
[]
[stress]
type = ComputeMultipleInelasticStress
inelastic_models = rom_stress_prediction
[]
[rom_stress_prediction]
type = SS316HLAROMANCEStressUpdateTest
temperature = temperature
initial_cell_dislocation_density = 6.0e12
initial_wall_dislocation_density = 4.4e11
outputs = all
apply_strain = false
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
nl_abs_tol = 1e-12
automatic_scaling = true
compute_scaling_once = false
num_steps = 1
dt = 1e5
[]
[Postprocessors]
[creep_rate_exact]
type = FunctionValuePostprocessor
function = creep_rate_exact
[]
[creep_rate_avg]
type = ElementAverageValue
variable = creep_rate
[]
[creep_rate_diff]
type = DifferencePostprocessor
value1 = creep_rate_exact
value2 = creep_rate_avg
[]
[temp_avg]
type = ElementAverageValue
variable = temperature
[]
[cell_dislocations]
type = ElementAverageValue
variable = cell_dislocations
[]
[wall_disloactions]
type = ElementAverageValue
variable = wall_dislocations
[]
[vonmises_stress]
type = ElementAverageValue
variable = vonmises_stress
[]
[]
[Outputs]
csv = true
[]
(test/tests/controls/output/controllable_clear.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
elem_type = QUAD4
uniform_refine = 4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 3
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[DiracKernels]
[./test_object]
type = MaterialPointSource
point = '0.5 0.5 0'
variable = u
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'matp'
prop_values = '1'
block = 0
[../]
[]
[Postprocessors]
[./test_object]
type = FunctionValuePostprocessor
function = '2*(x+y)'
point = '0.5 0.5 0'
[../]
[./other_point_test_object]
type = FunctionValuePostprocessor
function = '3*(x+y)'
point = '0.5 0.5 0'
[../]
[]
[Outputs]
controls = true
[]
[Controls]
[./point_control]
type = TestControl
test_type = 'point'
parameter = '*/*/point'
execute_on = 'initial'
[../]
[]
(modules/solid_mechanics/test/tests/capped_mohr_coulomb/random3.i)
# Using CappedMohrCoulomb with Mohr-Coulomb failure only
# Plasticity models:
# Cohesion = 1MPa
# Friction angle = dilation angle = 0.5
#
# Lame lambda = 1GPa. Lame mu = 1.3GPa
#
# A line of elements is perturbed randomly, and return to the yield surface at each quadpoint is checked
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1000
ny = 1234
nz = 1
xmin = 0
xmax = 1000
ymin = 0
ymax = 1234
zmin = 0
zmax = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
add_variables = true
incremental = true
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_yz stress_zz'
[../]
[]
[ICs]
[./x]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_x
[../]
[./y]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_y
[../]
[./z]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_z
[../]
[]
[BCs]
[./x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'front back'
function = '0'
[../]
[./y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'front back'
function = '0'
[../]
[./z]
type = FunctionDirichletBC
variable = disp_z
boundary = 'front back'
function = '0'
[../]
[]
[AuxVariables]
[./f0]
order = CONSTANT
family = MONOMIAL
[../]
[./f1]
order = CONSTANT
family = MONOMIAL
[../]
[./f2]
order = CONSTANT
family = MONOMIAL
[../]
[./f3]
order = CONSTANT
family = MONOMIAL
[../]
[./f4]
order = CONSTANT
family = MONOMIAL
[../]
[./f5]
order = CONSTANT
family = MONOMIAL
[../]
[./int0]
order = CONSTANT
family = MONOMIAL
[../]
[./iter]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./f0]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 6
variable = f0
[../]
[./f1]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 7
variable = f1
[../]
[./f2]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 8
variable = f2
[../]
[./f3]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 9
variable = f3
[../]
[./f4]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 10
variable = f4
[../]
[./f5]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 11
variable = f5
[../]
[./int0]
type = MaterialStdVectorAux
property = plastic_internal_parameter
index = 0
variable = int0
[../]
[./iter]
type = MaterialRealAux
property = plastic_NR_iterations
variable = iter
[../]
[]
[Postprocessors]
[./tot_iters]
type = ElementIntegralMaterialProperty
mat_prop = plastic_NR_iterations
outputs = console
[../]
[./intnl_max]
type = ElementExtremeValue
variable = int0
outputs = console
[../]
[./raw_f0]
type = ElementExtremeValue
variable = f0
outputs = console
[../]
[./raw_f1]
type = ElementExtremeValue
variable = f1
outputs = console
[../]
[./raw_f2]
type = ElementExtremeValue
variable = f2
outputs = console
[../]
[./raw_f3]
type = ElementExtremeValue
variable = f3
outputs = console
[../]
[./raw_f4]
type = ElementExtremeValue
variable = f4
outputs = console
[../]
[./raw_f5]
type = ElementExtremeValue
variable = f5
outputs = console
[../]
[./iter]
type = ElementExtremeValue
variable = iter
outputs = console
[../]
[./f0]
type = FunctionValuePostprocessor
function = should_be_zero0_fcn
[../]
[./f1]
type = FunctionValuePostprocessor
function = should_be_zero1_fcn
[../]
[./f2]
type = FunctionValuePostprocessor
function = should_be_zero2_fcn
[../]
[./f3]
type = FunctionValuePostprocessor
function = should_be_zero3_fcn
[../]
[./f4]
type = FunctionValuePostprocessor
function = should_be_zero4_fcn
[../]
[./f5]
type = FunctionValuePostprocessor
function = should_be_zero5_fcn
[../]
[]
[Functions]
[./should_be_zero0_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f0'
[../]
[./should_be_zero1_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f1'
[../]
[./should_be_zero2_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f2'
[../]
[./should_be_zero3_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f3'
[../]
[./should_be_zero4_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f4'
[../]
[./should_be_zero5_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f5'
[../]
[]
[UserObjects]
[./ts]
type = SolidMechanicsHardeningConstant
value = 1E12
[../]
[./cs]
type = SolidMechanicsHardeningConstant
value = 1E12
[../]
[./coh]
type = SolidMechanicsHardeningCubic
value_0 = 1E6
value_residual = 0
internal_limit = 1
[../]
[./ang]
type = SolidMechanicsHardeningCubic
value_0 = 0.9
value_residual = 0.2
internal_limit = 1
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric_isotropic
C_ijkl = '1E9 1.3E9'
[../]
[./tensile]
type = CappedMohrCoulombStressUpdate
tensile_strength = ts
compressive_strength = cs
cohesion = coh
friction_angle = ang
dilation_angle = ang
smoothing_tol = 1E5
max_NR_iterations = 100
yield_function_tol = 1.0E-1
[../]
[./stress]
type = ComputeMultipleInelasticStress
inelastic_models = tensile
perform_finite_strain_rotations = false
[../]
[]
[Executioner]
end_time = 1
dt = 1
type = Transient
[]
[Outputs]
file_base = random3
csv = true
[]
(modules/porous_flow/test/tests/poro_elasticity/pp_generation_fullysat_action.i)
# Same as pp_generation.i, but using an Action
#
# A sample is constrained on all sides and its boundaries are
# also impermeable. Fluid is pumped into the sample via a
# volumetric source (ie kg/second per cubic meter), and the
# rise in porepressure is observed.
#
# Source = s (units = kg/m^3/second)
#
# Expect:
# fluid_mass = mass0 + s*t
# stress = 0 (remember this is effective stress)
# Porepressure = fluid_bulk*log(fluid_mass_density/density_P0), where fluid_mass_density = fluid_mass/porosity
# porosity = biot+(phi0-biot)*exp(pp(biot-1)/solid_bulk)
#
# Parameters:
# Biot coefficient = 0.3
# Phi0 = 0.1
# Solid Bulk modulus = 2
# fluid_bulk = 13
# density_P0 = 1
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.0
bulk_modulus = 13.0
viscosity = 1.0
density0 = 1.0
[]
[]
[PorousFlowFullySaturated]
coupling_type = HydroMechanical
displacements = 'disp_x disp_y disp_z'
porepressure = porepressure
biot_coefficient = 0.3
gravity = '0 0 0'
fp = the_simple_fluid
stabilization = none # not needed: there is no flow
save_component_rate_in = nodal_kg_per_s
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[]
[]
[Kernels]
[source]
type = BodyForce
function = 0.1
variable = porepressure
[]
[]
[AuxVariables]
[nodal_kg_per_s]
[]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[porosity]
type = PorousFlowPropertyAux
variable = porosity
property = porosity
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = ComputeLinearElasticStress
[]
[porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
porosity_zero = 0.1
biot_coefficient = 0.3
solid_bulk = 2
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 1 0 0 0 1' # unimportant
[]
[]
[Functions]
[porosity_analytic]
type = ParsedFunction
expression = 'biot+(phi0-biot)*exp(pp*(biot-1)/bulk)'
symbol_names = 'biot phi0 pp bulk'
symbol_values = '0.3 0.1 p0 2'
[]
[]
[Postprocessors]
[nodal_kg_per_s]
type = PointValue
point = ' 0 0 0'
variable = nodal_kg_per_s
outputs = csv
[]
[fluid_mass]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'initial timestep_end'
[]
[porosity]
type = PointValue
outputs = 'console csv'
point = '0 0 0'
variable = porosity
[]
[p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
[]
[porosity_analytic]
type = FunctionValuePostprocessor
function = porosity_analytic
[]
[zdisp]
type = PointValue
outputs = csv
point = '0 0 0.5'
variable = disp_z
[]
[stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[]
[stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[]
[stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[]
[]
[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-14 1E-10 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = pp_generation_fullysat_action
csv = true
[]
(modules/porous_flow/test/tests/gravity/grav01a_fv.i)
# Checking that gravity head is established using FV
# 1phase, vanGenuchten, constant fluid-bulk, constant viscosity, constant permeability, Corey relative perm
# fully saturated
# For better agreement with the analytical solution (ana_pp), just increase nx
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = -1
xmax = 0
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
type = MooseVariableFVReal
[]
[]
[ICs]
[p]
type = RandomIC
variable = pp
min = 0
max = 1
[]
[]
[FVKernels]
[flux0]
type = FVPorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
gravity = '-1 0 0'
[]
[]
[Functions]
[ana_pp]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 1.2 0 1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[]
[FVBCs]
[z]
type = FVDirichletBC
variable = pp
boundary = right
value = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.2
density0 = 1
viscosity = 1
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = ADPorousFlowTemperature
[]
[ppss]
type = ADPorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[massfrac]
type = ADPorousFlowMassFraction
[]
[simple_fluid]
type = ADPorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[permeability]
type = ADPorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm]
type = ADPorousFlowRelativePermeabilityCorey
n = 1
phase = 0
[]
[]
[Postprocessors]
[pp_base]
type = PointValue
variable = pp
point = '-1 0 0'
[]
[pp_analytical]
type = FunctionValuePostprocessor
function = ana_pp
point = '-1 0 0'
[]
[pp_00]
type = PointValue
variable = pp
point = '0 0 0'
[]
[pp_01]
type = PointValue
variable = pp
point = '-0.1 0 0'
[]
[pp_02]
type = PointValue
variable = pp
point = '-0.2 0 0'
[]
[pp_03]
type = PointValue
variable = pp
point = '-0.3 0 0'
[]
[pp_04]
type = PointValue
variable = pp
point = '-0.4 0 0'
[]
[pp_05]
type = PointValue
variable = pp
point = '-0.5 0 0'
[]
[pp_06]
type = PointValue
variable = pp
point = '-0.6 0 0'
[]
[pp_07]
type = PointValue
variable = pp
point = '-0.7 0 0'
[]
[pp_08]
type = PointValue
variable = pp
point = '-0.8 0 0'
[]
[pp_09]
type = PointValue
variable = pp
point = '-0.9 0 0'
[]
[pp_10]
type = PointValue
variable = pp
point = '-1 0 0'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Outputs]
[csv]
type = CSV
[]
[]
(modules/solid_mechanics/test/tests/rom_stress_update/ADlower_limit.i)
temp = 800.0160634
disp = 1.0053264195e6
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[temperature]
initial_condition = ${temp}
[]
[]
[Functions]
[temp_weight]
type = ParsedFunction
symbol_names = 'lower_limit avg'
symbol_values = '800.0160634 temp_avg'
expression = 'val := 2 * avg / lower_limit - 1;
clamped := if(val <= -1, -0.99999, if(val >= 1, 0.99999, val));
plus := exp(-2 / (1 + clamped));
minus := exp(-2 / (1 - clamped));
plus / (plus + minus)'
[]
[stress_weight]
type = ParsedFunction
symbol_names = 'lower_limit avg'
symbol_values = '2.010652839e6 vonmises_stress'
expression = 'val := 2 * avg / lower_limit - 1;
clamped := if(val <= -1, -0.99999, if(val >= 1, 0.99999, val));
plus := exp(-2 / (1 + clamped));
minus := exp(-2 / (1 - clamped));
plus / (plus + minus)'
[]
[creep_rate_exact]
type = ParsedFunction
symbol_names = 'lower_limit_strain temp_weight stress_weight'
symbol_values = '3.370764e-12 temp_weight stress_weight'
expression = 'lower_limit_strain * temp_weight * stress_weight'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
use_automatic_differentiation = true
generate_output = vonmises_stress
[]
[]
[BCs]
[symmy]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[symmx]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0
[]
[symmz]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0
[]
[pressure_x]
type = ADPressure
variable = disp_x
boundary = right
factor = ${disp}
[]
[pressure_y]
type = ADPressure
variable = disp_y
boundary = top
factor = -${disp}
[]
[pressure_z]
type = ADPressure
variable = disp_z
boundary = front
factor = -${disp}
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 3.30e11
poissons_ratio = 0.3
[]
[stress]
type = ADComputeMultipleInelasticStress
inelastic_models = rom_stress_prediction
[]
[rom_stress_prediction]
type = ADSS316HLAROMANCEStressUpdateTest
temperature = temperature
initial_cell_dislocation_density = 6.0e12
initial_wall_dislocation_density = 4.4e11
outputs = all
apply_strain = false
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
nl_abs_tol = 1e-12
automatic_scaling = true
compute_scaling_once = false
num_steps = 1
dt = 1e5
[]
[Postprocessors]
[creep_rate_exact]
type = FunctionValuePostprocessor
function = creep_rate_exact
[]
[creep_rate_avg]
type = ElementAverageValue
variable = creep_rate
[]
[creep_rate_diff]
type = DifferencePostprocessor
value1 = creep_rate_exact
value2 = creep_rate_avg
[]
[temp_avg]
type = ElementAverageValue
variable = temperature
[]
[cell_dislocations]
type = ElementAverageValue
variable = cell_dislocations
[]
[wall_disloactions]
type = ElementAverageValue
variable = wall_dislocations
[]
[vonmises_stress]
type = ElementAverageValue
variable = vonmises_stress
[]
[]
[Outputs]
csv = true
[]
(modules/richards/test/tests/dirac/bh_fu_04.i)
# unsaturated
# production
# fullyupwind
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = DensityConstBulk
relperm_UO = RelPermPower
sat_UO = Saturation
seff_UO = Seff1VG
SUPG_UO = SUPGstandard
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1E-2 1E-1 1 1E1 1E2 1E3'
x = '0 1E-1 1 1E1 1E2 1E3'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./Seff1VG]
type = RichardsSeff1VG
m = 0.8
al = 1E-5
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0
sum_s_res = 0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E8
[../]
[./borehole_total_outflow_mass]
type = RichardsSumQuantity
[../]
[]
[Variables]
active = 'pressure'
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./p_ic]
type = FunctionIC
variable = pressure
function = initial_pressure
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
variable = pressure
[../]
[]
[DiracKernels]
[./bh]
type = RichardsBorehole
bottom_pressure = -1E6
point_file = bh02.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pressure
unit_weight = '0 0 0'
character = 1
fully_upwind = true
[../]
[]
[Postprocessors]
[./bh_report]
type = RichardsPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = RichardsMass
variable = pressure
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = RichardsMass
variable = pressure
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
indirect_dependencies = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[./p0]
type = PointValue
variable = pressure
point = '1 1 1'
execute_on = timestep_end
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 0
[../]
[./mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = 0
viscosity = 1E-3
mat_porosity = 0.1
mat_permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = Seff1VG
pressure_vars = pressure
[../]
[]
[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 = bh_fu_04
exodus = false
execute_on = timestep_end
csv = true
[]
(modules/solid_mechanics/test/tests/rom_stress_update/verification.i)
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./temperature]
[../]
[]
[AuxKernels]
[./temp_aux]
type = FunctionAux
variable = temperature
function = temp_fcn
execute_on = 'initial timestep_begin'
[../]
[]
[Functions]
[./rhom_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 1
format = columns
xy_in_file_only = false
direction = right
[../]
[./rhoi_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 2
format = columns
xy_in_file_only = false
direction = right
[../]
[./vmJ2_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 3
format = columns
xy_in_file_only = false
direction = right
[../]
[./evm_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 4
format = columns
xy_in_file_only = false
direction = right
[../]
[./temp_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 5
format = columns
xy_in_file_only = false
direction = right
[../]
[./rhom_soln_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 7
format = columns
xy_in_file_only = false
direction = right
[../]
[./rhoi_soln_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 8
format = columns
xy_in_file_only = false
direction = right
[../]
[./creep_rate_soln_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 10
format = columns
xy_in_file_only = false
direction = right
[../]
[./rhom_diff_fcn]
type = ParsedFunction
symbol_names = 'rhom_soln rhom'
symbol_values = 'rhom_soln rhom'
expression = 'abs(rhom_soln - rhom) / rhom_soln'
[../]
[./rhoi_diff_fcn]
type = ParsedFunction
symbol_names = 'rhoi_soln rhoi'
symbol_values = 'rhoi_soln rhoi'
expression = 'abs(rhoi_soln - rhoi) / rhoi_soln'
[../]
[./creep_rate_diff_fcn]
type = ParsedFunction
symbol_names = 'creep_rate_soln creep_rate'
symbol_values = 'creep_rate_soln creep_rate'
expression = 'abs(creep_rate_soln - creep_rate) / creep_rate_soln'
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
generate_output = 'vonmises_stress'
[../]
[]
[BCs]
[./symmx]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./symmy]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[../]
[./symmz]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[../]
[./pressure_x]
type = Pressure
variable = disp_x
boundary = right
function = vmJ2_fcn
factor = 0.5e6
[../]
[./pressure_y]
type = Pressure
variable = disp_y
boundary = top
function = vmJ2_fcn
factor = -0.5e6
[../]
[./pressure_z]
type = Pressure
variable = disp_z
boundary = front
function = vmJ2_fcn
factor = -0.5e6
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e11
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeMultipleInelasticStress
inelastic_models = rom_stress_prediction
[../]
[./rom_stress_prediction]
type = SS316HLAROMANCEStressUpdateTest
temperature = temperature
effective_inelastic_strain_name = effective_creep_strain
internal_solve_full_iteration_history = true
outputs = all
wall_dislocation_density_forcing_function = rhoi_fcn
cell_dislocation_density_forcing_function = rhom_fcn
old_creep_strain_forcing_function = evm_fcn
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_ksp_ew -snes_converged_reason -ksp_converged_reason'# -ksp_error_if_not_converged -snes_error_if_not_converged'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
automatic_scaling = true
compute_scaling_once = false
nl_abs_tol = 1e-10
dt = 1e-3
end_time = 1e-2
[]
[Postprocessors]
[./effective_strain_avg]
type = ElementAverageValue
variable = effective_creep_strain
outputs = console
[../]
[./temperature]
type = ElementAverageValue
variable = temperature
outputs = console
[../]
[./rhom]
type = ElementAverageValue
variable = cell_dislocations
[../]
[./rhoi]
type = ElementAverageValue
variable = wall_dislocations
[../]
[./vonmises_stress]
type = ElementAverageValue
variable = vonmises_stress
outputs = console
[../]
[./creep_rate]
type = ElementAverageValue
variable = creep_rate
[../]
[./rhom_in]
type = FunctionValuePostprocessor
function = rhom_fcn
execute_on = 'TIMESTEP_END initial'
outputs = console
[../]
[./rhoi_in]
type = FunctionValuePostprocessor
function = rhoi_fcn
execute_on = 'TIMESTEP_END initial'
outputs = console
[../]
[./vmJ2_in]
type = FunctionValuePostprocessor
function = vmJ2_fcn
execute_on = 'TIMESTEP_END initial'
outputs = console
[../]
[./rhom_soln]
type = FunctionValuePostprocessor
function = rhom_soln_fcn
outputs = console
[../]
[./rhoi_soln]
type = FunctionValuePostprocessor
function = rhoi_soln_fcn
outputs = console
[../]
[./creep_rate_soln]
type = FunctionValuePostprocessor
function = creep_rate_soln_fcn
outputs = console
[../]
[./rhom_diff]
type = FunctionValuePostprocessor
function = rhom_diff_fcn
outputs = console
[../]
[./rhoi_diff]
type = FunctionValuePostprocessor
function = rhoi_diff_fcn
outputs = console
[../]
[./creep_rate_diff]
type = FunctionValuePostprocessor
function = creep_rate_diff_fcn
outputs = console
[../]
[./rhom_max_diff]
type = TimeExtremeValue
postprocessor = rhom_diff
outputs = console
[../]
[./rhoi_max_diff]
type = TimeExtremeValue
postprocessor = rhoi_diff
outputs = console
[../]
[./creep_rate_max_diff]
type = TimeExtremeValue
postprocessor = creep_rate_diff
outputs = console
[../]
[]
[Outputs]
csv = true
file_base = 'verification_1e-3_out'
[]
(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
[]
(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/actions/debug_show_reporters/debug_show_reporters.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
[]
[]
[Postprocessors]
[scale]
type = ScalePostprocessor
value = function
scaling_factor = 2
[]
[function]
type = FunctionValuePostprocessor
function = 1
[]
[]
[VectorPostprocessors/constant_vpp]
type = ConstantVectorPostprocessor
vector_names = 'value1 value2'
value = '1; 2'
[]
[Reporters/constant_reporter]
type = ConstantReporter
integer_names = integer
integer_values = 1
real_names = real
real_values = 2
string_names = string
string_values = 'funny'
[]
[Debug]
show_reporters = true
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
(modules/porous_flow/examples/groundwater/ex02_steady_state.i)
# Steady-state groundwater model. See groundwater_models.md for a detailed description
[Mesh]
[basic_mesh]
# mesh create by external program: lies within -500<=x<=500 and -200<=y<=200, with varying z
type = FileMeshGenerator
file = ex02_mesh.e
[]
[name_blocks]
type = RenameBlockGenerator
input = basic_mesh
old_block = '2 3 4'
new_block = 'bot_aquifer aquitard top_aquifer'
[]
[zmax]
type = SideSetsFromNormalsGenerator
input = name_blocks
new_boundary = zmax
normals = '0 0 1'
[]
[xmin_bot_aquifer]
type = ParsedGenerateSideset
input = zmax
included_subdomains = 2
normal = '-1 0 0'
combinatorial_geometry = 'x <= -500.0'
new_sideset_name = xmin_bot_aquifer
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = initial_pp
[]
[]
[BCs]
[rainfall_recharge]
type = PorousFlowSink
boundary = zmax
variable = pp
flux_function = -1E-6 # recharge of 0.1mm/day = 1E-4m3/m2/day = 0.1kg/m2/day ~ 1E-6kg/m2/s
[]
[evapotranspiration]
type = PorousFlowHalfCubicSink
boundary = zmax
variable = pp
center = 0.0
cutoff = -5E4 # roots of depth 5m. 5m of water = 5E4 Pa
use_mobility = true
fluid_phase = 0
# Assume pan evaporation of 4mm/day = 4E-3m3/m2/day = 4kg/m2/day ~ 4E-5kg/m2/s
# Assume that if permeability was 1E-10m^2 and water table at topography then ET acts as pan strength
# Because use_mobility = true, then 4E-5 = maximum_flux = max * perm * density / visc = max * 1E-4, so max = 40
max = 40
[]
[]
[DiracKernels]
[river]
type = PorousFlowPolyLineSink
SumQuantityUO = baseflow
point_file = ex02_river.bh
# Assume a perennial river.
# Assume the river has an incision depth of 1m and a stage height of 1.5m, and these are constant in time and uniform over the whole model. Hence, if groundwater head is 0.5m (5000Pa) there will be no baseflow and leakage.
p_or_t_vals = '-999995000 5000 1000005000'
# Assume the riverbed conductance, k_zz*density*river_segment_length*river_width/riverbed_thickness/viscosity = 1E-6*river_segment_length kg/Pa/s
fluxes = '-1E3 0 1E3'
variable = pp
[]
[]
[Functions]
[initial_pp]
type = SolutionFunction
scale_factor = 1E4
from_variable = cosflow_depth
solution = initial_mesh
[]
[baseflow_rate]
type = ParsedFunction
symbol_names = 'baseflow_kg dt'
symbol_values = 'baseflow_kg dt'
expression = 'baseflow_kg / dt * 24.0 * 3600.0 / 400.0'
[]
[]
[PorousFlowUnsaturated]
fp = simple_fluid
porepressure = pp
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[porosity_everywhere]
type = PorousFlowPorosityConst
porosity = 0.05
[]
[permeability_aquifers]
type = PorousFlowPermeabilityConst
block = 'top_aquifer bot_aquifer'
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-13'
[]
[permeability_aquitard]
type = PorousFlowPermeabilityConst
block = aquitard
permeability = '1E-16 0 0 0 1E-16 0 0 0 1E-17'
[]
[]
[UserObjects]
[initial_mesh]
type = SolutionUserObject
execute_on = INITIAL
mesh = ex02_mesh.e
timestep = LATEST
system_variables = cosflow_depth
[]
[baseflow]
type = PorousFlowSumQuantity
[]
[]
[Postprocessors]
[baseflow_kg]
type = PorousFlowPlotQuantity
uo = baseflow
outputs = 'none'
[]
[dt]
type = TimestepSize
outputs = 'none'
[]
[baseflow_l_per_m_per_day]
type = FunctionValuePostprocessor
function = baseflow_rate
indirect_dependencies = 'baseflow_kg dt'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
# following 2 lines are not mandatory, but illustrate a popular preconditioner choice in groundwater models
petsc_options_iname = '-pc_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = ' asm ilu 2 '
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E6
[TimeStepper]
type = FunctionDT
function = 'max(1E6, t)'
[]
end_time = 1E12
nl_abs_tol = 1E-13
[]
[Outputs]
print_linear_residuals = false
[ex]
type = Exodus
execute_on = final
[]
[csv]
type = CSV
[]
[]
(modules/porous_flow/test/tests/hysteresis/hys_order_05.i)
# Test that PorousFlowHysteresisOrder correctly calculates hysteresis order
# Hysteresis order is initialised = 2, with turning points = (0.6, 0.8)
# Initial saturation is 0.71
# Water is removed from the system (so order = 2) until saturation = 0.6
# Then, water is removed from the system (so order = 0) until saturation = 0.58
# Then, water is added to the system (so order = 1 and turning point = 0.58) until saturation = 0.9
# Then, water is removed from the system (so order = 2 and turning point = 0.9)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = -9E5
[]
[]
[PorousFlowUnsaturated]
porepressure = pp
fp = simple_fluid
[]
[DiracKernels]
[source_sink_0]
type = PorousFlowPointSourceFromPostprocessor
point = '0 0 0'
mass_flux = sink_strength
variable = pp
[]
[source_sink_1]
type = PorousFlowPointSourceFromPostprocessor
point = '1 0 0'
mass_flux = sink_strength
variable = pp
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 1.0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0 0 0 0 0 0 0 0 0'
[]
[hys_order]
type = PorousFlowHysteresisOrder
initial_order = 2
previous_turning_points = '0.6 0.8'
[]
[]
[AuxVariables]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[tp0]
family = MONOMIAL
order = CONSTANT
[]
[tp1]
family = MONOMIAL
order = CONSTANT
[]
[tp2]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[tp0]
type = PorousFlowPropertyAux
variable = tp0
property = hysteresis_saturation_turning_point
hysteresis_turning_point = 0
[]
[tp1]
type = PorousFlowPropertyAux
variable = tp1
property = hysteresis_saturation_turning_point
hysteresis_turning_point = 1
[]
[tp2]
type = PorousFlowPropertyAux
variable = tp2
property = hysteresis_saturation_turning_point
hysteresis_turning_point = 2
[]
[]
[Functions]
[sink_strength_fcn]
type = ParsedFunction
expression = '30 * if(t <= 2, -1, if(t <= 7, 1, -1))'
[]
[]
[Postprocessors]
[sink_strength]
type = FunctionValuePostprocessor
function = sink_strength_fcn
outputs = 'none'
[]
[saturation]
type = PointValue
point = '0 0 0'
variable = saturation0
[]
[hys_order]
type = PointValue
point = '0 0 0'
variable = hys_order
[]
[tp0]
type = PointValue
point = '0 0 0'
variable = tp0
[]
[tp1]
type = PointValue
point = '0 0 0'
variable = tp1
[]
[tp2]
type = PointValue
point = '0 0 0'
variable = tp2
[]
[]
[Preconditioning]
[basic]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 10
nl_abs_tol = 1E-7
[]
[Outputs]
[csv]
type = CSV
[]
[]
(modules/stochastic_tools/test/tests/transfers/libtorch_nn_transfer/libtorch_drl_control_sub.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 0.0
xmax = 7.0
nx = 3
[]
[]
[Variables]
[temp]
initial_condition = 300
[]
[]
[Kernels]
[time]
type = CoefTimeDerivative
variable = temp
Coefficient = '${fparse 1.00630182*1.225}'
[]
[heat_conduc]
type = MatDiffusion
variable = temp
diffusivity = 'k'
[]
[]
[BCs]
[left_flux]
type = NeumannBC
value = 0.0
boundary = 'left'
variable = temp
[]
[dirichlet]
type = FunctionDirichletBC
function = temp_env
variable = temp
boundary = 'right'
[]
[]
[Functions]
[temp_env]
type = ParsedFunction
value = '15.0*sin(t/86400.0 *pi) + 273.0'
[]
[design_function]
type = ParsedFunction
value = '297'
[]
[reward_function]
type = ScaledAbsDifferenceDRLRewardFunction
design_function = design_function
observed_value = center_temp_tend
c1 = 1
c2 = 10
[]
[]
[Materials]
[constant]
type = GenericConstantMaterial
prop_names = 'k'
prop_values = 26.53832364
[]
[]
[Postprocessors]
[center_temp]
type = PointValue
variable = temp
point = '3.5 0.0 0.0'
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[center_temp_tend]
type = PointValue
variable = temp
point = '3.5 0.0 0.0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[env_temp]
type = FunctionValuePostprocessor
function = temp_env
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[reward]
type = FunctionValuePostprocessor
function = reward_function
execute_on = 'INITIAL TIMESTEP_END'
indirect_dependencies = 'center_temp_tend env_temp'
[]
[left_flux]
type = LibtorchControlValuePostprocessor
control_name = src_control
execute_on = 'INITIAL TIMESTEP_END'
[]
[log_prob_left_flux]
type = LibtorchDRLLogProbabilityPostprocessor
control_name = src_control
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Reporters]
[T_reporter]
type = AccumulateReporter
reporters = 'center_temp_tend/value env_temp/value reward/value left_flux/value log_prob_left_flux/value'
outputs = 'csv_out'
[]
[nn_parameters]
type = LibtorchArtificialNeuralNetParameters
control_name = src_control
outputs = json_out
[]
[]
[Controls]
[src_control]
type = LibtorchDRLControl
parameters = "BCs/left_flux/value"
responses = 'center_temp env_temp'
# keep consistent with LibtorchDRLControlTrainer
input_timesteps = 2
response_scaling_factors = '0.03 0.03'
response_shift_factors = '270 270'
action_standard_deviations = '0.1'
action_scaling_factors = 100
execute_on = 'TIMESTEP_BEGIN'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-8
start_time = 0.0
end_time = 86400
dt = 14400.0
[]
[Outputs]
[json_out]
type = JSON
execute_on = FINAL
execute_system_information_on = NONE
[]
[]
(test/tests/kernels/ode/parsedode_pp_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[]
[Variables]
[./x]
family = SCALAR
order = FIRST
initial_condition = 0
[../]
[]
[ScalarKernels]
[./dt]
type = ODETimeDerivative
variable = x
[../]
[./ode1]
type = ParsedODEKernel
expression = '-mytime'
postprocessors = mytime
variable = x
[../]
[]
[Postprocessors]
[./computed_x]
type = ScalarVariable
variable = x
execute_on = 'initial timestep_end'
[../]
[./mytime]
type = FunctionValuePostprocessor
function = t
execute_on = 'initial timestep_begin'
[../]
[./exact_x]
type = FunctionValuePostprocessor
function = '0.5*t^2'
execute_on = 'initial timestep_end'
[../]
[./l2err_x]
type = ScalarL2Error
variable = x
function = '0.5*t^2'
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 0.1
num_steps = 10
solve_type = 'NEWTON'
[]
[Outputs]
file_base = ode_pp_test_out
hide = 'x mytime'
csv = true
[]
(modules/porous_flow/test/tests/dirackernels/bh_except06.i)
# PorousFlowPeacemanBorehole exception test
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = 1E7
[]
[]
[Kernels]
[mass0]
type = TimeDerivative
variable = pp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
density0 = 1000
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[DiracKernels]
[bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
point_file = bh02.bh
use_mobility = true
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[]
[]
[Postprocessors]
[bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[]
[fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[]
[fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[]
[zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[]
[p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[]
[]
[Functions]
[mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[]
[]
[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 = 0.5
dt = 1E-2
solve_type = NEWTON
[]
(modules/porous_flow/test/tests/dirackernels/bh02reporter.i)
# fully-saturated
# production
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = 1E7
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[]
[UserObjects]
[borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[]
[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
viscosity = 1e-3
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.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[DiracKernels]
[bh]
type = PorousFlowPeacemanBorehole
# Because the Variable for this Sink is pp, and pp is associated
# with the fluid-mass conservation equation, this sink is extracting
# fluid mass (and not heat energy or something else)
variable = pp
# The following specfies that the total fluid mass coming out of
# the porespace via this sink in this timestep should be recorded
# in the pls_total_outflow_mass UserObject
SumQuantityUO = borehole_total_outflow_mass
# The following file defines the polyline geometry
# which is just two points in this particular example
weight_reporter='bh02file/column_0'
x_coord_reporter='bh02file/column_1'
y_coord_reporter='bh02file/column_2'
z_coord_reporter='bh02file/column_3'
# First, we want Peacemans f to be a function of porepressure (and not
# temperature or something else). So bottom_p_or_t is actually porepressure
function_of = pressure
fluid_phase = 0
# The bottomhole pressure
bottom_p_or_t = 0
# In this example there is no increase of the wellbore pressure
# due to gravity:
unit_weight = '0 0 0'
# PeacemanBoreholes should almost always have use_mobility = true
use_mobility = true
# This is a production wellbore (a sink of fluid that removes fluid from porespace)
character = 1
[]
[]
[VectorPostprocessors]
[bh02file]
type = CSVReader
csv_file = bh02.bh
[]
[]
[Postprocessors]
[bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[]
[fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[]
[fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[]
[zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
indirect_dependencies = 'fluid_mass1 fluid_mass0 bh_report'
[]
[p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[]
[]
[Functions]
[mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[]
[]
[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 = 0.5
dt = 1E-2
solve_type = NEWTON
[]
[Outputs]
exodus = false
csv = true
execute_on = timestep_end
[]
(python/chigger/tests/simple/mug_blocks.i)
[Mesh]
type = FileMesh
file = mug.e
[]
[MeshModifiers]
[./subdomains]
type = SubdomainBoundingBox
top_right = '3 3 3'
bottom_left = '0 -3 -2.1'
block_id = '76'
[../]
[]
[Variables]
[./convected]
order = FIRST
family = LAGRANGE
[../]
[./diffused]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./aux_elem]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff_convected]
type = Diffusion
variable = convected
[../]
[./conv]
# Couple a variable into the convection kernel using local_name = simulationg_name syntax
type = Convection
variable = convected
velocity = '1 1 1'
[../]
[./diff_diffused]
type = Diffusion
variable = diffused
[../]
[./diff_t]
type = TimeDerivative
variable = diffused
[../]
[./conv_t]
type = TimeDerivative
variable = convected
block = '76'
[../]
[]
[BCs]
[./bottom_convected]
type = DirichletBC
variable = convected
boundary = bottom
value = 1
[../]
[./top_convected]
type = DirichletBC
variable = convected
boundary = top
value = 0
[../]
[./bottom_diffused]
type = DirichletBC
variable = diffused
boundary = bottom
value = 2
[../]
[./top_diffused]
type = DirichletBC
variable = diffused
boundary = top
value = 0
[../]
[]
[Postprocessors]
[./func_pp]
type = FunctionValuePostprocessor
function = 2*t
[../]
[]
[Executioner]
# Preconditioned JFNK (default)
type = Transient
num_steps = 20
solve_type = PJFNK
dt = 0.1
[]
[Outputs]
exodus = true
[]
[ICs]
[./aux_ic]
variable = aux_elem
max = 10
seed = 2
type = RandomIC
[../]
[]
(modules/porous_flow/test/tests/gravity/grav02d.i)
# Checking that gravity head is established in the transient situation when 0<=saturation<=1 (note the less-than-or-equal-to).
# 2phase (PP), 2components, vanGenuchten, constant fluid bulk-moduli for each phase, constant viscosity, constant permeability, Corey relative perm.
# A boundary condition enforces porepressures at the right boundary
# For better agreement with the analytical solution (ana_pp), just increase nx
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = -1
xmax = 0
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Functions]
[dts]
type = PiecewiseLinear
x = '1E-3 1E-2 1E-1 2E-1'
y = '1E-3 1E-2 0.2E-1 1E-1'
[]
[]
[Variables]
[ppwater]
initial_condition = 0
[]
[ppgas]
initial_condition = 0.5
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[]
[BCs]
[ppwater]
type = DirichletBC
boundary = right
variable = ppwater
value = 0
[]
[ppgas]
type = DirichletBC
boundary = right
variable = ppgas
value = 0.5
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = ppwater
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = ppwater
gravity = '-1 0 0'
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = ppgas
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = ppgas
gravity = '-1 0 0'
[]
[]
[Functions]
[ana_ppwater]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 2 pp_water_top 1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.2
density0 = 1
viscosity = 1
thermal_expansion = 0
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 0.1
viscosity = 0.5
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
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
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 0
[]
[relperm_gas]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 1
[]
[]
[Postprocessors]
[pp_water_top]
type = PointValue
variable = ppwater
point = '0 0 0'
[]
[pp_water_base]
type = PointValue
variable = ppwater
point = '-1 0 0'
[]
[pp_water_analytical]
type = FunctionValuePostprocessor
function = ana_ppwater
point = '-1 0 0'
[]
[ppwater_00]
type = PointValue
variable = ppwater
point = '0 0 0'
[]
[ppwater_01]
type = PointValue
variable = ppwater
point = '-0.1 0 0'
[]
[ppwater_02]
type = PointValue
variable = ppwater
point = '-0.2 0 0'
[]
[ppwater_03]
type = PointValue
variable = ppwater
point = '-0.3 0 0'
[]
[ppwater_04]
type = PointValue
variable = ppwater
point = '-0.4 0 0'
[]
[ppwater_05]
type = PointValue
variable = ppwater
point = '-0.5 0 0'
[]
[ppwater_06]
type = PointValue
variable = ppwater
point = '-0.6 0 0'
[]
[ppwater_07]
type = PointValue
variable = ppwater
point = '-0.7 0 0'
[]
[ppwater_08]
type = PointValue
variable = ppwater
point = '-0.8 0 0'
[]
[ppwater_09]
type = PointValue
variable = ppwater
point = '-0.9 0 0'
[]
[ppwater_10]
type = PointValue
variable = ppwater
point = '-1 0 0'
[]
[ppgas_00]
type = PointValue
variable = ppgas
point = '0 0 0'
[]
[ppgas_01]
type = PointValue
variable = ppgas
point = '-0.1 0 0'
[]
[ppgas_02]
type = PointValue
variable = ppgas
point = '-0.2 0 0'
[]
[ppgas_03]
type = PointValue
variable = ppgas
point = '-0.3 0 0'
[]
[ppgas_04]
type = PointValue
variable = ppgas
point = '-0.4 0 0'
[]
[ppgas_05]
type = PointValue
variable = ppgas
point = '-0.5 0 0'
[]
[ppgas_06]
type = PointValue
variable = ppgas
point = '-0.6 0 0'
[]
[ppgas_07]
type = PointValue
variable = ppgas
point = '-0.7 0 0'
[]
[ppgas_08]
type = PointValue
variable = ppgas
point = '-0.8 0 0'
[]
[ppgas_09]
type = PointValue
variable = ppgas
point = '-0.9 0 0'
[]
[ppgas_10]
type = PointValue
variable = ppgas
point = '-1 0 0'
[]
[]
[Preconditioning]
active = andy
[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'
[]
[check]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-12 1E-10 10000 test'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
[TimeStepper]
type = FunctionDT
function = dts
[]
end_time = 1.0
[]
[Outputs]
[csv]
type = CSV
execute_on = 'initial final'
file_base = grav02d
[]
[]
(modules/solid_mechanics/test/tests/capped_mohr_coulomb/random4.i)
# Using CappedMohrCoulomb
# Plasticity models:
# Tensile strength = 0.1MPa
# Compressive strength = 1.0MPa
# Cohesion = 1MPa
# Friction angle = dilation angle = 0.5
#
# Lame lambda = 1GPa. Lame mu = 1.3GPa
#
# A line of elements is perturbed randomly, and return to the yield surface at each quadpoint is checked
[Mesh]
type = GeneratedMesh
dim = 3
nx = 100
ny = 12
nz = 1
xmin = 0
xmax = 100
ymin = 0
ymax = 12
zmin = 0
zmax = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
add_variables = true
incremental = true
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_yz stress_zz'
[../]
[]
[ICs]
[./x]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_x
[../]
[./y]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_y
[../]
[./z]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_z
[../]
[]
[BCs]
[./x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'front back'
function = '0'
[../]
[./y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'front back'
function = '0'
[../]
[./z]
type = FunctionDirichletBC
variable = disp_z
boundary = 'front back'
function = '0'
[../]
[]
[AuxVariables]
[./f0]
order = CONSTANT
family = MONOMIAL
[../]
[./f1]
order = CONSTANT
family = MONOMIAL
[../]
[./f2]
order = CONSTANT
family = MONOMIAL
[../]
[./f3]
order = CONSTANT
family = MONOMIAL
[../]
[./f4]
order = CONSTANT
family = MONOMIAL
[../]
[./f5]
order = CONSTANT
family = MONOMIAL
[../]
[./f6]
order = CONSTANT
family = MONOMIAL
[../]
[./f7]
order = CONSTANT
family = MONOMIAL
[../]
[./f8]
order = CONSTANT
family = MONOMIAL
[../]
[./f9]
order = CONSTANT
family = MONOMIAL
[../]
[./f10]
order = CONSTANT
family = MONOMIAL
[../]
[./f11]
order = CONSTANT
family = MONOMIAL
[../]
[./int0]
order = CONSTANT
family = MONOMIAL
[../]
[./int1]
order = CONSTANT
family = MONOMIAL
[../]
[./iter]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./f0]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 0
variable = f0
[../]
[./f1]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 1
variable = f1
[../]
[./f2]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 2
variable = f2
[../]
[./f3]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 3
variable = f3
[../]
[./f4]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 4
variable = f4
[../]
[./f5]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 5
variable = f5
[../]
[./f6]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 6
variable = f6
[../]
[./f7]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 7
variable = f7
[../]
[./f8]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 8
variable = f8
[../]
[./f9]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 9
variable = f9
[../]
[./f10]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 10
variable = f10
[../]
[./f11]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 11
variable = f11
[../]
[./int0]
type = MaterialStdVectorAux
property = plastic_internal_parameter
index = 0
variable = int0
[../]
[./int1]
type = MaterialStdVectorAux
property = plastic_internal_parameter
index = 1
variable = int1
[../]
[./iter]
type = MaterialRealAux
property = plastic_NR_iterations
variable = iter
[../]
[]
[Postprocessors]
[./tot_iters]
type = ElementIntegralMaterialProperty
mat_prop = plastic_NR_iterations
outputs = console
[../]
[./intnl0_max]
type = ElementExtremeValue
variable = int0
outputs = console
[../]
[./intnl1_max]
type = ElementExtremeValue
variable = int1
outputs = console
[../]
[./raw_f0]
type = ElementExtremeValue
variable = f0
outputs = console
[../]
[./raw_f1]
type = ElementExtremeValue
variable = f1
outputs = console
[../]
[./raw_f2]
type = ElementExtremeValue
variable = f2
outputs = console
[../]
[./raw_f3]
type = ElementExtremeValue
variable = f3
outputs = console
[../]
[./raw_f4]
type = ElementExtremeValue
variable = f4
outputs = console
[../]
[./raw_f5]
type = ElementExtremeValue
variable = f5
outputs = console
[../]
[./raw_f6]
type = ElementExtremeValue
variable = f6
outputs = console
[../]
[./raw_f7]
type = ElementExtremeValue
variable = f7
outputs = console
[../]
[./raw_f8]
type = ElementExtremeValue
variable = f8
outputs = console
[../]
[./raw_f9]
type = ElementExtremeValue
variable = f9
outputs = console
[../]
[./raw_f10]
type = ElementExtremeValue
variable = f10
outputs = console
[../]
[./raw_f11]
type = ElementExtremeValue
variable = f11
outputs = console
[../]
[./iter]
type = ElementExtremeValue
variable = iter
outputs = console
[../]
[./f0]
type = FunctionValuePostprocessor
function = should_be_zero0_fcn
[../]
[./f1]
type = FunctionValuePostprocessor
function = should_be_zero1_fcn
[../]
[./f2]
type = FunctionValuePostprocessor
function = should_be_zero2_fcn
[../]
[./f3]
type = FunctionValuePostprocessor
function = should_be_zero3_fcn
[../]
[./f4]
type = FunctionValuePostprocessor
function = should_be_zero4_fcn
[../]
[./f5]
type = FunctionValuePostprocessor
function = should_be_zero5_fcn
[../]
[./f6]
type = FunctionValuePostprocessor
function = should_be_zero6_fcn
[../]
[./f7]
type = FunctionValuePostprocessor
function = should_be_zero7_fcn
[../]
[./f8]
type = FunctionValuePostprocessor
function = should_be_zero8_fcn
[../]
[./f9]
type = FunctionValuePostprocessor
function = should_be_zero9_fcn
[../]
[./f10]
type = FunctionValuePostprocessor
function = should_be_zero10_fcn
[../]
[./f11]
type = FunctionValuePostprocessor
function = should_be_zero11_fcn
[../]
[]
[Functions]
[./should_be_zero0_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f0'
[../]
[./should_be_zero1_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f1'
[../]
[./should_be_zero2_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f2'
[../]
[./should_be_zero3_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f3'
[../]
[./should_be_zero4_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f4'
[../]
[./should_be_zero5_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f5'
[../]
[./should_be_zero6_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f6'
[../]
[./should_be_zero7_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f7'
[../]
[./should_be_zero8_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f8'
[../]
[./should_be_zero9_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f9'
[../]
[./should_be_zero10_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f10'
[../]
[./should_be_zero11_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f11'
[../]
[]
[UserObjects]
[./ts]
type = SolidMechanicsHardeningCubic
value_0 = 1E6
value_residual = 2E6
internal_limit = 1
[../]
[./cs]
type = SolidMechanicsHardeningCubic
value_0 = 1E7
value_residual = 0.5E7
internal_limit = 1
[../]
[./coh]
type = SolidMechanicsHardeningCubic
value_0 = 2E6
value_residual = 1E6
internal_limit = 1
[../]
[./phi]
type = SolidMechanicsHardeningCubic
value_0 = 0.6
value_residual = 0.2
internal_limit = 1
[../]
[./psi]
type = SolidMechanicsHardeningCubic
value_0 = 0.5
value_residual = 0.1
internal_limit = 1
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric_isotropic
C_ijkl = '1E9 1.3E9'
[../]
[./tensile]
type = CappedMohrCoulombStressUpdate
tensile_strength = ts
compressive_strength = cs
cohesion = coh
friction_angle = phi
dilation_angle = psi
smoothing_tol = 1E5
max_NR_iterations = 1000
yield_function_tol = 1.0E-1
[../]
[./stress]
type = ComputeMultipleInelasticStress
inelastic_models = tensile
perform_finite_strain_rotations = false
[../]
[]
[Executioner]
end_time = 1
dt = 1
dtmin = 1
type = Transient
[]
[Outputs]
file_base = random4
csv = true
[]
(modules/solid_mechanics/test/tests/mohr_coulomb/many_deforms_cap.i)
# apply many large deformations, checking that the algorithm returns correctly to
# the yield surface each time
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[]
[BCs]
[./bottomx]
type = DirichletBC
variable = disp_x
boundary = back
value = 0.0
[../]
[./bottomy]
type = DirichletBC
variable = disp_y
boundary = back
value = 0.0
[../]
[./bottomz]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[./topx]
type = FunctionDirichletBC
variable = disp_x
boundary = front
function = '(sin(0.05*t)+x)/1E0'
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
boundary = front
function = '(cos(0.04*t)+x*y)/1E0'
[../]
[./topz]
type = FunctionDirichletBC
variable = disp_z
boundary = front
function = 't/1E2'
[../]
[]
[AuxVariables]
[./yield_fcn]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./yield_fcn_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_yield_function
variable = yield_fcn
[../]
[]
[Postprocessors]
[./yield_fcn_at_zero]
type = PointValue
point = '0 0 0'
variable = yield_fcn
outputs = 'console'
[../]
[./should_be_zero]
type = FunctionValuePostprocessor
function = should_be_zero_fcn
[../]
[]
[Functions]
[./should_be_zero_fcn]
type = ParsedFunction
expression = 'if(a<1E-3,0,a)'
symbol_names = 'a'
symbol_values = 'yield_fcn_at_zero'
[../]
[]
[UserObjects]
[./mc_coh]
type = SolidMechanicsHardeningConstant
value = 1E3
[../]
[./mc_phi]
type = SolidMechanicsHardeningConstant
value = 30
convert_to_radians = true
[../]
[./mc_psi]
type = SolidMechanicsHardeningConstant
value = 5
convert_to_radians = true
[../]
[./mc]
type = SolidMechanicsPlasticMohrCoulomb
cohesion = mc_coh
friction_angle = mc_phi
dilation_angle = mc_psi
tip_scheme = cap
mc_tip_smoother = 0.0
cap_start = 1000
cap_rate = 1E-3
mc_edge_smoother = 10
yield_function_tolerance = 1E-3
internal_constraint_tolerance = 1E-6
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
fill_method = symmetric_isotropic
C_ijkl = '0 1E7'
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./mc]
type = ComputeMultiPlasticityStress
block = 0
max_NR_iterations = 1000
ep_plastic_tolerance = 1E-6
plastic_models = mc
debug_fspb = crash
deactivation_scheme = safe
[../]
[]
[Executioner]
end_time = 1000
dt = 1
type = Transient
[]
[Outputs]
file_base = many_deforms_cap
exodus = false
[./csv]
type = CSV
[../]
[]
(modules/porous_flow/test/tests/hysteresis/hys_order_01.i)
# Test that PorousFlowHysteresisOrder correctly calculates hysteresis order
# Water is removed from the system (so order = 0) until saturation = S0
# Then, water is added to the system (so order = 1) until saturation = S1
# Then, water is removed from the system (so order = 2)
# More water is removed from the system so that the saturation < S0 (so order = 0)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = 0.0
[]
[]
[PorousFlowUnsaturated]
porepressure = pp
fp = simple_fluid
[]
[DiracKernels]
[source_sink_0]
type = PorousFlowPointSourceFromPostprocessor
point = '0 0 0'
mass_flux = sink_strength
variable = pp
[]
[source_sink_1]
type = PorousFlowPointSourceFromPostprocessor
point = '1 0 0'
mass_flux = sink_strength
variable = pp
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 1.0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0 0 0 0 0 0 0 0 0'
[]
[hys_order]
type = PorousFlowHysteresisOrder
[]
[]
[AuxVariables]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[tp0]
family = MONOMIAL
order = CONSTANT
[]
[tp1]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[tp0]
type = PorousFlowPropertyAux
variable = tp0
property = hysteresis_saturation_turning_point
hysteresis_turning_point = 0
[]
[tp1]
type = PorousFlowPropertyAux
variable = tp1
property = hysteresis_saturation_turning_point
hysteresis_turning_point = 1
[]
[]
[Functions]
[sink_strength_fcn]
type = ParsedFunction
expression = '30 * if(t <= 4, -1, if(t <= 7, 1, -1))'
[]
[]
[Postprocessors]
[sink_strength]
type = FunctionValuePostprocessor
function = sink_strength_fcn
outputs = 'none'
[]
[saturation]
type = PointValue
point = '0 0 0'
variable = saturation0
[]
[hys_order]
type = PointValue
point = '0 0 0'
variable = hys_order
[]
[tp0]
type = PointValue
point = '0 0 0'
variable = tp0
[]
[tp1]
type = PointValue
point = '0 0 0'
variable = tp1
[]
[]
[Preconditioning]
[basic]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 13
nl_abs_tol = 1E-7
[]
[Outputs]
[csv]
type = CSV
sync_times = '0 1 5 6 7 8 9 10 11 13' # cut out t=12 because numerical roundoff might mean order is not reduced exactly at t=12
sync_only = true
[]
[]
(test/tests/auxkernels/pp_depend/pp_depend_indirect_wrong.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[u]
[]
[]
[Functions]
[t_func]
type = ParsedFunction
expression = ptime
symbol_names = ptime
symbol_values = ptime_pp
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[Postprocessors]
# This FunctionValuePostprocessor uses an outdated value for ptime
[t_pp1]
type = FunctionValuePostprocessor
function = t_func
[]
[ptime_pp]
type = TimePostprocessor
[]
# This FunctionValuePostprocessor uses the current value for ptime
# This is construction order dependent
[t_pp2]
type = FunctionValuePostprocessor
function = t_func
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
dt = 1
num_steps = 5
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/mean_cap_TC/random03.i)
# apply many random large deformations, checking that the algorithm returns correctly to
# the yield surface each time.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1000
ny = 125
nz = 1
xmin = 0
xmax = 1000
ymin = 0
ymax = 125
zmin = 0
zmax = 1
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[]
[ICs]
[./x]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_x
[../]
[./y]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_y
[../]
[./z]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_z
[../]
[]
[BCs]
[./x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'front back'
function = '0'
[../]
[./y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'front back'
function = '0'
[../]
[./z]
type = FunctionDirichletBC
variable = disp_z
boundary = 'front back'
function = '0'
[../]
[]
[AuxVariables]
[./yield_fcn]
order = CONSTANT
family = MONOMIAL
[../]
[./iter]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./yield_fcn_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_yield_function
variable = yield_fcn
[../]
[./iter]
type = MaterialRealAux
property = plastic_NR_iterations
variable = iter
[../]
[]
[Postprocessors]
[./max_yield_fcn]
type = ElementExtremeValue
variable = yield_fcn
outputs = 'console'
[../]
[./should_be_zero]
type = FunctionValuePostprocessor
function = should_be_zero_fcn
[../]
[./av_iter]
type = ElementAverageValue
variable = iter
outputs = 'console'
[../]
[]
[Functions]
[./should_be_zero_fcn]
type = ParsedFunction
expression = 'if(a<1E-3,0,a)'
symbol_names = 'a'
symbol_values = 'max_yield_fcn'
[../]
[]
[UserObjects]
[./tensile_strength]
type = SolidMechanicsHardeningCubic
value_0 = 1
value_residual = 0.1
internal_limit = 0.1
[../]
[./compressive_strength]
type = SolidMechanicsHardeningCubic
value_0 = -1.5
value_residual = 0
internal_limit = 0.1
[../]
[./cap]
type = SolidMechanicsPlasticMeanCapTC
tensile_strength = tensile_strength
compressive_strength = compressive_strength
yield_function_tolerance = 1E-5
internal_constraint_tolerance = 1E-11
use_custom_returnMap = false
use_custom_cto = false
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
fill_method = symmetric_isotropic
C_ijkl = '0.7E7 1E7'
[../]
[./strain]
type = ComputeIncrementalSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./mc]
type = ComputeMultiPlasticityStress
block = 0
max_NR_iterations = 2
ep_plastic_tolerance = 1E-8
plastic_models = cap
[../]
[]
[Executioner]
end_time = 1
dt = 1
type = Transient
[]
[Outputs]
file_base = random03
exodus = false
[./csv]
type = CSV
[../]
[]
(modules/porous_flow/examples/multiapp_fracture_flow/3dFracture/fracture_only_aperture_changing.i)
# Cold water injection into one side of the fracture network, and production from the other side
injection_rate = 10 # kg/s
[Mesh]
uniform_refine = 0
[cluster34]
type = FileMeshGenerator
file = 'Cluster_34.exo'
[]
[injection_node]
type = BoundingBoxNodeSetGenerator
input = cluster34
bottom_left = '-1000 0 -1000'
top_right = '1000 0.504 1000'
new_boundary = injection_node
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 -9.81E-6' # Note the value, because of pressure_unit
[]
[Variables]
[frac_P]
scaling = 1E6
[]
[frac_T]
initial_condition = 473
[]
[]
[ICs]
[frac_P]
type = FunctionIC
variable = frac_P
function = insitu_pp
[]
[]
[PorousFlowFullySaturated]
coupling_type = ThermoHydro
porepressure = frac_P
temperature = frac_T
fp = water
pressure_unit = MPa
[]
[Kernels]
[toMatrix]
type = PorousFlowHeatMassTransfer
variable = frac_T
v = transferred_matrix_T
transfer_coefficient = heat_transfer_coefficient
save_in = joules_per_s
[]
[]
[AuxVariables]
[heat_transfer_coefficient]
family = MONOMIAL
order = CONSTANT
initial_condition = 0.0
[]
[transferred_matrix_T]
initial_condition = 473
[]
[joules_per_s]
[]
[normal_dirn_x]
family = MONOMIAL
order = CONSTANT
[]
[normal_dirn_y]
family = MONOMIAL
order = CONSTANT
[]
[normal_dirn_z]
family = MONOMIAL
order = CONSTANT
[]
[enclosing_element_normal_length]
family = MONOMIAL
order = CONSTANT
[]
[enclosing_element_normal_thermal_cond]
family = MONOMIAL
order = CONSTANT
[]
[aperture]
family = MONOMIAL
order = CONSTANT
[]
[perm_times_app]
family = MONOMIAL
order = CONSTANT
[]
[density]
family = MONOMIAL
order = CONSTANT
[]
[viscosity]
family = MONOMIAL
order = CONSTANT
[]
[insitu_pp]
[]
[]
[AuxKernels]
[normal_dirn_x_auxk]
type = PorousFlowElementNormal
variable = normal_dirn_x
component = x
[]
[normal_dirn_y]
type = PorousFlowElementNormal
variable = normal_dirn_y
component = y
[]
[normal_dirn_z]
type = PorousFlowElementNormal
variable = normal_dirn_z
component = z
[]
[heat_transfer_coefficient_auxk]
type = ParsedAux
variable = heat_transfer_coefficient
coupled_variables = 'enclosing_element_normal_length enclosing_element_normal_thermal_cond'
constant_names = h_s
constant_expressions = 1E3 # should be much bigger than thermal_conductivity / L ~ 1
expression = 'if(enclosing_element_normal_length = 0, 0, h_s * enclosing_element_normal_thermal_cond * 2 * enclosing_element_normal_length / (h_s * enclosing_element_normal_length * enclosing_element_normal_length + enclosing_element_normal_thermal_cond * 2 * enclosing_element_normal_length))'
[]
[aperture]
type = PorousFlowPropertyAux
variable = aperture
property = porosity
[]
[perm_times_app]
type = PorousFlowPropertyAux
variable = perm_times_app
property = permeability
row = 0
column = 0
[]
[density]
type = PorousFlowPropertyAux
variable = density
property = density
phase = 0
[]
[viscosity]
type = PorousFlowPropertyAux
variable = viscosity
property = viscosity
phase = 0
[]
[insitu_pp]
type = FunctionAux
execute_on = initial
variable = insitu_pp
function = insitu_pp
[]
[]
[BCs]
[inject_heat]
type = DirichletBC
boundary = injection_node
variable = frac_T
value = 373
[]
[]
[DiracKernels]
[inject_fluid]
type = PorousFlowPointSourceFromPostprocessor
mass_flux = ${injection_rate}
point = '58.8124 0.50384 74.7838'
variable = frac_P
[]
[withdraw_fluid]
type = PorousFlowPeacemanBorehole
SumQuantityUO = kg_out_uo
bottom_p_or_t = 10.6 # 1MPa + approx insitu at production point, to prevent aperture closing due to low porepressures
character = 1
line_length = 1
point_file = production.xyz
unit_weight = '0 0 0'
fluid_phase = 0
use_mobility = true
variable = frac_P
[]
[withdraw_heat]
type = PorousFlowPeacemanBorehole
SumQuantityUO = J_out_uo
bottom_p_or_t = 10.6 # 1MPa + approx insitu at production point, to prevent aperture closing due to low porepressures
character = 1
line_length = 1
point_file = production.xyz
unit_weight = '0 0 0'
fluid_phase = 0
use_mobility = true
use_enthalpy = true
variable = frac_T
[]
[]
[UserObjects]
[kg_out_uo]
type = PorousFlowSumQuantity
[]
[J_out_uo]
type = PorousFlowSumQuantity
[]
[]
[FluidProperties]
[true_water]
type = Water97FluidProperties
[]
[water]
type = TabulatedBicubicFluidProperties
fp = true_water
temperature_min = 275 # K
temperature_max = 600
interpolated_properties = 'density viscosity enthalpy internal_energy'
fluid_property_file = water97_tabulated.csv
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityLinear
porosity_ref = 1E-4 # fracture porosity = 1.0, but must include fracture aperture of 1E-4 at P = insitu_pp
P_ref = insitu_pp
P_coeff = 1E-3 # this is in metres/MPa, ie for P_ref = 1/P_coeff, the aperture becomes 1 metre
porosity_min = 1E-5
[]
[permeability]
type = PorousFlowPermeabilityKozenyCarman
k0 = 1E-15 # fracture perm = 1E-11 m^2, but must include fracture aperture of 1E-4
poroperm_function = kozeny_carman_phi0
m = 0
n = 3
phi0 = 1E-4
[]
[internal_energy]
type = PorousFlowMatrixInternalEnergy
density = 2700 # kg/m^3
specific_heat_capacity = 0 # basically no rock inside the fracture
[]
[aq_thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0.6E-4 0 0 0 0.6E-4 0 0 0 0.6E-4' # thermal conductivity of water times fracture aperture. This should increase linearly with aperture, but is set constant in this model
[]
[]
[Functions]
[kg_rate]
type = ParsedFunction
symbol_values = 'dt kg_out'
symbol_names = 'dt kg_out'
expression = 'kg_out/dt'
[]
[insitu_pp]
type = ParsedFunction
expression = '10 - 0.847E-2 * z' # Approximate hydrostatic in MPa
[]
[]
[Postprocessors]
[dt]
type = TimestepSize
outputs = 'none'
[]
[kg_out]
type = PorousFlowPlotQuantity
uo = kg_out_uo
[]
[kg_per_s]
type = FunctionValuePostprocessor
function = kg_rate
[]
[J_out]
type = PorousFlowPlotQuantity
uo = J_out_uo
[]
[TK_out]
type = PointValue
variable = frac_T
point = '101.705 160.459 39.5722'
[]
[P_out]
type = PointValue
variable = frac_P
point = '101.705 160.459 39.5722'
[]
[P_in]
type = PointValue
variable = frac_P
point = '58.8124 0.50384 74.7838'
[]
[]
[VectorPostprocessors]
[heat_transfer_rate]
type = NodalValueSampler
outputs = none
sort_by = id
variable = joules_per_s
[]
[]
[Preconditioning]
[entire_jacobian]
type = SMP
full = true
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2 '
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
[TimeStepper]
type = IterationAdaptiveDT
dt = 1
optimal_iterations = 10
growth_factor = 1.5
[]
dtmax = 1E8
end_time = 1E8
nl_abs_tol = 1E-3
nl_max_its = 20
[]
[Outputs]
print_linear_residuals = false
csv = true
[ex]
type = Exodus
sync_times = '1 10 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000 2100 2200 2300 2400 2500 2600 2700 2800 2900 3000 3100 3200 3300 3400 3500 3600 3700 3800 3900 4000 4100 4200 4300 4400 4500 4600 4700 4800 4900 5000 5100 5200 5300 5400 5500 5600 5700 5800 5900 6000 6100 6200 6300 6400 6500 6600 6700 6800 6900 7000 7100 7200 7300 7400 7500 7600 7700 7800 7900 8000 8100 8200 8300 8400 8500 8600 8700 8800 8900 9000 10000 11000 12000 13000 14000 15000 16000 17000 18000 19000 20000 30000 50000 70000 100000 200000 300000 400000 500000 600000 700000 800000 900000 1000000 1100000 1200000 1300000 1400000 1500000 1600000 1700000 1800000 1900000 2000000 2100000 2200000 2300000 2400000 2500000 2600000 2700000 2800000 2900000'
sync_only = true
[]
[]
(modules/porous_flow/test/tests/dirackernels/bh_except13.i)
# PorousFlowPeacemanBorehole exception test
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = 1E7
[]
[]
[Kernels]
[mass0]
type = TimeDerivative
variable = pp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
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.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[]
[DiracKernels]
[bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
point_file = coincident_points.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[]
[]
[Postprocessors]
[bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[]
[fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[]
[fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[]
[zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[]
[p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[]
[]
[Functions]
[mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[]
[]
[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 = 0.5
dt = 1E-2
solve_type = NEWTON
[]
(modules/solid_mechanics/test/tests/multi/rock1.i)
# Plasticity models:
# Mohr-Coulomb with cohesion = 40MPa, friction angle = 35deg, dilation angle = 10deg
# Tensile with strength = 1MPa
# WeakPlaneShear with cohesion = 1MPa, friction angle = 25deg, dilation angle = 25deg
# WeakPlaneTensile with strength = 0.01MPa
#
# Lame lambda = 1GPa. Lame mu = 1.3GPa
#
# A line of elements is perturbed randomly, and return to the yield surface at each quadpoint is checked
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1000
ny = 1234
nz = 1
xmin = 0
xmax = 1000
ymin = 0
ymax = 1234
zmin = 0
zmax = 1
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[]
[ICs]
[./x]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_x
[../]
[./y]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_y
[../]
[./z]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_z
[../]
[]
[BCs]
[./x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'front back'
function = '0'
[../]
[./y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'front back'
function = '0'
[../]
[./z]
type = FunctionDirichletBC
variable = disp_z
boundary = 'front back'
function = '0'
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./f0]
order = CONSTANT
family = MONOMIAL
[../]
[./f1]
order = CONSTANT
family = MONOMIAL
[../]
[./f2]
order = CONSTANT
family = MONOMIAL
[../]
[./f3]
order = CONSTANT
family = MONOMIAL
[../]
[./int0]
order = CONSTANT
family = MONOMIAL
[../]
[./int1]
order = CONSTANT
family = MONOMIAL
[../]
[./int2]
order = CONSTANT
family = MONOMIAL
[../]
[./int3]
order = CONSTANT
family = MONOMIAL
[../]
[./iter]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./f0]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 0
variable = f0
[../]
[./f1]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 1
variable = f1
[../]
[./f2]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 2
variable = f2
[../]
[./f3]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 3
variable = f3
[../]
[./int0]
type = MaterialStdVectorAux
property = plastic_internal_parameter
factor = 1E6
index = 0
variable = int0
[../]
[./int1]
type = MaterialStdVectorAux
property = plastic_internal_parameter
factor = 1E6
index = 1
variable = int1
[../]
[./int2]
type = MaterialStdVectorAux
property = plastic_internal_parameter
factor = 1E6
index = 2
variable = int2
[../]
[./int3]
type = MaterialStdVectorAux
property = plastic_internal_parameter
factor = 1E6
index = 3
variable = int3
[../]
[./iter]
type = MaterialRealAux
property = plastic_NR_iterations
variable = iter
[../]
[]
[Postprocessors]
[./raw_f0]
type = ElementExtremeValue
variable = f0
outputs = console
[../]
[./raw_f1]
type = ElementExtremeValue
variable = f1
outputs = console
[../]
[./raw_f2]
type = ElementExtremeValue
variable = f2
outputs = console
[../]
[./raw_f3]
type = ElementExtremeValue
variable = f3
outputs = console
[../]
[./iter]
type = ElementExtremeValue
variable = iter
outputs = console
[../]
[./f0]
type = FunctionValuePostprocessor
function = should_be_zero0_fcn
[../]
[./f1]
type = FunctionValuePostprocessor
function = should_be_zero1_fcn
[../]
[./f2]
type = FunctionValuePostprocessor
function = should_be_zero2_fcn
[../]
[./f3]
type = FunctionValuePostprocessor
function = should_be_zero3_fcn
[../]
[]
[Functions]
[./should_be_zero0_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f0'
[../]
[./should_be_zero1_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f1'
[../]
[./should_be_zero2_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f2'
[../]
[./should_be_zero3_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f3'
[../]
[]
[UserObjects]
[./mc_coh]
type = SolidMechanicsHardeningConstant
value = 4E7
[../]
[./mc_phi]
type = SolidMechanicsHardeningConstant
value = 35
convert_to_radians = true
[../]
[./mc_psi]
type = SolidMechanicsHardeningConstant
value = 10
convert_to_radians = true
[../]
[./mc]
type = SolidMechanicsPlasticMohrCoulomb
cohesion = mc_coh
friction_angle = mc_phi
dilation_angle = mc_psi
mc_tip_smoother = 4E6
yield_function_tolerance = 1.0E-1
internal_constraint_tolerance = 1.0E-7
[../]
[./ts]
type = SolidMechanicsHardeningConstant
value = 1E6
[../]
[./tensile]
type = SolidMechanicsPlasticTensile
tensile_strength = ts
tensile_tip_smoother = 1E5
yield_function_tolerance = 1.0E-1
internal_constraint_tolerance = 1.0E-7
[../]
[./coh]
type = SolidMechanicsHardeningConstant
value = 1E6
[../]
[./tanphi]
type = SolidMechanicsHardeningConstant
value = 0.46630766
[../]
[./tanpsi]
type = SolidMechanicsHardeningConstant
value = 0.46630766
[../]
[./wps]
type = SolidMechanicsPlasticWeakPlaneShear
cohesion = coh
tan_friction_angle = tanphi
tan_dilation_angle = tanpsi
smoother = 1E5
yield_function_tolerance = 1.0E-1
internal_constraint_tolerance = 1.0E-7
[../]
[./str]
type = SolidMechanicsHardeningConstant
value = 0.01E6
[../]
[./wpt]
type = SolidMechanicsPlasticWeakPlaneTensile
tensile_strength = str
yield_function_tolerance = 1.0E-1
internal_constraint_tolerance = 1.0E-7
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
fill_method = symmetric_isotropic
C_ijkl = '1E9 1.3E9'
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./multi]
type = ComputeMultiPlasticityStress
block = 0
ep_plastic_tolerance = 1E-7
plastic_models = 'mc tensile wps wpt'
deactivation_scheme = 'optimized_to_safe_to_dumb'
max_NR_iterations = 20
min_stepsize = 1E-4
max_stepsize_for_dumb = 1E-3
debug_fspb = crash
debug_jac_at_stress = '10 0 0 0 10 0 0 0 10'
debug_jac_at_pm = '1 1 1 1'
debug_jac_at_intnl = '1 1 1 1'
debug_stress_change = 1E1
debug_pm_change = '1E-6 1E-6 1E-6 1E-6'
debug_intnl_change = '1E-6 1E-6 1E-6 1E-6'
[../]
[]
[Executioner]
end_time = 1
dt = 1
type = Transient
[]
[Outputs]
file_base = rock1
exodus = false
[./csv]
type = CSV
[../]
[]
(modules/porous_flow/examples/groundwater/ex01.i)
# Groundwater extraction example.
# System consists of two confined aquifers separated by an aquitard
# There is a hydraulic gradient in the upper aquifer
# A well extracts water from the lower aquifer, and the impact on the upper aquifer is observed
# In the center of the model, the roof of the upper aquifer sits 70m below the local water table
[Mesh]
[basic_mesh]
type = GeneratedMeshGenerator
dim = 3
xmin = -50
xmax = 50
nx = 20
ymin = -25
ymax = 25
ny = 10
zmin = -100
zmax = -70
nz = 3
[]
[lower_aquifer]
type = SubdomainBoundingBoxGenerator
input = basic_mesh
block_id = 1
block_name = lower_aquifer
bottom_left = '-1000 -500 -100'
top_right = '1000 500 -90'
[]
[aquitard]
type = SubdomainBoundingBoxGenerator
input = lower_aquifer
block_id = 2
block_name = aquitard
bottom_left = '-1000 -500 -90'
top_right = '1000 500 -80'
[]
[upper_aquifer]
type = SubdomainBoundingBoxGenerator
input = aquitard
block_id = 3
block_name = upper_aquifer
bottom_left = '-1000 -500 -80'
top_right = '1000 500 -70'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = insitu_pp
[]
[]
[BCs]
[pp]
type = FunctionDirichletBC
variable = pp
function = insitu_pp
boundary = 'left right top bottom front back'
[]
[]
[Functions]
[upper_aquifer_head]
type = ParsedFunction
expression = '10 + x / 200'
[]
[lower_aquifer_head]
type = ParsedFunction
expression = '20'
[]
[insitu_head]
type = ParsedFunction
symbol_values = 'lower_aquifer_head upper_aquifer_head'
symbol_names = 'low up'
expression = 'if(z <= -90, low, if(z >= -80, up, (up * (z + 90) - low * (z + 80)) / (10.0)))'
[]
[insitu_pp]
type = ParsedFunction
symbol_values = 'insitu_head'
symbol_names = 'h'
expression = '(h - z) * 1E4'
[]
[l_rate]
type = ParsedFunction
symbol_values = 'm3_produced dt'
symbol_names = 'm3_produced dt'
expression = '1000 * m3_produced / dt'
[]
[]
[AuxVariables]
[insitu_head]
[]
[head_change]
[]
[]
[AuxKernels]
[insitu_head]
type = FunctionAux
variable = insitu_head
function = insitu_head
[]
[head_change]
type = ParsedAux
coupled_variables = 'pp insitu_head'
use_xyzt = true
expression = 'pp / 1E4 + z - insitu_head'
variable = head_change
[]
[]
[Postprocessors]
[m3_produced]
type = PorousFlowPlotQuantity
uo = volume_extracted
outputs = 'none'
[]
[dt]
type = TimestepSize
outputs = 'none'
[]
[l_per_s]
type = FunctionValuePostprocessor
function = l_rate
[]
[]
[VectorPostprocessors]
[drawdown]
type = LineValueSampler
variable = head_change
start_point = '-50 0 -75'
end_point = '50 0 -75'
num_points = 101
sort_by = x
[]
[]
[PorousFlowBasicTHM]
fp = simple_fluid
gravity = '0 0 -10'
porepressure = pp
multiply_by_density = false
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
# the following mean that density = 1000 * exp(P / 1E15) ~ 1000
thermal_expansion = 0
bulk_modulus = 1E15
[]
[]
[Materials]
[porosity_aquifers]
type = PorousFlowPorosityConst
porosity = 0.05
block = 'upper_aquifer lower_aquifer'
[]
[porosity_aquitard]
type = PorousFlowPorosityConst
porosity = 0.2
block = aquitard
[]
[biot_mod]
type = PorousFlowConstantBiotModulus
fluid_bulk_modulus = 2E9
biot_coefficient = 1.0
[]
[permeability_aquifers]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
block = 'upper_aquifer lower_aquifer'
[]
[permeability_aquitard]
type = PorousFlowPermeabilityConst
permeability = '1E-16 0 0 0 1E-16 0 0 0 1E-17'
block = aquitard
[]
[]
[DiracKernels]
[sink]
type = PorousFlowPolyLineSink
SumQuantityUO = volume_extracted
point_file = ex01.bh_lower
line_length = 10
variable = pp
# following produces a flux of 0 m^3(water)/m(borehole length)/s if porepressure = 0, and a flux of 1 m^3/m/s if porepressure = 1E9
p_or_t_vals = '0 1E9'
fluxes = '0 1'
[]
[]
[UserObjects]
[volume_extracted]
type = PorousFlowSumQuantity
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
[TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 1.1E5
[]
end_time = 3.456E5 # 4 days
nl_abs_tol = 1E-13
[]
[Outputs]
[csv]
type = CSV
file_base = ex01_lower_extraction
execute_on = final
[]
[]
(python/chigger/tests/input/mug_blocks.i)
[Mesh]
type = FileMesh
file = mug.e
[]
[MeshModifiers]
[./subdomains]
type = SubdomainBoundingBox
top_right = '3 3 3'
bottom_left = '0 -3 -2.1'
block_id = '76'
[../]
[]
[Variables]
[./convected]
order = FIRST
family = LAGRANGE
[../]
[./diffused]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./aux_elem]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff_convected]
type = Diffusion
variable = convected
[../]
[./conv]
# Couple a variable into the convection kernel using local_name = simulationg_name syntax
type = Convection
variable = convected
velocity = '1 1 1'
[../]
[./diff_diffused]
type = Diffusion
variable = diffused
[../]
[./diff_t]
type = TimeDerivative
variable = diffused
[../]
[./conv_t]
type = TimeDerivative
variable = convected
block = '76'
[../]
[]
[BCs]
[./bottom_convected]
type = DirichletBC
variable = convected
boundary = bottom
value = 1
[../]
[./top_convected]
type = DirichletBC
variable = convected
boundary = top
value = 0
[../]
[./bottom_diffused]
type = DirichletBC
variable = diffused
boundary = bottom
value = 2
[../]
[./top_diffused]
type = DirichletBC
variable = diffused
boundary = top
value = 0
[../]
[]
[Postprocessors]
[./func_pp]
type = FunctionValuePostprocessor
function = 2*t
[../]
[]
[Executioner]
# Preconditioned JFNK (default)
type = Transient
num_steps = 20
solve_type = PJFNK
dt = 0.1
[]
[Outputs]
exodus = true
[]
[ICs]
[./aux_ic]
variable = aux_elem
max = 10
seed = 2
type = RandomIC
[../]
[]
(modules/porous_flow/test/tests/dirackernels/bh03.i)
# fully-saturated
# injection
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 1
xmax = 3
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = 0
[]
[]
[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
[]
[borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
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.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[DiracKernels]
[bh]
type = PorousFlowPeacemanBorehole
variable = pp
SumQuantityUO = borehole_total_outflow_mass
point_file = bh03.bh
function_of = pressure
fluid_phase = 0
bottom_p_or_t = 'insitu_pp'
unit_weight = '0 0 0'
use_mobility = true
character = -1
[]
[]
[Postprocessors]
[bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[]
[fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[]
[fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[]
[zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
indirect_dependencies = 'fluid_mass1 fluid_mass0 bh_report'
[]
[p0]
type = PointValue
variable = pp
point = '2 0 0'
execute_on = timestep_end
[]
[]
[Functions]
[mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[]
[insitu_pp]
type = ParsedFunction
expression = '0.5e7*x' #bh is located at x=2
[]
[]
[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 = 0.5
dt = 1E-2
solve_type = NEWTON
[]
[Outputs]
file_base = bh03
exodus = false
csv = true
execute_on = timestep_end
[]
(modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined_basicthm.i)
# Identical to pp_generation_unconfined_fullysat_volume.i but using an Action
#
# A sample is constrained on all sides, except its top
# and its boundaries are
# also impermeable. Fluid is pumped into the sample via a
# volumetric source (ie m^3/second per cubic meter), and the
# rise in the top surface, porepressure, and stress are observed.
#
# In the standard poromechanics scenario, the Biot Modulus is held
# fixed and the source has units 1/s. Then the expected result
# is
# strain_zz = disp_z = BiotCoefficient*BiotModulus*s*t/((bulk + 4*shear/3) + BiotCoefficient^2*BiotModulus)
# porepressure = BiotModulus*(s*t - BiotCoefficient*strain_zz)
# stress_xx = (bulk - 2*shear/3)*strain_zz (remember this is effective stress)
# stress_zz = (bulk + 4*shear/3)*strain_zz (remember this is effective stress)
#
# In standard porous_flow, everything is based on mass, eg the source has
# units kg/s/m^3. This is discussed in the other pp_generation_unconfined
# models. In this test, we use the FullySaturated Kernel and set
# multiply_by_density = false
# meaning the fluid Kernel has units of volume, and the source, s, has units 1/time
#
# The ratios are:
# stress_xx/strain_zz = (bulk - 2*shear/3) = 1 (for the parameters used here)
# stress_zz/strain_zz = (bulk + 4*shear/3) = 4 (for the parameters used here)
# porepressure/strain_zz = 13.3333333 (for the parameters used here)
#
# Expect
# disp_z = 0.3*10*s*t/((2 + 4*1.5/3) + 0.3^2*10) = 0.612245*s*t
# porepressure = 10*(s*t - 0.3*0.612245*s*t) = 8.163265*s*t
# stress_xx = (2 - 2*1.5/3)*0.612245*s*t = 0.612245*s*t
# stress_zz = (2 + 4*shear/3)*0.612245*s*t = 2.44898*s*t
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back'
[]
[]
[Kernels]
[source]
type = BodyForce
function = 0.1
variable = porepressure
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.0
bulk_modulus = 3.3333333333
viscosity = 1.0
density0 = 1.0
[]
[]
[PorousFlowBasicTHM]
coupling_type = HydroMechanical
displacements = 'disp_x disp_y disp_z'
multiply_by_density = false
porepressure = porepressure
biot_coefficient = 0.3
gravity = '0 0 0'
fp = the_simple_fluid
save_component_rate_in = nodal_m3_per_s
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
[]
[stress]
type = ComputeLinearElasticStress
[]
[porosity]
type = PorousFlowPorosityConst # the "const" is irrelevant here: all that uses Porosity is the BiotModulus, which just uses the initial value of porosity
porosity = 0.1
PorousFlowDictator = dictator
[]
[biot_modulus]
type = PorousFlowConstantBiotModulus
PorousFlowDictator = dictator
biot_coefficient = 0.3
fluid_bulk_modulus = 3.3333333333
solid_bulk_compliance = 0.5
[]
[permeability_irrelevant]
type = PorousFlowPermeabilityConst
PorousFlowDictator = dictator
permeability = '1.5 0 0 0 1.5 0 0 0 1.5'
[]
[]
[AuxVariables]
[nodal_m3_per_s]
[]
[]
[Postprocessors]
[nodal_m3_per_s]
type = PointValue
outputs = csv
point = '0 0 0'
variable = nodal_m3_per_s
[]
[p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
[]
[zdisp]
type = PointValue
outputs = csv
point = '0 0 0.5'
variable = disp_z
[]
[stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[]
[stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[]
[stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[]
[stress_xx_over_strain]
type = FunctionValuePostprocessor
function = stress_xx_over_strain_fcn
outputs = csv
[]
[stress_zz_over_strain]
type = FunctionValuePostprocessor
function = stress_zz_over_strain_fcn
outputs = csv
[]
[p_over_strain]
type = FunctionValuePostprocessor
function = p_over_strain_fcn
outputs = csv
[]
[]
[Functions]
[stress_xx_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'stress_xx zdisp'
[]
[stress_zz_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'stress_zz zdisp'
[]
[p_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'p0 zdisp'
[]
[]
[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-14 1E-10 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = pp_generation_unconfined_basicthm
[csv]
type = CSV
[]
[]
(modules/richards/test/tests/dirac/bh05.i)
# unsaturated
# injection
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '500 500 1E1'
x = '4000 5000 6500'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./Seff1VG]
type = RichardsSeff1VG
m = 0.8
al = 1E-5
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0
sum_s_res = 0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E8
[../]
[./borehole_total_outflow_mass]
type = RichardsSumQuantity
[../]
[]
[Variables]
active = 'pressure'
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./p_ic]
type = FunctionIC
variable = pressure
function = initial_pressure
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
variable = pressure
[../]
[]
[DiracKernels]
[./bh]
type = RichardsBorehole
bottom_pressure = 0
point_file = bh03.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pressure
unit_weight = '0 0 0'
character = -1
[../]
[]
[Postprocessors]
[./bh_report]
type = RichardsPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = RichardsMass
variable = pressure
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = RichardsMass
variable = pressure
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
indirect_dependencies = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[./p0]
type = PointValue
variable = pressure
point = '1 1 1'
execute_on = timestep_end
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = -2E5
[../]
[./mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = 0
viscosity = 1E-3
mat_porosity = 0.1
mat_permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
density_UO = DensityConstBulk
relperm_UO = RelPermPower
sat_UO = Saturation
seff_UO = Seff1VG
SUPG_UO = SUPGstandard
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = Seff1VG
pressure_vars = pressure
[../]
[]
[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 = 6500
solve_type = NEWTON
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = bh05
exodus = false
csv = true
execute_on = timestep_end
[]
(modules/porous_flow/test/tests/dirackernels/bh_except01.i)
# PorousFlowPeacemanBorehole exception test
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = 1E7
[]
[]
[Kernels]
[mass0]
type = TimeDerivative
variable = pp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
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.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[DiracKernels]
[bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 1
point_file = bh02.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[]
[]
[Postprocessors]
[bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[]
[fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[]
[fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[]
[zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[]
[p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[]
[]
[Functions]
[mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[]
[]
[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 = 0.5
dt = 1E-2
solve_type = NEWTON
[]
(test/tests/postprocessors/function_value_pps/pps_args_function_value_pps.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Problem]
solve = false
[]
[Functions]
[fn]
type = ParsedFunction
expression = 't + 0.12 * x + 0.3 * y + 12 * z'
[]
[]
[Postprocessors]
[time_pp]
type = Receiver
default = 12
[]
[z_pp]
type = FunctionValuePostprocessor
function = 't'
[]
[val]
type = FunctionValuePostprocessor
time = 'time_pp'
point = '-1 0 z_pp'
function = fn
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
num_steps = 5
[]
[Outputs]
csv = true
[]
(modules/stochastic_tools/test/tests/multiapps/user_cli_args/sub_steady.i)
[StochasticTools]
[]
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Postprocessors]
[size]
type = AverageElementSize
execute_on = 'initial'
[]
[function_val]
type = FunctionValuePostprocessor
function = fun
scale_factor = 1.0
[]
[]
[Functions/fun]
type = ConstantFunction
value = 1.0
[]
[Controls/receiver]
type = SamplerReceiver
[]
(modules/richards/test/tests/gravity_head_2/gh02.i)
# unsaturated = true
# gravity = true
# supg = false
# transient = false
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmin = 0
xmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[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]
# get nonconvergence if initial condition is too crazy
[./water_ic]
type = FunctionIC
function = pwater_initial
variable = pwater
[../]
[./gas_ic]
type = FunctionIC
function = pgas_initial
variable = pgas
[../]
[]
[Kernels]
active = 'richardsfwater richardsfgas'
[./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
outputs = none # no reason why mass should be conserved
[../]
[./mass_error_gas]
type = FunctionValuePostprocessor
function = fcn_mass_error_g
outputs = none # no reason why mass should be conserved
[../]
[./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]
[./pwater_initial]
type = ParsedFunction
expression = 1-x/2
[../]
[./pgas_initial]
type = ParsedFunction
expression = 2-x/5
[../]
[./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 -sub_pc_type -sub_pc_factor_shift_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'gmres asm lu NONZERO 1E-10 1E-10 10000'
[../]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Outputs]
execute_on = 'timestep_end'
file_base = gh02
csv = true
[]
(modules/porous_flow/test/tests/hysteresis/hys_order_03.i)
# Test that PorousFlowHysteresisOrder correctly calculates hysteresis order
# Water is removed from the system (so order = 0) until saturation = 0.49
# Then, water is added to the system (so order = 1) until saturation = 0.94
# Then, water is removed from the system (so order = 2) until saturation = 0.62
# Then, water is added to the system (so order = 3) until saturation = 0.87
# Then, water is removed from the system (so order = 3, because max_order = 3) until saturation = 0.68
# Then, water is added to the system (so order = 3, because max_order = 3) until saturation = 0.87
# Then, water is removed from the system (so order = 3, because max_order = 3) until saturation = 0.62
# Then, water is removed from the system (so order = 2) until saturation = 0.49
# Then, water is removed from the system (so order = 0)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = 0.0
[]
[]
[PorousFlowUnsaturated]
porepressure = pp
fp = simple_fluid
[]
[DiracKernels]
[source_sink_0]
type = PorousFlowPointSourceFromPostprocessor
point = '0 0 0'
mass_flux = sink_strength
variable = pp
[]
[source_sink_1]
type = PorousFlowPointSourceFromPostprocessor
point = '1 0 0'
mass_flux = sink_strength
variable = pp
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 1.0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0 0 0 0 0 0 0 0 0'
[]
[hys_order]
type = PorousFlowHysteresisOrder
[]
[]
[AuxVariables]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[tp0]
family = MONOMIAL
order = CONSTANT
[]
[tp1]
family = MONOMIAL
order = CONSTANT
[]
[tp2]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[tp0]
type = PorousFlowPropertyAux
variable = tp0
property = hysteresis_saturation_turning_point
hysteresis_turning_point = 0
[]
[tp1]
type = PorousFlowPropertyAux
variable = tp1
property = hysteresis_saturation_turning_point
hysteresis_turning_point = 1
[]
[tp2]
type = PorousFlowPropertyAux
variable = tp2
property = hysteresis_saturation_turning_point
hysteresis_turning_point = 2
[]
[]
[Functions]
[sink_strength_fcn]
type = ParsedFunction
expression = '30 * if(t <= 8, -1, if(t <= 15, 1, if(t <= 20, -1, if(t <= 24, 1, if(t <= 27, -1, if(t <= 30, 1, -1))))))'
[]
[]
[Postprocessors]
[sink_strength]
type = FunctionValuePostprocessor
function = sink_strength_fcn
outputs = 'none'
[]
[saturation]
type = PointValue
point = '0 0 0'
variable = saturation0
[]
[hys_order]
type = PointValue
point = '0 0 0'
variable = hys_order
[]
[tp0]
type = PointValue
point = '0 0 0'
variable = tp0
[]
[tp1]
type = PointValue
point = '0 0 0'
variable = tp1
[]
[tp2]
type = PointValue
point = '0 0 0'
variable = tp2
[]
[]
[Preconditioning]
[basic]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 40
nl_abs_tol = 1E-7
[]
[Outputs]
[csv]
type = CSV
sync_times = '0 1 2 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 37 40' # cut out the times around which order reductions occur becuase numerical roundoff might mean order is not reduced exactly at these times
sync_only = true
[]
[]
(test/tests/kernels/ode/parsedode_sys_impl_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[]
[Functions]
[./f_fn]
type = ParsedFunction
expression = -4
[../]
[./bc_all_fn]
type = ParsedFunction
expression = x*x+y*y
[../]
# ODEs
[./exact_x_fn]
type = ParsedFunction
expression = (-1/3)*exp(-t)+(4/3)*exp(5*t)
[../]
[]
# NL
[Variables]
[./u]
family = LAGRANGE
order = FIRST
[../]
# ODE variables
[./x]
family = SCALAR
order = FIRST
initial_condition = 1
[../]
[./y]
family = SCALAR
order = FIRST
initial_condition = 2
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./uff]
type = BodyForce
variable = u
function = f_fn
[../]
[]
[ScalarKernels]
[./td1]
type = ODETimeDerivative
variable = x
[../]
[./ode1]
type = ParsedODEKernel
expression = '-3*x - 2*y'
variable = x
coupled_variables = y
[../]
[./td2]
type = ODETimeDerivative
variable = y
[../]
[./ode2]
type = ParsedODEKernel
expression = '-4*x - y'
variable = y
coupled_variables = x
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = bc_all_fn
[../]
[]
[Postprocessors]
active = 'exact_x l2err_x'
[./exact_x]
type = FunctionValuePostprocessor
function = exact_x_fn
execute_on = 'initial timestep_end'
point = '0 0 0'
[../]
[./l2err_x]
type = ScalarL2Error
variable = x
function = exact_x_fn
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
start_time = 0
dt = 0.01
num_steps = 100
solve_type = 'PJFNK'
[]
[Outputs]
file_base = ode_sys_impl_test_out
exodus = true
[]
(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/time_steppers/iteration_adaptive/adapt_tstep_reject_large_dt.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 50
ny = 2
xmax = 5
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./timestep_fn]
type = PiecewiseConstant
x = '0. 10.0'
y = '10.0 1.0'
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./dt]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 10
[../]
[./right]
type = NeumannBC
variable = u
boundary = right
value = -1
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
start_time = 0.0
end_time = 12.0
dtmax = 10.0
dtmin = 0.1
[./TimeStepper]
type = IterationAdaptiveDT
timestep_limiting_postprocessor = timestep_pp
reject_large_step = true
reject_large_step_threshold = 0.5
dt = 3.0
growth_factor = 1.0
[../]
[]
[Postprocessors]
[./_dt]
type = TimestepSize
[../]
# Just use a simple postprocessor to test capability to limit the time step length to the postprocessor value
[./timestep_pp]
type = FunctionValuePostprocessor
function = timestep_fn
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
checkpoint = true
[]
(modules/porous_flow/examples/groundwater/ex02_abstraction.i)
# Abstraction groundwater model. See groundwater_models.md for a detailed description
[Mesh]
[from_steady_state]
type = FileMeshGenerator
file = gold/ex02_steady_state_ex.e
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = steady_state_pp
[]
[]
[BCs]
[rainfall_recharge]
type = PorousFlowSink
boundary = zmax
variable = pp
flux_function = -1E-6 # recharge of 0.1mm/day = 1E-4m3/m2/day = 0.1kg/m2/day ~ 1E-6kg/m2/s
[]
[evapotranspiration]
type = PorousFlowHalfCubicSink
boundary = zmax
variable = pp
center = 0.0
cutoff = -5E4 # roots of depth 5m. 5m of water = 5E4 Pa
use_mobility = true
fluid_phase = 0
# Assume pan evaporation of 4mm/day = 4E-3m3/m2/day = 4kg/m2/day ~ 4E-5kg/m2/s
# Assume that if permeability was 1E-10m^2 and water table at topography then ET acts as pan strength
# Because use_mobility = true, then 4E-5 = maximum_flux = max * perm * density / visc = max * 1E-4, so max = 40
max = 40
[]
[]
[DiracKernels]
inactive = polyline_sink_borehole
[river]
type = PorousFlowPolyLineSink
SumQuantityUO = baseflow
point_file = ex02_river.bh
# Assume a perennial river.
# Assume the river has an incision depth of 1m and a stage height of 1.5m, and these are constant in time and uniform over the whole model. Hence, if groundwater head is 0.5m (5000Pa) there will be no baseflow and leakage.
p_or_t_vals = '-999995000 5000 1000005000'
# Assume the riverbed conductance, k_zz*density*river_segment_length*river_width/riverbed_thickness/viscosity = 1E-6*river_segment_length kg/Pa/s
fluxes = '-1E3 0 1E3'
variable = pp
[]
[horizontal_borehole]
type = PorousFlowPeacemanBorehole
SumQuantityUO = abstraction
bottom_p_or_t = -1E5
unit_weight = '0 0 -1E4'
character = 1.0
point_file = ex02.bh
variable = pp
[]
[polyline_sink_borehole]
type = PorousFlowPolyLineSink
SumQuantityUO = abstraction
fluxes = '-0.4 0 0.4'
p_or_t_vals = '-1E8 0 1E8'
point_file = ex02.bh
variable = pp
[]
[]
[Functions]
[steady_state_pp]
type = SolutionFunction
from_variable = pp
solution = steady_state_solution
[]
[baseflow_rate]
type = ParsedFunction
symbol_names = 'baseflow_kg dt'
symbol_values = 'baseflow_kg dt'
expression = 'baseflow_kg / dt * 24.0 * 3600.0 / 400.0'
[]
[abstraction_rate]
type = ParsedFunction
symbol_names = 'abstraction_kg dt'
symbol_values = 'abstraction_kg dt'
expression = 'abstraction_kg / dt * 24.0 * 3600.0'
[]
[]
[AuxVariables]
[ini_pp]
[]
[pp_change]
[]
[]
[AuxKernels]
[ini_pp]
type = FunctionAux
variable = ini_pp
function = steady_state_pp
execute_on = INITIAL
[]
[pp_change]
type = ParsedAux
variable = pp_change
coupled_variables = 'pp ini_pp'
expression = 'pp - ini_pp'
[]
[]
[PorousFlowUnsaturated]
fp = simple_fluid
porepressure = pp
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[porosity_everywhere]
type = PorousFlowPorosityConst
porosity = 0.05
[]
[permeability_aquifers]
type = PorousFlowPermeabilityConst
block = 'top_aquifer bot_aquifer'
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-13'
[]
[permeability_aquitard]
type = PorousFlowPermeabilityConst
block = aquitard
permeability = '1E-16 0 0 0 1E-16 0 0 0 1E-17'
[]
[]
[UserObjects]
[steady_state_solution]
type = SolutionUserObject
execute_on = INITIAL
mesh = gold/ex02_steady_state_ex.e
timestep = LATEST
system_variables = pp
[]
[baseflow]
type = PorousFlowSumQuantity
[]
[abstraction]
type = PorousFlowSumQuantity
[]
[]
[Postprocessors]
[baseflow_kg]
type = PorousFlowPlotQuantity
uo = baseflow
outputs = 'none'
[]
[dt]
type = TimestepSize
outputs = 'none'
[]
[baseflow_l_per_m_per_day]
type = FunctionValuePostprocessor
function = baseflow_rate
indirect_dependencies = 'baseflow_kg dt'
[]
[abstraction_kg]
type = PorousFlowPlotQuantity
uo = abstraction
outputs = 'none'
[]
[abstraction_kg_per_day]
type = FunctionValuePostprocessor
function = abstraction_rate
indirect_dependencies = 'abstraction_kg dt'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
# following 2 lines are not mandatory, but illustrate a popular preconditioner choice in groundwater models
petsc_options_iname = '-pc_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = ' asm ilu 2 '
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 100
[TimeStepper]
type = FunctionDT
function = 'max(100, t)'
[]
end_time = 8.64E5 # 10 days
nl_abs_tol = 1E-11
[]
[Outputs]
print_linear_residuals = false
[ex]
type = Exodus
execute_on = final
[]
[csv]
type = CSV
[]
[]
(modules/richards/test/tests/dirac/bh08.i)
# fully-saturated
# production
# with anisotropic, but diagonal, permeability
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./Seff1VG]
type = RichardsSeff1VG
m = 0.8
al = 1E-5
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0
sum_s_res = 0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E8
[../]
[./borehole_total_outflow_mass]
type = RichardsSumQuantity
[../]
[]
[Variables]
active = 'pressure'
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./p_ic]
type = FunctionIC
variable = pressure
function = initial_pressure
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
variable = pressure
[../]
[]
[DiracKernels]
[./bh]
type = RichardsBorehole
bottom_pressure = 0
point_file = bh02.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pressure
unit_weight = '0 0 0'
character = 1
[../]
[]
[Postprocessors]
[./bh_report]
type = RichardsPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = RichardsMass
variable = pressure
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = RichardsMass
variable = pressure
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
indirect_dependencies = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[./p0]
type = PointValue
variable = pressure
point = '1 1 1'
execute_on = timestep_end
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 1E7
[../]
[./mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = 0
viscosity = 1E-3
mat_porosity = 0.1
mat_permeability = '1E-12 0 0 0 2E-12 0 0 0 1E-12'
density_UO = DensityConstBulk
relperm_UO = RelPermPower
sat_UO = Saturation
seff_UO = Seff1VG
SUPG_UO = SUPGstandard
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = Seff1VG
pressure_vars = pressure
[../]
[]
[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 = 0.5
dt = 1E-2
solve_type = NEWTON
[]
[Outputs]
file_base = bh08
exodus = false
csv = true
execute_on = timestep_end
[]
(test/tests/postprocessors/geometry/3d_geometry.i)
radius = 0.5
inner_box_length = 2.2
outer_box_length = 3
depth = 0.4
sides = 28
alpha = ${fparse 2 * pi / ${sides}}
perimeter_correction = ${fparse ${alpha} / 2 / sin(alpha / 2)}
area_correction = ${fparse alpha / sin(alpha)}
[Mesh]
file = 3d.e
construct_side_list_from_node_list = true
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./circle_side_area]
type = AreaPostprocessor
boundary = circle_side
[../]
[./inside_side_area]
type = AreaPostprocessor
boundary = inside_side
[../]
[./outside_side_area]
type = AreaPostprocessor
boundary = outside_side
[../]
[./circle_volume]
type = VolumePostprocessor
block = circle
[../]
[./inside_volume]
type = VolumePostprocessor
block = inside
[../]
[./outside_volume]
type = VolumePostprocessor
block = outside
[../]
[./total_volume]
type = VolumePostprocessor
block = 'circle inside outside'
[../]
[./circle_side_area_exact]
type = FunctionValuePostprocessor
function = 'circle_side_area_exact'
[../]
[./inside_side_area_exact]
type = FunctionValuePostprocessor
function = 'inside_side_area_exact'
[../]
[./outside_side_area_exact]
type = FunctionValuePostprocessor
function = 'outside_side_area_exact'
[../]
[./circle_volume_exact]
type = FunctionValuePostprocessor
function = 'circle_volume_exact'
[../]
[./inside_volume_exact]
type = FunctionValuePostprocessor
function = 'inside_volume_exact'
[../]
[./outside_volume_exact]
type = FunctionValuePostprocessor
function = 'outside_volume_exact'
[../]
[./total_volume_exact]
type = FunctionValuePostprocessor
function = 'total_volume_exact'
[../]
[]
[Functions]
[./circle_side_area_exact]
type = ParsedFunction
expression = '2 * pi * ${radius} / ${perimeter_correction} * ${depth}'
[../]
[./inside_side_area_exact]
type = ParsedFunction
expression = '${inner_box_length} * ${depth} * 4'
[../]
[./outside_side_area_exact]
type = ParsedFunction
expression = '${outer_box_length} * ${depth} * 4'
[../]
[./circle_volume_exact]
type = ParsedFunction
expression = 'pi * ${radius}^2 * ${depth} / ${area_correction}'
[../]
[./inside_volume_exact]
type = ParsedFunction
expression = '${inner_box_length}^2 * ${depth} - pi * ${radius}^2 * ${depth} / ${area_correction}'
[../]
[./outside_volume_exact]
type = ParsedFunction
expression = '${outer_box_length}^2 * ${depth} - ${inner_box_length}^2 * ${depth}'
[../]
[./total_volume_exact]
type = ParsedFunction
expression = '${outer_box_length}^2 * ${depth}'
[../]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/mean_cap/random.i)
# apply many random large deformations, checking that the algorithm returns correctly to
# the yield surface each time. Two yield surfaces are used: one for compression and one for tension.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1000
ny = 125
nz = 1
xmin = 0
xmax = 1000
ymin = 0
ymax = 125
zmin = 0
zmax = 1
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[]
[ICs]
[./x]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_x
[../]
[./y]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_y
[../]
[./z]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_z
[../]
[]
[BCs]
[./x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'front back'
function = '0'
[../]
[./y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'front back'
function = '0'
[../]
[./z]
type = FunctionDirichletBC
variable = disp_z
boundary = 'front back'
function = '0'
[../]
[]
[AuxVariables]
[./yield_fcn]
order = CONSTANT
family = MONOMIAL
[../]
[./iter]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./yield_fcn_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_yield_function
variable = yield_fcn
[../]
[./iter]
type = MaterialRealAux
property = plastic_NR_iterations
variable = iter
[../]
[]
[Postprocessors]
[./max_yield_fcn]
type = ElementExtremeValue
variable = yield_fcn
outputs = 'console'
[../]
[./should_be_zero]
type = FunctionValuePostprocessor
function = should_be_zero_fcn
[../]
[./av_iter]
type = ElementAverageValue
variable = iter
outputs = 'console'
[../]
[]
[Functions]
[./should_be_zero_fcn]
type = ParsedFunction
expression = 'if(a<1E-3,0,a)'
symbol_names = 'a'
symbol_values = 'max_yield_fcn'
[../]
[]
[UserObjects]
[./strength]
type = SolidMechanicsHardeningConstant
value = 1
[../]
[./cap1]
type = SolidMechanicsPlasticMeanCap
a = -1
strength = strength
yield_function_tolerance = 1E-3
internal_constraint_tolerance = 1E-9
[../]
[./cap2]
type = SolidMechanicsPlasticMeanCap
a = 1
strength = strength
yield_function_tolerance = 1E-3
internal_constraint_tolerance = 1E-9
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
fill_method = symmetric_isotropic
C_ijkl = '0.7E7 1E7'
[../]
[./strain]
type = ComputeIncrementalSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./mc]
type = ComputeMultiPlasticityStress
block = 0
max_NR_iterations = 2
ep_plastic_tolerance = 1E-6
plastic_models = 'cap1 cap2'
debug_fspb = crash
deactivation_scheme = optimized
min_stepsize = 1
max_stepsize_for_dumb = 1
[../]
[]
[Executioner]
end_time = 1
dt = 1
type = Transient
[]
[Outputs]
file_base = random
exodus = false
[./csv]
type = CSV
[../]
[]
(modules/thermal_hydraulics/test/tests/misc/coupling_mD_flow/parent_non_overlapping.i)
# inlet temperature
T_in = 523.0
mdot = 10
pout = 7e6
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -1.5
xmax = 1.5
ymin = -1.5
ymax = 1.5
zmin = 0
zmax = 10
nx = 3
ny = 3
nz = 10
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[u]
[]
[]
[Postprocessors]
[core_outlet_pressure]
type = Receiver
default = ${pout}
[]
[core_inlet_mdot]
type = Receiver
default = ${mdot}
[]
[core_inlet_temperature]
type = Receiver
default = ${T_in}
[]
[core_inlet_pressure]
type = FunctionValuePostprocessor
function = compute_inlet_pressure_fn
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[]
[core_outlet_mdot]
type = ScalePostprocessor
value = core_inlet_mdot
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[]
[bypass_mdot]
type = Receiver
[]
[inlet_mdot]
type = Receiver
[]
[outlet_mdot]
type = Receiver
[]
[core_outlet_temperature]
type = FunctionValuePostprocessor
function = compute_outlet_temperature_fn
execute_on = 'INITIAL LINEAR TIMESTEP_END'
[]
[core_pressure_drop]
type = DifferencePostprocessor
value1 = core_inlet_pressure
value2 = core_outlet_pressure
[]
[]
[Functions]
[compute_outlet_temperature_fn]
type = ParsedFunction
symbol_values = 'core_inlet_mdot core_inlet_temperature 1000'
symbol_names = 'mdot Tin Q'
expression = 'Tin + Q / mdot'
[]
[compute_inlet_pressure_fn]
type = ParsedFunction
symbol_values = 'core_inlet_mdot core_outlet_pressure 5000'
symbol_names = 'mdot pout C'
expression = 'pout + C * mdot'
[]
[]
[MultiApps]
[thm]
type = TransientMultiApp
input_files = thm_non_overlapping.i
sub_cycling = true
max_procs_per_app = 1
print_sub_cycles = false
[]
[]
[Transfers]
#### thm Transfers ####
## transfers from thm
[core_inlet_mdot]
type = MultiAppPostprocessorTransfer
from_postprocessor = core_inlet_mdot
to_postprocessor = core_inlet_mdot
reduction_type = maximum
from_multi_app = thm
[]
[core_inlet_temperature]
type = MultiAppPostprocessorTransfer
to_postprocessor = core_inlet_temperature
from_postprocessor = core_inlet_temperature
reduction_type = maximum
from_multi_app = thm
[]
[core_outlet_pressure]
type = MultiAppPostprocessorTransfer
to_postprocessor = core_outlet_pressure
from_postprocessor = core_outlet_pressure
reduction_type = maximum
from_multi_app = thm
[]
[bypass_mdot]
type = MultiAppPostprocessorTransfer
to_postprocessor = bypass_mdot
from_postprocessor = bypass_mdot
reduction_type = maximum
from_multi_app = thm
[]
[inlet_mdot]
type = MultiAppPostprocessorTransfer
to_postprocessor = inlet_mdot
from_postprocessor = inlet_mdot
reduction_type = maximum
from_multi_app = thm
[]
[outlet_mdot]
type = MultiAppPostprocessorTransfer
to_postprocessor = outlet_mdot
from_postprocessor = outlet_mdot
reduction_type = maximum
from_multi_app = thm
[]
## transfers to thm
[core_outlet_mdot]
type = MultiAppPostprocessorTransfer
from_postprocessor = core_outlet_mdot
to_postprocessor = core_outlet_mdot
to_multi_app = thm
[]
[core_outlet_temperature]
type = MultiAppPostprocessorTransfer
from_postprocessor = core_outlet_temperature
to_postprocessor = core_outlet_temperature
to_multi_app = thm
[]
[core_inlet_pressure]
type = MultiAppPostprocessorTransfer
from_postprocessor = core_inlet_pressure
to_postprocessor = core_inlet_pressure
to_multi_app = thm
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 1
abort_on_solve_fail = true
[]
[Outputs]
exodus = true
[]
(test/tests/functions/piecewise_constant/piecewise_constant_simple.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Problem]
solve = false
[]
[Functions]
[left]
type = PiecewiseConstant
xy_data = '-8 4
-7 3
-5.5 2
-2 1
2 1
5.5 2
7 3
8 4'
direction = left
scale_factor = 2
[]
[right]
type = PiecewiseConstant
x = '-8 -7 -5.5 -2 2 5.5 7 8'
y = ' 4 3 2 1 1 2 3 4'
direction = right
scale_factor = 2
[]
[left_inclusive]
type = PiecewiseConstant
x = '-8 -7 -5.5 -2 2 5.5 7 8'
y = ' 4 3 2 1 1 2 3 4'
direction = left_inclusive
scale_factor = 2
[]
[right_inclusive]
type = PiecewiseConstant
x = '-8 -7 -5.5 -2 2 5.5 7 8'
y = ' 4 3 2 1 1 2 3 4'
direction = right_inclusive
scale_factor = 2
[]
[]
[Postprocessors]
[left]
type = FunctionValuePostprocessor
function = left
execute_on = 'TIMESTEP_END INITIAL'
[]
[right]
type = FunctionValuePostprocessor
function = right
execute_on = 'TIMESTEP_END INITIAL'
[]
[left_inclusive]
type = FunctionValuePostprocessor
function = left_inclusive
execute_on = 'TIMESTEP_END INITIAL'
[]
[right_inclusive]
type = FunctionValuePostprocessor
function = right_inclusive
execute_on = 'TIMESTEP_END INITIAL'
[]
[]
[Executioner]
type = Transient
dt = 1
start_time = -10
end_time = 10
[]
[Outputs]
csv = true
[]
(modules/fluid_properties/test/tests/sodium/exact.i)
# Test implementation of sodium properties by comparison to analytical functions.
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Problem]
solve = false
[]
[AuxVariables]
[./temperature]
[../]
[]
[AuxKernels]
[./temperature_aux]
type = FunctionAux
variable = temperature
function = '400 + 200 * t'
[../]
[]
[Functions]
[./k]
type = ParsedFunction
symbol_names = 'T'
symbol_values = 'temperature'
expression = '124.67 - 0.11381 * T + 5.5226e-5 * T^2 - 1.1842e-8 * T^3'
[../]
[./h]
type = ParsedFunction
symbol_names = 'T'
symbol_values = 'temperature'
expression = '1.0e3 * (-365.77 + 1.6582 * T - 4.2395e-4 * T^2 + 1.4847e-7 * T^3 + 2992.6 / T)'
[../]
[./cp]
type = ParsedFunction
symbol_names = 'T'
symbol_values = 'temperature'
expression = '1.0e3 * (1.6582 - 8.4790e-4 * T + 4.4541e-7 * T^2 - 2992.6 / T^2)'
[../]
[./rho]
type = ParsedFunction
symbol_names = 'T'
symbol_values = 'temperature'
expression = '219.0 + 275.32 * (1.0 - T / 2503.7) + 511.58 * (1.0 - T / 2503.7)^(0.5)'
[../]
[./drho_dT]
type = ParsedFunction
symbol_names = 'T'
symbol_values = 'temperature'
expression = '-(2.0 * 275.32 + 511.58 / (1.0 - T / 2503.7)^(0.5)) / 2.0 / 2503.7'
[../]
[./drho_dh]
type = ParsedFunction
symbol_names = 'drho_dT_exact cp_exact'
symbol_values = 'drho_dT_exact cp_exact'
expression = 'drho_dT_exact/cp_exact'
[../]
[]
[FluidProperties/sodium]
type = SodiumProperties
[]
[Materials]
[./fp_mat]
type = SodiumPropertiesMaterial
temperature = temperature
outputs = all
[../]
[]
[Executioner]
type = Transient
num_steps = 10
[]
[Postprocessors]
[./temperature]
type = ElementAverageValue
variable = temperature
outputs = none
[../]
[./k_exact]
type = FunctionValuePostprocessor
function = k
outputs = none
[../]
[./h_exact]
type = FunctionValuePostprocessor
function = h
outputs = none
[../]
[./cp_exact]
type = FunctionValuePostprocessor
function = cp
outputs = none
[../]
[./rho_exact]
type = FunctionValuePostprocessor
function = rho
outputs = none
[../]
[./drho_dT_exact]
type = FunctionValuePostprocessor
function = drho_dT
outputs = none
[../]
[./drho_dh_exact]
type = FunctionValuePostprocessor
function = drho_dh
outputs = none
[../]
[./k_avg]
type = ElementAverageValue
variable = k
outputs = none
[../]
[./h_avg]
type = ElementAverageValue
variable = h
outputs = none
[../]
[./cp_avg]
type = ElementAverageValue
variable = cp
outputs = none
[../]
[./t_from_h_avg]
type = ElementAverageValue
variable = temperature
outputs = none
[../]
[./rho_avg]
type = ElementAverageValue
variable = rho
outputs = none
[../]
[./drho_dT_avg]
type = ElementAverageValue
variable = drho_dT
outputs = none
[../]
[./drho_dh_avg]
type = ElementAverageValue
variable = drho_dh
outputs = none
[../]
[./k_diff]
type = DifferencePostprocessor
value1 = k_exact
value2 = k_avg
[../]
[./h_diff]
type = DifferencePostprocessor
value1 = h_exact
value2 = h_avg
[../]
[./cp_diff]
type = DifferencePostprocessor
value1 = cp_exact
value2 = cp_avg
[../]
[./t_from_h_diff]
type = DifferencePostprocessor
value1 = temperature
value2 = t_from_h_avg
[../]
[./rho_avg_diff]
type = DifferencePostprocessor
value1 = rho_exact
value2 = rho_avg
[../]
[./drho_dT_avg_diff]
type = DifferencePostprocessor
value1 = drho_dT_exact
value2 = drho_dT_avg
[../]
[./drho_dh_avg_diff]
type = DifferencePostprocessor
value1 = drho_dh_exact
value2 = drho_dh_avg
[../]
[]
[Outputs]
csv = true
[]
(modules/richards/test/tests/gravity_head_2/gh_lumped_07.i)
# unsaturated = true
# gravity = false
# 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 = '0 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 = RandomIC
min = 0.2
max = 0.8
variable = pwater
[../]
[./gas_ic]
type = RandomIC
min = 1.2
max = 1.8
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((p0-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((p0-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-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_lumped_07
csv = true
[]
(modules/thermal_hydraulics/test/tests/components/pump_1phase/pump_mass_energy_conservation.i)
# This test tests that mass and energy are conserved.
dt = 1.e-2
head = 95.
volume = 1.
A = 1.
g = 9.81
[GlobalParams]
initial_T = 393.15
initial_vel = 0
f = 0
fp = fp
scaling_factor_1phase = '0.04 0.04 0.04e-5'
closures = simple_closures
A = ${A}
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[wall_in]
type = SolidWall1Phase
input = 'pipe1:in'
[]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
initial_p = 1.7E+07
n_elems = 10
gravity_vector = '0 0 0'
[]
[pump]
type = Pump1Phase
connections = 'pipe1:out pipe2:in'
position = '1.02 0 0'
initial_p = 1.3e+07
scaling_factor_rhoEV = 1e-5
head = ${head}
A_ref = ${A}
volume = ${volume}
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
[]
[pipe2]
type = FlowChannel1Phase
position = '1.04 0 0'
orientation = '1 0 0'
length = 1
initial_p = 1.3e+07
n_elems = 10
gravity_vector = '0 0 0'
[]
[wall_out]
type = SolidWall1Phase
input = 'pipe2:out'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
start_time = 0
dt = ${dt}
num_steps = 6
abort_on_solve_fail = true
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-4
l_max_its = 10
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Postprocessors]
# mass conservation
[mass_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoA
block = 'pipe1 pipe2'
execute_on = 'initial timestep_end'
[]
[mass_pump]
type = ScalarVariable
variable = pump:rhoV
execute_on = 'initial timestep_end'
[]
[mass_tot]
type = SumPostprocessor
values = 'mass_pipes mass_pump'
execute_on = 'initial timestep_end'
[]
[mass_tot_change]
type = ChangeOverTimePostprocessor
postprocessor = mass_tot
change_with_respect_to_initial = true
compute_relative_change = true
execute_on = 'initial timestep_end'
[]
# energy conservation
[E_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoEA
block = 'pipe1 pipe2'
execute_on = 'initial timestep_end'
[]
[E_pump]
type = ScalarVariable
variable = pump:rhoEV
execute_on = 'initial timestep_end'
[]
[E_tot]
type = LinearCombinationPostprocessor
pp_coefs = '1 1'
pp_names = 'E_pipes E_pump'
execute_on = 'initial timestep_end'
[]
[S_energy]
type = FunctionValuePostprocessor
function = S_energy_fcn
execute_on = 'initial timestep_end'
[]
[E_change]
type = ChangeOverTimePostprocessor
postprocessor = E_tot
execute_on = 'initial timestep_end'
[]
# this should also execute on initial, this value is
# lagged by one timestep as a workaround to moose issue #13262
[E_conservation]
type = FunctionValuePostprocessor
function = E_conservation_fcn
execute_on = 'timestep_end'
[]
[]
[Functions]
[S_energy_fcn]
type = ParsedFunction
expression = 'rhouV * g * head * A / volume'
symbol_names = 'rhouV g head A volume'
symbol_values = 'pump:rhouV ${g} ${head} ${A} ${volume}'
[]
[E_conservation_fcn]
type = ParsedFunction
expression = '(E_change - S_energy * dt) / E_tot'
symbol_names = 'E_change S_energy dt E_tot'
symbol_values = 'E_change S_energy ${dt} E_tot'
[]
[]
[Outputs]
[out]
type = CSV
execute_on = 'FINAL'
show = 'mass_tot_change E_conservation'
[]
[]
(modules/thermal_hydraulics/test/tests/components/shaft_connected_turbine_1phase/shaft_motor_turbine.i)
area = 0.2359
dt = 1.e-3
[GlobalParams]
initial_p = 2e5
initial_T = 600
initial_vel = 100
initial_vel_x = 100
initial_vel_y = 0
initial_vel_z = 0
A = ${area}
A_ref = ${area}
f = 100
scaling_factor_1phase = '0.04 0.04 0.04e-5'
closures = simple_closures
fp = fp
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[turbine]
type = ShaftConnectedTurbine1Phase
inlet = 'pipe:out'
outlet = 'pipe:in'
position = '0 0 0'
volume = 0.2
inertia_coeff = '1 1 1 1'
inertia_const = 1.61397
speed_cr_I = 1e12
speed_cr_fr = 0
tau_fr_coeff = '0 0 0 0'
tau_fr_const = 0
omega_rated = 100
D_wheel = 0.4
head_coefficient = head
power_coefficient = power
[]
[pipe]
type = FlowChannel1Phase
position = '0.1 0 0'
orientation = '1 0 0'
length = 10
n_elems = 20
initial_p = 2e6
[]
[dyno]
type = ShaftConnectedMotor
inertia = 1e2
torque = -1e3
[]
[shaft]
type = Shaft
connected_components = 'dyno turbine'
initial_speed = 300
[]
[]
[Functions]
[head]
type = PiecewiseLinear
x = '0 7e-3 1e-2'
y = '0 15 20'
[]
[power]
type = PiecewiseLinear
x = '0 6e-3 1e-2'
y = '0 0.05 0.18'
[]
[S_energy_fcn]
type = ParsedFunction
expression = '-(tau_driving+tau_fr)*omega'
symbol_names = 'tau_driving tau_fr omega'
symbol_values = 'turbine:driving_torque turbine:friction_torque shaft:omega'
[]
[energy_conservation_fcn]
type = ParsedFunction
expression = '(E_change - S_energy * dt) / E_tot'
symbol_names = 'E_change S_energy dt E_tot'
symbol_values = 'E_change S_energy ${dt} E_tot'
[]
[]
[Postprocessors]
# mass conservation
[mass_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoA
block = 'pipe'
execute_on = 'initial timestep_end'
[]
[mass_turbine]
type = ScalarVariable
variable = turbine:rhoV
execute_on = 'initial timestep_end'
[]
[mass_tot]
type = SumPostprocessor
values = 'mass_pipes mass_turbine'
execute_on = 'initial timestep_end'
[]
[mass_conservation]
type = ChangeOverTimePostprocessor
postprocessor = mass_tot
change_with_respect_to_initial = true
compute_relative_change = true
execute_on = 'initial timestep_end'
[]
# energy conservation
[E_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoEA
block = 'pipe'
execute_on = 'initial timestep_end'
[]
[E_turbine]
type = ScalarVariable
variable = turbine:rhoEV
execute_on = 'initial timestep_end'
[]
[E_tot]
type = LinearCombinationPostprocessor
pp_coefs = '1 1'
pp_names = 'E_pipes E_turbine'
execute_on = 'initial timestep_end'
[]
[S_energy]
type = FunctionValuePostprocessor
function = S_energy_fcn
execute_on = 'initial timestep_end'
[]
[E_change]
type = ChangeOverTimePostprocessor
postprocessor = E_tot
execute_on = 'initial timestep_end'
[]
# This should also execute on initial. This value is
# lagged by one timestep as a workaround to moose issue #13262.
[energy_conservation]
type = FunctionValuePostprocessor
function = energy_conservation_fcn
execute_on = 'timestep_end'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
dt = ${dt}
num_steps = 6
solve_type = NEWTON
nl_rel_tol = 1e-8
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-4
l_max_its = 10
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Outputs]
velocity_as_vector = false
[]
(modules/porous_flow/test/tests/dirackernels/pls03_action.i)
# Test that the upwinding works correctly.
#
# A poly-line sink sits at the centre of the element.
# It has length=4 and weight=0.5, and extracts fluid
# at a constant rate of
# (1 * relative_permeability) kg.m^-1.s^-1
# Since it sits at the centre of the element, it extracts
# equally from each node, so the rate of extraction from
# each node is
# (0.5 * relative_permeability) kg.s^-1
# including the length and weight effects.
#
# There is no fluid flow.
#
# The initial conditions are such that all nodes have
# relative_permeability=0, except for one which has
# relative_permeaility = 1. Therefore, all nodes should
# remain at their initial porepressure, except the one.
#
# The porosity is 0.1, and the elemental volume is 2,
# so the fluid mass at the node in question = 0.2 * density / 4,
# where the 4 is the number of nodes in the element.
# In this simulation density = dens0 * exp(P / bulk), with
# dens0 = 100, and bulk = 20 MPa.
# The initial porepressure P0 = 10 MPa, so the final (after
# 1 second of simulation) is
# P(t=1) = 8.748592 MPa
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmin = 0
xmax = 2
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.0
bulk_modulus = 2.0E7
viscosity = 1.0
density0 = 100.0
[]
[]
[PorousFlowUnsaturated]
porepressure = pp
gravity = '0 0 0'
fp = the_simple_fluid
van_genuchten_alpha = 1.0E-7
van_genuchten_m = 0.5
relative_permeability_exponent = 2
residual_saturation = 0.99
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
#function = if((x<1)&(y<0.5),1E7,-1E7)
function = if((x<1)&(y>0.5),1E7,-1E7)
#function = if((x>1)&(y<0.5),1E7,-1E7)
#function = if((x>1)&(y>0.5),1E7,-1E7)
[]
[]
[UserObjects]
[pls_total_outflow_mass]
type = PorousFlowSumQuantity
[]
[]
[Materials]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0 0 0 0 0 0 0 0 0'
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[]
[DiracKernels]
[pls]
type = PorousFlowPolyLineSink
fluid_phase = 0
point_file = pls03.bh
use_relative_permeability = true
line_length = 4
SumQuantityUO = pls_total_outflow_mass
variable = pp
p_or_t_vals = '0 1E7'
fluxes = '1 1'
[]
[]
[Postprocessors]
[pls_report]
type = PorousFlowPlotQuantity
uo = pls_total_outflow_mass
[]
[fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[]
[fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[]
[zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
indirect_dependencies = 'fluid_mass1 fluid_mass0 pls_report'
[]
[p00]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[]
[p01]
type = PointValue
variable = pp
point = '0 1 0'
execute_on = timestep_end
[]
[p20]
type = PointValue
variable = pp
point = '2 0 0'
execute_on = timestep_end
[]
[p21]
type = PointValue
variable = pp
point = '2 1 0'
execute_on = timestep_end
[]
[]
[Functions]
[mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 pls_report'
[]
[]
[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 = 1
dt = 1
solve_type = NEWTON
[]
[Outputs]
file_base = pls03_action
exodus = false
csv = true
execute_on = timestep_end
[]
(modules/porous_flow/test/tests/poro_elasticity/pp_generation_action.i)
# Same as pp_generation.i, but using an Action
#
# A sample is constrained on all sides and its boundaries are
# also impermeable. Fluid is pumped into the sample via a
# volumetric source (ie kg/second per cubic meter), and the
# rise in porepressure is observed.
#
# Source = s (units = kg/m^3/second)
#
# Expect:
# fluid_mass = mass0 + s*t
# stress = 0 (remember this is effective stress)
# Porepressure = fluid_bulk*log(fluid_mass_density/density_P0), where fluid_mass_density = fluid_mass*porosity
# porosity = biot+(phi0-biot)*exp(pp(biot-1)/solid_bulk)
#
# Parameters:
# Biot coefficient = 0.3
# Phi0 = 0.1
# Solid Bulk modulus = 2
# fluid_bulk = 13
# density_P0 = 1
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.0
bulk_modulus = 13.0
viscosity = 1.0
density0 = 1.0
[]
[]
[PorousFlowUnsaturated]
coupling_type = HydroMechanical
displacements = 'disp_x disp_y disp_z'
porepressure = porepressure
biot_coefficient = 0.3
gravity = '0 0 0'
fp = the_simple_fluid
van_genuchten_alpha = 1.0
van_genuchten_m = 0.8
relative_permeability_type = Corey
relative_permeability_exponent = 0.0
save_component_rate_in = nodal_kg_per_s
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[]
[]
[Kernels]
[source]
type = BodyForce
function = 0.1
variable = porepressure
[]
[]
[AuxVariables]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[nodal_kg_per_s]
[]
[]
[AuxKernels]
[porosity]
type = PorousFlowPropertyAux
variable = porosity
property = porosity
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = ComputeLinearElasticStress
[]
[porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
porosity_zero = 0.1
biot_coefficient = 0.3
solid_bulk = 2
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 1 0 0 0 1' # unimportant
[]
[]
[Functions]
[porosity_analytic]
type = ParsedFunction
expression = 'biot+(phi0-biot)*exp(pp*(biot-1)/bulk)'
symbol_names = 'biot phi0 pp bulk'
symbol_values = '0.3 0.1 p0 2'
[]
[]
[Postprocessors]
[nodal_kg_per_s]
type = PointValue
outputs = csv
point = '0 0 0'
variable = nodal_kg_per_s
[]
[fluid_mass]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'initial timestep_end'
[]
[porosity]
type = PointValue
outputs = 'console csv'
point = '0 0 0'
variable = porosity
[]
[p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
[]
[porosity_analytic]
type = FunctionValuePostprocessor
function = porosity_analytic
[]
[zdisp]
type = PointValue
outputs = csv
point = '0 0 0.5'
variable = disp_z
[]
[stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[]
[stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[]
[stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[]
[]
[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-14 1E-10 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = pp_generation_action
csv = true
[]
(modules/porous_flow/test/tests/energy_conservation/heat04_action_KT.i)
# heat04, but using an action with KT stabilization.
# See heat04.i for a full discussion of the results.
# The KT stabilization should have no impact as there is no flow, but this input file checks that MOOSE runs.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.5
cv = 2
cp = 2
bulk_modulus = 2.0
density0 = 3.0
[]
[]
[PorousFlowUnsaturated]
coupling_type = ThermoHydroMechanical
displacements = 'disp_x disp_y disp_z'
porepressure = pp
temperature = temp
dictator_name = Sir
biot_coefficient = 1.0
gravity = '0 0 0'
fp = the_simple_fluid
van_genuchten_alpha = 1.0E-12
van_genuchten_m = 0.5
relative_permeability_type = Corey
relative_permeability_exponent = 0.0
stabilization = KT
flux_limiter_type = superbee
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = Sir
block = 0
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[pp]
[]
[temp]
[]
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[]
[]
[Kernels]
[heat_source]
type = BodyForce
function = 1
variable = temp
[]
[]
[Functions]
[err_T_fcn]
type = ParsedFunction
symbol_names = 'por0 rte temp rd rhc m0 fhc source'
symbol_values = '0.5 0.25 t0 5 0.2 1.5 2 1'
expression = '((1-por0)*exp(rte*temp)*rd*rhc*temp+m0*fhc*temp-source*t)/(source*t)'
[]
[err_pp_fcn]
type = ParsedFunction
symbol_names = 'por0 rte temp rd rhc m0 fhc source bulk pp fte'
symbol_values = '0.5 0.25 t0 5 0.2 1.5 2 1 2 p0 0.5'
expression = '(bulk*(fte*temp-log(1+(por0-1)*exp(rte*temp))+log(por0))-pp)/pp'
[]
[]
[AuxVariables]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = ComputeLinearElasticStress
[]
[porosity]
type = PorousFlowPorosity
thermal = true
fluid = true
mechanical = true
ensure_positive = false
biot_coefficient = 1.0
porosity_zero = 0.5
thermal_expansion_coeff = 0.25
solid_bulk = 2
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 0.2
density = 5.0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0 0 0 0 0 0 0 0 0'
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0 0 0 0 0 0 0 0 0'
[]
[]
[Postprocessors]
[p0]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = pp
[]
[t0]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = temp
[]
[porosity]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = porosity
[]
[stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[]
[stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[]
[stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[]
[fluid_mass]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'timestep_end'
outputs = 'console csv'
[]
[total_heat]
type = PorousFlowHeatEnergy
phase = 0
execute_on = 'timestep_end'
outputs = 'console csv'
[]
[err_T]
type = FunctionValuePostprocessor
function = err_T_fcn
[]
[err_P]
type = FunctionValuePostprocessor
function = err_pp_fcn
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-12 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 5
[]
[Outputs]
execute_on = 'initial timestep_end'
file_base = heat04_action
csv = true
[]
(modules/geochemistry/test/tests/kinetics/bio_arsenate1.i)
# Example of a microbe-catalysed reaction:
# Lactate- + 2HAsO4-- + 2H2O -> CH3COO- + CO3-- + 2As(OH)4-
# at pH = 9.8
# at temperature = 20degC
# The equation in the database involving lactate is
# Lactate- + 3O2(aq) -> 2H+ + 3HCO3-
# with log10(K) = 231.4 at 20degC
[TimeDependentReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
swap_into_basis = 'CO3--'
swap_out_of_basis = 'HCO3-'
charge_balance_species = "Cl-"
constraint_species = "H2O Na+ CO3-- Lactate- Cl- AsO4--- CH3COO- As(OH)4- H+"
constraint_value = " 1.0 1448E-3 24E-3 10E-3 1500E-3 10E-3 1E-6 1E-6 -9.8"
constraint_meaning = "kg_solvent_water bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition log10activity"
constraint_unit = " kg moles moles moles moles moles moles moles dimensionless"
controlled_activity_name = 'H+'
controlled_activity_value = 1.58489E-10 # this is pH=9.8
kinetic_species_name = "arsenate_reducer"
kinetic_species_initial_value = 0.5 # molecular weight of arsenate_reducer = 1, so this is the amount of mmoles too
kinetic_species_unit = mg
ramp_max_ionic_strength_initial = 0
stoichiometric_ionic_str_using_Cl_only = true # for comparison with GWB
execute_console_output_on = ''
mol_cutoff = 1E-20
solver_info = true
evaluate_kinetic_rates_always = true
precision = 16
[]
[UserObjects]
[rate_arsenate_reducer]
type = GeochemistryKineticRate
kinetic_species_name = "arsenate_reducer"
intrinsic_rate_constant = 0.6048 # 7E-9 mol/mg/s = 0.6048 mol/g/day
promoting_species_names = 'HAsO4--'
promoting_indices = '1'
promoting_monod_indices = '1'
promoting_half_saturation = 10E-6
multiply_by_mass = true
direction = dissolution
kinetic_biological_efficiency = 5
energy_captured = 125E3
theta = 0.25
eta = 1
[]
[definition]
type = GeochemicalModelDefinition
database_file = "../../../database/moose_geochemdb.json"
basis_species = "H2O Na+ Cl- HCO3- H+ As(OH)4- Lactate- CH3COO- AsO4---"
kinetic_redox = "arsenate_reducer"
kinetic_rate_descriptions = "rate_arsenate_reducer"
[]
[]
[Executioner]
type = Transient
dt = 0.01
end_time = 2
[]
[AuxVariables]
[moles_acetate]
[]
[biomass_g]
[]
[]
[AuxKernels]
[moles_acetate]
type = GeochemistryQuantityAux
species = 'CH3COO-'
reactor = reactor
variable = moles_acetate
quantity = transported_moles_in_original_basis
[]
[biomass_g]
type = GeochemistryQuantityAux
species = 'arsenate_reducer'
reactor = reactor
variable = biomass_g
quantity = kinetic_moles # remember molecular weight = 1 g/mol
[]
[]
[Functions]
[rate]
type = ParsedFunction
vars = 'dt reaction_rate_times_dt'
vals = 'dt reaction_rate_times_dt'
value = 'reaction_rate_times_dt / dt'
[]
[]
[Postprocessors]
[moles_acetate]
type = PointValue
point = '0 0 0'
variable = moles_acetate
[]
[reaction_rate_times_dt]
type = PointValue
point = '0 0 0'
variable = mol_change_arsenate_reducer
outputs = 'none'
[]
[dt]
type = TimestepSize
outputs = 'none'
[]
[reaction_rate]
type = FunctionValuePostprocessor
function = rate
[]
[biomass_g]
type = PointValue
point = '0 0 0'
variable = biomass_g
[]
[]
[Outputs]
csv = true
[]
(test/tests/time_steppers/iteration_adaptive/adapt_tstep_multi_pps_lim.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 50
ny = 2
xmax = 5
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Functions]
[timestep_fn1]
type = PiecewiseLinear
x = '0 40'
y = '10 1'
[]
[timestep_fn2]
type = PiecewiseLinear
x = '0 40'
y = '2 5'
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[dt]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 10
[]
[right]
type = NeumannBC
variable = u
boundary = right
value = -1
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
start_time = 0.0
end_time = 40.0
dtmax = 6.0
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 10
timestep_limiting_postprocessor = 'timestep_pp1 timestep_pp2'
dt = 1.0
[]
[]
[Postprocessors]
[_dt]
type = TimestepSize
[]
[timestep_pp1]
type = FunctionValuePostprocessor
function = timestep_fn1
[]
[timestep_pp2]
type = FunctionValuePostprocessor
function = timestep_fn2
[]
[]
[Outputs]
csv = true
[]
(test/tests/functions/piecewise_linear_from_vectorpostprocessor/vpp_time_interpolation.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Problem]
kernel_coverage_check = false
[]
[Variables][dummy][][]
[Functions]
[./interpolate_vpp]
type = VectorPostprocessorFunction
vectorpostprocessor_name = read_data
argument_column = time
value_column = value
[../]
[]
[Executioner]
type = Transient
num_steps = 5
[]
[Postprocessors]
[./check_value]
type = FunctionValuePostprocessor
function = interpolate_vpp
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
[VectorPostprocessors]
[./read_data]
type = CSVReader
csv_file = time_data.csv
force_preaux = true # necessary so that vpp data exists to interpolate on step 0
outputs = none
[../]
[]
[Outputs]
csv = true # write out FunctionValuePostprocessor results for comparison
[]
(modules/porous_flow/test/tests/hysteresis/hys_order_08.i)
# Test that PorousFlowHysteresisOrder correctly calculates hysteresis order
# Hysteresis order is initialised = 3, with turning points = (0.5, 0.8, 0.66)
# Initial saturation is 0.71
# A large amount of water is removed in one timestep so the saturation becomes 0.58 (and order = 0)
# Then, water is added to the system (order = 1, with turning point = 0.58) until saturation = 0.67
# Then, a large amount of water is removed from the system so order becomes 0
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = -9E5
[]
[]
[PorousFlowUnsaturated]
porepressure = pp
fp = simple_fluid
[]
[DiracKernels]
[source_sink_0]
type = PorousFlowPointSourceFromPostprocessor
point = '0 0 0'
mass_flux = sink_strength
variable = pp
[]
[source_sink_1]
type = PorousFlowPointSourceFromPostprocessor
point = '1 0 0'
mass_flux = sink_strength
variable = pp
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 1.0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0 0 0 0 0 0 0 0 0'
[]
[hys_order]
type = PorousFlowHysteresisOrder
initial_order = 3
previous_turning_points = '0.6 0.8 0.66'
[]
[]
[AuxVariables]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[tp0]
family = MONOMIAL
order = CONSTANT
[]
[tp1]
family = MONOMIAL
order = CONSTANT
[]
[tp2]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[tp0]
type = PorousFlowPropertyAux
variable = tp0
property = hysteresis_saturation_turning_point
hysteresis_turning_point = 0
[]
[tp1]
type = PorousFlowPropertyAux
variable = tp1
property = hysteresis_saturation_turning_point
hysteresis_turning_point = 1
[]
[tp2]
type = PorousFlowPropertyAux
variable = tp2
property = hysteresis_saturation_turning_point
hysteresis_turning_point = 2
[]
[]
[Functions]
[sink_strength_fcn]
type = ParsedFunction
expression = '30 * if(t <= 1, -2, if(t <= 2, 1.5, -2))'
[]
[]
[Postprocessors]
[sink_strength]
type = FunctionValuePostprocessor
function = sink_strength_fcn
outputs = 'none'
[]
[saturation]
type = PointValue
point = '0 0 0'
variable = saturation0
[]
[hys_order]
type = PointValue
point = '0 0 0'
variable = hys_order
[]
[tp0]
type = PointValue
point = '0 0 0'
variable = tp0
[]
[tp1]
type = PointValue
point = '0 0 0'
variable = tp1
[]
[tp2]
type = PointValue
point = '0 0 0'
variable = tp2
[]
[]
[Preconditioning]
[basic]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 5
nl_abs_tol = 1E-7
[]
[Outputs]
[csv]
type = CSV
[]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_radiation/sphere.i)
#
# This problem is one of radiation boundary conditions between two
# spherical surfaces.
#
# S(T1^4 - T2^4) R1^2
# flux1 = - ---------------- and flux2 = -flux1 * ----
# 1 1 - e2 R1^2 R2^2
# -- + ------ * ----
# e1 e2 R2^2
#
# where S is the Stefan Boltzmann constant 5.67e-8 W/m^2/K^4
# T1 is the temperature on the left surface 278 K
# T2 is the temperature on the right surface 333 K
# e1 is the emissivity for the left surface 0.8
# e2 is the emissivity for the left surface 0.9
# R1 is the radius of the inner surface 0.1 m
# R2 is the radius of the outer surface 0.11 m
#
# Flux1:
# Exact Code
# ------------- -------------
# -267.21 W/m^2 -267.02 W/m^2
#
# Flux2:
# Exact Code
# ------------- -------------
# 220.83 W/m^2 220.70 W/m^2
#
thick = 0.01
R1 = 0.1
R2 = 0.11
[GlobalParams]
order = second
family = lagrange
[]
[Mesh]
coord_type = RSPHERICAL
[mesh1]
type = GeneratedMeshGenerator
dim = 1
elem_type = edge3
nx = 4
xmin = '${fparse R1 - thick}'
xmax = '${R1}'
boundary_name_prefix = left
[]
[mesh2]
type = GeneratedMeshGenerator
dim = 1
elem_type = edge3
nx = 4
ny = 1
xmin = '${R2}'
xmax = '${fparse R2 + thick}'
boundary_id_offset = 4
boundary_name_prefix = right
[]
[final]
type = CombinerGenerator
inputs = 'mesh1 mesh2'
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temperature
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temperature
boundary = left_left
value = 278
[]
[right]
type = DirichletBC
variable = temperature
boundary = right_right
value = 333
[]
[]
[Materials]
[heat]
type = HeatConductionMaterial
thermal_conductivity = 200 # W/m/K
specific_heat = 4.2e5
[]
[]
[ThermalContact]
[thermal_contact]
type = GapHeatTransfer
variable = temperature
primary = left_right
secondary = right_left
emissivity_primary = 0.8
emissivity_secondary = 0.9
quadrature = true
gap_conductivity = 1e-40 # requires a positive value
gap_geometry_type = sphere
[]
[]
[Functions]
[analytic_flux_1]
type = ParsedFunction
symbol_names = 'S T1 T2 e1 e2 R1 R2'
symbol_values = '5.67e-8 278 333 0.8 0.9 ${R1} ${R2}'
expression = 'T14 := T1*T1*T1*T1;
T24 := T2*T2*T2*T2;
S*(T14-T24)/(1/e1+(1-e2)/e2*R1*R1/R2/R2)'
[]
[analytic_flux_2]
type = ParsedFunction
symbol_names = 'S T1 T2 e1 e2 R1 R2'
symbol_values = '5.67e-8 278 333 0.8 0.9 ${R1} ${R2}'
expression = 'T14 := T1*T1*T1*T1;
T24 := T2*T2*T2*T2;
-S*(T14-T24)/(1/e1+(1-e2)/e2*R1*R1/R2/R2)*R1*R1/R2/R2'
[]
[]
[Postprocessors]
[code_flux_1]
type = SideDiffusiveFluxAverage
variable = temperature
boundary = left_right
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[]
[analytic_flux_1]
type = FunctionValuePostprocessor
function = analytic_flux_1
execute_on = 'initial timestep_end'
[]
[error_1]
type = ParsedPostprocessor
pp_names = 'code_flux_1 analytic_flux_1'
function = '(analytic_flux_1 - code_flux_1)/analytic_flux_1*100'
execute_on = 'initial timestep_end'
[]
[code_flux_2]
type = SideDiffusiveFluxAverage
variable = temperature
boundary = right_left
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[]
[analytic_flux_2]
type = FunctionValuePostprocessor
function = analytic_flux_2
execute_on = 'initial timestep_end'
[]
[error_2]
type = ParsedPostprocessor
pp_names = 'code_flux_2 analytic_flux_2'
function = '(analytic_flux_2 - code_flux_2)/analytic_flux_2*100'
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = newton
num_steps = 1
dt = 1
end_time = 1
nl_abs_tol = 1e-12
nl_rel_tol = 1e-10
[]
[Outputs]
csv = true
[]
(examples/ex18_scalar_kernel/ex18.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Functions]
# ODEs
[./exact_x_fn]
type = ParsedFunction
expression = (-1/3)*exp(-t)+(4/3)*exp(5*t)
[../]
[./exact_y_fn]
type = ParsedFunction
expression = (2/3)*exp(-t)+(4/3)*exp(5*t)
[../]
[]
[Variables]
[./diffused]
order = FIRST
family = LAGRANGE
[../]
# ODE variables
[./x]
family = SCALAR
order = FIRST
initial_condition = 1
[../]
[./y]
family = SCALAR
order = FIRST
initial_condition = 2
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = diffused
[../]
[./diff]
type = Diffusion
variable = diffused
[../]
[]
[ScalarKernels]
[./td1]
type = ODETimeDerivative
variable = x
[../]
[./ode1]
type = ImplicitODEx
variable = x
y = y
[../]
[./td2]
type = ODETimeDerivative
variable = y
[../]
[./ode2]
type = ImplicitODEy
variable = y
x = x
[../]
[]
[BCs]
[./right]
type = ScalarDirichletBC
variable = diffused
boundary = 1
scalar_var = x
[../]
[./left]
type = ScalarDirichletBC
variable = diffused
boundary = 3
scalar_var = y
[../]
[]
[Postprocessors]
# to print the values of x, y into a file so we can plot it
[./x_pp]
type = ScalarVariable
variable = x
execute_on = timestep_end
[../]
[./y_pp]
type = ScalarVariable
variable = y
execute_on = timestep_end
[../]
[./exact_x]
type = FunctionValuePostprocessor
function = exact_x_fn
execute_on = timestep_end
point = '0 0 0'
[../]
[./exact_y]
type = FunctionValuePostprocessor
function = exact_y_fn
execute_on = timestep_end
point = '0 0 0'
[../]
# Measure the error in ODE solution for 'x'.
[./l2err_x]
type = ScalarL2Error
variable = x
function = exact_x_fn
[../]
# Measure the error in ODE solution for 'y'.
[./l2err_y]
type = ScalarL2Error
variable = y
function = exact_y_fn
[../]
[]
[Executioner]
type = Transient
start_time = 0
dt = 0.01
num_steps = 10
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/tensile/random_smoothed.i)
# Plasticity models:
# Smoothed tensile with strength = 1MPa
#
# Lame lambda = 1GPa. Lame mu = 1.3GPa
#
# A line of elements is perturbed randomly, and return to the yield surface at each quadpoint is checked
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1000
ny = 1234
nz = 1
xmin = 0
xmax = 1000
ymin = 0
ymax = 1234
zmin = 0
zmax = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
add_variables = true
incremental = true
strain = finite
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_yz stress_zz'
[../]
[]
[ICs]
[./x]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_x
[../]
[./y]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_y
[../]
[./z]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_z
[../]
[]
[BCs]
[./x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'front back'
function = '0'
[../]
[./y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'front back'
function = '0'
[../]
[./z]
type = FunctionDirichletBC
variable = disp_z
boundary = 'front back'
function = '0'
[../]
[]
[AuxVariables]
[./f0]
order = CONSTANT
family = MONOMIAL
[../]
[./int0]
order = CONSTANT
family = MONOMIAL
[../]
[./iter]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./f0]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 0
variable = f0
[../]
[./int0]
type = MaterialStdVectorAux
property = plastic_internal_parameter
factor = 1E6
index = 0
variable = int0
[../]
[./iter]
type = MaterialRealAux
property = plastic_NR_iterations
variable = iter
[../]
[]
[Postprocessors]
[./tot_iters]
type = ElementIntegralMaterialProperty
mat_prop = plastic_NR_iterations
outputs = console
[../]
[./raw_f0]
type = ElementExtremeValue
variable = f0
outputs = console
[../]
[./iter]
type = ElementExtremeValue
variable = iter
outputs = console
[../]
[./f0]
type = FunctionValuePostprocessor
function = should_be_zero0_fcn
[../]
[]
[Functions]
[./should_be_zero0_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f0'
[../]
[]
[UserObjects]
[./ts]
type = SolidMechanicsHardeningConstant
value = 1E6
[../]
[./tensile]
type = SolidMechanicsPlasticTensile
tensile_strength = ts
tensile_tip_smoother = 1E5
yield_function_tolerance = 1.0E-1
internal_constraint_tolerance = 1.0E-7
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
fill_method = symmetric_isotropic
C_ijkl = '1E9 1.3E9'
[../]
[./multi]
type = ComputeMultiPlasticityStress
block = 0
ep_plastic_tolerance = 1E-7
plastic_models = 'tensile'
max_NR_iterations = 20
min_stepsize = 1E-4
max_stepsize_for_dumb = 1E-3
debug_fspb = crash
debug_jac_at_stress = '10 0 0 0 10 0 0 0 10'
debug_jac_at_pm = '1 1 1 1'
debug_jac_at_intnl = '1 1 1 1'
debug_stress_change = 1E1
debug_pm_change = '1E-6 1E-6 1E-6 1E-6'
debug_intnl_change = '1E-6 1E-6 1E-6 1E-6'
[../]
[]
[Executioner]
end_time = 1
dt = 1
type = Transient
[]
[Outputs]
file_base = random_smoothed
exodus = false
[./csv]
type = CSV
[../]
[]
(modules/porous_flow/test/tests/hysteresis/1phase.i)
# Simple example of a 1-phase situation with hysteretic capillary pressure. Water is removed and added to the system in order to observe the hysteresis
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
number_fluid_phases = 1
number_fluid_components = 1
porous_flow_vars = 'pp'
[]
[]
[Variables]
[pp]
initial_condition = 0
[]
[]
[Kernels]
[mass_conservation]
type = PorousFlowMassTimeDerivative
variable = pp
[]
[]
[DiracKernels]
[pump]
type = PorousFlowPointSourceFromPostprocessor
mass_flux = flux
point = '0.5 0 0'
variable = pp
[]
[]
[AuxVariables]
[sat]
family = MONOMIAL
order = CONSTANT
[]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[sat]
type = PorousFlowPropertyAux
variable = sat
property = saturation
[]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[temperature]
type = PorousFlowTemperature
temperature = 20
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[hys_order_material]
type = PorousFlowHysteresisOrder
[]
[pc_calculator]
type = PorousFlow1PhaseHysP
alpha_d = 10.0
alpha_w = 7.0
n_d = 1.5
n_w = 1.9
S_l_min = 0.1
S_lr = 0.2
S_gr_max = 0.3
Pc_max = 12.0
high_ratio = 0.9
low_extension_type = quadratic
high_extension_type = power
porepressure = pp
[]
[]
[Postprocessors]
[flux]
type = FunctionValuePostprocessor
function = 'if(t <= 9, -10, 10)'
[]
[hys_order]
type = PointValue
point = '0 0 0'
variable = hys_order
[]
[sat]
type = PointValue
point = '0 0 0'
variable = sat
[]
[pp]
type = PointValue
point = '0 0 0'
variable = pp
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.5
end_time = 19
nl_abs_tol = 1E-10
[]
[Outputs]
csv = true
[]
(modules/porous_flow/test/tests/dirackernels/bh02.i)
# fully-saturated
# production
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = 1E7
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[]
[UserObjects]
[borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[]
[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
viscosity = 1e-3
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.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[DiracKernels]
[bh]
type = PorousFlowPeacemanBorehole
# Because the Variable for this Sink is pp, and pp is associated
# with the fluid-mass conservation equation, this sink is extracting
# fluid mass (and not heat energy or something else)
variable = pp
# The following specfies that the total fluid mass coming out of
# the porespace via this sink in this timestep should be recorded
# in the pls_total_outflow_mass UserObject
SumQuantityUO = borehole_total_outflow_mass
# The following file defines the polyline geometry
# which is just two points in this particular example
point_file = bh02.bh
# First, we want Peacemans f to be a function of porepressure (and not
# temperature or something else). So bottom_p_or_t is actually porepressure
function_of = pressure
fluid_phase = 0
# The bottomhole pressure
bottom_p_or_t = 0
# In this example there is no increase of the wellbore pressure
# due to gravity:
unit_weight = '0 0 0'
# PeacemanBoreholes should almost always have use_mobility = true
use_mobility = true
# This is a production wellbore (a sink of fluid that removes fluid from porespace)
character = 1
[]
[]
[Postprocessors]
[bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[]
[fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[]
[fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[]
[zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
indirect_dependencies = 'fluid_mass1 fluid_mass0 bh_report'
[]
[p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[]
[]
[Functions]
[mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[]
[]
[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 = 0.5
dt = 1E-2
solve_type = NEWTON
[]
[Outputs]
file_base = bh02
exodus = false
csv = true
execute_on = timestep_end
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/special/area.i)
# Simple 3D test
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = true
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 1
[]
[]
[Kernels]
[sdx]
type = TotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[sdy]
type = TotalLagrangianStressDivergence
variable = disp_y
component = 1
[]
[sdz]
type = TotalLagrangianStressDivergence
variable = disp_z
component = 2
[]
[]
[AuxVariables]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[zstress]
type = PiecewiseLinear
x = '0 1'
y = '0 500'
[]
[constant]
type = ConstantFunction
value = 1.0
[]
[ratio]
type = ParsedFunction
symbol_names = 'sd su'
symbol_values = 's_def s_undef'
expression = 'sd / su'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[boty]
type = DirichletBC
preset = true
boundary = bottom
variable = disp_y
value = 0.0
[]
[backz]
type = DirichletBC
preset = true
boundary = back
variable = disp_z
value = 0.0
[]
[pull_z]
type = FunctionNeumannBC
boundary = front
variable = disp_z
function = zstress
[]
[]
[AuxKernels]
[stress_zz]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1000.0
poissons_ratio = 0.25
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[s_undef]
type = SideIntegralVariablePostprocessor
variable = stress_zz
boundary = front
[]
[s_def]
type = SideIntegralVariablePostprocessor
variable = stress_zz
boundary = front
use_displaced_mesh = true
[]
[area_calc]
type = FunctionValuePostprocessor
function = ratio
[]
[area]
type = AreaPostprocessor
boundary = front
use_displaced_mesh = true
[]
[]
[Executioner]
type = Transient
solve_type = 'newton'
line_search = none
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 2
l_tol = 1e-14
nl_max_its = 15
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 1.0
[]
[Outputs]
exodus = false
csv = true
[]
(modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/exact.i)
# This test provides comparison to calculated values from Leblond:1994kl
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
pore_shape_model = spherical
[]
[Mesh]
[./msh]
type = CartesianMeshGenerator
dim = 3
dx = 0.01
dy = 0.01
dz = 0.01
iz = 1
ix = 1
iy = 1
[../]
[./extra_nodeset]
type = ExtraNodesetGenerator
input = msh
new_boundary = 'origin'
coord = '0 0 0'
[]
[]
[Physics/SolidMechanics/QuasiStatic/All]
strain = FINITE
add_variables = true
generate_output = 'strain_xx strain_yy strain_xy hydrostatic_stress vonmises_stress'
use_automatic_differentiation = true
[]
[Functions]
[./Q_gtn]
type = ParsedFunction
symbol_names = 'avg_vonmises gtn_gauge_stress'
symbol_values = 'avg_vonmises gtn_gauge_stress'
expression = 'avg_vonmises/gtn_gauge_stress'
[../]
[./M_gtn]
type = ParsedFunction
symbol_names = 'avg_hydro gtn_gauge_stress'
symbol_values = 'avg_hydro gtn_gauge_stress'
expression = 'abs(avg_hydro) / gtn_gauge_stress'
[../]
[./Q_ten]
type = ParsedFunction
symbol_names = 'avg_vonmises ten_gauge_stress'
symbol_values = 'avg_vonmises ten_gauge_stress'
expression = 'avg_vonmises/ten_gauge_stress'
[../]
[./M_ten]
type = ParsedFunction
symbol_names = 'avg_hydro ten_gauge_stress'
symbol_values = 'avg_hydro ten_gauge_stress'
expression = 'abs(avg_hydro) / ten_gauge_stress'
[../]
[./Q_five]
type = ParsedFunction
symbol_names = 'avg_vonmises five_gauge_stress'
symbol_values = 'avg_vonmises five_gauge_stress'
expression = 'avg_vonmises/five_gauge_stress'
[../]
[./M_five]
type = ParsedFunction
symbol_names = 'avg_hydro five_gauge_stress'
symbol_values = 'avg_hydro five_gauge_stress'
expression = 'abs(avg_hydro) / five_gauge_stress'
[../]
[./Q_three]
type = ParsedFunction
symbol_names = 'avg_vonmises three_gauge_stress'
symbol_values = 'avg_vonmises three_gauge_stress'
expression = 'avg_vonmises / three_gauge_stress'
[../]
[./M_three]
type = ParsedFunction
symbol_names = 'avg_hydro three_gauge_stress'
symbol_values = 'avg_hydro three_gauge_stress'
expression = 'abs(avg_hydro) / three_gauge_stress'
[../]
[./Q_two]
type = ParsedFunction
symbol_names = 'avg_vonmises two_gauge_stress'
symbol_values = 'avg_vonmises two_gauge_stress'
expression = 'avg_vonmises/two_gauge_stress'
[../]
[./M_two]
type = ParsedFunction
symbol_names = 'avg_hydro two_gauge_stress'
symbol_values = 'avg_hydro two_gauge_stress'
expression = 'abs(avg_hydro) / two_gauge_stress'
[../]
[./Q_onepointfive]
type = ParsedFunction
symbol_names = 'avg_vonmises onepointfive_gauge_stress'
symbol_values = 'avg_vonmises onepointfive_gauge_stress'
expression = 'avg_vonmises / onepointfive_gauge_stress'
[../]
[./M_onepointfive]
type = ParsedFunction
symbol_names = 'avg_hydro onepointfive_gauge_stress'
symbol_values = 'avg_hydro onepointfive_gauge_stress'
expression = 'abs(avg_hydro) / onepointfive_gauge_stress'
[../]
[./Q_one]
type = ParsedFunction
symbol_names = 'avg_vonmises one_gauge_stress'
symbol_values = 'avg_vonmises one_gauge_stress'
expression = 'avg_vonmises / one_gauge_stress'
[../]
[./M_one]
type = ParsedFunction
symbol_names = 'avg_hydro one_gauge_stress'
symbol_values = 'avg_hydro one_gauge_stress'
expression = 'abs(avg_hydro) / one_gauge_stress'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.3
[../]
[./stress]
type = ADComputeMultipleInelasticStress
inelastic_models = 'gtn lps_ten lps_five lps_three lps_two lps_onepointfive lps_one'
outputs = all
extra_stress_names = extra_stress
[../]
[./porosity]
type = ADPorosityFromStrain
initial_porosity = 1e-3
inelastic_strain = 'combined_inelastic_strain'
outputs = 'all'
[../]
[./gtn]
type = ADViscoplasticityStressUpdate
coefficient = 0
power = 1 # arbitrary
viscoplasticity_model = GTN
base_name = gtn
outputs = all
relative_tolerance = 1e-30
[../]
[./lps_ten]
type = ADViscoplasticityStressUpdate
coefficient = 0
power = 10
base_name = ten
outputs = all
relative_tolerance = 1e-30
[../]
[./lps_five]
type = ADViscoplasticityStressUpdate
coefficient = 0
power = 5
base_name = five
outputs = all
relative_tolerance = 1e-30
[../]
[./lps_three]
type = ADViscoplasticityStressUpdate
coefficient = 0
power = 3
base_name = three
outputs = all
relative_tolerance = 1e-30
[../]
[./lps_two]
type = ADViscoplasticityStressUpdate
coefficient = 0
power = 2
base_name = two
outputs = all
relative_tolerance = 1e-30
[../]
[./lps_onepointfive]
type = ADViscoplasticityStressUpdate
coefficient = 0
power = 1.5
base_name = onepointfive
outputs = all
relative_tolerance = 1e-30
[../]
[./lps_one]
type = ADViscoplasticityStressUpdate
coefficient = 0
power = 1
base_name = one
outputs = all
relative_tolerance = 1e-30
[../]
[./const_stress]
type = ComputeExtraStressConstant
extra_stress_tensor = '1 1 1 1 1 1 1 1 1'
outputs = all
[../]
[]
[BCs]
[./no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[./Pressure]
[./bcs]
boundary = 'top right front'
function = '10^(t/4.5)'
use_automatic_differentiation = true
[../]
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
num_steps = 10
nl_abs_tol = 1e-8
[]
[Postprocessors]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
[../]
[./gtn_gauge_stress]
type = ElementAverageValue
variable = gtn_gauge_stress
outputs = none
[../]
[./0Q_gtn]
type = FunctionValuePostprocessor
function = Q_gtn
[../]
[./0M_gtn]
type = FunctionValuePostprocessor
function = M_gtn
[../]
[./ten_gauge_stress]
type = ElementAverageValue
variable = ten_gauge_stress
outputs = none
[../]
[./1Q_ten]
type = FunctionValuePostprocessor
function = Q_ten
[../]
[./1M_ten]
type = FunctionValuePostprocessor
function = M_ten
[../]
[./five_gauge_stress]
type = ElementAverageValue
variable = five_gauge_stress
outputs = none
[../]
[./2Q_five]
type = FunctionValuePostprocessor
function = Q_five
[../]
[./2M_five]
type = FunctionValuePostprocessor
function = M_five
[../]
[./three_gauge_stress]
type = ElementAverageValue
variable = three_gauge_stress
outputs = none
[../]
[./3Q_three]
type = FunctionValuePostprocessor
function = Q_three
[../]
[./3M_three]
type = FunctionValuePostprocessor
function = M_three
[../]
[./two_gauge_stress]
type = ElementAverageValue
variable = two_gauge_stress
outputs = none
[../]
[./4Q_two]
type = FunctionValuePostprocessor
function = Q_two
[../]
[./4M_two]
type = FunctionValuePostprocessor
function = M_two
[../]
[./onepointfive_gauge_stress]
type = ElementAverageValue
variable = onepointfive_gauge_stress
outputs = none
[../]
[./5Q_onepointfive]
type = FunctionValuePostprocessor
function = Q_onepointfive
[../]
[./5M_onepointfive]
type = FunctionValuePostprocessor
function = M_onepointfive
[../]
[./one_gauge_stress]
type = ElementAverageValue
variable = one_gauge_stress
outputs = none
[../]
[./6Q_one]
type = FunctionValuePostprocessor
function = Q_one
[../]
[./6M_one]
type = FunctionValuePostprocessor
function = M_one
[../]
[]
[Outputs]
csv = true
file_base = exact_spherical_out
[]
(modules/ray_tracing/test/tests/raykernels/line_source_ray_kernel/line_source_ray_kernel.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
xmax = 5
ymax = 5
[]
[Variables/u]
order = FIRST
family = LAGRANGE
[]
[BCs/zero]
type = DirichletBC
variable = u
value = 0
boundary = 'top right bottom left'
[]
[Kernels/diffusion]
type = Diffusion
variable = u
[]
[Postprocessors/postprocessor]
type = FunctionValuePostprocessor
function = 3
execute_on = initial
[]
[RayKernels]
[constant_source]
type = LineSourceRayKernel
variable = u
value = 5
rays = constant_source
[]
[pp_source]
type = LineSourceRayKernel
variable = u
postprocessor = postprocessor
rays = pp_source
[]
[function_source]
type = LineSourceRayKernel
variable = u
function = 'x + 2 * y'
rays = function_source
[]
[mixed_source]
type = LineSourceRayKernel
variable = u
value = 5
postprocessor = postprocessor
function = 'x + 2 * y'
rays = mixed_source
[]
[data_source]
type = LineSourceRayKernel
variable = u
ray_data_factor_names = data
rays = data_source
[]
[aux_data_source]
type = LineSourceRayKernel
variable = u
ray_aux_data_factor_names = aux_data
rays = aux_data_source
[]
[]
[UserObjects/study]
type = RepeatableRayStudy
start_points = '0 2 0
0.5 0.5 0
1 1 0
5 5 0
2 2 0
3 3 0'
end_points = '3 5 0
4.5 1.5 0
2 2 0
4 1 0
3 1 0
3 2 0'
names = 'constant_source
pp_source
function_source
mixed_source
data_source
aux_data_source'
ray_data_names = 'data'
ray_aux_data_names = 'aux_data'
initial_ray_data = '0; 0; 0; 0; 8; 0'
initial_ray_aux_data = '0; 0; 0; 0; 0; 10'
execute_on = PRE_KERNELS
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/hysteresis/1phase_bc.i)
# Simple example of a 1-phase situation with hysteretic capillary pressure. Water is removed and added to the system in order to observe the hysteresis. A PorousFlowSink is used to remove and add water. This input file is analogous to 1phase.i, but uses PorousFlowSink instead of PorousFlowPointSourceFromPostprocessor to remove and add water
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
number_fluid_phases = 1
number_fluid_components = 1
porous_flow_vars = 'pp'
[]
[]
[Variables]
[pp]
initial_condition = 0
[]
[]
[Kernels]
[mass_conservation]
type = PorousFlowMassTimeDerivative
variable = pp
[]
[]
[BCs]
[pump]
type = PorousFlowSink
flux_function = '-0.5 * if(t <= 9, -10, 10)'
boundary = 'left right'
variable = pp
[]
[]
[AuxVariables]
[sat]
family = MONOMIAL
order = CONSTANT
[]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[sat]
type = PorousFlowPropertyAux
variable = sat
property = saturation
[]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[temperature]
type = PorousFlowTemperature
temperature = 20
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[hys_order_material]
type = PorousFlowHysteresisOrder
[]
[pc_calculator]
type = PorousFlow1PhaseHysP
alpha_d = 10.0
alpha_w = 7.0
n_d = 1.5
n_w = 1.9
S_l_min = 0.1
S_lr = 0.2
S_gr_max = 0.3
Pc_max = 12.0
high_ratio = 0.9
low_extension_type = quadratic
high_extension_type = power
porepressure = pp
[]
[]
[Postprocessors]
[flux]
type = FunctionValuePostprocessor
function = 'if(t <= 9, -10, 10)'
[]
[hys_order]
type = PointValue
point = '0 0 0'
variable = hys_order
[]
[sat]
type = PointValue
point = '0 0 0'
variable = sat
[]
[pp]
type = PointValue
point = '0 0 0'
variable = pp
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.5
end_time = 19
nl_abs_tol = 1E-10
[]
[Outputs]
csv = true
[]
(modules/richards/test/tests/gravity_head_2/gh01.i)
# unsaturated = true
# gravity = false
# supg = false
# transient = false
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmin = 0
xmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[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 = RandomIC
min = 0.4
max = 0.6
variable = pwater
[../]
[./gas_ic]
type = RandomIC
min = 1.4
max = 1.6
variable = pgas
[../]
[]
[Kernels]
active = 'richardsfwater richardsfgas'
[./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
outputs = none # no reason why mass should be conserved
[../]
[./mass_error_gas]
type = FunctionValuePostprocessor
function = fcn_mass_error_g
outputs = none # no reason why mass should be conserved
[../]
[./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((p0-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((p0-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 = '0 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'gmres asm lu NONZERO 1E-10 1E-10 10000'
[../]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Outputs]
execute_on = 'timestep_end'
file_base = gh01
csv = true
[]
(test/tests/time_steppers/iteration_adaptive/adapt_tstep_pps_lim.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 50
ny = 2
xmax = 5
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./timestep_fn]
type = PiecewiseLinear
x = '0. 40.'
y = '10. 1. '
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./dt]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 10
[../]
[./right]
type = NeumannBC
variable = u
boundary = right
value = -1
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
start_time = 0.0
end_time = 40.0
n_startup_steps = 2
dtmax = 6.0
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 10
timestep_limiting_postprocessor = timestep_pp
dt = 1.0
[../]
[]
[Postprocessors]
[./_dt]
type = TimestepSize
[../]
# Just use a simple postprocessor to test capability to limit the time step length to the postprocessor value
[./timestep_pp]
type = FunctionValuePostprocessor
function = timestep_fn
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
checkpoint = true
[]
(modules/porous_flow/test/tests/dirackernels/bh_except11.i)
# PorousFlowPeacemanBorehole exception test
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = 1E7
[]
[]
[Kernels]
[mass0]
type = TimeDerivative
variable = pp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
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.1
[]
[]
[DiracKernels]
[bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
point_file = bh02.bh
use_relative_permeability = true
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[]
[]
[Postprocessors]
[bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[]
[fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[]
[fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[]
[zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[]
[p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[]
[]
[Functions]
[mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[]
[]
[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 = 0.5
dt = 1E-2
solve_type = NEWTON
[]
(modules/solid_mechanics/test/tests/capped_mohr_coulomb/random2.i)
# Using CappedMohrCoulomb with compressive failure only
# Plasticity models:
# Compressive strength = 1 MPa
#
# Lame lambda = 1GPa. Lame mu = 1.3GPa
#
# A line of elements is perturbed randomly, and return to the yield surface at each quadpoint is checked
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1234
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1234
zmin = 0
zmax = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
add_variables = true
incremental = true
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_yz stress_zz'
[../]
[]
[ICs]
[./x]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_x
[../]
[./y]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_y
[../]
[./z]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_z
[../]
[]
[BCs]
[./x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'front back'
function = '0'
[../]
[./y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'front back'
function = '0'
[../]
[./z]
type = FunctionDirichletBC
variable = disp_z
boundary = 'front back'
function = '0'
[../]
[]
[AuxVariables]
[./f0]
order = CONSTANT
family = MONOMIAL
[../]
[./f1]
order = CONSTANT
family = MONOMIAL
[../]
[./f2]
order = CONSTANT
family = MONOMIAL
[../]
[./int0]
order = CONSTANT
family = MONOMIAL
[../]
[./iter]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./f0]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 0
variable = f0
[../]
[./f1]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 1
variable = f1
[../]
[./f2]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 2
variable = f2
[../]
[./int0]
type = MaterialStdVectorAux
property = plastic_internal_parameter
factor = 1E6
index = 0
variable = int0
[../]
[./iter]
type = MaterialRealAux
property = plastic_NR_iterations
variable = iter
[../]
[]
[Postprocessors]
[./tot_iters]
type = ElementIntegralMaterialProperty
mat_prop = plastic_NR_iterations
outputs = console
[../]
[./raw_f0]
type = ElementExtremeValue
variable = f0
outputs = console
[../]
[./raw_f1]
type = ElementExtremeValue
variable = f1
outputs = console
[../]
[./raw_f2]
type = ElementExtremeValue
variable = f2
outputs = console
[../]
[./iter]
type = ElementExtremeValue
variable = iter
outputs = console
[../]
[./f0]
type = FunctionValuePostprocessor
function = should_be_zero0_fcn
[../]
[./f1]
type = FunctionValuePostprocessor
function = should_be_zero1_fcn
[../]
[./f2]
type = FunctionValuePostprocessor
function = should_be_zero2_fcn
[../]
[]
[Functions]
[./should_be_zero0_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f0'
[../]
[./should_be_zero1_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f1'
[../]
[./should_be_zero2_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f2'
[../]
[]
[UserObjects]
[./ts]
type = SolidMechanicsHardeningConstant
value = 1E12
[../]
[./cs]
type = SolidMechanicsHardeningCubic
value_0 = 1E6
value_residual = 0
internal_limit = 1
[../]
[./coh]
type = SolidMechanicsHardeningConstant
value = 1E12
[../]
[./ang]
type = SolidMechanicsHardeningConstant
value = 0.5
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric_isotropic
C_ijkl = '1E9 1.3E9'
[../]
[./tensile]
type = CappedMohrCoulombStressUpdate
tensile_strength = ts
compressive_strength = cs
cohesion = coh
friction_angle = ang
dilation_angle = ang
smoothing_tol = 1E5
max_NR_iterations = 100
yield_function_tol = 1.0E-1
[../]
[./stress]
type = ComputeMultipleInelasticStress
inelastic_models = tensile
perform_finite_strain_rotations = false
[../]
[]
[Executioner]
end_time = 1
dt = 1
type = Transient
[]
[Outputs]
file_base = random2
csv = true
[]
(modules/stochastic_tools/test/tests/multiapps/user_cli_args/sub_transient.i)
[StochasticTools]
[]
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Postprocessors]
[size]
type = AverageElementSize
execute_on = 'initial'
[]
[function_val]
type = FunctionValuePostprocessor
function = fun
scale_factor = 1.0
[]
[]
[Functions/fun]
type = ConstantFunction
value = 1.0
[]
[Executioner]
type = Transient
num_steps = 3
[]
[Controls/receiver]
type = SamplerReceiver
[]
(modules/richards/test/tests/dirac/bh10.i)
# fully-saturated
# production
# with anisotropic and nonsymmetric (!) permeability
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./Seff1VG]
type = RichardsSeff1VG
m = 0.8
al = 1E-5
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0
sum_s_res = 0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E8
[../]
[./borehole_total_outflow_mass]
type = RichardsSumQuantity
[../]
[]
[Variables]
active = 'pressure'
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./p_ic]
type = FunctionIC
variable = pressure
function = initial_pressure
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
variable = pressure
[../]
[]
[DiracKernels]
[./bh]
type = RichardsBorehole
bottom_pressure = 0
point_file = bh02.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pressure
unit_weight = '0 0 0'
character = 1
[../]
[]
[Postprocessors]
[./bh_report]
type = RichardsPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = RichardsMass
variable = pressure
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = RichardsMass
variable = pressure
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
indirect_dependencies = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[./p0]
type = PointValue
variable = pressure
point = '1 1 1'
execute_on = timestep_end
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 1E7
[../]
[./mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = 0
viscosity = 1E-3
mat_porosity = 0.1
mat_permeability = '2E-12 0 0 1E-12 3E-12 0 0 0 1E-12'
density_UO = DensityConstBulk
relperm_UO = RelPermPower
sat_UO = Saturation
seff_UO = Seff1VG
SUPG_UO = SUPGstandard
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = Seff1VG
pressure_vars = pressure
[../]
[]
[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 = 0.5
dt = 1E-2
solve_type = NEWTON
[]
[Outputs]
file_base = bh10
exodus = false
csv = true
execute_on = timestep_end
[]
(modules/porous_flow/test/tests/dirackernels/bh_except08.i)
# PorousFlowPeacemanBorehole exception test
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = 1E7
[]
[]
[Kernels]
[mass0]
type = TimeDerivative
variable = pp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
density0 = 1000
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
at_nodes = false # Needed to force expected error
[]
[]
[DiracKernels]
[bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
point_file = bh02.bh
use_mobility = true
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[]
[]
[Postprocessors]
[bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[]
[fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[]
[fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[]
[zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[]
[p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[]
[]
[Functions]
[mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[]
[]
[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 = 0.5
dt = 1E-2
solve_type = NEWTON
[]
(modules/combined/test/tests/cavity_pressure/additional_volume.i)
#
# Cavity Pressure Test
#
# This test is designed to compute an internal pressure based on
# p = n * R * / (V_cavity / T_cavity + V_add / T_add)
# where
# p is the pressure
# n is the amount of material in the volume (moles)
# R is the universal gas constant
# T_cavity is the temperature in the cavity
# T_add is the temperature of the additional volume
#
# The mesh is composed of one block (1) with an interior cavity of volume 8.
# Block 2 sits in the cavity and has a volume of 1. Thus, the total
# initial volume is 7. An additional volume of 2 is added.
#
# The test adjusts n, T, and V in the following way:
# n => n0 + alpha * t
# T => T0 + beta * t
# V => V_cavity0 + gamma * t + V_add
# with
# alpha = n0
# beta = T0 / 2
# gamma = -(0.003322259...) * V0
# T0 = 240.54443866068704
# V_cavity0 = 7
# V_add = 2
# T_add = 100
# n0 = f(p0)
# p0 = 100
# R = 8.314472 J * K^(-1) * mol^(-1)
#
# An additional volume of 2 with a temperature of 100.0 is included.
#
# So, n0 = p0 * (V_cavity / T_cavity + V_add / T_add) / R
# = 100 * (7 / 240.544439 + 2 / 100) / 8.314472
# = 0.59054
#
# The parameters combined at t = 1 gives p = 249.647.
#
# This test sets the initial temperature to 500, but the CavityPressure
# is told that that initial temperature is T0. Thus, the final solution
# is unchanged.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
file = 3d.e
[]
[GlobalParams]
volumetric_locking_correction = true
[]
[Functions]
[./displ_positive]
type = PiecewiseLinear
x = '0 1'
y = '0 0.0029069767441859684'
[../]
[./displ_negative]
type = PiecewiseLinear
x = '0 1'
y = '0 -0.0029069767441859684'
[../]
[./temp1]
type = PiecewiseLinear
x = '0 1'
y = '1 1.5'
scale_factor = 240.54443866068704
[../]
[./material_input_function]
type = PiecewiseLinear
x = '0 1'
y = '0 0.59054'
[../]
[./additional_volume]
type = ConstantFunction
value = 2
[../]
[./temperature_of_additional_volume]
type = ConstantFunction
value = 100
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./temp]
initial_condition = 500
[../]
[./material_input]
[../]
[]
[AuxVariables]
[./pressure_residual_x]
[../]
[./pressure_residual_y]
[../]
[./pressure_residual_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./TensorMechanics]
use_displaced_mesh = true
[../]
[./heat]
type = Diffusion
variable = temp
use_displaced_mesh = true
[../]
[./material_input_dummy]
type = Diffusion
variable = material_input
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = stress_xx
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = stress_yy
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = stress_zz
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 1
variable = stress_xy
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 2
variable = stress_yz
[../]
[./stress_zx]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 0
variable = stress_zx
[../]
[]
[BCs]
[./no_x_exterior]
type = DirichletBC
variable = disp_x
boundary = '7 8'
value = 0.0
[../]
[./no_y_exterior]
type = DirichletBC
variable = disp_y
boundary = '9 10'
value = 0.0
[../]
[./no_z_exterior]
type = DirichletBC
variable = disp_z
boundary = '11 12'
value = 0.0
[../]
[./prescribed_left]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = displ_positive
[../]
[./prescribed_right]
type = FunctionDirichletBC
variable = disp_x
boundary = 14
function = displ_negative
[../]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '15 16'
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '17 18'
value = 0.0
[../]
[./no_x_interior]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[../]
[./no_y_interior]
type = DirichletBC
variable = disp_y
boundary = '3 4'
value = 0.0
[../]
[./no_z_interior]
type = DirichletBC
variable = disp_z
boundary = '5 6'
value = 0.0
[../]
[./temperatureInterior]
type = FunctionDirichletBC
boundary = 100
function = temp1
variable = temp
[../]
[./MaterialInput]
type = FunctionDirichletBC
boundary = '100 13 14 15 16'
function = material_input_function
variable = material_input
[../]
[./CavityPressure]
[./1]
boundary = 100
initial_pressure = 100
material_input = materialInput
R = 8.314472
temperature = aveTempInterior
initial_temperature = 240.54443866068704
volume = internalVolume
startup_time = 0.5
output = ppress
save_in = 'pressure_residual_x pressure_residual_y pressure_residual_z'
additional_volumes = volume1
temperature_of_additional_volumes = temperature1
[../]
[../]
[]
[Materials]
[./elast_tensor1]
type = ComputeElasticityTensor
C_ijkl = '0 5'
fill_method = symmetric_isotropic
block = 1
[../]
[./strain1]
type = ComputeFiniteStrain
block = 1
[../]
[./stress1]
type = ComputeFiniteStrainElasticStress
block = 1
[../]
[./elast_tensor2]
type = ComputeElasticityTensor
C_ijkl = '0 5'
fill_method = symmetric_isotropic
block = 2
[../]
[./strain2]
type = ComputeFiniteStrain
block = 2
[../]
[./stress2]
type = ComputeFiniteStrainElasticStress
block = 2
[../]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
nl_rel_tol = 1e-12
l_tol = 1e-12
l_max_its = 20
dt = 0.5
end_time = 1.0
snesmf_reuse_base = false
[]
[Postprocessors]
[./internalVolume]
type = InternalVolume
boundary = 100
execute_on = 'initial linear'
[../]
[./aveTempInterior]
type = SideAverageValue
boundary = 100
variable = temp
execute_on = 'initial linear'
[../]
[./materialInput]
type = SideAverageValue
boundary = '7 8 9 10 11 12'
variable = material_input
execute_on = linear
[../]
[./volume1]
type = FunctionValuePostprocessor
function = additional_volume
execute_on = 'initial linear'
[../]
[./temperature1]
type = FunctionValuePostprocessor
function = temperature_of_additional_volume
execute_on = 'initial linear'
[../]
[]
[Outputs]
exodus = true
[]
(modules/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/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/richards/test/tests/gravity_head_2/gh05.i)
# unsaturated = true
# gravity = false
# 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 = RandomIC
min = 0.2
max = 0.8
variable = pwater
[../]
[./gas_ic]
type = RandomIC
min = 1.2
max = 1.8
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((p0-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((p0-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 = '0 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 = gh05
csv = true
[]
(modules/porous_flow/test/tests/dirackernels/pls02reporter.i)
# fully-saturated situation with a poly-line sink with use_mobility=true
# The poly-line consists of 2 points, and has a length
# of 0.5. Each point is weighted with a weight of 0.1
# The PorousFlowPolyLineSink has
# p_or_t_vals = 0 1E7
# fluxes = 0 1
# so that for 0<=porepressure<=1E7
# base flux = porepressure * 1E-6 * mobility (measured in kg.m^-1.s^-1),
# and when multiplied by the poly-line length, and
# the weighting of each point, the mass flux is
# flux = porepressure * 0.5*E-8 * mobility (kg.s^-1).
#
# The fluid and matrix properties are:
# porosity = 0.1
# element volume = 8 m^3
# density = dens0 * exp(P / bulk), with bulk = 2E7
# initial porepressure P0 = 1E7
# viscosity = 0.2
# So, fluid mass = 0.8 * density (kg)
#
# The equation to solve is
# d(Mass)/dt = - porepressure * 0.5*E-8 * density / viscosity
#
# PorousFlow discretises time to conserve mass, so to march
# forward in time, we must solve
# Mass(dt) = Mass(0) - P * 0.5E-8 * density / viscosity * dt
# or
# 0.8 * dens0 * exp(P/bulk) = 0.8 * dens0 * exp(P0/bulk) - P * 0.5E-8 * density / viscosity * dt
# For the numbers written above this gives
# P(t=1) = 6.36947 MPa
# which is given precisely by MOOSE
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = 1E7
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[]
[UserObjects]
[pls_total_outflow_mass]
type = PorousFlowSumQuantity
[]
[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 = 2e7
viscosity = 0.2
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.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[DiracKernels]
[pls]
# This defines a sink that has strength
# f = L(P) * relperm * L_seg
# where
# L(P) is a piecewise-linear function of porepressure
# that is zero at pp=0 and 1 at pp=1E7
# relperm is the relative permeability of the fluid
# L_seg is the line-segment length associated with
# the Dirac points defined in the file pls02.bh
type = PorousFlowPolyLineSink
# Because the Variable for this Sink is pp, and pp is associated
# with the fluid-mass conservation equation, this sink is extracting
# fluid mass (and not heat energy or something else)
variable = pp
# The following specfies that the total fluid mass coming out of
# the porespace via this sink in this timestep should be recorded
# in the pls_total_outflow_mass UserObject
SumQuantityUO = pls_total_outflow_mass
# The following file defines the polyline geometry
# which is just two points in this particular example
weight_reporter='pls02file/w'
x_coord_reporter='pls02file/x'
y_coord_reporter='pls02file/y'
z_coord_reporter='pls02file/z'
# Now define the piecewise-linear function, L
# First, we want L to be a function of porepressure (and not
# temperature or something else). The following means that
# p_or_t_vals should be intepreted by MOOSE as the zeroth-phase
# porepressure
function_of = pressure
fluid_phase = 0
# Second, define the piecewise-linear function, L
# The following means
# flux=0 when pp=0 (and also pp<0)
# flux=1 when pp=1E7 (and also pp>1E7)
# flux=linearly intepolated between pp=0 and pp=1E7
# When flux>0 this means a sink, while flux<0 means a source
p_or_t_vals = '0 1E7'
fluxes = '0 1'
# Finally, in this case we want to always multiply
# L by the fluid mobility (of the zeroth phase) and
# use that in the sink strength instead of the bare L
# computed above
use_mobility = true
[]
[]
[Reporters]
[pls02file]
# contains contents from pls02.bh
type=ConstantReporter
real_vector_names = 'w x y z'
real_vector_values = '0.10 0.10;
0.00 0.00;
0.00 0.00;
-0.25 0.25'
[]
[]
[Postprocessors]
[pls_report]
type = PorousFlowPlotQuantity
uo = pls_total_outflow_mass
[]
[fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[]
[fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[]
[zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
indirect_dependencies = 'fluid_mass1 fluid_mass0 pls_report'
[]
[p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[]
[]
[Functions]
[mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 pls_report'
[]
[]
[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 = 1
dt = 1
solve_type = NEWTON
[]
[Outputs]
exodus = false
csv = true
execute_on = timestep_end
[]
(modules/porous_flow/test/tests/poro_elasticity/mandel_constM.i)
# Mandel's problem of consolodation of a drained medium
#
# A sample is in plane strain.
# -a <= x <= a
# -b <= y <= b
# It is squashed with constant force by impermeable, frictionless plattens on its top and bottom surfaces (at y=+/-b)
# Fluid is allowed to leak out from its sides (at x=+/-a)
# The porepressure within the sample is monitored.
#
# As is common in the literature, this is simulated by
# considering the quarter-sample, 0<=x<=a and 0<=y<=b, with
# impermeable, roller BCs at x=0 and y=0 and y=b.
# Porepressure is fixed at zero on x=a.
# Porepressure and displacement are initialised to zero.
# Then the top (y=b) is moved downwards with prescribed velocity,
# so that the total force that is inducing this downwards velocity
# is fixed. The velocity is worked out by solving Mandel's problem
# analytically, and the total force is monitored in the simulation
# to check that it indeed remains constant.
#
# Here are the problem's parameters, and their values:
# Soil width. a = 1
# Soil height. b = 0.1
# Soil's Lame lambda. la = 0.5
# Soil's Lame mu, which is also the Soil's shear modulus. mu = G = 0.75
# Soil bulk modulus. K = la + 2*mu/3 = 1
# Drained Poisson ratio. nu = (3K - 2G)/(6K + 2G) = 0.2
# Soil bulk compliance. 1/K = 1
# Fluid bulk modulus. Kf = 8
# Fluid bulk compliance. 1/Kf = 0.125
# Soil initial porosity. phi0 = 0.1
# Biot coefficient. alpha = 0.6
# Biot modulus. M = 1/(phi0/Kf + (alpha - phi0)(1 - alpha)/K) = 4.705882
# Undrained bulk modulus. Ku = K + alpha^2*M = 2.694118
# Undrained Poisson ratio. nuu = (3Ku - 2G)/(6Ku + 2G) = 0.372627
# Skempton coefficient. B = alpha*M/Ku = 1.048035
# Fluid mobility (soil permeability/fluid viscosity). k = 1.5
# Consolidation coefficient. c = 2*k*B^2*G*(1-nu)*(1+nuu)^2/9/(1-nuu)/(nuu-nu) = 3.821656
# Normal stress on top. F = 1
#
# The solution for porepressure and displacements is given in
# AHD Cheng and E Detournay "A direct boundary element method for plane strain poroelasticity" International Journal of Numerical and Analytical Methods in Geomechanics 12 (1988) 551-572.
# The solution involves complicated infinite series, so I shall not write it here
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 0.1
zmin = 0
zmax = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.8
alpha = 1e-5
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[]
[BCs]
[roller_xmin]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left'
[]
[roller_ymin]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom'
[]
[plane_strain]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[]
[xmax_drained]
type = DirichletBC
variable = porepressure
value = 0
boundary = right
[]
[top_velocity]
type = FunctionDirichletBC
variable = disp_y
function = top_velocity
boundary = top
[]
[]
[Functions]
[top_velocity]
type = PiecewiseLinear
x = '0 0.002 0.006 0.014 0.03 0.046 0.062 0.078 0.094 0.11 0.126 0.142 0.158 0.174 0.19 0.206 0.222 0.238 0.254 0.27 0.286 0.302 0.318 0.334 0.35 0.366 0.382 0.398 0.414 0.43 0.446 0.462 0.478 0.494 0.51 0.526 0.542 0.558 0.574 0.59 0.606 0.622 0.638 0.654 0.67 0.686 0.702'
y = '-0.041824842 -0.042730269 -0.043412712 -0.04428867 -0.045509181 -0.04645965 -0.047268246 -0.047974749 -0.048597109 -0.0491467 -0.049632388 -0.050061697 -0.050441198 -0.050776675 -0.051073238 -0.0513354 -0.051567152 -0.051772022 -0.051953128 -0.052113227 -0.052254754 -0.052379865 -0.052490464 -0.052588233 -0.052674662 -0.052751065 -0.052818606 -0.052878312 -0.052931093 -0.052977751 -0.053018997 -0.053055459 -0.053087691 -0.053116185 -0.053141373 -0.05316364 -0.053183324 -0.053200724 -0.053216106 -0.053229704 -0.053241725 -0.053252351 -0.053261745 -0.053270049 -0.053277389 -0.053283879 -0.053289615'
[]
[]
[AuxVariables]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[tot_force]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[tot_force]
type = ParsedAux
coupled_variables = 'stress_yy porepressure'
execute_on = timestep_end
variable = tot_force
expression = '-stress_yy+0.6*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 = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.6
variable = disp_x
component = 0
[]
[poro_y]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.6
variable = disp_y
component = 1
[]
[poro_z]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.6
component = 2
variable = disp_z
[]
[poro_vol_exp]
type = PorousFlowMassVolumetricExpansion
variable = porepressure
fluid_component = 0
[]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = porepressure
[]
[flux]
type = PorousFlowAdvectiveFlux
variable = porepressure
gravity = '0 0 0'
fluid_component = 0
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 8
density0 = 1
thermal_expansion = 0
viscosity = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '0.5 0.75'
# bulk modulus is lambda + 2*mu/3 = 0.5 + 2*0.75/3 = 1
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = ComputeLinearElasticStress
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityHMBiotModulus
porosity_zero = 0.1
biot_coefficient = 0.6
solid_bulk = 1
constant_fluid_bulk_modulus = 8
constant_biot_modulus = 4.7058823529
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1.5 0 0 0 1.5 0 0 0 1.5'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[]
[]
[Postprocessors]
[p0]
type = PointValue
outputs = csv
point = '0.0 0 0'
variable = porepressure
[]
[p1]
type = PointValue
outputs = csv
point = '0.1 0 0'
variable = porepressure
[]
[p2]
type = PointValue
outputs = csv
point = '0.2 0 0'
variable = porepressure
[]
[p3]
type = PointValue
outputs = csv
point = '0.3 0 0'
variable = porepressure
[]
[p4]
type = PointValue
outputs = csv
point = '0.4 0 0'
variable = porepressure
[]
[p5]
type = PointValue
outputs = csv
point = '0.5 0 0'
variable = porepressure
[]
[p6]
type = PointValue
outputs = csv
point = '0.6 0 0'
variable = porepressure
[]
[p7]
type = PointValue
outputs = csv
point = '0.7 0 0'
variable = porepressure
[]
[p8]
type = PointValue
outputs = csv
point = '0.8 0 0'
variable = porepressure
[]
[p9]
type = PointValue
outputs = csv
point = '0.9 0 0'
variable = porepressure
[]
[p99]
type = PointValue
outputs = csv
point = '1 0 0'
variable = porepressure
[]
[xdisp]
type = PointValue
outputs = csv
point = '1 0.1 0'
variable = disp_x
[]
[ydisp]
type = PointValue
outputs = csv
point = '1 0.1 0'
variable = disp_y
[]
[total_downwards_force]
type = ElementAverageValue
outputs = csv
variable = tot_force
[]
[dt]
type = FunctionValuePostprocessor
outputs = console
function = if(0.15*t<0.01,0.15*t,0.01)
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'gmres asm lu 1E-14 1E-10 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 0.7
[TimeStepper]
type = PostprocessorDT
postprocessor = dt
dt = 0.001
[]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = mandel_constM
[csv]
time_step_interval = 3
type = CSV
[]
[]
(test/tests/time_integrators/explicit_ssp_runge_kutta/explicit_ssp_runge_kutta.i)
# This test solves the following IVP:
# du/dt = f(u(t), t), u(0) = 1
# f(u(t), t) = -u(t) + t^3 + 3t^2
# The exact solution is the following:
# u(t) = exp(-t) + t^3
[Mesh]
[./mesh]
type = GeneratedMeshGenerator
dim = 1
nx = 1
[../]
[]
[Variables]
[./u]
family = SCALAR
order = FIRST
initial_condition = 1
[../]
[]
[ScalarKernels]
[./time_derivative]
type = ODETimeDerivative
variable = u
[../]
[./source_part1]
type = ParsedODEKernel
variable = u
expression = 'u'
[../]
[./source_part2]
type = PostprocessorSinkScalarKernel
variable = u
postprocessor = sink_pp
[../]
[]
[Functions]
[./sink_fn]
type = ParsedFunction
expression = '-t^3 - 3*t^2'
[../]
[]
[Postprocessors]
[./sink_pp]
type = FunctionValuePostprocessor
function = sink_fn
execute_on = 'LINEAR NONLINEAR'
[../]
[./l2_err]
type = ScalarL2Error
variable = u
function = ${fparse exp(-0.5) + 0.5^3}
[../]
[]
[Executioner]
type = Transient
[./TimeIntegrator]
type = ExplicitSSPRungeKutta
order = 1
[../]
end_time = 0.5
dt = 0.1
[]
[Outputs]
file_base = 'first_order'
[./csv]
type = CSV
show = 'u'
execute_on = 'FINAL'
[../]
[]
(modules/solid_mechanics/test/tests/weak_plane_shear/small_deform3.i)
# apply a number of "random" configurations and
# check that the algorithm returns to the yield surface
#
# must be careful here - we cannot put in arbitrary values of C_ijkl, otherwise the condition
# df/dsigma * C * flow_dirn < 0 for some stresses
# The important features that must be obeyed are:
# 0 = C_0222 = C_1222 (holds for transversely isotropic, for instance)
# C_0212 < C_0202 = C_1212 (holds for transversely isotropic)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[Physics/SolidMechanics/QuasiStatic/all]
strain = FINITE
add_variables = true
[]
[BCs]
[bottomx]
type = DirichletBC
variable = disp_x
boundary = back
value = 0.0
[]
[bottomy]
type = DirichletBC
variable = disp_y
boundary = back
value = 0.0
[]
[bottomz]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
# the following are "random" deformations
# each is O(1E-5) to keep deformations small
[topx]
type = FunctionDirichletBC
variable = disp_x
boundary = front
function = '(sin(0.1*t)+x)/1E5'
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = front
function = '(cos(t)+x*y)/1E5'
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = front
function = 'sin(0.4321*t)*x*y*z/1E5'
[]
[]
[AuxVariables]
[yield_fcn]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[yield_fcn_auxk]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 0
variable = yield_fcn
[]
[]
[Postprocessors]
[yield_fcn_at_zero]
type = PointValue
point = '0 0 0'
variable = yield_fcn
outputs = 'console'
[]
[should_be_zero]
type = FunctionValuePostprocessor
function = should_be_zero_fcn
[]
[]
[Functions]
[should_be_zero_fcn]
type = ParsedFunction
expression = 'if(a<1E-3,0,a)'
symbol_names = 'a'
symbol_values = 'yield_fcn_at_zero'
[]
[]
[UserObjects]
[coh]
type = SolidMechanicsHardeningConstant
value = 1E3
[]
[tanphi]
type = SolidMechanicsHardeningConstant
value = 0.5773503
[]
[tanpsi]
type = SolidMechanicsHardeningConstant
value = 0.08748866
[]
[wps]
type = SolidMechanicsPlasticWeakPlaneShear
cohesion = coh
tan_friction_angle = tanphi
tan_dilation_angle = tanpsi
smoother = 100
yield_function_tolerance = 1E-3
internal_constraint_tolerance = 1E-3
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensor
# the following is transversely isotropic, i think.
fill_method = symmetric9
C_ijkl = '3E9 1E9 3E9 3E9 3E9 6E9 1E9 1E9 9E9'
[]
[mc]
type = ComputeMultiPlasticityStress
plastic_models = wps
transverse_direction = '0 0 1'
max_NR_iterations = 100
ep_plastic_tolerance = 1E-3
debug_fspb = crash
[]
[]
[Executioner]
end_time = 1E4
dt = 1
type = Transient
[]
[Outputs]
csv = true
[]
(modules/porous_flow/test/tests/gravity/grav01c.i)
# Checking that gravity head is established
# 1phase, vanGenuchten, constant fluid-bulk, constant viscosity, constant permeability, Corey relative perm
# unsaturated
# For better agreement with the analytical solution (ana_pp), just increase nx
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = -1
xmax = 0
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[InitialCondition]
type = RandomIC
min = -1
max = 1
[]
[]
[]
[Kernels]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
gravity = '-1 0 0'
[]
[]
[Functions]
[ana_pp]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 2 -1 1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[]
[BCs]
[z]
type = DirichletBC
variable = pp
boundary = right
value = -1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2
density0 = 1
viscosity = 1
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
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 0
[]
[]
[Postprocessors]
[pp_base]
type = PointValue
variable = pp
point = '-1 0 0'
[]
[pp_analytical]
type = FunctionValuePostprocessor
function = ana_pp
point = '-1 0 0'
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Outputs]
execute_on = 'timestep_end'
file_base = grav01c
exodus = true
[csv]
type = CSV
[]
[]
(modules/richards/test/tests/gravity_head_2/gh03.i)
# unsaturated = true
# gravity = false
# supg = true
# transient = false
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmin = 0
xmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[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 = RandomIC
min = 0.4
max = 0.6
variable = pwater
[../]
[./gas_ic]
type = RandomIC
min = 1.4
max = 1.6
variable = pgas
[../]
[]
[Kernels]
active = 'richardsfwater richardsfgas'
[./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
outputs = none # no reason why mass should be conserved
[../]
[./mass_error_gas]
type = FunctionValuePostprocessor
function = fcn_mass_error_g
outputs = none # no reason why mass should be conserved
[../]
[./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((p0-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((p0-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 = '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
[]
[Outputs]
execute_on = 'timestep_end'
file_base = gh03
csv = true
[]
(modules/porous_flow/test/tests/sinks/s08.i)
# apply a sink flux on just one component of a 3-component, 2-phase system and observe the correct behavior
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 2
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pwater frac_ph0_c0 pgas'
number_fluid_phases = 2
number_fluid_components = 3
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1.1
[]
[]
[Variables]
[pwater]
[]
[frac_ph0_c0]
initial_condition = 0.3
[]
[pgas]
[]
[]
[ICs]
[pwater]
type = FunctionIC
variable = pwater
function = y
[]
[pgas]
type = FunctionIC
variable = pgas
function = y+3
[]
[]
[Kernels]
[mass_c0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = frac_ph0_c0
[]
[mass_c1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = pwater
[]
[mass_c2]
type = PorousFlowMassTimeDerivative
fluid_component = 2
variable = pgas
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 2.3
density0 = 1.5
thermal_expansion = 0
viscosity = 2.1
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1.3
density0 = 1.1
thermal_expansion = 0
viscosity = 1.1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = pwater
phase1_porepressure = pgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'frac_ph0_c0 frac_ph0_c1 frac_ph1_c0 frac_ph1_c1'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0.2 0 0 0 0.1 0 0 0 0.1'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 1
[]
[]
[AuxVariables]
[flux_out]
[]
[frac_ph0_c1]
initial_condition = 0.35
[]
[frac_ph1_c0]
initial_condition = 0.1
[]
[frac_ph1_c1]
initial_condition = 0.8
[]
[]
[Functions]
[mass1_00]
type = ParsedFunction
expression = 'fgas*vol*por*dens0gas*exp(pgas/bulkgas)*(1-pow(1+pow(al*(pgas-pwater),1.0/(1-m)),-m))+fwater*vol*por*dens0water*exp(pwater/bulkwater)*(pow(1+pow(al*(pgas-pwater),1.0/(1-m)),-m))'
symbol_names = 'vol por dens0gas pgas pwater bulkgas al m dens0water bulkwater fgas fwater'
symbol_values = '0.25 0.1 1.1 pgas_00 pwater_00 1.3 1.1 0.5 1.5 2.3 frac_ph1_c1_00 frac_ph0_c1_00'
[]
[expected_mass_change1_00]
type = ParsedFunction
expression = 'frac*fcn*area*dt*pow(1-pow(1+pow(al*(pgas-pwater),1.0/(1-m)),-m), 2)'
symbol_names = 'frac fcn area dt pgas pwater al m'
symbol_values = 'frac_ph1_c1_00 100 0.5 1E-3 pgas_00 pwater_00 1.1 0.5'
[]
[mass1_00_expect]
type = ParsedFunction
expression = 'mass_prev-mass_change'
symbol_names = 'mass_prev mass_change'
symbol_values = 'm1_00_prev del_m1_00'
[]
[]
[Postprocessors]
[total_mass_comp0]
type = PorousFlowFluidMass
fluid_component = 0
[]
[total_mass_comp1]
type = PorousFlowFluidMass
fluid_component = 1
[]
[total_mass_comp2]
type = PorousFlowFluidMass
fluid_component = 2
[]
[frac_ph1_c1_00]
type = PointValue
point = '0 0 0'
variable = frac_ph1_c1
execute_on = 'initial timestep_end'
[]
[frac_ph0_c1_00]
type = PointValue
point = '0 0 0'
variable = frac_ph0_c1
execute_on = 'initial timestep_end'
[]
[flux_00]
type = PointValue
point = '0 0 0'
variable = flux_out
execute_on = 'initial timestep_end'
[]
[pgas_00]
type = PointValue
point = '0 0 0'
variable = pgas
execute_on = 'initial timestep_end'
[]
[pwater_00]
type = PointValue
point = '0 0 0'
variable = pwater
execute_on = 'initial timestep_end'
[]
[m1_00]
type = FunctionValuePostprocessor
function = mass1_00
execute_on = 'initial timestep_end'
[]
[m1_00_prev]
type = FunctionValuePostprocessor
function = mass1_00
execute_on = 'timestep_begin'
outputs = 'console'
[]
[del_m1_00]
type = FunctionValuePostprocessor
function = expected_mass_change1_00
execute_on = 'timestep_end'
outputs = 'console'
[]
[m1_00_expect]
type = FunctionValuePostprocessor
function = mass1_00_expect
execute_on = 'timestep_end'
[]
[]
[BCs]
[flux_ph1_c1]
type = PorousFlowSink
boundary = 'left'
variable = pwater # sink applied to the mass_c1 Kernel
use_mobility = false
use_relperm = true
mass_fraction_component = 1
fluid_phase = 1
flux_function = 100
save_in = flux_out
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -snes_max_it -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu 100 NONZERO 2'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E-3
end_time = 0.01
nl_rel_tol = 1E-12
nl_abs_tol = 1E-12
[]
[Outputs]
file_base = s08
exodus = true
[console]
type = Console
execute_on = 'nonlinear linear'
[]
[csv]
type = CSV
execute_on = 'timestep_end'
[]
[]
(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/porous_flow/test/tests/poro_elasticity/terzaghi_basicthm.i)
# Using a BasicTHM action
# Terzaghi's problem of consolodation of a drained medium
# The FullySaturated Kernels are used, with multiply_by_density = false
# so that this becomes a linear problem with constant Biot Modulus
#
# A saturated soil sample sits in a bath of water.
# It is constrained on its sides, and bottom.
# Its sides and bottom are also impermeable.
# Initially it is unstressed.
# A normal stress, q, is applied to the soil's top.
# The soil then slowly compresses as water is squeezed
# out from the sample from its top (the top BC for
# the porepressure is porepressure = 0).
#
# See, for example. Section 2.2 of the online manuscript
# Arnold Verruijt "Theory and Problems of Poroelasticity" Delft University of Technology 2013
# but note that the "sigma" in that paper is the negative
# of the stress in TensorMechanics
#
# Here are the problem's parameters, and their values:
# Soil height. h = 10
# Soil's Lame lambda. la = 2
# Soil's Lame mu, which is also the Soil's shear modulus. mu = 3
# Soil bulk modulus. K = la + 2*mu/3 = 4
# Soil confined compressibility. m = 1/(K + 4mu/3) = 0.125
# Soil bulk compliance. 1/K = 0.25
# Fluid bulk modulus. Kf = 8
# Fluid bulk compliance. 1/Kf = 0.125
# Fluid mobility (soil permeability/fluid viscosity). k = 1.5
# Soil initial porosity. phi0 = 0.1
# Biot coefficient. alpha = 0.6
# Soil initial storativity, which is the reciprocal of the initial Biot modulus. S = phi0/Kf + (alpha - phi0)(1 - alpha)/K = 0.0625
# Consolidation coefficient. c = k/(S + alpha^2 m) = 13.95348837
# Normal stress on top. q = 1
# Initial porepressure, resulting from instantaneous application of q, assuming corresponding instantaneous increase of porepressure (Note that this is calculated by MOOSE: we only need it for the analytical solution). p0 = alpha*m*q/(S + alpha^2 m) = 0.69767442
# Initial vertical displacement (down is positive), resulting from instantaneous application of q (Note this is calculated by MOOSE: we only need it for the analytical solution). uz0 = q*m*h*S/(S + alpha^2 m)
# Final vertical displacement (down in positive) (Note this is calculated by MOOSE: we only need it for the analytical solution). uzinf = q*m*h
#
# The solution for porepressure is
# P = 4*p0/\pi \sum_{k=1}^{\infty} \frac{(-1)^{k-1}}{2k-1} \cos ((2k-1)\pi z/(2h)) \exp(-(2k-1)^2 \pi^2 ct/(4 h^2))
# This series converges very slowly for ct/h^2 small, so in that domain
# P = p0 erf( (1-(z/h))/(2 \sqrt(ct/h^2)) )
#
# The degree of consolidation is defined as
# U = (uz - uz0)/(uzinf - uz0)
# where uz0 and uzinf are defined above, and
# uz = the vertical displacement of the top (down is positive)
# U = 1 - (8/\pi^2)\sum_{k=1}^{\infty} \frac{1}{(2k-1)^2} \exp(-(2k-1)^2 \pi^2 ct/(4 h^2))
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 10
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = 0
zmax = 10
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[basefixed]
type = DirichletBC
variable = disp_z
value = 0
boundary = back
[]
[topdrained]
type = DirichletBC
variable = porepressure
value = 0
boundary = front
[]
[topload]
type = NeumannBC
variable = disp_z
value = -1
boundary = front
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.0
bulk_modulus = 8.0
viscosity = 0.96
density0 = 1.0
[]
[]
[PorousFlowBasicTHM]
coupling_type = HydroMechanical
displacements = 'disp_x disp_y disp_z'
multiply_by_density = false
porepressure = porepressure
biot_coefficient = 0.6
gravity = '0 0 0'
fp = the_simple_fluid
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '2 3'
# bulk modulus is lambda + 2*mu/3 = 2 + 2*3/3 = 4
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = ComputeLinearElasticStress
[]
[porosity]
type = PorousFlowPorosityConst # only the initial value of this is used
porosity = 0.1
[]
[biot_modulus]
type = PorousFlowConstantBiotModulus
biot_coefficient = 0.6
fluid_bulk_modulus = 8
solid_bulk_compliance = 0.25
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1.5 0 0 0 1.5 0 0 0 1.5'
[]
[]
[Postprocessors]
[p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
use_displaced_mesh = false
[]
[p1]
type = PointValue
outputs = csv
point = '0 0 1'
variable = porepressure
use_displaced_mesh = false
[]
[p2]
type = PointValue
outputs = csv
point = '0 0 2'
variable = porepressure
use_displaced_mesh = false
[]
[p3]
type = PointValue
outputs = csv
point = '0 0 3'
variable = porepressure
use_displaced_mesh = false
[]
[p4]
type = PointValue
outputs = csv
point = '0 0 4'
variable = porepressure
use_displaced_mesh = false
[]
[p5]
type = PointValue
outputs = csv
point = '0 0 5'
variable = porepressure
use_displaced_mesh = false
[]
[p6]
type = PointValue
outputs = csv
point = '0 0 6'
variable = porepressure
use_displaced_mesh = false
[]
[p7]
type = PointValue
outputs = csv
point = '0 0 7'
variable = porepressure
use_displaced_mesh = false
[]
[p8]
type = PointValue
outputs = csv
point = '0 0 8'
variable = porepressure
use_displaced_mesh = false
[]
[p9]
type = PointValue
outputs = csv
point = '0 0 9'
variable = porepressure
use_displaced_mesh = false
[]
[p99]
type = PointValue
outputs = csv
point = '0 0 10'
variable = porepressure
use_displaced_mesh = false
[]
[zdisp]
type = PointValue
outputs = csv
point = '0 0 10'
variable = disp_z
use_displaced_mesh = false
[]
[dt]
type = FunctionValuePostprocessor
outputs = console
function = if(0.5*t<0.1,0.5*t,0.1)
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
[TimeStepper]
type = PostprocessorDT
postprocessor = dt
dt = 0.0001
[]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = terzaghi_basicthm
[csv]
type = CSV
[]
[]
(modules/richards/test/tests/gravity_head_2/gh04.i)
# unsaturated = true
# gravity = true
# supg = true
# transient = false
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmin = 0
xmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[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]
# get nonconvergence if initial condition is too crazy
[./water_ic]
type = FunctionIC
function = '1-x/2'
variable = pwater
[../]
[./gas_ic]
type = FunctionIC
function = '4-x/5'
variable = pgas
[../]
[]
[Kernels]
active = 'richardsfwater richardsfgas'
[./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]
[./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_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 -sub_pc_type -sub_pc_factor_shift_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'gmres asm lu NONZERO 1E-10 1E-10 10000'
[../]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Outputs]
execute_on = 'timestep_end'
file_base = gh04
csv = true
[]
(modules/porous_flow/test/tests/hysteresis/2phasePP.i)
# Simple example of a 2-phase situation with hysteretic capillary pressure. Gas is added to and removed from the system in order to observe the hysteresis
# All liquid water exists in component 0
# All gas exists in component 1
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
number_fluid_phases = 2
number_fluid_components = 2
porous_flow_vars = 'pp0 pp1'
[]
[]
[Variables]
[pp0]
initial_condition = 0
[]
[pp1]
initial_condition = 1E-4
[]
[]
[Kernels]
[mass_conservation0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp0
[]
[mass_conservation1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = pp1
[]
[]
[DiracKernels]
[pump]
type = PorousFlowPointSourceFromPostprocessor
mass_flux = flux
point = '0.5 0 0'
variable = pp1
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[sat0]
family = MONOMIAL
order = CONSTANT
[]
[sat1]
family = MONOMIAL
order = CONSTANT
[]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[sat0]
type = PorousFlowPropertyAux
variable = sat0
phase = 0
property = saturation
[]
[sat1]
type = PorousFlowPropertyAux
variable = sat1
phase = 1
property = saturation
[]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[]
[FluidProperties]
[simple_fluid] # same properties used for both phases
type = SimpleFluidProperties
bulk_modulus = 10 # so pumping does not result in excessive porepressure
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[temperature]
type = PorousFlowTemperature
temperature = 20
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 1
[]
[hys_order_material]
type = PorousFlowHysteresisOrder
[]
[pc_calculator]
type = PorousFlow2PhaseHysPP
alpha_d = 10.0
alpha_w = 7.0
n_d = 1.5
n_w = 1.9
S_l_min = 0.1
S_lr = 0.2
S_gr_max = 0.3
Pc_max = 12.0
high_ratio = 0.9
low_extension_type = quadratic
high_extension_type = power
phase0_porepressure = pp0
phase1_porepressure = pp1
[]
[]
[Postprocessors]
[flux]
type = FunctionValuePostprocessor
function = 'if(t <= 9, 10, -10)'
[]
[hys_order]
type = PointValue
point = '0 0 0'
variable = hys_order
[]
[sat0]
type = PointValue
point = '0 0 0'
variable = sat0
[]
[sat1]
type = PointValue
point = '0 0 0'
variable = sat1
[]
[pp0]
type = PointValue
point = '0 0 0'
variable = pp0
[]
[pp1]
type = PointValue
point = '0 0 0'
variable = pp1
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = ' lu NONZERO'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.5
end_time = 18
nl_abs_tol = 1E-10
[]
[Outputs]
csv = true
[]
(modules/porous_flow/test/tests/gravity/fully_saturated_grav01b.i)
# Checking that gravity head is established
# 1phase, constant and large fluid-bulk, constant viscosity, constant permeability
# fully saturated with fully-saturated Kernel
# For better agreement with the analytical solution (ana_pp), just increase nx
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = -1
xmax = 0
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[InitialCondition]
type = RandomIC
min = 0
max = 1
[]
[]
[]
[Kernels]
[flux0]
type = PorousFlowFullySaturatedDarcyBase
variable = pp
gravity = '-1 0 0'
[]
[]
[Functions]
[ana_pp]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 1E3 0 1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[]
[BCs]
[z]
type = DirichletBC
variable = pp
boundary = right
value = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1e3
density0 = 1
viscosity = 1
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[]
[Postprocessors]
[pp_base]
type = PointValue
variable = pp
point = '-1 0 0'
[]
[pp_analytical]
type = FunctionValuePostprocessor
function = ana_pp
point = '-1 0 0'
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Outputs]
execute_on = 'timestep_end'
file_base = fully_saturated_grav01b
[csv]
type = CSV
[]
[]
(test/tests/functions/piecewise_linear_from_vectorpostprocessor/vector_postprocessor_function.i)
# This function linearly interpolates the data generated by a vector post
# processor. The purpose is to have a function take points and a field variable
# (aux or primary) as arguments.
# It also uses a ConstantVectorPostprocessor to test that parallel syncing is
# working for VectorPostprocessorFunction.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 4
xmin = 0.0
xmax = 0.004
ymin = 0.0
ymax = 0.008
[]
[Variables]
[u]
initial_condition = 0
[]
[]
[AuxVariables]
[v]
initial_condition = 1
[]
[test_parallel]
[]
[]
[Functions]
[ramp_u]
type = ParsedFunction
expression = 't'
[]
[point_value_function_u]
type = VectorPostprocessorFunction
component = y
argument_column = y
value_column = u
vectorpostprocessor_name = point_value_vector_postprocessor_u
[]
[line_value_function_v]
type = VectorPostprocessorFunction
component = y
argument_column = y
value_column = v
vectorpostprocessor_name = line_value_vector_postprocessor_v
[]
[test_parallel_func]
type = VectorPostprocessorFunction
component = x
argument_column = xx
value_column = qq
vectorpostprocessor_name = test_parallel_vpp
[]
[function_v]
type = PiecewiseLinear
x = '0 0.008'
y = '1 2'
axis = y
[]
[]
[Kernels]
[diffusion_u]
type = Diffusion
variable = u
[]
[]
[AuxKernels]
[aux_v]
type = FunctionAux
variable = v
function = function_v
execute_on = 'TIMESTEP_BEGIN'
[]
[test_parallel]
type = FunctionAux
variable = test_parallel
function = test_parallel_func
execute_on = 'TIMESTEP_END'
[]
[]
[BCs]
[top_u]
type = FunctionDirichletBC
boundary = top
variable = u
function = ramp_u
[]
[bottom_u]
type = DirichletBC
boundary = bottom
variable = u
value = 0
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -ksp_gmres_restart'
petsc_options_value = ' lu superlu_dist 51'
line_search = 'none'
l_max_its = 50
l_tol = 1e-3
nl_max_its = 20
nl_rel_tol = 1e-4
nl_abs_tol = 1e-6
start_time = 0
num_steps = 1
dt = 1
[]
[Postprocessors]
[point_value_postprocessor_u]
type = FunctionValuePostprocessor
function = point_value_function_u
point = '0.002 0.004 0'
[]
[line_value_postprocessor_v]
type = FunctionValuePostprocessor
function = line_value_function_v
point = '0.002 0.004 0'
[]
[postprocessor_average_u]
type = ElementAverageValue
variable = u
[]
[postprocessor_average_v]
type = ElementAverageValue
variable = v
[]
[]
[VectorPostprocessors]
[point_value_vector_postprocessor_u]
type = PointValueSampler
variable = u
points = '0 0.001 0 0 0.004 0 0 0.008 0'
#points = '0.001 0 0 0.002 0 0'
sort_by = y
execute_on = linear
[]
[line_value_vector_postprocessor_v]
type = LineValueSampler
variable = v
start_point = '0 0.001 0'
end_point = '0 0.008 0'
num_points = 5
sort_by = y
execute_on = linear
[]
[test_parallel_vpp]
type = ConstantVectorPostprocessor
vector_names = 'xx qq'
value = '0 1;
1000 1000'
execute_on = 'initial timestep_begin'
[]
[]
[Outputs]
time_step_interval = 1
csv = false
exodus = true
file_base = out
[console]
type = Console
output_linear = true
max_rows = 10
[]
[]
(modules/thermal_hydraulics/test/tests/controls/set_component_real_value_control/test.i)
# This is testing that the values set by SetComponentRealValueControl are used.
# Function T0_fn prescribes values for T0 at inlet. We output the function
# values via a postprocessor `T_fn` and the inlet values via another
# postprocessor `T_ctrl`. Those two values have to be equal.
[GlobalParams]
initial_p = 100.e3
initial_vel = 1.0
initial_T = 350.
scaling_factor_1phase = '1 1e-2 1e-4'
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
fp = fp
position = '0 0 0'
orientation = '1 0 0'
length = 15.0
n_elems = 10
A = 0.01
D_h = 0.1
f = 0.01
[]
[inlet]
type = InletStagnationPressureTemperature1Phase
input = 'pipe1:in'
p0 = 100.e3
T0 = 350.
[]
[outlet]
type = Outlet1Phase
input = 'pipe1:out'
p = 100.0e3
[]
[]
[Functions]
[T0_fn]
type = PiecewiseLinear
x = '0 1'
y = '350 345'
[]
[]
[ControlLogic]
[T_inlet_fn]
type = GetFunctionValueControl
function = T0_fn
[]
[set_inlet_value]
type = SetComponentRealValueControl
component = inlet
parameter = T0
value = T_inlet_fn:value
[]
[]
[Postprocessors]
[T_fn]
type = FunctionValuePostprocessor
function = T0_fn
[]
[T_ctrl]
type = RealComponentParameterValuePostprocessor
component = inlet
parameter = T0
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
dt = 0.1
abort_on_solve_fail = true
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
nl_max_its = 20
l_tol = 1e-3
l_max_its = 5
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
start_time = 0.0
end_time = 1
[]
[Outputs]
csv = true
[]
(modules/richards/test/tests/sinks/s01.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[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 PETScs 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]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_pressure
[../]
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 2
[../]
[./mass_bal_fcn]
type = ParsedFunction
expression = abs((mi-lfout-rfout-mf)/2/(mi+mf))
symbol_names = 'mi mf lfout rfout'
symbol_values = 'mass_init mass_fin left_flux_out right_flux_out'
[../]
[]
[Postprocessors]
[./mass_init]
type = RichardsMass
variable = pressure
execute_on = timestep_begin
[../]
[./mass_fin]
type = RichardsMass
variable = pressure
execute_on = timestep_end
[../]
[./left_flux_out]
type = RichardsPiecewiseLinearSinkFlux
boundary = left
variable = pressure
pressures = '0 1'
bare_fluxes = '1 2'
use_mobility = false
use_relperm = false
[../]
[./right_flux_out]
type = RichardsPiecewiseLinearSinkFlux
boundary = right
variable = pressure
pressures = '0 1'
bare_fluxes = '1 2'
use_mobility = false
use_relperm = false
[../]
[./p0]
type = PointValue
point = '0 0 0'
variable = pressure
[../]
[./mass_bal]
type = FunctionValuePostprocessor
function = mass_bal_fcn
[../]
[]
[BCs]
[./left_flux]
type = RichardsPiecewiseLinearSink
boundary = left
pressures = '0 1'
bare_fluxes = '1 2'
variable = pressure
use_mobility = false
use_relperm = false
[../]
[./right_flux]
type = RichardsPiecewiseLinearSink
boundary = right
pressures = '0 1'
bare_fluxes = '1 2'
variable = pressure
use_mobility = false
use_relperm = false
[../]
[]
[Kernels]
active = 'richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[]
[AuxVariables]
[./one]
initial_condition = 1
[../]
[]
[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 = DensityConstBulk
relperm_UO = RelPermPower
SUPG_UO = SUPGstandard
sat_UO = Saturation
seff_UO = SeffVG
viscosity = 1E-3
gravity = '-1 0 0'
linear_shape_fcns = true
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 2E-3
end_time = 0.2
nl_rel_tol = 1E-12
nl_abs_tol = 1E-12
[]
[Outputs]
file_base = s01
csv = true
execute_on = timestep_end
[]
(modules/richards/test/tests/dirac/bh04.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
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1E-2 1E-1 1 1E1 1E2 1E3'
x = '0 1E-1 1 1E1 1E2 1E3'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./Seff1VG]
type = RichardsSeff1VG
m = 0.8
al = 1E-5
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0
sum_s_res = 0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E8
[../]
[./borehole_total_outflow_mass]
type = RichardsSumQuantity
[../]
[]
[Variables]
active = 'pressure'
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./p_ic]
type = FunctionIC
variable = pressure
function = initial_pressure
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
variable = pressure
[../]
[]
[DiracKernels]
[./bh]
type = RichardsBorehole
bottom_pressure = -1E6
point_file = bh02.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pressure
unit_weight = '0 0 0'
character = 1
[../]
[]
[Postprocessors]
[./bh_report]
type = RichardsPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = RichardsMass
variable = pressure
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = RichardsMass
variable = pressure
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
indirect_dependencies = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[./p0]
type = PointValue
variable = pressure
point = '1 1 1'
execute_on = timestep_end
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 0
[../]
[./mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = 0
viscosity = 1E-3
mat_porosity = 0.1
mat_permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
density_UO = DensityConstBulk
relperm_UO = RelPermPower
sat_UO = Saturation
seff_UO = Seff1VG
SUPG_UO = SUPGstandard
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = Seff1VG
pressure_vars = pressure
[../]
[]
[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 = bh04
exodus = false
csv = true
execute_on = timestep_end
[]
(modules/porous_flow/test/tests/dirackernels/bh_except12.i)
# PorousFlowPeacemanBorehole exception test
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = 1E7
[]
[]
[Kernels]
[mass0]
type = TimeDerivative
variable = pp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
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.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[]
[DiracKernels]
[bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
point_file = does_not_exist
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[]
[]
[Postprocessors]
[bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[]
[fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[]
[fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[]
[zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[]
[p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[]
[]
[Functions]
[mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[]
[]
[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 = 0.5
dt = 1E-2
solve_type = NEWTON
[]
(modules/porous_flow/test/tests/gravity/grav01c_action.i)
# Checking that gravity head is established
# using the Unsaturated Action
# For better agreement with the analytical solution (ana_pp), just increase nx
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = -1
xmax = 0
[]
[GlobalParams]
PorousFlowDictator = dictator
block = 0
[]
[Variables]
[pp]
[InitialCondition]
type = RandomIC
min = -1
max = 1
[]
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.0
bulk_modulus = 2.0
viscosity = 1.0
density0 = 1.0
[]
[]
[PorousFlowUnsaturated]
add_saturation_aux = false
add_darcy_aux = false
porepressure = pp
gravity = '-1 0 0'
fp = the_simple_fluid
van_genuchten_alpha = 1.0
van_genuchten_m = 0.5
relative_permeability_type = Corey
relative_permeability_exponent = 1.0
[]
[Functions]
[ana_pp]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 2 -1 1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[]
[BCs]
[z]
type = DirichletBC
variable = pp
boundary = right
value = -1
[]
[]
[Materials]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[]
[Postprocessors]
[pp_base]
type = PointValue
variable = pp
point = '-1 0 0'
[]
[pp_analytical]
type = FunctionValuePostprocessor
function = ana_pp
point = '-1 0 0'
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Outputs]
execute_on = 'timestep_end'
file_base = grav01c_action
exodus = true
[csv]
type = CSV
[]
[]
(modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/lps_dual.i)
# This test provides an example of combining two LPS viscoplasticity models with different stress
# exponents.
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmax = 0.002
ymax = 0.002
[]
[Variables]
[./temp]
initial_condition = 1000
[../]
[]
[Kernels]
[./dt]
type = ADTimeDerivative
variable = temp
[../]
[./diff]
type = ADDiffusion
variable = temp
[../]
[]
[Physics/SolidMechanics/QuasiStatic/All]
strain = FINITE
add_variables = true
generate_output = 'strain_xx strain_yy strain_xy hydrostatic_stress vonmises_stress'
use_automatic_differentiation = true
[]
[Functions]
[./pull]
type = PiecewiseLinear
x = '0 0.1'
y = '0 1e-5'
[../]
[./tot_effective_viscoplasticity]
type = ParsedFunction
symbol_values = 'lps_1_eff_creep_strain lps_3_eff_creep_strain'
symbol_names = 'lps_1_eff_creep_strain lps_3_eff_creep_strain'
expression = 'lps_1_eff_creep_strain+lps_3_eff_creep_strain'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.3
[../]
[./stress]
type = ADComputeMultipleInelasticStress
inelastic_models = 'one two'
outputs = all
[../]
[./porosity]
type = ADPorosityFromStrain
initial_porosity = 0.1
inelastic_strain = 'combined_inelastic_strain'
outputs = 'all'
[../]
[./one]
type = ADViscoplasticityStressUpdate
coefficient = 'coef_3'
power = 3
base_name = 'lps_1'
outputs = all
relative_tolerance = 1e-11
[../]
[./two]
type = ADViscoplasticityStressUpdate
coefficient = 1e-10
power = 1
base_name = 'lps_3'
outputs = all
relative_tolerance = 1e-11
[../]
[./coef]
type = ADParsedMaterial
property_name = coef_3
# Example of creep power law
coupled_variables = temp
expression = '0.5e-18 * exp(-4e4 / 1.987 / temp)'
[../]
[]
[BCs]
[./no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./pull_disp_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = top
function = pull
[../]
[./temp_ramp]
type = ADFunctionDirichletBC
boundary = right
function = '1000 + 400 * t / 0.12'
variable = temp
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 0.01
end_time = 0.12
[]
[Postprocessors]
[./disp_x]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./disp_y]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
[../]
[./dt]
type = TimestepSize
[../]
[./num_lin]
type = NumLinearIterations
outputs = console
[../]
[./num_nonlin]
type = NumNonlinearIterations
outputs = console
[../]
[./lps_1_eff_creep_strain]
type = ElementAverageValue
variable = lps_1_effective_viscoplasticity
[../]
[./lps_3_eff_creep_strain]
type = ElementAverageValue
variable = lps_3_effective_viscoplasticity
[../]
[./lps_1_gauge_stress]
type = ElementAverageValue
variable = lps_1_gauge_stress
[../]
[./lps_3_gauge_stress]
type = ElementAverageValue
variable = lps_3_gauge_stress
[../]
[./eff_creep_strain_tot]
type = FunctionValuePostprocessor
function = tot_effective_viscoplasticity
[../]
[./porosity]
type = ElementAverageValue
variable = porosity
[../]
[]
[Outputs]
csv = true
[]
(modules/fluid_properties/test/tests/functions/saturation_temperature_function/saturation_temperature_function.i)
# TestTwoPhaseFluidProperties has the following saturation temperature function:
# T_sat(p) = 2 p
# Thus for p = 5, T_sat should be 10.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[FluidProperties]
[./fp_liquid]
type = IdealGasFluidProperties
[../]
[./fp_vapor]
type = IdealGasFluidProperties
[../]
[./fp_2phase]
type = TestTwoPhaseFluidProperties
fp_liquid = fp_liquid
fp_vapor = fp_vapor
[../]
[]
[Functions]
[./p]
type = ConstantFunction
value = 5
[../]
[./T_sat]
type = SaturationTemperatureFunction
p = p
fp_2phase = fp_2phase
[../]
[]
[Postprocessors]
[./T_sat_pp]
type = FunctionValuePostprocessor
function = T_sat
execute_on = 'INITIAL'
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/userobjects/postprocessor_spatial_user_object/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -0.01
xmax = 0.01
[]
[Functions]
[./fn]
type = ParsedFunction
expression = 'if(a < 0.8625, 1, 0)'
symbol_names = 'a'
symbol_values = 'a_avg'
[../]
[]
[Variables]
[./u]
family = MONOMIAL
order = CONSTANT
[../]
[]
[AuxVariables]
[./a]
family = MONOMIAL
order = CONSTANT
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./rhs]
type = BodyForce
variable = u
function = 1
[../]
[]
[Postprocessors]
[./fn_pps]
type = FunctionValuePostprocessor
function = fn
execute_on = 'initial timestep_end'
[../]
[./a_avg]
type = ElementAverageValue
variable = a
[../]
[]
[UserObjects]
[./fn_uo]
type = PostprocessorSpatialUserObject
postprocessor = fn_pps
[../]
[]
[Executioner]
type = Transient
dt = 0.1
[]
(modules/stochastic_tools/test/tests/reporters/stochastic_matrix/sub.i)
[StochasticTools]
[]
[Functions]
[afun]
type = ConstantFunction
value = 11
[]
[bfun]
type = ConstantFunction
value = 22
[]
[cfun]
type = ConstantFunction
value = 33
[]
[dfun]
type = ConstantFunction
value = 44
[]
[fun]
type = ParsedFunction
value = 'a*1000000 + b*10000 + c*100 + d'
vars = 'a b c d'
vals = 'afun bfun cfun dfun'
[]
[]
[Postprocessors/val]
type = FunctionValuePostprocessor
function = fun
[]
[Controls/receiver]
type = SamplerReceiver
[]
[Outputs]
console = false
[]
(test/tests/functions/parsed/combined.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -1
xmax = 1
nx = 20
[]
[AuxVariables]
[./f]
[../]
[./sv]
family = SCALAR
order = FIRST
initial_condition = 100
[../]
[]
[AuxKernels]
[./function_aux]
type = FunctionAux
variable = f
function = fn
[../]
[]
[Functions]
[./pp_fn]
type = ParsedFunction
expression = '2*(t+1)'
[../]
[./cos_fn]
type = ParsedFunction
expression = 'cos(pi*x)'
[../]
[./fn]
type = ParsedFunction
expression = 'scalar_expression * func / pp'
symbol_names = 'scalar_expression func pp'
symbol_values = 'sv cos_fn pp'
[../]
[]
[Postprocessors]
[./pp]
type = FunctionValuePostprocessor
function = pp_fn
execute_on = initial
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
show = f
exodus = true
execute_on = final
[]
(modules/porous_flow/test/tests/gravity/grav02b.i)
# Checking that gravity head is established in the steady-state situation when 0<saturation<1 (note the strictly less-than).
# 2phase (PP), 2components, vanGenuchten, constant fluid bulk-moduli for each phase, constant viscosity, constant permeability, Corey relative perm
# For better agreement with the analytical solution (ana_pp), just increase nx
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = -1
xmax = 0
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
initial_condition = -1.0
[]
[ppgas]
initial_condition = 0
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[]
[Kernels]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = ppwater
gravity = '-1 0 0'
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = ppgas
gravity = '-1 0 0'
[]
[]
[BCs]
[ppwater]
type = DirichletBC
boundary = right
variable = ppwater
value = -1
[]
[ppgas]
type = DirichletBC
boundary = right
variable = ppgas
value = 0
[]
[]
[Functions]
[ana_ppwater]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 2 pp_water_top 1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[ana_ppgas]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 1 pp_gas_top 0.1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 2
density0 = 1
viscosity = 1
thermal_expansion = 0
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 0.1
viscosity = 0.5
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
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
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 0
[]
[relperm_gas]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 1
[]
[]
[Postprocessors]
[pp_water_top]
type = PointValue
variable = ppwater
point = '0 0 0'
[]
[pp_water_base]
type = PointValue
variable = ppwater
point = '-1 0 0'
[]
[pp_water_analytical]
type = FunctionValuePostprocessor
function = ana_ppwater
point = '-1 0 0'
[]
[pp_gas_top]
type = PointValue
variable = ppgas
point = '0 0 0'
[]
[pp_gas_base]
type = PointValue
variable = ppgas
point = '-1 0 0'
[]
[pp_gas_analytical]
type = FunctionValuePostprocessor
function = ana_ppgas
point = '-1 0 0'
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Outputs]
file_base = grav02b
[csv]
type = CSV
[]
exodus = false
[]
(modules/solid_mechanics/test/tests/drucker_prager/random_hyperbolic.i)
# drucker-prager hyperbolic.
# apply many random large deformations, checking that the algorithm returns correctly to
# the yield surface each time.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 100
ny = 125
nz = 1
xmin = 0
xmax = 100
ymin = 0
ymax = 125
zmin = 0
zmax = 1
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[]
[ICs]
[./x]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_x
[../]
[./y]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_y
[../]
[./z]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_z
[../]
[]
[BCs]
[./x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'front back'
function = '0'
[../]
[./y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'front back'
function = '0'
[../]
[./z]
type = FunctionDirichletBC
variable = disp_z
boundary = 'front back'
function = '0'
[../]
[]
[AuxVariables]
[./yield_fcn]
order = CONSTANT
family = MONOMIAL
[../]
[./iter]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./yield_fcn_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_yield_function
variable = yield_fcn
[../]
[./iter]
type = MaterialRealAux
property = plastic_NR_iterations
variable = iter
[../]
[]
[Postprocessors]
[./yield_fcn_at_zero]
type = PointValue
point = '0 0 0'
variable = yield_fcn
outputs = 'console'
[../]
[./should_be_zero]
type = FunctionValuePostprocessor
function = should_be_zero_fcn
[../]
[./av_iter]
type = ElementAverageValue
variable = iter
outputs = 'console'
[../]
[]
[Functions]
[./should_be_zero_fcn]
type = ParsedFunction
expression = 'if(a<1E-3,0,a)'
symbol_names = 'a'
symbol_values = 'yield_fcn_at_zero'
[../]
[]
[UserObjects]
[./mc_coh]
type = SolidMechanicsHardeningConstant
value = 1E3
[../]
[./mc_phi]
type = SolidMechanicsHardeningConstant
value = 30
convert_to_radians = true
[../]
[./mc_psi]
type = SolidMechanicsHardeningConstant
value = 5
convert_to_radians = true
[../]
[./dp]
type = SolidMechanicsPlasticDruckerPragerHyperbolic
mc_cohesion = mc_coh
mc_friction_angle = mc_phi
mc_dilation_angle = mc_psi
smoother = 0.1E3
yield_function_tolerance = 1E-3
internal_constraint_tolerance = 1E-6
use_custom_returnMap = true
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
fill_method = symmetric_isotropic
C_ijkl = '0.7E7 1E7'
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./dp]
type = ComputeMultiPlasticityStress
block = 0
max_NR_iterations = 1000
ep_plastic_tolerance = 1E-6
min_stepsize = 1E-3
plastic_models = dp
debug_fspb = crash
deactivation_scheme = safe
[../]
[]
[Executioner]
end_time = 1
dt = 1
type = Transient
[]
[Outputs]
file_base = random_hyperbolic
exodus = false
[./csv]
type = CSV
[../]
[]
(modules/richards/test/tests/gravity_head_2/gh_fu_02.i)
# unsaturated = true
# gravity = true
# supg = false
# transient = false
[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'
[]
[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]
# get nonconvergence if initial condition is too crazy
[./water_ic]
type = FunctionIC
function = pwater_initial
variable = pwater
[../]
[./gas_ic]
type = FunctionIC
function = pgas_initial
variable = pgas
[../]
[]
[Kernels]
active = 'richardsfwater richardsfgas'
[./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
outputs = none # no reason why mass should be conserved
[../]
[./mass_error_gas]
type = FunctionValuePostprocessor
function = fcn_mass_error_g
outputs = none # no reason why mass should be conserved
[../]
[./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]
[./pwater_initial]
type = ParsedFunction
expression = 1-x/2
[../]
[./pgas_initial]
type = ParsedFunction
expression = 2-x/5
[../]
[./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 -sub_pc_type -sub_pc_factor_shift_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'gmres asm lu NONZERO 1E-10 1E-10 10000'
[../]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Outputs]
execute_on = 'timestep_end'
file_base = gh_fu_02
csv = true
[]
(modules/thermal_hydraulics/test/tests/problems/brayton_cycle/recuperated_brayton_cycle.i)
# This input file models an open, recuperated Brayton cycle with a PID
# controlled start up using a coupled motor.
#
# Heat is supplied to the system by a volumetric heat source, and a second heat
# source is used to model a recuperator. The recuperator transfers heat from the
# turbine exhaust gas to the compressor outlet gas.
#
# Initially the fluid and heat structures are at rest at ambient conditions,
# and the shaft speed is zero.
# The transient is controlled as follows:
# * 0 - 2000 s: Motor increases shaft speed to approx. 85,000 RPM by PID control
# * 1000 - 8600 s: Power in main heat source increases from 0 - 104 kW
# * 2000 - 200000 s: Torque supplied by turbine increases to steady state level
# as working fluid temperature increases. Torque supplied by
# the motor is ramped down to 0 N-m transitioning shaft control
# to the turbine at its rated speed of 96,000 RPM.
I_motor = 1.0
I_generator = 1.0
generator_torque_per_shaft_speed = -0.00025
motor_ramp_up_duration = 3605
motor_ramp_down_duration = 1800
post_motor_time = 2160000
t1 = ${motor_ramp_up_duration}
t2 = ${fparse t1 + motor_ramp_down_duration}
t3 = ${fparse t2 + post_motor_time}
D1 = 0.15
D2 = ${D1}
D3 = ${D1}
D4 = ${D1}
D5 = ${D1}
D6 = ${D1}
D7 = ${D1}
D8 = ${D1}
A1 = ${fparse 0.25 * pi * D1^2}
A2 = ${fparse 0.25 * pi * D2^2}
A3 = ${fparse 0.25 * pi * D3^2}
A4 = ${fparse 0.25 * pi * D4^2}
A5 = ${fparse 0.25 * pi * D5^2}
A6 = ${fparse 0.25 * pi * D6^2}
A7 = ${fparse 0.25 * pi * D7^2}
A8 = ${fparse 0.25 * pi * D8^2}
recuperator_width = 0.15
L1 = 5.0
L2 = ${L1}
L3 = ${fparse 2 * L1}
L4 = ${fparse 2 * L1}
L5 = ${L1}
L6 = ${L1}
L7 = ${fparse L1 + recuperator_width}
L8 = ${L1}
x1 = 0.0
x2 = ${fparse x1 + L1}
x3 = ${fparse x2 + L2}
x4 = ${x3}
x5 = ${fparse x4 - L4}
x6 = ${x5}
x7 = ${fparse x6 + L6}
x8 = ${fparse x7 + L7}
y1 = 0
y2 = ${y1}
y3 = ${y2}
y4 = ${fparse y3 - L3}
y5 = ${y4}
y6 = ${fparse y5 + L5}
y7 = ${y6}
y8 = ${y7}
x1_out = ${fparse x1 + L1 - 0.001}
x2_in = ${fparse x2 + 0.001}
y5_in = ${fparse y5 + 0.001}
x6_out = ${fparse x6 + L6 - 0.001}
x7_in = ${fparse x7 + 0.001}
y8_in = ${fparse y8 + 0.001}
y8_out = ${fparse y8 + L8 - 0.001}
hot_leg_in = ${y8_in}
hot_leg_out = ${y8_out}
cold_leg_in = ${fparse y3 - 0.001}
cold_leg_out = ${fparse y3 - (L3/2) - 0.001}
n_elems1 = 5
n_elems2 = ${n_elems1}
n_elems3 = ${fparse 2 * n_elems1}
n_elems4 = ${fparse 2 * n_elems1}
n_elems5 = ${n_elems1}
n_elems6 = ${n_elems1}
n_elems7 = ${n_elems1}
n_elems8 = ${n_elems1}
A_ref_comp = ${fparse 0.5 * (A1 + A2)}
V_comp = ${fparse A_ref_comp * 1.0}
I_comp = 1.0
A_ref_turb = ${fparse 0.5 * (A4 + A5)}
V_turb = ${fparse A_ref_turb * 1.0}
I_turb = 1.0
c0_rated_comp = 351.6925137
rho0_rated_comp = 1.146881112
rated_mfr = 0.25
speed_rated_rpm = 96000
speed_rated = ${fparse speed_rated_rpm * 2 * pi / 60.0}
speed_initial = 0
eff_comp = 0.79
eff_turb = 0.843
T_ambient = 300
p_ambient = 1e5
hs_power = 105750
[GlobalParams]
gravity_vector = '0 0 0'
initial_p = ${p_ambient}
initial_T = ${T_ambient}
initial_vel = 0
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
fp = fp_air
closures = closures
f = 0
scaling_factor_1phase = '1 1 1e-5'
scaling_factor_rhoV = 1
scaling_factor_rhouV = 1e-2
scaling_factor_rhovV = 1e-2
scaling_factor_rhowV = 1e-2
scaling_factor_rhoEV = 1e-5
scaling_factor_temperature = 1e-2
rdg_slope_reconstruction = none
[]
[FluidProperties]
[fp_air]
type = IdealGasFluidProperties
emit_on_nan = none
[]
[]
[SolidProperties]
[steel]
type = ThermalFunctionSolidProperties
rho = 8050
k = 45
cp = 466
[]
[]
[Closures]
[closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
##########################
# Motor
##########################
# Functions for control logic that determines when to shut off the PID system
[is_tripped_fn]
type = ParsedFunction
symbol_names = 'motor_torque turbine_torque'
symbol_values = 'motor_torque turbine_torque'
expression = 'turbine_torque > motor_torque'
[]
[PID_tripped_constant_value]
type = ConstantFunction
value = 1
[]
[PID_tripped_status_fn]
type = ParsedFunction
symbol_values = 'PID_trip_status'
symbol_names = 'PID_trip_status'
expression = 'PID_trip_status'
[]
[time_fn]
type = ParsedFunction
expression = t
[]
# Shutdown function which ramps down the motor once told by the control logic
[motor_torque_fn_shutdown]
type = ParsedFunction
symbol_values = 'PID_trip_status time_trip'
symbol_names = 'PID_trip_status time_trip'
expression = 'if(PID_trip_status = 1, max(2.4 - (2.4 * ((t - time_trip) / 35000)),0.0), 1)'
[]
# Generates motor power curve
[motor_power_fn]
type = ParsedFunction
expression = 'torque * speed'
symbol_names = 'torque speed'
symbol_values = 'motor_torque shaft:omega'
[]
##########################
# Generator
##########################
# Generates generator torque curve
[generator_torque_fn]
type = ParsedFunction
expression = 'slope * t'
symbol_names = 'slope'
symbol_values = '${generator_torque_per_shaft_speed}'
[]
# Generates generator power curve
[generator_power_fn]
type = ParsedFunction
expression = 'torque * speed'
symbol_names = 'torque speed'
symbol_values = 'generator_torque shaft:omega'
[]
##########################
# Reactor
##########################
# Ramps up reactor power when activated by control logic
[power_fn]
type = PiecewiseLinear
x = '0 1000 8600'
y = '0 0 ${hs_power}'
[]
##########################
# Compressor
##########################
# compressor pressure ratios
[rp_comp1]
type = PiecewiseLinear
data_file = 'rp_comp1.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp2]
type = PiecewiseLinear
data_file = 'rp_comp2.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp3]
type = PiecewiseLinear
data_file = 'rp_comp3.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp4]
type = PiecewiseLinear
data_file = 'rp_comp4.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp5]
type = PiecewiseLinear
data_file = 'rp_comp5.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
# compressor efficiencies
[eff_comp1]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp2]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp3]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp4]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp5]
type = ConstantFunction
value = ${eff_comp}
[]
##########################
# Turbine
##########################
# turbine pressure ratios
[rp_turb0]
type = ConstantFunction
value = 1
[]
[rp_turb1]
type = PiecewiseLinear
data_file = 'rp_turb1.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb2]
type = PiecewiseLinear
data_file = 'rp_turb2.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb3]
type = PiecewiseLinear
data_file = 'rp_turb3.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb4]
type = PiecewiseLinear
data_file = 'rp_turb4.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb5]
type = PiecewiseLinear
data_file = 'rp_turb5.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
# turbine efficiency
[eff_turb1]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb2]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb3]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb4]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb5]
type = ConstantFunction
value = ${eff_turb}
[]
[]
[Components]
# system inlet pulling air from the open atmosphere
[inlet]
type = InletStagnationPressureTemperature1Phase
input = 'pipe1:in'
p0 = ${p_ambient}
T0 = ${T_ambient}
[]
# Inlet pipe
[pipe1]
type = FlowChannel1Phase
position = '${x1} ${y1} 0'
orientation = '1 0 0'
length = ${L1}
n_elems = ${n_elems1}
A = ${A1}
[]
# Compressor as defined in MAGNET PCU document (Guillen 2020)
[compressor]
type = ShaftConnectedCompressor1Phase
position = '${x2} ${y2} 0'
inlet = 'pipe1:out'
outlet = 'pipe2:in'
A_ref = ${A_ref_comp}
volume = ${V_comp}
omega_rated = ${speed_rated}
mdot_rated = ${rated_mfr}
c0_rated = ${c0_rated_comp}
rho0_rated = ${rho0_rated_comp}
# Determines which compression ratio curve and efficiency curve to use depending on ratio of speed/rated_speed
speeds = '0.5208 0.6250 0.7292 0.8333 0.9375'
Rp_functions = 'rp_comp1 rp_comp2 rp_comp3 rp_comp4 rp_comp5'
eff_functions = 'eff_comp1 eff_comp2 eff_comp3 eff_comp4 eff_comp5'
min_pressure_ratio = 1.0
speed_cr_I = 0
inertia_const = ${I_comp}
inertia_coeff = '${I_comp} 0 0 0'
# assume no shaft friction
speed_cr_fr = 0
tau_fr_const = 0
tau_fr_coeff = '0 0 0 0'
[]
# Outlet pipe from the compressor
[pipe2]
type = FlowChannel1Phase
position = '${x2} ${y2} 0'
orientation = '1 0 0'
length = ${L2}
n_elems = ${n_elems2}
A = ${A2}
[]
# 90 degree connection between pipe 2 and 3
[junction2_cold_leg]
type = VolumeJunction1Phase
connections = 'pipe2:out cold_leg:in'
position = '${x3} ${y3} 0'
volume = ${fparse A2*0.1}
[]
# Cold leg of the recuperator
[cold_leg]
type = FlowChannel1Phase
position = '${x3} ${y3} 0'
orientation = '0 -1 0'
length = ${fparse L3/2}
n_elems = ${fparse n_elems3/2}
A = ${A3}
[]
# Recuperator which transfers heat from exhaust gas to reactor inlet gas to improve thermal efficency
[recuperator]
type = HeatStructureCylindrical
orientation = '0 -1 0'
position = '${x3} ${y3} 0'
length = ${fparse L3/2}
widths = ${recuperator_width}
n_elems = ${fparse n_elems3/2}
n_part_elems = 2
names = recuperator
solid_properties = steel
solid_properties_T_ref = '300'
inner_radius = ${D1}
[]
# heat transfer from recuperator to cold leg
[heat_transfer_cold_leg]
type = HeatTransferFromHeatStructure1Phase
flow_channel = cold_leg
hs = recuperator
hs_side = OUTER
Hw = 10000
[]
# heat transfer from hot leg to recuperator
[heat_transfer_hot_leg]
type = HeatTransferFromHeatStructure1Phase
flow_channel = hot_leg
hs = recuperator
hs_side = INNER
Hw = 10000
[]
[junction_cold_leg_3]
type = JunctionOneToOne1Phase
connections = 'cold_leg:out pipe3:in'
[]
[pipe3]
type = FlowChannel1Phase
position = '${x3} ${fparse y3 - (L3/2)} 0'
orientation = '0 -1 0'
length = ${fparse L3/2}
n_elems = ${fparse n_elems3/2}
A = ${A3}
[]
# 90 degree connection between pipe 3 and 4
[junction3_4]
type = VolumeJunction1Phase
connections = 'pipe3:out pipe4:in'
position = '${x4} ${y4} 0'
volume = ${fparse A3*0.1}
[]
# Pipe through the "reactor core"
[pipe4]
type = FlowChannel1Phase
position = '${x4} ${y4} 0'
orientation = '-1 0 0'
length = ${L4}
n_elems = ${n_elems4}
A = ${A4}
[]
# "Reactor Core" and it's associated heat transfer to pipe 4
[reactor]
type = HeatStructureCylindrical
orientation = '-1 0 0'
position = '${x4} ${y4} 0'
length = ${L4}
widths = 0.15
n_elems = ${n_elems4}
n_part_elems = 2
names = core
solid_properties = steel
solid_properties_T_ref = '300'
[]
[total_power]
type = TotalPower
power = 0
[]
[heat_generation]
type = HeatSourceFromTotalPower
power = total_power
hs = reactor
regions = core
[]
[heat_transfer]
type = HeatTransferFromHeatStructure1Phase
flow_channel = pipe4
hs = reactor
hs_side = OUTER
Hw = 10000
[]
# 90 degree connection between pipe 4 and 5
[junction4_5]
type = VolumeJunction1Phase
connections = 'pipe4:out pipe5:in'
position = '${x5} ${y5} 0'
volume = ${fparse A4*0.1}
[]
# Pipe carrying hot gas back to the PCU
[pipe5]
type = FlowChannel1Phase
position = '${x5} ${y5} 0'
orientation = '0 1 0'
length = ${L5}
n_elems = ${n_elems5}
A = ${A5}
[]
# 90 degree connection between pipe 5 and 6
[junction5_6]
type = VolumeJunction1Phase
connections = 'pipe5:out pipe6:in'
position = '${x6} ${y6} 0'
volume = ${fparse A5*0.1}
[]
# Inlet pipe to the turbine
[pipe6]
type = FlowChannel1Phase
position = '${x6} ${y6} 0'
orientation = '1 0 0'
length = ${L6}
n_elems = ${n_elems6}
A = ${A6}
[]
# Turbine as defined in MAGNET PCU document (Guillen 2020) and (Wright 2006)
[turbine]
type = ShaftConnectedCompressor1Phase
position = '${x7} ${y7} 0'
inlet = 'pipe6:out'
outlet = 'pipe7:in'
A_ref = ${A_ref_turb}
volume = ${V_turb}
# A turbine is treated as an "inverse" compressor, this value determines if component is to be treated as turbine or compressor
# If treat_as_turbine is omitted, code automatically assumes it is a compressor
treat_as_turbine = true
omega_rated = ${speed_rated}
mdot_rated = ${rated_mfr}
c0_rated = ${c0_rated_comp}
rho0_rated = ${rho0_rated_comp}
# Determines which compression ratio curve and efficiency curve to use depending on ratio of speed/rated_speed
speeds = '0 0.5208 0.6250 0.7292 0.8333 0.9375'
Rp_functions = 'rp_turb0 rp_turb1 rp_turb2 rp_turb3 rp_turb4 rp_turb5'
eff_functions = 'eff_turb1 eff_turb1 eff_turb2 eff_turb3 eff_turb4 eff_turb5'
min_pressure_ratio = 1.0
speed_cr_I = 0
inertia_const = ${I_turb}
inertia_coeff = '${I_turb} 0 0 0'
# assume no shaft friction
speed_cr_fr = 0
tau_fr_const = 0
tau_fr_coeff = '0 0 0 0'
[]
# Outlet pipe from turbine
[pipe7]
type = FlowChannel1Phase
position = '${x7} ${y7} 0'
orientation = '1 0 0'
length = ${L7}
n_elems = ${n_elems7}
A = ${A7}
[]
# 90 degree connection between pipe 7 and 8
[junction7_hot_leg]
type = VolumeJunction1Phase
connections = 'pipe7:out hot_leg:in'
position = '${x8} ${y8} 0'
volume = ${fparse A7*0.1}
[]
# Hot leg of the recuperator
[hot_leg]
type = FlowChannel1Phase
position = '${x8} ${y8} 0'
orientation = '0 1 0'
length = ${L8}
n_elems = ${n_elems8}
A = ${A8}
[]
# System outlet dumping exhaust gas to the atmosphere
[outlet]
type = Outlet1Phase
input = 'hot_leg:out'
p = ${p_ambient}
[]
# Roatating shaft connecting motor, compressor, turbine, and generator
[shaft]
type = Shaft
connected_components = 'motor compressor turbine generator'
initial_speed = ${speed_initial}
[]
# 3-Phase electircal motor used for system start-up, controlled by PID
[motor]
type = ShaftConnectedMotor
inertia = ${I_motor}
torque = 0 # controlled
[]
# Electric generator supplying power to the grid
[generator]
type = ShaftConnectedMotor
inertia = ${I_generator}
torque = generator_torque_fn
[]
[]
# Control logics which govern startup of the motor, startup of the "reactor core", and shutdown of the motor
[ControlLogic]
# Sets desired shaft speed to be reached by motor NOTE: SHOULD BE SET LOWER THAN RATED TURBINE RPM
[set_point]
type = GetFunctionValueControl
function = ${fparse speed_rated_rpm - 9000}
[]
# PID with gains determined by iterative process NOTE: Gain values are system specific
[initial_motor_PID]
type = PIDControl
set_point = set_point:value
input = shaft_RPM
initial_value = 0
K_p = 0.0011
K_i = 0.00000004
K_d = 0
[]
# Determines when the PID system should be running and when it should begin the shutdown cycle. If needed: PID output, else: shutdown function
[logic]
type = ParsedFunctionControl
function = 'if(motor+0.5 > turb, PID, shutdown_fn)'
symbol_names = 'motor turb PID shutdown_fn'
symbol_values = 'motor_torque turbine_torque initial_motor_PID:output motor_torque_fn_shutdown'
[]
# Takes the output generated in [logic] and applies it to the motor torque
[motor_PID]
type = SetComponentRealValueControl
component = motor
parameter = torque
value = logic:value
[]
# Determines when to turn on heat source
[power_logic]
type = ParsedFunctionControl
function = 'power_fn'
symbol_names = 'power_fn'
symbol_values = 'power_fn'
[]
# Applies heat source to the total_power block
[power_applied]
type = SetComponentRealValueControl
component = total_power
parameter = power
value = power_logic:value
[]
[]
[Controls]
# Enables set_PID_tripped
[PID_trip_status]
type = ConditionalFunctionEnableControl
conditional_function = is_tripped_fn
enable_objects = 'AuxScalarKernels::PID_trip_status_aux'
execute_on = 'TIMESTEP_END'
[]
# Enables set_time_PID
[time_PID]
type = ConditionalFunctionEnableControl
conditional_function = PID_tripped_status_fn
disable_objects = 'AuxScalarKernels::time_trip_aux'
execute_on = 'TIMESTEP_END'
[]
[]
[AuxVariables]
# Creates a variable that will later be set to the time when tau_turbine > tau_motor
[time_trip]
order = FIRST
family = SCALAR
[]
# Creates variable which indicates if tau_turbine > tau_motor....... If tau_motor > tau_turbine, 0, else 1
[PID_trip_status]
order = FIRST
family = SCALAR
initial_condition = 0
[]
[]
[AuxScalarKernels]
# Creates variable from time_fn which indicates when tau_turbine > tau_motor
[time_trip_aux]
type = FunctionScalarAux
function = time_fn
variable = time_trip
execute_on = 'TIMESTEP_END'
[]
# Overwrites variable PID_trip_status to the value from PID_tripped_constant_value (changes 0 to 1)
[PID_trip_status_aux]
type = FunctionScalarAux
function = PID_tripped_constant_value
variable = PID_trip_status
execute_on = 'TIMESTEP_END'
enable = false
[]
[]
[Postprocessors]
# Indicates when tau_turbine > tau_motor
[trip_time]
type = ScalarVariable
variable = time_trip
execute_on = 'TIMESTEP_END'
[]
##########################
# Motor
##########################
[motor_torque]
type = RealComponentParameterValuePostprocessor
component = motor
parameter = torque
execute_on = 'INITIAL TIMESTEP_END'
[]
[motor_power]
type = FunctionValuePostprocessor
function = motor_power_fn
execute_on = 'INITIAL TIMESTEP_END'
[]
##########################
# generator
##########################
[generator_torque]
type = ShaftConnectedComponentPostprocessor
quantity = torque
shaft_connected_component_uo = generator:shaftconnected_uo
execute_on = 'INITIAL TIMESTEP_END'
[]
[generator_power]
type = FunctionValuePostprocessor
function = generator_power_fn
execute_on = 'INITIAL TIMESTEP_END'
[]
##########################
# Shaft
##########################
# Speed in rad/s
[shaft_speed]
type = ScalarVariable
variable = 'shaft:omega'
execute_on = 'INITIAL TIMESTEP_END'
[]
# speed in RPM
[shaft_RPM]
type = ParsedPostprocessor
pp_names = 'shaft_speed'
function = '(shaft_speed * 60) /( 2 * ${fparse pi})'
execute_on = 'INITIAL TIMESTEP_END'
[]
##########################
# Compressor
##########################
[comp_dissipation_torque]
type = ScalarVariable
variable = 'compressor:dissipation_torque'
execute_on = 'INITIAL TIMESTEP_END'
[]
[comp_isentropic_torque]
type = ScalarVariable
variable = 'compressor:isentropic_torque'
execute_on = 'INITIAL TIMESTEP_END'
[]
[comp_friction_torque]
type = ScalarVariable
variable = 'compressor:friction_torque'
execute_on = 'INITIAL TIMESTEP_END'
[]
[compressor_torque]
type = ParsedPostprocessor
pp_names = 'comp_dissipation_torque comp_isentropic_torque comp_friction_torque'
function = 'comp_dissipation_torque + comp_isentropic_torque + comp_friction_torque'
[]
[p_in_comp]
type = PointValue
variable = p
point = '${x1_out} ${y1} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_out_comp]
type = PointValue
variable = p
point = '${x2_in} ${y2} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_ratio_comp]
type = ParsedPostprocessor
pp_names = 'p_in_comp p_out_comp'
function = 'p_out_comp / p_in_comp'
execute_on = 'INITIAL TIMESTEP_END'
[]
[T_in_comp]
type = PointValue
variable = T
point = '${x1_out} ${y1} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[T_out_comp]
type = PointValue
variable = T
point = '${x2_in} ${y2} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[T_ratio_comp]
type = ParsedPostprocessor
pp_names = 'T_in_comp T_out_comp'
function = '(T_out_comp - T_in_comp) / T_out_comp'
execute_on = 'INITIAL TIMESTEP_END'
[]
[mfr_comp]
type = ADFlowJunctionFlux1Phase
boundary = pipe1:out
connection_index = 0
equation = mass
junction = compressor
[]
##########################
# turbine
##########################
[turb_dissipation_torque]
type = ScalarVariable
variable = 'turbine:dissipation_torque'
execute_on = 'INITIAL TIMESTEP_END'
[]
[turb_isentropic_torque]
type = ScalarVariable
variable = 'turbine:isentropic_torque'
execute_on = 'INITIAL TIMESTEP_END'
[]
[turb_friction_torque]
type = ScalarVariable
variable = 'turbine:friction_torque'
execute_on = 'INITIAL TIMESTEP_END'
[]
[turbine_torque]
type = ParsedPostprocessor
pp_names = 'turb_dissipation_torque turb_isentropic_torque turb_friction_torque'
function = 'turb_dissipation_torque + turb_isentropic_torque + turb_friction_torque'
[]
[p_in_turb]
type = PointValue
variable = p
point = '${x6_out} ${y6} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_out_turb]
type = PointValue
variable = p
point = '${x7_in} ${y7} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_ratio_turb]
type = ParsedPostprocessor
pp_names = 'p_in_turb p_out_turb'
function = 'p_in_turb / p_out_turb'
execute_on = 'INITIAL TIMESTEP_END'
[]
[T_in_turb]
type = PointValue
variable = T
point = '${x6_out} ${y6} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[T_out_turb]
type = PointValue
variable = T
point = '${x7_in} ${y7} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[mfr_turb]
type = ADFlowJunctionFlux1Phase
boundary = pipe6:out
connection_index = 0
equation = mass
junction = turbine
[]
##########################
# Recuperator
##########################
[cold_leg_in]
type = PointValue
variable = T
point = '${x3} ${cold_leg_in} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[cold_leg_out]
type = PointValue
variable = T
point = '${x3} ${cold_leg_out} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[hot_leg_in]
type = PointValue
variable = T
point = '${x8} ${hot_leg_in} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[hot_leg_out]
type = PointValue
variable = T
point = '${x8} ${hot_leg_out} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
##########################
# Reactor
##########################
[reactor_inlet]
type = PointValue
variable = T
point = '${x4} ${y4} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[reactor_outlet]
type = PointValue
variable = T
point = '${x5} ${y5_in} 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
end_time = ${t3}
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.01
growth_factor = 1.1
cutback_factor = 0.9
[]
dtmin = 1e-5
dtmax = 1000
steady_state_detection = true
steady_state_start_time = 200000
solve_type = NEWTON
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 15
l_tol = 1e-4
l_max_its = 10
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu '
[]
[Outputs]
[e]
type = Exodus
file_base = 'recuperated_brayton_cycle_out'
[]
[csv]
type = CSV
file_base = 'recuperated_brayton_cycle'
execute_vector_postprocessors_on = 'INITIAL'
[]
[console]
type = Console
show = 'shaft_speed p_ratio_comp p_ratio_turb compressor:pressure_ratio turbine:pressure_ratio'
[]
[]
(modules/thermal_hydraulics/test/tests/problems/brayton_cycle/open_brayton_cycle.i)
# This input file is used to demonstrate a simple open-air Brayton cycle using
# a compressor, turbine, shaft, motor, and generator.
# The flow length is divided into 5 segments as illustrated below, where
# - "(I)" denotes the inlet
# - "(C)" denotes the compressor
# - "(T)" denotes the turbine
# - "(O)" denotes the outlet
# - "*" denotes a fictitious junction
#
# Heated section
# (I)-----(C)-----*--------------*-----(T)-----(O)
# 1 2 3 4 5
#
# Initially the fluid is at rest at ambient conditions, the shaft speed is zero,
# and no heat transfer occurs with the system.
# The transient is controlled as follows:
# * 0 - 100 s: motor ramps up torque linearly from zero
# * 100 - 200 s: motor ramps down torque linearly to zero, HTC ramps up linearly from zero.
# * 200 - 300 s: (no changes; should approach steady condition)
I_motor = 1.0
motor_torque_max = 400.0
I_generator = 1.0
generator_torque_per_shaft_speed = -0.00025
motor_ramp_up_duration = 100.0
motor_ramp_down_duration = 100.0
post_motor_time = 100.0
t1 = ${motor_ramp_up_duration}
t2 = ${fparse t1 + motor_ramp_down_duration}
t3 = ${fparse t2 + post_motor_time}
D1 = 0.15
D2 = ${D1}
D3 = ${D1}
D4 = ${D1}
D5 = ${D1}
A1 = ${fparse 0.25 * pi * D1^2}
A2 = ${fparse 0.25 * pi * D2^2}
A3 = ${fparse 0.25 * pi * D3^2}
A4 = ${fparse 0.25 * pi * D4^2}
A5 = ${fparse 0.25 * pi * D5^2}
L1 = 10.0
L2 = ${L1}
L3 = ${L1}
L4 = ${L1}
L5 = ${L1}
x1 = 0.0
x2 = ${fparse x1 + L1}
x3 = ${fparse x2 + L2}
x4 = ${fparse x3 + L3}
x5 = ${fparse x4 + L4}
x2_minus = ${fparse x2 - 0.001}
x2_plus = ${fparse x2 + 0.001}
x5_minus = ${fparse x5 - 0.001}
x5_plus = ${fparse x5 + 0.001}
n_elems1 = 10
n_elems2 = ${n_elems1}
n_elems3 = ${n_elems1}
n_elems4 = ${n_elems1}
n_elems5 = ${n_elems1}
A_ref_comp = ${fparse 0.5 * (A1 + A2)}
V_comp = ${fparse A_ref_comp * 1.0}
I_comp = 1.0
A_ref_turb = ${fparse 0.5 * (A4 + A5)}
V_turb = ${fparse A_ref_turb * 1.0}
I_turb = 1.0
c0_rated_comp = 351.6925137
rho0_rated_comp = 1.146881112
rated_mfr = 0.25
speed_rated_rpm = 96000
speed_rated = ${fparse speed_rated_rpm * 2 * pi / 60.0}
speed_initial = 0
eff_comp = 0.79
eff_turb = 0.843
T_hot = 1000
T_ambient = 300
p_ambient = 1e5
[GlobalParams]
orientation = '1 0 0'
gravity_vector = '0 0 0'
initial_p = ${p_ambient}
initial_T = ${T_ambient}
initial_vel = 0
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
fp = fp_air
closures = closures
f = 0
scaling_factor_1phase = '1 1 1e-5'
scaling_factor_rhoV = 1
scaling_factor_rhouV = 1
scaling_factor_rhovV = 1
scaling_factor_rhowV = 1
scaling_factor_rhoEV = 1e-5
rdg_slope_reconstruction = none
[]
[Functions]
[motor_torque_fn]
type = PiecewiseLinear
x = '0 ${t1} ${t2}'
y = '0 ${motor_torque_max} 0'
[]
[motor_power_fn]
type = ParsedFunction
expression = 'torque * speed'
symbol_names = 'torque speed'
symbol_values = 'motor_torque shaft:omega'
[]
[generator_torque_fn]
type = ParsedFunction
expression = 'slope * t'
symbol_names = 'slope'
symbol_values = '${generator_torque_per_shaft_speed}'
[]
[generator_power_fn]
type = ParsedFunction
expression = 'torque * speed'
symbol_names = 'torque speed'
symbol_values = 'generator_torque shaft:omega'
[]
[htc_wall_fn]
type = PiecewiseLinear
x = '0 ${t1} ${t2}'
y = '0 0 1e3'
[]
[]
[FluidProperties]
[fp_air]
type = IdealGasFluidProperties
emit_on_nan = none
[]
[]
[Closures]
[closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[shaft]
type = Shaft
connected_components = 'motor compressor turbine generator'
initial_speed = ${speed_initial}
[]
[motor]
type = ShaftConnectedMotor
inertia = ${I_motor}
torque = 0 # controlled
[]
[generator]
type = ShaftConnectedMotor
inertia = ${I_generator}
torque = generator_torque_fn
[]
[inlet]
type = InletStagnationPressureTemperature1Phase
input = 'pipe1:in'
p0 = ${p_ambient}
T0 = ${T_ambient}
[]
[pipe1]
type = FlowChannel1Phase
position = '${x1} 0 0'
length = ${L1}
n_elems = ${n_elems1}
A = ${A1}
[]
[compressor]
type = ShaftConnectedCompressor1Phase
position = '${x2} 0 0'
inlet = 'pipe1:out'
outlet = 'pipe2:in'
A_ref = ${A_ref_comp}
volume = ${V_comp}
omega_rated = ${speed_rated}
mdot_rated = ${rated_mfr}
c0_rated = ${c0_rated_comp}
rho0_rated = ${rho0_rated_comp}
speeds = '0.5208 0.6250 0.7292 0.8333 0.9375'
Rp_functions = 'rp_comp1 rp_comp2 rp_comp3 rp_comp4 rp_comp5'
eff_functions = 'eff_comp1 eff_comp2 eff_comp3 eff_comp4 eff_comp5'
min_pressure_ratio = 1.0
speed_cr_I = 0
inertia_const = ${I_comp}
inertia_coeff = '${I_comp} 0 0 0'
# assume no shaft friction
speed_cr_fr = 0
tau_fr_const = 0
tau_fr_coeff = '0 0 0 0'
[]
[pipe2]
type = FlowChannel1Phase
position = '${x2} 0 0'
length = ${L2}
n_elems = ${n_elems2}
A = ${A2}
[]
[junction2_3]
type = JunctionOneToOne1Phase
connections = 'pipe2:out pipe3:in'
[]
[pipe3]
type = FlowChannel1Phase
position = '${x3} 0 0'
length = ${L3}
n_elems = ${n_elems3}
A = ${A3}
[]
[junction3_4]
type = JunctionOneToOne1Phase
connections = 'pipe3:out pipe4:in'
[]
[pipe4]
type = FlowChannel1Phase
position = '${x4} 0 0'
length = ${L4}
n_elems = ${n_elems4}
A = ${A4}
[]
[turbine]
type = ShaftConnectedCompressor1Phase
position = '${x5} 0 0'
inlet = 'pipe4:out'
outlet = 'pipe5:in'
A_ref = ${A_ref_turb}
volume = ${V_turb}
treat_as_turbine = true
omega_rated = ${speed_rated}
mdot_rated = ${rated_mfr}
c0_rated = ${c0_rated_comp}
rho0_rated = ${rho0_rated_comp}
speeds = '0 0.5208 0.6250 0.7292 0.8333 0.9375'
Rp_functions = 'rp_turb0 rp_turb1 rp_turb2 rp_turb3 rp_turb4 rp_turb5'
eff_functions = 'eff_turb1 eff_turb1 eff_turb2 eff_turb3 eff_turb4 eff_turb5'
min_pressure_ratio = 1.0
speed_cr_I = 0
inertia_const = ${I_turb}
inertia_coeff = '${I_turb} 0 0 0'
# assume no shaft friction
speed_cr_fr = 0
tau_fr_const = 0
tau_fr_coeff = '0 0 0 0'
[]
[pipe5]
type = FlowChannel1Phase
position = '${x5} 0 0'
length = ${L5}
n_elems = ${n_elems5}
A = ${A5}
[]
[outlet]
type = Outlet1Phase
input = 'pipe5:out'
p = ${p_ambient}
[]
[heating]
type = HeatTransferFromSpecifiedTemperature1Phase
flow_channel = pipe3
T_wall = ${T_hot}
Hw = htc_wall_fn
[]
[]
[ControlLogic]
[motor_ctrl]
type = TimeFunctionComponentControl
component = motor
parameter = torque
function = motor_torque_fn
[]
[]
[Postprocessors]
[heating_rate]
type = ADHeatRateConvection1Phase
block = 'pipe3'
T = T
T_wall = T_wall
Hw = Hw
P_hf = P_hf
execute_on = 'INITIAL TIMESTEP_END'
[]
[motor_torque]
type = RealComponentParameterValuePostprocessor
component = motor
parameter = torque
execute_on = 'INITIAL TIMESTEP_END'
[]
[motor_power]
type = FunctionValuePostprocessor
function = motor_power_fn
execute_on = 'INITIAL TIMESTEP_END'
indirect_dependencies = 'motor_torque shaft:omega'
[]
[generator_torque]
type = ShaftConnectedComponentPostprocessor
quantity = torque
shaft_connected_component_uo = generator:shaftconnected_uo
execute_on = 'INITIAL TIMESTEP_END'
[]
[generator_power]
type = FunctionValuePostprocessor
function = generator_power_fn
execute_on = 'INITIAL TIMESTEP_END'
indirect_dependencies = 'generator_torque shaft:omega'
[]
[shaft_speed]
type = ScalarVariable
variable = 'shaft:omega'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_in_comp]
type = PointValue
variable = p
point = '${x2_minus} 0 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_out_comp]
type = PointValue
variable = p
point = '${x2_plus} 0 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_ratio_comp]
type = ParsedPostprocessor
pp_names = 'p_in_comp p_out_comp'
function = 'p_out_comp / p_in_comp'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_in_turb]
type = PointValue
variable = p
point = '${x5_minus} 0 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_out_turb]
type = PointValue
variable = p
point = '${x5_plus} 0 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_ratio_turb]
type = ParsedPostprocessor
pp_names = 'p_in_turb p_out_turb'
function = 'p_in_turb / p_out_turb'
execute_on = 'INITIAL TIMESTEP_END'
[]
[mfr_comp]
type = ADFlowJunctionFlux1Phase
boundary = pipe1:out
connection_index = 0
equation = mass
junction = compressor
[]
[mfr_turb]
type = ADFlowJunctionFlux1Phase
boundary = pipe4:out
connection_index = 0
equation = mass
junction = turbine
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
end_time = ${t3}
dt = 0.1
abort_on_solve_fail = true
solve_type = NEWTON
nl_rel_tol = 1e-50
nl_abs_tol = 1e-11
nl_max_its = 15
l_tol = 1e-4
l_max_its = 10
[]
[Outputs]
[csv]
type = CSV
file_base = 'open_brayton_cycle'
execute_vector_postprocessors_on = 'INITIAL'
[]
[console]
type = Console
show = 'shaft_speed p_ratio_comp p_ratio_turb compressor:pressure_ratio turbine:pressure_ratio'
[]
[]
[Functions]
# compressor pressure ratio
[rp_comp1]
type = PiecewiseLinear
data_file = 'rp_comp1.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp2]
type = PiecewiseLinear
data_file = 'rp_comp2.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp3]
type = PiecewiseLinear
data_file = 'rp_comp3.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp4]
type = PiecewiseLinear
data_file = 'rp_comp4.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp5]
type = PiecewiseLinear
data_file = 'rp_comp5.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
# compressor efficiency
[eff_comp1]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp2]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp3]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp4]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp5]
type = ConstantFunction
value = ${eff_comp}
[]
# turbine pressure ratio
[rp_turb0]
type = ConstantFunction
value = 1
[]
[rp_turb1]
type = PiecewiseLinear
data_file = 'rp_turb1.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb2]
type = PiecewiseLinear
data_file = 'rp_turb2.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb3]
type = PiecewiseLinear
data_file = 'rp_turb3.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb4]
type = PiecewiseLinear
data_file = 'rp_turb4.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb5]
type = PiecewiseLinear
data_file = 'rp_turb5.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
# turbine efficiency
[eff_turb1]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb2]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb3]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb4]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb5]
type = ConstantFunction
value = ${eff_turb}
[]
[]
(modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined_fully_saturated_volume.i)
# A sample is constrained on all sides, except its top
# and its boundaries are
# also impermeable. Fluid is pumped into the sample via a
# volumetric source (ie m^3/second per cubic meter), and the
# rise in the top surface, porepressure, and stress are observed.
#
# In the standard poromechanics scenario, the Biot Modulus is held
# fixed and the source has units 1/s. Then the expected result
# is
# strain_zz = disp_z = BiotCoefficient*BiotModulus*s*t/((bulk + 4*shear/3) + BiotCoefficient^2*BiotModulus)
# porepressure = BiotModulus*(s*t - BiotCoefficient*strain_zz)
# stress_xx = (bulk - 2*shear/3)*strain_zz (remember this is effective stress)
# stress_zz = (bulk + 4*shear/3)*strain_zz (remember this is effective stress)
#
# In standard porous_flow, everything is based on mass, eg the source has
# units kg/s/m^3. This is discussed in the other pp_generation_unconfined
# models. In this test, we use the FullySaturated Kernel and set
# multiply_by_density = false
# meaning the fluid Kernel has units of volume, and the source, s, has units 1/time
#
# The ratios are:
# stress_xx/strain_zz = (bulk - 2*shear/3) = 1 (for the parameters used here)
# stress_zz/strain_zz = (bulk + 4*shear/3) = 4 (for the parameters used here)
# porepressure/strain_zz = 13.3333333 (for the parameters used here)
#
# Expect
# disp_z = 0.3*10*s*t/((2 + 4*1.5/3) + 0.3^2*10) = 0.612245*s*t
# porepressure = 10*(s*t - 0.3*0.612245*s*t) = 8.163265*s*t
# stress_xx = (2 - 2*1.5/3)*0.612245*s*t = 0.612245*s*t
# stress_zz = (2 + 4*shear/3)*0.612245*s*t = 2.44898*s*t
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back'
[]
[]
[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 = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
variable = disp_x
component = 0
[]
[poro_y]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
variable = disp_y
component = 1
[]
[poro_z]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
component = 2
variable = disp_z
[]
[mass0]
type = PorousFlowFullySaturatedMassTimeDerivative
variable = porepressure
multiply_by_density = false
coupling_type = HydroMechanical
biot_coefficient = 0.3
[]
[source]
type = BodyForce
function = 0.1
variable = porepressure
[]
[]
[AuxVariables]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xz]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_yz]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 3.3333333333
density0 = 1
thermal_expansion = 0
[]
[]
[Materials]
[temperature_qp]
type = PorousFlowTemperature
[]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
[]
[stress]
type = ComputeLinearElasticStress
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = porepressure
[]
[simple_fluid_qp]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst # the "const" is irrelevant here: all that uses Porosity is the BiotModulus, which just uses the initial value of porosity
porosity = 0.1
[]
[biot_modulus]
type = PorousFlowConstantBiotModulus
biot_coefficient = 0.3
fluid_bulk_modulus = 3.3333333333
solid_bulk_compliance = 0.5
[]
[]
[Postprocessors]
[p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
[]
[zdisp]
type = PointValue
outputs = csv
point = '0 0 0.5'
variable = disp_z
[]
[stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[]
[stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[]
[stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[]
[stress_xx_over_strain]
type = FunctionValuePostprocessor
function = stress_xx_over_strain_fcn
outputs = csv
[]
[stress_zz_over_strain]
type = FunctionValuePostprocessor
function = stress_zz_over_strain_fcn
outputs = csv
[]
[p_over_strain]
type = FunctionValuePostprocessor
function = p_over_strain_fcn
outputs = csv
[]
[]
[Functions]
[stress_xx_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'stress_xx zdisp'
[]
[stress_zz_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'stress_zz zdisp'
[]
[p_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'p0 zdisp'
[]
[]
[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-14 1E-10 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = pp_generation_unconfined_fully_saturated_volume
[csv]
type = CSV
[]
[]
(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/combined/examples/phase_field-mechanics/kks_mechanics_KHS.i)
# KKS phase-field model coupled with elasticity using Khachaturyan's scheme as
# described in L.K. Aagesen et al., Computational Materials Science, 140, 10-21 (2017)
# Original run #170403a
[Mesh]
type = GeneratedMesh
dim = 3
nx = 640
ny = 1
nz = 1
xmin = -10
xmax = 10
ymin = 0
ymax = 0.03125
zmin = 0
zmax = 0.03125
elem_type = HEX8
[]
[Variables]
# order parameter
[./eta]
order = FIRST
family = LAGRANGE
[../]
# solute concentration
[./c]
order = FIRST
family = LAGRANGE
[../]
# chemical potential
[./w]
order = FIRST
family = LAGRANGE
[../]
# solute phase concentration (matrix)
[./cm]
order = FIRST
family = LAGRANGE
[../]
# solute phase concentration (precipitate)
[./cp]
order = FIRST
family = LAGRANGE
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./eta_ic]
variable = eta
type = FunctionIC
function = ic_func_eta
block = 0
[../]
[./c_ic]
variable = c
type = FunctionIC
function = ic_func_c
block = 0
[../]
[./w_ic]
variable = w
type = ConstantIC
value = 0.00991
block = 0
[../]
[./cm_ic]
variable = cm
type = ConstantIC
value = 0.131
block = 0
[../]
[./cp_ic]
variable = cp
type = ConstantIC
value = 0.236
block = 0
[../]
[]
[Functions]
[./ic_func_eta]
type = ParsedFunction
expression = '0.5*(1.0+tanh((x)/delta_eta/sqrt(2.0)))'
symbol_names = 'delta_eta'
symbol_values = '0.8034'
[../]
[./ic_func_c]
type = ParsedFunction
expression = '0.2389*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^3*(6*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^2-15*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))+10)+0.1339*(1-(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^3*(6*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^2-15*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))+10))'
symbol_names = 'delta'
symbol_values = '0.8034'
[../]
[./psi_eq_int]
type = ParsedFunction
expression = 'volume*psi_alpha'
symbol_names = 'volume psi_alpha'
symbol_values = 'volume psi_alpha'
[../]
[./gamma]
type = ParsedFunction
expression = '(psi_int - psi_eq_int) / dy / dz'
symbol_names = 'psi_int psi_eq_int dy dz'
symbol_values = 'psi_int psi_eq_int 0.03125 0.03125'
[../]
[]
[AuxVariables]
[./sigma11]
order = CONSTANT
family = MONOMIAL
[../]
[./sigma22]
order = CONSTANT
family = MONOMIAL
[../]
[./sigma33]
order = CONSTANT
family = MONOMIAL
[../]
[./e11]
order = CONSTANT
family = MONOMIAL
[../]
[./e12]
order = CONSTANT
family = MONOMIAL
[../]
[./e22]
order = CONSTANT
family = MONOMIAL
[../]
[./e33]
order = CONSTANT
family = MONOMIAL
[../]
[./e_el11]
order = CONSTANT
family = MONOMIAL
[../]
[./e_el12]
order = CONSTANT
family = MONOMIAL
[../]
[./e_el22]
order = CONSTANT
family = MONOMIAL
[../]
[./f_el]
order = CONSTANT
family = MONOMIAL
[../]
[./eigen_strain00]
order = CONSTANT
family = MONOMIAL
[../]
[./Fglobal]
order = CONSTANT
family = MONOMIAL
[../]
[./psi]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./matl_sigma11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = sigma11
[../]
[./matl_sigma22]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = sigma22
[../]
[./matl_sigma33]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = sigma33
[../]
[./matl_e11]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 0
index_j = 0
variable = e11
[../]
[./f_el]
type = MaterialRealAux
variable = f_el
property = f_el_mat
execute_on = timestep_end
[../]
[./GlobalFreeEnergy]
variable = Fglobal
type = KKSGlobalFreeEnergy
fa_name = fm
fb_name = fp
w = 0.0264
kappa_names = kappa
interfacial_vars = eta
[../]
[./psi_potential]
variable = psi
type = ParsedAux
coupled_variables = 'Fglobal w c f_el sigma11 e11'
expression = 'Fglobal - w*c + f_el - sigma11*e11'
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = right
value = 0
[../]
[./front_y]
type = DirichletBC
variable = disp_y
boundary = front
value = 0
[../]
[./back_y]
type = DirichletBC
variable = disp_y
boundary = back
value = 0
[../]
[./top_z]
type = DirichletBC
variable = disp_z
boundary = top
value = 0
[../]
[./bottom_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0
[../]
[]
[Materials]
# Chemical free energy of the matrix
[./fm]
type = DerivativeParsedMaterial
property_name = fm
coupled_variables = 'cm'
expression = '6.55*(cm-0.13)^2'
[../]
# Chemical Free energy of the precipitate phase
[./fp]
type = DerivativeParsedMaterial
property_name = fp
coupled_variables = 'cp'
expression = '6.55*(cp-0.235)^2'
[../]
# Elastic energy of the precipitate
[./elastic_free_energy_p]
type = ElasticEnergyMaterial
f_name = f_el_mat
args = 'eta'
outputs = exodus
[../]
# h(eta)
[./h_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta
[../]
# 1- h(eta), putting in function explicitly
[./one_minus_h_eta_explicit]
type = DerivativeParsedMaterial
property_name = one_minus_h_explicit
coupled_variables = eta
expression = 1-eta^3*(6*eta^2-15*eta+10)
outputs = exodus
[../]
# g(eta)
[./g_eta]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'M L kappa misfit'
prop_values = '0.7 0.7 0.01704 0.00377'
[../]
#Mechanical properties
[./Stiffness_matrix]
type = ComputeElasticityTensor
base_name = C_matrix
C_ijkl = '103.3 74.25 74.25 103.3 74.25 103.3 46.75 46.75 46.75'
fill_method = symmetric9
[../]
[./Stiffness_ppt]
type = ComputeElasticityTensor
C_ijkl = '100.7 71.45 71.45 100.7 71.45 100.7 50.10 50.10 50.10'
base_name = C_ppt
fill_method = symmetric9
[../]
[./C]
type = CompositeElasticityTensor
args = eta
tensors = 'C_matrix C_ppt'
weights = 'one_minus_h_explicit h'
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
eigenstrain_names = 'eigenstrain_ppt'
[../]
[./eigen_strain]
type = ComputeVariableEigenstrain
eigen_base = '0.00377 0.00377 0.00377 0 0 0'
prefactor = h
args = eta
eigenstrain_name = 'eigenstrain_ppt'
[../]
[]
[Kernels]
[./TensorMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
# enforce c = (1-h(eta))*cm + h(eta)*cp
[./PhaseConc]
type = KKSPhaseConcentration
ca = cm
variable = cp
c = c
eta = eta
[../]
# enforce pointwise equality of chemical potentials
[./ChemPotVacancies]
type = KKSPhaseChemicalPotential
variable = cm
cb = cp
fa_name = fm
fb_name = fp
[../]
#
# Cahn-Hilliard Equation
#
[./CHBulk]
type = KKSSplitCHCRes
variable = c
ca = cm
fa_name = fm
w = w
[../]
[./dcdt]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./ckernel]
type = SplitCHWRes
mob_name = M
variable = w
[../]
#
# Allen-Cahn Equation
#
[./ACBulkF]
type = KKSACBulkF
variable = eta
fa_name = fm
fb_name = fp
w = 0.0264
args = 'cp cm'
[../]
[./ACBulkC]
type = KKSACBulkC
variable = eta
ca = cm
cb = cp
fa_name = fm
[../]
[./ACBulk_el] #This adds df_el/deta for strain interpolation
type = AllenCahn
variable = eta
f_name = f_el_mat
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = kappa
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm ilu nonzero'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-11
num_steps = 200
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.5
[../]
[]
[Postprocessors]
[./f_el_int]
type = ElementIntegralMaterialProperty
mat_prop = f_el_mat
[../]
[./c_alpha]
type = SideAverageValue
boundary = left
variable = c
[../]
[./c_beta]
type = SideAverageValue
boundary = right
variable = c
[../]
[./e11_alpha]
type = SideAverageValue
boundary = left
variable = e11
[../]
[./e11_beta]
type = SideAverageValue
boundary = right
variable = e11
[../]
[./s11_alpha]
type = SideAverageValue
boundary = left
variable = sigma11
[../]
[./s22_alpha]
type = SideAverageValue
boundary = left
variable = sigma22
[../]
[./s33_alpha]
type = SideAverageValue
boundary = left
variable = sigma33
[../]
[./s11_beta]
type = SideAverageValue
boundary = right
variable = sigma11
[../]
[./s22_beta]
type = SideAverageValue
boundary = right
variable = sigma22
[../]
[./s33_beta]
type = SideAverageValue
boundary = right
variable = sigma33
[../]
[./f_el_alpha]
type = SideAverageValue
boundary = left
variable = f_el
[../]
[./f_el_beta]
type = SideAverageValue
boundary = right
variable = f_el
[../]
[./f_c_alpha]
type = SideAverageValue
boundary = left
variable = Fglobal
[../]
[./f_c_beta]
type = SideAverageValue
boundary = right
variable = Fglobal
[../]
[./chem_pot_alpha]
type = SideAverageValue
boundary = left
variable = w
[../]
[./chem_pot_beta]
type = SideAverageValue
boundary = right
variable = w
[../]
[./psi_alpha]
type = SideAverageValue
boundary = left
variable = psi
[../]
[./psi_beta]
type = SideAverageValue
boundary = right
variable = psi
[../]
[./total_energy]
type = ElementIntegralVariablePostprocessor
variable = Fglobal
[../]
# Get simulation cell size from postprocessor
[./volume]
type = ElementIntegralMaterialProperty
mat_prop = 1
[../]
[./psi_eq_int]
type = FunctionValuePostprocessor
function = psi_eq_int
[../]
[./psi_int]
type = ElementIntegralVariablePostprocessor
variable = psi
[../]
[./gamma]
type = FunctionValuePostprocessor
function = gamma
[../]
[./int_position]
type = FindValueOnLine
start_point = '-10 0 0'
end_point = '10 0 0'
v = eta
target = 0.5
[../]
[]
#
# Precondition using handcoded off-diagonal terms
#
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Outputs]
[./exodus]
type = Exodus
time_step_interval = 20
[../]
checkpoint = true
[./csv]
type = CSV
execute_on = 'final'
[../]
[]
(modules/solid_mechanics/test/tests/capped_drucker_prager/random.i)
# capped drucker-prager
# apply many random large deformations, checking that the algorithm returns correctly to
# the yield surface each time.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1000
ny = 125
nz = 1
xmin = 0
xmax = 1000
ymin = 0
ymax = 125
zmin = 0
zmax = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
add_variables = true
incremental = true
strain = finite
[../]
[]
[ICs]
[./x]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_x
[../]
[./y]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_y
[../]
[./z]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_z
[../]
[]
[BCs]
[./x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'front back'
function = '0'
[../]
[./y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'front back'
function = '0'
[../]
[./z]
type = FunctionDirichletBC
variable = disp_z
boundary = 'front back'
function = '0'
[../]
[]
[AuxVariables]
[./shear_yield_fcn]
order = CONSTANT
family = MONOMIAL
[../]
[./tensile_yield_fcn]
order = CONSTANT
family = MONOMIAL
[../]
[./compressive_yield_fcn]
order = CONSTANT
family = MONOMIAL
[../]
[./iter]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./shear_yield_fcn_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_yield_function
variable = shear_yield_fcn
[../]
[./tensile_fcn_auxk]
type = MaterialStdVectorAux
index = 1
property = plastic_yield_function
variable = tensile_yield_fcn
[../]
[./compressive_yield_fcn_auxk]
type = MaterialStdVectorAux
index = 2
property = plastic_yield_function
variable = compressive_yield_fcn
[../]
[./iter]
type = MaterialRealAux
property = plastic_NR_iterations
variable = iter
[../]
[]
[Postprocessors]
[./shear_max]
type = ElementExtremeValue
variable = shear_yield_fcn
outputs = 'console'
[../]
[./tensile_max]
type = ElementExtremeValue
variable = tensile_yield_fcn
outputs = 'console'
[../]
[./compressive_max]
type = ElementExtremeValue
variable = compressive_yield_fcn
outputs = 'console'
[../]
[./should_be_zero_shear]
type = FunctionValuePostprocessor
function = shear_should_be_zero_fcn
[../]
[./should_be_zero_compressive]
type = FunctionValuePostprocessor
function = compressive_should_be_zero_fcn
[../]
[./should_be_zero_tensile]
type = FunctionValuePostprocessor
function = tensile_should_be_zero_fcn
[../]
[./av_iter]
type = ElementAverageValue
variable = iter
outputs = 'console'
[../]
[]
[Functions]
[./shear_should_be_zero_fcn]
type = ParsedFunction
expression = 'if(a<1E-3,0,a)'
symbol_names = 'a'
symbol_values = 'shear_max'
[../]
[./tensile_should_be_zero_fcn]
type = ParsedFunction
expression = 'if(a<1E-3,0,a)'
symbol_names = 'a'
symbol_values = 'tensile_max'
[../]
[./compressive_should_be_zero_fcn]
type = ParsedFunction
expression = 'if(a<1E-3,0,a)'
symbol_names = 'a'
symbol_values = 'compressive_max'
[../]
[]
[UserObjects]
[./ts]
type = SolidMechanicsHardeningConstant
value = 1000
[../]
[./cs]
type = SolidMechanicsHardeningConstant
value = 1000
[../]
[./mc_coh]
type = SolidMechanicsHardeningConstant
value = 1E3
[../]
[./mc_phi]
type = SolidMechanicsHardeningConstant
value = 30
convert_to_radians = true
[../]
[./mc_psi]
type = SolidMechanicsHardeningConstant
value = 5
convert_to_radians = true
[../]
[./dp]
type = SolidMechanicsPlasticDruckerPrager
mc_cohesion = mc_coh
mc_friction_angle = mc_phi
mc_dilation_angle = mc_psi
yield_function_tolerance = 1 # irrelevant here
internal_constraint_tolerance = 1 # irrelevant here
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
fill_method = symmetric_isotropic
C_ijkl = '0.7E7 1E7'
[../]
[./admissible]
type = ComputeMultipleInelasticStress
inelastic_models = dp
perform_finite_strain_rotations = false
[../]
[./dp]
type = CappedDruckerPragerStressUpdate
DP_model = dp
tensile_strength = ts
compressive_strength = cs
yield_function_tol = 1E-3
tip_smoother = 0.1E3
smoothing_tol = 0.1E3
max_NR_iterations = 1000
small_dilation = false
[../]
[]
[Executioner]
end_time = 1
dt = 1
type = Transient
[]
[Outputs]
file_base = random
exodus = false
[./csv]
type = CSV
[../]
[]
(modules/solid_mechanics/test/tests/mean_cap_TC/random04.i)
# apply many random large deformations, checking that the algorithm returns correctly to
# the yield surface each time.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1000
ny = 125
nz = 1
xmin = 0
xmax = 1000
ymin = 0
ymax = 125
zmin = 0
zmax = 1
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[]
[ICs]
[./x]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_x
[../]
[./y]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_y
[../]
[./z]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_z
[../]
[]
[BCs]
[./x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'front back'
function = '0'
[../]
[./y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'front back'
function = '0'
[../]
[./z]
type = FunctionDirichletBC
variable = disp_z
boundary = 'front back'
function = '0'
[../]
[]
[AuxVariables]
[./yield_fcn]
order = CONSTANT
family = MONOMIAL
[../]
[./iter]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./yield_fcn_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_yield_function
variable = yield_fcn
[../]
[./iter]
type = MaterialRealAux
property = plastic_NR_iterations
variable = iter
[../]
[]
[Postprocessors]
[./max_yield_fcn]
type = ElementExtremeValue
variable = yield_fcn
outputs = 'console'
[../]
[./should_be_zero]
type = FunctionValuePostprocessor
function = should_be_zero_fcn
[../]
[./av_iter]
type = ElementAverageValue
variable = iter
outputs = 'console'
[../]
[]
[Functions]
[./should_be_zero_fcn]
type = ParsedFunction
expression = 'if(a<1E-3,0,a)'
symbol_names = 'a'
symbol_values = 'max_yield_fcn'
[../]
[]
[UserObjects]
[./tensile_strength]
type = SolidMechanicsHardeningCubic
value_0 = 1
value_residual = 0.1
internal_limit = 0.1
[../]
[./compressive_strength]
type = SolidMechanicsHardeningCubic
value_0 = -1.5
value_residual = 0
internal_limit = 0.1
[../]
[./cap]
type = SolidMechanicsPlasticMeanCapTC
tensile_strength = tensile_strength
compressive_strength = compressive_strength
yield_function_tolerance = 1E-3
internal_constraint_tolerance = 1E-9
use_custom_returnMap = true
use_custom_cto = true
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
fill_method = symmetric_isotropic
C_ijkl = '0.7E7 1E7'
[../]
[./strain]
type = ComputeIncrementalSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./mc]
type = ComputeMultiPlasticityStress
block = 0
max_NR_iterations = 2
ep_plastic_tolerance = 1E-6
plastic_models = cap
[../]
[]
[Executioner]
end_time = 1
dt = 1
type = Transient
[]
[Outputs]
file_base = random04
exodus = false
[./csv]
type = CSV
[../]
[]
(modules/porous_flow/test/tests/dirackernels/pls03.i)
# Test that the upwinding works correctly.
#
# A poly-line sink sits at the centre of the element.
# It has length=4 and weight=0.5, and extracts fluid
# at a constant rate of
# (1 * relative_permeability) kg.m^-1.s^-1
# Since it sits at the centre of the element, it extracts
# equally from each node, so the rate of extraction from
# each node is
# (0.5 * relative_permeability) kg.s^-1
# including the length and weight effects.
#
# There is no fluid flow.
#
# The initial conditions are such that all nodes have
# relative_permeability=0, except for one which has
# relative_permeaility = 1. Therefore, all nodes should
# remain at their initial porepressure, except the one.
#
# The porosity is 0.1, and the elemental volume is 2,
# so the fluid mass at the node in question = 0.2 * density / 4,
# where the 4 is the number of nodes in the element.
# In this simulation density = dens0 * exp(P / bulk), with
# dens0 = 100, and bulk = 20 MPa.
# The initial porepressure P0 = 10 MPa, so the final (after
# 1 second of simulation) is
# P(t=1) = 8.748592 MPa
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmin = 0
xmax = 2
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
#function = if((x<1)&(y<0.5),1E7,-1E7)
function = if((x<1)&(y>0.5),1E7,-1E7)
#function = if((x>1)&(y<0.5),1E7,-1E7)
#function = if((x>1)&(y>0.5),1E7,-1E7)
[]
[]
[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
[]
[pls_total_outflow_mass]
type = PorousFlowSumQuantity
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e7
density0 = 100
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.1
[]
[relperm]
type = PorousFlowRelativePermeabilityFLAC
phase = 0
m = 2
s_res = 0.99
sum_s_res = 0.99
[]
[]
[DiracKernels]
[pls]
type = PorousFlowPolyLineSink
fluid_phase = 0
point_file = pls03.bh
use_relative_permeability = true
line_length = 4
SumQuantityUO = pls_total_outflow_mass
variable = pp
p_or_t_vals = '0 1E7'
fluxes = '1 1'
[]
[]
[Postprocessors]
[pls_report]
type = PorousFlowPlotQuantity
uo = pls_total_outflow_mass
[]
[fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[]
[fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[]
[zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
indirect_dependencies = 'fluid_mass1 fluid_mass0 pls_report'
[]
[p00]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[]
[p01]
type = PointValue
variable = pp
point = '0 1 0'
execute_on = timestep_end
[]
[p20]
type = PointValue
variable = pp
point = '2 0 0'
execute_on = timestep_end
[]
[p21]
type = PointValue
variable = pp
point = '2 1 0'
execute_on = timestep_end
[]
[]
[Functions]
[mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 pls_report'
[]
[]
[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 = 1
dt = 1
solve_type = NEWTON
[]
[Outputs]
file_base = pls03
exodus = false
csv = true
execute_on = timestep_end
[]
(modules/combined/test/tests/poro_mechanics/mandel.i)
# Mandel's problem of consolodation of a drained medium
#
# A sample is in plane strain.
# -a <= x <= a
# -b <= y <= b
# It is squashed with constant force by impermeable, frictionless plattens on its top and bottom surfaces (at y=+/-b)
# Fluid is allowed to leak out from its sides (at x=+/-a)
# The porepressure within the sample is monitored.
#
# As is common in the literature, this is simulated by
# considering the quarter-sample, 0<=x<=a and 0<=y<=b, with
# impermeable, roller BCs at x=0 and y=0 and y=b.
# Porepressure is fixed at zero on x=a.
# Porepressure and displacement are initialised to zero.
# Then the top (y=b) is moved downwards with prescribed velocity,
# so that the total force that is inducing this downwards velocity
# is fixed. The velocity is worked out by solving Mandel's problem
# analytically, and the total force is monitored in the simulation
# to check that it indeed remains constant.
#
# Here are the problem's parameters, and their values:
# Soil width. a = 1
# Soil height. b = 0.1
# Soil's Lame lambda. la = 0.5
# Soil's Lame mu, which is also the Soil's shear modulus. mu = G = 0.75
# Soil bulk modulus. K = la + 2*mu/3 = 1
# Drained Poisson ratio. nu = (3K - 2G)/(6K + 2G) = 0.2
# Soil bulk compliance. 1/K = 1
# Fluid bulk modulus. Kf = 8
# Fluid bulk compliance. 1/Kf = 0.125
# Soil initial porosity. phi0 = 0.1
# Biot coefficient. alpha = 0.6
# Biot modulus. M = 1/(phi0/Kf + (alpha - phi0)(1 - alpha)/K) = 4.705882
# Undrained bulk modulus. Ku = K + alpha^2*M = 2.694118
# Undrained Poisson ratio. nuu = (3Ku - 2G)/(6Ku + 2G) = 0.372627
# Skempton coefficient. B = alpha*M/Ku = 1.048035
# Fluid mobility (soil permeability/fluid viscosity). k = 1.5
# Consolidation coefficient. c = 2*k*B^2*G*(1-nu)*(1+nuu)^2/9/(1-nuu)/(nuu-nu) = 3.821656
# Normal stress on top. F = 1
#
# The solution for porepressure and displacements is given in
# AHD Cheng and E Detournay "A direct boundary element method for plane strain poroelasticity" International Journal of Numerical and Analytical Methods in Geomechanics 12 (1988) 551-572.
# The solution involves complicated infinite series, so I shall not write it here
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 0.1
zmin = 0
zmax = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
porepressure = porepressure
block = 0
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./porepressure]
[../]
[]
[BCs]
[./roller_xmin]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left'
[../]
[./roller_ymin]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom'
[../]
[./plane_strain]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[../]
[./xmax_drained]
type = DirichletBC
variable = porepressure
value = 0
boundary = right
[../]
[./top_velocity]
type = FunctionDirichletBC
variable = disp_y
function = top_velocity
boundary = top
[../]
[]
[Functions]
[./top_velocity]
type = PiecewiseLinear
x = '0 0.002 0.006 0.014 0.03 0.046 0.062 0.078 0.094 0.11 0.126 0.142 0.158 0.174 0.19 0.206 0.222 0.238 0.254 0.27 0.286 0.302 0.318 0.334 0.35 0.366 0.382 0.398 0.414 0.43 0.446 0.462 0.478 0.494 0.51 0.526 0.542 0.558 0.574 0.59 0.606 0.622 0.638 0.654 0.67 0.686 0.702'
y = '-0.041824842 -0.042730269 -0.043412712 -0.04428867 -0.045509181 -0.04645965 -0.047268246 -0.047974749 -0.048597109 -0.0491467 -0.049632388 -0.050061697 -0.050441198 -0.050776675 -0.051073238 -0.0513354 -0.051567152 -0.051772022 -0.051953128 -0.052113227 -0.052254754 -0.052379865 -0.052490464 -0.052588233 -0.052674662 -0.052751065 -0.052818606 -0.052878312 -0.052931093 -0.052977751 -0.053018997 -0.053055459 -0.053087691 -0.053116185 -0.053141373 -0.05316364 -0.053183324 -0.053200724 -0.053216106 -0.053229704 -0.053241725 -0.053252351 -0.053261745 -0.053270049 -0.053277389 -0.053283879 -0.053289615'
[../]
[]
[AuxVariables]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./tot_force]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./tot_force]
type = ParsedAux
coupled_variables = 'stress_yy porepressure'
execute_on = timestep_end
variable = tot_force
expression = '-stress_yy+0.6*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 = 1.5
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '0.5 0.75'
# bulk modulus is lambda + 2*mu/3 = 0.5 + 2*0.75/3 = 1
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./poro_material]
type = PoroFullSatMaterial
porosity0 = 0.1
biot_coefficient = 0.6
solid_bulk_compliance = 1
fluid_bulk_compliance = 0.125
constant_porosity = true
[../]
[]
[Postprocessors]
[./p0]
type = PointValue
outputs = csv
point = '0.0 0 0'
variable = porepressure
[../]
[./p1]
type = PointValue
outputs = csv
point = '0.1 0 0'
variable = porepressure
[../]
[./p2]
type = PointValue
outputs = csv
point = '0.2 0 0'
variable = porepressure
[../]
[./p3]
type = PointValue
outputs = csv
point = '0.3 0 0'
variable = porepressure
[../]
[./p4]
type = PointValue
outputs = csv
point = '0.4 0 0'
variable = porepressure
[../]
[./p5]
type = PointValue
outputs = csv
point = '0.5 0 0'
variable = porepressure
[../]
[./p6]
type = PointValue
outputs = csv
point = '0.6 0 0'
variable = porepressure
[../]
[./p7]
type = PointValue
outputs = csv
point = '0.7 0 0'
variable = porepressure
[../]
[./p8]
type = PointValue
outputs = csv
point = '0.8 0 0'
variable = porepressure
[../]
[./p9]
type = PointValue
outputs = csv
point = '0.9 0 0'
variable = porepressure
[../]
[./p99]
type = PointValue
outputs = csv
point = '1 0 0'
variable = porepressure
[../]
[./xdisp]
type = PointValue
outputs = csv
point = '1 0.1 0'
variable = disp_x
[../]
[./ydisp]
type = PointValue
outputs = csv
point = '1 0.1 0'
variable = disp_y
[../]
[./total_downwards_force]
type = ElementAverageValue
outputs = csv
variable = tot_force
[../]
[./dt]
type = FunctionValuePostprocessor
outputs = console
function = if(0.15*t<0.01,0.15*t,0.01)
[../]
[]
[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-14 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 0.7
[./TimeStepper]
type = PostprocessorDT
postprocessor = dt
dt = 0.001
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = mandel
[./csv]
time_step_interval = 3
type = CSV
[../]
[]
(modules/thermal_hydraulics/test/tests/controls/thm_solve_postprocessor_control/test.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Functions]
[active_fn]
type = PiecewiseConstant
direction = right
xy_data = '
0.2 0
0.4 1
0.6 0'
[]
[]
[Postprocessors]
[active]
type = FunctionValuePostprocessor
function = active_fn
[]
[]
[Components]
[]
[ControlLogic]
[solve_on_off]
type = THMSolvePostprocessorControl
postprocessor = active
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 6
abort_on_solve_fail = true
[]
[Outputs]
csv = true
[]
(modules/porous_flow/examples/lava_lamp/2phase_convection.i)
# Two phase density-driven convection of dissolved CO2 in brine
#
# Initially, the model has a gas phase at the top with a saturation of 0.29
# (which corresponds to an initial value of zi = 0.2).
# Diffusion of the dissolved CO2
# component from the saturated liquid to the unsaturated liquid below reduces the
# amount of CO2 in the gas phase. 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,
# preferably on a cluster.
[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
ymax = 2
xmax = 2
ny = 40
nx = 40
bias_y = 0.95
[]
[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'
[]
[]
[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 = BoundingBoxIC
variable = zi
x1 = 0
x2 = 2
y1 = 1.95
y2 = 2
inside = 0.2
outside = 0
[]
[porosity]
type = RandomIC
variable = porosity
min = 0.25
max = 0.275
seed = 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 = 10
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
[]
(modules/porous_flow/test/tests/hysteresis/1phase_relperm_2.i)
# Simple example of a 1-phase situation with hysteretic relative permeability. Water is removed and added to the system in order to observe the hysteresis
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
number_fluid_phases = 1
number_fluid_components = 1
porous_flow_vars = 'pp'
[]
[pc]
type = PorousFlowCapillaryPressureVG
alpha = 10.0
m = 0.33
[]
[]
[Variables]
[pp]
initial_condition = 0
[]
[]
[Kernels]
[mass_conservation]
type = PorousFlowMassTimeDerivative
variable = pp
[]
[]
[DiracKernels]
[pump]
type = PorousFlowPointSourceFromPostprocessor
mass_flux = flux
point = '0.5 0 0'
variable = pp
[]
[]
[AuxVariables]
[sat]
family = MONOMIAL
order = CONSTANT
[]
[relperm]
family = MONOMIAL
order = CONSTANT
[]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[sat]
type = PorousFlowPropertyAux
variable = sat
property = saturation
[]
[relperm]
type = PorousFlowPropertyAux
variable = relperm
property = relperm
phase = 0
[]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[temperature]
type = PorousFlowTemperature
temperature = 20
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[pc_calculator]
type = PorousFlow1PhaseP
capillary_pressure = pc
porepressure = pp
[]
[hys_order_material]
type = PorousFlowHysteresisOrder
[]
[relperm_material]
type = PorousFlowHystereticRelativePermeabilityLiquid
phase = 0
S_lr = 0.1
S_gr_max = 0.2
m = 0.9
liquid_modification_range = 0.9
[]
[]
[Postprocessors]
[flux]
type = FunctionValuePostprocessor
function = 'if(t <= 3, -10, if(t <= 5, 10, if(t <= 13, -10, 10)))'
[]
[hys_order]
type = PointValue
point = '0 0 0'
variable = hys_order
[]
[sat]
type = PointValue
point = '0 0 0'
variable = sat
[]
[relperm]
type = PointValue
point = '0 0 0'
variable = relperm
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 3
end_time = 25
nl_abs_tol = 1E-10
[]
[Outputs]
[csv]
type = CSV
sync_times = '1 2 2.75 3 4 4.5 5 5.25 6 7.5 9 12 13 13.25 13.5 13.75 14 14.25 15 16 19 22 25'
sync_only = true
[]
[]
(modules/thermal_hydraulics/test/tests/components/pump_1phase/pump_pressure_check.i)
# This test checks that the expected pressure rise due to the user supplied
# pump head matches the actual pressure rise across the pump.
# The orientation of flow channels in this test have no components in the z-direction
# due to the expected_pressure_rise_fcn not accounting for hydrostatic pressure.
head = 95.
dt = 0.1
g = 9.81
volume = 0.567
[GlobalParams]
initial_T = 393.15
initial_vel = 0.0372
A = 0.567
f = 0
fp = fp
scaling_factor_1phase = '1 1 1e-5'
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[expected_pressure_rise_fcn]
type = ParsedFunction
expression = 'rhoV * g * head / volume'
symbol_names = 'rhoV g head volume'
symbol_values = 'pump:rhoV ${g} ${head} ${volume}'
[]
[]
[Components]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe1:in'
m_dot = 20
T = 393.15
[]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
initial_p = 1.318964e+07
n_elems = 10
[]
[pump]
type = Pump1Phase
connections = 'pipe1:out pipe2:in'
position = '1.02 0 0'
initial_p = 1.318964e+07
scaling_factor_rhoEV = 1e-5
head = ${head}
volume = ${volume}
A_ref = 0.567
initial_vel_x = 1
initial_vel_y = 1
initial_vel_z = 0
[]
[pipe2]
type = FlowChannel1Phase
position = '1.04 0 0'
orientation = '0 2 0'
length = 0.96
initial_p = 1.4072E+07
n_elems = 10
[]
[outlet]
type = Outlet1Phase
input = 'pipe2:out'
p = 1.4072E+07
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
start_time = 0
dt = ${dt}
num_steps = 4
abort_on_solve_fail = true
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-4
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Postprocessors]
[pump_rhoV]
type = ScalarVariable
variable = pump:rhoV
execute_on = 'initial timestep_end'
[]
[expected_pressure_rise]
type = FunctionValuePostprocessor
function = expected_pressure_rise_fcn
execute_on = 'initial linear'
[]
[p_inlet]
type = SideAverageValue
variable = p
boundary = 'pipe1:out'
execute_on = 'initial linear'
[]
[p_outlet]
type = SideAverageValue
variable = p
boundary = 'pipe2:in'
execute_on = 'initial linear'
[]
[actual_pressure_rise]
type = DifferencePostprocessor
value1 = p_outlet
value2 = p_inlet
execute_on = 'timestep_end'
[]
[pressure_rise_diff]
type = RelativeDifferencePostprocessor
value1 = actual_pressure_rise
value2 = expected_pressure_rise
execute_on = 'timestep_end'
[]
[]
[Outputs]
[out]
type = CSV
execute_on = 'FINAL'
show = 'pressure_rise_diff'
[]
[]
(modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/lps_single_split.i)
# This test provides an example of combining two LPS viscoplasticity model.
# The answer should be close, but not exactly the same, as lps_single.i
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmax = 0.002
ymax = 0.002
[]
[Physics/SolidMechanics/QuasiStatic/All]
strain = FINITE
add_variables = true
generate_output = 'strain_xx strain_yy strain_xy hydrostatic_stress vonmises_stress'
use_automatic_differentiation = true
[]
[Functions]
[./pull]
type = PiecewiseLinear
x = '0 0.1'
y = '0 1e-5'
[../]
[./tot_effective_viscoplasticity]
type = ParsedFunction
symbol_values = 'lps_1_eff_creep_strain lps_2_eff_creep_strain'
symbol_names = 'lps_1_eff_creep_strain lps_2_eff_creep_strain'
expression = 'lps_1_eff_creep_strain+lps_2_eff_creep_strain'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.3
[../]
[./stress]
type = ADComputeMultipleInelasticStress
inelastic_models = 'one two'
outputs = all
[../]
[./porosity]
type = ADPorosityFromStrain
initial_porosity = 0.1
inelastic_strain = 'combined_inelastic_strain'
outputs = 'all'
[../]
[./one]
type = ADViscoplasticityStressUpdate
coefficient = 'coef'
power = 3
base_name = 'lps_first'
outputs = all
relative_tolerance = 1e-11
[../]
[./two]
type = ADViscoplasticityStressUpdate
coefficient = 'coef'
power = 3
base_name = 'lps_second'
outputs = all
relative_tolerance = 1e-11
[../]
[./coef]
type = ADParsedMaterial
property_name = coef
# Example of creep power law
expression = '0.5e-18 * exp(-4e4 / 1.987 / 1200)'
[../]
[]
[BCs]
[./no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./pull_disp_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = top
function = pull
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 0.01
end_time = 0.12
[]
[Postprocessors]
[./disp_x]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./disp_y]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
[../]
[./dt]
type = TimestepSize
[../]
[./num_lin]
type = NumLinearIterations
outputs = console
[../]
[./num_nonlin]
type = NumNonlinearIterations
outputs = console
[../]
[./lps_1_eff_creep_strain]
type = ElementAverageValue
variable = lps_first_effective_viscoplasticity
outputs = none
[../]
[./lps_2_eff_creep_strain]
type = ElementAverageValue
variable = lps_second_effective_viscoplasticity
outputs = none
[../]
[./eff_creep_strain_tot]
type = FunctionValuePostprocessor
function = tot_effective_viscoplasticity
[../]
[./porosity]
type = ElementAverageValue
variable = porosity
[../]
[]
[Outputs]
csv = true
[]
(modules/porous_flow/test/tests/sinks/s05.i)
# apply a half-gaussian sink flux and observe the correct behavior
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 2
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1.1
[]
[]
[Variables]
[pp]
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = y+1.4
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.3
density0 = 1.1
thermal_expansion = 0
viscosity = 1.1
[]
[]
[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.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[AuxVariables]
[flux_out]
[]
[]
[Functions]
[mass10]
type = ParsedFunction
expression = 'vol*por*dens0*exp(pp/bulk)*if(pp>=0,1,pow(1+pow(-al*pp,1.0/(1-m)),-m))'
symbol_names = 'vol por dens0 pp bulk al m'
symbol_values = '0.25 0.1 1.1 p10 1.3 1.1 0.5'
[]
[rate10]
type = ParsedFunction
expression = 'if(pp>center,fcn,fcn*exp(-0.5*(pp-center)*(pp-center)/sd/sd))'
symbol_names = 'fcn pp center sd'
symbol_values = '6 p10 0.9 0.5'
[]
[mass10_expect]
type = ParsedFunction
expression = 'mass_prev-rate*area*dt'
symbol_names = 'mass_prev rate area dt'
symbol_values = 'm10_prev m10_rate 0.5 2E-3'
[]
[mass11]
type = ParsedFunction
expression = 'vol*por*dens0*exp(pp/bulk)*if(pp>=0,1,pow(1+pow(-al*pp,1.0/(1-m)),-m))'
symbol_names = 'vol por dens0 pp bulk al m'
symbol_values = '0.25 0.1 1.1 p11 1.3 1.1 0.5'
[]
[rate11]
type = ParsedFunction
expression = 'if(pp>center,fcn,fcn*exp(-0.5*(pp-center)*(pp-center)/sd/sd))'
symbol_names = 'fcn pp center sd'
symbol_values = '6 p11 0.9 0.5'
[]
[mass11_expect]
type = ParsedFunction
expression = 'mass_prev-rate*area*dt'
symbol_names = 'mass_prev rate area dt'
symbol_values = 'm11_prev m11_rate 0.5 2E-3'
[]
[]
[Postprocessors]
[flux10]
type = PointValue
variable = flux_out
point = '1 0 0'
[]
[p00]
type = PointValue
point = '0 0 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[p10]
type = PointValue
point = '1 0 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[m10]
type = FunctionValuePostprocessor
function = mass10
execute_on = 'initial timestep_end'
[]
[m10_prev]
type = FunctionValuePostprocessor
function = mass10
execute_on = 'timestep_begin'
outputs = 'console'
[]
[m10_rate]
type = FunctionValuePostprocessor
function = rate10
execute_on = 'timestep_end'
[]
[m10_expect]
type = FunctionValuePostprocessor
function = mass10_expect
execute_on = 'timestep_end'
[]
[p01]
type = PointValue
point = '0 1 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[p11]
type = PointValue
point = '1 1 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[m11]
type = FunctionValuePostprocessor
function = mass11
execute_on = 'initial timestep_end'
[]
[m11_prev]
type = FunctionValuePostprocessor
function = mass11
execute_on = 'timestep_begin'
outputs = 'console'
[]
[m11_rate]
type = FunctionValuePostprocessor
function = rate11
execute_on = 'timestep_end'
[]
[m11_expect]
type = FunctionValuePostprocessor
function = mass11_expect
execute_on = 'timestep_end'
[]
[]
[BCs]
[flux]
type = PorousFlowHalfGaussianSink
boundary = 'right'
max = 6
sd = 0.5
center = 0.9
variable = pp
use_mobility = false
use_relperm = false
fluid_phase = 0
flux_function = 1
save_in = flux_out
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -snes_max_it -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu 10000 NONZERO 2'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 2E-3
end_time = 6E-2
nl_rel_tol = 1E-12
nl_abs_tol = 1E-12
[]
[Outputs]
file_base = s05
[console]
type = Console
execute_on = 'nonlinear linear'
time_step_interval = 5
[]
[csv]
type = CSV
execute_on = 'timestep_end'
time_step_interval = 3
[]
[]
(modules/porous_flow/test/tests/poro_elasticity/terzaghi_fully_saturated_volume.i)
# Terzaghi's problem of consolodation of a drained medium
# The FullySaturated Kernels are used, with multiply_by_density = false
# so that this becomes a linear problem with constant Biot Modulus
#
# A saturated soil sample sits in a bath of water.
# It is constrained on its sides, and bottom.
# Its sides and bottom are also impermeable.
# Initially it is unstressed.
# A normal stress, q, is applied to the soil's top.
# The soil then slowly compresses as water is squeezed
# out from the sample from its top (the top BC for
# the porepressure is porepressure = 0).
#
# See, for example. Section 2.2 of the online manuscript
# Arnold Verruijt "Theory and Problems of Poroelasticity" Delft University of Technology 2013
# but note that the "sigma" in that paper is the negative
# of the stress in TensorMechanics
#
# Here are the problem's parameters, and their values:
# Soil height. h = 10
# Soil's Lame lambda. la = 2
# Soil's Lame mu, which is also the Soil's shear modulus. mu = 3
# Soil bulk modulus. K = la + 2*mu/3 = 4
# Soil confined compressibility. m = 1/(K + 4mu/3) = 0.125
# Soil bulk compliance. 1/K = 0.25
# Fluid bulk modulus. Kf = 8
# Fluid bulk compliance. 1/Kf = 0.125
# Fluid mobility (soil permeability/fluid viscosity). k = 1.5
# Soil initial porosity. phi0 = 0.1
# Biot coefficient. alpha = 0.6
# Soil initial storativity, which is the reciprocal of the initial Biot modulus. S = phi0/Kf + (alpha - phi0)(1 - alpha)/K = 0.0625
# Consolidation coefficient. c = k/(S + alpha^2 m) = 13.95348837
# Normal stress on top. q = 1
# Initial porepressure, resulting from instantaneous application of q, assuming corresponding instantaneous increase of porepressure (Note that this is calculated by MOOSE: we only need it for the analytical solution). p0 = alpha*m*q/(S + alpha^2 m) = 0.69767442
# Initial vertical displacement (down is positive), resulting from instantaneous application of q (Note this is calculated by MOOSE: we only need it for the analytical solution). uz0 = q*m*h*S/(S + alpha^2 m)
# Final vertical displacement (down in positive) (Note this is calculated by MOOSE: we only need it for the analytical solution). uzinf = q*m*h
#
# The solution for porepressure is
# P = 4*p0/\pi \sum_{k=1}^{\infty} \frac{(-1)^{k-1}}{2k-1} \cos ((2k-1)\pi z/(2h)) \exp(-(2k-1)^2 \pi^2 ct/(4 h^2))
# This series converges very slowly for ct/h^2 small, so in that domain
# P = p0 erf( (1-(z/h))/(2 \sqrt(ct/h^2)) )
#
# The degree of consolidation is defined as
# U = (uz - uz0)/(uzinf - uz0)
# where uz0 and uzinf are defined above, and
# uz = the vertical displacement of the top (down is positive)
# U = 1 - (8/\pi^2)\sum_{k=1}^{\infty} \frac{1}{(2k-1)^2} \exp(-(2k-1)^2 \pi^2 ct/(4 h^2))
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 10
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = 0
zmax = 10
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[basefixed]
type = DirichletBC
variable = disp_z
value = 0
boundary = back
[]
[topdrained]
type = DirichletBC
variable = porepressure
value = 0
boundary = front
[]
[topload]
type = NeumannBC
variable = disp_z
value = -1
boundary = front
[]
[]
[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 = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.6
variable = disp_x
component = 0
[]
[poro_y]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.6
variable = disp_y
component = 1
[]
[poro_z]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.6
component = 2
variable = disp_z
[]
[mass0]
type = PorousFlowFullySaturatedMassTimeDerivative
coupling_type = HydroMechanical
biot_coefficient = 0.6
multiply_by_density = false
variable = porepressure
[]
[flux]
type = PorousFlowFullySaturatedDarcyBase
multiply_by_density = false
variable = porepressure
gravity = '0 0 0'
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 8
density0 = 1
thermal_expansion = 0
viscosity = 0.96
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '2 3'
# bulk modulus is lambda + 2*mu/3 = 2 + 2*3/3 = 4
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = ComputeLinearElasticStress
[]
[eff_fluid_pressure_qp]
type = PorousFlowEffectiveFluidPressure
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = porepressure
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid_qp]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst # only the initial value of this is used
porosity = 0.1
[]
[biot_modulus]
type = PorousFlowConstantBiotModulus
biot_coefficient = 0.6
fluid_bulk_modulus = 8
solid_bulk_compliance = 0.25
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1.5 0 0 0 1.5 0 0 0 1.5'
[]
[]
[Postprocessors]
[p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
use_displaced_mesh = false
[]
[p1]
type = PointValue
outputs = csv
point = '0 0 1'
variable = porepressure
use_displaced_mesh = false
[]
[p2]
type = PointValue
outputs = csv
point = '0 0 2'
variable = porepressure
use_displaced_mesh = false
[]
[p3]
type = PointValue
outputs = csv
point = '0 0 3'
variable = porepressure
use_displaced_mesh = false
[]
[p4]
type = PointValue
outputs = csv
point = '0 0 4'
variable = porepressure
use_displaced_mesh = false
[]
[p5]
type = PointValue
outputs = csv
point = '0 0 5'
variable = porepressure
use_displaced_mesh = false
[]
[p6]
type = PointValue
outputs = csv
point = '0 0 6'
variable = porepressure
use_displaced_mesh = false
[]
[p7]
type = PointValue
outputs = csv
point = '0 0 7'
variable = porepressure
use_displaced_mesh = false
[]
[p8]
type = PointValue
outputs = csv
point = '0 0 8'
variable = porepressure
use_displaced_mesh = false
[]
[p9]
type = PointValue
outputs = csv
point = '0 0 9'
variable = porepressure
use_displaced_mesh = false
[]
[p99]
type = PointValue
outputs = csv
point = '0 0 10'
variable = porepressure
use_displaced_mesh = false
[]
[zdisp]
type = PointValue
outputs = csv
point = '0 0 10'
variable = disp_z
use_displaced_mesh = false
[]
[dt]
type = FunctionValuePostprocessor
outputs = console
function = if(0.5*t<0.1,0.5*t,0.1)
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
[TimeStepper]
type = PostprocessorDT
postprocessor = dt
dt = 0.0001
[]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = terzaghi_fully_saturated_volume
[csv]
type = CSV
[]
[]
(modules/solid_mechanics/test/tests/mean_cap_TC/random02.i)
# apply many random large deformations, checking that the algorithm returns correctly to
# the yield surface each time.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1000
ny = 125
nz = 1
xmin = 0
xmax = 1000
ymin = 0
ymax = 125
zmin = 0
zmax = 1
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[]
[ICs]
[./x]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_x
[../]
[./y]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_y
[../]
[./z]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_z
[../]
[]
[BCs]
[./x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'front back'
function = '0'
[../]
[./y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'front back'
function = '0'
[../]
[./z]
type = FunctionDirichletBC
variable = disp_z
boundary = 'front back'
function = '0'
[../]
[]
[AuxVariables]
[./yield_fcn]
order = CONSTANT
family = MONOMIAL
[../]
[./iter]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./yield_fcn_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_yield_function
variable = yield_fcn
[../]
[./iter]
type = MaterialRealAux
property = plastic_NR_iterations
variable = iter
[../]
[]
[Postprocessors]
[./max_yield_fcn]
type = ElementExtremeValue
variable = yield_fcn
outputs = 'console'
[../]
[./should_be_zero]
type = FunctionValuePostprocessor
function = should_be_zero_fcn
[../]
[./av_iter]
type = ElementAverageValue
variable = iter
outputs = 'console'
[../]
[]
[Functions]
[./should_be_zero_fcn]
type = ParsedFunction
expression = 'if(a<1E-3,0,a)'
symbol_names = 'a'
symbol_values = 'max_yield_fcn'
[../]
[]
[UserObjects]
[./tensile_strength]
type = SolidMechanicsHardeningConstant
value = 1
[../]
[./compressive_strength]
type = SolidMechanicsHardeningConstant
value = -1.5
[../]
[./cap]
type = SolidMechanicsPlasticMeanCapTC
tensile_strength = tensile_strength
compressive_strength = compressive_strength
yield_function_tolerance = 1E-3
internal_constraint_tolerance = 1E-9
use_custom_returnMap = true
use_custom_cto = true
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
fill_method = symmetric_isotropic
C_ijkl = '0.7E7 1E7'
[../]
[./strain]
type = ComputeIncrementalSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./mc]
type = ComputeMultiPlasticityStress
block = 0
max_NR_iterations = 2
ep_plastic_tolerance = 1E-6
plastic_models = cap
[../]
[]
[Executioner]
end_time = 1
dt = 1
type = Transient
[]
[Outputs]
file_base = random02
exodus = false
[./csv]
type = CSV
[../]
[]
(modules/thermal_hydraulics/test/tests/components/shaft_connected_pump_1phase/shaft_motor_pump.i)
# Pump data used in this test comes from the Semiscale Program, summarized in NUREG/CR-4945
initial_T = 393.15
area = 1e-2
dt = 1.e-2
[GlobalParams]
initial_p = 1.4E+07
initial_T = ${initial_T}
initial_vel = 10
initial_vel_x = 10
initial_vel_y = 0
initial_vel_z = 0
A = ${area}
A_ref = ${area}
f = 100
scaling_factor_1phase = '0.04 0.04 0.04e-5'
closures = simple_closures
fp = fp
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pump]
type = ShaftConnectedPump1Phase
inlet = 'pipe:out'
outlet = 'pipe:in'
position = '0 0 0'
scaling_factor_rhoEV = 1e-5
volume = 0.3
inertia_coeff = '1 1 1 1'
inertia_const = 1.61397
omega_rated = 314
speed_cr_I = 1e12
speed_cr_fr = 0
torque_rated = 47.1825
volumetric_rated = 1
head_rated = 58.52
tau_fr_coeff = '0 0 9.084 0'
tau_fr_const = 0
head = head_fcn
torque_hydraulic = torque_fcn
density_rated = 124.2046
[]
[pipe]
type = FlowChannel1Phase
position = '0.6096 0 0'
orientation = '1 0 0'
length = 10
n_elems = 20
[]
[motor]
type = ShaftConnectedMotor
inertia = 2
torque = 47
[]
[shaft]
type = Shaft
connected_components = 'motor pump'
initial_speed = 30
[]
[]
[Functions]
[head_fcn]
type = PiecewiseLinear
data_file = semiscale_head_data.csv
format = columns
[]
[torque_fcn]
type = PiecewiseLinear
data_file = semiscale_torque_data.csv
format = columns
[]
[S_energy_fcn]
type = ParsedFunction
expression = '-tau_hyd * omega'
symbol_names = 'tau_hyd omega'
symbol_values = 'pump:hydraulic_torque shaft:omega'
[]
[energy_conservation_fcn]
type = ParsedFunction
expression = '(E_change - S_energy * dt) / E_tot'
symbol_names = 'E_change S_energy dt E_tot'
symbol_values = 'E_change S_energy ${dt} E_tot'
[]
[]
[Postprocessors]
# mass conservation
[mass_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoA
block = 'pipe'
execute_on = 'initial timestep_end'
[]
[mass_pump]
type = ScalarVariable
variable = pump:rhoV
execute_on = 'initial timestep_end'
[]
[mass_tot]
type = SumPostprocessor
values = 'mass_pipes mass_pump'
execute_on = 'initial timestep_end'
[]
[mass_conservation]
type = ChangeOverTimePostprocessor
postprocessor = mass_tot
change_with_respect_to_initial = true
compute_relative_change = true
execute_on = 'initial timestep_end'
[]
# energy conservation
[E_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoEA
block = 'pipe'
execute_on = 'initial timestep_end'
[]
[E_pump]
type = ScalarVariable
variable = pump:rhoEV
execute_on = 'initial timestep_end'
[]
[E_tot]
type = LinearCombinationPostprocessor
pp_coefs = '1 1'
pp_names = 'E_pipes E_pump'
execute_on = 'initial timestep_end'
[]
[S_energy]
type = FunctionValuePostprocessor
function = S_energy_fcn
execute_on = 'initial timestep_end'
[]
[E_change]
type = ChangeOverTimePostprocessor
postprocessor = E_tot
execute_on = 'initial timestep_end'
[]
# This should also execute on initial. This value is
# lagged by one timestep as a workaround to moose issue #13262.
[energy_conservation]
type = FunctionValuePostprocessor
function = energy_conservation_fcn
execute_on = 'timestep_end'
indirect_dependencies = 'E_tot E_change S_energy'
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
dt = ${dt}
num_steps = 6
solve_type = 'NEWTON'
line_search = 'basic'
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-4
l_max_its = 10
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Outputs]
velocity_as_vector = false
[]
(modules/solid_mechanics/test/tests/weak_plane_shear/large_deform4.i)
# apply a number of "random" configurations and
# check that the algorithm returns to the yield surface
# using the 'cap' tip_scheme
#
# must be careful here - we cannot put in arbitrary values of C_ijkl, otherwise the condition
# df/dsigma * C * flow_dirn < 0 for some stresses
# The important features that must be obeyed are:
# 0 = C_0222 = C_1222 (holds for transversely isotropic, for instance)
# C_0212 < C_0202 = C_1212 (holds for transversely isotropic)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[Physics/SolidMechanics/QuasiStatic/all]
strain = FINITE
add_variables = true
[]
[BCs]
[bottomx]
type = DirichletBC
variable = disp_x
boundary = back
value = 0.0
[]
[bottomy]
type = DirichletBC
variable = disp_y
boundary = back
value = 0.0
[]
[bottomz]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
# the following are "random" deformations
# each is O(1E-1) to provide large deformations
[topx]
type = FunctionDirichletBC
variable = disp_x
boundary = front
function = '(sin(0.1*t)+x)/1E1'
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = front
function = '(cos(t)+x*y)/1E1'
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = front
function = 'sin(0.4321*t)*x*y*z/1E1'
[]
[]
[AuxVariables]
[yield_fcn]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[yield_fcn_auxk]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 0
variable = yield_fcn
[]
[]
[Postprocessors]
[yield_fcn_at_zero]
type = PointValue
point = '0 0 0'
variable = yield_fcn
outputs = 'console'
[]
[should_be_zero]
type = FunctionValuePostprocessor
function = should_be_zero_fcn
[]
[]
[Functions]
[should_be_zero_fcn]
type = ParsedFunction
expression = 'if(a<1E-3,0,a)'
symbol_names = 'a'
symbol_values = 'yield_fcn_at_zero'
[]
[]
[UserObjects]
[coh]
type = SolidMechanicsHardeningConstant
value = 1E3
[]
[tanphi]
type = SolidMechanicsHardeningConstant
value = 0.577350269
[]
[tanpsi]
type = SolidMechanicsHardeningConstant
value = 0.08748866
[]
[wps]
type = SolidMechanicsPlasticWeakPlaneShear
cohesion = coh
tan_friction_angle = tanphi
tan_dilation_angle = tanpsi
tip_scheme = cap
smoother = 100
cap_rate = 0.001
cap_start = 0.0
yield_function_tolerance = 1E-3
internal_constraint_tolerance = 1E-3
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensor
# the following is transversely isotropic, i think.
fill_method = symmetric9
C_ijkl = '3E9 1E9 3E9 3E9 3E9 6E9 1E9 1E9 9E9'
[]
[mc]
type = ComputeMultiPlasticityStress
plastic_models = wps
transverse_direction = '0 0 1'
max_NR_iterations = 100
ep_plastic_tolerance = 1E-3
debug_fspb = crash
[]
[]
[Executioner]
end_time = 1E4
dt = 1
type = Transient
[]
[Outputs]
csv = true
[]
(modules/combined/examples/geochem-porous_flow/geotes_2D/porous_flow.i)
# PorousFlow simulation of injection and production in a 2D aquifer
# Much of this file is standard porous-flow stuff. The unusual aspects are:
# - transfer of the rates of changes of each species (kg/s) to the aquifer_geochemistry.i simulation. This is achieved by saving these changes from the PorousFlowMassTimeDerivative residuals
# - transfer of the temperature field to the aquifer_geochemistry.i simulation
# Interesting behaviour can be simulated by this file without its "parent" simulation, exchanger.i. exchanger.i provides mass-fractions injected via the injection_rate_massfrac_* variables, but since these are more-or-less constant throughout the duration of the exchanger.i simulation, the initial_conditions specified below may be used. Similar, exchanger.i provides injection_temperature, but that is also constant.
injection_rate = -1.0 # kg/s/m, negative because injection as a source
production_rate = 1.0 # kg/s/m
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 14 # for better resolution, use 56 or 112
ny = 8 # for better resolution, use 32 or 64
xmin = -70
xmax = 70
ymin = -40
ymax = 40
[]
[injection_node]
input = gen
type = ExtraNodesetGenerator
new_boundary = injection_node
coord = '-30 0 0'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[f0]
initial_condition = 0.002285946
[]
[f1]
initial_condition = 0.0035252
[]
[f2]
initial_condition = 1.3741E-05
[]
[porepressure]
initial_condition = 2E6
[]
[temperature]
initial_condition = 50
scaling = 1E-6 # fluid enthalpy is roughly 1E6
[]
[]
[BCs]
[injection_temperature]
type = MatchedValueBC
variable = temperature
v = injection_temperature
boundary = injection_node
[]
[]
[DiracKernels]
[inject_Na]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
line_length = 1.0
multiplying_var = injection_rate_massfrac_Na
point_file = injection.bh
variable = f0
[]
[inject_Cl]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
line_length = 1.0
multiplying_var = injection_rate_massfrac_Cl
point_file = injection.bh
variable = f1
[]
[inject_SiO2]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
line_length = 1.0
multiplying_var = injection_rate_massfrac_SiO2
point_file = injection.bh
variable = f2
[]
[inject_H2O]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
line_length = 1.0
multiplying_var = injection_rate_massfrac_H2O
point_file = injection.bh
variable = porepressure
[]
[produce_Na]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Na
fluxes = ${production_rate}
p_or_t_vals = 0.0
line_length = 1.0
mass_fraction_component = 0
point_file = production.bh
variable = f0
[]
[produce_Cl]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Cl
fluxes = ${production_rate}
p_or_t_vals = 0.0
line_length = 1.0
mass_fraction_component = 1
point_file = production.bh
variable = f1
[]
[produce_SiO2]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_SiO2
fluxes = ${production_rate}
p_or_t_vals = 0.0
line_length = 1.0
mass_fraction_component = 2
point_file = production.bh
variable = f2
[]
[produce_H2O]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_H2O
fluxes = ${production_rate}
p_or_t_vals = 0.0
line_length = 1.0
mass_fraction_component = 3
point_file = production.bh
variable = porepressure
[]
[produce_heat]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_heat
fluxes = ${production_rate}
p_or_t_vals = 0.0
line_length = 1.0
use_enthalpy = true
point_file = production.bh
variable = temperature
[]
[]
[UserObjects]
[injected_mass]
type = PorousFlowSumQuantity
[]
[produced_mass_Na]
type = PorousFlowSumQuantity
[]
[produced_mass_Cl]
type = PorousFlowSumQuantity
[]
[produced_mass_SiO2]
type = PorousFlowSumQuantity
[]
[produced_mass_H2O]
type = PorousFlowSumQuantity
[]
[produced_heat]
type = PorousFlowSumQuantity
[]
[]
[Postprocessors]
[dt]
type = TimestepSize
execute_on = TIMESTEP_BEGIN
[]
[tot_kg_injected_this_timestep]
type = PorousFlowPlotQuantity
uo = injected_mass
[]
[kg_Na_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Na
[]
[kg_Cl_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Cl
[]
[kg_SiO2_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_SiO2
[]
[kg_H2O_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_H2O
[]
[mole_rate_Na_produced]
type = FunctionValuePostprocessor
function = moles_Na
indirect_dependencies = 'kg_Na_produced_this_timestep dt'
[]
[mole_rate_Cl_produced]
type = FunctionValuePostprocessor
function = moles_Cl
indirect_dependencies = 'kg_Cl_produced_this_timestep dt'
[]
[mole_rate_SiO2_produced]
type = FunctionValuePostprocessor
function = moles_SiO2
indirect_dependencies = 'kg_SiO2_produced_this_timestep dt'
[]
[mole_rate_H2O_produced]
type = FunctionValuePostprocessor
function = moles_H2O
indirect_dependencies = 'kg_H2O_produced_this_timestep dt'
[]
[heat_joules_extracted_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_heat
[]
[production_temperature]
type = PointValue
point = '30 0 0'
variable = temperature
[]
[]
[Functions]
[moles_Na]
type = ParsedFunction
symbol_names = 'kg_Na dt'
symbol_values = 'kg_Na_produced_this_timestep dt'
expression = 'kg_Na * 1000 / 22.9898 / dt'
[]
[moles_Cl]
type = ParsedFunction
symbol_names = 'kg_Cl dt'
symbol_values = 'kg_Cl_produced_this_timestep dt'
expression = 'kg_Cl * 1000 / 35.453 / dt'
[]
[moles_SiO2]
type = ParsedFunction
symbol_names = 'kg_SiO2 dt'
symbol_values = 'kg_SiO2_produced_this_timestep dt'
expression = 'kg_SiO2 * 1000 / 60.0843 / dt'
[]
[moles_H2O]
type = ParsedFunction
symbol_names = 'kg_H2O dt'
symbol_values = 'kg_H2O_produced_this_timestep dt'
expression = 'kg_H2O * 1000 / 18.0152 / dt'
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0
bulk_modulus = 2E9
viscosity = 1E-3
density0 = 1000
cv = 4000.0
cp = 4000.0
[]
[]
[PorousFlowFullySaturated]
coupling_type = ThermoHydro
porepressure = porepressure
temperature = temperature
mass_fraction_vars = 'f0 f1 f2'
save_component_rate_in = 'rate_Na rate_Cl rate_SiO2 rate_H2O' # change in kg at every node / dt
fp = the_simple_fluid
temperature_unit = Celsius
[]
[AuxVariables]
[injection_temperature]
initial_condition = 200
[]
[injection_rate_massfrac_Na]
initial_condition = 0.002285946
[]
[injection_rate_massfrac_Cl]
initial_condition = 0.0035252
[]
[injection_rate_massfrac_SiO2]
initial_condition = 1.3741E-05
[]
[injection_rate_massfrac_H2O]
initial_condition = 0.994175112
[]
[rate_H2O]
[]
[rate_Na]
[]
[rate_Cl]
[]
[rate_SiO2]
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst # this simulation has no porosity changes from dissolution
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0 0 0 0 0 0 0 0 0'
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
density = 2500.0
specific_heat_capacity = 1200.0
[]
[]
[Preconditioning]
active = typically_efficient
[typically_efficient]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = ' hypre boomeramg'
[]
[strong]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm ilu NONZERO 2'
[]
[probably_too_strong]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 7.76E6 # 90 days
dt = 1E5
[]
[Outputs]
exodus = true
[]
[MultiApps]
[react]
type = TransientMultiApp
input_files = aquifer_geochemistry.i
clone_master_mesh = true
execute_on = 'timestep_end'
[]
[]
[Transfers]
[changes_due_to_flow]
type = MultiAppCopyTransfer
source_variable = 'rate_H2O rate_Na rate_Cl rate_SiO2 temperature'
variable = 'pf_rate_H2O pf_rate_Na pf_rate_Cl pf_rate_SiO2 temperature'
to_multi_app = react
[]
[massfrac_from_geochem]
type = MultiAppCopyTransfer
source_variable = 'massfrac_Na massfrac_Cl massfrac_SiO2'
variable = 'f0 f1 f2'
from_multi_app = react
[]
[]
(modules/solid_mechanics/test/tests/rom_stress_update/ADverification.i)
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[temperature]
[]
[]
[AuxKernels]
[temp_aux]
type = FunctionAux
variable = temperature
function = temp_fcn
execute_on = 'initial timestep_begin'
[]
[]
[Functions]
[rhom_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 1
format = columns
xy_in_file_only = false
direction = right
[]
[rhoi_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 2
format = columns
xy_in_file_only = false
direction = right
[]
[vmJ2_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 3
format = columns
xy_in_file_only = false
direction = right
[]
[evm_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 4
format = columns
xy_in_file_only = false
direction = right
[]
[temp_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 5
format = columns
xy_in_file_only = false
direction = right
[]
[rhom_soln_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 7
format = columns
xy_in_file_only = false
direction = right
[]
[rhoi_soln_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 8
format = columns
xy_in_file_only = false
direction = right
[]
[creep_rate_soln_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 10
format = columns
xy_in_file_only = false
direction = right
[]
[rhom_diff_fcn]
type = ParsedFunction
symbol_names = 'rhom_soln rhom'
symbol_values = 'rhom_soln rhom'
expression = 'abs(rhom_soln - rhom) / rhom_soln'
[]
[rhoi_diff_fcn]
type = ParsedFunction
symbol_names = 'rhoi_soln rhoi'
symbol_values = 'rhoi_soln rhoi'
expression = 'abs(rhoi_soln - rhoi) / rhoi_soln'
[]
[creep_rate_diff_fcn]
type = ParsedFunction
symbol_names = 'creep_rate_soln creep_rate'
symbol_values = 'creep_rate_soln creep_rate'
expression = 'abs(creep_rate_soln - creep_rate) / creep_rate_soln'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
generate_output = 'vonmises_stress'
use_automatic_differentiation = true
[]
[]
[BCs]
[symmx]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0
[]
[symmy]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[symmz]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0
[]
[pressure_x]
type = ADPressure
variable = disp_x
boundary = right
function = vmJ2_fcn
factor = 0.5e6
[]
[pressure_y]
type = ADPressure
variable = disp_y
boundary = top
function = vmJ2_fcn
factor = -0.5e6
[]
[pressure_z]
type = ADPressure
variable = disp_z
boundary = front
function = vmJ2_fcn
factor = -0.5e6
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e11
poissons_ratio = 0.3
[]
[stress]
type = ADComputeMultipleInelasticStress
inelastic_models = rom_stress_prediction
[]
[rom_stress_prediction]
type = ADSS316HLAROMANCEStressUpdateTest
temperature = temperature
effective_inelastic_strain_name = effective_creep_strain
internal_solve_full_iteration_history = true
outputs = all
wall_dislocation_density_forcing_function = rhoi_fcn
cell_dislocation_density_forcing_function = rhom_fcn
old_creep_strain_forcing_function = evm_fcn
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_ksp_ew -snes_converged_reason -ksp_converged_reason'# -ksp_error_if_not_converged -snes_error_if_not_converged'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
automatic_scaling = true
compute_scaling_once = false
nl_abs_tol = 1e-10
dt = 1e-3
end_time = 1e-2
[]
[Postprocessors]
[effective_strain_avg]
type = ElementAverageValue
variable = effective_creep_strain
outputs = console
[]
[temperature]
type = ElementAverageValue
variable = temperature
outputs = console
[]
[rhom]
type = ElementAverageValue
variable = cell_dislocations
[]
[rhoi]
type = ElementAverageValue
variable = wall_dislocations
[]
[vonmises_stress]
type = ElementAverageValue
variable = vonmises_stress
outputs = console
[]
[creep_rate]
type = ElementAverageValue
variable = creep_rate
[]
[rhom_in]
type = FunctionValuePostprocessor
function = rhom_fcn
execute_on = 'TIMESTEP_END initial'
outputs = console
[]
[rhoi_in]
type = FunctionValuePostprocessor
function = rhoi_fcn
execute_on = 'TIMESTEP_END initial'
outputs = console
[]
[vmJ2_in]
type = FunctionValuePostprocessor
function = vmJ2_fcn
execute_on = 'TIMESTEP_END initial'
outputs = console
[]
[rhom_soln]
type = FunctionValuePostprocessor
function = rhom_soln_fcn
outputs = console
[]
[rhoi_soln]
type = FunctionValuePostprocessor
function = rhoi_soln_fcn
outputs = console
[]
[creep_rate_soln]
type = FunctionValuePostprocessor
function = creep_rate_soln_fcn
outputs = console
[]
[rhom_diff]
type = FunctionValuePostprocessor
function = rhom_diff_fcn
outputs = console
[]
[rhoi_diff]
type = FunctionValuePostprocessor
function = rhoi_diff_fcn
outputs = console
[]
[creep_rate_diff]
type = FunctionValuePostprocessor
function = creep_rate_diff_fcn
outputs = console
[]
[rhom_max_diff]
type = TimeExtremeValue
postprocessor = rhom_diff
outputs = console
[]
[rhoi_max_diff]
type = TimeExtremeValue
postprocessor = rhoi_diff
outputs = console
[]
[creep_rate_max_diff]
type = TimeExtremeValue
postprocessor = creep_rate_diff
outputs = console
[]
[]
[Outputs]
csv = true
file_base = 'verification_1e-3_out'
[]
(test/tests/parser/param_substitution/unit_conversion.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[u]
[]
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[km_to_m]
type = FunctionValuePostprocessor
function = '${units 1 km -> m}'
[]
[Jmol_to_eVat]
type = FunctionValuePostprocessor
function = '${units 1 J/mol -> eV/at}'
[]
[mW]
type = FunctionValuePostprocessor
function = '${units 3 mW}'
[]
[]
[Outputs]
csv = true
[]
(modules/richards/test/tests/sinks/s03.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[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]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_pressure
[../]
[../]
[]
[AuxVariables]
[./seff]
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 2
[../]
[./mass_bal_fcn]
type = ParsedFunction
expression = abs((mi-lfout-rfout-mf)/2/(mi+mf))
symbol_names = 'mi mf lfout rfout'
symbol_values = 'mass_init mass_fin left_flux_out right_flux_out'
[../]
[]
[Postprocessors]
[./mass_init]
type = RichardsMass
variable = pressure
execute_on = timestep_begin
[../]
[./mass_fin]
type = RichardsMass
variable = pressure
execute_on = timestep_end
[../]
[./left_flux_out]
type = RichardsPiecewiseLinearSinkFlux
boundary = left
variable = pressure
pressures = '-1 1'
bare_fluxes = '1E2 2E2'
use_mobility = true
use_relperm = true
[../]
[./right_flux_out]
type = RichardsPiecewiseLinearSinkFlux
boundary = right
variable = pressure
pressures = '-1 1'
bare_fluxes = '1E2 2E2'
use_mobility = true
use_relperm = true
[../]
[./p0]
type = PointValue
point = '0 0 0'
variable = pressure
[../]
[./s0]
type = PointValue
point = '0 0 0'
variable = seff
[../]
[./mass_bal]
type = FunctionValuePostprocessor
function = mass_bal_fcn
[../]
[]
[BCs]
[./left_flux]
type = RichardsPiecewiseLinearSink
boundary = left
pressures = '-1 1'
bare_fluxes = '1E2 2E2'
variable = pressure
use_mobility = true
use_relperm = true
[../]
[./right_flux]
type = RichardsPiecewiseLinearSink
boundary = right
pressures = '-1 1'
bare_fluxes = '1E2 2E2'
variable = pressure
use_mobility = true
use_relperm = true
[../]
[]
[Kernels]
active = 'richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[]
[AuxKernels]
[./seff_auxk]
type = RichardsSeffAux
variable = seff
seff_UO = SeffVG
pressure_vars = 'pressure'
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-5 2.1E-5 2.2E-5 2.1E-5 0.1E-5 3.3E-5 2.2E-5 3.3E-5 2E-5'
density_UO = DensityConstBulk
relperm_UO = RelPermPower
SUPG_UO = SUPGstandard
sat_UO = Saturation
seff_UO = SeffVG
viscosity = 1E-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-12 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 2E-3
end_time = 0.2
[]
[Outputs]
file_base = s03
csv = true
execute_on = timestep_end
[]
(modules/solid_mechanics/test/tests/rom_stress_update/3tile_json.i)
# Tests the tile and partition assembly for overlapping partitions and
# a variety of different overlapping tile conditions.
# Creep_rate should always be 2.718281828459
endtime = 1.9
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[temperature]
[]
[]
[AuxKernels]
[temp_aux]
type = FunctionAux
variable = temperature
function = temp_fcn
execute_on = 'initial timestep_begin'
[]
[]
[Functions]
[rhom_fcn]
type = PiecewiseConstant
x = '0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9'
y = '5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12 5.7e12'
direction = LEFT_INCLUSIVE
[]
[rhoi_fcn]
type = PiecewiseConstant
x = '0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9'
y = '4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11 4.83e11'
direction = LEFT_INCLUSIVE
[]
[vmJ2_fcn]
type = PiecewiseConstant
x = '0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9'
y = '25.68 25.68 45.0 55.28 63.0 67.12 85.0 85.0 85.0 85.0 85.0 85.0 55.28 63.0 67.12 63.0 63.0 55.28 96.72 63.0'
direction = LEFT_INCLUSIVE
[]
[evm_fcn]
type = PiecewiseConstant
x = '0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9'
y = '0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01'
direction = LEFT_INCLUSIVE
[]
[temp_fcn]
type = PiecewiseConstant
x = '0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9'
y = '940.0 940.0 940.0 940.0 940.0 940.0 940.0 905.0 897.0 881.0 860.0 821.0 860.0 881.0 897.0 897.0 905.0 897.0 860.0 860.0'
direction = LEFT_INCLUSIVE
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
generate_output = 'vonmises_stress'
[]
[]
[BCs]
[symmx]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[symmy]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[symmz]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[]
[pull_x]
type = DirichletBC
variable = disp_x
boundary = right
value = 1e-5 # This is required to make a non-zero effective trial stress so radial return is engaged
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
shear_modulus = 1e13
poissons_ratio = 0.3
[]
[stress]
type = ComputeMultipleInelasticStress
inelastic_models = rom_stress_prediction
[]
[rom_stress_prediction]
type = LAROMANCEPartitionStressUpdate
model = laromance/test/3tile.json
temperature = temperature
effective_inelastic_strain_name = effective_creep_strain
internal_solve_full_iteration_history = true
apply_strain = false
outputs = all
verbose = true
wall_dislocation_density_forcing_function = rhoi_fcn
cell_dislocation_density_forcing_function = rhom_fcn
old_creep_strain_forcing_function = evm_fcn
wall_input_window_low_failure = ERROR
wall_input_window_high_failure = ERROR
cell_input_window_low_failure = ERROR
cell_input_window_high_failure = ERROR
temperature_input_window_low_failure = DONOTHING
temperature_input_window_high_failure = ERROR
stress_input_window_low_failure = DONOTHING
stress_input_window_high_failure = ERROR
old_strain_input_window_low_failure = ERROR
old_strain_input_window_high_failure = ERROR
environment_input_window_low_failure = ERROR
environment_input_window_high_failure = ERROR
effective_stress_forcing_function = vmJ2_fcn
initial_cell_dislocation_density = 4.0e12
max_relative_cell_dislocation_increment = 0.5
initial_wall_dislocation_density = 5.0e12
max_relative_wall_dislocation_increment = 0.5
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_abs_tol = 1e-1 # Nothing is really being solved here, so loose tolerances are okay
dt = 0.1
end_time = ${endtime}
timestep_tolerance = 1e-3
[]
[Postprocessors]
[extrapolation]
type = ElementAverageValue
variable = ROM_extrapolation
outputs = console
[]
[old_strain_in]
type = FunctionValuePostprocessor
function = evm_fcn
execute_on = 'TIMESTEP_END initial'
outputs = console
[]
[temperature]
type = ElementAverageValue
variable = temperature
[]
[partition_weight]
type = ElementAverageMaterialProperty
mat_prop = partition_weight
[]
[rhom_in]
type = FunctionValuePostprocessor
function = rhom_fcn
execute_on = 'TIMESTEP_END initial'
outputs = console
[]
[rhoi_in]
type = FunctionValuePostprocessor
function = rhoi_fcn
execute_on = 'TIMESTEP_END initial'
outputs = console
[]
[vmJ2_in]
type = FunctionValuePostprocessor
function = vmJ2_fcn
execute_on = 'TIMESTEP_END initial'
[]
[creep_rate]
type = ElementAverageMaterialProperty
mat_prop = creep_rate
[]
[rhom_rate]
type = ElementAverageMaterialProperty
mat_prop = cell_dislocation_rate
[]
[rhoi_rate]
type = ElementAverageMaterialProperty
mat_prop = wall_dislocation_rate
[]
[]
[Outputs]
csv = true
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
(modules/fluid_properties/test/tests/temperature_pressure_function/exact.i)
# Test implementation of TemperaturePressureFunctionFluidProperties properties by comparison to analytical functions.
cv = 4000
T_initial = 400
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Problem]
solve = false
[]
[AuxVariables]
[temperature]
initial_condition = ${T_initial}
[]
[pressure]
initial_condition = 1e5
[]
[]
[Functions]
# This demonstrates how to define fluid properties that are functions
# of an integral quantity (through a postprocessor) of the (p,T) variable. See example.i in this
# same folder for defining fluid properties that are functions of the
# LOCAL value of the (p,T) variables
[k]
type = ParsedFunction
symbol_names = 'T p'
symbol_values = 'temperature pressure'
expression = '14 + 1e-2 * T + 1e-5 * p'
[]
[rho]
type = ParsedFunction
symbol_names = 'T p'
symbol_values = 'temperature pressure'
expression = '1.5e3 + 0.13 * T - 1.5e-4 * p'
[]
[mu]
type = ParsedFunction
symbol_names = 'T p'
symbol_values = 'temperature pressure'
expression = '1e-3 + 2e-6 * T - 3e-9 * p'
[]
[]
[FluidProperties]
[fp]
type = TemperaturePressureFunctionFluidProperties
cv = ${cv}
k = k
rho = rho
mu = mu
[]
[]
[Materials]
[to_vars]
type = FluidPropertiesMaterialPT
fp = fp
outputs = 'all'
output_properties = 'density k cp cv viscosity e h'
pressure = pressure
temperature = temperature
compute_entropy = false
compute_sound_speed = false
[]
[]
[Executioner]
type = Transient
num_steps = 2
[]
[Postprocessors]
# Postprocessors to get from the functions used as fluid properties
[temperature]
type = ElementAverageValue
variable = temperature
outputs = none
[]
[pressure]
type = ElementAverageValue
variable = pressure
outputs = none
[]
[k_exact]
type = FunctionValuePostprocessor
function = k
outputs = none
[]
[rho_exact]
type = FunctionValuePostprocessor
function = rho
outputs = none
[]
[mu_exact]
type = FunctionValuePostprocessor
function = mu
outputs = none
[]
[e_exact]
type = Receiver
default = '${fparse cv * T_initial}'
outputs = none
[]
[cv_exact]
type = Receiver
default = '${fparse cv}'
outputs = none
[]
# Postprocessors to get from the fluid property object
[k_avg]
type = ElementAverageValue
variable = k
outputs = none
[]
[rho_avg]
type = ElementAverageValue
variable = density
outputs = none
[]
[mu_avg]
type = ElementAverageValue
variable = viscosity
outputs = none
[]
[cv_avg]
type = ElementAverageValue
variable = cv
outputs = none
[]
[e_avg]
type = ElementAverageValue
variable = e
outputs = none
[]
# We output these directly, cant compare to anything analytical though
[cp_avg]
type = ElementAverageValue
variable = cp
[]
[h_avg]
type = ElementAverageValue
variable = h
[]
# Postprocessors to compare the two
[k_diff]
type = DifferencePostprocessor
value1 = k_exact
value2 = k_avg
[]
[mu_diff]
type = DifferencePostprocessor
value1 = mu_exact
value2 = mu_avg
[]
[rho_avg_diff]
type = DifferencePostprocessor
value1 = rho_exact
value2 = rho_avg
[]
[e_diff]
type = DifferencePostprocessor
value1 = e_exact
value2 = e_avg
[]
[cv_diff]
type = DifferencePostprocessor
value1 = cv_exact
value2 = cv_avg
[]
[]
[Outputs]
# Note that diffs wont be settled until timestep 2 because of order of execution
csv = true
[]
(modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined.i)
# A sample is constrained on all sides, except its top
# and its boundaries are
# also impermeable. Fluid is pumped into the sample via a
# volumetric source (ie kg/second per cubic meter), and the
# rise in the top surface, porepressure, and stress are observed.
#
# In the standard poromechanics scenario, the Biot Modulus is held
# fixed and the source has units 1/time. Then the expected result
# is
# strain_zz = disp_z = BiotCoefficient*BiotModulus*s*t/((bulk + 4*shear/3) + BiotCoefficient^2*BiotModulus)
# porepressure = BiotModulus*(s*t - BiotCoefficient*strain_zz)
# stress_xx = (bulk - 2*shear/3)*strain_zz (remember this is effective stress)
# stress_zz = (bulk + 4*shear/3)*strain_zz (remember this is effective stress)
#
# In porous_flow, however, the source has units kg/s/m^3 and the
# Biot Modulus is not held fixed. This means that disp_z, porepressure,
# etc are not linear functions of t. Nevertheless, the ratios remain
# fixed:
# stress_xx/strain_zz = (bulk - 2*shear/3) = 1 (for the parameters used here)
# stress_zz/strain_zz = (bulk + 4*shear/3) = 4 (for the parameters used here)
# porepressure/strain_zz = 13.3333333 (for the parameters used here)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.8
alpha = 1e-5
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back'
[]
[]
[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 = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
variable = disp_x
component = 0
[]
[poro_y]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
variable = disp_y
component = 1
[]
[poro_z]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
component = 2
variable = disp_z
[]
[poro_vol_exp]
type = PorousFlowMassVolumetricExpansion
variable = porepressure
fluid_component = 0
[]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = porepressure
[]
[flux]
type = PorousFlowAdvectiveFlux
variable = porepressure
gravity = '0 0 0'
fluid_component = 0
[]
[source]
type = BodyForce
function = 0.1
variable = porepressure
[]
[]
[AuxVariables]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xz]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_yz]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 3.3333333333
density0 = 1
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
[]
[stress]
type = ComputeLinearElasticStress
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
porosity_zero = 0.1
biot_coefficient = 0.3
solid_bulk = 2
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 1 0 0 0 1' # unimportant
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[]
[]
[Postprocessors]
[p0]
type = PointValue
outputs = none
point = '0 0 0'
variable = porepressure
[]
[zdisp]
type = PointValue
outputs = none
point = '0 0 0.5'
variable = disp_z
[]
[stress_xx]
type = PointValue
outputs = none
point = '0 0 0'
variable = stress_xx
[]
[stress_yy]
type = PointValue
outputs = none
point = '0 0 0'
variable = stress_yy
[]
[stress_zz]
type = PointValue
outputs = none
point = '0 0 0'
variable = stress_zz
[]
[stress_xx_over_strain]
type = FunctionValuePostprocessor
function = stress_xx_over_strain_fcn
outputs = csv
[]
[stress_zz_over_strain]
type = FunctionValuePostprocessor
function = stress_zz_over_strain_fcn
outputs = csv
[]
[p_over_strain]
type = FunctionValuePostprocessor
function = p_over_strain_fcn
outputs = csv
[]
[]
[Functions]
[stress_xx_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'stress_xx zdisp'
[]
[stress_zz_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'stress_zz zdisp'
[]
[p_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'p0 zdisp'
[]
[]
[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-14 1E-10 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = pp_generation_unconfined
[csv]
type = CSV
[]
[]
(modules/solid_mechanics/test/tests/recompute_radial_return/affine_plasticity.i)
# Affine Plasticity Test for Transient Stress Eigenvalues with Stationary Eigenvectors
# This test is taken from K. Jamojjala, R. Brannon, A. Sadeghirad, J. Guilkey,
# "Verification tests in solid mechanics," Engineering with Computers, Vol 31.,
# p. 193-213.
# The test involves applying particular strains and expecting particular stresses.
# The material properties are:
# Yield in shear 165 MPa
# Shear modulus 79 GPa
# Poisson's ratio 1/3
# The strains are:
# Time e11 e22 e33
# 0 0 0 0
# 1 -0.003 -0.003 0.006
# 2 -0.0103923 0 0.0103923
# The expected stresses are:
# sigma11:
# -474*t 0 < t <= 0.201
# -95.26 0.201 < t <= 1
# (189.4+0.1704*sqrt(a)-0.003242*a)
# --------------------------------- 1 < t <= 2
# 1+0.00001712*a
# -189.4 t > 2 (paper erroneously gives a positive value)
#
# sigma22:
# -474*t 0 < t <= 0.201
# -95.26 0.201 < t <= 1
# -(76.87+1.443*sqrt(a)-0.001316*a)
# --------------------------------- 1 < t <= 2 (paper gives opposite sign)
# 1+0.00001712*a
# 76.87 t > 2
#
# sigma33:
# 948*t 0 < t <= 0.201
# 190.5 0.201 < t <= 1
# -(112.5-1.272*sqrt(a)-0.001926*a)
# --------------------------------- 1 < t <= 2 (paper has two sign errors here)
# 1+0.00001712*a
# 112.5 t > 2
#
# where a = exp(12.33*t).
#
# Note: If planning to run this case with strain type ComputeFiniteStrain, the
# displacement function must be adjusted. Instead of
# strain = (l - l0)/l0 = (u+l0 - l0)/l0 = u/l0
# with l0=1.0, we would have
# strain = log(l/l0) = log((u+l0)/l0)
# with l0=1.0. So, for strain = -0.003,
# -0.003 = log((u+l0)/l0) ->
# u = exp(-0.003)*l0 - l0 = -0.0029955044966269995.
#
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
block = '0'
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
# This test uses ElementalVariableValue postprocessors on specific
# elements, so element numbering needs to stay unchanged
allow_renumbering = false
[]
[Functions]
[./disp_x]
type = PiecewiseLinear
x = '0. 1. 2.'
y = '0. -0.003 -0.0103923'
[../]
[./disp_y]
type = PiecewiseLinear
x = '0. 1. 2.'
y = '0. -0.003 0.'
[../]
[./disp_z]
type = PiecewiseLinear
x = '0. 1. 2.'
y = '0. 0.006 0.0103923'
[../]
[./stress_xx]
type = ParsedFunction
# The paper gives 0.201 as the time at initial yield, but 0.20097635952803425 is the exact value.
# The paper gives -95.26 MPa as the stress at yield, but -95.26279441628823 is the exact value.
# The paper gives 12.33 as the factor in the exponential, but 12.332921390339125 is the exact value.
# 189.409039923814000, 0.170423791206825, -0.003242011311945, 1.711645501845780E-05 - exact values
symbol_names = 'timeAtYield stressAtYield expFac a b c d'
symbol_values = '0.20097635952803425 -95.26279441628823 12.332921390339125 189.409039923814000 0.170423791206825 -0.003242011311945 1.711645501845780E-05'
value = '1e6*
if(t<=timeAtYield, -474*t,
if(t<=1, stressAtYield,
(a+b*sqrt(exp(expFac*t))+c*exp(expFac*t))/(1.0+d*exp(expFac*t))))' # tends to -a
[../]
[./stress_yy]
type = ParsedFunction
# The paper gives 0.201 as the time at initial yield, but 0.20097635952803425 is the exact value.
# the paper gives -95.26 MPa as the stress at yield, but -95.26279441628823 is the exact value.
# The paper gives 12.33 as the factor in the exponential, but 12.332921390339125 is the exact value.
# -76.867432297315000, -1.442488120272900, 0.001315697947301, 1.711645501845780E-05 - exact values
symbol_names = 'timeAtYield stressAtYield expFac a b c d'
symbol_values = '0.20097635952803425 -95.26279441628823 12.332921390339125 -76.867432297315000 -1.442488120272900 0.001315697947301 1.711645501845780E-05'
value = '1e6*
if(t<=timeAtYield, -474*t,
if(t<=1, stressAtYield,
(a+b*sqrt(exp(expFac*t))+c*exp(expFac*t))/(1.0+d*exp(expFac*t))))' # tends to -a
[../]
[./stress_zz]
type = ParsedFunction
# The paper gives 0.201 as the time at initial yield, but 0.20097635952803425 is the exact value.
# the paper gives 190.5 MPa as the stress at yield, but 190.52558883257645 is the exact value.
# The paper gives 12.33 as the factor in the exponential, but 12.332921390339125 is the exact value.
# -112.541607626499000, 1.272064329066080, 0.001926313364644, 1.711645501845780E-05 - exact values
symbol_names = 'timeAtYield stressAtYield expFac a b c d'
symbol_values = '0.20097635952803425 190.52558883257645 12.332921390339125 -112.541607626499000 1.272064329066080 0.001926313364644 1.711645501845780E-05'
value = '1e6*
if(t<=timeAtYield, 948*t,
if(t<=1, stressAtYield,
(a+b*sqrt(exp(expFac*t))+c*exp(expFac*t))/(1.0+d*exp(expFac*t))))' # tends to -a
[../]
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./vonmises]
order = CONSTANT
family = MONOMIAL
[../]
[./plastic_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./plastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./plastic_strain_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[SolidMechanics]
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = 'timestep_end'
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = 'timestep_end'
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
execute_on = 'timestep_end'
[../]
[./vonmises]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = vonmises
scalar_type = vonmisesStress
execute_on = 'timestep_end'
[../]
[./plastic_strain_xx]
type = RankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xx
index_i = 0
index_j = 0
execute_on = 'timestep_end'
[../]
[./plastic_strain_yy]
type = RankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_yy
index_i = 1
index_j = 1
execute_on = 'timestep_end'
[../]
[./plastic_strain_zz]
type = RankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_zz
index_i = 2
index_j = 2
execute_on = 'timestep_end'
[../]
[]
[BCs]
[./fixed_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./fixed_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./fixed_z]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[./disp_x]
type = FunctionDirichletBC
variable = disp_x
boundary = right
function = disp_x
[../]
[./disp_y]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = disp_y
[../]
[./disp_z]
type = FunctionDirichletBC
variable = disp_z
boundary = front
function = disp_z
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 210666666666.666667
poissons_ratio = 0.3333333333333333
[../]
[./strain]
type = ComputeIncrementalSmallStrain
[../]
[./isotropic_plasticity]
type = IsotropicPlasticityStressUpdate
yield_stress = 285788383.2488647 # = sqrt(3)*165e6 = sqrt(3) * yield in shear
hardening_constant = 0.0
[../]
[./radial_return_stress]
type = ComputeMultipleInelasticStress
tangent_operator = elastic
inelastic_models = 'isotropic_plasticity'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_abs_tol = 1e-10
l_max_its = 20
start_time = 0.0
dt = 0.01 # use 0.0001 for a nearly exact match
end_time = 2.0
[]
[Postprocessors]
[./analytic_xx]
type = FunctionValuePostprocessor
function = stress_xx
[../]
[./analytic_yy]
type = FunctionValuePostprocessor
function = stress_yy
[../]
[./analytic_zz]
type = FunctionValuePostprocessor
function = stress_zz
[../]
[./stress_xx]
type = ElementalVariableValue
variable = stress_xx
elementid = 0
[../]
[./stress_yy]
type = ElementalVariableValue
variable = stress_yy
elementid = 0
[../]
[./stress_zz]
type = ElementalVariableValue
variable = stress_zz
elementid = 0
[../]
[./stress_xx_l2_error]
type = ElementL2Error
variable = stress_xx
function = stress_xx
[../]
[./stress_yy_l2_error]
type = ElementL2Error
variable = stress_yy
function = stress_yy
[../]
[./stress_zz_l2_error]
type = ElementL2Error
variable = stress_zz
function = stress_zz
[../]
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/hysteresis/hys_order_04.i)
# Test that PorousFlowHysteresisOrder correctly calculates hysteresis order
# Hysteresis order is initialised = 3, with turning points = (0.5, 0.9, 0.6)
# Initial saturation is 0.71
# Water is removed from the system (so order = 3) until saturation = 0.6
# Water is removed from the system (so order = 2) until saturation = 0.5
# Water is removed from the system (so order = 0)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = -9E5
[]
[]
[PorousFlowUnsaturated]
porepressure = pp
fp = simple_fluid
[]
[DiracKernels]
[source_sink_0]
type = PorousFlowPointSourceFromPostprocessor
point = '0 0 0'
mass_flux = sink_strength
variable = pp
[]
[source_sink_1]
type = PorousFlowPointSourceFromPostprocessor
point = '1 0 0'
mass_flux = sink_strength
variable = pp
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 1.0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0 0 0 0 0 0 0 0 0'
[]
[hys_order]
type = PorousFlowHysteresisOrder
initial_order = 3
previous_turning_points = '0.5 0.9 0.6'
[]
[]
[AuxVariables]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[tp0]
family = MONOMIAL
order = CONSTANT
[]
[tp1]
family = MONOMIAL
order = CONSTANT
[]
[tp2]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[tp0]
type = PorousFlowPropertyAux
variable = tp0
property = hysteresis_saturation_turning_point
hysteresis_turning_point = 0
[]
[tp1]
type = PorousFlowPropertyAux
variable = tp1
property = hysteresis_saturation_turning_point
hysteresis_turning_point = 1
[]
[tp2]
type = PorousFlowPropertyAux
variable = tp2
property = hysteresis_saturation_turning_point
hysteresis_turning_point = 2
[]
[]
[Functions]
[sink_strength_fcn]
type = ParsedFunction
expression = '-30'
[]
[]
[Postprocessors]
[sink_strength]
type = FunctionValuePostprocessor
function = sink_strength_fcn
outputs = 'none'
[]
[saturation]
type = PointValue
point = '0 0 0'
variable = saturation0
[]
[hys_order]
type = PointValue
point = '0 0 0'
variable = hys_order
[]
[tp0]
type = PointValue
point = '0 0 0'
variable = tp0
[]
[tp1]
type = PointValue
point = '0 0 0'
variable = tp1
[]
[tp2]
type = PointValue
point = '0 0 0'
variable = tp2
[]
[]
[Preconditioning]
[basic]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 6
nl_abs_tol = 1E-7
[]
[Outputs]
[csv]
type = CSV
[]
[]
(test/tests/controls/output/controllable.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
elem_type = QUAD4
uniform_refine = 4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 3
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[DiracKernels]
[./test_object]
type = MaterialPointSource
point = '0.5 0.5 0'
variable = u
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'matp'
prop_values = '1'
block = 0
[../]
[]
[Postprocessors]
[./test_object]
type = FunctionValuePostprocessor
function = '2*(x+y)'
point = '0.5 0.5 0'
[../]
[./other_point_test_object]
type = FunctionValuePostprocessor
function = '3*(x+y)'
point = '0.5 0.5 0'
[../]
[]
[Outputs]
[./controls]
type = ControlOutput
clear_after_output = false
[../]
[]
[Controls]
[./point_control]
type = TestControl
test_type = 'point'
parameter = '*/*/point'
execute_on = 'initial'
[../]
[]
(modules/porous_flow/test/tests/energy_conservation/heat04_fullysat_action.i)
# heat04, but using an action
#
# The sample is a single unit element, with fixed displacements on
# all sides. A heat source of strength S (J/m^3/s) is applied into
# the element. There is no fluid flow or heat flow. The rise
# in temperature, porepressure and stress, and the change in porosity is
# matched with theory.
#
# In this case, fluid mass must be conserved, and there is no
# volumetric strain, so
# porosity * fluid_density = constant
# Also, the energy-density in the rock-fluid system increases with S:
# d/dt [(1 - porosity) * rock_density * rock_heat_cap * T + porosity * fluid_density * fluid_heat_cap * T] = S
# Also, the porosity evolves according to THM as
# porosity = biot + (porosity0 - biot) * exp( (biot - 1) * P / fluid_bulk + rock_thermal_exp * T)
# Finally, the effective stress must be exactly zero (as there is
# no strain).
#
# Let us assume that
# fluid_density = dens0 * exp(P / fluid_bulk - fluid_thermal_exp * T)
# Then the conservation of fluid mass means
# porosity = por0 * exp(- P / fluid_bulk + fluid_thermal_exp * T)
# where dens0 * por0 = the initial fluid mass.
# The last expression for porosity, combined with the THM one,
# and assuming that biot = 1 for simplicity, gives
# porosity = 1 + (porosity0 - 1) * exp(rock_thermal_exp * T) = por0 * exp(- P / fluid_bulk + fluid_thermal_exp * T) .... (A)
#
# This stuff may be substituted into the heat energy-density equation:
# S = d/dt [(1 - porosity0) * exp(rock_thermal_exp * T) * rock_density * rock_heat_cap * T + porosity * fluid_density * fluid_heat_cap * T]
#
# If S is constant then
# S * t = (1 - porosity0) * exp(rock_thermal_exp * T) * rock_density * rock_heat_cap * T + porosity * fluid_density * fluid_heat_cap * T
# with T(t=0) = 0 then Eqn(A) implies that por0 = porosity0 and
# P / fluid_bulk = fluid_thermal_exp * T - log(1 + (por0 - 1) * exp(rock_thermal_exp * T)) + log(por0)
#
# Parameters:
# A = 2
# fluid_bulk = 2.0
# dens0 = 3.0
# fluid_thermal_exp = 0.5
# fluid_heat_cap = 2
# por0 = 0.5
# rock_thermal_exp = 0.25
# rock_density = 5
# rock_heat_capacity = 0.2
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.5
cv = 2
cp = 2
bulk_modulus = 2.0
density0 = 3.0
[]
[]
[PorousFlowFullySaturated]
coupling_type = ThermoHydroMechanical
displacements = 'disp_x disp_y disp_z'
porepressure = pp
temperature = temp
dictator_name = Sir
biot_coefficient = 1.0
gravity = '0 0 0'
fp = the_simple_fluid
stabilization = none
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = Sir
block = 0
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[pp]
[]
[temp]
[]
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[]
[]
[Kernels]
[heat_source]
type = BodyForce
function = 1
variable = temp
[]
[]
[Functions]
[err_T_fcn]
type = ParsedFunction
symbol_names = 'por0 rte temp rd rhc m0 fhc source'
symbol_values = '0.5 0.25 t0 5 0.2 1.5 2 1'
expression = '((1-por0)*exp(rte*temp)*rd*rhc*temp+m0*fhc*temp-source*t)/(source*t)'
[]
[err_pp_fcn]
type = ParsedFunction
symbol_names = 'por0 rte temp rd rhc m0 fhc source bulk pp fte'
symbol_values = '0.5 0.25 t0 5 0.2 1.5 2 1 2 p0 0.5'
expression = '(bulk*(fte*temp-log(1+(por0-1)*exp(rte*temp))+log(por0))-pp)/pp'
[]
[]
[AuxVariables]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = ComputeLinearElasticStress
[]
[porosity]
type = PorousFlowPorosity
thermal = true
fluid = true
mechanical = true
ensure_positive = false
biot_coefficient = 1.0
porosity_zero = 0.5
thermal_expansion_coeff = 0.25
solid_bulk = 2
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 0.2
density = 5.0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0 0 0 0 0 0 0 0 0'
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0 0 0 0 0 0 0 0 0'
[]
[]
[Postprocessors]
[p0]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = pp
[]
[t0]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = temp
[]
[porosity]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = porosity
[]
[stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[]
[stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[]
[stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[]
[fluid_mass]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'timestep_end'
outputs = 'console csv'
[]
[total_heat]
type = PorousFlowHeatEnergy
phase = 0
execute_on = 'timestep_end'
outputs = 'console csv'
[]
[err_T]
type = FunctionValuePostprocessor
function = err_T_fcn
[]
[err_P]
type = FunctionValuePostprocessor
function = err_pp_fcn
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-12 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 5
[]
[Outputs]
execute_on = 'initial timestep_end'
file_base = heat04_fullysat_action
csv = true
[]
(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
[]
(modules/richards/test/tests/dirac/bh09.i)
# fully-saturated
# production
# with anisotropic permeability
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./Seff1VG]
type = RichardsSeff1VG
m = 0.8
al = 1E-5
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0
sum_s_res = 0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E8
[../]
[./borehole_total_outflow_mass]
type = RichardsSumQuantity
[../]
[]
[Variables]
active = 'pressure'
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./p_ic]
type = FunctionIC
variable = pressure
function = initial_pressure
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
variable = pressure
[../]
[]
[DiracKernels]
[./bh]
type = RichardsBorehole
bottom_pressure = 0
point_file = bh02.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pressure
unit_weight = '0 0 0'
character = 1
[../]
[]
[Postprocessors]
[./bh_report]
type = RichardsPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = RichardsMass
variable = pressure
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = RichardsMass
variable = pressure
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
indirect_dependencies = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[./p0]
type = PointValue
variable = pressure
point = '1 1 1'
execute_on = timestep_end
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 1E7
[../]
[./mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = 0
viscosity = 1E-3
mat_porosity = 0.1
mat_permeability = '2E-12 1E-12 0 1E-12 2E-12 0 0 0 1E-12'
density_UO = DensityConstBulk
relperm_UO = RelPermPower
sat_UO = Saturation
seff_UO = Seff1VG
SUPG_UO = SUPGstandard
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = Seff1VG
pressure_vars = pressure
[../]
[]
[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 = 0.5
dt = 1E-2
solve_type = NEWTON
[]
[Outputs]
file_base = bh09
exodus = false
csv = true
execute_on = timestep_end
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_radiation/cylinder.i)
#
# This problem is one of radiation boundary conditions between two
# cylindrical surfaces.
#
# S(T1^4 - T2^4) R1
# flux1 = - ---------------- and flux2 = -flux1 * --
# 1 1 - e2 R1 R2
# -- + ------ * --
# e1 e2 R2
#
# where S is the Stefan Boltzmann constant 5.67e-8 W/m^2/K^4
# T1 is the temperature on the left surface 278 K
# T2 is the temperature on the right surface 333 K
# e1 is the emissivity for the left surface 0.8
# e2 is the emissivity for the left surface 0.9
# R1 is the radius of the inner surface 0.1 m
# R2 is the radius of the outer surface 0.11 m
#
# Flux1:
# Exact Code
# ------------- -------------
# -265.29 W/m^2 -265.26 W/m^2
#
# Flux2:
# Exact Code
# ------------- -------------
# 241.26 W/m^2 241.15 W/m^2
#
thick = 0.01
R1 = 0.1
R2 = 0.11
[GlobalParams]
order = second
family = lagrange
[]
[Mesh]
coord_type = RZ
[mesh1]
type = GeneratedMeshGenerator
dim = 2
elem_type = quad8
nx = 4
ny = 1
xmin = '${fparse R1 - thick}'
xmax = '${R1}'
ymin = 0
ymax = '${R1}'
boundary_name_prefix = left
[]
[mesh2]
type = GeneratedMeshGenerator
dim = 2
elem_type = quad8
nx = 4
ny = 1
xmin = '${R2}'
xmax = '${fparse R2 + thick}'
ymin = 0
ymax = '${R1}'
boundary_id_offset = 4
boundary_name_prefix = right
[]
[final]
type = CombinerGenerator
inputs = 'mesh1 mesh2'
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temperature
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temperature
boundary = left_left
value = 278
[]
[right]
type = DirichletBC
variable = temperature
boundary = right_right
value = 333
[]
[]
[Materials]
[heat]
type = HeatConductionMaterial
thermal_conductivity = 200 # W/m/K
specific_heat = 4.2e5
[]
[]
[ThermalContact]
[thermal_contact]
type = GapHeatTransfer
variable = temperature
primary = left_right
secondary = right_left
emissivity_primary = 0.8
emissivity_secondary = 0.9
quadrature = true
gap_conductivity = 1e-40 # requires a positive value
gap_geometry_type = cylinder
[]
[]
[Functions]
[analytic_flux_1]
type = ParsedFunction
symbol_names = 'S T1 T2 e1 e2 R1 R2'
symbol_values = '5.67e-8 278 333 0.8 0.9 ${R1} ${R2}'
expression = 'T14 := T1*T1*T1*T1;
T24 := T2*T2*T2*T2;
S*(T14-T24)/(1/e1+(1-e2)/e2*R1/R2)'
[]
[analytic_flux_2]
type = ParsedFunction
symbol_names = 'S T1 T2 e1 e2 R1 R2'
symbol_values = '5.67e-8 278 333 0.8 0.9 ${R1} ${R2}'
expression = 'T14 := T1*T1*T1*T1;
T24 := T2*T2*T2*T2;
-S*(T14-T24)/(1/e1+(1-e2)/e2*R1/R2)*R1/R2'
[]
[]
[Postprocessors]
[code_flux_1]
type = SideDiffusiveFluxAverage
variable = temperature
boundary = left_right
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[]
[analytic_flux_1]
type = FunctionValuePostprocessor
function = analytic_flux_1
execute_on = 'initial timestep_end'
[]
[error_1]
type = ParsedPostprocessor
pp_names = 'code_flux_1 analytic_flux_1'
function = '(analytic_flux_1 - code_flux_1)/analytic_flux_1*100'
execute_on = 'initial timestep_end'
[]
[code_flux_2]
type = SideDiffusiveFluxAverage
variable = temperature
boundary = right_left
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[]
[analytic_flux_2]
type = FunctionValuePostprocessor
function = analytic_flux_2
execute_on = 'initial timestep_end'
[]
[error_2]
type = ParsedPostprocessor
pp_names = 'code_flux_2 analytic_flux_2'
function = '(analytic_flux_2 - code_flux_2)/analytic_flux_2*100'
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = newton
num_steps = 1
dt = 1
end_time = 1
nl_abs_tol = 1e-12
nl_rel_tol = 1e-10
[]
[Outputs]
csv = true
[]
(modules/fluid_properties/test/tests/functions/saturation_density_function/saturation_density_function.i)
# Tests SaturationDensityFunction.
# The gold values are computed as follows:
# T = 5
# p_sat = 3 T = 15
# liquid: rho(p_sat, T) = 0.01046369844
# vapor: rho(p_sat, T) = 0.01804085937
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[FluidProperties]
[fp_liquid]
type = IdealGasFluidProperties
[]
[fp_vapor]
type = IdealGasFluidProperties
molar_mass = 0.05
[]
[fp_2phase]
type = TestTwoPhaseFluidProperties
fp_liquid = fp_liquid
fp_vapor = fp_vapor
[]
[]
[Functions]
[T]
type = ConstantFunction
value = 5
[]
[rho_sat_fn]
type = SaturationDensityFunction
T = T
fp_2phase = fp_2phase
use_liquid = true
[]
[]
[Postprocessors]
[rho_sat_pp]
type = FunctionValuePostprocessor
function = rho_sat_fn
execute_on = 'INITIAL'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
file_base = liquid
execute_on = 'INITIAL'
[]
(modules/richards/test/tests/sinks/s05.i)
# checking the multiplying_fcn of RichardsPiecewiseLinearSinkFlux.
# This test is constructed so it should produce exactly the same answer as s02.i
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[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 PETScs 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]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_pressure
[../]
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 2
[../]
[./mass_bal_fcn]
type = ParsedFunction
expression = abs((mi-lfout-rfout-mf)/2/(mi+mf))
symbol_names = 'mi mf lfout rfout'
symbol_values = 'mass_init mass_fin left_flux_out right_flux_out'
[../]
[]
[Postprocessors]
[./mass_init]
type = RichardsMass
variable = pressure
execute_on = timestep_begin
[../]
[./mass_fin]
type = RichardsMass
variable = pressure
execute_on = timestep_end
[../]
[./left_flux_out]
type = RichardsHalfGaussianSinkFlux
boundary = left
variable = pressure
centre = 1
max = 4
multiplying_fcn = 0.5
sd = 1
[../]
[./right_flux_out]
type = RichardsHalfGaussianSinkFlux
boundary = right
variable = pressure
centre = 1
max = 1
multiplying_fcn = 2
sd = 1
[../]
[./p0]
type = PointValue
point = '0 0 0'
variable = pressure
[../]
[./mass_bal]
type = FunctionValuePostprocessor
function = mass_bal_fcn
[../]
[]
[BCs]
[./left_flux]
type = RichardsHalfGaussianSink
boundary = left
variable = pressure
centre = 1
max = 2
sd = 1
[../]
[./right_flux]
type = RichardsHalfGaussianSink
boundary = right
variable = pressure
centre = 1
max = 2
sd = 1
[../]
[]
[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'
density_UO = DensityConstBulk
relperm_UO = RelPermPower
SUPG_UO = SUPGstandard
sat_UO = Saturation
seff_UO = SeffVG
viscosity = 1E-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-12 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 4E-3
end_time = 0.4
[]
[Outputs]
file_base = s05
csv = true
execute_on = timestep_end
[]
(modules/porous_flow/test/tests/poro_elasticity/mandel_basicthm.i)
# using a BasicTHM Action
#
# Mandel's problem of consolodation of a drained medium
# Using the FullySaturatedDarcyBase and FullySaturatedFullySaturatedMassTimeDerivative kernels
# with multiply_by_density = false, so that this problem becomes linear
#
# A sample is in plane strain.
# -a <= x <= a
# -b <= y <= b
# It is squashed with constant force by impermeable, frictionless plattens on its top and bottom surfaces (at y=+/-b)
# Fluid is allowed to leak out from its sides (at x=+/-a)
# The porepressure within the sample is monitored.
#
# As is common in the literature, this is simulated by
# considering the quarter-sample, 0<=x<=a and 0<=y<=b, with
# impermeable, roller BCs at x=0 and y=0 and y=b.
# Porepressure is fixed at zero on x=a.
# Porepressure and displacement are initialised to zero.
# Then the top (y=b) is moved downwards with prescribed velocity,
# so that the total force that is inducing this downwards velocity
# is fixed. The velocity is worked out by solving Mandel's problem
# analytically, and the total force is monitored in the simulation
# to check that it indeed remains constant.
#
# Here are the problem's parameters, and their values:
# Soil width. a = 1
# Soil height. b = 0.1
# Soil's Lame lambda. la = 0.5
# Soil's Lame mu, which is also the Soil's shear modulus. mu = G = 0.75
# Soil bulk modulus. K = la + 2*mu/3 = 1
# Drained Poisson ratio. nu = (3K - 2G)/(6K + 2G) = 0.2
# Soil bulk compliance. 1/K = 1
# Fluid bulk modulus. Kf = 8
# Fluid bulk compliance. 1/Kf = 0.125
# Soil initial porosity. phi0 = 0.1
# Biot coefficient. alpha = 0.6
# Biot modulus. M = 1/(phi0/Kf + (alpha - phi0)(1 - alpha)/K) = 4.705882
# Undrained bulk modulus. Ku = K + alpha^2*M = 2.694118
# Undrained Poisson ratio. nuu = (3Ku - 2G)/(6Ku + 2G) = 0.372627
# Skempton coefficient. B = alpha*M/Ku = 1.048035
# Fluid mobility (soil permeability/fluid viscosity). k = 1.5
# Consolidation coefficient. c = 2*k*B^2*G*(1-nu)*(1+nuu)^2/9/(1-nuu)/(nuu-nu) = 3.821656
# Normal stress on top. F = 1
#
# The solution for porepressure and displacements is given in
# AHD Cheng and E Detournay "A direct boundary element method for plane strain poroelasticity" International Journal of Numerical and Analytical Methods in Geomechanics 12 (1988) 551-572.
# The solution involves complicated infinite series, so I shall not write it here
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 0.1
zmin = 0
zmax = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[]
[BCs]
[roller_xmin]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left'
[]
[roller_ymin]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom'
[]
[plane_strain]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[]
[xmax_drained]
type = DirichletBC
variable = porepressure
value = 0
boundary = right
[]
[top_velocity]
type = FunctionDirichletBC
variable = disp_y
function = top_velocity
boundary = top
[]
[]
[Functions]
[top_velocity]
type = PiecewiseLinear
x = '0 0.002 0.006 0.014 0.03 0.046 0.062 0.078 0.094 0.11 0.126 0.142 0.158 0.174 0.19 0.206 0.222 0.238 0.254 0.27 0.286 0.302 0.318 0.334 0.35 0.366 0.382 0.398 0.414 0.43 0.446 0.462 0.478 0.494 0.51 0.526 0.542 0.558 0.574 0.59 0.606 0.622 0.638 0.654 0.67 0.686 0.702'
y = '-0.041824842 -0.042730269 -0.043412712 -0.04428867 -0.045509181 -0.04645965 -0.047268246 -0.047974749 -0.048597109 -0.0491467 -0.049632388 -0.050061697 -0.050441198 -0.050776675 -0.051073238 -0.0513354 -0.051567152 -0.051772022 -0.051953128 -0.052113227 -0.052254754 -0.052379865 -0.052490464 -0.052588233 -0.052674662 -0.052751065 -0.052818606 -0.052878312 -0.052931093 -0.052977751 -0.053018997 -0.053055459 -0.053087691 -0.053116185 -0.053141373 -0.05316364 -0.053183324 -0.053200724 -0.053216106 -0.053229704 -0.053241725 -0.053252351 -0.053261745 -0.053270049 -0.053277389 -0.053283879 -0.053289615'
[]
[]
[AuxVariables]
[tot_force]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[tot_force]
type = ParsedAux
coupled_variables = 'stress_yy porepressure'
execute_on = timestep_end
variable = tot_force
expression = '-stress_yy+0.6*porepressure'
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.0
bulk_modulus = 8.0
viscosity = 1.0
density0 = 1.0
[]
[]
[PorousFlowBasicTHM]
coupling_type = HydroMechanical
displacements = 'disp_x disp_y disp_z'
multiply_by_density = false
porepressure = porepressure
biot_coefficient = 0.6
gravity = '0 0 0'
fp = the_simple_fluid
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '0.5 0.75'
# bulk modulus is lambda + 2*mu/3 = 0.5 + 2*0.75/3 = 1
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = ComputeLinearElasticStress
[]
[porosity]
type = PorousFlowPorosityConst # only the initial value of this is ever used
porosity = 0.1
[]
[biot_modulus]
type = PorousFlowConstantBiotModulus
biot_coefficient = 0.6
solid_bulk_compliance = 1
fluid_bulk_modulus = 8
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1.5 0 0 0 1.5 0 0 0 1.5'
[]
[]
[Postprocessors]
[p0]
type = PointValue
outputs = csv
point = '0.0 0 0'
variable = porepressure
[]
[p1]
type = PointValue
outputs = csv
point = '0.1 0 0'
variable = porepressure
[]
[p2]
type = PointValue
outputs = csv
point = '0.2 0 0'
variable = porepressure
[]
[p3]
type = PointValue
outputs = csv
point = '0.3 0 0'
variable = porepressure
[]
[p4]
type = PointValue
outputs = csv
point = '0.4 0 0'
variable = porepressure
[]
[p5]
type = PointValue
outputs = csv
point = '0.5 0 0'
variable = porepressure
[]
[p6]
type = PointValue
outputs = csv
point = '0.6 0 0'
variable = porepressure
[]
[p7]
type = PointValue
outputs = csv
point = '0.7 0 0'
variable = porepressure
[]
[p8]
type = PointValue
outputs = csv
point = '0.8 0 0'
variable = porepressure
[]
[p9]
type = PointValue
outputs = csv
point = '0.9 0 0'
variable = porepressure
[]
[p99]
type = PointValue
outputs = csv
point = '1 0 0'
variable = porepressure
[]
[xdisp]
type = PointValue
outputs = csv
point = '1 0.1 0'
variable = disp_x
[]
[ydisp]
type = PointValue
outputs = csv
point = '1 0.1 0'
variable = disp_y
[]
[total_downwards_force]
type = ElementAverageValue
outputs = csv
variable = tot_force
[]
[dt]
type = FunctionValuePostprocessor
outputs = console
function = if(0.15*t<0.01,0.15*t,0.01)
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'gmres asm lu 1E-14 1E-10 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 0.7
[TimeStepper]
type = PostprocessorDT
postprocessor = dt
dt = 0.001
[]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = mandel_basicthm
[csv]
time_step_interval = 3
type = CSV
[]
[]
(modules/solid_mechanics/test/tests/weak_plane_shear/large_deform_harden3.i)
# apply a number of "random" configurations and
# check that the algorithm returns to the yield surface
#
# must be careful here - we cannot put in arbitrary values of C_ijkl, otherwise the condition
# df/dsigma * C * flow_dirn < 0 for some stresses
# The important features that must be obeyed are:
# 0 = C_0222 = C_1222 (holds for transversely isotropic, for instance)
# C_0212 < C_0202 = C_1212 (holds for transversely isotropic)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[Physics/SolidMechanics/QuasiStatic/all]
strain = FINITE
add_variables = true
[]
[BCs]
[bottomx]
type = DirichletBC
variable = disp_x
boundary = back
value = 0.0
[]
[bottomy]
type = DirichletBC
variable = disp_y
boundary = back
value = 0.0
[]
[bottomz]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
# the following are "random" deformations
# each is O(1E-5) to keep deformations small
[topx]
type = FunctionDirichletBC
variable = disp_x
boundary = front
function = '(sin(0.1*t)+x)/1E1'
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = front
function = '(cos(t)+x*y)/1E1'
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = front
function = 'sin(0.4321*t)*x*y*z/1E1'
[]
[]
[AuxVariables]
[wps_internal]
order = CONSTANT
family = MONOMIAL
[]
[yield_fcn]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[wps_internal_auxk]
type = MaterialStdVectorAux
property = plastic_internal_parameter
index = 0
variable = wps_internal
[]
[yield_fcn_auxk]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 0
variable = yield_fcn
[]
[]
[Postprocessors]
[int]
type = PointValue
point = '0 0 0'
variable = wps_internal
outputs = 'console'
[]
[yield_fcn_at_zero]
type = PointValue
point = '0 0 0'
variable = yield_fcn
outputs = 'console'
[]
[should_be_zero]
type = FunctionValuePostprocessor
function = should_be_zero_fcn
[]
[]
[Functions]
[should_be_zero_fcn]
type = ParsedFunction
expression = 'if(a<1E-3,0,a)'
symbol_names = 'a'
symbol_values = 'yield_fcn_at_zero'
[]
[]
[UserObjects]
[coh]
type = SolidMechanicsHardeningExponential
value_0 = 1E3
value_residual = 0
rate = 0.01
[]
[tanphi]
type = SolidMechanicsHardeningExponential
value_0 = 1
value_residual = 0.577350269
rate = 0.01
[]
[tanpsi]
type = SolidMechanicsHardeningExponential
value_0 = 0.08748866
value_residual = 0.03492077
rate = 0.01
[]
[wps]
type = SolidMechanicsPlasticWeakPlaneShear
cohesion = coh
tan_friction_angle = tanphi
tan_dilation_angle = tanpsi
smoother = 100
yield_function_tolerance = 1E-3
internal_constraint_tolerance = 1E-3
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensor
# the following is transversely isotropic, i think.
fill_method = symmetric9
C_ijkl = '3E9 1E9 3E9 3E9 3E9 6E9 1E9 1E9 9E9'
[]
[mc]
type = ComputeMultiPlasticityStress
plastic_models = wps
transverse_direction = '0 0 1'
max_NR_iterations = 1000
ep_plastic_tolerance = 1E-3
debug_fspb = crash
[]
[]
[Executioner]
end_time = 1E4
dt = 1
type = Transient
[]
[Outputs]
csv = true
[]
(modules/heat_transfer/test/tests/heat_conduction_ortho/heat_conduction_ortho.i)
#
# Three independent cubes are thermally loaded, one in x, one in y, and one in z.
# Each direction has a different thermal conductivity, resulting in a different
# temperature at the side with the Neumann bc.
#
# For x: 100/1000 = 1e-1
# For y: 100/100 = 1e+0
# for z: 100/10 = 1e+1
#
[Mesh]
file = heat_conduction_ortho.e
[]
[Variables]
[./temperature]
[../]
[]
[Kernels]
[./heat]
type = AnisoHeatConduction
variable = temperature
[../]
[]
[BCs]
[./temperatures]
type = DirichletBC
variable = temperature
boundary = 1
value = 0
[../]
[./neum]
type = NeumannBC
variable = temperature
boundary = 2
value = 100
[../]
[]
[Materials]
[./heat]
type = AnisoHeatConductionMaterial
block = 1
specific_heat = 0.116
thermal_conductivity = '10.0 0 0 0 10.0 0 0 0 10.0'
temperature = temperature
[../]
[./density]
type = GenericConstantMaterial
block = 1
prop_names = 'density'
prop_values = 0.283
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -ksp_gmres_restart'
petsc_options_value = 'lu 101'
line_search = 'none'
nl_abs_tol = 1e-11
nl_rel_tol = 1e-10
l_max_its = 20
[]
[Outputs]
exodus = true
hide = 'tcx tcy tcz'
[]
[Postprocessors]
[./tcx]
type = FunctionValuePostprocessor
function = 1000
outputs = none
execute_on = 'initial timestep_end'
[../]
[./tcy]
type = FunctionValuePostprocessor
function = 100
outputs = none
execute_on = 'initial timestep_end'
[../]
[./tcz]
type = FunctionValuePostprocessor
function = 10
outputs = none
execute_on = 'initial timestep_end'
[../]
[]
(modules/solid_mechanics/test/tests/porosity/reg.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Problem]
solve = false
[]
[Functions]
[volumetric]
type = ParsedFunction
expression = t
[]
[exact]
type = ParsedFunction
symbol_names = 'f'
symbol_values = 'porosity_old'
expression = '(1 - f) * 3e-3 + f'
[]
[]
[Materials]
[porosity]
type = PorosityFromStrain
initial_porosity = 0
inelastic_strain = strain
outputs = all
[]
[strain]
type = GenericFunctionRankTwoTensor
tensor_name = strain
tensor_functions = 'volumetric'
outputs = all
[]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 1e-3
[]
[Postprocessors]
[porosity]
type = ElementAverageValue
variable = porosity
execute_on = 'initial timestep_end'
[]
[porosity_old]
type = ElementAverageValue
variable = porosity
execute_on = 'initial timestep_begin'
outputs = none
[]
[exact]
type = FunctionValuePostprocessor
function = exact
[]
[00]
type = ElementAverageValue
variable = strain_00
execute_on = 'initial timestep_end'
[]
[11]
type = ElementAverageValue
variable = strain_11
execute_on = 'initial timestep_end'
[]
[22]
type = ElementAverageValue
variable = strain_22
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
csv = true
[]
(modules/porous_flow/test/tests/dirackernels/bh_except02.i)
# PorousFlowPeacemanBorehole exception test
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = 1E7
[]
[]
[Kernels]
[mass0]
type = TimeDerivative
variable = pp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
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.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[DiracKernels]
[bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
mass_fraction_component = 1
point_file = bh02.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[]
[]
[Postprocessors]
[bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[]
[fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[]
[fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[]
[zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[]
[p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[]
[]
[Functions]
[mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[]
[]
[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 = 0.5
dt = 1E-2
solve_type = NEWTON
[]
(modules/porous_flow/test/tests/dirackernels/bh_except14.i)
# fully-saturated
# production
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = 1E7
[]
[]
[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
[]
[borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
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.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[DiracKernels]
[bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
point_file = bh02_huge.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[]
[]
[Postprocessors]
[bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[]
[fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[]
[fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[]
[zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[]
[p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[]
[]
[Functions]
[mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[]
[]
[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 = 0.5
dt = 1E-2
solve_type = NEWTON
[]
(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/porous_flow/test/tests/poro_elasticity/terzaghi.i)
# Terzaghi's problem of consolodation of a drained medium
#
# A saturated soil sample sits in a bath of water.
# It is constrained on its sides, and bottom.
# Its sides and bottom are also impermeable.
# Initially it is unstressed.
# A normal stress, q, is applied to the soil's top.
# The soil then slowly compresses as water is squeezed
# out from the sample from its top (the top BC for
# the porepressure is porepressure = 0).
#
# See, for example. Section 2.2 of the online manuscript
# Arnold Verruijt "Theory and Problems of Poroelasticity" Delft University of Technology 2013
# but note that the "sigma" in that paper is the negative
# of the stress in TensorMechanics
#
# Here are the problem's parameters, and their values:
# Soil height. h = 10
# Soil's Lame lambda. la = 2
# Soil's Lame mu, which is also the Soil's shear modulus. mu = 3
# Soil bulk modulus. K = la + 2*mu/3 = 4
# Soil confined compressibility. m = 1/(K + 4mu/3) = 0.125
# Soil bulk compliance. 1/K = 0.25
# Fluid bulk modulus. Kf = 8
# Fluid bulk compliance. 1/Kf = 0.125
# Fluid mobility (soil permeability/fluid viscosity). k = 1.5
# Soil initial porosity. phi0 = 0.1
# Biot coefficient. alpha = 0.6
# Soil initial storativity, which is the reciprocal of the initial Biot modulus. S = phi0/Kf + (alpha - phi0)(1 - alpha)/K = 0.0625
# Consolidation coefficient. c = k/(S + alpha^2 m) = 13.95348837
# Normal stress on top. q = 1
# Initial porepressure, resulting from instantaneous application of q, assuming corresponding instantaneous increase of porepressure (Note that this is calculated by MOOSE: we only need it for the analytical solution). p0 = alpha*m*q/(S + alpha^2 m) = 0.69767442
# Initial vertical displacement (down is positive), resulting from instantaneous application of q (Note this is calculated by MOOSE: we only need it for the analytical solution). uz0 = q*m*h*S/(S + alpha^2 m)
# Final vertical displacement (down in positive) (Note this is calculated by MOOSE: we only need it for the analytical solution). uzinf = q*m*h
#
# The solution for porepressure is
# P = 4*p0/\pi \sum_{k=1}^{\infty} \frac{(-1)^{k-1}}{2k-1} \cos ((2k-1)\pi z/(2h)) \exp(-(2k-1)^2 \pi^2 ct/(4 h^2))
# This series converges very slowly for ct/h^2 small, so in that domain
# P = p0 erf( (1-(z/h))/(2 \sqrt(ct/h^2)) )
#
# The degree of consolidation is defined as
# U = (uz - uz0)/(uzinf - uz0)
# where uz0 and uzinf are defined above, and
# uz = the vertical displacement of the top (down is positive)
# U = 1 - (8/\pi^2)\sum_{k=1}^{\infty} \frac{1}{(2k-1)^2} \exp(-(2k-1)^2 \pi^2 ct/(4 h^2))
#
# FINAL NOTE: The above solution assumes constant Biot Modulus.
# In porous_flow this is not true. Therefore the solution is
# a little different than in the paper. This test was therefore
# validated against MOOSE's poromechanics, which can choose either
# a constant Biot Modulus (which has been shown to agree with
# the analytic solution), or a non-constant Biot Modulus (which
# gives the same results as porous_flow).
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 10
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = 0
zmax = 10
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.8
alpha = 1
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[basefixed]
type = DirichletBC
variable = disp_z
value = 0
boundary = back
[]
[topdrained]
type = DirichletBC
variable = porepressure
value = 0
boundary = front
[]
[topload]
type = NeumannBC
variable = disp_z
value = -1
boundary = front
[]
[]
[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 = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.6
variable = disp_x
component = 0
[]
[poro_y]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.6
variable = disp_y
component = 1
[]
[poro_z]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.6
component = 2
variable = disp_z
[]
[poro_vol_exp]
type = PorousFlowMassVolumetricExpansion
variable = porepressure
fluid_component = 0
[]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = porepressure
[]
[flux]
type = PorousFlowAdvectiveFlux
variable = porepressure
gravity = '0 0 0'
fluid_component = 0
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 8
density0 = 1
thermal_expansion = 0
viscosity = 0.96
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '2 3'
# bulk modulus is lambda + 2*mu/3 = 2 + 2*3/3 = 4
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = ComputeLinearElasticStress
[]
[eff_fluid_pressure_qp]
type = PorousFlowEffectiveFluidPressure
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
ensure_positive = false
porosity_zero = 0.1
biot_coefficient = 0.6
solid_bulk = 4
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1.5 0 0 0 1.5 0 0 0 1.5'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[]
[]
[Postprocessors]
[p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
use_displaced_mesh = false
[]
[p1]
type = PointValue
outputs = csv
point = '0 0 1'
variable = porepressure
use_displaced_mesh = false
[]
[p2]
type = PointValue
outputs = csv
point = '0 0 2'
variable = porepressure
use_displaced_mesh = false
[]
[p3]
type = PointValue
outputs = csv
point = '0 0 3'
variable = porepressure
use_displaced_mesh = false
[]
[p4]
type = PointValue
outputs = csv
point = '0 0 4'
variable = porepressure
use_displaced_mesh = false
[]
[p5]
type = PointValue
outputs = csv
point = '0 0 5'
variable = porepressure
use_displaced_mesh = false
[]
[p6]
type = PointValue
outputs = csv
point = '0 0 6'
variable = porepressure
use_displaced_mesh = false
[]
[p7]
type = PointValue
outputs = csv
point = '0 0 7'
variable = porepressure
use_displaced_mesh = false
[]
[p8]
type = PointValue
outputs = csv
point = '0 0 8'
variable = porepressure
use_displaced_mesh = false
[]
[p9]
type = PointValue
outputs = csv
point = '0 0 9'
variable = porepressure
use_displaced_mesh = false
[]
[p99]
type = PointValue
outputs = csv
point = '0 0 10'
variable = porepressure
use_displaced_mesh = false
[]
[zdisp]
type = PointValue
outputs = csv
point = '0 0 10'
variable = disp_z
use_displaced_mesh = false
[]
[dt]
type = FunctionValuePostprocessor
outputs = console
function = if(0.5*t<0.1,0.5*t,0.1)
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
[TimeStepper]
type = PostprocessorDT
postprocessor = dt
dt = 0.0001
[]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = terzaghi
[csv]
type = CSV
[]
[]
(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/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
[]
(modules/porous_flow/test/tests/dirackernels/bh_except04.i)
# PorousFlowPeacemanBorehole exception test
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = 1E7
[]
[]
[Kernels]
[mass0]
type = TimeDerivative
variable = pp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
density0 = 1000
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
at_nodes = true # Needed to force exepected error
[]
[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 = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[DiracKernels]
[bh]
type = PorousFlowPeacemanBorehole
bottom_p_or_t = 0
fluid_phase = 0
function_of = temperature
point_file = bh02.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pp
unit_weight = '0 0 0'
character = 1
[]
[]
[Postprocessors]
[bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[]
[fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[]
[fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[]
[zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
[]
[p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[]
[]
[Functions]
[mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[]
[]
[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 = 0.5
dt = 1E-2
solve_type = NEWTON
[]
(modules/richards/test/tests/dirac/bh02.i)
# fully-saturated
# production
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./Seff1VG]
type = RichardsSeff1VG
m = 0.8
al = 1E-5
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0
sum_s_res = 0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E8
[../]
[./borehole_total_outflow_mass]
type = RichardsSumQuantity
[../]
[]
[Variables]
active = 'pressure'
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./p_ic]
type = FunctionIC
variable = pressure
function = initial_pressure
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
variable = pressure
[../]
[]
[DiracKernels]
[./bh]
type = RichardsBorehole
bottom_pressure = 0
point_file = bh02.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pressure
unit_weight = '0 0 0'
character = 1
[../]
[]
[Postprocessors]
[./bh_report]
type = RichardsPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = RichardsMass
variable = pressure
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = RichardsMass
variable = pressure
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
indirect_dependencies = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[./p0]
type = PointValue
variable = pressure
point = '1 1 1'
execute_on = timestep_end
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 1E7
[../]
[./mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = 0
viscosity = 1E-3
mat_porosity = 0.1
mat_permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
density_UO = DensityConstBulk
relperm_UO = RelPermPower
sat_UO = Saturation
seff_UO = Seff1VG
SUPG_UO = SUPGstandard
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = Seff1VG
pressure_vars = pressure
[../]
[]
[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 = 0.5
dt = 1E-2
solve_type = NEWTON
[]
[Outputs]
file_base = bh02
exodus = false
csv = true
execute_on = timestep_end
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/special/area.i)
# Simple 3D test
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = true
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 1
[]
[]
[Kernels]
[sdx]
type = UpdatedLagrangianStressDivergence
variable = disp_x
component = 0
use_displaced_mesh = true
[]
[sdy]
type = UpdatedLagrangianStressDivergence
variable = disp_y
component = 1
use_displaced_mesh = true
[]
[sdz]
type = UpdatedLagrangianStressDivergence
variable = disp_z
component = 2
use_displaced_mesh = true
[]
[]
[AuxVariables]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[zstress]
type = PiecewiseLinear
x = '0 1'
y = '0 500'
[]
[constant]
type = ConstantFunction
value = 1.0
[]
[ratio]
type = ParsedFunction
symbol_names = 'sd su'
symbol_values = 's_def s_undef'
expression = 'sd / su'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[boty]
type = DirichletBC
preset = true
boundary = bottom
variable = disp_y
value = 0.0
[]
[backz]
type = DirichletBC
preset = true
boundary = back
variable = disp_z
value = 0.0
[]
[pull_z]
type = FunctionNeumannBC
boundary = front
variable = disp_z
function = zstress
[]
[]
[AuxKernels]
[stress_zz]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1000.0
poissons_ratio = 0.25
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[s_undef]
type = SideIntegralVariablePostprocessor
variable = stress_zz
boundary = front
[]
[s_def]
type = SideIntegralVariablePostprocessor
variable = stress_zz
boundary = front
use_displaced_mesh = true
[]
[area_calc]
type = FunctionValuePostprocessor
function = ratio
[]
[area]
type = AreaPostprocessor
boundary = front
use_displaced_mesh = true
[]
[]
[Executioner]
type = Transient
solve_type = 'newton'
line_search = none
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 2
l_tol = 1e-14
nl_max_its = 15
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 1.0
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/kernels/ad_2d_diffusion/2d_diffusion_bodyforce_test.i)
###########################################################
# This is a simple test of the Kernel System.
# It solves the Laplacian equation on a small 2x2 grid.
# The "Diffusion" kernel is used to calculate the
# residuals of the weak form of this operator. The
# "BodyForce" kernel is used to apply a time-dependent
# volumetric source.
###########################################################
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = ADDiffusion
variable = u
[../]
[./bf]
type = ADBodyForce
variable = u
postprocessor = ramp
[../]
[]
[Functions]
[./ramp]
type = ParsedFunction
expression = 't'
[../]
[]
[Postprocessors]
[./ramp]
type = FunctionValuePostprocessor
function = ramp
execute_on = linear
[../]
[]
[BCs]
active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[]
[Executioner]
type = Transient
dt = 1.0
end_time = 1.0
solve_type = 'NEWTON'
[]
[Outputs]
file_base = bodyforce_out
exodus = true
[]
(modules/porous_flow/test/tests/hysteresis/hys_order_06.i)
# Test that PorousFlowHysteresisOrder correctly calculates hysteresis order
# Hysteresis order is initialised = 2, with turning points = (0.6, 0.8)
# Initial saturation is 0.71
# Water is added to the system, so order = 3 with turning point = 0.71
# Then water is added to the system until saturation = 0.8, when order = 1
# Then water is added to the system until saturation = 1.0, when order becomes zero
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = -9E5
[]
[]
[PorousFlowUnsaturated]
porepressure = pp
fp = simple_fluid
[]
[DiracKernels]
[source_sink_0]
type = PorousFlowPointSourceFromPostprocessor
point = '0 0 0'
mass_flux = sink_strength
variable = pp
[]
[source_sink_1]
type = PorousFlowPointSourceFromPostprocessor
point = '1 0 0'
mass_flux = sink_strength
variable = pp
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 1.0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0 0 0 0 0 0 0 0 0'
[]
[hys_order]
type = PorousFlowHysteresisOrder
initial_order = 2
previous_turning_points = '0.6 0.8'
[]
[]
[AuxVariables]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[tp0]
family = MONOMIAL
order = CONSTANT
[]
[tp1]
family = MONOMIAL
order = CONSTANT
[]
[tp2]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[tp0]
type = PorousFlowPropertyAux
variable = tp0
property = hysteresis_saturation_turning_point
hysteresis_turning_point = 0
[]
[tp1]
type = PorousFlowPropertyAux
variable = tp1
property = hysteresis_saturation_turning_point
hysteresis_turning_point = 1
[]
[tp2]
type = PorousFlowPropertyAux
variable = tp2
property = hysteresis_saturation_turning_point
hysteresis_turning_point = 2
[]
[]
[Functions]
[sink_strength_fcn]
type = ParsedFunction
expression = '30'
[]
[]
[Postprocessors]
[sink_strength]
type = FunctionValuePostprocessor
function = sink_strength_fcn
outputs = 'none'
[]
[saturation]
type = PointValue
point = '0 0 0'
variable = saturation0
[]
[hys_order]
type = PointValue
point = '0 0 0'
variable = hys_order
[]
[tp0]
type = PointValue
point = '0 0 0'
variable = tp0
[]
[tp1]
type = PointValue
point = '0 0 0'
variable = tp1
[]
[tp2]
type = PointValue
point = '0 0 0'
variable = tp2
[]
[]
[Preconditioning]
[basic]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 7
nl_abs_tol = 1E-7
[]
[Outputs]
[csv]
type = CSV
[]
[]
(modules/porous_flow/test/tests/radioactive_decay/radioactive_decay01.i)
# checking radioactive decay
# 1phase, 1component, constant porosity
#
# Note that we don't get mass = mass0 * exp(-Lambda * t)
# because of the time discretisation. We are solving
# the equation
# (mass - mass0)/dt = -Lambda * mass
# which has the solution
# mass = mass0/(1 + Lambda * dt)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = -1
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[]
[ICs]
[pinit]
type = FunctionIC
function = 10
variable = pp
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[decay]
type = PorousFlowMassRadioactiveDecay
fluid_component = 0
variable = pp
decay_rate = 2.0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 1
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.1
[]
[]
[Postprocessors]
[total_mass]
type = PorousFlowFluidMass
execute_on = 'timestep_end'
[]
[total_mass0]
type = PorousFlowFluidMass
execute_on = 'timestep_begin'
[]
[should_be_zero]
type = FunctionValuePostprocessor
function = should_be_0
[]
[]
[Functions]
[should_be_0]
type = ParsedFunction
symbol_names = 'm0 m rate dt'
symbol_values = 'total_mass0 total_mass 2.0 1'
expression = 'm-m0/(1.0+rate*dt)'
[]
[]
[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
dt = 1
num_steps = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = radioactive_decay01
csv = true
[]
(modules/combined/examples/geochem-porous_flow/geotes_weber_tensleep/porous_flow.i)
#########################################
# #
# File written by create_input_files.py #
# #
#########################################
# PorousFlow simulation of injection and production in a simplified GeoTES aquifer
# Much of this file is standard porous-flow stuff. The unusual aspects are:
# - transfer of the rates of changes of each species (kg.s) to the aquifer_geochemistry.i simulation. This is achieved by saving these changes from the PorousFlowMassTimeDerivative residuals
# - transfer of the temperature field to the aquifer_geochemistry.i simulation
# Interesting behaviour can be simulated by this file without its 'parent' simulation, exchanger.i. exchanger.i provides mass-fractions injected via the injection_rate_massfrac_* variables, but since these are more-or-less constant throughout the duration of the exchanger.i simulation, the initial_conditions specified below may be used. Similar, exchanger.i provides injection_temperature, but that is also constant.
injection_rate = -0.02 # kg/s/m, negative because injection as a source
production_rate = 0.02 # kg/s/m, this is about the maximum that can be sustained by the aquifer, with its fairly low permeability, without porepressure becoming negative
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = -75
xmax = 75
ymin = 0
ymax = 40
zmin = -25
zmax = 25
nx = 15
ny = 4
nz = 5
[]
[aquifer]
type = ParsedSubdomainMeshGenerator
input = gen
block_id = 1
block_name = aquifer
combinatorial_geometry = 'z >= -5 & z <= 5'
[]
[injection_nodes]
input = aquifer
type = ExtraNodesetGenerator
new_boundary = injection_nodes
coord = '-25 0 -5; -25 0 5'
[]
[production_nodes]
input = injection_nodes
type = ExtraNodesetGenerator
new_boundary = production_nodes
coord = '25 0 -5; 25 0 5'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 -10'
[]
[BCs]
[injection_temperature]
type = MatchedValueBC
variable = temperature
v = injection_temperature
boundary = injection_nodes
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0
bulk_modulus = 2E9
viscosity = 1E-3
density0 = 1000
cv = 4000.0
cp = 4000.0
[]
[]
[PorousFlowFullySaturated]
coupling_type = ThermoHydro
porepressure = porepressure
temperature = temperature
mass_fraction_vars = 'f_H f_Cl f_SO4 f_HCO3 f_SiO2aq f_Al f_Ca f_Mg f_Fe f_K f_Na f_Sr f_F f_BOH f_Br f_Ba f_Li f_NO3 f_O2aq '
save_component_rate_in = 'rate_H rate_Cl rate_SO4 rate_HCO3 rate_SiO2aq rate_Al rate_Ca rate_Mg rate_Fe rate_K rate_Na rate_Sr rate_F rate_BOH rate_Br rate_Ba rate_Li rate_NO3 rate_O2aq rate_H2O' # change in kg at every node / dt
fp = the_simple_fluid
temperature_unit = Celsius
[]
[Materials]
[porosity_caps]
type = PorousFlowPorosityConst # this simulation has no porosity changes from dissolution
block = 0
porosity = 0.01
[]
[porosity_aquifer]
type = PorousFlowPorosityConst # this simulation has no porosity changes from dissolution
block = aquifer
porosity = 0.063
[]
[permeability_caps]
type = PorousFlowPermeabilityConst
block = 0
permeability = '1E-18 0 0 0 1E-18 0 0 0 1E-18'
[]
[permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1.7E-15 0 0 0 1.7E-15 0 0 0 4.1E-16'
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0 0 0 0 0 0 0 0 0'
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
density = 2500.0
specific_heat_capacity = 1200.0
[]
[]
[Preconditioning]
active = typically_efficient
[typically_efficient]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = ' hypre boomeramg'
[]
[strong]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm ilu NONZERO 2'
[]
[probably_too_strong]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 7.76E6 # 90 days
[TimeStepper]
type = FunctionDT
function = 'min(3E4, max(1E4, 0.2 * t))'
[]
[]
[Outputs]
exodus = true
[]
[Variables]
[f_H]
initial_condition = -2.952985071156e-06
[]
[f_Cl]
initial_condition = 0.04870664551708
[]
[f_SO4]
initial_condition = 0.0060359986852517
[]
[f_HCO3]
initial_condition = 5.0897287594019e-05
[]
[f_SiO2aq]
initial_condition = 3.0246609868421e-05
[]
[f_Al]
initial_condition = 3.268028901929e-08
[]
[f_Ca]
initial_condition = 0.00082159428184586
[]
[f_Mg]
initial_condition = 1.8546347062146e-05
[]
[f_Fe]
initial_condition = 4.3291908204093e-05
[]
[f_K]
initial_condition = 6.8434768308898e-05
[]
[f_Na]
initial_condition = 0.033298053919671
[]
[f_Sr]
initial_condition = 1.2771866652177e-05
[]
[f_F]
initial_condition = 5.5648860174073e-06
[]
[f_BOH]
initial_condition = 0.0003758574621917
[]
[f_Br]
initial_condition = 9.0315286107068e-05
[]
[f_Ba]
initial_condition = 1.5637460875161e-07
[]
[f_Li]
initial_condition = 8.3017067912701e-05
[]
[f_NO3]
initial_condition = 0.00010958455036169
[]
[f_O2aq]
initial_condition = -7.0806852373351e-05
[]
[porepressure]
initial_condition = 30E6
[]
[temperature]
initial_condition = 92
scaling = 1E-6 # fluid enthalpy is roughly 1E6
[]
[]
[DiracKernels]
[inject_H]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_H
point_file = injection.bh
variable = f_H
[]
[inject_Cl]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Cl
point_file = injection.bh
variable = f_Cl
[]
[inject_SO4]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_SO4
point_file = injection.bh
variable = f_SO4
[]
[inject_HCO3]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_HCO3
point_file = injection.bh
variable = f_HCO3
[]
[inject_SiO2aq]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_SiO2aq
point_file = injection.bh
variable = f_SiO2aq
[]
[inject_Al]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Al
point_file = injection.bh
variable = f_Al
[]
[inject_Ca]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Ca
point_file = injection.bh
variable = f_Ca
[]
[inject_Mg]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Mg
point_file = injection.bh
variable = f_Mg
[]
[inject_Fe]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Fe
point_file = injection.bh
variable = f_Fe
[]
[inject_K]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_K
point_file = injection.bh
variable = f_K
[]
[inject_Na]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Na
point_file = injection.bh
variable = f_Na
[]
[inject_Sr]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Sr
point_file = injection.bh
variable = f_Sr
[]
[inject_F]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_F
point_file = injection.bh
variable = f_F
[]
[inject_BOH]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_BOH
point_file = injection.bh
variable = f_BOH
[]
[inject_Br]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Br
point_file = injection.bh
variable = f_Br
[]
[inject_Ba]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Ba
point_file = injection.bh
variable = f_Ba
[]
[inject_Li]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Li
point_file = injection.bh
variable = f_Li
[]
[inject_NO3]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_NO3
point_file = injection.bh
variable = f_NO3
[]
[inject_O2aq]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_O2aq
point_file = injection.bh
variable = f_O2aq
[]
[inject_H2O]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_H2O
point_file = injection.bh
variable = porepressure
[]
[produce_H]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_H
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 0
point_file = production.bh
variable = f_H
[]
[produce_Cl]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Cl
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 1
point_file = production.bh
variable = f_Cl
[]
[produce_SO4]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_SO4
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 2
point_file = production.bh
variable = f_SO4
[]
[produce_HCO3]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_HCO3
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 3
point_file = production.bh
variable = f_HCO3
[]
[produce_SiO2aq]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_SiO2aq
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 4
point_file = production.bh
variable = f_SiO2aq
[]
[produce_Al]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Al
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 5
point_file = production.bh
variable = f_Al
[]
[produce_Ca]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Ca
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 6
point_file = production.bh
variable = f_Ca
[]
[produce_Mg]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Mg
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 7
point_file = production.bh
variable = f_Mg
[]
[produce_Fe]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Fe
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 8
point_file = production.bh
variable = f_Fe
[]
[produce_K]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_K
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 9
point_file = production.bh
variable = f_K
[]
[produce_Na]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Na
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 10
point_file = production.bh
variable = f_Na
[]
[produce_Sr]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Sr
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 11
point_file = production.bh
variable = f_Sr
[]
[produce_F]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_F
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 12
point_file = production.bh
variable = f_F
[]
[produce_BOH]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_BOH
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 13
point_file = production.bh
variable = f_BOH
[]
[produce_Br]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Br
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 14
point_file = production.bh
variable = f_Br
[]
[produce_Ba]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Ba
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 15
point_file = production.bh
variable = f_Ba
[]
[produce_Li]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Li
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 16
point_file = production.bh
variable = f_Li
[]
[produce_NO3]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_NO3
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 17
point_file = production.bh
variable = f_NO3
[]
[produce_O2aq]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_O2aq
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 18
point_file = production.bh
variable = f_O2aq
[]
[produce_H2O]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_H2O
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 19
point_file = production.bh
variable = porepressure
[]
[produce_heat]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_heat
fluxes = ${production_rate}
p_or_t_vals = 0.0
use_enthalpy = true
point_file = production.bh
variable = temperature
[]
[]
[UserObjects]
[injected_mass]
type = PorousFlowSumQuantity
[]
[produced_mass_H]
type = PorousFlowSumQuantity
[]
[produced_mass_Cl]
type = PorousFlowSumQuantity
[]
[produced_mass_SO4]
type = PorousFlowSumQuantity
[]
[produced_mass_HCO3]
type = PorousFlowSumQuantity
[]
[produced_mass_SiO2aq]
type = PorousFlowSumQuantity
[]
[produced_mass_Al]
type = PorousFlowSumQuantity
[]
[produced_mass_Ca]
type = PorousFlowSumQuantity
[]
[produced_mass_Mg]
type = PorousFlowSumQuantity
[]
[produced_mass_Fe]
type = PorousFlowSumQuantity
[]
[produced_mass_K]
type = PorousFlowSumQuantity
[]
[produced_mass_Na]
type = PorousFlowSumQuantity
[]
[produced_mass_Sr]
type = PorousFlowSumQuantity
[]
[produced_mass_F]
type = PorousFlowSumQuantity
[]
[produced_mass_BOH]
type = PorousFlowSumQuantity
[]
[produced_mass_Br]
type = PorousFlowSumQuantity
[]
[produced_mass_Ba]
type = PorousFlowSumQuantity
[]
[produced_mass_Li]
type = PorousFlowSumQuantity
[]
[produced_mass_NO3]
type = PorousFlowSumQuantity
[]
[produced_mass_O2aq]
type = PorousFlowSumQuantity
[]
[produced_mass_H2O]
type = PorousFlowSumQuantity
[]
[produced_heat]
type = PorousFlowSumQuantity
[]
[]
[Postprocessors]
[dt]
type = TimestepSize
execute_on = TIMESTEP_BEGIN
[]
[tot_kg_injected_this_timestep]
type = PorousFlowPlotQuantity
uo = injected_mass
[]
[kg_H_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_H
[]
[kg_Cl_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Cl
[]
[kg_SO4_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_SO4
[]
[kg_HCO3_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_HCO3
[]
[kg_SiO2aq_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_SiO2aq
[]
[kg_Al_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Al
[]
[kg_Ca_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Ca
[]
[kg_Mg_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Mg
[]
[kg_Fe_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Fe
[]
[kg_K_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_K
[]
[kg_Na_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Na
[]
[kg_Sr_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Sr
[]
[kg_F_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_F
[]
[kg_BOH_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_BOH
[]
[kg_Br_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Br
[]
[kg_Ba_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Ba
[]
[kg_Li_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Li
[]
[kg_NO3_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_NO3
[]
[kg_O2aq_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_O2aq
[]
[kg_H2O_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_H2O
[]
[mole_rate_H_produced]
type = FunctionValuePostprocessor
function = moles_H
indirect_dependencies = 'kg_H_produced_this_timestep dt'
[]
[mole_rate_Cl_produced]
type = FunctionValuePostprocessor
function = moles_Cl
indirect_dependencies = 'kg_Cl_produced_this_timestep dt'
[]
[mole_rate_SO4_produced]
type = FunctionValuePostprocessor
function = moles_SO4
indirect_dependencies = 'kg_SO4_produced_this_timestep dt'
[]
[mole_rate_HCO3_produced]
type = FunctionValuePostprocessor
function = moles_HCO3
indirect_dependencies = 'kg_HCO3_produced_this_timestep dt'
[]
[mole_rate_SiO2aq_produced]
type = FunctionValuePostprocessor
function = moles_SiO2aq
indirect_dependencies = 'kg_SiO2aq_produced_this_timestep dt'
[]
[mole_rate_Al_produced]
type = FunctionValuePostprocessor
function = moles_Al
indirect_dependencies = 'kg_Al_produced_this_timestep dt'
[]
[mole_rate_Ca_produced]
type = FunctionValuePostprocessor
function = moles_Ca
indirect_dependencies = 'kg_Ca_produced_this_timestep dt'
[]
[mole_rate_Mg_produced]
type = FunctionValuePostprocessor
function = moles_Mg
indirect_dependencies = 'kg_Mg_produced_this_timestep dt'
[]
[mole_rate_Fe_produced]
type = FunctionValuePostprocessor
function = moles_Fe
indirect_dependencies = 'kg_Fe_produced_this_timestep dt'
[]
[mole_rate_K_produced]
type = FunctionValuePostprocessor
function = moles_K
indirect_dependencies = 'kg_K_produced_this_timestep dt'
[]
[mole_rate_Na_produced]
type = FunctionValuePostprocessor
function = moles_Na
indirect_dependencies = 'kg_Na_produced_this_timestep dt'
[]
[mole_rate_Sr_produced]
type = FunctionValuePostprocessor
function = moles_Sr
indirect_dependencies = 'kg_Sr_produced_this_timestep dt'
[]
[mole_rate_F_produced]
type = FunctionValuePostprocessor
function = moles_F
indirect_dependencies = 'kg_F_produced_this_timestep dt'
[]
[mole_rate_BOH_produced]
type = FunctionValuePostprocessor
function = moles_BOH
indirect_dependencies = 'kg_BOH_produced_this_timestep dt'
[]
[mole_rate_Br_produced]
type = FunctionValuePostprocessor
function = moles_Br
indirect_dependencies = 'kg_Br_produced_this_timestep dt'
[]
[mole_rate_Ba_produced]
type = FunctionValuePostprocessor
function = moles_Ba
indirect_dependencies = 'kg_Ba_produced_this_timestep dt'
[]
[mole_rate_Li_produced]
type = FunctionValuePostprocessor
function = moles_Li
indirect_dependencies = 'kg_Li_produced_this_timestep dt'
[]
[mole_rate_NO3_produced]
type = FunctionValuePostprocessor
function = moles_NO3
indirect_dependencies = 'kg_NO3_produced_this_timestep dt'
[]
[mole_rate_O2aq_produced]
type = FunctionValuePostprocessor
function = moles_O2aq
indirect_dependencies = 'kg_O2aq_produced_this_timestep dt'
[]
[mole_rate_H2O_produced]
type = FunctionValuePostprocessor
function = moles_H2O
indirect_dependencies = 'kg_H2O_produced_this_timestep dt'
[]
[heat_joules_extracted_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_heat
[]
[production_temperature]
type = AverageNodalVariableValue
boundary = production_nodes
variable = temperature
[]
[]
[Functions]
[moles_H]
type = ParsedFunction
symbol_names = 'kg_H dt'
symbol_values = 'kg_H_produced_this_timestep dt'
expression = 'kg_H * 1000 / 1.0079 / dt'
[]
[moles_Cl]
type = ParsedFunction
symbol_names = 'kg_Cl dt'
symbol_values = 'kg_Cl_produced_this_timestep dt'
expression = 'kg_Cl * 1000 / 35.453 / dt'
[]
[moles_SO4]
type = ParsedFunction
symbol_names = 'kg_SO4 dt'
symbol_values = 'kg_SO4_produced_this_timestep dt'
expression = 'kg_SO4 * 1000 / 96.0576 / dt'
[]
[moles_HCO3]
type = ParsedFunction
symbol_names = 'kg_HCO3 dt'
symbol_values = 'kg_HCO3_produced_this_timestep dt'
expression = 'kg_HCO3 * 1000 / 61.0171 / dt'
[]
[moles_SiO2aq]
type = ParsedFunction
symbol_names = 'kg_SiO2aq dt'
symbol_values = 'kg_SiO2aq_produced_this_timestep dt'
expression = 'kg_SiO2aq * 1000 / 60.0843 / dt'
[]
[moles_Al]
type = ParsedFunction
symbol_names = 'kg_Al dt'
symbol_values = 'kg_Al_produced_this_timestep dt'
expression = 'kg_Al * 1000 / 26.9815 / dt'
[]
[moles_Ca]
type = ParsedFunction
symbol_names = 'kg_Ca dt'
symbol_values = 'kg_Ca_produced_this_timestep dt'
expression = 'kg_Ca * 1000 / 40.08 / dt'
[]
[moles_Mg]
type = ParsedFunction
symbol_names = 'kg_Mg dt'
symbol_values = 'kg_Mg_produced_this_timestep dt'
expression = 'kg_Mg * 1000 / 24.305 / dt'
[]
[moles_Fe]
type = ParsedFunction
symbol_names = 'kg_Fe dt'
symbol_values = 'kg_Fe_produced_this_timestep dt'
expression = 'kg_Fe * 1000 / 55.847 / dt'
[]
[moles_K]
type = ParsedFunction
symbol_names = 'kg_K dt'
symbol_values = 'kg_K_produced_this_timestep dt'
expression = 'kg_K * 1000 / 39.0983 / dt'
[]
[moles_Na]
type = ParsedFunction
symbol_names = 'kg_Na dt'
symbol_values = 'kg_Na_produced_this_timestep dt'
expression = 'kg_Na * 1000 / 22.9898 / dt'
[]
[moles_Sr]
type = ParsedFunction
symbol_names = 'kg_Sr dt'
symbol_values = 'kg_Sr_produced_this_timestep dt'
expression = 'kg_Sr * 1000 / 87.62 / dt'
[]
[moles_F]
type = ParsedFunction
symbol_names = 'kg_F dt'
symbol_values = 'kg_F_produced_this_timestep dt'
expression = 'kg_F * 1000 / 18.9984 / dt'
[]
[moles_BOH]
type = ParsedFunction
symbol_names = 'kg_BOH dt'
symbol_values = 'kg_BOH_produced_this_timestep dt'
expression = 'kg_BOH * 1000 / 61.8329 / dt'
[]
[moles_Br]
type = ParsedFunction
symbol_names = 'kg_Br dt'
symbol_values = 'kg_Br_produced_this_timestep dt'
expression = 'kg_Br * 1000 / 79.904 / dt'
[]
[moles_Ba]
type = ParsedFunction
symbol_names = 'kg_Ba dt'
symbol_values = 'kg_Ba_produced_this_timestep dt'
expression = 'kg_Ba * 1000 / 137.33 / dt'
[]
[moles_Li]
type = ParsedFunction
symbol_names = 'kg_Li dt'
symbol_values = 'kg_Li_produced_this_timestep dt'
expression = 'kg_Li * 1000 / 6.941 / dt'
[]
[moles_NO3]
type = ParsedFunction
symbol_names = 'kg_NO3 dt'
symbol_values = 'kg_NO3_produced_this_timestep dt'
expression = 'kg_NO3 * 1000 / 62.0049 / dt'
[]
[moles_O2aq]
type = ParsedFunction
symbol_names = 'kg_O2aq dt'
symbol_values = 'kg_O2aq_produced_this_timestep dt'
expression = 'kg_O2aq * 1000 / 31.9988 / dt'
[]
[moles_H2O]
type = ParsedFunction
symbol_names = 'kg_H2O dt'
symbol_values = 'kg_H2O_produced_this_timestep dt'
expression = 'kg_H2O * 1000 / 18.01801802 / dt'
[]
[]
[AuxVariables]
[injection_temperature]
initial_condition = 92
[]
[injection_rate_massfrac_H]
initial_condition = -2.952985071156e-06
[]
[injection_rate_massfrac_Cl]
initial_condition = 0.04870664551708
[]
[injection_rate_massfrac_SO4]
initial_condition = 0.0060359986852517
[]
[injection_rate_massfrac_HCO3]
initial_condition = 5.0897287594019e-05
[]
[injection_rate_massfrac_SiO2aq]
initial_condition = 3.0246609868421e-05
[]
[injection_rate_massfrac_Al]
initial_condition = 3.268028901929e-08
[]
[injection_rate_massfrac_Ca]
initial_condition = 0.00082159428184586
[]
[injection_rate_massfrac_Mg]
initial_condition = 1.8546347062146e-05
[]
[injection_rate_massfrac_Fe]
initial_condition = 4.3291908204093e-05
[]
[injection_rate_massfrac_K]
initial_condition = 6.8434768308898e-05
[]
[injection_rate_massfrac_Na]
initial_condition = 0.033298053919671
[]
[injection_rate_massfrac_Sr]
initial_condition = 1.2771866652177e-05
[]
[injection_rate_massfrac_F]
initial_condition = 5.5648860174073e-06
[]
[injection_rate_massfrac_BOH]
initial_condition = 0.0003758574621917
[]
[injection_rate_massfrac_Br]
initial_condition = 9.0315286107068e-05
[]
[injection_rate_massfrac_Ba]
initial_condition = 1.5637460875161e-07
[]
[injection_rate_massfrac_Li]
initial_condition = 8.3017067912701e-05
[]
[injection_rate_massfrac_NO3]
initial_condition = 0.00010958455036169
[]
[injection_rate_massfrac_O2aq]
initial_condition = -7.0806852373351e-05
[]
[injection_rate_massfrac_H2O]
initial_condition = 0.91032275033842
[]
[rate_H]
[]
[rate_Cl]
[]
[rate_SO4]
[]
[rate_HCO3]
[]
[rate_SiO2aq]
[]
[rate_Al]
[]
[rate_Ca]
[]
[rate_Mg]
[]
[rate_Fe]
[]
[rate_K]
[]
[rate_Na]
[]
[rate_Sr]
[]
[rate_F]
[]
[rate_BOH]
[]
[rate_Br]
[]
[rate_Ba]
[]
[rate_Li]
[]
[rate_NO3]
[]
[rate_O2aq]
[]
[rate_H2O]
[]
[]
[MultiApps]
[react]
type = TransientMultiApp
input_files = aquifer_geochemistry.i
clone_master_mesh = true
execute_on = 'timestep_end'
[]
[]
[Transfers]
[changes_due_to_flow]
type = MultiAppCopyTransfer
source_variable = 'rate_H rate_Cl rate_SO4 rate_HCO3 rate_SiO2aq rate_Al rate_Ca rate_Mg rate_Fe rate_K rate_Na rate_Sr rate_F rate_BOH rate_Br rate_Ba rate_Li rate_NO3 rate_O2aq rate_H2O temperature'
variable = 'pf_rate_H pf_rate_Cl pf_rate_SO4 pf_rate_HCO3 pf_rate_SiO2aq pf_rate_Al pf_rate_Ca pf_rate_Mg pf_rate_Fe pf_rate_K pf_rate_Na pf_rate_Sr pf_rate_F pf_rate_BOH pf_rate_Br pf_rate_Ba pf_rate_Li pf_rate_NO3 pf_rate_O2aq pf_rate_H2O temperature'
to_multi_app = react
[]
[massfrac_from_geochem]
type = MultiAppCopyTransfer
source_variable = 'massfrac_H massfrac_Cl massfrac_SO4 massfrac_HCO3 massfrac_SiO2aq massfrac_Al massfrac_Ca massfrac_Mg massfrac_Fe massfrac_K massfrac_Na massfrac_Sr massfrac_F massfrac_BOH massfrac_Br massfrac_Ba massfrac_Li massfrac_NO3 massfrac_O2aq '
variable = 'f_H f_Cl f_SO4 f_HCO3 f_SiO2aq f_Al f_Ca f_Mg f_Fe f_K f_Na f_Sr f_F f_BOH f_Br f_Ba f_Li f_NO3 f_O2aq '
from_multi_app = react
[]
[]
(modules/stochastic_tools/test/tests/auxkernels/surrogate_aux/surrogate_array_aux.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 10
[]
[]
[Surrogates]
[surrogate]
type = PolynomialRegressionSurrogate
filename = surrogate_trainer_poly_regression.rd
[]
[]
[AuxVariables]
[u]
family = MONOMIAL
order = CONSTANT
components = 2
[]
[u0]
family = MONOMIAL
order = CONSTANT
[]
[u1]
family = MONOMIAL
order = CONSTANT
[]
[array_var]
family = MONOMIAL
order = CONSTANT
components = 2
[]
[var]
family = MONOMIAL
order = CONSTANT
[]
[reference]
family = MONOMIAL
order = CONSTANT
[]
[]
[ICs]
[array_var_ic]
type = ArrayFunctionIC
variable = array_var
function = 'funx funmx'
[]
[var_ic]
type = FunctionIC
variable = var
function = funy
[]
[]
[Functions]
[funx]
type = ParsedFunction
expression = 'x'
[]
[funmx]
type = ParsedFunction
expression = '-x'
[]
[funy]
type = ParsedFunction
expression = 'y'
[]
[funz]
type = ParsedFunction
expression = 'z'
[]
[funt]
type = ParsedFunction
expression = 't'
[]
[reference0]
type = ParsedFunction
expression = '1 + x + y + z + t +
x*x + x*y + x*z + x*t +
y*y + y*z + y*t +
z*z + z*t +
t*t'
[]
[reference1]
type = ParsedFunction
expression = '1 - x + y + z + t +
x*x - x*y - x*z - x*t +
y*y + y*z + y*t +
z*z + z*t +
t*t'
[]
[]
[Postprocessors]
[pp]
type = FunctionValuePostprocessor
function = funt
point = '0 0 0'
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[AuxKernels]
[u_aux]
type = SurrogateModelArrayAuxKernel
variable = u
model = surrogate
parameters = 'array_var var funz pp'
scalar_parameters = 'funz pp'
coupled_variables = 'var'
coupled_array_variables = 'array_var'
execute_on = 'INITIAL TIMESTEP_END'
[]
[u0_aux]
type = ArrayVariableComponent
variable = u0
array_variable = u
component = 0
execute_on = 'INITIAL TIMESTEP_END'
[]
[u1_aux]
type = ArrayVariableComponent
variable = u1
array_variable = u
component = 1
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Postprocessors]
[diff0]
type = ElementL2Error
variable = u0
function = reference0
execute_on = 'INITIAL TIMESTEP_END'
[]
[diff1]
type = ElementL2Error
variable = u1
function = reference1
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 10
[]
[UserObjects]
[terminator]
type = Terminator
expression = '(diff0 + diff1) > 1e-8'
error_level = ERROR
[]
[]
(modules/porous_flow/test/tests/dirackernels/bh05.i)
# unsaturated
# injection
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 1
xmax = 3
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Functions]
[dts]
type = PiecewiseLinear
y = '500 500 1E1'
x = '4000 5000 6500'
[]
[]
[Variables]
[pp]
initial_condition = -2E5
[]
[]
[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
[]
[borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.8
alpha = 1e-5
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
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.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[relperm]
type = PorousFlowRelativePermeabilityFLAC
m = 2
phase = 0
[]
[]
[DiracKernels]
[bh]
type = PorousFlowPeacemanBorehole
variable = pp
SumQuantityUO = borehole_total_outflow_mass
point_file = bh03.bh
fluid_phase = 0
bottom_p_or_t = 0
unit_weight = '0 0 0'
use_mobility = true
character = -1
[]
[]
[Postprocessors]
[bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[]
[fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[]
[fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[]
[zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
indirect_dependencies = 'fluid_mass1 fluid_mass0 bh_report'
[]
[p0]
type = PointValue
variable = pp
point = '2 0 0'
execute_on = timestep_end
[]
[]
[Functions]
[mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[]
[]
[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 = 6500
solve_type = NEWTON
[TimeStepper]
type = FunctionDT
function = dts
[]
[]
[Outputs]
file_base = bh05
exodus = false
csv = true
execute_on = timestep_end
[]
(modules/solid_mechanics/test/tests/mohr_coulomb/planar_hard3.i)
# apply repeated stretches in x z directions, and smaller stretches along the y direction,
# so that sigma_I = sigma_II,
# which means that lode angle = 30deg.
# Both return to the edge (lode angle = 30deg, ie 010100) and tip are experienced.
#
# It is checked that the yield functions are less than their tolerance values
# It is checked that the cohesion hardens correctly
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[]
[BCs]
[./x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'front back'
function = '1E-6*x*t'
[../]
[./y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'front back'
function = '0.05E-6*y*t'
[../]
[./z]
type = FunctionDirichletBC
variable = disp_z
boundary = 'front back'
function = '1E-6*z*t'
[../]
[]
[Functions]
[./should_be_zero_fcn]
type = ParsedFunction
expression = 'if((a<1E-5)&(b<1E-5)&(c<1E-5)&(d<1E-5)&(g<1E-5)&(h<1E-5),0,abs(a)+abs(b)+abs(c)+abs(d)+abs(g)+abs(h))'
symbol_names = 'a b c d g h'
symbol_values = 'f0 f1 f2 f3 f4 f5'
[../]
[./coh_analytic]
type = ParsedFunction
expression = '20-10*exp(-1E5*intnl)'
symbol_names = intnl
symbol_values = internal
[../]
[./coh_from_yieldfcns]
type = ParsedFunction
expression = '(f0+f1-(sxx+syy)*sin(phi))/(-2)/cos(phi)'
symbol_names = 'f0 f1 sxx syy phi'
symbol_values = 'f0 f1 s_xx s_yy 0.8726646'
[../]
[./should_be_zero_coh]
type = ParsedFunction
expression = 'if(abs(a-b)<1E-6,0,1E6*abs(a-b))'
symbol_names = 'a b'
symbol_values = 'Coh_analytic Coh_moose'
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_int]
order = CONSTANT
family = MONOMIAL
[../]
[./yield_fcn0]
order = CONSTANT
family = MONOMIAL
[../]
[./yield_fcn1]
order = CONSTANT
family = MONOMIAL
[../]
[./yield_fcn2]
order = CONSTANT
family = MONOMIAL
[../]
[./yield_fcn3]
order = CONSTANT
family = MONOMIAL
[../]
[./yield_fcn4]
order = CONSTANT
family = MONOMIAL
[../]
[./yield_fcn5]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./mc_int_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_internal_parameter
variable = mc_int
[../]
[./yield_fcn0]
type = MaterialStdVectorAux
index = 0
property = plastic_yield_function
variable = yield_fcn0
[../]
[./yield_fcn1]
type = MaterialStdVectorAux
index = 1
property = plastic_yield_function
variable = yield_fcn1
[../]
[./yield_fcn2]
type = MaterialStdVectorAux
index = 2
property = plastic_yield_function
variable = yield_fcn2
[../]
[./yield_fcn3]
type = MaterialStdVectorAux
index = 3
property = plastic_yield_function
variable = yield_fcn3
[../]
[./yield_fcn4]
type = MaterialStdVectorAux
index = 4
property = plastic_yield_function
variable = yield_fcn4
[../]
[./yield_fcn5]
type = MaterialStdVectorAux
index = 5
property = plastic_yield_function
variable = yield_fcn5
[../]
[]
[Postprocessors]
[./s_xx]
type = PointValue
point = '0 0 0'
variable = stress_xx
[../]
[./s_xy]
type = PointValue
point = '0 0 0'
variable = stress_xy
[../]
[./s_xz]
type = PointValue
point = '0 0 0'
variable = stress_xz
[../]
[./s_yy]
type = PointValue
point = '0 0 0'
variable = stress_yy
[../]
[./s_yz]
type = PointValue
point = '0 0 0'
variable = stress_yz
[../]
[./s_zz]
type = PointValue
point = '0 0 0'
variable = stress_zz
[../]
[./internal]
type = PointValue
point = '0 0 0'
variable = mc_int
[../]
[./f0]
type = PointValue
point = '0 0 0'
variable = yield_fcn0
[../]
[./f1]
type = PointValue
point = '0 0 0'
variable = yield_fcn1
[../]
[./f2]
type = PointValue
point = '0 0 0'
variable = yield_fcn2
[../]
[./f3]
type = PointValue
point = '0 0 0'
variable = yield_fcn3
[../]
[./f4]
type = PointValue
point = '0 0 0'
variable = yield_fcn4
[../]
[./f5]
type = PointValue
point = '0 0 0'
variable = yield_fcn5
[../]
[./yfcns_should_be_zero]
type = FunctionValuePostprocessor
function = should_be_zero_fcn
[../]
[./Coh_analytic]
type = FunctionValuePostprocessor
function = coh_analytic
[../]
[./Coh_moose]
type = FunctionValuePostprocessor
function = coh_from_yieldfcns
[../]
[./cohesion_difference_should_be_zero]
type = FunctionValuePostprocessor
function = should_be_zero_coh
[../]
[]
[UserObjects]
[./mc_coh]
type = SolidMechanicsHardeningExponential
value_0 = 10
value_residual = 20
rate = 1E5
[../]
[./mc_phi]
type = SolidMechanicsHardeningConstant
value = 0.8726646
[../]
[./mc_psi]
type = SolidMechanicsHardeningConstant
value = 1 #0.8726646 # 50deg
[../]
[./mc]
type = SolidMechanicsPlasticMohrCoulombMulti
cohesion = mc_coh
friction_angle = mc_phi
dilation_angle = mc_psi
yield_function_tolerance = 1E-5
use_custom_returnMap = true
internal_constraint_tolerance = 1E-9
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
fill_method = symmetric_isotropic
C_ijkl = '0 1E7'
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./mc]
type = ComputeMultiPlasticityStress
block = 0
ep_plastic_tolerance = 1E-12
plastic_models = mc
[../]
[]
[Executioner]
end_time = 5
dt = 1
type = Transient
[]
[Outputs]
file_base = planar_hard3
exodus = false
[./csv]
type = CSV
hide = 'f0 f1 f2 f3 f4 f5 s_xy s_xz s_yz Coh_analytic Coh_moose'
execute_on = 'timestep_end'
[../]
[]
(modules/porous_flow/test/tests/dirackernels/bh04.i)
# fully-saturated
# production
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Functions]
[dts]
type = PiecewiseLinear
y = '1E-2 1E-1 1 1E1 1E2 1E3'
x = '0 1E-1 1 1E1 1E2 1E3'
[]
[]
[Variables]
[pp]
initial_condition = 0
[]
[]
[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
[]
[borehole_total_outflow_mass]
type = PorousFlowSumQuantity
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.8
alpha = 1e-5
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
viscosity = 1e-3
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.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[relperm]
type = PorousFlowRelativePermeabilityFLAC
m = 2
phase = 0
[]
[]
[DiracKernels]
[bh]
type = PorousFlowPeacemanBorehole
variable = pp
SumQuantityUO = borehole_total_outflow_mass
point_file = bh02.bh
fluid_phase = 0
bottom_p_or_t = -1E6
unit_weight = '0 0 0'
use_mobility = true
character = 1
[]
[]
[Postprocessors]
[bh_report]
type = PorousFlowPlotQuantity
uo = borehole_total_outflow_mass
[]
[fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[]
[fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[]
[zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
indirect_dependencies = 'fluid_mass1 fluid_mass0 bh_report'
[]
[p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[]
[]
[Functions]
[mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[]
[]
[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 = bh04
exodus = false
csv = true
execute_on = timestep_end
[]
(modules/richards/test/tests/dirac/bh_fu_05.i)
# unsaturated
# injection
# fullyupwind
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = DensityConstBulk
relperm_UO = RelPermPower
sat_UO = Saturation
seff_UO = Seff1VG
SUPG_UO = SUPGstandard
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '500 500 1E1'
x = '4000 5000 6500'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./Seff1VG]
type = RichardsSeff1VG
m = 0.8
al = 1E-5
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0
sum_s_res = 0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E8
[../]
[./borehole_total_outflow_mass]
type = RichardsSumQuantity
[../]
[]
[Variables]
active = 'pressure'
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./p_ic]
type = FunctionIC
variable = pressure
function = initial_pressure
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
variable = pressure
[../]
[]
[DiracKernels]
[./bh]
type = RichardsBorehole
bottom_pressure = 0
point_file = bh03.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pressure
unit_weight = '0 0 0'
character = -1
fully_upwind = true
[../]
[]
[Postprocessors]
[./bh_report]
type = RichardsPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = RichardsMass
variable = pressure
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = RichardsMass
variable = pressure
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
indirect_dependencies = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[./p0]
type = PointValue
variable = pressure
point = '1 1 1'
execute_on = timestep_end
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = -2E5
[../]
[./mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = 0
viscosity = 1E-3
mat_porosity = 0.1
mat_permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = Seff1VG
pressure_vars = pressure
[../]
[]
[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 = 6500
solve_type = NEWTON
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = bh_fu_05
exodus = false
csv = true
execute_on = timestep_end
[]
(test/tests/kernels/ode/ode_sys_impl_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[]
[Functions]
[./f_fn]
type = ParsedFunction
expression = -4
[../]
[./bc_all_fn]
type = ParsedFunction
expression = x*x+y*y
[../]
# ODEs
[./exact_x_fn]
type = ParsedFunction
expression = (-1/3)*exp(-t)+(4/3)*exp(5*t)
[../]
[]
# NL
[Variables]
[./u]
family = LAGRANGE
order = FIRST
[../]
# ODE variables
[./x]
family = SCALAR
order = FIRST
initial_condition = 1
[../]
[./y]
family = SCALAR
order = FIRST
initial_condition = 2
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./uff]
type = BodyForce
variable = u
function = f_fn
[../]
[]
[ScalarKernels]
[./td1]
type = ODETimeDerivative
variable = x
[../]
[./ode1]
type = ImplicitODEx
variable = x
y = y
[../]
[./td2]
type = ODETimeDerivative
variable = y
[../]
[./ode2]
type = ImplicitODEy
variable = y
x = x
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = bc_all_fn
[../]
[]
[Postprocessors]
active = 'exact_x l2err_x'
[./exact_x]
type = FunctionValuePostprocessor
function = exact_x_fn
execute_on = 'initial timestep_end'
point = '0 0 0'
[../]
[./l2err_x]
type = ScalarL2Error
variable = x
function = exact_x_fn
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
start_time = 0
dt = 0.01
num_steps = 100
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/hysteresis/2phasePS.i)
# Simple example of a 2-phase situation with hysteretic capillary pressure. Gas is added to and removed from the system in order to observe the hysteresis
# All liquid water exists in component 0
# All gas exists in component 1
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
number_fluid_phases = 2
number_fluid_components = 2
porous_flow_vars = 'pp0 sat1'
[]
[]
[Variables]
[pp0]
[]
[sat1]
initial_condition = 0
[]
[]
[Kernels]
[mass_conservation0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp0
[]
[mass_conservation1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = sat1
[]
[]
[DiracKernels]
[pump]
type = PorousFlowPointSourceFromPostprocessor
mass_flux = flux
point = '0.5 0 0'
variable = sat1
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[sat0]
family = MONOMIAL
order = CONSTANT
[]
[pp1]
family = MONOMIAL
order = CONSTANT
[]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[sat0]
type = PorousFlowPropertyAux
variable = sat0
phase = 0
property = saturation
[]
[pp1]
type = PorousFlowPropertyAux
variable = pp1
phase = 1
property = pressure
[]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[]
[FluidProperties]
[simple_fluid] # same properties used for both phases
type = SimpleFluidProperties
bulk_modulus = 10 # so pumping does not result in excessive porepressure
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[temperature]
type = PorousFlowTemperature
temperature = 20
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 1
[]
[hys_order_material]
type = PorousFlowHysteresisOrder
[]
[pc_calculator]
type = PorousFlow2PhaseHysPS
alpha_d = 10.0
alpha_w = 7.0
n_d = 1.5
n_w = 1.9
S_l_min = 0.1
S_lr = 0.2
S_gr_max = 0.3
Pc_max = 12.0
high_ratio = 0.9
low_extension_type = quadratic
high_extension_type = power
phase0_porepressure = pp0
phase1_saturation = sat1
[]
[]
[Postprocessors]
[flux]
type = FunctionValuePostprocessor
function = 'if(t <= 9, 10, -10)'
[]
[hys_order]
type = PointValue
point = '0 0 0'
variable = hys_order
[]
[sat0]
type = PointValue
point = '0 0 0'
variable = sat0
[]
[sat1]
type = PointValue
point = '0 0 0'
variable = sat1
[]
[pp0]
type = PointValue
point = '0 0 0'
variable = pp0
[]
[pp1]
type = PointValue
point = '0 0 0'
variable = pp1
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = ' lu NONZERO'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.5
end_time = 18
nl_abs_tol = 1E-10
[]
[Outputs]
csv = true
[]
(modules/thermal_hydraulics/test/tests/components/shaft_connected_compressor_1phase/shaft_motor_compressor.i)
area = 0.2359
dt = 1.e-3
[GlobalParams]
initial_p = 1e5
initial_T = 288
initial_vel = 60
initial_vel_x = 60
initial_vel_y = 0
initial_vel_z = 0
A = ${area}
A_ref = ${area}
f = 100
scaling_factor_1phase = '0.04 0.04 0.04e-5'
closures = simple_closures
fp = fp
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[compressor]
type = ShaftConnectedCompressor1Phase
inlet = 'pipe:out'
outlet = 'pipe:in'
position = '0 0 0'
scaling_factor_rhoEV = 1e-5
volume = ${fparse area*0.45}
inertia_coeff = '1 1 1 1'
inertia_const = 1.61397
speed_cr_I = 1e12
speed_cr_fr = 0
tau_fr_coeff = '0 0 0 0'
tau_fr_const = 0
omega_rated = 200
mdot_rated = 21.74
rho0_rated = 1.1812
c0_rated = 340
speeds = '0.0 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 2'
Rp_functions = 'Rp00 Rp04 Rp05 Rp06 Rp07 Rp08 Rp09 Rp10 Rp11 Rp11'
eff_functions = 'eff00 eff04 eff05 eff06 eff07 eff08 eff09 eff10 eff11 eff11'
[]
[pipe]
type = FlowChannel1Phase
position = '0.1 0 0'
orientation = '1 0 0'
length = 10
n_elems = 20
[]
[motor]
type = ShaftConnectedMotor
inertia = 1e2
torque = 100
[]
[shaft]
type = Shaft
connected_components = 'motor compressor'
initial_speed = 100
[]
[]
[Functions]
[Rp00]
type = PiecewiseLinear
x = '0 0.3736 0.4216'
y = '1 0.9701 0.9619'
[]
[eff00]
type = PiecewiseLinear
x = '0 0.3736 0.4216'
y = '0.001 0.8941 0.6641'
[]
[Rp04]
type = PiecewiseLinear
x = '0.3736 0.3745 0.3753 0.3762 0.3770 0.3919 0.4067 0.4216 0.4826'
y = '1.0789 1.0779 1.0771 1.0759 1.0749 1.0570 1.0388 1.0204 0.9450'
[]
[eff04]
type = PiecewiseLinear
x = '0.3736 0.3745 0.3753 0.3762 0.3770 0.3919 0.4067 0.4216 0.4826'
y = '0.8941 0.8929 0.8925 0.8915 0.8901 0.8601 0.7986 0.6641 0.1115'
[]
[Rp05]
type = PiecewiseLinear
x = '0.3736 0.4026 0.4106 0.4186 0.4266 0.4346 0.4426 0.4506 0.4586 0.4666 0.4746 0.4826 0.5941'
y = '1.2898 1.2442 1.2316 1.2189 1.2066 1.1930 1.1804 1.1677 1.1542 1.1413 1.1279 1.1150 0.9357'
[]
[eff05]
type = PiecewiseLinear
x = '0.3736 0.4026 0.4106 0.4186 0.4266 0.4346 0.4426 0.4506 0.4586 0.4666 0.4746 0.4826 0.5941'
y = '0.9281 0.9263 0.9258 0.9244 0.9226 0.9211 0.9195 0.9162 0.9116 0.9062 0.8995 0.8914 0.7793'
[]
[Rp06]
type = PiecewiseLinear
x = '0.4026 0.4613 0.4723 0.4834 0.4945 0.5055 0.5166 0.5277 0.5387 0.5609 0.5719 0.583 0.5941 0.7124'
y = '1.5533 1.4438 1.4232 1.4011 1.3793 1.3589 1.3354 1.3100 1.2867 1.2376 1.2131 1.1887 1.1636 0.896'
[]
[eff06]
type = PiecewiseLinear
x = '0.4026 0.4613 0.4723 0.4834 0.4945 0.5055 0.5166 0.5277 0.5387 0.5609 0.5719 0.583 0.5941 0.7124'
y = '0.9148 0.9255 0.9275 0.9277 0.9282 0.9295 0.9290 0.9269 0.9242 0.9146 0.9080 0.900 0.8920 0.8061'
[]
[Rp07]
type = PiecewiseLinear
x = '0.4613 0.5447 0.5587 0.5726 0.5866 0.6006 0.6145 0.6285 0.6425 0.6565 0.6704 0.6844 0.6984 0.7124 0.8358'
y = '1.8740 1.6857 1.6541 1.6168 1.5811 1.5430 1.5067 1.4684 1.4292 1.3891 1.3479 1.3061 1.2628 1.2208 0.8498'
[]
[eff07]
type = PiecewiseLinear
x = '0.4613 0.5447 0.5587 0.5726 0.5866 0.6006 0.6145 0.6285 0.6425 0.6565 0.6704 0.6844 0.6984 0.7124 0.8358'
y = '0.9004 0.9232 0.9270 0.9294 0.9298 0.9312 0.9310 0.9290 0.9264 0.9225 0.9191 0.9128 0.9030 0.8904 0.7789'
[]
[Rp08]
type = PiecewiseLinear
x = '0.5447 0.6638 0.6810 0.6982 0.7154 0.7326 0.7498 0.7670 0.7842 0.8014 0.8186 0.8358 0.9702'
y = '2.3005 1.9270 1.8732 1.8195 1.7600 1.7010 1.6357 1.5697 1.5019 1.4327 1.3638 1.2925 0.7347'
[]
[eff08]
type = PiecewiseLinear
x = '0.5447 0.6638 0.6810 0.6982 0.7154 0.7326 0.7498 0.7670 0.7842 0.8014 0.8186 0.8358 0.9702'
y = '0.9102 0.9276 0.9301 0.9313 0.9319 0.9318 0.9293 0.9256 0.9231 0.9153 0.9040 0.8933 0.8098'
[]
[Rp09]
type = PiecewiseLinear
x = '0.6638 0.7762 0.7938 0.8115 0.8291 0.8467 0.8644 0.8820 0.8997 0.9173 0.9349 0.9526 0.9702 1.1107 1.25120'
y = '2.6895 2.2892 2.2263 2.1611 2.0887 2.0061 1.9211 1.8302 1.7409 1.6482 1.5593 1.4612 1.3586 0.5422 -0.2742'
[]
[eff09]
type = PiecewiseLinear
x = '0.6638 0.7762 0.7938 0.8115 0.8291 0.8467 0.8644 0.8820 0.8997 0.9173 0.9349 0.9526 0.9702 1.1107 1.2512'
y = '0.8961 0.9243 0.9288 0.9323 0.9330 0.9325 0.9319 0.9284 0.9254 0.9215 0.9134 0.9051 0.8864 0.7380 0.5896'
[]
[Rp10]
type = PiecewiseLinear
x = '0.7762 0.9255 0.9284 0.9461 0.9546 0.9816 0.9968 1.0170 1.039 1.0525 1.0812 1.0880 1.1056 1.1107 1.2511'
y = '3.3162 2.6391 2.6261 2.5425 2.5000 2.3469 2.2521 2.1211 1.974 1.8806 1.6701 1.6169 1.4710 1.4257 0.1817'
[]
[eff10]
type = PiecewiseLinear
x = '0.7762 0.9255 0.9284 0.9461 0.9546 0.9816 0.9968 1.0170 1.0390 1.0525 1.0812 1.0880 1.1056 1.1107 1.2511'
y = '0.8991 0.9276 0.9281 0.9308 0.9317 0.9329 0.9318 0.9291 0.9252 0.9223 0.9116 0.9072 0.8913 0.8844 0.6937'
[]
[Rp11]
type = PiecewiseLinear
x = '0.9255 1.0749 1.134 1.2511'
y = '3.9586 2.9889 2.605 1.4928'
[]
[eff11]
type = PiecewiseLinear
x = '0.9255 1.0749 1.1340 1.2511'
y = '0.9257 0.9308 0.9328 0.8823'
[]
[S_energy_fcn]
type = ParsedFunction
expression = '-(tau_isen+tau_diss)*omega'
symbol_names = 'tau_isen tau_diss omega'
symbol_values = 'compressor:isentropic_torque compressor:dissipation_torque shaft:omega'
[]
[energy_conservation_fcn]
type = ParsedFunction
expression = '(E_change - S_energy * dt) / E_tot'
symbol_names = 'E_change S_energy dt E_tot'
symbol_values = 'E_change S_energy ${dt} E_tot'
[]
[]
[Postprocessors]
# mass conservation
[mass_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoA
block = 'pipe'
execute_on = 'initial timestep_end'
[]
[mass_compressor]
type = ScalarVariable
variable = compressor:rhoV
execute_on = 'initial timestep_end'
[]
[mass_tot]
type = SumPostprocessor
values = 'mass_pipes mass_compressor'
execute_on = 'initial timestep_end'
[]
[mass_conservation]
type = ChangeOverTimePostprocessor
postprocessor = mass_tot
change_with_respect_to_initial = true
compute_relative_change = true
execute_on = 'initial timestep_end'
[]
# energy conservation
[E_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoEA
block = 'pipe'
execute_on = 'initial timestep_end'
[]
[E_compressor]
type = ScalarVariable
variable = compressor:rhoEV
execute_on = 'initial timestep_end'
[]
[E_tot]
type = LinearCombinationPostprocessor
pp_coefs = '1 1'
pp_names = 'E_pipes E_compressor'
execute_on = 'initial timestep_end'
[]
[S_energy]
type = FunctionValuePostprocessor
function = S_energy_fcn
execute_on = 'initial timestep_end'
[]
[E_change]
type = ChangeOverTimePostprocessor
postprocessor = E_tot
execute_on = 'initial timestep_end'
[]
# This should also execute on initial. This value is
# lagged by one timestep as a workaround to moose issue #13262.
[energy_conservation]
type = FunctionValuePostprocessor
function = energy_conservation_fcn
execute_on = 'timestep_end'
indirect_dependencies = 'E_tot E_change S_energy'
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
dt = ${dt}
num_steps = 6
solve_type = 'NEWTON'
line_search = 'basic'
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-4
l_max_its = 10
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Outputs]
velocity_as_vector = false
[]
(modules/porous_flow/test/tests/hysteresis/2phasePS_relperm.i)
# Simple example of a 2-phase situation with hysteretic relative permeability. Gas is added to and removed from the system in order to observe the hysteresis
# All liquid water exists in component 0
# All gas exists in component 1
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
number_fluid_phases = 2
number_fluid_components = 2
porous_flow_vars = 'pp0 sat1'
[]
[pc]
type = PorousFlowCapillaryPressureVG
alpha = 10.0
m = 0.33
[]
[]
[Variables]
[pp0]
[]
[sat1]
initial_condition = 0
[]
[]
[Kernels]
[mass_conservation0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp0
[]
[mass_conservation1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = sat1
[]
[]
[DiracKernels]
[pump]
type = PorousFlowPointSourceFromPostprocessor
mass_flux = flux
point = '0.5 0 0'
variable = sat1
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[sat0]
family = MONOMIAL
order = CONSTANT
[]
[pp1]
family = MONOMIAL
order = CONSTANT
[]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[relperm_liquid]
family = MONOMIAL
order = CONSTANT
[]
[relperm_gas]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[sat0]
type = PorousFlowPropertyAux
variable = sat0
phase = 0
property = saturation
[]
[relperm_liquid]
type = PorousFlowPropertyAux
variable = relperm_liquid
property = relperm
phase = 0
[]
[relperm_gas]
type = PorousFlowPropertyAux
variable = relperm_gas
property = relperm
phase = 1
[]
[pp1]
type = PorousFlowPropertyAux
variable = pp1
phase = 1
property = pressure
[]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[]
[FluidProperties]
[simple_fluid] # same properties used for both phases
type = SimpleFluidProperties
bulk_modulus = 10 # so pumping does not result in excessive porepressure
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[temperature]
type = PorousFlowTemperature
temperature = 20
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 1
[]
[pc_calculator]
type = PorousFlow2PhasePS
capillary_pressure = pc
phase0_porepressure = pp0
phase1_saturation = sat1
[]
[hys_order_material]
type = PorousFlowHysteresisOrder
[]
[relperm_liquid]
type = PorousFlowHystereticRelativePermeabilityLiquid
phase = 0
S_lr = 0.1
S_gr_max = 0.2
m = 0.9
liquid_modification_range = 0.9
[]
[relperm_gas]
type = PorousFlowHystereticRelativePermeabilityGas
phase = 1
S_lr = 0.1
S_gr_max = 0.2
m = 0.9
gamma = 0.33
k_rg_max = 0.8
gas_low_extension_type = linear_like
[]
[]
[Postprocessors]
[flux]
type = FunctionValuePostprocessor
function = 'if(t <= 9, 10, -10)'
[]
[hys_order]
type = PointValue
point = '0 0 0'
variable = hys_order
[]
[sat0]
type = PointValue
point = '0 0 0'
variable = sat0
[]
[sat1]
type = PointValue
point = '0 0 0'
variable = sat1
[]
[kr_liq]
type = PointValue
point = '0 0 0'
variable = relperm_liquid
[]
[kr_gas]
type = PointValue
point = '0 0 0'
variable = relperm_gas
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = ' lu NONZERO'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.5
end_time = 18
nl_abs_tol = 1E-10
[]
[Outputs]
csv = true
[]
(modules/porous_flow/test/tests/poro_elasticity/mandel_fully_saturated_volume.i)
# Mandel's problem of consolodation of a drained medium
# Using the FullySaturatedDarcyBase and FullySaturatedFullySaturatedMassTimeDerivative kernels
# with multiply_by_density = false, so that this problem becomes linear
#
# A sample is in plane strain.
# -a <= x <= a
# -b <= y <= b
# It is squashed with constant force by impermeable, frictionless plattens on its top and bottom surfaces (at y=+/-b)
# Fluid is allowed to leak out from its sides (at x=+/-a)
# The porepressure within the sample is monitored.
#
# As is common in the literature, this is simulated by
# considering the quarter-sample, 0<=x<=a and 0<=y<=b, with
# impermeable, roller BCs at x=0 and y=0 and y=b.
# Porepressure is fixed at zero on x=a.
# Porepressure and displacement are initialised to zero.
# Then the top (y=b) is moved downwards with prescribed velocity,
# so that the total force that is inducing this downwards velocity
# is fixed. The velocity is worked out by solving Mandel's problem
# analytically, and the total force is monitored in the simulation
# to check that it indeed remains constant.
#
# Here are the problem's parameters, and their values:
# Soil width. a = 1
# Soil height. b = 0.1
# Soil's Lame lambda. la = 0.5
# Soil's Lame mu, which is also the Soil's shear modulus. mu = G = 0.75
# Soil bulk modulus. K = la + 2*mu/3 = 1
# Drained Poisson ratio. nu = (3K - 2G)/(6K + 2G) = 0.2
# Soil bulk compliance. 1/K = 1
# Fluid bulk modulus. Kf = 8
# Fluid bulk compliance. 1/Kf = 0.125
# Soil initial porosity. phi0 = 0.1
# Biot coefficient. alpha = 0.6
# Biot modulus. M = 1/(phi0/Kf + (alpha - phi0)(1 - alpha)/K) = 4.705882
# Undrained bulk modulus. Ku = K + alpha^2*M = 2.694118
# Undrained Poisson ratio. nuu = (3Ku - 2G)/(6Ku + 2G) = 0.372627
# Skempton coefficient. B = alpha*M/Ku = 1.048035
# Fluid mobility (soil permeability/fluid viscosity). k = 1.5
# Consolidation coefficient. c = 2*k*B^2*G*(1-nu)*(1+nuu)^2/9/(1-nuu)/(nuu-nu) = 3.821656
# Normal stress on top. F = 1
#
# The solution for porepressure and displacements is given in
# AHD Cheng and E Detournay "A direct boundary element method for plane strain poroelasticity" International Journal of Numerical and Analytical Methods in Geomechanics 12 (1988) 551-572.
# The solution involves complicated infinite series, so I shall not write it here
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 0.1
zmin = 0
zmax = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[]
[BCs]
[roller_xmin]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left'
[]
[roller_ymin]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom'
[]
[plane_strain]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[]
[xmax_drained]
type = DirichletBC
variable = porepressure
value = 0
boundary = right
[]
[top_velocity]
type = FunctionDirichletBC
variable = disp_y
function = top_velocity
boundary = top
[]
[]
[Functions]
[top_velocity]
type = PiecewiseLinear
x = '0 0.002 0.006 0.014 0.03 0.046 0.062 0.078 0.094 0.11 0.126 0.142 0.158 0.174 0.19 0.206 0.222 0.238 0.254 0.27 0.286 0.302 0.318 0.334 0.35 0.366 0.382 0.398 0.414 0.43 0.446 0.462 0.478 0.494 0.51 0.526 0.542 0.558 0.574 0.59 0.606 0.622 0.638 0.654 0.67 0.686 0.702'
y = '-0.041824842 -0.042730269 -0.043412712 -0.04428867 -0.045509181 -0.04645965 -0.047268246 -0.047974749 -0.048597109 -0.0491467 -0.049632388 -0.050061697 -0.050441198 -0.050776675 -0.051073238 -0.0513354 -0.051567152 -0.051772022 -0.051953128 -0.052113227 -0.052254754 -0.052379865 -0.052490464 -0.052588233 -0.052674662 -0.052751065 -0.052818606 -0.052878312 -0.052931093 -0.052977751 -0.053018997 -0.053055459 -0.053087691 -0.053116185 -0.053141373 -0.05316364 -0.053183324 -0.053200724 -0.053216106 -0.053229704 -0.053241725 -0.053252351 -0.053261745 -0.053270049 -0.053277389 -0.053283879 -0.053289615'
[]
[]
[AuxVariables]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[tot_force]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[tot_force]
type = ParsedAux
coupled_variables = 'stress_yy porepressure'
execute_on = timestep_end
variable = tot_force
expression = '-stress_yy+0.6*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 = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.6
variable = disp_x
component = 0
[]
[poro_y]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.6
variable = disp_y
component = 1
[]
[poro_z]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.6
component = 2
variable = disp_z
[]
[mass0]
type = PorousFlowFullySaturatedMassTimeDerivative
biot_coefficient = 0.6
multiply_by_density = false
coupling_type = HydroMechanical
variable = porepressure
[]
[flux]
type = PorousFlowFullySaturatedDarcyBase
multiply_by_density = false
variable = porepressure
gravity = '0 0 0'
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 8
density0 = 1
thermal_expansion = 0
viscosity = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '0.5 0.75'
# bulk modulus is lambda + 2*mu/3 = 0.5 + 2*0.75/3 = 1
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = ComputeLinearElasticStress
[]
[eff_fluid_pressure_qp]
type = PorousFlowEffectiveFluidPressure
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = porepressure
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid_qp]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst # only the initial value of this is ever used
porosity = 0.1
[]
[biot_modulus]
type = PorousFlowConstantBiotModulus
biot_coefficient = 0.6
solid_bulk_compliance = 1
fluid_bulk_modulus = 8
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1.5 0 0 0 1.5 0 0 0 1.5'
[]
[]
[Postprocessors]
[p0]
type = PointValue
outputs = csv
point = '0.0 0 0'
variable = porepressure
[]
[p1]
type = PointValue
outputs = csv
point = '0.1 0 0'
variable = porepressure
[]
[p2]
type = PointValue
outputs = csv
point = '0.2 0 0'
variable = porepressure
[]
[p3]
type = PointValue
outputs = csv
point = '0.3 0 0'
variable = porepressure
[]
[p4]
type = PointValue
outputs = csv
point = '0.4 0 0'
variable = porepressure
[]
[p5]
type = PointValue
outputs = csv
point = '0.5 0 0'
variable = porepressure
[]
[p6]
type = PointValue
outputs = csv
point = '0.6 0 0'
variable = porepressure
[]
[p7]
type = PointValue
outputs = csv
point = '0.7 0 0'
variable = porepressure
[]
[p8]
type = PointValue
outputs = csv
point = '0.8 0 0'
variable = porepressure
[]
[p9]
type = PointValue
outputs = csv
point = '0.9 0 0'
variable = porepressure
[]
[p99]
type = PointValue
outputs = csv
point = '1 0 0'
variable = porepressure
[]
[xdisp]
type = PointValue
outputs = csv
point = '1 0.1 0'
variable = disp_x
[]
[ydisp]
type = PointValue
outputs = csv
point = '1 0.1 0'
variable = disp_y
[]
[total_downwards_force]
type = ElementAverageValue
outputs = csv
variable = tot_force
[]
[dt]
type = FunctionValuePostprocessor
outputs = console
function = if(0.15*t<0.01,0.15*t,0.01)
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'gmres asm lu 1E-14 1E-10 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 0.7
[TimeStepper]
type = PostprocessorDT
postprocessor = dt
dt = 0.001
[]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = mandel_fully_saturated_volume
[csv]
time_step_interval = 3
type = CSV
[]
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/phy.heat_structure_multiple_3eqn.i)
# Tests that energy conservation is satisfied in 1-phase flow when there are
# multiple heat structures are connected to the same pipe.
#
# This problem has 2 heat structures with different material properties and
# initial conditions connected to the same flow channel, which has solid wall
# boundary conditions at both ends. An ideal gas equation of state is used for
# the fluid:
# e(T) = cv * T
# From energy conservation, an analytic expression for the steady-state
# temperature results:
# (rho(p,T)*e(T)*V)_fluid + (rho*cp*T*V)_hs1 + (rho*cp*T*V)_hs2 = constant
# The following are constant:
# V_i domain volumes for flow channel and heat structures
# rho_fluid fluid density (due to conservation of mass)
# rho_hsi heat structure densities
# cp_hsi heat structure specific heats
# Furthermore, all volumes are set equal to 1. Therefore the expression for the
# steady-state temperature is the following:
# T = E0 / C0
# where
# E0 = (rho(p0,T0)*e(T0))_fluid + (rho*cp*T0)_hs1 + (rho*cp*T0)_hs2
# C0 = (rho(p0,T0)*cv)_fluid + (rho*cp)_hs1 + (rho*cp)_hs2
#
# An ideal gas is defined by (gamma, R), and the relation between R and cv is as
# follows:
# cp = gamma * R / (gamma - 1)
# cv = cp / gamma = R / (gamma - 1)
# For the EOS parameters
# gamma = 1.0001
# R = 100 J/kg-K
# the relevant specific heat is
# cv = 1e6 J/kg-K
#
# For the initial conditions
# p = 100 kPa
# T = 300 K
# the density and specific internal energy should be
# rho = 3.3333333333333 kg/m^3
# e = 300000000 J/kg
#
# The following heat structure parameters are used:
# T0_hs1 = 290 K T0_hs2 = 310 K
# rho_hs1 = 8000 kg/m^3 rho_hs2 = 6000 kg/m^3
# cp_hs1 = 500 J/kg-K cp_hs2 = 600 J/kg-K
#
# E0 = 1e9 + 8000 * 500 * 290 + 6000 * 600 * 310
# = 3276000000 J
# C0 = 3.3333333333333e6 + 8000 * 500 + 6000 * 600
# = 10933333.3333333 J/K
# T = E0 / C0
# = 3276000000 / 10933333.3333333
# = 299.6341463414643 K
#
T1 = 290
k1 = 50
rho1 = 8000
cp1 = 500
T2 = 310
k2 = 100
rho2 = 6000
cp2 = 600
[GlobalParams]
gravity_vector = '0 0 0'
initial_T = 300
initial_p = 100e3
initial_vel = 0
scaling_factor_1phase = '1e-3 1e-3 1e-8'
closures = simple_closures
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
gamma = 1.0001
molar_mass = 0.083144598
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[SolidProperties]
[hs1_mat]
type = ThermalFunctionSolidProperties
k = ${k1}
rho = ${rho1}
cp = ${cp1}
[]
[hs2_mat]
type = ThermalFunctionSolidProperties
k = ${k2}
rho = ${rho2}
cp = ${cp2}
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 10
A = 1
f = 0
fp = fp
[]
[hs1]
type = HeatStructurePlate
position = '0 -1 0'
orientation = '1 0 0'
length = 1
depth = 1
n_elems = 10
solid_properties = 'hs1_mat'
solid_properties_T_ref = '300'
n_part_elems = '5'
widths = '1'
names = 'solid'
initial_T = ${T1}
[]
[hs2]
type = HeatStructurePlate
position = '0 -1 0'
orientation = '1 0 0'
length = 1
depth = 1
n_elems = 10
solid_properties = 'hs2_mat'
solid_properties_T_ref = '300'
n_part_elems = '5'
widths = '1'
names = 'solid'
initial_T = ${T2}
[]
[ht1]
type = HeatTransferFromHeatStructure1Phase
hs = hs1
hs_side = outer
flow_channel = pipe
Hw = 1e5
P_hf = 0.5
[]
[ht2]
type = HeatTransferFromHeatStructure1Phase
hs = hs2
hs_side = outer
flow_channel = pipe
Hw = 1e5
P_hf = 0.5
[]
[left]
type = SolidWall1Phase
input = 'pipe:in'
[]
[right]
type = SolidWall1Phase
input = 'pipe:out'
[]
[]
[Preconditioning]
[preconditioner]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
end_time = 4e5
dt = 1e4
abort_on_solve_fail = true
solve_type = 'newton'
line_search = 'basic'
nl_rel_tol = 0
nl_abs_tol = 1e-6
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
[Quadrature]
type = GAUSS
order = SECOND
[]
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
[]
[Postprocessors]
[T_steady_state_predicted]
type = FunctionValuePostprocessor
# This value is computed in the input file description
function = 299.6341463414643
[]
[T_fluid_average]
type = ElementAverageValue
variable = T
block = pipe
[]
[relative_error]
type = RelativeDifferencePostprocessor
value1 = T_steady_state_predicted
value2 = T_fluid_average
[]
[]
[Outputs]
[out]
type = CSV
show = 'relative_error'
execute_on = 'final'
[]
[]
(test/tests/kernels/2d_diffusion/2d_diffusion_bodyforce_test.i)
###########################################################
# This is a simple test of the Kernel System.
# It solves the Laplacian equation on a small 2x2 grid.
# The "Diffusion" kernel is used to calculate the
# residuals of the weak form of this operator. The
# "BodyForce" kernel is used to apply a time-dependent
# volumetric source.
###########################################################
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./bf]
type = BodyForce
variable = u
postprocessor = ramp
[../]
[]
[Functions]
[./ramp]
type = ParsedFunction
expression = 't'
[../]
[]
[Postprocessors]
[./ramp]
type = FunctionValuePostprocessor
function = ramp
execute_on = linear
[../]
[]
[BCs]
active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[]
[Executioner]
type = Transient
dt = 1.0
end_time = 1.0
solve_type = 'NEWTON'
[]
[Outputs]
file_base = bodyforce_out
exodus = true
[]
(modules/porous_flow/test/tests/dirackernels/pls02.i)
# fully-saturated situation with a poly-line sink with use_mobility=true
# The poly-line consists of 2 points, and has a length
# of 0.5. Each point is weighted with a weight of 0.1
# The PorousFlowPolyLineSink has
# p_or_t_vals = 0 1E7
# fluxes = 0 1
# so that for 0<=porepressure<=1E7
# base flux = porepressure * 1E-6 * mobility (measured in kg.m^-1.s^-1),
# and when multiplied by the poly-line length, and
# the weighting of each point, the mass flux is
# flux = porepressure * 0.5*E-8 * mobility (kg.s^-1).
#
# The fluid and matrix properties are:
# porosity = 0.1
# element volume = 8 m^3
# density = dens0 * exp(P / bulk), with bulk = 2E7
# initial porepressure P0 = 1E7
# viscosity = 0.2
# So, fluid mass = 0.8 * density (kg)
#
# The equation to solve is
# d(Mass)/dt = - porepressure * 0.5*E-8 * density / viscosity
#
# PorousFlow discretises time to conserve mass, so to march
# forward in time, we must solve
# Mass(dt) = Mass(0) - P * 0.5E-8 * density / viscosity * dt
# or
# 0.8 * dens0 * exp(P/bulk) = 0.8 * dens0 * exp(P0/bulk) - P * 0.5E-8 * density / viscosity * dt
# For the numbers written above this gives
# P(t=1) = 6.36947 MPa
# which is given precisely by MOOSE
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = 1E7
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[]
[UserObjects]
[pls_total_outflow_mass]
type = PorousFlowSumQuantity
[]
[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 = 2e7
viscosity = 0.2
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.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[DiracKernels]
[pls]
# This defines a sink that has strength
# f = L(P) * relperm * L_seg
# where
# L(P) is a piecewise-linear function of porepressure
# that is zero at pp=0 and 1 at pp=1E7
# relperm is the relative permeability of the fluid
# L_seg is the line-segment length associated with
# the Dirac points defined in the file pls02.bh
type = PorousFlowPolyLineSink
# Because the Variable for this Sink is pp, and pp is associated
# with the fluid-mass conservation equation, this sink is extracting
# fluid mass (and not heat energy or something else)
variable = pp
# The following specfies that the total fluid mass coming out of
# the porespace via this sink in this timestep should be recorded
# in the pls_total_outflow_mass UserObject
SumQuantityUO = pls_total_outflow_mass
# The following file defines the polyline geometry
# which is just two points in this particular example
point_file = pls02.bh
# Now define the piecewise-linear function, L
# First, we want L to be a function of porepressure (and not
# temperature or something else). The following means that
# p_or_t_vals should be intepreted by MOOSE as the zeroth-phase
# porepressure
function_of = pressure
fluid_phase = 0
# Second, define the piecewise-linear function, L
# The following means
# flux=0 when pp=0 (and also pp<0)
# flux=1 when pp=1E7 (and also pp>1E7)
# flux=linearly intepolated between pp=0 and pp=1E7
# When flux>0 this means a sink, while flux<0 means a source
p_or_t_vals = '0 1E7'
fluxes = '0 1'
# Finally, in this case we want to always multiply
# L by the fluid mobility (of the zeroth phase) and
# use that in the sink strength instead of the bare L
# computed above
use_mobility = true
[]
[]
[Postprocessors]
[pls_report]
type = PorousFlowPlotQuantity
uo = pls_total_outflow_mass
[]
[fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[]
[fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[]
[zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
indirect_dependencies = 'fluid_mass1 fluid_mass0 pls_report'
[]
[p0]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[]
[]
[Functions]
[mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 pls_report'
[]
[]
[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 = 1
dt = 1
solve_type = NEWTON
[]
[Outputs]
file_base = pls02
exodus = false
csv = true
execute_on = timestep_end
[]
(modules/porous_flow/test/tests/gravity/grav01d.i)
# Test illustrating that PorousFlow allows block-restricted relative permeabilities and capillarities
# and automatically adds appropriate Joiners.
# Physically, this test is checking that gravity head is established
# for 1phase, vanGenuchten, constant fluid-bulk, constant viscosity, constant permeability, Corey relative perm
# For better agreement with the analytical solution (ana_pp), just increase nx
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 100
xmin = -1
xmax = 0
[]
[define_block1]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '-1 -1 -1'
top_right = '-0.5 1 1'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[InitialCondition]
type = RandomIC
min = -1
max = 1
[]
[]
[]
[Kernels]
[dot]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
gravity = '-1 0 0'
[]
[]
[Functions]
[ana_pp]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 2 -1 1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[]
[BCs]
[z]
type = DirichletBC
variable = pp
boundary = right
value = -1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc_0]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[pc_1]
type = PorousFlowCapillaryPressureVG
m = 0.6
alpha = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2
density0 = 1
viscosity = 1
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss_0]
type = PorousFlow1PhaseP
block = 0
porepressure = pp
capillary_pressure = pc_0
[]
[ppss_1]
type = PorousFlow1PhaseP
block = 1
porepressure = pp
capillary_pressure = pc_1
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm_0]
type = PorousFlowRelativePermeabilityCorey
block = 0
n = 1
phase = 0
[]
[relperm_1]
type = PorousFlowRelativePermeabilityCorey
block = 1
n = 2
phase = 0
[]
[]
[Postprocessors]
[pp_base]
type = PointValue
variable = pp
point = '-1 0 0'
[]
[pp_analytical]
type = FunctionValuePostprocessor
function = ana_pp
point = '-1 0 0'
[]
[]
[Preconditioning]
active = andy
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E6
end_time = 1E6
[]
[Outputs]
execute_on = 'timestep_end'
file_base = grav01d
csv = true
[]
(test/tests/coord_type/coord_type_rz_general.i)
# Tests using different coordinate systems in different blocks:
# block1: XYZ translated by (0,-1,0)
# block2: RZ with origin=(0,0,0) and direction=(0,1,0)
# block3: RZ with origin=(0,0,1) and direction=(1,0,0)
# block4: RZ with origin=(-1,-2,-3) and direction=(1,1,0)
#
# A transient heat conduction equation is solved with uniform properties.
# The same power is applied to each block via a uniform heat flux boundary
# condition on the outer cylindrical surface (top surface for block1).
# Conservation is checked for each via post-processors.
# Blocks block2, block3, and block4 should have identical solutions.
rho = 1000.0
cp = 500.0
k = 15.0
length = 1.5
radius = 0.5
perimeter = ${fparse 2 * pi * radius}
nz = 10
nr = 5
power = 1e3
heat_flux = ${fparse power / (perimeter * length)}
[Mesh]
# block1
[genmesh1]
type = GeneratedMeshGenerator
dim = 2
nx = ${nz}
ny = ${nr}
xmin = 0.0
xmax = ${length}
ymin = -1.0
ymax = ${fparse -1.0 + radius}
boundary_id_offset = 10
[]
[renumberblock1]
type = RenameBlockGenerator
input = genmesh1
old_block = 0
new_block = 1
[]
[renameblock1]
type = RenameBlockGenerator
input = renumberblock1
old_block = 1
new_block = block1
[]
[renameboundary1]
type = RenameBoundaryGenerator
input = renameblock1
old_boundary = '10 11 12 13'
new_boundary = 'bottom1 right1 top1 left1'
[]
# block2
[genmesh2]
type = GeneratedMeshGenerator
dim = 2
nx = ${nr}
ny = ${nz}
xmin = 0.0
xmax = ${radius}
ymin = 0
ymax = ${length}
boundary_id_offset = 20
[]
[renumberblock2]
type = RenameBlockGenerator
input = genmesh2
old_block = 0
new_block = 2
[]
[renameblock2]
type = RenameBlockGenerator
input = renumberblock2
old_block = 2
new_block = block2
[]
[renameboundary2]
type = RenameBoundaryGenerator
input = renameblock2
old_boundary = '20 21 22 23'
new_boundary = 'bottom2 right2 top2 left2'
[]
# block3
[genmesh3]
type = GeneratedMeshGenerator
dim = 2
nx = ${nz}
ny = ${nr}
xmin = 0.0
xmax = ${length}
ymin = 0
ymax = ${radius}
boundary_id_offset = 30
[]
[translate3]
type = TransformGenerator
input = genmesh3
transform = TRANSLATE
vector_value = '0 0 1'
[]
[renumberblock3]
type = RenameBlockGenerator
input = translate3
old_block = 0
new_block = 3
[]
[renameblock3]
type = RenameBlockGenerator
input = renumberblock3
old_block = 3
new_block = block3
[]
[renameboundary3]
type = RenameBoundaryGenerator
input = renameblock3
old_boundary = '30 31 32 33'
new_boundary = 'bottom3 right3 top3 left3'
[]
# block4
[genmesh4]
type = GeneratedMeshGenerator
dim = 2
nx = ${nz}
ny = ${nr}
xmin = 0.0
xmax = ${length}
ymin = 0
ymax = ${radius}
boundary_id_offset = 40
[]
[rotate4]
type = TransformGenerator
input = genmesh4
transform = ROTATE
vector_value = '45 0 0'
[]
[translate4]
type = TransformGenerator
input = rotate4
transform = TRANSLATE
vector_value = '-1 -2 -3'
[]
[renumberblock4]
type = RenameBlockGenerator
input = translate4
old_block = 0
new_block = 4
[]
[renameblock4]
type = RenameBlockGenerator
input = renumberblock4
old_block = 4
new_block = block4
[]
[renameboundary4]
type = RenameBoundaryGenerator
input = renameblock4
old_boundary = '40 41 42 43'
new_boundary = 'bottom4 right4 top4 left4'
[]
[combiner]
type = CombinerGenerator
inputs = 'renameboundary1 renameboundary2 renameboundary3 renameboundary4'
[]
coord_block = 'block1 block2 block3 block4'
coord_type = 'XYZ RZ RZ RZ'
rz_coord_blocks = 'block2 block3 block4'
rz_coord_origins = '0 0 0
0 0 1
-1 -2 -3'
rz_coord_directions = '0 1 0
1 0 0
1 1 0'
[]
[Variables]
[T]
family = LAGRANGE
order = FIRST
[]
[]
[Functions]
[T_ic_fn]
type = ParsedFunction
expression = 'x'
[]
[theoretical_energy_added_fn]
type = ParsedFunction
expression = '${power} * t'
[]
[]
[ICs]
[T_ic]
type = FunctionIC
variable = T
function = T_ic_fn
[]
[]
[Kernels]
[time_derivative]
type = ADTimeDerivative
variable = T
[]
[heat_conduction]
type = CoefDiffusion
variable = T
coef = ${fparse k / (rho * cp)}
[]
[]
[BCs]
[heat_flux_bc]
type = ADFunctionNeumannBC
variable = T
boundary = 'top1 right2 top3 top4'
# The heat conduction equation has been divided by rho*cp
function = '${fparse heat_flux / (rho * cp)}'
[]
[]
[Postprocessors]
[theoretical_energy_change]
type = FunctionValuePostprocessor
function = theoretical_energy_added_fn
execute_on = 'INITIAL TIMESTEP_END'
[]
# block1 conservation
[T_integral1]
type = ElementIntegralVariablePostprocessor
variable = T
block = 'block1'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy1]
type = ParsedPostprocessor
pp_names = 'T_integral1'
function = 'T_integral1 * ${rho} * ${cp} * ${perimeter}'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change1]
type = ChangeOverTimePostprocessor
postprocessor = energy1
change_with_respect_to_initial = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change_error1]
type = RelativeDifferencePostprocessor
value1 = energy_change1
value2 = theoretical_energy_change
execute_on = 'INITIAL TIMESTEP_END'
[]
# block2 conservation
[T_integral2]
type = ElementIntegralVariablePostprocessor
variable = T
block = 'block2'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy2]
type = ParsedPostprocessor
pp_names = 'T_integral2'
function = 'T_integral2 * ${rho} * ${cp}'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change2]
type = ChangeOverTimePostprocessor
postprocessor = energy2
change_with_respect_to_initial = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change_error2]
type = RelativeDifferencePostprocessor
value1 = energy_change2
value2 = theoretical_energy_change
execute_on = 'INITIAL TIMESTEP_END'
[]
# block3 conservation
[T_integral3]
type = ElementIntegralVariablePostprocessor
variable = T
block = 'block3'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy3]
type = ParsedPostprocessor
pp_names = 'T_integral3'
function = 'T_integral3 * ${rho} * ${cp}'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change3]
type = ChangeOverTimePostprocessor
postprocessor = energy3
change_with_respect_to_initial = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change_error3]
type = RelativeDifferencePostprocessor
value1 = energy_change3
value2 = theoretical_energy_change
execute_on = 'INITIAL TIMESTEP_END'
[]
# block4 conservation
[T_integral4]
type = ElementIntegralVariablePostprocessor
variable = T
block = 'block4'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy4]
type = ParsedPostprocessor
pp_names = 'T_integral4'
function = 'T_integral4 * ${rho} * ${cp}'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change4]
type = ChangeOverTimePostprocessor
postprocessor = energy4
change_with_respect_to_initial = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change_error4]
type = RelativeDifferencePostprocessor
value1 = energy_change4
value2 = theoretical_energy_change
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 1.0
num_steps = 10
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-10
[]
[Outputs]
file_base = 'coord_type_rz_general'
[console]
type = Console
show = 'energy_change_error1 energy_change_error2 energy_change_error3 energy_change_error4'
[]
[exodus]
type = Exodus
show = 'T energy_change_error1 energy_change_error2 energy_change_error3 energy_change_error4'
[]
[]
(modules/richards/test/tests/dirac/bh_fu_03.i)
# fully-saturated
# injection
# fullyupwind
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = DensityConstBulk
relperm_UO = RelPermPower
sat_UO = Saturation
seff_UO = Seff1VG
SUPG_UO = SUPGstandard
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./Seff1VG]
type = RichardsSeff1VG
m = 0.8
al = 1E-5
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0
sum_s_res = 0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E8
[../]
[./borehole_total_outflow_mass]
type = RichardsSumQuantity
[../]
[]
[Variables]
active = 'pressure'
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./p_ic]
type = FunctionIC
variable = pressure
function = initial_pressure
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
variable = pressure
[../]
[]
[DiracKernels]
[./bh]
type = RichardsBorehole
bottom_pressure = 1E7
point_file = bh03.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pressure
unit_weight = '0 0 0'
character = -1
fully_upwind = true
[../]
[]
[Postprocessors]
[./bh_report]
type = RichardsPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = RichardsMass
variable = pressure
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = RichardsMass
variable = pressure
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
indirect_dependencies = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[./p0]
type = PointValue
variable = pressure
point = '1 1 1'
execute_on = timestep_end
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 0
[../]
[./mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = 0
viscosity = 1E-3
mat_porosity = 0.1
mat_permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = Seff1VG
pressure_vars = pressure
[../]
[]
[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 = 0.5
dt = 1E-2
solve_type = NEWTON
[]
[Outputs]
file_base = bh_fu_03
exodus = false
csv = true
execute_on = timestep_end
[]
(modules/thermal_hydraulics/test/tests/functions/smooth_transition/time.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[Executioner]
type = Transient
dt = 1
num_steps = 10
[]
[Problem]
solve = false
[]
[Functions]
[transition_fn]
type = CosineTransitionFunction
axis = t
transition_center = 5
transition_width = 4
function1 = 0
function2 = 100
[]
[]
[Postprocessors]
[transition]
type = FunctionValuePostprocessor
function = transition_fn
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
csv = true
file_base = time_weighted
[]
(modules/porous_flow/test/tests/hysteresis/hys_order_07.i)
# Test that PorousFlowHysteresisOrder correctly calculates hysteresis order
# Hysteresis order is initialised = 3, with turning points = (0.5, 0.8, 0.66)
# Initial saturation is 0.71
# Water is removed from the system (so order = 3) until saturation = 0.66
# Then, water is removed from the system (so order = 2) until saturation = 0.65
# Then, water is added to the system (so order = 3 with turning point = 0.65) until saturation = 0.8
# Then, water is added to the system (so order = 1) until saturation = 1
# Then, water is added to the system (so order = 0)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = -9E5
[]
[]
[PorousFlowUnsaturated]
porepressure = pp
fp = simple_fluid
[]
[DiracKernels]
[source_sink_0]
type = PorousFlowPointSourceFromPostprocessor
point = '0 0 0'
mass_flux = sink_strength
variable = pp
[]
[source_sink_1]
type = PorousFlowPointSourceFromPostprocessor
point = '1 0 0'
mass_flux = sink_strength
variable = pp
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 1.0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0 0 0 0 0 0 0 0 0'
[]
[hys_order]
type = PorousFlowHysteresisOrder
initial_order = 3
previous_turning_points = '0.6 0.8 0.66'
[]
[]
[AuxVariables]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[tp0]
family = MONOMIAL
order = CONSTANT
[]
[tp1]
family = MONOMIAL
order = CONSTANT
[]
[tp2]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[tp0]
type = PorousFlowPropertyAux
variable = tp0
property = hysteresis_saturation_turning_point
hysteresis_turning_point = 0
[]
[tp1]
type = PorousFlowPropertyAux
variable = tp1
property = hysteresis_saturation_turning_point
hysteresis_turning_point = 1
[]
[tp2]
type = PorousFlowPropertyAux
variable = tp2
property = hysteresis_saturation_turning_point
hysteresis_turning_point = 2
[]
[]
[Functions]
[sink_strength_fcn]
type = ParsedFunction
expression = '30 * if(t <= 1, -1, 1)'
[]
[]
[Postprocessors]
[sink_strength]
type = FunctionValuePostprocessor
function = sink_strength_fcn
outputs = 'none'
[]
[saturation]
type = PointValue
point = '0 0 0'
variable = saturation0
[]
[hys_order]
type = PointValue
point = '0 0 0'
variable = hys_order
[]
[tp0]
type = PointValue
point = '0 0 0'
variable = tp0
[]
[tp1]
type = PointValue
point = '0 0 0'
variable = tp1
[]
[tp2]
type = PointValue
point = '0 0 0'
variable = tp2
[]
[]
[Preconditioning]
[basic]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 9
nl_abs_tol = 1E-7
[]
[Outputs]
[csv]
type = CSV
[]
[]
(modules/porous_flow/test/tests/gravity/fully_saturated_upwinded_grav01c_action.i)
# Checking that gravity head is established
# 1phase, 2-component, constant fluid-bulk, constant viscosity, constant permeability
# fully saturated with fully-saturated Kernel with upwinding
# For better agreement with the analytical solution (ana_pp), just increase nx
# This is the Action version of fully_saturated_upwinded_grav01c.i
# NOTE: this test is numerically delicate because the steady-state configuration is independent of the mass fraction, so the frac variable can assume any value as long as mass-fraction is conserved
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = -1
xmax = 0
[]
[Variables]
[pp]
[InitialCondition]
type = RandomIC
min = 0
max = 1
[]
[]
[frac]
[InitialCondition]
type = RandomIC
min = 0
max = 1
[]
[]
[]
[PorousFlowFullySaturated]
porepressure = pp
mass_fraction_vars = frac
fp = simple_fluid
gravity = '-1 0 0'
multiply_by_density = true
[]
[Functions]
[ana_pp]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 1.2 0 1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[]
[BCs]
[z]
type = DirichletBC
variable = pp
boundary = right
value = 0
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.2
density0 = 1
viscosity = 1
thermal_expansion = 0
[]
[]
[Materials]
[permeability]
type = PorousFlowPermeabilityConst
PorousFlowDictator = dictator
permeability = '1 0 0 0 2 0 0 0 3'
[]
[]
[Postprocessors]
[pp_base]
type = PointValue
variable = pp
point = '-1 0 0'
[]
[pp_analytical]
type = FunctionValuePostprocessor
function = ana_pp
point = '-1 0 0'
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = Newton
nl_rel_tol = 1E-12
petsc_options_iname = '-pc_factor_shift_type'
petsc_options_value = 'NONZERO'
nl_max_its = 100
[]
[Outputs]
csv = true
[]
(modules/porous_flow/test/tests/dirackernels/pls01.i)
# fully-saturated situation with a poly-line sink at one
# of the nodes. Because there is no fluid flow, the
# other nodes should not experience any change in
# porepressure.
# The poly-line sink has length=2 and weight=0.1, and
# extracts fluid at a constant rate of 1 kg.m^-1.s^-1.
# Therefore, in 1 second it will have extracted a total
# of 0.2 kg.
# The porosity is 0.1, and the elemental volume is 2,
# so the fluid mass at the node in question = 0.2 * density / 4,
# where the 4 is the number of nodes in the element.
# In this simulation density = dens0 * exp(P / bulk), with
# dens0 = 100, and bulk = 20 MPa.
# The initial porepressure P0 = 10 MPa, so the final (after
# 1 second of simulation) is
# P(t=1) = 0.950879 MPa
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmin = 0
xmax = 2
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = 1E7
[]
[]
[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
[]
[pls_total_outflow_mass]
type = PorousFlowSumQuantity
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-7
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e7
density0 = 100
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.1
[]
[]
[DiracKernels]
[pls]
type = PorousFlowPolyLineSink
fluid_phase = 0
point_file = pls01_21.bh
line_length = 2
SumQuantityUO = pls_total_outflow_mass
variable = pp
p_or_t_vals = '0 1E7'
fluxes = '1 1'
[]
[]
[Postprocessors]
[pls_report]
type = PorousFlowPlotQuantity
uo = pls_total_outflow_mass
[]
[fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[]
[fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[]
[zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
indirect_dependencies = 'fluid_mass1 fluid_mass0 pls_report'
[]
[p00]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[]
[p01]
type = PointValue
variable = pp
point = '0 1 0'
execute_on = timestep_end
[]
[p20]
type = PointValue
variable = pp
point = '2 0 0'
execute_on = timestep_end
[]
[p21]
type = PointValue
variable = pp
point = '2 1 0'
execute_on = timestep_end
[]
[]
[Functions]
[mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 pls_report'
[]
[]
[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 = 1
dt = 1
solve_type = NEWTON
[]
[Outputs]
file_base = pls01
exodus = false
csv = true
execute_on = timestep_end
[]
(test/tests/functions/piecewise_constant/piecewise_constant_json.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Problem]
solve = false
[]
[UserObjects]
[json]
type = JSONFileReader
filename = 'function_values.json'
[]
[]
[Functions]
[from_json]
type = PiecewiseConstant
json_uo = 'json'
x_keys = "the_data some_key some_other_key"
y_keys = "the_data second_key some_other_key"
[]
[]
[Postprocessors]
[from_json]
type = FunctionValuePostprocessor
function = from_json
execute_on = 'TIMESTEP_END INITIAL'
[]
[]
[Executioner]
type = Transient
dt = 1
start_time = 0
end_time = 10
[]
[Outputs]
csv = true
[]
(modules/porous_flow/test/tests/sinks/s06.i)
# apply a half-cubic sink flux and observe the correct behavior
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 2
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1.1
[]
[]
[Variables]
[pp]
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = x*(y+1)
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.3
density0 = 1.1
thermal_expansion = 0
viscosity = 1.1
[]
[]
[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.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[AuxVariables]
[flux_out]
[]
[]
[Functions]
[mass10]
type = ParsedFunction
expression = 'vol*por*dens0*exp(pp/bulk)*if(pp>=0,1,pow(1+pow(-al*pp,1.0/(1-m)),-m))'
symbol_names = 'vol por dens0 pp bulk al m'
symbol_values = '0.25 0.1 1.1 p10 1.3 1.1 0.5'
[]
[rate10]
type = ParsedFunction
expression = 'fcn*if(pp>center,m,if(pp<themin,0,m/c/c/c*(2*(pp-center)+c)*((pp-center)-c)*((pp-center)-c)))'
symbol_names = 'm fcn pp center sd themin c'
symbol_values = '2 3 p10 0.9 0.5 0.1 -0.8'
[]
[mass10_expect]
type = ParsedFunction
expression = 'mass_prev-rate*area*dt'
symbol_names = 'mass_prev rate area dt'
symbol_values = 'm10_prev m10_rate 0.5 2E-3'
[]
[mass11]
type = ParsedFunction
expression = 'vol*por*dens0*exp(pp/bulk)*if(pp>=0,1,pow(1+pow(-al*pp,1.0/(1-m)),-m))'
symbol_names = 'vol por dens0 pp bulk al m'
symbol_values = '0.25 0.1 1.1 p11 1.3 1.1 0.5'
[]
[rate11]
type = ParsedFunction
expression = 'fcn*if(pp>center,m,if(pp<themin,0,m/c/c/c*(2*(pp-center)+c)*((pp-center)-c)*((pp-center)-c)))'
symbol_names = 'm fcn pp center sd themin c'
symbol_values = '2 3 p11 0.9 0.5 0.1 -0.8'
[]
[mass11_expect]
type = ParsedFunction
expression = 'mass_prev-rate*area*dt'
symbol_names = 'mass_prev rate area dt'
symbol_values = 'm11_prev m11_rate 0.5 2E-3'
[]
[]
[Postprocessors]
[flux00]
type = PointValue
variable = flux_out
point = '0 0 0'
[]
[flux01]
type = PointValue
variable = flux_out
point = '0 1 0'
[]
[flux10]
type = PointValue
variable = flux_out
point = '1 0 0'
[]
[flux11]
type = PointValue
variable = flux_out
point = '1 1 0'
[]
[p00]
type = PointValue
point = '0 0 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[p10]
type = PointValue
point = '1 0 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[m10]
type = FunctionValuePostprocessor
function = mass10
execute_on = 'initial timestep_end'
[]
[m10_prev]
type = FunctionValuePostprocessor
function = mass10
execute_on = 'timestep_begin'
outputs = 'console'
[]
[m10_rate]
type = FunctionValuePostprocessor
function = rate10
execute_on = 'timestep_end'
[]
[m10_expect]
type = FunctionValuePostprocessor
function = mass10_expect
execute_on = 'timestep_end'
[]
[p01]
type = PointValue
point = '0 1 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[p11]
type = PointValue
point = '1 1 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[m11]
type = FunctionValuePostprocessor
function = mass11
execute_on = 'initial timestep_end'
[]
[m11_prev]
type = FunctionValuePostprocessor
function = mass11
execute_on = 'timestep_begin'
outputs = 'console'
[]
[m11_rate]
type = FunctionValuePostprocessor
function = rate11
execute_on = 'timestep_end'
[]
[m11_expect]
type = FunctionValuePostprocessor
function = mass11_expect
execute_on = 'timestep_end'
[]
[]
[BCs]
[flux]
type = PorousFlowHalfCubicSink
boundary = 'left right'
max = 2
cutoff = -0.8
center = 0.9
variable = pp
use_mobility = false
use_relperm = false
fluid_phase = 0
flux_function = 3
save_in = flux_out
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -snes_max_it -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu 10000 NONZERO 2'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 2E-3
end_time = 6E-2
nl_rel_tol = 1E-12
nl_abs_tol = 1E-12
[]
[Outputs]
file_base = s06
[console]
type = Console
execute_on = 'nonlinear linear'
time_step_interval = 5
[]
[csv]
type = CSV
execute_on = 'timestep_end'
time_step_interval = 3
[]
[]
(modules/solid_mechanics/test/tests/tensile/random_update.i)
# Plasticity models:
# Planar tensile with strength = 1MPa
#
# Lame lambda = 1GPa. Lame mu = 1.3GPa
#
# A line of elements is perturbed randomly, and return to the yield surface at each quadpoint is checked
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1000
ny = 1234
nz = 1
xmin = 0
xmax = 1000
ymin = 0
ymax = 1234
zmin = 0
zmax = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
add_variables = true
incremental = true
strain = finite
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_yz stress_zz'
[../]
[]
[ICs]
[./x]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_x
[../]
[./y]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_y
[../]
[./z]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_z
[../]
[]
[BCs]
[./x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'front back'
function = '0'
[../]
[./y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'front back'
function = '0'
[../]
[./z]
type = FunctionDirichletBC
variable = disp_z
boundary = 'front back'
function = '0'
[../]
[]
[AuxVariables]
[./f0]
order = CONSTANT
family = MONOMIAL
[../]
[./f1]
order = CONSTANT
family = MONOMIAL
[../]
[./f2]
order = CONSTANT
family = MONOMIAL
[../]
[./int0]
order = CONSTANT
family = MONOMIAL
[../]
[./iter]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./f0]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 0
variable = f0
[../]
[./f1]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 1
variable = f1
[../]
[./f2]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 2
variable = f2
[../]
[./int0]
type = MaterialStdVectorAux
property = plastic_internal_parameter
factor = 1E6
index = 0
variable = int0
[../]
[./iter]
type = MaterialRealAux
property = plastic_NR_iterations
variable = iter
[../]
[]
[Postprocessors]
[./tot_iters]
type = ElementIntegralMaterialProperty
mat_prop = plastic_NR_iterations
outputs = console
[../]
[./raw_f0]
type = ElementExtremeValue
variable = f0
outputs = console
[../]
[./raw_f1]
type = ElementExtremeValue
variable = f1
outputs = console
[../]
[./raw_f2]
type = ElementExtremeValue
variable = f2
outputs = console
[../]
[./iter]
type = ElementExtremeValue
variable = iter
outputs = console
[../]
[./f0]
type = FunctionValuePostprocessor
function = should_be_zero0_fcn
[../]
[./f1]
type = FunctionValuePostprocessor
function = should_be_zero1_fcn
[../]
[./f2]
type = FunctionValuePostprocessor
function = should_be_zero2_fcn
[../]
[]
[Functions]
[./should_be_zero0_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f0'
[../]
[./should_be_zero1_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f1'
[../]
[./should_be_zero2_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f2'
[../]
[]
[UserObjects]
[./ts]
type = SolidMechanicsHardeningCubic
value_0 = 1E6
value_residual = 0
internal_limit = 1
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric_isotropic
C_ijkl = '1E9 1.3E9'
[../]
[./tensile]
type = TensileStressUpdate
tensile_strength = ts
smoothing_tol = 1E5
max_NR_iterations = 100
yield_function_tol = 1.0E-1
[../]
[./stress]
type = ComputeMultipleInelasticStress
inelastic_models = tensile
perform_finite_strain_rotations = false
[../]
[]
[Executioner]
end_time = 1
dt = 1
type = Transient
[]
[Outputs]
file_base = random_update
exodus = false
[./csv]
type = CSV
[../]
[]
(test/tests/auxkernels/pp_depend/pp_depend_indirect_correct.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[u]
[]
[]
[Functions]
[t_func]
type = ParsedFunction
expression = ptime
symbol_names = ptime
symbol_values = ptime_pp
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[Postprocessors]
[t_pp1]
type = FunctionValuePostprocessor
function = t_func
indirect_dependencies = ptime_pp
[]
[ptime_pp]
type = TimePostprocessor
[]
[t_pp2]
type = FunctionValuePostprocessor
function = t_func
indirect_dependencies = ptime_pp
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
dt = 1
num_steps = 5
[]
[Outputs]
csv = true
[]
(modules/porous_flow/test/tests/hysteresis/1phase_relperm.i)
# Simple example of a 1-phase situation with hysteretic relative permeability. Water is removed and added to the system in order to observe the hysteresis
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
number_fluid_phases = 1
number_fluid_components = 1
porous_flow_vars = 'pp'
[]
[pc]
type = PorousFlowCapillaryPressureVG
alpha = 10.0
m = 0.33
[]
[]
[Variables]
[pp]
initial_condition = 0
[]
[]
[Kernels]
[mass_conservation]
type = PorousFlowMassTimeDerivative
variable = pp
[]
[]
[DiracKernels]
[pump]
type = PorousFlowPointSourceFromPostprocessor
mass_flux = flux
point = '0.5 0 0'
variable = pp
[]
[]
[AuxVariables]
[sat]
family = MONOMIAL
order = CONSTANT
[]
[relperm]
family = MONOMIAL
order = CONSTANT
[]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[sat]
type = PorousFlowPropertyAux
variable = sat
property = saturation
[]
[relperm]
type = PorousFlowPropertyAux
variable = relperm
property = relperm
phase = 0
[]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[temperature]
type = PorousFlowTemperature
temperature = 20
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[pc_calculator]
type = PorousFlow1PhaseP
capillary_pressure = pc
porepressure = pp
[]
[hys_order_material]
type = PorousFlowHysteresisOrder
[]
[relperm_material]
type = PorousFlowHystereticRelativePermeabilityLiquid
phase = 0
S_lr = 0.1
S_gr_max = 0.2
m = 0.9
liquid_modification_range = 0.9
[]
[]
[Postprocessors]
[flux]
type = FunctionValuePostprocessor
function = 'if(t <= 5, -10, 10)'
[]
[hys_order]
type = PointValue
point = '0 0 0'
variable = hys_order
[]
[sat]
type = PointValue
point = '0 0 0'
variable = sat
[]
[relperm]
type = PointValue
point = '0 0 0'
variable = relperm
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.5
end_time = 10
nl_abs_tol = 1E-10
[]
[Outputs]
csv = true
[]
(modules/porous_flow/test/tests/poro_elasticity/terzaghi_constM.i)
# Terzaghi's problem of consolodation of a drained medium
#
# A saturated soil sample sits in a bath of water.
# It is constrained on its sides, and bottom.
# Its sides and bottom are also impermeable.
# Initially it is unstressed.
# A normal stress, q, is applied to the soil's top.
# The soil then slowly compresses as water is squeezed
# out from the sample from its top (the top BC for
# the porepressure is porepressure = 0).
#
# See, for example. Section 2.2 of the online manuscript
# Arnold Verruijt "Theory and Problems of Poroelasticity" Delft University of Technology 2013
# but note that the "sigma" in that paper is the negative
# of the stress in TensorMechanics
#
# Here are the problem's parameters, and their values:
# Soil height. h = 10
# Soil's Lame lambda. la = 2
# Soil's Lame mu, which is also the Soil's shear modulus. mu = 3
# Soil bulk modulus. K = la + 2*mu/3 = 4
# Soil confined compressibility. m = 1/(K + 4mu/3) = 0.125
# Soil bulk compliance. 1/K = 0.25
# Fluid bulk modulus. Kf = 8
# Fluid bulk compliance. 1/Kf = 0.125
# Fluid mobility (soil permeability/fluid viscosity). k = 1.5
# Soil initial porosity. phi0 = 0.1
# Biot coefficient. alpha = 0.6
# Soil initial storativity, which is the reciprocal of the initial Biot modulus. S = phi0/Kf + (alpha - phi0)(1 - alpha)/K = 0.0625
# Consolidation coefficient. c = k/(S + alpha^2 m) = 13.95348837
# Normal stress on top. q = 1
# Initial porepressure, resulting from instantaneous application of q, assuming corresponding instantaneous increase of porepressure (Note that this is calculated by MOOSE: we only need it for the analytical solution). p0 = alpha*m*q/(S + alpha^2 m) = 0.69767442
# Initial vertical displacement (down is positive), resulting from instantaneous application of q (Note this is calculated by MOOSE: we only need it for the analytical solution). uz0 = q*m*h*S/(S + alpha^2 m)
# Final vertical displacement (down in positive) (Note this is calculated by MOOSE: we only need it for the analytical solution). uzinf = q*m*h
#
# The solution for porepressure is
# P = 4*p0/\pi \sum_{k=1}^{\infty} \frac{(-1)^{k-1}}{2k-1} \cos ((2k-1)\pi z/(2h)) \exp(-(2k-1)^2 \pi^2 ct/(4 h^2))
# This series converges very slowly for ct/h^2 small, so in that domain
# P = p0 erf( (1-(z/h))/(2 \sqrt(ct/h^2)) )
#
# The degree of consolidation is defined as
# U = (uz - uz0)/(uzinf - uz0)
# where uz0 and uzinf are defined above, and
# uz = the vertical displacement of the top (down is positive)
# U = 1 - (8/\pi^2)\sum_{k=1}^{\infty} \frac{1}{(2k-1)^2} \exp(-(2k-1)^2 \pi^2 ct/(4 h^2))
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 10
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = 0
zmax = 10
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.8
alpha = 1
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[basefixed]
type = DirichletBC
variable = disp_z
value = 0
boundary = back
[]
[topdrained]
type = DirichletBC
variable = porepressure
value = 0
boundary = front
[]
[topload]
type = NeumannBC
variable = disp_z
value = -1
boundary = front
[]
[]
[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 = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.6
variable = disp_x
component = 0
[]
[poro_y]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.6
variable = disp_y
component = 1
[]
[poro_z]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.6
component = 2
variable = disp_z
[]
[poro_vol_exp]
type = PorousFlowMassVolumetricExpansion
variable = porepressure
fluid_component = 0
[]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = porepressure
[]
[flux]
type = PorousFlowAdvectiveFlux
variable = porepressure
gravity = '0 0 0'
fluid_component = 0
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 8
density0 = 1
thermal_expansion = 0
viscosity = 0.96
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '2 3'
# bulk modulus is lambda + 2*mu/3 = 2 + 2*3/3 = 4
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = ComputeLinearElasticStress
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityHMBiotModulus
porosity_zero = 0.1
biot_coefficient = 0.6
solid_bulk = 4
constant_fluid_bulk_modulus = 8
constant_biot_modulus = 16
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1.5 0 0 0 1.5 0 0 0 1.5'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[]
[]
[Postprocessors]
[p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
use_displaced_mesh = false
[]
[p1]
type = PointValue
outputs = csv
point = '0 0 1'
variable = porepressure
use_displaced_mesh = false
[]
[p2]
type = PointValue
outputs = csv
point = '0 0 2'
variable = porepressure
use_displaced_mesh = false
[]
[p3]
type = PointValue
outputs = csv
point = '0 0 3'
variable = porepressure
use_displaced_mesh = false
[]
[p4]
type = PointValue
outputs = csv
point = '0 0 4'
variable = porepressure
use_displaced_mesh = false
[]
[p5]
type = PointValue
outputs = csv
point = '0 0 5'
variable = porepressure
use_displaced_mesh = false
[]
[p6]
type = PointValue
outputs = csv
point = '0 0 6'
variable = porepressure
use_displaced_mesh = false
[]
[p7]
type = PointValue
outputs = csv
point = '0 0 7'
variable = porepressure
use_displaced_mesh = false
[]
[p8]
type = PointValue
outputs = csv
point = '0 0 8'
variable = porepressure
use_displaced_mesh = false
[]
[p9]
type = PointValue
outputs = csv
point = '0 0 9'
variable = porepressure
use_displaced_mesh = false
[]
[p99]
type = PointValue
outputs = csv
point = '0 0 10'
variable = porepressure
use_displaced_mesh = false
[]
[zdisp]
type = PointValue
outputs = csv
point = '0 0 10'
variable = disp_z
use_displaced_mesh = false
[]
[dt]
type = FunctionValuePostprocessor
outputs = console
function = if(0.5*t<0.1,0.5*t,0.1)
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
[TimeStepper]
type = PostprocessorDT
postprocessor = dt
dt = 0.0001
[]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = terzaghi_constM
[csv]
type = CSV
[]
[]
(modules/porous_flow/test/tests/poro_elasticity/pp_generation.i)
# A sample is constrained on all sides and its boundaries are
# also impermeable. Fluid is pumped into the sample via a
# volumetric source (ie kg/second per cubic meter), and the
# rise in porepressure is observed.
#
# Source = s (units = kg/m^3/second)
#
# Expect:
# fluid_mass = mass0 + s*t
# stress = 0 (remember this is effective stress)
# Porepressure = fluid_bulk*log(fluid_mass_density/density_P0), where fluid_mass_density = fluid_mass*porosity
# porosity = biot+(phi0-biot)*exp(pp(biot-1)/solid_bulk)
#
# Parameters:
# Biot coefficient = 0.3
# Phi0 = 0.1
# Solid Bulk modulus = 2
# fluid_bulk = 13
# density_P0 = 1
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[]
[]
[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 = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
variable = disp_x
component = 0
[]
[poro_y]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
variable = disp_y
component = 1
[]
[poro_z]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
component = 2
variable = disp_z
[]
[poro_vol_exp]
type = PorousFlowMassVolumetricExpansion
variable = porepressure
fluid_component = 0
[]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = porepressure
[]
[flux]
type = PorousFlowAdvectiveFlux
variable = porepressure
gravity = '0 0 0'
fluid_component = 0
[]
[source]
type = BodyForce
function = 0.1
variable = porepressure
[]
[]
[AuxVariables]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xz]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_yz]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[]
[porosity]
type = PorousFlowPropertyAux
variable = porosity
property = porosity
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 13
density0 = 1
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = ComputeLinearElasticStress
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = porepressure
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
porosity_zero = 0.1
biot_coefficient = 0.3
solid_bulk = 2
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 1 0 0 0 1' # unimportant
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[]
[]
[Functions]
[porosity_analytic]
type = ParsedFunction
expression = 'biot+(phi0-biot)*exp(pp*(biot-1)/bulk)'
symbol_names = 'biot phi0 pp bulk'
symbol_values = '0.3 0.1 p0 2'
[]
[]
[Postprocessors]
[fluid_mass]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'initial timestep_end'
[]
[porosity]
type = PointValue
outputs = 'console csv'
point = '0 0 0'
variable = porosity
[]
[p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
[]
[porosity_analytic]
type = FunctionValuePostprocessor
function = porosity_analytic
[]
[zdisp]
type = PointValue
outputs = csv
point = '0 0 0.5'
variable = disp_z
[]
[stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[]
[stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[]
[stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_max_it -snes_stol'
petsc_options_value = 'bcgs bjacobi 10000 1E-11'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = pp_generation
[csv]
type = CSV
[]
[]
(modules/porous_flow/test/tests/gravity/grav01b.i)
# Checking that gravity head is established
# 1phase, vanGenuchten, constant and large fluid-bulk, constant viscosity, constant permeability, Corey relperm
# fully saturated
# For better agreement with the analytical solution (ana_pp), just increase nx
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = -1
xmax = 0
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[InitialCondition]
type = RandomIC
min = 0
max = 1
[]
[]
[]
[Kernels]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
gravity = '-1 0 0'
[]
[]
[Functions]
[ana_pp]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 1E3 0 1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[]
[BCs]
[z]
type = DirichletBC
variable = pp
boundary = right
value = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1e3
density0 = 1
viscosity = 1
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
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 0
[]
[]
[Postprocessors]
[pp_base]
type = PointValue
variable = pp
point = '-1 0 0'
[]
[pp_analytical]
type = FunctionValuePostprocessor
function = ana_pp
point = '-1 0 0'
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Outputs]
execute_on = 'timestep_end'
file_base = grav01b
[csv]
type = CSV
[]
[]
(modules/porous_flow/test/tests/gravity/fully_saturated_upwinded_nodens_grav01c_action.i)
# Checking that gravity head is established
# 1phase, 2-component, constant fluid-bulk, constant viscosity, constant permeability
# fully saturated with fully-saturated Kernel with upwinding
# For better agreement with the analytical solution (ana_pp), just increase nx
# This is the Action version of fully_saturated_upwinded_grav01c.i but with multiply_by_density=false
# NOTE: this test is numerically delicate because the steady-state configuration is independent of the mass fraction, so the frac variable can assume any value as long as mass-fraction is conserved
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = -1
xmax = 0
[]
[Variables]
[pp]
[InitialCondition]
type = RandomIC
min = 0
max = 1
[]
[]
[frac]
[InitialCondition]
type = RandomIC
min = 0
max = 1
[]
[]
[]
[PorousFlowFullySaturated]
porepressure = pp
mass_fraction_vars = frac
fp = simple_fluid
gravity = '-1 0 0'
multiply_by_density = false
[]
[Functions]
[ana_pp]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 1.2 0 1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[]
[BCs]
[z]
type = DirichletBC
variable = pp
boundary = right
value = 0
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.2
density0 = 1
viscosity = 1
thermal_expansion = 0
[]
[]
[Materials]
[permeability]
type = PorousFlowPermeabilityConst
PorousFlowDictator = dictator
permeability = '1 0 0 0 2 0 0 0 3'
[]
[]
[Postprocessors]
[pp_base]
type = PointValue
variable = pp
point = '-1 0 0'
[]
[pp_analytical]
type = FunctionValuePostprocessor
function = ana_pp
point = '-1 0 0'
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = Newton
nl_rel_tol = 1E-12
petsc_options_iname = '-pc_factor_shift_type'
petsc_options_value = 'NONZERO'
nl_max_its = 100
[]
[Outputs]
csv = true
[]
(modules/richards/test/tests/dirac/bh_fu_02.i)
# fully-saturated
# production
# fullyupwind
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = DensityConstBulk
relperm_UO = RelPermPower
sat_UO = Saturation
seff_UO = Seff1VG
SUPG_UO = SUPGstandard
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./Seff1VG]
type = RichardsSeff1VG
m = 0.8
al = 1E-5
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0
sum_s_res = 0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E8
[../]
[./borehole_total_outflow_mass]
type = RichardsSumQuantity
[../]
[]
[Variables]
active = 'pressure'
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./p_ic]
type = FunctionIC
variable = pressure
function = initial_pressure
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
variable = pressure
[../]
[]
[DiracKernels]
[./bh]
type = RichardsBorehole
bottom_pressure = 0
point_file = bh02.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pressure
unit_weight = '0 0 0'
character = 1
fully_upwind = true
[../]
[]
[Postprocessors]
[./bh_report]
type = RichardsPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = RichardsMass
variable = pressure
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = RichardsMass
variable = pressure
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
indirect_dependencies = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[./p0]
type = PointValue
variable = pressure
point = '1 1 1'
execute_on = timestep_end
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 1E7
[../]
[./mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = 0
viscosity = 1E-3
mat_porosity = 0.1
mat_permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = Seff1VG
pressure_vars = pressure
[../]
[]
[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 = 0.5
dt = 1E-2
solve_type = NEWTON
[]
[Outputs]
file_base = bh_fu_02
exodus = false
csv = true
execute_on = timestep_end
[]
(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
[]
(test/tests/reporters/base/special_types.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
[]
[]
[UserObjects/special_type_test]
type = ReporterSpecialTypeTest
pp_reporter = "pp/value"
vpp_reporter = "vpp/value"
[]
[Postprocessors/pp]
type = FunctionValuePostprocessor
function = 1
[]
[VectorPostprocessors/vpp]
type = ConstantVectorPostprocessor
vector_names = 'value'
value = '2'
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(modules/solid_mechanics/test/tests/capped_mohr_coulomb/random1.i)
# Using CappedMohrCoulomb with tensile failure only
# Plasticity models:
# Tensile strength = 1MPa
#
# Lame lambda = 1GPa. Lame mu = 1.3GPa
#
# A line of elements is perturbed randomly, and return to the yield surface at each quadpoint is checked
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1000
ny = 1234
nz = 1
xmin = 0
xmax = 1000
ymin = 0
ymax = 1234
zmin = 0
zmax = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
add_variables = true
incremental = true
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_yz stress_zz'
[../]
[]
[ICs]
[./x]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_x
[../]
[./y]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_y
[../]
[./z]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_z
[../]
[]
[BCs]
[./x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'front back'
function = '0'
[../]
[./y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'front back'
function = '0'
[../]
[./z]
type = FunctionDirichletBC
variable = disp_z
boundary = 'front back'
function = '0'
[../]
[]
[AuxVariables]
[./f0]
order = CONSTANT
family = MONOMIAL
[../]
[./f1]
order = CONSTANT
family = MONOMIAL
[../]
[./f2]
order = CONSTANT
family = MONOMIAL
[../]
[./int0]
order = CONSTANT
family = MONOMIAL
[../]
[./iter]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./f0]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 0
variable = f0
[../]
[./f1]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 1
variable = f1
[../]
[./f2]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 2
variable = f2
[../]
[./int0]
type = MaterialStdVectorAux
property = plastic_internal_parameter
factor = 1E6
index = 0
variable = int0
[../]
[./iter]
type = MaterialRealAux
property = plastic_NR_iterations
variable = iter
[../]
[]
[Postprocessors]
[./tot_iters]
type = ElementIntegralMaterialProperty
mat_prop = plastic_NR_iterations
outputs = console
[../]
[./raw_f0]
type = ElementExtremeValue
variable = f0
outputs = console
[../]
[./raw_f1]
type = ElementExtremeValue
variable = f1
outputs = console
[../]
[./raw_f2]
type = ElementExtremeValue
variable = f2
outputs = console
[../]
[./iter]
type = ElementExtremeValue
variable = iter
outputs = console
[../]
[./f0]
type = FunctionValuePostprocessor
function = should_be_zero0_fcn
[../]
[./f1]
type = FunctionValuePostprocessor
function = should_be_zero1_fcn
[../]
[./f2]
type = FunctionValuePostprocessor
function = should_be_zero2_fcn
[../]
[]
[Functions]
[./should_be_zero0_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f0'
[../]
[./should_be_zero1_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f1'
[../]
[./should_be_zero2_fcn]
type = ParsedFunction
expression = 'if(a<1E-1,0,a)'
symbol_names = 'a'
symbol_values = 'raw_f2'
[../]
[]
[UserObjects]
[./ts]
type = SolidMechanicsHardeningCubic
value_0 = 1E6
value_residual = 0
internal_limit = 1
[../]
[./cs]
type = SolidMechanicsHardeningConstant
value = 1E12
[../]
[./coh]
type = SolidMechanicsHardeningConstant
value = 1E12
[../]
[./ang]
type = SolidMechanicsHardeningConstant
value = 0.5
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric_isotropic
C_ijkl = '1E9 1.3E9'
[../]
[./tensile]
type = CappedMohrCoulombStressUpdate
tensile_strength = ts
compressive_strength = cs
cohesion = coh
friction_angle = ang
dilation_angle = ang
smoothing_tol = 1E5
max_NR_iterations = 100
yield_function_tol = 1.0E-1
[../]
[./stress]
type = ComputeMultipleInelasticStress
inelastic_models = tensile
perform_finite_strain_rotations = false
[../]
[]
[Executioner]
end_time = 1
dt = 1
type = Transient
[]
[Outputs]
file_base = random1
csv = true
[]
(modules/richards/test/tests/gravity_head_2/gh_fu_05.i)
# unsaturated = true
# gravity = false
# 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 = RandomIC
min = 0.2
max = 0.8
variable = pwater
[../]
[./gas_ic]
type = RandomIC
min = 1.2
max = 1.8
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((p0-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((p0-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 = '0 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 = gh_fu_05
csv = true
[]
(modules/solid_mechanics/test/tests/mohr_coulomb/random_planar.i)
# apply many random large deformations, checking that the algorithm returns correctly to
# the yield surface each time.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 100
ny = 1250
nz = 1
xmin = 0
xmax = 100
ymin = 0
ymax = 1250
zmin = 0
zmax = 1
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[]
[ICs]
[./x]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_x
[../]
[./y]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_y
[../]
[./z]
type = RandomIC
min = -0.1
max = 0.1
variable = disp_z
[../]
[]
[BCs]
[./x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'front back'
function = '0'
[../]
[./y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'front back'
function = '0'
[../]
[./z]
type = FunctionDirichletBC
variable = disp_z
boundary = 'front back'
function = '0'
[../]
[]
[AuxVariables]
[./yield_fcn]
order = CONSTANT
family = MONOMIAL
[../]
[./iter]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./yield_fcn_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_yield_function
variable = yield_fcn
[../]
[./iter]
type = MaterialRealAux
property = plastic_NR_iterations
variable = iter
[../]
[]
[Postprocessors]
[./yield_fcn_at_zero]
type = PointValue
point = '0 0 0'
variable = yield_fcn
outputs = 'console'
[../]
[./should_be_zero]
type = FunctionValuePostprocessor
function = should_be_zero_fcn
[../]
[./av_iter]
type = ElementAverageValue
variable = iter
outputs = 'console'
[../]
[]
[Functions]
[./should_be_zero_fcn]
type = ParsedFunction
expression = 'if(a<1E-3,0,a)'
symbol_names = 'a'
symbol_values = 'yield_fcn_at_zero'
[../]
[]
[UserObjects]
[./coh]
type = SolidMechanicsHardeningCubic
value_0 = 1000
value_residual = 100
internal_limit = 4
[../]
[./phi]
type = SolidMechanicsHardeningCubic
value_0 = 0.8
value_residual = 0.3
internal_limit = 2
[../]
[./psi]
type = SolidMechanicsHardeningConstant
value = 15
convert_to_radians = true
[../]
[./mc]
type = SolidMechanicsPlasticMohrCoulombMulti
cohesion = coh
friction_angle = phi
dilation_angle = psi
yield_function_tolerance = 1E-3
shift = 1E-10
internal_constraint_tolerance = 1E-6
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
fill_method = symmetric_isotropic
C_ijkl = '0.7E7 1E7'
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./mc]
type = ComputeMultiPlasticityStress
block = 0
ep_plastic_tolerance = 1E-10
plastic_models = mc
min_stepsize = 1
max_stepsize_for_dumb = 1
[../]
[]
[Executioner]
end_time = 1
dt = 1
type = Transient
[]
[Outputs]
file_base = random_planar
exodus = false
[./csv]
type = CSV
[../]
[]
(modules/porous_flow/test/tests/gravity/grav02c.i)
# Checking that gravity head is established in the transient situation when 0<=saturation<=1 (note the less-than-or-equal-to).
# 2phase (PP), 2components, vanGenuchten, constant fluid bulk-moduli for each phase, constant viscosity, constant permeability, Corey relative perm
# For better agreement with the analytical solution (ana_pp), just increase nx
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = -1
xmax = 0
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Functions]
[dts]
type = PiecewiseLinear
y = '1E-3 1E-2 1E-1'
x = '1E-3 1E-2 1E-1'
[]
[]
[Variables]
[ppwater]
initial_condition = -0.1
[]
[ppgas]
initial_condition = 0
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = ppwater
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = ppwater
gravity = '-1 0 0'
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = ppgas
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = ppgas
gravity = '-1 0 0'
[]
[]
[Functions]
[ana_ppwater]
type = ParsedFunction
symbol_names = 'g B p0 rho0'
symbol_values = '1 2 pp_water_top 1'
expression = '-B*log(exp(-p0/B)+g*rho0*x/B)' # expected pp at base
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 2
density0 = 1
viscosity = 1
thermal_expansion = 0
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 0.1
viscosity = 0.5
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = ppwater
phase1_porepressure = ppgas
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
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 0
[]
[relperm_gas]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 1
[]
[]
[Postprocessors]
[pp_water_top]
type = PointValue
variable = ppwater
point = '0 0 0'
[]
[pp_water_base]
type = PointValue
variable = ppwater
point = '-1 0 0'
[]
[pp_water_analytical]
type = FunctionValuePostprocessor
function = ana_ppwater
point = '-1 0 0'
[]
[mass_ph0]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'initial timestep_end'
[]
[mass_ph1]
type = PorousFlowFluidMass
fluid_component = 1
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
active = andy
[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'
[]
[check]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-12 1E-10 10000 test'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
[TimeStepper]
type = FunctionDT
function = dts
[]
end_time = 1.0
[]
[Outputs]
execute_on = 'initial timestep_end'
file_base = grav02c
[csv]
type = CSV
[]
exodus = true
[]
(modules/phase_field/examples/measure_interface_energy/1Dinterface_energy.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 100
xmin = 0
elem_type = EDGE
[]
[AuxVariables]
[./local_energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./local_free_energy]
type = TotalFreeEnergy
variable = local_energy
kappa_names = kappa_c
interfacial_vars = c
[../]
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
scaling = 1e1
[./InitialCondition]
type = RampIC
variable = c
value_left = 0
value_right = 1
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
[Functions]
[./Int_energy]
type = ParsedFunction
symbol_values = 'total_solute Cleft Cright Fleft Fright volume'
expression = '((total_solute-Cleft*volume)/(Cright-Cleft))*Fright+(volume-(total_solute-Cleft*volume)/(Cright-Cleft))*Fleft'
symbol_names = 'total_solute Cleft Cright Fleft Fright volume'
[../]
[./Diff]
type = ParsedFunction
symbol_values = 'total_free_energy total_no_int'
symbol_names = 'total_free_energy total_no_int'
expression = total_free_energy-total_no_int
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'kappa_c M'
prop_values = '25 150'
[../]
[./Free_energy]
type = DerivativeParsedMaterial
property_name = F
expression = 'c^2*(c-1)^2'
coupled_variables = c
derivative_order = 2
[../]
[]
[Postprocessors]
# The total free energy of the simulation cell to observe the energy reduction.
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
variable = local_energy
[../]
# for testing we also monitor the total solute amount, which should be conserved,
# gives Cavg in % for this problem.
[./total_solute]
type = ElementIntegralVariablePostprocessor
variable = c
[../]
# Get simulation cell size (1D volume) from postprocessor
[./volume]
type = ElementIntegralMaterialProperty
mat_prop = 1
[../]
# Find concentration in each phase using SideAverageValue
[./Cleft]
type = SideAverageValue
boundary = left
variable = c
[../]
[./Cright]
type = SideAverageValue
boundary = right
variable = c
[../]
# Find local energy in each phase by checking boundaries
[./Fleft]
type = SideAverageValue
boundary = left
variable = local_energy
[../]
[./Fright]
type = SideAverageValue
boundary = right
variable = local_energy
[../]
# Use concentrations and energies to find total free energy without any interface,
# only applies once equilibrium is reached!!
# Difference between energy with and without interface
# gives interface energy per unit area.
[./total_no_int]
type = FunctionValuePostprocessor
function = Int_energy
[../]
[./Energy_of_Interface]
type = FunctionValuePostprocessor
function = Diff
[../]
[]
[Preconditioning]
# This preconditioner makes sure the Jacobian Matrix is fully populated. Our
# kernels compute all Jacobian matrix entries.
# This allows us to use the Newton solver below.
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
# Automatic differentiation provides a _full_ Jacobian in this example
# so we can safely use NEWTON for a fast solve
solve_type = 'NEWTON'
l_max_its = 15
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-4
start_time = 0.0
# make sure that the result obtained for the interfacial free energy is fully converged
end_time = 40
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.5
[../]
[]
[Outputs]
gnuplot = true
csv = true
[./exodus]
type = Exodus
show = 'c local_energy'
execute_on = 'failed initial nonlinear timestep_end final'
[../]
[./console]
type = Console
execute_on = 'FAILED INITIAL NONLINEAR TIMESTEP_END final'
[../]
perf_graph = true
[]
(modules/thermal_hydraulics/test/tests/problems/brayton_cycle/closed_brayton_cycle.i)
# This input file is used to demonstrate a simple closed, air Brayton cycle using
# a compressor, turbine, shaft, motor, and generator.
# The flow length is divided into 6 segments as illustrated below, where
# - "(C)" denotes the compressor
# - "(T)" denotes the turbine
# - "*" denotes a fictitious junction
#
# Heated section Cooled section
# *-----(C)-----*--------------*-----(T)-----*--------------*
# 1 2 3 4 5 6
#
# Initially the fluid is at rest at ambient conditions, the shaft speed is zero,
# and no heat transfer occurs with the system.
# The transient is controlled as follows:
# * 0 - 100 s: motor ramps up torque linearly from zero
# * 100 - 200 s: motor ramps down torque linearly to zero, HTC ramps up linearly from zero.
# * 200 - 300 s: (no changes; should approach steady condition)
I_motor = 1.0
motor_torque_max = 400.0
I_generator = 1.0
generator_torque_per_shaft_speed = -0.00025
motor_ramp_up_duration = 100.0
motor_ramp_down_duration = 100.0
post_motor_time = 100.0
t1 = ${motor_ramp_up_duration}
t2 = ${fparse t1 + motor_ramp_down_duration}
t3 = ${fparse t2 + post_motor_time}
D1 = 0.15
D2 = ${D1}
D3 = ${D1}
D4 = ${D1}
D5 = ${D1}
D6 = ${D1}
A1 = ${fparse 0.25 * pi * D1^2}
A2 = ${fparse 0.25 * pi * D2^2}
A3 = ${fparse 0.25 * pi * D3^2}
A4 = ${fparse 0.25 * pi * D4^2}
A5 = ${fparse 0.25 * pi * D5^2}
A6 = ${fparse 0.25 * pi * D6^2}
L1 = 10.0
L2 = ${L1}
L3 = ${L1}
L4 = ${L1}
L5 = ${L1}
L6 = ${L1}
x1 = 0.0
x2 = ${fparse x1 + L1}
x3 = ${fparse x2 + L2}
x4 = ${fparse x3 + L3}
x5 = ${fparse x4 + L4}
x6 = ${fparse x5 + L5}
x2_minus = ${fparse x2 - 0.001}
x2_plus = ${fparse x2 + 0.001}
x5_minus = ${fparse x5 - 0.001}
x5_plus = ${fparse x5 + 0.001}
n_elems1 = 10
n_elems2 = ${n_elems1}
n_elems3 = ${n_elems1}
n_elems4 = ${n_elems1}
n_elems5 = ${n_elems1}
n_elems6 = ${n_elems1}
A_ref_comp = ${fparse 0.5 * (A1 + A2)}
V_comp = ${fparse A_ref_comp * 1.0}
I_comp = 1.0
A_ref_turb = ${fparse 0.5 * (A4 + A5)}
V_turb = ${fparse A_ref_turb * 1.0}
I_turb = 1.0
c0_rated_comp = 351.6925137
rho0_rated_comp = 1.146881112
rated_mfr = 0.25
speed_rated_rpm = 96000
speed_rated = ${fparse speed_rated_rpm * 2 * pi / 60.0}
speed_initial = 0
eff_comp = 0.79
eff_turb = 0.843
T_hot = 1000
T_cold = 300
T_ambient = 300
p_ambient = 1e5
[GlobalParams]
orientation = '1 0 0'
gravity_vector = '0 0 0'
initial_p = ${p_ambient}
initial_T = ${T_ambient}
initial_vel = 0
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
fp = fp_air
closures = closures
f = 0
scaling_factor_1phase = '1 1 1e-5'
scaling_factor_rhoV = 1
scaling_factor_rhouV = 1
scaling_factor_rhovV = 1
scaling_factor_rhowV = 1
scaling_factor_rhoEV = 1e-5
rdg_slope_reconstruction = none
[]
[Functions]
[motor_torque_fn]
type = PiecewiseLinear
x = '0 ${t1} ${t2}'
y = '0 ${motor_torque_max} 0'
[]
[motor_power_fn]
type = ParsedFunction
expression = 'torque * speed'
symbol_names = 'torque speed'
symbol_values = 'motor_torque shaft:omega'
[]
[generator_torque_fn]
type = ParsedFunction
expression = 'slope * t'
symbol_names = 'slope'
symbol_values = '${generator_torque_per_shaft_speed}'
[]
[generator_power_fn]
type = ParsedFunction
expression = 'torque * speed'
symbol_names = 'torque speed'
symbol_values = 'generator_torque shaft:omega'
[]
[htc_wall_fn]
type = PiecewiseLinear
x = '0 ${t1} ${t2}'
y = '0 0 1e3'
[]
[]
[FluidProperties]
[fp_air]
type = IdealGasFluidProperties
emit_on_nan = none
[]
[]
[Closures]
[closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[shaft]
type = Shaft
connected_components = 'motor compressor turbine generator'
initial_speed = ${speed_initial}
[]
[motor]
type = ShaftConnectedMotor
inertia = ${I_motor}
torque = 0 # controlled
[]
[generator]
type = ShaftConnectedMotor
inertia = ${I_generator}
torque = generator_torque_fn
[]
[pipe1]
type = FlowChannel1Phase
position = '${x1} 0 0'
length = ${L1}
n_elems = ${n_elems1}
A = ${A1}
[]
[compressor]
type = ShaftConnectedCompressor1Phase
position = '${x2} 0 0'
inlet = 'pipe1:out'
outlet = 'pipe2:in'
A_ref = ${A_ref_comp}
volume = ${V_comp}
omega_rated = ${speed_rated}
mdot_rated = ${rated_mfr}
c0_rated = ${c0_rated_comp}
rho0_rated = ${rho0_rated_comp}
speeds = '0.5208 0.6250 0.7292 0.8333 0.9375'
Rp_functions = 'rp_comp1 rp_comp2 rp_comp3 rp_comp4 rp_comp5'
eff_functions = 'eff_comp1 eff_comp2 eff_comp3 eff_comp4 eff_comp5'
min_pressure_ratio = 1.0
speed_cr_I = 0
inertia_const = ${I_comp}
inertia_coeff = '${I_comp} 0 0 0'
# assume no shaft friction
speed_cr_fr = 0
tau_fr_const = 0
tau_fr_coeff = '0 0 0 0'
[]
[pipe2]
type = FlowChannel1Phase
position = '${x2} 0 0'
length = ${L2}
n_elems = ${n_elems2}
A = ${A2}
[]
[junction2_3]
type = JunctionOneToOne1Phase
connections = 'pipe2:out pipe3:in'
[]
[pipe3]
type = FlowChannel1Phase
position = '${x3} 0 0'
length = ${L3}
n_elems = ${n_elems3}
A = ${A3}
[]
[junction3_4]
type = JunctionOneToOne1Phase
connections = 'pipe3:out pipe4:in'
[]
[pipe4]
type = FlowChannel1Phase
position = '${x4} 0 0'
length = ${L4}
n_elems = ${n_elems4}
A = ${A4}
[]
[turbine]
type = ShaftConnectedCompressor1Phase
position = '${x5} 0 0'
inlet = 'pipe4:out'
outlet = 'pipe5:in'
A_ref = ${A_ref_turb}
volume = ${V_turb}
treat_as_turbine = true
omega_rated = ${speed_rated}
mdot_rated = ${rated_mfr}
c0_rated = ${c0_rated_comp}
rho0_rated = ${rho0_rated_comp}
speeds = '0 0.5208 0.6250 0.7292 0.8333 0.9375'
Rp_functions = 'rp_turb0 rp_turb1 rp_turb2 rp_turb3 rp_turb4 rp_turb5'
eff_functions = 'eff_turb1 eff_turb1 eff_turb2 eff_turb3 eff_turb4 eff_turb5'
min_pressure_ratio = 1.0
speed_cr_I = 0
inertia_const = ${I_turb}
inertia_coeff = '${I_turb} 0 0 0'
# assume no shaft friction
speed_cr_fr = 0
tau_fr_const = 0
tau_fr_coeff = '0 0 0 0'
[]
[pipe5]
type = FlowChannel1Phase
position = '${x5} 0 0'
length = ${L5}
n_elems = ${n_elems5}
A = ${A5}
[]
[junction5_6]
type = JunctionOneToOne1Phase
connections = 'pipe5:out pipe6:in'
[]
[pipe6]
type = FlowChannel1Phase
position = '${x6} 0 0'
length = ${L6}
n_elems = ${n_elems6}
A = ${A6}
[]
[junction6_1]
type = JunctionOneToOne1Phase
connections = 'pipe6:out pipe1:in'
[]
[heating]
type = HeatTransferFromSpecifiedTemperature1Phase
flow_channel = pipe3
T_wall = ${T_hot}
Hw = htc_wall_fn
[]
[cooling]
type = HeatTransferFromSpecifiedTemperature1Phase
flow_channel = pipe6
T_wall = ${T_cold}
Hw = htc_wall_fn
[]
[]
[ControlLogic]
[motor_ctrl]
type = TimeFunctionComponentControl
component = motor
parameter = torque
function = motor_torque_fn
[]
[]
[Postprocessors]
[heating_rate]
type = ADHeatRateConvection1Phase
block = 'pipe3'
T = T
T_wall = T_wall
Hw = Hw
P_hf = P_hf
execute_on = 'INITIAL TIMESTEP_END'
[]
[cooling_rate]
type = ADHeatRateConvection1Phase
block = 'pipe6'
T = T
T_wall = T_wall
Hw = Hw
P_hf = P_hf
execute_on = 'INITIAL TIMESTEP_END'
[]
[motor_torque]
type = RealComponentParameterValuePostprocessor
component = motor
parameter = torque
execute_on = 'INITIAL TIMESTEP_END'
[]
[motor_power]
type = FunctionValuePostprocessor
function = motor_power_fn
execute_on = 'INITIAL TIMESTEP_END'
indirect_dependencies = 'motor_torque shaft:omega'
[]
[generator_torque]
type = ShaftConnectedComponentPostprocessor
quantity = torque
shaft_connected_component_uo = generator:shaftconnected_uo
execute_on = 'INITIAL TIMESTEP_END'
[]
[generator_power]
type = FunctionValuePostprocessor
function = generator_power_fn
execute_on = 'INITIAL TIMESTEP_END'
indirect_dependencies = 'generator_torque shaft:omega'
[]
[shaft_speed]
type = ScalarVariable
variable = 'shaft:omega'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_in_comp]
type = PointValue
variable = p
point = '${x2_minus} 0 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_out_comp]
type = PointValue
variable = p
point = '${x2_plus} 0 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_ratio_comp]
type = ParsedPostprocessor
pp_names = 'p_in_comp p_out_comp'
function = 'p_out_comp / p_in_comp'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_in_turb]
type = PointValue
variable = p
point = '${x5_minus} 0 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_out_turb]
type = PointValue
variable = p
point = '${x5_plus} 0 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_ratio_turb]
type = ParsedPostprocessor
pp_names = 'p_in_turb p_out_turb'
function = 'p_in_turb / p_out_turb'
execute_on = 'INITIAL TIMESTEP_END'
[]
[mfr_comp]
type = ADFlowJunctionFlux1Phase
boundary = pipe1:out
connection_index = 0
equation = mass
junction = compressor
[]
[mfr_turb]
type = ADFlowJunctionFlux1Phase
boundary = pipe4:out
connection_index = 0
equation = mass
junction = turbine
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
end_time = ${t3}
dt = 0.1
abort_on_solve_fail = true
solve_type = NEWTON
nl_rel_tol = 1e-50
nl_abs_tol = 1e-11
nl_max_its = 15
l_tol = 1e-4
l_max_its = 10
[]
[Outputs]
[csv]
type = CSV
file_base = 'closed_brayton_cycle'
execute_vector_postprocessors_on = 'INITIAL'
[]
[console]
type = Console
show = 'shaft_speed p_ratio_comp p_ratio_turb compressor:pressure_ratio turbine:pressure_ratio'
[]
[]
[Functions]
# compressor pressure ratio
[rp_comp1]
type = PiecewiseLinear
data_file = 'rp_comp1.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp2]
type = PiecewiseLinear
data_file = 'rp_comp2.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp3]
type = PiecewiseLinear
data_file = 'rp_comp3.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp4]
type = PiecewiseLinear
data_file = 'rp_comp4.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_comp5]
type = PiecewiseLinear
data_file = 'rp_comp5.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
# compressor efficiency
[eff_comp1]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp2]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp3]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp4]
type = ConstantFunction
value = ${eff_comp}
[]
[eff_comp5]
type = ConstantFunction
value = ${eff_comp}
[]
# turbine pressure ratio
[rp_turb0]
type = ConstantFunction
value = 1
[]
[rp_turb1]
type = PiecewiseLinear
data_file = 'rp_turb1.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb2]
type = PiecewiseLinear
data_file = 'rp_turb2.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb3]
type = PiecewiseLinear
data_file = 'rp_turb3.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb4]
type = PiecewiseLinear
data_file = 'rp_turb4.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
[rp_turb5]
type = PiecewiseLinear
data_file = 'rp_turb5.csv'
x_index_in_file = 0
y_index_in_file = 1
format = columns
extrap = true
[]
# turbine efficiency
[eff_turb1]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb2]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb3]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb4]
type = ConstantFunction
value = ${eff_turb}
[]
[eff_turb5]
type = ConstantFunction
value = ${eff_turb}
[]
[]
(modules/richards/test/tests/dirac/bh03.i)
# fully-saturated
# injection
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./Seff1VG]
type = RichardsSeff1VG
m = 0.8
al = 1E-5
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0
sum_s_res = 0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E8
[../]
[./borehole_total_outflow_mass]
type = RichardsSumQuantity
[../]
[]
[Variables]
active = 'pressure'
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./p_ic]
type = FunctionIC
variable = pressure
function = initial_pressure
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
variable = pressure
[../]
[]
[DiracKernels]
[./bh]
type = RichardsBorehole
bottom_pressure = 1E7
point_file = bh03.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pressure
unit_weight = '0 0 0'
character = -1
[../]
[]
[Postprocessors]
[./bh_report]
type = RichardsPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = RichardsMass
variable = pressure
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = RichardsMass
variable = pressure
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
indirect_dependencies = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[./p0]
type = PointValue
variable = pressure
point = '1 1 1'
execute_on = timestep_end
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 0
[../]
[./mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = 0
viscosity = 1E-3
mat_porosity = 0.1
mat_permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
density_UO = DensityConstBulk
relperm_UO = RelPermPower
sat_UO = Saturation
seff_UO = Seff1VG
SUPG_UO = SUPGstandard
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = Seff1VG
pressure_vars = pressure
[../]
[]
[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 = 0.5
dt = 1E-2
solve_type = NEWTON
[]
[Outputs]
file_base = bh03
exodus = false
csv = true
execute_on = timestep_end
[]
(modules/thermal_hydraulics/test/tests/controls/delay_control/test.i)
[GlobalParams]
initial_p = 100.e3
initial_vel = 0
initial_T = 300.
closures = simple_closures
[]
[Functions]
[p0_fn]
type = PiecewiseLinear
x = '0 0.2 0.4 0.6 0.8'
y = '1e5 1.002e5 1.002e5 1.001e5 1.001e5'
[]
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
fp = fp
position = '0 0 0'
orientation = '1 0 0'
length = 1.0
n_elems = 5
A = 0.01
D_h = 0.1
f = 0
[]
[inlet]
type = InletStagnationPressureTemperature1Phase
input = 'pipe1:in'
p0 = 100.e3
T0 = 300.
[]
[outlet]
type = Outlet1Phase
input = 'pipe1:out'
p = 100.0e3
[]
[]
[ControlLogic]
[p0_fn_ctrl]
type = TimeFunctionComponentControl
component = inlet
parameter = p0
function = p0_fn
[]
[delay_ctrl]
type = DelayControl
input = p0_inlet
tau = 0.3
initial_value = 1e5
[]
[]
[Postprocessors]
[p0_inlet_delayed]
type = RealControlDataValuePostprocessor
control_data_name = delay_ctrl:value
execute_on = 'initial timestep_end'
[]
[p0_inlet]
type = FunctionValuePostprocessor
function = p0_fn
execute_on = 'initial timestep_begin'
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
dt = 0.1
start_time = 0.0
end_time = 1.0
abort_on_solve_fail = true
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
nl_max_its = 20
l_tol = 1e-3
l_max_its = 5
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
[]
[Outputs]
csv = true
[]
(modules/stochastic_tools/examples/libtorch_drl_control/libtorch_drl_control_sub.i)
air_density = 1.184 # kg/m3
air_cp = 1000 # J/(kg K)
air_effective_k = 0.5 # W/(m K)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.0
xmax = 7.0
ymin = 0.0
ymax = 5.0
nx = 35
ny = 25
[]
[]
[Variables]
[T]
initial_condition = 297
[]
[]
[Kernels]
[time_derivative]
type = CoefTimeDerivative
variable = T
Coefficient = '${fparse air_density*air_cp}'
[]
[heat_conduction]
type = MatDiffusion
variable = T
diffusivity = 'k'
[]
[]
[BCs]
[top_flux]
type = NeumannBC
value = 0.0
boundary = 'top'
variable = T
[]
[dirichlet]
type = FunctionDirichletBC
function = temp_env
variable = T
boundary = 'left right'
[]
[]
[Functions]
[temp_env]
type = ParsedFunction
value = '15.0*sin(t/86400.0*pi) + 273.0'
[]
[design_function]
type = ParsedFunction
value = '297'
[]
[reward_function]
type = ScaledAbsDifferenceDRLRewardFunction
design_function = design_function
observed_value = center_temp_tend
c1 = 1
c2 = 10
[]
[]
[Materials]
[constant]
type = GenericConstantMaterial
prop_names = 'k'
prop_values = ${air_effective_k}
[]
[]
[Postprocessors]
[center_temp]
type = PointValue
variable = T
point = '3.5 2.5 0.0'
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[center_temp_tend]
type = PointValue
variable = T
point = '3.5 2.5 0.0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[env_temp]
type = FunctionValuePostprocessor
function = temp_env
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[reward]
type = FunctionValuePostprocessor
function = reward_function
execute_on = 'INITIAL TIMESTEP_END'
indirect_dependencies = 'center_temp_tend env_temp'
[]
[top_flux]
type = LibtorchControlValuePostprocessor
control_name = src_control
[]
[log_prob_top_flux]
type = LibtorchDRLLogProbabilityPostprocessor
control_name = src_control
[]
[]
[Reporters]
[T_reporter]
type = AccumulateReporter
reporters = 'center_temp_tend/value env_temp/value reward/value top_flux/value log_prob_top_flux/value'
[]
[]
[Controls]
inactive = 'src_control_final'
[src_control]
type = LibtorchDRLControl
parameters = "BCs/top_flux/value"
responses = 'center_temp_tend env_temp'
# keep consistent with LibtorchDRLControlTrainer
input_timesteps = 2
response_scaling_factors = '0.03 0.03'
response_shift_factors = '290 290'
action_standard_deviations = '0.02'
action_scaling_factors = 200
execute_on = 'TIMESTEP_BEGIN'
[]
[src_control_final]
type = LibtorchNeuralNetControl
filename = 'mynet_control.net'
num_neurons_per_layer = '16 6'
activation_function = 'relu'
parameters = "BCs/top_flux/value"
responses = 'center_temp_tend env_temp'
# keep consistent with LibtorchDRLControlTrainer
input_timesteps = 2
response_scaling_factors = '0.03 0.03'
response_shift_factors = '290 290'
action_standard_deviations = '0.02'
action_scaling_factors = 200
execute_on = 'TIMESTEP_BEGIN'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-7
start_time = 0.0
end_time = 86400
dt = 900.0
[]
[Outputs]
console = false
[c]
type = CSV
execute_on = FINAL
[]
[]
(modules/porous_flow/test/tests/sinks/s02.i)
# apply a sink flux with use_mobility=true and observe the correct behavior
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 2
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[Variables]
[pp]
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = y+1
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.3
density0 = 1.1
thermal_expansion = 0
viscosity = 1.1
[]
[]
[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.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0.2 0 0 0 0.1 0 0 0 0.1'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[AuxVariables]
[flux_out]
[]
[xval]
[]
[yval]
[]
[]
[ICs]
[xval]
type = FunctionIC
variable = xval
function = x
[]
[yval]
type = FunctionIC
variable = yval
function = y
[]
[]
[Functions]
[mass00]
type = ParsedFunction
expression = 'vol*por*dens0*exp(pp/bulk)'
symbol_names = 'vol por dens0 pp bulk'
symbol_values = '0.25 0.1 1.1 p00 1.3'
[]
[mass01]
type = ParsedFunction
expression = 'vol*por*dens0*exp(pp/bulk)'
symbol_names = 'vol por dens0 pp bulk'
symbol_values = '0.25 0.1 1.1 p01 1.3'
[]
[expected_mass_change00]
type = ParsedFunction
expression = 'fcn*perm*dens0*exp(pp/bulk)/visc*area*dt'
symbol_names = 'fcn perm dens0 pp bulk visc area dt'
symbol_values = '6 0.2 1.1 p00 1.3 1.1 0.5 1E-3'
[]
[expected_mass_change01]
type = ParsedFunction
expression = 'fcn*perm*dens0*exp(pp/bulk)/visc*area*dt'
symbol_names = 'fcn perm dens0 pp bulk visc area dt'
symbol_values = '6 0.2 1.1 p01 1.3 1.1 0.5 1E-3'
[]
[mass00_expect]
type = ParsedFunction
expression = 'mass_prev-mass_change'
symbol_names = 'mass_prev mass_change'
symbol_values = 'm00_prev del_m00'
[]
[mass01_expect]
type = ParsedFunction
expression = 'mass_prev-mass_change'
symbol_names = 'mass_prev mass_change'
symbol_values = 'm01_prev del_m01'
[]
[]
[Postprocessors]
[p00]
type = PointValue
point = '0 0 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[m00]
type = FunctionValuePostprocessor
function = mass00
execute_on = 'initial timestep_end'
[]
[m00_prev]
type = FunctionValuePostprocessor
function = mass00
execute_on = 'timestep_begin'
outputs = 'console'
[]
[del_m00]
type = FunctionValuePostprocessor
function = expected_mass_change00
execute_on = 'timestep_end'
outputs = 'console'
[]
[m00_expect]
type = FunctionValuePostprocessor
function = mass00_expect
execute_on = 'timestep_end'
[]
[p10]
type = PointValue
point = '1 0 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[p01]
type = PointValue
point = '0 1 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[m01]
type = FunctionValuePostprocessor
function = mass01
execute_on = 'initial timestep_end'
[]
[m01_prev]
type = FunctionValuePostprocessor
function = mass01
execute_on = 'timestep_begin'
outputs = 'console'
[]
[del_m01]
type = FunctionValuePostprocessor
function = expected_mass_change01
execute_on = 'timestep_end'
outputs = 'console'
[]
[m01_expect]
type = FunctionValuePostprocessor
function = mass01_expect
execute_on = 'timestep_end'
[]
[p11]
type = PointValue
point = '1 1 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[]
[BCs]
[flux]
type = PorousFlowSink
boundary = 'left'
variable = pp
use_mobility = true
use_relperm = true
fluid_phase = 0
flux_function = 6
save_in = flux_out
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -snes_max_it -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu 10000 NONZERO 2'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E-3
end_time = 0.03
nl_rel_tol = 1E-12
nl_abs_tol = 1E-12
[]
[Outputs]
file_base = s02
[console]
type = Console
execute_on = 'nonlinear linear'
time_step_interval = 30
[]
[csv]
type = CSV
execute_on = 'timestep_end'
time_step_interval = 3
[]
[]
(test/tests/controls/moose_base_naming_access/base_object_param.i)
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
# use odd numbers so points do not fall on element boundaries
nx = 31
ny = 31
[]
[Variables]
[./diffused]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = diffused
[../]
[]
[DiracKernels]
[./test_object]
type = MaterialPointSource
point = '0.5 0.5 0'
variable = diffused
[../]
[]
[BCs]
[./bottom_diffused]
type = DirichletBC
variable = diffused
boundary = 'bottom'
value = 2
[../]
[./top_diffused]
type = DirichletBC
variable = diffused
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'matp'
prop_values = '1'
block = 0
[../]
[]
[Postprocessors]
[./test_object]
type = FunctionValuePostprocessor
function = '2*(x+y)'
point = '0.5 0.5 0'
[../]
[./other_point_test_object]
type = FunctionValuePostprocessor
function = '3*(x+y)'
point = '0.5 0.5 0'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
[Controls]
[./point_control]
type = TestControl
test_type = 'point'
parameter = 'DiracKernel::test_object/point'
execute_on = 'initial'
[../]
[]
(modules/richards/test/tests/gravity_head_2/gh_fu_01.i)
# unsaturated = true
# gravity = false
# supg = false
# transient = false
[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'
[]
[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 = RandomIC
min = 0.4
max = 0.6
variable = pwater
[../]
[./gas_ic]
type = RandomIC
min = 1.4
max = 1.6
variable = pgas
[../]
[]
[Kernels]
active = 'richardsfwater richardsfgas'
[./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
outputs = none # no reason why mass should be conserved
[../]
[./mass_error_gas]
type = FunctionValuePostprocessor
function = fcn_mass_error_g
outputs = none # no reason why mass should be conserved
[../]
[./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((p0-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((p0-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 = '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 = gh_fu_01
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/richards/test/tests/sinks/s_fu_01.i)
# with fully_upwind sink
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = DensityConstBulk
relperm_UO = RelPermPower
SUPG_UO = SUPGstandard
sat_UO = Saturation
seff_UO = SeffVG
fully_upwind = true
[]
[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]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_pressure
[../]
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 2
[../]
[./mass_bal_fcn]
type = ParsedFunction
expression = abs((mi-lfout-rfout-mf)/2/(mi+mf))
symbol_names = 'mi mf lfout rfout'
symbol_values = 'mass_init mass_fin left_flux_out right_flux_out'
[../]
[]
[Postprocessors]
[./mass_init]
type = RichardsMass
variable = pressure
execute_on = timestep_begin
[../]
[./mass_fin]
type = RichardsMass
variable = pressure
execute_on = timestep_end
[../]
[./left_flux_out]
type = RichardsPiecewiseLinearSinkFlux
boundary = left
variable = pressure
pressures = '0 1'
bare_fluxes = '1 2'
use_mobility = false
use_relperm = false
[../]
[./right_flux_out]
type = RichardsPiecewiseLinearSinkFlux
boundary = right
variable = pressure
pressures = '0 1'
bare_fluxes = '1 2'
use_mobility = false
use_relperm = false
[../]
[./p0]
type = PointValue
point = '0 0 0'
variable = pressure
[../]
[./mass_bal]
type = FunctionValuePostprocessor
function = mass_bal_fcn
[../]
[]
[BCs]
[./left_flux]
type = RichardsPiecewiseLinearSink
boundary = left
pressures = '0 1'
bare_fluxes = '1 2'
variable = pressure
use_mobility = false
use_relperm = false
[../]
[./right_flux]
type = RichardsPiecewiseLinearSink
boundary = right
pressures = '0 1'
bare_fluxes = '1 2'
variable = pressure
use_mobility = false
use_relperm = false
[../]
[]
[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'
viscosity = 1E-3
gravity = '-1 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
active = 'andy'
[./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 = 2E-3
end_time = 0.2
nl_abs_tol = 1E-12
nl_rel_tol = 1E-10
[]
[Outputs]
file_base = s_fu_01
csv = true
execute_on = timestep_end
[]