- execute_onLINEARThe 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:LINEAR
C++ Type:ExecFlagEnum
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.
- expressionThe user defined function.
C++ Type:FunctionExpression
Controllable:No
Description:The user defined function.
- symbol_namesSymbols (excluding t,x,y,z) that are bound to the values provided by the corresponding items in the vals vector.
C++ Type:std::vector<std::string>
Controllable:No
Description:Symbols (excluding t,x,y,z) that are bound to the values provided by the corresponding items in the vals vector.
- symbol_valuesConstant numeric values, postprocessor names, function names, and scalar variables corresponding to the symbols in symbol_names.
C++ Type:std::vector<std::string>
Controllable:No
Description:Constant numeric values, postprocessor names, function names, and scalar variables corresponding to the symbols in symbol_names.
ParsedFunction
Function created by parsing a string
Description
The ParsedFunction
function takes a mathematical expression in "expression". The expression can be a function of time (t) or coordinate (x, y, or z). The expression can include common mathematical functions. Examples include 4e4+1e2*t
, sqrt(x*x+y*y+z*z)
, and if(t<=1.0, 0.1*t, (1.0+0.1)*cos(pi/2*(t-1.0)) - 1.0)
.
Additional variables may be declared in the "symbol_names" parameter vector. The corresponding "symbol_values" parameter vector should list the items these variables are bound to. Variables can be bound to:
Constant number literals (for example
symbol_names = kB
andsymbol_values = 8.61733e-5
)A PostProcessor name (providing the value from the PP's last execution)
A Function name (providing an immediate evaluation of the specified function)
A scalar variable name
Further information can be found at the function parser site.
Note that if this function is used for any residual contribution, inclusion of scalar variables in the expression
parameter will result in missing Jacobian contributions, even if using Automatic differentiation, since Function
s can currently only return Real
values, not ADReal
values.
Example Input Syntax
[Functions]
# A ParsedFunction allows us to supply analytic expressions
# directly in the input file
[./bc_func]
type = ParsedFunction
expression = sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '16'
[../]
# This function is an actual compiled function
# We could have used ParsedFunction for this as well
[./forcing_func]
type = ExampleFunction
alpha = 16
[../]
[]
(examples/ex13_functions/ex13.i)Input Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:No
Description:Set the enabled status of the MooseObject.
Advanced Parameters
Input Files
- (test/tests/multiapps/picard/function_dt_parent.i)
- (modules/solid_mechanics/test/tests/finite_strain_elastic/elastic_rotation_test.i)
- (modules/solid_mechanics/test/tests/scalar_material_damage/nonlocal_scalar_damage.i)
- (modules/porous_flow/test/tests/gravity/grav01b.i)
- (modules/porous_flow/test/tests/gravity/grav01c_action.i)
- (python/peacock/tests/input_tab/InputTree/gold/lcf1.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/convergence-auto/2D/neumann.i)
- (modules/solid_mechanics/test/tests/nodal_patch_recovery/patch_recovery.i)
- (test/tests/functions/parsed/steady.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/stress_update_material_based/patch_recovery.i)
- (test/tests/transfers/general_field/user_object/duplicated_user_object_tests/sub.i)
- (modules/porous_flow/examples/thm_example/2D.i)
- (modules/contact/test/tests/mortar_cartesian_lms/two_block_1st_order_constraint_lm_xy_friction_vcp.i)
- (test/tests/fvics/function_ic/parsed_function.i)
- (test/tests/restart/restart_subapp_not_parent/two_step_solve_sub_restart.i)
- (modules/contact/test/tests/3d-mortar-contact/frictional-mortar-3d-function.i)
- (modules/xfem/test/tests/moment_fitting/solid_mechanics_moment_fitting.i)
- (test/tests/variables/fe_hier/hier-2-3d.i)
- (modules/thermal_hydraulics/test/tests/components/pump_1phase/pump_mass_energy_conservation.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/varying-eps-basic-kt-primitive.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/steady_fsp_diagonal_of_a_for_scaling.i)
- (modules/contact/test/tests/sliding_block/in_and_out/frictionless_kinematic.i)
- (modules/solid_mechanics/test/tests/lagrangian/materials/badproperties/stvenantkirchhoff.i)
- (modules/contact/test/tests/non-singular-frictional-mortar/frictional-mortar.i)
- (python/peacock/tests/common/transient.i)
- (modules/solid_mechanics/test/tests/umat/print_c/print_c.i)
- (test/tests/indicators/analytical_indicator/analytical_indicator_test.i)
- (modules/navier_stokes/test/tests/finite_volume/materials/flow_diode/transient_operation.i)
- (modules/richards/test/tests/mass/m_fu_01.i)
- (test/tests/variables/fe_hier/hier-1-1d.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_external_app_1phase/phy.q_wall_transfer_3eqn.parent.i)
- (modules/optimization/test/tests/functions/parameter_mesh/create_mesh_dg.i)
- (modules/solid_mechanics/test/tests/umat/steps/elastic_temperature_steps_uo.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_stabilized.i)
- (modules/porous_flow/test/tests/dirackernels/pls03_action.i)
- (test/tests/variables/side_hierarchic/side_hierarchic.i)
- (modules/contact/test/tests/3d-mortar-contact/half_sphere_nodal_geometry.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/straight_channel_porosity_step/rotated-2d-bkt-function-porosity-mixed.i)
- (modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/mms/lid-driven/hybrid-cg-dg-mms.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/unstabilized-velocity-component-objects.i)
- (test/tests/time_steppers/time_stepper_system/AB2PredictorCorrector.i)
- (test/tests/functormaterials/parsed_functor_material/parsed_functor_material.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized.i)
- (test/tests/auxkernels/array_parsed_aux/array_parsed_aux.i)
- (modules/solid_mechanics/test/tests/elastic_patch/elastic_patch_quadratic.i)
- (modules/richards/test/tests/theis/th_lumped_22.i)
- (modules/xfem/test/tests/moving_interface/moving_diffusion.i)
- (test/tests/reporters/accumulated_reporter/accumulate_reporter.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/mms/1d-rc.i)
- (modules/heat_transfer/test/tests/code_verification/cylindrical_test_no5.i)
- (modules/combined/test/tests/elastic_thermal_patch/elastic_thermal_patch_rz_smp.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/cross_material/correctness/plastic_j2.i)
- (modules/porous_flow/test/tests/sinks/s06.i)
- (modules/electromagnetics/test/tests/benchmarks/waveguide2D/waveguide2D_test.i)
- (modules/solid_mechanics/test/tests/action/action_multi_eigenstrain.i)
- (test/tests/time_integrators/crank-nicolson/cranic.i)
- (test/tests/time_integrators/explicit-euler/ee-1d-quadratic-neumann.i)
- (test/tests/kernels/body_force/forcing_function_error_check.i)
- (modules/richards/test/tests/newton_cooling/nc02.i)
- (test/tests/restart/restart_subapp_not_parent/two_step_solve_parent.i)
- (test/tests/linearfvkernels/block-restriction/block-restricted-diffusion-react.i)
- (test/tests/time_integrators/explicit-euler/ee-1d-linear.i)
- (modules/solid_mechanics/test/tests/capped_mohr_coulomb/random3.i)
- (modules/solid_mechanics/test/tests/2D_different_planes/gps_yz.i)
- (test/tests/interfaces/coupleable/states.i)
- (modules/combined/test/tests/beam_eigenstrain_transfer/subapp1_uo_transfer.i)
- (modules/solid_mechanics/test/tests/umat/steps/elastic_temperature_steps_uo_intervals.i)
- (modules/combined/examples/publications/rapid_dev/fig3.i)
- (test/tests/auxkernels/copy_value_aux/copy_aux.i)
- (test/tests/bcs/vectorpostprocessor/vectorpostprocessor.i)
- (modules/solid_mechanics/test/tests/lagrangian/materials/convergence/stvenantkirchhoff.i)
- (test/tests/variables/fe_hier/hier-3-3d.i)
- (modules/navier_stokes/test/tests/auxkernels/peclet-number-functor-aux/fe-thermal.i)
- (test/tests/userobjects/element_subdomain_modifier/initial_condition.i)
- (modules/thermal_hydraulics/test/tests/controls/terminate/terminate.i)
- (modules/combined/test/tests/additive_manufacturing/check_stateful_properties.i)
- (modules/combined/examples/publications/rapid_dev/fig7b.i)
- (modules/combined/examples/phase_field-mechanics/interface_stress.i)
- (modules/richards/test/tests/gravity_head_2/gh_lumped_18.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/convergence-auto/2D/neumann.i)
- (test/tests/auxkernels/array_aux_kernels/function_array_aux.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/SinteringIdeal.i)
- (modules/solid_mechanics/test/tests/interface_stress/multi.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/user_object_based/user_object.i)
- (modules/porous_flow/test/tests/dirackernels/bh03.i)
- (modules/navier_stokes/test/tests/finite_element/ins/mms/supg/supg_adv_dominated_mms.i)
- (test/tests/fvkernels/mms/cylindrical/diffusion.i)
- (test/tests/time_integrators/actually_explicit_euler_verification/ee-2d-linear-adapt.i)
- (test/tests/auxkernels/aux_scalar_deps/aux_scalar_deps.i)
- (modules/porous_flow/test/tests/dispersion/disp01.i)
- (test/tests/transfers/multiapp_conservative_transfer/parent_power_density.i)
- (modules/heat_transfer/test/tests/transient_heat/transient_heat_derivatives.i)
- (modules/fluid_properties/test/tests/materials/fluid_properties_material/test_ve.i)
- (test/tests/time_steppers/timesequence_stepper/timesequence_failed_solve.i)
- (test/tests/bcs/nodal_normals/cylinder_hexes_1st_2nd.i)
- (test/tests/problems/reference_residual_problem/abs_ref.i)
- (test/tests/multiapps/restart_multilevel/parent.i)
- (test/tests/bcs/second_deriv/test_lap_bc.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/special/area.i)
- (test/tests/misc/check_error/bad_parsed_function_vars.i)
- (modules/solid_mechanics/test/tests/umat/predef/predef_multiple.i)
- (test/tests/postprocessors/element_integral_var_pps/pps_old_value.i)
- (modules/combined/test/tests/reference_residual/group_variables.i)
- (modules/navier_stokes/test/tests/finite_volume/materials/ergun/ergun.i)
- (test/tests/fvkernels/mms/diffusion.i)
- (test/tests/outputs/debug/show_execution_kernels_bcs.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except11.i)
- (test/tests/userobjects/element_subdomain_modifier/adaptivity_moving_boundary_3d.i)
- (test/tests/functions/generic_function_material/generic_function_vector_material_test.i)
- (test/tests/userobjects/toggle_mesh_adaptivity/toggle_mesh_adaptivity_gaussian_ic_stop_time.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mixing_length_total_viscosity_material/steady.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/phy.T_wall_transfer_3eqn_x.i)
- (modules/combined/examples/phase_field-mechanics/kks_mechanics_KHS.i)
- (test/tests/transfers/general_field/user_object/duplicated_user_object_tests/two_pipe_sub.i)
- (test/tests/transfers/multiapp_conservative_transfer/parent_nearest_point.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/crysp_save_euler.i)
- (test/tests/problems/reference_residual_problem/no_ref.i)
- (modules/contact/test/tests/sliding_block/sliding/frictional_02_aug.i)
- (test/tests/outputs/displaced/displaced_adapt_test.i)
- (modules/solid_mechanics/test/tests/umat/print/print.i)
- (modules/solid_mechanics/test/tests/tensile/random_planar.i)
- (test/tests/postprocessors/pps_interval/pps_out_interval.i)
- (modules/contact/test/tests/frictional/sliding_elastic_blocks_2d/sliding_elastic_blocks_2d_tp.i)
- (test/tests/kernels/vector_fe/vector_kernel.i)
- (test/tests/restart/restart_add_variable/add_variable_restart.i)
- (test/tests/variables/fe_monomial_const/monomial-const-3d.i)
- (test/tests/postprocessors/nodal_extreme_value/nodal_max_value_test.i)
- (modules/solid_mechanics/test/tests/combined_creep_plasticity/combined_stress_prescribed.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/RZ_cone_no_parts.i)
- (test/tests/bcs/functor_neumann_bc/functor_neumann_bc.i)
- (modules/stochastic_tools/test/tests/auxkernels/surrogate_aux/surrogate_aux.i)
- (modules/porous_flow/test/tests/gravity/grav02a.i)
- (modules/heat_transfer/test/tests/code_verification/spherical_test_no5.i)
- (test/tests/postprocessors/element_vec_l2_error_pps/element_vec_l2_error.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/2d-rc-epsjump.i)
- (modules/porous_flow/test/tests/capillary_pressure/brooks_corey2.i)
- (test/tests/indicators/gradient_jump_indicator/gradient_jump_indicator_test.i)
- (test/tests/kernels/ad_scalar_kernel_constraint/diffusion_bipass_scalar.i)
- (modules/porous_flow/test/tests/relperm/corey1.i)
- (test/tests/bcs/ad_function_neumann_bc/test.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mms/channel-flow/2d-average.i)
- (modules/combined/test/tests/beam_eigenstrain_transfer/subapp_err_2.i)
- (modules/navier_stokes/test/tests/finite_element/ins/energy_source/steady-action.i)
- (test/tests/mortar/continuity-2d-non-conforming/dual-soln-continuity.i)
- (test/tests/bcs/coupled_var_neumann/on_off.i)
- (modules/solid_mechanics/test/tests/radial_disp_aux/sphere_1d_spherical.i)
- (modules/xfem/test/tests/solid_mechanics_basic/edge_crack_3d_propagation.i)
- (test/tests/fvkernels/mms/advective-outflow/advection-diffusion.i)
- (modules/solid_mechanics/test/tests/smeared_cracking/cracking_function.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/mms/porosity_change/2d-rc-continuous.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/thermal_expansion/free.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/boussinesq/boussinesq.i)
- (modules/xfem/test/tests/moving_interface/verification/2D_xy_homog1mat.i)
- (test/tests/bcs/periodic/parallel_pbc_using_trans.i)
- (modules/solid_mechanics/test/tests/mohr_coulomb/many_deforms_cap.i)
- (modules/porous_flow/test/tests/dirackernels/pls02.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/action/noaction_2d.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mms/channel-flow/2d-rc.i)
- (test/tests/auxkernels/time_derivative_aux/test.i)
- (test/tests/restart/restart_transient_from_steady/restart_trans_with_sub.i)
- (modules/solid_mechanics/test/tests/domain_integral_thermal/j_integral_2d.i)
- (test/tests/multiapps/restart/sub.i)
- (modules/solid_mechanics/test/tests/recompute_radial_return/affine_plasticity.i)
- (test/tests/multiapps/restart/parent.i)
- (modules/richards/test/tests/gravity_head_2/gh01.i)
- (test/tests/postprocessors/mms_sine/3_d_mms_sine_postprocessor_test.i)
- (test/tests/controls/bool_function_control/bool_function_control.i)
- (modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/mms/lid-driven-skewed/hybrid-skewed-vortex.i)
- (test/tests/kernels/2d_diffusion/2d_diffusion_bodyforce_test.i)
- (modules/thermal_hydraulics/test/tests/utils/smooth_transition/ad_smooth_transition.i)
- (test/tests/userobjects/element_subdomain_modifier/amr_bc.i)
- (test/tests/mortar/continuity-3d-non-conforming/continuity_penalty_sphere_hex.i)
- (modules/fluid_properties/test/tests/temperature_pressure_function/exact.i)
- (modules/heat_transfer/test/tests/code_verification/spherical_test_no1.i)
- (modules/xfem/test/tests/moving_interface/moving_bimaterial_finite_strain_cut_mesh.i)
- (modules/heat_transfer/test/tests/heat_conduction/3d_quadrature_gap_heat_transfer/moving.i)
- (modules/solid_mechanics/test/tests/thermal_expansion_function/small_const.i)
- (test/tests/postprocessors/element_time_derivative/element_time_derivative_test.i)
- (modules/richards/test/tests/buckley_leverett/bl22_lumped_fu.i)
- (modules/xfem/test/tests/nucleation_uo/nucleate_edge_crack_2d.i)
- (test/tests/transfers/multiapp_copy_transfer/linear_sys_to_aux/linear_sub.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_no_parts.i)
- (test/tests/adaptivity/max_h_level/max_h_level.i)
- (modules/richards/test/tests/dirac/bh08.i)
- (test/tests/userobjects/coupling_to_kernel/user_object_test.i)
- (test/tests/postprocessors/pps_interval/pps_bad_interval3.i)
- (test/tests/time_integrators/bdf2/bdf2.i)
- (test/tests/auxkernels/diffusion_flux/normal_diffusion_flux.i)
- (modules/richards/test/tests/sinks/s_fu_01.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/user_object_based/patch_recovery.i)
- (modules/solid_mechanics/test/tests/thermal_expansion/ad_constant_expansion_coeff_old.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/phy.conservation.i)
- (test/tests/auxkernels/linear_combination/test.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/boussinesq/wcnsfv.i)
- (modules/thermal_hydraulics/test/tests/misc/coupling_mD_flow/parent_non_overlapping.i)
- (test/tests/variables/fe_hier/hier-3-2d.i)
- (test/tests/bcs/nodal_normals/circle_quads.i)
- (modules/richards/test/tests/theis/th02.i)
- (test/tests/meshdivisions/functor_values_division.i)
- (test/tests/outputs/residual/output_residual_elem.i)
- (test/tests/linearfvkernels/diffusion-reaction-advection/advection-diffusion-reaction-2d.i)
- (test/tests/variables/fe_hermite/hermite-3-1d.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts_steady_stabilized_second_order.i)
- (modules/level_set/test/tests/verification/1d_level_set_mms/level_set_mms.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_structure_3d/test.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/boussinesq/boussinesq-action.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/cross_material/convergence/plastic_j2.i)
- (test/tests/functions/parsed/combined.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar_displaced_conduction_function.i)
- (test/tests/controls/error/multiple_parameters_found.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/convergence/1D/dirichlet.i)
- (modules/contact/test/tests/sliding_block/in_and_out/frictionless_penalty_contact_line_search.i)
- (modules/solid_mechanics/test/tests/weak_plane_shear/large_deform4.i)
- (modules/richards/test/tests/dirac/bh03.i)
- (test/tests/time_steppers/iteration_adaptive/multi_piecewise_linear.i)
- (test/tests/transfers/multiapp_projection_transfer/high_order_sub.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_convection/plate.parent.i)
- (modules/peridynamics/test/tests/auxkernels/planestrain_thermomechanics_ranktwotensor_OSPD.i)
- (test/tests/nodalkernels/penalty_dirichlet/nodal_penalty_dirichlet.i)
- (modules/porous_flow/test/tests/relperm/corey4.i)
- (modules/porous_flow/test/tests/hysteresis/hys_order_04.i)
- (python/peacock/tests/common/lcf1.i)
- (modules/navier_stokes/examples/flow-over-circle/executioner_postprocessor.i)
- (modules/solid_mechanics/test/tests/2D_geometries/planestrain.i)
- (modules/solid_mechanics/test/tests/capped_drucker_prager/random.i)
- (modules/electromagnetics/test/tests/bcs/reflectionBC_helmholtz/ReflectionTest.i)
- (test/tests/auxkernels/error_function_aux/error_function_aux.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/lid-driven/lid-driven-with-energy.i)
- (test/tests/coord_type/coord_type_rz_general.i)
- (test/tests/preconditioners/vcp/no_condense_test.i)
- (test/tests/time_steppers/timesequence_stepper/csvtimesequence.i)
- (modules/solid_mechanics/test/tests/central_difference/lumped/3D/3d_lumped_explicit.i)
- (modules/heat_transfer/test/tests/heat_conduction/coupled_convective_heat_flux/coupled_convective_heat_flux_two_phase.i)
- (test/tests/time_integrators/rk-2/2d-quadratic.i)
- (modules/thermal_hydraulics/test/tests/components/heat_source_from_total_power/phy.plate.i)
- (test/tests/time_integrators/actually_explicit_euler_verification/ee-2d-quadratic.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/straight_channel_porosity_step/implicit-euler-basic-kt-primitive.i)
- (test/tests/postprocessors/geometry/2d_geometry.i)
- (test/tests/mortar/aux-gap/gap.i)
- (modules/porous_flow/examples/restart/gas_injection.i)
- (test/tests/meshgenerators/flip_sideset_generator/flux_flip_3D.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/mms/porosity_change/pressure-interpolation-corrected.i)
- (test/tests/ics/lagrange_ic/3d_second_order.i)
- (test/tests/bcs/ad_penalty_dirichlet_bc/function_penalty_dirichlet_bc_test.i)
- (modules/porous_flow/test/tests/gravity/fully_saturated_upwinded_nodens_grav01c_action.i)
- (test/tests/kernels/ad_scalar_kernel_constraint/diffusion_override_scalar.i)
- (test/tests/fvkernels/mms/advection-diffusion.i)
- (modules/stochastic_tools/test/tests/auxkernels/surrogate_aux/surrogate_array_aux.i)
- (modules/solid_mechanics/test/tests/finite_strain_elastic/finite_strain_elastic_new_test.i)
- (modules/porous_flow/test/tests/dirackernels/bh04.i)
- (examples/ex13_functions/ex13.i)
- (modules/solid_mechanics/test/tests/lagrangian/materials/kinematic_check/strain_check.i)
- (modules/solid_mechanics/test/tests/thermal_expansion/ad_constant_expansion_stress_free_temp.i)
- (test/tests/bcs/coupled_var_neumann/coupled_var_neumann.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/phy.T_wall_transfer_3eqn_y.i)
- (test/tests/transfers/multiapp_nearest_node_transfer/fromsub_fixed_meshes_sub.i)
- (test/tests/multiapps/restart_subapp_ic/sub.i)
- (test/tests/fvkernels/mms/skewness-correction/two_term_extrapol/advection-outflow.i)
- (test/tests/materials/boundary_material/bnd_coupling_vol.i)
- (test/tests/auxkernels/material_rate_real/material_rate_real.i)
- (modules/contact/test/tests/frictional/sliding_elastic_blocks_2d/sliding_elastic_blocks_2d.i)
- (modules/solid_mechanics/examples/coal_mining/cosserat_mc_wp_sticky_longitudinal.i)
- (test/tests/time_integrators/aee/aee.i)
- (modules/level_set/test/tests/kernels/advection/advection_mms.i)
- (modules/solid_mechanics/test/tests/eigenstrain/reducedOrderRZLinearConstant.i)
- (test/tests/restart/restart_subapp_not_parent/two_step_solve_sub.i)
- (modules/richards/test/tests/user_objects/uo2.i)
- (test/tests/dirackernels/reporter_point_source/2d_vpp_transient.i)
- (test/tests/postprocessors/num_adaptivity_cycles/num_adaptivity_cycles_toggle_adaptivity.i)
- (modules/xfem/test/tests/bimaterials/inclusion_bimaterials_2d.i)
- (modules/solid_mechanics/test/tests/thermal_expansion_function/finite_linear.i)
- (modules/solid_mechanics/test/tests/ad_smeared_cracking/cracking_xyz.i)
- (test/tests/time_steppers/timesequence_stepper/exodustimesequence.i)
- (modules/solid_mechanics/test/tests/preconditioner_reuse/convergence.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/convergence/3D/dirichlet.i)
- (test/tests/vectorpostprocessors/mesh_division_functor_reduction/reduction.i)
- (modules/solid_mechanics/test/tests/2D_different_planes/planestrain_xy.i)
- (modules/solid_mechanics/test/tests/umat/multiple_blocks/rve_multimaterial.i)
- (test/tests/bcs/sin_bc/sin_dirichlet_test.i)
- (test/tests/dgkernels/advection_diffusion_mixed_bcs_test_resid_jac/dg_advection_diffusion_test.i)
- (modules/combined/test/tests/additive_manufacturing/check_element_addition.i)
- (modules/navier_stokes/test/tests/finite_volume/fvbcs/FVHeatFluxBC/wall_heat_transfer.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/free-flow-hllc.i)
- (modules/heat_transfer/test/tests/heat_conduction/coupled_convective_heat_flux/coupled_convective_heat_flux.i)
- (test/tests/markers/error_fraction_marker/error_fraction_marker_fv.i)
- (modules/contact/test/tests/explicit_dynamics/first_test.i)
- (test/tests/variables/fe_hermite/hermite-3-3d.i)
- (modules/porous_flow/examples/lava_lamp/2phase_convection.i)
- (test/tests/postprocessors/element_extreme_value/element_proxy_extreme_value.i)
- (modules/solid_mechanics/test/tests/radial_disp_aux/cylinder_2d_axisymmetric.i)
- (test/tests/materials/material/material_test_dg.i)
- (test/tests/postprocessors/interface_value/interface_fv_variable_value_postprocessor.i)
- (modules/richards/test/tests/gravity_head_2/gh_fu_17.i)
- (modules/solid_mechanics/test/tests/scalar_material_damage/ad_nonlocal_scalar_damage.i)
- (modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_ktemp_1D.i)
- (modules/solid_mechanics/test/tests/thermal_expansion_function/mean.i)
- (modules/solid_mechanics/test/tests/capped_mohr_coulomb/random4.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except04.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/bernoulli-1d-parsed-function.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/basic-conserved-pcnsfv-kt.i)
- (modules/phase_field/examples/kim-kim-suzuki/kks_example_ternary.i)
- (modules/richards/test/tests/gravity_head_2/gh_fu_02.i)
- (modules/heat_transfer/test/tests/code_verification/spherical_test_no4.i)
- (test/tests/vectorpostprocessors/element_value_sampler/element_value_sampler.i)
- (modules/fluid_properties/test/tests/sodium/exact.i)
- (test/tests/mortar/gap-conductance-2d-non-conforming/gap-conductance.i)
- (test/tests/userobjects/nearest_point_layered_side_average_functor/nearest_point_layered_side_average_functor.i)
- (test/tests/bcs/sin_bc/sin_neumann_test.i)
- (modules/solid_mechanics/test/tests/thermal_expansion/constant_expansion_coeff.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure/steady_state.i)
- (examples/ex18_scalar_kernel/ex18_parsed.i)
- (modules/solid_mechanics/test/tests/radial_disp_aux/cylinder_3d_cartesian.i)
- (test/tests/functions/periodic_function/periodic_function.i)
- (modules/richards/test/tests/gravity_head_2/gh05.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_no_parts_steady_stabilized.i)
- (test/tests/restart/restart_transient_from_transient/restart_trans_with_2subs.i)
- (modules/porous_flow/test/tests/gravity/fully_saturated_upwinded_grav01c.i)
- (modules/solid_mechanics/test/tests/thermal_expansion_function/finite_const.i)
- (modules/phase_field/test/tests/MultiPhase/asymmetriccrosstermbarrierfunction.i)
- (modules/solid_mechanics/test/tests/lagrangian/materials/correctness/cauchy-elastic.i)
- (modules/porous_flow/test/tests/gravity/grav01a.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/orthotropic_rotation_Cijkl.i)
- (modules/solid_mechanics/test/tests/ad_thermal_expansion_function/finite_const.i)
- (test/tests/executioners/executioner/transient.i)
- (test/tests/markers/error_fraction_marker/error_fraction_marker_no_clear_test.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_no_parts_steady_nobcbc.i)
- (modules/solid_mechanics/test/tests/lagrangian/materials/correctness/neohookean.i)
- (modules/solid_mechanics/test/tests/domain_integral_thermal/interaction_integral_2d_thermal_generic.i)
- (test/tests/multiapps/restart_multilevel/subsub.i)
- (test/tests/userobjects/element_subdomain_modifier/adaptivity_moving_boundary.i)
- (modules/thermal_hydraulics/test/tests/components/gate_valve_1phase/gate_valve_1phase.i)
- (modules/solid_mechanics/test/tests/mohr_coulomb/random.i)
- (test/tests/functions/piecewise_multilinear/oneDb.i)
- (modules/peridynamics/test/tests/generalized_plane_strain/planestrain_prescribed_OSPD.i)
- (modules/solid_mechanics/test/tests/central_difference/consistent/3D/3d_consistent_explicit_mass_scaling.i)
- (test/tests/postprocessors/vector_postprocessor_comparison/vector_postprocessor_comparison.i)
- (modules/richards/test/tests/gravity_head_2/gh06.i)
- (test/tests/auxkernels/pp_depend/pp_depend_indirect_correct.i)
- (modules/richards/test/tests/dirac/bh_lumped_07.i)
- (modules/porous_flow/test/tests/energy_conservation/heat04.i)
- (modules/porous_flow/examples/co2_intercomparison/1Dradial/properties.i)
- (test/tests/auxkernels/pp_depend/pp_depend.i)
- (modules/porous_flow/test/tests/dirackernels/pls03.i)
- (modules/solid_mechanics/test/tests/domain_integral_thermal/interaction_integral_2d.i)
- (test/tests/kernels/mass_lumping/mass_lumping.i)
- (modules/xfem/test/tests/moving_interface/verification/1D_rz_homog1mat.i)
- (test/tests/variables/previous_newton_iteration/test.i)
- (modules/contact/test/tests/mechanical_constraint/frictionless_kinematic_gap_offsets.i)
- (modules/contact/test/tests/verification/patch_tests/automatic_patch_update/sliding_update.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/convergence/3D/neumann.i)
- (test/tests/time_integrators/actually_explicit_euler_verification/ee-1d-quadratic.i)
- (modules/solid_mechanics/examples/coal_mining/fine.i)
- (test/tests/indicators/analytical_indicator/analytical_indicator_fv.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except16.i)
- (modules/thermal_hydraulics/test/tests/postprocessors/heat_structure_energy/heat_structure_energy_cylinder.i)
- (modules/xfem/test/tests/single_var_constraint_2d/stationary_fluxjump_func.i)
- (test/tests/bcs/misc_bcs/weak_gradient_bc_test.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/convergence/1D/neumann.i)
- (test/tests/transfers/multiapp_vector_pp_transfer/parent.i)
- (modules/xfem/test/tests/checkpoint/checkpoint.i)
- (modules/stochastic_tools/test/tests/controls/libtorch_drl_control/libtorch_drl_control.i)
- (modules/solid_mechanics/test/tests/action/action_eigenstrain.i)
- (test/tests/bcs/function_neumann_bc/test.i)
- (test/tests/variables/fe_hier/hier-3-1d.i)
- (test/tests/bcs/periodic/wedge_sys.i)
- (modules/optimization/test/tests/functions/parameter_mesh/create_mesh.i)
- (test/tests/fvkernels/mms/advective-outflow/advection-outflow.i)
- (python/peacock/tests/input_tab/InputTree/gold/transient.i)
- (modules/contact/test/tests/mortar_aux_kernels/pressure-aux-friction.i)
- (modules/porous_flow/test/tests/heterogeneous_materials/constant_poroperm2.i)
- (modules/solid_mechanics/test/tests/umat/elastic_shear/elastic_shear.i)
- (test/tests/time_integrators/abort/abort.i)
- (test/tests/misc/check_error/uo_pps_name_collision_test.i)
- (modules/solid_mechanics/examples/coal_mining/cosserat_elastic.i)
- (modules/richards/test/tests/sinks/s03.i)
- (modules/richards/test/tests/gravity_head_2/gh18.i)
- (modules/xfem/test/tests/moving_interface/moving_level_set.i)
- (test/tests/fviks/one-var-diffusion/test.i)
- (modules/heat_transfer/test/tests/heat_conduction_patch/heat_conduction_patch_rz_quad8.i)
- (modules/stochastic_tools/test/tests/reporters/stochastic_matrix/sub.i)
- (modules/richards/test/tests/theis/th_lumped_01.i)
- (test/tests/postprocessors/element_integral/functors/element_integral_test.i)
- (modules/thermal_hydraulics/test/tests/postprocessors/side_flux_integral_rz/side_flux_integral_rz.i)
- (modules/heat_transfer/test/tests/code_verification/cylindrical_test_no2.i)
- (modules/richards/test/tests/gravity_head_2/gh_fu_06.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/orderedSimp3MatTest.i)
- (test/tests/controls/dependency/test.i)
- (modules/geochemistry/test/tests/kinetics/bio_arsenate1.i)
- (modules/solid_mechanics/test/tests/umat/steps/elastic_temperature_steps.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/1d-rc-epsjump.i)
- (test/tests/transfers/multiapp_conservative_transfer/sub_power_density.i)
- (modules/heat_transfer/test/tests/code_verification/spherical_test_no2.i)
- (modules/solid_mechanics/test/tests/plane_stress/ad_weak_plane_stress_incremental.i)
- (modules/solid_mechanics/test/tests/critical_time_step/crit_time_solid_variable.i)
- (modules/optimization/examples/simpleTransient/forward_and_adjoint.i)
- (modules/solid_mechanics/test/tests/ad_thermal_expansion_function/mean.i)
- (modules/navier_stokes/test/tests/finite_volume/controls/switch-pressure-bc/test.i)
- (modules/phase_field/test/tests/misc/coupled_value_function_ic.i)
- (modules/porous_flow/examples/tidal/earth_tide_fullsat.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mms/rc.i)
- (modules/heat_transfer/test/tests/heat_source_bar/heat_source_bar.i)
- (modules/navier_stokes/test/tests/finite_volume/fviks/convection/convection_cavity.i)
- (test/tests/linearfvkernels/diffusion/diffusion-2d.i)
- (test/tests/kernels/vector_fe/coupled_vector_gradient.i)
- (modules/richards/test/tests/theis/th_lumped_02.i)
- (test/tests/userobjects/layered_side_integral_functor/layered_side_integral_functor.i)
- (test/tests/time_integrators/implicit-euler/ie.i)
- (modules/solid_mechanics/test/tests/action/composite_eigenstrain.i)
- (test/tests/tag/2d_diffusion_dg_tag.i)
- (python/peacock/tests/common/oversample.i)
- (modules/richards/test/tests/dirac/st01.i)
- (modules/richards/test/tests/buckley_leverett/bl20.i)
- (modules/xfem/test/tests/moving_interface/moving_bimaterial.i)
- (modules/solid_mechanics/test/tests/generalized_plane_strain/generalized_plane_strain_finite.i)
- (test/tests/variables/fe_hier/hier-2-1d.i)
- (modules/xfem/test/tests/moving_interface/moving_bimaterial_finite_strain_esm.i)
- (modules/contact/test/tests/mechanical_constraint/glued_kinematic.i)
- (modules/peridynamics/test/tests/generalized_plane_strain/generalized_plane_strain_squares_OSPD.i)
- (modules/richards/test/tests/gravity_head_2/gh02.i)
- (modules/richards/test/tests/gravity_head_2/gh_fu_18.i)
- (modules/heat_transfer/test/tests/heat_conduction_patch/heat_conduction_patch_rz.i)
- (modules/solid_mechanics/test/tests/umat/time_step/elastic_timestep.i)
- (modules/porous_flow/test/tests/hysteresis/hys_order_06.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/err.not_a_3d_hs.i)
- (modules/richards/test/tests/gravity_head_2/gh_fu_05.i)
- (modules/richards/test/tests/theis/th01.i)
- (modules/porous_flow/test/tests/dispersion/disp01_heavy.i)
- (modules/richards/test/tests/excav/ex01.i)
- (test/tests/controls/time_periods/aux_kernels/control.i)
- (modules/solid_mechanics/test/tests/recompute_radial_return/isotropic_plasticity_finite_strain.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure_3d/steady_state.i)
- (modules/heat_transfer/test/tests/code_verification/cartesian_test_no4.i)
- (test/tests/fvkernels/mms/skewness-correction/adv-diff-react/skewed.i)
- (test/tests/userobjects/nearest_point_average/nearest_point_average.i)
- (modules/porous_flow/examples/restart/gas_injection_new_mesh.i)
- (modules/level_set/test/tests/kernels/olsson_reinitialization/olsson_1d.i)
- (test/tests/ics/from_exodus_solution/elem_part2.i)
- (modules/porous_flow/test/tests/hysteresis/hys_order_03.i)
- (test/tests/userobjects/radial_average/test.i)
- (test/tests/postprocessors/pps_interval/pps_bad_interval2.i)
- (modules/fluid_properties/test/tests/brine/brine_tabulated.i)
- (test/tests/postprocessors/side_integral/side_integral_functor.i)
- (modules/porous_flow/test/tests/dirackernels/bh02.i)
- (test/tests/transfers/multiapp_conservative_transfer/sub_nearest_point.i)
- (modules/solid_mechanics/test/tests/recompute_radial_return/cp_affine_plasticity.i)
- (python/mms/test/mms_spatial.i)
- (test/tests/time_integrators/tvdrk2/1d-linear.i)
- (test/tests/executioners/nullspace/singular_contaminated.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mms/channel-flow/cylindrical/cartesian-version/2d-rc-symmetry.i)
- (modules/porous_flow/test/tests/gravity/grav02b_fv.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/scalar_kernel/2dsole.i)
- (modules/combined/test/tests/beam_eigenstrain_transfer/subapp2_uo_transfer.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_no_parts_steady_stabilized_second_order.i)
- (test/tests/misc/check_error/wrong_displacement_order.i)
- (test/tests/linearfvkernels/diffusion-reaction-advection/advection-diffusion-reaction-1d.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/convergence/3D/dirichlet.i)
- (test/tests/kernels/ad_mat_coupled_force/aux_test.i)
- (modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined_constM_action.i)
- (modules/xfem/test/tests/nucleation_uo/nucleate_AllEdgeCracks.i)
- (modules/richards/test/tests/dirac/bh_fu_02.i)
- (test/tests/misc/check_error/uo_vector_pps_name_collision_test.i)
- (test/tests/variables/fe_hermite/hermite-3-2d.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_by_parts_steady_stabilized_second_order.i)
- (modules/solid_mechanics/test/tests/ad_smeared_cracking/cracking_function.i)
- (modules/porous_flow/test/tests/sinks/s03.i)
- (modules/navier_stokes/test/tests/auxkernels/reynolds-number-functor-aux/fe.i)
- (test/tests/fvkernels/mms/grad-reconstruction/cartesian.i)
- (test/tests/controls/action_control/action_control_test.i)
- (test/tests/time_steppers/timesequence_stepper/timesequence_restart1.i)
- (test/tests/kernels/simple_transient_diffusion/ill_conditioned_simple_diffusion.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/cp_eigenstrains/volumetric_eigenstrain_parabolic.i)
- (test/tests/userobjects/element_subdomain_modifier/stateful_property.i)
- (test/tests/kernels/ad_mat_coupled_force/fe_test.i)
- (modules/stochastic_tools/examples/parameter_study/nonlin_diff_react/nonlin_diff_react_sub.i)
- (modules/solid_mechanics/test/tests/capped_mohr_coulomb/random2.i)
- (modules/stochastic_tools/test/tests/functions/drl_reward/drl_reward.i)
- (modules/solid_mechanics/test/tests/umat/predef/dpredef.i)
- (modules/richards/test/tests/dirac/bh07.i)
- (test/tests/transfers/multiapp_interpolation_transfer/tosub_parent.i)
- (test/tests/materials/generic_materials/ad_generic_function_rank_two_tensor.i)
- (modules/thermal_hydraulics/test/tests/components/heat_source_from_power_density/phy.cylinder_power_shape_aux_var.i)
- (test/tests/materials/output/output_steady.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except13.i)
- (modules/optimization/test/tests/userobjects/adjoint_solution/adjoint.i)
- (test/tests/vectorpostprocessors/spatial_userobject_vector_postprocessor/spatial_userobject.i)
- (test/tests/userobjects/element_subdomain_modifier/block_restricted.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mms/cylindrical/2d-rc.i)
- (test/tests/transfers/multiapp_userobject_transfer/tosub_displaced_sub.i)
- (examples/ex18_scalar_kernel/ex18.i)
- (test/tests/dgkernels/2d_diffusion_dg/2d_diffusion_dg_test.i)
- (modules/solid_mechanics/test/tests/2D_different_planes/planestrain_xz.i)
- (test/tests/materials/functor_properties/functor-vector-mat-props.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/lower_limit.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/large-tests/1d.i)
- (modules/phase_field/test/tests/grain_growth/temperature_gradient.i)
- (test/tests/ics/hermite_ic/hermite_ic.i)
- (modules/contact/test/tests/mortar_cartesian_lms/two_block_1st_order_constraint_lm_xy_friction.i)
- (test/tests/dirackernels/point_caching/point_caching_moving_mesh.i)
- (modules/heat_transfer/test/tests/heat_conduction_patch/heat_conduction_patch_hex20.i)
- (modules/porous_flow/test/tests/relperm/brooks_corey1.i)
- (modules/contact/test/tests/sliding_block/in_and_out/frictional_04_penalty.i)
- (test/tests/bcs/mat_neumann_bc/mat_neumann.i)
- (test/tests/outputs/debug/show_var_residual_norms.i)
- (modules/solid_mechanics/test/tests/umat/print/print_shear.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/basic-primitive-pcnsfv-kt.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/SinteringParabolic.i)
- (test/tests/transfers/multiapp_userobject_transfer/tosub_sub.i)
- (test/tests/controls/pid_control/pid_pp_control.i)
- (test/tests/utils/spline_interpolation/bicubic_spline_interpolation_y_normal.i)
- (modules/porous_flow/test/tests/gravity/fully_saturated_grav01b.i)
- (test/tests/mortar/convergence-studies/continuity-3d/continuity.i)
- (modules/xfem/test/tests/init_solution_propagation/init_solution_propagation.i)
- (modules/richards/test/tests/gravity_head_2/gh_lumped_17.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad-rz-displacements.i)
- (modules/richards/test/tests/buckley_leverett/bl22.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_action_stabilized_transient.i)
- (test/tests/multiapps/restart/parent2.i)
- (test/tests/auxkernels/solution_scalar_aux/build.i)
- (test/tests/outputs/debug/show_var_residual_norms_debug.i)
- (modules/solid_mechanics/test/tests/mean_cap_TC/random01.i)
- (modules/phase_field/examples/rigidbodymotion/grain_motion_GT.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/special/rotate.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/convergence-auto/3D/neumann.i)
- (test/tests/functions/piecewise_linear_from_vectorpostprocessor/vector_postprocessor_function.i)
- (test/tests/mortar/convergence-studies/gap-conductance/gap-conductance.i)
- (modules/solid_mechanics/test/tests/generalized_plane_strain/plane_strain.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/creep_ramp_sub_false.i)
- (modules/solid_mechanics/test/tests/radial_disp_aux/cylinder_2d_cartesian.i)
- (modules/xfem/test/tests/high_order_elements/diffusion_quad9_levelsetcut.i)
- (modules/solid_mechanics/test/tests/j_integral_vtest/fgm_5.i)
- (modules/ray_tracing/test/tests/raykernels/material_integral_ray_kernel/material_integral_ray_kernel.i)
- (modules/thermal_hydraulics/test/tests/problems/brayton_cycle/open_brayton_cycle.i)
- (modules/richards/test/tests/gravity_head_2/gh_lumped_08.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/cp_slip_rate_integ/crysp_linesearch.i)
- (test/tests/postprocessors/interface_diffusive_flux/interface_diffusive_flux_fv.i)
- (modules/porous_flow/examples/coal_mining/coarse_with_fluid.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/small-tests/2d.i)
- (modules/navier_stokes/test/tests/finite_element/ins/bcs/advection_bc/advection_bc.i)
- (modules/porous_flow/examples/multiapp_fracture_flow/3dFracture/fracture_only_aperture_changing.i)
- (modules/thermal_hydraulics/test/tests/components/heat_source_from_total_power/phy.cylinder_power_shape_fn.i)
- (modules/solid_mechanics/test/tests/finite_strain_elastic/finite_strain_elastic_eigen_sol.i)
- (modules/navier_stokes/test/tests/finite_element/ins/stagnation/stagnation.i)
- (test/tests/fvkernels/mms/cylindrical/advection-reaction.i)
- (modules/solid_mechanics/test/tests/plane_stress/weak_plane_stress_incremental.i)
- (test/tests/misc/check_error/scalar_dot_integrity_check.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/crysp_cutback.i)
- (modules/porous_flow/test/tests/gravity/grav02b.i)
- (test/tests/time_integrators/rk-2/1d-linear.i)
- (test/tests/kernels/ad_coupled_value/ad_aux_coupled_time_value.i)
- (modules/navier_stokes/test/tests/finite_volume/materials/mixture_material/mixture.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mms/channel-flow/1d-average.i)
- (test/tests/materials/generic_materials/generic_function_rank_two_tensor.i)
- (test/tests/adaptivity/initial_marker/initial_marker.i)
- (modules/solid_mechanics/test/tests/domain_integral_thermal/j_integral_2d_inst_ctefunc.i)
- (modules/phase_field/test/tests/MultiPhase/crosstermbarrierfunction.i)
- (modules/porous_flow/test/tests/capillary_pressure/brooks_corey1.i)
- (test/tests/outputs/exodus/exodus_discontinuous.i)
- (modules/porous_flow/test/tests/gravity/grav01d.i)
- (test/tests/transfers/multiapp_variable_value_sample_transfer/parent_quad.i)
- (test/tests/bcs/functor_dirichlet_bc/test.i)
- (test/tests/fvkernels/vector-interpolation/test.i)
- (modules/richards/test/tests/dirac/bh_fu_08.i)
- (modules/solid_mechanics/test/tests/mean_cap/random.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/convergence-auto/3D/dirichlet.i)
- (modules/solid_mechanics/test/tests/multi/rock1.i)
- (modules/richards/test/tests/sinks/s02.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/convergence-auto/2D/dirichlet.i)
- (test/tests/postprocessors/num_dofs/num_dofs.i)
- (modules/level_set/test/tests/verification/1d_level_set_supg_mms/1d_level_set_supg_mms.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_radiation/cylinder.i)
- (modules/porous_flow/test/tests/hysteresis/hys_order_05.i)
- (modules/solid_mechanics/test/tests/ad_thermal_expansion_function/finite_linear.i)
- (test/tests/auxkernels/functor_elemental_gradient/functor_gradient.i)
- (test/tests/misc/check_error/old_integrity_check.i)
- (modules/solid_mechanics/test/tests/j_integral_vtest/j_int_fgm_sif.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_mean_zero_pressure.i)
- (test/tests/postprocessors/constant/receiver.i)
- (test/tests/time_integrators/explicit-euler/ee-2d-quadratic.i)
- (modules/solid_mechanics/test/tests/recompute_radial_return/isotropic_plasticity_incremental_strain.i)
- (modules/richards/test/tests/gravity_head_2/gh_bounded_17.i)
- (test/tests/outputs/variables/show_hide.i)
- (test/tests/variables/fe_hermite_convergence/hermite_converge_dirichlet.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except07.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/special/rotate.i)
- (modules/combined/test/tests/surface_tension_KKS/surface_tension_KKS.i)
- (modules/richards/test/tests/jacobian_2/jn_fu_17.i)
- (test/tests/misc/initial_solution_copy/solutions_equal.i)
- (test/tests/transfers/multiapp_projection_transfer/high_order_parent.i)
- (modules/porous_flow/test/tests/gravity/fully_saturated_upwinded_grav01c_action.i)
- (test/tests/kernels/scalar_constraint/scalar_constraint_kernel.i)
- (test/tests/utils/mathutils/poly.i)
- (modules/solid_mechanics/test/tests/umat/multiple_blocks/multiple_blocks_two_materials.i)
- (test/tests/bcs/penalty_dirichlet_bc/penalty_dirichlet_bc_test.i)
- (test/tests/variables/mixed_order_variables/mixed_order_variables_test.i)
- (modules/solid_mechanics/test/tests/ad_thermal_expansion_function/small_linear.i)
- (modules/porous_flow/test/tests/hysteresis/hys_order_02.i)
- (test/tests/mortar/convergence-studies/solution-continuity/continuity.i)
- (tutorials/tutorial03_verification/app/test/tests/step04_mms/2d_main.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_base/phy.variable_init_t.i)
- (test/tests/ics/from_exodus_solution/elem_part1.i)
- (test/tests/fvkernels/mms/advective-outflow/advection.i)
- (modules/heat_transfer/test/tests/functormaterials/cylindrical_gap_heat_flux_functor_material/cylindrical_gap_heat_flux_functor_material.i)
- (test/tests/postprocessors/element_integral_var_pps/initial_pps.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mms/lid-mesh-velocity/1d-simplified.i)
- (modules/combined/test/tests/elastic_thermal_patch/elastic_thermal_patch_rz.i)
- (modules/solid_mechanics/test/tests/umat/predef/predef.i)
- (test/tests/postprocessors/variable_residual_norm/variable_residual.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/creep_ramp_sub_true.i)
- (modules/solid_mechanics/test/tests/domain_integral_thermal/j_integral_2d_mean_ctefunc.i)
- (test/tests/kernels/vector_fe/coupled_scalar_vector.i)
- (modules/thermal_hydraulics/test/tests/components/shaft_connected_compressor_1phase/shaft_motor_compressor.i)
- (modules/solid_mechanics/test/tests/mohr_coulomb/random_planar.i)
- (test/tests/mortar/convergence-studies/fv-gap-conductance/gap-conductance.i)
- (test/tests/actions/meta_action_multiple_tasks/circle_quads.i)
- (test/tests/markers/two_circle_marker/two_circle_marker_gaussian_ic.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/convergence/sd-stress.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_structure/test.i)
- (test/tests/vectorpostprocessors/cylindrical_average/cylindrical_average.i)
- (modules/xfem/test/tests/nucleation_uo/nucleate_2edge_cracks_2d.i)
- (modules/richards/test/tests/dirac/bh_fu_05.i)
- (modules/solid_mechanics/test/tests/plane_stress/weak_plane_stress_finite.i)
- (modules/richards/test/tests/sinks/s_fu_03.i)
- (modules/solid_mechanics/test/tests/radial_disp_aux/sphere_3d_cartesian.i)
- (test/tests/time_integrators/scalar/stiff.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/action/no_action_1D.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/user_object_based/user_object_Voce_BCC.i)
- (test/tests/vectorpostprocessors/element_variables_difference_max/element_variables_difference_max.i)
- (test/tests/bcs/periodic/orthogonal_pbc_on_square.i)
- (test/tests/materials/boundary_material/fv_material_quadrature.i)
- (modules/navier_stokes/test/tests/finite_element/ins/mms/pspg/pspg_mms_test.i)
- (modules/thermal_hydraulics/test/tests/jacobians/materials/ad_solid_material.i)
- (test/tests/controls/time_periods/aux_scalar_kernels/control.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/convergence-auto/1D/neumann.i)
- (test/tests/mortar/continuity-2d-conforming/conforming_two_var.i)
- (test/tests/kernels/ad_jacobians/adfunction.i)
- (test/tests/time_integrators/multi_stage_time_integrator/unconverged_1st_stage.i)
- (modules/solid_mechanics/test/tests/lagrangian/materials/correctness/stvenantkirchhoff.i)
- (test/tests/fvkernels/mms/broken-domain/diffusion.i)
- (modules/solid_mechanics/test/tests/elem_prop_read_user_object/prop_grain_read.i)
- (test/tests/userobjects/nearest_point_layered_average/nearest_radius_layered_average.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/user_object_based/substep.i)
- (test/tests/time_integrators/explicit-euler/ee-1d-quadratic.i)
- (test/tests/outputs/nemesis/nemesis_scalar.i)
- (modules/electromagnetics/test/tests/benchmarks/slab_reflection/slab_reflection.i)
- (test/tests/ics/vector_function_ic/vector_function_ic_comp.i)
- (modules/fluid_properties/test/tests/temperature_pressure_function/example.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/convergence-auto/1D/dirichlet.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/RZ_cone_high_reynolds.i)
- (test/tests/auxkernels/time_derivative/time_derivative_nl.i)
- (modules/richards/test/tests/buckley_leverett/bl01_lumped_fu.i)
- (tutorials/tutorial03_verification/app/test/tests/step03_analytical/1d_analytical.i)
- (modules/combined/examples/geochem-porous_flow/geotes_2D/porous_flow.i)
- (modules/porous_flow/test/tests/relperm/vangenuchten1.i)
- (test/tests/ics/from_exodus_solution/nodal_part1.i)
- (test/tests/executioners/eigen_executioners/ipm.i)
- (test/tests/predictors/simple/predictor_test_pre_smo.i)
- (modules/richards/test/tests/jacobian_2/jn17.i)
- (test/tests/restart/restart_transient_from_transient/pseudo_trans_with_2subs.i)
- (modules/richards/test/tests/buckley_leverett/bl20_lumped_fu.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/small-tests/3d.i)
- (test/tests/dgkernels/dg_displacement/dg_displacement.i)
- (modules/contact/examples/3d_berkovich/indenter_berkovich_friction.i)
- (test/tests/postprocessors/nodal_var_value/nodal_aux_var_value.i)
- (test/tests/functors/get_functor/get_functor.i)
- (test/tests/bcs/periodic/all_periodic_trans.i)
- (modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/lps_dual.i)
- (test/tests/preconditioners/reuse/convergence.i)
- (modules/solid_mechanics/test/tests/generalized_plane_strain/plane_strain_prescribed.i)
- (test/tests/outputs/oversample/over_sampling_second_file.i)
- (modules/fsi/test/tests/2d-finite-strain-steady/thermal-me.i)
- (modules/xfem/test/tests/moving_interface/moving_ad_diffusion.i)
- (test/tests/transfers/multiapp_projection_transfer/fromsub_sub.i)
- (modules/stochastic_tools/test/tests/transfers/libtorch_nn_transfer/libtorch_drl_control_sub.i)
- (test/tests/outputs/oversample/over_sampling_test_file.i)
- (test/tests/bcs/nodal_normals/circle_tris.i)
- (test/tests/time_integrators/scalar/scalar.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/convergence/1D/dirichlet.i)
- (test/tests/dirackernels/function_dirac_source/function_dirac_source.i)
- (test/tests/kernels/vector_fe/ad_lagrange_vec.i)
- (test/tests/bcs/mat_neumann_bc/ad_mat_neumann.i)
- (test/tests/postprocessors/element_l2_error_pps/element_l2_error_pp_test.i)
- (test/tests/fvkernels/mms/cylindrical/advection-diffusion-reaction.i)
- (test/tests/variables/time_derivatives_neighbor/test.i)
- (modules/thermal_hydraulics/test/tests/problems/brayton_cycle/closed_brayton_cycle.i)
- (test/tests/misc/multiple-nl-systems/test-fv.i)
- (modules/porous_flow/test/tests/hysteresis/hys_order_01.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts_steady_stabilized.i)
- (modules/solid_mechanics/test/tests/plane_stress/ad_weak_plane_stress_finite.i)
- (test/tests/linearfvkernels/advection/advection-1d.i)
- (test/tests/kernels/ad_2d_diffusion/2d_diffusion_bodyforce_test.i)
- (modules/solid_mechanics/test/tests/weak_plane_shear/large_deform_harden3.i)
- (test/tests/postprocessors/nodal_var_value/pps_output_test.i)
- (modules/solid_mechanics/test/tests/ad_thermal_expansion_function/small_const.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_no_parts_steady_stabilized.i)
- (test/tests/functions/linear_combination_function/lcf1.i)
- (test/tests/interfacekernels/adaptivity/adaptivity.i)
- (modules/phase_field/examples/rigidbodymotion/AC_CH_Multigrain.i)
- (modules/solid_mechanics/examples/hyper_elastic_test.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except12.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mms/channel-flow/rotated/rotated-pp-flow.i)
- (modules/navier_stokes/test/tests/finite_element/ins/block-restriction/two-mats-two-eqn-sets.i)
- (test/tests/postprocessors/postprocessor_dependency/element_side_pp.i)
- (test/tests/ics/from_exodus_solution/nodal_part2.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/convergence-auto/2D/dirichlet.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/varying-eps-hllc.i)
- (modules/phase_field/test/tests/conserved_noise/normal_masked.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/pwcnsfv.i)
- (modules/navier_stokes/test/tests/ics/test_function.i)
- (test/tests/outputs/displacement/displaced_eq_transient_test.i)
- (test/tests/postprocessors/change_over_time/change_over_time.i)
- (modules/contact/test/tests/mortar_cartesian_lms/two_block_1st_order_constraint_lm_xy_friction_pg.i)
- (modules/porous_flow/test/tests/relperm/corey2.i)
- (modules/solid_mechanics/test/tests/porosity/negative_porosity.i)
- (test/tests/problems/eigen_problem/eigensolvers/gipm.i)
- (test/tests/functions/piecewise_multilinear/twoD_const.i)
- (tutorials/darcy_thermo_mech/step04_velocity_aux/tests/auxkernels/velocity_aux/velocity_aux.i)
- (framework/contrib/hit/test/output.i)
- (modules/porous_flow/examples/tidal/atm_tides_open_hole.i)
- (test/tests/time_integrators/dirk/dirk-2d-heat-adap.i)
- (modules/navier_stokes/test/tests/finite_element/ins/rz-x-axial-coord/hand-coded-jac-pipe-flow-natural-bc.i)
- (modules/solid_mechanics/examples/wave_propagation/cantilever_sweep.i)
- (test/tests/times/functor_times.i)
- (modules/peridynamics/test/tests/generalized_plane_strain/generalized_plane_strain_OSPD.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_action_stabilized_steady.i)
- (modules/thermal_hydraulics/test/tests/components/pump_1phase/pump_pressure_check.i)
- (modules/heat_transfer/test/tests/function_ellipsoid_heat_source/function_heat_source.i)
- (test/tests/fvkernels/mms/non-orthogonal/extended-adr.i)
- (test/tests/auxkernels/flux_average/flux_average.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/convergence/1D/neumann.i)
- (test/tests/fvkernels/mms/grad-reconstruction/mat-cartesian.i)
- (modules/thermal_hydraulics/test/tests/components/shaft_connected_turbine_1phase/shaft_motor_turbine.i)
- (test/tests/transfers/multiapp_userobject_transfer/two_pipe_sub.i)
- (modules/contact/test/tests/sliding_block/in_and_out/frictional_02_penalty.i)
- (test/tests/functions/piecewise_multilinear/time.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/cp_slip_rate_integ/crysp_substep.i)
- (test/tests/auxkernels/lower_d_var/lower-d-aux-var.i)
- (test/tests/interfacekernels/ik_displaced/displaced.i)
- (test/tests/kernels/ode/parsedode_sys_impl_test.i)
- (modules/contact/test/tests/sliding_block/sliding/frictionless_aug.i)
- (modules/fsi/test/tests/2d-small-strain-transient/fsi_flat_channel.i)
- (modules/porous_flow/test/tests/sinks/s08.i)
- (modules/thermal_hydraulics/test/tests/components/shaft_connected_pump_1phase/pump_coastdown.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/phy.conservation_1phase.i)
- (test/tests/misc/deprecation/deprecate-old-for-new-param.i)
- (test/tests/postprocessors/variable_inner_product/variable_inner_product.i)
- (test/tests/auxkernels/time_integration/time_integration.i)
- (modules/porous_flow/examples/restart/gravityeq.i)
- (test/tests/variables/fe_hier/hier-1-3d.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/convergence-auto/1D/neumann.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_base/interior_axial_boundaries.i)
- (modules/richards/test/tests/gravity_head_2/gh_fu_01.i)
- (test/tests/userobjects/shape_element_user_object/shape_side_uo_physics_test.i)
- (test/tests/bcs/nodal_normals/cylinder_hexes.i)
- (modules/contact/test/tests/simple_contact/simple_contact_rspherical.i)
- (test/tests/postprocessors/nodal_extreme_value/nodal_extreme_pps_test.i)
- (modules/navier_stokes/test/tests/finite_element/ins/mms/supg/supg_mms_test.i)
- (test/tests/controls/time_periods/dgkernels/dgkernels.i)
- (test/tests/kernels/ad_scalar_kernel_constraint/scalar_constraint_together.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_action.i)
- (modules/solid_mechanics/test/tests/umat/steps/elastic_temperature_steps_uo_durations.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mms/channel-flow/cylindrical/2d-rc.i)
- (test/tests/postprocessors/num_adaptivity_cycles/num_adaptivity_cycles_toggle_adaptivity_wait.i)
- (modules/richards/test/tests/gravity_head_2/gh07.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/cross_material/convergence/plastic_j2.i)
- (modules/fsi/test/tests/fsi_acoustics/wave_height_bc/wave_height_bc.i)
- (test/tests/bcs/nodal_normals/cylinder_hexes_2nd.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/action/action_3d.i)
- (modules/heat_transfer/test/tests/code_verification/cylindrical_test_no3.i)
- (test/tests/meshdivisions/nearest_position_division.i)
- (modules/solid_mechanics/test/tests/thermal_expansion/ad_constant_expansion_coeff.i)
- (modules/solid_mechanics/test/tests/action/reduced_eigenstrain_action.i)
- (modules/xfem/test/tests/solid_mechanics_basic/edge_crack_2d_propagation.i)
- (modules/solid_mechanics/examples/coal_mining/cosserat_mc_wp_sticky.i)
- (test/tests/kernels/scalar_kernel_constraint/scalar_constraint_kernel.i)
- (modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined_fully_saturated.i)
- (test/tests/executioners/time_period/time_period_test.i)
- (test/tests/functions/parsed/function.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_structure_3d/steady_state.i)
- (test/tests/time_integrators/actually_explicit_euler_verification/ee-1d-quadratic-neumann.i)
- (test/tests/transfers/multiapp_high_order_variable_transfer/parent_L2_Lagrange.i)
- (modules/fluid_properties/test/tests/co2/co2.i)
- (modules/solid_mechanics/test/tests/umat/temperature/elastic_dtemperature.i)
- (test/tests/time_integrators/convergence/explicit_convergence.i)
- (test/tests/fvkernels/fv_adapt/transient-adapt.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/cross_material/correctness/plastic_j2.i)
- (modules/solid_mechanics/test/tests/umat/multiple_blocks/multiple_blocks.i)
- (python/mms/test/mms_temporal.i)
- (test/tests/materials/stateful_internal_side_uo/internal_side_uo_stateful.i)
- (modules/solid_mechanics/test/tests/umat/elastic_hardening/elastic.i)
- (modules/porous_flow/test/tests/capillary_pressure/vangenuchten3.i)
- (test/tests/linearfvkernels/block-restriction/block-restricted-adr.i)
- (modules/porous_flow/test/tests/sinks/s01.i)
- (test/tests/ics/function_scalar_ic/function_scalar_ic.i)
- (modules/richards/test/tests/user_objects/uo4.i)
- (test/tests/time_integrators/explicit-euler/ee-2d-linear-adapt.i)
- (modules/solid_mechanics/test/tests/capped_mohr_coulomb/random1.i)
- (test/tests/multiapps/restart_subapp_ic/parent2.i)
- (test/tests/postprocessors/function_element_average/function_element_average.i)
- (modules/solid_mechanics/test/tests/umat/predef/predef_multiple_mat.i)
- (test/tests/fvkernels/mms/non-orthogonal/advection-diffusion-reaction.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/crysp_linesearch.i)
- (test/tests/postprocessors/num_vars/num_vars.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mms/channel-flow/cylindrical/cartesian-version/2d-rc-rz-symmetry.i)
- (modules/combined/examples/geochem-porous_flow/geotes_weber_tensleep/porous_flow.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_no_parts_steady.i)
- (test/tests/predictors/simple/predictor_skip_test.i)
- (test/tests/userobjects/element_subdomain_modifier/no_moving_boundary.i)
- (modules/combined/test/tests/elastic_thermal_patch/elastic_thermal_jacobian_rz_smp.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/convergence/ld-stress.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/convergence-auto/3D/neumann.i)
- (modules/electromagnetics/test/tests/kernels/scalar_complex_helmholtz/scalar_complex_helmholtz.i)
- (test/tests/postprocessors/side_pps/side_pps_multi_bnd_test.i)
- (test/tests/time_steppers/timesequence_stepper/timesequence_restart_failure.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mms/channel-flow/cylindrical/2d-average.i)
- (modules/navier_stokes/test/tests/finite_element/ins/energy_source/steady.i)
- (test/tests/mortar/continuity-2d-non-conforming/dual-soln-continuity-vcp.i)
- (test/tests/time_steppers/timesequence_stepper/timesequence.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/crysp_fileread.i)
- (modules/fluid_properties/test/tests/materials/fluid_properties_material/test_pt.i)
- (test/tests/postprocessors/avg_nodal_var_value/avg_nodal_var_value.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mms/channel-flow/cylindrical/cartesian-version/2d-rc-no-slip-walls.i)
- (modules/navier_stokes/test/tests/finite_element/ins/rz-x-axial-coord/pipe-flow.i)
- (modules/richards/test/tests/dirac/bh09.i)
- (modules/navier_stokes/test/tests/finite_element/ins/velocity_channel/ad-traction-supg.i)
- (modules/navier_stokes/test/tests/finite_element/ins/energy_source/steady-var.i)
- (test/tests/userobjects/nearest_point_layered_average/radius_points_from_uo.i)
- (modules/solid_mechanics/test/tests/central_difference/lumped/3D/3d_nodalmass_explicit.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/verification.i)
- (test/tests/predictors/simple/predictor_test.i)
- (modules/richards/test/tests/buckley_leverett/bl01_lumped.i)
- (modules/solid_mechanics/test/tests/umat/multiple_blocks/multiple_blocks_two_materials_parallel.i)
- (modules/misc/test/tests/coupled_directional_mesh_height_interpolation/coupled_directional_mesh_height_interpolation.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/convergence/2D/dirichlet.i)
- (test/tests/functions/parsed/mms_transient_coupled.i)
- (test/tests/kernels/ode/coupled_ode_td_auxvar_ic_from_mesh.i)
- (test/tests/restart/restart_transient_from_steady/steady_with_sub.i)
- (test/tests/markers/error_tolerance_marker/error_tolerance_marker_adapt_test.i)
- (test/tests/kernels/scalar_kernel_constraint/diffusion_override_scalar.i)
- (test/tests/postprocessors/geometry/3d_geometry.i)
- (modules/solid_mechanics/test/tests/auxkernels/ranktwoscalaraux.i)
- (modules/electromagnetics/test/tests/benchmarks/evanescent_wave/evanescent_wave.i)
- (modules/richards/test/tests/dirac/bh_fu_04.i)
- (test/tests/materials/output/output_block_displaced.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_by_parts_steady_nobcbc.i)
- (test/tests/outputs/xml/xml_iterations.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/convergence/ld-strain.i)
- (modules/solid_mechanics/test/tests/porosity/reg.i)
- (test/tests/time_integrators/dirk/dirk-2d-heat.i)
- (modules/richards/test/tests/buckley_leverett/bl01_adapt.i)
- (modules/combined/examples/phase_field-mechanics/kks_mechanics_VTS.i)
- (test/tests/markers/error_tolerance_marker/error_tolerance_marker_test.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_by_parts_steady.i)
- (modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined_basicthm.i)
- (test/tests/bcs/bc_preset_nodal/bc_function_preset.i)
- (modules/navier_stokes/test/tests/finite_element/ins/rz-x-axial-coord/pipe-flow-natural-bc.i)
- (test/tests/materials/coupled_value_function/order.i)
- (modules/richards/test/tests/gravity_head_2/gh_lumped_07.i)
- (modules/phase_field/examples/multiphase/GrandPotential3Phase_AD.i)
- (modules/thermal_hydraulics/test/tests/misc/restart_1phase/test.i)
- (test/tests/vectorpostprocessors/dynamic_point_sampler/dynamic_point_sampler.i)
- (test/tests/vectorpostprocessors/positions_functor_value_sampler/positions_functor_sampler.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/convergence-auto/3D/dirichlet.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mixing_length_total_viscosity_material/steady-action.i)
- (test/tests/misc/check_error/scalar_old_integrity_check.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_structure/steady_state.i)
- (modules/xfem/test/tests/single_var_constraint_2d/stationary_jump_func.i)
- (test/tests/transfers/multiapp_variable_value_sample_transfer/parent_array_centroid.i)
- (test/tests/time_integrators/implicit-euler/ie_adapt.i)
- (test/tests/variables/fe_hier/hier-2-2d.i)
- (modules/solid_mechanics/test/tests/generalized_plane_strain/generalized_plane_strain_scalar_vector.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/hcp_single_crystal/hcp_volumetric_eigenstrain.i)
- (test/tests/kernels/vector_fe/electromagnetic_coulomb_gauge.i)
- (modules/porous_flow/examples/groundwater/ex01.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/convergence/2D/neumann.i)
- (modules/heat_transfer/test/tests/code_verification/cartesian_test_no5.i)
- (test/tests/fviks/one-var-diffusion/no-ik.i)
- (modules/porous_flow/examples/ates/ates.i)
- (modules/phase_field/test/tests/free_energy_material/CoupledValueFunctionFreeEnergy.i)
- (test/tests/userobjects/postprocessor_spatial_user_object/parent.i)
- (test/tests/mortar/continuity-3d-non-conforming/continuity_non_conforming_tet.i)
- (test/tests/multiapps/restart/sub2.i)
- (test/tests/dgkernels/3d_diffusion_dg/3d_diffusion_p_refinement.i)
- (test/tests/problems/eigen_problem/eigensolvers/gipm_ibc.i)
- (modules/richards/test/tests/gravity_head_2/gh08.i)
- (modules/navier_stokes/test/tests/finite_element/ins/scalar_adr/supg/tauOpt.i)
- (modules/porous_flow/test/tests/sinks/s02.i)
- (modules/contact/test/tests/mortar_dynamics/frictional-mortar-3d-dynamics-light-function.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except01.i)
- (test/tests/time_integrators/tvdrk2/2d-quadratic.i)
- (test/tests/kernels/vector_fe/lagrange_vec.i)
- (modules/contact/test/tests/fieldsplit/frictional_mortar_FS.i)
- (test/tests/controls/time_periods/aux_scalar_kernels/control_different.i)
- (modules/phase_field/test/tests/actions/grain_growth_with_T_grad.i)
- (test/tests/adaptivity/interval/adapt_interval.i)
- (modules/combined/examples/mortar/mortar_gradient.i)
- (modules/solid_mechanics/examples/coal_mining/cosserat_wp_only.i)
- (test/tests/userobjects/solution_user_object/discontinuous_value_solution_uo_p1.i)
- (test/tests/functions/parsed/function_curl.i)
- (test/tests/kernels/mass_lumping/mass_lumping_jacobian.i)
- (modules/solid_mechanics/test/tests/domain_integral_thermal/j_integral_2d_ctefunc.i)
- (test/tests/materials/functor_properties/vector-magnitude/vector-test.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/large-tests/2d.i)
- (modules/solid_mechanics/test/tests/umat/plane_strain/generalized_plane_strain.i)
- (test/tests/utils/spline_interpolation/bicubic_spline_interpolation_x_normal.i)
- (test/tests/mortar/continuity-2d-conforming/conforming-2nd-order.i)
- (test/tests/controls/real_function_control/real_function_control.i)
- (modules/contact/test/tests/sliding_block/in_and_out/frictionless_lm.i)
- (test/tests/problems/reference_residual_problem/ad_abs_ref.i)
- (test/tests/fvkernels/mms/grad-reconstruction/rz.i)
- (modules/optimization/test/tests/optimizationreporter/material/adjoint_explicit.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/large-tests/3d.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/stress_update_material_based/linesearch.i)
- (test/tests/postprocessors/side_diffusive_flux_integral/side_diffusive_flux_integral.i)
- (test/tests/transfers/multiapp_projection_transfer/tosub_parent.i)
- (test/tests/executioners/executioner/steady-adapt.i)
- (modules/solid_mechanics/test/tests/initial_stress/gravity.i)
- (test/tests/actions/add_auxkernel_action/flux_average.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/user_object_based/save_euler.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialMultiphase_AD.i)
- (test/tests/mesh/adapt/initial_adaptivity_test.i)
- (modules/solid_mechanics/test/tests/mean_cap_TC/random04.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except10.i)
- (test/tests/mortar/continuity-2d-non-conforming/sequencing-stateful-soln-continuity.i)
- (modules/navier_stokes/test/tests/finite_element/ins/velocity_channel/velocity_inletBC_by_parts.i)
- (modules/thermal_hydraulics/test/tests/misc/surrogate_power_profile/power_profile.i)
- (modules/xfem/test/tests/moving_interface/verification/1D_xy_lsdep1mat.i)
- (modules/chemical_reactions/examples/calcium_bicarbonate/calcium_bicarbonate.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except05.i)
- (test/tests/postprocessors/element_integral_var_pps/pps_old_value_fv.i)
- (test/tests/time_steppers/timesequence_stepper/timesequence_restart3.i)
- (modules/solid_mechanics/test/tests/porosity/ad.i)
- (test/tests/multiapps/picard/function_dt_sub.i)
- (test/tests/postprocessors/element_h1_error_pps/element_h1_error_pp_test.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/scalar_kernel/2drow.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/action/action_1D.i)
- (modules/porous_flow/test/tests/gravity/grav01c.i)
- (test/tests/materials/functor_conversion/conversion.i)
- (test/tests/kernels/vector_fe/lagrange_vec_1d.i)
- (modules/xfem/test/tests/moving_interface/verification/2D_rz_homog1mat.i)
- (test/tests/outputs/residual/output_residual_test.i)
- (modules/optimization/examples/simpleTransient/forward_mesh.i)
- (modules/fluid_properties/test/tests/ideal_gas/test.i)
- (test/tests/userobjects/layered_side_average_functor/layered_side_average_functor.i)
- (test/tests/fvkernels/mms/cylindrical/advection.i)
- (test/tests/userobjects/nearest_point_layered_side_integral/nearest_point_layered_side_integral.i)
- (modules/combined/test/tests/phase_field_fracture/crack2d_vi_solver.i)
- (test/tests/time_steppers/function_dt/function_dt_no_interpolation.i)
- (test/tests/materials/ad_material/conversion/1d_dirichlet.i)
- (modules/combined/test/tests/beam_eigenstrain_transfer/subapp_err_3.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven.i)
- (modules/heat_transfer/test/tests/code_verification/spherical_test_no3.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/lid-driven/lid-driven-with-energy-action.i)
- (test/tests/kernels/scalar_kernel_constraint/diffusion_bipass_scalar.i)
- (test/tests/predictors/simple/predictor_skip_old_test.i)
- (modules/peridynamics/test/tests/heat_conduction/2D_steady_state_BPD.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/steady_fsp.i)
- (test/tests/variables/high_order_monomial/high_order_monomial.i)
- (test/tests/postprocessors/interface_diffusive_flux/interface_diffusive_flux.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized_action.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/crysp_read_slip_prop.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/cross_material/convergence/elastic.i)
- (modules/porous_flow/examples/multiapp_fracture_flow/3dFracture/matrix_app.i)
- (test/tests/bcs/function_dirichlet_bc/test.i)
- (modules/solid_mechanics/test/tests/domain_integral_thermal/interaction_integral_2d_rot.i)
- (modules/solid_mechanics/test/tests/radial_disp_aux/sphere_2d_axisymmetric.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/user_object_based/orthotropic_rotation_Cijkl.i)
- (test/tests/time_integrators/implicit-euler/ie-monomials.i)
- (modules/richards/test/tests/user_objects/uo1.i)
- (test/tests/time_integrators/actually_explicit_euler_verification/ee-2d-linear.i)
- (test/tests/postprocessors/num_nodes/num_nodes.i)
- (test/tests/auxkernels/time_derivative/time_derivative.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/boussinesq/transient-wcnsfv.i)
- (test/tests/markers/error_fraction_marker/error_fraction_marker_test.i)
- (test/tests/postprocessors/side_diffusive_flux_integral/vector_functor_prop.i)
- (test/tests/variables/coupled_scalar/coupled_scalar_old.i)
- (modules/heat_transfer/test/tests/heat_conduction_patch/heat_conduction_patch_hex20_aniso.i)
- (modules/optimization/examples/diffusion_reaction/forward_exact.i)
- (test/tests/indicators/laplacian_jump_indicator/biharmonic.i)
- (modules/porous_flow/test/tests/dirackernels/pls02reporter.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/cp_slip_rate_integ/crysp.i)
- (test/tests/executioners/transient_sync_time/transient_time_interval_output_test.i)
- (modules/xfem/test/tests/moving_interface/verification/2D_xy_lsdep1mat.i)
- (test/tests/bcs/ad_bc_preset_nodal/bc_function_preset.i)
- (test/tests/linearfvkernels/block-restriction/block-restricted-diffusion.i)
- (modules/porous_flow/examples/groundwater/ex02_steady_state.i)
- (test/tests/linearfvkernels/diffusion/diffusion-2d-rz.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/scalar_kernel/2dscalar.i)
- (test/tests/time_steppers/timesequence_stepper/timesequence_restart2.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/ADverification.i)
- (test/tests/misc/check_error/coupled_grad_without_declare.i)
- (modules/thermal_hydraulics/test/tests/problems/mms/mms_1phase.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_no_parts_steady_stabilized_second_order.i)
- (python/peacock/tests/common/transient_with_date.i)
- (test/tests/functions/piecewise_multilinear/twoDa.i)
- (test/tests/kernels/scalar_constraint/scalar_constraint_kernel_disp.i)
- (test/tests/mortar/continuity-3d-non-conforming/continuity_mixed.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_no_parts_steady_nobcbc.i)
- (modules/stochastic_tools/examples/libtorch_drl_control/libtorch_drl_control_sub.i)
- (modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined_fully_saturated_volume.i)
- (test/tests/multiapps/restart_subapp_ic/sub2.i)
- (test/tests/postprocessors/avg_nodal_var_value/avg_nodal_var_value_ts_begin.i)
- (modules/contact/test/tests/mortar_aux_kernels/pressure-aux-frictionless.i)
- (modules/solid_mechanics/test/tests/domain_integral_thermal/interaction_integral_2d_eig_grad.i)
- (modules/xfem/test/tests/bimaterials/inclusion_ad_bimaterials_2d.i)
- (test/tests/userobjects/internal_side_user_object/internal_side_user_object_two_materials.i)
- (test/tests/markers/reporter_point_marker/reporter_marker_adapt_test.i)
- (modules/solid_mechanics/test/tests/thermal_expansion/constant_expansion_stress_free_temp.i)
- (modules/porous_flow/test/tests/dirackernels/bh05.i)
- (modules/navier_stokes/test/tests/finite_element/ins/wall_convection/steady-action.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/mixed-transient-steady/mixed.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/convergence/2D/neumann.i)
- (modules/contact/test/tests/sliding_block/sliding/frictionless_penalty.i)
- (test/tests/postprocessors/volume/sphere1D.i)
- (modules/porous_flow/examples/coal_mining/fine_with_fluid.i)
- (modules/thermal_hydraulics/test/tests/vectorpostprocessors/sampler_1d_real/ad_sampler_1d_real.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/convergence/2D/dirichlet.i)
- (modules/solid_mechanics/test/tests/thermal_expansion_function/small_linear.i)
- (modules/phase_field/examples/multiphase/GrandPotential3Phase.i)
- (test/tests/utils/spline_interpolation/bicubic_spline_interpolation.i)
- (modules/porous_flow/test/tests/relperm/vangenuchten2.i)
- (modules/solid_mechanics/test/tests/umat/shear_order/shear_order_umat.i)
- (modules/richards/test/tests/buckley_leverett/bl02.i)
- (test/tests/postprocessors/num_elems/num_elems.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven.i)
- (modules/thermal_hydraulics/test/tests/components/form_loss_from_external_app_1phase/phy.form_loss_1phase.parent.i)
- (modules/phase_field/examples/kim-kim-suzuki/kks_example_noflux.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/convergence/3D/neumann.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized_with_temp.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mms/skew-correction/skewed-vortex.i)
- (modules/combined/examples/stochastic/graphite_ring_thermomechanics.i)
- (test/tests/preconditioners/vcp/vcp_test.i)
- (modules/navier_stokes/test/tests/finite_element/ins/scalar_adr/supg/advection_error_testing.i)
- (test/tests/fvkernels/mms/mass-mom-mat-advection-diffusion/input.i)
- (test/tests/kernels/ode/coupled_ode_td.i)
- (test/tests/outputs/debug/show_execution_userobjects.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/action/action_2d.i)
- (modules/solid_mechanics/test/tests/finite_strain_tensor_mechanics_tests/elastic_rotation.i)
- (test/tests/transfers/multiapp_conservative_transfer/sub_userobject.i)
- (test/tests/bcs/periodic/wedge.i)
- (modules/fluid_properties/test/tests/stiffened_gas/test.i)
- (modules/heat_transfer/test/tests/heat_conduction_patch/heat_conduction_patch.i)
- (modules/porous_flow/test/tests/heterogeneous_materials/constant_poroperm_fv.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_stabilized_action.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/straight_channel_porosity_step/dc.i)
- (test/tests/transfers/multiapp_interpolation_transfer/fromsub_sub.i)
- (test/tests/postprocessors/side_diffusive_flux_average/side_diffusive_flux_average.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except03.i)
- (modules/contact/test/tests/frictional/single_point_2d/single_point_2d_tp.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/steady_vector_fsp_elman.i)
- (test/tests/mortar/continuity-2d-non-conforming/soln-continuity-pg.i)
- (modules/heat_transfer/test/tests/heat_conduction/2d_quadrature_gap_heat_transfer/moving.i)
- (test/tests/multiapps/restart_multilevel/parent2.i)
- (modules/navier_stokes/test/tests/finite_element/ins/energy_source/steady-var-action.i)
- (python/peacock/tests/common/transient_big.i)
- (test/tests/outputs/postprocessor/show_hide.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/straight_channel_porosity_step/rotated-2d-bkt-function-porosity.i)
- (test/tests/outputs/oversample/over_sampling_test_gen.i)
- (test/tests/tag/scalar_tag_vector.i)
- (test/tests/variables/linearfv/diffusion-1d-aux.i)
- (test/tests/transfers/general_field/user_object/duplicated_user_object_tests/tosub_sub.i)
- (modules/thermal_hydraulics/test/tests/components/free_boundary_1phase/phy.conservation_free_boundary_1phase.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/cross_material/convergence/elastic.i)
- (test/tests/variables/fe_hermite_convergence/hermite_converge_periodic.i)
- (modules/solid_mechanics/test/tests/mohr_coulomb/planar_hard4.i)
- (modules/solid_mechanics/test/tests/plane_stress/weak_plane_stress_small.i)
- (modules/electromagnetics/test/tests/benchmarks/dipole_antenna/dipole.i)
- (test/tests/executioners/nullspace/singular.i)
- (test/tests/controls/real_function_control/multi_real_function_control.i)
- (modules/heat_transfer/test/tests/code_verification/cartesian_test_no1.i)
- (test/tests/postprocessors/element_time_derivative/el_time_deriv_1d_test.i)
- (modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/hoop_strain_comparison.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialMultiphase.i)
- (modules/porous_flow/test/tests/relperm/brooks_corey2.i)
- (modules/fluid_properties/test/tests/brine/brine.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_les.i)
- (test/tests/restart/restart_transient_from_steady/steady_with_2subs.i)
- (test/tests/transfers/multiapp_high_order_variable_transfer/parent_L2_Lagrange_userobject.i)
- (test/tests/linearfvkernels/advection/advection-2d-rz.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/user_object_based/prop_block_read.i)
- (modules/richards/test/tests/user_objects/uo3.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/action/no_action_1D.i)
- (modules/solid_mechanics/test/tests/tensile/random_update.i)
- (modules/solid_mechanics/test/tests/porosity/nan.i)
- (test/tests/time_integrators/convergence/implicit_convergence.i)
- (test/tests/time_steppers/function_dt/function_dt_min.i)
- (modules/ray_tracing/test/tests/raykernels/function_integral_ray_kernel/function_integral_ray_kernel.i)
- (modules/solid_mechanics/test/tests/pressure/cantilever.i)
- (test/tests/auxkernels/time_derivative/coupled_aux_time_derivative.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mms/channel-flow/2d-average-with-temp.i)
- (modules/richards/test/tests/theis/th22.i)
- (tutorials/darcy_thermo_mech/step06_coupled_darcy_heat_conduction/problems/step6b_transient_inflow.i)
- (test/tests/kernels/ode/coupled_ode_td_var_ic_from_mesh.i)
- (modules/combined/test/tests/additive_manufacturing/check_element_addition_2D.i)
- (modules/solid_mechanics/test/tests/2D_different_planes/gps_xy.i)
- (modules/contact/test/tests/mortar_cartesian_lms/two_block_1st_order_constraint_lm_xy.i)
- (test/tests/outputs/png/wedge.i)
- (modules/solid_mechanics/test/tests/elem_prop_read_user_object/prop_grain_read_3d.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/crysp.i)
- (modules/combined/test/tests/power_law_hardening/PowerLawHardening.i)
- (modules/solid_mechanics/test/tests/mohr_coulomb/planar_hard3.i)
- (modules/solid_mechanics/test/tests/action/action_multi_eigenstrain_same_conditions.i)
- (test/tests/userobjects/nearest_point_layered_side_integral_functor/nearest_point_layered_side_integral_functor.i)
- (modules/peridynamics/test/tests/generalized_plane_strain/generalized_plane_strain_H1NOSPD.i)
- (modules/xfem/test/tests/moving_interface/verification/1D_xy_homog1mat.i)
- (modules/porous_flow/test/tests/gravity/fully_saturated_grav01c.i)
- (test/tests/vectorpostprocessors/element_value_sampler/fv_element_value_sampler.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure/test.i)
- (modules/porous_flow/test/tests/poro_elasticity/pp_generation.i)
- (modules/combined/test/tests/surface_tension_KKS/surface_tension_VDWgas.i)
- (test/tests/functions/linear_combination_function/except1.i)
- (modules/xfem/test/tests/bimaterials/glued_ad_bimaterials_2d.i)
- (modules/richards/test/tests/dirac/bh04.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/crysp_user_object.i)
- (modules/porous_flow/test/tests/capillary_pressure/vangenuchten2.i)
- (test/tests/kernels/body_force/forcing_function_test.i)
- (modules/solid_mechanics/test/tests/lagrangian/materials/convergence/neohookean.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/convergence/sd-strain.i)
- (test/tests/mortar/aux-gap/mismatch.i)
- (modules/heat_transfer/test/tests/code_verification/cylindrical_test_no4.i)
- (modules/porous_flow/test/tests/relperm/unity.i)
- (modules/richards/test/tests/dirac/bh10.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts_steady.i)
- (modules/richards/test/tests/gravity_head_2/gh04.i)
- (modules/porous_flow/test/tests/sinks/s04.i)
- (test/tests/variables/fe_hier/hier-1-2d.i)
- (test/tests/outputs/exodus/variable_output_test.i)
- (modules/porous_flow/test/tests/capillary_pressure/vangenuchten1.i)
- (modules/thermal_hydraulics/test/tests/components/volume_junction_1phase/phy.deadend.i)
- (modules/solid_mechanics/test/tests/central_difference/consistent/3D/3d_consistent_implicit.i)
- (modules/solid_mechanics/test/tests/mean_cap_TC/random02.i)
- (modules/contact/test/tests/mechanical_constraint/frictionless_penalty.i)
- (modules/contact/test/tests/sliding_block/sliding/frictional_04_penalty.i)
- (test/tests/dgkernels/2d_diffusion_dg/no_mallocs_with_action.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except08.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except09.i)
- (modules/porous_flow/test/tests/fluidstate/coldwater_injection_radial.i)
- (modules/solid_mechanics/test/tests/initial_stress/gravity_cosserat.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/crysp_substep.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized_with_temp_transient.i)
- (modules/solid_mechanics/test/tests/generalized_plane_strain/generalized_plane_strain_small.i)
- (modules/solid_mechanics/test/tests/thermal_expansion/constant_expansion_coeff_restart.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except15.i)
- (test/tests/meshgenerators/flip_sideset_generator/flux_flip_2D.i)
- (modules/richards/test/tests/jacobian_2/jn_lumped_17.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/stress_update_material_based/orthotropic_rotation_Cijkl.i)
- (modules/porous_flow/test/tests/poroperm/PermTensorFromVar02.i)
- (test/tests/functions/parsed/vals_error.i)
- (test/tests/executioners/executioner/sln-time-adapt.i)
- (test/tests/mortar/continuity-2d-non-conforming/soln-continuity.i)
- (test/tests/userobjects/toggle_mesh_adaptivity/toggle_mesh_adaptivity_gaussian_ic.i)
- (modules/fsi/test/tests/2d-small-strain-transient/ad-fsi-flat-channel.i)
- (modules/contact/test/tests/adaptivity/contact_initial_adaptivity.i)
- (modules/solid_mechanics/test/tests/thermal_expansion/multiple_thermal_eigenstrains.i)
- (modules/solid_mechanics/test/tests/lagrangian/materials/convergence/cauchy-elastic.i)
- (test/tests/mortar/continuity-2d-conforming/conforming.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_radiation/sphere.i)
- (test/tests/postprocessors/element_l1_error/element_l1_error.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/cp_eigenstrains/volumetric_eigenstrain_increase.i)
- (test/tests/executioners/steady_time/steady_time.i)
- (test/tests/postprocessors/nodal_var_value/screen_output_test.i)
- (test/tests/kernels/anisotropic_diffusion/aniso_diffusion.i)
- (test/tests/auxkernels/old_older_material_aux/old_mat_in_aux.i)
- (modules/solid_mechanics/examples/coal_mining/cosserat_mc_wp.i)
- (modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined.i)
- (modules/richards/test/tests/dirac/bh_fu_07.i)
- (modules/heat_transfer/test/tests/code_verification/cartesian_test_no3.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/RZ_cone_by_parts.i)
- (modules/navier_stokes/test/tests/finite_volume/fvbcs/FVFunctorHeatFluxBC/wall_heat_transfer.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure_3d/test.i)
- (modules/peridynamics/test/tests/auxkernels/planestrain_thermomechanics_stretch_H1NOSPD.i)
- (modules/navier_stokes/test/tests/finite_element/ins/rz-x-axial-coord/hand-coded-jac-pipe-flow.i)
- (modules/combined/test/tests/power_law_hardening/ADPowerLawHardening.i)
- (test/tests/mortar/continuity-3d-non-conforming/continuity_tet.i)
- (test/tests/transfers/general_field/user_object/duplicated_user_object_tests/tosub_displaced_sub.i)
- (modules/solid_mechanics/test/tests/drucker_prager/random_hyperbolic.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/karthik-eg-1.i)
- (test/tests/nodalkernels/high_order_time_integration/high_order_time_integration.i)
- (test/tests/functions/constant_function/constant_function_test.i)
- (modules/solid_mechanics/test/tests/action/ad_converter_action_multi_eigenstrain.i)
- (modules/porous_flow/examples/fluidflower/fluidflower.i)
- (modules/porous_flow/examples/thm_example/2D_c.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/mms/porosity_change/1d-rc-continuous.i)
- (modules/porous_flow/test/tests/sinks/s07.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/mms/1d-rc-no-diffusion-strong-bc.i)
- (test/tests/ics/array_function_ic/array_function_ic_test.i)
- (modules/porous_flow/test/tests/dirackernels/injection_with_plasticity.i)
- (test/tests/controls/conditional_functional_enable/conditional_function_enable.i)
- (test/tests/utils/mathutils/smootherstep.i)
- (modules/navier_stokes/test/tests/finite_element/ins/wall_convection/steady.i)
- (modules/thermal_hydraulics/test/tests/components/hs_coupler_2d3d/hs_coupler_2d3d.i)
- (test/tests/variables/linearfv/diffusion-1d-pp.i)
- (test/tests/userobjects/element_subdomain_modifier/steady.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/straight_channel_porosity_step/hllc.i)
- (test/tests/userobjects/element_subdomain_modifier/reversible.i)
- (modules/navier_stokes/test/tests/finite_element/ins/block-restriction/two-mats-one-eqn-set.i)
- (modules/navier_stokes/test/tests/finite_element/ins/block-restriction/one-mat-two-eqn-sets.i)
- (test/tests/dgkernels/ad_dg_diffusion/2d_diffusion_ad_dg_test.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except14.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/lid-driven/transient-lid-driven-with-energy.i)
- (test/tests/fvkernels/fv_adapt/steady-adapt.i)
- (modules/solid_mechanics/examples/coal_mining/coarse.i)
- (modules/solid_mechanics/test/tests/tensile/random_smoothed.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_temperature/phy.parent.i)
- (test/tests/postprocessors/num_adaptivity_cycles/num_adaptivity_cycles.i)
- (modules/combined/test/tests/beam_eigenstrain_transfer/subapp_err_4.i)
- (modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_1D.i)
- (test/tests/postprocessors/nodal_extreme_value/nodal_proxy_extreme_value.i)
- (modules/richards/test/tests/buckley_leverett/bl21.i)
- (modules/thermal_hydraulics/test/tests/postprocessors/heat_rate_conduction_rz/heat_rate_conduction_rz.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_by_parts_traction_steady_stabilized.i)
- (modules/xfem/test/tests/moving_interface/verification/1D_xy_discrete2mat.i)
- (modules/porous_flow/test/tests/dirackernels/bh02reporter.i)
- (modules/optimization/test/tests/executioners/constrained/inequality/forward_and_adjoint.i)
- (modules/solid_mechanics/test/tests/generalized_plane_strain/generalized_plane_strain_ref_resid.i)
- (modules/heat_transfer/test/tests/heat_conduction/min_gap/min_gap.i)
- (modules/xfem/test/tests/diffusion_xfem/levelsetcut3d.i)
- (modules/contact/test/tests/fieldsplit/2blocks3d.i)
- (modules/porous_flow/examples/lava_lamp/1phase_convection.i)
- (test/tests/dgkernels/2d_diffusion_dg/dg_stateful.i)
- (modules/richards/test/tests/mass/m01.i)
- (modules/xfem/test/tests/moving_interface/verification/1D_rz_lsdep1mat.i)
- (test/tests/transfers/multiapp_high_order_variable_transfer/parent_L2_Lagrange_conservative.i)
- (modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined_constM.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts_steady_nobcbc.i)
- (test/tests/fvkernels/mms/grad-reconstruction/mat-rz.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/user_object_based/linesearch.i)
- (test/tests/userobjects/layered_extremum/layered_extremum_matprop.i)
- (modules/solid_mechanics/test/tests/weak_plane_shear/small_deform3.i)
- (test/tests/outputs/displacement/displacement_transient_test.i)
- (modules/fluid_properties/test/tests/materials/fluid_properties_material/test_ph.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/mms/porosity_change/pressure-interpolation-corrected-action.i)
- (modules/xfem/test/tests/moving_interface/moving_bimaterial_finite_strain_esm_using_cut_mesh.i)
- (test/tests/bcs/penalty_dirichlet_bc/function_penalty_dirichlet_bc_test.i)
- (test/tests/variables/fe_monomial_const/monomial-const-1d.i)
- (modules/solid_mechanics/test/tests/generalized_plane_strain/generalized_plane_strain_squares.i)
- (modules/thermal_hydraulics/test/tests/problems/natural_circulation/natural_circulation.i)
- (tutorials/tutorial03_verification/app/test/tests/step04_mms/2d_mms_spatial.i)
- (modules/navier_stokes/test/tests/finite_element/ins/bcs/advection_bc/2d_advection_bc.i)
- (modules/navier_stokes/test/tests/finite_element/ins/velocity_channel/traction-supg.i)
- (test/tests/fvkernels/mms/advective-outflow/kt-limited-advection.i)
- (test/tests/multiapps/restart_multilevel/sub.i)
- (test/tests/fvkernels/mms/mat-advection-diffusion.i)
- (test/tests/kernels/material_derivatives/material_derivatives_test.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_heat_flux/main.i)
- (modules/solid_mechanics/test/tests/initial_stress/gravity_with_aux.i)
- (modules/thermal_hydraulics/test/tests/scalarkernels/postprocessor_source/postprocessor_source.i)
- (test/tests/auxkernels/constant_scalar_aux/constant_scalar_aux.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/rates/jacobian.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_cylindrical/part_base.i)
- (modules/thermal_hydraulics/test/tests/postprocessors/heat_structure_energy/heat_structure_energy_plate.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_cylindrical/steady.i)
- (test/tests/kernels/ode/ode_expl_test.i)
- (modules/porous_flow/test/tests/hysteresis/hys_order_08.i)
- (modules/solid_mechanics/test/tests/finite_strain_elastic/finite_strain_fake_plastic.i)
- (modules/solid_mechanics/test/tests/pressure/ring.i)
- (modules/xfem/test/tests/pressure_bc/2d_pressure_displaced_mesh.i)
- (modules/richards/test/tests/dirac/bh02.i)
- (modules/combined/test/tests/phase_field_fracture/void2d_iso.i)
- (test/tests/bcs/periodic/trapezoid.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/phy.T_wall_transfer_3eqn_z.i)
- (test/tests/outputs/oversample/adapt.i)
- (test/tests/functions/function_ic/function_ic_test.i)
- (modules/solid_mechanics/examples/coal_mining/cosserat_mc_only.i)
- (modules/navier_stokes/test/tests/finite_element/ins/scalar_adr/supg/2d_advection_error_testing.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mms/skew-correction/skewed-vortex-action.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/thermal_expansion/free.i)
- (modules/phase_field/test/tests/GBAnisotropy/testwidth1.i)
- (modules/solid_mechanics/test/tests/recompute_radial_return/uniaxial_viscoplasticity_incrementalstrain.i)
- (test/tests/fvkernels/mms/harmonic_interpolation/diffusion.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/convergence-auto/1D/dirichlet.i)
- (test/tests/functions/parsed/scalar.i)
- (test/tests/postprocessors/pps_interval/pps_interval_mismatch.i)
- (modules/combined/test/tests/optimization/invOpt_nonlinear/simulation.i)
- (test/tests/transfers/general_field/user_object/duplicated_user_object_tests/3d_1d_sub.i)
- (modules/phase_field/examples/kim-kim-suzuki/kks_example_dirichlet.i)
- (test/tests/time_integrators/bdf2/bdf2_adapt.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mms/channel-flow/plane-poiseuille-flow.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mms/channel-flow/cylindrical/2d-average-with-temp.i)
- (modules/richards/test/tests/sinks/s05.i)
- (modules/porous_flow/test/tests/poro_elasticity/pp_generation_fullysat_action.i)
- (test/tests/linearfvkernels/diffusion/diffusion-1d.i)
- (modules/contact/test/tests/mortar_tm/horizontal_blocks_mortar_TM.i)
- (test/tests/kernels/vector_fe/coupled_scalar_vector_jacobian.i)
- (modules/richards/test/tests/dirac/bh05.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/thermal_expansion/constrained.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/steady_vector_fsp.i)
- (modules/thermal_hydraulics/test/tests/components/shaft_connected_pump_1phase/shaft_motor_pump.i)
- (modules/richards/test/tests/gravity_head_2/gh17.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_no_parts_steady.i)
- (modules/chemical_reactions/test/tests/desorption/langmuir_desorption.i)
- (test/tests/adaptivity/initial_adapt/initial_adapt.i)
- (modules/fluid_properties/test/tests/water/water.i)
- (modules/combined/test/tests/additive_manufacturing/check_initial_condition.i)
- (test/tests/time_integrators/explicit-euler/ee-2d-linear.i)
- (test/tests/fvkernels/mms/skewness-correction/diffusion/skewed.i)
- (test/tests/executioners/executioner/steady_state_check_test.i)
- (modules/geochemistry/test/tests/kernels/dispersion_1.i)
- (modules/solid_mechanics/test/tests/generalized_plane_strain/generalized_plane_strain_increment.i)
- (modules/phase_field/examples/measure_interface_energy/1Dinterface_energy.i)
- (test/tests/restart/restart_subapp_not_parent/complete_solve_no_subapp.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/action/action_1D.i)
- (test/tests/dgkernels/3d_diffusion_dg/3d_diffusion_dg_test.i)
- (test/tests/functors/matching-analytic-solution/test.i)
- (modules/solid_mechanics/test/tests/central_difference/lumped/3D/3d_nodalmass_implicit.i)
- (test/tests/restart/restart_transient_from_steady/restart_trans_with_2subs.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/user_object_based/exception.i)
- (modules/richards/test/tests/dirac/bh_fu_03.i)
- (modules/contact/test/tests/sliding_block/in_and_out/frictionless_penalty.i)
- (framework/contrib/hit/test/input.i)
- (modules/porous_flow/test/tests/hysteresis/hys_order_09.i)
- (test/tests/functions/solution_function/solution_function_grad_p1.i)
- (modules/contact/test/tests/frictional/single_point_2d/single_point_2d.i)
- (test/tests/time_integrators/explicit_ssp_runge_kutta/explicit_ssp_runge_kutta.i)
- (test/tests/restart/restart_steady_from_transient/steady_from_transient_restart.i)
- (test/tests/functions/linear_combination_function/lcf_grad.i)
- (test/tests/transfers/multiapp_userobject_transfer/sub.i)
- (modules/solid_mechanics/test/tests/2D_different_planes/planestrain_yz.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts.i)
- (test/tests/misc/check_error/missing_req_par_mesh_block_test.i)
- (test/tests/time_integrators/crank-nicolson/cranic_adapt.i)
- (modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/exact.i)
- (test/tests/postprocessors/function_value_pps/pps_args_function_value_pps.i)
- (modules/porous_flow/test/tests/energy_conservation/heat04_action_KT.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/porous-hllc.i)
- (modules/solid_mechanics/test/tests/mohr_coulomb/planar_hard5.i)
- (modules/richards/test/tests/gravity_head_2/gh16.i)
- (test/tests/auxkernels/pp_depend/pp_depend_indirect_wrong.i)
- (test/tests/auxkernels/forcing_function_aux/forcing_function_aux.i)
- (test/tests/problems/reference_residual_problem/abs_ref_acceptable.i)
- (test/tests/auxkernels/function_scalar_aux/function_scalar_aux.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_by_parts_steady_stabilized.i)
- (test/tests/preconditioners/smp/smp_single_adapt_test.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/jac.1phase.i)
- (modules/thermal_hydraulics/test/tests/controls/unit_trip_control/test.i)
- (examples/ex14_pps/ex14.i)
- (test/tests/postprocessors/nodal_var_value/nodal_var_value.i)
- (modules/solid_mechanics/test/tests/umat/plane_strain/plane_strain.i)
- (modules/thermal_hydraulics/test/tests/utils/smooth_transition/smooth_transition.i)
- (modules/xfem/test/tests/diffusion_xfem/levelsetcut2d_aux.i)
- (modules/chemical_reactions/test/tests/desorption/mollified_langmuir_desorption.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/rot-eg1.i)
- (modules/porous_flow/examples/tutorial/11_2D.i)
- (modules/contact/test/tests/fieldsplit/frictionless_mortar_FS.i)
- (modules/optimization/test/tests/reporter/TransientSyntheticDataCreator/transient_synthetic_data.i)
- (modules/porous_flow/test/tests/dispersion/disp01_fv.i)
- (modules/contact/test/tests/mechanical_constraint/frictionless_kinematic.i)
- (test/tests/userobjects/layered_average/layered_average_1d_displaced.i)
- (test/tests/postprocessors/element_extreme_functor_value/extreme_proxy_value.i)
- (test/tests/kernels/material_coupled_force/material_coupled_force.i)
- (modules/porous_flow/test/tests/dirackernels/pls01.i)
- (modules/xfem/test/tests/bimaterials/glued_bimaterials_2d.i)
- (modules/solid_mechanics/test/tests/ad_thermal_expansion_function/mean_complex.i)
- (test/tests/preconditioners/pbp/pbp_adapt_test.i)
- (modules/richards/test/tests/gravity_head_2/gh03.i)
- (test/tests/fvkernels/mms/advective-outflow/limited-advection.i)
- (modules/porous_flow/test/tests/hysteresis/hys_order_07.i)
- (modules/optimization/test/tests/functions/parameter_mesh/create_mesh_second.i)
- (modules/solid_mechanics/test/tests/j2_plasticity/solid_mechanics_j2plasticity.i)
- (test/tests/postprocessors/element_average_value/elem_pps_multi_block_test.i)
- (modules/stochastic_tools/test/tests/reporters/parallel_storage/sub.i)
- (modules/richards/test/tests/theis/th21.i)
- (modules/navier_stokes/test/tests/finite_element/ins/mms/supg/supg_pspg_adv_dominated_mms.i)
- (test/tests/preconditioners/pbp/pbp_dg_test.i)
- (modules/richards/test/tests/sinks/s01.i)
- (modules/solid_mechanics/test/tests/umat/elastic_hardening/linear_strain_hardening.i)
- (modules/porous_flow/test/tests/sinks/s05.i)
- (modules/combined/examples/publications/rapid_dev/fig7a.i)
- (test/tests/userobjects/postprocessor_spatial_user_object/sub.i)
- (test/tests/controls/libtorch_nn_control/read_control.i)
- (modules/combined/test/tests/heat_convection/heat_convection_function.i)
- (modules/solid_mechanics/test/tests/umat/print_c/print_compare_c.i)
- (modules/porous_flow/test/tests/relperm/corey3.i)
- (test/tests/multiapps/picard_multilevel/multilevel_dt_rejection/picard_sub.i)
- (modules/solid_mechanics/test/tests/interface_stress/test.i)
- (modules/fluid_properties/test/tests/calorically_imperfect_gas/test.i)
- (test/tests/executioners/transient_sync_time/transient_sync_time_test.i)
- (test/tests/time_integrators/actually_explicit_euler_verification/ee-1d-linear.i)
- (modules/solid_mechanics/test/tests/2D_geometries/finite_planestrain.i)
- (test/tests/functions/generic_function_material/generic_function_material_test.i)
- (modules/solid_mechanics/test/tests/elem_prop_read_user_object/prop_elem_read.i)
- (modules/optimization/test/tests/vectorpostprocessors/element_reaction_inner_product/element_reaction_inner_product.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/steady_vector_fsp_stokes.i)
- (test/tests/restart/restart_add_variable/transient_with_stateful.i)
- (test/tests/postprocessors/function_side_average/function_side_average.i)
- (test/tests/outputs/debug/show_execution_auxkernels.i)
- (modules/porous_flow/examples/tutorial/11.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/user_object_based/fileread.i)
- (test/tests/postprocessors/interface_value/interface_fe_variable_value_postprocessor.i)
- (test/tests/ics/function_ic/parsed_function.i)
- (modules/richards/test/tests/excav/ex02.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/steady_vector_fsp_al.i)
- (modules/porous_flow/test/tests/poro_elasticity/pp_generation_action.i)
- (modules/solid_mechanics/test/tests/eigenstrain/reducedOrderRZQuadratic.i)
- (modules/porous_flow/examples/tidal/atm_tides.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/SinteringDilute.i)
- (modules/contact/test/tests/mechanical_constraint/glued_penalty.i)
- (test/tests/postprocessors/relative_solution_difference_norm/test.i)
- (modules/porous_flow/test/tests/gravity/fully_saturated_grav01a.i)
- (test/tests/problems/eigen_problem/eigensolvers/ipm.i)
- (test/tests/indicators/laplacian_jump_indicator/biharmonic_transient.i)
- (modules/solid_mechanics/test/tests/central_difference/consistent/3D/3d_consistent_explicit.i)
- (modules/solid_mechanics/test/tests/recompute_radial_return/isotropic_plasticity_errors.i)
- (test/tests/executioners/executioner/steady.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_action.i)
- (modules/stochastic_tools/test/tests/userobjects/inverse_mapping/sub.i)
- (modules/xfem/test/tests/moving_interface/verification/2D_rz_lsdep1mat.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/varying-eps-basic-kt-mixed.i)
- (test/tests/time_steppers/dt2/dt2.i)
- (test/tests/misc/check_error/missing_required_coupled.i)
- (test/tests/mortar/continuity-3d-non-conforming/continuity_penalty_tet.i)
- (test/tests/transfers/multiapp_userobject_transfer/3d_1d_sub.i)
- (test/tests/outputs/variables/nemesis_hide.i)
- (modules/solid_mechanics/test/tests/mean_cap_TC/random03.i)
- (test/tests/postprocessors/mms_slope/mms_slope_test.i)
- (test/tests/auxkernels/element_var/element_var_test.i)
- (test/tests/kernels/ode/ode_sys_impl_test.i)
- (modules/porous_flow/test/tests/gravity/grav02d.i)
- (modules/solid_mechanics/test/tests/material_limit_time_step/damage/elements_changed_timestep_limit.i)
- (modules/navier_stokes/test/tests/finite_element/ins/velocity_channel/velocity_inletBC_no_parts.i)
- (modules/combined/test/tests/generalized_plane_strain_tm_contact/generalized_plane_strain_tm_contact.i)
- (test/tests/bcs/ad_function_dirichlet_bc/test.i)
- (modules/solid_mechanics/test/tests/plane_stress/ad_weak_plane_stress_small.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/special/area.i)
- (modules/xfem/test/tests/solid_mechanics_basic/edge_crack_3d_fatigue.i)
- (modules/solid_mechanics/test/tests/2D_different_planes/gps_xz.i)
- (test/tests/variables/fe_monomial_const/monomial-const-2d.i)
- (modules/contact/test/tests/sliding_block/sliding/frictionless_kinematic.i)
- (modules/phase_field/test/tests/electrochem_sintering/ElectrochemicalSintering_test.i)
- (modules/richards/test/tests/buckley_leverett/bl01.i)
- (modules/porous_flow/test/tests/radioactive_decay/radioactive_decay01.i)
- (modules/porous_flow/test/tests/gravity/grav02c.i)
- (test/tests/outputs/variables/show_single_vars.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/mms/2d-rc.i)
- (modules/stochastic_tools/examples/surrogates/combined/trans_diff_2d/trans_diff_sub.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except06.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts_traction_steady_stabilized.i)
- (tutorials/tutorial03_verification/app/test/tests/step04_mms/2d_mms_temporal.i)
- (modules/solid_mechanics/test/tests/umat/temperature/elastic_temperature.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/ADlower_limit.i)
- (modules/stochastic_tools/test/tests/userobjects/inverse_mapping/inverse_map.i)
- (modules/solid_mechanics/test/tests/ad_thermal_expansion_function/instantaneous_complex.i)
- (modules/heat_transfer/test/tests/code_verification/cartesian_test_no2.i)
- (modules/xfem/test/tests/moving_interface/moving_bimaterial_finite_strain.i)
- (test/tests/mesh/adapt/displaced_adapt_test.i)
- (modules/thermal_hydraulics/test/tests/problems/brayton_cycle/recuperated_brayton_cycle.i)
- (modules/porous_flow/test/tests/energy_conservation/heat04_fullysat_action.i)
- (modules/optimization/examples/simpleTransient/forward.i)
- (test/tests/time_steppers/postprocessor_dt/postprocessor_dt.i)
- (modules/richards/test/tests/buckley_leverett/bl22_lumped.i)
- (test/tests/userobjects/internal_side_user_object/internal_side_user_object.i)
- (modules/navier_stokes/test/tests/finite_element/ins/nonzero-malloc/test.i)
- (test/tests/transfers/multiapp_variable_value_sample_transfer/parent_array_sample.i)
- (modules/porous_flow/test/tests/dirackernels/bh_except02.i)
- (modules/solid_mechanics/test/tests/weak_plane_shear/large_deform3.i)
- (modules/porous_flow/examples/groundwater/ex02_abstraction.i)
- (test/tests/mesh/custom_partitioner/custom_linear_partitioner_test_displacement.i)
- (modules/porous_flow/test/tests/heterogeneous_materials/constant_poroperm.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/action/noaction_3d.i)
- (modules/porous_flow/test/tests/energy_conservation/heat04_action.i)
- (test/tests/multiapps/restart_subapp_ic/parent.i)
- (modules/fsi/test/tests/fsi_acoustics/1D_fluid_only/1D_fluid_only.i)
- (test/tests/outputs/console/console_final.i)
- (modules/solid_mechanics/test/tests/eigenstrain/reducedOrderRZLinear.i)
- (modules/xfem/test/tests/solid_mechanics_basic/edge_crack_3d_mhs.i)
- (modules/contact/test/tests/sliding_block/sliding/frictional_02_penalty.i)
- (modules/combined/examples/publications/rapid_dev/fig6.i)
- (modules/optimization/examples/simpleTransient/nonlinear_forward_and_adjoint.i)
- (modules/richards/test/tests/buckley_leverett/bl20_lumped.i)
- (modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/lps_single_split.i)
- (modules/heat_transfer/test/tests/code_verification/cylindrical_test_no1.i)
- (test/tests/mortar/continuity-3d-non-conforming/continuity_sphere_hex.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/small-tests/1d.i)
- (modules/navier_stokes/test/tests/finite_volume/controls/switch-pressure-bc/switch_vel_pres_bc.i)
- (modules/contact/test/tests/frictional/single_point_2d/single_point_2d_predictor.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/transient_fsp.i)
- (modules/xfem/test/tests/moving_interface/moving_ad_bimaterial.i)
- (test/tests/linearfvkernels/reaction/reaction-1d.i)
- (modules/solid_mechanics/test/tests/smeared_cracking/cracking_xyz.i)
- (test/tests/dgkernels/2d_diffusion_dg/no_functor_additions.i)
- (test/tests/bcs/ad_penalty_dirichlet_bc/penalty_dirichlet_bc_test.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/creep_ramp_sub_false_more_steps.i)
- (test/tests/dgkernels/adaptivity/adaptivity.i)
- (test/tests/restart/restart_steady_from_transient/transient.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/mms/1d-rc-no-diffusion.i)
- (test/tests/postprocessors/mms_sine/2_d_mms_sine_postprocessor_test.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/thermal_expansion/constrained.i)
- (test/tests/linearfvkernels/advection/advection-2d.i)
- (modules/porous_flow/test/tests/gravity/grav01a_fv.i)
- (modules/solid_mechanics/test/tests/umat/print/print_shear_defgrad.i)
expression
C++ Type:FunctionExpression
Controllable:No
Description:The user defined function.
symbol_names
C++ Type:std::vector<std::string>
Controllable:No
Description:Symbols (excluding t,x,y,z) that are bound to the values provided by the corresponding items in the vals vector.
symbol_values
C++ Type:std::vector<std::string>
Controllable:No
Description:Constant numeric values, postprocessor names, function names, and scalar variables corresponding to the symbols in symbol_names.
(examples/ex13_functions/ex13.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
ny = 100
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
[]
[Variables]
[./forced]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
# A ParsedFunction allows us to supply analytic expressions
# directly in the input file
[./bc_func]
type = ParsedFunction
expression = sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '16'
[../]
# This function is an actual compiled function
# We could have used ParsedFunction for this as well
[./forcing_func]
type = ExampleFunction
alpha = 16
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = forced
[../]
# This Kernel can take a function name to use
[./forcing]
type = BodyForce
variable = forced
function = forcing_func
[../]
[]
[BCs]
# The BC can take a function name to use
[./all]
type = FunctionDirichletBC
variable = forced
boundary = 'bottom right top left'
function = bc_func
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/multiapps/picard/function_dt_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
ymin = 0
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[Functions]
[v_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[dts]
type = PiecewiseLinear
x = '0.1 10'
y = '0.1 10'
[]
[]
[AuxVariables]
[v]
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[ufn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = v_fn
[]
[]
[Executioner]
type = Transient
dt = 0.1
solve_type = 'PJFNK'
nl_abs_tol = 1e-10
fixed_point_max_its = 2
start_time = 0
num_steps = 3
[TimeStepper]
type = FunctionDT
function = dts
[]
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
app_type = MooseTestApp
type = TransientMultiApp
input_files = 'function_dt_sub.i'
execute_on = timestep_end
positions = '0 -1 0'
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[]
[]
(modules/solid_mechanics/test/tests/finite_strain_elastic/elastic_rotation_test.i)
#
# Rotation Test
#
# This test is designed to compute stress based on uniaxial strain
# and then follow that stress as the mesh is rotated 90 degrees.
#
# The mesh is composed of one block with a single element. The nodal
# displacements in the three directions are prescribed. Poisson's
# ratio is 1/3, and Young's modulus is 1e6.
#
# This test is mentioned in
# K. Kamojjala, R. Brannon, A. Sadeghirad, and J. Guilkey, "Verification
# tests in solid mechanics," Engineering with Computers, Vol. 31, 2015.
# DOI: 10.1007/s00366-013-0342-x
#
[Mesh]
type = FileMesh
file = rotation_test.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Functions]
[./x_200]
type = ParsedFunction
symbol_names = 'delta t0'
symbol_values = '1e-6 1.0'
expression = 'if(t<=1.0, delta*t, (1.0+delta)*cos(pi/2*(t-t0)) - 1.0)'
[../]
[./y_200]
type = ParsedFunction
symbol_names = 'delta t0'
symbol_values = '1e-6 1.0'
expression = 'if(t<=1.0, 0.0, (1.0+delta)*sin(pi/2*(t-t0)))'
[../]
[./x_300]
type = ParsedFunction
symbol_names = 'delta t0'
symbol_values = '1e-6 1.0'
expression = 'if(t<=1.0, delta*t, (1.0+delta)*cos(pi/2.0*(t-t0)) - sin(pi/2.0*(t-t0)) - 1.0)'
[../]
[./y_300]
type = ParsedFunction
symbol_names = 'delta t0'
symbol_values = '1e-6 1.0'
expression = 'if(t<=1.0, 0.0, cos(pi/2.0*(t-t0)) + (1+delta)*sin(pi/2.0*(t-t0)) - 1.0)'
[../]
[./x_400]
type = ParsedFunction
symbol_names = 'delta t0'
symbol_values = '1e-6 1.0'
expression = 'if(t<=1.0, 0.0, -sin(pi/2.0*(t-t0)))'
[../]
[./y_400]
type = ParsedFunction
symbol_names = 'delta t0'
symbol_values = '1e-6 1.0'
expression = 'if(t<=1.0, 0.0, cos(pi/2.0*(t-t0)) - 1.0)'
[../]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_zx'
[../]
[../]
[../]
[]
[BCs]
[./no_x]
type = DirichletBC
variable = disp_x
boundary = 100
value = 0.0
[../]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = 100
value = 0.0
[../]
[./x_200]
type = FunctionDirichletBC
variable = disp_x
boundary = 200
function = x_200
[../]
[./y_200]
type = FunctionDirichletBC
variable = disp_y
boundary = 200
function = y_200
[../]
[./x_300]
type = FunctionDirichletBC
variable = disp_x
boundary = 300
function = x_300
[../]
[./y_300]
type = FunctionDirichletBC
variable = disp_y
boundary = 300
function = y_300
[../]
[./x_400]
type = FunctionDirichletBC
variable = disp_x
boundary = 400
function = x_400
[../]
[./y_400]
type = FunctionDirichletBC
variable = disp_y
boundary = 400
function = y_400
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '100 200 300 400'
value = 0.0
[../]
[]
[Materials]
[./stress]
type = ComputeFiniteStrainElasticStress
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '1.5e6 0.75e6 0.75e6 1.5e6 0.75e6 1.5e6 0.375e6 0.375e6 0.375e6'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type '
petsc_options_value = lu
nl_rel_tol = 1e-30
nl_abs_tol = 1e-20
l_max_its = 20
start_time = 0.0
dt = 0.01
end_time = 2.0
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/scalar_material_damage/nonlocal_scalar_damage.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -0.5
xmax = 0.5
nx = 5
ny = 5
nz = 5
elem_type = HEX8
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = SMALL
incremental = true
add_variables = true
generate_output = 'stress_xx strain_xx'
[]
[]
[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
[]
[axial_load]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.01
[]
[]
[Functions]
[func]
type = ParsedFunction
expression = 'if(x>=0,0.5*t, t)'
[]
[]
[UserObjects]
[ele_avg]
type = RadialAverage
prop_name = local_damage
weights = constant
execute_on = "INITIAL timestep_end"
radius = 0.55
[]
[]
[Materials]
[local_damage_index]
type = GenericFunctionMaterial
prop_names = local_damage_index
prop_values = func
[]
[local_damage]
type = ScalarMaterialDamage
damage_index = local_damage_index
damage_index_name = local_damage
[]
[damage]
type = NonlocalDamage
average_UO = ele_avg
local_damage_model = local_damage
damage_index_name = nonlocal_damage
[]
[stress]
type = ComputeDamageStress
damage_model = damage
[]
[elasticity]
type = ComputeIsotropicElasticityTensor
poissons_ratio = 0.2
youngs_modulus = 10e9
[]
[]
[Postprocessors]
[stress_xx]
type = ElementAverageValue
variable = stress_xx
[]
[strain_xx]
type = ElementAverageValue
variable = strain_xx
[]
[nonlocal_damage]
type = ElementAverageMaterialProperty
mat_prop = nonlocal_damage
[]
[local_damage]
type = ElementAverageMaterialProperty
mat_prop = local_damage
[]
[]
[Executioner]
type = Transient
l_max_its = 50
l_tol = 1e-8
nl_max_its = 20
nl_rel_tol = 1e-12
nl_abs_tol = 1e-8
dt = 0.2
dtmin = 0.1
end_time = 1
[]
[Outputs]
csv = true
[]
(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/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
[]
[]
(python/peacock/tests/input_tab/InputTree/gold/lcf1.i)
# LinearCombinationFunction function test
# See [Functions] block for a description of the tests
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 2
nx = 10
[]
[Variables]
[dummy]
[]
[]
[Kernels]
[dummy_u]
type = TimeDerivative
variable = dummy
[]
[]
[AuxVariables]
[the_linear_combo]
[]
[]
[AuxKernels]
[the_linear_combo]
type = FunctionAux
variable = the_linear_combo
function = the_linear_combo
[]
[]
[Functions]
[xtimes]
type = ParsedFunction
expression = '1.1*x'
[]
[twoxplus1]
type = ParsedFunction
expression = '2*x+1'
[]
[xsquared]
type = ParsedFunction
expression = '(x-2)*x'
[]
[tover2]
type = ParsedFunction
expression = '0.5*t'
[]
[the_linear_combo]
type = LinearCombinationFunction
functions = 'xtimes twoxplus1 xsquared tover2'
w = '3 -1.2 0.4 3'
[]
[should_be_answer]
type = ParsedFunction
expression = '3*1.1*x-1.2*(2*x+1)+0.4*(x-2)*x+3*0.5*t'
[]
[]
[Postprocessors]
[should_be_zero]
type = NodalL2Error
function = should_be_answer
variable = 'the_linear_combo'
[]
[]
[Executioner]
type = Transient
dt = 0.5
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = lcf1
hide = 'dummy'
exodus = false
csv = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/convergence-auto/2D/neumann.i)
# Simple 2D plane strain test
[GlobalParams]
displacements = 'disp_x disp_y'
large_kinematics = true
stabilize_strain = true
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[ICs]
[disp_x]
type = RandomIC
variable = disp_x
min = -0.01
max = 0.01
[]
[disp_y]
type = RandomIC
variable = disp_y
min = -0.01
max = 0.01
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
[]
[]
[Kernels]
[sdx]
type = TotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[sdy]
type = TotalLagrangianStressDivergence
variable = disp_y
component = 1
[]
[]
[Functions]
[pullx]
type = ParsedFunction
expression = '50000 * t'
[]
[pully]
type = ParsedFunction
expression = '-30000 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = left
variable = disp_y
value = 0.0
[]
[pull_x]
type = FunctionNeumannBC
boundary = right
variable = disp_x
function = pullx
[]
[pull_y]
type = FunctionNeumannBC
boundary = top
variable = disp_y
function = pully
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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-10
nl_abs_tol = 1e-12
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 1.0
[]
(modules/solid_mechanics/test/tests/nodal_patch_recovery/patch_recovery.i)
[GlobalParams]
displacements = 'ux uy'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
[]
[UserObjects]
[stress_xx_patch]
type = NodalPatchRecoveryMaterialProperty
patch_polynomial_order = FIRST
property = 'stress'
component = '0 0'
execute_on = 'TIMESTEP_END'
[]
[stress_yy_patch]
type = NodalPatchRecoveryMaterialProperty
patch_polynomial_order = FIRST
property = 'stress'
component = '1 1'
execute_on = 'TIMESTEP_END'
[]
[]
[AuxVariables]
[stress_xx_recovered]
order = FIRST
family = LAGRANGE
[]
[stress_yy_recovered]
order = FIRST
family = LAGRANGE
[]
[]
[Functions]
[tdisp]
type = ParsedFunction
expression = 0.01*t
[]
[]
[Physics/SolidMechanics/QuasiStatic/all]
strain = FINITE
add_variables = true
[]
[AuxKernels]
[stress_xx_recovered]
type = NodalPatchRecoveryAux
variable = stress_xx_recovered
nodal_patch_recovery_uo = stress_xx_patch
execute_on = 'TIMESTEP_END'
[]
[stress_yy_recovered]
type = NodalPatchRecoveryAux
variable = stress_yy_recovered
nodal_patch_recovery_uo = stress_yy_patch
execute_on = 'TIMESTEP_END'
[]
[]
[BCs]
[fix_y]
type = DirichletBC
variable = uy
boundary = 'bottom'
value = 0
[]
[fix_x]
type = DirichletBC
variable = ux
boundary = 'top bottom'
value = 0
[]
[disp_y]
type = FunctionDirichletBC
variable = uy
boundary = 'top'
function = tdisp
preset = false
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensorCP
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
[]
[stress]
type = ComputeMultipleCrystalPlasticityStress
crystal_plasticity_models = 'trial_xtalpl'
tan_mod_type = exact
[]
[trial_xtalpl]
type = CrystalPlasticityKalidindiUpdate
number_slip_systems = 12
slip_sys_file_name = input_slip_sys.txt
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
dt = 0.05
num_steps = 2
nl_abs_tol = 1e-10
nl_rel_tol = 1e-10
[]
[Outputs]
exodus = true
print_linear_residuals = false
[]
(test/tests/functions/parsed/steady.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
initial_condition = 2
[../]
[]
[Functions]
[./right_bc]
type = ParsedFunction
expression = a+1
symbol_values = left_avg
symbol_names = a
[../]
[./left_bc]
type = ParsedFunction
expression = a
symbol_values = left_avg
symbol_names = a
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = FunctionDirichletBC
variable = u
boundary = left
function = left_bc
[../]
[./right]
type = FunctionDirichletBC
variable = u
boundary = 'right right'
function = right_bc
[../]
[]
[Postprocessors]
[./left_avg]
type = SideAverageValue
variable = u
execute_on = initial
boundary = left
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/stress_update_material_based/patch_recovery.i)
[GlobalParams]
displacements = 'ux uy'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]
[AuxVariables]
[stress_xx_recovered]
order = FIRST
family = LAGRANGE
[]
[stress_yy_recovered]
order = FIRST
family = LAGRANGE
[]
[]
[Functions]
[tdisp]
type = ParsedFunction
expression = 0.01*t
[]
[]
[Physics/SolidMechanics/QuasiStatic/all]
strain = FINITE
add_variables = true
[]
[AuxKernels]
[stress_xx_recovered]
type = NodalPatchRecoveryAux
variable = stress_xx_recovered
nodal_patch_recovery_uo = stress_xx_patch
execute_on = 'TIMESTEP_END'
[]
[stress_yy_recovered]
type = NodalPatchRecoveryAux
variable = stress_yy_recovered
nodal_patch_recovery_uo = stress_yy_patch
execute_on = 'TIMESTEP_END'
[]
[]
[BCs]
[symmy]
type = DirichletBC
variable = uy
boundary = bottom
value = 0
[]
[symmx]
type = DirichletBC
variable = ux
boundary = left
value = 0
[]
[tdisp]
type = FunctionDirichletBC
variable = uy
boundary = top
function = tdisp
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensorCP
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
[]
[stress]
type = ComputeMultipleCrystalPlasticityStress
crystal_plasticity_models = 'trial_xtalpl'
tan_mod_type = exact
[]
[trial_xtalpl]
type = CrystalPlasticityKalidindiUpdate
number_slip_systems = 12
slip_sys_file_name = input_slip_sys.txt
[]
[]
[UserObjects]
[stress_xx_patch]
type = NodalPatchRecoveryMaterialProperty
patch_polynomial_order = FIRST
property = 'stress'
component = '0 0'
execute_on = 'TIMESTEP_END'
[]
[stress_yy_patch]
type = NodalPatchRecoveryMaterialProperty
patch_polynomial_order = FIRST
property = 'stress'
component = '1 1'
execute_on = 'TIMESTEP_END'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
dt = 0.05
solve_type = 'PJFNK'
petsc_options_iname = -pc_hypre_type
petsc_options_value = boomerang
nl_abs_tol = 1e-10
nl_rel_step_tol = 1e-10
dtmax = 10.0
nl_rel_tol = 1e-10
end_time = 1
dtmin = 0.05
num_steps = 10
nl_abs_step_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/general_field/user_object/duplicated_user_object_tests/sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 8
xmax = 0.1
ymax = 0.5
coord_type = rz
[]
[Variables]
[u]
initial_condition = 1
[]
[]
[AuxVariables]
[layered_average_value]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[axial_force]
type = ParsedFunction
expression = 1000*y
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[force]
type = BodyForce
variable = u
function = axial_force
[]
[]
[AuxKernels]
[layered_aux]
type = SpatialUserObjectAux
variable = layered_average_value
execute_on = timestep_end
user_object = layered_average
[]
[]
[BCs]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[UserObjects]
[layered_average]
type = LayeredAverage
variable = u
direction = y
num_layers = 4
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.001
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/examples/thm_example/2D.i)
# Two phase, temperature-dependent, with mechanics, radial with fine mesh, constant injection of cold co2 into a overburden-reservoir-underburden containing mostly water
# species=0 is water
# species=1 is co2
# phase=0 is liquid, and since massfrac_ph0_sp0 = 1, this is all water
# phase=1 is gas, and since massfrac_ph1_sp0 = 0, this is all co2
#
# The mesh used below has very high resolution, so the simulation takes a long time to complete.
# Some suggested meshes of different resolution:
# nx=50, bias_x=1.2
# nx=100, bias_x=1.1
# nx=200, bias_x=1.05
# nx=400, bias_x=1.02
# nx=1000, bias_x=1.01
# nx=2000, bias_x=1.003
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2000
bias_x = 1.003
xmin = 0.1
xmax = 5000
ny = 1
ymin = 0
ymax = 11
[]
[Problem]
coord_type = RZ
[]
[GlobalParams]
displacements = 'disp_r disp_z'
PorousFlowDictator = dictator
gravity = '0 0 0'
biot_coefficient = 1.0
[]
[Variables]
[pwater]
initial_condition = 18.3e6
[]
[sgas]
initial_condition = 0.0
[]
[temp]
initial_condition = 358
[]
[disp_r]
[]
[]
[AuxVariables]
[rate]
[]
[disp_z]
[]
[massfrac_ph0_sp0]
initial_condition = 1 # all H20 in phase=0
[]
[massfrac_ph1_sp0]
initial_condition = 0 # no H2O in phase=1
[]
[pgas]
family = MONOMIAL
order = FIRST
[]
[swater]
family = MONOMIAL
order = FIRST
[]
[stress_rr]
order = CONSTANT
family = MONOMIAL
[]
[stress_tt]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[mass_water_dot]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pwater
[]
[flux_water]
type = PorousFlowAdvectiveFlux
fluid_component = 0
use_displaced_mesh = false
variable = pwater
[]
[mass_co2_dot]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = sgas
[]
[flux_co2]
type = PorousFlowAdvectiveFlux
fluid_component = 1
use_displaced_mesh = false
variable = sgas
[]
[energy_dot]
type = PorousFlowEnergyTimeDerivative
variable = temp
[]
[advection]
type = PorousFlowHeatAdvection
use_displaced_mesh = false
variable = temp
[]
[conduction]
type = PorousFlowExponentialDecay
use_displaced_mesh = false
variable = temp
reference = 358
rate = rate
[]
[grad_stress_r]
type = StressDivergenceRZTensors
temperature = temp
eigenstrain_names = thermal_contribution
variable = disp_r
use_displaced_mesh = false
component = 0
[]
[poro_r]
type = PorousFlowEffectiveStressCoupling
variable = disp_r
use_displaced_mesh = false
component = 0
[]
[]
[AuxKernels]
[rate]
type = FunctionAux
variable = rate
execute_on = timestep_begin
function = decay_rate
[]
[pgas]
type = PorousFlowPropertyAux
property = pressure
phase = 1
variable = pgas
[]
[swater]
type = PorousFlowPropertyAux
property = saturation
phase = 0
variable = swater
[]
[stress_rr]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_rr
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
[]
[]
[Functions]
[decay_rate]
# Eqn(26) of the first paper of LaForce et al.
# Ka * (rho C)_a = 10056886.914
# h = 11
type = ParsedFunction
expression = 'sqrt(10056886.914/t)/11.0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp pwater sgas disp_r'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[]
[FluidProperties]
[water]
type = SimpleFluidProperties
bulk_modulus = 2.27e14
density0 = 970.0
viscosity = 0.3394e-3
cv = 4149.0
cp = 4149.0
porepressure_coefficient = 0.0
thermal_expansion = 0
[]
[co2]
type = SimpleFluidProperties
bulk_modulus = 2.27e14
density0 = 516.48
viscosity = 0.0393e-3
cv = 2920.5
cp = 2920.5
porepressure_coefficient = 0.0
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = pwater
phase1_saturation = sgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[water]
type = PorousFlowSingleComponentFluid
fp = water
phase = 0
[]
[gas]
type = PorousFlowSingleComponentFluid
fp = co2
phase = 1
[]
[porosity_reservoir]
type = PorousFlowPorosityConst
porosity = 0.2
[]
[permeability_reservoir]
type = PorousFlowPermeabilityConst
permeability = '2e-12 0 0 0 0 0 0 0 0'
[]
[relperm_liquid]
type = PorousFlowRelativePermeabilityCorey
n = 4
phase = 0
s_res = 0.200
sum_s_res = 0.405
[]
[relperm_gas]
type = PorousFlowRelativePermeabilityBC
phase = 1
s_res = 0.205
sum_s_res = 0.405
nw_phase = true
lambda = 2
[]
[thermal_conductivity_reservoir]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0 0 0 0 1.320 0 0 0 0'
wet_thermal_conductivity = '0 0 0 0 3.083 0 0 0 0'
[]
[internal_energy_reservoir]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 1100
density = 2350.0
[]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
shear_modulus = 6.0E9
poissons_ratio = 0.2
[]
[strain]
type = ComputeAxisymmetricRZSmallStrain
eigenstrain_names = 'thermal_contribution ini_stress'
[]
[ini_strain]
type = ComputeEigenstrainFromInitialStress
initial_stress = '-12.8E6 0 0 0 -51.3E6 0 0 0 -12.8E6'
eigenstrain_name = ini_stress
[]
[thermal_contribution]
type = ComputeThermalExpansionEigenstrain
temperature = temp
stress_free_temperature = 358
thermal_expansion_coeff = 5E-6
eigenstrain_name = thermal_contribution
[]
[stress]
type = ComputeLinearElasticStress
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[]
[BCs]
[outer_pressure_fixed]
type = DirichletBC
boundary = right
value = 18.3e6
variable = pwater
[]
[outer_saturation_fixed]
type = DirichletBC
boundary = right
value = 0.0
variable = sgas
[]
[outer_temp_fixed]
type = DirichletBC
boundary = right
value = 358
variable = temp
[]
[fixed_outer_r]
type = DirichletBC
variable = disp_r
value = 0
boundary = right
[]
[co2_injection]
type = PorousFlowSink
boundary = left
variable = sgas
use_mobility = false
use_relperm = false
fluid_phase = 1
flux_function = 'min(t/100.0,1)*(-2.294001475)' # 5.0E5 T/year = 15.855 kg/s, over area of 2Pi*0.1*11
[]
[cold_co2]
type = DirichletBC
boundary = left
variable = temp
value = 294
[]
[cavity_pressure_x]
type = Pressure
boundary = left
variable = disp_r
component = 0
postprocessor = p_bh # note, this lags
use_displaced_mesh = false
[]
[]
[Postprocessors]
[p_bh]
type = PointValue
variable = pwater
point = '0.1 0 0'
execute_on = timestep_begin
use_displaced_mesh = false
[]
[]
[VectorPostprocessors]
[ptsuss]
type = LineValueSampler
use_displaced_mesh = false
start_point = '0.1 0 0'
end_point = '5000 0 0'
sort_by = x
num_points = 50000
outputs = csv
variable = 'pwater temp sgas disp_r stress_rr stress_tt'
[]
[]
[Preconditioning]
active = 'smp'
[smp]
type = SMP
full = true
#petsc_options = '-snes_converged_reason -ksp_diagonal_scale -ksp_diagonal_scale_fix -ksp_gmres_modifiedgramschmidt -snes_linesearch_monitor'
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'gmres asm lu NONZERO 2 1E2 1E-5 500'
[]
[mumps]
type = SMP
full = true
petsc_options = '-snes_converged_reason -ksp_diagonal_scale -ksp_diagonal_scale_fix -ksp_gmres_modifiedgramschmidt -snes_linesearch_monitor'
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package -pc_factor_shift_type -snes_rtol -snes_atol -snes_max_it'
petsc_options_value = 'gmres lu mumps NONZERO 1E-5 1E2 50'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 1.5768e8
#dtmax = 1e6
[TimeStepper]
type = IterationAdaptiveDT
dt = 1
growth_factor = 1.1
[]
[]
[Outputs]
print_linear_residuals = false
sync_times = '3600 86400 2.592E6 1.5768E8'
perf_graph = true
exodus = true
[csv]
type = CSV
sync_only = true
[]
[]
(modules/contact/test/tests/mortar_cartesian_lms/two_block_1st_order_constraint_lm_xy_friction_vcp.i)
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
theta = 0
velocity = 0.1
refine = 3
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.35
xmax = -0.05
ymin = -1
ymax = 0
nx = 1
ny = 3
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_sideset_names]
type = RenameBoundaryGenerator
input = left_block_sidesets
old_boundary = '10 11 12 13'
new_boundary = 'l_bottom l_right l_top l_left'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sideset_names
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.3
ymin = -1
ymax = 0
nx = 1
ny = 2
elem_type = QUAD4
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3'
new_boundary = '20 21 22 23'
[]
[right_block_sideset_names]
type = RenameBoundaryGenerator
input = right_block_sidesets
old_boundary = '20 21 22 23'
new_boundary = 'r_bottom r_right r_top r_left'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sideset_names
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[left_lower]
type = LowerDBlockFromSidesetGenerator
input = combined_mesh
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[right_lower]
type = LowerDBlockFromSidesetGenerator
input = left_lower
sidesets = '23'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[rotate_mesh]
type = TransformGenerator
input = right_lower
transform = ROTATE
vector_value = '0 0 ${theta}'
[]
uniform_refine = ${refine}
[]
[Variables]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[normal_lm]
family = LAGRANGE
order = FIRST
[]
[tangent_lm]
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[normal_lm]
type = MortarPressureComponentAux
variable = normal_lm
primary_boundary = '23'
secondary_boundary = '11'
lm_var_x = lm_x
lm_var_y = lm_y
component = 'NORMAL'
boundary = '11'
[]
[tangent_lm]
type = MortarPressureComponentAux
variable = tangent_lm
primary_boundary = '23'
secondary_boundary = '11'
lm_var_x = lm_x
lm_var_y = lm_y
component = 'tangent1'
boundary = '11'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
[]
[]
[Functions]
[horizontal_movement]
type = ParsedFunction
expression = '${velocity} * t * cos(${theta}/180*pi)'
[]
[vertical_movement]
type = ParsedFunction
expression = '${velocity} * t * sin(${theta}/180*pi)'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = horizontal_movement
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 21
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = 21
value = 0.0
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 13
function = vertical_movement
[]
[]
[Materials]
[elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e4
poissons_ratio = 0.3
[]
[stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e8
poissons_ratio = 0.3
[]
[stress_right]
type = ComputeFiniteStrainElasticStress
block = 2
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeFrictionalForceCartesianLMMechanicalContact # ComputeCartesianLMFrictionMechanicalContact
# type = ComputeWeightedGapLMMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
correct_edge_dropping = true
mu = 1.0
c_t = 1.0e5
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[Preconditioning]
[vcp]
type = VCP
full = true
lm_variable = 'lm_x lm_y'
primary_variable = 'disp_x disp_y'
preconditioner = 'LU'
is_lm_coupling_diagonal = false
adaptive_condensation = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' 1e-8 NONZERO 1e-15'
line_search = none
dt = 0.1
dtmin = 0.1
end_time = 1.0
l_max_its = 100
nl_max_its = 20
nl_rel_tol = 1e-8
snesmf_reuse_base = false
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[avg_disp_x]
type = ElementAverageValue
variable = disp_x
block = '1 2'
[]
[avg_disp_y]
type = ElementAverageValue
variable = disp_y
block = '1 2'
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
[]
[min_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
value_type = min
[]
[min_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
value_type = min
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[tot_lin_it]
type = CumulativeValuePostprocessor
postprocessor = num_lin_it
[]
[tot_nonlin_it]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[max_norma_lm]
type = ElementExtremeValue
variable = normal_lm
[]
[min_norma_lm]
type = ElementExtremeValue
variable = normal_lm
value_type = min
[]
[]
[VectorPostprocessors]
[normal_lm]
type = NodalValueSampler
block = 'secondary_lower'
variable = normal_lm
sort_by = 'y'
[]
[tangent_lm]
type = NodalValueSampler
block = 'secondary_lower'
variable = tangent_lm
sort_by = 'y'
[]
[]
(test/tests/fvics/function_ic/parsed_function.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 3.1416
ymin = 0
ymax = 3.1416
nx = 10
ny = 10
[]
[]
[Variables]
[u]
type = MooseVariableFVReal
[]
[]
[Functions]
[parsed_function]
type = ParsedFunction
expression = 'sin(x)-cos(y/2)'
[]
[]
[FVICs]
[u_ic]
type = FVFunctionIC
variable = 'u'
function = parsed_function
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
exodus = true
[]
(test/tests/restart/restart_subapp_not_parent/two_step_solve_sub_restart.i)
[Mesh]
file = two_step_solve_parent_full_solve0_checkpoint_cp/0002-mesh.cpr
[]
[Problem]
restart_file_base = two_step_solve_parent_full_solve0_checkpoint_cp/LATEST
force_restart = true
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*t*(x*x+y*y)
[../]
[./forcing_fn]
type = ParsedFunction
expression = 2*t*(x*x+y*y)-4*t*t
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]
# Initial Condition will come from the restart file
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[../]
[]
[Postprocessors]
[./average]
type = ElementAverageValue
variable = u
[../]
[]
[Executioner]
type = Transient
end_time = 2.0
dt = 1.0
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/3d-mortar-contact/frictional-mortar-3d-function.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[mortar_tangent_x]
family = LAGRANGE
order = FIRST
[]
[mortar_tangent_y]
family = LAGRANGE
order = FIRST
[]
[mortar_tangent_z]
family = LAGRANGE
order = FIRST
[]
[]
[Functions]
# x: Contact pressure
# y: Magnitude of tangential relative velocity
# z: Temperature (to be implemented)
[mu_function]
type = ParsedFunction
expression = '0.3 + (0.7 - 0.3) * 2.17^(-0.5/y) - x/10000'
[]
[]
[AuxKernels]
[friction_x_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_x
component = 0
boundary = 'top_bottom'
[]
[friction_y_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_y
component = 1
boundary = 'top_bottom'
[]
[friction_z_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_z
component = 2
boundary = 'top_bottom'
[]
[]
[Mesh]
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
uniform_refine = 0
allow_renumbering = false
[]
[Variables]
[mortar_normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[mortar_tangential_lm]
block = 'secondary_lower'
use_dual = true
[]
[mortar_tangential_3d_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = true
strain = FINITE
block = '1 2'
use_automatic_differentiation = false
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_zz'
[]
[]
[Materials]
[tensor]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1.0e4
poissons_ratio = 0.0
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[tensor_1000]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e5
poissons_ratio = 0.0
[]
[stress_1000]
type = ComputeFiniteStrainElasticStress
block = '2'
[]
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_variable_normal = mortar_normal_lm
lm_variable_tangential_one = mortar_tangential_lm
lm_variable_tangential_two = mortar_tangential_3d_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
[]
[]
[Constraints]
[friction]
type = ComputeFrictionalForceLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
# mu = 0.4
function_friction = mu_function
c = 1e4
c_t = 1.0e6
friction_lm = mortar_tangential_lm
friction_lm_dir = mortar_tangential_3d_lm
weighted_gap_uo = weighted_vel_uo
weighted_velocities_uo = weighted_vel_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_x
component = x
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_y
component = y
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_z
component = z
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 'top_top'
function = '0.1*t'
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = .05
dt = .025
dtmin = .001
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-14 1e-5'
l_max_its = 15
nl_max_its = 30
nl_rel_tol = 1e-11
nl_abs_tol = 1e-12
line_search = 'basic'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'contact'
[contact]
type = ContactDOFSetSize
variable = mortar_normal_lm
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_normal_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[frictional-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangential_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[frictional-pressure-3d]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangential_3d_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[tangent_x]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangent_x
sort_by = 'id'
execute_on = NONLINEAR
[]
[tangent_y]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangent_y
sort_by = 'id'
execute_on = NONLINEAR
[]
[]
(modules/xfem/test/tests/moment_fitting/solid_mechanics_moment_fitting.i)
# Test for a mechanics problem which uses four points moment_fitting approach.
# See this paper (https://doi.org/10.1007/s00466-018-1544-2) for more details about moment_fitting approach.
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
elem_type = QUAD4
[]
[UserObjects]
[./line_seg_cut_uo0]
type = LineSegmentCutUserObject
cut_data = '0.0000e+00 6.3330e-01 3.9000e-01 6.3330e-01'
time_start_cut = 0.0
time_end_cut = 0.0
[../]
[./line_seg_cut_uo1]
type = LineSegmentCutUserObject
cut_data = '3.9000e-01 6.3330e-01 6.8000e-01 6.3330e-01'
time_start_cut = 0.0
time_end_cut = 0.0
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
strain = SMALL
[../]
[]
[Functions]
[./right_trac_x]
type = ParsedFunction
expression = '-(t*M*y)/I'
symbol_names = 'M E I'
symbol_values = '2e4 1e6 0.666666667'
[../]
[./bottom_disp_y]
type = ParsedFunction
expression = '((t*M)/(2*E*I))*(1-nu*nu)*(x*x-0.25*l*l)'
symbol_names = 'M E I l nu'
symbol_values = '2e4 1e6 0.666666667 2.0 0.3'
[../]
[./soln_x]
type = ParsedFunction
expression = '-(M/(E*I))*(1-nu*nu)*x*y'
symbol_names = 'M E I nu'
symbol_values = '2e4 1e6 0.666666667 0.3'
[../]
[./soln_y]
type = ParsedFunction
expression = '(M/(2*E*I))*(1-nu*nu)*(x*x-0.25*l*l+(nu/(1-nu))*y*y)'
symbol_names = 'M E I l nu'
symbol_values = '2e4 1e6 0.666666667 2.0 0.3'
[../]
[]
[BCs]
[./right_x]
type = FunctionNeumannBC
boundary = 1
variable = disp_x
function = right_trac_x
[../]
[./bottom_y]
type = FunctionDirichletBC
boundary = 0
variable = disp_y
function = bottom_disp_y
[../]
[./left_x]
type = DirichletBC
boundary = 3
variable = disp_x
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
line_search = 'none'
# [./Quadrature]
# order = FOURTH
# type = MONOMIAL
# [../]
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
# controls for linear iterations
l_max_its = 100
l_tol = 1e-2
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-16
nl_abs_tol = 1e-10
# time control
start_time = 0.0
dt = 0.5
end_time = 1.0
num_steps = 5000
[]
[Postprocessors]
[./numel]
type = NumElems
execute_on = timestep_end
[../]
[./integral]
type = ElementVectorL2Error
var_x = disp_x
var_y = disp_y
function_x = soln_x
function_y = soln_y
execute_on = timestep_end
[../]
[]
[Outputs]
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/variables/fe_hier/hier-2-3d.i)
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
nx = 1
ny = 1
nz = 1
elem_type = HEX27
# This problem only has 1 element, so using DistributedMesh in parallel
# isn't really an option, and we don't care that much about DistributedMesh
# in serial.
parallel_type = replicated
[]
[Functions]
[./bc_fnt]
type = ParsedFunction
expression = 2*y
[../]
[./bc_fnb]
type = ParsedFunction
expression = -2*y
[../]
[./bc_fnl]
type = ParsedFunction
expression = -2*x
[../]
[./bc_fnr]
type = ParsedFunction
expression = 2*x
[../]
[./bc_fnf]
type = ParsedFunction
expression = 2*z
[../]
[./bc_fnk]
type = ParsedFunction
expression = -2*z
[../]
[./forcing_fn]
type = ParsedFunction
expression = -6+x*x+y*y+z*z
[../]
[./solution]
type = ParsedGradFunction
expression = x*x+y*y+z*z
grad_x = 2*x
grad_y = 2*y
grad_z = 2*z
[../]
[]
[Variables]
[./u]
order = SECOND
family = HIERARCHIC
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./bc_top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = bc_fnt
[../]
[./bc_bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bc_fnb
[../]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[./bc_front]
type = FunctionNeumannBC
variable = u
boundary = 'front'
function = bc_fnf
[../]
[./bc_back]
type = FunctionNeumannBC
variable = u
boundary = 'back'
function = bc_fnk
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = 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/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/varying-eps-basic-kt-primitive.i)
[GlobalParams]
fp = fp
limiter = 'central_difference'
two_term_boundary_expansion = true
[]
[Mesh]
[cartesian]
type = GeneratedMeshGenerator
dim = 1
xmin = .1
xmax = .6
nx = 2
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Problem]
fv_bcs_integrity_check = false
[]
[Variables]
[pressure]
type = MooseVariableFVReal
[]
[sup_vel_x]
type = MooseVariableFVReal
[]
[T_fluid]
type = MooseVariableFVReal
[]
[]
[ICs]
[pressure]
type = FunctionIC
variable = pressure
function = 'exact_p'
[]
[sup_vel_x]
type = FunctionIC
variable = sup_vel_x
function = 'exact_sup_vel_x'
[]
[T_fluid]
type = FunctionIC
variable = T_fluid
function = 'exact_T'
[]
[]
[FVKernels]
[mass_advection]
type = PCNSFVKT
variable = pressure
eqn = "mass"
[]
[mass_fn]
type = FVBodyForce
variable = pressure
function = 'forcing_rho'
[]
[momentum_x_advection]
type = PCNSFVKT
variable = sup_vel_x
momentum_component = x
eqn = "momentum"
[]
[eps_grad]
type = PNSFVPGradEpsilon
variable = sup_vel_x
momentum_component = 'x'
epsilon_function = 'eps'
[]
[momentum_fn]
type = FVBodyForce
variable = sup_vel_x
function = 'forcing_rho_ud'
[]
[fluid_energy_advection]
type = PCNSFVKT
variable = T_fluid
eqn = "energy"
[]
[energy_fn]
type = FVBodyForce
variable = T_fluid
function = 'forcing_rho_et'
[]
[]
[FVBCs]
[mass_left]
variable = pressure
type = PCNSFVStrongBC
boundary = left
T_fluid = 'exact_T'
superficial_velocity = 'exact_superficial_velocity'
eqn = 'mass'
[]
[momentum_left]
variable = sup_vel_x
type = PCNSFVStrongBC
boundary = left
T_fluid = 'exact_T'
superficial_velocity = 'exact_superficial_velocity'
eqn = 'momentum'
momentum_component = 'x'
[]
[energy_left]
variable = T_fluid
type = PCNSFVStrongBC
boundary = left
T_fluid = 'exact_T'
superficial_velocity = 'exact_superficial_velocity'
eqn = 'energy'
[]
[mass_right]
variable = pressure
type = PCNSFVStrongBC
boundary = right
eqn = 'mass'
pressure = 'exact_p'
[]
[momentum_right]
variable = sup_vel_x
type = PCNSFVStrongBC
boundary = right
eqn = 'momentum'
momentum_component = 'x'
pressure = 'exact_p'
[]
[energy_right]
variable = T_fluid
type = PCNSFVStrongBC
boundary = right
eqn = 'energy'
pressure = 'exact_p'
[]
# help gradient reconstruction
[pressure_right]
type = FVFunctionDirichletBC
variable = pressure
function = exact_p
boundary = 'right'
[]
[sup_vel_x_left]
type = FVFunctionDirichletBC
variable = sup_vel_x
function = exact_sup_vel_x
boundary = 'left'
[]
[T_fluid_left]
type = FVFunctionDirichletBC
variable = T_fluid
function = exact_T
boundary = 'left'
[]
[]
[Materials]
[var_mat]
type = PorousPrimitiveVarMaterial
pressure = pressure
superficial_vel_x = sup_vel_x
T_fluid = T_fluid
porosity = porosity
[]
[porosity]
type = GenericFunctionMaterial
prop_names = 'porosity'
prop_values = 'eps'
[]
[]
[Functions]
[exact_rho]
type = ParsedFunction
expression = '3.48788261470924*cos(x)'
[]
[forcing_rho]
type = ParsedFunction
expression = '-3.83667087618017*sin(1.1*x)*cos(1.3*x) - 4.53424739912202*sin(1.3*x)*cos(1.1*x)'
[]
[exact_rho_ud]
type = ParsedFunction
expression = '3.48788261470924*cos(1.1*x)*cos(1.3*x)'
[]
[forcing_rho_ud]
type = ParsedFunction
expression = '(-(10.6975765229419*cos(1.5*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + (10.6975765229419*sin(x)*cos(1.5*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 16.0463647844128*sin(1.5*x)/cos(x))*cos(x))*cos(1.3*x) + 3.48788261470924*sin(x)*cos(1.1*x)^2*cos(1.3*x)/cos(x)^2 - 7.67334175236034*sin(1.1*x)*cos(1.1*x)*cos(1.3*x)/cos(x) - 4.53424739912202*sin(1.3*x)*cos(1.1*x)^2/cos(x)'
[]
[exact_rho_et]
type = ParsedFunction
expression = '26.7439413073546*cos(1.5*x)'
[]
[forcing_rho_et]
type = ParsedFunction
expression = '1.0*(3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.5*x))*sin(x)*cos(1.1*x)*cos(1.3*x)/cos(x)^2 - 1.1*(3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.5*x))*sin(1.1*x)*cos(1.3*x)/cos(x) - 1.3*(3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.5*x))*sin(1.3*x)*cos(1.1*x)/cos(x) + 1.0*(-(10.6975765229419*cos(1.5*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + (10.6975765229419*sin(x)*cos(1.5*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 16.0463647844128*sin(1.5*x)/cos(x))*cos(x) - 40.1159119610319*sin(1.5*x))*cos(1.1*x)*cos(1.3*x)/cos(x)'
[]
[exact_T]
type = ParsedFunction
expression = '0.0106975765229418*cos(1.5*x)/cos(x) - 0.000697576522941848*cos(1.1*x)^2/cos(x)^2'
[]
[exact_eps_p]
type = ParsedFunction
expression = '3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x)*cos(1.3*x)'
[]
[exact_p]
type = ParsedFunction
expression = '3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x)'
[]
[exact_sup_vel_x]
type = ParsedFunction
expression = '1.0*cos(1.1*x)*cos(1.3*x)/cos(x)'
[]
[eps]
type = ParsedFunction
expression = 'cos(1.3*x)'
[]
[exact_superficial_velocity]
type = ParsedVectorFunction
expression_x = '1.0*cos(1.1*x)*cos(1.3*x)/cos(x)'
[]
[]
[Executioner]
solve_type = NEWTON
type = Transient
num_steps = 1
dtmin = 1
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_max_its = 50
line_search = bt
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
[]
[Outputs]
exodus = true
csv = true
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2pressure]
type = ElementL2Error
variable = pressure
function = exact_p
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2sup_vel_x]
variable = sup_vel_x
function = exact_sup_vel_x
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2T_fluid]
variable = T_fluid
function = exact_T
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/steady_fsp_diagonal_of_a_for_scaling.i)
rho=1
mu=2e-3
U=1
l=1
prefactor=${fparse 1/(l/2)^2}
n=64
[GlobalParams]
gravity = '0 0 0'
[]
[Mesh]
[gen]
type = DistributedRectilinearMeshGenerator
dim = 2
xmin = 0
xmax = ${l}
ymin = 0
ymax = ${l}
nx = ${n}
ny = ${n}
elem_type = QUAD4
[]
second_order = true
parallel_type = distributed
[]
[Variables]
[vel_x]
order = SECOND
family = LAGRANGE
[]
[vel_y]
order = SECOND
family = LAGRANGE
[]
[p]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[mass]
type = INSMass
variable = p
u = vel_x
v = vel_y
pressure = p
[]
[x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[]
[y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[]
[]
[BCs]
[x_no_slip]
type = DirichletBC
variable = vel_x
boundary = 'bottom right left'
value = 0.0
[]
[lid]
type = FunctionDirichletBC
variable = vel_x
boundary = 'top'
function = 'lid_function'
[]
[y_no_slip]
type = DirichletBC
variable = vel_y
boundary = 'bottom right top left'
value = 0.0
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[]
[Functions]
[lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '${prefactor}*${U}*x*(${l}-x)'
[]
[]
[Problem]
type = NavierStokesProblem
[]
[Preconditioning]
[FSP]
type = FSP
topsplit = 'up'
[up]
splitting = 'u p'
splitting_type = schur
petsc_options_iname = '-pc_fieldsplit_schur_fact_type -pc_fieldsplit_schur_precondition -ksp_gmres_restart -ksp_type -ksp_pc_side -ksp_rtol'
petsc_options_value = 'full self 300 fgmres right 1e-4'
[]
[u]
vars = 'vel_x vel_y'
# petsc_options = '-ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_type -ksp_rtol -ksp_gmres_restart -ksp_pc_side'
petsc_options_value = 'hypre boomeramg gmres 1e-2 300 right'
[]
[p]
vars = 'p'
petsc_options = '-pc_lsc_scale_diag -ksp_converged_reason'# -lsc_ksp_converged_reason -lsc_ksp_monitor_true_residual
petsc_options_iname = '-ksp_type -ksp_gmres_restart -ksp_rtol -pc_type -ksp_pc_side -lsc_pc_type -lsc_pc_hypre_type -lsc_ksp_type -lsc_ksp_rtol -lsc_ksp_pc_side -lsc_ksp_gmres_restart'
petsc_options_value = 'fgmres 300 1e-2 lsc right hypre boomeramg gmres 1e-1 right 300'
[]
[]
[]
[Postprocessors]
[pavg]
type = ElementAverageValue
variable = p
[]
[]
[UserObjects]
[set_pressure]
type = NSPressurePin
pin_type = 'average'
variable = p
pressure_average = 'pavg'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
[exo]
type = Exodus
execute_on = 'final'
hide = 'pavg'
[]
[]
(modules/contact/test/tests/sliding_block/in_and_out/frictionless_kinematic.i)
# This is a benchmark test that checks constraint based frictionless
# contact using the kinematic method. In this test a sinusoidal
# displacement is applied in the horizontal direction to simulate
# a small block come in and out of contact as it slides down a larger block.
#
# The sinusoid is of the form 0.4sin(4t)+0.2. The gold file is run
# on one processor and the benchmark
# case is run on a minimum of 4 processors to ensure no parallel variability
# in the contact pressure and penetration results. Further documentation can
# found in moose/modules/contact/doc/sliding_block/
#
[Mesh]
file = sliding_elastic_blocks_2d.e
patch_size = 80
[]
[GlobalParams]
volumetric_locking_correction = false
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./penetration]
[../]
[./inc_slip_x]
[../]
[./inc_slip_y]
[../]
[./accum_slip_x]
[../]
[./accum_slip_y]
[../]
[]
[Functions]
[./vertical_movement]
type = ParsedFunction
expression = -t
[../]
[./horizontal_movement]
type = ParsedFunction
expression = -0.04*sin(4*t)+0.02
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
strain = FINITE
[../]
[]
[AuxKernels]
[./zeroslip_x]
type = ConstantAux
variable = inc_slip_x
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./zeroslip_y]
type = ConstantAux
variable = inc_slip_y
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./accum_slip_x]
type = AccumulateAux
variable = accum_slip_x
accumulate_from_variable = inc_slip_x
execute_on = timestep_end
[../]
[./accum_slip_y]
type = AccumulateAux
variable = accum_slip_y
accumulate_from_variable = inc_slip_y
execute_on = timestep_end
[../]
[./penetration]
type = PenetrationAux
variable = penetration
boundary = 3
paired_boundary = 2
[../]
[]
[Postprocessors]
[./nonlinear_its]
type = NumNonlinearIterations
execute_on = timestep_end
[../]
[./penetration]
type = NodalVariableValue
variable = penetration
nodeid = 222
[../]
[./contact_pressure]
type = NodalVariableValue
variable = contact_pressure
nodeid = 222
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./right_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = horizontal_movement
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = vertical_movement
[../]
[]
[Materials]
[./left]
type = ComputeIsotropicElasticityTensor
block = '1 2'
youngs_modulus = 1e6
poissons_ratio = 0.3
constant_on = SUBDOMAIN
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -sub_pc_type -pc_asm_overlap -ksp_gmres_restart'
petsc_options_value = 'asm lu 20 101'
line_search = 'none'
l_max_its = 100
nl_max_its = 1000
dt = 0.1
end_time = 15
num_steps = 1000
l_tol = 1e-6
nl_rel_tol = 1e-10
nl_abs_tol = 1e-6
dtmin = 0.01
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
[]
[Outputs]
time_step_interval = 10
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[./console]
type = Console
max_rows = 5
[../]
[]
[Contact]
[./leftright]
secondary = 3
primary = 2
model = frictionless
penalty = 1e+6
normal_smoothing_distance = 0.1
[../]
[]
(modules/solid_mechanics/test/tests/lagrangian/materials/badproperties/stvenantkirchhoff.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
[]
[]
[Functions]
[strain]
type = ParsedFunction
expression = 't'
[]
[]
[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_x]
type = FunctionDirichletBC
boundary = right
variable = disp_x
function = strain
[]
[]
[Materials]
[elastic_tensor]
type = ComputeElasticityTensor
C_ijkl = '102272 113636 113636 1022726 454545'
fill_method = axisymmetric_rz
[]
[compute_stress]
type = ComputeStVenantKirchhoffStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[AuxVariables]
[s11]
family = MONOMIAL
order = CONSTANT
[]
[s21]
family = MONOMIAL
order = CONSTANT
[]
[s31]
family = MONOMIAL
order = CONSTANT
[]
[s12]
family = MONOMIAL
order = CONSTANT
[]
[s22]
family = MONOMIAL
order = CONSTANT
[]
[s32]
family = MONOMIAL
order = CONSTANT
[]
[s13]
family = MONOMIAL
order = CONSTANT
[]
[s23]
family = MONOMIAL
order = CONSTANT
[]
[s33]
family = MONOMIAL
order = CONSTANT
[]
[F11]
family = MONOMIAL
order = CONSTANT
[]
[F21]
family = MONOMIAL
order = CONSTANT
[]
[F31]
family = MONOMIAL
order = CONSTANT
[]
[F12]
family = MONOMIAL
order = CONSTANT
[]
[F22]
family = MONOMIAL
order = CONSTANT
[]
[F32]
family = MONOMIAL
order = CONSTANT
[]
[F13]
family = MONOMIAL
order = CONSTANT
[]
[F23]
family = MONOMIAL
order = CONSTANT
[]
[F33]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[s11]
type = RankTwoAux
variable = s11
rank_two_tensor = pk1_stress
index_i = 0
index_j = 0
[]
[s21]
type = RankTwoAux
variable = s21
rank_two_tensor = pk1_stress
index_i = 1
index_j = 0
[]
[s31]
type = RankTwoAux
variable = s31
rank_two_tensor = pk1_stress
index_i = 2
index_j = 0
[]
[s12]
type = RankTwoAux
variable = s12
rank_two_tensor = pk1_stress
index_i = 0
index_j = 1
[]
[s22]
type = RankTwoAux
variable = s22
rank_two_tensor = pk1_stress
index_i = 1
index_j = 1
[]
[s32]
type = RankTwoAux
variable = s32
rank_two_tensor = pk1_stress
index_i = 2
index_j = 1
[]
[s13]
type = RankTwoAux
variable = s13
rank_two_tensor = pk1_stress
index_i = 0
index_j = 2
[]
[s23]
type = RankTwoAux
variable = s23
rank_two_tensor = pk1_stress
index_i = 1
index_j = 2
[]
[s33]
type = RankTwoAux
variable = s33
rank_two_tensor = pk1_stress
index_i = 2
index_j = 2
[]
[F11]
type = RankTwoAux
variable = F11
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 0
[]
[F21]
type = RankTwoAux
variable = F21
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 0
[]
[F31]
type = RankTwoAux
variable = F31
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 0
[]
[F12]
type = RankTwoAux
variable = F12
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 1
[]
[F22]
type = RankTwoAux
variable = F22
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 1
[]
[F32]
type = RankTwoAux
variable = F32
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 1
[]
[F13]
type = RankTwoAux
variable = F13
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 2
[]
[F23]
type = RankTwoAux
variable = F23
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 2
[]
[F33]
type = RankTwoAux
variable = F33
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 2
[]
[]
[Postprocessors]
[s11]
type = ElementAverageValue
variable = s11
execute_on = 'initial timestep_end'
[]
[s21]
type = ElementAverageValue
variable = s21
execute_on = 'initial timestep_end'
[]
[s31]
type = ElementAverageValue
variable = s31
execute_on = 'initial timestep_end'
[]
[s12]
type = ElementAverageValue
variable = s12
execute_on = 'initial timestep_end'
[]
[s22]
type = ElementAverageValue
variable = s22
execute_on = 'initial timestep_end'
[]
[s32]
type = ElementAverageValue
variable = s32
execute_on = 'initial timestep_end'
[]
[s13]
type = ElementAverageValue
variable = s13
execute_on = 'initial timestep_end'
[]
[s23]
type = ElementAverageValue
variable = s23
execute_on = 'initial timestep_end'
[]
[s33]
type = ElementAverageValue
variable = s33
execute_on = 'initial timestep_end'
[]
[F11]
type = ElementAverageValue
variable = F11
execute_on = 'initial timestep_end'
[]
[F21]
type = ElementAverageValue
variable = F21
execute_on = 'initial timestep_end'
[]
[F31]
type = ElementAverageValue
variable = F31
execute_on = 'initial timestep_end'
[]
[F12]
type = ElementAverageValue
variable = F12
execute_on = 'initial timestep_end'
[]
[F22]
type = ElementAverageValue
variable = F22
execute_on = 'initial timestep_end'
[]
[F32]
type = ElementAverageValue
variable = F32
execute_on = 'initial timestep_end'
[]
[F13]
type = ElementAverageValue
variable = F13
execute_on = 'initial timestep_end'
[]
[F23]
type = ElementAverageValue
variable = F23
execute_on = 'initial timestep_end'
[]
[F33]
type = ElementAverageValue
variable = F33
execute_on = 'initial timestep_end'
[]
[]
[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 = 5
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.01
dtmin = 0.01
end_time = 0.01
[]
[Outputs]
exodus = false
[]
(modules/contact/test/tests/non-singular-frictional-mortar/frictional-mortar.i)
offset = 0.0202
vy = 0.15
vx = 0.040
refine = 1
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
[./original_file_mesh]
type = FileMeshGenerator
file = long_short_blocks.e
[../]
uniform_refine = ${refine}
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
scaling = 1e-6
[../]
[]
[Functions]
[./horizontal_movement]
type = ParsedFunction
expression = 'if(t<1.0,${vx}*t-${offset},${vx}-${offset})'
[../]
[./vertical_movement]
type = ParsedFunction
expression = 'if(t<1.0,${offset},${vy}*(t-1.0)+${offset})'
[../]
[]
[BCs]
[./push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 30
function = horizontal_movement
[../]
[./fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[../]
[./fix_right_y]
type = DirichletBC
variable = disp_y
boundary = '40'
value = 0.0
[../]
[./push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = '30'
function = vertical_movement
[../]
[]
[Materials]
[./elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[../]
[./stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[../]
[./elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[../]
[./stress_right]
type = ComputeFiniteStrainElasticStress
block = 2
[../]
[]
[Contact]
[leftright]
secondary = 10
primary = 20
model = coulomb
formulation = mortar
friction_coefficient = 0.2
c_tangential = 1e3
normal_lm_scaling = 1e-3
tangential_lm_scaling = 1e-3
[../]
[]
[ICs]
[./disp_y]
block = 1
variable = disp_y
value = ${offset}
type = ConstantIC
[../]
[./disp_x]
block = 1
variable = disp_x
value = -${offset}
type = ConstantIC
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor -snes_ksp_ew -pc_svd_monitor'
petsc_options_iname = '-pc_type -mat_mffd_err'
petsc_options_value = 'svd 1e-5'
dt = 0.1
dtmin = 0.1
num_steps = 7
end_time = 4
line_search = none
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[./exodus]
type = Exodus
[../]
[]
(python/peacock/tests/common/transient.i)
###########################################################
# This is a simple test with a time-dependent problem
# demonstrating the use of a "Transient" Executioner.
#
# @Requirement F1.10
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./dt]
type = TimestepSize
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
# Preconditioned JFNK (default)
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_transient
exodus = true
[]
(modules/solid_mechanics/test/tests/umat/print_c/print_c.i)
# Testing the UMAT Interface - linear elastic model using the large strain formulation.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[]
[Functions]
[top_pull]
type = ParsedFunction
expression = -t
[]
[]
[AuxVariables]
[strain_yy]
family = MONOMIAL
order = FIRST
[]
[]
[AuxKernels]
[strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 1
index_j = 1
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
[]
[]
[BCs]
[Pressure]
[bc_presssure]
boundary = top
function = top_pull
[]
[]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[z_bot]
type = DirichletBC
variable = disp_z
boundary = front
value = 0.0
[]
[]
[Materials]
[umat]
type = AbaqusUMATStress
constant_properties = '210000 0.3'
plugin = '../../../plugins/elastic_print_c'
num_state_vars = 0
external_fields = 'strain_yy'
use_one_based_indexing = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
end_time = 10
dt = 10.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(test/tests/indicators/analytical_indicator/analytical_indicator_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 10
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Functions]
[solution]
type = ParsedFunction
expression = (exp(x)-1)/(exp(1)-1)
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[conv]
type = Convection
variable = u
velocity = '1 0 0'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Adaptivity]
[Indicators]
[error]
type = AnalyticalIndicator
variable = u
function = solution
[]
[]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/materials/flow_diode/transient_operation.i)
# Horizontal H junction with flow in different directions in the two branches
# One of the branches has a diode against the direction of the flow that can
# be triggered using the Controls
# There are 3 different strategies available for the diode blocking the flow
# - based on a time trigger
# - based on a pressure drop (here chosen across the diode)
# - based on a mass flow rate (here chosen through the diode)
mu = 0.1
rho = 10
nx = 10
ny = 5
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1 0.3 1'
dy = '0.5 0.2 0.5'
ix = '${nx} ${fparse nx/2} ${nx}'
iy = '${ny} ${ny} ${ny}'
subdomain_id = '1 1 1
2 1 2
3 4 1'
[]
[add_walls]
type = SideSetsBetweenSubdomainsGenerator
input = 'cmg'
primary_block = '1 3 4'
paired_block = '2'
new_boundary = 'walls'
[]
[remove_wall_blocks]
type = BlockDeletionGenerator
input = add_walls
block = 2
[]
# Add inlets and outlets
[top_left]
type = ParsedGenerateSideset
input = remove_wall_blocks
combinatorial_geometry = 'x<0.001 & y>0.6'
new_sideset_name = top_left
[]
[bottom_left]
type = ParsedGenerateSideset
input = top_left
combinatorial_geometry = 'x<0.001 & y<0.6'
new_sideset_name = bottom_left
[]
[top_right]
type = ParsedGenerateSideset
input = bottom_left
combinatorial_geometry = 'x>2.299 & y>0.6'
new_sideset_name = top_right
[]
[bottom_right]
type = ParsedGenerateSideset
input = top_right
combinatorial_geometry = 'x>2.299 & y<0.6'
new_sideset_name = bottom_right
[]
# Extra surfaces
[diode_inlet]
type = SideSetsBetweenSubdomainsGenerator
input = bottom_right
primary_block = 4
paired_block = 3
new_boundary = 'diode_inlet'
[]
[mid_section]
type = SideSetsBetweenSubdomainsGenerator
input = diode_inlet
primary_block = 4
paired_block = 1
new_boundary = 'mid_connection'
[]
[reduce_blocks]
type = RenameBlockGenerator
input = 'mid_section'
old_block = '4 3 1'
new_block = '1 diode fluid'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'pins_rhie_chow_interpolator'
advected_interp_method = 'upwind'
velocity_interp_method = 'rc'
[]
[Modules]
[NavierStokesFV]
compressibility = 'incompressible'
porous_medium_treatment = true
density = ${rho}
dynamic_viscosity = ${mu}
initial_velocity = '1e-6 1e-6 0'
initial_pressure = 0.0
inlet_boundaries = 'bottom_left top_right'
momentum_inlet_types = 'fixed-velocity fixed-velocity'
momentum_inlet_function = '1 0; -1 0'
wall_boundaries = 'top bottom walls'
momentum_wall_types = 'noslip noslip noslip'
outlet_boundaries = 'bottom_right top_left'
momentum_outlet_types = 'fixed-pressure fixed-pressure'
pressure_function = '1 1'
friction_blocks = 'fluid; diode'
friction_types = 'darcy forchheimer; darcy forchheimer'
# Base friction
# friction_coeffs = 'Darcy Forchheimer; Darcy Forchheimer'
# Combined with diode
friction_coeffs = 'combined_linear combined_quadratic; combined_linear combined_quadratic'
# Porosity jump treatment
# Option 1: diffusion correction
use_friction_correction = true
consistent_scaling = 10
# Option 2: bernouilli jump
# porosity_interface_pressure_treatment = bernoulli
mass_advection_interpolation = 'average'
momentum_advection_interpolation = 'average'
[]
[]
[FunctorMaterials]
[porosity]
type = ADGenericFunctorMaterial
prop_names = 'porosity'
prop_values = '0.5'
[]
[base_friction]
type = ADGenericVectorFunctorMaterial
prop_names = 'Darcy Forchheimer'
prop_values = '220 240 260 0 0 0'
[]
# Material definitions needed for the diode
[diode]
type = NSFVFrictionFlowDiodeFunctorMaterial
# Friction only in X direction
direction = '-1 0 0'
additional_linear_resistance = '20000 0 0'
additional_quadratic_resistance = '0 0 0'
base_linear_friction_coefs = 'Darcy'
base_quadratic_friction_coefs = 'Forchheimer'
sum_linear_friction_name = 'diode_linear'
sum_quadratic_friction_name = 'diode_quad'
block = 'diode'
turn_on_diode = false
[]
[combine_linear_friction]
type = ADPiecewiseByBlockVectorFunctorMaterial
prop_name = 'combined_linear'
subdomain_to_prop_value = 'fluid Darcy
diode diode_linear'
[]
[combine_quadratic_friction]
type = ADPiecewiseByBlockVectorFunctorMaterial
prop_name = 'combined_quadratic'
subdomain_to_prop_value = 'fluid Forchheimer
diode diode_quad'
[]
# density is constant
[momentum]
type = ADGenericVectorFunctorMaterial
prop_names = 'momentum'
prop_values = 'superficial_vel_x superficial_vel_y 0'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_shift_type -ksp_gmres_restart'
petsc_options_value = 'lu NONZERO 200'
line_search = 'none'
end_time = 0.2
dt = 0.015
nl_abs_tol = 1e-12
[]
[Controls]
active = 'pdrop_based'
# Case 1: Diode turns on at a certain time and blocks (adds friction) flow at a given time
[time_based]
type = BoolFunctionControl
function = time_function
parameter = 'FunctorMaterials/diode/turn_on_diode'
execute_on = timestep_begin
[]
# Case 2: Diode looks at pressure drop, reduces flow if positive pressure drop
# This will not oscillate as the diode increases the pressure drop
[pdrop_based]
type = BoolFunctionControl
function = pdrop_positive
parameter = 'FunctorMaterials/diode/turn_on_diode'
execute_on = timestep_begin
[]
# Case 3: Diode looks at flow direction & quantity, reduces flow if too much flow
# in a given direction
# This will oscillate (turn on/off on each step) if the action of turning the diode
# makes the amount of flow smaller than the threshold for turning on the diode
[flow_based]
type = BoolFunctionControl
function = velocity_big_enough
parameter = 'FunctorMaterials/diode/turn_on_diode'
execute_on = timestep_begin
[]
[]
[Functions]
# Functions are used to parse postprocessors and provide them to a BoolFunctionControl
[time_function]
type = ParsedFunction
expression = 'if(t<0.1, 0, 1)'
[]
[pdrop_positive]
type = ParsedFunction
expression = 'if(pdrop_diode>100, 1, 0)'
symbol_names = pdrop_diode
symbol_values = pdrop_diode
[]
[velocity_big_enough]
type = ParsedFunction
expression = 'if(flow_diode<-0.4, 1, 0)'
symbol_names = flow_diode
symbol_values = flow_diode
[]
[]
[Postprocessors]
# Analysis of the simulation
[mdot_top]
type = VolumetricFlowRate
boundary = 'top_right'
vel_x = superficial_vel_x
vel_y = superficial_vel_y
advected_quantity = ${rho}
[]
[mdot_bottom]
type = VolumetricFlowRate
boundary = 'bottom_right'
vel_x = superficial_vel_x
vel_y = superficial_vel_y
advected_quantity = ${rho}
[]
[mdot_middle]
type = VolumetricFlowRate
boundary = 'mid_connection'
vel_x = superficial_vel_x
vel_y = superficial_vel_y
advected_quantity = ${rho}
[]
[pdrop_top_channel]
type = PressureDrop
upstream_boundary = 'top_left'
downstream_boundary = 'top_right'
weighting_functor = 'momentum'
boundary = 'top_left top_right'
pressure = pressure
[]
[pdrop_bottom_channel]
type = PressureDrop
upstream_boundary = 'bottom_left'
downstream_boundary = 'bottom_right'
weighting_functor = 'momentum'
boundary = 'bottom_left bottom_right'
pressure = pressure
[]
# Diode operation
[pdrop_diode]
type = PressureDrop
upstream_boundary = 'diode_inlet'
downstream_boundary = 'top_left'
weighting_functor = 'momentum'
boundary = 'diode_inlet top_left'
pressure = pressure
[]
[flow_diode]
type = VolumetricFlowRate
boundary = 'diode_inlet'
vel_x = superficial_vel_x
vel_y = superficial_vel_y
advected_quantity = ${rho}
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/richards/test/tests/mass/m_fu_01.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 2
xmin = -1
xmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = DensityConstBulk
relperm_UO = RelPermPower
SUPG_UO = SUPGstandard
sat_UO = Saturation
seff_UO = SeffVG
[]
[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 = x
[../]
[]
[Postprocessors]
[./total_mass]
type = RichardsMass
variable = pressure
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFullyUpwindFlux
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]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1 1 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E-10
end_time = 1E-10
[]
[Outputs]
execute_on = 'timestep_end'
file_base = m_fu_01
csv = true
[]
(test/tests/variables/fe_hier/hier-1-1d.i)
###########################################################
# This is a simple test demonstrating the use of the
# Hierarchic variable type.
#
# @Requirement F3.10
###########################################################
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -1
xmax = 1
nx = 5
elem_type = EDGE3
[]
[Functions]
[./bc_fnl]
type = ParsedFunction
expression = -1
[../]
[./bc_fnr]
type = ParsedFunction
expression = 1
[../]
[./forcing_fn]
type = ParsedFunction
expression = x
[../]
[./solution]
type = ParsedGradFunction
expression = x
grad_x = 1
[../]
[]
# Hierarchic Variable type
[Variables]
[./u]
order = FIRST
family = HIERARCHIC
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_external_app_1phase/phy.q_wall_transfer_3eqn.parent.i)
# This tests a heat flux transfer using the MultiApp system. Simple heat
# conduction problem is solved, then the heat flux is picked up by the child
# side of the solve, child side solves and transfers its variables back to the
# master
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 1
nx = 10
[]
[Functions]
[sin_fn]
type = ParsedFunction
expression = '1000*t*sin(pi*x)'
[]
[]
[Variables]
[T]
[]
[]
[AuxVariables]
[q_wall]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[q_wal_ak]
type = FunctionAux
variable = q_wall
function = sin_fn
execute_on = 'initial timestep_end'
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T
value = 300
[]
[]
[Kernels]
[td]
type = TimeDerivative
variable = T
[]
[diff]
type = Diffusion
variable = T
[]
[]
[BCs]
[left]
type = DirichletBC
variable = T
boundary = 'left right'
value = 300
[]
[]
[Executioner]
type = Transient
dt = 0.5
num_steps = 2
nl_abs_tol = 1e-10
abort_on_solve_fail = true
[]
[MultiApps]
[thm]
type = TransientMultiApp
app_type = ThermalHydraulicsApp
input_files = phy.q_wall_transfer_3eqn.child.i
execute_on = 'initial timestep_end'
[]
[]
[Transfers]
[q_to_thm]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = thm
source_variable = q_wall
variable = q_wall
[]
[]
[Outputs]
exodus = true
show = 'q_wall'
[]
(modules/optimization/test/tests/functions/parameter_mesh/create_mesh_dg.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
[]
parallel_type = REPLICATED
[]
[AuxVariables/params]
family = MONOMIAL
order = CONSTANT
[]
[ICs/params_ic]
type = FunctionIC
function = params_fun
variable = params
[]
[Functions]
[params_fun]
type = ParsedFunction
value = 'x*(x-1)*y*(y-1)'
[]
[]
[VectorPostprocessors]
[param_vec]
type = ElementValueSampler
sort_by = id
variable = params
[]
[]
[Outputs]
csv = true
exodus = true
execute_on = timestep_end
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
(modules/solid_mechanics/test/tests/umat/steps/elastic_temperature_steps_uo.i)
# Testing the UMAT Interface - linear elastic model using the large strain formulation.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[]
[Functions]
[top_pull_step2]
type = ParsedFunction
expression = (t-5.0)/20
[]
# Forced evolution of temperature
[temperature_load]
type = ParsedFunction
expression = '273'
[]
[]
[AuxVariables]
[temperature]
[]
[]
[AuxKernels]
[temperature_function]
type = FunctionAux
variable = temperature
function = temperature_load
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
generate_output = 'stress_yy'
[]
[]
[BCs]
[y_step1]
type = DirichletBC
variable = disp_y
boundary = top
value = 0.0
[]
[y_pull_function_step2]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = top_pull_step2
[]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[z_bot]
type = DirichletBC
variable = disp_z
boundary = front
value = 0.0
[]
[]
[Controls]
[step1]
type = StepPeriod
enable_objects = 'BCs::y_step1'
disable_objects = 'BCs::y_pull_function_step2'
step_user_object = step_uo
step_number = 0
[]
[step2]
type = StepPeriod
enable_objects = 'BCs::y_pull_function_step2'
disable_objects = 'BCs::y_step1'
step_user_object = step_uo
step_number = 1
[]
[]
[UserObjects]
[step_uo]
type = StepUserObject
step_start_times = '0 5'
[]
[]
[Materials]
[umat]
type = AbaqusUMATStress
constant_properties = '1000 0.3'
plugin = '../../../plugins/elastic_temperature'
num_state_vars = 0
temperature = temperature
use_one_based_indexing = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
num_steps = 10
dt = 1.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_stabilized.i)
[GlobalParams]
gravity = '0 0 0'
laplace = true
integrate_p_by_parts = true
family = LAGRANGE
order = FIRST
# There are multiple types of stabilization possible in incompressible
# Navier Stokes. The user can specify supg = true to apply streamline
# upwind petrov-galerkin stabilization to the momentum equations. This
# is most useful for high Reynolds numbers, e.g. when inertial effects
# dominate over viscous effects. The user can also specify pspg = true
# to apply pressure stabilized petrov-galerkin stabilization to the mass
# equation. PSPG is a form of Galerkin Least Squares. This stabilization
# allows equal order interpolations to be used for pressure and velocity.
# Finally, the alpha parameter controls the amount of stabilization.
# For PSPG, decreasing alpha leads to increased accuracy but may induce
# spurious oscillations in the pressure field. Some numerical experiments
# suggest that alpha between .1 and 1 may be optimal for accuracy and
# robustness.
supg = true
pspg = true
alpha = 1e-1
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 64
ny = 64
elem_type = QUAD4
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./vel_x]
[../]
[./vel_y]
[../]
[./p]
[../]
[]
[Kernels]
# mass
[./mass]
type = INSMass
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
# x-momentum, space
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
# y-momentum, space
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[BCs]
[./x_no_slip]
type = DirichletBC
variable = vel_x
boundary = 'bottom right left'
value = 0.0
[../]
[./lid]
type = FunctionDirichletBC
variable = vel_x
boundary = 'top'
function = 'lid_function'
[../]
[./y_no_slip]
type = DirichletBC
variable = vel_y
boundary = 'bottom right top left'
value = 0.0
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'asm 2 ilu 4'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
exodus = true
print_linear_converged_reason = false
print_nonlinear_converged_reason = false
[]
[Postprocessors]
[lin]
type = NumLinearIterations
[]
[nl]
type = NumNonlinearIterations
[]
[lin_tot]
type = CumulativeValuePostprocessor
postprocessor = 'lin'
[]
[nl_tot]
type = CumulativeValuePostprocessor
postprocessor = 'nl'
[]
[]
(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
[]
(test/tests/variables/side_hierarchic/side_hierarchic.i)
[Problem]
solve = false
[]
[Mesh]
type = GeneratedMesh
elem_type = QUAD9
dim = 2
nx = 2
ny = 2
[]
[Variables]
[./side_var]
order = CONSTANT
family = SIDE_HIERARCHIC
[../]
[]
[AuxVariables]
[./aux_side_var]
order = FIRST
family = SIDE_HIERARCHIC
[../]
[]
[Functions]
[./nl_var]
type = ParsedFunction
expression = 'x+y+1'
[../]
[./aux_var]
type = ParsedFunction
expression = 'x-y+10'
[../]
[]
[ICs]
[./side_nl]
type = FunctionIC
variable = side_var
function = nl_var
[../]
[./side_aux]
type = FunctionIC
variable = aux_side_var
function = aux_var
[../]
[]
[Outputs]
exodus = true
[]
[Executioner]
type = Steady
[]
(modules/contact/test/tests/3d-mortar-contact/half_sphere_nodal_geometry.i)
[Mesh]
[generated_mesh]
type = FileMeshGenerator
file = half_sphere.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 2002
new_block_name = 'secondary_lower'
sidesets = '202'
input = generated_mesh
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 1002
sidesets = '102'
new_block_name = 'primary_lower'
input = secondary
[]
patch_size = 20
patch_update_strategy = always
uniform_refine = 0
[]
[Problem]
kernel_coverage_check = false
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
order = FIRST
family = LAGRANGE
[]
[Variables]
[frictional_normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[frictional_tangential_lm]
block = 'secondary_lower'
use_dual = true
[]
[frictional_tangential_dir_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[saved_x]
[]
[saved_y]
[]
[saved_z]
[]
[tangent_x]
family = LAGRANGE
order = FIRST
[]
[tangent_y]
family = LAGRANGE
order = FIRST
[]
[tangent_z]
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[friction_x_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 102
secondary_boundary = 202
tangent_one = frictional_tangential_lm
tangent_two = frictional_tangential_dir_lm
variable = tangent_x
component = 0
boundary = 202
[]
[friction_y_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 102
secondary_boundary = 202
tangent_one = frictional_tangential_lm
tangent_two = frictional_tangential_dir_lm
variable = tangent_y
component = 1
boundary = 202
[]
[friction_z_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 102
secondary_boundary = 202
tangent_one = frictional_tangential_lm
tangent_two = frictional_tangential_dir_lm
variable = tangent_z
component = 2
boundary = 202
[]
[]
[Functions]
[push_down]
type = ParsedFunction
expression = 'if(t < 1.5, -t, t-3.0)'
[]
[force_z]
type = ParsedFunction
expression = 'if(t < 0.008, 0.0, (-t)*2.0e2 -t*t*100.0)' # 4.0e5
[]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = true
strain = FINITE
block = '1 2'
use_automatic_differentiation = true
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_zz'
save_in = 'saved_x saved_y saved_z'
use_finite_deform_jacobian = true
[]
[]
[BCs]
[botz]
type = ADDirichletBC
variable = disp_z
boundary = 101
value = 0.0
[]
[boty]
type = ADDirichletBC
variable = disp_y
boundary = 101
value = 0.0
[]
[botx]
type = ADDirichletBC
variable = disp_x
boundary = 101
value = 0.0
[]
[topz]
type = ADFunctionDirichletBC
variable = disp_z
boundary = '201'
function = push_down
[]
[topy]
type = ADDirichletBC
variable = disp_y
boundary = '201 202'
value = 0.0
[]
[topx]
type = ADDirichletBC
variable = disp_x
boundary = '201 202'
value = 0.0
[]
[]
[Materials]
[tensor]
type = ADComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1.40625e7
poissons_ratio = 0.25
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = '1'
[]
[tensor_1000]
type = ADComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e5
poissons_ratio = 0.0
[]
[stress_1000]
type = ADComputeFiniteStrainElasticStress
block = '2'
[]
[]
[Postprocessors]
[stress_zz]
type = ElementAverageValue
variable = stress_zz
block = 1
[]
[resid_z]
type = NodalSum
variable = saved_z
boundary = 201
[]
[disp_z]
type = NodalExtremeValue
variable = disp_z
boundary = 201
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -pc_factor_shift_type '
'-pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist nonzero 1e-14 1e-5'
line_search = 'none'
l_max_its = 60
nl_max_its = 50
dt = 0.004
dtmin = 0.00001
# end_time = 1.8
end_time = 0.000
nl_rel_tol = 1.0e-6 #1e-7 # -8, -6 to avoid many iterations. Switch it March 2021
nl_abs_tol = 1e-6 # 6 if no friction
l_tol = 1e-4
[]
[Outputs]
exodus = true
csv = true
print_linear_residuals = true
perf_graph = true
[console]
type = Console
max_rows = 5
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
lm_variable_normal = frictional_normal_lm
lm_variable_tangential_one = frictional_tangential_lm
lm_variable_tangential_two = frictional_tangential_dir_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
debug_mesh = true
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeFrictionalForceLMMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
friction_lm = frictional_tangential_lm
friction_lm_dir = frictional_tangential_dir_lm
c = 7.0e4
c_t = 7.0e4
mu = 0.4
debug_mesh = true
weighted_gap_uo = weighted_vel_uo
weighted_velocities_uo = weighted_vel_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
weighted_gap_uo = weighted_vel_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_z]
type = TangentialMortarMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_tangential_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_x_dir]
type = TangentialMortarMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_tangential_dir_lm
secondary_variable = disp_x
component = x
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y_dir]
type = TangentialMortarMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_tangential_dir_lm
secondary_variable = disp_y
component = y
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_z_dir]
type = TangentialMortarMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_tangential_dir_lm
secondary_variable = disp_z
component = z
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
weighted_velocities_uo = weighted_vel_uo
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/navier_stokes/test/tests/finite_volume/cns/straight_channel_porosity_step/rotated-2d-bkt-function-porosity-mixed.i)
p_initial=1.01e5
T=273.15
# u refers to the superficial velocity
u_in=1
rho_in=1.30524
sup_mom_y_in=${fparse u_in * rho_in}
user_limiter='upwind'
friction_coeff=10
[GlobalParams]
fp = fp
two_term_boundary_expansion = true
limiter = ${user_limiter}
[]
[Mesh]
[cartesian]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
nx = 3
ymin = 0
ymax = 18
ny = 90
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Problem]
fv_bcs_integrity_check = false
[]
[Variables]
[pressure]
type = MooseVariableFVReal
initial_condition = ${p_initial}
[]
[sup_mom_x]
type = MooseVariableFVReal
initial_condition = 1e-15
scaling = 1e-2
[]
[sup_mom_y]
type = MooseVariableFVReal
initial_condition = 1e-15
scaling = 1e-2
[]
[T_fluid]
type = MooseVariableFVReal
initial_condition = ${T}
scaling = 1e-5
[]
[]
[AuxVariables]
[vel_y]
type = MooseVariableFVReal
[]
[rho]
type = MooseVariableFVReal
[]
[eps]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[vel_y]
type = ADMaterialRealAux
variable = vel_y
property = vel_y
execute_on = 'timestep_end'
[]
[rho]
type = ADMaterialRealAux
variable = rho
property = rho
execute_on = 'timestep_end'
[]
[eps]
type = MaterialRealAux
variable = eps
property = porosity
execute_on = 'timestep_end'
[]
[]
[FVKernels]
[mass_time]
type = FVMatPropTimeKernel
mat_prop_time_derivative = 'dsuperficial_rho_dt'
variable = pressure
[]
[mass_advection]
type = PCNSFVKT
variable = pressure
eqn = "mass"
[]
[momentum_time]
type = FVMatPropTimeKernel
mat_prop_time_derivative = 'dsuperficial_rhou_dt'
variable = sup_mom_x
[]
[momentum_advection]
type = PCNSFVKT
variable = sup_mom_x
eqn = "momentum"
momentum_component = 'x'
[]
[eps_grad]
type = PNSFVPGradEpsilon
variable = sup_mom_x
momentum_component = 'x'
epsilon_function = 'eps'
[]
[drag]
type = PCNSFVMomentumFriction
variable = sup_mom_x
momentum_component = 'x'
Darcy_name = 'cl'
momentum_name = superficial_rhou
[]
[momentum_time_y]
type = FVMatPropTimeKernel
mat_prop_time_derivative = 'dsuperficial_rhov_dt'
variable = sup_mom_y
[]
[momentum_advection_y]
type = PCNSFVKT
variable = sup_mom_y
eqn = "momentum"
momentum_component = 'y'
[]
[eps_grad_y]
type = PNSFVPGradEpsilon
variable = sup_mom_y
momentum_component = 'y'
epsilon_function = 'eps'
[]
[drag_y]
type = PCNSFVMomentumFriction
variable = sup_mom_y
momentum_component = 'y'
Darcy_name = 'cl'
momentum_name = superficial_rhov
[]
[energy_time]
type = FVMatPropTimeKernel
mat_prop_time_derivative = 'dsuperficial_rho_et_dt'
variable = T_fluid
[]
[energy_advection]
type = PCNSFVKT
variable = T_fluid
eqn = "energy"
[]
[]
[FVBCs]
[rho_bottom]
type = PCNSFVStrongBC
boundary = 'bottom'
variable = pressure
superficial_velocity = 'ud_in'
T_fluid = ${T}
eqn = 'mass'
velocity_function_includes_rho = true
[]
[rhou_bottom]
type = PCNSFVStrongBC
boundary = 'bottom'
variable = sup_mom_x
superficial_velocity = 'ud_in'
T_fluid = ${T}
eqn = 'momentum'
momentum_component = 'x'
velocity_function_includes_rho = true
[]
[rhov_bottom]
type = PCNSFVStrongBC
boundary = 'bottom'
variable = sup_mom_y
superficial_velocity = 'ud_in'
T_fluid = ${T}
eqn = 'momentum'
momentum_component = 'y'
velocity_function_includes_rho = true
[]
[rho_et_bottom]
type = PCNSFVStrongBC
boundary = 'bottom'
variable = T_fluid
superficial_velocity = 'ud_in'
T_fluid = ${T}
eqn = 'energy'
velocity_function_includes_rho = true
[]
[rho_top]
type = PCNSFVStrongBC
boundary = 'top'
variable = pressure
pressure = ${p_initial}
eqn = 'mass'
[]
[rhou_top]
type = PCNSFVStrongBC
boundary = 'top'
variable = sup_mom_x
pressure = ${p_initial}
eqn = 'momentum'
momentum_component = 'x'
[]
[rhov_top]
type = PCNSFVStrongBC
boundary = 'top'
variable = sup_mom_y
pressure = ${p_initial}
eqn = 'momentum'
momentum_component = 'y'
[]
[rho_et_top]
type = PCNSFVStrongBC
boundary = 'top'
variable = T_fluid
pressure = ${p_initial}
eqn = 'energy'
[]
[wall_pressure_x]
type = PCNSFVImplicitMomentumPressureBC
momentum_component = 'x'
boundary = 'left right'
variable = sup_mom_x
[]
[wall_pressure_y]
type = PCNSFVImplicitMomentumPressureBC
momentum_component = 'y'
boundary = 'left right'
variable = sup_mom_y
[]
# Use these to help create more accurate cell centered gradients for cells adjacent to boundaries
[T_bottom]
type = FVDirichletBC
variable = T_fluid
value = ${T}
boundary = 'bottom'
[]
[sup_mom_x_bottom_and_walls]
type = FVDirichletBC
variable = sup_mom_x
value = 0
boundary = 'bottom left right'
[]
[sup_mom_y_walls]
type = FVDirichletBC
variable = sup_mom_y
value = 0
boundary = 'left right'
[]
[sup_mom_y_bottom]
type = FVDirichletBC
variable = sup_mom_y
value = ${sup_mom_y_in}
boundary = 'bottom'
[]
[p_top]
type = FVDirichletBC
variable = pressure
value = ${p_initial}
boundary = 'top'
[]
[]
[Functions]
[ud_in]
type = ParsedVectorFunction
expression_x = '0'
expression_y = '${sup_mom_y_in}'
[]
[eps]
type = ParsedFunction
expression = 'if(y < 2.8, 1,
if(y < 3.2, 1 - .5 / .4 * (y - 2.8),
if(y < 6.8, .5,
if(y < 7.2, .5 - .25 / .4 * (y - 6.8),
if(y < 10.8, .25,
if(y < 11.2, .25 + .25 / .4 * (y - 10.8),
if(y < 14.8, .5,
if(y < 15.2, .5 + .5 / .4 * (y - 14.8),
1))))))))'
[]
[]
[Materials]
[var_mat]
type = PorousMixedVarMaterial
pressure = pressure
T_fluid = T_fluid
superficial_rhou = sup_mom_x
superficial_rhov = sup_mom_y
fp = fp
porosity = porosity
[]
[porosity]
type = GenericFunctionMaterial
prop_names = 'porosity'
prop_values = 'eps'
[]
[ad_generic]
type = ADGenericConstantVectorMaterial
prop_names = 'cl'
prop_values = '${friction_coeff} ${friction_coeff} ${friction_coeff}'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
line_search = 'bt'
type = Transient
nl_max_its = 20
[TimeStepper]
type = IterationAdaptiveDT
dt = 5e-5
optimal_iterations = 6
growth_factor = 1.2
[]
num_steps = 10000
end_time = 500
nl_abs_tol = 1e-7
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu mumps'
[]
[Outputs]
[out]
type = Exodus
execute_on = 'final'
[]
checkpoint = true
[]
[Debug]
show_var_residual_norms = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/mms/lid-driven/hybrid-cg-dg-mms.i)
rho=1.1
mu=1.1
cp=1.1
k=1.1
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = -1
xmax = 1.0
ymin = -1
ymax = 1.0
nx = 2
ny = 2
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[]
[]
[Variables]
[u]
family = MONOMIAL
[]
[v]
family = MONOMIAL
[]
[pressure][]
[T]
family = MONOMIAL
[]
[]
[Kernels]
[momentum_x_convection]
type = ADConservativeAdvection
variable = u
velocity = 'velocity'
advected_quantity = 'rhou'
[]
[momentum_x_diffusion]
type = MatDiffusion
variable = u
diffusivity = 'mu'
[]
[momentum_x_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = u
pressure = pressure
component = 0
[]
[u_forcing]
type = BodyForce
variable = u
function = forcing_u
[]
[momentum_y_convection]
type = ADConservativeAdvection
variable = v
velocity = 'velocity'
advected_quantity = 'rhov'
[]
[momentum_y_diffusion]
type = MatDiffusion
variable = v
diffusivity = 'mu'
[]
[momentum_y_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = v
pressure = pressure
component = 1
[]
[v_forcing]
type = BodyForce
variable = v
function = forcing_v
[]
[mass]
type = ADConservativeAdvection
variable = pressure
velocity = velocity
advected_quantity = -1
[]
[p_forcing]
type = BodyForce
variable = pressure
function = forcing_p
[]
[T_convection]
type = ADConservativeAdvection
variable = T
velocity = 'velocity'
advected_quantity = 'rho_cp_temp'
[]
[T_diffusion]
type = MatDiffusion
variable = T
diffusivity = 'k'
[]
[T_forcing]
type = BodyForce
variable = T
function = forcing_T
[]
[]
[DGKernels]
[momentum_x_convection]
type = ADDGAdvection
variable = u
velocity = 'velocity'
advected_quantity = 'rhou'
[]
[momentum_x_diffusion]
type = DGDiffusion
variable = u
sigma = 6
epsilon = -1
diff = 'mu'
[]
[momentum_y_convection]
type = ADDGAdvection
variable = v
velocity = 'velocity'
advected_quantity = 'rhov'
[]
[momentum_y_diffusion]
type = DGDiffusion
variable = v
sigma = 6
epsilon = -1
diff = 'mu'
[]
[T_convection]
type = ADDGAdvection
variable = T
velocity = 'velocity'
advected_quantity = 'rho_cp_temp'
[]
[T_diffusion]
type = DGDiffusion
variable = T
sigma = 6
epsilon = -1
diff = 'k'
[]
[]
[BCs]
[u_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right top'
variable = u
sigma = 6
epsilon = -1
function = exact_u
diff = 'mu'
[]
[v_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right top'
variable = v
sigma = 6
epsilon = -1
function = exact_v
diff = 'mu'
[]
[pressure_pin]
type = FunctionDirichletBC
variable = pressure
boundary = 'pinned_node'
function = 'exact_p'
[]
[T_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right top'
variable = T
sigma = 6
epsilon = -1
function = exact_T
diff = 'k'
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho cp'
prop_values = '${rho} ${cp}'
[]
[const_reg]
type = GenericConstantMaterial
prop_names = 'mu k'
prop_values = '${mu} ${k}'
[]
[vel]
type = ADVectorFromComponentVariablesMaterial
vector_prop_name = 'velocity'
u = u
v = v
[]
[rhou]
type = ADParsedMaterial
property_name = 'rhou'
coupled_variables = 'u'
material_property_names = 'rho'
expression = 'rho*u'
[]
[rhov]
type = ADParsedMaterial
property_name = 'rhov'
coupled_variables = 'v'
material_property_names = 'rho'
expression = 'rho*v'
[]
[rho_cp]
type = ADParsedMaterial
property_name = 'rho_cp'
material_property_names = 'rho cp'
expression = 'rho*cp'
[]
[rho_cp_temp]
type = ADParsedMaterial
property_name = 'rho_cp_temp'
material_property_names = 'rho cp'
coupled_variables = 'T'
expression = 'rho*cp*T'
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'sin(y)*cos((1/2)*x*pi)'
[]
[forcing_u]
type = ParsedFunction
expression = 'mu*sin(y)*cos((1/2)*x*pi) + (1/4)*pi^2*mu*sin(y)*cos((1/2)*x*pi) - 1/2*pi*rho*sin(x)*sin(y)*sin((1/2)*y*pi)*cos((1/2)*x*pi) + rho*sin(x)*cos(y)*cos((1/2)*x*pi)*cos((1/2)*y*pi) - pi*rho*sin(y)^2*sin((1/2)*x*pi)*cos((1/2)*x*pi) + sin(y)*cos(x)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_v]
type = ParsedFunction
expression = 'sin(x)*cos((1/2)*y*pi)'
[]
[forcing_v]
type = ParsedFunction
expression = 'mu*sin(x)*cos((1/2)*y*pi) + (1/4)*pi^2*mu*sin(x)*cos((1/2)*y*pi) - pi*rho*sin(x)^2*sin((1/2)*y*pi)*cos((1/2)*y*pi) - 1/2*pi*rho*sin(x)*sin(y)*sin((1/2)*x*pi)*cos((1/2)*y*pi) + rho*sin(y)*cos(x)*cos((1/2)*x*pi)*cos((1/2)*y*pi) + sin(x)*cos(y)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'sin(x)*sin(y)'
[]
[forcing_p]
type = ParsedFunction
expression = '(1/2)*pi*sin(x)*sin((1/2)*y*pi) + (1/2)*pi*sin(y)*sin((1/2)*x*pi)'
[]
[exact_T]
type = ParsedFunction
expression = 'cos(x)*cos(y)'
[]
[forcing_T]
type = ParsedFunction
expression = '-cp*rho*sin(x)*sin(y)*cos(x)*cos((1/2)*y*pi) - cp*rho*sin(x)*sin(y)*cos(y)*cos((1/2)*x*pi) - 1/2*pi*cp*rho*sin(x)*sin((1/2)*y*pi)*cos(x)*cos(y) - 1/2*pi*cp*rho*sin(y)*sin((1/2)*x*pi)*cos(x)*cos(y) + 2*k*cos(x)*cos(y)'
symbol_names = 'rho cp k'
symbol_values = '${rho} ${cp} ${k}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO mumps'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2Error
variable = u
function = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2v]
variable = v
function = exact_v
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2T]
variable = T
function = exact_T
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
variable = pressure
function = exact_p
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/unstabilized-velocity-component-objects.i)
[Mesh]
file = '2d_cone.msh'
coord_type = RZ
[]
[Variables]
[vel_x]
order = SECOND
[]
[vel_y]
order = SECOND
[]
[p][]
[]
[Kernels]
[momentum_x_time]
type = TimeDerivative
variable = vel_x
[]
[momentum_x_convection]
type = ADAdvection
variable = vel_x
velocity = 'velocity'
[]
[momentum_x_diffusion]
type = MatDiffusion
variable = vel_x
diffusivity = 1
[]
[momentum_x_diffusion_rz]
type = ADMomentumViscousRZ
variable = vel_x
mu_name = 1
component = 0
[]
[momentum_x_pressure]
type = PressureGradient
integrate_p_by_parts = true
variable = vel_x
pressure = p
component = 0
[]
[momentum_y_time]
type = TimeDerivative
variable = vel_y
[]
[momentum_y_convection]
type = ADAdvection
variable = vel_y
velocity = 'velocity'
[]
[momentum_y_diffusion]
type = MatDiffusion
variable = vel_y
diffusivity = 1
[]
[momentum_y_diffusion_rz]
type = ADMomentumViscousRZ
variable = vel_y
mu_name = 1
component = 1
[]
[momentum_y_pressure]
type = PressureGradient
integrate_p_by_parts = true
variable = vel_y
pressure = p
component = 1
[]
[mass]
type = ADMassAdvection
variable = p
vel_x = vel_x
vel_y = vel_y
[]
[]
[BCs]
[u_in]
type = DirichletBC
boundary = bottom
variable = vel_x
value = 0
[]
[v_in]
type = FunctionDirichletBC
boundary = bottom
variable = vel_y
function = 'inlet_func'
[]
[u_axis_and_walls]
type = DirichletBC
boundary = 'left right'
variable = vel_x
value = 0
[]
[v_no_slip]
type = DirichletBC
boundary = 'right'
variable = vel_y
value = 0
[]
[]
[Materials]
[vel]
type = ADVectorFromComponentVariablesMaterial
vector_prop_name = 'velocity'
u = vel_x
v = vel_y
[]
[]
[Functions]
[inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[]
[]
[Executioner]
type = Transient
dt = 0.005
dtmin = 0.005
num_steps = 5
l_max_its = 100
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(test/tests/time_steppers/time_stepper_system/AB2PredictorCorrector.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0.0
xmax = 1.0
[]
#still need BC for Energy, IC's for both.
[Variables]
active = 'Time'
[./Time]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[../]
[]
[Functions]
active = 'func'
[./func]
type = ParsedFunction
expression = 2.0*t
[../]
[]
[Kernels]
active = 't_time func_time'
[./t_time]
type = TimeDerivative
variable = Time
[../]
[./func_time]
type = BodyForce
variable = Time
function = func
[../]
[]
[BCs]
active = 'Top_Temperature'
[./Top_Temperature]
type = NeumannBC
variable = Time
boundary = 'left right'
[../]
[]
[Executioner]
type = Transient
scheme = 'BDF2'
start_time = 0
num_steps = 4
nl_abs_tol = 1e-15
petsc_options = '-snes_converged_reason'
abort_on_solve_fail = true
# Use the same test case as AB2PredictorCorrector test, add one more time stepper
# to test if AB2PredictorCorrector works correctly with time stepper composition
[TimeSteppers]
[AB2]
type = AB2PredictorCorrector
dt = .01
e_max = 10
e_tol = 1
[]
[IterationAdapDT]
type = IterationAdaptiveDT
dt = 100
[]
[]
[]
[Outputs]
exodus = true
file_base='aee_out'
[]
(test/tests/functormaterials/parsed_functor_material/parsed_functor_material.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
xmin = 0.0
xmax = 4.0
ymin = 0.0
ymax = 6.0
zmin = 0.0
zmax = 10.0
[]
[Functions]
[fn1]
type = ParsedFunction
# The max value on elements should be:
# 2 * 3 + 0.5 * 4.5 + 7.5 - 4 = 11.75
expression = '2 * x + 0.5 * y + z - t'
[]
[fn2]
type = ConstantFunction
value = 3
[]
[]
[FunctorMaterials]
[parsed_fmat]
type = ParsedFunctorMaterial
expression = 'A * B^2 + 2 + pi + e + t + x + y + z'
functor_names = 'fn1 fn2'
functor_symbols = 'A B'
property_name = 'prop1'
[]
[]
[Postprocessors]
# The value should be:
# 11.75 * 3^2 + 2 + pi + e + 4 + 3 + 4.5 + 7.5 = 132.60987448204884
[get_prop1]
type = ElementExtremeFunctorValue
functor = prop1
value_type = max
execute_on = 'INITIAL'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
time = 4.0
[]
[Outputs]
csv = true
execute_on = 'INITIAL'
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 64
ny = 64
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[AuxVariables]
[vel_x]
[]
[vel_y]
[]
[]
[AuxKernels]
[vel_x]
type = VectorVariableComponentAux
variable = vel_x
vector_variable = velocity
component = 'x'
[]
[vel_y]
type = VectorVariableComponentAux
variable = vel_y
vector_variable = velocity
component = 'y'
[]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 0
y_value = 0
variable = velocity
[]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./mass_pspg]
type = INSADMassPSPG
variable = p
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[../]
[./momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[../]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left'
[../]
[./lid]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 'lid_function'
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADTauMaterial
velocity = velocity
pressure = p
alpha = .1
[]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
exodus = true
file_base = lid_driven_stabilized_out
[]
[Postprocessors]
[lin]
type = NumLinearIterations
[]
[nl]
type = NumNonlinearIterations
[]
[lin_tot]
type = CumulativeValuePostprocessor
postprocessor = 'lin'
[]
[nl_tot]
type = CumulativeValuePostprocessor
postprocessor = 'nl'
[]
[]
(test/tests/auxkernels/array_parsed_aux/array_parsed_aux.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 10
[]
[]
[Variables]
[u]
components = 2
[]
[v]
components = 2
[]
[]
[AuxVariables]
[const]
initial_condition = 0.5
[]
[parsed]
components = 2
[]
[sum]
[]
[]
[Functions]
[cosx]
type = ParsedFunction
expression = 'cos(x)'
[]
[sinx]
type = ParsedFunction
expression = 'sin(x)'
[]
[px]
type = ParsedFunction
expression = 'x'
[]
[mx]
type = ParsedFunction
expression = '-x'
[]
[]
[ICs]
[uic]
type = ArrayFunctionIC
variable = u
function = 'cosx sinx'
[]
[vic]
type = ArrayFunctionIC
variable = v
function = 'px mx'
[]
[]
[AuxKernels]
[parsed_aux]
type = ArrayParsedAux
variable = parsed
expression = '(u^2 + v)*(x - const)*factor'
coupled_array_variables = 'u v'
coupled_variables = const
constant_names = 'factor'
constant_expressions = '3.14'
use_xyzt = true
[]
[sum_aux]
type = ArrayVarReductionAux
variable = sum
array_variable = parsed
[]
[]
[Postprocessors]
[avg]
type = ElementAverageValue
variable = sum
[]
[]
[Outputs]
exodus = true
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
(modules/solid_mechanics/test/tests/elastic_patch/elastic_patch_quadratic.i)
# Patch Test for second order hex elements (HEX20)
#
# From Abaqus, Verification Manual, 1.5.2
#
# This test is designed to compute constant xx, yy, zz, xy, yz, and zx
# stress on a set of irregular hexes. The mesh is composed of one
# block with seven elements. The elements form a unit cube with one
# internal element. There is a nodeset for each exterior node.
# The cube is displaced on all exterior nodes using the functions,
#
# ux = 1e-4 * (2x + y + z) / 2
# uy = 1e-4 * (x + 2y + z) / 2
# ux = 1e-4 * (x + y + 2z) / 2
#
# giving uniform strains of
#
# exx = eyy = ezz = 2*exy = 2*eyz = 2*exz = 1e-4
#
#
# Hooke's Law provides an analytical solution for the uniform stress state.
# For example,
#
# stress xx = lambda(exx + eyy + ezz) + 2 * G * exx
# stress xy = 2 * G * exy
#
# where:
#
# lambda = (2 * G * nu) / (1 - 2 * nu)
# G = 0.5 * E / (1 + nu)
#
# For the test below, E = 1e6 and nu = 0.25, giving lambda = G = 4e5
#
# Thus
#
# stress xx = 4e5 * (3e-4) + 2 * 4e5 * 1e-4 = 200
# stress xy = 2 * 4e5 * 1e-4 / 2 = 40
#
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
file = elastic_patch_quadratic.e
[] # Mesh
[Functions]
[./xDispFunc]
type = ParsedFunction
expression = 5e-5*(2*x+y+z)
[../]
[./yDispFunc]
type = ParsedFunction
expression = 5e-5*(x+2*y+z)
[../]
[./zDispFunc]
type = ParsedFunction
expression = 5e-5*(x+y+2*z)
[../]
[] # Functions
[Variables]
[./disp_x]
order = SECOND
family = LAGRANGE
[../]
[./disp_y]
order = SECOND
family = LAGRANGE
[../]
[./disp_z]
order = SECOND
family = LAGRANGE
[../]
[] # Variables
[AuxVariables]
[./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
[../]
[./elastic_energy]
order = CONSTANT
family = MONOMIAL
[../]
[./vonmises]
order = CONSTANT
family = MONOMIAL
[../]
[./hydrostatic]
order = CONSTANT
family = MONOMIAL
[../]
[./firstinv]
order = CONSTANT
family = MONOMIAL
[../]
[./secondinv]
order = CONSTANT
family = MONOMIAL
[../]
[./thirdinv]
order = CONSTANT
family = MONOMIAL
[../]
[] # AuxVariables
[Kernels]
[SolidMechanics]
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
[../]
[./elastic_energy]
type = ElasticEnergyAux
variable = elastic_energy
[../]
[./vonmises]
type = RankTwoScalarAux
rank_two_tensor = stress
scalar_type = VonMisesStress
variable = vonmises
[../]
[./hydrostatic]
type = RankTwoScalarAux
rank_two_tensor = stress
scalar_type = Hydrostatic
variable = hydrostatic
[../]
[./fi]
type = RankTwoScalarAux
rank_two_tensor = stress
scalar_type = FirstInvariant
variable = firstinv
[../]
[./si]
type = RankTwoScalarAux
rank_two_tensor = stress
scalar_type = SecondInvariant
variable = secondinv
[../]
[./ti]
type = RankTwoScalarAux
rank_two_tensor = stress
scalar_type = ThirdInvariant
variable = thirdinv
[../]
[] # AuxKernels
[BCs]
[./all_nodes_x]
type = FunctionDirichletBC
variable = disp_x
boundary = '1 2 3 4 6 7 8 9 10 12 15 17 18 19 20 21 23 24 25 26'
function = xDispFunc
[../]
[./all_nodes_y]
type = FunctionDirichletBC
variable = disp_y
boundary = '1 2 3 4 6 7 8 9 10 12 15 17 18 19 20 21 23 24 25 26'
function = yDispFunc
[../]
[./all_nodes_z]
type = FunctionDirichletBC
variable = disp_z
boundary = '1 2 3 4 6 7 8 9 10 12 15 17 18 19 20 21 23 24 25 26'
function = zDispFunc
[../]
[] # BCs
[Materials]
[./elast_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.25
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[] # Materials
[Executioner]
type = Transient
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
nl_rel_tol = 1e-6
l_max_its = 20
start_time = 0.0
dt = 1.0
num_steps = 1
end_time = 1.0
[] # Executioner
[Outputs]
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[] # Outputs
(modules/richards/test/tests/theis/th_lumped_22.i)
# two-phase, fully-saturated
# production
# lumped
[Mesh]
type = FileMesh
file = th02_input.e
[]
[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 = '1 2 4 20'
x = '0 1 10 100'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 2E6
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1E-5
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1E-5
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.0
n = 3
[../]
[./SatWater]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SatGas]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGwater]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[./SUPGgas]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[./total_outflow_mass]
type = RichardsSumQuantity
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./water_ic]
type = FunctionIC
variable = pwater
function = initial_pressure
[../]
[./gas_ic]
type = FunctionIC
variable = pgas
function = initial_pressure
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[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
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = SeffWater
pressure_vars = 'pwater pgas'
[../]
[]
[DiracKernels]
[./bh]
type = RichardsPolyLineSink
pressures = '-1E9 1E9'
fluxes = '200 200'
point_file = th01.points
SumQuantityUO = total_outflow_mass
variable = pwater
[../]
[]
[Postprocessors]
[./flow_report]
type = RichardsPlotQuantity
uo = total_outflow_mass
[../]
[./p50]
type = PointValue
variable = pwater
point = '50 0 0'
execute_on = timestep_end
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 1E5
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = 1
mat_porosity = 0.1
mat_permeability = '1E-10 0 0 0 1E-10 0 0 0 1E-10'
viscosity = '1E-3 1E-5'
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason -ksp_diagonal_scale -ksp_diagonal_scale_fix -ksp_gmres_modifiedgramschmidt -snes_linesearch_monitor'
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap -snes_atol -snes_rtol -snes_max_it -ksp_rtol -ksp_atol'
petsc_options_value = 'gmres asm lu NONZERO 2 2E-7 1E-10 20 1E-10 1E-100'
[../]
[]
[Executioner]
type = Transient
end_time = 100
solve_type = NEWTON
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = th_lumped_22
csv = true
[]
(modules/xfem/test/tests/moving_interface/moving_diffusion.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 3
xmin = 0.0
xmax = 1
ymin = 0.0
ymax = 1
elem_type = QUAD4
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./ls_func]
type = ParsedFunction
expression = 'x-0.76+0.21*t'
[../]
[]
[Kernels]
[./diff]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./time_deriv]
type = TimeDerivative
variable = u
[../]
[]
[Constraints]
[./u_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = u
jump = 0
use_penalty = true
alpha = 1e5
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[]
[BCs]
[./right_u]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./left_u]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Materials]
[./diffusivity_A]
type = GenericConstantMaterial
prop_names = A_diffusion_coefficient
prop_values = 5
[../]
[./diffusivity_B]
type = GenericConstantMaterial
prop_names = B_diffusion_coefficient
prop_values = 0.5
[../]
[./diff_combined]
type = LevelSetBiMaterialReal
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = diffusion_coefficient
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
l_max_its = 20
l_tol = 1e-3
nl_max_its = 15
nl_rel_tol = 1e-6
nl_abs_tol = 1e-5
start_time = 0.0
dt = 1
end_time = 2
max_xfem_update = 1
[]
[Outputs]
exodus = true
execute_on = timestep_end
perf_graph = true
[./console]
type = Console
output_linear = true
[../]
[]
(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/navier_stokes/test/tests/finite_volume/pins/mms/1d-rc.i)
mu = 1.1
rho = 1.1
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 1
dx = '1 1'
ix = '5 5'
subdomain_id = '1 2'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
pressure = pressure
porosity = porosity
[]
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 0.8
[]
[]
[Problem]
error_on_jacobian_nonzero_reallocation = true
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'cos((1/2)*x*pi)'
[]
[forcing_u]
type = ParsedFunction
expression = '0.25*pi^2*mu*cos((1/2)*x*pi) - 1.25*pi*rho*sin((1/2)*x*pi)*cos((1/2)*x*pi) + 0.8*cos(x)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'sin(x)'
[]
[forcing_p]
type = ParsedFunction
expression = '-1/2*pi*rho*sin((1/2)*x*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[mass_forcing]
type = FVBodyForce
variable = pressure
function = forcing_p
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = u
mu = ${mu}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressureFlux
variable = u
pressure = pressure
porosity = porosity
momentum_component = 'x'
[]
[u_forcing]
type = INSFVBodyForce
variable = u
functor = forcing_u
momentum_component = 'x'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
functor = 'exact_u'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 'exact_p'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[Postprocessors]
[inlet_p]
type = SideAverageValue
variable = 'pressure'
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 'right'
[]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2FunctorError
approximate = u
exact = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
approximate = pressure
exact = exact_p
type = ElementL2FunctorError
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
[Outputs]
csv = true
[]
(modules/heat_transfer/test/tests/code_verification/cylindrical_test_no5.i)
# Problem II.5
#
# The volumetric heat generation in an infinitely long solid cylinder
# varies with spatial location. It has a constant thermal conductivity.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
nx = 1
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Problem]
coord_type = RZ
[]
[Functions]
[./volumetric_heat]
type = ParsedFunction
symbol_names = 'q ro beta'
symbol_values = '1200 1 0.1'
expression = 'q * (1-beta*x/ro)'
[../]
[./exact]
type = ParsedFunction
symbol_names = 'uo q k ro beta'
symbol_values = '300 1200 1 1 0.1'
expression = 'uo + (0.25*q*ro^2/k) * ( (1-(x/ro)^2) - (1-(x/ro)^3) * beta * 4/9 )'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[./heatsource]
type = HeatSource
function = volumetric_heat
variable = u
[../]
[]
[BCs]
[./uo]
type = DirichletBC
boundary = right
variable = u
value = 300
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1.0 1.0 1.0'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = true
[]
(modules/combined/test/tests/elastic_thermal_patch/elastic_thermal_patch_rz_smp.i)
#
# This problem is modified from the Abaqus verification manual:
# "1.5.4 Patch test for axisymmetric elements"
# The original stress solution is given as:
# xx = yy = zz = 2000
# xy = 400
#
# Here, E=1e6 and nu=0.25.
# However, with a +100 degree change in temperature and a coefficient
# of thermal expansion of 1e-6, the solution becomes:
# xx = yy = zz = 1800
# xy = 400
# since
# E*(1-nu)/(1+nu)/(1-2*nu)*(1+2*nu/(1-nu))*(1e-3-1e-4) = 1800
#
# Also,
#
# dSrr dSrz Srr-Stt
# ---- + ---- + ------- + br = 0
# dr dz r
#
# and
#
# dSrz Srz dSzz
# ---- + --- + ---- + bz = 0
# dr r dz
#
# where
# Srr = stress in rr
# Szz = stress in zz
# Stt = stress in theta-theta
# Srz = stress in rz
# br = body force in r direction
# bz = body force in z direction
#
# This test is meant to exercise the Jacobian. To that end, the body
# force has been turned off. This makes the results differ slightly
# from the original values, but requires a correct Jacobian for minimal
# iterations. Iteration plotting is turned on to ensure that the
# number of iterations needed does not increase.
[GlobalParams]
temperature = temp
volumetric_locking_correction = true
[]
[Problem]
coord_type = RZ
[]
[Mesh]
file = elastic_thermal_patch_rz_test.e
[]
[Functions]
[./ur]
type = ParsedFunction
expression = '1e-3*x'
[../]
[./uz]
type = ParsedFunction
expression = '1e-3*(x+y)'
[../]
[./body]
type = ParsedFunction
expression = '-400/x'
[../]
[./temp]
type = ParsedFunction
expression = '117.56+100*t'
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./temp]
initial_condition = 117.56
[../]
[]
[Modules]
[TensorMechanics]
[Master]
displacements = 'disp_x disp_y'
[All]
displacements = 'disp_x disp_y'
add_variables = true
strain = SMALL
incremental = true
eigenstrain_names = eigenstrain
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_zx'
[../]
[../]
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[]
[BCs]
[./ur]
type = FunctionDirichletBC
variable = disp_x
boundary = 10
function = ur
[../]
[./uz]
type = FunctionDirichletBC
variable = disp_y
boundary = 10
function = uz
[../]
[./temp]
type = FunctionDirichletBC
variable = temp
boundary = 10
function = temp
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
bulk_modulus = 666666.6666666667
poissons_ratio = 0.25
[../]
[./thermal_strain]
type = ComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 1e-6
stress_free_temperature = 117.56
eigenstrain_name = eigenstrain
[../]
[./stress]
type = ComputeStrainIncrementBasedStress
[../]
[./heat]
type = HeatConductionMaterial
specific_heat = 0.116
thermal_conductivity = 4.85e-4
[../]
[./density]
type = Density
block = 1
density = 0.283
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
nl_abs_tol = 1e-11
nl_rel_tol = 1e-12
l_max_its = 20
start_time = 0.0
dt = 1.0
num_steps = 1
end_time = 1.0
[]
[Outputs]
file_base = elastic_thermal_patch_rz_smp_out
[./exodus]
type = Exodus
execute_on = 'initial timestep_end nonlinear'
nonlinear_residual_dt_divisor = 100
[../]
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/cross_material/correctness/plastic_j2.i)
# Simple 3D test
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = false
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 1
nz = 1
[]
[]
[AuxVariables]
[strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[strain_xz]
order = CONSTANT
family = MONOMIAL
[]
[strain_yz]
order = CONSTANT
family = MONOMIAL
[]
[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_xz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[stress_xx]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_xz
index_i = 0
index_j = 2
execute_on = timestep_end
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[strain_xx]
type = RankTwoAux
rank_two_tensor = mechanical_strain
variable = strain_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[strain_yy]
type = RankTwoAux
rank_two_tensor = mechanical_strain
variable = strain_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[strain_zz]
type = RankTwoAux
rank_two_tensor = mechanical_strain
variable = strain_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[strain_xy]
type = RankTwoAux
rank_two_tensor = mechanical_strain
variable = strain_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[strain_xz]
type = RankTwoAux
rank_two_tensor = mechanical_strain
variable = strain_xz
index_i = 0
index_j = 2
execute_on = timestep_end
[]
[strain_yz]
type = RankTwoAux
rank_two_tensor = mechanical_strain
variable = strain_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[]
[Kernels]
[sdx]
type = UpdatedLagrangianStressDivergence
variable = disp_x
component = 0
use_displaced_mesh = false
[]
[sdy]
type = UpdatedLagrangianStressDivergence
variable = disp_y
component = 1
use_displaced_mesh = false
[]
[sdz]
type = UpdatedLagrangianStressDivergence
variable = disp_z
component = 2
use_displaced_mesh = false
[]
[]
[Functions]
[pullx]
type = ParsedFunction
expression = 't'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = bottom
variable = disp_y
value = 0.0
[]
[leftz]
type = DirichletBC
preset = true
boundary = back
variable = disp_z
value = 0.0
[]
[pull_x]
type = FunctionDirichletBC
boundary = right
variable = disp_x
function = pullx
[]
[]
[UserObjects]
[./str]
type = SolidMechanicsHardeningPowerRule
value_0 = 100.0
epsilon0 = 0.1
exponent = 2.0
[../]
[./j2]
type = SolidMechanicsPlasticJ2
yield_strength = str
yield_function_tolerance = 1E-3
internal_constraint_tolerance = 1E-9
[../]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianWrappedStress
[]
[compute_stress_base]
type = ComputeMultiPlasticityStress
plastic_models = j2
ep_plastic_tolerance = 1E-9
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[./strain]
type = ElementAverageValue
variable = strain_xx
[]
[./stress]
type = ElementAverageValue
variable = stress_xx
[]
[]
[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 = 0.001
dtmin = 0.001
end_time = 0.05
[]
[Outputs]
exodus = false
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/electromagnetics/test/tests/benchmarks/waveguide2D/waveguide2D_test.i)
# Test for EMRobinBC in port and absorbing modes with simple electric plane wave
# 2D, vacuum-filled waveguide with conducting walls
# u^2 + k^2*u = 0, 0 < x < 80, 0 < y < 10, u: R -> C
# k = 2*pi*freq/c, freq = 20e6 Hz, c = 3e8 m/s
[Mesh]
[fmg]
type = FileMeshGenerator
file = waveguide.msh
[]
[]
[Variables]
[E_real]
order = FIRST
family = LAGRANGE
[]
[E_imag]
order = FIRST
family = LAGRANGE
[]
[]
[Functions]
[inc_y]
type = ParsedFunction
expression = 'sin(pi * y / 10)'
[]
[]
[Kernels]
[diffusion_real]
type = Diffusion
variable = E_real
[]
[coeffField_real]
type = ADMatReaction
reaction_rate = kSquared
variable = E_real
[]
[diffusion_imaginary]
type = Diffusion
variable = E_imag
[]
[coeffField_imaginary]
type = ADMatReaction
reaction_rate = kSquared
variable = E_imag
[]
[]
[BCs]
[top_real]
type = DirichletBC
value = 0
variable = E_real
boundary = top
[]
[bottom_real]
type = DirichletBC
value = 0
variable = E_real
boundary = bottom
[]
[port_real]
type = EMRobinBC
coeff_real = -0.27706242940220277 # -sqrt(k^2 - (pi/10)^2)
sign = positive
profile_func_real = inc_y
profile_func_imag = 0
field_real = E_real
field_imaginary = E_imag
variable = E_real
component = real
mode = port
boundary = port
[]
[exit_real]
type = EMRobinBC
coeff_real = 0.27706242940220277
sign = negative
field_real = E_real
field_imaginary = E_imag
variable = E_real
component = real
mode = absorbing
boundary = exit
[]
[top_imaginary]
type = DirichletBC
value = 0
variable = E_imag
boundary = top
[]
[bottom_imaginary]
type = DirichletBC
value = 0
variable = E_imag
boundary = bottom
[]
[port_imaginary]
type = EMRobinBC
coeff_real = -0.27706242940220277
sign = positive
profile_func_real = inc_y
profile_func_imag = 0
field_real = E_real
field_imaginary = E_imag
variable = E_imag
component = imaginary
mode = port
boundary = port
[]
[exit_imaginary]
type = EMRobinBC
coeff_real = 0.27706242940220277
sign = negative
field_real = E_real
field_imaginary = E_imag
variable = E_imag
component = imaginary
mode = absorbing
boundary = exit
[]
[]
[Materials]
[kSquared]
type = ADParsedMaterial
property_name = kSquared
expression = '0.4188790204786391^2'
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
(modules/solid_mechanics/test/tests/action/action_multi_eigenstrain.i)
# This tests the thermal expansion coefficient function using both
# options to specify that function: mean and instantaneous. There
# two blocks, each containing a single element, and these use the
# two variants of the function.
# In this test, the instantaneous CTE function has a constant value,
# while the mean CTE function is an analytic function designed to
# give the same response. If \bar{alpha}(T) is the mean CTE function,
# and \alpha(T) is the instantaneous CTE function,
# \bar{\alpha}(T) = 1/(T-Tref) \intA^{T}_{Tsf} \alpha(T) dT
# where Tref is the reference temperature used to define the mean CTE
# function, and Tsf is the stress-free temperature.
# This version of the test uses finite deformation theory.
# The two models produce very similar results. There are slight
# differences due to the large deformation treatment.
[Mesh]
file = 'blocks.e'
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[]
[Problem]
solve = false
[]
[Physics/SolidMechanics/QuasiStatic]
[./block1]
block = 1
strain = FINITE
add_variables = true
automatic_eigenstrain_names = true
generate_output = 'strain_xx strain_yy strain_zz'
[../]
[./block2]
block = 2
strain = FINITE
add_variables = true
automatic_eigenstrain_names = true
generate_output = 'strain_xx strain_yy strain_zz'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = disp_x
boundary = 3
value = 0.0
[../]
[./bottom]
type = DirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[./back]
type = DirichletBC
variable = disp_z
boundary = 1
value = 0.0
[../]
[]
[AuxKernels]
[./temp]
type = FunctionAux
variable = temp
block = '1 2'
function = temp_func
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain1]
type = ComputeMeanThermalExpansionFunctionEigenstrain
block = 1
thermal_expansion_function = cte_func_mean
thermal_expansion_function_reference_temperature = 0.5
stress_free_temperature = 0.0
temperature = temp
eigenstrain_name = eigenstrain1
[../]
[./thermal_expansion_strain2]
type = ComputeInstantaneousThermalExpansionFunctionEigenstrain
block = 2
thermal_expansion_function = cte_func_inst
stress_free_temperature = 0.0
temperature = temp
eigenstrain_name = eigenstrain2
[../]
[]
[Functions]
[./cte_func_mean]
type = ParsedFunction
symbol_names = 'tsf tref scale' #stress free temp, reference temp, scale factor
symbol_values = '0.0 0.5 1e-4'
expression = 'scale * (t - tsf) / (t - tref)'
[../]
[./cte_func_inst]
type = PiecewiseLinear
xy_data = '0 1.0
2 1.0'
scale_factor = 1e-4
[../]
[./temp_func]
type = PiecewiseLinear
xy_data = '0 1
1 2'
[../]
[]
[Postprocessors]
[./disp_1]
type = NodalExtremeValue
variable = disp_x
boundary = 101
[../]
[./disp_2]
type = NodalExtremeValue
variable = disp_x
boundary = 102
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
l_max_its = 100
l_tol = 1e-4
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
start_time = 0.0
end_time = 1.0
dt = 0.1
[]
(test/tests/time_integrators/crank-nicolson/cranic.i)
#
# Testing a solution that is second order in space and second order in time
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 2*t*((x*x)+(y*y))-(4*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'crank-nicolson'
start_time = 0.0
num_steps = 5
dt = 0.25
# [./Adaptivity]
# refine_fraction = 0.2
# coarsen_fraction = 0.3
# max_h_level = 4
# [../]
[]
[Outputs]
exodus = true
[]
(test/tests/time_integrators/explicit-euler/ee-1d-quadratic-neumann.i)
[GlobalParams]
implicit = false
[]
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -1
xmax = 1
nx = 10
elem_type = EDGE3
[]
[Functions]
[./ic]
type = ParsedFunction
expression = 0
[../]
[./forcing_fn]
type = ParsedFunction
expression = x*x-2*t+t*x*x
[../]
[./exact_fn]
type = ParsedFunction
expression = t*x*x
[../]
[./left_bc_fn]
type = ParsedFunction
expression = -t*2*x
[../]
[./right_bc_fn]
type = ParsedFunction
expression = t*2*x
[../]
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic
[../]
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
implicit = true
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./abs]
type = Reaction
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./left]
type = FunctionNeumannBC
variable = u
boundary = '0'
function = left_bc_fn
[../]
[./right]
type = FunctionNeumannBC
variable = u
boundary = '1'
function = right_bc_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'explicit-euler'
solve_type = 'LINEAR'
l_tol = 1e-12
start_time = 0.0
num_steps = 10
dt = 0.001
[]
[Outputs]
exodus = true
[./console]
type = Console
max_rows = 10
[../]
[]
(test/tests/kernels/body_force/forcing_function_error_check.i)
!include forcing_function_test.i
[Functions]
active = 'wrong_forcing_function'
[wrong_forcing_function]
type = ParsedFunction
expression = '"alpha*alpha*pi*pi*sin(alpha*pi*x)"'
symbol_names = 'alpha'
symbol_values = '16'
[]
[]
(modules/richards/test/tests/newton_cooling/nc02.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1000
ny = 1
xmin = 0
xmax = 100
ymin = 0
ymax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 1.0E6
[../]
[./SeffVG]
type = RichardsSeff1VG
m = 0.8
al = 1E-5
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGnone]
type = RichardsSUPGnone
[../]
[]
[Variables]
active = 'pressure'
[./pressure]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_pressure
[../]
[../]
[]
[Functions]
active = 'initial_pressure'
[./initial_pressure]
type = ParsedFunction
expression = 2000000-x*1000000/100
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = pressure
boundary = left
value = 2E6
[../]
[./newton]
type = RichardsPiecewiseLinearSink
variable = pressure
boundary = right
pressures = '0 100000 200000 300000 400000 500000 600000 700000 800000 900000 1000000 1100000 1200000 1300000 1400000 1500000 1600000 1700000 1800000 1900000 2000000'
bare_fluxes = '0. 5.6677197748570516e-6 0.000011931518841831313 0.00001885408740732065 0.000026504708864284114 0.000034959953203725676 0.000044304443352900224 0.00005463170211001232 0.00006604508815181467 0.00007865883048198513 0.00009259917167338928 0.00010800563134618119 0.00012503240252705603 0.00014384989486488752 0.00016464644014777016 0.00018763017719085535 0.0002130311349595711 0.00024110353477682344 0.00027212833465544285 0.00030641604122040985 0.00034430981736352295'
use_mobility = false
use_relperm = false
[../]
[]
[Kernels]
active = 'richardsf'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
variable = pressure
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-15'
density_UO = DensityConstBulk
relperm_UO = RelPermPower
SUPG_UO = SUPGnone
sat_UO = Saturation
seff_UO = SeffVG
viscosity = 1E-3
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
active = 'andy'
[./andy]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-12 1E-15 10000'
[../]
[]
[Executioner]
type = Steady
snesmf_reuse_base = false
[]
[Outputs]
execute_on = 'timestep_end'
file_base = nc02
exodus = true
[]
(test/tests/restart/restart_subapp_not_parent/two_step_solve_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*t*(x*x+y*y)
[../]
[./forcing_fn]
type = ParsedFunction
expression = 2*t*(x*x+y*y)-4*t*t
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]
[ICs]
active = ''
[./u_var]
type = FunctionIC
variable = u
function = exact_fn
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[../]
[]
[Postprocessors]
[./average]
type = ElementAverageValue
variable = u
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
start_time = 2.0
end_time = 4.0
dt = 1.0
[]
[MultiApps]
[./full_solve]
type = FullSolveMultiApp
execute_on = initial
positions = '0 0 0'
# input file will come from cli-coupled_variables
[../]
[]
[Transfers]
[./transfer_u]
type = MultiAppProjectionTransfer
multi_app = full_solve
direction = FROM_MULTIAPP
variable = u
source_variable = u
[../]
[]
[Outputs]
#file_base will come from cli-coupled_variables
exodus = true
[]
(test/tests/linearfvkernels/block-restriction/block-restricted-diffusion-react.i)
source=1
diff_coeff=2
reac_coeff=3
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 1
dx = '0.5 0.5'
ix = '20 20'
subdomain_id = '1 2'
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = ${diff_coeff}
use_nonorthogonal_correction = false
block = 1
[]
[reaction]
type = LinearFVReaction
variable = u
coeff = ${reac_coeff}
block = 2
[]
[source]
type = LinearFVSource
variable = u
source_density = ${source}
[]
[]
[LinearFVBCs]
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "left"
functor = 0
[]
[]
[Functions]
[analytic_solution]
type = ParsedFunction
expression = 'if(x<0.5, -x*x*S/2/D+(S/C+0.5*0.5/2/D*S)/0.5*x, S/C)'
symbol_names = 'S D C'
symbol_values = '${source} ${diff_coeff} ${reac_coeff}'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = FINAL
block = 2
[]
[error]
type = ElementL2FunctorError
approximate = u
exact = analytic_solution
execute_on = FINAL
block = 2
[]
[]
[Executioner]
type = LinearPicardSteady
linear_systems_to_solve = u_sys
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
[csv]
type = CSV
execute_on = FINAL
[]
[]
(test/tests/time_integrators/explicit-euler/ee-1d-linear.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -1
xmax = 1
nx = 200
elem_type = EDGE2
[]
[Functions]
[./ic]
type = ParsedFunction
expression = 0
[../]
[./forcing_fn]
type = ParsedFunction
expression = x
[../]
[./exact_fn]
type = ParsedFunction
expression = t*x
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic
[../]
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
lumping = true
implicit = true
[../]
[./diff]
type = Diffusion
variable = u
implicit = false
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
implicit = false
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
preset = false
boundary = '0 1'
function = exact_fn
implicit = true
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'explicit-euler'
solve_type = 'LINEAR'
start_time = 0.0
num_steps = 20
dt = 0.00005
[]
[Outputs]
exodus = true
[./console]
type = Console
max_rows = 10
[../]
[]
(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/solid_mechanics/test/tests/2D_different_planes/gps_yz.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
file = square_yz_plane.e
[]
[Variables]
[./disp_y]
[../]
[./disp_z]
[../]
[./scalar_strain_xx]
order = FIRST
family = SCALAR
[../]
[]
[AuxVariables]
[./temp]
[../]
[./disp_x]
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./generalized_plane_strain]
block = 1
strain = SMALL
scalar_out_of_plane_strain = scalar_strain_xx
out_of_plane_direction = x
planar_formulation = GENERALIZED_PLANE_STRAIN
eigenstrain_names = 'eigenstrain'
generate_output = 'stress_xx stress_yz stress_yy stress_zz strain_xx strain_yz strain_yy strain_zz'
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
[../]
[]
[Functions]
[./tempfunc]
type = ParsedFunction
expression = '(1-y)*t'
[../]
[]
[BCs]
[./bottomx]
type = DirichletBC
boundary = 4
variable = disp_y
value = 0.0
[../]
[./bottomy]
type = DirichletBC
boundary = 4
variable = disp_z
value = 0.0
[../]
[]
[Materials]
[./elastic_stress]
type = ComputeLinearElasticStress
block = 1
[../]
[./thermal_strain]
type = ComputeThermalExpansionEigenstrain
temperature = temp
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
eigenstrain_name = eigenstrain
[../]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
block = 1
poissons_ratio = 0.3
youngs_modulus = 1e6
[../]
[]
[Postprocessors]
[./react_x]
type = MaterialTensorIntegral
use_displaced_mesh = false
rank_two_tensor = stress
index_i = 0
index_j = 0
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
# controls for linear iterations
l_max_its = 100
l_tol = 1e-10
# controls for nonlinear iterations
nl_max_its = 10
nl_rel_tol = 1e-12
# time control
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 2.0
[]
[Outputs]
file_base = gps_yz_small_out
exodus = true
[]
(test/tests/interfaces/coupleable/states.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 2
[]
[]
[Functions]
[linear]
type = ParsedFunction
expression = 'x + 10*t'
[]
[]
[GlobalParams]
family = MONOMIAL
order = CONSTANT
[]
[AuxVariables]
[base_variable]
[]
[]
[AuxKernels]
[base]
type = FunctionAux
function = 'linear'
variable = 'base_variable'
[]
[]
[Executioner]
type = Transient
num_steps = 3
[]
[Problem]
solve = false
[]
[Postprocessors]
[v_current]
type = SingleInternalFaceValue
variable = 'base_variable'
state = current
element_id = 0
side_index = 1
[]
[v_old]
type = SingleInternalFaceValue
variable = 'base_variable'
state = old
element_id = 0
side_index = 1
[]
[v_older]
type = SingleInternalFaceValue
variable = 'base_variable'
state = older
element_id = 0
side_index = 1
[]
[]
[Outputs]
csv = true
[]
(modules/combined/test/tests/beam_eigenstrain_transfer/subapp1_uo_transfer.i)
# SubApp with 2D model to test multi app vectorpostprocessor to aux var transfer
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 5
xmin = 0.0
xmax = 0.5
ymin = 0.0
ymax = 0.150080
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./temp]
[../]
[./axial_strain]
order = FIRST
family = MONOMIAL
[../]
[]
[Functions]
[./temperature_load]
type = ParsedFunction
expression = t*(500.0)+300.0
[../]
[]
[Modules]
[./TensorMechanics]
[./Master]
[./all]
strain = SMALL
incremental = true
add_variables = true
eigenstrain_names = eigenstrain
[../]
[../]
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = temperature_load
[../]
[./axial_strain]
type = RankTwoAux
variable = axial_strain
rank_two_tensor = total_strain
index_i = 1
index_j = 1
execute_on = timestep_end
[../]
[]
[BCs]
[./x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 298
thermal_expansion_coeff = 1.3e-5
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Executioner]
type = Transient
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
l_tol = 1e-9
start_time = 0.0
end_time = 0.075
dt = 0.0125
dtmin = 0.0001
[]
[Outputs]
exodus = true
[]
[VectorPostprocessors]
[./axial_str]
type = LineValueSampler
warn_discontinuous_face_values = false
start_point = '0.5 0.0 0.0'
end_point = '0.5 0.150080 0.0'
variable = 'axial_strain'
num_points = 21
sort_by = 'id'
[../]
[]
[Postprocessors]
[./end_disp]
type = PointValue
variable = disp_y
point = '0.5 0.150080 0.0'
[../]
[]
(modules/solid_mechanics/test/tests/umat/steps/elastic_temperature_steps_uo_intervals.i)
# Testing the UMAT Interface - linear elastic model using the large strain formulation.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[]
[Functions]
[top_pull_step2]
type = ParsedFunction
expression = (t-5.0)/20
[]
# Forced evolution of temperature
[temperature_load]
type = ParsedFunction
expression = '273'
[]
[]
[AuxVariables]
[temperature]
[]
[]
[AuxKernels]
[temperature_function]
type = FunctionAux
variable = temperature
function = temperature_load
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
generate_output = 'stress_yy'
[]
[]
[BCs]
[y_step1]
type = DirichletBC
variable = disp_y
boundary = top
value = 0.0
[]
[y_pull_function_step2]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = top_pull_step2
[]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[z_bot]
type = DirichletBC
variable = disp_z
boundary = front
value = 0.0
[]
[]
[Controls]
[step1]
type = StepPeriod
enable_objects = 'BCs::y_step1'
disable_objects = 'BCs::y_pull_function_step2'
step_user_object = step_uo
step_number = 0
[]
[step2]
type = StepPeriod
enable_objects = 'BCs::y_pull_function_step2'
disable_objects = 'BCs::y_step1'
step_user_object = step_uo
step_number = 1
[]
[]
[UserObjects]
[step_uo]
type = StepUserObject
number_steps = 2
total_time_interval = 10
[]
[]
[Materials]
[umat]
type = AbaqusUMATStress
constant_properties = '1000 0.3'
plugin = '../../../plugins/elastic_temperature'
num_state_vars = 0
temperature = temperature
use_one_based_indexing = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
num_steps = 10
dt = 1.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(modules/combined/examples/publications/rapid_dev/fig3.i)
#
# Fig. 3 input for 10.1016/j.commatsci.2017.02.017
# D. Schwen et al./Computational Materials Science 132 (2017) 36-45
# Comparison of an analytical (ca) and numerical (c) phase field interface
# profile. Supply the L parameter on the command line to gather the data for
# the inset plot.
#
[Mesh]
type = GeneratedMesh
dim = 1
nx = ${L}
xmin = -30
xmax = 30
[]
[Functions]
[./solution]
type = ParsedFunction
expression = 0.5*(1+tanh(x/2^0.5))
[../]
[]
[Variables]
[./c]
[./InitialCondition]
type = FunctionIC
function = solution
#type = FunctionIC
#function = if(x>0,1,0)
[../]
[../]
[./w]
[../]
[]
[AuxVariables]
[./diff]
[../]
[./ca]
[./InitialCondition]
type = FunctionIC
function = '0.5*(1+tanh(x/2^0.5))'
[../]
[../]
[]
[AuxKernels]
[./diff]
type = ParsedAux
variable = diff
expression = c-ca
coupled_variables = 'c ca'
[../]
[]
[Materials]
[./F]
type = DerivativeParsedMaterial
property_name = F
expression = 'c^2*(1-c)^2'
coupled_variables = c
[../]
[]
[Kernels]
# Split Cahn-Hilliard kernels
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = 1
w = w
[../]
[./wres]
type = SplitCHWRes
variable = w
mob_name = 1
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
[Postprocessors]
[./L2]
type = ElementL2Error
function = solution
variable = c
[../]
[]
[VectorPostprocessors]
[./c]
type = LineValueSampler
variable = 'c ca diff'
start_point = '-10 0 0'
end_point = '10 0 0'
num_points = 200
sort_by = x
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
nl_rel_tol = 1e-10
nl_abs_tol = 1e-12
end_time = 1e+6
[./TimeStepper]
type = IterationAdaptiveDT
dt = 1
optimal_iterations = 5
iteration_window = 1
[../]
[]
[Outputs]
csv = true
execute_on = final
[]
(test/tests/auxkernels/copy_value_aux/copy_aux.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = 0
xmax = 3.141
ymin = 0
ymax = 3.141
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[w]
family = MONOMIAL
order = CONSTANT
[]
[u_copy]
[]
[w_copy]
family = MONOMIAL
order = CONSTANT
[]
[]
[ICs]
[u_ic]
type = FunctionIC
variable = 'u'
function = parsed_function
[]
[w_ic]
type = FunctionIC
variable = 'w'
function = 'x + y'
[]
[]
[Functions]
[parsed_function]
type = ParsedFunction
expression = 'sin(x)-cos(y/2)'
[]
[]
[AuxKernels]
[copy_u]
type = CopyValueAux
variable = u_copy
source = u
[]
[copy_w]
type = CopyValueAux
variable = w_copy
source = w
[]
[]
[VectorPostprocessors]
[results]
type = LineValueSampler
start_point = '0.0001 0.99 0'
end_point = '3.14 0.99 0'
variable = 'u w u_copy w_copy'
num_points = 17
sort_by = x
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/bcs/vectorpostprocessor/vectorpostprocessor.i)
[Mesh]
type = GeneratedMesh
nx = 10
ny = 10
xmax = 1
ymax = 1
dim = 2
[]
[Variables]
[./u]
[../]
[./v]
[../]
[]
[Kernels]
[./conv]
type = ConservativeAdvection
variable = u
velocity = '0 1 0'
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./src]
type = BodyForce
variable = u
function = ffn
[../]
[./diffv]
type = Diffusion
variable = v
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = bottom
value = 2
[../]
[./right]
type = ChannelGradientBC
variable = u
boundary = right
channel_gradient_pps = channel_gradient
axis = y
h_name = h
[../]
[./top]
type = OutflowBC
variable = u
boundary = top
velocity = '0 1 0'
[../]
[./leftv]
type = DirichletBC
variable = v
boundary = left
value = 0
[../]
[./rightv]
type = DirichletBC
variable = v
boundary = right
value = 1
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'h'
#Nu = 4
#k = 1
#half_channel_length = 0.5
#h=Nu*k/half_channel_length
prop_values = '8'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
[VectorPostprocessors]
[./lv1]
num_points = 30
start_point = '0 0 0'
end_point = '0 1 0'
sort_by = 'y'
variable = u
type = LineValueSampler
execute_on = 'timestep_begin nonlinear timestep_end linear'
[../]
[./lv2]
num_points = 30
start_point = '1 0 0'
end_point = '1 1 0'
sort_by = 'y'
variable = v
type = LineValueSampler
execute_on = 'timestep_begin nonlinear timestep_end linear'
[../]
[./channel_gradient]
lv1 = lv1
lv2 = lv2
var1 = u
var2 = v
axis = y
type = ChannelGradientVectorPostprocessor
execute_on = 'timestep_begin nonlinear timestep_end linear'
[../]
[]
[Functions]
[./ffn]
type = ParsedFunction
expression = '1'
[../]
[]
(modules/solid_mechanics/test/tests/lagrangian/materials/convergence/stvenantkirchhoff.i)
# Simple 3D test
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 4
nz = 4
[]
[]
[ICs]
[disp_x]
type = RandomIC
variable = disp_x
min = -0.01
max = 0.01
[]
[disp_y]
type = RandomIC
variable = disp_y
min = -0.01
max = 0.01
[]
[disp_z]
type = RandomIC
variable = disp_z
min = -0.01
max = 0.01
[]
[]
[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
[]
[]
[Functions]
[pullx]
type = ParsedFunction
expression = '4000 * t'
[]
[pully]
type = ParsedFunction
expression = '-2000 * t'
[]
[pullz]
type = ParsedFunction
expression = '3000 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = left
variable = disp_y
value = 0.0
[]
[leftz]
type = DirichletBC
preset = true
boundary = left
variable = disp_z
value = 0.0
[]
[pull_x]
type = FunctionNeumannBC
boundary = right
variable = disp_x
function = pullx
[]
[pull_y]
type = FunctionNeumannBC
boundary = top
variable = disp_y
function = pully
[]
[pull_z]
type = FunctionNeumannBC
boundary = right
variable = disp_z
function = pullz
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
shear_modulus = 67000.0
lambda = 40000.0
[]
[compute_stress]
type = ComputeStVenantKirchhoffStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'newton'
line_search = none
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
l_max_its = 2
l_tol = 1e-14
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 2.0
[]
(test/tests/variables/fe_hier/hier-3-3d.i)
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
nx = 1
ny = 1
nz = 1
elem_type = HEX27
# This problem only has 1 element, so using DistributedMesh in parallel
# isn't really an option, and we don't care that much about DistributedMesh
# in serial.
parallel_type = replicated
[]
[Functions]
[./bc_fnt]
type = ParsedFunction
expression = 3*y*y
[../]
[./bc_fnb]
type = ParsedFunction
expression = -3*y*y
[../]
[./bc_fnl]
type = ParsedFunction
expression = -3*x*x
[../]
[./bc_fnr]
type = ParsedFunction
expression = 3*x*x
[../]
[./bc_fnk]
type = ParsedFunction
expression = -3*z*z
[../]
[./bc_fnf]
type = ParsedFunction
expression = 3*z*z
[../]
[./forcing_fn]
type = ParsedFunction
expression = -6*x-6*y-6*z+(x*x*x)+(y*y*y)+(z*z*z)
[../]
[./solution]
type = ParsedGradFunction
expression = (x*x*x)+(y*y*y)+(z*z*z)
grad_x = 3*x*x
grad_y = 3*y*y
grad_z = 3*z*z
[../]
[]
[Variables]
[./u]
order = THIRD
family = HIERARCHIC
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./bc_top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = bc_fnt
[../]
[./bc_bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bc_fnb
[../]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[./bc_front]
type = FunctionNeumannBC
variable = u
boundary = 'front'
function = bc_fnf
[../]
[./bc_back]
type = FunctionNeumannBC
variable = u
boundary = 'back'
function = bc_fnk
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/navier_stokes/test/tests/auxkernels/peclet-number-functor-aux/fe-thermal.i)
rho = 1
mu = 1
k = 1
cp = 1
[GlobalParams]
gravity = '0 0 0'
pspg = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[]
[]
[AuxVariables]
[Pe]
family = MONOMIAL
order = FIRST
[]
[]
[AuxKernels]
[Pe]
type = PecletNumberFunctorAux
variable = Pe
speed = speed
thermal_diffusivity = 'thermal_diffusivity'
[]
[]
[Variables]
[vel_x][]
[vel_y][]
[p][]
[T][]
[]
[Kernels]
# mass
[mass]
type = INSMass
variable = p
u = vel_x
v = vel_y
pressure = p
[]
# x-momentum, space
[x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[]
# y-momentum, space
[y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[]
[temperature_space]
type = INSTemperature
variable = T
u = vel_x
v = vel_y
[]
[]
[BCs]
[x_no_slip]
type = DirichletBC
variable = vel_x
boundary = 'bottom right left'
value = 0.0
[]
[lid]
type = FunctionDirichletBC
variable = vel_x
boundary = 'top'
function = 'lid_function'
[]
[y_no_slip]
type = DirichletBC
variable = vel_y
boundary = 'bottom right top left'
value = 0.0
[]
[pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[]
[T_hot]
type = DirichletBC
variable = T
boundary = 'bottom'
value = 1
[]
[T_cold]
type = DirichletBC
variable = T
boundary = 'top'
value = 0
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu k cp'
prop_values = '${rho} ${mu} ${k} ${cp}'
[]
[speed]
type = ADVectorMagnitudeFunctorMaterial
x_functor = vel_x
y_functor = vel_y
vector_magnitude_name = speed
[]
[thermal_diffusivity]
type = ThermalDiffusivityFunctorMaterial
k = ${k}
rho = ${rho}
cp = ${cp}
[]
[]
[Functions]
[lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type'
petsc_options_value = 'asm 2 lu'
line_search = 'none'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/element_subdomain_modifier/initial_condition.i)
[Problem]
solve = false
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 16
ny = 16
[]
[left]
type = SubdomainBoundingBoxGenerator
input = 'gen'
block_id = 1
bottom_left = '0 0 0'
top_right = '0.25 1 1'
[]
[right]
type = SubdomainBoundingBoxGenerator
input = 'left'
block_id = 2
bottom_left = '0.25 0 0'
top_right = '1 1 1'
[]
[]
[UserObjects]
[moving_circle]
type = CoupledVarThresholdElementSubdomainModifier
coupled_var = 'phi'
block = 2
criterion_type = BELOW
threshold = 0
subdomain_id = 1
moving_boundary_name = moving_boundary
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[Functions]
[moving_circle]
type = ParsedFunction
expression = '(x-t)^2+(y)^2-0.5^2'
[]
[]
[AuxVariables]
[u]
[InitialCondition]
type = ConstantIC
value = 1
[]
[]
[phi]
[]
# for the 'displaced' test only
inactive = 'disp_x disp_y'
[disp_x]
[]
[disp_y]
[]
[]
[AuxKernels]
[phi]
type = FunctionAux
variable = phi
function = moving_circle
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[double_u]
type = StatefulAux
variable = u
coupled = u
block = 1
[]
[]
[Postprocessors]
# for the 'subdomain_caching' test only
active = ''
[average]
type = SideAverageValue
variable = u
boundary = bottom
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 3
[]
[Outputs]
[out]
type = Exodus
[]
[]
(modules/thermal_hydraulics/test/tests/controls/terminate/terminate.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 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
[]
[]
[Postprocessors]
[dt_pp]
type = TimestepSize
[]
[]
[Components]
[]
[ControlLogic]
[threshold]
type = UnitTripControl
condition = 'dt_pp > 3'
symbol_names = 'dt_pp'
symbol_values = 'dt_pp'
[]
[terminate]
type = TerminateControl
input = threshold:state
termination_message = 'Threshold exceeded'
[]
[]
[Functions]
[dt_fn]
type = ParsedFunction
expression = '1 + t'
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = FunctionDT
function = dt_fn
[]
num_steps = 10
abort_on_solve_fail = true
[]
(modules/combined/test/tests/additive_manufacturing/check_stateful_properties.i)
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 10
ymin = 0
ymax = 10
zmin = 0
zmax = 0.5
nx = 20
ny = 20
nz = 1
[]
[left_domain]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '5 10 0.5'
block_id = 1
[]
[right_domain]
input = left_domain
type = SubdomainBoundingBoxGenerator
bottom_left = '5 0 0'
top_right = '10 10 0.5'
block_id = 2
[]
[sidesets]
input = right_domain
type = SideSetsAroundSubdomainGenerator
normal = '1 0 0'
block = 1
new_boundary = 'moving_interface'
[]
[]
[Variables]
[temp]
initial_condition = 300
block = '1'
[]
[]
# Output aux variables to check if stateful properties
# are initialized properly for newly added elements
[AuxVariables]
[density_aux]
order = CONSTANT
family = MONOMIAL
block = '1'
[]
[specific_heat_aux]
order = CONSTANT
family = MONOMIAL
block = '1'
[]
[thermal_conductivity_aux]
order = CONSTANT
family = MONOMIAL
block = '1'
[]
[]
[Kernels]
[null]
type = NullKernel
variable = temp
jacobian_fill = 1e-5
[]
[]
[AuxKernels]
[density]
type = ADMaterialRealAux
property = density
variable = density_aux
block = 1
[]
[specific_heat]
type = ADMaterialRealAux
property = specific_heat
variable = specific_heat_aux
block = 1
[]
[thermal_conductivity]
type = ADMaterialRealAux
property = thermal_conductivity
variable = thermal_conductivity_aux
block = 1
[]
[]
[Functions]
[fx]
type = ParsedFunction
expression = '5.25'
[]
[fy]
type = ParsedFunction
expression = '2.5*t'
[]
[fz]
type = ParsedFunction
expression = '0.25'
[]
[]
[Materials]
[density]
type = ADDensity
density = 4.43e-6
block = '1'
[]
[heat]
type = ADHeatConductionMaterial
specific_heat = 600
thermal_conductivity = 10e-3
block = '1'
[]
[volumetric_heat]
type = ADGenericConstantMaterial
prop_names = 'volumetric_heat'
prop_values = 100
block = '1'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
automatic_scaling = true
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_max_its = 10
nl_max_its = 20
nl_rel_tol = 1e-4
start_time = 0.0
end_time = 1.0
dt = 1e-1
dtmin = 1e-4
[]
[UserObjects]
[activated_elem_uo]
type = ActivateElementsByPath
execute_on = timestep_begin
function_x = fx
function_y = fy
function_z = fz
active_subdomain_id = 1
expand_boundary_name = 'moving_interface'
[]
[]
[Outputs]
exodus = true
[]
(modules/combined/examples/publications/rapid_dev/fig7b.i)
#
# Fig. 7 input for 10.1016/j.commatsci.2017.02.017
# D. Schwen et al./Computational Materials Science 132 (2017) 36-45
# Dashed black curve (2)
# Eigenstrain is globally applied. Single global elastic free energies.
# Supply the RADIUS parameter (10-35) on the command line to generate data
# for all curves in the plot.
#
[Mesh]
type = GeneratedMesh
dim = 1
nx = 32
xmin = 0
xmax = 100
second_order = true
[]
[Problem]
coord_type = RSPHERICAL
[]
[GlobalParams]
displacements = 'disp_r'
[]
[Functions]
[./diff]
type = ParsedFunction
expression = '${RADIUS}-pos_c'
symbol_names = pos_c
symbol_values = pos_c
[../]
[]
# AuxVars to compute the free energy density for outputting
[AuxVariables]
[./local_energy]
order = CONSTANT
family = MONOMIAL
[../]
[./cross_energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./local_free_energy]
type = TotalFreeEnergy
variable = local_energy
interfacial_vars = 'c'
kappa_names = 'kappa_c'
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
[Variables]
# Solute concentration variable
[./c]
[./InitialCondition]
type = SmoothCircleIC
invalue = 1
outvalue = 0
x1 = 0
y1 = 0
radius = ${RADIUS}
int_width = 3
[../]
[../]
[./w]
[../]
# Phase order parameter
[./eta]
[./InitialCondition]
type = SmoothCircleIC
invalue = 1
outvalue = 0
x1 = 0
y1 = 0
radius = ${RADIUS}
int_width = 3
[../]
[../]
[./Fe_fit]
order = SECOND
[../]
[]
[Modules/TensorMechanics/Master/all]
add_variables = true
eigenstrain_names = eigenstrain
[]
[Kernels]
# Split Cahn-Hilliard kernels
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
args = 'eta'
kappa_name = kappa_c
w = w
[../]
[./wres]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
# Allen-Cahn and Lagrange-multiplier constraint kernels for order parameter 1
[./detadt]
type = TimeDerivative
variable = eta
[../]
[./ACBulk1]
type = AllenCahn
variable = eta
args = 'c'
mob_name = L
f_name = F
[../]
[./ACInterface]
type = ACInterface
variable = eta
mob_name = L
kappa_name = kappa_eta
[../]
[./Fe]
type = MaterialPropertyValue
prop_name = Fe
variable = Fe_fit
[../]
[./autoadjust]
type = MaskedBodyForce
variable = w
function = diff
mask = mask
[../]
[]
[Materials]
# declare a few constants, such as mobilities (L,M) and interface gradient prefactors (kappa*)
[./consts]
type = GenericConstantMaterial
prop_names = 'M L kappa_c kappa_eta'
prop_values = '1.0 1.0 0.5 1'
[../]
# forcing function mask
[./mask]
type = ParsedMaterial
property_name = mask
expression = grad/dt
material_property_names = 'grad dt'
[../]
[./grad]
type = VariableGradientMaterial
variable = c
prop = grad
[../]
[./time]
type = TimeStepMaterial
[../]
# global mechanical properties
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1'
fill_method = symmetric_isotropic
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
# eigenstrain as a function of phase
[./eigenstrain]
type = ComputeVariableEigenstrain
eigen_base = '0.05 0.05 0.05 0 0 0'
prefactor = h
args = eta
eigenstrain_name = eigenstrain
[../]
# switching functions
[./switching]
type = SwitchingFunctionMaterial
function_name = h
eta = eta
h_order = SIMPLE
[../]
[./barrier]
type = BarrierFunctionMaterial
eta = eta
[../]
# chemical free energies
[./chemical_free_energy_1]
type = DerivativeParsedMaterial
property_name = Fc1
expression = 'c^2'
coupled_variables = 'c'
derivative_order = 2
[../]
[./chemical_free_energy_2]
type = DerivativeParsedMaterial
property_name = Fc2
expression = '(1-c)^2'
coupled_variables = 'c'
derivative_order = 2
[../]
# global chemical free energy
[./chemical_free_energy]
type = DerivativeTwoPhaseMaterial
f_name = Fc
fa_name = Fc1
fb_name = Fc2
eta = eta
args = 'c'
W = 4
[../]
# global elastic free energy
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = Fe
args = 'eta'
output_properties = Fe
derivative_order = 2
[../]
# free energy
[./free_energy]
type = DerivativeSumMaterial
property_name = F
sum_materials = 'Fc Fe'
coupled_variables = 'c eta'
derivative_order = 2
[../]
[]
[BCs]
[./left_r]
type = DirichletBC
variable = disp_r
boundary = 'left'
value = 0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
# We monitor the total free energy and the total solute concentration (should be constant)
[Postprocessors]
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
variable = local_energy
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[./total_solute]
type = ElementIntegralVariablePostprocessor
variable = c
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[./pos_c]
type = FindValueOnLine
start_point = '0 0 0'
end_point = '100 0 0'
v = c
target = 0.582
tol = 1e-8
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[./pos_eta]
type = FindValueOnLine
start_point = '0 0 0'
end_point = '100 0 0'
v = eta
target = 0.5
tol = 1e-8
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[./c_min]
type = ElementExtremeValue
value_type = min
variable = c
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[]
[VectorPostprocessors]
[./line]
type = LineValueSampler
variable = 'Fe_fit c w'
start_point = '0 0 0'
end_point = '100 0 0'
num_points = 5000
sort_by = x
outputs = vpp
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
l_max_its = 30
nl_max_its = 15
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 2.0e-9
start_time = 0.0
end_time = 100000.0
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 8
iteration_window = 1
dt = 1
[../]
[./Adaptivity]
initial_adaptivity = 5
interval = 10
max_h_level = 5
refine_fraction = 0.9
coarsen_fraction = 0.1
[../]
[]
[Outputs]
print_linear_residuals = false
perf_graph = true
execute_on = 'INITIAL TIMESTEP_END'
[./table]
type = CSV
delimiter = ' '
file_base = radius_${RADIUS}/eigenstrain_pp
[../]
[./vpp]
type = CSV
delimiter = ' '
sync_times = '10 50 100 500 1000 5000 10000 50000 100000'
sync_only = true
time_data = true
file_base = radius_${RADIUS}/eigenstrain_vpp
[../]
[]
(modules/combined/examples/phase_field-mechanics/interface_stress.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 50
ny = 50
nz = 50
xmax = 10
ymax = 10
zmax = 10
xmin = -10
ymin = -10
zmin = -10
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Functions]
[./sphere]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2+z^2); R:=(4.0-r)/2.0; if(R>1,1,if(R<0,0,3*R^2-2*R^3))'
[../]
[]
[AuxVariables]
[./eta]
[./InitialCondition]
type = FunctionIC
function = sphere
[../]
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
generate_output = 'hydrostatic_stress stress_xx'
[../]
[]
[Materials]
[./ym]
type = DerivativeParsedMaterial
property_name = ym
expression = (1-eta)*7+0.5
coupled_variables = eta
[../]
[./elasticity]
type = ComputeVariableIsotropicElasticityTensor
poissons_ratio = 0.45
youngs_modulus = ym
args = eta
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./interface]
type = ComputeInterfaceStress
v = eta
stress = 1.0
[../]
[]
[VectorPostprocessors]
[./line]
type = SphericalAverage
variable = 'hydrostatic_stress'
radius = 10
bin_number = 40
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
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/solid_mechanics/test/tests/lagrangian/cartesian/updated/convergence-auto/2D/neumann.i)
# Simple 2D plane strain test
[GlobalParams]
displacements = 'disp_x disp_y'
large_kinematics = true
stabilize_strain = true
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[ICs]
[disp_x]
type = RandomIC
variable = disp_x
min = -0.01
max = 0.01
[]
[disp_y]
type = RandomIC
variable = disp_y
min = -0.01
max = 0.01
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
[]
[]
[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
[]
[]
[Functions]
[pullx]
type = ParsedFunction
expression = '50000 * t'
[]
[pully]
type = ParsedFunction
expression = '-30000 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = left
variable = disp_y
value = 0.0
[]
[pull_x]
type = FunctionNeumannBC
boundary = right
variable = disp_x
function = pullx
[]
[pull_y]
type = FunctionNeumannBC
boundary = top
variable = disp_y
function = pully
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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-10
nl_abs_tol = 1e-12
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 1.0
[]
(test/tests/auxkernels/array_aux_kernels/function_array_aux.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Problem]
solve = false
kernel_coverage_check = false
[]
[AuxVariables]
[x]
components = 2
[]
[y]
order = SECOND
components = 2
[]
[z]
family = MONOMIAL
order = SIXTH
components = 3
[]
[]
[Functions]
[func1]
type = ParsedFunction
expression = x*x+y*y
[]
[func2]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[]
[func3]
type = ParsedFunction
expression = t
[]
[]
[AuxKernels]
[x]
type = FunctionArrayAux
variable = x
functions = 'func1 func2'
[]
[y]
type = FunctionArrayAux
variable = y
functions = 'func1 func2'
[]
[z]
type = FunctionArrayAux
variable = z
functions = 'func1 func2 func3'
[]
[]
[Postprocessors]
[x0]
type = ElementIntegralArrayVariablePostprocessor
variable = x
component = 0
[]
[x1]
type = ElementIntegralArrayVariablePostprocessor
variable = x
component = 1
[]
[y0]
type = ElementIntegralArrayVariablePostprocessor
variable = y
component = 0
[]
[y1]
type = ElementIntegralArrayVariablePostprocessor
variable = y
component = 1
[]
[z0]
type = ElementIntegralArrayVariablePostprocessor
variable = z
component = 0
[]
[z1]
type = ElementIntegralArrayVariablePostprocessor
variable = z
component = 1
[]
[z2]
type = ElementIntegralArrayVariablePostprocessor
variable = z
component = 2
[]
[]
[Executioner]
type = Transient
start_time = 0
num_steps = 5
dt = 1
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/GrandPotentialPFM/SinteringIdeal.i)
#input file to test the GrandPotentialSinteringMaterial using the ideal energy profile
[Mesh]
type = GeneratedMesh
dim = 2
nx = 17
ny = 10
xmin = 0
xmax = 660
ymin = 0
ymax = 380
[]
[GlobalParams]
op_num = 2
var_name_base = gr
int_width = 40
[]
[Variables]
[./w]
[./InitialCondition]
type = FunctionIC
variable = w
function = f_w
[../]
[../]
[./phi]
[../]
[./PolycrystalVariables]
[../]
[]
[AuxVariables]
[./T]
order = CONSTANT
family = MONOMIAL
[./InitialCondition]
type = FunctionIC
variable = T
function = f_T
[../]
[../]
[]
[ICs]
[./phi_IC]
type = SpecifiedSmoothCircleIC
variable = phi
x_positions = '190 470'
y_positions = '190 190'
z_positions = ' 0 0'
radii = '150 150'
invalue = 0
outvalue = 1
[../]
[./gr0_IC]
type = SmoothCircleIC
variable = gr0
x1 = 190
y1 = 190
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[./gr1_IC]
type = SmoothCircleIC
variable = gr1
x1 = 470
y1 = 190
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[]
[Functions]
[./f_T]
type = ConstantFunction
value = 1600
[../]
[./f_w]
type = ParsedFunction
expression = '1.515e-7 * x'
[../]
[]
[Materials]
# Free energy coefficients for parabolic curve
[./kv]
type = ParsedMaterial
property_name = kv
coupled_variables = 'T'
constant_names = 'a b'
constant_expressions = '-0.025 1571.6'
expression = 'a*T + b'
[../]
# Diffusivity and mobilities
[./chiD]
type = GrandPotentialTensorMaterial
f_name = chiD
solid_mobility = L
void_mobility = Lv
chi = chi
surface_energy = 19.7
c = phi
T = T
D0 = 2.0e11
GBmob0 = 1.4759e9
Q = 2.77
Em = 2.40
bulkindex = 1
gbindex = 20
surfindex = 100
[../]
# Equilibrium vacancy concentration
[./cs_eq]
type = DerivativeParsedMaterial
property_name = cs_eq
coupled_variables = 'gr0 gr1 T'
constant_names = 'Ef Egb kB'
constant_expressions = '2.69 2.1 8.617343e-5'
expression = 'bnds:=gr0^2 + gr1^2; cb:=exp(-Ef/kB/T); cgb:=exp(-(Ef-Egb)/kB/T);
cb + 4.0*(cgb-cb)*(1.0 - bnds)^2'
[../]
# Everything else
[./sintering]
type = GrandPotentialSinteringMaterial
chemical_potential = w
void_op = phi
Temperature = T
surface_energy = 19.7
grainboundary_energy = 9.86
void_energy_coefficient = kv
equilibrium_vacancy_concentration = cs_eq
solid_energy_model = IDEAL
outputs = exodus
[../]
# Concentration is only meant for output
[./c]
type = ParsedMaterial
property_name = c
material_property_names = 'hs rhos hv rhov'
constant_names = 'Va'
constant_expressions = '0.04092'
expression = 'Va*(hs*rhos + hv*rhov)'
outputs = exodus
[../]
[]
[Kernels]
[./dt_gr0]
type = TimeDerivative
variable = gr0
[../]
[./dt_gr1]
type = TimeDerivative
variable = gr1
[../]
[./dt_phi]
type = TimeDerivative
variable = phi
[../]
[./dt_w]
type = TimeDerivative
variable = w
[../]
[]
[AuxKernels]
[./T_aux]
type = FunctionAux
variable = T
function = f_T
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = JFNK
dt = 1
num_steps = 2
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/interface_stress/multi.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 10
nz = 10
xmax = 1
ymax = 1
zmax = 1
xmin = -1
ymin = -1
zmin = -1
[]
[GlobalParams]
order = CONSTANT
family = MONOMIAL
rank_two_tensor = extra_stress
[]
[Functions]
[./sphere1]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2+z^2); if(r>1,0,1-3*r^2+2*r^3)'
[../]
[./sphere2]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2+z^2); 0.5-0.5*if(r>1,0,1-3*r^2+2*r^3)'
[../]
[]
[Variables]
[./dummy]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = dummy
[../]
[]
[AuxVariables]
[./eta1]
[./InitialCondition]
type = FunctionIC
function = sphere1
[../]
order = FIRST
family = LAGRANGE
[../]
[./eta2]
[./InitialCondition]
type = FunctionIC
function = sphere2
[../]
order = FIRST
family = LAGRANGE
[../]
[./s00]
[../]
[./s01]
[../]
[./s02]
[../]
[./s10]
[../]
[./s11]
[../]
[./s12]
[../]
[./s20]
[../]
[./s21]
[../]
[./s22]
[../]
[]
[AuxKernels]
[./s00]
type = RankTwoAux
variable = s00
index_i = 0
index_j = 0
[../]
[./s01]
type = RankTwoAux
variable = s01
index_i = 0
index_j = 1
[../]
[./s02]
type = RankTwoAux
variable = s02
index_i = 0
index_j = 2
[../]
[./s10]
type = RankTwoAux
variable = s10
index_i = 1
index_j = 0
[../]
[./s11]
type = RankTwoAux
variable = s11
index_i = 1
index_j = 1
[../]
[./s12]
type = RankTwoAux
variable = s12
index_i = 1
index_j = 2
[../]
[./s20]
type = RankTwoAux
variable = s20
index_i = 2
index_j = 0
[../]
[./s21]
type = RankTwoAux
variable = s21
index_i = 2
index_j = 1
[../]
[./s22]
type = RankTwoAux
variable = s22
index_i = 2
index_j = 2
[../]
[]
[Materials]
[./interface]
type = ComputeInterfaceStress
v = 'eta1 eta2'
stress = '1.0 2.0'
op_range = '1.0 0.5'
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
file_base = test_out
execute_on = timestep_end
hide = 'dummy eta1 eta2'
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/user_object_based/user_object.i)
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
displacements = 'disp_x disp_y'
nx = 2
ny = 2
[]
[GlobalParams]
volumetric_locking_correction = true
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y'
use_displaced_mesh = true
[../]
[]
[AuxVariables]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./e_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./fp_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./rotout]
order = CONSTANT
family = MONOMIAL
[../]
[./gss]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./tdisp]
type = ParsedFunction
expression = 0.01*t
[../]
[]
[UserObjects]
[./prop_read]
type = PropertyReadFile
prop_file_name = 'euler_ang_file.txt'
# Enter file data as prop#1, prop#2, .., prop#nprop
nprop = 3
read_type = element
[../]
[]
[AuxKernels]
[./stress_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = stress
index_j = 1
index_i = 1
execute_on = timestep_end
[../]
[./e_yy]
type = RankTwoAux
variable = e_yy
rank_two_tensor = lage
index_j = 1
index_i = 1
execute_on = timestep_end
[../]
[./fp_yy]
type = RankTwoAux
variable = fp_yy
rank_two_tensor = fp
index_j = 1
index_i = 1
execute_on = timestep_end
[../]
[./gss]
type = MaterialStdVectorAux
variable = gss
property = state_var_gss
index = 0
execute_on = timestep_end
[../]
[]
[BCs]
[./fix_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0
[../]
[./fix_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./tdisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = tdisp
[../]
[]
[UserObjects]
[./slip_rate_gss]
type = CrystalPlasticitySlipRateGSS
variable_size = 12
slip_sys_file_name = input_slip_sys.txt
num_slip_sys_flowrate_props = 2
flowprops = '1 4 0.001 0.1 5 8 0.001 0.1 9 12 0.001 0.1'
uo_state_var_name = state_var_gss
[../]
[./slip_resistance_gss]
type = CrystalPlasticitySlipResistanceGSS
variable_size = 12
uo_state_var_name = state_var_gss
[../]
[./state_var_gss]
type = CrystalPlasticityStateVariable
variable_size = 12
groups = '0 4 8 12'
group_values = '60.8 60.8 60.8'
uo_state_var_evol_rate_comp_name = state_var_evol_rate_comp_gss
scale_factor = 1.0
[../]
[./state_var_evol_rate_comp_gss]
type = CrystalPlasticityStateVarRateComponentGSS
variable_size = 12
hprops = '1.0 541.5 109.8 2.5'
uo_slip_rate_name = slip_rate_gss
uo_state_var_name = state_var_gss
[../]
[]
[Materials]
[./crysp]
type = FiniteStrainUObasedCP
stol = 1e-2
tan_mod_type = exact
uo_slip_rates = 'slip_rate_gss'
uo_slip_resistances = 'slip_resistance_gss'
uo_state_vars = 'state_var_gss'
uo_state_var_evol_rate_comps = 'state_var_evol_rate_comp_gss'
[../]
[./strain]
type = ComputeFiniteStrain
displacements = 'disp_x disp_y'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensorCP
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
read_prop_user_object = prop_read
[../]
[]
[Postprocessors]
[./stress_yy]
type = ElementAverageValue
variable = stress_yy
[../]
[./e_yy]
type = ElementAverageValue
variable = e_yy
[../]
[./fp_yy]
type = ElementAverageValue
variable = fp_yy
[../]
[./gss]
type = ElementAverageValue
variable = gss
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
dt = 0.01
solve_type = 'PJFNK'
petsc_options_iname = -pc_hypre_type
petsc_options_value = boomerang
nl_abs_tol = 1e-10
nl_rel_step_tol = 1e-10
dtmax = 10.0
nl_rel_tol = 1e-10
end_time = 1
dtmin = 0.01
num_steps = 10
nl_abs_step_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(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/navier_stokes/test/tests/finite_element/ins/mms/supg/supg_adv_dominated_mms.i)
mu=1.5e-2
rho=2.5
[GlobalParams]
gravity = '0 0 0'
supg = true
convective_term = true
integrate_p_by_parts = false
transient_term = true
laplace = true
u = vel_x
v = vel_y
pressure = p
alpha = 1e0
order = SECOND
family = LAGRANGE
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
elem_type = QUAD9
nx = 4
ny = 4
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./vel_x]
[../]
[./vel_y]
[../]
[./p]
order = FIRST
[../]
[]
[Kernels]
# mass
[./mass]
type = INSMass
variable = p
[../]
[./x_time]
type = INSMomentumTimeDerivative
variable = vel_x
[../]
[./y_time]
type = INSMomentumTimeDerivative
variable = vel_y
[../]
# x-momentum, space
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
component = 0
forcing_func = vel_x_source_func
[../]
# y-momentum, space
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
component = 1
forcing_func = vel_y_source_func
[../]
[./p_source]
type = BodyForce
function = p_source_func
variable = p
[../]
[]
[BCs]
[./vel_x]
type = FunctionDirichletBC
boundary = 'left right top bottom'
function = vel_x_func
variable = vel_x
[../]
[./vel_y]
type = FunctionDirichletBC
boundary = 'left right top bottom'
function = vel_y_func
variable = vel_y
[../]
[./p]
type = FunctionDirichletBC
boundary = 'left right top bottom'
function = p_func
variable = p
[../]
[]
[Functions]
[./vel_x_source_func]
type = ParsedFunction
expression = '-${mu}*(-0.028*pi^2*x^2*sin(0.2*pi*x*y) - 0.028*pi^2*y^2*sin(0.2*pi*x*y) - 0.1*pi^2*sin(0.5*pi*x) - 0.4*pi^2*sin(pi*y)) + ${rho}*(0.14*pi*x*cos(0.2*pi*x*y) + 0.4*pi*cos(pi*y))*(0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3) + ${rho}*(0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x))*(0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5) + 0.1*pi*y*cos(0.2*pi*x*y) + 0.25*pi*cos(0.5*pi*x)'
[../]
[./vel_y_source_func]
type = ParsedFunction
expression = '-${mu}*(-0.018*pi^2*x^2*sin(0.3*pi*x*y) - 0.018*pi^2*y^2*sin(0.3*pi*x*y) - 0.384*pi^2*sin(0.8*pi*x) - 0.027*pi^2*sin(0.3*pi*y)) + ${rho}*(0.06*pi*x*cos(0.3*pi*x*y) + 0.09*pi*cos(0.3*pi*y))*(0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3) + ${rho}*(0.06*pi*y*cos(0.3*pi*x*y) + 0.48*pi*cos(0.8*pi*x))*(0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5) + 0.1*pi*x*cos(0.2*pi*x*y) + 0.3*pi*cos(0.3*pi*y)'
[../]
[./p_source_func]
type = ParsedFunction
expression = '-0.06*pi*x*cos(0.3*pi*x*y) - 0.14*pi*y*cos(0.2*pi*x*y) - 0.2*pi*cos(0.5*pi*x) - 0.09*pi*cos(0.3*pi*y)'
[../]
[./vel_x_func]
type = ParsedFunction
expression = '0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5'
[../]
[./vel_y_func]
type = ParsedFunction
expression = '0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3'
[../]
[./p_func]
type = ParsedFunction
expression = '0.5*sin(0.5*pi*x) + 1.0*sin(0.3*pi*y) + 0.5*sin(0.2*pi*x*y) + 0.5'
[../]
[./vxx_func]
type = ParsedFunction
expression = '0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x)'
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
num_steps = 10
petsc_options = '-snes_converged_reason -ksp_converged_reason'
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-14
nl_max_its = 10
l_tol = 1e-6
l_max_its = 10
[./TimeStepper]
dt = .05
type = IterationAdaptiveDT
cutback_factor = 0.4
growth_factor = 1.2
optimal_iterations = 20
[../]
[]
[Outputs]
execute_on = 'final'
[./exodus]
type = Exodus
[../]
[./csv]
type = CSV
[../]
[]
[Postprocessors]
[./L2vel_x]
type = ElementL2Error
variable = vel_x
function = vel_x_func
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2vel_y]
variable = vel_y
function = vel_y_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2p]
variable = p
function = p_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2vxx]
variable = vxx
function = vxx_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[]
[AuxVariables]
[./vxx]
family = MONOMIAL
order = FIRST
[../]
[]
[AuxKernels]
[./vxx]
type = VariableGradientComponent
component = x
variable = vxx
gradient_variable = vel_x
[../]
[]
(test/tests/fvkernels/mms/cylindrical/diffusion.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
coord_type = 'RZ'
[]
[Variables]
[v]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[]
[FVKernels]
[diff_v]
type = FVDiffusion
variable = v
coeff = coeff
[]
[body_v]
type = FVBodyForce
variable = v
function = 'forcing'
[]
[]
[FVBCs]
[boundary]
type = FVFunctionDirichletBC
boundary = 'left right top bottom'
function = 'exact'
variable = v
[]
[]
[Materials]
[diff]
type = ADGenericFunctorMaterial
prop_names = 'coeff'
prop_values = '1'
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = '1.1*sin(0.9*x)*cos(1.2*y)'
[]
[forcing]
type = ParsedFunction
expression = '1.584*sin(0.9*x)*cos(1.2*y) - (-0.891*x*sin(0.9*x)*cos(1.2*y) + 0.99*cos(0.9*x)*cos(1.2*y))/x'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[./error]
type = ElementL2Error
variable = v
function = exact
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(test/tests/time_integrators/actually_explicit_euler_verification/ee-2d-linear-adapt.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Functions]
[./ic]
type = ParsedFunction
expression = 0
[../]
[./forcing_fn]
type = ParsedFunction
expression = (x+y)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*(x+y)
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic
[../]
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
preset = false
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 2
[./Markers]
[./box]
bottom_left = '-0.4 -0.4 0'
inside = refine
top_right = '0.4 0.4 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
start_time = 0.0
num_steps = 4
dt = 0.005
l_tol = 1e-12
[./TimeIntegrator]
type = ActuallyExplicitEuler
[../]
[]
[Outputs]
exodus = true
[./console]
type = Console
max_rows = 10
[../]
[]
(test/tests/auxkernels/aux_scalar_deps/aux_scalar_deps.i)
#
# Testing a solution that is second order in space and first order in time
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[AuxVariables]
[./a]
family = SCALAR
order = FIRST
[../]
[./b]
family = SCALAR
order = FIRST
[../]
[./c]
family = SCALAR
order = FIRST
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./a_ic]
type = ScalarConstantIC
variable = a
value = 0
[../]
[./b_ic]
type = ScalarConstantIC
variable = b
value = 2
[../]
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t
[../]
[./a_fn]
type = ParsedFunction
expression = t
[../]
[./b_fn]
type = ParsedFunction
expression = (4-t)/2
[../]
[]
# NOTE: The execute_on = 'timestep_end' is crucial for this test. Without it
# the aux values would be updated during the residual formation and we would
# end up with the right value at the end of the time step. With this flag on,
# the dependencies has to be correct for this test to work. Otherwise the
# values of 'c' will be lagged.
[AuxScalarKernels]
[./c_saux]
type = QuotientScalarAux
variable = c
numerator = a
denominator = b
execute_on = 'timestep_end'
[../]
[./a_saux]
type = FunctionScalarAux
variable = a
function = a_fn
execute_on = 'timestep_end'
[../]
[./b_saux]
type = FunctionScalarAux
variable = b
function = b_fn
execute_on = 'timestep_end'
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 2
dt = 1
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/dispersion/disp01.i)
# Test dispersive part of PorousFlowDispersiveFlux kernel by setting diffusion
# coefficients to zero. A pressure gradient is applied over the mesh to give a
# uniform velocity. Gravity is set to zero.
# Mass fraction is set to 1 on the left hand side and 0 on the right hand side.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 10
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[pp]
[]
[massfrac0]
[]
[]
[AuxVariables]
[velocity]
family = MONOMIAL
order = FIRST
[]
[]
[AuxKernels]
[velocity]
type = PorousFlowDarcyVelocityComponent
variable = velocity
component = x
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = pic
[]
[massfrac0]
type = ConstantIC
variable = massfrac0
value = 0
[]
[]
[Functions]
[pic]
type = ParsedFunction
expression = 1.1e5-x*1e3
[]
[]
[BCs]
[xleft]
type = DirichletBC
value = 1
variable = massfrac0
boundary = left
[]
[xright]
type = DirichletBC
value = 0
variable = massfrac0
boundary = right
[]
[pright]
type = DirichletBC
variable = pp
boundary = right
value = 1e5
[]
[pleft]
type = DirichletBC
variable = pp
boundary = left
value = 1.1e5
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[adv0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
[]
[diff0]
type = PorousFlowDispersiveFlux
variable = pp
disp_trans = 0
disp_long = 0.2
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = massfrac0
[]
[adv1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = massfrac0
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = massfrac0
disp_trans = 0
disp_long = 0.2
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1e9
density0 = 1000
viscosity = 0.001
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = massfrac0
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[poro]
type = PorousFlowPorosityConst
porosity = 0.3
[]
[diff]
type = PorousFlowDiffusivityConst
diffusion_coeff = '0 0'
tortuosity = 0.1
[]
[relp]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-9 0 0 0 1e-9 0 0 0 1e-9'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu NONZERO 2 '
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 1e3
dtmax = 50
[TimeStepper]
type = IterationAdaptiveDT
growth_factor = 1.5
cutback_factor = 0.5
dt = 1
[]
[]
[VectorPostprocessors]
[xmass]
type = NodalValueSampler
sort_by = id
variable = massfrac0
[]
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(test/tests/transfers/multiapp_conservative_transfer/parent_power_density.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[block1]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0.5 0 0'
top_right = '1 1 0'
[]
[]
[Variables]
[power_density]
[]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2'
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[BCs]
[left]
type = DirichletBC
variable = power_density
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = power_density
boundary = right
value = 1e3
[]
[]
[AuxVariables]
[from_sub]
[]
[]
[Postprocessors]
[pwr0]
type = ElementIntegralVariablePostprocessor
block = 0
variable = power_density
[]
[pwr1]
type = ElementIntegralVariablePostprocessor
block = 1
variable = power_density
[]
[from_sub0]
type = ElementIntegralVariablePostprocessor
block = 0
variable = from_sub
execute_on = 'transfer'
[]
[from_sub1]
type = ElementIntegralVariablePostprocessor
block = 1
variable = from_sub
execute_on = 'transfer'
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
input_files = sub_power_density.i
positions = '0 0 0 0.5 0 0'
execute_on = timestep_end
[]
[]
[Transfers]
[to_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = power_density
variable = from_parent
to_multi_app = sub
execute_on = timestep_end
# The following inputs specify what postprocessors should be conserved
# N pps are specified on the parent side, where N is the number of subapps
# 1 pp is specified on the subapp side
from_postprocessors_to_be_preserved = 'pwr0 pwr1'
to_postprocessors_to_be_preserved = 'from_parent_pp'
[]
[from_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = sink
variable = from_sub
from_multi_app = sub
execute_on = timestep_end
# The following inputs specify what postprocessors should be conserved
# N pps are specified on the parent side, where N is the number of subapps
# 1 pp is specified on the subapp side
to_postprocessors_to_be_preserved = 'from_sub0 from_sub1'
from_postprocessors_to_be_preserved = 'sink'
[]
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/transient_heat/transient_heat_derivatives.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
initial_condition = 2
[]
[]
[Kernels]
[heat]
type = HeatConduction
variable = temp
[]
[ie]
type = HeatConductionTimeDerivative
variable = temp
specific_heat_dT = specific_heat_dT
density_name_dT = density_dT
[]
[]
[Functions]
[spheat]
type = ParsedFunction
expression = 't^4'
[]
[thcond]
type = ParsedFunction
expression = 'exp(t)'
[]
[]
[BCs]
[bottom]
type = DirichletBC
variable = temp
boundary = 1
value = 4
[]
[top]
type = DirichletBC
variable = temp
boundary = 2
value = 1
[]
[]
[Materials]
[constant]
type = HeatConductionMaterial
thermal_conductivity_temperature_function = thcond
specific_heat_temperature_function = spheat
temp = temp
[]
[density]
type = ParsedMaterial
property_name = density
coupled_variables = temp
expression = 'temp^3 + 2/temp'
[]
[density_dT]
type = ParsedMaterial
property_name = density_dT
coupled_variables = temp
expression = '3 * temp^2 - 2/temp/temp'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
num_steps = 1
dt = .1
nl_max_its = 10
dtmin = .1
[]
[Postprocessors]
[avg]
type = ElementAverageValue
variable = temp
[]
[]
[Outputs]
csv = true
[]
(modules/fluid_properties/test/tests/materials/fluid_properties_material/test_ve.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
elem_type = QUAD4
[]
[Functions]
[fn_1]
type = ParsedFunction
expression = '2000 + 100*x'
[]
[fn_2]
type = ParsedFunction
expression = '0.02 * (x*x+y*y)'
[]
[]
[AuxVariables]
[e]
[InitialCondition]
type = FunctionIC
function = fn_1
[]
[]
[v]
[InitialCondition]
type = FunctionIC
function = fn_2
[]
[]
[p]
family = MONOMIAL
order = CONSTANT
[]
[T]
family = MONOMIAL
order = CONSTANT
[]
[cp]
family = MONOMIAL
order = CONSTANT
[]
[cv]
family = MONOMIAL
order = CONSTANT
[]
[c]
family = MONOMIAL
order = CONSTANT
[]
[mu]
family = MONOMIAL
order = CONSTANT
[]
[k]
family = MONOMIAL
order = CONSTANT
[]
[s]
family = MONOMIAL
order = CONSTANT
[]
[g]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[p]
type = MaterialRealAux
variable = p
property = pressure
[]
[T]
type = MaterialRealAux
variable = T
property = temperature
[]
[cp]
type = MaterialRealAux
variable = cp
property = cp
[]
[cv]
type = MaterialRealAux
variable = cv
property = cv
[]
[c]
type = MaterialRealAux
variable = c
property = c
[]
[mu]
type = MaterialRealAux
variable = mu
property = mu
[]
[k]
type = MaterialRealAux
variable = k
property = k
[]
[s]
type = MaterialRealAux
variable = s
property = s
[]
[g]
type = MaterialRealAux
variable = g
property = g
[]
[]
[FluidProperties]
[ideal_gas]
type = IdealGasFluidProperties
gamma = 1.4
molar_mass = 1.000536678700361
[]
[]
[Materials]
[fp_mat]
type = FluidPropertiesMaterialVE
e = e
v = v
fp = ideal_gas
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Problem]
solve = false
[]
[Outputs]
exodus = true
[]
(test/tests/time_steppers/timesequence_stepper/timesequence_failed_solve.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*t*(x*x+y*y)
[../]
[./forcing_fn]
type = ParsedFunction
expression = 2*t*(x*x+y*y)-4*t*t
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]
[ICs]
[./u_var]
type = FunctionIC
variable = u
function = exact_fn
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[../]
[]
[Executioner]
type = Transient
# This timestepper does not use dt to set the timestep, it uses the time_sequence.
# dt = 250
dtmin=250
end_time = 3000.0
[./TimeStepper]
type = TimeSequenceStepperFailTest
time_sequence = '0 1000.0 2000.0'
[../]
nl_rel_tol=1.e-10
[]
[Outputs]
file_base = timesequence_failed_solve
exodus = true
[]
(test/tests/bcs/nodal_normals/cylinder_hexes_1st_2nd.i)
# First order normals on second order mesh
[Mesh]
file = cylinder-hexes-2nd.e
[]
[Functions]
[./all_bc_fn]
type = ParsedFunction
expression = x*x+y*y
[../]
[./f_fn]
type = ParsedFunction
expression = -4
[../]
[]
[NodalNormals]
boundary = '1'
corner_boundary = 100
order = FIRST
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = f_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = 'all_bc_fn'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-13
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/problems/reference_residual_problem/abs_ref.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
[]
[GlobalParams]
absolute_value_vector_tags = 'absref'
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'absref'
extra_tag_vectors = 'absref'
[]
[Variables]
[u][]
[v]
scaling = 1e-6
[]
[]
[Functions]
[ramp]
type = ParsedFunction
expression = 'if(t < 5, t - 5, 0) * x'
[]
[]
[Kernels]
[u_dt]
type = TimeDerivative
variable = u
[]
[u_coupled_rx]
type = CoupledForce
variable = u
v = v
coef = 1
[]
[v_dt]
type = TimeDerivative
variable = v
[]
[v_neg_force]
type = BodyForce
variable = v
value = ${fparse -1 / 2}
function = ramp
[]
[v_force]
type = BodyForce
variable = v
value = 1
function = ramp
[]
[]
[Postprocessors]
[u_avg]
type = ElementAverageValue
variable = u
execute_on = 'TIMESTEP_END INITIAL'
[]
[v_avg]
type = ElementAverageValue
variable = v
execute_on = 'TIMESTEP_END INITIAL'
[]
[timestep]
type = TimePostprocessor
outputs = 'none'
[]
[v_old]
type = ElementAverageValue
variable = v
execute_on = TIMESTEP_BEGIN
outputs = none
[]
[u_old]
type = ElementAverageValue
variable = u
execute_on = TIMESTEP_BEGIN
outputs = none
[]
[v_exact]
type = ParsedPostprocessor
pp_names = 'timestep v_old'
expression = 't := if(timestep > 5, 5, timestep); (t^2 - 9 * t) / 8'
[]
[u_exact]
type = ParsedPostprocessor
pp_names = 'u_old v_exact'
expression = 'u_old + v_exact'
[]
[]
[Executioner]
type = Transient
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = none
num_steps = 10
nl_rel_tol = 1e-06
verbose = true
[]
[Outputs]
csv = true
[]
(test/tests/multiapps/restart_multilevel/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
ymin = 0
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[Functions]
[v_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[]
[AuxVariables]
[v]
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[ufn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = v_fn
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
checkpoint = true
[]
[MultiApps]
[sub_app]
app_type = MooseTestApp
type = TransientMultiApp
input_files = 'sub.i'
execute_on = timestep_end
positions = '0 -1 0'
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[]
[]
(test/tests/bcs/second_deriv/test_lap_bc.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
elem_type = QUAD9
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = force_fn
[../]
[]
[Functions]
[./left_bc_func]
type = ParsedFunction
expression = '1+y*y'
[../]
[./top_bc_func]
type = ParsedFunction
expression = '1+x*x'
[../]
[./bottom_bc_func]
type = ParsedFunction
expression = '1+x*x'
[../]
[./force_fn]
type = ParsedFunction
expression = -4
[../]
[]
[BCs]
[./left]
type = FunctionDirichletBC
variable = u
boundary = left
function = left_bc_func
[../]
[./bottom]
type = FunctionDirichletBC
variable = u
boundary = bottom
function = bottom_bc_func
[../]
[./top]
type = FunctionDirichletBC
variable = u
boundary = top
function = top_bc_func
[../]
[./right_test]
type = TestLapBC
variable = u
boundary = right
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
file_base = out
exodus = true
[]
(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
[]
(test/tests/misc/check_error/bad_parsed_function_vars.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
nz = 2
[]
[Variables]
[./u]
block = 0
[../]
[]
[Functions]
[./sin_func]
type = ParsedFunction
expression = sin(y)
symbol_names = y # <- This is a bad - you can't specify x, y, z, or t
symbol_values = 0
[../]
[]
[Kernels]
[./diffused]
type = Diffusion
variable = u
block = 0
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 1
[../]
[./right]
type = FunctionDirichletBC
variable = u
boundary = right
function = sin_func
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
execute_on = 'timestep_end'
[]
(modules/solid_mechanics/test/tests/umat/predef/predef_multiple.i)
# Testing the UMAT Interface - linear elastic model using the large strain formulation.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[]
[Functions]
[top_pull]
type = ParsedFunction
expression = -t*10
[]
[right_pull]
type = ParsedFunction
expression = -t*0.5
[]
[]
[AuxVariables]
[strain_yy]
family = MONOMIAL
order = FIRST
[]
[strain_xx]
family = MONOMIAL
order = FIRST
[]
[]
[AuxKernels]
[strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xx
index_i = 0
index_j = 0
[]
[strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 1
index_j = 1
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
[]
[]
[BCs]
[Pressure]
[bc_presssure_top]
boundary = top
function = top_pull
[]
[bc_presssure_right]
boundary = right
function = right_pull
[]
[]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = bottom
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[z_bot]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0.0
[]
[]
[Materials]
# 1. Active for UMAT
[umat]
type = AbaqusUMATStress
constant_properties = '1000 0.3'
plugin = '../../../plugins/elastic_multiple_predef'
num_state_vars = 0
external_fields = 'strain_xx strain_yy'
use_one_based_indexing = true
[]
# 2. Active for reference MOOSE computations
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
base_name = 'base'
youngs_modulus = 1e3
poissons_ratio = 0.3
[]
[strain_dependent_elasticity_tensor]
type = CompositeElasticityTensor
args = 'strain_yy strain_xx'
tensors = 'base'
weights = 'prefactor_material'
[]
[prefactor_material_block]
type = DerivativeParsedMaterial
property_name = prefactor_material
coupled_variables = 'strain_yy strain_xx'
expression = '1.0/(1.0 + strain_yy + strain_xx)'
[]
[stress]
type = ComputeFiniteStrainElasticStress
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
end_time = 30
dt = 1.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/element_integral_var_pps/pps_old_value.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 4
ny = 4
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
initial_condition = 1
[../]
[]
[Functions]
[./force_fn]
type = ParsedFunction
expression = '1'
[../]
[./exact_fn]
type = ParsedFunction
expression = 't'
[../]
[]
[Kernels]
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[]
[BCs]
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./a]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = 'initial timestep_end'
[../]
[./total_a]
type = TimeIntegratedPostprocessor
value = a
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 1
start_time = 1
end_time = 3
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/combined/test/tests/reference_residual/group_variables.i)
[Mesh]
file = 2squares.e
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
group_variables = 'disp_x disp_y;
scalar_strain_zz1 scalar_strain_zz2'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./scalar_strain_zz1]
order = FIRST
family = SCALAR
[../]
[./scalar_strain_zz2]
order = FIRST
family = SCALAR
[../]
[]
[AuxVariables]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[./saved_x]
order = FIRST
family = LAGRANGE
[../]
[./saved_y]
order = FIRST
family = LAGRANGE
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./aux_strain_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./saved_scalar_strain_zz1]
order = FIRST
family = SCALAR
[../]
[./saved_scalar_strain_zz2]
order = FIRST
family = SCALAR
[../]
[]
[Postprocessors]
[./react_z1]
type = MaterialTensorIntegral
rank_two_tensor = stress
index_i = 2
index_j = 2
block = 1
[../]
[./react_z2]
type = MaterialTensorIntegral
rank_two_tensor = stress
index_i = 2
index_j = 2
block = 2
[../]
[]
[Modules]
[./TensorMechanics]
[./GeneralizedPlaneStrain]
[./gps1]
use_displaced_mesh = true
displacements = 'disp_x disp_y'
scalar_out_of_plane_strain = scalar_strain_zz1
block = '1'
[../]
[./gps2]
use_displaced_mesh = true
displacements = 'disp_x disp_y'
scalar_out_of_plane_strain = scalar_strain_zz2
block = '2'
[../]
[../]
[../]
[]
[Kernels]
[./TensorMechanics]
use_displaced_mesh = false
displacements = 'disp_x disp_y'
temperature = temp
save_in = 'saved_x saved_y'
extra_vector_tags = 'ref'
block = '1 2'
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
use_displaced_mesh = false
[../]
[./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_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xx
index_i = 0
index_j = 0
[../]
[./strain_xy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xy
index_i = 0
index_j = 1
[../]
[./strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 1
index_j = 1
[../]
[./aux_strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = aux_strain_zz
index_i = 2
index_j = 2
[../]
[]
[AuxScalarKernels]
[./saved_scalar_strain_zz1_ref_resid]
type = GeneralizedPlaneStrainReferenceResidual
variable = saved_scalar_strain_zz1
generalized_plane_strain = gps1_GeneralizedPlaneStrainUserObject
[../]
[./saved_scalar_strain_zz2_ref_resid]
type = GeneralizedPlaneStrainReferenceResidual
variable = saved_scalar_strain_zz2
generalized_plane_strain = gps2_GeneralizedPlaneStrainUserObject
[../]
[]
[Functions]
[./tempfunc]
type = ParsedFunction
expression = '(1-x)*t'
[../]
[]
[BCs]
[./bottom1x]
type = DirichletBC
boundary = 1
variable = disp_x
value = 0.0
[../]
[./bottom1y]
type = DirichletBC
boundary = 1
variable = disp_y
value = 0.0
[../]
[./bottom2x]
type = DirichletBC
boundary = 2
variable = disp_x
value = 0.0
[../]
[./bottom2y]
type = DirichletBC
boundary = 2
variable = disp_y
value = 0.0
[../]
[]
[Materials]
[./elastic_tensor]
type = ComputeIsotropicElasticityTensor
poissons_ratio = 0.3
youngs_modulus = 1e6
block = '1 2'
[../]
[./strain1]
type = ComputePlaneSmallStrain
displacements = 'disp_x disp_y'
scalar_out_of_plane_strain = scalar_strain_zz1
block = 1
eigenstrain_names = eigenstrain
[../]
[./strain2]
type = ComputePlaneSmallStrain
displacements = 'disp_x disp_y'
scalar_out_of_plane_strain = scalar_strain_zz2
block = 2
eigenstrain_names = eigenstrain
[../]
[./thermal_strain]
type = ComputeThermalExpansionEigenstrain
temperature = temp
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
block = '1 2'
eigenstrain_name = eigenstrain
[../]
[./stress]
type = ComputeLinearElasticStress
block = '1 2'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
# controls for linear iterations
l_max_its = 100
l_tol = 1e-10
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
# time control
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 2.0
num_steps = 5000
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/materials/ergun/ergun.i)
# This file simulates flow of fluid in a porous elbow for the purpose of verifying
# correct implementation of the various different solution variable sets. This input
# tests correct implementation of the primitive superficial variable set. Flow enters on the top
# and exits on the right. Because the purpose is only to test the equivalence of
# different equation sets, no solid energy equation is included.
porosity_left = 0.4
porosity_right = 0.6
pebble_diameter = 0.06
mu = 1.81e-5 # This has been increased to avoid refining the mesh
M = 28.97e-3
R = 8.3144598
# inlet mass flowrate, kg/s
mdot = -10.0
# inlet mass flux (superficial)
mflux_in_superficial = ${fparse mdot / (pi * 0.5 * 0.5)}
# inlet mass flux (interstitial)
mflux_in_interstitial = ${fparse mflux_in_superficial / porosity_left}
p_initial = 201325.0
T_initial = 300.0
rho_initial = ${fparse p_initial / T_initial * M / R}
vel_y_initial = ${fparse mflux_in_interstitial / rho_initial}
vel_x_initial = 0.0
superficial_vel_y_initial = ${fparse mflux_in_superficial / rho_initial}
superficial_vel_x_initial = 1e-12
# Computation parameters
velocity_interp_method = 'rc'
advected_interp_method = 'upwind'
# ==============================================================================
# GEOMETRY AND MESH
# ==============================================================================
[Mesh]
[fmg]
type = FileMeshGenerator
file = 'ergun_in.e'
[]
coord_type = RZ
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = superficial_vel_x
v = superficial_vel_y
pressure = pressure
porosity = porosity
[]
[]
[GlobalParams]
porosity = porosity
pebble_diameter = ${pebble_diameter}
fp = fp
# rho for the kernels. Must match fluid property!
rho = ${rho_initial}
fv = true
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
# behavior at time of test creation
two_term_boundary_expansion = false
rhie_chow_user_object = 'rc'
[]
# ==============================================================================
# VARIABLES AND KERNELS
# ==============================================================================
[Variables]
[pressure]
type = INSFVPressureVariable
initial_condition = ${p_initial}
[]
[superficial_vel_x]
type = PINSFVSuperficialVelocityVariable
initial_condition = ${superficial_vel_x_initial}
[]
[superficial_vel_y]
type = PINSFVSuperficialVelocityVariable
initial_condition = ${superficial_vel_y_initial}
[]
[]
[FVKernels]
# Mass Equation.
[mass]
type = PINSFVMassAdvection
variable = 'pressure'
[]
# Momentum x component equation.
[vel_x_time]
type = PINSFVMomentumTimeDerivative
variable = 'superficial_vel_x'
momentum_component = 'x'
[]
[vel_x_advection]
type = PINSFVMomentumAdvection
variable = 'superficial_vel_x'
momentum_component = 'x'
[]
[vel_x_viscosity]
type = PINSFVMomentumDiffusion
variable = 'superficial_vel_x'
momentum_component = 'x'
mu = 'mu'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = 'superficial_vel_x'
pressure = pressure
momentum_component = 'x'
[]
[u_friction]
type = PINSFVMomentumFriction
variable = 'superficial_vel_x'
Darcy_name = 'Darcy_coefficient'
Forchheimer_name = 'Forchheimer_coefficient'
momentum_component = 'x'
speed = speed
mu = 'mu'
[]
# Momentum y component equation.
[vel_y_time]
type = PINSFVMomentumTimeDerivative
variable = 'superficial_vel_y'
momentum_component = 'y'
[]
[vel_y_advection]
type = PINSFVMomentumAdvection
variable = 'superficial_vel_y'
momentum_component = 'y'
[]
[vel_y_viscosity]
type = PINSFVMomentumDiffusion
variable = 'superficial_vel_y'
momentum_component = 'y'
mu = 'mu'
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = 'superficial_vel_y'
pressure = pressure
momentum_component = 'y'
[]
[v_friction]
type = PINSFVMomentumFriction
variable = 'superficial_vel_y'
Darcy_name = 'Darcy_coefficient'
Forchheimer_name = 'Forchheimer_coefficient'
momentum_component = 'y'
mu = 'mu'
speed = speed
[]
[gravity]
type = PINSFVMomentumGravity
variable = 'superficial_vel_y'
gravity = '0 -9.81 0'
momentum_component = 'y'
[]
[]
# ==============================================================================
# AUXVARIABLES AND AUXKERNELS
# ==============================================================================
[AuxVariables]
[T_fluid]
initial_condition = ${T_initial}
order = CONSTANT
family = MONOMIAL
[]
[vel_x]
initial_condition = ${fparse vel_x_initial}
order = CONSTANT
family = MONOMIAL
[]
[vel_y]
initial_condition = ${fparse vel_y_initial}
order = CONSTANT
family = MONOMIAL
[]
[porosity_out]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[vel_x]
type = FunctorAux
variable = vel_x
functor = vel_x_mat
[]
[vel_y]
type = FunctorAux
variable = vel_y
functor = vel_y_mat
[]
[porosity_out]
type = FunctorAux
variable = porosity_out
functor = porosity
[]
[]
# ==============================================================================
# FLUID PROPERTIES, MATERIALS AND USER OBJECTS
# ==============================================================================
[FluidProperties]
[fp]
type = IdealGasFluidProperties
k = 0.0
mu = ${mu}
gamma = 1.4
molar_mass = ${M}
[]
[]
[FunctorMaterials]
[enthalpy]
type = INSFVEnthalpyMaterial
temperature = 'T_fluid'
[]
[speed]
type = PINSFVSpeedFunctorMaterial
superficial_vel_x = 'superficial_vel_x'
superficial_vel_y = 'superficial_vel_y'
porosity = porosity
vel_x = vel_x_mat
vel_y = vel_y_mat
[]
[kappa]
type = FunctorKappaFluid
[]
[const_Fdrags_mat]
type = FunctorErgunDragCoefficients
porosity = porosity
[]
[fluidprops]
type = GeneralFunctorFluidProps
mu_rampdown = mu_func
porosity = porosity
characteristic_length = ${pebble_diameter}
T_fluid = 'T_fluid'
pressure = 'pressure'
speed = 'speed'
[]
[]
d = 0.05
[Functions]
[mu_func]
type = PiecewiseLinear
x = '1 3 5 10 15 20'
y = '1e5 1e4 1e3 1e2 1e1 1'
[]
[real_porosity_function]
type = ParsedFunction
expression = 'if (x < 0.6 - ${d}, ${porosity_left}, if (x > 0.6 + ${d}, ${porosity_right},
(x-(0.6-${d}))/(2*${d})*(${porosity_right}-${porosity_left}) + ${porosity_left}))'
[]
[porosity]
type = ParsedFunction
expression = 'if (x < 0.6 - ${d}, ${porosity_left}, if (x > 0.6 + ${d}, ${porosity_right},
(x-(0.6-${d}))/(2*${d})*(${porosity_right}-${porosity_left}) + ${porosity_left}))'
[]
[]
# ==============================================================================
# BOUNDARY CONDITIONS
# ==============================================================================
[FVBCs]
[outlet_p]
type = INSFVOutletPressureBC
variable = 'pressure'
function = ${p_initial}
boundary = 'right'
[]
## No or Free slip BC
[free-slip-wall-x]
type = INSFVNaturalFreeSlipBC
boundary = 'bottom wall_1 wall_2 left'
variable = superficial_vel_x
momentum_component = 'x'
[]
[free-slip-wall-y]
type = INSFVNaturalFreeSlipBC
boundary = 'bottom wall_1 wall_2 left'
variable = superficial_vel_y
momentum_component = 'y'
[]
## Symmetry
[symmetry-x]
type = PINSFVSymmetryVelocityBC
boundary = 'left'
variable = superficial_vel_x
u = superficial_vel_x
v = superficial_vel_y
mu = 'mu'
momentum_component = 'x'
[]
[symmetry-y]
type = PINSFVSymmetryVelocityBC
boundary = 'left'
variable = superficial_vel_y
u = superficial_vel_x
v = superficial_vel_y
mu = 'mu'
momentum_component = 'y'
[]
[symmetry-p]
type = INSFVSymmetryPressureBC
boundary = 'left'
variable = 'pressure'
[]
## inlet
[inlet_vel_x]
type = INSFVInletVelocityBC
variable = 'superficial_vel_x'
function = ${superficial_vel_x_initial}
boundary = 'top'
[]
[inlet_vel_y]
type = INSFVInletVelocityBC
variable = 'superficial_vel_y'
function = ${superficial_vel_y_initial}
boundary = 'top'
[]
[]
# ==============================================================================
# EXECUTION PARAMETERS
# ==============================================================================
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -ksp_gmres_restart'
petsc_options_value = 'asm lu NONZERO 200'
line_search = 'none'
# Problem time parameters
dtmin = 0.01
dtmax = 2000
end_time = 3000
# must be the same as the fluid
# Iterations parameters
l_max_its = 50
l_tol = 1e-8
nl_max_its = 25
# nl_rel_tol = 5e-7
nl_abs_tol = 2e-7
# Automatic scaling
automatic_scaling = true
verbose = true
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.025
cutback_factor = 0.5
growth_factor = 2.0
[]
# Steady state detection.
steady_state_detection = true
steady_state_tolerance = 1e-7
steady_state_start_time = 400
[]
# ==============================================================================
# POSTPROCESSORS DEBUG AND OUTPUTS
# ==============================================================================
[Postprocessors]
[mass_flow_in]
type = VolumetricFlowRate
boundary = 'top'
vel_x = 'superficial_vel_x'
vel_y = 'superficial_vel_y'
advected_quantity = ${rho_initial}
execute_on = 'INITIAL TIMESTEP_END'
[]
[mass_flow_out]
type = VolumetricFlowRate
boundary = 'right'
vel_x = 'superficial_vel_x'
vel_y = 'superficial_vel_y'
advected_quantity = ${rho_initial}
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_in]
type = SideAverageValue
variable = pressure
boundary = 'top'
[]
[dP]
type = LinearCombinationPostprocessor
pp_names = 'p_in'
pp_coefs = '1.0'
b = ${fparse -p_initial}
[]
[]
[Outputs]
exodus = true
print_linear_residuals = false
[]
(test/tests/fvkernels/mms/diffusion.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 2
[]
[Variables]
# [u]
# []
[v]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[]
[FVKernels]
[diff_v]
type = FVDiffusion
variable = v
coeff = coeff
[]
[body_v]
type = FVBodyForce
variable = v
function = 'forcing'
[]
[]
[FVBCs]
[boundary]
type = FVFunctionDirichletBC
boundary = 'left right'
function = 'exact'
variable = v
[]
[]
[Materials]
[diff]
type = ADGenericFunctorMaterial
prop_names = 'coeff'
prop_values = '1'
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = '3*x^2 + 2*x + 1'
[]
[forcing]
type = ParsedFunction
expression = '-6'
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
# [./L2u]
# type = ElementL2Error
# variable = u
# function = exact
# outputs = 'console'
# execute_on = 'timestep_end'
# [../]
[./error]
type = ElementL2Error
variable = v
function = exact
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(test/tests/outputs/debug/show_execution_kernels_bcs.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[left]
type = ParsedSubdomainMeshGenerator
input = 'gmg'
combinatorial_geometry = 'x < 0.5'
block_id = '2'
[]
[middle_boundary]
type = SideSetsBetweenSubdomainsGenerator
input = 'left'
primary_block = '0'
paired_block = '2'
new_boundary = 'middle'
[]
[]
[Functions]
[forcing_fnu]
type = ParsedFunction
expression = -5.8*(x+y)+x*x*x-x+y*y*y-y
[]
[forcing_fnv]
type = ParsedFunction
expression = -4
[]
[slnu]
type = ParsedGradFunction
expression = x*x*x-x+y*y*y-y
grad_x = 3*x*x-1
grad_y = 3*y*y-1
[]
[slnv]
type = ParsedGradFunction
expression = x*x+y*y
grad_x = 2*x
grad_y = 2*y
[]
# NeumannBC functions
[bc_fnut]
type = ParsedFunction
expression = 3*y*y-1
[]
[bc_fnub]
type = ParsedFunction
expression = -3*y*y+1
[]
[bc_fnul]
type = ParsedFunction
expression = -3*x*x+1
[]
[bc_fnur]
type = ParsedFunction
expression = 3*x*x-1
[]
[]
[Variables]
[u]
order = THIRD
family = HIERARCHIC
[]
[v]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
[]
[test1]
type = CoupledConvection
variable = u
velocity_vector = v
[]
[diff2]
type = Diffusion
variable = v
[]
[react]
type = Reaction
variable = u
[]
[forceu]
type = BodyForce
variable = u
function = forcing_fnu
[]
[forcev]
type = BodyForce
variable = v
function = forcing_fnv
[]
[]
[BCs]
[bc_v]
type = FunctionDirichletBC
variable = v
function = slnv
boundary = 'left right top bottom'
[]
[bc_u_tb]
type = CoupledKernelGradBC
variable = u
var2 = v
vel = '0.1 0.1'
boundary = 'top bottom left right'
[]
[bc_ul]
type = FunctionNeumannBC
variable = u
function = bc_fnul
boundary = 'left'
[]
[bc_ur]
type = FunctionNeumannBC
variable = u
function = bc_fnur
boundary = 'right'
[]
[bc_ut]
type = FunctionNeumannBC
variable = u
function = bc_fnut
boundary = 'top'
[]
[bc_ub]
type = FunctionNeumannBC
variable = u
function = bc_fnub
boundary = 'bottom'
[]
[]
[Dampers]
active = ''
[limit_v]
type = BoundingValueElementDamper
variable = v
max_value = 1.5
min_value = -20
[]
[limit_u]
type = BoundingValueElementDamper
variable = u
max_value = 1.5
min_value = -20
[]
[]
[InterfaceKernels]
[diff_ik_2]
type = InterfaceDiffusion
variable = 'u'
neighbor_var = 'v'
boundary = 'middle'
[]
[diff_ik_1]
type = InterfaceDiffusion
variable = 'v'
neighbor_var = 'u'
boundary = 'middle'
[]
[]
[DGKernels]
[diff_dg_2]
type = DGDiffusion
variable = 'u'
epsilon = -1
sigma = 6
[]
[diff_dg_1]
type = DGDiffusion
variable = 'u'
epsilon = -1
sigma = 6
[]
[]
[DiracKernels]
[source_2]
type = FunctionDiracSource
variable = 'u'
point = '0.1 0.1 0'
function = 'x + y'
[]
[source_1]
type = FunctionDiracSource
variable = 'u'
point = '0.1 0.1 0'
function = 'x + y'
block = '2'
[]
[source_0]
type = FunctionDiracSource
variable = 'u'
# in block 0, but since it's not block restricted it shows up as active in
# block 2 as well
point = '0.6 0.5 0'
function = 'x + y'
[]
[]
[Materials]
[diff]
type = GenericConstantMaterial
prop_names = 'D D_neighbor'
prop_values = '0 0'
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-15
nl_abs_tol = 1e-13
[]
[Debug]
show_execution_order = 'NONE ALWAYS INITIAL NONLINEAR LINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
[]
(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
[]
(test/tests/userobjects/element_subdomain_modifier/adaptivity_moving_boundary_3d.i)
[Problem]
solve = false
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
nz = 6
[]
[left]
type = SubdomainBoundingBoxGenerator
input = 'gen'
block_id = 1
bottom_left = '-1 -1 0'
top_right = '0 1 1'
[]
[right]
type = SubdomainBoundingBoxGenerator
input = 'left'
block_id = 2
bottom_left = '0 -1 0'
top_right = '1 1 1'
[]
[moving_boundary]
type = SideSetsAroundSubdomainGenerator
input = 'right'
block = 1
new_boundary = 'moving_boundary'
normal = '1 0 0'
[]
[]
[UserObjects]
[moving_circle]
type = CoupledVarThresholdElementSubdomainModifier
coupled_var = 'phi'
block = 2
criterion_type = ABOVE
threshold = 0.5
subdomain_id = 1
moving_boundary_name = moving_boundary
execute_on = 'TIMESTEP_BEGIN'
[]
[]
[Functions]
[moving_gauss]
type = ParsedFunction
value = 'exp(-((x+0.5-t)^2+(y)^2)/0.25)'
[]
[]
[AuxVariables]
[phi]
[]
[]
[AuxKernels]
[phi]
type = FunctionAux
variable = phi
function = moving_gauss
execute_on = 'INITIAL TIMESTEP_BEGIN TIMESTEP_END'
[]
[]
[Adaptivity]
steps = 1
marker = marker
initial_marker = marker
max_h_level = 1
[Indicators/indicator]
type = GradientJumpIndicator
variable = phi
[]
[Markers]
[efm]
type = ErrorFractionMarker
indicator = indicator
coarsen = 0.2
refine = 0.5
[]
[marker]
type = BoundaryPreservedMarker
preserved_boundary = moving_boundary
marker = 'efm'
[]
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 5
[]
[Outputs]
exodus = true
[]
(test/tests/functions/generic_function_material/generic_function_vector_material_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Functions]
[diff_func_x]
type = ParsedFunction
expression = 1/t
[]
[diff_func_y]
type = ParsedFunction
expression = 't*t + x'
[]
[]
[Kernels]
[diff]
type = VectorMatDiffusion
variable = u
coeff = diffusion
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = '0'
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = '1'
[]
[]
[Materials]
[gfm]
type = GenericFunctionVectorMaterial
block = 0
prop_names = diffusion
prop_values = 'diff_func_x diff_func_y 0'
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/toggle_mesh_adaptivity/toggle_mesh_adaptivity_gaussian_ic_stop_time.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Variables]
[./u]
[../]
[]
[ICs]
[./gaussian_ic]
type = FunctionIC
variable = u
function = gaussian_2d
[../]
[]
[Functions]
[./gaussian_2d]
type = ParsedFunction
expression = exp(-((x-x0)*(x-x0)+(y-y0)*(y-y0))/2.0/sigma/sigma)
symbol_names = 'sigma x0 y0'
symbol_values = '0.05 0.35 0.25'
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.02
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./Periodic]
[./all]
variable = u
auto_direction = 'x y'
[../]
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Adaptivity]
initial_steps = 1
initial_marker = marker
cycles_per_step = 1
marker = marker
max_h_level = 2
stop_time = 0.0
[./Markers]
[./marker]
type = CircleMarker
point = '0.35 0.25 0'
radius = 0.2
inside = refine
outside = coarsen
[../]
[../]
[]
[Outputs]
exodus = true
[./console]
type = Console
print_mesh_changed_info = true
[../]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/mixing_length_total_viscosity_material/steady.i)
von_karman_const = 0.41
H = 1 #halfwidth of the channel
L = 150
Re = 100
rho = 1
bulk_u = 1
mu = '${fparse rho * bulk_u * 2 * H / Re}'
advected_interp_method = 'upwind'
velocity_interp_method = 'rc'
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = vel_x
v = vel_y
pressure = pressure
[]
[]
[Mesh]
[gen]
type = CartesianMeshGenerator
dim = 2
dx = '${L}'
dy = '0.667 0.333'
ix = '200'
iy = '10 1'
[]
[]
[Functions]
[delta_func]
type = ParsedFunction
expression = '1.0-x/150'
[]
[]
[Problem]
fv_bcs_integrity_check = false
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
initial_condition = 1e-6
[]
[vel_y]
type = INSFVVelocityVariable
initial_condition = 1e-6
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[AuxVariables]
[mixing_length]
order = CONSTANT
family = MONOMIAL
fv = true
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = INSFVMomentumAdvection
variable = vel_x
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = vel_x
mu = ${mu}
momentum_component = 'x'
[]
[u_viscosity_rans]
type = INSFVMixingLengthReynoldsStress
variable = vel_x
rho = ${rho}
mixing_length = mixing_length
momentum_component = 'x'
u = vel_x
v = vel_y
[]
[u_pressure]
type = INSFVMomentumPressure
variable = vel_x
momentum_component = 'x'
pressure = pressure
[]
[v_advection]
type = INSFVMomentumAdvection
variable = vel_y
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = vel_y
mu = ${mu}
momentum_component = 'y'
[]
[v_viscosity_rans]
type = INSFVMixingLengthReynoldsStress
variable = vel_y
rho = ${rho}
mixing_length = mixing_length
momentum_component = 'y'
u = vel_x
v = vel_y
[]
[v_pressure]
type = INSFVMomentumPressure
variable = vel_y
momentum_component = 'y'
pressure = pressure
[]
[]
[AuxKernels]
[mixing_length]
type = WallDistanceMixingLengthAux
walls = 'top'
variable = mixing_length
execute_on = 'initial'
von_karman_const = ${von_karman_const}
delta = 0.5
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = vel_x
function = '1'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = vel_y
function = '0'
[]
[wall-u]
type = INSFVWallFunctionBC
variable = vel_x
boundary = 'top'
u = vel_x
v = vel_y
mu = ${mu}
rho = ${rho}
momentum_component = x
[]
[wall-v]
type = INSFVWallFunctionBC
variable = vel_y
boundary = 'top'
u = vel_x
v = vel_y
mu = ${mu}
rho = ${rho}
momentum_component = y
[]
[sym-u]
type = INSFVSymmetryVelocityBC
boundary = 'bottom'
variable = vel_x
u = vel_x
v = vel_y
mu = total_viscosity
momentum_component = x
[]
[sym-v]
type = INSFVSymmetryVelocityBC
boundary = 'bottom'
variable = vel_y
u = vel_x
v = vel_y
mu = total_viscosity
momentum_component = y
[]
[symmetry_pressure]
type = INSFVSymmetryPressureBC
boundary = 'bottom'
variable = pressure
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = '0'
[]
[]
[FunctorMaterials]
[total_viscosity]
type = MixingLengthTurbulentViscosityFunctorMaterial
u = 'vel_x' #computes total viscosity = mu_t + mu
v = 'vel_y' #property is called total_viscosity
mixing_length = mixing_length
mu = ${mu}
rho = ${rho}
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/phy.T_wall_transfer_3eqn_x.i)
# Testing that T_solid gets properly projected onto a pipe
# That's why Hw in pipe1 is set to 0, so we do not have any heat exchange
# Note that the pipe and the heat structure have an opposite orientation, which
# is crucial for this test.
[GlobalParams]
initial_p = 1.e5
initial_vel = 0.
initial_T = 300.
closures = simple_closures
[]
[FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[SolidProperties]
[wall-mat]
type = ThermalFunctionSolidProperties
k = 100.0
rho = 100.0
cp = 100.0
[]
[]
[Functions]
[T_init]
type = ParsedFunction
expression = '290 + sin((1 - x) * pi * 1.4)'
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
position = '0 -0.2 0'
orientation = '1 0 0'
length = 1
n_elems = 50
A = 9.6858407346e-01
D_h = 6.1661977237e+00
f = 0.01
fp = eos
[]
[hs]
type = HeatStructureCylindrical
position = '1 -0.1 0'
orientation = '-1 0 0'
length = 1
n_elems = 50
#rotation = 90
solid_properties = 'wall-mat'
solid_properties_T_ref = '300'
n_part_elems = 3
widths = '0.1'
names = 'wall'
initial_T = T_init
[]
[hxconn]
type = HeatTransferFromHeatStructure1Phase
hs = hs
hs_side = outer
flow_channel = pipe1
Hw = 0
P_hf = 6.2831853072e-01
[]
[inlet]
type = SolidWall1Phase
input = 'pipe1:in'
[]
[outlet]
type = SolidWall1Phase
input = 'pipe1:out'
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
dt = 1
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-6
nl_max_its = 20
l_tol = 1e-5
l_max_its = 300
start_time = 0.0
num_steps = 1
[]
[Outputs]
[out]
type = Exodus
show = 'T_wall T_solid'
[]
print_linear_residuals = false
[]
(modules/combined/examples/phase_field-mechanics/kks_mechanics_KHS.i)
# KKS phase-field model coupled with elasticity using Khachaturyan's scheme as
# described in L.K. Aagesen et al., Computational Materials Science, 140, 10-21 (2017)
# Original run #170403a
[Mesh]
type = GeneratedMesh
dim = 3
nx = 640
ny = 1
nz = 1
xmin = -10
xmax = 10
ymin = 0
ymax = 0.03125
zmin = 0
zmax = 0.03125
elem_type = HEX8
[]
[Variables]
# order parameter
[./eta]
order = FIRST
family = LAGRANGE
[../]
# solute concentration
[./c]
order = FIRST
family = LAGRANGE
[../]
# chemical potential
[./w]
order = FIRST
family = LAGRANGE
[../]
# solute phase concentration (matrix)
[./cm]
order = FIRST
family = LAGRANGE
[../]
# solute phase concentration (precipitate)
[./cp]
order = FIRST
family = LAGRANGE
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./eta_ic]
variable = eta
type = FunctionIC
function = ic_func_eta
block = 0
[../]
[./c_ic]
variable = c
type = FunctionIC
function = ic_func_c
block = 0
[../]
[./w_ic]
variable = w
type = ConstantIC
value = 0.00991
block = 0
[../]
[./cm_ic]
variable = cm
type = ConstantIC
value = 0.131
block = 0
[../]
[./cp_ic]
variable = cp
type = ConstantIC
value = 0.236
block = 0
[../]
[]
[Functions]
[./ic_func_eta]
type = ParsedFunction
expression = '0.5*(1.0+tanh((x)/delta_eta/sqrt(2.0)))'
symbol_names = 'delta_eta'
symbol_values = '0.8034'
[../]
[./ic_func_c]
type = ParsedFunction
expression = '0.2389*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^3*(6*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^2-15*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))+10)+0.1339*(1-(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^3*(6*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^2-15*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))+10))'
symbol_names = 'delta'
symbol_values = '0.8034'
[../]
[./psi_eq_int]
type = ParsedFunction
expression = 'volume*psi_alpha'
symbol_names = 'volume psi_alpha'
symbol_values = 'volume psi_alpha'
[../]
[./gamma]
type = ParsedFunction
expression = '(psi_int - psi_eq_int) / dy / dz'
symbol_names = 'psi_int psi_eq_int dy dz'
symbol_values = 'psi_int psi_eq_int 0.03125 0.03125'
[../]
[]
[AuxVariables]
[./sigma11]
order = CONSTANT
family = MONOMIAL
[../]
[./sigma22]
order = CONSTANT
family = MONOMIAL
[../]
[./sigma33]
order = CONSTANT
family = MONOMIAL
[../]
[./e11]
order = CONSTANT
family = MONOMIAL
[../]
[./e12]
order = CONSTANT
family = MONOMIAL
[../]
[./e22]
order = CONSTANT
family = MONOMIAL
[../]
[./e33]
order = CONSTANT
family = MONOMIAL
[../]
[./e_el11]
order = CONSTANT
family = MONOMIAL
[../]
[./e_el12]
order = CONSTANT
family = MONOMIAL
[../]
[./e_el22]
order = CONSTANT
family = MONOMIAL
[../]
[./f_el]
order = CONSTANT
family = MONOMIAL
[../]
[./eigen_strain00]
order = CONSTANT
family = MONOMIAL
[../]
[./Fglobal]
order = CONSTANT
family = MONOMIAL
[../]
[./psi]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./matl_sigma11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = sigma11
[../]
[./matl_sigma22]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = sigma22
[../]
[./matl_sigma33]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = sigma33
[../]
[./matl_e11]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 0
index_j = 0
variable = e11
[../]
[./f_el]
type = MaterialRealAux
variable = f_el
property = f_el_mat
execute_on = timestep_end
[../]
[./GlobalFreeEnergy]
variable = Fglobal
type = KKSGlobalFreeEnergy
fa_name = fm
fb_name = fp
w = 0.0264
kappa_names = kappa
interfacial_vars = eta
[../]
[./psi_potential]
variable = psi
type = ParsedAux
coupled_variables = 'Fglobal w c f_el sigma11 e11'
expression = 'Fglobal - w*c + f_el - sigma11*e11'
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = right
value = 0
[../]
[./front_y]
type = DirichletBC
variable = disp_y
boundary = front
value = 0
[../]
[./back_y]
type = DirichletBC
variable = disp_y
boundary = back
value = 0
[../]
[./top_z]
type = DirichletBC
variable = disp_z
boundary = top
value = 0
[../]
[./bottom_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0
[../]
[]
[Materials]
# Chemical free energy of the matrix
[./fm]
type = DerivativeParsedMaterial
property_name = fm
coupled_variables = 'cm'
expression = '6.55*(cm-0.13)^2'
[../]
# Chemical Free energy of the precipitate phase
[./fp]
type = DerivativeParsedMaterial
property_name = fp
coupled_variables = 'cp'
expression = '6.55*(cp-0.235)^2'
[../]
# Elastic energy of the precipitate
[./elastic_free_energy_p]
type = ElasticEnergyMaterial
f_name = f_el_mat
args = 'eta'
outputs = exodus
[../]
# h(eta)
[./h_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta
[../]
# 1- h(eta), putting in function explicitly
[./one_minus_h_eta_explicit]
type = DerivativeParsedMaterial
property_name = one_minus_h_explicit
coupled_variables = eta
expression = 1-eta^3*(6*eta^2-15*eta+10)
outputs = exodus
[../]
# g(eta)
[./g_eta]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'M L kappa misfit'
prop_values = '0.7 0.7 0.01704 0.00377'
[../]
#Mechanical properties
[./Stiffness_matrix]
type = ComputeElasticityTensor
base_name = C_matrix
C_ijkl = '103.3 74.25 74.25 103.3 74.25 103.3 46.75 46.75 46.75'
fill_method = symmetric9
[../]
[./Stiffness_ppt]
type = ComputeElasticityTensor
C_ijkl = '100.7 71.45 71.45 100.7 71.45 100.7 50.10 50.10 50.10'
base_name = C_ppt
fill_method = symmetric9
[../]
[./C]
type = CompositeElasticityTensor
args = eta
tensors = 'C_matrix C_ppt'
weights = 'one_minus_h_explicit h'
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
eigenstrain_names = 'eigenstrain_ppt'
[../]
[./eigen_strain]
type = ComputeVariableEigenstrain
eigen_base = '0.00377 0.00377 0.00377 0 0 0'
prefactor = h
args = eta
eigenstrain_name = 'eigenstrain_ppt'
[../]
[]
[Kernels]
[./TensorMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
# enforce c = (1-h(eta))*cm + h(eta)*cp
[./PhaseConc]
type = KKSPhaseConcentration
ca = cm
variable = cp
c = c
eta = eta
[../]
# enforce pointwise equality of chemical potentials
[./ChemPotVacancies]
type = KKSPhaseChemicalPotential
variable = cm
cb = cp
fa_name = fm
fb_name = fp
[../]
#
# Cahn-Hilliard Equation
#
[./CHBulk]
type = KKSSplitCHCRes
variable = c
ca = cm
fa_name = fm
w = w
[../]
[./dcdt]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./ckernel]
type = SplitCHWRes
mob_name = M
variable = w
[../]
#
# Allen-Cahn Equation
#
[./ACBulkF]
type = KKSACBulkF
variable = eta
fa_name = fm
fb_name = fp
w = 0.0264
args = 'cp cm'
[../]
[./ACBulkC]
type = KKSACBulkC
variable = eta
ca = cm
cb = cp
fa_name = fm
[../]
[./ACBulk_el] #This adds df_el/deta for strain interpolation
type = AllenCahn
variable = eta
f_name = f_el_mat
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = kappa
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm ilu nonzero'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-11
num_steps = 200
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.5
[../]
[]
[Postprocessors]
[./f_el_int]
type = ElementIntegralMaterialProperty
mat_prop = f_el_mat
[../]
[./c_alpha]
type = SideAverageValue
boundary = left
variable = c
[../]
[./c_beta]
type = SideAverageValue
boundary = right
variable = c
[../]
[./e11_alpha]
type = SideAverageValue
boundary = left
variable = e11
[../]
[./e11_beta]
type = SideAverageValue
boundary = right
variable = e11
[../]
[./s11_alpha]
type = SideAverageValue
boundary = left
variable = sigma11
[../]
[./s22_alpha]
type = SideAverageValue
boundary = left
variable = sigma22
[../]
[./s33_alpha]
type = SideAverageValue
boundary = left
variable = sigma33
[../]
[./s11_beta]
type = SideAverageValue
boundary = right
variable = sigma11
[../]
[./s22_beta]
type = SideAverageValue
boundary = right
variable = sigma22
[../]
[./s33_beta]
type = SideAverageValue
boundary = right
variable = sigma33
[../]
[./f_el_alpha]
type = SideAverageValue
boundary = left
variable = f_el
[../]
[./f_el_beta]
type = SideAverageValue
boundary = right
variable = f_el
[../]
[./f_c_alpha]
type = SideAverageValue
boundary = left
variable = Fglobal
[../]
[./f_c_beta]
type = SideAverageValue
boundary = right
variable = Fglobal
[../]
[./chem_pot_alpha]
type = SideAverageValue
boundary = left
variable = w
[../]
[./chem_pot_beta]
type = SideAverageValue
boundary = right
variable = w
[../]
[./psi_alpha]
type = SideAverageValue
boundary = left
variable = psi
[../]
[./psi_beta]
type = SideAverageValue
boundary = right
variable = psi
[../]
[./total_energy]
type = ElementIntegralVariablePostprocessor
variable = Fglobal
[../]
# Get simulation cell size from postprocessor
[./volume]
type = ElementIntegralMaterialProperty
mat_prop = 1
[../]
[./psi_eq_int]
type = FunctionValuePostprocessor
function = psi_eq_int
[../]
[./psi_int]
type = ElementIntegralVariablePostprocessor
variable = psi
[../]
[./gamma]
type = FunctionValuePostprocessor
function = gamma
[../]
[./int_position]
type = FindValueOnLine
start_point = '-10 0 0'
end_point = '10 0 0'
v = eta
target = 0.5
[../]
[]
#
# Precondition using handcoded off-diagonal terms
#
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Outputs]
[./exodus]
type = Exodus
time_step_interval = 20
[../]
checkpoint = true
[./csv]
type = CSV
execute_on = 'final'
[../]
[]
(test/tests/transfers/general_field/user_object/duplicated_user_object_tests/two_pipe_sub.i)
[Mesh]
type = FileMesh
file = two_pipe.e
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[var]
order = CONSTANT
family = MONOMIAL
block = p1
[]
[]
[ICs]
[var]
type = FunctionIC
variable = var
function = setvar
block = p1
[]
[]
[Functions]
[setvar]
type = ParsedFunction
expression = '1 + z * z'
[]
[]
[UserObjects]
[sub_app_uo]
type = LayeredAverage
direction = z
variable = var
num_layers = 10
execute_on = TIMESTEP_END
block = p1
[]
[]
[Executioner]
type = Transient
[]
(test/tests/transfers/multiapp_conservative_transfer/parent_nearest_point.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[block1]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0.5 0 0'
top_right = '1 1 0'
[]
[]
[Variables]
[power_density]
[]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2'
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[BCs]
[left]
type = DirichletBC
variable = power_density
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = power_density
boundary = right
value = 1e3
[]
[]
[AuxVariables]
[from_sub]
[]
[]
[VectorPostprocessors]
[from_nearest_point]
type = NearestPointIntegralVariablePostprocessor
variable = power_density
points = '0 0.5 0 1 0.5 0'
[]
[to_nearest_point]
type = NearestPointIntegralVariablePostprocessor
variable = from_sub
points = '0 0.5 0 1 0.5 0'
execute_on = 'transfer'
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
input_files = sub_nearest_point.i
positions = '0 0 0 0.5 0 0'
execute_on = timestep_end
[]
[]
[Transfers]
[to_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = power_density
variable = from_parent
to_multi_app = sub
execute_on = timestep_end
# The following inputs specify what postprocessors should be conserved
# 1 NearestPointIntegralVariablePostprocessor is specified on the parent
# side with N points, where N is the number of subapps
# 1 pp is specified on the subapp side
from_postprocessors_to_be_preserved = 'from_nearest_point'
to_postprocessors_to_be_preserved = 'from_parent_pp'
[]
[from_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = sink
variable = from_sub
from_multi_app = sub
execute_on = timestep_end
# The following inputs specify what postprocessors should be conserved
# 1 NearestPointIntegralVariablePostprocessor is specified on the parent
# with N points, where N is the number of subapps
# 1 pp is specified on the subapp side
to_postprocessors_to_be_preserved = 'to_nearest_point'
from_postprocessors_to_be_preserved = 'sink'
[]
[]
[Outputs]
csv = true
exodus = true
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/crysp_save_euler.i)
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
displacements = 'disp_x disp_y'
nx = 2
ny = 2
[]
[Variables]
[./disp_x]
block = 0
[../]
[./disp_y]
block = 0
[../]
[]
[GlobalParams]
volumetric_locking_correction = true
[]
[AuxVariables]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./e_yy]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./fp_yy]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./rotout]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./gss1]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./euler1]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./euler2]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./euler3]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[]
[Functions]
[./tdisp]
type = ParsedFunction
expression = 0.01*t
[../]
[]
[UserObjects]
[./prop_read]
type = PropertyReadFile
prop_file_name = 'euler_ang_file.txt'
# Enter file data as prop#1, prop#2, .., prop#nprop
nprop = 3
read_type = element
[../]
[]
[AuxKernels]
[./stress_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = stress
index_j = 1
index_i = 1
execute_on = timestep_end
block = 0
[../]
[./e_yy]
type = RankTwoAux
variable = e_yy
rank_two_tensor = lage
index_j = 1
index_i = 1
execute_on = timestep_end
block = 0
[../]
[./fp_yy]
type = RankTwoAux
variable = fp_yy
rank_two_tensor = fp
index_j = 1
index_i = 1
execute_on = timestep_end
block = 0
[../]
[./gss1]
type = MaterialStdVectorAux
variable = gss1
property = gss
index = 0
execute_on = timestep_end
block = 0
[../]
[./euler1]
type = MaterialRealVectorValueAux
variable = euler1
property = Euler_angles
component = 0
execute_on = timestep_end
block = 0
[../]
[./euler2]
type = MaterialRealVectorValueAux
variable = euler2
property = Euler_angles
component = 1
execute_on = timestep_end
block = 0
[../]
[./euler3]
type = MaterialRealVectorValueAux
variable = euler3
property = Euler_angles
component = 2
execute_on = timestep_end
block = 0
[../]
[]
[BCs]
[./fix_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0
[../]
[./fix_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./tdisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = tdisp
[../]
[]
[Materials]
[./crysp]
type = FiniteStrainCrystalPlasticity
block = 0
gtol = 1e-2
slip_sys_file_name = input_slip_sys.txt
nss = 12
num_slip_sys_flowrate_props = 2 #Number of properties in a slip system
flowprops = '1 4 0.001 0.1 5 8 0.001 0.1 9 12 0.001 0.1'
hprops = '1.0 541.5 60.8 109.8 2.5'
gprops = '1 4 60.8 5 8 60.8 9 12 60.8'
tan_mod_type = exact
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'disp_x disp_y'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensorCP
block = 0
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
read_prop_user_object = prop_read
[../]
[]
[Postprocessors]
[./stress_yy]
type = ElementAverageValue
variable = stress_yy
block = 'ANY_BLOCK_ID 0'
[../]
[./e_yy]
type = ElementAverageValue
variable = e_yy
block = 'ANY_BLOCK_ID 0'
[../]
[./fp_yy]
type = ElementAverageValue
variable = fp_yy
block = 'ANY_BLOCK_ID 0'
[../]
[./gss1]
type = ElementAverageValue
variable = gss1
block = 'ANY_BLOCK_ID 0'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
dt = 0.01
dtmax = 10.0
dtmin = 0.01
num_steps = 10
[]
[Outputs]
file_base = crysp_save_euler_out
exodus = true
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y'
use_displaced_mesh = true
[../]
[]
(test/tests/problems/reference_residual_problem/no_ref.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
[]
[Problem]
type = ReferenceResidualProblem
# reference_vector = 'absref'
# extra_tag_vectors = 'absref'
[]
[Variables]
[u][]
[v]
scaling = 1e-6
[]
[]
[Functions]
[ramp]
type = ParsedFunction
expression = 'if(t < 5, t - 5, 0) * x'
[]
[]
[Kernels]
[u_dt]
type = TimeDerivative
variable = u
[]
[u_coupled_rx]
type = CoupledForce
variable = u
v = v
coef = 1
[]
[v_dt]
type = TimeDerivative
variable = v
[]
[v_neg_force]
type = BodyForce
variable = v
value = ${fparse -1 / 2}
function = ramp
[]
[v_force]
type = BodyForce
variable = v
value = 1
function = ramp
[]
[]
[Postprocessors]
[u_avg]
type = ElementAverageValue
variable = u
execute_on = 'TIMESTEP_END INITIAL'
[]
[v_avg]
type = ElementAverageValue
variable = v
execute_on = 'TIMESTEP_END INITIAL'
[]
[timestep]
type = TimePostprocessor
outputs = 'none'
[]
[v_old]
type = ElementAverageValue
variable = v
execute_on = TIMESTEP_BEGIN
outputs = none
[]
[u_old]
type = ElementAverageValue
variable = u
execute_on = TIMESTEP_BEGIN
outputs = none
[]
[v_exact]
type = ParsedPostprocessor
pp_names = 'timestep v_old'
expression = 't := if(timestep > 5, 5, timestep); (t^2 - 9 * t) / 8'
[]
[u_exact]
type = ParsedPostprocessor
pp_names = 'u_old v_exact'
expression = 'u_old + v_exact'
[]
[]
[Executioner]
type = Transient
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = none
num_steps = 10
nl_rel_tol = 1e-06
verbose = true
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/contact/test/tests/sliding_block/sliding/frictional_02_aug.i)
# This is a benchmark test that checks constraint based frictional
# contact using the augmented lagrangian method. In this test a constant
# displacement is applied in the horizontal direction to simulate
# a small block come sliding down a larger block.
#
# A friction coefficient of 0.2 is used. The gold file is run on one processor
# and the benchmark case is run on a minimum of 4 processors to ensure no
# parallel variability in the contact pressure and penetration results.
#
[Mesh]
file = sliding_elastic_blocks_2d.e
patch_size = 80
[]
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = false
[]
[AuxVariables]
[./contact_traction]
[../]
[./penetration]
[../]
[./inc_slip_x]
[../]
[./inc_slip_y]
[../]
[./accum_slip_x]
[../]
[./accum_slip_y]
[../]
[./saved_x]
[../]
[./saved_y]
[../]
[./diag_saved_x]
[../]
[./diag_saved_y]
[../]
[./tang_force_x]
[../]
[./tang_force_y]
[../]
[]
[Functions]
[./vertical_movement]
type = ParsedFunction
expression = -t
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
strain = FINITE
save_in = 'saved_x saved_y'
extra_vector_tags = 'ref'
[../]
[]
[AuxKernels]
[./zeroslip_x]
type = ConstantAux
variable = inc_slip_x
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./zeroslip_y]
type = ConstantAux
variable = inc_slip_y
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./accum_slip_x]
type = AccumulateAux
variable = accum_slip_x
accumulate_from_variable = inc_slip_x
execute_on = timestep_end
[../]
[./accum_slip_y]
type = AccumulateAux
variable = accum_slip_y
accumulate_from_variable = inc_slip_y
execute_on = timestep_end
[../]
[./penetration]
type = PenetrationAux
variable = penetration
boundary = 3
paired_boundary = 2
[../]
[]
[Postprocessors]
[./nonlinear_its]
type = NumNonlinearIterations
execute_on = timestep_end
[../]
[./penetration]
type = NodalVariableValue
variable = penetration
nodeid = 222
[../]
[./contact_pressure]
type = NodalVariableValue
variable = contact_pressure
nodeid = 222
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = 4
value = -0.02
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = vertical_movement
[../]
[]
[Materials]
[./left]
type = ComputeIsotropicElasticityTensor
block = '1 2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
line_search = 'none'
l_max_its = 20
nl_max_its = 200
dt = 0.1
end_time = 15
num_steps = 200
l_tol = 1e-6
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
dtmin = 0.01
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
[]
[Outputs]
time_step_interval = 10
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[./console]
type = Console
max_rows = 5
[../]
[]
[Problem]
type = AugmentedLagrangianContactProblem
solution_variables = 'disp_x disp_y'
extra_tag_vectors = 'ref'
reference_vector = 'ref'
maximum_lagrangian_update_iterations = 100
[]
[Contact]
[./leftright]
secondary = 3
primary = 2
model = coulomb
penalty = 1e+7
friction_coefficient = 0.2
formulation = augmented_lagrange
normalize_penalty = true
al_penetration_tolerance = 1e-6
al_incremental_slip_tolerance = 1.0e-2
al_frictional_force_tolerance = 1e-3
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
(test/tests/outputs/displaced/displaced_adapt_test.i)
# Adaptivity on displaced problem
# - testing initial_refinement and adaptivity as well
#
# variables:
# - u and v_aux are used for displacing the problem
# - v is used to get some refinements
#
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
uniform_refine = 3
displacements = 'u aux_v'
[]
[Functions]
[./aux_v_fn]
type = ParsedFunction
expression = x*(y-0.5)/5
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'udiff uie vdiff vconv vie'
[./udiff]
type = Diffusion
variable = u
[../]
[./uie]
type = TimeDerivative
variable = u
[../]
[./vdiff]
type = Diffusion
variable = v
[../]
[./vconv]
type = Convection
variable = v
velocity = '-10 1 0'
[../]
[./vie]
type = TimeDerivative
variable = v
[../]
[]
[BCs]
active = 'uleft uright vleft vright'
[./uleft]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./uright]
type = DirichletBC
variable = u
boundary = 1
value = 0.1
[../]
[./vleft]
type = DirichletBC
variable = v
boundary = 3
value = 1
[../]
[./vright]
type = DirichletBC
variable = v
boundary = 1
value = 0
[../]
[]
[AuxVariables]
[./aux_v]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./aux_k_1]
type = FunctionAux
variable = aux_v
function = aux_v_fn
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 2
dt = .1
[./Adaptivity]
refine_fraction = 0.2
coarsen_fraction = 0.3
max_h_level = 4
[../]
[]
[Outputs]
[./out]
type = Exodus
use_displaced = true
[../]
[]
(modules/solid_mechanics/test/tests/umat/print/print.i)
# Testing the UMAT Interface - linear elastic model using the large strain formulation.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[]
[Functions]
[top_pull]
type = ParsedFunction
expression = -t/1000
[]
[]
[AuxVariables]
[strain_yy]
family = MONOMIAL
order = FIRST
[]
[]
[AuxKernels]
[strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 1
index_j = 1
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
[]
[]
[BCs]
[Pressure]
[bc_presssure]
boundary = top
function = top_pull
[]
[]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[z_bot]
type = DirichletBC
variable = disp_z
boundary = front
value = 0.0
[]
[]
[Materials]
[umat]
type = AbaqusUMATStress
constant_properties = '1000 0.3'
plugin = '../../../plugins/elastic_print'
num_state_vars = 0
external_fields = 'strain_yy'
use_one_based_indexing = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
end_time = 20
dt = 10.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = 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
[../]
[]
(test/tests/postprocessors/pps_interval/pps_out_interval.i)
[Mesh]
file = square-2x2-nodeids.e
# This test can only be run with renumering disabled, so the
# NodalVariableValue postprocessor's node id is well-defined.
allow_renumbering = false
[]
[Variables]
active = 'u v'
[./u]
order = SECOND
family = LAGRANGE
[../]
[./v]
order = SECOND
family = LAGRANGE
[../]
[]
[Functions]
active = 'force_fn exact_fn left_bc'
[./force_fn]
type = ParsedFunction
expression = '1-x*x+2*t'
[../]
[./exact_fn]
type = ParsedFunction
expression = '(1-x*x)*t'
[../]
[./left_bc]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
active = '
time_u diff_u ffn_u
time_v diff_v'
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'all_u left_v right_v'
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = exact_fn
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '2'
value = 0
[../]
[]
[Postprocessors]
active = 'l2 node1 node4'
[./l2]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./node1]
type = NodalVariableValue
variable = u
nodeid = 15
[../]
[./node4]
type = NodalVariableValue
variable = v
nodeid = 10
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
end_time = 1
[]
[Outputs]
file_base = pps_out_interval
time_step_interval = 2
exodus = true
[./console]
type = Console
time_step_interval = 1
[../]
[]
(modules/contact/test/tests/frictional/sliding_elastic_blocks_2d/sliding_elastic_blocks_2d_tp.i)
[Mesh]
file = sliding_elastic_blocks_2d.e
[]
[GlobalParams]
volumetric_locking_correction = false
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./penetration]
[../]
[./saved_x]
[../]
[./saved_y]
[../]
[./diag_saved_x]
[../]
[./diag_saved_y]
[../]
[./inc_slip_x]
[../]
[./inc_slip_y]
[../]
[./accum_slip_x]
[../]
[./accum_slip_y]
[../]
[./accum_slip]
[../]
[./tang_force_x]
[../]
[./tang_force_y]
[../]
[]
[Functions]
[./vertical_movement]
type = ParsedFunction
expression = -t
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
strain = FINITE
save_in = 'saved_x saved_y'
diag_save_in = 'diag_saved_x diag_saved_y'
[../]
[]
[AuxKernels]
[./inc_slip_x]
type = PenetrationAux
variable = inc_slip_x
quantity = incremental_slip_x
boundary = 3
paired_boundary = 2
[../]
[./inc_slip_y]
type = PenetrationAux
variable = inc_slip_y
quantity = incremental_slip_y
boundary = 3
paired_boundary = 2
[../]
[./accum_slip]
type = PenetrationAux
variable = accum_slip
execute_on = timestep_end
quantity = accumulated_slip
boundary = 3
paired_boundary = 2
[../]
[./tangential_force_x]
type = PenetrationAux
variable = tang_force_x
execute_on = timestep_end
quantity = tangential_force_x
boundary = 3
paired_boundary = 2
[../]
[./tangential_force_y]
type = PenetrationAux
variable = tang_force_y
execute_on = timestep_end
quantity = tangential_force_y
boundary = 3
paired_boundary = 2
[../]
[./accum_slip_x]
type = AccumulateAux
variable = accum_slip_x
accumulate_from_variable = inc_slip_x
execute_on = timestep_end
[../]
[./accum_slip_y]
type = AccumulateAux
variable = accum_slip_y
accumulate_from_variable = inc_slip_y
execute_on = timestep_end
[../]
[./penetration]
type = PenetrationAux
variable = penetration
boundary = 3
paired_boundary = 2
[../]
[]
[Postprocessors]
[./bot_react_x]
type = NodalSum
variable = saved_x
boundary = 1
[../]
[./bot_react_y]
type = NodalSum
variable = saved_y
boundary = 1
[../]
[./top_react_x]
type = NodalSum
variable = saved_x
boundary = 4
[../]
[./top_react_y]
type = NodalSum
variable = saved_y
boundary = 4
[../]
[./ref_resid_x]
type = NodalL2Norm
execute_on = timestep_end
variable = saved_x
[../]
[./ref_resid_y]
type = NodalL2Norm
execute_on = timestep_end
variable = saved_y
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = 4
value = -0.005
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = vertical_movement
[../]
[]
[Materials]
[./left]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1.0e7
poissons_ratio = 0.3
[../]
[./right]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
line_search = 'none'
l_max_its = 100
nl_max_its = 1000
dt = 0.01
end_time = 0.05
num_steps = 1000
nl_rel_tol = 1e-16
nl_abs_tol = 1e-09
dtmin = 0.01
l_tol = 1e-3
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[./console]
type = Console
max_rows = 5
[../]
[]
[Contact]
[./leftright]
secondary = 3
primary = 2
model = coulomb
formulation = tangential_penalty
friction_coefficient = '0.25'
penalty = 1e6
[../]
[]
[Dampers]
[./contact_slip]
type = ContactSlipDamper
secondary = 3
primary = 2
[../]
[]
(test/tests/kernels/vector_fe/vector_kernel.i)
# This example reproduces the libmesh vector_fe example 3 results
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = -1
ymin = -1
elem_type = QUAD9
[]
[Variables]
[u]
family = NEDELEC_ONE
order = FIRST
[]
[]
[Kernels]
[diff]
type = VectorFEWave
variable = u
x_forcing_func = x_ffn
y_forcing_func = y_ffn
[]
[]
[BCs]
[bnd]
type = VectorCurlPenaltyDirichletBC
boundary = 'left right top bottom'
penalty = 1e10
function = sln
variable = u
[]
[]
[Functions]
[x_ffn]
type = ParsedFunction
expression = '(2*pi*pi + 1)*cos(pi*x)*sin(pi*y)'
[]
[y_ffn]
type = ParsedFunction
expression = '-(2*pi*pi + 1)*sin(pi*x)*cos(pi*y)'
[]
[sln]
type = ParsedVectorFunction
expression_x = cos(pi*x)*sin(pi*y)
expression_y = -sin(pi*x)*cos(pi*y)
curl_z = -2*pi*cos(pi*x)*cos(pi*y)
[]
[]
[Postprocessors]
active = ''
[L2Error]
type = ElementVectorL2Error
variable = u
function = sln
[]
[HCurlSemiError]
type = ElementHCurlSemiError
variable = u
function = sln
[]
[HCurlError]
type = ElementHCurlError
variable = u
function = sln
[]
[]
[Preconditioning]
[pre]
type = SMP
[]
[]
[Executioner]
type = Steady
solve_type = LINEAR
petsc_options_iname = -pc_type
petsc_options_value = lu
[]
[Outputs]
exodus = true
[]
(test/tests/restart/restart_add_variable/add_variable_restart.i)
# Use the exodus file for restarting the problem:
# - restart one variable
# - and have one extra variable
# - have PBP active to have more system in Equation system
#
[Mesh]
file = transient_with_stateful_out.e
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[./forcing_fn]
type = ParsedFunction
expression = -4+(x*x+y*y)
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./diffusivity]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./out_diffusivity]
type = MaterialRealAux
variable = diffusivity
property = diffusivity
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = MatDiffusionTest
variable = u
prop_name = diffusivity
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[Materials]
[./mat]
type = StatefulMaterial
block = 0
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left_v]
type = DirichletBC
variable = v
boundary = '3'
value = 0
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '1'
value = 1
[../]
[]
[Preconditioning]
[./PBP]
type = PBP
solve_order = 'u v'
preconditioner = 'AMG AMG'
[../]
[]
[Executioner]
type = Transient
solve_type = JFNK
dt = 0.1
reset_dt = true #NECESSARY to force a change in DT when using restart!
num_steps = 3
[]
[Outputs]
[./out]
type = Exodus
elemental_as_nodal = true
execute_elemental_on = none
[../]
[]
[Problem]
restart_file_base = transient_with_stateful_out_cp/LATEST
[]
(test/tests/variables/fe_monomial_const/monomial-const-3d.i)
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
nx = 21
ny = 21
nz = 21
elem_type = HEX8
[]
[Functions]
[./bc_fn]
type=ParsedFunction
expression=0
[../]
[./bc_fnt]
type = ParsedFunction
expression = 0
[../]
[./bc_fnb]
type = ParsedFunction
expression = 0
[../]
[./bc_fnl]
type = ParsedFunction
expression = 0
[../]
[./bc_fnr]
type = ParsedFunction
expression = 0
[../]
[./forcing_fn]
# type = ParsedFunction
# expression = 0
type = MTPiecewiseConst3D
[../]
[./solution]
type = MTPiecewiseConst3D
[../]
[]
[Variables]
[./u]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
# Note: MOOSE's DirichletBCs do not work properly with shape functions that do not
# have DOFs at the element edges. This test works because the solution
# has been designed to be zero at the boundary which is satisfied by the IC
# Ticket #1352
active = ''
[./bc_all]
type=FunctionDirichletBC
variable = u
boundary = 'top bottom left right'
function = bc_fn
[../]
[./bc_top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = bc_fnt
[../]
[./bc_bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bc_fnb
[../]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1.e-9
[./Adaptivity]
[../]
[]
[Outputs]
execute_on = 'timestep_end'
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[]
(test/tests/postprocessors/nodal_extreme_value/nodal_max_value_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 20
ny = 20
[]
[Functions]
[exact_fn]
type = ParsedFunction
expression = (sin(pi*t))
[]
[forcing_fn]
type = ParsedFunction
expression = sin(pi*t)
[]
[]
[Variables]
active = 'u'
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
active = 'diff' #ffn'
[ie]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
num_steps = 20
[]
[Postprocessors]
[max_nodal_val]
type = NodalExtremeValue
variable = u
[]
[]
[Outputs]
file_base = out_nodal_max
exodus = true
[]
(modules/solid_mechanics/test/tests/combined_creep_plasticity/combined_stress_prescribed.i)
#
# 1x1x1 unit cube with time-varying pressure on top face
#
# The problem is a one-dimensional creep analysis. The top face has a
# pressure load that is a function of time. The creep strain can be
# calculated analytically. There is no practical active linear
# isotropic plasticity because the yield stress for the plasticity
# model is set to 1e30 MPa, which will not be reached in this
# regression test.
#
# The analytic solution to this problem is:
#
# d ec
# ---- = a*S^b with S = c*t^d
# dt
#
# d ec = a*c^b*t^(b*d) dt
#
# a*c^b
# ec = ----- t^(b*d+1)
# b*d+1
#
# where S = stress
# ec = creep strain
# t = time
# a = constant
# b = constant
# c = constant
# d = constant
#
# With a = 3e-24,
# b = 4,
# c = 1,
# d = 1/2, and
# t = 32400
# we have
#
# S = t^(1/2) = 180
#
# ec = 1e-24*t^3 = 3.4012224e-11
#
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
incremental = true
add_variables = true
generate_output = 'stress_yy creep_strain_yy'
[../]
[]
[Functions]
[./pressure]
type = ParsedFunction
expression = 'sqrt(t)'
[../]
[./dts]
type = PiecewiseLinear
y = '1e-2 1e-1 1e0 1e1 1e2'
x = '0 7e-1 7e0 7e1 1e2'
[../]
[]
[BCs]
[./top_pressure]
type = Pressure
variable = disp_y
boundary = top
function = pressure
[../]
[./u_bottom_fix]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./u_yz_fix]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./u_xy_fix]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.8e7
poissons_ratio = 0.3
[../]
[./creep_plas]
type = ComputeMultipleInelasticStress
inelastic_models = 'creep plas'
tangent_operator = elastic
[../]
[./creep]
type = PowerLawCreepStressUpdate
coefficient = 3.0e-24
n_exponent = 4
m_exponent = 0
activation_energy = 0
[../]
[./plas]
type = IsotropicPlasticityStressUpdate
hardening_constant = 1
yield_stress = 1e30
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu superlu_dist'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-10
nl_abs_tol = 1e-7
l_tol = 1e-6
start_time = 0.0
end_time = 32400
dt = 1e-2
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Postprocessors]
[./timestep]
type = TimestepSize
[../]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/RZ_cone_no_parts.i)
# This input file tests several different things:
# .) The axisymmetric (RZ) form of the governing equations.
# .) An open boundary.
# .) Not integrating the pressure by parts, thereby requiring a pressure pin.
# .) Natural boundary condition at the outlet.
[GlobalParams]
integrate_p_by_parts = false
laplace = false
gravity = '0 0 0'
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = Newton
[../]
[]
[Executioner]
type = Transient
dt = 0.005
dtmin = 0.005
num_steps = 5
l_max_its = 100
# Note: The Steady executioner can be used for this problem, if you
# drop the INSMomentumTimeDerivative kernels and use the following
# direct solver options.
# petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -ksp_type'
# petsc_options_value = 'lu NONZERO 1.e-10 preonly'
# Block Jacobi works well for this problem, as does "-pc_type asm
# -pc_asm_overlap 2", but an overlap of 1 does not work for some
# reason?
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Variables]
[./vel_x]
# Velocity in radial (r) direction
family = LAGRANGE
order = SECOND
[../]
[./vel_y]
# Velocity in axial (z) direction
family = LAGRANGE
order = SECOND
[../]
[./p]
family = LAGRANGE
order = FIRST
[../]
[]
[BCs]
[./p_corner]
# This is required, because pressure term is *not* integrated by parts.
type = DirichletBC
boundary = top_right
value = 0
variable = p
[../]
[./u_out]
type = INSMomentumNoBCBCTractionForm
boundary = top
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./v_out]
type = INSMomentumNoBCBCTractionForm
boundary = top
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[./u_in]
type = DirichletBC
boundary = bottom
variable = vel_x
value = 0
[../]
[./v_in]
type = FunctionDirichletBC
boundary = bottom
variable = vel_y
function = 'inlet_func'
[../]
[./u_axis_and_walls]
type = DirichletBC
boundary = 'left right'
variable = vel_x
value = 0
[../]
[./v_no_slip]
type = DirichletBC
boundary = 'right'
variable = vel_y
value = 0
[../]
[]
[Kernels]
[./x_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_x
[../]
[./y_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_y
[../]
[./mass]
type = INSMassRZ
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumTractionFormRZ
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumTractionFormRZ
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 'volume'
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
outputs = 'console' execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
outputs = 'console' execute_on = 'timestep_end'
[../]
[]
(test/tests/bcs/functor_neumann_bc/functor_neumann_bc.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[AuxVariables]
[v]
[]
[]
[ICs]
[v_ic]
type = FunctionIC
variable = v
function = v_fn
[]
[]
[Functions]
[v_fn]
type = ParsedFunction
expression = 'y - 0.5'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = FunctorNeumannBC
variable = u
boundary = right
functor = v
coefficient = 0.5
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(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
[]
[]
(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/heat_transfer/test/tests/code_verification/spherical_test_no5.i)
# Problem III.5
#
# A solid sphere has a spatially dependent internal heating. It has a constant thermal
# conductivity. It is exposed to a constant temperature on its boundary.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
nx = 4
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Problem]
coord_type = RSPHERICAL
[]
[Functions]
[./volumetric_heat]
type = ParsedFunction
symbol_names = 'q ro beta'
symbol_values = '1200 1 0.1'
expression = 'q * (1-beta*(x/ro)^2)'
[../]
[./exact]
type = ParsedFunction
symbol_names = 'uf q k ro beta'
symbol_values = '300 1200 1 1 0.1'
expression = 'uf + (q*ro^2/(6*k)) * ( (1-(x/ro)^2) - 0.3*beta*(1-(x/ro)^4) )'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[./heatsource]
type = HeatSource
function = volumetric_heat
variable = u
[../]
[]
[BCs]
[./uo]
type = DirichletBC
boundary = 'right'
variable = u
value = 300
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1.0 1.0 1.0'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = true
[]
(test/tests/postprocessors/element_vec_l2_error_pps/element_vec_l2_error.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
[]
[Variables]
active = 'u v'
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
active = 'bc_u bc_v f_u f_v'
# A ParsedFunction allows us to supply analytic expressions
# directly in the input file
[./bc_u]
type = ParsedFunction
expression = sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '2'
[../]
[./bc_v]
type = ParsedFunction
expression = sin(alpha*pi*y)
symbol_names = 'alpha'
symbol_values = '2'
[../]
[./f_u]
type = ParsedFunction
expression = alpha*alpha*pi*pi*sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '2'
[../]
[./f_v]
type = ParsedFunction
expression = alpha*alpha*pi*pi*sin(alpha*pi*y)
symbol_names = 'alpha'
symbol_values = '2'
[../]
[]
[Kernels]
active = 'diff_u diff_v forcing_u forcing_v'
[./diff_u]
type = Diffusion
variable = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
# This Kernel can take a function name to use
[./forcing_u]
type = BodyForce
variable = u
function = f_u
[../]
[./forcing_v]
type = BodyForce
variable = v
function = f_v
[../]
[]
[BCs]
active = 'all_u all_v'
# The BC can take a function name to use
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = 'bottom right top left'
function = bc_u
[../]
[./all_v]
type = FunctionDirichletBC
variable = v
boundary = 'bottom right top left'
function = bc_v
[../]
[]
[Executioner]
type = Steady
[./Adaptivity]
refine_fraction = 1.0
coarsen_fraction = 0.0
max_h_level = 10
steps = 3
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
execute_on = 'initial timestep_end'
[../]
[./integral]
type = ElementVectorL2Error
var_x = u
var_y = v
function_x = bc_u
function_y = bc_v
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
file_base = out
exodus = false
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/2d-rc-epsjump.i)
mu=1.1
rho=1.1
advected_interp_method='upwind'
velocity_interp_method='rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '1 1'
dy = '0.5'
ix = '30 30'
iy = '20'
subdomain_id = '1 2'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
porosity = porosity
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
v = v
porosity = porosity
pressure = pressure
[]
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[v]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1e-6
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[AuxVariables]
[porosity]
type = MooseVariableFVReal
[]
[]
[ICs]
inactive = 'porosity_continuous'
[porosity_1]
type = ConstantIC
variable = porosity
block = 1
value = 1
[]
[porosity_2]
type = ConstantIC
variable = porosity
block = 2
value = 0.5
[]
[porosity_continuous]
type = FunctionIC
variable = porosity
block = '1 2'
function = smooth_jump
[]
[]
[Functions]
[smooth_jump]
type = ParsedFunction
expression = '1 - 0.5 * 1 / (1 + exp(-30*(x-1)))'
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = u
pressure = pressure
momentum_component = 'x'
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = v
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = PINSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = v
pressure = pressure
momentum_component = 'y'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = '1'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = v
function = 0
[]
[walls-u]
type = INSFVNaturalFreeSlipBC
boundary = 'top bottom'
variable = u
momentum_component = 'x'
[]
[walls-v]
type = INSFVNaturalFreeSlipBC
boundary = 'top bottom'
variable = v
momentum_component = 'y'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 0.4
[]
[]
[FunctorMaterials]
inactive = 'smooth'
[jump]
type = ADPiecewiseByBlockFunctorMaterial
prop_name = 'porosity'
subdomain_to_prop_value = '1 1
2 0.5'
[]
[smooth]
type = ADGenericFunctionFunctorMaterial
prop_names = 'porosity'
prop_values = 'smooth_jump'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-10
[]
[Postprocessors]
[inlet_p]
type = SideAverageValue
variable = 'pressure'
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 'right'
[]
[]
[Outputs]
exodus = true
csv = false
[]
(modules/porous_flow/test/tests/capillary_pressure/brooks_corey2.i)
# Test Brooks-Corey capillary pressure curve by varying saturation over the mesh
# lambda = 2, sat_lr = 0.1, log_extension = true
[Mesh]
type = GeneratedMesh
dim = 1
nx = 500
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[p0]
initial_condition = 1e6
[]
[s1]
[]
[]
[AuxVariables]
[s0aux]
family = MONOMIAL
order = CONSTANT
[]
[s1aux]
family = MONOMIAL
order = CONSTANT
[]
[p0aux]
family = MONOMIAL
order = CONSTANT
[]
[p1aux]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[s0]
type = PorousFlowPropertyAux
property = saturation
phase = 0
variable = s0aux
[]
[s1]
type = PorousFlowPropertyAux
property = saturation
phase = 1
variable = s1aux
[]
[p0]
type = PorousFlowPropertyAux
property = pressure
phase = 0
variable = p0aux
[]
[p1]
type = PorousFlowPropertyAux
property = pressure
phase = 1
variable = p1aux
[]
[]
[Functions]
[s1]
type = ParsedFunction
expression = x
[]
[]
[ICs]
[s1]
type = FunctionIC
variable = s1
function = s1
[]
[]
[Kernels]
[p0]
type = Diffusion
variable = p0
[]
[s1]
type = Diffusion
variable = s1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'p0 s1'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureBC
lambda = 2
log_extension = true
pe = 1e5
sat_lr = 0.1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = p0
phase1_saturation = s1
capillary_pressure = pc
[]
[kr0]
type = PorousFlowRelativePermeabilityVG
phase = 0
m = 0.5
[]
[kr1]
type = PorousFlowRelativePermeabilityCorey
phase = 1
n = 2
[]
[]
[VectorPostprocessors]
[vpp]
type = LineValueSampler
variable = 's0aux s1aux p0aux p1aux'
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 500
sort_by = id
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-6
[]
[BCs]
[sleft]
type = DirichletBC
variable = s1
value = 0
boundary = left
[]
[sright]
type = DirichletBC
variable = s1
value = 1
boundary = right
[]
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(test/tests/indicators/gradient_jump_indicator/gradient_jump_indicator_test.i)
###########################################################
# This is a test of the Mesh Indicator System. It computes
# a user-defined "error" for each element in the Mesh.
#
# This test has been verified to give the same error
# calculation as the libMesh kelly_error_estimator. If
# this test is diffing... the diff is wrong!
#
# @Requirement F2.40
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 10
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./solution]
type = ParsedFunction
expression = (exp(x)-1)/(exp(1)-1)
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./conv]
type = Convection
variable = u
velocity = '1 0 0'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
# Mesh Indicator System
[Adaptivity]
[Indicators]
[error]
type = GradientJumpIndicator
variable = u
[]
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(test/tests/kernels/ad_scalar_kernel_constraint/diffusion_bipass_scalar.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[exact_fn]
type = ParsedFunction
value = 'x*x+y*y'
[]
[ffn]
type = ParsedFunction
value = -4
[]
[bottom_bc_fn]
type = ParsedFunction
value = -2*y
[]
[right_bc_fn]
type = ParsedFunction
value = 2*x
[]
[top_bc_fn]
type = ParsedFunction
value = 2*y
[]
[left_bc_fn]
type = ParsedFunction
value = -2*x
[]
[]
[Variables]
[u]
family = LAGRANGE
order = SECOND
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[Kernels]
# Make sure that we can derive from the scalar base class
# but actually not assign a scalar variable
[diff]
type = ADDiffusionNoScalar
variable = u
[]
[ffnk]
type = ADBodyForce
variable = u
function = ffn
[]
[sk_lm]
type = ADScalarLMKernel
variable = u
kappa = lambda
pp_name = pp
value = 2.666666666666666
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[bottom]
type = ADFunctionNeumannBC
variable = u
boundary = 'bottom'
function = bottom_bc_fn
[]
[right]
type = ADFunctionNeumannBC
variable = u
boundary = 'right'
function = right_bc_fn
[]
[top]
type = ADFunctionNeumannBC
variable = u
boundary = 'top'
function = top_bc_fn
[]
[left]
type = ADFunctionNeumannBC
variable = u
boundary = 'left'
function = left_bc_fn
[]
[]
[Postprocessors]
# integrate the volume of domain since original objects set
# int(phi)=V0, rather than int(phi-V0)=0
[pp]
type = FunctionElementIntegral
function = 1
execute_on = initial
[]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
residual_and_jacobian_together = true
nl_rel_tol = 1e-9
l_tol = 1.e-10
nl_max_its = 10
# This example builds an indefinite matrix, so "-pc_type hypre -pc_hypre_type boomeramg" cannot
# be used reliably on this problem
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
# This is a linear problem, so we don't need to recompute the
# Jacobian. This isn't a big deal for a Steady problems, however, as
# there is only one solve.
solve_type = 'LINEAR'
[]
[Outputs]
# exodus = true
csv = true
hide = lambda
[]
(modules/porous_flow/test/tests/relperm/corey1.i)
# Test Corey relative permeability curve by varying saturation over the mesh
# Corey exponent n = 1 for both phases (linear residual saturation)
# No residual saturation in either phase
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[p0]
initial_condition = 1e6
[]
[s1]
[]
[]
[AuxVariables]
[s0aux]
family = MONOMIAL
order = CONSTANT
[]
[s1aux]
family = MONOMIAL
order = CONSTANT
[]
[kr0aux]
family = MONOMIAL
order = CONSTANT
[]
[kr1aux]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[s0]
type = PorousFlowPropertyAux
property = saturation
phase = 0
variable = s0aux
[]
[s1]
type = PorousFlowPropertyAux
property = saturation
phase = 1
variable = s1aux
[]
[kr0]
type = PorousFlowPropertyAux
property = relperm
phase = 0
variable = kr0aux
[]
[kr1]
type = PorousFlowPropertyAux
property = relperm
phase = 1
variable = kr1aux
[]
[]
[Functions]
[s1]
type = ParsedFunction
expression = x
[]
[]
[ICs]
[s1]
type = FunctionIC
variable = s1
function = s1
[]
[]
[Kernels]
[p0]
type = Diffusion
variable = p0
[]
[s1]
type = Diffusion
variable = s1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'p0 s1'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = p0
phase1_saturation = s1
capillary_pressure = pc
[]
[kr0]
type = PorousFlowRelativePermeabilityCorey
phase = 0
n = 1
[]
[kr1]
type = PorousFlowRelativePermeabilityCorey
phase = 1
n = 1
[]
[]
[VectorPostprocessors]
[vpp]
type = LineValueSampler
warn_discontinuous_face_values = false
variable = 's0aux s1aux kr0aux kr1aux'
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 20
sort_by = id
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-8
[]
[BCs]
[sleft]
type = DirichletBC
variable = s1
value = 0
boundary = left
[]
[sright]
type = DirichletBC
variable = s1
value = 1
boundary = right
[]
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(test/tests/bcs/ad_function_neumann_bc/test.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
dim = 2
nx = 32
ny = 32
[../]
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./exact_func]
type = ParsedFunction
expression = x*x
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = 2
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = FunctionNeumannBC
function = x
variable = u
boundary = right
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
execute_on = 'timestep_end'
file_base = neumannbc_out
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/mms/channel-flow/2d-average.i)
mu = 1.1
rho = 1.1
advected_interp_method = 'average'
velocity_interp_method = 'average'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = -1
ymax = 1
nx = 2
ny = 2
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 1
two_term_boundary_expansion = false
[]
[v]
type = INSFVVelocityVariable
initial_condition = 1
two_term_boundary_expansion = false
[]
[pressure]
type = INSFVPressureVariable
two_term_boundary_expansion = false
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[mass_forcing]
type = FVBodyForce
variable = pressure
function = forcing_p
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[u_forcing]
type = INSFVBodyForce
variable = u
functor = forcing_u
momentum_component = 'x'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[v_forcing]
type = INSFVBodyForce
variable = v
functor = forcing_v
momentum_component = 'y'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = 'exact_u'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = v
function = 'exact_v'
[]
[walls-u]
type = INSFVNoSlipWallBC
boundary = 'top bottom'
variable = u
function = 'exact_u'
[]
[walls-v]
type = INSFVNoSlipWallBC
boundary = 'top bottom'
variable = v
function = 'exact_v'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 'exact_p'
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'sin((1/2)*y*pi)*cos((1/2)*x*pi)'
[]
[exact_rhou]
type = ParsedFunction
expression = 'rho*sin((1/2)*y*pi)*cos((1/2)*x*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[forcing_u]
type = ParsedFunction
expression = '(1/2)*pi^2*mu*sin((1/2)*y*pi)*cos((1/2)*x*pi) - '
'1/2*pi*rho*sin((1/4)*x*pi)*sin((1/2)*y*pi)^2*cos((1/2)*x*pi) + '
'(1/2)*pi*rho*sin((1/4)*x*pi)*cos((1/2)*x*pi)*cos((1/2)*y*pi)^2 - '
'pi*rho*sin((1/2)*x*pi)*sin((1/2)*y*pi)^2*cos((1/2)*x*pi) - '
'1/4*pi*sin((1/4)*x*pi)*sin((3/2)*y*pi)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_v]
type = ParsedFunction
expression = 'sin((1/4)*x*pi)*cos((1/2)*y*pi)'
[]
[exact_rhov]
type = ParsedFunction
expression = 'rho*sin((1/4)*x*pi)*cos((1/2)*y*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[forcing_v]
type = ParsedFunction
expression = '(5/16)*pi^2*mu*sin((1/4)*x*pi)*cos((1/2)*y*pi) - '
'pi*rho*sin((1/4)*x*pi)^2*sin((1/2)*y*pi)*cos((1/2)*y*pi) - '
'1/2*pi*rho*sin((1/4)*x*pi)*sin((1/2)*x*pi)*sin((1/2)*y*pi)*cos((1/2)*y*pi) + '
'(1/4)*pi*rho*sin((1/2)*y*pi)*cos((1/4)*x*pi)*cos((1/2)*x*pi)*cos((1/2)*y*pi) + '
'(3/2)*pi*cos((1/4)*x*pi)*cos((3/2)*y*pi)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'sin((3/2)*y*pi)*cos((1/4)*x*pi)'
[]
[forcing_p]
type = ParsedFunction
expression = '-1/2*pi*rho*sin((1/4)*x*pi)*sin((1/2)*y*pi) - '
'1/2*pi*rho*sin((1/2)*x*pi)*sin((1/2)*y*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[Outputs]
csv = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2FunctorError
approximate = u
exact = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2v]
type = ElementL2FunctorError
approximate = v
exact = exact_v
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
approximate = pressure
exact = exact_p
type = ElementL2FunctorError
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(modules/combined/test/tests/beam_eigenstrain_transfer/subapp_err_2.i)
# SubApp with 2D model to test multi app vectorpostprocessor to aux var transfer
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 5
xmin = 0.0
xmax = 0.5
ymin = 0.0
ymax = 0.150080
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./temp]
[../]
[./axial_strain]
order = FIRST
family = MONOMIAL
[../]
[]
[Functions]
[./temperature_load]
type = ParsedFunction
expression = t*(500.0)+300.0
[../]
[]
[Modules]
[./TensorMechanics]
[./Master]
[./all]
strain = SMALL
incremental = true
add_variables = true
eigenstrain_names = eigenstrain
[../]
[../]
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = temperature_load
[../]
[./axial_strain]
type = RankTwoAux
variable = axial_strain
rank_two_tensor = total_strain
index_i = 1
index_j = 1
execute_on = timestep_end
[../]
[]
[BCs]
[./x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 298
thermal_expansion_coeff = 1.3e-5
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Executioner]
type = Transient
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
l_tol = 1e-9
start_time = 0.0
end_time = 0.075
dt = 0.0125
dtmin = 0.0001
[]
[Outputs]
exodus = true
[]
[VectorPostprocessors]
[./axial_str]
type = LineValueSampler
warn_discontinuous_face_values = false
start_point = '0.5 0.0 0.0'
end_point = '0.5 0.150080 0.0'
variable = 'axial_strain temp'
num_points = 21
sort_by = 'y'
[../]
[]
[Postprocessors]
[./end_disp]
type = PointValue
variable = disp_y
point = '0.5 0.150080 0.0'
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/energy_source/steady-action.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = steady-state
velocity_boundary = 'bottom right top left'
velocity_function = '0 0 0 0 lid_function 0 0 0'
initial_velocity = '1e-15 1e-15 0'
add_standard_velocity_variables_for_ad = false
pressure_pinned_node = 0
density_name = rho
dynamic_viscosity_name = mu
use_ad = true
laplace = true
family = LAGRANGE
order = FIRST
add_temperature_equation = true
fixed_temperature_boundary = 'bottom top'
temperature_function = '1 0'
has_heat_source = true
heat_source_function = 1
supg = true
pspg = true
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[]
[]
[Functions]
[lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(test/tests/mortar/continuity-2d-non-conforming/dual-soln-continuity.i)
[Mesh]
second_order = false
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[./primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[../]
[./secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[../]
[]
[Variables]
[./T]
block = '1 2'
order = FIRST
[../]
[./lambda]
block = '10'
order = FIRST
use_dual = true
[../]
[]
[BCs]
[./neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln
variable = T
boundary = '3 4 5 6 7 8'
[../]
[]
[Kernels]
[./conduction]
type = Diffusion
variable = T
block = '1 2'
[../]
[./sink]
type = Reaction
variable = T
block = '1 2'
[../]
[./forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[../]
[]
[Functions]
[./forcing_function]
type = ParsedFunction
expression= '-4 + x^2 + y^2'
[../]
[./exact_soln]
type = ParsedFunction
expression= 'x^2 + y^2'
[../]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[./mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
exodus = true
[]
(test/tests/bcs/coupled_var_neumann/on_off.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxVariables]
[./coupled_bc_var]
[../]
[./active]
initial_condition = 1
[../]
[]
[AuxKernels]
[./active_right]
type = ConstantAux
variable = active
value = 0.5
boundary = 1
[../]
[]
[ICs]
[./coupled_bc_var]
type = FunctionIC
variable = coupled_bc_var
function = set_coupled_bc_var
[../]
[]
[Functions]
[./set_coupled_bc_var]
type = ParsedFunction
expression = 'y - 0.5'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = CoupledVarNeumannBC
variable = u
boundary = 1
v = coupled_bc_var
scale_factor = active
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/radial_disp_aux/sphere_1d_spherical.i)
# The purpose of this set of tests is to check the values computed
# by the RadialDisplacementAux AuxKernel. They should match the
# radial component of the displacment for a cylindrical or spherical
# model.
# This particular model is of a sphere subjected to uniform thermal
# expansion represented using a 1D spherical model.
[Mesh]
type = GeneratedMesh
dim = 1
elem_type = EDGE3
nx = 4
xmin = 0.0
xmax = 1.0
[]
[GlobalParams]
displacements = 'disp_x'
[]
[Problem]
coord_type = RSPHERICAL
[]
[AuxVariables]
[./temp]
[../]
[./rad_disp]
[../]
[]
[Functions]
[./temperature_load]
type = ParsedFunction
expression = t+300.0
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
eigenstrain_names = eigenstrain
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = temperature_load
use_displaced_mesh = false
[../]
[./raddispaux]
type = RadialDisplacementSphereAux
variable = rad_disp
[../]
[]
[BCs]
[./x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 300
thermal_expansion_coeff = 1.3e-5
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '51'
line_search = 'none'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-11
nl_abs_tol = 1e-10
start_time = 0.0
end_time = 1
dt = 1
dtmin = 1
[]
[Outputs]
exodus = true
[]
(modules/xfem/test/tests/solid_mechanics_basic/edge_crack_3d_propagation.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[XFEM]
geometric_cut_userobjects = 'cut_mesh'
qrule = volfrac
output_cut_plane = true
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 5
ny = 5
nz = 2
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
zmin = 0.0
zmax = 0.2
elem_type = HEX8
[]
[UserObjects]
[./cut_mesh]
type = CrackMeshCut3DUserObject
mesh_file = mesh_edge_crack.xda
growth_dir_method = FUNCTION
size_control = 0.1
n_step_growth = 1
growth_direction_x = growth_func_x
growth_direction_y = growth_func_y
growth_direction_z = growth_func_z
growth_rate = growth_func_v
[../]
[]
[Functions]
[./growth_func_x]
type = ParsedFunction
expression = 1
[../]
[./growth_func_y]
type = ParsedFunction
expression = 0
[../]
[./growth_func_z]
type = ParsedFunction
expression = 0
[../]
[./growth_func_v]
type = ParsedFunction
expression = 0.15
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress'
[../]
[]
[Functions]
[./top_trac_y]
type = ConstantFunction
value = 10
[../]
[]
[BCs]
[./top_y]
type = FunctionNeumannBC
boundary = top
variable = disp_y
function = top_trac_y
[../]
[./bottom_x]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[../]
[./bottom_y]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[./bottom_z]
type = DirichletBC
boundary = bottom
variable = disp_z
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
block = 0
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
line_search = 'none'
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
# controls for linear iterations
l_max_its = 100
l_tol = 1e-2
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
# time control
start_time = 0.0
dt = 1.0
end_time = 3.0
max_xfem_update = 1
[]
[Outputs]
file_base = edge_crack_3d_propagation_out
execute_on = 'timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/fvkernels/mms/advective-outflow/advection-diffusion.i)
diff=1
a=1
[GlobalParams]
advected_interp_method = 'average'
[]
[Mesh]
[./gen_mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = -1
xmax = 0
nx = 2
[../]
[]
[Variables]
[./v]
family = MONOMIAL
order = CONSTANT
fv = true
[../]
[]
[FVKernels]
[./advection]
type = FVAdvection
variable = v
velocity = '${a} 0 0'
force_boundary_execution = true
[../]
[./diffusion]
type = FVDiffusion
variable = v
coeff = coeff
[../]
[body_v]
type = FVBodyForce
variable = v
function = 'forcing'
[]
[]
[FVBCs]
[left]
type = FVFunctionDirichletBC
boundary = 'left'
function = 'exact'
variable = v
[]
[]
[Materials]
[diff]
type = ADGenericFunctorMaterial
prop_names = 'coeff'
prop_values = '${diff}'
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = 'cos(x)'
[]
[forcing]
type = ParsedFunction
expression = 'cos(x) - sin(x)'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[./error]
type = ElementL2Error
variable = v
function = exact
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(modules/solid_mechanics/test/tests/smeared_cracking/cracking_function.i)
#
# Simple pull test for cracking. This tests the option to prescribe the
# cracking strength using an AuxVariable. In this case, an elemental
# AuxVariable is used, and a function is used to prescribe its value.
# One of the elements is weaker than the others, so the crack localizes
# in that element.
#
[Mesh]
file = plate.e
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./cracking_stress_fn]
order = CONSTANT
family = MONOMIAL
[../]
[./crack_flags2]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./displ]
type = PiecewiseLinear
x = '0 0.1 0.2 0.3 0.4'
y = '0 0.001 0 -0.001 0'
[../]
[./fstress]
type = ParsedFunction
expression = 'if(x > 0.667, 1.1e6, 1.2e6)'
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_zx strain_xx strain_yy strain_xy strain_yz'
[../]
[]
[AuxKernels]
[./cracking_stress_fn]
type = FunctionAux
variable = cracking_stress_fn
function = fstress
execute_on = initial
[../]
[./crack_flags2]
type = MaterialRealVectorValueAux
property = crack_flags
variable = crack_flags2
component = 2
[../]
[]
[BCs]
[./pull]
type = FunctionDirichletBC
variable = disp_x
boundary = '3 4'
function = displ
[../]
[./pin_x]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0
[../]
[./pin_y]
type = DirichletBC
variable = disp_y
boundary = '1 4'
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 200.0e7
poissons_ratio = 0.0
[../]
[./elastic_stress]
type = ComputeSmearedCrackingStress
cracking_stress = cracking_stress_fn
cracked_elasticity_type = FULL
softening_models = abrupt_softening
[../]
[./abrupt_softening]
type = AbruptSoftening
residual_stress = 0.0
[../]
[]
[Postprocessors]
[./elem_stress_xx]
type = ElementalVariableValue
variable = stress_xx
elementid = 2
[../]
[./elem_strain_xx]
type = ElementalVariableValue
variable = strain_xx
elementid = 2
[../]
[./elem_crack_flags_x]
type = ElementalVariableValue
variable = crack_flags2
elementid = 2
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101 '
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-8
nl_abs_tol = 1e-6
l_tol = 1e-5
start_time = 0.0
end_time = 0.2
dt = 0.0025
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/mms/porosity_change/2d-rc-continuous.i)
mu = 1.1
rho = 1.1
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = -1
ymax = 1
nx = 8
ny = 8
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
v = v
porosity = porosity
pressure = pressure
[]
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[v]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[]
[ICs]
[porosity_continuous]
type = FunctionIC
variable = porosity
function = smooth_jump
[]
[]
[GlobalParams]
porosity = porosity
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[mass_forcing]
type = FVBodyForce
variable = pressure
function = forcing_p
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = u
mu = ${mu}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = u
pressure = pressure
porosity = porosity
momentum_component = 'x'
[]
[u_forcing]
type = INSFVBodyForce
variable = u
functor = forcing_u
momentum_component = 'x'
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = v
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = PINSFVMomentumDiffusion
variable = v
mu = ${mu}
porosity = porosity
momentum_component = 'y'
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = v
pressure = pressure
porosity = porosity
momentum_component = 'y'
[]
[v_forcing]
type = INSFVBodyForce
variable = v
functor = forcing_v
momentum_component = 'y'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
functor = 'exact_u'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = v
functor = 'exact_v'
[]
[walls-u]
type = INSFVNoSlipWallBC
boundary = 'top bottom'
variable = u
function = 'exact_u'
[]
[walls-v]
type = INSFVNoSlipWallBC
boundary = 'top bottom'
variable = v
function = 'exact_v'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 'exact_p'
[]
[]
[Functions]
[smooth_jump]
type = ParsedFunction
expression = '1 - 0.5 * 1 / (1 + exp(-30*(x-1))) - 0.01 * y'
[]
# Output from compute-functions-2d.py
[exact_u]
type = ParsedFunction
expression = 'sin((1/2)*y*pi)*cos((1/2)*x*pi)'
[]
[forcing_u]
type = ParsedFunction
expression = '15.0*mu*(-1/2*pi*sin((1/2)*x*pi)*sin((1/2)*y*pi)/(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1)) + 15.0*exp(30 - 30*x)*sin((1/2)*y*pi)*cos((1/2)*x*pi)/((exp(30 - 30*x) + 1)^2*(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1))^2))*exp(30 - 30*x)/(exp(30 - 30*x) + 1)^2 + 0.01*mu*((1/2)*pi*cos((1/2)*x*pi)*cos((1/2)*y*pi)/(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1)) + 0.01*sin((1/2)*y*pi)*cos((1/2)*x*pi)/(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1))^2) - mu*(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1))*(-1/4*pi^2*sin((1/2)*y*pi)*cos((1/2)*x*pi)/(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1)) + 0.01*pi*cos((1/2)*x*pi)*cos((1/2)*y*pi)/(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1))^2 + 0.0002*sin((1/2)*y*pi)*cos((1/2)*x*pi)/(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1))^3) - mu*(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1))*(-1/4*pi^2*sin((1/2)*y*pi)*cos((1/2)*x*pi)/(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1)) - 15.0*pi*exp(30 - 30*x)*sin((1/2)*x*pi)*sin((1/2)*y*pi)/((exp(30 - 30*x) + 1)^2*(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1))^2) - 450.0*exp(30 - 30*x)*sin((1/2)*y*pi)*cos((1/2)*x*pi)/((exp(30 - 30*x) + 1)^2*(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1))^2) + 900.0*exp(60 - 60*x)*sin((1/2)*y*pi)*cos((1/2)*x*pi)/((exp(30 - 30*x) + 1)^3*(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1))^2) + 450.0*exp(60 - 60*x)*sin((1/2)*y*pi)*cos((1/2)*x*pi)/((exp(30 - 30*x) + 1)^4*(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1))^3)) - 1/2*pi*rho*sin((1/4)*x*pi)*sin((1/2)*y*pi)^2*cos((1/2)*x*pi)/(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1)) + (1/2)*pi*rho*sin((1/4)*x*pi)*cos((1/2)*x*pi)*cos((1/2)*y*pi)^2/(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1)) - pi*rho*sin((1/2)*x*pi)*sin((1/2)*y*pi)^2*cos((1/2)*x*pi)/(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1)) + 0.01*rho*sin((1/4)*x*pi)*sin((1/2)*y*pi)*cos((1/2)*x*pi)*cos((1/2)*y*pi)/(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1))^2 + 15.0*rho*exp(30 - 30*x)*sin((1/2)*y*pi)^2*cos((1/2)*x*pi)^2/((exp(30 - 30*x) + 1)^2*(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1))^2) - 1/4*pi*(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1))*sin((1/4)*x*pi)*sin((3/2)*y*pi)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_v]
type = ParsedFunction
expression = 'sin((1/4)*x*pi)*cos((1/2)*y*pi)'
[]
[forcing_v]
type = ParsedFunction
expression = '0.01*mu*(-1/2*pi*sin((1/4)*x*pi)*sin((1/2)*y*pi)/(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1)) + 0.01*sin((1/4)*x*pi)*cos((1/2)*y*pi)/(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1))^2) + 15.0*mu*((1/4)*pi*cos((1/4)*x*pi)*cos((1/2)*y*pi)/(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1)) + 15.0*exp(30 - 30*x)*sin((1/4)*x*pi)*cos((1/2)*y*pi)/((exp(30 - 30*x) + 1)^2*(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1))^2))*exp(30 - 30*x)/(exp(30 - 30*x) + 1)^2 - mu*(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1))*(-1/4*pi^2*sin((1/4)*x*pi)*cos((1/2)*y*pi)/(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1)) - 0.01*pi*sin((1/4)*x*pi)*sin((1/2)*y*pi)/(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1))^2 + 0.0002*sin((1/4)*x*pi)*cos((1/2)*y*pi)/(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1))^3) - mu*(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1))*(-1/16*pi^2*sin((1/4)*x*pi)*cos((1/2)*y*pi)/(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1)) - 450.0*exp(30 - 30*x)*sin((1/4)*x*pi)*cos((1/2)*y*pi)/((exp(30 - 30*x) + 1)^2*(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1))^2) + 7.5*pi*exp(30 - 30*x)*cos((1/4)*x*pi)*cos((1/2)*y*pi)/((exp(30 - 30*x) + 1)^2*(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1))^2) + 900.0*exp(60 - 60*x)*sin((1/4)*x*pi)*cos((1/2)*y*pi)/((exp(30 - 30*x) + 1)^3*(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1))^2) + 450.0*exp(60 - 60*x)*sin((1/4)*x*pi)*cos((1/2)*y*pi)/((exp(30 - 30*x) + 1)^4*(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1))^3)) - pi*rho*sin((1/4)*x*pi)^2*sin((1/2)*y*pi)*cos((1/2)*y*pi)/(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1)) - 1/2*pi*rho*sin((1/4)*x*pi)*sin((1/2)*x*pi)*sin((1/2)*y*pi)*cos((1/2)*y*pi)/(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1)) + (1/4)*pi*rho*sin((1/2)*y*pi)*cos((1/4)*x*pi)*cos((1/2)*x*pi)*cos((1/2)*y*pi)/(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1)) + 0.01*rho*sin((1/4)*x*pi)^2*cos((1/2)*y*pi)^2/(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1))^2 + 15.0*rho*exp(30 - 30*x)*sin((1/4)*x*pi)*sin((1/2)*y*pi)*cos((1/2)*x*pi)*cos((1/2)*y*pi)/((exp(30 - 30*x) + 1)^2*(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1))^2) + (3/2)*pi*(-0.01*y + 1 - 0.5/(exp(30 - 30*x) + 1))*cos((1/4)*x*pi)*cos((3/2)*y*pi)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'sin((3/2)*y*pi)*cos((1/4)*x*pi)'
[]
[forcing_p]
type = ParsedFunction
expression = '-1/2*pi*rho*sin((1/4)*x*pi)*sin((1/2)*y*pi) - 1/2*pi*rho*sin((1/2)*x*pi)*sin((1/2)*y*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm 100 lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
[]
[Outputs]
csv = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2FunctorError
approximate = u
exact = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2v]
type = ElementL2FunctorError
approximate = v
exact = exact_v
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
type = ElementL2FunctorError
approximate = pressure
exact = exact_p
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/thermal_expansion/free.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = false
eigenstrain_names = "thermal_contribution"
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[AuxVariables]
[temperature]
[]
[]
[AuxKernels]
[control_temperature]
type = FunctionAux
variable = temperature
function = temperature_control
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = bottom
variable = disp_y
value = 0.0
[]
[leftz]
type = DirichletBC
preset = true
boundary = back
variable = disp_z
value = 0.0
[]
[]
[Functions]
[temperature_control]
type = ParsedFunction
expression = '100*t'
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = SMALL
new_system = true
formulation = TOTAL
volumetric_locking_correction = false
generate_output = 'cauchy_stress_xx cauchy_stress_yy cauchy_stress_zz cauchy_stress_xy '
'cauchy_stress_xz cauchy_stress_yz strain_xx strain_yy strain_zz strain_xy '
'strain_xz strain_yz'
[]
[]
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[thermal_expansion]
type = ComputeThermalExpansionEigenstrain
temperature = temperature
thermal_expansion_coeff = 1.0e-3
eigenstrain_name = thermal_contribution
stress_free_temperature = 0.0
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
end_time = 1
dt = 1
type = Transient
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/boussinesq/boussinesq.i)
mu = 1
rho = 1
k = 1
cp = 1
alpha = 1
velocity_interp_method = 'rc'
advected_interp_method = 'upwind'
rayleigh = 1e3
hot_temp = ${rayleigh}
temp_ref = '${fparse hot_temp / 2.}'
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = vel_x
v = vel_y
pressure = pressure
[]
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 32
ny = 32
[]
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
[]
[vel_y]
type = INSFVVelocityVariable
[]
[pressure]
type = INSFVPressureVariable
[]
[T_fluid]
type = INSFVEnergyVariable
scaling = 1e-4
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[mean_zero_pressure]
type = FVIntegralValueConstraint
variable = pressure
lambda = lambda
[]
[u_advection]
type = INSFVMomentumAdvection
variable = vel_x
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = vel_x
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = vel_x
momentum_component = 'x'
pressure = pressure
[]
[u_buoyancy]
type = INSFVMomentumBoussinesq
variable = vel_x
T_fluid = T_fluid
gravity = '0 -1 0'
rho = ${rho}
ref_temperature = ${temp_ref}
momentum_component = 'x'
[]
[u_gravity]
type = INSFVMomentumGravity
variable = vel_x
gravity = '0 -1 0'
rho = ${rho}
momentum_component = 'x'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = vel_y
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = vel_y
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = vel_y
momentum_component = 'y'
pressure = pressure
[]
[v_buoyancy]
type = INSFVMomentumBoussinesq
variable = vel_y
T_fluid = T_fluid
gravity = '0 -1 0'
rho = ${rho}
ref_temperature = ${temp_ref}
momentum_component = 'y'
[]
[v_gravity]
type = INSFVMomentumGravity
variable = vel_y
gravity = '0 -1 0'
rho = ${rho}
momentum_component = 'y'
[]
[temp_conduction]
type = FVDiffusion
coeff = 'k'
variable = T_fluid
[]
[temp_advection]
type = INSFVEnergyAdvection
variable = T_fluid
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
[]
[]
[FVBCs]
[top_x]
type = INSFVNoSlipWallBC
variable = vel_x
boundary = 'top'
function = 'lid_function'
[]
[no_slip_x]
type = INSFVNoSlipWallBC
variable = vel_x
boundary = 'left right bottom'
function = 0
[]
[no_slip_y]
type = INSFVNoSlipWallBC
variable = vel_y
boundary = 'left right top bottom'
function = 0
[]
[T_hot]
type = FVDirichletBC
variable = T_fluid
boundary = left
value = ${hot_temp}
[]
[T_cold]
type = FVDirichletBC
variable = T_fluid
boundary = right
value = 0
[]
[]
[FunctorMaterials]
[const_functor]
type = ADGenericFunctorMaterial
prop_names = 'alpha_b cp k'
prop_values = '${alpha} ${cp} ${k}'
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = 'T_fluid'
rho = ${rho}
[]
[]
[Functions]
[lid_function]
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/xfem/test/tests/moving_interface/verification/2D_xy_homog1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: 2D
# Coordinate System: xy
# Material Numbers/Types: homogeneous 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# Transient 2D heat transfer problem in Cartesian coordinates designed with
# the Method of Manufactured Solutions. This problem was developed to verify
# XFEM performance on linear elements in the presence of a moving interface
# sweeping across the x-y coordinates of a system with homogeneous material
# properties. This problem can be exactly evaluated by FEM/Moose without the
# moving interface. Both the temperature and level set function are designed
# to be linear to attempt to minimize error between the Moose/exact solution
# and XFEM results.
# Results:
# The temperature at the bottom left boundary (x=0, y=0) exhibits the largest
# difference between the FEM/Moose solution and XFEM results. We present the
# XFEM results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 479.9998791
# 0.6 520 519.9995307
# 0.8 560 559.9989724
# 1.0 600 599.9984541
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraints]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-100*x-100*y+200)'
[../]
[./neumann_func]
type = ParsedFunction
expression = '1.5*100*t'
[../]
[./dirichlet_right_func]
type = ParsedFunction
expression = '(-100*y+100)*t+400'
[../]
[./dirichlet_top_func]
type = ParsedFunction
expression = '(-100*x+100)*t+400'
[../]
[./ls_func]
type = ParsedFunction
expression = '-0.5*(x+y) + 1.04 - 0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericConstantMaterial
prop_names = 'diffusion_coefficient'
prop_values = 1.5
[../]
[]
[BCs]
[./left_du]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = FunctionDirichletBC
variable = u
boundary = 'right'
function = dirichlet_right_func
[../]
[./bottom_du]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = neumann_func
[../]
[./top_u]
type = FunctionDirichletBC
variable = u
boundary = 'top'
function = dirichlet_top_func
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/bcs/periodic/parallel_pbc_using_trans.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
nz = 0
xmax = 10
ymax = 10
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Functions]
[./tr_x]
type = ParsedFunction
expression = x
[../]
[./tr_y]
type = ParsedFunction
expression = y+10
[../]
[./itr_x]
type = ParsedFunction
expression = x
[../]
[./itr_y]
type = ParsedFunction
expression = y-10
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./forcing]
type = GaussContForcing
variable = u
y_center = 1
x_spread = 0.25
y_spread = 0.5
[../]
[./dot]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./Periodic]
[./x]
primary = bottom
secondary = top
transform_func = 'tr_x tr_y'
inv_transform_func = 'itr_x itr_y'
[../]
[../]
[]
[Executioner]
type = Transient
dt = 0.5
num_steps = 10
[]
[Outputs]
execute_on = 'timestep_end'
exodus = 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/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/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/action/noaction_2d.i)
# 2D with mixed conditions on stress/strain
[GlobalParams]
displacements = 'disp_x disp_y'
large_kinematics = false
macro_gradient = hvar
homogenization_constraint = homogenization
[]
[Mesh]
[base]
type = FileMeshGenerator
file = '2d.exo'
[]
[sidesets]
type = SideSetsFromNormalsGenerator
input = base
normals = '-1 0 0
1 0 0
0 -1 0
0 1 0'
fixed_normal = true
new_boundary = 'left right bottom top'
[]
[]
[UserObjects]
[homogenization]
type = HomogenizationConstraint
constraint_types = 'stress none none stress strain none none none none'
targets = 'stress11 stress12 strain22'
execute_on = 'INITIAL LINEAR NONLINEAR'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[hvar]
family = SCALAR
order = THIRD
[]
[]
[AuxVariables]
[pk1_stress_xx]
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_yx]
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_zx]
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_xy]
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_yy]
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_zy]
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_xz]
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_yz]
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_zz]
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_xx]
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_yx]
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_zx]
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_xy]
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_yy]
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_zy]
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_xz]
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_yz]
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_zz]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[pk1_stress_xx]
type = RankTwoAux
variable = pk1_stress_xx
rank_two_tensor = pk1_stress
index_i = 0
index_j = 0
[]
[pk1_stress_yx]
type = RankTwoAux
variable = pk1_stress_yx
rank_two_tensor = pk1_stress
index_i = 1
index_j = 0
[]
[pk1_stress_zx]
type = RankTwoAux
variable = pk1_stress_zx
rank_two_tensor = pk1_stress
index_i = 2
index_j = 0
[]
[pk1_stress_xy]
type = RankTwoAux
variable = pk1_stress_xy
rank_two_tensor = pk1_stress
index_i = 0
index_j = 1
[]
[pk1_stress_yy]
type = RankTwoAux
variable = pk1_stress_yy
rank_two_tensor = pk1_stress
index_i = 1
index_j = 1
[]
[pk1_stress_zy]
type = RankTwoAux
variable = pk1_stress_zy
rank_two_tensor = pk1_stress
index_i = 2
index_j = 1
[]
[pk1_stress_xz]
type = RankTwoAux
variable = pk1_stress_xz
rank_two_tensor = pk1_stress
index_i = 0
index_j = 2
[]
[pk1_stress_yz]
type = RankTwoAux
variable = pk1_stress_yz
rank_two_tensor = pk1_stress
index_i = 1
index_j = 2
[]
[pk1_stress_zz]
type = RankTwoAux
variable = pk1_stress_zz
rank_two_tensor = pk1_stress
index_i = 2
index_j = 2
[]
[deformation_gradient_xx]
type = RankTwoAux
variable = deformation_gradient_xx
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 0
[]
[deformation_gradient_yx]
type = RankTwoAux
variable = deformation_gradient_yx
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 0
[]
[deformation_gradient_zx]
type = RankTwoAux
variable = deformation_gradient_zx
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 0
[]
[deformation_gradient_xy]
type = RankTwoAux
variable = deformation_gradient_xy
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 1
[]
[deformation_gradient_yy]
type = RankTwoAux
variable = deformation_gradient_yy
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 1
[]
[deformation_gradient_zy]
type = RankTwoAux
variable = deformation_gradient_zy
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 1
[]
[deformation_gradient_xz]
type = RankTwoAux
variable = deformation_gradient_xz
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 2
[]
[deformation_gradient_yz]
type = RankTwoAux
variable = deformation_gradient_yz
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 2
[]
[deformation_gradient_zz]
type = RankTwoAux
variable = deformation_gradient_zz
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 2
[]
[]
[Kernels]
[sdx]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[sdy]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_y
component = 1
[]
[]
[ScalarKernels]
[enforce]
type = HomogenizationConstraintScalarKernel
variable = hvar
[]
[]
[Functions]
[stress11]
type = ParsedFunction
expression = '400*t'
[]
[strain22]
type = ParsedFunction
expression = '-2.0e-2*t'
[]
[stress12]
type = ParsedFunction
expression = '100*t'
[]
[]
[BCs]
[Periodic]
[x]
variable = disp_x
auto_direction = 'x y'
[]
[y]
variable = disp_y
auto_direction = 'x y'
[]
[]
[fix1_x]
type = DirichletBC
boundary = "fix1"
variable = disp_x
value = 0
[]
[fix1_y]
type = DirichletBC
boundary = "fix1"
variable = disp_y
value = 0
[]
[fix2_y]
type = DirichletBC
boundary = "fix2"
variable = disp_y
value = 0
[]
[]
[Materials]
[elastic_tensor_1]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
block = '1'
[]
[elastic_tensor_2]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 120000.0
poissons_ratio = 0.21
block = '2'
[]
[elastic_tensor_3]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 80000.0
poissons_ratio = 0.4
block = '3'
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
homogenization_gradient_names = 'homogenization_gradient'
[]
[compute_homogenization_gradient]
type = ComputeHomogenizedLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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 = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 1.0
[]
[Outputs]
file_base = 2d
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/mms/channel-flow/2d-rc.i)
mu = 1.1
rho = 1.1
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = -1
ymax = 1
nx = 2
ny = 2
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 1
[]
[v]
type = INSFVVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[mass_forcing]
type = FVBodyForce
variable = pressure
function = forcing_p
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[u_forcing]
type = INSFVBodyForce
variable = u
functor = forcing_u
momentum_component = 'x'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[v_forcing]
type = INSFVBodyForce
variable = v
functor = forcing_v
momentum_component = 'y'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = 'exact_u'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = v
function = 'exact_v'
[]
[walls-u]
type = INSFVNoSlipWallBC
boundary = 'top bottom'
variable = u
function = 'exact_u'
[]
[walls-v]
type = INSFVNoSlipWallBC
boundary = 'top bottom'
variable = v
function = 'exact_v'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 'exact_p'
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'sin((1/2)*y*pi)*cos((1/2)*x*pi)'
[]
[exact_rhou]
type = ParsedFunction
expression = 'rho*sin((1/2)*y*pi)*cos((1/2)*x*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[forcing_u]
type = ParsedFunction
expression = '(1/2)*pi^2*mu*sin((1/2)*y*pi)*cos((1/2)*x*pi) - '
'1/2*pi*rho*sin((1/4)*x*pi)*sin((1/2)*y*pi)^2*cos((1/2)*x*pi) + '
'(1/2)*pi*rho*sin((1/4)*x*pi)*cos((1/2)*x*pi)*cos((1/2)*y*pi)^2 - '
'pi*rho*sin((1/2)*x*pi)*sin((1/2)*y*pi)^2*cos((1/2)*x*pi) - '
'1/4*pi*sin((1/4)*x*pi)*sin((3/2)*y*pi)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_v]
type = ParsedFunction
expression = 'sin((1/4)*x*pi)*cos((1/2)*y*pi)'
[]
[exact_rhov]
type = ParsedFunction
expression = 'rho*sin((1/4)*x*pi)*cos((1/2)*y*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[forcing_v]
type = ParsedFunction
expression = '(5/16)*pi^2*mu*sin((1/4)*x*pi)*cos((1/2)*y*pi) - '
'pi*rho*sin((1/4)*x*pi)^2*sin((1/2)*y*pi)*cos((1/2)*y*pi) - '
'1/2*pi*rho*sin((1/4)*x*pi)*sin((1/2)*x*pi)*sin((1/2)*y*pi)*cos((1/2)*y*pi) + '
'(1/4)*pi*rho*sin((1/2)*y*pi)*cos((1/4)*x*pi)*cos((1/2)*x*pi)*cos((1/2)*y*pi) + '
'(3/2)*pi*cos((1/4)*x*pi)*cos((3/2)*y*pi)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'sin((3/2)*y*pi)*cos((1/4)*x*pi)'
[]
[forcing_p]
type = ParsedFunction
expression = '-1/2*pi*rho*sin((1/4)*x*pi)*sin((1/2)*y*pi) - '
'1/2*pi*rho*sin((1/2)*x*pi)*sin((1/2)*y*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO superlu_dist'
nl_rel_tol = 1e-12
[]
[Outputs]
csv = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2FunctorError
approximate = u
exact = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2v]
type = ElementL2FunctorError
approximate = v
exact = exact_v
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
type = ElementL2FunctorError
approximate = pressure
exact = exact_p
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(test/tests/auxkernels/time_derivative_aux/test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 3
ny = 2
[]
[Functions]
# These functions have implemented time derivatives
[some_function]
type = ParsedFunction
expression = t*(x+y)
[]
[some_other_function]
type = PiecewiseLinear
x = '0 0.05 0.15 0.25'
y = '1 2 3 4'
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[reaction]
type = Reaction
variable = u
[]
[diffusion]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = NeumannBC
variable = u
value = 5
boundary = 'left'
[]
[]
[Materials]
[material]
type = GenericFunctorMaterial
prop_names = 'some_matprop'
prop_values = 'some_function'
[]
[]
[AuxVariables]
[variable_derivative]
family = MONOMIAL
order = CONSTANT
[]
inactive = 'variable_derivative_fv'
[variable_derivative_fv]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[function_derivative_qp]
family = MONOMIAL
order = FIRST
[]
[function_derivative_elem]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
# Time derivative of a nonlinear variable
[var_derivative]
type = TimeDerivativeAux
variable = variable_derivative
functor = u
factor = 10
execute_on = 'TIMESTEP_END'
[]
# this places the derivative of a FE variable in a FV one
# let's output a warning
inactive = 'var_derivative_to_fv'
[var_derivative_to_fv]
type = TimeDerivativeAux
variable = variable_derivative_fv
functor = u
[]
# Time derivative of a function: using the functor system
# Time derivative of a functor material property is not currently supported
[function_derivative_quadrature_point]
type = TimeDerivativeAux
variable = function_derivative_qp
functor = 'some_function'
factor = 2
execute_on = 'INITIAL TIMESTEP_END'
[]
[function_derivative_element]
type = TimeDerivativeAux
variable = function_derivative_elem
functor = 'some_other_function'
factor = 2
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 2
nl_abs_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/restart/restart_transient_from_steady/restart_trans_with_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Problem]
restart_file_base = steady_with_sub_out_cp/LATEST
[]
[AuxVariables]
[Tf]
[]
[]
[Variables]
[power_density]
[]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2' # increase this function to drive transient
[]
[]
[Kernels]
[timedt]
type = TimeDerivative
variable = power_density
[]
[diff]
type = Diffusion
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[BCs]
[left]
type = DirichletBC
variable = power_density
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = power_density
boundary = right
value = 1e3
[]
[]
[Postprocessors]
[pwr_avg]
type = ElementAverageValue
block = '0'
variable = power_density
execute_on = 'initial timestep_end'
[]
[temp_avg]
type = ElementAverageValue
variable = Tf
block = '0'
execute_on = 'initial timestep_end'
[]
[temp_max]
type = ElementExtremeValue
value_type = max
variable = Tf
block = '0'
execute_on = 'initial timestep_end'
[]
[temp_min]
type = ElementExtremeValue
value_type = min
variable = Tf
block = '0'
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 3
dt = 1.0
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-7
fixed_point_rel_tol = 1e-7
fixed_point_abs_tol = 1e-07
fixed_point_max_its = 4
line_search = none
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = restart_trans_with_sub_sub.i
execute_on = 'timestep_end'
[../]
[]
[Transfers]
[p_to_sub]
type = MultiAppShapeEvaluationTransfer
source_variable = power_density
variable = power_density
to_multi_app = sub
execute_on = 'timestep_end'
[]
[t_from_sub]
type = MultiAppShapeEvaluationTransfer
source_variable = temp
variable = Tf
from_multi_app = sub
execute_on = 'timestep_end'
[]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/domain_integral_thermal/j_integral_2d.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
file = crack2d.e
[]
[AuxVariables]
[./SED]
order = CONSTANT
family = MONOMIAL
[../]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./tempfunc]
type = ParsedFunction
expression = 10.0*(2*x/504)
[../]
[]
[DomainIntegral]
integrals = JIntegral
boundary = 800
crack_direction_method = CrackDirectionVector
crack_direction_vector = '1 0 0'
2d = true
axis_2d = 2
radius_inner = '60.0 80.0 100.0 120.0'
radius_outer = '80.0 100.0 120.0 140.0'
temperature = temp
incremental = true
eigenstrain_names = thermal_expansion
[]
[Physics/SolidMechanics/QuasiStatic]
[./master]
strain = FINITE
add_variables = true
incremental = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress'
planar_formulation = PLANE_STRAIN
eigenstrain_names = thermal_expansion
[../]
[]
[AuxKernels]
[./SED]
type = MaterialRealAux
variable = SED
property = strain_energy_density
execute_on = timestep_end
[../]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
block = 1
[../]
[]
[BCs]
[./crack_y]
type = DirichletBC
variable = disp_y
boundary = 100
value = 0.0
[../]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = 400
value = 0.0
[../]
[./no_x1]
type = DirichletBC
variable = disp_x
boundary = 900
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
[../]
[./elastic_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 0.0
thermal_expansion_coeff = 1.35e-5
temperature = temp
eigenstrain_name = thermal_expansion
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
line_search = 'none'
l_max_its = 50
nl_max_its = 40
nl_rel_step_tol= 1e-10
nl_rel_tol = 1e-10
start_time = 0.0
dt = 1
end_time = 1
num_steps = 1
[]
[Outputs]
file_base = j_integral_2d_out
exodus = true
[]
[Preconditioning]
[./smp]
type = SMP
pc_side = left
ksp_norm = preconditioned
full = true
[../]
[]
(test/tests/multiapps/restart/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 1
nx = 10
[]
[Functions]
[./u_fn]
type = ParsedFunction
expression = t*x
[../]
[./ffn]
type = ParsedFunction
expression = x
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[./fn]
type = BodyForce
variable = u
function = ffn
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = FunctionDirichletBC
variable = u
boundary = right
function = u_fn
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(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
[]
(test/tests/multiapps/restart/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
ymin = 0
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[Functions]
[v_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[]
[AuxVariables]
[v]
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[ufn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = v_fn
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
checkpoint = true
[]
[MultiApps]
[sub_app]
app_type = MooseTestApp
type = TransientMultiApp
input_files = 'sub.i'
execute_on = timestep_end
positions = '0 -1 0'
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[]
[]
(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/postprocessors/mms_sine/3_d_mms_sine_postprocessor_test.i)
#mms_sine_posprocessor_test.i
#This is for u = sin(a*x*y*z*t)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 4
ny = 4
nz = 4
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 1
elem_type = HEX8
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions] #Added so that we can use the Postprocessor
active = 'solution'
[./solution]
type = ParsedFunction
expression = sin(a*x*y*z*t)
symbol_names = 'a'
symbol_values = '3.141592653589793'
[../]
[]
[AuxVariables] #We added nodal AuxVariables
active = 'nodal_aux'
[./nodal_aux]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff implicit conv forcing reaction'
[./diff]
type = MMSDiffusion
variable = u
[../]
[./implicit] #We got from MOOSE kernels
type = MMSImplicitEuler
variable = u
[../]
[./conv] #We created our own convection kernel
type = MMSConvection
variable = u
x = -1
y = 2
z = -3
[../]
[./forcing] #We created our own forcing kernel
type = MMSForcing
variable = u
[../]
[./reaction] #We got from MOOSE kernels
type = MMSReaction
variable = u
[../]
[]
[AuxKernels] #We created our own AuxKernel
active = 'ConstantAux'
[./ConstantAux]
type = MMSConstantAux
variable = nodal_aux
[../]
[]
[BCs]
active = 'all_u'
[./all_u]
type = MMSCoupledDirichletBC
variable = u
boundary = '0 1 2 3 4 5'
# value = sin(a*x*y*z*t)
[../]
[]
[Executioner]
type = Transient
dt = .1
num_steps = 5
solve_type = 'PJFNK'
[]
[Postprocessors]
active = 'l2_error dofs'
[./l2_error]
type = ElementL2Error
variable = u
function = solution
execute_on = 'initial timestep_end'
[../]
[./dofs]
type = NumDOFs
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
file_base = 3_d_postprocessor_out
csv = true
[]
(test/tests/controls/bool_function_control/bool_function_control.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[Functions]
[solve_fn]
type = ParsedFunction
expression = 'if(t<0.3, 1, 0)'
[]
[]
[Variables]
[u]
initial_condition = 1
[]
[]
[Kernels]
[td]
type = TimeDerivative
variable = u
[]
[bf]
type = BodyForce
variable = u
function = 1
[]
[]
[Controls]
[solve_ctrl]
type = BoolFunctionControl
function = solve_fn
parameter = '*/*/solve'
execute_on = timestep_begin
[]
[]
[Postprocessors]
[./u_val]
type = ElementAverageValue
variable = u
execute_on = 'initial timestep_begin'
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/mms/lid-driven-skewed/hybrid-skewed-vortex.i)
rho=1
mu=1
[Mesh]
[gen_mesh]
type = FileMeshGenerator
file = skewed.msh
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen_mesh
[]
[]
[Variables]
[u]
family = MONOMIAL
order = SECOND
[]
[v]
family = MONOMIAL
order = SECOND
[]
[pressure][]
[]
[Kernels]
[momentum_x_convection]
type = ADConservativeAdvection
variable = u
velocity = 'velocity'
[]
[momentum_x_diffusion]
type = Diffusion
variable = u
[]
[momentum_x_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = u
pressure = pressure
component = 0
[]
[u_forcing]
type = BodyForce
variable = u
function = forcing_u
[]
[momentum_y_convection]
type = ADConservativeAdvection
variable = v
velocity = 'velocity'
[]
[momentum_y_diffusion]
type = Diffusion
variable = v
[]
[momentum_y_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = v
pressure = pressure
component = 1
[]
[v_forcing]
type = BodyForce
variable = v
function = forcing_v
[]
[mass]
type = ADConservativeAdvection
variable = pressure
velocity = velocity
advected_quantity = -1
[]
[]
[DGKernels]
[momentum_x_convection]
type = ADDGAdvection
variable = u
velocity = 'velocity'
[]
[momentum_x_diffusion]
type = DGDiffusion
variable = u
sigma = 6
epsilon = -1
[]
[momentum_y_convection]
type = ADDGAdvection
variable = v
velocity = 'velocity'
[]
[momentum_y_diffusion]
type = DGDiffusion
variable = v
sigma = 6
epsilon = -1
[]
[]
[BCs]
[u_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right top'
variable = u
sigma = 6
epsilon = -1
function = exact_u
[]
[v_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right top'
variable = v
sigma = 6
epsilon = -1
function = exact_v
[]
[pressure_pin]
type = FunctionDirichletBC
variable = pressure
boundary = 'pinned_node'
function = 'exact_p'
[]
[]
[Materials]
[rho]
type = ADGenericConstantMaterial
prop_names = 'rho'
prop_values = '${rho}'
[]
[vel]
type = ADVectorFromComponentVariablesMaterial
vector_prop_name = 'velocity'
u = u
v = v
[]
[rhou]
type = ADParsedMaterial
property_name = 'rhou'
coupled_variables = 'u'
material_property_names = 'rho'
expression = 'rho*u'
[]
[rhov]
type = ADParsedMaterial
property_name = 'rhov'
coupled_variables = 'v'
material_property_names = 'rho'
expression = 'rho*v'
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'x^2*(1-x)^2*(2*y-6*y^2+4*y^3)'
[]
[exact_v]
type = ParsedFunction
expression = '-y^2*(1-y)^2*(2*x-6*x^2+4*x^3)'
[]
[exact_p]
type = ParsedFunction
expression = 'x*(1-x)-2/12'
[]
[forcing_u]
type = ParsedFunction
expression = '-4*mu/rho*(-1+2*y)*(y^2-6*x*y^2+6*x^2*y^2-y+6*x*y-6*x^2*y+3*x^2-6*x^3+3*x^4)+1-2*x+4*x^3'
'*y^2*(2*y^2-2*y+1)*(y-1)^2*(-1+2*x)*(x-1)^3'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[forcing_v]
type = ParsedFunction
expression = '4*mu/rho*(-1+2*x)*(x^2-6*y*x^2+6*x^2*y^2-x+6*x*y-6*x*y^2+3*y^2-6*y^3+3*y^4)+4*y^3*x^2*(2'
'*x^2-2*x+1)*(x-1)^2*(-1+2*y)*(y-1)^3'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO mumps'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2Error
variable = u
function = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2v]
variable = v
function = exact_v
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
variable = pressure
function = exact_p
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(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/thermal_hydraulics/test/tests/utils/smooth_transition/ad_smooth_transition.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = -2
xmax = 2
[]
[Variables]
[u]
[]
[]
[ICs]
[u_ic]
type = FunctionIC
variable = u
function = u_ic_fn
[]
[]
[Functions]
[u_ic_fn]
type = ParsedFunction
expression = 'x'
[]
[]
[Materials]
[test_mat]
type = ADSmoothTransitionTestMaterial
transition_type = weighted
var = u
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[VectorPostprocessors]
[test_vpp]
type = ADSampler1DReal
block = 0
property = myadmatprop
sort_by = x
execute_on = 'INITIAL'
[]
[]
[Outputs]
csv = true
file_base = 'ad_weighted'
execute_on = 'INITIAL'
[]
(test/tests/userobjects/element_subdomain_modifier/amr_bc.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 16
ny = 16
[]
[left]
type = SubdomainBoundingBoxGenerator
input = 'gen'
block_id = 1
bottom_left = '-1 -1 0'
top_right = '0 1 1'
[]
[right]
type = SubdomainBoundingBoxGenerator
input = 'left'
block_id = 2
bottom_left = '0 -1 0'
top_right = '1 1 1'
[]
[moving_boundary]
type = SideSetsAroundSubdomainGenerator
input = 'right'
block = 1
new_boundary = 'moving_boundary'
normal = '1 0 0'
[]
[]
[UserObjects]
[moving_circle]
type = CoupledVarThresholdElementSubdomainModifier
coupled_var = 'phi'
block = 2
criterion_type = ABOVE
threshold = 0.5
subdomain_id = 1
moving_boundary_name = moving_boundary
execute_on = 'TIMESTEP_BEGIN'
[]
[]
[Functions]
[moving_gauss]
type = ParsedFunction
value = 'exp(-((x+0.5-t)^2+(y)^2)/0.25)'
[]
[]
[AuxVariables]
[phi]
[]
[]
[AuxKernels]
[phi]
type = FunctionAux
variable = phi
function = moving_gauss
execute_on = 'INITIAL TIMESTEP_BEGIN TIMESTEP_END'
[]
[]
[Adaptivity]
steps = 1
marker = marker
initial_marker = marker
max_h_level = 1
[Indicators/indicator]
type = GradientJumpIndicator
variable = phi
[]
[Markers]
[efm]
type = ErrorFractionMarker
indicator = indicator
coarsen = 0.2
refine = 0.5
[]
[marker]
type = BoundaryPreservedMarker
preserved_boundary = moving_boundary
marker = 'efm'
[]
[]
[]
[Variables]
[u][]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
active = 'mbc leftright'
[mbc]
type = DirichletBC
variable = u
boundary = moving_boundary
value = 1
[]
[nbc]
type = NeumannBC
variable = u
boundary = moving_boundary
value = 10
[]
[leftright]
type = DirichletBC
variable = u
boundary = 'left right'
value = 0
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 5
[]
[Outputs]
exodus = true
[]
(test/tests/mortar/continuity-3d-non-conforming/continuity_penalty_sphere_hex.i)
[Mesh]
second_order = false
[file]
type = FileMeshGenerator
file = spheres_hex8.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
new_block_id = 11
new_block_name = "secondary"
sidesets = '101'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
new_block_id = 12
new_block_name = "primary"
sidesets = '102'
[]
uniform_refine = 0
[]
[Problem]
error_on_jacobian_nonzero_reallocation = true
[]
[Variables]
[T]
block = '1 2'
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln_primal
variable = T
boundary = '1 2'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = 'x^2 + y^2 + z^2 - 6'
[]
[exact_soln_primal]
type = ParsedFunction
expression = 'x^2 + y^2 + z^2'
[]
[exact_soln_lambda]
type = ParsedFunction
expression = '4'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = PenaltyEqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = '12'
secondary_subdomain = '11'
secondary_variable = T
correct_edge_dropping = true
penalty_value = 1.e5
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 6'
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = '1 2'
[]
[h]
type = AverageElementSize
block = '1 2'
[]
[]
(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/heat_transfer/test/tests/code_verification/spherical_test_no1.i)
# Problem III.1
#
# A spherical shell has a constant thermal conductivity k and internal
# heat generation q. It has inner radius ri and outer radius ro.
# Both surfaces are exposed to constant temperatures: u(ri) = ui and u(ro) = uo.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
xmin = 0.2
nx = 4
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Problem]
coord_type = RSPHERICAL
[]
[Functions]
[./exact]
type = ParsedFunction
symbol_names = 'ri ro ui uo'
symbol_values = '0.2 1.0 300 0'
expression = '( uo * (1/ri-1/x) - ui * (1/ro-1/x)) / (1/ri-1/ro)'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[]
[BCs]
[./ui]
type = DirichletBC
boundary = left
variable = u
value = 300
[../]
[./uo]
type = DirichletBC
boundary = right
variable = u
value = 0
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1.0 1.0 5.0'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = true
[]
(modules/xfem/test/tests/moving_interface/moving_bimaterial_finite_strain_cut_mesh.i)
# This test is for two layer materials with different youngs modulus with AD
# The global stress is determined by switching the stress based on level set values
# The material interface is marked by a level set function
# The two layer materials are glued together
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[XFEM]
output_cut_plane = true
[]
[UserObjects]
[cut]
type = InterfaceMeshCut2DUserObject
mesh_file = line.e
interface_velocity_function = -1
heal_always = true
[]
[]
[Mesh]
use_displaced_mesh = true
[generated_mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin = 0
xmax = 5
ymin = 0
ymax = 5
elem_type = QUAD4
[]
[left_bottom]
type = ExtraNodesetGenerator
new_boundary = 'left_bottom'
coord = '0 0'
input = generated_mesh
[]
[left_top]
type = ExtraNodesetGenerator
new_boundary = 'left_top'
coord = '0 5'
input = left_bottom
[]
[]
# [Functions]
# [ls_func]
# type = ParsedFunction
# expression = 'y-2.73+t'
# []
# []
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[ls]
[]
[a_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[a_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[a_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[b_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[b_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[b_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
# [ls_function]
# type = FunctionAux
# variable = ls
# function = ls_func
# []
[a_strain_xx]
type = RankTwoAux
variable = a_strain_xx
rank_two_tensor = A_total_strain
index_i = 0
index_j = 0
[]
[a_strain_yy]
type = RankTwoAux
variable = a_strain_yy
rank_two_tensor = A_total_strain
index_i = 1
index_j = 1
[]
[a_strain_xy]
type = RankTwoAux
variable = a_strain_xy
rank_two_tensor = A_total_strain
index_i = 0
index_j = 1
[]
[b_strain_xx]
type = RankTwoAux
variable = b_strain_xx
rank_two_tensor = B_total_strain
index_i = 0
index_j = 0
[]
[b_strain_yy]
type = RankTwoAux
variable = b_strain_yy
rank_two_tensor = B_total_strain
index_i = 1
index_j = 1
[]
[b_strain_xy]
type = RankTwoAux
variable = b_strain_xy
rank_two_tensor = B_total_strain
index_i = 0
index_j = 1
[]
[stress_xx]
type = RankTwoAux
variable = stress_xx
rank_two_tensor = stress
index_i = 0
index_j = 0
[]
[stress_xy]
type = RankTwoAux
variable = stress_xy
rank_two_tensor = stress
index_i = 0
index_j = 1
[]
[stress_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = stress
index_i = 1
index_j = 1
[]
[]
[Kernels]
[solid_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
use_displaced_mesh = true
[]
[solid_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
use_displaced_mesh = true
[]
[]
[Constraints]
[dispx_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_x
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[]
[dispy_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_y
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[]
[]
[BCs]
[bottomx]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[]
[bottomy]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[]
[topx]
type = FunctionDirichletBC
boundary = top
variable = disp_x
function = 0.03*t
[]
[topy]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = '0.03*t'
[]
[]
[Materials]
[elasticity_tensor_A]
type = ComputeIsotropicElasticityTensor
base_name = A
youngs_modulus = 1e9
poissons_ratio = 0.3
[]
[strain_A]
type = ComputeFiniteStrain
base_name = A
[]
[stress_A]
type = ComputeFiniteStrainElasticStress
base_name = A
[]
[elasticity_tensor_B]
type = ComputeIsotropicElasticityTensor
base_name = B
youngs_modulus = 1e7
poissons_ratio = 0.3
[]
[strain_B]
type = ComputeFiniteStrain
base_name = B
[]
[stress_B]
type = ComputeFiniteStrainElasticStress
base_name = B
[]
[combined_stress]
type = LevelSetBiMaterialRankTwo
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = stress
[]
[combined_jacob_mult]
type = LevelSetBiMaterialRankFour
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = Jacobian_mult
[]
[]
[Postprocessors]
[disp_x_norm]
type = ElementL2Norm
variable = disp_x
[]
[disp_y_norm]
type = ElementL2Norm
variable = disp_y
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-13
nl_abs_tol = 1e-50
# time control
start_time = 0.0
dt = 0.1
num_steps = 4
max_xfem_update = 1
[]
[Outputs]
print_linear_residuals = false
exodus = true
[]
(modules/heat_transfer/test/tests/heat_conduction/3d_quadrature_gap_heat_transfer/moving.i)
[Mesh]
file = nonmatching.e
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[temp]
[]
[]
[AuxVariables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Functions]
[disp_y]
type = ParsedFunction
expression = 0.1*t
[]
[left_temp]
type = ParsedFunction
expression = 1000+t
[]
[]
[Kernels]
[hc]
type = HeatConduction
variable = temp
[]
[]
[AuxKernels]
[disp_y]
type = FunctionAux
variable = disp_y
function = disp_y
block = left
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[BCs]
[left]
type = FunctionDirichletBC
variable = temp
boundary = leftleft
function = left_temp
[]
[right]
type = DirichletBC
variable = temp
boundary = rightright
value = 400
[]
[]
[ThermalContact]
[left_to_right]
type = GapHeatTransfer
variable = temp
primary = rightleft
secondary = leftright
emissivity_primary = 0
emissivity_secondary = 0
quadrature = true
[]
[]
[Materials]
[hcm]
type = HeatConductionMaterial
block = 'left right'
specific_heat = 1
thermal_conductivity = 1
use_displaced_mesh = true
[]
[]
[Postprocessors]
[left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = leftright
diffusivity = thermal_conductivity
[]
[right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = rightleft
diffusivity = thermal_conductivity
[]
[]
[Executioner]
type = Transient
num_steps = 9
dt = 1
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/thermal_expansion_function/small_const.i)
# This tests the thermal expansion coefficient function using both
# options to specify that function: mean and instantaneous. There
# two blocks, each containing a single element, and these use the
# two variants of the function.
# In this test, the instantaneous CTE function has a constant value,
# while the mean CTE function is an analytic function designed to
# give the same response. If \bar{alpha}(T) is the mean CTE function,
# and \alpha(T) is the instantaneous CTE function,
# \bar{\alpha}(T) = 1/(T-Tref) \intA^{T}_{Tsf} \alpha(T) dT
# where Tref is the reference temperature used to define the mean CTE
# function, and Tsf is the stress-free temperature.
# This version of the test uses small deformation theory. The results
# from the two models are identical.
[Mesh]
file = 'blocks.e'
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = SMALL
add_variables = true
eigenstrain_names = eigenstrain
generate_output = 'strain_xx strain_yy strain_zz'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = disp_x
boundary = 3
value = 0.0
[../]
[./bottom]
type = DirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[./back]
type = DirichletBC
variable = disp_z
boundary = 1
value = 0.0
[../]
[]
[AuxKernels]
[./temp]
type = FunctionAux
variable = temp
block = '1 2'
function = temp_func
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeLinearElasticStress
[../]
[./thermal_expansion_strain1]
type = ComputeMeanThermalExpansionFunctionEigenstrain
block = 1
thermal_expansion_function = cte_func_mean
thermal_expansion_function_reference_temperature = 0.5
stress_free_temperature = 0.0
temperature = temp
eigenstrain_name = eigenstrain
[../]
[./thermal_expansion_strain2]
type = ComputeInstantaneousThermalExpansionFunctionEigenstrain
block = 2
thermal_expansion_function = cte_func_inst
stress_free_temperature = 0.0
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Functions]
[./cte_func_mean]
type = ParsedFunction
symbol_names = 'tsf tref scale' #stress free temp, reference temp, scale factor
symbol_values = '0.0 0.5 1e-4'
expression = 'scale * (t - tsf) / (t - tref)'
[../]
[./cte_func_inst]
type = PiecewiseLinear
xy_data = '0 1.0
2 1.0'
scale_factor = 1e-4
[../]
[./temp_func]
type = PiecewiseLinear
xy_data = '0 1
1 2'
[../]
[]
[Postprocessors]
[./disp_1]
type = NodalExtremeValue
variable = disp_x
boundary = 101
[../]
[./disp_2]
type = NodalExtremeValue
variable = disp_x
boundary = 102
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
l_max_its = 100
l_tol = 1e-4
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
start_time = 0.0
end_time = 1.0
dt = 0.1
[]
[Outputs]
csv = true
[]
(test/tests/postprocessors/element_time_derivative/element_time_derivative_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
# dudt = 3*t^2*(x^2 + y^2)
type = ParsedFunction
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./forcing_fn2]
# dudt = 3*t^2*(x^2 + y^2)
type = ParsedFunction
expression = t*x*y
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn2
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./elementAvgTimeDerivative]
type = ElementAverageTimeDerivative
variable = u
[../]
[./elementAvgValue]
type = ElementAverageValue
variable = u
[../]
[]
[Executioner]
type = Transient
scheme = implicit-euler
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_elm_time_deriv
csv = true
[]
(modules/richards/test/tests/buckley_leverett/bl22_lumped_fu.i)
# two-phase version
# super-sharp front version
[Mesh]
type = GeneratedMesh
dim = 1
nx = 150
xmin = 0
xmax = 15
[]
[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-4 1E-3 1E-2 2E-2 5E-2 6E-2 0.1 0.2'
x = '0 1E-2 1E-1 1 5 20 40 41'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E6
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 2E6
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1E-4
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1E-4
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./SatWater]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SatGas]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGwater]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[./SUPGgas]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[./bounds_dummy]
[../]
[]
[Kernels]
active = 'richardsfwater richardstwater richardsfgas richardstgas'
[./richardstwater]
type = RichardsLumpedMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFullyUpwindFlux
variable = pwater
[../]
[./richardstgas]
type = RichardsLumpedMassChange
variable = pgas
[../]
[./richardsfgas]
type = RichardsFullyUpwindFlux
variable = pgas
[../]
[./richardsppenalty]
type = RichardsPPenalty
variable = pgas
a = 1E-18
lower_var = pwater
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = SeffWater
pressure_vars = 'pwater pgas'
[../]
[]
[ICs]
[./water_ic]
type = FunctionIC
variable = pwater
function = initial_water
[../]
[./gas_ic]
type = FunctionIC
variable = pgas
function = initial_gas
[../]
[]
[BCs]
[./left_w]
type = DirichletBC
variable = pwater
boundary = left
value = 1E6
[../]
[./left_g]
type = DirichletBC
variable = pgas
boundary = left
value = 1000
[../]
[./right_w]
type = DirichletBC
variable = pwater
boundary = right
value = -100000
[../]
[./right_g]
type = DirichletBC
variable = pgas
boundary = right
value = 0
[../]
[]
[Functions]
[./initial_water]
type = ParsedFunction
expression = 1000000*(1-min(x/5,1))-if(x<5,0,100000)
[../]
[./initial_gas]
type = ParsedFunction
expression = 1000
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.15
mat_permeability = '1E-10 0 0 0 1E-10 0 0 0 1E-10'
viscosity = '1E-3 1E-6'
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./standard]
type = SMP
full = true
petsc_options = '-snes_converged_reason -ksp_diagonal_scale -ksp_diagonal_scale_fix -ksp_gmres_modifiedgramschmidt'
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap -snes_atol -snes_rtol -snes_max_it -ksp_rtol -ksp_atol'
petsc_options_value = 'gmres asm lu NONZERO 2 1E-10 1E-10 20 1E-10 1E-100'
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 50
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = bl22_lumped_fu
[./exodus]
type = Exodus
time_step_interval = 100000
hide = 'pgas bounds_dummy'
execute_on = 'initial final timestep_end'
[../]
[]
(modules/xfem/test/tests/nucleation_uo/nucleate_edge_crack_2d.i)
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[XFEM]
geometric_cut_userobjects = 'cut_mesh2'
qrule = volfrac
output_cut_plane = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
xmin = 0
xmax = 2
ymin = 0.0
ymax = 1.0
elem_type = QUAD4
[]
[top_left]
type = BoundingBoxNodeSetGenerator
new_boundary = pull_top_left
bottom_left = '-0.01 0.99 0'
top_right = '0.11 1.01 0'
input = gen
[]
[top_right]
type = BoundingBoxNodeSetGenerator
new_boundary = pull_top_right
bottom_left = '1.89 0.99 0'
top_right = '2.01 1.01 0'
input = top_left
[]
[top_middle_ss]
type = SideSetsFromBoundingBoxGenerator
input = top_right
bottom_left = '0.79 0.89 0'
top_right = '1.21 1.01 0'
block_id = '0'
boundary_new = top_middle_ss
boundaries_old = top
[]
[nucleate]
type = ParsedSubdomainMeshGenerator
input = top_middle_ss
combinatorial_geometry = 'y > 0.39 & y < 0.51'
block_id = 10
[]
[]
[DomainIntegral]
integrals = 'InteractionIntegralKI InteractionIntegralKII'
displacements = 'disp_x disp_y'
crack_front_points_provider = cut_mesh2
2d=true
number_points_from_provider = 0
crack_direction_method = CurvedCrackFront
radius_inner = '0.15'
radius_outer = '0.45'
poissons_ratio = 0.3
youngs_modulus = 207000
block = 0
incremental = true
used_by_xfem_to_grow_crack = true
[]
[UserObjects]
[nucleate]
type = MeshCut2DRankTwoTensorNucleation
tensor = stress
scalar_type = MaxPrincipal
nucleation_threshold = nucleation_threshold
initiate_on_boundary = 'left right'
nucleation_length = .2
[]
[cut_mesh2]
type = MeshCut2DFractureUserObject
mesh_file = make_edge_crack_in.e
k_critical=230
growth_increment = 0.11
nucleate_uo = nucleate
[]
[]
[AuxVariables]
[nucleation_threshold]
order = CONSTANT
family = MONOMIAL
[]
[]
[ICs]
[nucleation_bulk]
type = ConstantIC
value = 10000
variable = nucleation_threshold
block = 0
[]
[nucleation_weak]
type = FunctionIC
function = nucleation_x
variable = nucleation_threshold
block = 10
[]
[]
[Functions]
[nucleation_x]
type = ParsedFunction
expression = '300+x*50'
[]
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
planar_formulation = plane_strain
add_variables = true
generate_output = 'stress_xx stress_yy vonmises_stress max_principal_stress'
[../]
[]
[Functions]
[bc_pull_top]
type = ParsedFunction
expression = 0.0005*t
[]
[]
[BCs]
[top_edges]
type = FunctionDirichletBC
boundary = 'pull_top_left pull_top_right'
variable = disp_y
function = bc_pull_top
[]
[top_middle]
type = NeumannBC
boundary = top_middle_ss
variable = disp_y
value = -2000
[]
[bottom_x]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[]
[bottom_y]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
line_search = 'none'
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
# controls for linear iterations
l_max_its = 100
l_tol = 1e-2
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
# time control
start_time = 0.0
dt = 1.0
end_time = 5
max_xfem_update = 100
[]
[Outputs]
csv=true
execute_on = TIMESTEP_END
# [xfemcutter]
# type=XFEMCutMeshOutput
# xfem_cutter_uo=cut_mesh2
# []
# console = false
[./console]
type = Console
output_linear = false
output_nonlinear = false
[../]
[]
(test/tests/transfers/multiapp_copy_transfer/linear_sys_to_aux/linear_sub.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 10
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = coeff_func
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "left right"
functor = analytic_solution
[]
[]
[Functions]
[coeff_func]
type = ParsedFunction
expression = '0.5*x'
[]
[source_func]
type = ParsedFunction
expression = '2*x'
[]
[analytic_solution]
type = ParsedFunction
expression = '1-x*x'
[]
[]
[Executioner]
type = LinearPicardSteady
linear_systems_to_solve = u_sys
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
execute_on = TIMESTEP_END
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_no_parts.i)
[GlobalParams]
integrate_p_by_parts = false
viscous_form = 'traction'
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = Newton
[../]
[]
[Executioner]
type = Transient
dt = 0.005
dtmin = 0.005
num_steps = 5
l_max_its = 100
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[AuxVariables]
[./vel_x]
# Velocity in radial (r) direction
family = LAGRANGE
order = SECOND
[../]
[./vel_y]
# Velocity in axial (z) direction
family = LAGRANGE
order = SECOND
[../]
[]
[AuxKernels]
[vel_x]
type = VectorVariableComponentAux
variable = vel_x
vector_variable = velocity
component = 'x'
[]
[vel_y]
type = VectorVariableComponentAux
variable = vel_y
vector_variable = velocity
component = 'y'
[]
[]
[Variables]
[velocity]
family = LAGRANGE_VEC
order = SECOND
[]
[./p]
family = LAGRANGE
order = FIRST
[../]
[]
[BCs]
[./p_corner]
# This is required because of the no bcs
type = DirichletBC
boundary = top_right
value = 0
variable = p
[../]
[./velocity_out]
type = INSADMomentumNoBCBC
boundary = top
variable = velocity
pressure = p
[../]
[./velocity_in]
type = VectorFunctionDirichletBC
boundary = bottom
variable = velocity
function_x = 0
function_y = 'inlet_func'
[../]
[./wall]
type = VectorFunctionDirichletBC
boundary = 'right'
variable = velocity
function_x = 0
function_y = 0
[../]
[./axis]
type = ADVectorFunctionDirichletBC
boundary = 'left'
variable = velocity
set_y_comp = false
function_x = 0
[../]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./momentum_time]
type = INSADMomentumTimeDerivative
variable = velocity
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADMaterial
velocity = velocity
pressure = p
[]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
outputs = 'console' execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
outputs = 'console' execute_on = 'timestep_end'
[../]
[]
(test/tests/adaptivity/max_h_level/max_h_level.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1
solve_type = PJFNK
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 2
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Outputs]
execute_on = 'timestep_end'
[./out]
type = Exodus
execute_scalars_on = none
[../]
[]
(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/userobjects/coupling_to_kernel/user_object_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 5
ny = 5
elem_type = QUAD4
[]
[UserObjects]
[./ud]
type = MTUserObject
scalar = 2
vector = '9 7 5'
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = -2
[../]
[./exact_fn]
type = ParsedFunction
expression = x*x
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = FIRST
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
# this kernel will user user data object from above
[./ffn]
type = UserObjectKernel
variable = u
user_object = ud
[]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
function = exact_fn
boundary = '0 1 2 3'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out
exodus = true
[]
(test/tests/postprocessors/pps_interval/pps_bad_interval3.i)
[Mesh]
file = square-2x2-nodeids.e
# This test can only be run with renumering disabled, so the
# NodalVariableValue postprocessor's node id is well-defined.
allow_renumbering = false
[]
[Variables]
active = 'u v'
[./u]
order = SECOND
family = LAGRANGE
[../]
[./v]
order = SECOND
family = LAGRANGE
[../]
[]
[Functions]
active = 'force_fn exact_fn left_bc'
[./force_fn]
type = ParsedFunction
expression = '1-x*x+2*t'
[../]
[./exact_fn]
type = ParsedFunction
expression = '(1-x*x)*t'
[../]
[./left_bc]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
active = '
time_u diff_u ffn_u
time_v diff_v'
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'all_u left_v right_v'
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = exact_fn
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '2'
value = 0
[../]
[]
[Postprocessors]
active = 'l2 node1 node4'
[./l2]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./node1]
type = NodalVariableValue
variable = u
nodeid = 15
[../]
[./node4]
type = NodalVariableValue
variable = v
nodeid = 10
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = ignore_bad
time_step_interval = 2
exodus = true
[]
(test/tests/time_integrators/bdf2/bdf2.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 20
ny = 20
elem_type = QUAD9
[]
[Variables]
active = 'u'
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0.0
num_steps = 5
dt = 0.25
# [./Adaptivity]
# refine_fraction = 0.2
# coarsen_fraction = 0.3
# max_h_level = 4
# [../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/auxkernels/diffusion_flux/normal_diffusion_flux.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 1.0
ymax = 1.0
[]
[Variables]
[./dummy]
[../]
[]
[AuxVariables]
[./T]
[../]
[./flux_n]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./T]
type = ParsedFunction
expression = 'x*x*y*y+1'
[../]
[]
[ICs]
[./T]
type = FunctionIC
variable = T
function = T
[../]
[]
[Kernels]
[./dummy]
type = Diffusion
variable = dummy
[../]
[]
[AuxKernels]
[./flux_n]
type = DiffusionFluxAux
diffusivity = 'thermal_conductivity'
variable = flux_n
diffusion_variable = T
component = normal
boundary = 'left right'
check_boundary_restricted = false
[../]
[]
[Materials]
[./k]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '10'
[../]
[]
[Postprocessors]
[flux_right]
type = SideIntegralVariablePostprocessor
variable = flux_n
boundary = 'right'
[]
[flux_right_exact]
type = SideFluxIntegral
variable = T
diffusivity = 'thermal_conductivity'
boundary = 'right'
[]
[flux_left]
type = SideIntegralVariablePostprocessor
variable = flux_n
boundary = 'left'
[]
[flux_left_exact]
type = SideFluxIntegral
variable = T
diffusivity = 'thermal_conductivity'
boundary = 'left'
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_rel_tol = 1e-12
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
hide = 'dummy'
[]
(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
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/user_object_based/patch_recovery.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
displacements = 'ux uy'
[]
[Variables]
[ux]
[]
[uy]
[]
[]
[AuxVariables]
[stress_xx_recovered]
order = FIRST
family = LAGRANGE
[]
[stress_yy_recovered]
order = FIRST
family = LAGRANGE
[]
[]
[Functions]
[tdisp]
type = ParsedFunction
expression = 0.01*t
[]
[]
[Kernels]
[SolidMechanics]
displacements = 'ux uy'
use_displaced_mesh = true
[]
[]
[AuxKernels]
[stress_xx_recovered]
type = NodalPatchRecoveryAux
variable = stress_xx_recovered
nodal_patch_recovery_uo = stress_xx_patch
execute_on = 'TIMESTEP_END'
[]
[stress_yy_recovered]
type = NodalPatchRecoveryAux
variable = stress_yy_recovered
nodal_patch_recovery_uo = stress_yy_patch
execute_on = 'TIMESTEP_END'
[]
[]
[BCs]
[symmy]
type = DirichletBC
variable = uy
boundary = bottom
value = 0
[]
[symmx]
type = DirichletBC
variable = ux
boundary = left
value = 0
[]
[tdisp]
type = FunctionDirichletBC
variable = uy
boundary = top
function = tdisp
[]
[]
[UserObjects]
[slip_rate_gss]
type = CrystalPlasticitySlipRateGSS
variable_size = 12
slip_sys_file_name = input_slip_sys.txt
num_slip_sys_flowrate_props = 2
flowprops = '1 4 0.001 0.1 5 8 0.001 0.1 9 12 0.001 0.1'
uo_state_var_name = state_var_gss
[]
[slip_resistance_gss]
type = CrystalPlasticitySlipResistanceGSS
variable_size = 12
uo_state_var_name = state_var_gss
[]
[state_var_gss]
type = CrystalPlasticityStateVariable
variable_size = 12
groups = '0 4 8 12'
group_values = '60.8 60.8 60.8'
uo_state_var_evol_rate_comp_name = state_var_evol_rate_comp_gss
scale_factor = 1.0
[]
[state_var_evol_rate_comp_gss]
type = CrystalPlasticityStateVarRateComponentGSS
variable_size = 12
hprops = '1.0 541.5 109.8 2.5'
uo_slip_rate_name = slip_rate_gss
uo_state_var_name = state_var_gss
[]
[stress_xx_patch]
type = NodalPatchRecoveryMaterialProperty
patch_polynomial_order = FIRST
property = 'stress'
component = '0 0'
execute_on = 'TIMESTEP_END'
[]
[stress_yy_patch]
type = NodalPatchRecoveryMaterialProperty
patch_polynomial_order = FIRST
property = 'stress'
component = '1 1'
execute_on = 'TIMESTEP_END'
[]
[]
[Materials]
[crysp]
type = FiniteStrainUObasedCP
stol = 1e-2
tan_mod_type = exact
uo_slip_rates = 'slip_rate_gss'
uo_slip_resistances = 'slip_resistance_gss'
uo_state_vars = 'state_var_gss'
uo_state_var_evol_rate_comps = 'state_var_evol_rate_comp_gss'
[]
[strain]
type = ComputeFiniteStrain
displacements = 'ux uy'
[]
[elasticity_tensor]
type = ComputeElasticityTensorCP
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
dt = 0.05
solve_type = 'PJFNK'
petsc_options_iname = -pc_hypre_type
petsc_options_value = boomerang
nl_abs_tol = 1e-10
nl_rel_step_tol = 1e-10
dtmax = 10.0
nl_rel_tol = 1e-10
end_time = 1
dtmin = 0.05
num_steps = 10
nl_abs_step_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/thermal_expansion/ad_constant_expansion_coeff_old.i)
# This test involves only thermal expansion strains on a 2x2x2 cube of approximate
# steel material. An initial temperature of 25 degrees C is given for the material,
# and an auxkernel is used to calculate the temperature in the entire cube to
# raise the temperature each time step. After the first timestep,in which the
# temperature jumps, the temperature increases by 6.25C each timestep.
# The thermal strain increment should therefore be
# 6.25 C * 1.3e-5 1/C = 8.125e-5 m/m.
# This test is also designed to be used to identify problems with restart files
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./temp]
[../]
[]
[Functions]
[./temperature_load]
type = ParsedFunction
expression = t*(500.0)+300.0
[../]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[./all]
strain = SMALL
incremental = true
add_variables = true
eigenstrain_names = eigenstrain
generate_output = 'strain_xx strain_yy strain_zz'
use_automatic_differentiation = true
[../]
[../]
[../]
[]
[Kernels]
[./tempfuncaux]
type = Diffusion
variable = temp
[../]
[]
[BCs]
[./x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./z_bot]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[./temp]
type = FunctionDirichletBC
variable = temp
function = temperature_load
boundary = 'left right'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./small_stress]
type = ADComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain]
type = ADComputeThermalExpansionEigenstrain
stress_free_temperature = 298
thermal_expansion_coeff = 1.3e-5
temperature = temp
eigenstrain_name = eigenstrain
use_old_temperature = true
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
end_time = 0.075
dt = 0.0125
dtmin = 0.0001
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[./strain_xx]
type = ElementAverageValue
variable = strain_xx
[../]
[./strain_yy]
type = ElementAverageValue
variable = strain_yy
[../]
[./strain_zz]
type = ElementAverageValue
variable = strain_zz
[../]
[./temperature]
type = AverageNodalVariableValue
variable = temp
[../]
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/phy.conservation.i)
# Testing energy conservation with fluid at rest
P_hf = ${fparse 0.6 * sin (pi/24)}
[GlobalParams]
gravity_vector = '0 0 0'
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
block = 'blk:0'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1000 100 30'
[]
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[T_init]
type = ParsedFunction
expression = '1000*y+300+30*z'
[]
[]
[Components]
[in1]
type = SolidWall1Phase
input = 'fch1:in'
[]
[fch1]
type = FlowChannel1Phase
position = '0.15 0 0'
orientation = '0 0 1'
fp = fp
n_elems = 10
length = 1
initial_T = 300
initial_p = 1.01e5
initial_vel = 0
closures = simple_closures
A = 0.00314159
f = 0.0
[]
[out1]
type = SolidWall1Phase
input = 'fch1:out'
[]
[in2]
type = SolidWall1Phase
input = 'fch2:in'
[]
[fch2]
type = FlowChannel1Phase
position = '0 0.15 0'
orientation = '0 0 1'
fp = fp
n_elems = 10
length = 1
initial_T = 350
initial_p = 1.01e5
initial_vel = 0
closures = simple_closures
A = 0.00314159
f = 0.0
[]
[out2]
type = SolidWall1Phase
input = 'fch2:out'
[]
[blk]
type = HeatStructureFromFile3D
file = mesh.e
position = '0 0 0'
initial_T = T_init
[]
[ht]
type = HeatTransferFromHeatStructure3D1Phase
flow_channels = 'fch1 fch2'
hs = blk
boundary = blk:rmin
Hw = 10000
P_hf = ${P_hf}
[]
[]
[Postprocessors]
[energy_hs]
type = ADHeatStructureEnergy3D
block = blk:0
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_fch1]
type = ElementIntegralVariablePostprocessor
block = fch1
variable = rhoEA
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_fch2]
type = ElementIntegralVariablePostprocessor
block = fch2
variable = rhoEA
execute_on = 'INITIAL TIMESTEP_END'
[]
[total_energy]
type = SumPostprocessor
values = 'energy_fch1 energy_fch2 energy_hs'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = total_energy
compute_relative_change = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 0.1
num_steps = 10
solve_type = NEWTON
line_search = basic
abort_on_solve_fail = true
nl_abs_tol = 1e-8
[]
[Outputs]
file_base = 'phy.conservation'
[csv]
type = CSV
show = 'energy_change'
execute_on = 'FINAL'
[]
[]
(test/tests/auxkernels/linear_combination/test.i)
# All tested logic is in the aux system
# The non-linear problem is unrelated
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -1
xmax = 1
nx = 10
[]
[Functions]
[./v1_func]
type = ParsedFunction
expression = (1-x)/2
[../]
[./v2_func]
type = ParsedFunction
expression = (1+x)/2
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./lc]
[../]
[./v1]
[../]
[./v2]
[../]
[./w1]
[../]
[./w2]
[../]
[]
[ICs]
[./v1_ic]
type = FunctionIC
variable = v1
function = v1_func
[../]
[./v2_ic]
type = FunctionIC
variable = v2
function = v2_func
[../]
[./w1_ic]
type = ConstantIC
variable = w1
value = 0.3
[../]
[./w2_ic]
type = ConstantIC
variable = w2
value = 0.5
[../]
[]
[AuxKernels]
[./lc-aux]
type = ParsedAux
variable = lc
expression = 'v1*w1+v2*w2'
coupled_variables = 'v1 w1 v2 w2'
execute_on = 'timestep_end'
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 2
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
[./out]
type = Exodus
[../]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/boussinesq/wcnsfv.i)
mu = 1
rho = 'rho'
k = 1
cp = 1
alpha = 1
velocity_interp_method = 'rc'
advected_interp_method = 'average'
# rayleigh=1e3
cold_temp=300
hot_temp=310
[GlobalParams]
two_term_boundary_expansion = true
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
[]
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
nx = 64
ny = 64
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 1e-15
[]
[v]
type = INSFVVelocityVariable
initial_condition = 1e-15
[]
[pressure]
type = INSFVPressureVariable
initial_condition = 1e5
[]
[T]
type = INSFVEnergyVariable
scaling = 1e-4
initial_condition = ${cold_temp}
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[AuxVariables]
[U]
order = CONSTANT
family = MONOMIAL
fv = true
[]
[vel_x]
order = FIRST
family = MONOMIAL
[]
[vel_y]
order = FIRST
family = MONOMIAL
[]
[viz_T]
order = FIRST
family = MONOMIAL
[]
[rho_out]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[mag]
type = VectorMagnitudeAux
variable = U
x = u
y = v
execute_on = 'initial timestep_end'
[]
[vel_x]
type = ParsedAux
variable = vel_x
expression = 'u'
execute_on = 'initial timestep_end'
coupled_variables = 'u'
[]
[vel_y]
type = ParsedAux
variable = vel_y
expression = 'v'
execute_on = 'initial timestep_end'
coupled_variables = 'v'
[]
[viz_T]
type = ParsedAux
variable = viz_T
expression = 'T'
execute_on = 'initial timestep_end'
coupled_variables = 'T'
[]
[rho_out]
type = FunctorAux
functor = 'rho'
variable = 'rho_out'
execute_on = 'initial timestep_end'
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[mean_zero_pressure]
type = FVIntegralValueConstraint
variable = pressure
lambda = lambda
phi0 = 1e5
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[u_gravity]
type = INSFVMomentumGravity
variable = u
gravity = '0 -1 0'
rho = ${rho}
momentum_component = 'x'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[v_gravity]
type = INSFVMomentumGravity
variable = v
gravity = '0 -1 0'
rho = ${rho}
momentum_component = 'y'
[]
[temp_conduction]
type = FVDiffusion
coeff = 'k'
variable = T
[]
[temp_advection]
type = INSFVEnergyAdvection
variable = T
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
[]
[]
[FVBCs]
[no_slip_x]
type = INSFVNoSlipWallBC
variable = u
boundary = 'left right top bottom'
function = 0
[]
[no_slip_y]
type = INSFVNoSlipWallBC
variable = v
boundary = 'left right top bottom'
function = 0
[]
[T_hot]
type = FVDirichletBC
variable = T
boundary = left
value = ${hot_temp}
[]
[T_cold]
type = FVDirichletBC
variable = T
boundary = right
value = ${cold_temp}
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'alpha'
prop_values = '${alpha}'
[]
[]
[FunctorMaterials]
[const_functor]
type = ADGenericFunctorMaterial
prop_names = 'cp k'
prop_values = '${cp} ${k}'
[]
[rho]
type = RhoFromPTFunctorMaterial
fp = fp
temperature = T
pressure = pressure
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = 'T'
rho = ${rho}
[]
[]
[Functions]
[lid_function]
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[Outputs]
exodus = true
[]
(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/variables/fe_hier/hier-3-2d.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 5
ny = 5
elem_type = QUAD9
[]
[Functions]
[./bc_fnt]
type = ParsedFunction
expression = 3*y*y
[../]
[./bc_fnb]
type = ParsedFunction
expression = -3*y*y
[../]
[./bc_fnl]
type = ParsedFunction
expression = -3*x*x
[../]
[./bc_fnr]
type = ParsedFunction
expression = 3*x*x
[../]
[./forcing_fn]
type = ParsedFunction
expression = -6*x-6*y+(x*x*x)+(y*y*y)
[../]
[./solution]
type = ParsedGradFunction
expression = (x*x*x)+(y*y*y)
grad_x = 3*x*x
grad_y = 3*y*y
[../]
[]
[Variables]
[./u]
order = THIRD
family = HIERARCHIC
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./bc_top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = bc_fnt
[../]
[./bc_bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bc_fnb
[../]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/bcs/nodal_normals/circle_quads.i)
[Mesh]
file = circle-quads.e
[]
[Functions]
[./all_bc_fn]
type = ParsedFunction
expression = x*x+y*y
[../]
[./f_fn]
type = ParsedFunction
expression = -4
[../]
[./analytical_normal_x]
type = ParsedFunction
expression = x
[../]
[./analytical_normal_y]
type = ParsedFunction
expression = y
[../]
[]
[NodalNormals]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = f_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = 'all_bc_fn'
[../]
[]
[Postprocessors]
[./nx_pps]
type = NodalL2Error
variable = nodal_normal_x
boundary = '1'
function = analytical_normal_x
[../]
[./ny_pps]
type = NodalL2Error
variable = nodal_normal_y
boundary = '1'
function = analytical_normal_y
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-13
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/richards/test/tests/theis/th02.i)
# fully-saturated
# production
[Mesh]
type = FileMesh
file = th02_input.e
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1 2 4 20'
x = '0 1 10 100'
[../]
[]
[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-5
[../]
[./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 = RichardsPolyLineSink
pressures = '-1E9 1E9'
fluxes = '200 200'
point_file = th01.points
SumQuantityUO = total_outflow_mass
variable = pressure
[../]
[]
[Postprocessors]
[./flow_report]
type = RichardsPlotQuantity
uo = total_outflow_mass
[../]
[./p50]
type = PointValue
variable = pressure
point = '50 0 0'
execute_on = 'initial timestep_end'
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 1E5
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = 1
viscosity = 1E-3
mat_porosity = 0.1
mat_permeability = '1E-10 0 0 0 1E-10 0 0 0 1E-10'
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-6 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 100
solve_type = NEWTON
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = th02
csv = true
[]
(test/tests/meshdivisions/functor_values_division.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 3
dx = '1.5 2.4 0.1'
dy = '1.3 0.9'
dz = '0.4 0.5 0.6 0.7'
ix = '2 1 1'
iy = '2 3'
iz = '1 1 1 1'
[]
# To keep VPP output consistently ordered
allow_renumbering = false
[]
[MeshDivisions]
[functor_div]
type = FunctorBinnedValuesDivision
min_value = 0.1
max_value = 2
num_bins = 3
functor = 'xf'
[]
[]
[Functions]
[xf]
type = ParsedFunction
expression = 'x'
[]
[]
[AuxVariables]
[div]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[mesh_div]
type = MeshDivisionAux
variable = div
mesh_division = 'functor_div'
[]
[]
[VectorPostprocessors]
[div_out]
type = ElementValueSampler
variable = 'div'
sort_by = 'id'
[]
[]
[Postprocessors]
[ndiv]
type = NumMeshDivisions
mesh_division = functor_div
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/outputs/residual/output_residual_elem.i)
[Mesh]
file = sq-2blk.e
uniform_refine = 3
[]
[Variables]
# variable in the whole domain
[./u]
order = CONSTANT
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
# subdomain restricted variable
[./v]
order = CONSTANT
family = MONOMIAL
block = '1'
[../]
[]
[Functions]
[./forcing_fn_u]
type = ParsedFunction
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./forcing_fn_v]
type = ParsedFunction
expression = t
[../]
# [./exact_fn]
# type = ParsedFunction
# expression = t*t*t*((x*x)+(y*y))
# [../]
# [./exact_fn_v]
# type = ParsedFunction
# expression = t+1
# [../]
[]
[Kernels]
[./ie_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = forcing_fn_u
[../]
[./ie_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[./ffn_v]
type = BodyForce
variable = v
function = forcing_fn_v
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_elem
exodus = true
[]
[Debug]
show_var_residual = 'u v'
show_var_residual_norms = true
[]
(test/tests/linearfvkernels/diffusion-reaction-advection/advection-diffusion-reaction-2d.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 1
ymax = 0.5
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = diff_coeff_func
use_nonorthogonal_correction = false
[]
[advection]
type = LinearFVAdvection
variable = u
velocity = "0.5 0 0"
advected_interp_method = average
[]
[reaction]
type = LinearFVReaction
variable = u
coeff = coeff_func
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
inactive = "outflow"
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "left right top bottom"
functor = analytic_solution
[]
[outflow]
type = LinearFVAdvectionDiffusionOutflowBC
variable = u
boundary = "right"
use_two_term_expansion = true
[]
[]
[Functions]
[diff_coeff_func]
type = ParsedFunction
expression = '1.0+0.5*x*y'
[]
[coeff_func]
type = ParsedFunction
expression = '1.0+1.0/(1+x*y)'
[]
[source_func]
type = ParsedFunction
expression = '-1.0*x*pi*sin((1/2)*x*pi)*cos(2*y*pi) - 0.25*y*pi*sin(2*y*pi)*cos((1/2)*x*pi) + (1.0 + 1.0/(x*y + 1))*(sin((1/2)*x*pi)*sin(2*y*pi) + 1.5) + (17/4)*pi^2*(0.5*x*y + 1.0)*sin((1/2)*x*pi)*sin(2*y*pi) + 0.25*pi*sin(2*y*pi)*cos((1/2)*x*pi)'
[]
[analytic_solution]
type = ParsedFunction
expression = 'sin((1/2)*x*pi)*sin(2*y*pi) + 1.5'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = FINAL
[]
[error]
type = ElementL2FunctorError
approximate = u
exact = analytic_solution
execute_on = FINAL
[]
[]
[Executioner]
type = LinearPicardSteady
linear_systems_to_solve = u_sys
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
[csv]
type = CSV
execute_on = FINAL
[]
[]
(test/tests/variables/fe_hermite/hermite-3-1d.i)
###########################################################
# This is a simple test demonstrating the use of the
# Hermite variable type.
#
# @Requirement F3.10
###########################################################
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -1
xmax = 1
nx = 5
elem_type = EDGE3
[]
[Functions]
[./bc_fnl]
type = ParsedFunction
expression = -3*x*x
[../]
[./bc_fnr]
type = ParsedFunction
expression = 3*x*x
[../]
[./forcing_fn]
type = ParsedFunction
expression = -6*x+(x*x*x)
[../]
[./solution]
type = ParsedGradFunction
value = x*x*x
grad_x = 3*x*x
[../]
[]
# Hermite Variable type
[Variables]
[./u]
order = THIRD
family = HERMITE
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts_steady_stabilized_second_order.i)
[GlobalParams]
order = SECOND
integrate_p_by_parts = true
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[AuxVariables]
[vel_x]
[]
[vel_y]
[]
[]
[AuxKernels]
[vel_x]
type = VectorVariableComponentAux
variable = vel_x
vector_variable = velocity
component = 'x'
[]
[vel_y]
type = VectorVariableComponentAux
variable = vel_y
vector_variable = velocity
component = 'y'
[]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
order = FIRST
[../]
[]
# Need to set a non-zero initial condition because we have a velocity norm in
# the denominator for the tau coefficient of the stabilization term
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[mass_pspg]
type = INSADMassPSPG
variable = p
[]
[momentum_advection]
type = INSADMomentumAdvection
variable = velocity
[]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
[../]
[momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[]
[]
[BCs]
[inlet]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom'
function_x = 0
function_y = 'inlet_func'
[../]
[wall]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'right'
function_x = 0
function_y = 0
[]
[axis]
type = ADVectorFunctionDirichletBC
variable = velocity
boundary = 'left'
set_y_comp = false
function_x = 0
[]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADTauMaterial
velocity = velocity
pressure = p
[]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(modules/level_set/test/tests/verification/1d_level_set_mms/level_set_mms.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 32
nx = 64
uniform_refine = 0
[]
[Variables]
[./phi]
[../]
[]
[AuxVariables]
[./velocity]
family = LAGRANGE_VEC
[../]
[]
[ICs]
[./phi_ic]
function = phi_exact
variable = phi
type = FunctionIC
[../]
[./vel_ic]
type = VectorFunctionIC
variable = velocity
function = velocity_func
[]
[]
[Functions]
[./phi_exact]
type = ParsedFunction
expression = 'a*exp(1/(10*t))*sin(2*pi*x/b) + 1'
symbol_names = 'a b'
symbol_values = '1 8'
[../]
[./phi_mms]
type = ParsedFunction
expression = '-a*exp(1/(10*t))*sin(2*pi*x/b)/(10*t^2) + 2*pi*a*exp(1/(10*t))*cos(2*pi*x/b)/b'
symbol_names = 'a b'
symbol_values = '1 8'
[../]
[./velocity_func]
type = ParsedVectorFunction
expression_x = '1'
expression_y = '1'
[../]
[]
[Kernels]
[./phi_advection]
type = LevelSetAdvection
variable = phi
velocity = velocity
[../]
[./phi_time]
type = TimeDerivative
variable = phi
[../]
[./phi_forcing]
type = BodyForce
variable = phi
function = phi_mms
[../]
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = phi_exact
variable = phi
[../]
[./h]
type = AverageElementSize
[../]
[./point]
type = PointValue
point = '0.1 0 0'
variable = phi
[../]
[]
[Executioner]
type = Transient
start_time = 1
dt = 0.01
end_time = 1.25
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_sub_type'
petsc_options_value = 'asm ilu'
scheme = bdf2
nl_rel_tol = 1e-12
[]
[Outputs]
time_step_interval = 10
execute_on = 'timestep_end'
csv = true
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_structure_3d/test.i)
[GlobalParams]
initial_from_file = 'steady_state_out.e'
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '16 356 6.5514e3'
[]
[]
[Functions]
[Ts_bc]
type = ParsedFunction
expression = '2*sin(x*pi/2)+2*sin(pi*y) +507'
[]
[]
[Components]
[blk]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
[]
[right_bnd]
type = HSBoundarySpecifiedTemperature
hs = blk
boundary = blk:right
T = Ts_bc
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 1
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
[]
[Outputs]
exodus = true
execute_on = 'initial'
[]
(modules/navier_stokes/test/tests/finite_volume/ins/boussinesq/boussinesq-action.i)
mu = 1
rho = 1
k = 1
cp = 1
alpha = 1
rayleigh = 1e3
hot_temp = ${rayleigh}
temp_ref = '${fparse hot_temp / 2.}'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 32
ny = 32
[]
[]
[Modules]
[NavierStokesFV]
compressibility = 'incompressible'
porous_medium_treatment = false
add_energy_equation = true
boussinesq_approximation = true
density = ${rho}
dynamic_viscosity = ${mu}
thermal_conductivity = ${k}
specific_heat = ${cp}
thermal_expansion = ${alpha}
gravity = '0 -1 0'
ref_temperature = ${temp_ref}
initial_pressure = 0.0
initial_temperature = 0.0
inlet_boundaries = 'top'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_function = 'lid_function 0'
energy_inlet_types = 'heatflux'
energy_inlet_function = '0'
wall_boundaries = 'left right bottom'
momentum_wall_types = 'noslip noslip noslip'
energy_wall_types = 'fixed-temperature fixed-temperature heatflux'
energy_wall_function = '${hot_temp} 0 0'
pin_pressure = true
pinned_pressure_type = average
pinned_pressure_value = 0
momentum_advection_interpolation = 'upwind'
mass_advection_interpolation = 'upwind'
energy_advection_interpolation = 'upwind'
energy_scaling = 1e-4
[]
[]
[Functions]
[lid_function]
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/cross_material/convergence/plastic_j2.i)
# Simple 3D test
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = false
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 4
nz = 4
[]
[]
[ICs]
[disp_x]
type = RandomIC
variable = disp_x
min = -0.02
max = 0.02
[]
[disp_y]
type = RandomIC
variable = disp_y
min = -0.02
max = 0.02
[]
[disp_z]
type = RandomIC
variable = disp_z
min = -0.02
max = 0.02
[]
[]
[Kernels]
[sdx]
type = UpdatedLagrangianStressDivergence
variable = disp_x
component = 0
use_displaced_mesh = false
[]
[sdy]
type = UpdatedLagrangianStressDivergence
variable = disp_y
component = 1
use_displaced_mesh = false
[]
[sdz]
type = UpdatedLagrangianStressDivergence
variable = disp_z
component = 2
use_displaced_mesh = false
[]
[]
[Functions]
[pullx]
type = ParsedFunction
expression = '4000 * t'
[]
[pully]
type = ParsedFunction
expression = '-2000 * t'
[]
[pullz]
type = ParsedFunction
expression = '3000 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = left
variable = disp_y
value = 0.0
[]
[leftz]
type = DirichletBC
preset = true
boundary = left
variable = disp_z
value = 0.0
[]
[pull_x]
type = FunctionNeumannBC
boundary = right
variable = disp_x
function = pullx
[]
[pull_y]
type = FunctionNeumannBC
boundary = top
variable = disp_y
function = pully
[]
[pull_z]
type = FunctionNeumannBC
boundary = right
variable = disp_z
function = pullz
[]
[]
[UserObjects]
[./str]
type = SolidMechanicsHardeningPowerRule
value_0 = 100.0
epsilon0 = 1.0
exponent = 1.0
[../]
[./j2]
type = SolidMechanicsPlasticJ2
yield_strength = str
yield_function_tolerance = 1E-3
internal_constraint_tolerance = 1E-9
[../]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianWrappedStress
[]
[compute_stress_base]
type = ComputeMultiPlasticityStress
plastic_models = j2
ep_plastic_tolerance = 1E-9
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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
[]
(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/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar_displaced_conduction_function.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-gap.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[AuxVariables]
[dummy]
order = FIRST
family = LAGRANGE
initial_condition = 1.0
[]
[]
[Functions]
[function]
type = ParsedFunction
expression = 'if(t > 100.0, 0.0, t)'
[]
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_x]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_y]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[Materials]
[left]
type = ADHeatConductionMaterial
block = 1
thermal_conductivity = 0.01
specific_heat = 1
[]
[right]
type = ADHeatConductionMaterial
block = 2
thermal_conductivity = 0.005
specific_heat = 1
[]
[]
[Kernels]
[hc_displaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = '1'
[]
[hc_undisplaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = false
block = '2'
[]
[disp_x]
type = Diffusion
variable = disp_x
block = '1 2'
[]
[disp_y]
type = Diffusion
variable = disp_y
block = '1 2'
[]
[]
[UserObjects]
[conduction]
type = GapFluxModelConduction
temperature = temp
boundary = 100
gap_conductivity = 10.0
gap_conductivity_function_variable = dummy
gap_conductivity_function = function
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
use_displaced_mesh = true
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
gap_flux_models = conduction
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temp
boundary = 'left'
value = 100
[]
[right]
type = DirichletBC
variable = temp
boundary = 'right'
value = 0
[]
[left_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'left'
value = .1
[]
[right_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'right'
value = 0
[]
[bottom_disp_y]
type = DirichletBC
preset = false
variable = disp_y
boundary = 'bottom'
value = 0
[]
[]
[Preconditioning]
[fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
nl_abs_tol = 1.0e-10
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '100 101'
variable = 'temp'
[]
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/controls/error/multiple_parameters_found.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./diff2]
type = CoefDiffusion
variable = u
coef = 0.2
[../]
[./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 = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Functions]
[./func_coef]
type = ParsedFunction
expression = '2*t + 0.1'
[../]
[]
[Controls]
[./func_control]
type = TestControl
test_type = 'real'
parameter = '*/*/coef'
[../]
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/convergence/1D/dirichlet.i)
# Simple 1D plane strain test
[GlobalParams]
displacements = 'disp_x'
large_kinematics = true
[]
[Variables]
[disp_x]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 1
nx = 10
[]
[]
[Kernels]
[sdx]
type = TotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[]
[Functions]
[pull]
type = ParsedFunction
expression = '0.06 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = right
variable = disp_x
value = 0.0
[]
[pull]
type = FunctionDirichletBC
boundary = left
variable = disp_x
function = pull
preset = true
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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 = 5.0
[]
[Postprocessors]
[nonlin]
type = NumNonlinearIterations
[]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/contact/test/tests/sliding_block/in_and_out/frictionless_penalty_contact_line_search.i)
# This is a benchmark test that checks constraint based frictionless
# contact using the penalty method. In this test a sinusoidal
# displacement is applied in the horizontal direction to simulate
# a small block come in and out of contact as it slides down a larger block.
#
# The sinusoid is of the form 0.4sin(4t)+0.2. The gold file is run
# on one processor and the benchmark
# case is run on a minimum of 4 processors to ensure no parallel variability
# in the contact pressure and penetration results. Further documentation can
# found in moose/modules/contact/doc/sliding_block/
#
[Mesh]
file = sliding_elastic_blocks_2d.e
patch_size = 80
[]
[GlobalParams]
volumetric_locking_correction = false
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./penetration]
[../]
[./inc_slip_x]
[../]
[./inc_slip_y]
[../]
[./accum_slip_x]
[../]
[./accum_slip_y]
[../]
[]
[Functions]
[./vertical_movement]
type = ParsedFunction
expression = -t
[../]
[./horizontal_movement]
type = ParsedFunction
expression = -0.04*sin(4*t)+0.02
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
strain = FINITE
[../]
[]
[AuxKernels]
[./zeroslip_x]
type = ConstantAux
variable = inc_slip_x
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./zeroslip_y]
type = ConstantAux
variable = inc_slip_y
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./accum_slip_x]
type = AccumulateAux
variable = accum_slip_x
accumulate_from_variable = inc_slip_x
execute_on = timestep_end
[../]
[./accum_slip_y]
type = AccumulateAux
variable = accum_slip_y
accumulate_from_variable = inc_slip_y
execute_on = timestep_end
[../]
[./penetration]
type = PenetrationAux
variable = penetration
boundary = 3
paired_boundary = 2
[../]
[]
[Postprocessors]
[./nonlinear_its]
type = NumNonlinearIterations
execute_on = timestep_end
[../]
[./penetration]
type = NodalVariableValue
variable = penetration
nodeid = 222
[../]
[./contact_pressure]
type = NodalVariableValue
variable = contact_pressure
nodeid = 222
[../]
[./tot_nonlin_it]
type = CumulativeValuePostprocessor
postprocessor = nonlinear_its
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./right_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = horizontal_movement
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = vertical_movement
[../]
[]
[Materials]
[./left]
type = ComputeIsotropicElasticityTensor
block = '1 2'
youngs_modulus = 1e6
poissons_ratio = 0.3
constant_on = SUBDOMAIN
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-ksp_monitor_true_residual'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
line_search = 'contact'
contact_line_search_ltol = .5
contact_line_search_allowed_lambda_cuts = 0
l_max_its = 100
nl_max_its = 20
dt = 0.1
end_time = 3
# num_steps = 30
l_tol = 1e-6
nl_rel_tol = 1e-10
nl_abs_tol = 1e-6
dtmin = 0.01
[]
[Outputs]
perf_graph = true
print_linear_residuals = false
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[./console]
type = Console
max_rows = 5
[../]
[]
[Contact]
[./leftright]
secondary = 3
primary = 2
model = frictionless
penalty = 1e+7
formulation = penalty
normal_smoothing_distance = 0.1
[../]
[]
(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/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
[]
(test/tests/time_steppers/iteration_adaptive/multi_piecewise_linear.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 50
ny = 2
xmax = 5
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./temp_spike1]
type = PiecewiseLinear
x = '1 3 5'
y = '1 4 4'
[../]
[./temp_spike2]
type = PiecewiseLinear
x = '0 2 4'
y = '1 1 2'
[../]
[temp_spike]
type = ParsedFunction
expression = 'temp_spike1 + temp_spike2'
symbol_names = 'temp_spike1 temp_spike2'
symbol_values = 'temp_spike1 temp_spike2'
[]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./dt]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = FunctionDirichletBC
variable = u
boundary = left
function = temp_spike
[../]
[./right]
type = NeumannBC
variable = u
boundary = right
value = -1
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
start_time = 0
end_time = 5
verbose = true
[./TimeStepper]
type = IterationAdaptiveDT
dt = 10
optimal_iterations = 10
timestep_limiting_function = 'temp_spike1 temp_spike2'
[../]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
[]
[Outputs]
csv = true
[]
(test/tests/transfers/multiapp_projection_transfer/high_order_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
[]
[Functions]
[./test_function]
type = ParsedFunction
expression = '2.5*x^2 + 0.75*y^2 + 0.15*x*y'
[../]
[]
[AuxVariables]
[./from_parent]
family = monomial
order = first
[../]
[./test_var]
family = monomial
order = first
[./InitialCondition]
type = FunctionIC
function = test_function
[../]
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_convection/plate.parent.i)
# This tests a temperature and heat transfer coefficient using the MultiApp system.
# Simple heat conduction problem with heat source is solved,
# to obtain an analytical solution:
# T(x,t) = 300 + 20t(x-1)^2
# The temperature is picked up by the child
# side of the solve, to use as ambiant temperature in a convective BC.
htc = 100
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 1
nx = 10
[]
[Functions]
[left_bc_fn]
type = PiecewiseLinear
x = '0 10'
y = '300 500'
[]
[]
[Variables]
[T]
[]
[]
[AuxVariables]
[htc_ext]
initial_condition = ${htc}
[]
[]
[Functions]
[source_term]
type = ParsedFunction
expression = '20 * x * x - 40 * x + 20 - 40 * t'
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T
value = 300
[]
[]
[Kernels]
[td]
type = ADTimeDerivative
variable = T
[]
[diff]
type = ADDiffusion
variable = T
[]
[source]
type = BodyForce
function = 'source_term'
variable = T
[]
[]
[BCs]
[left]
type = FunctionDirichletBC
variable = T
boundary = left
function = left_bc_fn
[]
[right]
type = NeumannBC
variable = T
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
dt = 0.5
end_time = 10
nl_abs_tol = 1e-10
abort_on_solve_fail = true
[]
[MultiApps]
[thm]
type = TransientMultiApp
app_type = ThermalHydraulicsApp
input_files = plate.i
execute_on = TIMESTEP_END
[]
[]
[Transfers]
[T_to_child]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = thm
source_variable = T
variable = T_ext
[]
[htc_to_child]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = thm
source_variable = htc_ext
variable = htc_ext
[]
[]
[Outputs]
exodus = true
[]
(modules/peridynamics/test/tests/auxkernels/planestrain_thermomechanics_ranktwotensor_OSPD.i)
[GlobalParams]
displacements = 'disp_x disp_y'
temperature = temp
poissons_ratio = 0.3
youngs_modulus = 1e6
thermal_expansion_coeff = 0.0002
stress_free_temperature = 0.0
[]
[Mesh]
type = PeridynamicsMesh
horizon_number = 3
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 8
ny = 8
[../]
[./gpd]
type = MeshGeneratorPD
input = gmg
retain_fe_mesh = false
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[AuxVariables]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[./tstrain_xx]
order = FIRST
family = LAGRANGE
[../]
[./tstrain_yy]
order = FIRST
family = LAGRANGE
[../]
[./tstrain_zz]
order = FIRST
family = LAGRANGE
[../]
[./tstrain_xy]
order = FIRST
family = LAGRANGE
[../]
[./mstrain_xx]
order = FIRST
family = LAGRANGE
[../]
[./mstrain_yy]
order = FIRST
family = LAGRANGE
[../]
[./mstrain_zz]
order = FIRST
family = LAGRANGE
[../]
[./mstrain_xy]
order = FIRST
family = LAGRANGE
[../]
[./stress_xx]
order = FIRST
family = LAGRANGE
[../]
[./stress_yy]
order = FIRST
family = LAGRANGE
[../]
[./stress_zz]
order = FIRST
family = LAGRANGE
[../]
[./stress_xy]
order = FIRST
family = LAGRANGE
[../]
[./von_mises]
order = FIRST
family = LAGRANGE
[../]
[]
[Modules/Peridynamics/Mechanics/Master]
[./all]
formulation = ORDINARY_STATE
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
use_displaced_mesh = false
[../]
[./tstrain_xx]
type = NodalRankTwoPD
variable = tstrain_xx
rank_two_tensor = total_strain
output_type = component
index_i = 0
index_j = 0
[../]
[./tstrain_yy]
type = NodalRankTwoPD
variable = tstrain_yy
rank_two_tensor = total_strain
output_type = component
index_i = 1
index_j = 1
[../]
[./tstrain_zz]
type = NodalRankTwoPD
variable = tstrain_zz
rank_two_tensor = total_strain
output_type = component
index_i = 2
index_j = 2
[../]
[./tstrain_xy]
type = NodalRankTwoPD
variable = tstrain_xy
rank_two_tensor = total_strain
output_type = component
index_i = 0
index_j = 1
[../]
[./mstrain_xx]
type = NodalRankTwoPD
variable = mstrain_xx
rank_two_tensor = mechanical_strain
output_type = component
index_i = 0
index_j = 0
[../]
[./mstrain_yy]
type = NodalRankTwoPD
variable = mstrain_yy
rank_two_tensor = mechanical_strain
output_type = component
index_i = 1
index_j = 1
[../]
[./mstrain_zz]
type = NodalRankTwoPD
variable = mstrain_zz
rank_two_tensor = mechanical_strain
output_type = component
index_i = 2
index_j = 2
[../]
[./mstrain_xy]
type = NodalRankTwoPD
variable = mstrain_xy
rank_two_tensor = mechanical_strain
output_type = component
index_i = 0
index_j = 1
[../]
[./stress_xx]
type = NodalRankTwoPD
variable = stress_xx
rank_two_tensor = stress
output_type = component
index_i = 0
index_j = 0
[../]
[./stress_yy]
type = NodalRankTwoPD
variable = stress_yy
rank_two_tensor = stress
output_type = component
index_i = 1
index_j = 1
[../]
[./stress_zz]
type = NodalRankTwoPD
variable = stress_zz
rank_two_tensor = stress
output_type = component
index_i = 2
index_j = 2
[../]
[./stress_xy]
type = NodalRankTwoPD
variable = stress_xy
rank_two_tensor = stress
output_type = component
index_i = 0
index_j = 1
[../]
[./vonmises]
type = NodalRankTwoPD
variable = von_mises
rank_two_tensor = stress
output_type = scalar
scalar_type = VonMisesStress
[../]
[]
[Functions]
[./tempfunc]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
boundary = 1003
variable = disp_x
value = 0.0
[../]
[./bottom_y]
type = DirichletBC
boundary = 1000
variable = disp_y
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
[../]
[./force_density]
type = ComputeSmallStrainConstantHorizonMaterialOSPD
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
start_time = 0.0
end_time = 1.0
[]
[Outputs]
exodus = true
file_base = planestrain_thermomechanics_ranktwotensor_OSPD
[]
(test/tests/nodalkernels/penalty_dirichlet/nodal_penalty_dirichlet.i)
#In order to compare the solution generated using preset BC, the penalty was set to 1e10.
#Large penalty number should be used with caution.
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = -2*(x*x+y*y-2)
[../]
[./solution]
type = ParsedGradFunction
value = (1-x*x)*(1-y*y)
grad_x = 2*(x*y*y-x)
grad_y = 2*(x*x*y-y)
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[NodalKernels]
[./bc_all]
type = PenaltyDirichletNodalKernel
variable = u
value = 0
boundary = 'top left right bottom'
penalty = 1e10
[../]
[]
# [BCs]
# [./fix]
# type = DirichletBC
# preset = true
# variable = u
# value = 0
# boundary = 'top left right bottom'
# [../]
# []
[Postprocessors]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-14
[]
[Outputs]
file_base = nodal_preset_bc_out
exodus = true
[]
(modules/porous_flow/test/tests/relperm/corey4.i)
# Test Corey relative permeability curve by varying saturation over the mesh
# Residual saturation of phase 0: s0r = 0.2
# Residual saturation of phase 1: s1r = 0.3
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[p0]
initial_condition = 1e6
[]
[s1]
family = LAGRANGE
order = FIRST
[]
[]
[AuxVariables]
[s0aux]
family = MONOMIAL
order = CONSTANT
[]
[s1aux]
family = MONOMIAL
order = CONSTANT
[]
[kr0aux]
family = MONOMIAL
order = CONSTANT
[]
[kr1aux]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[s0]
type = PorousFlowPropertyAux
property = saturation
phase = 0
variable = s0aux
[]
[s1]
type = PorousFlowPropertyAux
property = saturation
phase = 1
variable = s1aux
[]
[kr0]
type = PorousFlowPropertyAux
property = relperm
phase = 0
variable = kr0aux
[]
[kr1]
type = PorousFlowPropertyAux
property = relperm
phase = 1
variable = kr1aux
[]
[]
[Functions]
[s1]
type = ParsedFunction
expression = x
[]
[]
[ICs]
[s1]
type = FunctionIC
variable = s1
function = s1
[]
[]
[Kernels]
[p0]
type = Diffusion
variable = p0
[]
[s1]
type = Diffusion
variable = s1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'p0 s1'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = p0
phase1_saturation = s1
capillary_pressure = pc
[]
[kr0]
type = PorousFlowRelativePermeabilityCorey
scaling = 0.1
phase = 0
n = 2
s_res = 0.2
sum_s_res = 0.5
[]
[kr1]
type = PorousFlowRelativePermeabilityCorey
scaling = 10.0
phase = 1
n = 2
s_res = 0.3
sum_s_res = 0.5
[]
[]
[VectorPostprocessors]
[vpp]
type = LineValueSampler
warn_discontinuous_face_values = false
variable = 's0aux s1aux kr0aux kr1aux'
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 20
sort_by = id
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-8
[]
[BCs]
[sleft]
type = DirichletBC
variable = s1
value = 0
boundary = left
[]
[sright]
type = DirichletBC
variable = s1
value = 1
boundary = right
[]
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(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
[]
[]
(python/peacock/tests/common/lcf1.i)
# LinearCombinationFunction function test
# See [Functions] block for a description of the tests
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 2
nx = 10
[]
[Variables]
[./dummy]
[../]
[]
[Kernels]
[./dummy_u]
type = TimeDerivative
variable = dummy
[../]
[]
[AuxVariables]
[./the_linear_combo]
[../]
[]
[AuxKernels]
[./the_linear_combo]
type = FunctionAux
variable = the_linear_combo
function = the_linear_combo
[../]
[]
[Functions]
[./xtimes]
type = ParsedFunction
expression = 1.1*x
[../]
[./twoxplus1]
type = ParsedFunction
expression = 2*x+1
[../]
[./xsquared]
type = ParsedFunction
expression = (x-2)*x
[../]
[./tover2]
type = ParsedFunction
expression = 0.5*t
[../]
[./the_linear_combo]
type = LinearCombinationFunction
functions = 'xtimes twoxplus1 xsquared tover2'
w = '3 -1.2 0.4 3'
[../]
[./should_be_answer]
type = ParsedFunction
expression = 3*1.1*x-1.2*(2*x+1)+0.4*(x-2)*x+3*0.5*t
[../]
[]
[Postprocessors]
[./should_be_zero]
type = NodalL2Error
function = should_be_answer
variable = the_linear_combo
[../]
[]
[Executioner]
type = Transient
dt = 0.5
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = lcf1
hide = dummy
exodus = false
csv = true
[]
(modules/navier_stokes/examples/flow-over-circle/executioner_postprocessor.i)
[Functions]
[inlet_function]
type = ParsedFunction
expression = '4*U*(y-ymin)*(ymax-y)/(ymax-ymin)/(ymax-ymin)'
symbol_names = 'U ymax ymin'
symbol_values = '${inlet_velocity} ${y_max} ${y_min}'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
nl_max_its = 10
end_time = 15
dtmax = 2e-2
dtmin = 1e-5
scheme = 'bdf2'
[TimeStepper]
type = IterationAdaptiveDT
dt = 1e-3
optimal_iterations = 6
growth_factor = 1.5
[]
[]
[Outputs]
exodus = true
csv = true
checkpoint = true
[]
[Postprocessors]
[Re]
type = ParsedPostprocessor
expression = 'rho * U * D / mu'
constant_names = 'rho U D mu'
constant_expressions = '${rho} ${fparse 2/3*inlet_velocity} ${fparse 2*circle_radius} ${mu}'
[]
[point_vel_x]
type = PointValue
point = '${fparse (x_max-x_min)/2} ${fparse (y_max-y_min)/2} 0'
variable = 'vel_x'
[]
[point_vel_y]
type = PointValue
point = '${fparse (x_max-x_min)/2} ${fparse (y_max-y_min)/2} 0'
variable = 'vel_y'
[]
[drag_force]
type = IntegralDirectedSurfaceForce
vel_x = vel_x
vel_y = vel_y
mu = ${mu}
pressure = pressure
principal_direction = '1 0 0'
boundary = 'circle'
outputs = none
execute_on = 'INITIAL TIMESTEP_END'
[]
[drag_coeff]
type = ParsedPostprocessor
expression = '2*drag_force/rho/(avgvel*avgvel)/D'
constant_names = 'rho avgvel D'
constant_expressions = '${rho} ${fparse 2/3*inlet_velocity} ${fparse 2*circle_radius}'
pp_names = 'drag_force'
execute_on = 'INITIAL TIMESTEP_END'
[]
[lift_force]
type = IntegralDirectedSurfaceForce
vel_x = vel_x
vel_y = vel_y
mu = ${mu}
pressure = pressure
principal_direction = '0 1 0'
boundary = 'circle'
outputs = none
execute_on = 'INITIAL TIMESTEP_END'
[]
[lift_coeff]
type = ParsedPostprocessor
expression = '2*lift_force/rho/(avgvel*avgvel)/D'
constant_names = 'rho avgvel D'
constant_expressions = '${rho} ${fparse 2/3*inlet_velocity} ${fparse 2*circle_radius}'
pp_names = 'lift_force'
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
(modules/solid_mechanics/test/tests/2D_geometries/planestrain.i)
# This test uses the strain calculator ComputePlaneSmallStrain,
# which is generated through the use of the SolidMechanics QuasiStatic Physics.
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[./square]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = SMALL
planar_formulation = PLANE_STRAIN
add_variables = true
generate_output = 'stress_xx stress_xy stress_yy stress_zz strain_xx strain_xy strain_yy strain_zz'
[../]
[]
[Functions]
[./pull]
type = ParsedFunction
expression ='0.01 * t'
[../]
[]
[BCs]
[./rightx]
type = DirichletBC
boundary = 1
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = DirichletBC
boundary = 0
variable = disp_y
value = 0.0
[../]
[./pull]
type = FunctionDirichletBC
boundary = 2
variable = disp_y
function = pull
[../]
[]
[Materials]
[./linear_stress]
type = ComputeLinearElasticStress
block = 0
[../]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
block = 0
poissons_ratio = 0.3
youngs_modulus = 1e10
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
l_max_its = 100
l_tol = 1e-10
nl_max_its = 15
nl_rel_tol = 1e-12
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 5.0
[]
[Outputs]
exodus = true
[]
(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/electromagnetics/test/tests/bcs/reflectionBC_helmholtz/ReflectionTest.i)
# problem: -(ku')' - c^2 * u' = 0 , 0 < x < L, u: R -> C
# u(x=0) = g0 , u'(x = L) = 2jcf(L)*exp(jcLf(L)) - jcf(L)u(x = L)
# c = a + jb , k = d + jh
[GlobalParams]
coeff_real = 15
coeff_imag = 7
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = 1
nx = 100
[]
[]
[Variables]
[u_real]
order = FIRST
family = LAGRANGE
[]
[u_imag]
order = FIRST
family = LAGRANGE
[]
[]
[Functions]
[cos]
type = ParsedFunction
expression = 'cos(0.5)'
[]
[]
[Materials]
[ASquaredMinusBSquared]
type = ADParsedMaterial
property_name = ASquaredMinusBSquared
expression = '(15*15 - 7*7)'
[]
[2TimesAB]
type = ADParsedMaterial
property_name = 2TimesAB
expression = '2*15*7'
[]
[negative_2TimesAB]
type = ADParsedMaterial
property_name = negative_2TimesAB
expression = '-2*15*7'
[]
[]
[Kernels]
[laplacian_real]
type = Diffusion
variable = u_real
[]
[coeffField_real]
type = ADMatReaction
reaction_rate = ASquaredMinusBSquared
variable = u_real
[]
[coupledField_real]
type = ADMatCoupledForce
v = u_imag
mat_prop_coef = negative_2TimesAB
variable = u_real
[]
[laplacian_imag]
type = Diffusion
variable = u_imag
[]
[coeffField_imag]
type = ADMatReaction
reaction_rate = ASquaredMinusBSquared
variable = u_imag
[]
[coupledField_imag]
type = ADMatCoupledForce
v = u_real
mat_prop_coef = 2TimesAB
variable = u_imag
[]
[]
[BCs]
[left_real]
type = DirichletBC
value = 0
boundary = left
variable = u_real
[]
[left_imag]
type = DirichletBC
value = 1
boundary = left
variable = u_imag
[]
[right_real]
type = EMRobinBC
func_real = cos
boundary = right
component = real
variable = u_real
field_real = u_real
field_imaginary = u_imag
sign = negative
[]
[right_imag]
type = EMRobinBC
func_real = cos
boundary = right
component = imaginary
variable = u_imag
field_real = u_real
field_imaginary = u_imag
sign = negative
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
exodus = true
[]
(test/tests/auxkernels/error_function_aux/error_function_aux.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./element_l2_error]
# Aux field variable representing the L2 error on each element
order = CONSTANT
family = MONOMIAL
[../]
[./element_h1_error]
# Aux field variable representing the H1 error on each element
order = CONSTANT
family = MONOMIAL
[../]
[./element_l2_norm]
# Aux field variable representing the L^2 norm of the solution variable
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = sin(2*pi*x)*sin(2*pi*y)
[../]
[./forcing_fn]
type = ParsedFunction
expression = 8*pi^2*sin(2*pi*x)*sin(2*pi*y)
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[AuxKernels]
[./l2_norm_aux]
type = ElementLpNormAux
variable = element_l2_norm
coupled_variable = u
[../]
[./l2_error_aux]
type = ElementL2ErrorFunctionAux
variable = element_l2_error
# A function representing the exact solution for the solution
function = exact_fn
# The nonlinear variable representing the FEM solution
coupled_variable = u
[../]
[./h1_error_aux]
type = ElementH1ErrorFunctionAux
variable = element_h1_error
# A function representing the exact solution for the solution
function = exact_fn
# The nonlinear variable representing the FEM solution
coupled_variable = u
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'bottom left right top'
function = exact_fn
[../]
[]
[Postprocessors]
[./L2_error]
# The L2 norm of the error over the entire mesh. Note: this is
# *not* equal to the sum over all the elements of the L2-error
# norms.
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/lid-driven/lid-driven-with-energy.i)
mu = 1
rho = 1
k = .01
cp = 1
velocity_interp_method = 'rc'
advected_interp_method = 'average'
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = vel_x
v = vel_y
pressure = pressure
[]
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 32
ny = 32
[]
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
[]
[vel_y]
type = INSFVVelocityVariable
[]
[pressure]
type = INSFVPressureVariable
[]
[T_fluid]
type = INSFVEnergyVariable
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[AuxVariables]
[U]
order = CONSTANT
family = MONOMIAL
fv = true
[]
[]
[AuxKernels]
[mag]
type = VectorMagnitudeAux
variable = U
x = vel_x
y = vel_y
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[mean_zero_pressure]
type = FVIntegralValueConstraint
variable = pressure
lambda = lambda
[]
[u_advection]
type = INSFVMomentumAdvection
variable = vel_x
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = vel_x
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = vel_x
momentum_component = 'x'
pressure = pressure
[]
[v_advection]
type = INSFVMomentumAdvection
variable = vel_y
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = vel_y
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = vel_y
momentum_component = 'y'
pressure = pressure
[]
[temp_conduction]
type = FVDiffusion
coeff = 'k'
variable = T_fluid
[]
[temp_advection]
type = INSFVEnergyAdvection
variable = T_fluid
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
[]
[]
[FVBCs]
[top_x]
type = INSFVNoSlipWallBC
variable = vel_x
boundary = 'top'
function = 'lid_function'
[]
[no_slip_x]
type = INSFVNoSlipWallBC
variable = vel_x
boundary = 'left right bottom'
function = 0
[]
[no_slip_y]
type = INSFVNoSlipWallBC
variable = vel_y
boundary = 'left right top bottom'
function = 0
[]
[T_hot]
type = FVDirichletBC
variable = T_fluid
boundary = 'bottom'
value = 1
[]
[T_cold]
type = FVDirichletBC
variable = T_fluid
boundary = 'top'
value = 0
[]
[]
[FunctorMaterials]
[functor_constants]
type = ADGenericFunctorMaterial
prop_names = 'cp k'
prop_values = '${cp} ${k}'
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = 'T_fluid'
rho = ${rho}
[]
[]
[Functions]
[lid_function]
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/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'
expression = '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'
expression = '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'
expression = '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'
expression = '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'
[]
[]
(test/tests/preconditioners/vcp/no_condense_test.i)
[Mesh]
[original_file_mesh]
type = FileMeshGenerator
file = non_conform_2blocks.e
[]
[secondary_side]
input = original_file_mesh
type = LowerDBlockFromSidesetGenerator
sidesets = '10'
new_block_id = '100'
new_block_name = 'secondary_side'
[]
[primary_side]
input = secondary_side
type = LowerDBlockFromSidesetGenerator
sidesets = '20'
new_block_id = '200'
new_block_name = 'primary_side'
[]
[]
[Functions]
[exact_sln]
type = ParsedFunction
expression = sin(2*pi*x)*sin(2*pi*y)
[]
[ffn]
type = ParsedFunction
expression = 8*pi*pi*sin(2*pi*x)*sin(2*pi*y)
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[lm]
order = FIRST
family = LAGRANGE
block = secondary_side
use_dual = false
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = ffn
[]
[]
[Constraints]
[ced]
type = EqualValueConstraint
variable = lm
secondary_variable = u
primary_boundary = 20
primary_subdomain = 200
secondary_boundary = 10
secondary_subdomain = 100
[]
[]
[BCs]
[all]
type = DirichletBC
variable = u
boundary = '30 40'
value = 0.0
[]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_sln
variable = u
boundary = '50 60'
[]
[]
[Postprocessors]
[l2_error]
type = ElementL2Error
variable = u
function = exact_sln
block = '1 2'
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_view'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' lu NONZERO 1e-12'
l_max_its = 100
nl_rel_tol = 1e-6
[]
[Outputs]
csv = true
[]
(test/tests/time_steppers/timesequence_stepper/csvtimesequence.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*t*(x*x+y*y)
[../]
[./forcing_fn]
type = ParsedFunction
expression = 2*t*(x*x+y*y)-4*t*t
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]
[ICs]
[./u_var]
type = FunctionIC
variable = u
function = exact_fn
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[../]
[]
[Executioner]
type = Transient
end_time = 10
[./TimeStepper]
type = CSVTimeSequenceStepper
file_name = timesequence.csv
column_name = time1
[../]
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/central_difference/lumped/3D/3d_lumped_explicit.i)
# Test for the central difference time integrator in 3D.
[Mesh]
[./generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 2
xmin = 0.0
xmax = 1
ymin = 0.0
ymax = 1
zmin = 0.0
zmax = 2
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxVariables]
[./vel_x]
[../]
[./accel_x]
[../]
[./vel_y]
[../]
[./accel_y]
[../]
[./vel_z]
[../]
[./accel_z]
[../]
[]
[AuxKernels]
[./accel_x]
type = TestNewmarkTI
variable = accel_x
displacement = disp_x
first = false
[../]
[./vel_x]
type = TestNewmarkTI
variable = vel_x
displacement = disp_x
[../]
[./accel_y]
type = TestNewmarkTI
variable = accel_y
displacement = disp_y
first = false
[../]
[./vel_y]
type = TestNewmarkTI
variable = vel_y
displacement = disp_x
[../]
[./accel_z]
type = TestNewmarkTI
variable = accel_z
displacement = disp_z
first = false
[../]
[./vel_z]
type = TestNewmarkTI
variable = vel_z
displacement = disp_z
[../]
[]
[Kernels]
[./DynamicSolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[./inertia_x]
type = InertialForce
variable = disp_x
[../]
[./inertia_y]
type = InertialForce
variable = disp_y
[../]
[./inertia_z]
type = InertialForce
variable = disp_z
[../]
[]
[BCs]
[./x_bot]
type = FunctionDirichletBC
variable = disp_x
boundary = 'back'
function = dispx
preset = false
[../]
[./y_bot]
type = FunctionDirichletBC
variable = disp_y
boundary = 'back'
function = dispy
preset = false
[../]
[./z_bot]
type = FunctionDirichletBC
variable = disp_z
boundary = 'back'
function = dispz
preset = false
[../]
[]
[Functions]
[./dispx]
type = PiecewiseLinear
x = '0.0 1.0 2.0 3.0 4.0' # time
y = '0.0 1.0 0.0 -1.0 0.0' # displacement
[../]
[./dispy]
type = ParsedFunction
expression = 0.1*t*t*sin(10*t)
[../]
[./dispz]
type = ParsedFunction
expression = 0.1*t*t*sin(20*t)
[../]
[]
[Materials]
[./elasticity_tensor_block]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.25
block = 0
[../]
[./strain_block]
type = ComputeIncrementalSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
implicit = false
[../]
[./stress_block]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = density
prop_values = 1e4
[../]
[wave_speed]
type = WaveSpeed
[]
[]
[Executioner]
type = Transient
start_time = -0.01
end_time = 0.1
dt = 0.005
timestep_tolerance = 1e-6
[./TimeIntegrator]
type = CentralDifference
solve_type = lumped
[../]
[]
[Postprocessors]
[./accel_10x]
type = NodalVariableValue
nodeid = 10
variable = accel_x
[../]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/heat_transfer/test/tests/heat_conduction/coupled_convective_heat_flux/coupled_convective_heat_flux_two_phase.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Functions]
[./alpha_liquid_fn]
type = ParsedFunction
expression = 'sin(pi*y)'
[../]
[./T_infinity_liquid_fn]
type = ParsedFunction
expression = '(x*x+y*y)+500'
[../]
[./Hw_liquid_fn]
type = ParsedFunction
expression = '((1-x)*(1-x)+(1-y)*(1-y))+1000'
[../]
[./alpha_vapor_fn]
type = ParsedFunction
expression = '1-sin(pi*y)'
[../]
[./T_infinity_vapor_fn]
type = ParsedFunction
expression = '(x*x+y*y)+5'
[../]
[./Hw_vapor_fn]
type = ParsedFunction
expression = '((1-x)*(1-x)+(1-y)*(1-y))+10'
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./T_infinity_liquid]
[../]
[./Hw_liquid]
[../]
[./alpha_liquid]
[../]
[./T_infinity_vapor]
[../]
[./Hw_vapor]
[../]
[./alpha_vapor]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
value = 1000
[../]
[]
[AuxKernels]
[./alpha_liquid_ak]
type = FunctionAux
variable = alpha_liquid
function = alpha_liquid_fn
execute_on = initial
[../]
[./T_infinity_liquid_ak]
type = FunctionAux
variable = T_infinity_liquid
function = T_infinity_liquid_fn
execute_on = initial
[../]
[./Hw_liquid_ak]
type = FunctionAux
variable = Hw_liquid
function = Hw_liquid_fn
execute_on = initial
[../]
[./alpha_vapor_ak]
type = FunctionAux
variable = alpha_vapor
function = alpha_vapor_fn
execute_on = initial
[../]
[./T_infinity_vapor_ak]
type = FunctionAux
variable = T_infinity_vapor
function = T_infinity_vapor_fn
execute_on = initial
[../]
[./Hw_vapor_ak]
type = FunctionAux
variable = Hw_vapor
function = Hw_vapor_fn
execute_on = initial
[../]
[]
[BCs]
[./right]
type = CoupledConvectiveHeatFluxBC
variable = u
boundary = right
alpha = 'alpha_liquid alpha_vapor'
htc = 'Hw_liquid Hw_vapor'
T_infinity = 'T_infinity_liquid T_infinity_vapor'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/time_integrators/rk-2/2d-quadratic.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 20
ny = 20
elem_type = QUAD9
[]
[Functions]
[./ic]
type = ParsedFunction
expression = 0
[../]
[./forcing_fn]
type = ParsedFunction
expression = 2*t*((x*x)+(y*y))-(4*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*((x*x)+(y*y))
[../]
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic
[../]
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
implicit = true
[../]
[./diff]
type = Diffusion
variable = u
implicit = false
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
implicit = false
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
[./TimeIntegrator]
type = ExplicitMidpoint
[../]
solve_type = 'LINEAR'
start_time = 0.0
num_steps = 10
dt = 0.0001
l_tol = 1e-8
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/thermal_hydraulics/test/tests/components/heat_source_from_total_power/phy.plate.i)
[GlobalParams]
scaling_factor_temperature = 1e0
[]
[Functions]
[psf]
type = ParsedFunction
expression = 1
[]
[]
[SolidProperties]
[fuel-mat]
type = ThermalFunctionSolidProperties
k = 16
cp = 191.67
rho = 1.4583e4
[]
[gap-mat]
type = ThermalFunctionSolidProperties
k = 64
cp = 1272
rho = 865
[]
[clad-mat]
type = ThermalFunctionSolidProperties
k = 26
cp = 638
rho = 7.646e3
[]
[]
[Components]
[reactor]
type = TotalPower
power = 3.0e4
[]
[CH1:solid]
type = HeatStructurePlate
position = '0 -0.024 0'
orientation = '0 0 1'
length = 0.8
n_elems = 16
initial_T = 628.15
names = 'fuel gap clad'
widths = '0.003015 0.000465 0.00052'
depth = 1
n_part_elems = '20 2 2'
solid_properties = 'fuel-mat gap-mat clad-mat'
solid_properties_T_ref = '300 300 300'
[]
[CH1:hgen]
type = HeatSourceFromTotalPower
hs = CH1:solid
regions = 'fuel'
power = reactor
power_fraction = 1
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 1e-3
num_steps = 1
abort_on_solve_fail = true
solve_type = 'PJFNK'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-7
nl_max_its = 40
l_tol = 1e-5
l_max_its = 50
[]
[Outputs]
[out]
type = Exodus
[]
[]
(test/tests/time_integrators/actually_explicit_euler_verification/ee-2d-quadratic.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Functions]
[./ic]
type = ParsedFunction
expression = 0
[../]
[./forcing_fn]
type = ParsedFunction
expression = ((x*x)+(y*y))-(4*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic
[../]
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
preset = false
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
l_tol = 1e-13
start_time = 0.0
num_steps = 20
dt = 0.00005
[./TimeIntegrator]
type = ActuallyExplicitEuler
[../]
[]
[Outputs]
exodus = true
[./console]
type = Console
max_rows = 10
[../]
[]
(modules/navier_stokes/test/tests/finite_volume/cns/straight_channel_porosity_step/implicit-euler-basic-kt-primitive.i)
p_initial=1.01e5
T=273.15
# u refers to the superficial velocity
u_in=1
user_limiter='upwind'
[GlobalParams]
fp = fp
two_term_boundary_expansion = true
limiter = ${user_limiter}
[]
[Mesh]
[cartesian]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = 18
nx = 180
[]
[to_pt5]
input = cartesian
type = SubdomainBoundingBoxGenerator
bottom_left = '2 0 0'
top_right = '4 1 0'
block_id = 1
[]
[pt5]
input = to_pt5
type = SubdomainBoundingBoxGenerator
bottom_left = '4 0 0'
top_right = '6 1 0'
block_id = 2
[]
[to_pt25]
input = pt5
type = SubdomainBoundingBoxGenerator
bottom_left = '6 0 0'
top_right = '8 1 0'
block_id = 3
[]
[pt25]
input = to_pt25
type = SubdomainBoundingBoxGenerator
bottom_left = '8 0 0'
top_right = '10 1 0'
block_id = 4
[]
[to_pt5_again]
input = pt25
type = SubdomainBoundingBoxGenerator
bottom_left = '10 0 0'
top_right = '12 1 0'
block_id = 5
[]
[pt5_again]
input = to_pt5_again
type = SubdomainBoundingBoxGenerator
bottom_left = '12 0 0'
top_right = '14 1 0'
block_id = 6
[]
[to_one]
input = pt5_again
type = SubdomainBoundingBoxGenerator
bottom_left = '14 0 0'
top_right = '16 1 0'
block_id = 7
[]
[one]
input = to_one
type = SubdomainBoundingBoxGenerator
bottom_left = '16 0 0'
top_right = '18 1 0'
block_id = 8
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Problem]
fv_bcs_integrity_check = false
[]
[Variables]
[pressure]
type = MooseVariableFVReal
initial_condition = ${p_initial}
[]
[sup_vel_x]
type = MooseVariableFVReal
initial_condition = 1e-15
scaling = 1e-2
[]
[T_fluid]
type = MooseVariableFVReal
initial_condition = ${T}
scaling = 1e-5
[]
[]
[AuxVariables]
[vel_x]
type = MooseVariableFVReal
[]
[sup_mom_x]
type = MooseVariableFVReal
[]
[rho]
type = MooseVariableFVReal
[]
[worst_courant]
type = MooseVariableFVReal
[]
[porosity]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[vel_x]
type = ADMaterialRealAux
variable = vel_x
property = vel_x
execute_on = 'timestep_end'
[]
[sup_mom_x]
type = ADMaterialRealAux
variable = sup_mom_x
property = superficial_rhou
execute_on = 'timestep_end'
[]
[rho]
type = ADMaterialRealAux
variable = rho
property = rho
execute_on = 'timestep_end'
[]
[worst_courant]
type = Courant
variable = worst_courant
u = sup_vel_x
execute_on = 'timestep_end'
[]
[porosity]
type = MaterialRealAux
variable = porosity
property = porosity
execute_on = 'timestep_end'
[]
[]
[FVKernels]
[mass_time]
type = FVMatPropTimeKernel
mat_prop_time_derivative = 'dsuperficial_rho_dt'
variable = pressure
[]
[mass_advection]
type = PCNSFVKT
variable = pressure
eqn = "mass"
[]
[momentum_time]
type = FVMatPropTimeKernel
mat_prop_time_derivative = 'dsuperficial_rhou_dt'
variable = sup_vel_x
[]
[momentum_advection]
type = PCNSFVKT
variable = sup_vel_x
eqn = "momentum"
momentum_component = 'x'
[]
[eps_grad]
type = PNSFVPGradEpsilon
variable = sup_vel_x
momentum_component = 'x'
epsilon_function = 'eps'
[]
[energy_time]
type = FVMatPropTimeKernel
mat_prop_time_derivative = 'dsuperficial_rho_et_dt'
variable = T_fluid
[]
[energy_advection]
type = PCNSFVKT
variable = T_fluid
eqn = "energy"
[]
[]
[FVBCs]
[rho_left]
type = PCNSFVStrongBC
boundary = 'left'
variable = pressure
superficial_velocity = 'ud_in'
T_fluid = ${T}
eqn = 'mass'
[]
[rhou_left]
type = PCNSFVStrongBC
boundary = 'left'
variable = sup_vel_x
superficial_velocity = 'ud_in'
T_fluid = ${T}
eqn = 'momentum'
momentum_component = 'x'
[]
[rho_et_left]
type = PCNSFVStrongBC
boundary = 'left'
variable = T_fluid
superficial_velocity = 'ud_in'
T_fluid = ${T}
eqn = 'energy'
[]
[rho_right]
type = PCNSFVStrongBC
boundary = 'right'
variable = pressure
pressure = ${p_initial}
eqn = 'mass'
[]
[rhou_right]
type = PCNSFVStrongBC
boundary = 'right'
variable = sup_vel_x
pressure = ${p_initial}
eqn = 'momentum'
momentum_component = 'x'
[]
[rho_et_right]
type = PCNSFVStrongBC
boundary = 'right'
variable = T_fluid
pressure = ${p_initial}
eqn = 'energy'
[]
# Use these to help create more accurate cell centered gradients for cells adjacent to boundaries
[T_left]
type = FVDirichletBC
variable = T_fluid
value = ${T}
boundary = 'left'
[]
[sup_vel_left]
type = FVDirichletBC
variable = sup_vel_x
value = ${u_in}
boundary = 'left'
[]
[p_right]
type = FVDirichletBC
variable = pressure
value = ${p_initial}
boundary = 'right'
[]
[]
[Functions]
[ud_in]
type = ParsedVectorFunction
expression_x = '${u_in}'
[]
[eps]
type = ParsedFunction
expression = 'if(x < 2, 1,
if(x < 4, 1 - .5 / 2 * (x - 2),
if(x < 6, .5,
if(x < 8, .5 - .25 / 2 * (x - 6),
if(x < 10, .25,
if(x < 12, .25 + .25 / 2 * (x - 10),
if(x < 14, .5,
if(x < 16, .5 + .5 / 2 * (x - 14),
1))))))))'
[]
[]
[Materials]
[var_mat]
type = PorousPrimitiveVarMaterial
pressure = pressure
T_fluid = T_fluid
superficial_vel_x = sup_vel_x
fp = fp
porosity = porosity
[]
[porosity]
type = GenericFunctionMaterial
prop_names = 'porosity'
prop_values = 'eps'
[]
[]
[Executioner]
solve_type = NEWTON
line_search = 'bt'
type = Transient
nl_max_its = 20
[TimeStepper]
type = IterationAdaptiveDT
dt = 5e-5
optimal_iterations = 6
growth_factor = 1.2
[]
num_steps = 10000
end_time = 500
nl_abs_tol = 1e-8
[]
[Outputs]
[out]
type = Exodus
execute_on = 'final'
[]
checkpoint = true
[]
[Debug]
show_var_residual_norms = true
[]
(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
[]
(test/tests/mortar/aux-gap/gap.i)
[Mesh]
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[]
[secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[]
[]
[Variables]
[T]
block = '1 2'
[]
[lambda]
block = '10'
use_dual = true
[]
[]
[AuxVariables]
[gap]
block = '10'
[]
[]
[AuxKernels]
[gap]
type = WeightedGapAux
variable = gap
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln
variable = T
boundary = '3 4 5 6 7 8'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = '-4 + x^2 + y^2'
[]
[exact_soln]
type = ParsedFunction
expression = 'x^2 + y^2'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
exodus = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
(modules/porous_flow/examples/restart/gas_injection.i)
# Using the results from the equilibrium run to provide the initial condition for
# porepressure, we now inject a gas phase into the brine-saturated reservoir. In this
# example, where the mesh used is identical to the mesh used in gravityeq.i, we can use
# the basic restart capability by simply setting the initial condition for porepressure
# using the results from gravityeq.i.
#
# Even though the gravity equilibrium is established using a 2D mesh, in this example,
# we shift the mesh 0.1 m to the right and rotate it about the Y axis to make a 2D radial
# model.
#
# Methane injection takes place over the surface of the hole created by rotating the mesh,
# and hence the injection area is 2 pi r h. We can calculate this using an AreaPostprocessor,
# and then use this in a ParsedFunction to calculate the injection rate so that 10 kg/s of
# methane is injected.
#
# Results can be improved by uniformly refining the initial mesh.
#
# Note: as this example uses the results from a previous simulation, gravityeq.i MUST be
# run before running this input file.
[Mesh]
uniform_refine = 1
[file]
type = FileMeshGenerator
file = gravityeq_out.e
[]
[translate]
type = TransformGenerator
transform = TRANSLATE
vector_value = '0.1 0 0'
input = file
[]
coord_type = RZ
rz_coord_axis = Y
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 -9.81 0'
temperature_unit = Celsius
[]
[Variables]
[pp_liq]
initial_from_file_var = porepressure
[]
[sat_gas]
initial_condition = 0
[]
[]
[AuxVariables]
[temperature]
initial_condition = 50
[]
[xnacl]
initial_condition = 0.1
[]
[brine_density]
family = MONOMIAL
order = CONSTANT
[]
[methane_density]
family = MONOMIAL
order = CONSTANT
[]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[pp_gas]
family = MONOMIAL
order = CONSTANT
[]
[sat_liq]
family = MONOMIAL
order = CONSTANT
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
variable = pp_liq
[]
[flux0]
type = PorousFlowAdvectiveFlux
variable = pp_liq
[]
[mass1]
type = PorousFlowMassTimeDerivative
variable = sat_gas
fluid_component = 1
[]
[flux1]
type = PorousFlowAdvectiveFlux
variable = sat_gas
fluid_component = 1
[]
[]
[AuxKernels]
[brine_density]
type = PorousFlowPropertyAux
property = density
variable = brine_density
execute_on = 'initial timestep_end'
[]
[methane_density]
type = PorousFlowPropertyAux
property = density
variable = methane_density
phase = 1
execute_on = 'initial timestep_end'
[]
[pp_gas]
type = PorousFlowPropertyAux
property = pressure
phase = 1
variable = pp_gas
execute_on = 'initial timestep_end'
[]
[sat_liq]
type = PorousFlowPropertyAux
property = saturation
variable = sat_liq
execute_on = 'initial timestep_end'
[]
[]
[BCs]
[gas_injection]
type = PorousFlowSink
boundary = left
variable = sat_gas
flux_function = injection_rate
fluid_phase = 1
[]
[brine_out]
type = PorousFlowPiecewiseLinearSink
boundary = right
variable = pp_liq
multipliers = '0 1e9'
pt_vals = '0 1e9'
fluid_phase = 0
flux_function = 1e-6
use_mobility = true
[]
[]
[Functions]
[injection_rate]
type = ParsedFunction
symbol_values = injection_area
symbol_names = area
expression = '-10/area'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp_liq sat_gas'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
alpha = 1e-5
m = 0.5
sat_lr = 0.2
[]
[]
[FluidProperties]
[brine]
type = BrineFluidProperties
[]
[methane]
type = MethaneFluidProperties
[]
[methane_tab]
type = TabulatedBicubicFluidProperties
fp = methane
save_file = false
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temperature
[]
[ps]
type = PorousFlow2PhasePS
phase0_porepressure = pp_liq
phase1_saturation = sat_gas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[brine]
type = PorousFlowBrine
compute_enthalpy = false
compute_internal_energy = false
xnacl = xnacl
phase = 0
[]
[methane]
type = PorousFlowSingleComponentFluid
compute_enthalpy = false
compute_internal_energy = false
fp = methane_tab
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-13 0 0 0 1e-13 0 0 0 1e-13'
[]
[relperm_liq]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
s_res = 0.2
sum_s_res = 0.3
[]
[relperm_gas]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 1
s_res = 0.1
sum_s_res = 0.3
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = ' asm lu NONZERO'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1e8
nl_abs_tol = 1e-12
nl_rel_tol = 1e-06
nl_max_its = 20
dtmax = 1e6
[TimeStepper]
type = IterationAdaptiveDT
dt = 1e1
[]
[]
[Postprocessors]
[mass_ph0]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'initial timestep_end'
[]
[mass_ph1]
type = PorousFlowFluidMass
fluid_component = 1
execute_on = 'initial timestep_end'
[]
[injection_area]
type = AreaPostprocessor
boundary = left
execute_on = initial
[]
[]
[Outputs]
execute_on = 'initial timestep_end'
exodus = true
perf_graph = true
checkpoint = true
[]
(test/tests/meshgenerators/flip_sideset_generator/flux_flip_3D.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmax = 3
ymax = 3
zmax = 3
[]
[subdomains]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x < 1 & y > 1 & y < 2'
block_id = 1
[]
[sideset]
type = ParsedGenerateSideset
input = subdomains
combinatorial_geometry = 'z < 1'
included_subdomains = '1'
normal = '1 0 0'
new_sideset_name = interior
[]
[flip]
type = FlipSidesetGenerator
input = sideset
boundary = interior
[]
[]
[AuxVariables]
[u]
[]
[]
[AuxKernels]
[diffusion]
type = FunctionAux
variable = u
function = func
[]
[]
[Functions]
[func]
type = ParsedFunction
expression = x+y+z
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Postprocessors]
[flux]
type = SideDiffusiveFluxIntegral
variable = u
boundary = interior
diffusivity = 1
[]
[area]
type = AreaPostprocessor
boundary = interior
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/mms/porosity_change/pressure-interpolation-corrected.i)
mu = 1.1
rho = 1.1
advected_interp_method = 'average'
velocity_interp_method = 'rc'
darcy = 1.1
forch = 1.1
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = -1
ymax = 1
nx = 2
ny = 2
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
Darcy_name = 'Darcy_coefficient'
Forchheimer_name = 'Forchheimer_coefficient'
porosity = porosity
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
v = v
porosity = porosity
pressure = pressure
smoothing_layers = 2
[]
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[v]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[AuxVariables]
[eps_out]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[eps_out]
type = FunctorAux
variable = eps_out
functor = porosity
execute_on = 'timestep_end'
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[mass_forcing]
type = FVBodyForce
variable = pressure
function = forcing_p
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = u
mu = ${mu}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = u
pressure = pressure
porosity = porosity
momentum_component = 'x'
[]
[u_drag]
type = PINSFVMomentumFriction
variable = u
momentum_component = 'x'
rho = ${rho}
speed = speed
mu = ${mu}
[]
[u_correction]
type = PINSFVMomentumFrictionCorrection
variable = u
momentum_component = 'x'
rho = ${rho}
speed = speed
mu = ${mu}
[]
[u_forcing]
type = INSFVBodyForce
variable = u
functor = forcing_u
momentum_component = 'x'
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = v
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = PINSFVMomentumDiffusion
variable = v
mu = ${mu}
porosity = porosity
momentum_component = 'y'
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = v
pressure = pressure
porosity = porosity
momentum_component = 'y'
[]
[v_drag]
type = PINSFVMomentumFriction
variable = v
momentum_component = 'y'
rho = ${rho}
speed = speed
mu = ${mu}
[]
[v_correction]
type = PINSFVMomentumFrictionCorrection
variable = v
momentum_component = 'y'
rho = ${rho}
speed = speed
mu = ${mu}
[]
[v_forcing]
type = INSFVBodyForce
variable = v
functor = forcing_v
momentum_component = 'y'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
functor = 'exact_u'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = v
functor = 'exact_v'
[]
[walls-u]
type = INSFVNoSlipWallBC
boundary = 'top bottom'
variable = u
function = 'exact_u'
[]
[walls-v]
type = INSFVNoSlipWallBC
boundary = 'top bottom'
variable = v
function = 'exact_v'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 'exact_p'
[]
[]
[FunctorMaterials]
[darcy]
type = ADGenericVectorFunctorMaterial
prop_names = 'Darcy_coefficient Forchheimer_coefficient'
prop_values = '${darcy} ${darcy} ${darcy} ${forch} ${forch} ${forch}'
[]
[speed]
type = PINSFVSpeedFunctorMaterial
superficial_vel_x = u
superficial_vel_y = v
porosity = porosity
[]
[]
[Functions]
[porosity]
type = ParsedFunction
expression = '.5 + .1 * sin(pi * x / 4) * cos(pi * y / 4)'
[]
[exact_u]
type = ParsedFunction
expression = 'sin((1/2)*y*pi)*cos((1/2)*x*pi)'
[]
[forcing_u]
type = ParsedFunction
expression = 'darcy*mu*sin((1/2)*y*pi)*cos((1/2)*x*pi) + (1/2)*forch*rho*sqrt(sin((1/4)*x*pi)^2*cos((1/2)*y*pi)^2 + sin((1/2)*y*pi)^2*cos((1/2)*x*pi)^2)*sin((1/2)*y*pi)*cos((1/2)*x*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5) - mu*(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5)*(0.1*pi^2*sin((1/4)*x*pi)*sin((1/4)*y*pi)*cos((1/2)*x*pi)*cos((1/2)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 + 0.025*pi^2*sin((1/4)*x*pi)*sin((1/2)*y*pi)*cos((1/2)*x*pi)*cos((1/4)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 + 0.01*pi^2*sin((1/4)*x*pi)^2*sin((1/4)*y*pi)^2*sin((1/2)*y*pi)*cos((1/2)*x*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^3 - 1/4*pi^2*sin((1/2)*y*pi)*cos((1/2)*x*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5)) - mu*(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5)*(0.025*pi^2*sin((1/4)*x*pi)*sin((1/2)*y*pi)*cos((1/2)*x*pi)*cos((1/4)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 + 0.1*pi^2*sin((1/2)*x*pi)*sin((1/2)*y*pi)*cos((1/4)*x*pi)*cos((1/4)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 + 0.01*pi^2*sin((1/2)*y*pi)*cos((1/4)*x*pi)^2*cos((1/2)*x*pi)*cos((1/4)*y*pi)^2/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^3 - 1/4*pi^2*sin((1/2)*y*pi)*cos((1/2)*x*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5)) + 0.025*pi*mu*(0.1*pi*sin((1/4)*x*pi)*sin((1/4)*y*pi)*sin((1/2)*y*pi)*cos((1/2)*x*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 + (1/2)*pi*cos((1/2)*x*pi)*cos((1/2)*y*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5))*sin((1/4)*x*pi)*sin((1/4)*y*pi) - 0.025*pi*mu*(-0.1*pi*sin((1/2)*y*pi)*cos((1/4)*x*pi)*cos((1/2)*x*pi)*cos((1/4)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 - 1/2*pi*sin((1/2)*x*pi)*sin((1/2)*y*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5))*cos((1/4)*x*pi)*cos((1/4)*y*pi) + 0.1*pi*rho*sin((1/4)*x*pi)^2*sin((1/4)*y*pi)*sin((1/2)*y*pi)*cos((1/2)*x*pi)*cos((1/2)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 - 0.1*pi*rho*sin((1/2)*y*pi)^2*cos((1/4)*x*pi)*cos((1/2)*x*pi)^2*cos((1/4)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 - 1/2*pi*rho*sin((1/4)*x*pi)*sin((1/2)*y*pi)^2*cos((1/2)*x*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5) + (1/2)*pi*rho*sin((1/4)*x*pi)*cos((1/2)*x*pi)*cos((1/2)*y*pi)^2/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5) - pi*rho*sin((1/2)*x*pi)*sin((1/2)*y*pi)^2*cos((1/2)*x*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5) - 1/4*pi*(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5)*sin((1/4)*x*pi)*sin((3/2)*y*pi)'
symbol_names = 'mu rho darcy forch'
symbol_values = '${mu} ${rho} ${darcy} ${forch}'
[]
[exact_v]
type = ParsedFunction
expression = 'sin((1/4)*x*pi)*cos((1/2)*y*pi)'
[]
[forcing_v]
type = ParsedFunction
expression = 'darcy*mu*sin((1/4)*x*pi)*cos((1/2)*y*pi) + (1/2)*forch*rho*sqrt(sin((1/4)*x*pi)^2*cos((1/2)*y*pi)^2 + sin((1/2)*y*pi)^2*cos((1/2)*x*pi)^2)*sin((1/4)*x*pi)*cos((1/2)*y*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5) - mu*(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5)*(-0.1*pi^2*sin((1/4)*x*pi)^2*sin((1/4)*y*pi)*sin((1/2)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 + 0.025*pi^2*sin((1/4)*x*pi)^2*cos((1/4)*y*pi)*cos((1/2)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 + 0.01*pi^2*sin((1/4)*x*pi)^3*sin((1/4)*y*pi)^2*cos((1/2)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^3 - 1/4*pi^2*sin((1/4)*x*pi)*cos((1/2)*y*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5)) - mu*(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5)*(0.025*pi^2*sin((1/4)*x*pi)^2*cos((1/4)*y*pi)*cos((1/2)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 - 0.05*pi^2*cos((1/4)*x*pi)^2*cos((1/4)*y*pi)*cos((1/2)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 + 0.01*pi^2*sin((1/4)*x*pi)*cos((1/4)*x*pi)^2*cos((1/4)*y*pi)^2*cos((1/2)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^3 - 1/16*pi^2*sin((1/4)*x*pi)*cos((1/2)*y*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5)) + 0.025*pi*mu*(0.1*pi*sin((1/4)*x*pi)^2*sin((1/4)*y*pi)*cos((1/2)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 - 1/2*pi*sin((1/4)*x*pi)*sin((1/2)*y*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5))*sin((1/4)*x*pi)*sin((1/4)*y*pi) - 0.025*pi*mu*(-0.1*pi*sin((1/4)*x*pi)*cos((1/4)*x*pi)*cos((1/4)*y*pi)*cos((1/2)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 + (1/4)*pi*cos((1/4)*x*pi)*cos((1/2)*y*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5))*cos((1/4)*x*pi)*cos((1/4)*y*pi) + 0.1*pi*rho*sin((1/4)*x*pi)^3*sin((1/4)*y*pi)*cos((1/2)*y*pi)^2/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 - 0.1*pi*rho*sin((1/4)*x*pi)*sin((1/2)*y*pi)*cos((1/4)*x*pi)*cos((1/2)*x*pi)*cos((1/4)*y*pi)*cos((1/2)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 - pi*rho*sin((1/4)*x*pi)^2*sin((1/2)*y*pi)*cos((1/2)*y*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5) - 1/2*pi*rho*sin((1/4)*x*pi)*sin((1/2)*x*pi)*sin((1/2)*y*pi)*cos((1/2)*y*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5) + (1/4)*pi*rho*sin((1/2)*y*pi)*cos((1/4)*x*pi)*cos((1/2)*x*pi)*cos((1/2)*y*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5) + (3/2)*pi*(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5)*cos((1/4)*x*pi)*cos((3/2)*y*pi)'
symbol_names = 'mu rho darcy forch'
symbol_values = '${mu} ${rho} ${darcy} ${forch}'
[]
[exact_p]
type = ParsedFunction
expression = 'sin((3/2)*y*pi)*cos((1/4)*x*pi)'
[]
[forcing_p]
type = ParsedFunction
expression = '-1/2*pi*rho*sin((1/4)*x*pi)*sin((1/2)*y*pi) - 1/2*pi*rho*sin((1/2)*x*pi)*sin((1/2)*y*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm 100 lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = false
csv = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2FunctorError
approximate = u
exact = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2v]
type = ElementL2FunctorError
approximate = v
exact = exact_v
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
type = ElementL2FunctorError
approximate = pressure
exact = exact_p
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(test/tests/ics/lagrange_ic/3d_second_order.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 5
ny = 5
nz = 5
elem_type = HEX27
[]
[Variables]
[./u]
order = SECOND
[../]
[]
[Functions]
[./afunc]
type = ParsedFunction
expression = x^2
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[ICs]
[./func_ic]
function = afunc
variable = u
type = FunctionIC
[../]
[]
(test/tests/bcs/ad_penalty_dirichlet_bc/function_penalty_dirichlet_bc_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = -4+x*x+y*y
[../]
[./solution]
type = ParsedGradFunction
value = x*x+y*y
grad_x = 2*x
grad_y = 2*y
[../]
[]
[Variables]
[./u]
order = SECOND
family = HIERARCHIC
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = ADDiffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = ADBodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'bc_all'
[./bc_all]
type = ADFunctionPenaltyDirichletBC
variable = u
function = solution
boundary = 'top left right bottom'
penalty = 1e6
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_rel_tol = 1e-14
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(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
[]
(test/tests/kernels/ad_scalar_kernel_constraint/diffusion_override_scalar.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[exact_fn]
type = ParsedFunction
value = 'x*x+y*y'
[]
[ffn]
type = ParsedFunction
value = -4
[]
[bottom_bc_fn]
type = ParsedFunction
value = -2*y
[]
[right_bc_fn]
type = ParsedFunction
value = 2*x
[]
[top_bc_fn]
type = ParsedFunction
value = 2*y
[]
[left_bc_fn]
type = ParsedFunction
value = -2*x
[]
[]
[Variables]
[u]
family = LAGRANGE
order = SECOND
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[Kernels]
# Make sure that we can derive from the scalar base class
# but actually not assign a scalar variable
[diff]
type = ADDiffusionNoScalar
variable = u
scalar_variable = lambda
[]
[ffnk]
type = ADBodyForce
variable = u
function = ffn
[]
[sk_lm]
type = ADScalarLMKernel
variable = u
kappa = lambda
pp_name = pp
value = 2.666666666666666
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bottom_bc_fn
[]
[right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = right_bc_fn
[]
[top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = top_bc_fn
[]
[left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = left_bc_fn
[]
[]
[Postprocessors]
# integrate the volume of domain since original objects set
# int(phi)=V0, rather than int(phi-V0)=0
[pp]
type = FunctionElementIntegral
function = 1
execute_on = initial
[]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-9
l_tol = 1.e-10
nl_max_its = 10
# This example builds an indefinite matrix, so "-pc_type hypre -pc_hypre_type boomeramg" cannot
# be used reliably on this problem. ILU(0) seems to do OK in both serial and parallel in my testing,
# I have not seen any zero pivot issues.
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'bjacobi ilu'
# This is a linear problem, so we don't need to recompute the
# Jacobian. This isn't a big deal for a Steady problems, however, as
# there is only one solve.
solve_type = 'LINEAR'
[]
[Outputs]
# exodus = true
csv = true
hide = lambda
[]
(test/tests/fvkernels/mms/advection-diffusion.i)
diff=1.1
a=1.1
[GlobalParams]
advected_interp_method = 'average'
[]
[Mesh]
[./gen_mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = -0.6
xmax = 0.6
nx = 64
[../]
[]
[Variables]
[./v]
family = MONOMIAL
order = CONSTANT
fv = true
[../]
[]
[FVKernels]
[./advection]
type = FVAdvection
variable = v
velocity = '${a} 0 0'
[../]
[./diffusion]
type = FVDiffusion
variable = v
coeff = coeff
[../]
[body_v]
type = FVBodyForce
variable = v
function = 'forcing'
[]
[]
[FVBCs]
[boundary]
type = FVFunctionDirichletBC
boundary = 'left right'
function = 'exact'
variable = v
[]
[]
[Materials]
[diff]
type = ADGenericFunctorMaterial
prop_names = 'coeff'
prop_values = '${diff}'
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = '3*x^2 + 2*x + 1'
[]
[forcing]
type = ParsedFunction
expression = '-${diff}*6 + ${a} * (6*x + 2)'
# expression = '-${diff}*6'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[./error]
type = ElementL2Error
variable = v
function = exact
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(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/solid_mechanics/test/tests/finite_strain_elastic/finite_strain_elastic_new_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
elem_type = HEX8
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Functions]
[./tdisp]
type = ParsedFunction
expression = '0.01 * t'
[../]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[./all]
strain = FINITE
add_variables = true
[../]
[../]
[../]
[]
[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
[../]
[./tdisp]
type = FunctionDirichletBC
variable = disp_z
boundary = front
function = tdisp
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1.684e5 0.176e5 0.176e5 1.684e5 0.176e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
dt = 0.05
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = -pc_hypre_type
petsc_options_value = boomeramg
nl_abs_tol = 1e-10
nl_rel_step_tol = 1e-10
dtmax = 10.0
nl_rel_tol = 1e-10
end_time = 1
dtmin = 0.05
num_steps = 10
nl_abs_step_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(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
[]
(examples/ex13_functions/ex13.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
ny = 100
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
[]
[Variables]
[./forced]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
# A ParsedFunction allows us to supply analytic expressions
# directly in the input file
[./bc_func]
type = ParsedFunction
expression = sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '16'
[../]
# This function is an actual compiled function
# We could have used ParsedFunction for this as well
[./forcing_func]
type = ExampleFunction
alpha = 16
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = forced
[../]
# This Kernel can take a function name to use
[./forcing]
type = BodyForce
variable = forced
function = forcing_func
[../]
[]
[BCs]
# The BC can take a function name to use
[./all]
type = FunctionDirichletBC
variable = forced
boundary = 'bottom right top left'
function = bc_func
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/solid_mechanics/test/tests/lagrangian/materials/kinematic_check/strain_check.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 3
ny = 3
nz = 3
elem_type = HEX8
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = true
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
new_system = true
formulation = TOTAL
strain = FINITE
add_variables = true
generate_output = 'cauchy_stress_xx cauchy_stress_yy cauchy_stress_zz cauchy_stress_xy'
[]
[]
[Functions]
[tdisp]
type = ParsedFunction
expression = '0.5 * t'
[]
[tdisp_quer]
type = ParsedFunction
expression = '0.5 * y * t'
[]
[]
[BCs]
[bottom_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[bottom_x]
type = DirichletBC
variable = disp_x
boundary = bottom
value = 0
[]
[bottom_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0
[]
[left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[right_x]
type = DirichletBC
variable = disp_x
boundary = right
value = 0
[]
[front_z]
type = DirichletBC
variable = disp_z
boundary = front
value = 0
[]
[back_z]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[]
[tdisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = tdisp
[]
[]
[Materials]
[elasticity]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 30
poissons_ratio = 0.4
[]
[stress]
type = ComputeLagrangianWrappedStress
[]
[stress_base]
type = ComputeLinearElasticStress
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1
dt = 0.25
[]
(modules/solid_mechanics/test/tests/thermal_expansion/ad_constant_expansion_stress_free_temp.i)
# This test involves only thermal expansion strains on a 2x2x2 cube of approximate
# steel material; however, in this case the stress free temperature of the material
# has been set to 200K so that there is an initial delta temperature of 100K.
# An initial temperature of 300K is given for the material,
# and an auxkernel is used to calculate the temperature in the entire cube to
# raise the temperature each time step. The final temperature is 675K
# The thermal strain increment should therefore be
# (675K - 300K) * 1.3e-5 1/K + 100K * 1.3e-5 1/K = 6.175e-3 m/m.
# This test uses a start up step to identify problems in the calculation of
# eigenstrains with a stress free temperature that is different from the initial
# value of the temperature in the problem
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./temp]
initial_condition = 300.0
[../]
[]
[AuxVariables]
[./eigenstrain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./eigenstrain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./eigenstrain_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./total_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./total_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./total_strain_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./temperature_load]
type = ParsedFunction
expression = t*(5000.0)+300.0
[../]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[./all]
strain = SMALL
incremental = true
add_variables = true
eigenstrain_names = eigenstrain
use_automatic_differentiation = true
[../]
[../]
[../]
[]
[Kernels]
[./temp]
type = Diffusion
variable = temp
[../]
[]
[AuxKernels]
[./eigenstrain_yy]
type = ADRankTwoAux
rank_two_tensor = eigenstrain
variable = eigenstrain_yy
index_i = 1
index_j = 1
execute_on = 'initial timestep_end'
[../]
[./eigenstrain_xx]
type = ADRankTwoAux
rank_two_tensor = eigenstrain
variable = eigenstrain_xx
index_i = 0
index_j = 0
execute_on = 'initial timestep_end'
[../]
[./eigenstrain_zz]
type = ADRankTwoAux
rank_two_tensor = eigenstrain
variable = eigenstrain_zz
index_i = 2
index_j = 2
execute_on = 'initial timestep_end'
[../]
[./total_strain_yy]
type = ADRankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yy
index_i = 1
index_j = 1
execute_on = 'initial timestep_end'
[../]
[./total_strain_xx]
type = ADRankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xx
index_i = 0
index_j = 0
execute_on = 'initial timestep_end'
[../]
[./total_strain_zz]
type = ADRankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zz
index_i = 2
index_j = 2
execute_on = 'initial timestep_end'
[../]
[]
[BCs]
[./x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./z_bot]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[./temp]
type = FunctionDirichletBC
variable = temp
function = temperature_load
boundary = 'left right'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./small_stress]
type = ADComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain]
type = ADComputeThermalExpansionEigenstrain
stress_free_temperature = 200
thermal_expansion_coeff = 1.3e-5
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = -0.0125
n_startup_steps = 1
end_time = 0.075
dt = 0.0125
dtmin = 0.0001
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[./eigenstrain_xx]
type = ElementAverageValue
variable = eigenstrain_xx
execute_on = 'initial timestep_end'
[../]
[./eigenstrain_yy]
type = ElementAverageValue
variable = eigenstrain_yy
execute_on = 'initial timestep_end'
[../]
[./eigenstrain_zz]
type = ElementAverageValue
variable = eigenstrain_zz
execute_on = 'initial timestep_end'
[../]
[./total_strain_xx]
type = ElementAverageValue
variable = total_strain_xx
execute_on = 'initial timestep_end'
[../]
[./total_strain_yy]
type = ElementAverageValue
variable = total_strain_yy
execute_on = 'initial timestep_end'
[../]
[./total_strain_zz]
type = ElementAverageValue
variable = total_strain_zz
execute_on = 'initial timestep_end'
[../]
[./temperature]
type = AverageNodalVariableValue
variable = temp
execute_on = 'initial timestep_end'
[../]
[]
(test/tests/bcs/coupled_var_neumann/coupled_var_neumann.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxVariables]
[./coupled_bc_var]
[../]
[]
[ICs]
[./coupled_bc_var]
type = FunctionIC
variable = coupled_bc_var
function = set_coupled_bc_var
[../]
[]
[Functions]
[./set_coupled_bc_var]
type = ParsedFunction
expression = 'y - 0.5'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = CoupledVarNeumannBC
variable = u
boundary = 1
v = coupled_bc_var
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/phy.T_wall_transfer_3eqn_y.i)
# Testing that T_solid gets properly projected onto a pipe
# That's why Hw in pipe1 is set to 0, so we do not have any heat exchange
# Note that the pipe and the heat structure have an opposite orientation, which
# is crucial for this test.
[GlobalParams]
initial_p = 1.e5
initial_vel = 0.
initial_T = 300.
closures = simple_closures
[]
[FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[SolidProperties]
[wall-mat]
type = ThermalFunctionSolidProperties
k = 100.0
rho = 100.0
cp = 100.0
[]
[]
[Functions]
[T_init]
type = ParsedFunction
expression = '290 + sin((1 - y) * pi * 1.4)'
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
position = '0.2 0 0'
orientation = '0 1 0'
length = 1
n_elems = 50
A = 9.6858407346e-01
D_h = 6.1661977237e+00
f = 0.01
fp = eos
[]
[hs]
type = HeatStructureCylindrical
position = '0.1 1 0'
orientation = '0 -1 0'
length = 1
n_elems = 50
solid_properties = 'wall-mat'
solid_properties_T_ref = '300'
n_part_elems = 3
widths = '0.1'
names = 'wall'
initial_T = T_init
[]
[hxconn]
type = HeatTransferFromHeatStructure1Phase
hs = hs
hs_side = outer
flow_channel = pipe1
Hw = 0
P_hf = 6.2831853072e-01
[]
[inlet]
type = SolidWall1Phase
input = 'pipe1:in'
[]
[outlet]
type = SolidWall1Phase
input = 'pipe1:out'
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
dt = 1
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-6
nl_max_its = 20
l_tol = 1e-3
l_max_its = 300
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
start_time = 0.0
num_steps = 1
[]
[Outputs]
[out]
type = Exodus
show = 'T_wall T_solid'
[]
print_linear_residuals = false
[]
(test/tests/transfers/multiapp_nearest_node_transfer/fromsub_fixed_meshes_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 0.1
ymax = 0.1
displacements = 'disp_x disp_y'
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[Functions]
[./disp_fun]
type = ParsedFunction
expression = 2*t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[AuxKernels]
[./disp_kern]
type = FunctionAux
variable = disp_x
function = disp_fun
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 0.01
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/restart_subapp_ic/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 1
nx = 10
[]
[Functions]
[u_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[fn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = FunctionDirichletBC
variable = u
boundary = right
function = u_fn
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(test/tests/fvkernels/mms/skewness-correction/two_term_extrapol/advection-outflow.i)
diff=1
a=1
[GlobalParams]
advected_interp_method = 'average'
[]
[Mesh]
[./gen_mesh]
type = FileMeshGenerator
file = skewed.msh
[../]
[]
[Variables]
[./v]
type = MooseVariableFVReal
face_interp_method = 'skewness-corrected'
[../]
[]
[FVKernels]
[./advection]
type = FVAdvection
variable = v
velocity = '${a} 0 0'
[../]
[./diffusion]
type = FVDiffusion
variable = v
coeff = coeff
[../]
[./body]
type = FVBodyForce
variable = v
function = 'forcing'
[../]
[]
[FVBCs]
[left]
type = FVFunctionDirichletBC
boundary = 'left'
function = 'exact'
variable = v
[]
[top]
type = FVNeumannBC
boundary = 'top'
value = 0
variable = v
[]
[bottom]
type = FVNeumannBC
boundary = 'bottom'
value = 0
variable = v
[]
[right]
type = FVConstantScalarOutflowBC
variable = v
velocity = '${a} 0 0'
boundary = 'right'
[]
[]
[Materials]
[diff]
type = ADGenericFunctorMaterial
prop_names = 'coeff'
prop_values = '${diff}'
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = 'cos(x)'
[]
[forcing]
type = ParsedFunction
expression = 'cos(x) - sin(x)'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type -snes_linesearch_minlambda'
petsc_options_value = 'hypre boomeramg 1e-9'
[]
[Outputs]
csv = true
[]
[Postprocessors]
[./error]
type = ElementL2Error
variable = v
function = exact
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(test/tests/materials/boundary_material/bnd_coupling_vol.i)
#
# Coupling volumetric material property inside boundary restricted material
# Also bringing boundary restricted material inside another boundary restricted
# material
#
# Solving: k \Laplace u + u - f = 0
#
# u = x^2 + y^2
# k = 3, but is decomposed as k3vol = k1vol + k2vol, where k1vol = 1 and k2vol = 2
#
# Boundary material property is computed as k3bnd = k1vol + k2bnd
#
# The material properties with suffix `vol` are volumetric, the ones with suffix `bnd`
# are boundary restricted
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 4
ny = 4
elem_type = QUAD9
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = x*x+y*y
[../]
[./f_fn]
type = ParsedFunction
expression = -4*3+x*x+y*y
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]
[Kernels]
[./diff]
type = DiffMKernel
variable = u
offset = 0
mat_prop = k3vol
[../]
[./r]
type = Reaction
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = f_fn
[../]
[]
[BCs]
[./all]
type = MatDivergenceBC
variable = u
prop_name = k3bnd
boundary = 'left right top bottom'
[../]
[]
[Materials]
[./k1vol]
type = GenericConstantMaterial
prop_names = 'k1vol'
prop_values = 1
block = 0
[../]
[./k2vol]
type = GenericConstantMaterial
prop_names = 'k2vol'
prop_values = 2
block = 0
[../]
[./k2bnd]
type = GenericConstantMaterial
prop_names = 'k2bnd'
prop_values = 2
boundary = 'left right top bottom'
[../]
[./k3vol]
type = SumMaterial
sum_prop_name = k3vol
mp1 = k1vol
mp2 = k2vol
block = 0
val1 = 1
val2 = 2
[../]
[./k3bnd]
type = SumMaterial
sum_prop_name = 'k3bnd'
mp1 = k1vol
mp2 = k2bnd
boundary = 'left right top bottom'
val1 = 1
val2 = 2
[../]
[]
[Postprocessors]
[./l2err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/auxkernels/material_rate_real/material_rate_real.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
[]
[AuxVariables]
[rate]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[rate]
type = MaterialRateRealAux
variable = rate
property = prop
[]
[]
[Variables]
[u]
[]
[]
[Functions]
[func]
type = ParsedFunction
expression = t*t/2
[]
[]
[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
[]
[]
[Materials]
[mat]
type = GenericFunctionMaterial
prop_names = prop
prop_values = func
block = 0
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Postprocessors]
[rate]
type = PointValue
point = '0.5 0.5 0'
variable = rate
[]
[]
[Outputs]
csv = True
[]
(modules/contact/test/tests/frictional/sliding_elastic_blocks_2d/sliding_elastic_blocks_2d.i)
[Mesh]
file = sliding_elastic_blocks_2d.e
[]
[GlobalParams]
volumetric_locking_correction = false
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./penetration]
[../]
[./saved_x]
[../]
[./saved_y]
[../]
[./diag_saved_x]
[../]
[./diag_saved_y]
[../]
[./inc_slip_x]
[../]
[./inc_slip_y]
[../]
[./accum_slip_x]
[../]
[./accum_slip_y]
[../]
[./accum_slip]
[../]
[./tang_force_x]
[../]
[./tang_force_y]
[../]
[]
[Functions]
[./vertical_movement]
type = ParsedFunction
expression = -t
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
strain = FINITE
save_in = 'saved_x saved_y'
diag_save_in = 'diag_saved_x diag_saved_y'
[../]
[]
[AuxKernels]
[./inc_slip_x]
type = PenetrationAux
variable = inc_slip_x
quantity = incremental_slip_x
boundary = 3
paired_boundary = 2
[../]
[./inc_slip_y]
type = PenetrationAux
variable = inc_slip_y
quantity = incremental_slip_y
boundary = 3
paired_boundary = 2
[../]
[./accum_slip]
type = PenetrationAux
variable = accum_slip
execute_on = timestep_end
quantity = accumulated_slip
boundary = 3
paired_boundary = 2
[../]
[./tangential_force_x]
type = PenetrationAux
variable = tang_force_x
execute_on = timestep_end
quantity = tangential_force_x
boundary = 3
paired_boundary = 2
[../]
[./tangential_force_y]
type = PenetrationAux
variable = tang_force_y
execute_on = timestep_end
quantity = tangential_force_y
boundary = 3
paired_boundary = 2
[../]
[./accum_slip_x]
type = AccumulateAux
variable = accum_slip_x
accumulate_from_variable = inc_slip_x
execute_on = timestep_end
[../]
[./accum_slip_y]
type = AccumulateAux
variable = accum_slip_y
accumulate_from_variable = inc_slip_y
execute_on = timestep_end
[../]
[./penetration]
type = PenetrationAux
variable = penetration
boundary = 3
paired_boundary = 2
[../]
[]
[Postprocessors]
[./bot_react_x]
type = NodalSum
variable = saved_x
boundary = 1
[../]
[./bot_react_y]
type = NodalSum
variable = saved_y
boundary = 1
[../]
[./top_react_x]
type = NodalSum
variable = saved_x
boundary = 4
[../]
[./top_react_y]
type = NodalSum
variable = saved_y
boundary = 4
[../]
[./ref_resid_x]
type = NodalL2Norm
execute_on = timestep_end
variable = saved_x
[../]
[./ref_resid_y]
type = NodalL2Norm
execute_on = timestep_end
variable = saved_y
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = 4
value = -0.005
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = vertical_movement
[../]
[]
[Materials]
[./left]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1.0e7
poissons_ratio = 0.3
[../]
[./right]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
line_search = 'none'
l_max_its = 100
nl_max_its = 1000
dt = 0.01
end_time = 0.05
num_steps = 1000
nl_rel_tol = 1e-16
nl_abs_tol = 1e-09
dtmin = 0.01
l_tol = 1e-3
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
[]
[Outputs]
file_base = sliding_elastic_blocks_2d_out
print_linear_residuals = true
perf_graph = true
[./exodus]
type = Exodus
elemental_as_nodal = true
[../]
[./console]
type = Console
max_rows = 5
[../]
[]
[Contact]
[./leftright]
secondary = 3
primary = 2
model = coulomb
friction_coefficient = '0.25'
penalty = 1e6
[../]
[]
[Dampers]
[./contact_slip]
type = ContactSlipDamper
secondary = 3
primary = 2
[../]
[]
(modules/solid_mechanics/examples/coal_mining/cosserat_mc_wp_sticky_longitudinal.i)
# Strata deformation and fracturing around a coal mine
#
# A 2D geometry is used that simulates a longitudinal section of
# the coal mine. The model is actually 3D, but the "x"
# dimension is only 10m long, meshed with 1 element, and
# there is no "x" displacement. The mine is 400m deep
# and just the roof is studied (0<=z<=400). The model sits
# between -300<=y<=1800. The excavation sits in 0<=y<=1500. The
# excavation height is 3m (ie, the excavation lies within
# 0<=z<=3).
#
# Time is meaningless in this example
# as quasi-static solutions are sought at each timestep, but
# the number of timesteps controls the resolution of the
# process.
#
# The boundary conditions for this elastic simulation are:
# - disp_x = 0 everywhere
# - disp_y = 0 at y=-300 and y=1800
# - disp_z = 0 at z=0, but there is a time-dependent
# Young's modulus that simulates excavation
# - wc_x = 0 at y=300 and y=1800.
# That is, rollers on the sides, free at top,
# and prescribed at bottom in the unexcavated portion.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa. The initial stress is consistent with
# the weight force from density 2500 kg/m^3, ie, stress_zz = -0.025*(300-z) MPa
# where gravity = 10 m.s^-2 = 1E-5 MPa m^2/kg. The maximum and minimum
# principal horizontal stresses are assumed to be equal to 0.8*stress_zz.
#
# Material properties:
# Young's modulus = 8 GPa
# Poisson's ratio = 0.25
# Cosserat layer thickness = 1 m
# Cosserat-joint normal stiffness = large
# Cosserat-joint shear stiffness = 1 GPa
# MC cohesion = 3 MPa
# MC friction angle = 37 deg
# MC dilation angle = 8 deg
# MC tensile strength = 1 MPa
# MC compressive strength = 100 MPa
#
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
xmin = -5
xmax = 5
nz = 40
zmin = 0
zmax = 400
bias_z = 1.1
ny = 140 # 15m elements
ymin = -300
ymax = 1800
[]
[left]
type = SideSetsAroundSubdomainGenerator
block = 0
new_boundary = 11
normal = '0 -1 0'
input = generated_mesh
[]
[right]
type = SideSetsAroundSubdomainGenerator
block = 0
new_boundary = 12
normal = '0 1 0'
input = left
[]
[front]
type = SideSetsAroundSubdomainGenerator
block = 0
new_boundary = 13
normal = '-1 0 0'
input = right
[]
[back]
type = SideSetsAroundSubdomainGenerator
block = 0
new_boundary = 14
normal = '1 0 0'
input = front
[]
[top]
type = SideSetsAroundSubdomainGenerator
block = 0
new_boundary = 15
normal = '0 0 1'
input = back
[]
[bottom]
type = SideSetsAroundSubdomainGenerator
block = 0
new_boundary = 16
normal = '0 0 -1'
input = top
[]
[excav]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '-5 0 0'
top_right = '5 1500 3'
input = bottom
[]
[roof]
type = SideSetsAroundSubdomainGenerator
block = 1
new_boundary = 18
normal = '0 0 1'
input = excav
[]
[]
[GlobalParams]
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
[]
[Variables]
[./disp_y]
[../]
[./disp_z]
[../]
[./wc_x]
[../]
[]
[Kernels]
[./cy_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_y
component = 1
[../]
[./cz_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_z
component = 2
[../]
[./x_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[../]
[./x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[../]
[./gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6 # remember this is in MPa
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./wc_y]
[../]
[./wc_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[../]
[./stress_yx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yx
index_i = 1
index_j = 0
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zx
index_i = 2
index_j = 0
[../]
[./stress_zy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zy
index_i = 2
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./mc_shear]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_internal_parameter
variable = mc_shear
[../]
[./mc_tensile]
type = MaterialStdVectorAux
index = 1
property = mc_plastic_internal_parameter
variable = mc_tensile
[../]
[./wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
[../]
[./wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
[../]
[./mc_shear_f]
type = MaterialStdVectorAux
index = 6
property = mc_plastic_yield_function
variable = mc_shear_f
[../]
[./mc_tensile_f]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_yield_function
variable = mc_tensile_f
[../]
[./wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
[../]
[./wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
[../]
[]
[BCs]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '11 12'
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '16'
value = 0.0
[../]
[./no_wc_x]
type = DirichletBC
variable = wc_x
boundary = '11 12'
value = 0.0
[../]
[./roof]
type = StickyBC
variable = disp_z
min_value = -3.0
boundary = '18'
[../]
[]
[Functions]
[./ini_xx]
type = ParsedFunction
expression = '-0.8*2500*10E-6*(400-z)'
[../]
[./ini_zz]
type = ParsedFunction
expression = '-2500*10E-6*(400-z)'
[../]
[./excav_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval slope'
symbol_values = '1.0 0 1500.0 1E-9 1 15'
# excavation face at ymin+(ymax-ymin)*min(t/end_t,1)
# slope is the distance over which the modulus reduces from maxval to minval
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,if(y<ymin+(ymax-ymin)*min(t/end_t,1)+slope,minval+(maxval-minval)*(y-(ymin+(ymax-ymin)*min(t/end_t,1)))/slope,maxval))'
[../]
[./density_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval'
symbol_values = '1.0 0 1500.0 0 2500'
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,maxval)'
[../]
[]
[UserObjects]
[./mc_coh_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 2.99 # MPa
value_residual = 3.01 # MPa
rate = 1.0
[../]
[./mc_fric]
type = SolidMechanicsHardeningConstant
value = 0.65 # 37deg
[../]
[./mc_dil]
type = SolidMechanicsHardeningConstant
value = 0.15 # 8deg
[../]
[./mc_tensile_str_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.0 # MPa
rate = 1.0
[../]
[./mc_compressive_str]
type = SolidMechanicsHardeningCubic
value_0 = 100 # Large!
value_residual = 100
internal_limit = 0.1
[../]
[./wp_coh_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_tan_fric]
type = SolidMechanicsHardeningConstant
value = 0.36 # 20deg
[../]
[./wp_tan_dil]
type = SolidMechanicsHardeningConstant
value = 0.18 # 10deg
[../]
[./wp_tensile_str_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_compressive_str_soften]
type = SolidMechanicsHardeningCubic
value_0 = 100
value_residual = 1.0
internal_limit = 1.0
[../]
[]
[Materials]
[./elasticity_tensor_0]
type = ComputeLayeredCosseratElasticityTensor
block = 0
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
[../]
[./elasticity_tensor_1]
type = ComputeLayeredCosseratElasticityTensor
block = 1
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
elasticity_tensor_prefactor = excav_sideways
[../]
[./strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[../]
[./ini_stress]
type = ComputeEigenstrainFromInitialStress
eigenstrain_name = ini_stress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
[../]
[./stress_0]
type = ComputeMultipleInelasticCosseratStress
block = 0
inelastic_models = 'mc wp'
cycle_models = true
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./stress_1]
# this is needed so as to correctly apply the initial stress
type = ComputeMultipleInelasticCosseratStress
block = 1
inelastic_models = ''
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./mc]
type = CappedMohrCoulombCosseratStressUpdate
warn_about_precision_loss = false
host_youngs_modulus = 8E3
host_poissons_ratio = 0.25
base_name = mc
tensile_strength = mc_tensile_str_strong_harden
compressive_strength = mc_compressive_str
cohesion = mc_coh_strong_harden
friction_angle = mc_fric
dilation_angle = mc_dil
max_NR_iterations = 100000
smoothing_tol = 0.1 # MPa # Must be linked to cohesion
yield_function_tol = 1E-9 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[../]
[./wp]
type = CappedWeakPlaneCosseratStressUpdate
warn_about_precision_loss = false
base_name = wp
cohesion = wp_coh_harden
tan_friction_angle = wp_tan_fric
tan_dilation_angle = wp_tan_dil
tensile_strength = wp_tensile_str_harden
compressive_strength = wp_compressive_str_soften
max_NR_iterations = 10000
tip_smoother = 0.1
smoothing_tol = 0.1 # MPa # Note, this must be tied to cohesion, otherwise get no possible return at cone apex
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0E-3
[../]
[./density_0]
type = GenericConstantMaterial
block = 0
prop_names = density
prop_values = 2500
[../]
[./density_1]
type = GenericFunctionMaterial
block = 1
prop_names = density
prop_values = density_sideways
[../]
[]
[Postprocessors]
[./subs]
type = PointValue
point = '0 0 400'
variable = disp_z
use_displaced_mesh = false
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
line_search = bt
nl_abs_tol = 1e-3
nl_rel_tol = 1e-5
l_max_its = 30
nl_max_its = 100
start_time = 0.0
dt = 0.01 # 1 element per step
end_time = 1.0
[]
[Outputs]
file_base = cosserat_mc_wp_sticky_longitudinal
time_step_interval = 1
print_linear_residuals = false
exodus = true
csv = true
console = true
#[./console]
# type = Console
# output_linear = false
#[../]
[]
(test/tests/time_integrators/aee/aee.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0.0
xmax = 1.0
[]
#still need BC for Energy, IC's for both.
[Variables]
active = 'Time'
[./Time]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[../]
[]
[Functions]
active = 'func'
[./func]
type = ParsedFunction
expression = 2.0*t
[../]
[]
[Kernels]
active = 't_time func_time'
[./t_time]
type = TimeDerivative
variable = Time
[../]
[./func_time]
type = BodyForce
variable = Time
function = func
[../]
[]
[BCs]
active = 'Top_Temperature'
[./Top_Temperature]
type = NeumannBC
variable = Time
boundary = 'left right'
[../]
[]
[Executioner]
type = Transient
scheme = 'BDF2'
#scheme = 'crank-nicolson'
start_time = 0
num_steps = 4
nl_abs_tol = 1e-15
petsc_options = '-snes_converged_reason'
abort_on_solve_fail = true
[./TimeStepper]
type = AB2PredictorCorrector
dt = .01
e_max = 10
e_tol = 1
[../]
[]
[Outputs]
exodus = true
[]
(modules/level_set/test/tests/kernels/advection/advection_mms.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 12
nx = 48
[]
[Adaptivity]
steps = 5
marker = marker
[./Markers]
[./marker]
type = UniformMarker
mark = REFINE
[../]
[../]
[]
[Variables]
[./phi]
[../]
[]
[AuxVariables]
[./velocity]
family = LAGRANGE_VEC
[../]
[]
[ICs]
[./vel_ic]
type = VectorFunctionIC
variable = velocity
function = velocity_func
[]
[]
[BCs]
[./left]
type = FunctionDirichletBC
boundary = 'left'
function = phi_exact
variable = phi
[../]
[]
[Functions]
[./phi_exact]
type = ParsedFunction
expression = 'a*sin(pi*x/b)*cos(pi*x)'
symbol_names = 'a b'
symbol_values = '2 12'
[../]
[./phi_mms]
type = ParsedFunction
expression = '-2*pi*a*sin(pi*x)*sin(pi*x/b) + 2*pi*a*cos(pi*x)*cos(pi*x/b)/b'
symbol_names = 'a b'
symbol_values = '2 12'
[../]
[./velocity_func]
type = ParsedVectorFunction
expression_x = '2'
expression_y = '2'
[../]
[]
[Kernels]
[./phi_advection]
type = LevelSetAdvection
variable = phi
velocity = velocity
[../]
[./phi_forcing]
type = BodyForce
variable = phi
function = phi_mms
[../]
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = phi_exact
variable = phi
[../]
[./h]
type = AverageElementSize
[../]
[]
[VectorPostprocessors]
active = ''
[./results]
type = LineValueSampler
variable = phi
start_point = '0 0 0'
end_point = '12 0 0'
num_points = 500
sort_by = x
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-10
solve_type = NEWTON
# A steady-state pure advection problem is numerically challenging,
# it has a zero diagonal in the Jabocian matrix. The following solver
# settings seem to reliably solve this problem.
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
[]
[Outputs]
execute_on = 'TIMESTEP_END'
csv = true
[]
(modules/solid_mechanics/test/tests/eigenstrain/reducedOrderRZLinearConstant.i)
#
# This test checks whether the ComputeReducedOrderEigenstrain is functioning properly.
#
# If instead of 'fred', 'thermal_eigenstrain' is given to
# eigenstrain_names in the Physics/SolidMechanics/QuasiStatic/all block, the output will be
# identical since the thermal strain is constant in the elements.
#
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = false
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 1
xmax = 3
xmin = 1
ymax = 1
ymin = 0
[]
[Functions]
[./tempBC]
type = ParsedFunction
expression = '700+2*t*t'
[../]
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
initial_condition = 700
[../]
[]
[AuxVariables]
[./hydro_constant]
order = CONSTANT
family = MONOMIAL
[../]
[./hydro_first]
order = FIRST
family = MONOMIAL
[../]
[./hydro_second]
order = SECOND
family = MONOMIAL
[../]
[./sxx_constant]
order = CONSTANT
family = MONOMIAL
[../]
[./sxx_first]
order = FIRST
family = MONOMIAL
[../]
[./sxx_second]
order = SECOND
family = MONOMIAL
[../]
[./szz_constant]
order = CONSTANT
family = MONOMIAL
[../]
[./szz_first]
order = FIRST
family = MONOMIAL
[../]
[./szz_second]
order = SECOND
family = MONOMIAL
[../]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[./all]
add_variables = true
strain = SMALL
incremental = true
temperature = temp
eigenstrain_names = 'fred' #'thermal_eigenstrain'
[../]
[../]
[../]
[]
[Kernels]
[./heat]
type = Diffusion
variable = temp
[../]
[]
[AuxKernels]
[./hydro_constant_aux]
type = RankTwoScalarAux
variable = hydro_constant
rank_two_tensor = stress
scalar_type = Hydrostatic
[../]
[./hydro_first_aux]
type = RankTwoScalarAux
variable = hydro_first
rank_two_tensor = stress
scalar_type = Hydrostatic
[../]
[./hydro_second_aux]
type = RankTwoScalarAux
variable = hydro_second
rank_two_tensor = stress
scalar_type = Hydrostatic
[../]
[./sxx_constant_aux]
type = RankTwoAux
variable = sxx_constant
rank_two_tensor = stress
index_i = 0
index_j = 0
[../]
[./sxx_first_aux]
type = RankTwoAux
variable = sxx_first
rank_two_tensor = stress
index_i = 0
index_j = 0
[../]
[./sxx_second_aux]
type = RankTwoAux
variable = sxx_second
rank_two_tensor = stress
index_i = 0
index_j = 0
[../]
[./szz_constant_aux]
type = RankTwoAux
variable = szz_constant
rank_two_tensor = stress
index_i = 2
index_j = 2
[../]
[./szz_first_aux]
type = RankTwoAux
variable = szz_first
rank_two_tensor = stress
index_i = 2
index_j = 2
[../]
[./szz_second_aux]
type = RankTwoAux
variable = szz_second
rank_two_tensor = stress
index_i = 2
index_j = 2
[../]
[]
[BCs]
[./no_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom top'
value = 0.0
[../]
[./temp_right]
type = FunctionDirichletBC
variable = temp
boundary = right
function = tempBC
[../]
[./temp_left]
type = FunctionDirichletBC
variable = temp
boundary = left
function = tempBC
[../]
[]
[Materials]
[./fuel_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1
poissons_ratio = 0
[../]
[./fuel_thermal_expansion]
type = ComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 1e-6
temperature = temp
stress_free_temperature = 700.0
eigenstrain_name = 'thermal_eigenstrain'
[../]
[./reduced_order_eigenstrain]
type = ComputeReducedOrderEigenstrain
input_eigenstrain_names = 'thermal_eigenstrain'
eigenstrain_name = 'fred'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew '
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type'
petsc_options_value = '70 hypre boomeramg'
dt = 1
num_steps = 10
nl_rel_tol = 1e-8
[]
[Postprocessors]
[./_dt]
type = TimestepSize
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/restart/restart_subapp_not_parent/two_step_solve_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*t*(x*x+y*y)
[../]
[./forcing_fn]
type = ParsedFunction
expression = 2*t*(x*x+y*y)-4*t*t
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]
[ICs]
[./u_var]
type = FunctionIC
variable = u
function = exact_fn
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[../]
[]
[Postprocessors]
[./average]
type = ElementAverageValue
variable = u
[../]
[]
[Executioner]
type = Transient
start_time = 0.0
end_time = 2.0
dt = 1.0
[]
[Outputs]
[./checkpoint]
type = Checkpoint
num_files = 3
[../]
[]
(modules/richards/test/tests/user_objects/uo2.i)
# Density User objects give the correct value
#
# If you want to add another test for another UserObject
# then add the UserObject, add a Function defining the expected result,
# add an AuxVariable and AuxKernel that will record the UserObjects value
# and finally add a NodalL2Error that compares this with the Function
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E6
[../]
[./DensityIdeal]
type = RichardsDensityIdeal
p0 = 33333
slope = 1.1E-2
[../]
[./DensityMethane20degC]
type = RichardsDensityMethane20degC
[../]
[./DensityVDW]
type = RichardsDensityVDW
a = 0.2303
b = 4.31E-4
temperature = 293
molar_mass = 16.04246E-3
infinity_ratio = 10
[../]
[./DensityConstBulkCut]
type = RichardsDensityConstBulkCut
dens0 = 1000
bulk_mod = 2E6
cut_limit = 1E6
zero_point = -1E6
[../]
# following are unimportant in this test
[./SeffVG]
type = RichardsSeff1VG
m = 0.8
al = 1E-6
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.10101
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0.054321
sum_s_res = 0.054321
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E5
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = x
[../]
[./answer_DensityConstBulk]
type = ParsedFunction
expression = dens0*exp(x/bulk_mod)
symbol_names = 'dens0 bulk_mod'
symbol_values = '1000 2E6'
[../]
[./answer_dDensityConstBulk]
type = GradParsedFunction
direction = '1 0 0'
expression = dens0*exp(x/bulk_mod)
symbol_names = 'dens0 bulk_mod'
symbol_values = '1000 2E6'
[../]
[./answer_d2DensityConstBulk]
type = Grad2ParsedFunction
direction = '1 0 0'
expression = dens0*exp(x/bulk_mod)
symbol_names = 'dens0 bulk_mod'
symbol_values = '1000 2E6'
[../]
[./answer_DensityIdeal]
type = ParsedFunction
expression = slope*(x-p0)
symbol_names = 'p0 slope'
symbol_values = '33333 1.1E-2'
[../]
[./answer_dDensityIdeal]
type = GradParsedFunction
direction = '1 0 0'
expression = slope*(x-p0)
symbol_names = 'p0 slope'
symbol_values = '33333 1.1E-2'
[../]
[./answer_d2DensityIdeal]
type = Grad2ParsedFunction
direction = '1 0 0'
expression = slope*(x-p0)
symbol_names = 'p0 slope'
symbol_values = '33333 1.1E-2'
[../]
[./answer_DensityMethane20degC]
type = ParsedFunction
expression = if(x>0,(0.00654576947608E-3*x+1.04357716547E-13*x^2),0)+if(x<0,0.1*(e^(6.54576947608E-5*x)-1),0)
[../]
[./answer_dDensityMethane20degC]
type = GradParsedFunction
direction = '1 0 0'
expression = if(x>0,(0.00654576947608E-3*x+1.04357716547E-13*x^2),0)+if(x<0,0.1*(e^(6.54576947608E-5*x)-1),0)
[../]
[./answer_d2DensityMethane20degC]
type = Grad2ParsedFunction
direction = '1 0 0'
expression = if(x>0,(0.00654576947608E-3*x+1.04357716547E-13*x^2),0)+if(x<0,0.1*(e^(6.54576947608E-5*x)-1),0)
[../]
[./answer_DensityVDW]
type = ParsedFunction
expression = if(x>0,-(molar_mass*(-2+(2*pow(2,0.3333333333333333)*(a-3*b*(b*x+rt)))/pow(-2*pow(a,3)+9*pow(a,2)*b*(-2*b*x+rt)+pow(pow(a,3)*(a*pow(2*a+9*b*(2*b*x-rt),2)-4*pow(a-3*b*(b*x+rt),3)),0.5),0.3333333333333333)+(pow(2,0.6666666666666666)*pow(-2*pow(a,3)+9*pow(a,2)*b*(-2*b*x+rt)+pow(pow(a,3)*(a*pow(2*a+9*b*(2*b*x-rt),2)-4*pow(a-3*b*(b*x+rt),3)),0.5),0.3333333333333333))/a))/(6.*b)+(molar_mass*(-2+(2*pow(2,0.3333333333333333)*(a-3*b*(b*0+rt)))/pow(-2*pow(a,3)+9*pow(a,2)*b*(-2*b*0+rt)+pow(pow(a,3)*(a*pow(2*a+9*b*(2*b*0-rt),2)-4*pow(a-3*b*(b*0+rt),3)),0.5),0.3333333333333333)+(pow(2,0.6666666666666666)*pow(-2*pow(a,3)+9*pow(a,2)*b*(-2*b*0+rt)+pow(pow(a,3)*(a*pow(2*a+9*b*(2*b*0-rt),2)-4*pow(a-3*b*(b*0+rt),3)),0.5),0.3333333333333333))/a))/(6.*b),infinityratio*molar_mass*(e^(slope0*x)-1))
symbol_names = 'a b rt molar_mass infinityratio slope0'
symbol_values = '0.2303 0.000431 2436.1403 0.01604246 10 4.10485e-05'
[../]
[./answer_dDensityVDW]
type = GradParsedFunction
direction = '1 0 0'
expression = if(x>0,-(molar_mass*(-2+(2*pow(2,0.3333333333333333)*(a-3*b*(b*x+rt)))/pow(-2*pow(a,3)+9*pow(a,2)*b*(-2*b*x+rt)+pow(pow(a,3)*(a*pow(2*a+9*b*(2*b*x-rt),2)-4*pow(a-3*b*(b*x+rt),3)),0.5),0.3333333333333333)+(pow(2,0.6666666666666666)*pow(-2*pow(a,3)+9*pow(a,2)*b*(-2*b*x+rt)+pow(pow(a,3)*(a*pow(2*a+9*b*(2*b*x-rt),2)-4*pow(a-3*b*(b*x+rt),3)),0.5),0.3333333333333333))/a))/(6.*b),infinityratio*molar_mass*(e^(slope0*x)-1))
symbol_names = 'a b rt molar_mass infinityratio slope0'
symbol_values = '0.2303 0.000431 2436.1403 0.01604246 10 4.10485e-05'
[../]
[./answer_d2DensityVDW]
type = Grad2ParsedFunction
direction = '1 0 0'
expression = if(x>0,-(molar_mass*(-2+(2*pow(2,0.3333333333333333)*(a-3*b*(b*x+rt)))/pow(-2*pow(a,3)+9*pow(a,2)*b*(-2*b*x+rt)+pow(pow(a,3)*(a*pow(2*a+9*b*(2*b*x-rt),2)-4*pow(a-3*b*(b*x+rt),3)),0.5),0.3333333333333333)+(pow(2,0.6666666666666666)*pow(-2*pow(a,3)+9*pow(a,2)*b*(-2*b*x+rt)+pow(pow(a,3)*(a*pow(2*a+9*b*(2*b*x-rt),2)-4*pow(a-3*b*(b*x+rt),3)),0.5),0.3333333333333333))/a))/(6.*b),infinityratio*molar_mass*(e^(slope0*x)-1))
symbol_names = 'a b rt molar_mass infinityratio slope0'
symbol_values = '0.2303 0.000431 2436.1403 0.01604246 10 4.10485e-05'
[../]
[./answer_DensityConstBulkCut]
type = ParsedFunction
expression = if(x<zero_pt,0,if(x>cut_limit,dens0*exp(x/bulk_mod),(3*cut_limit-2*x-zero_pt)*(x-zero_pt)*(x-zero_pt)*dens0*exp(x/bulk_mod)/(cut_limit-zero_pt)/(cut_limit-zero_pt)/(cut_limit-zero_pt)))
symbol_names = 'dens0 bulk_mod zero_pt cut_limit'
symbol_values = '1000 2E6 -1E6 1E6'
[../]
[./answer_dDensityConstBulkCut]
type = GradParsedFunction
direction = '1 0 0'
expression = if(x<zero_pt,0,if(x>cut_limit,dens0*exp(x/bulk_mod),(3*cut_limit-2*x-zero_pt)*(x-zero_pt)*(x-zero_pt)*dens0*exp(x/bulk_mod)/(cut_limit-zero_pt)/(cut_limit-zero_pt)/(cut_limit-zero_pt)))
symbol_names = 'dens0 bulk_mod zero_pt cut_limit'
symbol_values = '1000 2E6 -1E6 1E6'
[../]
[./answer_d2DensityConstBulkCut]
type = Grad2ParsedFunction
direction = '1 0 0'
expression = if(x<zero_pt,0,if(x>cut_limit,dens0*exp(x/bulk_mod),(3*cut_limit-2*x-zero_pt)*(x-zero_pt)*(x-zero_pt)*dens0*exp(x/bulk_mod)/(cut_limit-zero_pt)/(cut_limit-zero_pt)/(cut_limit-zero_pt)))
symbol_names = 'dens0 bulk_mod zero_pt cut_limit'
symbol_values = '1000 2E6 -1E6 1E6'
[../]
[]
[AuxVariables]
[./DensityConstBulk_Aux]
[../]
[./dDensityConstBulk_Aux]
[../]
[./d2DensityConstBulk_Aux]
[../]
[./DensityIdeal_Aux]
[../]
[./dDensityIdeal_Aux]
[../]
[./d2DensityIdeal_Aux]
[../]
[./DensityMethane20degC_Aux]
[../]
[./dDensityMethane20degC_Aux]
[../]
[./d2DensityMethane20degC_Aux]
[../]
[./DensityVDW_Aux]
[../]
[./dDensityVDW_Aux]
[../]
[./d2DensityVDW_Aux]
[../]
[./DensityConstBulkCut_Aux]
[../]
[./dDensityConstBulkCut_Aux]
[../]
[./d2DensityConstBulkCut_Aux]
[../]
[./check_Aux]
[../]
[]
[AuxKernels]
[./DensityConstBulk_AuxK]
type = RichardsDensityAux
variable = DensityConstBulk_Aux
density_UO = DensityConstBulk
pressure_var = pressure
[../]
[./dDensityConstBulk_AuxK]
type = RichardsDensityPrimeAux
variable = dDensityConstBulk_Aux
density_UO = DensityConstBulk
pressure_var = pressure
[../]
[./d2DensityConstBulk_AuxK]
type = RichardsDensityPrimePrimeAux
variable = d2DensityConstBulk_Aux
density_UO = DensityConstBulk
pressure_var = pressure
[../]
[./DensityIdeal_AuxK]
type = RichardsDensityAux
variable = DensityIdeal_Aux
density_UO = DensityIdeal
pressure_var = pressure
[../]
[./dDensityIdeal_AuxK]
type = RichardsDensityPrimeAux
variable = dDensityIdeal_Aux
density_UO = DensityIdeal
pressure_var = pressure
[../]
[./d2DensityIdeal_AuxK]
type = RichardsDensityPrimePrimeAux
variable = d2DensityIdeal_Aux
density_UO = DensityIdeal
pressure_var = pressure
[../]
[./DensityMethane20degC_AuxK]
type = RichardsDensityAux
variable = DensityMethane20degC_Aux
density_UO = DensityMethane20degC
pressure_var = pressure
[../]
[./dDensityMethane20degC_AuxK]
type = RichardsDensityPrimeAux
variable = dDensityMethane20degC_Aux
density_UO = DensityMethane20degC
pressure_var = pressure
[../]
[./d2DensityMethane20degC_AuxK]
type = RichardsDensityPrimePrimeAux
variable = d2DensityMethane20degC_Aux
density_UO = DensityMethane20degC
pressure_var = pressure
[../]
[./DensityVDW_AuxK]
type = RichardsDensityAux
variable = DensityVDW_Aux
density_UO = DensityVDW
pressure_var = pressure
[../]
[./dDensityVDW_AuxK]
type = RichardsDensityPrimeAux
variable = dDensityVDW_Aux
density_UO = DensityVDW
pressure_var = pressure
[../]
[./d2DensityVDW_AuxK]
type = RichardsDensityPrimePrimeAux
variable = d2DensityVDW_Aux
density_UO = DensityVDW
pressure_var = pressure
[../]
[./DensityConstBulkCut_AuxK]
type = RichardsDensityAux
variable = DensityConstBulkCut_Aux
density_UO = DensityConstBulkCut
pressure_var = pressure
[../]
[./dDensityConstBulkCut_AuxK]
type = RichardsDensityPrimeAux
variable = dDensityConstBulkCut_Aux
density_UO = DensityConstBulkCut
pressure_var = pressure
[../]
[./d2DensityConstBulkCut_AuxK]
type = RichardsDensityPrimePrimeAux
variable = d2DensityConstBulkCut_Aux
density_UO = DensityConstBulkCut
pressure_var = pressure
[../]
[./check_AuxK]
type = FunctionAux
variable = check_Aux
function = answer_d2DensityConstBulkCut
[../]
[]
[Postprocessors]
[./cf_DensityConstBulk]
type = NodalL2Error
function = answer_DensityConstBulk
variable = DensityConstBulk_Aux
[../]
[./cf_dDensityConstBulk]
type = NodalL2Error
function = answer_dDensityConstBulk
variable = dDensityConstBulk_Aux
[../]
[./cf_d2DensityConstBulk]
type = NodalL2Error
function = answer_d2DensityConstBulk
variable = d2DensityConstBulk_Aux
[../]
[./cf_DensityIdeal]
type = NodalL2Error
function = answer_DensityIdeal
variable = DensityIdeal_Aux
[../]
[./cf_dDensityIdeal]
type = NodalL2Error
function = answer_dDensityIdeal
variable = dDensityIdeal_Aux
[../]
[./cf_d2DensityIdeal]
type = NodalL2Error
function = answer_d2DensityIdeal
variable = d2DensityIdeal_Aux
[../]
[./cf_DensityMethane20degC]
type = NodalL2Error
function = answer_DensityMethane20degC
variable = DensityMethane20degC_Aux
[../]
[./cf_dDensityMethane20degC]
type = NodalL2Error
function = answer_dDensityMethane20degC
variable = dDensityMethane20degC_Aux
[../]
[./cf_d2DensityMethane20degC]
type = NodalL2Error
function = answer_d2DensityMethane20degC
variable = d2DensityMethane20degC_Aux
[../]
[./cf_DensityVDW]
type = NodalL2Error
function = answer_DensityVDW
variable = DensityVDW_Aux
[../]
[./cf_dDensityVDW]
type = NodalL2Error
function = answer_dDensityVDW
variable = dDensityVDW_Aux
[../]
[./cf_d2DensityVDW]
type = NodalL2Error
function = answer_d2DensityVDW
variable = d2DensityVDW_Aux
[../]
[./cf_DensityConstBulkCut]
type = NodalL2Error
function = answer_DensityConstBulkCut
variable = DensityConstBulkCut_Aux
[../]
[./cf_dDensityConstBulkCut]
type = NodalL2Error
function = answer_dDensityConstBulkCut
variable = dDensityConstBulkCut_Aux
[../]
[./cf_d2DensityConstBulkCut]
type = NodalL2Error
function = answer_d2DensityConstBulkCut
variable = d2DensityConstBulkCut_Aux
[../]
[]
#############################################################################
#
# Following is largely unimportant as we are not running an actual similation
#
#############################################################################
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = -5E6
xmax = 5E6
[]
[Variables]
[./pressure]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_pressure
[../]
[../]
[]
[Kernels]
active = 'richardst'
[./richardst]
type = RichardsMassChange
richardsVarNames_UO = PPNames
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
richardsVarNames_UO = PPNames
variable = pressure
[../]
[]
[Materials]
[./unimportant_material]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-20 0 0 0 1E-20 0 0 0 1E-20'
richardsVarNames_UO = PPNames
density_UO = DensityConstBulk
relperm_UO = RelPermPower
sat_UO = Saturation
seff_UO = SeffVG
SUPG_UO = SUPGstandard
viscosity = 1E-3
gravity = '0 0 -10'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./does_nothing]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E50 1E50 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
num_steps = 1
dt = 1E-100
[]
[Outputs]
execute_on = 'timestep_end'
active = 'csv'
file_base = uo2
[./csv]
type = CSV
[../]
[./exodus]
type = Exodus
hide = pressure
[../]
[]
(test/tests/dirackernels/reporter_point_source/2d_vpp_transient.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[]
uniform_refine = 4
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[dot]
type = TimeDerivative
variable = u
[]
[]
[DiracKernels]
[vpp_point_source]
type = ReporterPointSource
variable = u
value_name = point_sample_source/u
x_coord_name = point_sample_source/x
y_coord_name = point_sample_source/y
z_coord_name = point_sample_source/z
[]
[]
[VectorPostprocessors]
[point_sample_source]
type = PointValueSampler
variable = u
points = '0.2 0.8 0.0 0.2 0.2 0.0'
sort_by = id
execute_on = 'timestep_begin'
outputs = none
[]
[point_sample_out]
type = PointValueSampler
variable = u
points = '0.2 0.8 0.0'
sort_by = id
execute_on = 'timestep_begin'
contains_complete_history = true
outputs = 'csv'
[]
[]
[Functions]
[left_bc_fn]
type = ParsedFunction
expression = 1+5*y*y
[]
[]
[BCs]
[left]
type = FunctionNeumannBC
variable = u
boundary = left
function = left_bc_fn
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
dt = 0.01
num_steps = 5
solve_type = 'PJFNK'
nl_rel_tol = 1e-10
[]
[Outputs]
csv = true
[]
(test/tests/postprocessors/num_adaptivity_cycles/num_adaptivity_cycles_toggle_adaptivity.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1
solve_type = 'PJFNK'
[]
[Adaptivity]
cycles_per_step = 1
marker = box
max_h_level = 2
initial_steps = 4
initial_marker = initial_box
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = dont_mark
type = BoxMarker
[../]
[./initial_box]
type = BoxMarker
bottom_left = '0.8 0.1 0'
top_right = '0.9 0.2 0'
inside = refine
outside = dont_mark
[../]
[../]
[]
[UserObjects]
[./toggle_adaptivity]
type = ToggleMeshAdaptivity
mesh_adaptivity = 'off'
[../]
[]
[Postprocessors]
[./adaptivity_cycles]
type = NumAdaptivityCycles
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
csv = true
[]
(modules/xfem/test/tests/bimaterials/inclusion_bimaterials_2d.i)
# This test is for a matrix-inclusion composite materials
# The global stress is determined by switching the stress based on level set values
# The inclusion geometry is marked by a level set function
# The matrix and inclusion are glued together
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
[../]
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 11
ny = 11
xmin = 0.0
xmax = 5.
ymin = 0.0
ymax = 5.
elem_type = QUAD4
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[Functions]
[./ls_func]
type = ParsedFunction
expression = 'sqrt((y-2.5)*(y-2.5) + (x-2.5)*(x-2.5)) - 1.5'
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./TensorMechanics]
[../]
[]
[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_xy]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 1
variable = stress_xy
[../]
[./a_strain_xx]
type = RankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 0
variable = a_strain_xx
[../]
[./a_strain_yy]
type = RankTwoAux
rank_two_tensor = A_total_strain
index_i = 1
index_j = 1
variable = a_strain_yy
[../]
[./a_strain_xy]
type = RankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 1
variable = a_strain_xy
[../]
[./b_strain_xx]
type = RankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 0
variable = b_strain_xx
[../]
[./b_strain_yy]
type = RankTwoAux
rank_two_tensor = B_total_strain
index_i = 1
index_j = 1
variable = b_strain_yy
[../]
[./b_strain_xy]
type = RankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 1
variable = b_strain_xy
[../]
[]
[Constraints]
[./dispx_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_x
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[./dispy_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_y
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[]
[BCs]
[./bottomx]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[./topx]
type = FunctionDirichletBC
boundary = top
variable = disp_x
function = '0.03*t'
[../]
[./topy]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = '0.03*t'
[../]
[]
[Materials]
[./elasticity_tensor_A]
type = ComputeIsotropicElasticityTensor
base_name = A
youngs_modulus = 1e9
poissons_ratio = 0.3
[../]
[./strain_A]
type = ComputeSmallStrain
base_name = A
[../]
[./stress_A]
type = ComputeLinearElasticStress
base_name = A
[../]
[./elasticity_tensor_B]
type = ComputeIsotropicElasticityTensor
base_name = B
youngs_modulus = 1e5
poissons_ratio = 0.3
[../]
[./strain_B]
type = ComputeSmallStrain
base_name = B
[../]
[./stress_B]
type = ComputeLinearElasticStress
base_name = B
[../]
[./combined_stress]
type = LevelSetBiMaterialRankTwo
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = stress
[../]
[./combined_dstressdstrain]
type = LevelSetBiMaterialRankFour
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = Jacobian_mult
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
# controls for linear iterations
l_max_its = 20
l_tol = 1e-3
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-7
# time control
start_time = 0.0
dt = 0.5
end_time = 1.0
num_steps = 2
max_xfem_update = 1
[]
[Outputs]
exodus = true
execute_on = timestep_end
[./console]
type = Console
output_linear = true
[../]
[]
(modules/solid_mechanics/test/tests/thermal_expansion_function/finite_linear.i)
# This tests the thermal expansion coefficient function using both
# options to specify that function: mean and instantaneous. There
# two blocks, each containing a single element, and these use the
# two variants of the function.
# In this test, the instantaneous CTE function is a linear function
# while the mean CTE function is an analytic function designed to
# give the same response. If \bar{alpha}(T) is the mean CTE function,
# and \alpha(T) is the instantaneous CTE function,
# \bar{\alpha}(T) = 1/(T-Tref) \intA^{T}_{Tsf} \alpha(T) dT
# where Tref is the reference temperature used to define the mean CTE
# function, and Tsf is the stress-free temperature.
# This version of the test uses finite deformation theory.
# The two models produce very similar results. There are slight
# differences due to the large deformation treatment.
[Mesh]
file = 'blocks.e'
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
eigenstrain_names = eigenstrain
generate_output = 'strain_xx strain_yy strain_zz'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = disp_x
boundary = 3
value = 0.0
[../]
[./bottom]
type = DirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[./back]
type = DirichletBC
variable = disp_z
boundary = 1
value = 0.0
[../]
[]
[AuxKernels]
[./temp]
type = FunctionAux
variable = temp
block = '1 2'
function = temp_func
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain1]
type = ComputeMeanThermalExpansionFunctionEigenstrain
block = 1
thermal_expansion_function = cte_func_mean
thermal_expansion_function_reference_temperature = 0.5
stress_free_temperature = 0.0
temperature = temp
eigenstrain_name = eigenstrain
[../]
[./thermal_expansion_strain2]
type = ComputeInstantaneousThermalExpansionFunctionEigenstrain
block = 2
thermal_expansion_function = cte_func_inst
stress_free_temperature = 0.0
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Functions]
[./cte_func_mean]
type = ParsedFunction
symbol_names = 'tsf tref scale' #stress free temp, reference temp, scale factor
symbol_values = '0.0 0.5 1e-4'
expression = 'scale * (0.5 * t^2 - 0.5 * tsf^2) / (t - tref)'
[../]
[./cte_func_inst]
type = PiecewiseLinear
xy_data = '0 0.0
2 2.0'
scale_factor = 1e-4
[../]
[./temp_func]
type = PiecewiseLinear
xy_data = '0 1
1 2'
[../]
[]
[Postprocessors]
[./disp_1]
type = NodalExtremeValue
variable = disp_x
boundary = 101
[../]
[./disp_2]
type = NodalExtremeValue
variable = disp_x
boundary = 102
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
l_max_its = 100
l_tol = 1e-4
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
start_time = 0.0
end_time = 1.0
dt = 0.1
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/ad_smeared_cracking/cracking_xyz.i)
#
[Mesh]
file = cracking_test.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Functions]
[./displx]
type = PiecewiseLinear
x = '0 1'
y = '0 0.00175'
[../]
[./velocity_y]
type = ParsedFunction
expression = 'if(t < 2, 0.00175, 0)'
[../]
[./velocity_z]
type = ParsedFunction
expression = 0.00175
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_zx'
use_automatic_differentiation = true
[../]
[]
[BCs]
[./fix_x]
type = ADDirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./move_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 4
function = displx
[../]
[./fix_y]
type = ADDirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[./move_y]
type = PresetVelocity
variable = disp_y
boundary = 5
function = velocity_y
# time_periods = 'p2 p3'
[../]
[./fix_z]
type = ADDirichletBC
variable = disp_z
boundary = 3
value = 0.0
[../]
[./move_z]
type = PresetVelocity
variable = disp_z
boundary = 6
function = velocity_z
# time_periods = 'p3'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 186.5e9
poissons_ratio = .316
[../]
[./elastic_stress]
type = ADComputeSmearedCrackingStress
cracking_stress = 119.3e6
cracked_elasticity_type = FULL
softening_models = exponential_softening
[../]
[./exponential_softening]
type = ADExponentialSoftening
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
petsc_options_iname = '-ksp_gmres_restart -pc_type'
petsc_options_value = '101 lu'
line_search = 'none'
l_max_its = 100
l_tol = 1e-5
nl_max_its = 100
nl_abs_tol = 1e-6
#nl_rel_tol = 1e-4
nl_rel_tol = 1e-8
start_time = 0.0
end_time = 3.0
dt = 0.01
[]
[Controls]
[./p1]
type = TimePeriod
start_time = 0.0
end_time = 1.0
disable_objects = 'BCs/move_y BCs/move_z'
reverse_on_false = false
execute_on = 'initial timestep_begin'
[../]
[./p2]
type = TimePeriod
start_time = 1.0
end_time = 2.0
disable_objects = 'BCs/move_z'
enable_objects = 'BCs/move_y'
reverse_on_false = false
execute_on = 'initial timestep_begin'
[../]
[./p3]
type = TimePeriod
start_time = 2.0
end_time = 3.0
enable_objects = 'BCs/move_y BCs/move_z'
reverse_on_false = false
execute_on = 'initial timestep_begin'
set_sync_times = true
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/time_steppers/timesequence_stepper/exodustimesequence.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*t*(x*x+y*y)
[../]
[./forcing_fn]
type = ParsedFunction
expression = 2*t*(x*x+y*y)-4*t*t
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]
[ICs]
[./u_var]
type = FunctionIC
variable = u
function = exact_fn
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[../]
[]
[Executioner]
type = Transient
end_time = 4.0
[./TimeStepper]
type = ExodusTimeSequenceStepper
mesh = timesequence_no_start_time.e
[../]
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/preconditioner_reuse/convergence.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 = 4
ny = 4
nz = 4
[]
[]
[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
[]
[]
[Functions]
[pullx]
type = ParsedFunction
expression = '4000 * t'
[]
[pully]
type = ParsedFunction
expression = '-2000 * t'
[]
[pullz]
type = ParsedFunction
expression = '3000 * t'
[]
[lambda_function]
type = ParsedFunction
expression = '1000.0*(t+1.0)'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = left
variable = disp_y
value = 0.0
[]
[leftz]
type = DirichletBC
preset = true
boundary = left
variable = disp_z
value = 0.0
[]
[pull_x]
type = FunctionNeumannBC
boundary = right
variable = disp_x
function = pullx
[]
[pull_y]
type = FunctionNeumannBC
boundary = top
variable = disp_y
function = pully
[]
[pull_z]
type = FunctionNeumannBC
boundary = right
variable = disp_z
function = pullz
[]
[]
[Materials]
[compute_stress]
type = ComputeNeoHookeanStress
lambda = lambda
mu = 67000.0
[]
[lambda]
type = GenericFunctionMaterial
prop_names = lambda
prop_values = lambda_function
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'newton'
line_search = none
petsc_options = ''
petsc_options_iname = '-pc_type -ksp_type'
petsc_options_value = 'lu gmres'
l_tol = 1e-8
l_max_its = 100
reuse_preconditioner = false
reuse_preconditioner_max_linear_its = 20
nl_max_its = 10
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 10.0
[]
[Reporters/iteration_info]
type = IterationInfo
[]
[Outputs]
exodus = false
[./csv]
type = CSV
file_base = base_case
[../]
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/convergence/3D/dirichlet.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 = 4
ny = 4
nz = 4
[]
[]
[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
[]
[]
[Functions]
[pullx]
type = ParsedFunction
expression = '0.4 * t'
[]
[pully]
type = ParsedFunction
expression = '-0.2 * t'
[]
[pullz]
type = ParsedFunction
expression = '0.3 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = left
variable = disp_y
value = 0.0
[]
[leftz]
type = DirichletBC
preset = true
boundary = left
variable = disp_z
value = 0.0
[]
[pull_x]
type = FunctionDirichletBC
boundary = right
variable = disp_x
function = pullx
preset = true
[]
[pull_y]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = pully
preset = true
[]
[pull_z]
type = FunctionDirichletBC
boundary = right
variable = disp_z
function = pullz
preset = true
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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 = 0.2
dtmin = 0.2
end_time = 1.0
[]
[Postprocessors]
[nonlin]
type = NumNonlinearIterations
[]
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/vectorpostprocessors/mesh_division_functor_reduction/reduction.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 10
# This ensures the CSV VPP output remains ordered the same way with distributed meshes
allow_renumbering = false
[]
[MeshDivisions]
[mesh_div]
type = CylindricalGridDivision
n_radial = 4
n_azimuthal = 4
axis_direction = '0 0 1'
azimuthal_start = '1 0 0'
center = '0.5 0.5 0'
r_max = 2
[]
[]
[Functions]
[u_fn]
type = ParsedFunction
expression = 'x + 2 * if(y > 0.5, y, 0)'
[]
[]
[AuxVariables]
[u]
[]
[u_fv]
type = MooseVariableFVReal
[]
[]
[ICs]
[u_ic]
type = FunctionIC
variable = u
function = u_fn
[]
[u_fvic]
type = FunctionIC
variable = u_fv
function = u_fn
[]
[]
[FunctorMaterials]
[u_mat]
type = ADGenericFunctorMaterial
prop_names = 'u_mat'
prop_values = 'u'
[]
[]
[VectorPostprocessors]
[integral]
type = MeshDivisionFunctorReductionVectorPostprocessor
functors = 'u_fn u u_fv u_mat'
mesh_division = mesh_div
reduction = 'integral'
execute_on = 'initial'
[]
[average]
type = MeshDivisionFunctorReductionVectorPostprocessor
functors = 'u_fn u u_fv u_mat'
mesh_division = mesh_div
reduction = 'average'
execute_on = 'initial'
[]
[min]
type = MeshDivisionFunctorReductionVectorPostprocessor
functors = 'u_fn u u_fv u_mat'
mesh_division = mesh_div
reduction = 'min'
execute_on = 'initial'
[]
[max]
type = MeshDivisionFunctorReductionVectorPostprocessor
functors = 'u_fn'
mesh_division = mesh_div
reduction = 'max'
execute_on = 'initial'
[]
[sample_max]
type = SpatialUserObjectVectorPostprocessor
userobject = 'max'
points = '0 0 0.1
0.8 0 0'
execute_on = 'initial'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = 'initial'
[]
(modules/solid_mechanics/test/tests/2D_different_planes/planestrain_xy.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = square_xy_plane.e
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[AuxVariables]
[./temp]
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./plane_strain]
block = 1
strain = SMALL
out_of_plane_direction = z
planar_formulation = PLANE_STRAIN
eigenstrain_names = 'eigenstrain'
generate_output = 'stress_xx stress_xy stress_yy stress_zz strain_xx strain_xy strain_yy strain_zz'
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
[../]
[]
[Functions]
[./tempfunc]
type = ParsedFunction
expression = '(1-x)*t'
[../]
[]
[BCs]
[./bottomx]
type = DirichletBC
boundary = 3
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = DirichletBC
boundary = 3
variable = disp_y
value = 0.0
[../]
[]
[Materials]
[./elastic_stress]
type = ComputeLinearElasticStress
block = 1
[../]
[./thermal_strain]
type = ComputeThermalExpansionEigenstrain
temperature = temp
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
eigenstrain_name = eigenstrain
[../]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
block = 1
poissons_ratio = 0.3
youngs_modulus = 1e6
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
# controls for linear iterations
l_max_its = 100
l_tol = 1e-10
# controls for nonlinear iterations
nl_max_its = 10
nl_rel_tol = 1e-12
# time control
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 2.0
[]
[Outputs]
file_base = planestrain_xy_small_out
[./exodus]
type = Exodus
[../]
[]
(modules/solid_mechanics/test/tests/umat/multiple_blocks/rve_multimaterial.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[Mesh]
[mesh_1]
type = FileMeshGenerator
file = rve.e
[]
[]
[Functions]
[top_shear]
type = ParsedFunction
expression = t/0.05
[]
[]
[BCs]
[fix_x]
type = DirichletBC
variable = disp_x
boundary = '1000'
value = 0
[]
[fix_y]
type = DirichletBC
variable = disp_y
boundary = '1000'
value = 0
[]
[fix_z]
type = DirichletBC
variable = disp_z
boundary = '1000'
value = 0
[]
[slip_x]
type = FunctionDirichletBC
variable = disp_y
boundary = '4000'
function = top_shear
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
generate_output = 'stress_yy'
incremental = true
[]
[]
[Materials]
[umat_1]
type = AbaqusUMATStress
# Young's modulus, Poisson's Ratio, Yield, Hardening
constant_properties = '1000 0.3'
plugin = ../../../plugins/elastic_incremental
num_state_vars = 3
use_one_based_indexing = true
block = '1'
[]
[umat_2]
type = AbaqusUMATStress
# Young's modulus, Poisson's Ratio
constant_properties = '1e8 0.3'
plugin = ../../../plugins/elastic_incremental
num_state_vars = 3
use_one_based_indexing = true
block = '2'
[]
[stress]
type = ComputeFiniteStrainElasticStress
[]
[elastic_1]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1000
poissons_ratio = 0.3
block = '1'
[]
[elastic_2]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e8
poissons_ratio = 0.3
block = '2'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
dt = 0.05
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
line_search = none
nl_abs_tol = 1e-10
dtmax = 10.0
nl_rel_tol = 1e-10
end_time = 1
dtmin = 0.05
num_steps = 2
[]
[Outputs]
exodus = true
[]
(test/tests/bcs/sin_bc/sin_dirichlet_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Functions]
[./initial_value]
type = ParsedFunction
expression = 'x'
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_value
[../]
[../]
[]
[Kernels]
active = 'diff ie'
[./diff]
type = Diffusion
variable = u
[../]
[./ie]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
active = 'left right'
[./left]
type = SinDirichletBC
variable = u
boundary = 3
initial = 0.0
final = 1.0
duration = 10.0
[../]
[./right]
type = SinDirichletBC
variable = u
boundary = 1
initial = 1.0
final = 0.0
duration = 10.0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
num_steps = 10
dt = 1.0
[]
[Outputs]
exodus = true
[]
(test/tests/dgkernels/advection_diffusion_mixed_bcs_test_resid_jac/dg_advection_diffusion_test.i)
[Mesh]
type = GeneratedMesh
nx = 2
dim = 1
[]
[Kernels]
[./source]
type = BodyForce
variable = u
function = 'forcing_func'
[../]
[./convection]
type = ConservativeAdvection
variable = u
velocity = '1 0 0'
[../]
[./diffusion]
type = MatDiffusionTest
variable = u
prop_name = 'k'
[../]
[]
[DGKernels]
[./convection]
type = DGConvection
variable = u
velocity = '1 0 0'
[../]
[./diffusion]
type = DGDiffusion
variable = u
diff = 'k'
sigma = 6
epsilon = -1
[../]
[]
[BCs]
[./advection]
type = OutflowBC
boundary = 'right'
variable = u
velocity = '1 0 0'
[../]
[./diffusion_left]
type = DGFunctionDiffusionDirichletBC
boundary = 'left'
variable = u
sigma = 6
epsilon = -1
function = 'boundary_left_func'
diff = 'k'
[../]
[]
[Variables]
[./u]
family = MONOMIAL
order = THIRD
[../]
[]
[Materials]
[./test]
block = 0
type = GenericFunctionMaterial
prop_names = 'k'
prop_values = 'k_func'
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Functions]
[./forcing_func]
type = ParsedFunction
expression = '1'
[../]
[./boundary_left_func]
type = ParsedFunction
expression = '0'
[../]
[./k_func]
type = ParsedFunction
expression = '1 + x'
[../]
[]
[Outputs]
exodus = true
execute_on = 'timestep_end'
[]
(modules/combined/test/tests/additive_manufacturing/check_element_addition.i)
[Problem]
kernel_coverage_check = false
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 10
ymin = 0
ymax = 10
zmin = 0
zmax = 0.5
nx = 20
ny = 20
nz = 1
[]
[left_domain]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '5 10 0.5'
block_id = 1
[]
[right_domain]
input = left_domain
type = SubdomainBoundingBoxGenerator
bottom_left = '5 0 0'
top_right = '10 10 0.5'
block_id = 2
[]
[sidesets]
input = right_domain
type = SideSetsAroundSubdomainGenerator
normal = '1 0 0'
block = 1
new_boundary = 'moving_interface'
[]
[]
[Variables]
[temp]
block = '1'
[]
[]
[Functions]
[fx]
type = ParsedFunction
expression = '5.25'
[]
[fy]
type = ParsedFunction
expression = '2.5*t'
[]
[fz]
type = ParsedFunction
expression = '0.25'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
automatic_scaling = true
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_max_its = 10
nl_max_its = 20
nl_rel_tol = 1e-4
start_time = 0.0
end_time = 1.0
dt = 1e-1
dtmin = 1e-4
[]
[UserObjects]
[activated_elem_uo]
type = ActivateElementsByPath
execute_on = timestep_begin
function_x = fx
function_y = fy
function_z = fz
active_subdomain_id = 1
expand_boundary_name = 'moving_interface'
[]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/fvbcs/FVHeatFluxBC/wall_heat_transfer.i)
flux=10
[GlobalParams]
porosity = 'porosity'
splitting = 'porosity'
locality = 'global'
average_porosity = 'average_eps'
average_k_fluid='average_k_fluid'
average_k_solid='average_k_solid'
average_kappa='average_k_fluid' # because of vector matprop, should be kappa
average_kappa_solid='average_kappa_solid'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 20
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
[]
[Variables]
[Tf]
type = MooseVariableFVReal
[]
[Ts]
type = MooseVariableFVReal
[]
[]
[AuxVariables]
[k]
type = MooseVariableFVReal
[]
[kappa]
type = MooseVariableFVReal
[]
[k_s]
type = MooseVariableFVReal
[]
[kappa_s]
type = MooseVariableFVReal
[]
[porosity]
type = MooseVariableFVReal
initial_condition = 0.2
[]
[]
[Functions]
[k]
type = ParsedFunction
expression = 0.1*(100*y+1)
[]
[kappa]
type = ParsedFunction
expression = 0.2*(200*y+1)
[]
[kappa_s]
type = ParsedFunction
expression = 0.4*(200*y+1)
[]
[k_s]
type = ParsedFunction
expression = 0.2*(200*y+1)+2*x
[]
[]
[FVKernels]
[Tf_diffusion]
type = FVDiffusion
variable = Tf
coeff = 1
[]
[Ts_diffusion]
type = FVDiffusion
variable = Ts
coeff = 1
[]
[]
[FVBCs]
[left_Ts]
type = NSFVHeatFluxBC
variable = Ts
boundary = 'left'
phase = 'solid'
value = ${flux}
[]
[right_Ts]
type = FVDirichletBC
variable = Ts
boundary = 'right'
value = 1000.0
[]
[left_Tf]
type = NSFVHeatFluxBC
variable = Tf
boundary = 'left'
phase = 'fluid'
value = ${flux}
[]
[right_Tf]
type = FVDirichletBC
variable = Tf
boundary = 'right'
value = 1000.0
[]
[]
[AuxKernels]
[k]
type = ADMaterialRealAux
variable = k
property = 'k'
[]
[k_s]
type = ADMaterialRealAux
variable = k_s
property = 'k_s'
[]
[kappa_s]
type = ADMaterialRealAux
variable = kappa_s
property = 'kappa_s'
[]
[]
[Materials]
[thermal_conductivities_k]
type = ADGenericFunctionMaterial
prop_names = 'k'
prop_values = 'k'
[]
[thermal_conductivities_k_s]
type = ADGenericFunctionMaterial
prop_names = 'k_s'
prop_values = 'k_s'
[]
[thermal_conductivities_kappa]
type = ADGenericConstantVectorMaterial
prop_names = 'kappa'
prop_values = '0.1 0.2 .03'
[]
[thermal_conductivities_kappa_s]
type = ADGenericFunctionMaterial
prop_names = 'kappa_s'
prop_values = 'kappa_s'
[]
[]
[Postprocessors]
[average_eps]
type = ElementAverageValue
variable = porosity
# because porosity is constant in time, we evaluate this only once
execute_on = 'initial'
[]
[average_k_fluid]
type = ElementAverageValue
variable = k
[]
[average_k_solid]
type = ElementAverageValue
variable = k_s
[]
[average_kappa_solid]
type = ElementAverageValue
variable = kappa_s
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
hide = 'porosity average_eps'
[]
(modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/free-flow-hllc.i)
diff_coeff = 0.1
[GlobalParams]
fp = fp
[]
[Mesh]
[cartesian]
type = GeneratedMeshGenerator
dim = 1
xmin = .1
xmax = 1.1
nx = 2
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Variables]
[rho]
type = MooseVariableFVReal
[]
[rho_u]
type = MooseVariableFVReal
[]
[rho_et]
type = MooseVariableFVReal
[]
[]
[ICs]
[rho]
type = FunctionIC
variable = rho
function = 'exact_rho'
[]
[rho_u]
type = FunctionIC
variable = rho_u
function = 'exact_rho_u'
[]
[rho_et]
type = FunctionIC
variable = rho_et
function = 'exact_rho_et'
[]
[]
[FVKernels]
[mass_advection]
type = CNSFVMassHLLC
variable = rho
[]
[mass_fn]
type = FVBodyForce
variable = rho
function = 'forcing_rho'
[]
[momentum_x_advection]
type = CNSFVMomentumHLLC
variable = rho_u
momentum_component = x
[]
[momentum_fn]
type = FVBodyForce
variable = rho_u
function = 'forcing_rho_u'
[]
[fluid_energy_advection]
type = CNSFVFluidEnergyHLLC
variable = rho_et
[]
[energy_fn]
type = FVBodyForce
variable = rho_et
function = 'forcing_rho_et'
[]
[mass_diff]
type = FVDiffusion
variable = rho
coeff = ${diff_coeff}
[]
[momentum_diff]
type = FVDiffusion
variable = rho_u
coeff = ${diff_coeff}
[]
[energy_diff]
type = FVDiffusion
variable = rho_et
coeff = ${diff_coeff}
[]
[]
[FVBCs]
[mass_in]
variable = rho
type = CNSFVHLLCSpecifiedMassFluxAndTemperatureMassBC
boundary = left
temperature = 'exact_T'
rhou = 'exact_rho_u'
[]
[momentum_in]
variable = rho_u
type = CNSFVHLLCSpecifiedMassFluxAndTemperatureMomentumBC
boundary = left
temperature = 'exact_T'
rhou = 'exact_rho_u'
momentum_component = 'x'
[]
[energy_in]
variable = rho_et
type = CNSFVHLLCSpecifiedMassFluxAndTemperatureFluidEnergyBC
boundary = left
temperature = 'exact_T'
rhou = 'exact_rho_u'
[]
[mass_out]
variable = rho
type = CNSFVHLLCSpecifiedPressureMassBC
boundary = right
pressure = 'exact_p'
[]
[momentum_out]
variable = rho_u
type = CNSFVHLLCSpecifiedPressureMomentumBC
boundary = right
pressure = 'exact_p'
momentum_component = 'x'
[]
[energy_out]
variable = rho_et
type = CNSFVHLLCSpecifiedPressureFluidEnergyBC
boundary = right
pressure = 'exact_p'
[]
[left_mass_diffusion]
type = FVFunctionNeumannBC
variable = rho
function = minus_rho_bc
boundary = 'left'
[]
[left_momentum_diffusion]
type = FVFunctionNeumannBC
variable = rho_u
function = minus_rho_u_bc
boundary = 'left'
[]
[left_energy_diffusion]
type = FVFunctionNeumannBC
variable = rho_et
function = minus_rho_et_bc
boundary = 'left'
[]
[right_mass_diffusion]
type = FVFunctionNeumannBC
variable = rho
function = rho_bc
boundary = 'right'
[]
[right_momentum_diffusion]
type = FVFunctionNeumannBC
variable = rho_u
function = rho_u_bc
boundary = 'right'
[]
[right_energy_diffusion]
type = FVFunctionNeumannBC
variable = rho_et
function = rho_et_bc
boundary = 'right'
[]
[]
[Materials]
[var_mat]
type = ConservedVarValuesMaterial
rho = rho
rhou = rho_u
rho_et = rho_et
[]
[]
[Functions]
[exact_rho]
type = ParsedFunction
expression = '3.48788261470924*cos(x)'
[]
[rho_bc]
type = ParsedFunction
value = '-diff_coeff*3.48788261470924*sin(x)'
vars = 'diff_coeff'
vals = '${diff_coeff}'
[]
[minus_rho_bc]
type = ParsedFunction
value = 'diff_coeff*3.48788261470924*sin(x)'
vars = 'diff_coeff'
vals = '${diff_coeff}'
[]
[forcing_rho]
type = ParsedFunction
expression = '-3.83667087618017*sin(1.1*x) + 0.348788261470924*cos(x)'
[]
[exact_rho_u]
type = ParsedFunction
expression = '3.48788261470924*cos(1.1*x)'
[]
[rho_u_bc]
type = ParsedFunction
value = '-diff_coeff*3.48788261470924*1.1*sin(1.1*x)'
vars = 'diff_coeff'
vals = '${diff_coeff}'
[]
[minus_rho_u_bc]
type = ParsedFunction
value = 'diff_coeff*3.48788261470924*1.1*sin(1.1*x)'
vars = 'diff_coeff'
vals = '${diff_coeff}'
[]
[forcing_rho_u]
type = ParsedFunction
expression = '-(10.6975765229419*cos(1.2*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + (10.6975765229419*sin(x)*cos(1.2*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 12.8370918275302*sin(1.2*x)/cos(x))*cos(x) + 3.48788261470924*sin(x)*cos(1.1*x)^2/cos(x)^2 - 7.67334175236034*sin(1.1*x)*cos(1.1*x)/cos(x) + 0.422033796379819*cos(1.1*x)'
[]
[exact_rho_et]
type = ParsedFunction
expression = '26.7439413073546*cos(1.2*x)'
[]
[rho_et_bc]
type = ParsedFunction
value = '-diff_coeff*26.7439413073546*1.2*sin(1.2*x)'
vars = 'diff_coeff'
vals = '${diff_coeff}'
[]
[minus_rho_et_bc]
type = ParsedFunction
value = 'diff_coeff*26.7439413073546*1.2*sin(1.2*x)'
vars = 'diff_coeff'
vals = '${diff_coeff}'
[]
[forcing_rho_et]
type = ParsedFunction
expression = '1.0*(3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.2*x))*sin(x)*cos(1.1*x)/cos(x)^2 - 1.1*(3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.2*x))*sin(1.1*x)/cos(x) + 1.0*(-(10.6975765229419*cos(1.2*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + (10.6975765229419*sin(x)*cos(1.2*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 12.8370918275302*sin(1.2*x)/cos(x))*cos(x) - 32.0927295688256*sin(1.2*x))*cos(1.1*x)/cos(x) + 3.85112754825907*cos(1.2*x)'
[]
[exact_T]
type = ParsedFunction
expression = '0.0106975765229418*cos(1.2*x)/cos(x) - 0.000697576522941848*cos(1.1*x)^2/cos(x)^2'
[]
[exact_p]
type = ParsedFunction
expression = '3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x)'
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_max_its = 50
line_search = none
nl_rel_tol = 1e-11
nl_abs_tol = 1e-11
[]
[Outputs]
exodus = true
csv = true
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2rho]
type = ElementL2Error
variable = rho
function = exact_rho
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2rho_u]
variable = rho_u
function = exact_rho_u
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2rho_et]
variable = rho_et
function = exact_rho_et
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(modules/heat_transfer/test/tests/heat_conduction/coupled_convective_heat_flux/coupled_convective_heat_flux.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Functions]
[./T_infinity_fn]
type = ParsedFunction
expression = (x*x+y*y)+500
[../]
[./Hw_fn]
type = ParsedFunction
expression = ((1-x)*(1-x)+(1-y)*(1-y))+1000
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./T_infinity]
[../]
[./Hw]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
value = 1000
[../]
[]
[AuxKernels]
[./T_infinity_ak]
type = FunctionAux
variable = T_infinity
function = T_infinity_fn
execute_on = initial
[../]
[./Hw_ak]
type = FunctionAux
variable = Hw
function = Hw_fn
execute_on = initial
[../]
[]
[BCs]
[./right]
type = CoupledConvectiveHeatFluxBC
variable = u
boundary = right
htc = Hw
T_infinity = T_infinity
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/markers/error_fraction_marker/error_fraction_marker_fv.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
order = CONSTANT
family = MONOMIAL
fv = true
[]
[]
[Functions]
[solution]
type = ParsedFunction
expression = (exp(x)-1)/(exp(1)-1)
[]
[]
[FVKernels]
[diff]
type = FVDiffusion
variable = u
coeff = coeff
[]
[conv]
type = FVAdvection
variable = u
velocity = '1 0 0'
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = FVDirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Materials]
[diff]
type = ADGenericFunctorMaterial
prop_names = 'coeff'
prop_values = '1'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Adaptivity]
[Indicators]
[error]
type = AnalyticalIndicator
variable = u
function = solution
[]
[]
[Markers]
[marker]
type = ErrorFractionMarker
coarsen = 0.1
indicator = error
refine = 0.3
[]
[]
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/explicit_dynamics/first_test.i)
# One element test to test the central difference time integrator in 3D.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[block_one]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
xmin = 4.5
xmax = 5.5
ymin = 4.5
ymax = 5.5
zmin = 0.0001
zmax = 1.0001
boundary_name_prefix = 'ball'
[]
[block_two]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
xmin = 0.0
xmax = 10
ymin = 0.0
ymax = 10
zmin = -2
zmax = 0
boundary_name_prefix = 'base'
boundary_id_offset = 10
[]
[block_one_id]
type = SubdomainIDGenerator
input = block_one
subdomain_id = 1
[]
[block_two_id]
type = SubdomainIDGenerator
input = block_two
subdomain_id = 2
[]
[combine]
type = MeshCollectionGenerator
inputs = ' block_one_id block_two_id'
[]
allow_renumbering = false
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[AuxVariables]
[vel_x]
[]
[accel_x]
[]
[vel_y]
[]
[accel_y]
[]
[vel_z]
[]
[accel_z]
[]
[]
[AuxKernels]
[accel_x]
type = TestNewmarkTI
variable = accel_x
displacement = disp_x
first = false
[]
[vel_x]
type = TestNewmarkTI
variable = vel_x
displacement = disp_x
[]
[accel_y]
type = TestNewmarkTI
variable = accel_y
displacement = disp_y
first = false
[]
[vel_y]
type = TestNewmarkTI
variable = vel_y
displacement = disp_x
[]
[accel_z]
type = TestNewmarkTI
variable = accel_z
displacement = disp_z
first = false
[]
[vel_z]
type = TestNewmarkTI
variable = vel_z
displacement = disp_z
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
stiffness_damping_coefficient = 0.04
#generate_output = 'stress_zz strain_zz'
[]
[inertia_x]
type = InertialForce
variable = disp_x
[]
[inertia_y]
type = InertialForce
variable = disp_y
[]
[inertia_z]
type = InertialForce
variable = disp_z
[]
[]
[Functions]
[dispz]
type = ParsedFunction
expression = if(t<1.0e3,-0.01*t,0)
[]
[push]
type = ParsedFunction
expression = if(t<10.0,0.01*t,0.1)
[]
[]
[BCs]
[z_front]
type = FunctionDirichletBC
variable = disp_z
boundary = 'ball_front'
function = dispz
preset = false
[]
[x_front]
type = DirichletBC
variable = disp_x
boundary = 'ball_front'
preset = false
value = 0.0
[]
[y_front]
type = DirichletBC
variable = disp_y
boundary = 'ball_front'
preset = false
value = 0.0
[]
[x_fixed]
type = DirichletBC
variable = disp_x
boundary = 'base_back'
preset = false
value = 0.0
[]
[y_fixed]
type = DirichletBC
variable = disp_y
boundary = 'base_back'
preset = false
value = 0.0
[]
[z_fixed]
type = DirichletBC
variable = disp_z
boundary = 'base_back'
preset = false
value = 0.0
[]
[]
[ExplicitDynamicsContact]
[my_contact]
model = frictionless
primary = base_front
secondary = ball_back
penalty = 1.0e3
[]
[]
[Materials]
[elasticity_tensor_block_one]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e3
poissons_ratio = 0.0
block = 1
[]
[elasticity_tensor_block_two]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.0
block = 2
[]
[strain_block]
type = ComputeIncrementalSmallStrain
displacements = 'disp_x disp_y disp_z'
implicit = false
[]
[stress_block]
type = ComputeFiniteStrainElasticStress
[]
[density]
type = GenericConstantMaterial
prop_names = density
prop_values = 1e4
[]
[wave_speed]
type = WaveSpeed
[]
[]
[Executioner]
type = Transient
start_time = -0.01
end_time = 0.25
dt = 0.005
timestep_tolerance = 1e-6
[TimeIntegrator]
type = CentralDifference
[]
[]
[Postprocessors]
[disp_58z]
type = NodalVariableValue
nodeid = 1
variable = disp_z
[]
[critical_time_step]
type = CriticalTimeStep
[]
[contact_pressure_max]
type = NodalExtremeValue
variable = contact_pressure
block = '1 2'
value_type = max
[]
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/variables/fe_hermite/hermite-3-3d.i)
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
nx = 1
ny = 1
nz = 1
elem_type = HEX27
# This problem only has 1 element, so using DistributedMesh in parallel
# isn't really an option, and we don't care that much about DistributedMesh
# in serial.
parallel_type = replicated
[]
[Functions]
[./bc_fnt]
type = ParsedFunction
expression = 3*y*y
[../]
[./bc_fnb]
type = ParsedFunction
expression = -3*y*y
[../]
[./bc_fnl]
type = ParsedFunction
expression = -3*x*x
[../]
[./bc_fnr]
type = ParsedFunction
expression = 3*x*x
[../]
[./bc_fnk]
type = ParsedFunction
expression = -3*z*z
[../]
[./bc_fnf]
type = ParsedFunction
expression = 3*z*z
[../]
[./forcing_fn]
type = ParsedFunction
expression = -6*x-6*y-6*z+(x*x*x)+(y*y*y)+(z*z*z)
[../]
[./solution]
type = ParsedGradFunction
value = (x*x*x)+(y*y*y)+(z*z*z)
grad_x = 3*x*x
grad_y = 3*y*y
grad_z = 3*z*z
[../]
[]
[Variables]
[./u]
order = THIRD
family = HERMITE
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./bc_top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = bc_fnt
[../]
[./bc_bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bc_fnb
[../]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[./bc_front]
type = FunctionNeumannBC
variable = u
boundary = 'front'
function = bc_fnf
[../]
[./bc_back]
type = FunctionNeumannBC
variable = u
boundary = 'back'
function = bc_fnk
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
execute_on = 'timestep_end'
exodus = 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
[]
(test/tests/postprocessors/element_extreme_value/element_proxy_extreme_value.i)
[Problem]
type = FEProblem
solve = false
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
[]
[AuxVariables]
[u]
[]
[w]
[]
[v_x]
[]
[v_y]
[]
[]
[AuxKernels]
[u]
type = FunctionAux
variable = u
function = u
[]
[w]
type = FunctionAux
variable = w
function = w
[]
[v_x]
type = FunctionAux
variable = v_x
function = v_x
[]
[v_y]
type = FunctionAux
variable = v_y
function = v_y
[]
[]
[Functions]
[u] # reaches a maximum value at (0.5, 0.6)
type = ParsedFunction
expression = 'sin(pi*x)*sin(pi*y/1.2)'
[]
[w] # reaches a minium expression at (0.7, 0.8)
type = ParsedFunction
expression = '-sin(pi*x/1.4)*sin(pi*y/1.6)'
[]
[v_x]
type = ParsedFunction
expression = 'x'
[]
[v_y]
type = ParsedFunction
expression = 'y'
[]
[]
[Postprocessors]
# because we set v_x and v_y equal to the x and y coordinates, these two postprocessors
# should just return the point at which u reaches a maximum value
[max_v_from_proxy_x]
type = ElementExtremeValue
variable = v_x
proxy_variable = u
value_type = max
[]
[max_v_from_proxy_y]
type = ElementExtremeValue
variable = v_y
proxy_variable = u
value_type = max
[]
# because we set v_x and v_y equal to the x and y coordinates, these two postprocessors
# should just return the point at which w reaches a minimum value
[min_v_from_proxy_x]
type = ElementExtremeValue
variable = v_x
proxy_variable = w
value_type = min
[]
[min_v_from_proxy_y]
type = ElementExtremeValue
variable = v_y
proxy_variable = w
value_type = min
[]
[]
[Executioner]
type = Steady
# increase the quadrature order to get more quadrature points so that were closer
# to hitting the expect max/min
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/solid_mechanics/test/tests/radial_disp_aux/cylinder_2d_axisymmetric.i)
# The purpose of this set of tests is to check the values computed
# by the RadialDisplacementAux AuxKernel. They should match the
# radial component of the displacment for a cylindrical or spherical
# model.
# This particular model is of a cylinder subjected to uniform thermal
# expansion represented using a 2D axisymmetric model.
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD8
nx = 4
ny = 4
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
coord_type = RZ
[]
[AuxVariables]
[./temp]
[../]
[./rad_disp]
[../]
[]
[Functions]
[./temperature_load]
type = ParsedFunction
expression = t+300.0
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
eigenstrain_names = eigenstrain
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = temperature_load
use_displaced_mesh = false
[../]
[./raddispaux]
type = RadialDisplacementCylinderAux
variable = rad_disp
[../]
[]
[BCs]
[./x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./y]
type = DirichletBC
variable = disp_y
boundary = 'bottom top'
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 300
thermal_expansion_coeff = 1.3e-5
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '51'
line_search = 'none'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
start_time = 0.0
end_time = 1
dt = 1
dtmin = 1
[]
[Outputs]
csv = true
exodus = true
[]
#[Postprocessors]
# [./strain_xx]
# type = SideAverageValue
# variable =
# block = 0
# [../]
#[]
(test/tests/materials/material/material_test_dg.i)
[Mesh]
file = sq-2blk.e
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[Functions]
active = 'forcing_fn exact_fn'
[./forcing_fn]
type = ParsedFunction
expression = (x*x*x)-6.0*x
[../]
[./exact_fn]
type = ParsedGradFunction
value = (x*x*x)
grad_x = 3*x*x
grad_y = 0
[../]
[]
[Kernels]
active = 'diff abs forcing'
[./diff]
type = MatDiffusionTest
variable = u
prop_name = matp
[../]
[./abs]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGKernels]
active = 'dgdiff'
[./dgdiff]
type = DGDiffusion
variable = u
sigma = 6
epsilon = -1.0
diff = matp
[../]
[]
[BCs]
active = 'all'
[./all]
type = DGMDDBC
variable = u
boundary = '1 2 3 4'
function = exact_fn
prop_name = matp
sigma = 6
epsilon = -1.0
[../]
[]
[Materials]
active = 'mat_1 mat_2'
[./mat_1]
type = MTMaterial
block = 1
value = 1
[../]
[./mat_2]
type = MTMaterial
block = 2
value = 2
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out_dg
exodus = true
[]
(test/tests/postprocessors/interface_value/interface_fv_variable_value_postprocessor.i)
postprocessor_type = InterfaceAverageVariableValuePostprocessor
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 6
xmax = 3
ny = 9
ymax = 3
elem_type = QUAD4
[]
[./subdomain_id]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '2 1 0'
block_id = 1
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain_id
primary_block = '0'
paired_block = '1'
new_boundary = 'interface'
[../]
[]
[Functions]
[./fn_exact]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[./ffn]
type = ParsedFunction
expression = -4
[../]
[]
[Variables]
[./u]
family = MONOMIAL
order = CONSTANT
fv = true
[../]
[]
[FVKernels]
[./diff]
type = FVDiffusion
variable = u
coeff = 1
[../]
[./ffn]
type = FVBodyForce
variable = u
function = ffn
[../]
[]
[FVBCs]
[./all]
type = FVFunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = fn_exact
[../]
[]
[Materials]
[./stateful1]
type = GenericConstantMaterial
block = 0
prop_names = 'diffusivity'
prop_values = 10
[../]
[./stateful2]
type = GenericConstantMaterial
block = 1
prop_names = 'diffusivity'
prop_values = 4
[../]
[]
[AuxKernels]
[./diffusivity_1]
type = MaterialRealAux
property = diffusivity
variable = diffusivity_1
[]
[./diffusivity_2]
type = MaterialRealAux
property = diffusivity
variable = diffusivity_2
[]
[]
[AuxVariables]
[./diffusivity_1]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_2]
family = MONOMIAL
order = CONSTANT
[]
[]
[Postprocessors]
[./diffusivity_average]
type = ${postprocessor_type}
interface_value_type = average
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_jump_primary_secondary]
type = ${postprocessor_type}
interface_value_type = jump_primary_minus_secondary
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_jump_secondary_primary]
type = ${postprocessor_type}
interface_value_type = jump_secondary_minus_primary
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_jump_abs]
type = ${postprocessor_type}
interface_value_type = jump_abs
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_primary]
type = ${postprocessor_type}
interface_value_type = primary
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_secondary]
type = ${postprocessor_type}
interface_value_type = secondary
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_single_variable]
type = ${postprocessor_type}
interface_value_type = primary
variable = diffusivity_1
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
file_base = ${raw ${postprocessor_type} _fv}
exodus = true
[]
(modules/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/scalar_material_damage/ad_nonlocal_scalar_damage.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -0.5
xmax = 0.5
nx = 5
ny = 5
nz = 5
elem_type = HEX8
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = SMALL
incremental = true
add_variables = true
generate_output = 'stress_xx strain_xx'
use_automatic_differentiation = true
[]
[]
[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
[]
[axial_load]
type = ADDirichletBC
variable = disp_x
boundary = right
value = 0.01
[]
[]
[Functions]
[func]
type = ParsedFunction
expression = 'if(x>=0,0.5*t, t)'
[]
[]
[UserObjects]
[ele_avg]
type = RadialAverage
prop_name = local_damage_reg
weights = constant
execute_on = "INITIAL timestep_end"
radius = 0.55
[]
[]
[Materials]
[non_ad_local_damage]
type = MaterialADConverter
ad_props_in = local_damage
reg_props_out = local_damage_reg
[]
[local_damage_index]
type = ADGenericFunctionMaterial
prop_names = local_damage_index
prop_values = func
[]
[local_damage]
type = ADScalarMaterialDamage
damage_index = local_damage_index
damage_index_name = local_damage
[]
[damage]
type = ADNonlocalDamage
average_UO = ele_avg
local_damage_model = local_damage
damage_index_name = nonlocal_damage
[]
[elasticity]
type = ADComputeIsotropicElasticityTensor
poissons_ratio = 0.2
youngs_modulus = 10e9
[]
[stress]
type = ADComputeDamageStress
damage_model = damage
[]
[]
[Postprocessors]
[stress_xx]
type = ElementAverageValue
variable = stress_xx
[]
[strain_xx]
type = ElementAverageValue
variable = strain_xx
[]
[nonlocal_damage]
type = ADElementAverageMaterialProperty
mat_prop = nonlocal_damage
[]
[local_damage]
type = ADElementAverageMaterialProperty
mat_prop = local_damage
[]
[]
[Executioner]
type = Transient
l_max_its = 50
l_tol = 1e-8
nl_max_its = 20
nl_rel_tol = 1e-12
nl_abs_tol = 1e-8
dt = 0.2
dtmin = 0.1
end_time = 1
[]
[Outputs]
csv = true
[]
(modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_ktemp_1D.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
nx = 2
xmax = 2
[]
[split]
type = SubdomainBoundingBoxGenerator
input = mesh
block_id = 1
bottom_left = '1 0 0'
top_right = '2 0 0'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = split
primary_block = 1
paired_block = 0
new_boundary = 'interface0'
[]
uniform_refine = 4
[]
[Variables]
[T]
order = FIRST
family = MONOMIAL
[]
[]
[AuxVariables]
[Tbulk]
order = FIRST
family = LAGRANGE
initial_condition = 300 # K
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = T
diffusivity = conductivity
[]
[source]
type = BodyForce
variable = T
value = 1.0
[]
[]
[DGKernels]
[dg_diff]
type = DGDiffusion
variable = T
epsilon = -1
sigma = 6
diff = conductivity
exclude_boundary = 'interface0'
[]
[]
[InterfaceKernels]
[gap_var]
type = SideSetHeatTransferKernel
variable = T
neighbor_var = T
boundary = 'interface0'
Tbulk_var = Tbulk
[]
[]
[Functions]
# Defining temperature dependent fucntion for conductivity across side set
[kgap]
type = ParsedFunction
expression = 't / 200'
[]
[bc_func]
type = ConstantFunction
value = 300
[]
[exact]
type = ParsedFunction
expression = '
A := if(x < 1, -0.5, -0.25);
B := if(x < 1, -0.293209850655001, 0.0545267662299068);
C := if(x < 1, 300.206790149345, 300.19547323377);
d := -1;
A * (x+d) * (x+d) + B * (x+d) + C'
[]
[]
[BCs]
[bc_left]
type = DGFunctionDiffusionDirichletBC
boundary = 'left'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[bc_right]
type = DGFunctionDiffusionDirichletBC
boundary = 'right'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[]
[Materials]
[k0]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 1.0
block = 0
[]
[k1]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 2.0
block = 1
[]
[gap_mat]
type = SideSetHeatTransferMaterial
boundary = 'interface0'
# Using temperature dependent function for gap conductivity
conductivity_temperature_function = kgap
# Variable to evaluate conductivity with
gap_temperature = Tbulk
gap_length = 1.0
h_primary = 1
h_neighbor = 1
emissivity_primary = 1
emissivity_neighbor = 1
[]
[]
[Postprocessors]
[error]
type = ElementL2Error
variable = T
function = exact
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/thermal_expansion_function/mean.i)
# This test checks the thermal expansion calculated via a mean thermal expansion coefficient.
# The coefficient is selected so as to result in a 1e-4 strain in the x-axis, and to cross over
# from positive to negative strain.
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[temp]
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = SMALL
add_variables = true
eigenstrain_names = eigenstrain
generate_output = 'strain_xx strain_yy strain_zz'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[bottom]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[back]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
[]
[AuxKernels]
[temp]
type = FunctionAux
variable = temp
function = '1 + t'
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1
poissons_ratio = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[thermal_expansion_strain]
type = ComputeMeanThermalExpansionFunctionEigenstrain
thermal_expansion_function = cte_func_mean
thermal_expansion_function_reference_temperature = 1.2
stress_free_temperature = 1.5
temperature = temp
eigenstrain_name = eigenstrain
[]
[]
[Functions]
[cte_func_mean]
type = ParsedFunction
symbol_names = 'T T_stress_free T_ref end_strain'
symbol_values = '2 1.5 1.2 1e-4'
expression = 'end_strain / (T - T_stress_free - end_strain * (T_stress_free - T_ref))'
[]
[]
[Postprocessors]
[disp_x_max]
type = SideAverageValue
variable = disp_x
boundary = right
[]
[temp_avg]
type = ElementAverageValue
variable = temp
[]
[]
[Executioner]
type = Transient
end_time = 1.0
dt = 0.1
[]
[Outputs]
csv = true
[]
(modules/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/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/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/bernoulli-1d-parsed-function.i)
rho = 1.1
advected_interp_method = 'upwind'
velocity_interp_method = 'rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 1
dx = '1 1'
ix = '3 3'
subdomain_id = '1 2'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
pressure = pressure
porosity = porosity
[]
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[pressure]
type = BernoulliPressureVariable
u = u
porosity = porosity
rho = ${rho}
[]
[]
[Functions]
[porosity]
type = ParsedFunction
expression = 'if(x > 1, 0.5, 1)'
[]
[]
[AuxVariables]
[has_porosity_jump_face]
type = MooseVariableFVReal
[]
[porosity_out]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[has_porosity_jump_face]
type = HasPorosityJumpFace
porosity = porosity
execute_on = 'initial timestep_end'
variable = has_porosity_jump_face
[]
[porosity_out]
type = FunctorAux
variable = porosity_out
functor = porosity
execute_on = 'initial timestep_end'
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = u
pressure = pressure
porosity = porosity
momentum_component = 'x'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = '1'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
[]
[Postprocessors]
[inlet_p]
type = SideAverageValue
variable = 'pressure'
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 'right'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/basic-conserved-pcnsfv-kt.i)
[GlobalParams]
fp = fp
limiter = 'central_difference'
two_term_boundary_expansion = true
[]
[Mesh]
[cartesian]
type = GeneratedMeshGenerator
dim = 1
xmin = .1
xmax = .6
nx = 2
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Problem]
fv_bcs_integrity_check = false
[]
[Variables]
[rho]
type = MooseVariableFVReal
[]
[rho_ud]
type = MooseVariableFVReal
[]
[rho_et]
type = MooseVariableFVReal
[]
[]
[ICs]
[pressure]
type = FunctionIC
variable = rho
function = 'exact_rho'
[]
[sup_vel_x]
type = FunctionIC
variable = rho_ud
function = 'exact_rho_ud'
[]
[T_fluid]
type = FunctionIC
variable = rho_et
function = 'exact_rho_et'
[]
[]
[FVKernels]
[mass_advection]
type = PCNSFVKT
variable = rho
eqn = "mass"
[]
[mass_fn]
type = FVBodyForce
variable = rho
function = 'forcing_rho'
[]
[momentum_x_advection]
type = PCNSFVKT
variable = rho_ud
momentum_component = x
eqn = "momentum"
[]
[momentum_fn]
type = FVBodyForce
variable = rho_ud
function = 'forcing_rho_ud'
[]
[fluid_energy_advection]
type = PCNSFVKT
variable = rho_et
eqn = "energy"
[]
[energy_fn]
type = FVBodyForce
variable = rho_et
function = 'forcing_rho_et'
[]
[]
[FVBCs]
[mass_left]
variable = rho
type = PCNSFVStrongBC
boundary = left
T_fluid = 'exact_T'
superficial_velocity = 'exact_superficial_velocity'
eqn = 'mass'
[]
[momentum_left]
variable = rho_ud
type = PCNSFVStrongBC
boundary = left
T_fluid = 'exact_T'
superficial_velocity = 'exact_superficial_velocity'
eqn = 'momentum'
momentum_component = 'x'
[]
[energy_left]
variable = rho_et
type = PCNSFVStrongBC
boundary = left
T_fluid = 'exact_T'
superficial_velocity = 'exact_superficial_velocity'
eqn = 'energy'
[]
[mass_right]
variable = rho
type = PCNSFVStrongBC
boundary = right
eqn = 'mass'
pressure = 'exact_p'
[]
[momentum_right]
variable = rho_ud
type = PCNSFVStrongBC
boundary = right
eqn = 'momentum'
momentum_component = 'x'
pressure = 'exact_p'
[]
[energy_right]
variable = rho_et
type = PCNSFVStrongBC
boundary = right
eqn = 'energy'
pressure = 'exact_p'
[]
# help gradient reconstruction
[rho_right]
type = FVFunctionDirichletBC
variable = rho
function = exact_rho
boundary = 'right'
[]
[rho_ud_left]
type = FVFunctionDirichletBC
variable = rho_ud
function = exact_rho_ud
boundary = 'left'
[]
[rho_et_left]
type = FVFunctionDirichletBC
variable = rho_et
function = exact_rho_et
boundary = 'left'
[]
[]
[Materials]
[var_mat]
type = PorousConservedVarMaterial
rho = rho
superficial_rhou = rho_ud
rho_et = rho_et
porosity = porosity
[]
[porosity]
type = GenericFunctionMaterial
prop_names = 'porosity'
prop_values = 'eps'
[]
[]
[Functions]
[exact_rho]
type = ParsedFunction
expression = '3.48788261470924*cos(x)'
[]
[forcing_rho]
type = ParsedFunction
expression = '-3.45300378856215*sin(1.1*x)'
[]
[exact_rho_ud]
type = ParsedFunction
expression = '3.13909435323832*cos(1.1*x)'
[]
[forcing_rho_ud]
type = ParsedFunction
expression = '-0.9*(10.6975765229419*cos(1.2*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + 0.9*(10.6975765229419*sin(x)*cos(1.2*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 12.8370918275302*sin(1.2*x)/cos(x))*cos(x) + 3.13909435323832*sin(x)*cos(1.1*x)^2/cos(x)^2 - 6.9060075771243*sin(1.1*x)*cos(1.1*x)/cos(x)'
[]
[exact_rho_et]
type = ParsedFunction
expression = '26.7439413073546*cos(1.2*x)'
[]
[forcing_rho_et]
type = ParsedFunction
expression = '0.9*(3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.2*x))*sin(x)*cos(1.1*x)/cos(x)^2 - 0.99*(3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.2*x))*sin(1.1*x)/cos(x) + 0.9*(-(10.6975765229419*cos(1.2*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + (10.6975765229419*sin(x)*cos(1.2*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 12.8370918275302*sin(1.2*x)/cos(x))*cos(x) - 32.0927295688256*sin(1.2*x))*cos(1.1*x)/cos(x)'
[]
[exact_T]
type = ParsedFunction
expression = '0.0106975765229418*cos(1.2*x)/cos(x) - 0.000697576522941848*cos(1.1*x)^2/cos(x)^2'
[]
[exact_eps_p]
type = ParsedFunction
expression = '3.13909435323832*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x)'
[]
[exact_p]
type = ParsedFunction
expression = '3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x)'
[]
[exact_sup_vel_x]
type = ParsedFunction
expression = '0.9*cos(1.1*x)/cos(x)'
[]
[exact_superficial_velocity]
type = ParsedVectorFunction
expression_x = '0.9*cos(1.1*x)/cos(x)'
[]
[eps]
type = ParsedFunction
expression = '0.9'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Transient
num_steps = 1
dtmin = 1
petsc_options = '-snes_linesearch_monitor'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_max_its = 50
line_search = bt
[]
[Outputs]
exodus = true
csv = true
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2rho]
type = ElementL2Error
variable = rho
function = exact_rho
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2rho_ud]
variable = rho_ud
function = exact_rho_ud
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2rho_et]
variable = rho_et
function = exact_rho_et
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(modules/phase_field/examples/kim-kim-suzuki/kks_example_ternary.i)
#
# KKS ternary (3 chemical component) system example in the split form
# We track c1 and c2 only, since c1 + c2 + c3 = 1
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 150
ny = 15
nz = 0
xmin = -25
xmax = 25
ymin = -2.5
ymax = 2.5
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[AuxVariables]
[./Fglobal]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Variables]
# order parameter
[./eta]
order = FIRST
family = LAGRANGE
[../]
# solute 1 concentration
[./c1]
order = FIRST
family = LAGRANGE
[../]
# solute 2 concentration
[./c2]
order = FIRST
family = LAGRANGE
[../]
# chemical potential solute 1
[./w1]
order = FIRST
family = LAGRANGE
[../]
# chemical potential solute 2
[./w2]
order = FIRST
family = LAGRANGE
[../]
# Liquid phase solute 1 concentration
[./c1l]
order = FIRST
family = LAGRANGE
initial_condition = 0.1
[../]
# Liquid phase solute 2 concentration
[./c2l]
order = FIRST
family = LAGRANGE
initial_condition = 0.05
[../]
# Solid phase solute 1 concentration
[./c1s]
order = FIRST
family = LAGRANGE
initial_condition = 0.8
[../]
# Solid phase solute 2 concentration
[./c2s]
order = FIRST
family = LAGRANGE
initial_condition = 0.1
[../]
[]
[Functions]
[./ic_func_eta]
type = ParsedFunction
expression = '0.5*(1.0-tanh((x)/sqrt(2.0)))'
[../]
[./ic_func_c1]
type = ParsedFunction
expression = '0.8*(0.5*(1.0-tanh(x/sqrt(2.0))))^3*(6*(0.5*(1.0-tanh(x/sqrt(2.0))))^2-15*(0.5*(1.0-tanh(x/sqrt(2.0))))+10)+0.1*(1-(0.5*(1.0-tanh(x/sqrt(2.0))))^3*(6*(0.5*(1.0-tanh(x/sqrt(2.0))))^2-15*(0.5*(1.0-tanh(x/sqrt(2.0))))+10))'
[../]
[./ic_func_c2]
type = ParsedFunction
expression = '0.1*(0.5*(1.0-tanh(x/sqrt(2.0))))^3*(6*(0.5*(1.0-tanh(x/sqrt(2.0))))^2-15*(0.5*(1.0-tanh(x/sqrt(2.0))))+10)+0.05*(1-(0.5*(1.0-tanh(x/sqrt(2.0))))^3*(6*(0.5*(1.0-tanh(x/sqrt(2.0))))^2-15*(0.5*(1.0-tanh(x/sqrt(2.0))))+10))'
[../]
[]
[ICs]
[./eta]
variable = eta
type = FunctionIC
function = ic_func_eta
[../]
[./c1]
variable = c1
type = FunctionIC
function = ic_func_c1
[../]
[./c2]
variable = c2
type = FunctionIC
function = ic_func_c2
[../]
[]
[Materials]
# Free energy of the liquid
[./fl]
type = DerivativeParsedMaterial
property_name = fl
coupled_variables = 'c1l c2l'
expression = '(0.1-c1l)^2+(0.05-c2l)^2'
[../]
# Free energy of the solid
[./fs]
type = DerivativeParsedMaterial
property_name = fs
coupled_variables = 'c1s c2s'
expression = '(0.8-c1s)^2+(0.1-c2s)^2'
[../]
# 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 eps_sq'
prop_values = '0.7 0.7 1.0 '
[../]
[]
[Kernels]
# enforce c1 = (1-h(eta))*c1l + h(eta)*c1s
[./PhaseConc1]
type = KKSPhaseConcentration
ca = c1l
variable = c1s
c = c1
eta = eta
[../]
# enforce c2 = (1-h(eta))*c2l + h(eta)*c2s
[./PhaseConc2]
type = KKSPhaseConcentration
ca = c2l
variable = c2s
c = c2
eta = eta
[../]
# enforce pointwise equality of chemical potentials
[./ChemPotSolute1]
type = KKSPhaseChemicalPotential
variable = c1l
cb = c1s
fa_name = fl
fb_name = fs
args_a = 'c2l'
args_b = 'c2s'
[../]
[./ChemPotSolute2]
type = KKSPhaseChemicalPotential
variable = c2l
cb = c2s
fa_name = fl
fb_name = fs
args_a = 'c1l'
args_b = 'c1s'
[../]
#
# Cahn-Hilliard Equations
#
[./CHBulk1]
type = KKSSplitCHCRes
variable = c1
ca = c1l
fa_name = fl
w = w1
args_a = 'c2l'
[../]
[./CHBulk2]
type = KKSSplitCHCRes
variable = c2
ca = c2l
fa_name = fl
w = w2
args_a = 'c1l'
[../]
[./dc1dt]
type = CoupledTimeDerivative
variable = w1
v = c1
[../]
[./dc2dt]
type = CoupledTimeDerivative
variable = w2
v = c2
[../]
[./w1kernel]
type = SplitCHWRes
mob_name = M
variable = w1
[../]
[./w2kernel]
type = SplitCHWRes
mob_name = M
variable = w2
[../]
#
# Allen-Cahn Equation
#
[./ACBulkF]
type = KKSACBulkF
variable = eta
fa_name = fl
fb_name = fs
w = 1.0
coupled_variables = 'c1l c1s c2l c2s'
[../]
[./ACBulkC1]
type = KKSACBulkC
variable = eta
ca = c1l
cb = c1s
fa_name = fl
coupled_variables = 'c2l'
[../]
[./ACBulkC2]
type = KKSACBulkC
variable = eta
ca = c2l
cb = c2s
fa_name = fl
coupled_variables = 'c1l'
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = eps_sq
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[AuxKernels]
[./GlobalFreeEnergy]
variable = Fglobal
type = KKSGlobalFreeEnergy
fa_name = fl
fb_name = fs
w = 1.0
[../]
[]
[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 = 100
nl_max_its = 100
num_steps = 50
dt = 0.1
[]
#
# Precondition using handcoded off-diagonal terms
#
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Outputs]
exodus = true
[]
(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/heat_transfer/test/tests/code_verification/spherical_test_no4.i)
# Problem III.4
#
# A spherical shell has thermal conductivity k and heat generation q.
# It has an inner radius ri and outer radius ro. A constant heat flux is
# applied to the inside surface qin and the outside surface is exposed
# to a fluid temperature uf and heat transfer coefficient h.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
xmin = 0.2
nx = 4
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Problem]
coord_type = RSPHERICAL
[]
[Functions]
[./exact]
type = ParsedFunction
symbol_names = 'qin q k ri ro uf h'
symbol_values = '100 1200 1.0 0.2 1 100 10'
expression = 'uf+ (q/(6*k)) * ( ro^2-x^2 + 2*k*(ro^3-ri^3)/(h*ro^2) + 2 * ri^3 * (1/ro-1/x) ) + (1/x-1/ro+k/(h*ro^2)) * qin * ri^2 / k'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[./heatsource]
type = HeatSource
function = 1200
variable = u
[../]
[]
[BCs]
[./ui]
type = NeumannBC
boundary = left
variable = u
value = 100
[../]
[./uo]
type = CoupledConvectiveHeatFluxBC
boundary = right
variable = u
htc = 10.0
T_infinity = 100
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1.0 1.0 1.0'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = true
[]
(test/tests/vectorpostprocessors/element_value_sampler/element_value_sampler.i)
# Tests the ElementValueSampler vector post-processor. In this test, 2 constant
# monomial variables are given distributions by a function and are output to a CSV file.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]
[Functions]
[./u_fn]
type = ParsedFunction
expression = '2 * x + 3 * y'
[../]
[./v_fn]
type = ParsedFunction
expression = 'x + y'
[../]
[]
[AuxVariables]
[./u]
family = MONOMIAL
order = CONSTANT
[../]
[./v]
family = MONOMIAL
order = CONSTANT
[../]
[]
[ICs]
[./u_ic]
type = FunctionIC
variable = u
function = u_fn
[../]
[./v_ic]
type = FunctionIC
variable = v
function = v_fn
[../]
[]
[VectorPostprocessors]
[./element_value_sampler]
type = ElementValueSampler
variable = 'u v'
sort_by = id
execute_on = 'initial'
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
file_base = 'element_value_sampler'
csv = true
execute_on = 'initial'
[]
(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
[]
(test/tests/mortar/gap-conductance-2d-non-conforming/gap-conductance.i)
[Mesh]
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[./primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[../]
[./secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[../]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./T]
block = '1 2'
[../]
[./lambda]
block = '10'
[../]
[]
[BCs]
[./neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln
variable = T
boundary = '3 4 5 6 7 8'
[../]
[]
[Kernels]
[./conduction]
type = Diffusion
variable = T
block = '1 2'
[../]
[./sink]
type = Reaction
variable = T
block = '1 2'
[../]
[./forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[../]
[]
[Functions]
[./forcing_function]
type = ParsedFunction
expression = '-4 + x^2 + y^2'
[../]
[./exact_soln]
type = ParsedFunction
expression = 'x^2 + y^2'
[../]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[./mortar]
type = GapHeatConductanceTest
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
[../]
[]
[Materials]
[constant]
type = ADGenericConstantMaterial
prop_names = 'gap_conductance'
prop_values = '.03'
block = '1 2'
[]
[./ssm]
type = SpatialStatefulMaterial
block = '1 2'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type'
petsc_options_value = 'lu basic'
[]
[Outputs]
exodus = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
(test/tests/userobjects/nearest_point_layered_side_average_functor/nearest_point_layered_side_average_functor.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 40
ny = 10
nz = 10
allow_renumbering = false
[]
[Materials]
[u_mat]
type = GenericFunctorMaterial
prop_names = 'u'
prop_values = 'u_fn'
[]
[]
[AuxVariables]
[u_layered_average]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[u_layered_average_kern]
type = SpatialUserObjectAux
variable = u_layered_average
user_object = nplaf
boundary = 'bottom top'
execute_on = 'INITIAL'
[]
[]
[Functions]
[u_fn]
type = ParsedFunction
expression = 'x + y + z'
[]
[]
[UserObjects]
[nplaf]
type = NearestPointLayeredSideAverageFunctor
direction = x
points='
0.25 0 0.25
0.75 0 0.25
0.25 0 0.75
0.75 0 0.75'
num_layers = 10
functor = u
boundary = 'bottom top'
execute_on = 'INITIAL'
[]
[]
[VectorPostprocessors]
[test_vpp]
type = SideValueSampler
variable = u_layered_average
boundary = 'bottom top'
sort_by = id
execute_on = 'INITIAL'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = 'INITIAL'
[]
(test/tests/bcs/sin_bc/sin_neumann_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Functions]
[./initial_value]
type = ParsedFunction
expression = 'x'
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
# [./InitialCondition]
# type = FunctionIC
# function = initial_value
# [../]
[../]
[]
[Kernels]
active = 'diff ie'
[./diff]
type = Diffusion
variable = u
[../]
[./ie]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 1
[../]
[./right]
type = SinNeumannBC
variable = u
boundary = 1
initial = 1.0
final = 2.0
duration = 10.0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
num_steps = 10
dt = 1.0
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/thermal_expansion/constant_expansion_coeff.i)
# This test involves only thermal expansion strains on a 2x2x2 cube of approximate
# steel material. An initial temperature of 25 degrees C is given for the material,
# and an auxkernel is used to calculate the temperature in the entire cube to
# raise the temperature each time step. After the first timestep,in which the
# temperature jumps, the temperature increases by 6.25C each timestep.
# The thermal strain increment should therefore be
# 6.25 C * 1.3e-5 1/C = 8.125e-5 m/m.
# This test is also designed to be used to identify problems with restart files
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./temp]
[../]
[]
[Functions]
[./temperature_load]
type = ParsedFunction
expression = t*(500.0)+300.0
[../]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[./all]
strain = SMALL
incremental = true
add_variables = true
eigenstrain_names = eigenstrain
generate_output = 'strain_xx strain_yy strain_zz'
[../]
[../]
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = temperature_load
[../]
[]
[BCs]
[./x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./z_bot]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 298
thermal_expansion_coeff = 1.3e-5
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
end_time = 0.075
dt = 0.0125
dtmin = 0.0001
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Postprocessors]
[./strain_xx]
type = ElementAverageValue
variable = strain_xx
[../]
[./strain_yy]
type = ElementAverageValue
variable = strain_yy
[../]
[./strain_zz]
type = ElementAverageValue
variable = strain_zz
[../]
[./temperature]
type = AverageNodalVariableValue
variable = temp
[../]
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure/steady_state.i)
[GlobalParams]
scaling_factor_1phase = '1. 1.e-2 1.e-4'
scaling_factor_temperature = 1e-2
initial_T = 500
initial_p = 6.e6
initial_vel = 0
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
[]
[]
[SolidProperties]
[mat1]
type = ThermalFunctionSolidProperties
k = 16
cp = 356.
rho = 6.551400E+03
[]
[]
[Functions]
[Ts_init]
type = ParsedFunction
expression = '2*sin(x*pi)+507'
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = fp
# geometry
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 3
A = 1.907720E-04
D_h = 1.698566E-02
f = 0.1
[]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 3
names = 'wall'
n_part_elems = 1
solid_properties = 'mat1'
solid_properties_T_ref = '300'
inner_radius = 0.01
widths = 0.1
initial_T = Ts_init
[]
[ht]
type = HeatTransferFromHeatStructure1Phase
flow_channel = pipe
hs = hs
hs_side = INNER
Hw = 10000
[]
[temp_outside]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:outer
T = Ts_init
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe:in'
m_dot = 0.1
T = 500
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = 6e6
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 1
num_steps = 100
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
[]
[Outputs]
exodus = true
execute_on = 'initial final'
velocity_as_vector = 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/solid_mechanics/test/tests/radial_disp_aux/cylinder_3d_cartesian.i)
# The purpose of this set of tests is to check the values computed
# by the RadialDisplacementAux AuxKernel. They should match the
# radial component of the displacment for a cylindrical or spherical
# model.
# This particular model is of a cylinder subjected to uniform thermal
# expansion represented using a 3D Cartesian model.
[Mesh]
type = FileMesh
file = cylinder_sector_3d.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
order = SECOND
family = LAGRANGE
[]
[AuxVariables]
[./temp]
[../]
[./rad_disp]
[../]
[]
[Functions]
[./temperature_load]
type = ParsedFunction
expression = t+300.0
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
eigenstrain_names = eigenstrain
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = temperature_load
use_displaced_mesh = false
[../]
[./raddispaux]
type = RadialDisplacementCylinderAux
variable = rad_disp
origin = '0 0 0'
axis_vector = '0 0 1'
[../]
[]
[BCs]
[./x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./y]
type = DirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[./z]
type = DirichletBC
variable = disp_z
boundary = '3 4'
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 300
thermal_expansion_coeff = 1.3e-5
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '51'
line_search = 'none'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
start_time = 0.0
end_time = 1
dt = 1
dtmin = 1
[]
[Outputs]
csv = true
exodus = true
[]
#[Postprocessors]
# [./strain_xx]
# type = SideAverageValue
# variable =
# block = 0
# [../]
#[]
(test/tests/functions/periodic_function/periodic_function.i)
[Mesh]
type = GeneratedMesh
dim = 3
#Offsets of 0.1 are intentionally used to avoid test stability issues that could
#arise from evaluating the functions directly on discontinuities.
xmin = -1.9
xmax = 2.1
ymin = -1.9
ymax = 2.1
zmin = -1.9
zmax = 2.1
nx = 12
ny = 12
nz = 12
elem_type = HEX8
[]
[Functions]
[base_t]
type = ParsedFunction
expression = 't'
[]
[periodic_t]
type = PeriodicFunction
base_function = base_t
period_time = 1
[]
[base_x]
type = ParsedFunction
expression = 'x'
[]
[periodic_x]
type = PeriodicFunction
base_function = base_x
period_x = 1
[]
[base_y]
type = ParsedFunction
expression = 'y'
[]
[periodic_y]
type = PeriodicFunction
base_function = base_y
period_y = 1
[]
[base_z]
type = ParsedFunction
expression = 'z'
[]
[periodic_z]
type = PeriodicFunction
base_function = base_z
period_z = 1
[]
[base_xyzt]
type = ParsedFunction
expression = 'x+y+z+t'
[]
[periodic_xyzt]
type = PeriodicFunction
base_function = base_xyzt
period_x = 1
period_y = 1
period_z = 1
period_time = 1
[]
[]
[AuxVariables]
[pt]
[]
[px]
[]
[py]
[]
[pz]
[]
[pxyzt]
[]
[]
[AuxKernels]
[pt]
type = FunctionAux
variable = pt
function = periodic_t
execute_on = 'initial timestep_end'
[]
[px]
type = FunctionAux
variable = px
function = periodic_x
execute_on = 'initial timestep_end'
[]
[py]
type = FunctionAux
variable = py
function = periodic_y
execute_on = 'initial timestep_end'
[]
[pz]
type = FunctionAux
variable = pz
function = periodic_z
execute_on = 'initial timestep_end'
[]
[pxyzt]
type = FunctionAux
variable = pxyzt
function = periodic_xyzt
execute_on = 'initial timestep_end'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
#Offsets of 0.1 are intentionally used to avoid test stability issues that could
#arise from evaluating the functions directly on discontinuities.
start_time = -1.9
end_time = 2.1
dt = 0.5
[]
[Outputs]
exodus = 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/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_no_parts_steady_stabilized.i)
# This input file tests several different things:
# .) The axisymmetric (RZ) form of the governing equations.
# .) An open boundary.
# .) Not integrating the pressure by parts, thereby requiring a pressure pin.
# .) Natural boundary condition at the outlet.
[GlobalParams]
integrate_p_by_parts = false
laplace = true
gravity = '0 0 0'
supg = true
pspg = true
order = FIRST
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = Newton
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Variables]
[./vel_x]
# Velocity in radial (r) direction
[../]
[./vel_y]
# Velocity in axial (z) direction
[../]
[./p]
[../]
[]
[BCs]
[./p_corner]
# This is required, because pressure term is *not* integrated by parts.
type = DirichletBC
boundary = top_right
value = 0
variable = p
[../]
[./u_in]
type = DirichletBC
boundary = bottom
variable = vel_x
value = 0
[../]
[./v_in]
type = FunctionDirichletBC
boundary = bottom
variable = vel_y
function = 'inlet_func'
[../]
[./u_axis_and_walls]
type = DirichletBC
boundary = 'left right'
variable = vel_x
value = 0
[../]
[./v_no_slip]
type = DirichletBC
boundary = 'right'
variable = vel_y
value = 0
[../]
[]
[Kernels]
[./mass]
type = INSMassRZ
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 'volume'
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(test/tests/restart/restart_transient_from_transient/restart_trans_with_2subs.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = 'replicated'
[]
[Problem]
restart_file_base = pseudo_trans_with_2subs_out_cp/LATEST
[]
[AuxVariables]
[Tf]
[]
[]
[Variables]
[power_density]
[]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2' # increase this function to drive transient
[]
[]
[Kernels]
[timedt]
type = TimeDerivative
variable = power_density
[]
[diff]
type = Diffusion
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[BCs]
[left]
type = DirichletBC
variable = power_density
boundary = left
value = 50
[]
[right]
type = DirichletBC
variable = power_density
boundary = right
value = 1e3
[]
[]
[Postprocessors]
[pwr_avg]
type = ElementAverageValue
block = '0'
variable = power_density
execute_on = 'initial timestep_end'
[]
[temp_avg]
type = ElementAverageValue
variable = Tf
block = '0'
execute_on = 'initial timestep_end'
[]
[temp_max]
type = ElementExtremeValue
value_type = max
variable = Tf
block = '0'
execute_on = 'initial timestep_end'
[]
[temp_min]
type = ElementExtremeValue
value_type = min
variable = Tf
block = '0'
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 3
dt = 1.0
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
line_search = none
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0
0.5 0 0'
input_files = restart_trans_with_2subs_sub.i
execute_on = 'timestep_end'
[../]
[]
[Transfers]
[p_to_sub]
type = MultiAppProjectionTransfer
source_variable = power_density
variable = power_density
to_multi_app = sub
execute_on = 'timestep_end'
[]
[t_from_sub]
type = MultiAppGeometricInterpolationTransfer
source_variable = temp
variable = Tf
from_multi_app = sub
execute_on = 'timestep_end'
[]
[]
[Outputs]
exodus = true
perf_graph = 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/solid_mechanics/test/tests/thermal_expansion_function/finite_const.i)
# This tests the thermal expansion coefficient function using both
# options to specify that function: mean and instantaneous. There
# two blocks, each containing a single element, and these use the
# two variants of the function.
# In this test, the instantaneous CTE function has a constant value,
# while the mean CTE function is an analytic function designed to
# give the same response. If \bar{alpha}(T) is the mean CTE function,
# and \alpha(T) is the instantaneous CTE function,
# \bar{\alpha}(T) = 1/(T-Tref) \intA^{T}_{Tsf} \alpha(T) dT
# where Tref is the reference temperature used to define the mean CTE
# function, and Tsf is the stress-free temperature.
# This version of the test uses finite deformation theory.
# The two models produce very similar results. There are slight
# differences due to the large deformation treatment.
[Mesh]
file = 'blocks.e'
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
eigenstrain_names = eigenstrain
generate_output = 'strain_xx strain_yy strain_zz'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = disp_x
boundary = 3
value = 0.0
[../]
[./bottom]
type = DirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[./back]
type = DirichletBC
variable = disp_z
boundary = 1
value = 0.0
[../]
[]
[AuxKernels]
[./temp]
type = FunctionAux
variable = temp
block = '1 2'
function = temp_func
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain1]
type = ComputeMeanThermalExpansionFunctionEigenstrain
block = 1
thermal_expansion_function = cte_func_mean
thermal_expansion_function_reference_temperature = 0.5
stress_free_temperature = 0.0
temperature = temp
eigenstrain_name = eigenstrain
[../]
[./thermal_expansion_strain2]
type = ComputeInstantaneousThermalExpansionFunctionEigenstrain
block = 2
thermal_expansion_function = cte_func_inst
stress_free_temperature = 0.0
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Functions]
[./cte_func_mean]
type = ParsedFunction
symbol_names = 'tsf tref scale' #stress free temp, reference temp, scale factor
symbol_values = '0.0 0.5 1e-4'
expression = 'scale * (t - tsf) / (t - tref)'
[../]
[./cte_func_inst]
type = PiecewiseLinear
xy_data = '0 1.0
2 1.0'
scale_factor = 1e-4
[../]
[./temp_func]
type = PiecewiseLinear
xy_data = '0 1
1 2'
[../]
[]
[Postprocessors]
[./disp_1]
type = NodalExtremeValue
variable = disp_x
boundary = 101
[../]
[./disp_2]
type = NodalExtremeValue
variable = disp_x
boundary = 102
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
l_max_its = 100
l_tol = 1e-4
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
start_time = 0.0
end_time = 1.0
dt = 0.1
[]
[Outputs]
csv = true
[]
(modules/phase_field/test/tests/MultiPhase/asymmetriccrosstermbarrierfunction.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 200
xmin = 0
xmax = 9
[]
[Functions]
[./func1]
type = ParsedFunction
expression = 'il:=x-7; ir:=2-x; if(x<1, 1,
if(x<2, 0.5-0.5*cos(ir*pi),
if(x<7, 0,
if(x<8, 0.5-0.5*cos(il*pi),
1))))'
[../]
[./func2]
type = ParsedFunction
expression = 'il:=x-1; ir:=5-x; if(x<1, 0,
if(x<2, 0.5-0.5*cos(il*pi),
if(x<4, 1,
if(x<5, 0.5-0.5*cos(ir*pi),
0))))'
[../]
[./func3]
type = ParsedFunction
expression = 'il:=x-4; ir:=8-x; if(x<4, 0,
if(x<5, 0.5-0.5*cos(il*pi),
if(x<7, 1,
if(x<8, 0.5-0.5*cos(ir*pi),
0))))'
[../]
[]
[AuxVariables]
[./eta1]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = func1
[../]
[../]
[./eta2]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = func2
[../]
[../]
[./eta3]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = func3
[../]
[../]
[]
[Materials]
[./symmetriccrosstermbarrier_low]
type = AsymmetricCrossTermBarrierFunctionMaterial
etas = 'eta1 eta2 eta3'
hi_names = 'h1 h2 h3'
W_ij = '0 1 2.2
1 0 3.1
2.2 3.1 0'
function_name = gsl
g_order = LOW
outputs = exodus
[../]
[./asymmetriccrosstermbarrier_low]
type = AsymmetricCrossTermBarrierFunctionMaterial
etas = 'eta1 eta2 eta3'
hi_names = 'h1 h2 h3'
W_ij = ' 0 1.2 5.2
0.8 0 2.1
-0.8 4.1 0'
function_name = gal
g_order = LOW
outputs = exodus
[../]
[./asymmetriccrosstermbarrie_simple]
type = AsymmetricCrossTermBarrierFunctionMaterial
etas = 'eta1 eta2 eta3'
hi_names = 'h1 h2 h3'
W_ij = '0 1.2 3.2
0.8 0 2.1
1.2 4.1 0'
function_name = gas
g_order = SIMPLE
outputs = exodus
[../]
[./switch1]
type = SwitchingFunctionMaterial
function_name = h1
eta = eta1
[../]
[./switch2]
type = SwitchingFunctionMaterial
function_name = h2
eta = eta2
[../]
[./switch3]
type = SwitchingFunctionMaterial
function_name = h3
eta = eta3
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
num_steps = 1
[]
[Problem]
solve = false
kernel_coverage_check = false
[]
[Outputs]
exodus = true
execute_on = final
[]
(modules/solid_mechanics/test/tests/lagrangian/materials/correctness/cauchy-elastic.i)
# Simple 3D test
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = false
[]
[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
[]
[]
[Functions]
[strain]
type = ParsedFunction
expression = 't'
[]
[]
[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_x]
type = FunctionDirichletBC
boundary = right
variable = disp_x
function = strain
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[sxx]
type = ElementAverageValue
variable = sxx
execute_on = 'initial timestep_end'
[]
[syy]
type = ElementAverageValue
variable = syy
execute_on = 'initial timestep_end'
[]
[sxy]
type = ElementAverageValue
variable = sxy
execute_on = 'initial timestep_end'
[]
[szz]
type = ElementAverageValue
variable = szz
execute_on = 'initial timestep_end'
[]
[syz]
type = ElementAverageValue
variable = syz
execute_on = 'initial timestep_end'
[]
[sxz]
type = ElementAverageValue
variable = sxz
execute_on = 'initial timestep_end'
[]
[exx]
type = ElementAverageValue
variable = exx
execute_on = 'initial timestep_end'
[]
[eyy]
type = ElementAverageValue
variable = eyy
execute_on = 'initial timestep_end'
[]
[exy]
type = ElementAverageValue
variable = exy
execute_on = 'initial timestep_end'
[]
[ezz]
type = ElementAverageValue
variable = ezz
execute_on = 'initial timestep_end'
[]
[eyz]
type = ElementAverageValue
variable = eyz
execute_on = 'initial timestep_end'
[]
[exz]
type = ElementAverageValue
variable = exz
execute_on = 'initial timestep_end'
[]
[]
[AuxVariables]
[sxx]
family = MONOMIAL
order = CONSTANT
[]
[syy]
family = MONOMIAL
order = CONSTANT
[]
[sxy]
family = MONOMIAL
order = CONSTANT
[]
[szz]
family = MONOMIAL
order = CONSTANT
[]
[syz]
family = MONOMIAL
order = CONSTANT
[]
[sxz]
family = MONOMIAL
order = CONSTANT
[]
[exx]
family = MONOMIAL
order = CONSTANT
[]
[eyy]
family = MONOMIAL
order = CONSTANT
[]
[exy]
family = MONOMIAL
order = CONSTANT
[]
[ezz]
family = MONOMIAL
order = CONSTANT
[]
[eyz]
family = MONOMIAL
order = CONSTANT
[]
[exz]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[sxx]
type = RankTwoAux
variable = sxx
rank_two_tensor = cauchy_stress
index_i = 0
index_j = 0
[]
[syy]
type = RankTwoAux
variable = syy
rank_two_tensor = cauchy_stress
index_i = 1
index_j = 1
[]
[sxy]
type = RankTwoAux
variable = sxy
rank_two_tensor = cauchy_stress
index_i = 0
index_j = 1
[]
[zz]
type = RankTwoAux
variable = szz
rank_two_tensor = cauchy_stress
index_i = 2
index_j = 2
[]
[syz]
type = RankTwoAux
variable = syz
rank_two_tensor = cauchy_stress
index_i = 1
index_j = 2
[]
[sxz]
type = RankTwoAux
variable = sxz
rank_two_tensor = cauchy_stress
index_i = 0
index_j = 2
[]
[exx]
type = RankTwoAux
variable = exx
rank_two_tensor = mechanical_strain
index_i = 0
index_j = 0
[]
[eyy]
type = RankTwoAux
variable = eyy
rank_two_tensor = mechanical_strain
index_i = 1
index_j = 1
[]
[exy]
type = RankTwoAux
variable = exy
rank_two_tensor = mechanical_strain
index_i = 0
index_j = 1
[]
[ezz]
type = RankTwoAux
variable = ezz
rank_two_tensor = mechanical_strain
index_i = 2
index_j = 2
[]
[eyz]
type = RankTwoAux
variable = eyz
rank_two_tensor = mechanical_strain
index_i = 1
index_j = 2
[]
[exz]
type = RankTwoAux
variable = exz
rank_two_tensor = mechanical_strain
index_i = 0
index_j = 2
[]
[]
[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 = 5
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.1
dtmin = 0.1
end_time = 0.1
[]
[Outputs]
exodus = false
csv = 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/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/orthotropic_rotation_Cijkl.i)
# This test is designed to test the correct application of the Euler angle
# rotations to the elasticity tensor. The test uses values for the nine C_ijkl
# entries that correspond to the engineering notation placement:
# e.g. C11 = 11e3, c12 = 12e3, c13 = 13e3, c22 = 22e3 ..... c66 = 66e3
#
# A rotation of (0, 90, 0) is applied to the 1x1x1 cube, such that the values of
# c12 and c13 switch, c22 and c33 switch, and c55 and c66 switch. Postprocessors
# are used to verify this switch (made simple with the value convention above)
# and to verify that the unrotated components along the x-axis remain constant.
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./lage_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./lage_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./pk2_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./lage_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./fp_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./c11]
order = CONSTANT
family = MONOMIAL
[../]
[./c12]
order = CONSTANT
family = MONOMIAL
[../]
[./c13]
order = CONSTANT
family = MONOMIAL
[../]
[./c22]
order = CONSTANT
family = MONOMIAL
[../]
[./c23]
order = CONSTANT
family = MONOMIAL
[../]
[./c33]
order = CONSTANT
family = MONOMIAL
[../]
[./c44]
order = CONSTANT
family = MONOMIAL
[../]
[./c55]
order = CONSTANT
family = MONOMIAL
[../]
[./c66]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./tdisp]
type = ParsedFunction
expression = 0.01*t
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
[../]
[]
[AuxKernels]
[./lage_xx]
type = RankTwoAux
rank_two_tensor = lage
variable = lage_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[../]
[./lage_yy]
type = RankTwoAux
rank_two_tensor = lage
variable = lage_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[../]
[./pk2_yy]
type = RankTwoAux
variable = pk2_yy
rank_two_tensor = pk2
index_j = 1
index_i = 1
execute_on = timestep_end
[../]
[./lage_zz]
type = RankTwoAux
rank_two_tensor = lage
variable = lage_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[../]
[./fp_yy]
type = RankTwoAux
variable = fp_yy
rank_two_tensor = fp
index_i = 1
index_j = 1
execute_on = timestep_end
[../]
[./c11]
type = RankFourAux
variable = c11
rank_four_tensor = elasticity_tensor
index_i = 0
index_j = 0
index_k = 0
index_l = 0
execute_on = timestep_end
[../]
[./c12]
type = RankFourAux
variable = c12
rank_four_tensor = elasticity_tensor
index_i = 0
index_j = 0
index_k = 1
index_l = 1
execute_on = timestep_end
[../]
[./c13]
type = RankFourAux
variable = c13
rank_four_tensor = elasticity_tensor
index_i = 0
index_j = 0
index_k = 2
index_l = 2
execute_on = timestep_end
[../]
[./c22]
type = RankFourAux
variable = c22
rank_four_tensor = elasticity_tensor
index_i = 1
index_j = 1
index_k = 1
index_l = 1
execute_on = timestep_end
[../]
[./c23]
type = RankFourAux
variable = c23
rank_four_tensor = elasticity_tensor
index_i = 1
index_j = 1
index_k = 2
index_l = 2
execute_on = timestep_end
[../]
[./c33]
type = RankFourAux
variable = c33
rank_four_tensor = elasticity_tensor
index_i = 2
index_j = 2
index_k = 2
index_l = 2
execute_on = timestep_end
[../]
[./c44]
type = RankFourAux
variable = c44
rank_four_tensor = elasticity_tensor
index_i = 1
index_j = 2
index_k = 1
index_l = 2
execute_on = timestep_end
[../]
[./c55]
type = RankFourAux
variable = c55
rank_four_tensor = elasticity_tensor
index_i = 2
index_j = 0
index_k = 2
index_l = 0
execute_on = timestep_end
[../]
[./c66]
type = RankFourAux
variable = c66
rank_four_tensor = elasticity_tensor
index_i = 0
index_j = 1
index_k = 0
index_l = 1
execute_on = timestep_end
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[../]
[./left]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./back]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[../]
[./top]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = tdisp
[../]
[]
[Materials]
[./crysp]
type = FiniteStrainCrystalPlasticity
block = 0
gtol = 1e-2
slip_sys_file_name = input_slip_sys.txt
nss = 12
num_slip_sys_flowrate_props = 2 #Number of properties in a slip system
flowprops = '1 4 0.001 0.1 5 8 0.001 0.1 9 12 0.001 0.1'
hprops = '1.0 541.5 60.8 109.8 2.5'
gprops = '1 4 60.8e3 5 8 60.8e3 9 12 60.8e3'
tan_mod_type = exact
[../]
[./elasticity_tensor]
type = ComputeElasticityTensorCP
C_ijkl = '11e3 12e3 13e3 22e3 23e3 33e3 44e3 55e3 66e3'
fill_method = symmetric9
euler_angle_1 = 0.0
euler_angle_2 = 90.0
euler_angle_3 = 0.0
[../]
[]
[Postprocessors]
[./lage_xx]
type = ElementAverageValue
variable = lage_xx
[../]
[./pk2_yy]
type = ElementAverageValue
variable = pk2_yy
[../]
[./lage_yy]
type = ElementAverageValue
variable = lage_yy
[../]
[./lage_zz]
type = ElementAverageValue
variable = lage_zz
[../]
[./fp_yy]
type = ElementAverageValue
variable = fp_yy
[../]
[./c11]
type = ElementAverageValue
variable = c11
[../]
[./c12]
type = ElementAverageValue
variable = c12
[../]
[./c13]
type = ElementAverageValue
variable = c13
[../]
[./c22]
type = ElementAverageValue
variable = c22
[../]
[./c23]
type = ElementAverageValue
variable = c23
[../]
[./c33]
type = ElementAverageValue
variable = c33
[../]
[./c44]
type = ElementAverageValue
variable = c44
[../]
[./c55]
type = ElementAverageValue
variable = c55
[../]
[./c66]
type = ElementAverageValue
variable = c66
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
l_tol = 1e-3
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 1 lu gmres 200'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-10
dtmax = 0.1
dtmin = 1.0e-3
dt = 0.05
end_time = 0.5
[]
[Outputs]
exodus = false
csv = true
[]
(modules/solid_mechanics/test/tests/ad_thermal_expansion_function/finite_const.i)
# This tests the thermal expansion coefficient function using both
# options to specify that function: mean and instantaneous. There
# two blocks, each containing a single element, and these use the
# two variants of the function.
# In this test, the instantaneous CTE function has a constant value,
# while the mean CTE function is an analytic function designed to
# give the same response. If \bar{alpha}(T) is the mean CTE function,
# and \alpha(T) is the instantaneous CTE function,
# \bar{\alpha}(T) = 1/(T-Tref) \intA^{T}_{Tsf} \alpha(T) dT
# where Tref is the reference temperature used to define the mean CTE
# function, and Tsf is the stress-free temperature.
# This version of the test uses finite deformation theory.
# The two models produce very similar results. There are slight
# differences due to the large deformation treatment.
[Mesh]
file = 'blocks.e'
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
eigenstrain_names = eigenstrain
generate_output = 'strain_xx strain_yy strain_zz'
use_automatic_differentiation = true
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = disp_x
boundary = 3
value = 0.0
[../]
[./bottom]
type = DirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[./back]
type = DirichletBC
variable = disp_z
boundary = 1
value = 0.0
[../]
[]
[AuxKernels]
[./temp]
type = FunctionAux
variable = temp
block = '1 2'
function = temp_func
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./small_stress]
type = ADComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain1]
type = ADComputeMeanThermalExpansionFunctionEigenstrain
block = 1
thermal_expansion_function = cte_func_mean
thermal_expansion_function_reference_temperature = 0.5
stress_free_temperature = 0.0
temperature = temp
eigenstrain_name = eigenstrain
[../]
[./thermal_expansion_strain2]
type = ADComputeInstantaneousThermalExpansionFunctionEigenstrain
block = 2
thermal_expansion_function = cte_func_inst
stress_free_temperature = 0.0
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Functions]
[./cte_func_mean]
type = ParsedFunction
symbol_names = 'tsf tref scale' #stress free temp, reference temp, scale factor
symbol_values = '0.0 0.5 1e-4'
expression = 'scale * (t - tsf) / (t - tref)'
[../]
[./cte_func_inst]
type = PiecewiseLinear
xy_data = '0 1.0
2 1.0'
scale_factor = 1e-4
[../]
[./temp_func]
type = PiecewiseLinear
xy_data = '0 1
1 2'
[../]
[]
[Postprocessors]
[./disp_1]
type = NodalExtremeValue
variable = disp_x
boundary = 101
[../]
[./disp_2]
type = NodalExtremeValue
variable = disp_x
boundary = 102
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
l_max_its = 100
l_tol = 1e-4
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
start_time = 0.0
end_time = 1.0
dt = 0.1
[]
[Outputs]
csv = true
[]
(test/tests/executioners/executioner/transient.i)
###########################################################
# This is a simple test with a time-dependent problem
# demonstrating the use of a "Transient" Executioner.
#
# @Requirement F1.10
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./dt]
type = TimestepSize
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_transient
exodus = true
[]
(test/tests/markers/error_fraction_marker/error_fraction_marker_no_clear_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 10
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./solution]
type = ParsedFunction
expression = (exp(x)-1)/(exp(1)-1)
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./conv]
type = Convection
variable = u
velocity = '1 0 0'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Adaptivity]
steps = 2
marker = marker
[./Indicators]
[./error]
type = AnalyticalIndicator
variable = u
function = solution
[../]
[../]
[./Markers]
[./marker]
type = ErrorFractionMarker
indicator = error
refine = 0.3
clear_extremes = false
[../]
[../]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_no_parts_steady_nobcbc.i)
# This input file tests several different things:
# .) The axisymmetric (RZ) form of the governing equations.
# .) An open boundary.
# .) Not integrating the pressure by parts, thereby requiring a pressure pin.
# .) Natural boundary condition at the outlet.
[GlobalParams]
integrate_p_by_parts = false
laplace = true
gravity = '0 0 0'
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = Newton
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Variables]
[./vel_x]
# Velocity in radial (r) direction
family = LAGRANGE
order = SECOND
[../]
[./vel_y]
# Velocity in axial (z) direction
family = LAGRANGE
order = SECOND
[../]
[./p]
family = LAGRANGE
order = FIRST
[../]
[]
[BCs]
[./p_corner]
# This is required, because pressure term is *not* integrated by parts.
type = DirichletBC
boundary = top_right
value = 0
variable = p
[../]
[./u_in]
type = DirichletBC
boundary = bottom
variable = vel_x
value = 0
[../]
[./v_in]
type = FunctionDirichletBC
boundary = bottom
variable = vel_y
function = 'inlet_func'
[../]
[./u_axis_and_walls]
type = DirichletBC
boundary = 'left right'
variable = vel_x
value = 0
[../]
[./v_no_slip]
type = DirichletBC
boundary = 'right'
variable = vel_y
value = 0
[../]
[./u_out]
type = INSMomentumNoBCBCLaplaceForm
boundary = top
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./v_out]
type = INSMomentumNoBCBCLaplaceForm
boundary = top
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Kernels]
[./mass]
type = INSMassRZ
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 'volume'
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(modules/solid_mechanics/test/tests/lagrangian/materials/correctness/neohookean.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
[]
[]
[Functions]
[strain]
type = ParsedFunction
expression = 't'
[]
[]
[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_x]
type = FunctionDirichletBC
boundary = right
variable = disp_x
function = strain
[]
[]
[Materials]
[compute_stress]
type = ComputeNeoHookeanStress
lambda = 4000.0
mu = 6700.0
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[AuxVariables]
[s11]
family = MONOMIAL
order = CONSTANT
[]
[s21]
family = MONOMIAL
order = CONSTANT
[]
[s31]
family = MONOMIAL
order = CONSTANT
[]
[s12]
family = MONOMIAL
order = CONSTANT
[]
[s22]
family = MONOMIAL
order = CONSTANT
[]
[s32]
family = MONOMIAL
order = CONSTANT
[]
[s13]
family = MONOMIAL
order = CONSTANT
[]
[s23]
family = MONOMIAL
order = CONSTANT
[]
[s33]
family = MONOMIAL
order = CONSTANT
[]
[F11]
family = MONOMIAL
order = CONSTANT
[]
[F21]
family = MONOMIAL
order = CONSTANT
[]
[F31]
family = MONOMIAL
order = CONSTANT
[]
[F12]
family = MONOMIAL
order = CONSTANT
[]
[F22]
family = MONOMIAL
order = CONSTANT
[]
[F32]
family = MONOMIAL
order = CONSTANT
[]
[F13]
family = MONOMIAL
order = CONSTANT
[]
[F23]
family = MONOMIAL
order = CONSTANT
[]
[F33]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[s11]
type = RankTwoAux
variable = s11
rank_two_tensor = pk1_stress
index_i = 0
index_j = 0
[]
[s21]
type = RankTwoAux
variable = s21
rank_two_tensor = pk1_stress
index_i = 1
index_j = 0
[]
[s31]
type = RankTwoAux
variable = s31
rank_two_tensor = pk1_stress
index_i = 2
index_j = 0
[]
[s12]
type = RankTwoAux
variable = s12
rank_two_tensor = pk1_stress
index_i = 0
index_j = 1
[]
[s22]
type = RankTwoAux
variable = s22
rank_two_tensor = pk1_stress
index_i = 1
index_j = 1
[]
[s32]
type = RankTwoAux
variable = s32
rank_two_tensor = pk1_stress
index_i = 2
index_j = 1
[]
[s13]
type = RankTwoAux
variable = s13
rank_two_tensor = pk1_stress
index_i = 0
index_j = 2
[]
[s23]
type = RankTwoAux
variable = s23
rank_two_tensor = pk1_stress
index_i = 1
index_j = 2
[]
[s33]
type = RankTwoAux
variable = s33
rank_two_tensor = pk1_stress
index_i = 2
index_j = 2
[]
[F11]
type = RankTwoAux
variable = F11
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 0
[]
[F21]
type = RankTwoAux
variable = F21
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 0
[]
[F31]
type = RankTwoAux
variable = F31
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 0
[]
[F12]
type = RankTwoAux
variable = F12
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 1
[]
[F22]
type = RankTwoAux
variable = F22
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 1
[]
[F32]
type = RankTwoAux
variable = F32
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 1
[]
[F13]
type = RankTwoAux
variable = F13
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 2
[]
[F23]
type = RankTwoAux
variable = F23
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 2
[]
[F33]
type = RankTwoAux
variable = F33
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 2
[]
[]
[Postprocessors]
[s11]
type = ElementAverageValue
variable = s11
execute_on = 'initial timestep_end'
[]
[s21]
type = ElementAverageValue
variable = s21
execute_on = 'initial timestep_end'
[]
[s31]
type = ElementAverageValue
variable = s31
execute_on = 'initial timestep_end'
[]
[s12]
type = ElementAverageValue
variable = s12
execute_on = 'initial timestep_end'
[]
[s22]
type = ElementAverageValue
variable = s22
execute_on = 'initial timestep_end'
[]
[s32]
type = ElementAverageValue
variable = s32
execute_on = 'initial timestep_end'
[]
[s13]
type = ElementAverageValue
variable = s13
execute_on = 'initial timestep_end'
[]
[s23]
type = ElementAverageValue
variable = s23
execute_on = 'initial timestep_end'
[]
[s33]
type = ElementAverageValue
variable = s33
execute_on = 'initial timestep_end'
[]
[F11]
type = ElementAverageValue
variable = F11
execute_on = 'initial timestep_end'
[]
[F21]
type = ElementAverageValue
variable = F21
execute_on = 'initial timestep_end'
[]
[F31]
type = ElementAverageValue
variable = F31
execute_on = 'initial timestep_end'
[]
[F12]
type = ElementAverageValue
variable = F12
execute_on = 'initial timestep_end'
[]
[F22]
type = ElementAverageValue
variable = F22
execute_on = 'initial timestep_end'
[]
[F32]
type = ElementAverageValue
variable = F32
execute_on = 'initial timestep_end'
[]
[F13]
type = ElementAverageValue
variable = F13
execute_on = 'initial timestep_end'
[]
[F23]
type = ElementAverageValue
variable = F23
execute_on = 'initial timestep_end'
[]
[F33]
type = ElementAverageValue
variable = F33
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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 = 10
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/domain_integral_thermal/interaction_integral_2d_thermal_generic.i)
#This problem from [Wilson 1979] tests the thermal strain term in the
#interaction integral
#
#theta_e = 10 degrees C; a = 252; E = 207000; nu = 0.3; alpha = 1.35e-5
#
#With uniform_refine = 3, KI converges to
#KI = 5.602461e+02 (interaction integral)
#KI = 5.655005e+02 (J-integral)
#
#Both are in good agreement with [Shih 1986]:
#average_value = 0.4857 = KI / (sigma_theta * sqrt(pi * a))
#sigma_theta = E * alpha * theta_e / (1 - nu)
# = 207000 * 1.35e-5 * 10 / (1 - 0.3) = 39.9214
#KI = average_value * sigma_theta * sqrt(pi * a) = 5.656e+02
#
#References:
#W.K. Wilson, I.-W. Yu, Int J Fract 15 (1979) 377-387
#C.F. Shih, B. Moran, T. Nakamura, Int J Fract 30 (1986) 79-102
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = False
[]
[Mesh]
file = crack2d.e
displacements = 'disp_x disp_y'
# uniform_refine = 3
[]
[AuxVariables]
[SED]
order = CONSTANT
family = MONOMIAL
[]
[temp]
order = FIRST
family = LAGRANGE
[]
[irradiation_eigenstrain_00]
[]
[irradiation_eigenstrain_01]
[]
[irradiation_eigenstrain_11]
[]
[irradiation_eigenstrain_22]
[]
[]
[UserObjects]
[irradiation_eigenstrain_00_uo]
type = NodalPatchRecoveryMaterialProperty
property = thermal_expansion
patch_polynomial_order = first
component = '0 0'
block = 1
execute_on = 'TIMESTEP_END'
[]
[irradiation_eigenstrain_11_uo]
type = NodalPatchRecoveryMaterialProperty
property = thermal_expansion
patch_polynomial_order = first
component = '1 1'
block = 1
execute_on = 'TIMESTEP_END'
[]
[irradiation_eigenstrain_22_uo]
type = NodalPatchRecoveryMaterialProperty
property = thermal_expansion
patch_polynomial_order = first
component = '2 2'
block = 1
execute_on = 'TIMESTEP_END'
[]
[irradiation_eigenstrain_01_uo]
type = NodalPatchRecoveryMaterialProperty
property = thermal_expansion
component = '0 1'
patch_polynomial_order = first
block = 1
execute_on = 'TIMESTEP_END'
[]
[]
[AuxKernels]
[irradiation_eigenstrain_00]
type = NodalPatchRecoveryAux
nodal_patch_recovery_uo = irradiation_eigenstrain_00_uo
variable = irradiation_eigenstrain_00
execute_on = 'TIMESTEP_END'
block = 1
[]
[irradiation_eigenstrain_11]
type = NodalPatchRecoveryAux
nodal_patch_recovery_uo = irradiation_eigenstrain_11_uo
variable = irradiation_eigenstrain_11
execute_on = 'TIMESTEP_END'
block = 1
[]
[irradiation_eigenstrain_22]
type = NodalPatchRecoveryAux
nodal_patch_recovery_uo = irradiation_eigenstrain_22_uo
variable = irradiation_eigenstrain_22
execute_on = 'TIMESTEP_END'
block = 1
[]
[irradiation_eigenstrain_01]
type = NodalPatchRecoveryAux
nodal_patch_recovery_uo = irradiation_eigenstrain_01_uo
variable = irradiation_eigenstrain_01
execute_on = 'TIMESTEP_END'
block = 1
[]
[]
[Functions]
[tempfunc]
type = ParsedFunction
expression = 10.0*(2*x/504)
[]
[]
[DomainIntegral]
integrals = 'InteractionIntegralKI'
boundary = 800
crack_direction_method = CrackDirectionVector
crack_direction_vector = '1 0 0'
2d = true
axis_2d = 2
radius_inner = '60.0 80.0 100.0 120.0'
radius_outer = '80.0 100.0 120.0 140.0'
symmetry_plane = 1
incremental = true
# interaction integral parameters
block = 1
youngs_modulus = 207000
poissons_ratio = 0.3
additional_eigenstrain_00 = irradiation_eigenstrain_00
additional_eigenstrain_01 = irradiation_eigenstrain_01
additional_eigenstrain_11 = irradiation_eigenstrain_11
additional_eigenstrain_22 = irradiation_eigenstrain_22
# temperature = temp
# eigenstrain_names = thermal_expansion
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress'
planar_formulation = PLANE_STRAIN
eigenstrain_names = thermal_expansion
[]
[]
[AuxKernels]
[SED]
type = MaterialRealAux
variable = SED
property = strain_energy_density
execute_on = timestep_end
[]
[tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
block = 1
[]
[]
[BCs]
[crack_y]
type = DirichletBC
variable = disp_y
boundary = 100
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_y
boundary = 400
value = 0.0
[]
[no_x1]
type = DirichletBC
variable = disp_x
boundary = 900
value = 0.0
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
[]
[elastic_stress]
type = ComputeFiniteStrainElasticStress
[]
[thermal_expansion_strain]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 0.0
thermal_expansion_coeff = 1.35e-5
temperature = temp
eigenstrain_name = thermal_expansion
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
line_search = 'none'
l_max_its = 50
nl_max_its = 40
nl_rel_step_tol= 1e-10
nl_rel_tol = 1e-10
start_time = 0.0
dt = 1
end_time = 1
num_steps = 1
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
pc_side = left
ksp_norm = preconditioned
full = true
[]
[]
(test/tests/multiapps/restart_multilevel/subsub.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 1
nx = 10
[]
[Functions]
[./u_fn]
type = ParsedFunction
expression = t*x
[../]
[./ffn]
type = ParsedFunction
expression = x
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[./fn]
type = BodyForce
variable = u
function = ffn
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = FunctionDirichletBC
variable = u
boundary = right
function = u_fn
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/element_subdomain_modifier/adaptivity_moving_boundary.i)
[Problem]
solve = false
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 16
ny = 16
[]
[left]
type = SubdomainBoundingBoxGenerator
input = 'gen'
block_id = 1
bottom_left = '-1 -1 0'
top_right = '0 1 1'
[]
[right]
type = SubdomainBoundingBoxGenerator
input = 'left'
block_id = 2
bottom_left = '0 -1 0'
top_right = '1 1 1'
[]
[moving_boundary]
type = SideSetsAroundSubdomainGenerator
input = 'right'
block = 1
new_boundary = 'moving_boundary'
normal = '1 0 0'
[]
[]
[UserObjects]
[moving_circle]
type = CoupledVarThresholdElementSubdomainModifier
coupled_var = 'phi'
block = 2
criterion_type = ABOVE
threshold = 0.5
subdomain_id = 1
moving_boundary_name = moving_boundary
execute_on = 'TIMESTEP_BEGIN'
[]
[]
[Functions]
[moving_gauss]
type = ParsedFunction
value = 'exp(-((x+0.5-t)^2+(y)^2)/0.25)'
[]
[]
[AuxVariables]
[phi]
[]
[]
[AuxKernels]
[phi]
type = FunctionAux
variable = phi
function = moving_gauss
execute_on = 'INITIAL TIMESTEP_BEGIN TIMESTEP_END'
[]
[]
[Adaptivity]
steps = 1
marker = marker
initial_marker = marker
max_h_level = 1
[Indicators/indicator]
type = GradientJumpIndicator
variable = phi
[]
[Markers]
[efm]
type = ErrorFractionMarker
indicator = indicator
coarsen = 0.2
refine = 0.5
[]
[marker]
type = BoundaryPreservedMarker
preserved_boundary = moving_boundary
marker = 'efm'
[]
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 10
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/gate_valve_1phase/gate_valve_1phase.i)
# This input file is used to test the gate valve component.
# This problem consists of a T junction of 3 pipes. The inlet pipe is one of the
# 2 pipes of the "top" of the T. The other 2 pipes each have a gate valve.
# Initially, one of the 2 outlet pipes has an open valve and the other has a
# closed valve. Later in the transient, the valves gradually open/close to switch
# the outlet flow direction.
p = 1.0e5
T = 300.0
rho = 1.161430436 # @ 1e5 Pa, 300 K
D = 0.1
A = ${fparse pi * D^2 / 4.0}
V_junction = ${fparse pi * D^3 / 4.0}
vel_in = 2.0
m_dot = ${fparse rho * vel_in * A}
t_begin = 0.3
delta_t_open = 0.1
[GlobalParams]
gravity_vector = '0 0 0'
closures = simple_closures
fp = fp
f = 0.0
initial_T = ${T}
initial_p = ${p}
initial_vel = 0
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
gamma = 1.4
molar_mass = 0.02897
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[pipe3_open_fn]
type = TimeRampFunction
initial_value = 1
final_value = 0
initial_time = ${t_begin}
ramp_duration = ${delta_t_open}
[]
[pipe2_open_fn]
type = ParsedFunction
expression = '1 - pipe3_phi'
symbol_names = 'pipe3_phi'
symbol_values = 'pipe3_open_fn'
[]
[]
[Components]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe1:in'
m_dot = ${m_dot}
T = ${T}
[]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1.0
n_elems = 50
A = ${A}
[]
[volume_junction]
type = VolumeJunction1Phase
position = '1 0 0'
connections = 'pipe1:out pipe2A:in pipe3A:in'
volume = ${V_junction}
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
[]
[pipe2A]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '0 1 0'
length = 0.5
n_elems = 25
A = ${A}
[]
[pipe2_valve]
type = GateValve1Phase
connections = 'pipe2A:out pipe2B:in'
open_area_fraction = 0 # (controlled via 'pipe2_valve_control')
[]
[pipe2B]
type = FlowChannel1Phase
position = '1 0.5 0'
orientation = '0 1 0'
length = 0.5
n_elems = 25
A = ${A}
[]
[pipe2_outlet]
type = Outlet1Phase
input = 'pipe2B:out'
p = ${p}
[]
[pipe3A]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '1 0 0'
length = 0.5
n_elems = 25
A = ${A}
[]
[pipe3_valve]
type = GateValve1Phase
connections = 'pipe3A:out pipe3B:in'
open_area_fraction = 0 # (controlled via 'pipe3_valve_control')
[]
[pipe3B]
type = FlowChannel1Phase
position = '1.5 0 0'
orientation = '1 0 0'
length = 0.5
n_elems = 25
A = ${A}
[]
[pipe3_outlet]
type = Outlet1Phase
input = 'pipe3B:out'
p = ${p}
[]
[]
[ControlLogic]
[pipe2_valve_control]
type = TimeFunctionComponentControl
component = pipe2_valve
parameter = open_area_fraction
function = pipe2_open_fn
[]
[pipe3_valve_control]
type = TimeFunctionComponentControl
component = pipe3_valve
parameter = open_area_fraction
function = pipe3_open_fn
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 20
l_tol = 1e-4
start_time = 0.0
end_time = 1.0
dt = 0.01
abort_on_solve_fail = true
[]
[Outputs]
exodus = true
show = 'p T vel'
velocity_as_vector = false
print_linear_residuals = false
[console]
type = Console
max_rows = 1
[]
[]
(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
[../]
[]
(test/tests/functions/piecewise_multilinear/oneDb.i)
# PiecewiseMultilinear function tests in 1D
# See [Functions] block for a description of the tests
# The functions are compared with ParsedFunctions using postprocessors
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 2
nx = 10
[]
[Variables]
[./dummy]
[../]
[]
[Kernels]
[./dummy_u]
type = TimeDerivative
variable = dummy
[../]
[]
[AuxVariables]
[./linear1_var]
[../]
[./linear2_var]
[../]
[]
[AuxKernels]
[./linear1_AuxK]
type = FunctionAux
variable = linear1_var
function = linear1_fcn
[../]
[./linear2_AuxK]
type = FunctionAux
variable = linear2_var
function = linear2_fcn
[../]
[]
[Functions]
# This is just f = x
[./linear1_fcn]
type = PiecewiseMultilinear
data_file = linear1.txt
[../]
[./linear1_answer]
type = ParsedFunction
expression = x
[../]
# This is a hat function
[./linear2_fcn]
type = PiecewiseMultilinear
data_file = linear2.txt
[../]
[./linear2_answer]
type = ParsedFunction
expression = min(x,1)+min(2-x,1)-1
[../]
[]
[Postprocessors]
[./linear1_pp]
type = NodalL2Error
function = linear1_answer
variable = linear1_var
[../]
[./linear2_pp]
type = NodalL2Error
function = linear2_answer
variable = linear2_var
[../]
[]
[Executioner]
type = Transient
dt = 1
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = oneDb
hide = dummy
csv = true
[]
(modules/peridynamics/test/tests/generalized_plane_strain/planestrain_prescribed_OSPD.i)
[GlobalParams]
displacements = 'disp_x disp_y'
scalar_out_of_plane_strain = scalar_strain_zz
[]
[Mesh]
type = PeridynamicsMesh
horizon_number = 3
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
[]
[gpd]
type = MeshGeneratorPD
input = gmg
retain_fe_mesh = false
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[temp]
[]
[scalar_strain_zz]
order = FIRST
family = SCALAR
[]
[strain_zz]
[]
[]
[Modules/Peridynamics/Mechanics/Master]
[all]
formulation = ORDINARY_STATE
[]
[]
[AuxKernels]
[tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
use_displaced_mesh = false
[]
[strain_zz]
type = NodalRankTwoPD
variable = strain_zz
rank_two_tensor = total_strain
output_type = component
index_i = 2
index_j = 2
[]
[]
[AuxScalarKernels]
[scalar_strain_zz]
type = FunctionScalarAux
variable = scalar_strain_zz
function = scalar_strain_zz_func
[]
[]
[Functions]
[tempfunc]
type = ParsedFunction
expression = '(1 - x) * t'
[]
[scalar_strain_zz_func]
type = PiecewiseLinear
xy_data = '0 0
1 7.901e-5
2 1.103021e-2'
[]
[]
[BCs]
[bottom_x]
type = DirichletBC
boundary = 1000
variable = disp_x
value = 0.0
[]
[bottom_y]
type = DirichletBC
boundary = 1000
variable = disp_y
value = 0.0
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
poissons_ratio = 0.3
youngs_modulus = 1e6
[]
[force_density]
type = ComputeSmallStrainConstantHorizonMaterialOSPD
temperature = temp
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
start_time = 0.0
end_time = 2.0
use_pre_SMO_residual = true
[]
[Outputs]
exodus = true
file_base = planestrain_prescribed_OSPD
[]
(modules/solid_mechanics/test/tests/central_difference/consistent/3D/3d_consistent_explicit_mass_scaling.i)
# One element test to test the central difference time integrator in 3D.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 2
xmin = 0.0
xmax = 1
ymin = 0.0
ymax = 1
zmin = 0.0
zmax = 2
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[AuxVariables]
[vel_x]
[]
[accel_x]
[]
[vel_y]
[]
[accel_y]
[]
[vel_z]
[]
[accel_z]
[]
[]
[AuxKernels]
[accel_x]
type = TestNewmarkTI
variable = accel_x
displacement = disp_x
first = false
[]
[vel_x]
type = TestNewmarkTI
variable = vel_x
displacement = disp_x
[]
[accel_y]
type = TestNewmarkTI
variable = accel_y
displacement = disp_y
first = false
[]
[vel_y]
type = TestNewmarkTI
variable = vel_y
displacement = disp_x
[]
[accel_z]
type = TestNewmarkTI
variable = accel_z
displacement = disp_z
first = false
[]
[vel_z]
type = TestNewmarkTI
variable = vel_z
displacement = disp_z
[]
[]
[Kernels]
[DynamicSolidMechanics]
displacements = 'disp_x disp_y disp_z'
[]
[inertia_x]
type = InertialForce
variable = disp_x
[]
[inertia_y]
type = InertialForce
variable = disp_y
[]
[inertia_z]
type = InertialForce
variable = disp_z
[]
[]
[BCs]
[x_bot]
type = FunctionDirichletBC
variable = disp_x
boundary = 'back'
function = dispx
preset = false
[]
[y_bot]
type = FunctionDirichletBC
variable = disp_y
boundary = 'back'
function = dispy
preset = false
[]
[z_bot]
type = FunctionDirichletBC
variable = disp_z
boundary = 'back'
function = dispz
preset = false
[]
[Periodic]
[x_dir]
variable = 'disp_x disp_y disp_z'
primary = 'left'
secondary = 'right'
translation = '1.0 0.0 0.0'
[]
[y_dir]
variable = 'disp_x disp_y disp_z'
primary = 'bottom'
secondary = 'top'
translation = '0.0 1.0 0.0'
[]
[]
[]
[Functions]
[dispx]
type = PiecewiseLinear
x = '0.0 1.0 2.0 3.0 4.0' # time
y = '0.0 1.0 0.0 -1.0 0.0' # displacement
[]
[dispy]
type = ParsedFunction
value = 0.1*t*t*sin(10*t)
[]
[dispz]
type = ParsedFunction
value = 0.1*t*t*sin(20*t)
[]
[]
[Materials]
[elasticity_tensor_block]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.25
block = 0
[]
[strain_block]
type = ComputeIncrementalSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
implicit = false
[]
[stress_block]
type = ComputeFiniteStrainElasticStress
block = 0
[]
[density]
type = GenericConstantMaterial
block = 0
prop_names = density
prop_values = 1e4
[]
[density_scaling]
type = DensityScaling
block = 0
density = density
desired_time_step = 0.06
output_properties = density_scaling
outputs = 'exodus'
factor = 0.5
[]
[]
[Executioner]
type = Transient
start_time = -0.01
end_time = 0.1
dt = 0.005
timestep_tolerance = 1e-6
[TimeIntegrator]
type = CentralDifference
use_constant_mass = false
solve_type = lumped
[]
[TimeStepper]
type = PostprocessorDT
postprocessor = time_step
[]
[]
[Postprocessors]
[accel_6x]
type = NodalVariableValue
nodeid = 6
variable = accel_x
[]
[time_step]
type = CriticalTimeStep
factor = 0.5
density = density
density_scaling = density_scaling
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/postprocessors/vector_postprocessor_comparison/vector_postprocessor_comparison.i)
# This tests the VectorPostprocessorComparison post-processor, which takes two
# vector post-processors and compares them.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 2
[]
[Functions]
# Sampled values will be [2, 2, 2]
[./a_fn]
type = ConstantFunction
value = 2
[../]
# Sampled values will be [0, 1, 2]
[./b_fn]
type = ParsedFunction
expression = 'x'
[../]
[]
[VectorPostprocessors]
[./a_vpp]
type = LineFunctionSampler
functions = 'a_fn'
num_points = 3
start_point = '0 0 0'
end_point = '2 0 0'
sort_by = x
execute_on = 'initial'
[../]
[./b_vpp]
type = LineFunctionSampler
functions = 'b_fn'
num_points = 3
start_point = '0 0 0'
end_point = '2 0 0'
sort_by = x
execute_on = 'initial'
[../]
[]
[Postprocessors]
[./vpp_comparison]
type = VectorPostprocessorComparison
vectorpostprocessor_a = a_vpp
vectorpostprocessor_b = b_vpp
vector_name_a = a_fn
vector_name_b = b_fn
comparison_type = greater_than_equals
execute_on = 'initial'
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
file_base = greater_than_equals
csv = true
show = 'vpp_comparison'
execute_on = 'initial'
[]
(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
[]
(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/richards/test/tests/dirac/bh_lumped_07.i)
[Mesh]
type = FileMesh
file = bh07_input.e
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = DensityConstBulk
relperm_UO = RelPermPower
sat_UO = Saturation
seff_UO = Seff1VG
SUPG_UO = SUPGstandard
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1000 10000'
x = '100 1000'
[../]
[]
[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
[../]
[]
[BCs]
[./fix_outer]
type = DirichletBC
boundary = perimeter
variable = pressure
value = 1E7
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsLumpedMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
variable = pressure
[../]
[]
[DiracKernels]
[./bh]
type = RichardsBorehole
bottom_pressure = 0
point_file = bh07.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pressure
unit_weight = '0 0 0'
re_constant = 0.1594
character = 2
[../]
[]
[Postprocessors]
[./bh_report]
type = RichardsPlotQuantity
uo = borehole_total_outflow_mass
execute_on = 'initial timestep_end'
[../]
[./fluid_mass]
type = RichardsMass
variable = pressure
execute_on = 'initial timestep_end'
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 1E7
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = 1
viscosity = 1E-3
mat_porosity = 0.1
mat_permeability = '1E-11 0 0 0 1E-11 0 0 0 1E-11'
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 = 1000
solve_type = NEWTON
[./TimeStepper]
# get only marginally better results for smaller time steps
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = bh_lumped_07
execute_on = 'initial timestep_end final'
time_step_interval = 10000
exodus = 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
[]
[]
(modules/porous_flow/examples/co2_intercomparison/1Dradial/properties.i)
# Liquid and gas properties for code intercomparison problem 3
#
# From Pruess et al, Code intercomparison builds confidence in
# numerical simulation models for geologic disposal of CO2, Energy 29 (2004)
#
# This test simply calculates density and viscosity of each phase for
# various pressures and salinities, as well as mass fractions of CO2 in the
# liquid phase and H2O in the gas phase.
#
# Four versions of this are run:
# 1) No CO2, 0 salt mass fraction (pure water)
# 2) Enough CO2 to form gas phase, 0 salt mass fraction (pure water)
# 3) No CO2, 0.15 salt mass fraction
# 4) Enough CO2 to form gas phase, 0.15 salt mass fraction
#
# These results compare well with detailed results presented in Pruess et al,
# Intercomparison of numerical simulation codes for geologic disposal of CO2,
# LBNL-51813 (2002)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
xmax = 4
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[AuxVariables]
[density_liquid]
order = CONSTANT
family = MONOMIAL
[]
[density_gas]
order = CONSTANT
family = MONOMIAL
[]
[viscosity_liquid]
order = CONSTANT
family = MONOMIAL
[]
[viscosity_gas]
order = CONSTANT
family = MONOMIAL
[]
[x1]
order = CONSTANT
family = MONOMIAL
[]
[y0]
order = CONSTANT
family = MONOMIAL
[]
[xnacl]
initial_condition = 0.0
[]
[]
[AuxKernels]
[density_liquid]
type = PorousFlowPropertyAux
variable = density_liquid
property = density
phase = 0
execute_on = timestep_end
[]
[density_gas]
type = PorousFlowPropertyAux
variable = density_gas
property = density
phase = 1
execute_on = timestep_end
[]
[viscosity_liquid]
type = PorousFlowPropertyAux
variable = viscosity_liquid
property = viscosity
phase = 0
execute_on = timestep_end
[]
[viscosity_gas]
type = PorousFlowPropertyAux
variable = viscosity_gas
property = viscosity
phase = 1
execute_on = timestep_end
[]
[x1]
type = PorousFlowPropertyAux
variable = x1
property = mass_fraction
phase = 0
fluid_component = 1
execute_on = timestep_end
[]
[y0]
type = PorousFlowPropertyAux
variable = y0
property = mass_fraction
phase = 1
fluid_component = 0
execute_on = timestep_end
[]
[]
[Variables]
[pgas]
order = CONSTANT
family = MONOMIAL
[]
[zi]
initial_condition = 0.0
[]
[]
[Functions]
[pic]
type = ParsedFunction
expression = 'if(x<1,12e6,if(x<2,16e6,if(x<3,20e6,24e6)))'
[]
[]
[ICs]
[pic]
type = FunctionIC
function = pic
variable = pgas
[]
[]
[Kernels]
[diffusionp]
type = NullKernel
variable = pgas
[]
[diffusionz]
type = NullKernel
variable = zi
[]
[]
[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]
[co2]
type = CO2FluidProperties
[]
[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
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu NONZERO 2 '
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
perf_graph = true
csv = true
execute_on = timestep_end
file_base = properties_water
[]
[VectorPostprocessors]
[vpp]
type = ElementValueSampler
variable = 'pgas density_liquid density_gas viscosity_liquid viscosity_gas x1 y0'
sort_by = x
[]
[]
(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/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/solid_mechanics/test/tests/domain_integral_thermal/interaction_integral_2d.i)
#This problem from [Wilson 1979] tests the thermal strain term in the
#interaction integral
#
#theta_e = 10 degrees C; a = 252; E = 207000; nu = 0.3; alpha = 1.35e-5
#
#With uniform_refine = 3, KI converges to
#KI = 5.602461e+02 (interaction integral)
#KI = 5.655005e+02 (J-integral)
#
#Both are in good agreement with [Shih 1986]:
#average_value = 0.4857 = KI / (sigma_theta * sqrt(pi * a))
#sigma_theta = E * alpha * theta_e / (1 - nu)
# = 207000 * 1.35e-5 * 10 / (1 - 0.3) = 39.9214
#KI = average_value * sigma_theta * sqrt(pi * a) = 5.656e+02
#
#References:
#W.K. Wilson, I.-W. Yu, Int J Fract 15 (1979) 377-387
#C.F. Shih, B. Moran, T. Nakamura, Int J Fract 30 (1986) 79-102
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = False
[]
[Mesh]
file = crack2d.e
displacements = 'disp_x disp_y'
# uniform_refine = 3
[]
[AuxVariables]
[SED]
order = CONSTANT
family = MONOMIAL
[]
[temp]
order = FIRST
family = LAGRANGE
[]
[]
[Functions]
[tempfunc]
type = ParsedFunction
expression = 10.0*(2*x/504)
[]
[]
[DomainIntegral]
integrals = 'InteractionIntegralKI'
boundary = 800
crack_direction_method = CrackDirectionVector
crack_direction_vector = '1 0 0'
2d = true
axis_2d = 2
radius_inner = '60.0 80.0 100.0 120.0'
radius_outer = '80.0 100.0 120.0 140.0'
symmetry_plane = 1
incremental = true
# interaction integral parameters
block = 1
youngs_modulus = 207000
poissons_ratio = 0.3
temperature = temp
eigenstrain_names = thermal_expansion
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress'
planar_formulation = PLANE_STRAIN
eigenstrain_names = thermal_expansion
[]
[]
[AuxKernels]
[SED]
type = MaterialRealAux
variable = SED
property = strain_energy_density
execute_on = timestep_end
[]
[tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
block = 1
[]
[]
[BCs]
[crack_y]
type = DirichletBC
variable = disp_y
boundary = 100
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_y
boundary = 400
value = 0.0
[]
[no_x1]
type = DirichletBC
variable = disp_x
boundary = 900
value = 0.0
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
[]
[elastic_stress]
type = ComputeFiniteStrainElasticStress
[]
[thermal_expansion_strain]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 0.0
thermal_expansion_coeff = 1.35e-5
temperature = temp
eigenstrain_name = thermal_expansion
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
line_search = 'none'
l_max_its = 50
nl_max_its = 40
nl_rel_step_tol= 1e-10
nl_rel_tol = 1e-10
start_time = 0.0
dt = 1
end_time = 1
num_steps = 1
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
pc_side = left
ksp_norm = preconditioned
full = true
[]
[]
(test/tests/kernels/mass_lumping/mass_lumping.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -1
xmax = 1
nx = 2
[]
[Variables]
[./u]
[../]
[]
[ICs]
[./u_init]
type = FunctionIC
variable = u
function = init_f
[../]
[]
[Kernels]
[./time_deriv]
type = MassLumpedTimeDerivative
variable = u
[../]
[./diff]
type = FuncCoefDiffusion
variable = u
coef = diff_f
[../]
[]
[Functions]
[./init_f]
type = ParsedFunction
expression = max(x,0) #(x>0)
[../]
[./diff_f]
type = ParsedFunction
expression = max(x,0)
[../]
[]
[Executioner]
type = Transient
end_time = 1
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
[]
(modules/xfem/test/tests/moving_interface/verification/1D_rz_homog1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: quasi-1D
# Coordinate System: rz
# Material Numbers/Types: homogeneous 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# A simple transient heat transfer problem in cylindrical coordinates designed
# with the Method of Manufactured Solutions. This problem was developed to
# verify XFEM performance in the presence of a moving interface for linear
# element models that can be exactly evaluated by FEM/Moose. Both the
# temperature solution and level set function are designed to be linear to
# attempt to minimize error between the Moose/exact solution and XFEM results.
# Thermal conductivity is a single, constant value at all points in the system.
# Results:
# The temperature at the left boundary (x=1) exhibits the largest difference
# between the FEM/Moose solution and XFEM results. We present the XFEM results
# at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 480.0008118
# 0.6 520 520.0038529
# 0.8 560 560.0089177
# 1.0 600 600.0133344
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 1
xmin = 1.0
xmax = 2.0
ymin = 0.0
ymax = 0.5
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-200*x+400) + 200*1.5*t/x'
[../]
[./neumann_func]
type = ParsedFunction
expression = '1.5*200*t'
[../]
[./ls_func]
type = ParsedFunction
expression = '2.04 - x - 0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericConstantMaterial
prop_names = 'diffusion_coefficient'
prop_values = 1.5
[../]
[]
[BCs]
[./left_u]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 'right'
value = 400
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/variables/previous_newton_iteration/test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Problem]
previous_nl_solution_required = true
[]
[Functions]
[./v_fn]
type = ParsedFunction
expression = -4+(x*x+y*y)+1
[../]
[./left_u_bc_fn]
type = ParsedFunction
expression = -2*x
[../]
[./top_u_bc_fn]
type = ParsedFunction
expression = 2*y
[../]
[./right_u_bc_fn]
type = ParsedFunction
expression = 2*x
[../]
[./bottom_u_bc_fn]
type = ParsedFunction
expression = -2*y
[../]
[]
[AuxVariables]
[./a]
order = SECOND
[../]
[./v]
order = SECOND
[../]
[]
[AuxKernels]
[./ak_a]
type = QuotientAux
variable = a
numerator = v
denominator = u
[../]
[./ak_v]
type = FunctionAux
variable = v
function = v_fn
[../]
[]
[Variables]
[./u]
order = SECOND
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
variable = u
value = 1
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./react]
type = Reaction
variable = u
[../]
[./cv_u]
type = CoupledForceLagged
variable = u
v = v
[../]
[]
[BCs]
[./u_bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = left_u_bc_fn
[../]
[./u_bc_top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = top_u_bc_fn
[../]
[./u_bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = right_u_bc_fn
[../]
[./u_bc_bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bottom_u_bc_fn
[../]
[]
[Preconditioning]
[./pc]
type = SMP
full = true
solve_type = PJFNK
[../]
[]
[Executioner]
type = Steady
# to get multiple NL iterations
l_tol = 1e-3
nl_rel_tol = 1e-10
[]
[Outputs]
[./out]
type = Exodus
execute_on = 'nonlinear'
[../]
[]
(modules/contact/test/tests/mechanical_constraint/frictionless_kinematic_gap_offsets.i)
# this test is the same as frictionless_kinematic test but designed to test the gap offset capability
# gap offsets with value of 0.01 were introduced to both primary and secondary sides in the initial mesh
# these values were accounted using the gap offset capability to produce the same result as if no gap offsets were introduced
[Mesh]
file = blocks_2d_gap_offset.e
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./inc_slip_x]
[../]
[./inc_slip_y]
[../]
[./accum_slip_x]
[../]
[./accum_slip_y]
[../]
[./primary_gap_offset]
[../]
[./secondary_gap_offset]
[../]
[./mapped_primary_gap_offset]
[../]
[]
[Functions]
[./vertical_movement]
type = ParsedFunction
expression = -t
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
strain = FINITE
[../]
[]
[AuxKernels]
[./zeroslip_x]
type = ConstantAux
variable = inc_slip_x
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./zeroslip_y]
type = ConstantAux
variable = inc_slip_y
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./accum_slip_x]
type = AccumulateAux
variable = accum_slip_x
accumulate_from_variable = inc_slip_x
execute_on = timestep_end
[../]
[./accum_slip_y]
type = AccumulateAux
variable = accum_slip_y
accumulate_from_variable = inc_slip_y
execute_on = timestep_end
[../]
[./primary_gap_offset]
type = ConstantAux
variable = primary_gap_offset
value = -0.01
boundary = 2
[../]
[./mapped_primary_gap_offset]
type = GapValueAux
variable = mapped_primary_gap_offset
paired_variable = primary_gap_offset
boundary = 3
paired_boundary = 2
[../]
[./secondary_gap_offset]
type = ConstantAux
variable = secondary_gap_offset
value = -0.01
boundary = 3
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = 4
value = -0.02
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = vertical_movement
[../]
[]
[Materials]
[./left]
type = ComputeIsotropicElasticityTensor
block = 1
poissons_ratio = 0.3
youngs_modulus = 1e7
[../]
[./right]
type = ComputeIsotropicElasticityTensor
block = 2
poissons_ratio = 0.3
youngs_modulus = 1e6
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_max_its = 100
nl_max_its = 1000
dt = 0.01
end_time = 0.10
num_steps = 1000
l_tol = 1e-6
nl_rel_tol = 1e-10
nl_abs_tol = 1e-8
dtmin = 0.01
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
[]
[Outputs]
file_base = frictionless_kinematic_gap_offsets_out
[./exodus]
type = Exodus
elemental_as_nodal = true
[../]
[./console]
type = Console
max_rows = 5
[../]
[]
[Contact]
[./leftright]
primary = 2
secondary = 3
model = frictionless
penalty = 1e+6
secondary_gap_offset = secondary_gap_offset
mapped_primary_gap_offset = mapped_primary_gap_offset
[../]
[]
(modules/contact/test/tests/verification/patch_tests/automatic_patch_update/sliding_update.i)
[Mesh]
file = sliding_update.e
displacements = 'disp_x disp_y'
patch_size = 5
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Kernels]
[TensorMechanics]
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2e5
poissons_ratio = 0.3
[]
[strain]
type = ComputeIncrementalSmallStrain
[]
[stress]
type = ComputeFiniteStrainElasticStress
[]
[]
[Contact]
[leftright]
secondary = 3
primary = 2
normalize_penalty = true
tangential_tolerance = 1e-3
penalty = 1e+4
model = frictionless
formulation = penalty
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
start_time = 0
end_time = 10.0
l_tol = 1e-8
nl_rel_tol = 1e-6
nl_abs_tol = 1e-4
dt = 2.0
line_search = 'none'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
timestep_tolerance = 1e-1
[]
[BCs]
[fixed_1_2x]
type = DirichletBC
boundary = '1'
value = 0.0
variable = disp_x
[]
[fixed_1_2y]
type = DirichletBC
boundary = '1'
value = 0.0
variable = disp_y
[]
[sliding_1]
type = FunctionDirichletBC
function = sliding_fn
variable = disp_x
boundary = '4'
[]
[normal_y]
type = DirichletBC
variable = disp_y
boundary = '4'
value = -0.01
[]
# [./Pressure]
# [./normal_pressure]
# disp_x = disp_x
# disp_y = disp_y
# factor = 100.0
# boundary = 4
# [../]
# [../]
[]
[Functions]
[sliding_fn]
type = ParsedFunction
expression = 't'
[]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/convergence/3D/neumann.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 = 4
ny = 4
nz = 4
[]
[]
[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
[]
[]
[Functions]
[pullx]
type = ParsedFunction
expression = '4000 * t'
[]
[pully]
type = ParsedFunction
expression = '-2000 * t'
[]
[pullz]
type = ParsedFunction
expression = '3000 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = left
variable = disp_y
value = 0.0
[]
[leftz]
type = DirichletBC
preset = true
boundary = left
variable = disp_z
value = 0.0
[]
[pull_x]
type = FunctionNeumannBC
boundary = right
variable = disp_x
function = pullx
[]
[pull_y]
type = FunctionNeumannBC
boundary = top
variable = disp_y
function = pully
[]
[pull_z]
type = FunctionNeumannBC
boundary = right
variable = disp_z
function = pullz
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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 = 0.2
dtmin = 0.2
end_time = 1.0
[]
[Postprocessors]
[nonlin]
type = NumNonlinearIterations
[]
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/time_integrators/actually_explicit_euler_verification/ee-1d-quadratic.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -1
xmax = 1
nx = 20
elem_type = EDGE3
[]
[Functions]
[./ic]
type = ParsedFunction
expression = 0
[../]
[./forcing_fn]
type = ParsedFunction
expression = x*x-2*t
[../]
[./exact_fn]
type = ParsedFunction
expression = t*x*x
[../]
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic
[../]
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
preset = false
boundary = '0 1'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
l_tol = 1e-12
start_time = 0.0
num_steps = 20
dt = 0.00005
[./TimeIntegrator]
type = ActuallyExplicitEuler
[../]
[]
[Outputs]
exodus = true
[./console]
type = Console
max_rows = 10
[../]
[]
(modules/solid_mechanics/examples/coal_mining/fine.i)
# Strata deformation and fracturing around a coal mine - 3D model
#
# A "half model" is used. The mine is 400m deep and
# just the roof is studied (-400<=z<=0). The mining panel
# sits between 0<=x<=150, and 0<=y<=1000, so this simulates
# a coal panel that is 300m wide and 1000m long. The outer boundaries
# are 1km from the excavation boundaries.
#
# Time is meaningless in this example
# as quasi-static solutions are sought at each timestep, but
# the number of timesteps controls the resolution of the
# process.
#
# The boundary conditions for this simulation are:
# - disp_x = 0 at x=0 and x=1150
# - disp_y = 0 at y=-1000 and y=1000
# - disp_z = 0 at z=-400, but there is a time-dependent
# Young's modulus that simulates excavation
# - wc_x = 0 at y=-1000 and y=1000
# - wc_y = 0 at x=0 and x=1150
# That is, rollers on the sides, free at top,
# and prescribed at bottom in the unexcavated portion.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa. The initial stress is consistent with
# the weight force from density 2500 kg/m^3, ie, stress_zz = 0.025*z MPa
# where gravity = 10 m.s^-2 = 1E-5 MPa m^2/kg. The maximum and minimum
# principal horizontal stresses are assumed to be equal to 0.8*stress_zz.
#
# Material properties:
# Young's modulus = 8 GPa
# Poisson's ratio = 0.25
# Cosserat layer thickness = 1 m
# Cosserat-joint normal stiffness = large
# Cosserat-joint shear stiffness = 1 GPa
# MC cohesion = 3 MPa
# MC friction angle = 37 deg
# MC dilation angle = 8 deg
# MC tensile strength = 1 MPa
# MC compressive strength = 100 MPa
# WeakPlane cohesion = 0.1 MPa
# WeakPlane friction angle = 30 deg
# WeakPlane dilation angle = 10 deg
# WeakPlane tensile strength = 0.1 MPa
# WeakPlane compressive strength = 100 MPa softening to 1 MPa at strain = 1
#
[Mesh]
[file]
type = FileMeshGenerator
file = mesh/fine.e
[]
[./xmin]
input = file
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = xmin
normal = '-1 0 0'
[../]
[./xmax]
input = xmin
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = xmax
normal = '1 0 0'
[../]
[./ymin]
input = xmax
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = ymin
normal = '0 -1 0'
[../]
[./ymax]
input = ymin
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = ymax
normal = '0 1 0'
[../]
[./zmax]
input = ymax
type = SideSetsAroundSubdomainGenerator
block = 30
new_boundary = zmax
normal = '0 0 1'
[../]
[./zmin]
input = zmax
type = SideSetsAroundSubdomainGenerator
block = 2
new_boundary = zmin
normal = '0 0 -1'
[../]
[./excav]
type = SubdomainBoundingBoxGenerator
input = zmin
block_id = 1
bottom_left = '0 0 -400'
top_right = '150 1000 -397'
[../]
[./roof]
type = SideSetsAroundSubdomainGenerator
block = 1
input = excav
new_boundary = roof
normal = '0 0 1'
[../]
[]
[GlobalParams]
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./wc_x]
[../]
[./wc_y]
[../]
[]
[Kernels]
[./cx_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_x
component = 0
[../]
[./cy_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_y
component = 1
[../]
[./cz_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_z
component = 2
[../]
[./x_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[../]
[./y_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_y
displacements = 'wc_x wc_y wc_z'
component = 1
base_name = couple
[../]
[./x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[../]
[./y_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_y
component = 1
[../]
[./gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6 # remember this is in MPa
[../]
[]
[AuxVariables]
[./wc_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[../]
[./stress_yx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yx
index_i = 1
index_j = 0
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zx
index_i = 2
index_j = 0
[../]
[./stress_zy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zy
index_i = 2
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./mc_shear]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_internal_parameter
variable = mc_shear
[../]
[./mc_tensile]
type = MaterialStdVectorAux
index = 1
property = mc_plastic_internal_parameter
variable = mc_tensile
[../]
[./wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
[../]
[./wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
[../]
[./mc_shear_f]
type = MaterialStdVectorAux
index = 6
property = mc_plastic_yield_function
variable = mc_shear_f
[../]
[./mc_tensile_f]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_yield_function
variable = mc_tensile_f
[../]
[./wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
[../]
[./wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
[../]
[]
[BCs]
[./no_x]
type = DirichletBC
variable = disp_x
boundary = 'xmin xmax'
value = 0.0
[../]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = 'ymin ymax'
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = zmin
value = 0.0
[../]
[./no_wc_x]
type = DirichletBC
variable = wc_x
boundary = 'ymin ymax'
value = 0.0
[../]
[./no_wc_y]
type = DirichletBC
variable = wc_y
boundary = 'xmin xmax'
value = 0.0
[../]
[./roof]
type = StickyBC
variable = disp_z
min_value = -3.0
boundary = roof
[../]
[]
[Functions]
[./ini_xx]
type = ParsedFunction
expression = '0.8*2500*10E-6*z'
[../]
[./ini_zz]
type = ParsedFunction
expression = '2500*10E-6*z'
[../]
[./excav_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval slope'
symbol_values = '100.0 0 1000.0 1E-9 1 10'
# excavation face at ymin+(ymax-ymin)*min(t/end_t,1)
# slope is the distance over which the modulus reduces from maxval to minval
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,if(y<ymin+(ymax-ymin)*min(t/end_t,1)+slope,minval+(maxval-minval)*(y-(ymin+(ymax-ymin)*min(t/end_t,1)))/slope,maxval))'
[../]
[./density_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval'
symbol_values = '100.0 0 1000.0 0 2500'
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,maxval)'
[../]
[]
[UserObjects]
[./mc_coh_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 2.99 # MPa
value_residual = 3.01 # MPa
rate = 1.0
[../]
[./mc_fric]
type = SolidMechanicsHardeningConstant
value = 0.65 # 37deg
[../]
[./mc_dil]
type = SolidMechanicsHardeningConstant
value = 0.15 # 8deg
[../]
[./mc_tensile_str_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.0 # MPa
rate = 1.0
[../]
[./mc_compressive_str]
type = SolidMechanicsHardeningCubic
value_0 = 100 # Large!
value_residual = 100
internal_limit = 0.1
[../]
[./wp_coh_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_tan_fric]
type = SolidMechanicsHardeningConstant
value = 0.36 # 20deg
[../]
[./wp_tan_dil]
type = SolidMechanicsHardeningConstant
value = 0.18 # 10deg
[../]
[./wp_tensile_str_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_compressive_str_soften]
type = SolidMechanicsHardeningCubic
value_0 = 100
value_residual = 1
internal_limit = 1.0
[../]
[]
[Materials]
[./elasticity_tensor_0]
type = ComputeLayeredCosseratElasticityTensor
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
[../]
[./elasticity_tensor_1]
type = ComputeLayeredCosseratElasticityTensor
block = 1
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
elasticity_tensor_prefactor = excav_sideways
[../]
[./strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[../]
[./ini_stress]
type = ComputeEigenstrainFromInitialStress
eigenstrain_name = ini_stress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
[../]
[./stress_0]
type = ComputeMultipleInelasticCosseratStress
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
inelastic_models = 'mc wp'
cycle_models = true
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./stress_1]
type = ComputeMultipleInelasticCosseratStress
block = 1
inelastic_models = ''
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./mc]
type = CappedMohrCoulombCosseratStressUpdate
warn_about_precision_loss = false
host_youngs_modulus = 8E3
host_poissons_ratio = 0.25
base_name = mc
tensile_strength = mc_tensile_str_strong_harden
compressive_strength = mc_compressive_str
cohesion = mc_coh_strong_harden
friction_angle = mc_fric
dilation_angle = mc_dil
max_NR_iterations = 100000
smoothing_tol = 0.1 # MPa # Must be linked to cohesion
yield_function_tol = 1E-9 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[../]
[./wp]
type = CappedWeakPlaneCosseratStressUpdate
warn_about_precision_loss = false
base_name = wp
cohesion = wp_coh_harden
tan_friction_angle = wp_tan_fric
tan_dilation_angle = wp_tan_dil
tensile_strength = wp_tensile_str_harden
compressive_strength = wp_compressive_str_soften
max_NR_iterations = 10000
tip_smoother = 0.1
smoothing_tol = 0.1 # MPa # Note, this must be tied to cohesion, otherwise get no possible return at cone apex
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0E-3
[../]
[./density_0]
type = GenericConstantMaterial
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
prop_names = density
prop_values = 2500
[../]
[./density_1]
type = GenericFunctionMaterial
block = 1
prop_names = density
prop_values = density_sideways
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[]
[]
[Postprocessors]
[./min_roof_disp]
type = NodalExtremeValue
boundary = roof
value_type = min
variable = disp_z
[../]
[./min_surface_disp]
type = NodalExtremeValue
boundary = zmax
value_type = min
variable = disp_z
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' bjacobi gmres 200'
line_search = bt
nl_abs_tol = 1e-3
nl_rel_tol = 1e-5
l_max_its = 30
nl_max_its = 1000
start_time = 0.0
dt = 0.5
end_time = 100.0
[]
[Outputs]
time_step_interval = 1
print_linear_residuals = false
exodus = true
csv = true
console = true
[]
(test/tests/indicators/analytical_indicator/analytical_indicator_fv.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 1
[]
[]
[Variables]
[u]
order = CONSTANT
family = MONOMIAL
fv = true
[]
[]
[Functions]
[solution]
type = ParsedFunction
expression = (exp(x)-1)/(exp(1)-1)
[]
[]
[FVKernels]
[diff]
type = FVDiffusion
variable = u
coeff = coeff
[]
[conv]
type = FVAdvection
variable = u
velocity = '1 0 0'
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = FVDirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Materials]
[diff]
type = ADGenericFunctorMaterial
prop_names = 'coeff'
prop_values = '1'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Adaptivity]
[Indicators]
[error]
type = AnalyticalIndicator
variable = u
function = solution
[]
[]
[]
[Outputs]
exodus = 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/thermal_hydraulics/test/tests/postprocessors/heat_structure_energy/heat_structure_energy_cylinder.i)
# Tests the HeatStructureEnergyRZ post-processor for a cylinder geometry.
#
# The heat structure will consist of 5 units of the following geometry:
# x in (x1, x2) = (0, 2) => length (x-direction) = 2
# inner radius = 2
# region widths: [4, 3]
# => y region 1: y in (y1, y2) = (2, 6)
# => y region 2: y in (y2, y3) = (6, 9)
#
# The temperature distribution is the following linear function:
# T(x,y) = A * x + B * y + C
# where A = 0.2, B = 0.4, C = 0.5.
# The integral of T(x,y) * y w.r.t. y = (y2, y3) is
# 1.0/3.0 * B * (y3^3 - y2^3) + 0.5 * (A * x + C) * (y3^2 - y2^2)
# The integral of this w.r.t. x = (x1, x2) is
# 1.0/3.0 * B * (y3^3 - y2^3) * dx + 0.5 * (0.5 * A * (x2^2 - x1^2) + C * dx) * (y3^2 - y2^2)
# where dx = x2 - x1.
#
# The post-processor computes the integral
# n_units * 2 pi * rho2 * cp2 * int_x int_y2 T(x, y) * y * dy * dx,
# where n_units = 5.
#
# The relevant heat structure material properties are
# rho2 = 3
# cp2 = 5
#
# Finally, n_units * 2 pi * rho2 * cp2 * int(T * y) = 7.930950653987433e+04
[SolidProperties]
[region1-mat]
type = ThermalFunctionSolidProperties
k = 1
cp = 1
rho = 1
[]
[region2-mat]
type = ThermalFunctionSolidProperties
k = 1
cp = 5
rho = 3
[]
[]
[Functions]
[T0_fn]
type = ParsedFunction
expression = '0.2 * x + 0.4 * (y - 2) + 0.5'
[]
[]
[Components]
[heat_structure]
type = HeatStructureCylindrical
num_rods = 5
position = '0 2 0'
orientation = '1 0 0'
inner_radius = 2.0
length = 2.0
n_elems = 50
names = 'region1 region2'
solid_properties = 'region1-mat region2-mat'
solid_properties_T_ref = '300 300'
widths = '4.0 3.0'
n_part_elems = '5 50'
initial_T = T0_fn
[]
[]
[Postprocessors]
[E_tot]
type = ADHeatStructureEnergyRZ
block = 'heat_structure:region2'
n_units = 5
axis_point = '0 2 0'
axis_dir = '1 0 0'
execute_on = 'initial'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
file_base = 'heat_structure_energy_cylinder'
[csv]
type = CSV
precision = 15
execute_on = 'initial'
[]
[]
(modules/xfem/test/tests/single_var_constraint_2d/stationary_fluxjump_func.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
elem_type = QUAD4
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./line_seg_cut_uo]
type = LineSegmentCutUserObject
cut_data = '0.5 1.0 0.5 0.0'
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
jump = 0
jump_flux = jump_flux_func
geometric_cut_userobject = 'line_seg_cut_uo'
[../]
[]
[Functions]
[./jump_flux_func]
type = ParsedFunction
expression = '1'
[../]
[]
[BCs]
# Define boundary conditions
[./left_u]
type = DirichletBC
variable = u
boundary = 3
value = 1
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
line_search = 'none'
l_tol = 1e-3
nl_max_its = 15
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
start_time = 0.0
dt = 1.0
end_time = 2.0
[]
[Outputs]
time_step_interval = 1
execute_on = timestep_end
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/bcs/misc_bcs/weak_gradient_bc_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Functions]
[./initial_value]
type = ParsedFunction
expression = 'x'
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_value
[../]
[../]
[]
[Kernels]
active = 'diff ie'
[./diff]
type = Diffusion
variable = u
[../]
[./ie]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
active = 'left right top bottom'
[./left]
type = SinDirichletBC
variable = u
boundary = 3
initial = 0.0
final = 1.0
duration = 10.0
[../]
[./right]
type = SinDirichletBC
variable = u
boundary = 1
initial = 1.0
final = 0.0
duration = 10.0
[../]
# Explicit Natural Boundary Conditions
[./top]
type = WeakGradientBC
variable = u
boundary = 2
[../]
[./bottom]
type = WeakGradientBC
variable = u
boundary = 0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
num_steps = 10
dt = 1.0
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/convergence/1D/neumann.i)
# Simple 1D plane strain test
[GlobalParams]
displacements = 'disp_x'
large_kinematics = true
[]
[Variables]
[disp_x]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 1
nx = 10
[]
[]
[Kernels]
[sdx]
type = TotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[]
[Functions]
[pull]
type = ParsedFunction
expression = '200 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = right
variable = disp_x
value = 0.0
[]
[pull]
type = FunctionNeumannBC
boundary = left
variable = disp_x
function = pull
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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 = 5.0
[]
[Postprocessors]
[nonlin]
type = NumNonlinearIterations
[]
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/transfers/multiapp_vector_pp_transfer/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 1
ymax = 2
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./v]
[./InitialCondition]
type = FunctionIC
function = set_v
[../]
[../]
[]
[Functions]
[./set_v]
type = ParsedFunction
expression = 'x + 2 * y'
[../]
[]
[VectorPostprocessors]
[./sample_points]
type = PointValueSampler
variable = v
points = '0.25 1.25 0 0.5 1.5 0'
sort_by = x
execute_on = 'initial timestep_end'
[../]
[./receive_values]
type = PointValueSampler
variable = v
points = '0.25 1.25 0 0.5 1.5 0'
sort_by = x
execute_on = initial
[../]
[]
[MultiApps]
[./sub]
type = TransientMultiApp
input_files = 'sub.i'
positions = '0.25 1.25 0 0.5 1.5 0'
[../]
[]
[Transfers]
[./send]
type = MultiAppVectorPostprocessorTransfer
vector_postprocessor = sample_points
postprocessor = receive
vector_name = v
to_multi_app = sub
[../]
[./receive]
type = MultiAppVectorPostprocessorTransfer
vector_postprocessor = receive_values
postprocessor = send
vector_name = v
from_multi_app = sub
[../]
[]
[Executioner]
type = Transient
nl_abs_tol = 1e-10
num_steps = 1
[]
[Outputs]
csv = true
[]
(modules/xfem/test/tests/checkpoint/checkpoint.i)
# This test is for two layer materials with different youngs modulus
# The global stress is determined by switching the stress based on level set values
# The material interface is marked by a level set function
# The two layer materials are glued together
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
[../]
[]
[Mesh]
displacements = 'disp_x disp_y'
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmin = 0.0
xmax = 5.
ymin = 0.0
ymax = 5.
elem_type = QUAD4
[]
[./left_bottom]
type = ExtraNodesetGenerator
new_boundary = 'left_bottom'
coord = '0.0 0.0'
input = gen
[../]
[./left_top]
type = ExtraNodesetGenerator
new_boundary = 'left_top'
coord = '0.0 5.'
input = left_bottom
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[Functions]
[./ls_func]
type = ParsedFunction
expression = 'y-2.5'
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./TensorMechanics]
[../]
[]
[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_xy]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 1
variable = stress_xy
[../]
[./a_strain_xx]
type = RankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 0
variable = a_strain_xx
[../]
[./a_strain_yy]
type = RankTwoAux
rank_two_tensor = A_total_strain
index_i = 1
index_j = 1
variable = a_strain_yy
[../]
[./a_strain_xy]
type = RankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 1
variable = a_strain_xy
[../]
[./b_strain_xx]
type = RankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 0
variable = b_strain_xx
[../]
[./b_strain_yy]
type = RankTwoAux
rank_two_tensor = B_total_strain
index_i = 1
index_j = 1
variable = b_strain_yy
[../]
[./b_strain_xy]
type = RankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 1
variable = b_strain_xy
[../]
[]
[Constraints]
[./dispx_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_x
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[./dispy_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_y
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[]
[BCs]
[./bottomx]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[./topx]
type = FunctionDirichletBC
boundary = top
variable = disp_x
function = 0.03*t
[../]
[./topy]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = '0.03*t'
[../]
[]
[Materials]
[./elasticity_tensor_A]
type = ComputeIsotropicElasticityTensor
base_name = A
youngs_modulus = 1e9
poissons_ratio = 0.3
[../]
[./strain_A]
type = ComputeSmallStrain
base_name = A
[../]
[./stress_A]
type = ComputeLinearElasticStress
base_name = A
[../]
[./elasticity_tensor_B]
type = ComputeIsotropicElasticityTensor
base_name = B
youngs_modulus = 1e5
poissons_ratio = 0.3
[../]
[./strain_B]
type = ComputeSmallStrain
base_name = B
[../]
[./stress_B]
type = ComputeLinearElasticStress
base_name = B
[../]
[./combined_stress]
type = LevelSetBiMaterialRankTwo
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = stress
[../]
[./combined_dstressdstrain]
type = LevelSetBiMaterialRankFour
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = Jacobian_mult
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
line_search = 'bt'
# controls for linear iterations
l_max_its = 20
l_tol = 1e-3
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-7
# time control
start_time = 0.0
dt = 0.1
num_steps = 2
max_xfem_update = 1
[]
[Outputs]
checkpoint = true
exodus = true
execute_on = timestep_end
csv = true
[./console]
type = Console
output_linear = true
[../]
[]
(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/solid_mechanics/test/tests/action/action_eigenstrain.i)
# The primary purpose of this test is to verify that the ability to combine
# multiple eigenstrains works correctly. It should behave identically to the
# constant_expansion_coeff.i model in the thermal_expansion directory. Instead
# of having the eigenstrain names passed directly to the SolidMechanics QuasiStatic Physics,
# the QuasiStatic Physics should be able to extract the necessary eigenstrains and apply
# to their respective blocks without reduncacy.
# This test involves only thermal expansion strains on a 2x2x2 cube of approximate
# steel material. An initial temperature of 25 degrees C is given for the material,
# and an auxkernel is used to calculate the temperature in the entire cube to
# raise the temperature each time step. After the first timestep,in which the
# temperature jumps, the temperature increases by 6.25C each timestep.
# The thermal strain increment should therefore be
# 6.25 C * 1.3e-5 1/C = 8.125e-5 m/m.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Problem]
solve = false
[]
[AuxVariables]
[./temp]
[../]
[]
[Functions]
[./temperature_load]
type = ParsedFunction
expression = t*(500.0)+300.0
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./solid]
strain = SMALL
incremental = true
add_variables = true
automatic_eigenstrain_names = true
generate_output = 'strain_xx strain_yy strain_zz'
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = temperature_load
[../]
[]
[BCs]
[./x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./z_bot]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain1]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 298
thermal_expansion_coeff = 1.0e-5
temperature = temp
eigenstrain_name = eigenstrain1
[../]
[./thermal_expansion_strain2]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 298
thermal_expansion_coeff = 0.3e-5
temperature = temp
eigenstrain_name = eigenstrain2
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
end_time = 0.075
dt = 0.0125
dtmin = 0.0001
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Postprocessors]
[./strain_xx]
type = ElementAverageValue
variable = strain_xx
block = 0
[../]
[./strain_yy]
type = ElementAverageValue
variable = strain_yy
block = 0
[../]
[./strain_zz]
type = ElementAverageValue
variable = strain_zz
block = 0
[../]
[./temperature]
type = AverageNodalVariableValue
variable = temp
block = 0
[../]
[]
(test/tests/bcs/function_neumann_bc/test.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
dim = 2
nx = 32
ny = 32
[../]
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./exact_func]
type = ParsedFunction
expression = x*x
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
value = 2
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = FunctionNeumannBC
function = exact_func
variable = u
boundary = right
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
execute_on = 'timestep_end'
file_base = neumannbc_out
exodus = true
[]
(test/tests/variables/fe_hier/hier-3-1d.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -1
xmax = 1
nx = 5
elem_type = EDGE3
[]
[Functions]
[./bc_fnl]
type = ParsedFunction
expression = -3*x*x
[../]
[./bc_fnr]
type = ParsedFunction
expression = 3*x*x
[../]
[./forcing_fn]
type = ParsedFunction
expression = -6*x+(x*x*x)
[../]
[./solution]
type = ParsedGradFunction
expression = x*x*x
grad_x = 3*x*x
[../]
[]
[Variables]
[./u]
order = THIRD
family = HIERARCHIC
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/bcs/periodic/wedge_sys.i)
[Mesh]
file = wedge.e
[]
[Functions]
active = 'tr_x tr_y'
[./tr_x]
type = ParsedFunction
expression = -x
[../]
[./tr_y]
type = ParsedFunction
expression = y
[../]
[]
[Variables]
active = 'u temp'
# active = 'temp'
[./u]
order = FIRST
family = LAGRANGE
[../]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff forcing dot dot_T diff_T'
# active = 'dot_T diff_T'
[./diff]
type = Diffusion
variable = u
[../]
[./forcing]
type = GaussContForcing
variable = u
x_center = -0.5
y_center = 3.0
x_spread = 0.2
y_spread = 0.2
[../]
[./dot]
type = TimeDerivative
variable = u
[../]
[./dot_T]
type = TimeDerivative
variable = temp
[../]
[./diff_T]
type = Diffusion
variable = temp
[../]
[]
[BCs]
#active = ' '
[./Periodic]
[./x]
primary = 1
secondary = 2
transform_func = 'tr_x tr_y'
inv_transform_func = 'tr_x tr_y'
variable = u
[../]
[../]
[./left_temp]
type = DirichletBC
value = 0
boundary = 1
variable = temp
[../]
[./right_temp]
type = DirichletBC
value = 1
boundary = 2
variable = temp
[../]
[]
[Executioner]
type = Transient
dt = 0.5
num_steps = 6
solve_type = NEWTON
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_wedge_sys
exodus = true
[]
(modules/optimization/test/tests/functions/parameter_mesh/create_mesh.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[]
parallel_type = REPLICATED
[]
[AuxVariables/params]
[]
[ICs/params_ic]
type = FunctionIC
function = params_fun
variable = params
[]
[Functions]
[params_fun]
type = ParsedFunction
value = 'x*(x-1)*y*(y-1)'
[]
[]
[VectorPostprocessors]
[param_vec]
type = NodalValueSampler
sort_by = id
variable = params
[]
[]
[Outputs]
csv = true
exodus = true
execute_on = timestep_end
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
(test/tests/fvkernels/mms/advective-outflow/advection-outflow.i)
a=1.1
[GlobalParams]
advected_interp_method = 'average'
[]
[Mesh]
[./gen_mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = 1.1
nx = 2
[../]
[]
[Variables]
[./u]
family = MONOMIAL
order = CONSTANT
fv = true
two_term_boundary_expansion = false
type = MooseVariableFVReal
[../]
[./v]
family = MONOMIAL
order = CONSTANT
fv = true
two_term_boundary_expansion = true
type = MooseVariableFVReal
[../]
[]
[FVKernels]
[./advection_u]
type = FVAdvection
variable = u
velocity = '${a} 0 0'
[../]
[body_u]
type = FVBodyForce
variable = u
function = 'forcing'
[]
[./advection_v]
type = FVAdvection
variable = v
velocity = '${a} 0 0'
[../]
[body_v]
type = FVBodyForce
variable = v
function = 'forcing'
[]
[]
[FVBCs]
[left_u]
type = FVFunctionDirichletBC
boundary = 'left'
function = 'exact'
variable = u
[]
[right_u]
type = FVConstantScalarOutflowBC
variable = u
velocity = '${a} 0 0'
boundary = 'right'
[]
[left_v]
type = FVFunctionDirichletBC
boundary = 'left'
function = 'exact'
variable = v
[]
[right_v]
type = FVConstantScalarOutflowBC
variable = v
velocity = '${a} 0 0'
boundary = 'right'
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = 'cos(x)'
[]
[forcing]
type = ParsedFunction
expression = '-${a} * sin(x)'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO mumps'
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[./L2u]
type = ElementL2Error
variable = u
function = exact
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[./L2v]
type = ElementL2Error
variable = v
function = exact
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(python/peacock/tests/input_tab/InputTree/gold/transient.i)
# ##########################################################
# This is a simple test with a time-dependent problem
# demonstrating the use of a "Transient" Executioner.
#
# @Requirement F1.10
# ##########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = ConstantIC
value = 0
[]
[]
[]
[Functions]
[forcing_fn]
# dudt = 3*t^2*(x^2 + y^2)
type = ParsedFunction
expression = '3*t*t*((x*x)+(y*y))-(4*t*t*t)'
[]
[exact_fn]
type = ParsedFunction
expression = 't*t*t*((x*x)+(y*y))'
[]
[]
[Kernels]
[ie]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[BCs]
inactive = 'left right'
[all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[]
[left]
type = DirichletBC
variable = u
boundary = '3'
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = '1'
value = 1
[]
[]
[Postprocessors]
[l2_err]
type = ElementL2Error
variable = 'u'
function = exact_fn
[]
[dt]
type = TimestepSize
[]
[]
[Executioner]
# Preconditioned JFNK (default)
type = Transient
scheme = implicit-euler
solve_type = PJFNK
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_transient
exodus = true
[]
(modules/contact/test/tests/mortar_aux_kernels/pressure-aux-friction.i)
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.35
xmax = -0.05
ymin = -1
ymax = 0
nx = 1
ny = 3
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_sideset_names]
type = RenameBoundaryGenerator
input = left_block_sidesets
old_boundary = '10 11 12 13'
new_boundary = 'l_bottom l_right l_top l_left'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sideset_names
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.3
ymin = -1
ymax = 0
nx = 1
ny = 2
elem_type = QUAD4
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3'
new_boundary = '20 21 22 23'
[]
[right_block_sideset_names]
type = RenameBoundaryGenerator
input = right_block_sidesets
old_boundary = '20 21 22 23'
new_boundary = 'r_bottom r_right r_top r_left'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sideset_names
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[left_lower]
type = LowerDBlockFromSidesetGenerator
input = combined_mesh
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[right_lower]
type = LowerDBlockFromSidesetGenerator
input = left_lower
sidesets = '23'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
uniform_refine = 1
[]
[Variables]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[normal_lm]
family = LAGRANGE
order = FIRST
[]
[tangent_lm]
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[tangent_lm]
type = MortarPressureComponentAux
variable = tangent_lm
primary_boundary = '23'
secondary_boundary = '11'
lm_var_x = lm_x
lm_var_y = lm_y
component = 'TANGENT1'
boundary = '11'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
[]
[]
[Functions]
[horizontal_movement]
type = ParsedFunction
expression = '0.1 * t'
[]
[vertical_movement]
type = ParsedFunction
expression = '0.0'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = horizontal_movement
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 21
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = 21
value = 0.0
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 13
function = vertical_movement
[]
[]
[Materials]
[elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e4
poissons_ratio = 0.3
[]
[stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e8
poissons_ratio = 0.3
[]
[stress_right]
type = ComputeFiniteStrainElasticStress
block = 2
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeFrictionalForceCartesianLMMechanicalContact # ComputeCartesianLMFrictionMechanicalContact
# type = ComputeWeightedGapLMMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
correct_edge_dropping = true
mu = 1.0
c_t = 1.0e5
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_view'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -mat_mffd_err -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist 1e-8 NONZERO 1e-15'
line_search = none
dt = 0.1
dtmin = 0.1
end_time = 1.0
l_max_its = 100
nl_max_its = 20
nl_rel_tol = 1e-8
snesmf_reuse_base = false
[]
[Outputs]
exodus = false
csv = true
execute_on = 'FINAL'
[]
[VectorPostprocessors]
[tangent_lm]
type = NodalValueSampler
block = 'secondary_lower'
variable = tangent_lm
sort_by = 'id'
[]
[]
(modules/porous_flow/test/tests/heterogeneous_materials/constant_poroperm2.i)
# Assign porosity and permeability variables from constant AuxVariables to create
# a heterogeneous model
[Mesh]
type = GeneratedMesh
dim = 3
nx = 3
ny = 3
nz = 3
xmin = 1
xmax = 4
ymin = 1
ymax = 4
zmin = 1
zmax = 4
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 -10'
[]
[Variables]
[ppwater]
initial_condition = 1e6
[]
[]
[AuxVariables]
[poro]
family = MONOMIAL
order = CONSTANT
[]
[permxx]
family = MONOMIAL
order = CONSTANT
[]
[permxy]
family = MONOMIAL
order = CONSTANT
[]
[permxz]
family = MONOMIAL
order = CONSTANT
[]
[permyx]
family = MONOMIAL
order = CONSTANT
[]
[permyy]
family = MONOMIAL
order = CONSTANT
[]
[permyz]
family = MONOMIAL
order = CONSTANT
[]
[permzx]
family = MONOMIAL
order = CONSTANT
[]
[permzy]
family = MONOMIAL
order = CONSTANT
[]
[permzz]
family = MONOMIAL
order = CONSTANT
[]
[poromat]
family = MONOMIAL
order = CONSTANT
[]
[permxxmat]
family = MONOMIAL
order = CONSTANT
[]
[permxymat]
family = MONOMIAL
order = CONSTANT
[]
[permxzmat]
family = MONOMIAL
order = CONSTANT
[]
[permyxmat]
family = MONOMIAL
order = CONSTANT
[]
[permyymat]
family = MONOMIAL
order = CONSTANT
[]
[permyzmat]
family = MONOMIAL
order = CONSTANT
[]
[permzxmat]
family = MONOMIAL
order = CONSTANT
[]
[permzymat]
family = MONOMIAL
order = CONSTANT
[]
[permzzmat]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[poromat]
type = PorousFlowPropertyAux
property = porosity
variable = poromat
[]
[permxxmat]
type = PorousFlowPropertyAux
property = permeability
variable = permxxmat
column = 0
row = 0
[]
[permxymat]
type = PorousFlowPropertyAux
property = permeability
variable = permxymat
column = 1
row = 0
[]
[permxzmat]
type = PorousFlowPropertyAux
property = permeability
variable = permxzmat
column = 2
row = 0
[]
[permyxmat]
type = PorousFlowPropertyAux
property = permeability
variable = permyxmat
column = 0
row = 1
[]
[permyymat]
type = PorousFlowPropertyAux
property = permeability
variable = permyymat
column = 1
row = 1
[]
[permyzmat]
type = PorousFlowPropertyAux
property = permeability
variable = permyzmat
column = 2
row = 1
[]
[permzxmat]
type = PorousFlowPropertyAux
property = permeability
variable = permzxmat
column = 0
row = 2
[]
[permzymat]
type = PorousFlowPropertyAux
property = permeability
variable = permzymat
column = 1
row = 2
[]
[permzzmat]
type = PorousFlowPropertyAux
property = permeability
variable = permzzmat
column = 2
row = 2
[]
[]
[ICs]
[poro]
type = RandomIC
seed = 0
variable = poro
max = 0.5
min = 0.1
[]
[permxx]
type = FunctionIC
function = permxx
variable = permxx
[]
[permxy]
type = FunctionIC
function = permxy
variable = permxy
[]
[permxz]
type = FunctionIC
function = permxz
variable = permxz
[]
[permyx]
type = FunctionIC
function = permyx
variable = permyx
[]
[permyy]
type = FunctionIC
function = permyy
variable = permyy
[]
[permyz]
type = FunctionIC
function = permyz
variable = permyz
[]
[permzx]
type = FunctionIC
function = permzx
variable = permzx
[]
[permzy]
type = FunctionIC
function = permzy
variable = permzy
[]
[permzz]
type = FunctionIC
function = permzz
variable = permzz
[]
[]
[Functions]
[permxx]
type = ParsedFunction
expression = '(x*x)*1e-11'
[]
[permxy]
type = ParsedFunction
expression = '(x*y)*1e-11'
[]
[permxz]
type = ParsedFunction
expression = '(x*z)*1e-11'
[]
[permyx]
type = ParsedFunction
expression = '(y*x)*1e-11'
[]
[permyy]
type = ParsedFunction
expression = '(y*y)*1e-11'
[]
[permyz]
type = ParsedFunction
expression = '(y*z)*1e-11'
[]
[permzx]
type = ParsedFunction
expression = '(z*x)*1e-11'
[]
[permzy]
type = ParsedFunction
expression = '(z*y)*1e-11'
[]
[permzz]
type = ParsedFunction
expression = '(z*z)*1e-11'
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
variable = ppwater
[]
[flux0]
type = PorousFlowAdvectiveFlux
variable = ppwater
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
viscosity = 1e-3
thermal_expansion = 0
cv = 2
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = ppwater
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = poro
[]
[permeability]
type = PorousFlowPermeabilityConstFromVar
perm_xx = permxx
perm_xy = permxy
perm_xz = permxz
perm_yx = permyx
perm_yy = permyy
perm_yz = permyz
perm_zx = permzx
perm_zy = permzy
perm_zz = permzz
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[Postprocessors]
[mass_ph0]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol'
petsc_options_value = 'bcgs bjacobi 1E-12 1E-10'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 100
dt = 100
[]
[Outputs]
execute_on = 'initial timestep_end'
exodus = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/umat/elastic_shear/elastic_shear.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Functions]
[tdisp]
type = ParsedFunction
expression = '0.025 * t'
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 1
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_xz stress_yz'
[]
[]
[BCs]
[bottom_x]
type = DirichletBC
variable = disp_x
boundary = bottom
value = 0
[]
[bottom_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[bottom_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0
[]
[top_y]
type = DirichletBC
variable = disp_y
boundary = top
value = 0
[]
[top_z]
type = DirichletBC
variable = disp_z
boundary = top
value = 0
[]
[tdisp]
type = FunctionDirichletBC
variable = disp_x
boundary = top
function = tdisp
[]
[]
[Materials]
[umat]
type = AbaqusUMATStress
# c10=G/2 D=2/K
constant_properties = '5 0.025'
plugin = '../../../plugins/neo_hooke'
num_state_vars = 0
use_one_based_indexing = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
end_time = 20
dt = 10.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
time_step_interval = 1
[]
(test/tests/time_integrators/abort/abort.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0.0
xmax = 1.0
[]
#still need BC for Energy, IC's for both.
[Variables]
active = 'Time'
[./Time]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[../]
[]
[Functions]
active = 'func'
[./func]
type = ParsedFunction
expression = 2.0*t
[../]
[]
[Kernels]
active = 't_time func_time'
[./t_time]
type = TimeDerivative
variable = Time
[../]
[./func_time]
type = BodyForce
variable = Time
function = func
[../]
[]
[BCs]
active = 'Top_Temperature'
[./Top_Temperature]
type = NeumannBC
variable = Time
boundary = 'left right'
[../]
[]
[Executioner]
type = Transient
#scheme = 'BDF2'
#scheme = 'crank-nicolson'
start_time = 0
num_steps = 4
dt = 1000000000
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
steady_state_tolerance = .00000000000000001
steady_state_detection = true
nl_abs_tol = 1e-15
petsc_options = '-snes_converged_reason'
abort_on_solve_fail = true
[]
[Outputs]
file_base = out
exodus = true
[]
(test/tests/misc/check_error/uo_pps_name_collision_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 5
ny = 5
elem_type = QUAD4
[]
[UserObjects]
[./ud]
type = MTUserObject
scalar = 2
vector = '9 7 5'
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = -2
[../]
[./exact_fn]
type = ParsedFunction
expression = x*x
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = FIRST
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = UserObjectKernel
variable = u
user_object = ud
[]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
function = exact_fn
boundary = '0 1 2 3'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Postprocessors]
[./ud]
type = NumDOFs
[]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out
[]
(modules/solid_mechanics/examples/coal_mining/cosserat_elastic.i)
# Strata deformation and fracturing around a coal mine
#
# A 2D geometry is used that simulates a transverse section of
# the coal mine. The model is actually 3D, but the "x"
# dimension is only 10m long, meshed with 1 element, and
# there is no "x" displacement. The mine is 400m deep
# and just the roof is studied (0<=z<=400). The model sits
# between 0<=y<=450. The excavation sits in 0<=y<=150. This
# is a "half model": the boundary conditions are such that
# the model simulates an excavation sitting in -150<=y<=150
# inside a model of the region -450<=y<=450. The
# excavation height is 3m (ie, the excavation lies within
# 0<=z<=3).
#
# Time is meaningless in this example
# as quasi-static solutions are sought at each timestep, but
# the number of timesteps controls the resolution of the
# process.
#
# The boundary conditions for this elastic simulation are:
# - disp_x = 0 everywhere
# - disp_y = 0 at y=0 and y=450
# - disp_z = 0 for y>150
# - wc_x = 0 at y=0 and y=450.
# That is, rollers on the sides, free at top,
# and prescribed at bottom in the unexcavated portion.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa. The initial stress is consistent with
# the weight force from density 2500 kg/m^3, ie, stress_zz = -0.025*(300-z) MPa
# where gravity = 10 m.s^-2 = 1E-5 MPa m^2/kg. The maximum and minimum
# principal horizontal stresses are assumed to be equal to 0.8*stress_zz.
#
# This is an elastic simulation, but the weak-plane and Drucker-Prager
# parameters and AuxVariables may be found below. They are irrelevant
# in this simulation. The weak-plane and Drucker-Prager cohesions,
# tensile strengths and compressive strengths have been set very high
#
# Material properties:
# Young's modulus = 8 GPa
# Poisson's ratio = 0.25
# Cosserat layer thickness = 1 m
# Cosserat-joint normal stiffness = large
# Cosserat-joint shear stiffness = 1 GPa
#
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
xmin = -5
xmax = 5
nz = 40
zmin = 0
zmax = 403.003
bias_z = 1.1
ny = 30 # make this a multiple of 3, so y=150 is at a node
ymin = 0
ymax = 450
[]
[left]
type = SideSetsAroundSubdomainGenerator
new_boundary = 11
normal = '0 -1 0'
input = generated_mesh
[]
[right]
type = SideSetsAroundSubdomainGenerator
new_boundary = 12
normal = '0 1 0'
input = left
[]
[front]
type = SideSetsAroundSubdomainGenerator
new_boundary = 13
normal = '-1 0 0'
input = right
[]
[back]
type = SideSetsAroundSubdomainGenerator
new_boundary = 14
normal = '1 0 0'
input = front
[]
[top]
type = SideSetsAroundSubdomainGenerator
new_boundary = 15
normal = '0 0 1'
input = back
[]
[bottom]
type = SideSetsAroundSubdomainGenerator
new_boundary = 16
normal = '0 0 -1'
input = top
[]
[excav]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '-5 0 0'
top_right = '5 150 3'
input = bottom
[]
[roof]
type = SideSetsBetweenSubdomainsGenerator
new_boundary = 21
primary_block = 0
paired_block = 1
input = excav
[]
[hole]
type = BlockDeletionGenerator
block = 1
input = roof
[]
[]
[GlobalParams]
block = 0
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
[]
[Variables]
[./disp_y]
[../]
[./disp_z]
[../]
[./wc_x]
[../]
[]
[Kernels]
[./cy_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_y
component = 1
[../]
[./cz_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_z
component = 2
[../]
[./x_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[../]
[./x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[../]
[./gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6 # remember this is in MPa
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./wc_y]
[../]
[./wc_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./dp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./dp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[./dp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./dp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[../]
[./stress_yx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yx
index_i = 1
index_j = 0
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zx
index_i = 2
index_j = 0
[../]
[./stress_zy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zy
index_i = 2
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./dp_shear]
type = MaterialStdVectorAux
index = 0
property = dp_plastic_internal_parameter
variable = dp_shear
[../]
[./dp_tensile]
type = MaterialStdVectorAux
index = 1
property = dp_plastic_internal_parameter
variable = dp_tensile
[../]
[./wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
[../]
[./wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
[../]
[./dp_shear_f]
type = MaterialStdVectorAux
index = 0
property = dp_plastic_yield_function
variable = dp_shear_f
[../]
[./dp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = dp_plastic_yield_function
variable = dp_tensile_f
[../]
[./wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
[../]
[./wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
[../]
[]
[BCs]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '11 12'
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '16'
value = 0.0
[../]
[./no_wc_x]
type = DirichletBC
variable = wc_x
boundary = '11 12'
value = 0.0
[../]
[]
[Functions]
[./ini_xx]
type = ParsedFunction
expression = '-0.8*2500*10E-6*(403.003-z)'
[../]
[./ini_zz]
type = ParsedFunction
expression = '-2500*10E-6*(403.003-z)'
[../]
[]
[UserObjects]
[./dp_coh_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 2.9 # MPa
value_residual = 3.1 # MPa
rate = 1.0
[../]
[./dp_fric]
type = SolidMechanicsHardeningConstant
value = 0.65 # 37deg
[../]
[./dp_dil]
type = SolidMechanicsHardeningConstant
value = 0.65
[../]
[./dp_tensile_str_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.4 # MPa
rate = 1.0
[../]
[./dp_compressive_str]
type = SolidMechanicsHardeningConstant
value = 1.0E3 # Large!
[../]
[./drucker_prager_model]
type = SolidMechanicsPlasticDruckerPrager
mc_cohesion = dp_coh_strong_harden
mc_friction_angle = dp_fric
mc_dilation_angle = dp_dil
internal_constraint_tolerance = 1 # irrelevant here
yield_function_tolerance = 1 # irrelevant here
[../]
[./wp_coh]
type = SolidMechanicsHardeningConstant
value = 1E12
[../]
[./wp_tan_fric]
type = SolidMechanicsHardeningConstant
value = 0.36 # 20deg
[../]
[./wp_tan_dil]
type = SolidMechanicsHardeningConstant
value = 0.18 # 10deg
[../]
[./wp_tensile_str]
type = SolidMechanicsHardeningConstant
value = 1E12
[../]
[./wp_compressive_str]
type = SolidMechanicsHardeningConstant
value = 1E12
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeLayeredCosseratElasticityTensor
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
[../]
[./strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[../]
[./ini_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
eigenstrain_name = ini_stress
[../]
[./stress]
# this is needed so as to correctly apply the initial stress
type = ComputeMultipleInelasticCosseratStress
block = 0
inelastic_models = ''
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./dp]
type = CappedDruckerPragerCosseratStressUpdate
block = 0
warn_about_precision_loss = false
host_youngs_modulus = 8E3
host_poissons_ratio = 0.25
base_name = dp
DP_model = drucker_prager_model
tensile_strength = dp_tensile_str_strong_harden
compressive_strength = dp_compressive_str
max_NR_iterations = 100000
tip_smoother = 0.1E1
smoothing_tol = 0.1E1 # MPa # Must be linked to cohesion
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[../]
[./wp]
type = CappedWeakPlaneCosseratStressUpdate
block = 0
warn_about_precision_loss = false
base_name = wp
cohesion = wp_coh
tan_friction_angle = wp_tan_fric
tan_dilation_angle = wp_tan_dil
tensile_strength = wp_tensile_str
compressive_strength = wp_compressive_str
max_NR_iterations = 10000
tip_smoother = 0.1
smoothing_tol = 0.1 # MPa # Note, this must be tied to cohesion, otherwise get no possible return at cone apex
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0E-3
[../]
[./density]
type = GenericConstantMaterial
prop_names = density
prop_values = 2500
[../]
[]
[Postprocessors]
[./subs_max]
type = PointValue
point = '0 0 403.003'
variable = disp_z
use_displaced_mesh = false
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'Linear'
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
line_search = bt
nl_abs_tol = 1e-3
nl_rel_tol = 1e-5
l_max_its = 30
nl_max_its = 1000
start_time = 0.0
dt = 1.0
end_time = 1.0
[]
[Outputs]
file_base = cosserat_elastic
time_step_interval = 1
print_linear_residuals = false
exodus = true
csv = true
console = true
#[./console]
# type = Console
# output_linear = false
#[../]
[]
(modules/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/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/xfem/test/tests/moving_interface/moving_level_set.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./line_seg_cut_uo]
type = LineSegmentCutSetUserObject
cut_data = '0.3 1.0 0.3 0.2 0 3'
heal_always = false
[../]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Functions]
[./u_left]
type = PiecewiseLinear
x = '0 2'
y = '3 5'
[../]
[./ls_func]
type = ParsedFunction
expression = 'x-0.7-0.07*(t-1)'
[../]
[]
[Constraints]
[./u_constraint]
type = XFEMSingleVariableConstraint
geometric_cut_userobject = 'level_set_cut_uo'
use_displaced_mesh = false
variable = u
use_penalty = true
alpha = 1e5
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
# Define boundary conditions
[./left_u]
type = DirichletBC
variable = u
boundary = 3
value = 3
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
# petsc_options_iname = '-pc_type -pc_hypre_type'
# petsc_options_value = 'hypre boomeramg'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_tol = 1e-3
nl_max_its = 15
nl_rel_tol = 1e-10
nl_abs_tol = 1e-9
start_time = 0.0
dt = 1
end_time = 3.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = timestep_end
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/fviks/one-var-diffusion/test.i)
L = 2
l = 1
q1 = 1
q2 = 2
uR = 1
D1 = 1
D2 = 2
ul = '${fparse 1/D2*(D2*uR+q2*L*L/2-q2*l*l/2-l*(q2-q1)*L+l*l*(q2-q1))}'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = ${L}
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '${l} 0 0'
block_id = 1
top_right = '${L} 1.0 0'
[]
[interface_primary_side]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary_interface'
[]
[interface_secondary_side]
input = interface_primary_side
type = SideSetsBetweenSubdomainsGenerator
primary_block = '1'
paired_block = '0'
new_boundary = 'secondary_interface'
[]
[]
[Variables]
[u]
type = MooseVariableFVReal
[]
[v]
type = MooseVariableFVReal
block = 0
[]
[w]
type = MooseVariableFVReal
block = 1
[]
[]
[FVKernels]
[diff_left]
type = FVDiffusion
variable = u
coeff = 'left'
block = 0
[]
[diff_right]
type = FVDiffusion
variable = u
coeff = 'right'
block = 1
[]
[source_left]
type = FVBodyForce
variable = u
function = ${q1}
block = 0
[]
[source_right]
type = FVBodyForce
variable = u
function = ${q2}
block = 1
[]
[diff_v]
type = FVDiffusion
variable = v
block = 0
coeff = 'left'
[]
[diff_w]
type = FVDiffusion
variable = w
block = 1
coeff = 'right'
[]
[]
[FVInterfaceKernels]
active = 'interface'
[interface]
type = FVOneVarDiffusionInterface
variable1 = u
boundary = primary_interface
subdomain1 = '0'
subdomain2 = '1'
coeff1 = 'left'
coeff2 = 'right'
coeff_interp_method = average
[]
[bad1]
type = FVOneVarDiffusionInterface
variable1 = w
variable2 = u
boundary = primary_interface
subdomain1 = '0'
subdomain2 = '1'
coeff1 = 'left'
coeff2 = 'right'
coeff_interp_method = average
[]
[bad2]
type = FVOneVarDiffusionInterface
variable1 = u
variable2 = v
boundary = primary_interface
subdomain1 = '0'
subdomain2 = '1'
coeff1 = 'left'
coeff2 = 'right'
coeff_interp_method = average
[]
[bad3]
type = FVOneVarDiffusionInterface
variable1 = v
boundary = primary_interface
subdomain1 = '0'
subdomain2 = '1'
coeff1 = 'left'
coeff2 = 'right'
coeff_interp_method = average
[]
[]
[FVBCs]
[right]
type = FVDirichletBC
variable = u
boundary = 'right'
value = ${uR}
[]
[v_left]
type = FVDirichletBC
variable = v
boundary = 'left'
value = 1
[]
[v_right]
type = FVDirichletBC
variable = v
boundary = 'primary_interface'
value = 0
[]
[w_left]
type = FVDirichletBC
variable = w
boundary = 'secondary_interface'
value = 1
[]
[w_right]
type = FVDirichletBC
variable = w
boundary = 'right'
value = 0
[]
[]
[Materials]
[block0]
type = ADGenericFunctorMaterial
block = '0'
prop_names = 'left'
prop_values = '${D1}'
[]
[block1]
type = ADGenericFunctorMaterial
block = '1'
prop_names = 'right'
prop_values = '${D2}'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
csv = true
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'if(x<${l}, 1/${D1}*(${fparse D1*ul+q1*l*l/2}-${fparse q1/2}*x*x),-1/${D2}*(${fparse -D2*ul-q2*l*l/2}+${fparse q2/2}*x*x-${fparse l*(q2-q1)}*x+${fparse l*l*(q2-q1)}))'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2Error
variable = u
function = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(modules/heat_transfer/test/tests/heat_conduction_patch/heat_conduction_patch_rz_quad8.i)
#
# This problem is taken from the Abaqus verification manual:
# "1.5.8 Patch test for heat transfer elements"
#
# The temperature on the exterior nodes is -2e5+200x+100y.
#
# This gives a constant flux at all Gauss points.
#
# In addition, the temperature at all nodes follows the same formula.
#
# Node x y Temperature
# 1 1e3 0 0
# 2 1.00024e3 0 48
# 3 1.00018e3 3e-2 39
# 4 1.00004e3 2e-2 10
# 9 1.00008e3 8e-2 24
# 10 1e3 1.2e-1 12
# 14 1.00016e3 8e-2 40
# 17 1.00024e3 1.2e-1 60
[Problem]
coord_type = RZ
[]
[Mesh]#Comment
file = heat_conduction_patch_rz_quad8.e
[] # Mesh
[Functions]
[./temps]
type = ParsedFunction
expression ='-2e5+200*x+100*y'
[../]
[] # Functions
[Variables]
[./temp]
order = SECOND
family = LAGRANGE
[../]
[] # Variables
[Kernels]
[./heat_r]
type = HeatConduction
variable = temp
[../]
[] # Kernels
[BCs]
[./temps]
type = FunctionDirichletBC
variable = temp
boundary = 10
function = temps
[../]
[] # BCs
[Materials]
[./heat]
type = HeatConductionMaterial
block = 1
specific_heat = 0.116
thermal_conductivity = 4.85e-4
[../]
[] # Materials
[Executioner]
type = Steady
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
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
[./Quadrature]
order = THIRD
[../]
[] # Executioner
[Outputs]
exodus = true
[] # Outputs
(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
[]
(modules/richards/test/tests/theis/th_lumped_01.i)
# fully-saturated
# production
# lumped
[Mesh]
type = FileMesh
file = th01_input.e
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = DensityConstBulk
relperm_UO = RelPermPower
sat_UO = Saturation
seff_UO = Seff1VG
SUPG_UO = SUPGstandard
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '0.5 1 2 10'
x = '0 1 10 100'
[../]
[]
[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-5
[../]
[./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 = RichardsLumpedMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
variable = pressure
[../]
[]
[DiracKernels]
[./bh]
type = RichardsPolyLineSink
pressures = '-1E9 1E9'
fluxes = '200 200'
point_file = th01.points
SumQuantityUO = total_outflow_mass
variable = pressure
[../]
[]
[Postprocessors]
[./flow_report]
type = RichardsPlotQuantity
uo = total_outflow_mass
[../]
[./p50]
type = PointValue
variable = pressure
point = '50 0 0'
execute_on = timestep_end
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 1E5
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = 1
viscosity = 1E-3
mat_porosity = 0.1
mat_permeability = '1E-10 0 0 0 1E-10 0 0 0 1E-10'
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-6 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 100
solve_type = NEWTON
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = th_lumped_01
csv = true
[]
(test/tests/postprocessors/element_integral/functors/element_integral_test.i)
[Mesh]
second_order = true
[square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[]
[block]
type = ParsedSubdomainMeshGenerator
input = square
block_id = 1
combinatorial_geometry = 'x > 0.5'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[AuxVariables]
[nodal]
[InitialCondition]
type = FunctionIC
function = '1 + x*x + y*y*y'
[]
[]
[fe_higher_order]
order = SECOND
[InitialCondition]
type = FunctionIC
function = '1 + x*x + y*y*y'
[]
[]
[fe_elemental]
family = MONOMIAL
order = SECOND
[InitialCondition]
type = FunctionIC
function = '1 + x*x + y*y*y'
[]
[]
[fv_var]
type = MooseVariableFVReal
[FVInitialCondition]
type = FVFunctionIC
function = '1 + x*x + y*y*y'
[]
[]
[]
[Functions]
[f]
type = ParsedFunction
expression = '1 + x*x + y*y*y'
[]
[]
[Materials]
[two_piece]
type = ADPiecewiseByBlockFunctorMaterial
prop_name = 'mat'
subdomain_to_prop_value = '0 nodal 1 fv_var'
[]
[]
[Postprocessors]
[fe]
type = ADElementIntegralFunctorPostprocessor
functor = nodal
[]
[fe_higher_order]
type = ADElementIntegralFunctorPostprocessor
functor = fe_higher_order
[]
[fe_elemental]
type = ADElementIntegralFunctorPostprocessor
functor = fe_elemental
[]
[fv]
type = ADElementIntegralFunctorPostprocessor
functor = fv_var
[]
[function]
type = ElementIntegralFunctorPostprocessor
functor = f
prefactor = f
[]
[functor_matprop]
type = ADElementIntegralFunctorPostprocessor
functor = mat
[]
[]
[Outputs]
file_base = out
exodus = false
csv = true
[]
(modules/thermal_hydraulics/test/tests/postprocessors/side_flux_integral_rz/side_flux_integral_rz.i)
# Tests the SideFluxIntegralRZ post-processor, both for an axial boundary and
# a radial boundary.
#
# The temperature distribution and thermal conductivity are set as follows:
# T(x,r) = xr
# k = 5
#
# First, the following axial boundary is tested:
# (x,r) in x0 X (r0, r1),
# x0 = 3, r0 = 1.5, r1 = 2.2
# with n = +e_x (positive x-direction).
# In this case, the integral of [-k grad(T) * n] is
# Q = -2/3 pi k (r1^3 - r0^3)
# = -76.16267789852857
#
# Next, the following radial boundary is tested:
# (x,r) in (x0,x1) X r0
# x0 = 0, x1 = 5, r0 = 1.5
# with n = -e_r (negative r-direction).
# In this case, the integral of [-k grad(T) * n] is
# Q = pi * r0 * k (x1^2 - x0^2)
# = 589.0486225480862
R_i = 1.0
[Functions]
[T_fn]
type = ParsedFunction
expression = 'x * y'
[]
[]
[SolidProperties]
[hsmat]
type = ThermalFunctionSolidProperties
k = 5
cp = 1
rho = 1
[]
[]
[Components]
[heat_structure]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = '3 2'
n_elems = '5 4'
axial_region_names = 'axial1 axial2'
inner_radius = ${R_i}
names = 'radial1 radial2'
solid_properties = 'hsmat hsmat'
solid_properties_T_ref = '300 300'
widths = '0.5 0.7'
n_part_elems = '2 3'
initial_T = T_fn
[]
[]
[Postprocessors]
[Q_axial]
type = ADSideFluxIntegralRZ
boundary = heat_structure:radial2:axial1:axial2
variable = T_solid
diffusivity = thermal_conductivity
axis_point = '0 0 0'
axis_dir = '1 0 0'
execute_on = 'INITIAL'
[]
[Q_radial]
type = ADSideFluxIntegralRZ
boundary = heat_structure:radial1:radial2
variable = T_solid
diffusivity = thermal_conductivity
axis_point = '0 0 0'
axis_dir = '1 0 0'
execute_on = 'INITIAL'
[]
[]
[Problem]
solve = false
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
csv = true
execute_on = 'INITIAL'
[]
(modules/heat_transfer/test/tests/code_verification/cylindrical_test_no2.i)
# Problem II.2
#
# The thermal conductivity of an infinitely long hollow tube varies
# linearly with temperature. It is exposed on the inner
# and outer surfaces to constant temperatures.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
xmin = 0.2
nx = 4
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Problem]
coord_type = RZ
[]
[Functions]
[./exact]
type = ParsedFunction
symbol_names = 'ri ro beta ki ko ui uo'
symbol_values = '0.2 1.0 1e-3 5.3 5 300 0'
expression = 'uo+(ko/beta)* ( ( 1 + beta*(ki+ko)*(ui-uo)*( log(x/ro) / log(ri/ro) )/(ko^2))^0.5 -1 )'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[]
[BCs]
[./ui]
type = DirichletBC
boundary = left
variable = u
value = 300
[../]
[./uo]
type = DirichletBC
boundary = right
variable = u
value = 0
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat'
prop_values = '1.0 1.0'
[../]
[./thermal_conductivity]
type = ParsedMaterial
property_name = 'thermal_conductivity'
coupled_variables = u
expression = '5 + 1e-3 * (u-0)'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
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/combined/test/tests/optimization/compliance_sensitivity/orderedSimp3MatTest.i)
power = 4
E0 = 1.0e-6
E1 = 0.2
E2 = 0.6
E3 = 1.0
rho0 = 1.0e-6
rho1 = 0.4
rho2 = 0.7
rho3 = 1.0
C0 = 1.0e-6
C1 = 0.5
C2 = 0.8
C3 = 1.0
[Problem]
solve = false
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 1
ny = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
[]
[]
[AuxVariables]
[mat_den]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[mat_den]
type = FunctionAux
variable = mat_den
function = mat_den_fn
[]
[]
[Functions]
[mat_den_fn]
type = ParsedFunction
expression = .01*t
[]
[]
[Materials]
[E_phys]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${E0}-${E1})/(${rho0}^${power}-${rho1}^${power}); "
"B1:=${E0}-A1*${rho0}^${power}; E1:=A1*mat_den^${power}+B1; "
"A2:=(${E1}-${E2})/(${rho1}^${power}-${rho2}^${power}); "
"B2:=${E1}-A2*${rho1}^${power}; E2:=A2*mat_den^${power}+B2; "
"A3:=(${E2}-${E3})/(${rho2}^${power}-${rho3}^${power}); "
"B3:=${E2}-A3*${rho2}^${power}; E3:=A3*mat_den^${power}+B3; "
"if(mat_den<${rho1},E1,if(mat_den<${rho2},E2,E3))"
coupled_variables = 'mat_den'
property_name = E_phys
[]
[Cost_mat]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${C0}-${C1})/(${rho0}^(1/${power})-${rho1}^(1/${power})); "
"B1:=${C0}-A1*${rho0}^(1/${power}); C1:=A1*mat_den^(1/${power})+B1; "
"A2:=(${C1}-${C2})/(${rho1}^(1/${power})-${rho2}^(1/${power})); "
"B2:=${C1}-A2*${rho1}^(1/${power}); C2:=A2*mat_den^(1/${power})+B2; "
"A3:=(${C2}-${C3})/(${rho2}^(1/${power})-${rho3}^(1/${power})); "
"B3:=${C2}-A3*${rho2}^(1/${power}); C3:=A3*mat_den^(1/${power})+B3; "
"if(mat_den<${rho1},C1,if(mat_den<${rho2},C2,C3))"
coupled_variables = 'mat_den'
property_name = Cost_mat
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-8
dt = 1.0
num_steps = 100
[]
[Outputs]
csv = true
print_linear_residuals = false
[]
[Postprocessors]
[mat_den]
type = PointValue
point = '0.5 0.5 0'
variable = mat_den
[]
[E_phys]
type = ElementExtremeMaterialProperty
mat_prop = E_phys
value_type = max
[]
[Cost_mat]
type = ElementExtremeMaterialProperty
mat_prop = Cost_mat
value_type = max
[]
[]
(test/tests/controls/dependency/test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./a]
family = SCALAR
order = FIRST
[../]
[]
[AuxScalarKernels]
[./a_sk]
type = ConstantScalarAux
variable = a
value = 0
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
[]
[Functions]
[./func_coef]
type = ParsedFunction
expression = 1
[../]
[]
[Controls]
# We start with a = 0, control2 sets its value to 1 and then control1 will multiply it by 3,
# so the end value has to be 3. If dependecy is broken, we multiply by 3 and then set to 1,
# which is wrong
[./control1]
type = TestControl
parameter = 'AuxScalarKernels/a_sk/value'
test_type = MULT
execute_on = 'initial timestep_begin'
depends_on = control2
[../]
[./control2]
type = RealFunctionControl
parameter = 'AuxScalarKernels/a_sk/value'
function = 'func_coef'
execute_on = 'initial timestep_begin'
[../]
[]
(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
[]
(modules/solid_mechanics/test/tests/umat/steps/elastic_temperature_steps.i)
# Testing the UMAT Interface - linear elastic model using the large strain formulation.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[]
[Functions]
[top_pull_step2]
type = ParsedFunction
expression = (t-5.0)/20
[]
# Forced evolution of temperature
[temperature_load]
type = ParsedFunction
expression = '273'
[]
[]
[AuxVariables]
[temperature]
[]
[]
[AuxKernels]
[temperature_function]
type = FunctionAux
variable = temperature
function = temperature_load
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
generate_output = 'stress_yy'
[]
[]
[BCs]
[y_step1]
type = DirichletBC
variable = disp_y
boundary = top
value = 0.0
[]
[y_pull_function_step2]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = top_pull_step2
[]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[z_bot]
type = DirichletBC
variable = disp_z
boundary = front
value = 0.0
[]
[]
[Controls]
[step1]
type = TimePeriod
enable_objects = 'BCs::y_step1'
disable_objects = 'BCs::y_pull_function_step2'
start_time = '0'
end_time = '5'
[]
[step2]
type = TimePeriod
enable_objects = 'BCs::y_pull_function_step2'
disable_objects = 'BCs::y_step1'
start_time = '5'
end_time = '10'
[]
[]
[Materials]
# This input file is used to compare the MOOSE and UMAT models, activating
# specific ones with cli variable_names.
# 1. Active for umat calculation
[umat]
type = AbaqusUMATStress
constant_properties = '1000 0.3'
plugin = '../../../plugins/elastic_temperature'
num_state_vars = 0
temperature = temperature
use_one_based_indexing = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
num_steps = 10
dt = 1.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/1d-rc-epsjump.i)
mu = 1.1
rho = 1.1
advected_interp_method = 'upwind'
velocity_interp_method = 'rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 1
dx = '1 1'
ix = '30 30'
subdomain_id = '1 2'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
pressure = pressure
porosity = porosity
[]
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[]
[ICs]
inactive = 'porosity_continuous'
[porosity_1]
type = ConstantIC
variable = porosity
block = 1
value = 1
[]
[porosity_2]
type = ConstantIC
variable = porosity
block = 2
value = 0.5
[]
[porosity_continuous]
type = FunctionIC
variable = porosity
block = '1 2'
function = smooth_jump
[]
[]
[Functions]
[smooth_jump]
type = ParsedFunction
expression = '1 - 0.5 * 1 / (1 + exp(-30*(x-1)))'
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = u
mu = ${mu}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = u
pressure = pressure
porosity = porosity
momentum_component = 'x'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = '1'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
[]
[Postprocessors]
[inlet_p]
type = SideAverageValue
variable = 'pressure'
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 'right'
[]
[]
[Outputs]
exodus = true
csv = false
[]
(test/tests/transfers/multiapp_conservative_transfer/sub_power_density.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.01 # to make sure the meshes don't align
xmax = 0.49 # to make sure the meshes don't align
ymax = 1
nx = 10
ny = 10
[]
[block1]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0.2 0.2 0'
top_right = '0.3 0.8 0'
[]
[]
[Variables]
[sink]
family = MONOMIAL
order = CONSTANT
[]
[]
[Functions]
[sink_func]
type = ParsedFunction
expression = '5e2*x*(0.5-x)+5e1'
[]
[]
[Kernels]
[reaction]
type = Reaction
variable = sink
[]
[coupledforce]
type = BodyForce
variable = sink
function = sink_func
[]
[]
[AuxVariables]
[from_parent]
block = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[sink]
type = ElementIntegralVariablePostprocessor
block = 1
variable = sink
[]
[from_parent_pp]
type = ElementIntegralVariablePostprocessor
block = 1
variable = from_parent
execute_on = 'transfer'
[]
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/code_verification/spherical_test_no2.i)
# Problem III.2
#
# A spherical shell has a thermal conductivity that varies linearly
# with temperature. The inside and outside surfaces of the shell are
# exposed to constant temperatures.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
xmin = 0.2
nx = 4
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Problem]
coord_type = RSPHERICAL
[]
[Functions]
[./exact]
type = ParsedFunction
symbol_names = 'ri ro beta ki ko ui uo'
symbol_values = '0.2 1.0 1e-3 5.3 5 300 0'
expression = 'uo+(ko/beta)* ( ( 1 + beta*(ki+ko)*(ui-uo)*( (1/x-1/ro) / (1/ri-1/ro) )/(ko^2))^0.5 -1 )'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[]
[BCs]
[./ui]
type = DirichletBC
boundary = left
variable = u
value = 300
[../]
[./uo]
type = DirichletBC
boundary = right
variable = u
value = 0
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat'
prop_values = '1.0 1.0'
[../]
[./thermal_conductivity]
type = ParsedMaterial
property_name = 'thermal_conductivity'
coupled_variables = u
expression = '5 + 1e-3 * (u-0)'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/plane_stress/ad_weak_plane_stress_incremental.i)
[GlobalParams]
displacements = 'disp_x disp_y'
temperature = temp
out_of_plane_strain = strain_zz
[]
[Mesh]
[./square]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./strain_zz]
[../]
[]
[AuxVariables]
[./temp]
[../]
[./nl_strain_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Postprocessors]
[./react_z]
type = ADMaterialTensorIntegral
rank_two_tensor = stress
index_i = 2
index_j = 2
[../]
[./min_strain_zz]
type = NodalExtremeValue
variable = strain_zz
value_type = min
[../]
[./max_strain_zz]
type = NodalExtremeValue
variable = strain_zz
value_type = max
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./plane_stress]
planar_formulation = WEAK_PLANE_STRESS
strain = SMALL
incremental = true
generate_output = 'stress_xx stress_xy stress_yy stress_zz strain_xx strain_xy strain_yy'
eigenstrain_names = eigenstrain
use_automatic_differentiation = true
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
use_displaced_mesh = false
[../]
[./strain_zz]
type = ADRankTwoAux
rank_two_tensor = total_strain
variable = nl_strain_zz
index_i = 2
index_j = 2
[../]
[]
[Functions]
[./pull]
type = PiecewiseLinear
x='0 1 100'
y='0 0.00 0.00'
[../]
[./tempfunc]
type = ParsedFunction
expression = '(1 - x) * t'
[../]
[]
[BCs]
[./bottomx]
type = DirichletBC
boundary = 0
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = DirichletBC
boundary = 0
variable = disp_y
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
poissons_ratio = 0.3
youngs_modulus = 1e6
[../]
[./thermal_strain]
type = ADComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
eigenstrain_name = eigenstrain
[../]
[./stress]
type = ADComputeStrainIncrementBasedStress
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-12
# time control
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 2.0
[]
[Outputs]
file_base = 'weak_plane_stress_incremental_out'
exodus = true
[]
(modules/solid_mechanics/test/tests/critical_time_step/crit_time_solid_variable.i)
[GlobalParams]
displacements = 'disp_x'
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 50
xmin = 0
xmax = 5
[]
[Variables]
[./disp_x]
[../]
[]
[Kernels]
[SolidMechanics]
[../]
[]
[BCs]
[./2_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[]
[Functions]
[./prefac]
type = ParsedFunction
expression = '1+2*x'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
poissons_ratio = 0.1
youngs_modulus = 1e6
elasticity_tensor_prefactor = prefac
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./density]
type = GenericConstantMaterial
prop_names = 'density'
prop_values = '8050.0'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
nl_abs_tol = 1e-4
l_max_its = 3
start_time = 0.0
dt = 0.1
num_steps = 1
end_time = 1.0
[]
[Postprocessors]
[./time_step]
type = CriticalTimeStep
[../]
[]
[Outputs]
csv = true
[]
(modules/optimization/examples/simpleTransient/forward_and_adjoint.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin = -1
xmax = 1
ymin = -1
ymax = 1
[]
[]
[Variables]
[u]
[]
[]
[VectorPostprocessors]
[src_values]
type = CSVReader
csv_file = source_params.csv
header = true
outputs = none
[]
[]
[ICs]
[initial]
type = FunctionIC
variable = u
function = exact
[]
[]
[Kernels]
[dt]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[src]
type = BodyForce
variable = u
function = source
[]
[]
[BCs]
[dirichlet]
type = DirichletBC
variable = u
boundary = 'left right top bottom'
value = 0
[]
[]
[Functions]
[exact]
type = ParsedFunction
value = '2*exp(-2.0*(x - sin(2*pi*t))^2)*exp(-2.0*(y - cos(2*pi*t))^2)*cos((1/2)*x*pi)*cos((1/2)*y*pi)/pi'
[]
[source]
type = NearestReporterCoordinatesFunction
x_coord_name = src_values/coordx
y_coord_name = src_values/coordy
time_name = src_values/time
value_name = src_values/values
[]
[]
[Executioner]
type = TransientAndAdjoint
forward_system = nl0
adjoint_system = adjoint
num_steps = 100
end_time = 1
nl_rel_tol = 1e-12
l_tol = 1e-12
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Reporters]
[measured_data]
type = OptimizationData
measurement_file = mms_data.csv
file_xcoord = x
file_ycoord = y
file_zcoord = z
file_time = t
file_value = u
variable = u
execute_on = timestep_end
outputs = none
[]
[]
[Postprocessors]
[topRight_pp]
type = PointValue
point = '0.5 0.5 0'
variable = u
execute_on = TIMESTEP_END
[]
[bottomRight_pp]
type = PointValue
point = '-0.5 0.5 0'
variable = u
execute_on = TIMESTEP_END
[]
[bottomLeft_pp]
type = PointValue
point = '-0.5 -0.5 0'
variable = u
execute_on = TIMESTEP_END
[]
[topLeft_pp]
type = PointValue
point = '0.5 -0.5 0'
variable = u
execute_on = TIMESTEP_END
[]
[]
[Outputs]
csv = true
console = false
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
kernel_coverage_check = false
[]
[Variables]
[u_adjoint]
solver_sys = adjoint
outputs = none
[]
[]
[DiracKernels]
[misfit]
type = ReporterTimePointSource
variable = u_adjoint
value_name = measured_data/misfit_values
x_coord_name = measured_data/measurement_xcoord
y_coord_name = measured_data/measurement_ycoord
z_coord_name = measured_data/measurement_zcoord
time_name = measured_data/measurement_time
[]
[]
[VectorPostprocessors]
[adjoint]
type = ElementOptimizationSourceFunctionInnerProduct
variable = u_adjoint
function = source
execute_on = ADJOINT_TIMESTEP_END
outputs = none
[]
[]
(modules/solid_mechanics/test/tests/ad_thermal_expansion_function/mean.i)
# This test checks the thermal expansion calculated via a mean thermal expansion coefficient.
# The coefficient is selected so as to result in a 1e-4 strain in the x-axis, and to cross over
# from positive to negative strain.
[Mesh]
[./gen]
type = GeneratedMeshGenerator
dim = 3
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./temp]
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = SMALL
add_variables = true
eigenstrain_names = eigenstrain
generate_output = 'strain_xx strain_yy strain_zz'
use_automatic_differentiation = true
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./bottom]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./back]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[]
[AuxKernels]
[./temp]
type = FunctionAux
variable = temp
function = '1 + t'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1
poissons_ratio = 0.3
[../]
[./stress]
type = ADComputeLinearElasticStress
[../]
[./thermal_expansion_strain]
type = ADComputeMeanThermalExpansionFunctionEigenstrain
thermal_expansion_function = cte_func_mean
thermal_expansion_function_reference_temperature = 1.2
stress_free_temperature = 1.5
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Functions]
[./cte_func_mean]
type = ParsedFunction
symbol_names = 'T T_stress_free T_ref end_strain'
symbol_values = '2 1.5 1.2 1e-4'
expression = 'end_strain / (T - T_stress_free - end_strain * (T_stress_free - T_ref))'
[../]
[]
[Postprocessors]
[./disp_x_max]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./temp_avg]
type = ElementAverageValue
variable = temp
[../]
[]
[Executioner]
type = Transient
end_time = 1.0
dt = 0.1
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/controls/switch-pressure-bc/test.i)
rho = 1
mu = 1
l = 1
velocity_interp_method = 'rc'
advected_interp_method = 'upwind'
outlet_pressure = 1e5
inlet_v = 1
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${l}
ymin = 0
ymax = 1
nx = 4
ny = 2
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = vel_x
v = vel_y
pressure = pressure
[]
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
initial_condition = ${inlet_v}
[]
[vel_y]
type = INSFVVelocityVariable
[]
[pressure]
type = INSFVPressureVariable
initial_condition = ${outlet_pressure}
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = INSFVMomentumAdvection
variable = vel_x
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = vel_x
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = vel_x
momentum_component = 'x'
pressure = pressure
[]
[v_advection]
type = INSFVMomentumAdvection
variable = vel_y
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = vel_y
momentum_component = 'y'
mu = ${mu}
[]
[v_pressure]
type = INSFVMomentumPressure
variable = vel_y
momentum_component = 'y'
pressure = pressure
[]
[]
[FVBCs]
[free_slip_x]
type = INSFVNaturalFreeSlipBC
variable = vel_x
boundary = 'top bottom'
momentum_component = 'x'
[]
[free_slip_y]
type = INSFVNaturalFreeSlipBC
variable = vel_y
boundary = 'top bottom'
momentum_component = 'y'
[]
# Inlet
[inlet_u]
type = INSFVInletVelocityBC
variable = vel_x
boundary = 'left'
function = ${inlet_v}
[]
[inlet_u_later]
type = INSFVInletVelocityBC
variable = vel_x
boundary = 'right'
function = ${fparse -1 * inlet_v}
enable = false
[]
[inlet_v]
type = INSFVInletVelocityBC
variable = vel_y
boundary = 'left'
function = 0
[]
[inlet_v_later]
type = INSFVInletVelocityBC
variable = vel_y
boundary = 'right'
function = 0
enable = false
[]
[outlet_p]
type = INSFVOutletPressureBC
variable = pressure
boundary = 'right'
function = ${outlet_pressure}
[]
[outlet_p_later]
type = INSFVOutletPressureBC
variable = pressure
boundary = 'left'
function = ${fparse 2 * outlet_pressure}
enable = false
[]
[]
[Functions]
[conditional_function]
type = ParsedFunction
expression = 't > 1.5'
[]
[]
[Controls]
[p_threshold]
type = ConditionalFunctionEnableControl
conditional_function = conditional_function
disable_objects = 'FVBCs::outlet_p FVBCs::inlet_u FVBCs::inlet_v'
enable_objects = 'FVBCs::outlet_p_later FVBCs::inlet_u_later FVBCs::inlet_v_later'
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[FunctorMaterials]
[const_functor]
type = ADGenericFunctorMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[]
[Postprocessors]
[pressure_right]
type = SideAverageValue
variable = pressure
boundary = right
[]
[pressure_left]
type = SideAverageValue
variable = pressure
boundary = right
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
end_time = 3
line_search = 'bt'
nl_abs_tol = 1e-8
abort_on_solve_fail = true
[]
[Outputs]
csv = true
[]
(modules/phase_field/test/tests/misc/coupled_value_function_ic.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[]
# Here we sum up the inverses of the ICs above. This should add up to 2.0 everywhere
[Functions]
[map]
type = ParsedFunction
expression = 'x^2+y^3+log(z)+acos(t)'
[]
[]
[Variables]
[out]
[InitialCondition]
type = CoupledValueFunctionIC
function = map
v = 'v1 v2 a3 a4'
[]
[]
[v1]
[InitialCondition]
type = FunctionIC
function = x^(1/2)
[]
[]
[v2]
[InitialCondition]
type = FunctionIC
function = y^(1/3)
[]
[]
[]
[AuxVariables]
[a3]
[InitialCondition]
type = FunctionIC
function = exp(1-x)
[]
[]
[a4]
[InitialCondition]
type = FunctionIC
function = cos(1-y)
[]
[]
[]
[Postprocessors]
[out_min]
type = ElementExtremeValue
variable = out
value_type = min
[]
[out_max]
type = ElementExtremeValue
variable = out
value_type = max
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
execute_on = 'FINAL'
csv = true
[]
(modules/porous_flow/examples/tidal/earth_tide_fullsat.i)
# A confined aquifer is fully saturated with water
# Earth tides apply strain to the aquifer and the resulting porepressure changes are recorded
#
# To replicate standard poroelasticity exactly:
# (1) the PorousFlowBasicTHM Action is used;
# (2) multiply_by_density = false;
# (3) PorousFlowConstantBiotModulus is used
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
biot_coefficient = 0.6
multiply_by_density = false
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[]
[BCs]
[strain_x]
type = FunctionDirichletBC
variable = disp_x
function = earth_tide_x
boundary = 'left right'
[]
[strain_y]
type = FunctionDirichletBC
variable = disp_y
function = earth_tide_y
boundary = 'bottom top'
[]
[strain_z]
type = FunctionDirichletBC
variable = disp_z
function = earth_tide_z
boundary = 'back front'
[]
[]
[Functions]
[earth_tide_x]
type = ParsedFunction
expression = 'x*1E-8*(5*cos(t*2*pi) + 2*cos((t-0.5)*2*pi) + 1*cos((t+0.3)*0.5*pi))'
[]
[earth_tide_y]
type = ParsedFunction
expression = 'y*1E-8*(7*cos(t*2*pi) + 4*cos((t-0.3)*2*pi) + 7*cos((t+0.6)*0.5*pi))'
[]
[earth_tide_z]
type = ParsedFunction
expression = 'z*1E-8*(7*cos((t-0.5)*2*pi) + 4*cos((t-0.8)*2*pi) + 7*cos((t+0.1)*4*pi))'
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
[]
[]
[PorousFlowBasicTHM]
coupling_type = HydroMechanical
displacements = 'disp_x disp_y disp_z'
porepressure = porepressure
gravity = '0 0 0'
fp = the_simple_fluid
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
bulk_modulus = 10.0E9 # drained bulk modulus
poissons_ratio = 0.25
[]
[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
solid_bulk_compliance = 1E-10
fluid_bulk_modulus = 2E9
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[]
[Postprocessors]
[pp]
type = PointValue
point = '0.5 0.5 0.5'
variable = porepressure
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.01
end_time = 2
[]
[Outputs]
console = true
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/mms/rc.i)
mu=1.1
rho=1.1
[GlobalParams]
two_term_boundary_expansion = false
rhie_chow_user_object = 'rc'
velocity_interp_method = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
[]
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
[]
[]
[Problem]
fv_bcs_integrity_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 1
[]
[v]
type = INSFVVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = 'average'
rho = ${rho}
[]
[mass_forcing]
type = FVBodyForce
variable = pressure
function = forcing_p
[]
[mean_zero_pressure]
type = FVIntegralValueConstraint
variable = pressure
lambda = lambda
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
advected_interp_method = 'average'
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[u_forcing]
type = INSFVBodyForce
variable = u
functor = forcing_u
momentum_component = 'x'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
advected_interp_method = 'average'
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[v_forcing]
type = INSFVBodyForce
variable = v
functor = forcing_v
momentum_component = 'y'
[]
[]
[FVBCs]
[no-slip-wall-u]
type = INSFVNoSlipWallBC
boundary = 'left right top bottom'
variable = u
function = 'exact_u'
[]
[no-slip-wall-v]
type = INSFVNoSlipWallBC
boundary = 'left right top bottom'
variable = v
function = 'exact_v'
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'sin(y)*cos((1/2)*x*pi)'
[]
[exact_rhou]
type = ParsedFunction
expression = 'rho*sin(y)*cos((1/2)*x*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[forcing_u]
type = ParsedFunction
expression = 'mu*sin(y)*cos((1/2)*x*pi) + (1/4)*pi^2*mu*sin(y)*cos((1/2)*x*pi) - 1/2*pi*rho*sin(x)*sin(y)*sin((1/2)*y*pi)*cos((1/2)*x*pi) + rho*sin(x)*cos(y)*cos((1/2)*x*pi)*cos((1/2)*y*pi) - pi*rho*sin(y)^2*sin((1/2)*x*pi)*cos((1/2)*x*pi) + sin(y)*cos(x)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_v]
type = ParsedFunction
expression = 'sin(x)*cos((1/2)*y*pi)'
[]
[exact_rhov]
type = ParsedFunction
expression = 'rho*sin(x)*cos((1/2)*y*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[forcing_v]
type = ParsedFunction
expression = 'mu*sin(x)*cos((1/2)*y*pi) + (1/4)*pi^2*mu*sin(x)*cos((1/2)*y*pi) - pi*rho*sin(x)^2*sin((1/2)*y*pi)*cos((1/2)*y*pi) - 1/2*pi*rho*sin(x)*sin(y)*sin((1/2)*x*pi)*cos((1/2)*y*pi) + rho*sin(y)*cos(x)*cos((1/2)*x*pi)*cos((1/2)*y*pi) + sin(x)*cos(y)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'sin(x)*sin(y)'
[]
[forcing_p]
type = ParsedFunction
expression = '-1/2*pi*rho*sin(x)*sin((1/2)*y*pi) - 1/2*pi*rho*sin(y)*sin((1/2)*x*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
[]
[Outputs]
csv = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[./L2u]
type = ElementL2FunctorError
approximate = u
exact = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[./L2v]
approximate = v
exact = exact_v
type = ElementL2FunctorError
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[./L2p]
approximate = pressure
exact = exact_p
type = ElementL2FunctorError
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[]
(modules/heat_transfer/test/tests/heat_source_bar/heat_source_bar.i)
# This is a simple 1D test of the volumetric heat source with material properties
# of a representative ceramic material. A bar is uniformly heated, and a temperature
# boundary condition is applied to the left side of the bar.
# Important properties of problem:
# Length: 0.01 m
# Thermal conductivity = 3.0 W/(mK)
# Specific heat = 300.0 J/K
# density = 10431.0 kg/m^3
# Prescribed temperature on left side: 600 K
# When it has reached steady state, the temperature as a function of position is:
# T = -q/(2*k) (x^2 - 2*x*length) + 600
# or
# T = -6.3333e+7 * (x^2 - 0.02*x) + 600
# on left side: T=600, on right side, T=6933.3
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 0.01
nx = 20
[]
[Variables]
[./temp]
initial_condition = 300.0
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[./heatsource]
type = HeatSource
function = volumetric_heat
variable = temp
[../]
[]
[BCs]
[./lefttemp]
type = DirichletBC
boundary = left
variable = temp
value = 600
[../]
[]
[Materials]
[./density]
type = GenericConstantMaterial
prop_names = 'density thermal_conductivity'
prop_values = '10431.0 3.0'
[../]
[]
[Functions]
[./volumetric_heat]
type = ParsedFunction
expression = 3.8e+8
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./right]
type = SideAverageValue
variable = temp
boundary = right
[../]
[./error]
type = NodalL2Error
function = '-3.8e+8/(2*3) * (x^2 - 2*x*0.01) + 600'
variable = temp
[../]
[]
[Outputs]
execute_on = FINAL
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/fviks/convection/convection_cavity.i)
mu = 1
rho = 1
k = .01
cp = 1
velocity_interp_method = 'rc'
advected_interp_method = 'average'
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1 0.5'
dy = '1'
ix = '8 5'
iy = '8'
subdomain_id = '0 1'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'cmg'
primary_block = 0
paired_block = 1
new_boundary = 'interface'
[]
[secondary_interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'interface'
primary_block = 1
paired_block = 0
new_boundary = 'secondary_interface'
[]
[]
[GlobalParams]
# retain behavior at time of test creation
two_term_boundary_expansion = false
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
block = 0
pressure = pressure
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
block = 0
[]
[v]
type = INSFVVelocityVariable
block = 0
[]
[pressure]
type = INSFVPressureVariable
block = 0
[]
[T]
type = INSFVEnergyVariable
block = 0
[]
[Ts]
type = INSFVEnergyVariable
block = 1
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[ICs]
[T]
type = ConstantIC
variable = T
value = 1
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
block = 0
[]
[mean_zero_pressure]
type = FVIntegralValueConstraint
variable = pressure
lambda = lambda
block = 0
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
rho = ${rho}
block = 0
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
block = 0
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
block = 0
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
rho = ${rho}
block = 0
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
block = 0
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
block = 0
[]
[temp_conduction]
type = FVDiffusion
coeff = 'k'
variable = T
block = 0
[]
[temp_advection]
type = INSFVEnergyAdvection
variable = T
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
block = 0
[]
[solid_temp_conduction]
type = FVDiffusion
coeff = 'k'
variable = Ts
block = 1
[]
[]
[FVInterfaceKernels]
[convection]
type = FVConvectionCorrelationInterface
variable1 = T
variable2 = Ts
boundary = 'interface'
h = 5
T_solid = Ts
T_fluid = T
subdomain1 = 0
subdomain2 = 1
bulk_distance = 0.3
[]
[]
[FVBCs]
[top_x]
type = INSFVNoSlipWallBC
variable = u
boundary = 'top'
function = 'lid_function'
[]
[no_slip_x]
type = INSFVNoSlipWallBC
variable = u
boundary = 'left interface bottom'
function = 0
[]
[no_slip_y]
type = INSFVNoSlipWallBC
variable = v
boundary = 'left interface top bottom'
function = 0
[]
[T_hot]
type = FVDirichletBC
variable = T
boundary = 'bottom'
value = 1
[]
[T_cold]
type = FVDirichletBC
variable = Ts
boundary = 'right'
value = 0
[]
[]
[FunctorMaterials]
[functor_constants]
type = ADGenericFunctorMaterial
prop_names = 'cp k'
prop_values = '${cp} ${k}'
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = 'T'
rho = ${rho}
block = 0
[]
[]
[Functions]
[lid_function]
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -ksp_gmres_restart'
petsc_options_value = 'asm lu NONZERO 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
l_max_its = 200
[]
[Outputs]
exodus = true
[]
(test/tests/linearfvkernels/diffusion/diffusion-2d.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 1
ymax = 0.5
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = coeff_func
use_nonorthogonal_correction = false
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "left right top bottom"
functor = analytic_solution
[]
[]
[Functions]
[coeff_func]
type = ParsedFunction
expression = '1+0.5*x*y'
[]
[source_func]
type = ParsedFunction
expression = '2*(1.5-y*y)+2*x*y*(1.5-y*y)+2*(1.5-x*x)+2*x*y*(1.5-x*x)'
[]
[analytic_solution]
type = ParsedFunction
expression = '(1.5-x*x)*(1.5-y*y)'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = FINAL
[]
[error]
type = ElementL2FunctorError
approximate = u
exact = analytic_solution
execute_on = FINAL
[]
[]
[Executioner]
type = LinearPicardSteady
linear_systems_to_solve = u_sys
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
[csv]
type = CSV
execute_on = FINAL
[]
[]
(test/tests/kernels/vector_fe/coupled_vector_gradient.i)
# This example demonstrates ability to set Dirichlet boundary conditions for LAGRANGE_VEC variables
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
family = LAGRANGE_VEC
order = FIRST
[../]
[./v]
family = LAGRANGE_VEC
order = FIRST
[../]
[./w]
family = LAGRANGE_VEC
order = FIRST
[../]
[./s]
family = LAGRANGE_VEC
order = FIRST
[../]
[./q]
[../]
[]
[Kernels]
[./u_diff]
type = VectorDiffusion
variable = u
[../]
[./v_diff]
type = VectorDiffusion
variable = v
[../]
[./w_diff]
type = VectorDiffusion
variable = w
[../]
[./s_diff]
type = VectorDiffusion
variable = s
[../]
[./v_coupled_diff]
type = CoupledVectorDiffusion
variable = v
v = u
[../]
[./w_coupled_diff]
type = CoupledVectorDiffusion
variable = w
v = u
state = old
[../]
[./s_coupled_diff]
type = CoupledVectorDiffusion
variable = s
v = u
state = older
[../]
[./q_diff]
type = Diffusion
variable = q
[../]
[]
[BCs]
[./left_u]
type = VectorDirichletBC
variable = u
values = '0 0 0'
boundary = 'left'
[../]
[./left_v]
type = VectorDirichletBC
variable = v
values = '0 0 0'
boundary = 'left'
[../]
[./left_w]
type = VectorDirichletBC
variable = w
values = '0 0 0'
boundary = 'left'
[../]
[./left_s]
type = VectorDirichletBC
variable = s
values = '0 0 0'
boundary = 'left'
[../]
[./right_u]
type = VectorFunctionDirichletBC
variable = u
boundary = 'right'
function_x = 'x_exact'
function_y = 'y_exact'
[../]
[./right_v]
type = VectorFunctionDirichletBC
variable = v
boundary = 'right'
function_x = 'x_exact'
function_y = 'y_exact'
[../]
[./right_w]
type = VectorFunctionDirichletBC
variable = w
boundary = 'right'
function_x = 'x_exact_old'
function_y = 'y_exact_old'
[../]
[./right_s]
type = VectorFunctionDirichletBC
variable = s
boundary = 'right'
function_x = 'x_exact_older'
function_y = 'y_exact_older'
[../]
[./left_q]
type = DirichletBC
variable = q
boundary = 'left'
value = 1
[../]
[./right_q]
type = NeumannBC
variable = q
boundary = 'right'
value = 1
[../]
[]
[Functions]
[./x_exact]
type = ParsedFunction
expression = 't'
[../]
[./y_exact]
type = ParsedFunction
expression = 't'
[../]
[./x_exact_old]
type = ParsedFunction
expression = 'if(t < 1, 0, t - 1)'
[../]
[./y_exact_old]
type = ParsedFunction
expression = 'if(t < 1, 0, t - 1)'
[../]
[./x_exact_older]
type = ParsedFunction
expression = 'if(t < 2, 0, t - 2)'
[../]
[./y_exact_older]
type = ParsedFunction
expression = 'if(t < 2, 0, t - 2)'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 3
solve_type = 'NEWTON'
petsc_options = '-ksp_converged_reason -snes_converged_reason'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '100'
nl_max_its = 3
l_max_its = 100
dtmin = 1
[]
[Outputs]
exodus = true
[]
(modules/richards/test/tests/theis/th_lumped_02.i)
# fully-saturated
# production
# lumped
[Mesh]
type = FileMesh
file = th02_input.e
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = DensityConstBulk
relperm_UO = RelPermPower
sat_UO = Saturation
seff_UO = Seff1VG
SUPG_UO = SUPGstandard
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1 2 4 20'
x = '0 1 10 100'
[../]
[]
[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-5
[../]
[./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 = RichardsLumpedMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
variable = pressure
[../]
[]
[DiracKernels]
[./bh]
type = RichardsPolyLineSink
pressures = '-1E9 1E9'
fluxes = '200 200'
point_file = th01.points
SumQuantityUO = total_outflow_mass
variable = pressure
[../]
[]
[Postprocessors]
[./flow_report]
type = RichardsPlotQuantity
uo = total_outflow_mass
[../]
[./p50]
type = PointValue
variable = pressure
point = '50 0 0'
execute_on = 'initial timestep_end'
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 1E5
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = 1
viscosity = 1E-3
mat_porosity = 0.1
mat_permeability = '1E-10 0 0 0 1E-10 0 0 0 1E-10'
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-6 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 100
solve_type = NEWTON
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = th_lumped_02
csv = true
[]
(test/tests/userobjects/layered_side_integral_functor/layered_side_integral_functor.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 40
ny = 10
nz = 10
allow_renumbering = false
[]
[Materials]
[u_mat]
type = GenericFunctorMaterial
prop_names = 'u'
prop_values = 'u_fn'
[]
[]
[AuxVariables]
[u_layered_average]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[u_layered_average_kern]
type = SpatialUserObjectAux
variable = u_layered_average
user_object = nplaf
boundary = 'bottom top'
execute_on = 'INITIAL'
[]
[]
[Functions]
[u_fn]
type = ParsedFunction
expression = 'x + y + z'
[]
[]
[UserObjects]
[nplaf]
type = LayeredSideIntegralFunctor
direction = x
num_layers = 10
functor = u
boundary = 'bottom top'
execute_on = 'INITIAL'
[]
[]
[VectorPostprocessors]
[test_vpp]
type = SideValueSampler
variable = u_layered_average
boundary = 'bottom top'
sort_by = id
execute_on = 'INITIAL'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = 'INITIAL'
[]
(test/tests/time_integrators/implicit-euler/ie.i)
###########################################################
# This is a simple test with a time-dependent problem
# demonstrating the use of the TimeIntegrator system.
#
# Testing a solution that is second order in space
# and first order in time
#
# @Requirement F1.30
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = ((x*x)+(y*y))-(4*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
# Test of the TimeIntegrator System
scheme = 'implicit-euler'
start_time = 0.0
num_steps = 5
dt = 0.25
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/action/composite_eigenstrain.i)
# The primary purpose of this test is to verify that the ability to combine
# multiple eigenstrains works correctly. It should behave identically to the
# constant_expansion_coeff.i model in the thermal_expansion directory. Instead
# of having the eigenstrain names passed directly to the SolidMechanics QuasiStatic Physics,
# the QuasiStatic Physics should be able to extract the necessary eigenstrains and apply
# to their respective blocks without reduncacy.
# This test involves only thermal expansion strains on a 2x2x2 cube of approximate
# steel material. An initial temperature of 25 degrees C is given for the material,
# and an auxkernel is used to calculate the temperature in the entire cube to
# raise the temperature each time step. After the first timestep,in which the
# temperature jumps, the temperature increases by 6.25C each timestep.
# The thermal strain increment should therefore be
# 6.25 C * 1.3e-5 1/C = 8.125e-5 m/m.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./temp]
[../]
[./c]
[../]
[]
[Problem]
solve = false
[]
[ICs]
[./InitialCondition]
type = ConstantIC
value = 1
variable = c
[../]
[]
[Functions]
[./temperature_load]
type = ParsedFunction
expression = t*(500.0)+300.0
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./solid]
strain = SMALL
incremental = true
add_variables = true
automatic_eigenstrain_names = true
generate_output = 'strain_xx strain_yy strain_zz'
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = temperature_load
[../]
[]
[BCs]
[./x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./z_bot]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain1]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 298
thermal_expansion_coeff = 1.0e-5
temperature = temp
eigenstrain_name = eigenstrain1
[../]
[./thermal_expansion_strain2]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 298
thermal_expansion_coeff = 0.3e-5
temperature = temp
eigenstrain_name = eigenstrain2
[../]
[./composite]
type = CompositeEigenstrain
tensors = ' eigenstrain1 eigenstrain2'
weights = 'weight1 weight2'
eigenstrain_name = 'eigenstrain'
coupled_variables = c
[../]
[./weights]
type = GenericConstantMaterial
prop_names = 'weight1 weight2'
prop_values = '1.0 1.0'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
end_time = 0.075
dt = 0.0125
dtmin = 0.0001
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Postprocessors]
[./strain_xx]
type = ElementAverageValue
variable = strain_xx
block = 0
[../]
[./strain_yy]
type = ElementAverageValue
variable = strain_yy
block = 0
[../]
[./strain_zz]
type = ElementAverageValue
variable = strain_zz
block = 0
[../]
[./temperature]
type = AverageNodalVariableValue
variable = temp
block = 0
[../]
[]
(test/tests/tag/2d_diffusion_dg_tag.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[AuxVariables]
[./tag_variable1]
order = FIRST
family = MONOMIAL
[../]
[./tag_variable2]
order = FIRST
family = MONOMIAL
[../]
[]
[AuxKernels]
[./TagVectorAux1]
type = TagVectorAux
variable = tag_variable1
v = u
vector_tag = vec_tag2
execute_on = timestep_end
[../]
[./TagVectorAux2]
type = TagMatrixAux
variable = tag_variable2
v = u
matrix_tag = mat_tag2
execute_on = timestep_end
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[../]
[./exact_fn]
type = ParsedGradFunction
value = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1 vec_tag2'
[../]
[./abs]
type = Reaction
variable = u
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1 vec_tag2'
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1'
[../]
[]
[DGKernels]
[./dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1 vec_tag2'
[../]
[]
[BCs]
[./all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1 vec_tag2'
[../]
[]
[Problem]
type = TagTestProblem
test_tag_vectors = 'nontime residual vec_tag1 vec_tag2'
test_tag_matrices = 'mat_tag1 mat_tag2'
extra_tag_matrices = 'mat_tag1 mat_tag2'
extra_tag_vectors = 'vec_tag1 vec_tag2'
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_rel_tol = 1e-10
[]
[Postprocessors]
[./h]
type = AverageElementSize
[../]
[./dofs]
type = NumDOFs
[../]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Outputs]
exodus = true
[]
(python/peacock/tests/common/oversample.i)
###########################################################
# This is a simple test with a time-dependent problem
# demonstrating the use of a "Transient" Executioner.
#
# @Requirement F1.10
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./dt]
type = TimestepSize
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
# Preconditioned JFNK (default)
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_transient
exodus = true
[./refine_2]
type = Exodus
file_base = oversample_2
refinements = 2
[../]
[]
(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/richards/test/tests/buckley_leverett/bl20.i)
# two-phase version
[Mesh]
type = GeneratedMesh
dim = 1
nx = 30
xmin = 0
xmax = 15
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '0.1 0.5 0.5 1 2 4'
x = '0 0.1 1 5 40 42'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E6
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 2E6
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1E-5
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1E-5
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./SatWater]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SatGas]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGwater]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[./SUPGgas]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[./bounds_dummy]
[../]
[]
[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
[../]
[./richardsppenalty]
type = RichardsPPenalty
variable = pgas
a = 1E-18
lower_var = pwater
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = SeffWater
pressure_vars = 'pwater pgas'
[../]
[]
[Bounds]
[./pwater_upper_bounds]
type = ConstantBounds
variable = bounds_dummy
bounded_variable = pwater
bound_type = upper
bound_value = 1E7
[../]
[./pwater_lower_bounds]
type = ConstantBounds
variable = bounds_dummy
bounded_variable = pwater
bound_type = lower
bound_value = -310000
[../]
[]
[ICs]
[./water_ic]
type = FunctionIC
variable = pwater
function = initial_water
[../]
[./gas_ic]
type = FunctionIC
variable = pgas
function = initial_gas
[../]
[]
[BCs]
[./left_w]
type = DirichletBC
variable = pwater
boundary = left
value = 1E6
[../]
[./left_g]
type = DirichletBC
variable = pgas
boundary = left
value = 1E6
[../]
[./right_w]
type = DirichletBC
variable = pwater
boundary = right
value = -300000
[../]
[./right_g]
type = DirichletBC
variable = pgas
boundary = right
value = 0
[../]
[]
[Functions]
[./initial_water]
type = ParsedFunction
expression = 1000000*(1-min(x/5,1))-300000*(max(x-5,0)/max(abs(x-5),1E-10))
[../]
[./initial_gas]
type = ParsedFunction
expression = max(1000000*(1-x/5),0)+1000
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.15
mat_permeability = '1E-10 0 0 0 1E-10 0 0 0 1E-10'
density_UO = 'DensityWater DensityGas'
relperm_UO = 'RelPermWater RelPermGas'
SUPG_UO = 'SUPGwater SUPGgas'
sat_UO = 'SatWater SatGas'
seff_UO = 'SeffWater SeffGas'
viscosity = '1E-3 1E-6'
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
active = 'standard'
[./bounded]
# must use --use-petsc-dm command line argument
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type -ksp_rtol -ksp_atol'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 50 vinewtonssls 1E-20 1E-20'
[../]
[./standard]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -snes_atol -snes_rtol -snes_max_it -ksp_rtol -ksp_atol'
petsc_options_value = 'gmres asm lu NONZERO 1E-10 1E-10 20 1E-20 1E-20'
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 50
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = bl20
execute_on = 'initial timestep_end final'
time_step_interval = 10000
exodus = true
hide = pgas
[]
(modules/xfem/test/tests/moving_interface/moving_bimaterial.i)
# This test is for two layer materials with different youngs modulus
# The global stress is determined by switching the stress based on level set values
# The material interface is marked by a level set function
# The two layer materials are glued together
# This case is also meant to test for a bug in moving interfaces on displaced meshes
# It should fail during the healing step of the 2nd timestep if the bug is present.
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Mesh]
displacements = 'disp_x disp_y'
[generated_mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmin = 0.0
xmax = 5.
ymin = 0.0
ymax = 5.
elem_type = QUAD4
[]
[./left_bottom]
type = ExtraNodesetGenerator
new_boundary = 'left_bottom'
coord = '0.0 0.0'
input = generated_mesh
[../]
[./left_top]
type = ExtraNodesetGenerator
new_boundary = 'left_top'
coord = '0.0 5.'
input = left_bottom
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[Functions]
[./ls_func]
type = ParsedFunction
expression = 'y-3.153 + t'
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./TensorMechanics]
displacements = 'disp_x disp_y'
[../]
[]
[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_xy]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 1
variable = stress_xy
[../]
[./a_strain_xx]
type = RankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 0
variable = a_strain_xx
[../]
[./a_strain_yy]
type = RankTwoAux
rank_two_tensor = A_total_strain
index_i = 1
index_j = 1
variable = a_strain_yy
[../]
[./a_strain_xy]
type = RankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 1
variable = a_strain_xy
[../]
[./b_strain_xx]
type = RankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 0
variable = b_strain_xx
[../]
[./b_strain_yy]
type = RankTwoAux
rank_two_tensor = B_total_strain
index_i = 1
index_j = 1
variable = b_strain_yy
[../]
[./b_strain_xy]
type = RankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 1
variable = b_strain_xy
[../]
[]
[Constraints]
[./dispx_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_x
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[./dispy_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_y
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[]
[BCs]
[./bottomx]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[./topx]
type = FunctionDirichletBC
boundary = top
variable = disp_x
function = 0.03*t
[../]
[./topy]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = '0.03*t'
[../]
[]
[Materials]
[./elasticity_tensor_A]
type = ComputeIsotropicElasticityTensor
base_name = A
youngs_modulus = 1e9
poissons_ratio = 0.3
[../]
[./strain_A]
type = ComputeSmallStrain
base_name = A
displacements = 'disp_x disp_y'
[../]
[./stress_A]
type = ComputeLinearElasticStress
base_name = A
[../]
[./elasticity_tensor_B]
type = ComputeIsotropicElasticityTensor
base_name = B
youngs_modulus = 1e7
poissons_ratio = 0.3
[../]
[./strain_B]
type = ComputeSmallStrain
base_name = B
displacements = 'disp_x disp_y'
[../]
[./stress_B]
type = ComputeLinearElasticStress
base_name = B
[../]
[./combined_stress]
type = LevelSetBiMaterialRankTwo
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = stress
[../]
[./combined_dstressdstrain]
type = LevelSetBiMaterialRankFour
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = Jacobian_mult
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
line_search = 'bt'
# controls for linear iterations
l_max_its = 20
l_tol = 1e-3
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
# time control
start_time = 0.0
dt = 0.15
num_steps = 3
max_xfem_update = 1
[]
[Outputs]
exodus = true
execute_on = timestep_end
[./console]
type = Console
output_linear = true
[../]
[]
(modules/solid_mechanics/test/tests/generalized_plane_strain/generalized_plane_strain_finite.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
block = 0
[]
[Mesh]
[./square]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[../]
[]
[Variables]
[./scalar_strain_zz]
order = FIRST
family = SCALAR
[../]
[]
[AuxVariables]
[./temp]
[../]
[./saved_x]
[../]
[./saved_y]
[../]
[]
[Postprocessors]
[./react_z]
type = MaterialTensorIntegral
rank_two_tensor = stress
index_i = 2
index_j = 2
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_xy stress_yy stress_zz strain_xx strain_xy strain_yy strain_zz'
planar_formulation = GENERALIZED_PLANE_STRAIN
eigenstrain_names = eigenstrain
scalar_out_of_plane_strain = scalar_strain_zz
temperature = temp
save_in = 'saved_x saved_y'
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
use_displaced_mesh = false
[../]
[]
[Functions]
[./tempfunc]
type = ParsedFunction
expression = '(1-x)*t'
[../]
[]
[BCs]
[./bottomx]
type = DirichletBC
boundary = 0
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = DirichletBC
boundary = 0
variable = disp_y
value = 0.0
[../]
[]
[Materials]
[./elastic_tensor]
type = ComputeIsotropicElasticityTensor
poissons_ratio = 0.3
youngs_modulus = 1e6
[../]
[./thermal_strain]
type = ComputeThermalExpansionEigenstrain
temperature = temp
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
eigenstrain_name = eigenstrain
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
# controls for linear iterations
l_max_its = 100
l_tol = 1e-4
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-10
nl_abs_tol = 1e-5
# time control
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 2.0
num_steps = 5000
[]
[Outputs]
exodus = true
[]
(test/tests/variables/fe_hier/hier-2-1d.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -1
xmax = 1
nx = 5
elem_type = EDGE3
[]
[Functions]
[./bc_fnl]
type = ParsedFunction
expression = -2*x
[../]
[./bc_fnr]
type = ParsedFunction
expression = 2*x
[../]
[./forcing_fn]
type = ParsedFunction
expression = -2+x*x
[../]
[./solution]
type = ParsedGradFunction
expression = x*x
grad_x = 2*x
[../]
[]
[Variables]
[./u]
order = SECOND
family = HIERARCHIC
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/xfem/test/tests/moving_interface/moving_bimaterial_finite_strain_esm.i)
# This test is for two layer materials with different youngs modulus with AD
# The global stress is determined by switching the stress based on level set values
# The material interface is marked by a level set function
# The two layer materials are glued together
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[XFEM]
output_cut_plane = true
[]
[UserObjects]
[level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[]
[esm]
type = CutElementSubdomainModifier
geometric_cut_userobject = level_set_cut_uo
apply_initial_conditions = false
[]
[]
[Mesh]
use_displaced_mesh = true
[generated_mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin = 0
xmax = 5
ymin = 0
ymax = 5
elem_type = QUAD4
[]
[bottom]
type = SubdomainBoundingBoxGenerator
input = generated_mesh
block_id = 0
bottom_left = '0 0 0'
top_right = '5 2.5 0'
[]
[top]
type = SubdomainBoundingBoxGenerator
input = bottom
block_id = 1
bottom_left = '0 2.5 0'
top_right = '5 5 0'
[]
[]
[Functions]
[ls_func]
type = ParsedFunction
expression = 'y-2.73+t'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[ls]
[]
[strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[ls_function]
type = FunctionAux
variable = ls
function = ls_func
[]
[strain_xx]
type = RankTwoAux
variable = strain_xx
rank_two_tensor = total_strain
index_i = 0
index_j = 0
[]
[strain_yy]
type = RankTwoAux
variable = strain_yy
rank_two_tensor = total_strain
index_i = 1
index_j = 1
[]
[strain_xy]
type = RankTwoAux
variable = strain_xy
rank_two_tensor = total_strain
index_i = 0
index_j = 1
[]
[stress_xx]
type = RankTwoAux
variable = stress_xx
rank_two_tensor = stress
index_i = 0
index_j = 0
[]
[stress_xy]
type = RankTwoAux
variable = stress_xy
rank_two_tensor = stress
index_i = 0
index_j = 1
[]
[stress_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = stress
index_i = 1
index_j = 1
[]
[]
[Kernels]
[solid_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
use_displaced_mesh = true
[]
[solid_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
use_displaced_mesh = true
[]
[]
[Constraints]
[dispx_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_x
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[]
[dispy_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_y
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[]
[]
[BCs]
[bottomx]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[]
[bottomy]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[]
[topx]
type = FunctionDirichletBC
boundary = top
variable = disp_x
function = 0.03*t
[]
[topy]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = '0.03*t'
[]
[]
[Materials]
[elasticity_tensor_A]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1e9
poissons_ratio = 0.3
[]
[strain_A]
type = ComputeFiniteStrain
block = 1
[]
[stress_A]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_B]
type = ComputeIsotropicElasticityTensor
block = 0
youngs_modulus = 1e7
poissons_ratio = 0.3
[]
[strain_B]
type = ComputeFiniteStrain
block = 0
[]
[stress_B]
type = ComputeFiniteStrainElasticStress
block = 0
[]
[]
[Postprocessors]
[disp_x_norm]
type = ElementL2Norm
variable = disp_x
[]
[disp_y_norm]
type = ElementL2Norm
variable = disp_y
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-13
nl_abs_tol = 1e-50
# time control
start_time = 0.0
dt = 0.1
num_steps = 4
max_xfem_update = 1
[]
[Outputs]
print_linear_residuals = false
exodus = true
[]
(modules/contact/test/tests/mechanical_constraint/glued_kinematic.i)
[Mesh]
file = blocks_2d_nogap.e
[]
[GlobalParams]
volumetric_locking_correction = false
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./penetration]
[../]
[./inc_slip_x]
[../]
[./inc_slip_y]
[../]
[./accum_slip_x]
[../]
[./accum_slip_y]
[../]
[]
[Functions]
[./vertical_movement]
type = ParsedFunction
expression = -t
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
strain = FINITE
[../]
[]
[AuxKernels]
[./zeroslip_x]
type = ConstantAux
variable = inc_slip_x
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./zeroslip_y]
type = ConstantAux
variable = inc_slip_y
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./accum_slip_x]
type = AccumulateAux
variable = accum_slip_x
accumulate_from_variable = inc_slip_x
execute_on = timestep_end
[../]
[./accum_slip_y]
type = AccumulateAux
variable = accum_slip_y
accumulate_from_variable = inc_slip_y
execute_on = timestep_end
[../]
[./penetration]
type = PenetrationAux
variable = penetration
boundary = 3
paired_boundary = 2
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = 4
#Initial gap is 0.01
value = -0.01
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = vertical_movement
[../]
[]
[Materials]
[./left]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e7
poissons_ratio = 0.3
[../]
[./right]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_max_its = 100
nl_max_its = 1000
dt = 0.01
end_time = 0.10
num_steps = 1000
l_tol = 1e-6
nl_rel_tol = 1e-10
nl_abs_tol = 1e-8
dtmin = 0.01
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
[]
[Outputs]
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[./console]
type = Console
max_rows = 5
[../]
[]
[Contact]
[./leftright]
primary = 2
secondary = 3
model = glued
penalty = 1e+6
[../]
[]
(modules/peridynamics/test/tests/generalized_plane_strain/generalized_plane_strain_squares_OSPD.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = PeridynamicsMesh
horizon_number = 3
[fmg]
type = FileMeshGenerator
file = squares.e
[]
[gpd]
type = MeshGeneratorPD
input = fmg
retain_fe_mesh = false
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[scalar_strain_zz1]
order = FIRST
family = SCALAR
[]
[scalar_strain_zz2]
order = FIRST
family = SCALAR
[]
[]
[AuxVariables]
[temp]
order = FIRST
family = LAGRANGE
[]
[stress_zz1]
order = FIRST
family = LAGRANGE
[]
[stress_zz2]
order = FIRST
family = LAGRANGE
[]
[]
[Modules/Peridynamics/Mechanics]
[Master]
[block1]
formulation = ORDINARY_STATE
block = 1001
[]
[block2]
formulation = ORDINARY_STATE
block = 1002
[]
[]
[GeneralizedPlaneStrain]
[block1]
formulation = ORDINARY_STATE
scalar_out_of_plane_strain = scalar_strain_zz1
out_of_plane_stress_variable = stress_zz1
block = 1001
[]
[block2]
formulation = ORDINARY_STATE
scalar_out_of_plane_strain = scalar_strain_zz2
out_of_plane_stress_variable = stress_zz2
block = 1002
[]
[]
[]
[AuxKernels]
[tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
use_displaced_mesh = false
[]
[stress_zz1]
type = NodalRankTwoPD
variable = stress_zz1
rank_two_tensor = stress
scalar_out_of_plane_strain = scalar_strain_zz1
poissons_ratio = 0.3
youngs_modulus = 1e6
temperature = temp
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
output_type = component
index_i = 2
index_j = 2
block = 1001
[]
[stress_zz2]
type = NodalRankTwoPD
variable = stress_zz2
scalar_out_of_plane_strain = scalar_strain_zz2
poissons_ratio = 0.3
youngs_modulus = 1e6
temperature = temp
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
rank_two_tensor = stress
output_type = component
index_i = 2
index_j = 2
block = 1002
[]
[]
[Postprocessors]
[react_z1]
type = NodalVariableIntegralPD
variable = stress_zz1
block = 1001
[]
[react_z2]
type = NodalVariableIntegralPD
variable = stress_zz2
block = 1002
[]
[]
[Functions]
[tempfunc]
type = ParsedFunction
expression = '(1-x)*t'
[]
[]
[BCs]
[bottom1_x]
type = DirichletBC
boundary = 1001
variable = disp_x
value = 0.0
[]
[bottom1_y]
type = DirichletBC
boundary = 1001
variable = disp_y
value = 0.0
[]
[bottom2_x]
type = DirichletBC
boundary = 1002
variable = disp_x
value = 0.0
[]
[bottom2_y]
type = DirichletBC
boundary = 1002
variable = disp_y
value = 0.0
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
poissons_ratio = 0.3
youngs_modulus = 1e6
block = '1001 1002'
[]
[force_density1]
type = ComputeSmallStrainVariableHorizonMaterialOSPD
temperature = temp
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
scalar_out_of_plane_strain = scalar_strain_zz1
block = 1001
[]
[force_density2]
type = ComputeSmallStrainVariableHorizonMaterialOSPD
temperature = temp
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
scalar_out_of_plane_strain = scalar_strain_zz2
block = 1002
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
l_tol = 1e-8
nl_rel_tol = 1e-15
nl_abs_tol = 1e-09
start_time = 0.0
end_time = 1.0
use_pre_SMO_residual = true
[]
[Outputs]
exodus = true
file_base = generalized_plane_strain_squares_OSPD
[]
(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/richards/test/tests/gravity_head_2/gh_fu_18.i)
# with immobile saturation - this illustrates a perfect case of fullyupwind working very well
# unsaturated = true
# gravity = true
# full upwinding = true
# transient = true
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmin = 0
xmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = 'DensityWater DensityGas'
relperm_UO = 'RelPermWater RelPermGas'
SUPG_UO = 'SUPGwater SUPGgas'
sat_UO = 'SatWater SatGas'
seff_UO = 'SeffWater SeffGas'
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1E-2 1E-1 1E0 0.5E1 0.5E2 0.4E4 1E5 1E6 1E7'
x = '0 1E-1 1E0 1E1 1E2 1E3 1E4 1E5 1E6'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 1.0E2
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 0.5
bulk_mod = 0.5E2
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.4
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.3
n = 2
[../]
[./SatWater]
type = RichardsSat
s_res = 0.1
sum_s_res = 0.15
[../]
[./SatGas]
type = RichardsSat
s_res = 0.05
sum_s_res = 0.15
[../]
[./SUPGwater]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[./SUPGgas]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./water_ic]
type = ConstantIC
value = 1
variable = pwater
[../]
[./gas_ic]
type = ConstantIC
value = 2
variable = pgas
[../]
[]
[Kernels]
active = 'richardsfwater richardstwater richardsfgas richardstgas'
[./richardstwater]
type = RichardsMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFullyUpwindFlux
variable = pwater
[../]
[./richardstgas]
type = RichardsMassChange
variable = pgas
[../]
[./richardsfgas]
type = RichardsFullyUpwindFlux
variable = pgas
[../]
[]
[AuxVariables]
[./seffgas]
[../]
[./seffwater]
[../]
[]
[AuxKernels]
[./seffgas_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffGas
variable = seffgas
[../]
[./seffwater_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffWater
variable = seffwater
[../]
[]
[Postprocessors]
[./mwater_init]
type = RichardsMass
variable = pwater
execute_on = timestep_begin
outputs = none
[../]
[./mgas_init]
type = RichardsMass
variable = pgas
execute_on = timestep_begin
outputs = none
[../]
[./mwater_fin]
type = RichardsMass
variable = pwater
execute_on = timestep_end
outputs = none
[../]
[./mgas_fin]
type = RichardsMass
variable = pgas
execute_on = timestep_end
outputs = none
[../]
[./mass_error_water]
type = FunctionValuePostprocessor
function = fcn_mass_error_w
[../]
[./mass_error_gas]
type = FunctionValuePostprocessor
function = fcn_mass_error_g
[../]
[./pw_left]
type = PointValue
point = '0 0 0'
variable = pwater
outputs = none
[../]
[./pw_right]
type = PointValue
point = '1 0 0'
variable = pwater
outputs = none
[../]
[./error_water]
type = FunctionValuePostprocessor
function = fcn_error_water
[../]
[./pg_left]
type = PointValue
point = '0 0 0'
variable = pgas
outputs = none
[../]
[./pg_right]
type = PointValue
point = '1 0 0'
variable = pgas
outputs = none
[../]
[./error_gas]
type = FunctionValuePostprocessor
function = fcn_error_gas
[../]
[]
[Functions]
[./fcn_mass_error_w]
type = ParsedFunction
expression = 'abs(0.5*(mi-mf)/(mi+mf))'
symbol_names = 'mi mf'
symbol_values = 'mwater_init mwater_fin'
[../]
[./fcn_mass_error_g]
type = ParsedFunction
expression = 'abs(0.5*(mi-mf)/(mi+mf))'
symbol_names = 'mi mf'
symbol_values = 'mgas_init mgas_fin'
[../]
[./fcn_error_water]
type = ParsedFunction
expression = 'abs((-b*log(-(gdens0*xval+(-b*exp(-p0/b)))/b)-p1)/p1)'
symbol_names = 'b gdens0 p0 xval p1'
symbol_values = '1E2 -1 pw_left 1 pw_right'
[../]
[./fcn_error_gas]
type = ParsedFunction
expression = 'abs((-b*log(-(gdens0*xval+(-b*exp(-p0/b)))/b)-p1)/p1)'
symbol_names = 'b gdens0 p0 xval p1'
symbol_values = '0.5E2 -0.5 pg_left 1 pg_right'
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
viscosity = '1E-3 0.5E-3'
gravity = '-1 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = gh_fu_18
execute_on = 'timestep_end final'
time_step_interval = 100000
exodus = true
[]
(modules/heat_transfer/test/tests/heat_conduction_patch/heat_conduction_patch_rz.i)
#
# This problem is taken from the Abaqus verification manual:
# "1.5.8 Patch test for heat transfer elements"
#
# The temperature on the exterior nodes is -2e5+200x+100y.
#
# This gives a constant flux at all Gauss points.
#
# In addition, the temperature at all nodes follows the same formula.
#
# Node x y Temperature
# 1 1e3 0 0
# 2 1.00024e3 0 48
# 3 1.00018e3 3e-2 39
# 4 1.00004e3 2e-2 10
# 5 1.00008e3 8e-2 24
# 6 1e3 1.2e-1 12
# 7 1.00016e3 8e-2 40
# 8 1.00024e3 1.2e-1 60
[Problem]
coord_type = RZ
[]
[Mesh]#Comment
file = heat_conduction_patch_rz.e
[] # Mesh
[Functions]
[./temps]
type = ParsedFunction
expression ='-2e5+200*x+100*y'
[../]
[] # Functions
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[] # Variables
[Kernels]
[./heat_r]
type = HeatConduction
variable = temp
[../]
[] # Kernels
[BCs]
[./temps]
type = FunctionDirichletBC
variable = temp
boundary = 10
function = temps
[../]
[] # BCs
[Materials]
[./heat]
type = HeatConductionMaterial
block = 1
specific_heat = 0.116
thermal_conductivity = 4.85e-4
[../]
[] # Materials
[Executioner]
type = Steady
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
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
[] # Executioner
[Outputs]
exodus = true
[] # Outputs
(modules/solid_mechanics/test/tests/umat/time_step/elastic_timestep.i)
# Testing the UMAT Interface - linear elastic model using the large strain formulation.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[]
[Functions]
[top_pull]
type = ParsedFunction
expression = t/100
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
[]
[]
[BCs]
[y_pull_function]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = top_pull
[]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[z_bot]
type = DirichletBC
variable = disp_z
boundary = front
value = 0.0
[]
[]
[Materials]
[umat]
type = AbaqusUMATStress
constant_properties = '1000 0.3'
plugin = '../../../plugins/elastic_timestep'
num_state_vars = 0
use_one_based_indexing = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
end_time = 30
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 30
iteration_window = 9
growth_factor = 2.0
cutback_factor = 1.0
timestep_limiting_postprocessor = matl_ts_min
dt = 1.0
[]
[]
[UserObjects]
[time_step_size]
type = TimestepSize
execute_on = 'INITIAL LINEAR'
[]
[terminator_umat]
type = Terminator
expression = 'time_step_size > matl_ts_min'
fail_mode = SOFT
execute_on = 'FINAL'
[]
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
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/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/err.not_a_3d_hs.i)
[GlobalParams]
scaling_factor_1phase = '1 1 1e-3'
[]
[SolidProperties]
[mat]
type = ThermalFunctionSolidProperties
rho = 1000
cp = 100
k = 30
[]
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[T_init]
type = ParsedFunction
expression = '1000*y+300+30*z'
[]
[]
[Components]
[fch]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
fp = fp
n_elems = 6
length = 1
initial_T = 300
initial_p = 1.01e5
initial_vel = 1
closures = simple_closures
A = 0.00314159
D_h = 0.2
f = 0.01
[]
[in]
type = InletVelocityTemperature1Phase
input = 'fch:in'
vel = 1
T = 300
[]
[out]
type = Outlet1Phase
input = 'fch:out'
p = 1.01e5
[]
[blk]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '0 0 1'
widths = 0.1
inner_radius = 0.1
length = 1
n_elems = 6
n_part_elems = 1
initial_T = T_init
solid_properties = 'mat'
solid_properties_T_ref = '300'
names = blk
[]
[ht]
type = HeatTransferFromHeatStructure3D1Phase
flow_channels = 'fch'
hs = blk
boundary = blk:inner
Hw = 10000
P_hf = 0.156434465
[]
[]
[Postprocessors]
[energy_hs]
type = HeatStructureEnergy3D
block = blk:0
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_fch]
type = ElementIntegralVariablePostprocessor
block = fch
variable = rhoEA
execute_on = 'INITIAL TIMESTEP_END'
[]
[total_energy]
type = SumPostprocessor
values = 'energy_fch energy_hs'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = total_energy
compute_relative_change = false
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
dt = 1
solve_type = PJFNK
line_search = basic
num_steps = 1000
steady_state_detection = true
steady_state_tolerance = 1e-08
nl_abs_tol = 1e-8
[]
(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/richards/test/tests/theis/th01.i)
# fully-saturated
# production
[Mesh]
type = FileMesh
file = th01_input.e
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '0.5 1 2 10'
x = '0 1 10 100'
[../]
[]
[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-5
[../]
[./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 = RichardsPolyLineSink
pressures = '-1E9 1E9'
fluxes = '200 200'
point_file = th01.points
SumQuantityUO = total_outflow_mass
variable = pressure
[../]
[]
[Postprocessors]
[./flow_report]
type = RichardsPlotQuantity
uo = total_outflow_mass
[../]
[./p50]
type = PointValue
variable = pressure
point = '50 0 0'
execute_on = timestep_end
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 1E5
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = 1
viscosity = 1E-3
mat_porosity = 0.1
mat_permeability = '1E-10 0 0 0 1E-10 0 0 0 1E-10'
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-6 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 100
solve_type = NEWTON
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = th01
csv = true
[]
(modules/porous_flow/test/tests/dispersion/disp01_heavy.i)
# Test dispersive part of PorousFlowDispersiveFlux kernel by setting diffusion
# coefficients to zero. A pressure gradient is applied over the mesh to give a
# uniform velocity. Gravity is set to zero.
# Mass fraction is set to 1 on the left hand side and 0 on the right hand side.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 200
xmax = 10
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
compute_enthalpy = false
compute_internal_energy = false
[]
[Variables]
[pp]
[]
[massfrac0]
[]
[]
[AuxVariables]
[velocity]
family = MONOMIAL
order = FIRST
[]
[]
[AuxKernels]
[velocity]
type = PorousFlowDarcyVelocityComponent
variable = velocity
component = x
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = pic
[]
[massfrac0]
type = ConstantIC
variable = massfrac0
value = 0
[]
[]
[Functions]
[pic]
type = ParsedFunction
expression = 1.1e5-x*1e3
[]
[]
[BCs]
[xleft]
type = DirichletBC
value = 1
variable = massfrac0
boundary = left
[]
[xright]
type = DirichletBC
value = 0
variable = massfrac0
boundary = right
[]
[pright]
type = DirichletBC
variable = pp
boundary = right
value = 1e5
[]
[pleft]
type = DirichletBC
variable = pp
boundary = left
value = 1.1e5
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[adv0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
[]
[diff0]
type = PorousFlowDispersiveFlux
variable = pp
disp_trans = 0
disp_long = 0.2
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = massfrac0
[]
[adv1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = massfrac0
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = massfrac0
disp_trans = 0
disp_long = 0.2
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1e9
density0 = 1000
viscosity = 0.001
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = massfrac0
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[poro]
type = PorousFlowPorosityConst
porosity = 0.3
[]
[diff]
type = PorousFlowDiffusivityConst
diffusion_coeff = '0 0'
tortuosity = 0.1
[]
[relp]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-9 0 0 0 1e-9 0 0 0 1e-9'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu NONZERO 2 '
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 1e3
dtmax = 10
[TimeStepper]
type = IterationAdaptiveDT
growth_factor = 1.5
cutback_factor = 0.5
dt = 1
[]
[]
[VectorPostprocessors]
[xmass]
type = NodalValueSampler
sort_by = id
variable = massfrac0
[]
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(modules/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
[]
(test/tests/controls/time_periods/aux_kernels/control.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./aux0]
[../]
[./aux1]
[../]
[]
[Functions]
[./func]
type = ParsedFunction
expression = t*x*y
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[AuxKernels]
[./aux0]
type = FunctionAux
variable = aux0
function = func
[../]
[./aux1]
type = FunctionAux
variable = aux1
function = func
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[Controls]
[./damping_control]
type = TimePeriod
disable_objects = 'AuxKernels::aux0 AuxKernels::aux1'
start_time = '0.25 0.55'
end_time = '0.65 0.75'
execute_on = 'initial timestep_begin'
[../]
[]
(modules/solid_mechanics/test/tests/recompute_radial_return/isotropic_plasticity_finite_strain.i)
# This simulation uses the piece-wise linear strain hardening model
# with the incremental small strain formulation; incremental small strain
# is required to produce the strain_increment for the DiscreteRadialReturnStressIncrement
# class, which handles the calculation of the stress increment to return
# to the yield surface in a J2 (isotropic) plasticity problem.
#
# This test assumes a Poissons ratio of 0.3 and applies a displacement loading
# condition on the top in the y direction.
#
# An identical problem was run in Abaqus on a similar 1 element mesh and was used
# to verify the SolidMechanics solution; this SolidMechanics code matches the
# SolidMechanics solution.
#
# Mechanical strain is the sum of the elastic and plastic strains but is different
# from total strain in cases with eigen strains, e.g. thermal strain.
[Mesh]
file = 1x1x1cube.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Functions]
[./top_pull]
type = ParsedFunction
expression = t*(0.0625)
[../]
[./hf]
type = PiecewiseLinear
x = '0 0.001 0.003 0.023'
y = '50 52 54 56'
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_yy plastic_strain_xx plastic_strain_yy plastic_strain_zz'
[../]
[]
[BCs]
[./y_pull_function]
type = FunctionDirichletBC
variable = disp_y
boundary = 5
function = top_pull
[../]
[./x_bot]
type = DirichletBC
variable = disp_x
boundary = 4
value = 0.0
[../]
[./y_bot]
type = DirichletBC
variable = disp_y
boundary = 3
value = 0.0
[../]
[./z_bot]
type = DirichletBC
variable = disp_z
boundary = 2
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./isotropic_plasticity]
type = IsotropicPlasticityStressUpdate
yield_stress = 50.0
hardening_function = hf
[../]
[./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 = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
end_time = 0.075
dt = 0.00125
dtmin = 0.0001
[]
[Outputs]
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure_3d/steady_state.i)
[GlobalParams]
scaling_factor_1phase = '1. 1.e-2 1.e-4'
scaling_factor_temperature = 1e-2
initial_T = 500
initial_p = 6.e6
initial_vel = 0
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
[]
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '16 356 6.5514e3'
[]
[]
[Functions]
[Ts_init]
type = ParsedFunction
expression = '2*sin(x*pi/2)+2*sin(pi*y) +507'
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = fp
# geometry
position = '-1 0 -2.5'
orientation = '1 0 0'
length = 2
n_elems = 2
A = 0.3
D_h = 0.1935483871
f = 0.1
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe:in'
m_dot = 0.1
T = 500
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = 6e6
[]
[ht]
type = HeatTransferFromHeatStructure3D1Phase
flow_channels = 'pipe'
hs = blk
boundary = blk:right
P_hf = 3
Hw = 1000
[]
[blk]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
initial_T = Ts_init
[]
[right_bnd]
type = HSBoundarySpecifiedTemperature
hs = blk
boundary = blk:bottom
T = Ts_init
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 100
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
[]
[Outputs]
exodus = true
execute_on = 'initial final'
[]
(modules/heat_transfer/test/tests/code_verification/cartesian_test_no4.i)
# Problem I.4
#
# An infinite plate with constant thermal conductivity k and internal
# heat generation q. The left boundary is exposed to a constant heat flux q0.
# The right boundary is exposed to a fluid with constant temperature uf and
# heat transfer coefficient h, which results in the convective boundary condition.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
nx = 1
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Functions]
[./exact]
type = ParsedFunction
symbol_names = 'q q0 k L uf h'
symbol_values = '1200 200 1 1 100 10.0'
expression = 'uf + (q0 + L * q)/h + 0.5 * ( 2 * q0 + q * (L + x)) * (L-x) / k'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[./heatsource]
type = HeatSource
function = 1200
variable = u
[../]
[]
[BCs]
[./ui]
type = NeumannBC
boundary = left
variable = u
value = 200
[../]
[./uo]
type = CoupledConvectiveHeatFluxBC
boundary = right
variable = u
htc = 10.0
T_infinity = 100
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1.0 1.0 1.0'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = true
[]
(test/tests/fvkernels/mms/skewness-correction/adv-diff-react/skewed.i)
a=1.1
diff=1.1
[Mesh]
[gen_mesh]
type = FileMeshGenerator
file = skewed.msh
[]
[]
[Variables]
[v]
initial_condition = 1
type = MooseVariableFVReal
face_interp_method = 'skewness-corrected'
[]
[]
[FVKernels]
[diff_v]
type = FVDiffusion
variable = v
coeff = ${diff}
[]
[advection]
type = FVAdvection
variable = v
velocity = '${a} ${fparse 2*a} 0'
advected_interp_method = 'average'
[]
[reaction]
type = FVReaction
variable = v
[]
[body_v]
type = FVBodyForce
variable = v
function = 'forcing'
[]
[]
[FVBCs]
[exact]
type = FVFunctionDirichletBC
boundary = 'left right top bottom'
function = 'exact'
variable = v
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = 'sin(x)*cos(y)'
[]
[forcing]
type = ParsedFunction
expression = '-2*a*sin(x)*sin(y) + a*cos(x)*cos(y) + 2*diff*sin(x)*cos(y) + sin(x)*cos(y)'
symbol_names = 'a diff'
symbol_values = '${a} ${diff}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
[]
[Postprocessors]
[./error]
type = ElementL2Error
variable = v
function = exact
outputs = 'console csv'
[../]
[h]
type = AverageElementSize
outputs = 'console csv'
[]
[]
(test/tests/userobjects/nearest_point_average/nearest_point_average.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 8
ny = 8
nz = 8
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[np_average]
order = CONSTANT
family = MONOMIAL
[]
[]
[ICs]
[v]
type = FunctionIC
variable = v
function = v
[]
[]
[Functions]
[v]
type = ParsedFunction
expression = x+y-sin(z)
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[AuxKernels]
[np_average]
type = SpatialUserObjectAux
variable = np_average
execute_on = timestep_end
user_object = npa
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[]
[UserObjects]
[npa]
type = NearestPointAverage
points_file = points.txt
variable = v
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
hide = 'u'
[]
(modules/porous_flow/examples/restart/gas_injection_new_mesh.i)
# Using the results from the equilibrium run to provide the initial condition for
# porepressure, we now inject a gas phase into the brine-saturated reservoir. In this
# example, the mesh is not identical to the mesh used in gravityeq.i. Rather, it is
# generated so that it is more refined near the injection boundary and at the top of
# the model, as that is where the gas plume will be present.
#
# To use the hydrostatic pressure calculated using the gravity equilibrium run as the initial
# condition for the pressure, a SolutionUserObject is used, along with a SolutionFunction to
# interpolate the pressure from the gravity equilibrium run to the initial condition for liqiud
# porepressure in this example.
#
# Even though the gravity equilibrium is established using a 2D mesh, in this example,
# we use a mesh shifted 0.1 m to the right and rotate it about the Y axis to make a 2D radial
# model.
#
# Methane injection takes place over the surface of the hole created by rotating the mesh,
# and hence the injection area is 2 pi r h. We can calculate this using an AreaPostprocessor,
# and then use this in a ParsedFunction to calculate the injection rate so that 10 kg/s of
# methane is injected.
#
# Note: as this example uses the results from a previous simulation, gravityeq.i MUST be
# run before running this input file.
[Mesh]
type = GeneratedMesh
dim = 2
ny = 25
nx = 50
ymax = 100
xmin = 0.1
xmax = 5000
bias_x = 1.05
bias_y = 0.95
coord_type = RZ
rz_coord_axis = Y
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 -9.81 0'
temperature_unit = Celsius
[]
[Variables]
[pp_liq]
[]
[sat_gas]
initial_condition = 0
[]
[]
[ICs]
[ppliq_ic]
type = FunctionIC
variable = pp_liq
function = ppliq_ic
[]
[]
[AuxVariables]
[temperature]
initial_condition = 50
[]
[xnacl]
initial_condition = 0.1
[]
[brine_density]
family = MONOMIAL
order = CONSTANT
[]
[methane_density]
family = MONOMIAL
order = CONSTANT
[]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[pp_gas]
family = MONOMIAL
order = CONSTANT
[]
[sat_liq]
family = MONOMIAL
order = CONSTANT
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
variable = pp_liq
[]
[flux0]
type = PorousFlowAdvectiveFlux
variable = pp_liq
[]
[mass1]
type = PorousFlowMassTimeDerivative
variable = sat_gas
fluid_component = 1
[]
[flux1]
type = PorousFlowAdvectiveFlux
variable = sat_gas
fluid_component = 1
[]
[]
[AuxKernels]
[brine_density]
type = PorousFlowPropertyAux
property = density
variable = brine_density
execute_on = 'initial timestep_end'
[]
[methane_density]
type = PorousFlowPropertyAux
property = density
variable = methane_density
phase = 1
execute_on = 'initial timestep_end'
[]
[pp_gas]
type = PorousFlowPropertyAux
property = pressure
phase = 1
variable = pp_gas
execute_on = 'initial timestep_end'
[]
[sat_liq]
type = PorousFlowPropertyAux
property = saturation
variable = sat_liq
execute_on = 'initial timestep_end'
[]
[]
[BCs]
[gas_injection]
type = PorousFlowSink
boundary = left
variable = sat_gas
flux_function = injection_rate
fluid_phase = 1
[]
[brine_out]
type = PorousFlowPiecewiseLinearSink
boundary = right
variable = pp_liq
multipliers = '0 1e9'
pt_vals = '0 1e9'
fluid_phase = 0
flux_function = 1e-6
use_mobility = true
use_relperm = true
mass_fraction_component = 0
[]
[]
[Functions]
[injection_rate]
type = ParsedFunction
symbol_values = injection_area
symbol_names = area
expression = '-1/area'
[]
[ppliq_ic]
type = SolutionFunction
solution = soln
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp_liq sat_gas'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
alpha = 1e-5
m = 0.5
sat_lr = 0.2
pc_max = 1e7
[]
[soln]
type = SolutionUserObject
mesh = gravityeq_out.e
system_variables = porepressure
[]
[]
[FluidProperties]
[brine]
type = BrineFluidProperties
[]
[methane]
type = MethaneFluidProperties
[]
[methane_tab]
type = TabulatedBicubicFluidProperties
fp = methane
save_file = false
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temperature
[]
[ps]
type = PorousFlow2PhasePS
phase0_porepressure = pp_liq
phase1_saturation = sat_gas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[brine]
type = PorousFlowBrine
compute_enthalpy = false
compute_internal_energy = false
xnacl = xnacl
phase = 0
[]
[methane]
type = PorousFlowSingleComponentFluid
compute_enthalpy = false
compute_internal_energy = false
fp = methane_tab
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-13 0 0 0 5e-14 0 0 0 1e-13'
[]
[relperm_liq]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
s_res = 0.2
sum_s_res = 0.3
[]
[relperm_gas]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 1
s_res = 0.1
sum_s_res = 0.3
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = ' asm lu NONZERO'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1e8
nl_abs_tol = 1e-12
nl_rel_tol = 1e-06
nl_max_its = 20
dtmax = 1e6
[TimeStepper]
type = IterationAdaptiveDT
dt = 1e1
growth_factor = 1.5
[]
[]
[Postprocessors]
[mass_ph0]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'initial timestep_end'
[]
[mass_ph1]
type = PorousFlowFluidMass
fluid_component = 1
execute_on = 'initial timestep_end'
[]
[injection_area]
type = AreaPostprocessor
boundary = left
execute_on = initial
[]
[]
[Outputs]
execute_on = 'initial timestep_end'
exodus = true
perf_graph = true
[]
(modules/level_set/test/tests/kernels/olsson_reinitialization/olsson_1d.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 8
ny = 8
uniform_refine = 2
[]
[Variables]
[./phi]
[../]
[]
[AuxVariables]
[./phi_0]
family = MONOMIAL
order = FIRST
[../]
[./phi_exact]
[../]
[]
[AuxKernels]
[./phi_exact]
type = FunctionAux
function = phi_exact
variable = phi_exact
[../]
[]
[Functions]
[./phi_initial]
type = ParsedFunction
expression = '1-x'
[../]
[./phi_exact]
type = ParsedFunction
symbol_names = epsilon
symbol_values = 0.05
expression = '1 / (1+exp((x-0.5)/epsilon))'
[../]
[]
[ICs]
[./phi_ic]
type = FunctionIC
function = phi_initial
variable = phi
[../]
[./phi_0_ic]
type = FunctionIC
function = phi_initial
variable = phi_0
[../]
[]
[Kernels]
[./time]
type = TimeDerivative
variable = phi
[../]
[./reinit]
type = LevelSetOlssonReinitialization
variable = phi
phi_0 = phi_0
epsilon = 0.05
[../]
[]
[UserObjects]
[./arnold]
type = LevelSetOlssonTerminator
tol = 0.1
[../]
[]
[Postprocessors]
[./error]
type = ElementL2Error
variable = phi
function = phi_exact
execute_on = 'initial timestep_end'
[../]
[./ndofs]
type = NumDOFs
[../]
[]
[VectorPostprocessors]
[./line]
type = LineValueSampler
start_point = '0 0.5 0'
end_point = '1 0.5 0'
variable = phi
num_points = 100
sort_by = x
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
l_max_its = 100
nl_max_its = 100
solve_type = PJFNK
num_steps = 10
start_time = 0
nl_abs_tol = 1e-13
scheme = implicit-euler
dt = 0.05
petsc_options_iname = '-pc_type -pc_sub_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 300'
[]
[Outputs]
exodus = true
[./out]
type = CSV
time_data = true
file_base = output/olsson_1d_out
[../]
[]
(test/tests/ics/from_exodus_solution/elem_part2.i)
# Use the exodus file for restarting the problem:
# - restart elemental aux variable
[Mesh]
[fmg]
type = FileMeshGenerator
file = elem_part1_out.e
use_for_exodus_restart = true
[]
# This problem uses ExodusII_IO::copy_elemental_solution(), which only
# works with ReplicatedMesh
parallel_type = replicated
[]
[Functions]
[exact_fn]
type = ParsedFunction
expression = ((x*x)+(y*y))
[]
[forcing_fn]
type = ParsedFunction
expression = -4
[]
[]
[AuxVariables]
[e]
order = CONSTANT
family = MONOMIAL
initial_from_file_var = e
initial_from_file_timestep = 6
[]
[]
[AuxKernels]
[ak]
type = ProjectionAux
variable = e
v = e
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = 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/userobjects/radial_average/test.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
[]
[]
[Problem]
solve = false
kernel_coverage_check = false
[]
[AuxVariables]
[non_local_material]
family = MONOMIAL
order = SECOND
[]
[]
[AuxKernels]
[non_local]
type = RadialAverageAux
average_UO = average
variable = non_local_material
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[Functions]
[func]
type = ParsedFunction
expression = 'if(x >=0,(1+t),-(1+t))'
[]
[]
[Materials]
[local_material]
type = GenericFunctionMaterial
prop_names = local
prop_values = func
outputs = exodus
[]
[]
[UserObjects]
[average]
type = RadialAverage
prop_name = local
weights = constant
execute_on = "INITIAL timestep_end"
radius = 0.3
[]
[]
[Executioner]
type = Transient
end_time = 3
dt = 1
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/pps_interval/pps_bad_interval2.i)
[Mesh]
file = square-2x2-nodeids.e
# This test can only be run with renumering disabled, so the
# NodalVariableValue postprocessor's node id is well-defined.
allow_renumbering = false
[]
[Variables]
active = 'u v'
[./u]
order = SECOND
family = LAGRANGE
[../]
[./v]
order = SECOND
family = LAGRANGE
[../]
[]
[Functions]
active = 'force_fn exact_fn left_bc'
[./force_fn]
type = ParsedFunction
expression = '1-x*x+2*t'
[../]
[./exact_fn]
type = ParsedFunction
expression = '(1-x*x)*t'
[../]
[./left_bc]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
active = '
time_u diff_u ffn_u
time_v diff_v'
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'all_u left_v right_v'
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = exact_fn
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '2'
value = 0
[../]
[]
[Postprocessors]
active = 'l2 node1 node4'
[./l2]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./node1]
type = NodalVariableValue
variable = u
nodeid = 15
[../]
[./node4]
type = NodalVariableValue
variable = v
nodeid = 10
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
end_time = 1
[]
[Outputs]
file_base = ignore_bad
exodus = true
[./console]
type = Console
time_step_interval = 2
[../]
[]
(modules/fluid_properties/test/tests/brine/brine_tabulated.i)
# Test BrineFluidProperties calculations of density, viscosity and thermal
# conductivity with a TabulatedBiCubicFluidProperties water.
#
# Experimental density values from Pitzer et al, "Thermodynamic properties
# of aqueous sodium chloride solution", Journal of Physical and Chemical
# Reference Data, 13, 1-102 (1984)
#
# Experimental viscosity values from Phillips et al, "Viscosity of NaCl and
# other solutions up to 350C and 50MPa pressures", LBL-11586 (1980)
#
# Thermal conductivity values from Ozbek and Phillips, "Thermal conductivity of
# aqueous NaCl solutions from 20C to 330C", LBL-9086 (1980)
#
# --------------------------------------------------------------
# Pressure (Mpa) | 20 | 20 | 40
# Temperature (C) | 50 | 200 | 200
# NaCl molality (mol/kg) | 2 | 2 | 5
# NaCl mass fraction (kg/kg) | 0.1047 | 0.1047 | 0.2261
# --------------------------------------------------------------
# Expected values
# --------------------------------------------------------------
# Density (kg/m^3) | 1068.52 | 959.27 | 1065.58
# Viscosity (1e-6Pa.s) | 679.8 | 180.0 | 263.1
# Thermal conductivity (W/m/K) | 0.630 | 0.649 | 0.633
# --------------------------------------------------------------
# Calculated values
# --------------------------------------------------------------
# Density (kg/m^3) | 1067.18 | 958.68 | 1065.46
# Viscosity (1e-6 Pa.s) | 681.1 | 181.98 | 266.1
# Thermal conductivity (W/m/K) | 0.637 | 0.662 | 0.658
# --------------------------------------------------------------
#
# All results are within expected accuracy
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 1
xmax = 3
# This test uses ElementalVariableValue postprocessors on specific
# elements, so element numbering needs to stay unchanged
allow_renumbering = false
[]
[Variables]
[./dummy]
[../]
[]
[AuxVariables]
[./pressure]
family = MONOMIAL
order = CONSTANT
[../]
[./temperature]
family = MONOMIAL
order = CONSTANT
[../]
[./xnacl]
family = MONOMIAL
order = CONSTANT
[../]
[./density]
family = MONOMIAL
order = CONSTANT
[../]
[./enthalpy]
family = MONOMIAL
order = CONSTANT
[../]
[./internal_energy]
family = MONOMIAL
order = CONSTANT
[../]
[]
[Functions]
[./pic]
type = ParsedFunction
expression = 'if(x<2,20e6, 40e6)'
[../]
[./tic]
type = ParsedFunction
expression = 'if(x<1, 323.15, 473.15)'
[../]
[./xic]
type = ParsedFunction
expression = 'if(x<2,0.1047, 0.2261)'
[../]
[]
[ICs]
[./p_ic]
type = FunctionIC
function = pic
variable = pressure
[../]
[./t_ic]
type = FunctionIC
function = tic
variable = temperature
[../]
[./x_ic]
type = FunctionIC
function = xic
variable = xnacl
[../]
[]
[AuxKernels]
[./density]
type = MaterialRealAux
variable = density
property = density
[../]
[./enthalpy]
type = MaterialRealAux
variable = enthalpy
property = enthalpy
[../]
[./internal_energy]
type = MaterialRealAux
variable = internal_energy
property = e
[../]
[]
[FluidProperties]
[./water]
type = Water97FluidProperties
[../]
[./water_tab]
type = TabulatedBicubicFluidProperties
fp = water
save_file = false
[../]
[./brine]
type = BrineFluidProperties
water_fp = water_tab
[../]
[]
[Materials]
[./fp_mat]
type = MultiComponentFluidPropertiesMaterialPT
pressure = pressure
temperature = temperature
xmass = xnacl
fp = brine
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = dummy
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Postprocessors]
[./density0]
type = ElementalVariableValue
variable = density
elementid = 0
[../]
[./density1]
type = ElementalVariableValue
variable = density
elementid = 1
[../]
[./density2]
type = ElementalVariableValue
variable = density
elementid = 2
[../]
[./enthalpy0]
type = ElementalVariableValue
variable = enthalpy
elementid = 0
[../]
[./enthalpy1]
type = ElementalVariableValue
variable = enthalpy
elementid = 1
[../]
[./enthalpy2]
type = ElementalVariableValue
variable = enthalpy
elementid = 2
[../]
[./e0]
type = ElementalVariableValue
variable = internal_energy
elementid = 0
[../]
[./e1]
type = ElementalVariableValue
variable = internal_energy
elementid = 1
[../]
[./e2]
type = ElementalVariableValue
variable = internal_energy
elementid = 2
[../]
[]
[Outputs]
csv = true
file_base = brine_out
[]
(test/tests/postprocessors/side_integral/side_integral_functor.i)
[Mesh]
inactive = 'refine'
# U-shaped domains to have internal boundaries in
# a variety of directions
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1 1 1'
dy = '3 1'
ix = '4 5 3'
iy = '12 4'
subdomain_id = '1 2 1
1 1 1'
[]
[internal_boundary_dir1]
type = SideSetsBetweenSubdomainsGenerator
input = cmg
primary_block = 1
paired_block = 2
new_boundary = 'inside_1'
[]
[internal_boundary_dir2]
type = SideSetsBetweenSubdomainsGenerator
input = internal_boundary_dir1
primary_block = 2
paired_block = 1
new_boundary = 'inside_2'
[]
[refine]
type = RefineBlockGenerator
input = internal_boundary_dir2
block = '1 2'
refinement = '2 1'
[]
[]
[Variables]
[u]
type = MooseVariableFVReal
block = 1
[]
[]
[AuxVariables]
[v1]
type = MooseVariableFVReal
block = 1
[FVInitialCondition]
type = FVFunctionIC
function = 'x + y'
[]
[]
[v2]
type = MooseVariableFVReal
block = 2
[FVInitialCondition]
type = FVFunctionIC
function = '2*x*x - y'
[]
[]
[]
[Functions]
[f1]
type = ParsedFunction
expression = 'exp(x - y)'
[]
[]
[Materials]
[m1]
type = ADGenericFunctorMaterial
prop_names = 'm1'
prop_values = 'f1'
[]
[m2]
type = ADPiecewiseByBlockFunctorMaterial
prop_name = 'm2'
subdomain_to_prop_value = '1 12
2 4'
[]
[]
[FVKernels]
[diff]
type = FVDiffusion
variable = u
coeff = '1'
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = u
boundary = 3
value = 0
[]
[right]
type = FVDirichletBC
variable = u
boundary = 1
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Postprocessors]
# Mesh external boundaries integration
[ext_u]
type = ADSideIntegralFunctorPostprocessor
boundary = 'left top right'
functor = u
restrict_to_functors_domain = true
[]
[ext_v1]
type = ADSideIntegralFunctorPostprocessor
boundary = 'left right'
functor = v1
[]
[ext_v2]
type = ADSideIntegralFunctorPostprocessor
boundary = 'top'
functor = v2
restrict_to_functors_domain = true
[]
[ext_f1]
type = ADSideIntegralFunctorPostprocessor
boundary = 'left top right'
functor = f1
prefactor = f1
[]
[ext_m1]
type = ADSideIntegralFunctorPostprocessor
boundary = 'left top right'
functor = m1
restrict_to_functors_domain = true
[]
[ext_m2]
type = ADSideIntegralFunctorPostprocessor
boundary = 'left top right'
functor = m2
restrict_to_functors_domain = true
[]
# Internal to the mesh, but a side to the variables
# With orientation of normal 1->2
[int_s1_u]
type = ADSideIntegralFunctorPostprocessor
boundary = inside_1
functor = u
[]
[int_s1_v1]
type = ADSideIntegralFunctorPostprocessor
boundary = inside_1
functor = v1
[]
[int_s1_f1]
type = ADSideIntegralFunctorPostprocessor
boundary = inside_1
functor = f1
[]
[int_s1_m1]
type = ADSideIntegralFunctorPostprocessor
boundary = inside_1
functor = m1
[]
[int_s1_m2]
type = ADSideIntegralFunctorPostprocessor
boundary = inside_1
functor = m2
[]
# With orientation of normal 2->1
[int_s2_v2]
type = ADSideIntegralFunctorPostprocessor
boundary = inside_2
functor = v2
[]
[int_s2_f1]
type = ADSideIntegralFunctorPostprocessor
boundary = inside_2
functor = f1
[]
[int_s2_m1]
type = ADSideIntegralFunctorPostprocessor
boundary = inside_2
functor = m1
[]
[int_s2_m2]
type = ADSideIntegralFunctorPostprocessor
boundary = inside_2
functor = m2
[]
[]
[Outputs]
csv = true
exodus = true
[]
[Problem]
kernel_coverage_check = false
[]
(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
[]
(test/tests/transfers/multiapp_conservative_transfer/sub_nearest_point.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.01 # to make sure the meshes don't align
xmax = 0.49 # to make sure the meshes don't align
ymax = 1
nx = 10
ny = 10
[]
[block1]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0.2 0.2 0'
top_right = '0.3 0.8 0'
[]
[]
[Variables]
[sink]
family = MONOMIAL
order = CONSTANT
[]
[]
[Functions]
[sink_func]
type = ParsedFunction
expression = '5e2*x*(0.5-x)+5e1'
[]
[]
[Kernels]
[reaction]
type = Reaction
variable = sink
[]
[coupledforce]
type = BodyForce
variable = sink
function = sink_func
[]
[]
[AuxVariables]
[from_parent]
block = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[sink]
type = ElementIntegralVariablePostprocessor
block = 1
variable = sink
[]
[from_parent_pp]
type = ElementIntegralVariablePostprocessor
block = 1
variable = from_parent
execute_on = 'transfer'
[]
[]
[Outputs]
exodus = true
[console]
type = Console
execute_on = 'timestep_end timestep_begin'
[]
[]
(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
[]
(python/mms/test/mms_spatial.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 8
ny = 8
[]
[Variables]
[u][]
[]
[Kernels]
[diff]
type = ADDiffusion
variable = u
[]
[force]
type = BodyForce
variable = u
function = force
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = 'sin(2*pi*x)*sin(2*pi*y)'
[]
[force]
type = ParsedFunction
expression = '8*pi^2*sin(2*x*pi)*sin(2*y*pi)'
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
function = exact
boundary = 'left right top bottom'
[]
[]
[Postprocessors]
[error]
type = ElementL2Error
function = exact
variable = u
[]
[h]
type = AverageElementSize
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/time_integrators/tvdrk2/1d-linear.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -1
xmax = 1
nx = 20
elem_type = EDGE2
[]
[Functions]
[./ic]
type = ParsedFunction
expression = 0
[../]
[./forcing_fn]
type = ParsedFunction
expression = x
[../]
[./exact_fn]
type = ParsedFunction
expression = t*x
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
implicit = true
[../]
[./diff]
type = Diffusion
variable = u
implicit = false
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
implicit = false
[../]
[]
[ICs]
[./u_ic]
type = FunctionIC
variable = u
function = ic
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
[./TimeIntegrator]
type = ExplicitTVDRK2
[../]
solve_type = 'LINEAR'
start_time = 0.0
num_steps = 10
dt = 0.001
l_tol = 1e-15
[]
[Outputs]
exodus = true
perf_graph = true
[]
(test/tests/executioners/nullspace/singular_contaminated.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 10
nx = 8
[]
[Problem]
null_space_dimension = 1
transpose_null_space_dimension = 1
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./eig]
type = MassEigenKernel
variable = u
eigen_postprocessor = 1.0002920196258376e+01
eigen = false
[../]
[./force]
type = CoupledForce
variable = u
v = aux_v
[../]
[]
[AuxVariables]
[./aux_v]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = eigen_mode
[../]
[../]
[]
[AuxKernels]
[./set_source]
type = FunctionAux
variable = aux_v
function = contaminated_second_harmonic
execute_on = timestep_begin
[../]
[]
[Functions]
[./eigen_mode]
type = ParsedFunction
expression = 'sqrt(2.0 / L) * sin(mode * pi * x / L)'
symbol_names = 'L mode'
symbol_values = '10 1'
[../]
[./contaminated_second_harmonic]
type = ParsedFunction
expression = 'sqrt(2.0 / L) * sin(mode * pi * x / L) + a * sqrt(2.0 / L) * sin(pi * x / L)'
symbol_names = 'L mode a'
symbol_values = '10 2 1'
[../]
[]
[BCs]
[./homogeneous]
type = DirichletBC
variable = u
boundary = '0 1'
value = 0
[../]
[]
[VectorPostprocessors]
[./sample_solution]
type = LineValueSampler
variable = u
start_point = '0 0 0'
end_point = '10 0 0'
sort_by = x
num_points = 9
execute_on = timestep_end
[../]
[]
[Preconditioning]
[./prec]
type = SMP
full = true
[../]
[]
[Executioner]
type = SteadyWithNull
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_pc_side -snes_type -ksp_norm_type'
petsc_options_value = 'hypre boomeramg left ksponly preconditioned'
nl_rel_tol = 1.0e-14
nl_abs_tol = 1.0e-14
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/mms/channel-flow/cylindrical/cartesian-version/2d-rc-symmetry.i)
mu=1.1
rho=1.1
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
[]
[]
[Problem]
fv_bcs_integrity_check = false
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
two_term_boundary_expansion = true
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
[]
[v]
type = INSFVVelocityVariable
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[ICs]
[u]
type = FunctionIC
function = 'exact_u'
variable = u
[]
[v]
type = FunctionIC
function = 'exact_v'
variable = v
[]
[pressure]
type = FunctionIC
function = 'exact_p'
variable = pressure
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
rho = ${rho}
[]
[mass_forcing]
type = FVBodyForce
variable = pressure
function = forcing_p
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[u_forcing]
type = INSFVBodyForce
variable = u
functor = forcing_u
momentum_component = 'x'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[v_forcing]
type = INSFVBodyForce
variable = v
functor = forcing_v
momentum_component = 'y'
[]
[]
[FVBCs]
[u_wall]
type = INSFVNoSlipWallBC
variable = u
boundary = 'right'
function = 'exact_u'
[]
[v_wall]
type = INSFVNoSlipWallBC
variable = v
boundary = 'right'
function = 'exact_v'
[]
[u_axis]
type = INSFVSymmetryVelocityBC
variable = u
boundary = 'left'
mu = ${mu}
u = u
v = v
momentum_component = 'x'
[]
[v_axis]
type = INSFVSymmetryVelocityBC
variable = v
boundary = 'left'
mu = ${mu}
u = u
v = v
momentum_component = 'y'
[]
[p_axis]
type = INSFVSymmetryPressureBC
variable = pressure
boundary = 'left'
[]
[p]
type = INSFVOutletPressureBC
variable = pressure
function = 'exact_p'
boundary = 'top'
[]
[inlet_u]
type = INSFVInletVelocityBC
variable = u
function = 'exact_u'
boundary = 'bottom'
[]
[inlet_v]
type = INSFVInletVelocityBC
variable = v
function = 'exact_v'
boundary = 'bottom'
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'sin(x*pi)*cos(y*pi)'
[]
[forcing_u]
type = ParsedFunction
expression = '2*pi^2*mu*sin(x*pi)*cos(y*pi) - 2*pi*rho*sin(x*pi)*sin(y*pi)*cos(1.3*x)*cos(y*pi) + 2*pi*rho*sin(x*pi)*cos(x*pi)*cos(y*pi)^2 - 1.5*sin(1.5*x)*cos(1.6*y)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_v]
type = ParsedFunction
expression = 'cos(1.3*x)*cos(y*pi)'
[]
[forcing_v]
type = ParsedFunction
expression = '1.69*mu*cos(1.3*x)*cos(y*pi) + pi^2*mu*cos(1.3*x)*cos(y*pi) - 1.3*rho*sin(1.3*x)*sin(x*pi)*cos(y*pi)^2 - 2*pi*rho*sin(y*pi)*cos(1.3*x)^2*cos(y*pi) + pi*rho*cos(1.3*x)*cos(x*pi)*cos(y*pi)^2 - 1.6*sin(1.6*y)*cos(1.5*x)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'cos(1.5*x)*cos(1.6*y)'
[]
[forcing_p]
type = ParsedFunction
expression = '-pi*rho*sin(y*pi)*cos(1.3*x) + pi*rho*cos(x*pi)*cos(y*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO superlu_dist'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
[]
[Outputs]
exodus = false
csv = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[./L2u]
type = ElementL2FunctorError
approximate = u
exact = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[./L2v]
type = ElementL2FunctorError
approximate = v
exact = exact_v
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[./L2p]
approximate = pressure
exact = exact_p
type = ElementL2FunctorError
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[]
(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/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/scalar_kernel/2dsole.i)
# 2D with mixed conditions on stress/strain
[GlobalParams]
displacements = 'disp_x disp_y'
large_kinematics = false
[]
[Mesh]
[base]
type = FileMeshGenerator
file = '2d.exo'
[]
[sidesets]
type = SideSetsFromNormalsGenerator
input = base
normals = '-1 0 0
1 0 0
0 -1 0
0 1 0'
fixed_normal = true
new_boundary = 'left right bottom top'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[hvar]
family = SCALAR
order = FIRST
[]
[hvarA]
family = SCALAR
order = SECOND
[]
[]
[AuxVariables]
[sxx]
family = MONOMIAL
order = CONSTANT
[]
[syy]
family = MONOMIAL
order = CONSTANT
[]
[sxy]
family = MONOMIAL
order = CONSTANT
[]
[exx]
family = MONOMIAL
order = CONSTANT
[]
[eyy]
family = MONOMIAL
order = CONSTANT
[]
[exy]
family = MONOMIAL
order = CONSTANT
[]
[]
[Kernels]
[sdx0]
type = HomogenizedTotalLagrangianStressDivergenceA
variable = disp_x
component = 0
macro_var = hvar
macro_other = hvarA
prime_scalar = 0
constraint_types = ${constraint_types}
targets = ${targets}
[]
[sdy0]
type = HomogenizedTotalLagrangianStressDivergenceA
variable = disp_y
component = 1
macro_var = hvar
macro_other = hvarA
prime_scalar = 0
constraint_types = ${constraint_types}
targets = ${targets}
[]
[sdx1]
type = HomogenizedTotalLagrangianStressDivergenceA
variable = disp_x
component = 0
macro_var = hvarA
macro_other = hvar
prime_scalar = 1
constraint_types = ${constraint_types}
targets = ${targets}
[]
[sdy1]
type = HomogenizedTotalLagrangianStressDivergenceA
variable = disp_y
component = 1
macro_var = hvarA
macro_other = hvar
prime_scalar = 1
constraint_types = ${constraint_types}
targets = ${targets}
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[AuxKernels]
[sxx]
type = RankTwoAux
variable = sxx
rank_two_tensor = pk1_stress
index_i = 0
index_j = 0
[]
[syy]
type = RankTwoAux
variable = syy
rank_two_tensor = pk1_stress
index_i = 1
index_j = 1
[]
[sxy]
type = RankTwoAux
variable = sxy
rank_two_tensor = pk1_stress
index_i = 0
index_j = 1
[]
[exx]
type = RankTwoAux
variable = exx
rank_two_tensor = mechanical_strain
index_i = 0
index_j = 0
[]
[eyy]
type = RankTwoAux
variable = eyy
rank_two_tensor = mechanical_strain
index_i = 1
index_j = 1
[]
[exy]
type = RankTwoAux
variable = exy
rank_two_tensor = mechanical_strain
index_i = 0
index_j = 1
[]
[]
[Functions]
[strain11]
type = ParsedFunction
value = '4.0e-2*t'
[]
[strain22]
type = ParsedFunction
value = '-2.0e-2*t'
[]
[strain12]
type = ParsedFunction
value = '1.0e-2*t'
[]
[stress11]
type = ParsedFunction
value = '400*t'
[]
[stress22]
type = ParsedFunction
value = '-200*t'
[]
[stress12]
type = ParsedFunction
value = '100*t'
[]
[]
[BCs]
[Periodic]
[x]
variable = disp_x
auto_direction = 'x y'
[]
[y]
variable = disp_y
auto_direction = 'x y'
[]
[]
[fix1_x]
type = DirichletBC
boundary = "fix1"
variable = disp_x
value = 0
[]
[fix1_y]
type = DirichletBC
boundary = "fix1"
variable = disp_y
value = 0
[]
[fix2_y]
type = DirichletBC
boundary = "fix2"
variable = disp_y
value = 0
[]
[]
[Materials]
[elastic_tensor_1]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
block = '1'
[]
[elastic_tensor_2]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 120000.0
poissons_ratio = 0.21
block = '2'
[]
[elastic_tensor_3]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 80000.0
poissons_ratio = 0.4
block = '3'
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
homogenization_gradient_names = 'homogenization_gradient'
[]
[compute_homogenization_gradient]
type = ComputeHomogenizedLagrangianStrainA
macro_gradientA = hvar
macro_gradient = hvarA
constraint_types = ${constraint_types}
targets = ${targets}
[]
[]
[Postprocessors]
[sxx]
type = ElementAverageValue
variable = sxx
execute_on = 'initial timestep_end'
[]
[syy]
type = ElementAverageValue
variable = syy
execute_on = 'initial timestep_end'
[]
[sxy]
type = ElementAverageValue
variable = sxy
execute_on = 'initial timestep_end'
[]
[exx]
type = ElementAverageValue
variable = exx
execute_on = 'initial timestep_end'
[]
[eyy]
type = ElementAverageValue
variable = eyy
execute_on = 'initial timestep_end'
[]
[exy]
type = ElementAverageValue
variable = exy
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
solve_type = 'newton'
# solve_type = 'PJFNK'
line_search = none
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 2
l_tol = 1e-14
nl_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 1.0
[]
[Outputs]
csv = true
[]
(modules/combined/test/tests/beam_eigenstrain_transfer/subapp2_uo_transfer.i)
# This test involves only thermal expansion strains on a 2x2x2 cube of approximate
# steel material. An initial temperature of 25 degrees C is given for the material,
# and an auxkernel is used to calculate the temperature in the entire cube to
# raise the temperature each time step. After the first timestep,in which the
# temperature jumps, the temperature increases by 6.25C each timestep.
# The thermal strain increment should therefore be
# 6.25 C * 1.3e-5 1/C = 8.125e-5 m/m.
# This test is also designed to be used to identify problems with restart files
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 5
xmin = 0.0
xmax = 0.5
ymin = 0.0
ymax = 0.150080
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./temp]
[../]
[./axial_strain]
order = FIRST
family = MONOMIAL
[../]
[]
[Functions]
[./temperature_load]
type = ParsedFunction
expression = t*(1000.0)+300.0
[../]
[]
[Modules]
[./TensorMechanics]
[./Master]
[./all]
strain = SMALL
incremental = true
add_variables = true
eigenstrain_names = eigenstrain
[../]
[../]
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = temperature_load
[../]
[./axial_strain]
type = RankTwoAux
variable = axial_strain
rank_two_tensor = total_strain
index_i = 1
index_j = 1
execute_on = timestep_end
[../]
[]
[BCs]
[./x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 298
thermal_expansion_coeff = 1.3e-5
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Executioner]
type = Transient
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
end_time = 0.075
dt = 0.0125
dtmin = 0.0001
[]
[Outputs]
exodus = true
[]
[VectorPostprocessors]
[./axial_str]
type = LineValueSampler
warn_discontinuous_face_values = false
start_point = '0.5 0.0 0.0'
end_point = '0.5 0.150080 0.0'
variable = axial_strain
num_points = 11
sort_by = 'id'
[../]
[]
[Postprocessors]
[./end_disp]
type = PointValue
variable = disp_y
point = '0.5 0.150080 0.0'
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_no_parts_steady_stabilized_second_order.i)
# This input file tests several different things:
# .) The axisymmetric (RZ) form of the governing equations.
# .) An open boundary.
# .) Not integrating the pressure by parts, thereby requiring a pressure pin.
# .) Natural boundary condition at the outlet.
[GlobalParams]
integrate_p_by_parts = false
laplace = true
gravity = '0 0 0'
supg = true
pspg = true
order = SECOND
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = Newton
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Variables]
[./vel_x]
# Velocity in radial (r) direction
[../]
[./vel_y]
# Velocity in axial (z) direction
[../]
[./p]
order = FIRST
[../]
[]
[BCs]
[./p_corner]
# This is required, because pressure term is *not* integrated by parts.
type = DirichletBC
boundary = top_right
value = 0
variable = p
[../]
[./u_in]
type = DirichletBC
boundary = bottom
variable = vel_x
value = 0
[../]
[./v_in]
type = FunctionDirichletBC
boundary = bottom
variable = vel_y
function = 'inlet_func'
[../]
[./u_axis_and_walls]
type = DirichletBC
boundary = 'left right'
variable = vel_x
value = 0
[../]
[./v_no_slip]
type = DirichletBC
boundary = 'right'
variable = vel_y
value = 0
[../]
[]
[Kernels]
[./mass]
type = INSMassRZ
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 'volume'
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(test/tests/misc/check_error/wrong_displacement_order.i)
[Mesh]
type = GeneratedMesh
dim = 2
# Mesh uses second-order elements
elem_type = QUAD8
displacements = 'disp_x disp_y'
block_name = pore
block_id = 0
[]
[Variables]
[./temperature]
order = SECOND
[./InitialCondition]
type = ConstantIC
value = 0.0
[../]
[../]
[]
# We are *not* allowed to use FIRST-order displacement vars!
[AuxVariables]
[./disp_x]
[../]
[./disp_y]
[./InitialCondition]
type = FunctionIC
function = displ
[../]
[../]
[]
[Functions]
[./displ]
type = ParsedFunction
expression = -1/2*x*(y-0.5)
[../]
[]
[Kernels]
[./diffusion]
type = Diffusion
variable = temperature
use_displaced_mesh = true
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = temperature
boundary = left
value = 1
use_displaced_mesh = true
[../]
[./right]
type = DirichletBC
variable = temperature
boundary = right
value = 0
use_displaced_mesh = true
[../]
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = PJFNK
[../]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
line_search = none
nl_rel_tol = 1e-6
nl_max_its = 10
l_tol = 1e-8
l_max_its = 50
num_steps = 2 # 200
nl_abs_tol = 1e-10
nl_rel_step_tol = 1e-10
nl_abs_step_tol = 1e-10
[./TimeStepper]
type = ConstantDT
dt = 0.001
[../]
dtmin = .001
[]
(test/tests/linearfvkernels/diffusion-reaction-advection/advection-diffusion-reaction-1d.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 2
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = diff_coeff_func
use_nonorthogonal_correction = false
[]
[advection]
type = LinearFVAdvection
variable = u
velocity = "0.5 0 0"
advected_interp_method = average
[]
[reaction]
type = LinearFVReaction
variable = u
coeff = coeff_func
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
inactive = "outflow"
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "left right"
functor = analytic_solution
[]
[outflow]
type = LinearFVAdvectionDiffusionOutflowBC
variable = u
boundary = "right"
use_two_term_expansion = true
[]
[]
[Functions]
[diff_coeff_func]
type = ParsedFunction
expression = '1+0.5*x'
[]
[coeff_func]
type = ParsedFunction
expression = '1+1/(1+x)'
[]
[source_func]
type = ParsedFunction
expression = '(1+1/(x+1))*(sin(pi/2*x)+1.5)+0.25*pi*pi*(0.5*x+1)*sin(pi/2*x)'
[]
[analytic_solution]
type = ParsedFunction
expression = 'sin(pi/2*x)+1.5'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = FINAL
[]
[error]
type = ElementL2FunctorError
approximate = u
exact = analytic_solution
execute_on = FINAL
[]
[]
[Executioner]
type = LinearPicardSteady
linear_systems_to_solve = u_sys
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
[csv]
type = CSV
execute_on = FINAL
[]
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/convergence/3D/dirichlet.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 = 4
ny = 4
nz = 4
[]
[]
[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
[]
[]
[Functions]
[pullx]
type = ParsedFunction
expression = '0.4 * t'
[]
[pully]
type = ParsedFunction
expression = '-0.2 * t'
[]
[pullz]
type = ParsedFunction
expression = '0.3 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = left
variable = disp_y
value = 0.0
[]
[leftz]
type = DirichletBC
preset = true
boundary = left
variable = disp_z
value = 0.0
[]
[pull_x]
type = FunctionDirichletBC
boundary = right
variable = disp_x
function = pullx
preset = true
[]
[pull_y]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = pully
preset = true
[]
[pull_z]
type = FunctionDirichletBC
boundary = right
variable = disp_z
function = pullz
preset = true
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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 = 0.2
dtmin = 0.2
end_time = 1.0
[]
[Postprocessors]
[nonlin]
type = NumNonlinearIterations
[]
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/kernels/ad_mat_coupled_force/aux_test.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 4
ny = 4
dim = 2
[]
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[a]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[diff]
type = ADDiffusion
variable = u
[]
[force]
type = ADMatCoupledForce
variable = u
v = a
mat_prop_coef = test_prop
[]
[]
[AuxKernels]
[a]
variable = a
type = ConstantAux
value = 10
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = ADDirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Functions]
[test_func]
type = ParsedFunction
expression = 'x'
[]
[]
[Materials]
[test_prop]
type = ADGenericFunctionMaterial
prop_names = test_prop
prop_values = test_func
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
(modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined_constM_action.i)
# This file uses a PorousFlowFullySaturated Action. The equivalent non-Action input file is pp_generation_unconfined_constM.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, s, has units m^3/second/m^3. 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/second/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
[]
[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'
[]
[]
[PorousFlowFullySaturated]
porepressure = porepressure
biot_coefficient = 0.3
coupling_type = HydroMechanical
displacements = 'disp_x disp_y disp_z'
gravity = '0 0 0'
fp = simple_fluid
stabilization = Full
[]
[Kernels]
[source]
type = BodyForce
function = '0.1*exp(8.163265306*0.1*t/3.3333333333)'
variable = porepressure
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 3.3333333333
density0 = 1
thermal_expansion = 0
viscosity = 1
[]
[]
[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 = PorousFlowPorosityHMBiotModulus
porosity_zero = 0.1
biot_coefficient = 0.3
solid_bulk = 2
constant_fluid_bulk_modulus = 3.3333333333
constant_biot_modulus = 10.0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 1 0 0 0 1' # unimportant
[]
[]
[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
[]
[]
[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_constM_action
[csv]
type = CSV
[]
[]
(modules/xfem/test/tests/nucleation_uo/nucleate_AllEdgeCracks.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[XFEM]
geometric_cut_userobjects = 'cut_mesh2'
qrule = volfrac
output_cut_plane = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 20
xmin = 0
xmax = 1.0
ymin = 0.0
ymax = 2.0
elem_type = QUAD4
[]
[top_left]
type = BoundingBoxNodeSetGenerator
new_boundary = pull_top_left
bottom_left = '-0.01 1.99 0'
top_right = '0.11 2.01 0'
input = gen
[]
[]
[DomainIntegral]
integrals = 'InteractionIntegralKI InteractionIntegralKII'
displacements = 'disp_x disp_y'
crack_front_points_provider = cut_mesh2
2d=true
number_points_from_provider = 0
crack_direction_method = CurvedCrackFront
radius_inner = '0.15'
radius_outer = '0.45'
poissons_ratio = 0.3
youngs_modulus = 207000
block = 0
incremental = true
used_by_xfem_to_grow_crack = true
[]
[UserObjects]
[nucleate]
type = MeshCut2DRankTwoTensorNucleation
tensor = stress
scalar_type = MaxPrincipal
nucleation_threshold = 180
initiate_on_boundary = 'left'
nucleation_length = .2
nucleation_radius = .21
[]
[cut_mesh2]
type = MeshCut2DFractureUserObject
mesh_file = make_edge_crack_in.e
k_critical=500000 #Large so that cracks will not grow
growth_increment = 0.11
nucleate_uo = nucleate
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
planar_formulation = plane_strain
add_variables = true
generate_output = 'stress_xx stress_yy vonmises_stress max_principal_stress'
[]
[]
[Functions]
[bc_pull_top]
type = ParsedFunction
expression = 0.0005*t
[]
[]
[BCs]
[top_edges]
type = FunctionDirichletBC
boundary = 'pull_top_left'
variable = disp_y
function = bc_pull_top
[]
[bottom_x]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[]
[bottom_y]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
line_search = 'none'
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
l_max_its = 100
l_tol = 1e-2
nl_max_its = 15
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
start_time = 0.0
dt = 1.0
end_time = 5
max_xfem_update = 100
[]
[Outputs]
csv=true
exodus=true
execute_on = TIMESTEP_END
[]
(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
[]
(test/tests/misc/check_error/uo_vector_pps_name_collision_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 5
ny = 5
elem_type = QUAD4
[]
[UserObjects]
[./ud]
type = MTUserObject
scalar = 2
vector = '9 7 5'
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = -2
[../]
[./exact_fn]
type = ParsedFunction
expression = x*x
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = FIRST
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = UserObjectKernel
variable = u
user_object = ud
[]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
function = exact_fn
boundary = '0 1 2 3'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[VectorPostprocessors]
[./ud]
type = ConstantVectorPostprocessor
value = 1
[]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out
[]
(test/tests/variables/fe_hermite/hermite-3-2d.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 5
ny = 5
elem_type = QUAD9
[]
[Functions]
[./bc_fnt]
type = ParsedFunction
expression = 3*y*y
[../]
[./bc_fnb]
type = ParsedFunction
expression = -3*y*y
[../]
[./bc_fnl]
type = ParsedFunction
expression = -3*x*x
[../]
[./bc_fnr]
type = ParsedFunction
expression = 3*x*x
[../]
[./forcing_fn]
type = ParsedFunction
expression = -6*x-6*y+(x*x*x)+(y*y*y)
[../]
[./solution]
type = ParsedGradFunction
value = (x*x*x)+(y*y*y)
grad_x = 3*x*x
grad_y = 3*y*y
[../]
[]
[Variables]
[./u]
order = THIRD
family = HERMITE
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./bc_top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = bc_fnt
[../]
[./bc_bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bc_fnb
[../]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_by_parts_steady_stabilized_second_order.i)
# This input file tests several different things:
# .) The axisymmetric (RZ) form of the governing equations.
# .) An open boundary.
# .) Not integrating the pressure by parts, thereby requiring a pressure pin.
# .) Natural boundary condition at the outlet.
[GlobalParams]
integrate_p_by_parts = true
laplace = true
gravity = '0 0 0'
supg = true
pspg = true
order = SECOND
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = Newton
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Variables]
[./vel_x]
# Velocity in radial (r) direction
[../]
[./vel_y]
# Velocity in axial (z) direction
[../]
[./p]
order = FIRST
[../]
[]
[BCs]
[./u_in]
type = DirichletBC
boundary = bottom
variable = vel_x
value = 0
[../]
[./v_in]
type = FunctionDirichletBC
boundary = bottom
variable = vel_y
function = 'inlet_func'
[../]
[./u_axis_and_walls]
type = DirichletBC
boundary = 'left right'
variable = vel_x
value = 0
[../]
[./v_no_slip]
type = DirichletBC
boundary = 'right'
variable = vel_y
value = 0
[../]
[]
[Kernels]
[./mass]
type = INSMassRZ
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 'volume'
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(modules/solid_mechanics/test/tests/ad_smeared_cracking/cracking_function.i)
#
# Simple pull test for cracking. This tests the option to prescribe the
# cracking strength using an AuxVariable. In this case, an elemental
# AuxVariable is used, and a function is used to prescribe its value.
# One of the elements is weaker than the others, so the crack localizes
# in that element.
#
[Mesh]
file = plate.e
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./cracking_stress_fn]
order = CONSTANT
family = MONOMIAL
[../]
[./crack_flags2]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./displ]
type = PiecewiseLinear
x = '0 0.1 0.2 0.3 0.4'
y = '0 0.001 0 -0.001 0'
[../]
[./fstress]
type = ParsedFunction
expression = 'if(x > 0.667, 1.1e6, 1.2e6)'
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_zx strain_xx strain_yy strain_xy strain_yz'
use_automatic_differentiation = true
[../]
[]
[AuxKernels]
[./cracking_stress_fn]
type = FunctionAux
variable = cracking_stress_fn
function = fstress
execute_on = initial
[../]
[./crack_flags2]
type = ADMaterialRealVectorValueAux
property = crack_flags
variable = crack_flags2
component = 2
[../]
[]
[BCs]
[./pull]
type = ADFunctionDirichletBC
variable = disp_x
boundary = '3 4'
function = displ
[../]
[./pin_x]
type = ADDirichletBC
variable = disp_x
boundary = '1 2'
value = 0
[../]
[./pin_y]
type = ADDirichletBC
variable = disp_y
boundary = '1 4'
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 200.0e7
poissons_ratio = 0.0
[../]
[./elastic_stress]
type = ADComputeSmearedCrackingStress
cracking_stress = cracking_stress_fn
cracked_elasticity_type = FULL
softening_models = abrupt_softening
[../]
[./abrupt_softening]
type = ADAbruptSoftening
residual_stress = 0.0
[../]
[]
[Postprocessors]
[./elem_stress_xx]
type = ElementalVariableValue
variable = stress_xx
elementid = 2
[../]
[./elem_strain_xx]
type = ElementalVariableValue
variable = strain_xx
elementid = 2
[../]
[./elem_crack_flags_x]
type = ElementalVariableValue
variable = crack_flags2
elementid = 2
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101 '
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-8
nl_abs_tol = 1e-6
l_tol = 1e-5
start_time = 0.0
end_time = 0.2
dt = 0.0025
[]
[Outputs]
exodus = true
[]
(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/navier_stokes/test/tests/auxkernels/reynolds-number-functor-aux/fe.i)
rho=1
mu=1
[GlobalParams]
gravity = '0 0 0'
pspg = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[]
[]
[AuxVariables]
[Reynolds]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[Reynolds]
type = ReynoldsNumberFunctorAux
variable = Reynolds
speed = speed
rho = ${rho}
mu = ${mu}
[]
[]
[Variables]
[vel_x]
[]
[vel_y]
[]
[p]
[]
[]
[Kernels]
# mass
[mass]
type = INSMass
variable = p
u = vel_x
v = vel_y
pressure = p
[]
# x-momentum, space
[x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[]
# y-momentum, space
[y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[]
[]
[BCs]
[x_no_slip]
type = DirichletBC
variable = vel_x
boundary = 'bottom right left'
value = 0.0
[]
[lid]
type = FunctionDirichletBC
variable = vel_x
boundary = 'top'
function = 'lid_function'
[]
[y_no_slip]
type = DirichletBC
variable = vel_y
boundary = 'bottom right top left'
value = 0.0
[]
[pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[speed]
type = ADVectorMagnitudeFunctorMaterial
x_functor = vel_x
y_functor = vel_y
vector_magnitude_name = speed
[]
[]
[Functions]
[lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type'
petsc_options_value = 'asm 2 lu'
line_search = 'none'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/fvkernels/mms/grad-reconstruction/cartesian.i)
a=1.1
diff=1.1
[Mesh]
[./gen_mesh]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
[../]
[]
[Variables]
[./v]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 1
[../]
[]
[FVKernels]
[./advection]
type = FVElementalAdvection
variable = v
velocity = '${a} ${fparse 2 * a} 0'
[../]
[reaction]
type = FVReaction
variable = v
[]
[diff_v]
type = FVDiffusion
variable = v
coeff = ${diff}
[]
[body_v]
type = FVBodyForce
variable = v
function = 'forcing'
[]
[]
[FVBCs]
[diri]
type = FVFunctionDirichletBC
boundary = 'left right top bottom'
function = 'exact'
variable = v
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = 'sin(x)*cos(y)'
[]
[forcing]
type = ParsedFunction
expression = '-2*a*sin(x)*sin(y) + a*cos(x)*cos(y) + 2*diff*sin(x)*cos(y) + sin(x)*cos(y)'
symbol_names = 'a diff'
symbol_values = '${a} ${diff}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_shift_type -sub_pc_type'
petsc_options_value = 'asm NONZERO lu'
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[./error]
type = ElementL2Error
variable = v
function = exact
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(test/tests/controls/action_control/action_control_test.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 3
ny = 3
[]
[]
[Testing/LotsOfDiffusion/lots]
number = 10
array = true
n_components = 4
diffusion_coefficients = '1 1 1 1'
add_reaction = true
[]
[Functions]
[dc]
type = ParsedFunction
expression = t+1
[]
[]
[Controls]
[setdc]
type = RealVectorFunctionControl
function = dc
parameter = Testing/LotsOfDiffusion/lots/diffusion_coefficients
execute_on = timestep_begin
[]
[]
[Executioner]
type = Transient
num_steps = 10
[]
[Outputs]
exodus = true
[]
(test/tests/time_steppers/timesequence_stepper/timesequence_restart1.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*t*(x*x+y*y)
[../]
[./forcing_fn]
type = ParsedFunction
expression = 2*t*(x*x+y*y)-4*t*t
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]
[ICs]
[./u_var]
type = FunctionIC
variable = u
function = exact_fn
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[../]
[]
[Executioner]
type = Transient
end_time = 4.0
[./TimeStepper]
type = TimeSequenceStepper
time_sequence = '0 0.85 1.3 2 4'
[../]
[]
[Outputs]
exodus = true
[./checkpoint]
type = Checkpoint
num_files = 4
[../]
[]
(test/tests/kernels/simple_transient_diffusion/ill_conditioned_simple_diffusion.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 2
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = MatDiffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
preset = false
boundary = left
value = 0
[../]
[./right]
type = FunctionDirichletBC
variable = u
preset = false
boundary = right
function = constant
[../]
[]
[Functions]
[constant]
type = ParsedFunction
expression = '1'
[]
[ramp]
type = ParsedFunction
expression = 't'
[]
[]
[Materials]
active = 'constant'
[constant]
type = GenericConstantMaterial
prop_names = 'D'
prop_values = '1e20'
[]
[function]
type = GenericFunctionMaterial
prop_names = 'D'
prop_values = '10^(t-1)'
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 2
dtmin = 2
solve_type = NEWTON
petsc_options = '-pc_svd_monitor -ksp_view_pmat -snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -snes_stol'
petsc_options_value = 'svd 0'
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/cp_eigenstrains/volumetric_eigenstrain_parabolic.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[cube]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
elem_type = HEX27
[]
[]
[AuxVariables]
[temperature]
order = FIRST
family = LAGRANGE
[]
[linear_void_strain]
order = CONSTANT
family = MONOMIAL
[]
[e_total_xx]
order = CONSTANT
family = MONOMIAL
[]
[e_total_yy]
order = CONSTANT
family = MONOMIAL
[]
[e_void_xx]
order = CONSTANT
family = MONOMIAL
[]
[e_void_yy]
order = CONSTANT
family = MONOMIAL
[]
[e_void_zz]
order = CONSTANT
family = MONOMIAL
[]
[f_void_zz]
order = CONSTANT
family = MONOMIAL
[]
[pk2_zz]
order = CONSTANT
family = MONOMIAL
[]
[fp_zz]
order = CONSTANT
family = MONOMIAL
[]
[]
[Physics/SolidMechanics/QuasiStatic/all]
strain = FINITE
incremental = true
add_variables = true
[]
[Functions]
[temperature_ramp]
type = ParsedFunction
expression = '600.0 + t'
[]
[]
[AuxKernels]
[temperature]
type = FunctionAux
variable = temperature
function = 'temperature_ramp'
execute_on = timestep_begin
[]
[linear_void_strain]
type = MaterialRealAux
variable = linear_void_strain
property = equivalent_linear_change
execute_on = timestep_end
[]
[e_total_xx]
type = RankTwoAux
variable = e_total_xx
rank_two_tensor = total_lagrangian_strain
index_j = 0
index_i = 0
execute_on = timestep_end
[]
[e_total_yy]
type = RankTwoAux
variable = e_total_yy
rank_two_tensor = total_lagrangian_strain
index_j = 1
index_i = 1
execute_on = timestep_end
[]
[e_void_xx]
type = RankTwoAux
variable = e_void_xx
rank_two_tensor = void_eigenstrain
index_j = 0
index_i = 0
execute_on = timestep_end
[]
[e_void_yy]
type = RankTwoAux
variable = e_void_yy
rank_two_tensor = void_eigenstrain
index_j = 1
index_i = 1
execute_on = timestep_end
[]
[e_void_zz]
type = RankTwoAux
variable = e_void_zz
rank_two_tensor = void_eigenstrain
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[f_void_zz]
type = RankTwoAux
variable = f_void_zz
rank_two_tensor = volumetric_deformation_gradient
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[pk2_zz]
type = RankTwoAux
variable = pk2_zz
rank_two_tensor = second_piola_kirchhoff_stress
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[fp_zz]
type = RankTwoAux
variable = fp_zz
rank_two_tensor = plastic_deformation_gradient
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[]
[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
[]
[hold_front]
type = DirichletBC
variable = disp_z
boundary = front
value = 0
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensorCP
C_ijkl = '1.98e5 1.25e5 1.25e5 1.98e5 1.25e5 1.98e5 1.22e5 1.22e5 1.22e5'
fill_method = symmetric9
[]
[stress]
type = ComputeMultipleCrystalPlasticityStress
crystal_plasticity_models = 'trial_xtalpl'
eigenstrain_names = void_eigenstrain
tan_mod_type = exact
line_search_method = CUT_HALF
use_line_search = true
maximum_substep_iteration = 5
[]
[trial_xtalpl]
type = CrystalPlasticityKalidindiUpdate
number_slip_systems = 12
slip_sys_file_name = input_slip_sys.txt
[]
[void_eigenstrain]
type = ComputeCrystalPlasticityVolumetricEigenstrain
eigenstrain_name = void_eigenstrain
deformation_gradient_name = volumetric_deformation_gradient
mean_spherical_void_radius = void_radius
spherical_void_number_density = void_density
[]
[void_density]
type = ParsedMaterial
property_name = void_density
coupled_variables = temperature
expression = 'if(temperature<601.0, 1.0e6, (-1.0e6 * (temperature - 603)^2.0 + 5.0e6))'
[]
[void_radius]
type = ParsedMaterial
property_name = void_radius
coupled_variables = temperature
expression = 'if(temperature<601.0, 1.0e-6, (-2.25e-6 * (temperature - 603)^2.0 + 1.0e-5))'
[]
[]
[Postprocessors]
[linear_void_strain]
type = ElementAverageValue
variable = linear_void_strain
[]
[e_void_xx]
type = ElementAverageValue
variable = e_void_xx
[]
[e_void_yy]
type = ElementAverageValue
variable = e_void_yy
[]
[e_void_zz]
type = ElementAverageValue
variable = e_void_zz
[]
[f_void_zz]
type = ElementAverageValue
variable = f_void_zz
[]
[void_density]
type = ElementAverageMaterialProperty
mat_prop = void_density
execute_on = TIMESTEP_END
[]
[void_radius]
type = ElementAverageMaterialProperty
mat_prop = void_radius
execute_on = TIMESTEP_END
[]
[pk2_zz]
type = ElementAverageValue
variable = pk2_zz
[]
[fp_zz]
type = ElementAverageValue
variable = fp_zz
[]
[e_total_xx]
type = ElementAverageValue
variable = e_total_xx
[]
[e_total_yy]
type = ElementAverageValue
variable = e_total_yy
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
line_search = 'none'
nl_abs_tol = 1e-12
nl_rel_tol = 1e-8
nl_forced_its = 1
dt = 1.0
dtmin = 1.0e-4
end_time = 5.0
[]
[Outputs]
csv = true
perf_graph = true
[]
(test/tests/userobjects/element_subdomain_modifier/stateful_property.i)
[Problem]
solve = false
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 16
ny = 16
[]
[left]
type = SubdomainBoundingBoxGenerator
input = 'gen'
block_id = 1
bottom_left = '0 0 0'
top_right = '0.25 1 1'
[]
[right]
type = SubdomainBoundingBoxGenerator
input = 'left'
block_id = 2
bottom_left = '0.25 0 0'
top_right = '1 1 1'
[]
[]
[UserObjects]
[moving_circle]
type = CoupledVarThresholdElementSubdomainModifier
coupled_var = 'phi'
block = 2
criterion_type = BELOW
threshold = 0
subdomain_id = 1
moving_boundary_name = moving_boundary
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[Functions]
[moving_circle]
type = ParsedFunction
expression = '(x-t)^2+(y)^2-0.5^2'
[]
[]
[AuxVariables]
[phi]
[]
[]
[AuxKernels]
[phi]
type = FunctionAux
variable = phi
function = moving_circle
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[Materials]
[stateful]
type = StatefulMaterial
initial_diffusivity = 0.5
multiplier = 2
block = 1
outputs = exodus
[]
[non_stateful]
type = GenericConstantMaterial
prop_names = 'diffusivity'
prop_values = '0.5'
block = 2
outputs = exodus
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 3
[]
[Outputs]
exodus = true
[]
(test/tests/kernels/ad_mat_coupled_force/fe_test.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 4
ny = 4
dim = 2
[]
[]
[Variables]
[u]
[]
[v]
[]
[]
[Kernels]
[diff_u]
type = ADDiffusion
variable = u
[]
[force_u]
type = ADMatCoupledForce
variable = u
v = v
mat_prop_coef = test_prop
[]
[diff_v]
type = ADDiffusion
variable = v
[]
[]
[BCs]
[left_u]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right_u]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 5
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 3
[]
[]
[Functions]
[test_func]
type = ParsedFunction
expression = 'x'
[]
[]
[Materials]
[test_prop]
type = ADGenericFunctionMaterial
prop_names = test_prop
prop_values = test_func
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
[]
(modules/stochastic_tools/examples/parameter_study/nonlin_diff_react/nonlin_diff_react_sub.i)
[Functions]
[source]
type = ParsedFunction
expression = "100 * sin(2 * pi * x) * sin(2 * pi * y)"
[]
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 50
xmin = 0
xmax = 1
ny = 50
ymin = 0
ymax = 1
[]
[]
[Variables]
[U]
family = lagrange
order = first
[]
[]
[Kernels]
[diffusion]
type = Diffusion
variable = U
[]
[nonlin_function]
type = ExponentialReaction
variable = U
mu1 = 0.3
mu2 = 9
[]
[source]
type = BodyForce
variable = U
function = source
[]
[]
[BCs]
[dirichlet_all]
type = DirichletBC
variable = U
boundary = 'left right top bottom'
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[max]
type = ElementExtremeValue
variable = U
[]
[min]
type = ElementExtremeValue
variable = U
value_type = min
[]
[average]
type = ElementAverageValue
variable = U
[]
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Outputs]
[]
(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/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/solid_mechanics/test/tests/umat/predef/dpredef.i)
# Testing the UMAT Interface - linear elastic model using the large strain formulation.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[]
[Functions]
[top_pull]
type = ParsedFunction
expression = -t*10
[]
[]
[AuxVariables]
[strain_yy]
family = MONOMIAL
order = FIRST
[]
[]
[AuxKernels]
[strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 1
index_j = 1
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
[]
[]
[BCs]
[Pressure]
[bc_presssure]
boundary = top
function = top_pull
[]
[]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[z_bot]
type = DirichletBC
variable = disp_z
boundary = front
value = 0.0
[]
[]
[Materials]
# 1. Active for UMAT run
[umat]
type = AbaqusUMATStress
constant_properties = '1000 0.3'
plugin = '../../../plugins/elastic_dpredef'
num_state_vars = 0
external_fields = 'strain_yy'
use_one_based_indexing = true
[]
# 2. Active for reference MOOSE computations
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
base_name = 'base'
youngs_modulus = 1e3
poissons_ratio = 0.3
[]
[strain_dependent_elasticity_tensor]
type = CompositeElasticityTensor
args = strain_yy
tensors = 'base'
weights = 'prefactor_material'
[]
[prefactor_material_block]
type = DerivativeParsedMaterial
property_name = prefactor_material
# 0.11112 is the strain_yy increment
expression = '1.0/(1.0 + 0.11112)'
[]
[stress]
type = ComputeFiniteStrainElasticStress
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
end_time = 10
dt = 10.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(modules/richards/test/tests/dirac/bh07.i)
[Mesh]
type = FileMesh
file = bh07_input.e
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1000 10000'
x = '100 1000'
[../]
[]
[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
[../]
[]
[BCs]
[./fix_outer]
type = DirichletBC
boundary = perimeter
variable = pressure
value = 1E7
[../]
[]
[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 = bh07.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pressure
unit_weight = '0 0 0'
re_constant = 0.1594
character = 2
[../]
[]
[Postprocessors]
[./bh_report]
type = RichardsPlotQuantity
uo = borehole_total_outflow_mass
execute_on = 'initial timestep_end'
[../]
[./fluid_mass]
type = RichardsMass
variable = pressure
execute_on = 'initial timestep_end'
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 1E7
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = 1
viscosity = 1E-3
mat_porosity = 0.1
mat_permeability = '1E-11 0 0 0 1E-11 0 0 0 1E-11'
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 = 1000
solve_type = NEWTON
[./TimeStepper]
# get only marginally better results for smaller time steps
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = bh07
execute_on = 'initial timestep_end final'
time_step_interval = 10000
exodus = true
[]
(test/tests/transfers/multiapp_interpolation_transfer/tosub_parent.i)
###########################################################
# This is a test of the Transfer System. This test
# uses the Multiapp System to solve independent problems
# related geometrically. Solutions are then interpolated
# and transferred to a non-aligned domain.
#
# @Requirement F7.20
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = .21
xmax = .79
displacements = 'disp_x disp_y'
# The MultiAppGeometricInterpolationTransfer object only works with ReplicatedMesh
parallel_type = replicated
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./disp_x]
initial_condition = 0.4
[../]
[./disp_y]
[../]
[./elemental]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./x_func]
type = ParsedFunction
expression = x
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./x_func_aux]
type = FunctionAux
variable = elemental
function = x_func
execute_on = initial
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '0.2 0 0'
input_files = tosub_sub.i
[../]
[]
[Transfers]
[./tosub]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = sub
source_variable = u
variable = from_parent
[../]
[./elemental_tosub]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = sub
source_variable = u
variable = elemental_from_parent
[../]
[./radial_tosub]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = sub
source_variable = u
variable = radial_from_parent
interp_type = radial_basis
[../]
[./radial_elemental_tosub]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = sub
source_variable = u
variable = radial_elemental_from_parent
interp_type = radial_basis
[../]
[./displaced_target_tosub]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = sub
source_variable = u
variable = displaced_target_from_parent
displaced_target_mesh = true
[../]
[./displaced_source_tosub]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = sub
source_variable = u
variable = displaced_source_from_parent
displaced_source_mesh = true
[../]
[./elemental_to_sub_elemental]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = sub
source_variable = elemental
variable = elemental_from_parent_elemental
[../]
[./elemental_to_sub_nodal]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = sub
source_variable = elemental
variable = nodal_from_parent_elemental
[../]
[]
(test/tests/materials/generic_materials/ad_generic_function_rank_two_tensor.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Problem]
solve = false
[]
[Functions]
[fcn_00]
type = ParsedFunction
expression = '1 + t'
[]
[fcn_10]
type = ParsedFunction
expression = '4 + t'
[]
[fcn_20]
type = ParsedFunction
expression = '7 + t'
[]
[fcn_01]
type = ParsedFunction
expression = '2 + t'
[]
[fcn_11]
type = ParsedFunction
expression = '5 + t'
[]
[fcn_21]
type = ParsedFunction
expression = '8 + t'
[]
[fcn_02]
type = ParsedFunction
expression = '3 + t'
[]
[fcn_12]
type = ParsedFunction
expression = '6 + t'
[]
[fcn_22]
type = ParsedFunction
expression = '9 + t'
[]
[]
[Materials]
[./tensor]
type = ADGenericFunctionRankTwoTensor
tensor_name = function
# tensor values are column major-ordered
tensor_functions = 'fcn_00 fcn_10 fcn_20 fcn_01 fcn_11 fcn_21 fcn_02 fcn_12 fcn_22'
outputs = all
[../]
[]
[Executioner]
type = Transient
num_steps = 2
[]
[Postprocessors]
[00]
type = ElementAverageValue
variable = function_00
[]
[01]
type = ElementAverageValue
variable = function_01
[]
[02]
type = ElementAverageValue
variable = function_02
[]
[10]
type = ElementAverageValue
variable = function_10
[]
[11]
type = ElementAverageValue
variable = function_11
[]
[12]
type = ElementAverageValue
variable = function_12
[]
[20]
type = ElementAverageValue
variable = function_20
[]
[21]
type = ElementAverageValue
variable = function_21
[]
[22]
type = ElementAverageValue
variable = function_22
[]
[]
[Outputs]
csv = true
[]
(modules/thermal_hydraulics/test/tests/components/heat_source_from_power_density/phy.cylinder_power_shape_aux_var.i)
[GlobalParams]
scaling_factor_temperature = 1e1
[]
[Functions]
[HeatFunction]
type = ParsedFunction
expression = 1313127093.32191
[]
[]
[SolidProperties]
[fuel-mat]
type = ThermalFunctionSolidProperties
k = 16
cp = 191.67
rho = 1.4583e4
[]
[gap-mat]
type = ThermalFunctionSolidProperties
k = 64
cp = 1272
rho = 865
[]
[clad-mat]
type = ThermalFunctionSolidProperties
k = 26
cp = 638
rho = 7.646e3
[]
[]
[AuxVariables]
[power_density]
family = MONOMIAL
order = CONSTANT
block = 'CH1:solid:fuel'
[]
[]
[AuxKernels]
[mock_power_aux]
type = FunctionAux
variable = power_density
function = HeatFunction
block = 'CH1:solid:fuel'
[]
[]
[Components]
[total_power]
type = TotalPower
power = 3.0e4
[]
[CH1:solid]
type = HeatStructureCylindrical
position = '0 -0.024 0'
orientation = '0 0 1'
length = 0.8
n_elems = 16
initial_T = 628.15
names = 'fuel gap clad'
widths = '0.003015 0.000465 0.00052'
n_part_elems = '20 2 2'
solid_properties = 'fuel-mat gap-mat clad-mat'
solid_properties_T_ref = '300 300 300'
[]
[CH1:hgen]
type = HeatSourceFromPowerDensity
hs = CH1:solid
regions = 'fuel'
power_density = power_density
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 1e-3
num_steps = 1
abort_on_solve_fail = true
solve_type = 'PJFNK'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-7
nl_max_its = 40
l_tol = 1e-5
l_max_its = 50
[]
[Outputs]
[out]
type = Exodus
[]
[]
(test/tests/materials/output/output_steady.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./bc_func]
type = ParsedFunction
expression = 0.5*y
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
block = 0
coef = 0.1
[../]
[]
[BCs]
[./left]
type = FunctionDirichletBC
variable = u
boundary = left
function = bc_func
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Materials]
[./k]
type = OutputTestMaterial
block = 0
outputs = all
variable = u
output_properties = 'real_property vector_property tensor_property'
[../]
[]
[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/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/optimization/test/tests/userobjects/adjoint_solution/adjoint.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward.i
execute_on = INITIAL
[]
[]
[AuxVariables/u_reverse]
[]
[UserObjects]
[u_reverse_solution]
type = AdjointSolutionUserObject
mesh = forward_out.e
system_variables = 'u'
reverse_time_end = 10
[]
[terminate]
type = Terminator
expression = 'u_reverse_test > 1e-12'
error_level = ERROR
[]
[]
[AuxKernels]
[u_reverse_aux]
type = SolutionAux
variable = u_reverse
solution = u_reverse_solution
[]
[]
[Functions]
[u_reverse_fun]
type = ParsedFunction
expression = '(x + y) * (11 - t)'
[]
[]
[Postprocessors]
[u_reverse_test]
type = ElementL2Error
variable = u_reverse
function = u_reverse_fun
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
dt = 1
end_time = 10
[]
(test/tests/vectorpostprocessors/spatial_userobject_vector_postprocessor/spatial_userobject.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 10
nz = 10
[]
[Variables]
[dummy]
[]
[]
[Kernels]
[diffusion]
type = Diffusion
variable = dummy
[]
[]
[AuxVariables]
[u]
[]
[np_layered_average]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[u]
type = FunctionAux
variable = u
function = u
[]
[np_layered_average]
type = SpatialUserObjectAux
variable = np_layered_average
user_object = npla
execute_on = timestep_end
[]
[]
[Functions]
[u]
type = ParsedFunction
expression = 'x+2*y+3*z'
[]
[]
[UserObjects]
[npla]
type = NearestPointLayeredAverage
direction = x
points = '0.5 0.25 0.25
0.5 0.75 0.25
0.5 0.25 0.75
0.5 0.75 0.75'
num_layers = 3
variable = u
[]
[]
[VectorPostprocessors]
[vpp]
type = SpatialUserObjectVectorPostprocessor
userobject = npla
points_file = points.txt
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = 'final'
hide = 'dummy'
[]
(test/tests/userobjects/element_subdomain_modifier/block_restricted.i)
[Problem]
solve = false
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 16
ny = 16
[]
[left]
type = SubdomainBoundingBoxGenerator
input = 'gen'
block_id = 1
bottom_left = '0 0 0'
top_right = '0.25 1 1'
[]
[right]
type = SubdomainBoundingBoxGenerator
input = 'left'
block_id = 2
bottom_left = '0.25 0 0'
top_right = '1 1 1'
[]
[]
[UserObjects]
[moving_circle]
type = CoupledVarThresholdElementSubdomainModifier
coupled_var = 'phi'
block = 2
criterion_type = BELOW
threshold = 0
subdomain_id = 1
moving_boundary_name = moving_boundary
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[Functions]
[moving_circle]
type = ParsedFunction
expression = '(x-t)^2+(y)^2-0.5^2'
[]
[]
[AuxVariables]
[phi]
[]
[]
[AuxKernels]
[phi]
type = FunctionAux
variable = phi
function = moving_circle
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 3
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/mms/cylindrical/2d-rc.i)
mu = 1.1
rho = 1.1
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 1
xmax = 3
ymin = -1
ymax = 1
nx = 2
ny = 2
[]
[]
[Problem]
coord_type = 'RZ'
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 1
[]
[v]
type = INSFVVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = 'average'
velocity_interp_method = 'rc'
rho = ${rho}
[]
[mass_forcing]
type = FVBodyForce
variable = pressure
function = forcing_p
[]
[mean_zero_pressure]
type = FVIntegralValueConstraint
variable = pressure
lambda = lambda
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
advected_interp_method = 'average'
velocity_interp_method = 'rc'
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[u_forcing]
type = INSFVBodyForce
variable = u
functor = forcing_u
momentum_component = 'x'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
advected_interp_method = 'average'
velocity_interp_method = 'rc'
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[v_forcing]
type = INSFVBodyForce
variable = v
functor = forcing_v
momentum_component = 'y'
[]
[]
[FVBCs]
[no-slip-wall-u]
type = INSFVNoSlipWallBC
boundary = 'left right top bottom'
variable = u
function = 'exact_u'
[]
[no-slip-wall-v]
type = INSFVNoSlipWallBC
boundary = 'left right top bottom'
variable = v
function = 'exact_v'
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'sin(y)*sin(x*pi)'
[]
[exact_rhou]
type = ParsedFunction
expression = 'rho*sin(y)*sin(x*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[forcing_u]
type = ParsedFunction
expression = 'mu*sin(y)*sin(x*pi) - (-x*pi^2*mu*sin(y)*sin(x*pi) + pi*mu*sin(y)*cos(x*pi))/x + '
'(2*x*pi*rho*sin(y)^2*sin(x*pi)*cos(x*pi) + rho*sin(y)^2*sin(x*pi)^2)/x + '
'(-1/2*x*pi*rho*sin(x)*sin(y)*sin(x*pi)*sin((1/2)*y*pi) + '
'x*rho*sin(x)*sin(x*pi)*cos(y)*cos((1/2)*y*pi))/x'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_v]
type = ParsedFunction
expression = 'sin(x)*cos((1/2)*y*pi)'
[]
[exact_rhov]
type = ParsedFunction
expression = 'rho*sin(x)*cos((1/2)*y*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[forcing_v]
type = ParsedFunction
expression = '(1/4)*pi^2*mu*sin(x)*cos((1/2)*y*pi) - pi*rho*sin(x)^2*sin((1/2)*y*pi)*cos((1/2)*y*pi) '
'+ cos(y) - (-x*mu*sin(x)*cos((1/2)*y*pi) + mu*cos(x)*cos((1/2)*y*pi))/x + '
'(x*pi*rho*sin(x)*sin(y)*cos(x*pi)*cos((1/2)*y*pi) + '
'x*rho*sin(y)*sin(x*pi)*cos(x)*cos((1/2)*y*pi) + '
'rho*sin(x)*sin(y)*sin(x*pi)*cos((1/2)*y*pi))/x'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'sin(y)'
[]
[forcing_p]
type = ParsedFunction
expression = '-1/2*pi*rho*sin(x)*sin((1/2)*y*pi) + (x*pi*rho*sin(y)*cos(x*pi) + '
'rho*sin(y)*sin(x*pi))/x'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
[]
[Outputs]
csv = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2Error
variable = u
function = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2v]
type = ElementL2Error
variable = v
function = exact_v
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
variable = pressure
function = exact_p
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(test/tests/transfers/multiapp_userobject_transfer/tosub_displaced_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 8
xmax = 0.1
ymax = 0.5
displacements = 'disp_x disp_y'
[]
[Variables]
[./u]
initial_condition = 1
[../]
[]
[AuxVariables]
[./multi_layered_average]
[../]
[./element_multi_layered_average]
order = CONSTANT
family = MONOMIAL
[../]
[./disp_x]
initial_condition = 0.0
[../]
[./disp_y]
initial_condition = 0.5
[../]
[]
[Functions]
[./axial_force]
type = ParsedFunction
expression = 1000*y
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = axial_force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.001
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[Problem]
coord_type = rz
type = FEProblem
[]
(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
[]
(test/tests/dgkernels/2d_diffusion_dg/2d_diffusion_dg_test.i)
###########################################################
# This is a test of the Discontinuous Galerkin System.
# Discontinous basis functions are used (Monomials) and
# a Laplacian DGKernel contributes to the
# internal edges around each element. Jumps are allowed
# but penalized by this method.
#
# @Requirement F3.60
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
# xmin = -1
# xmax = 1
# ymin = -1
# ymax = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
active = 'u'
[u]
order = FIRST
family = MONOMIAL
[InitialCondition]
type = ConstantIC
value = 1
[]
[]
[]
[Functions]
active = 'forcing_fn exact_fn'
[forcing_fn]
type = ParsedFunction
# function = -4.0+(x*x)+(y*y)
# function = x
# function = (x*x)-2.0
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
# function = (x*x*x)-6.0*x
[]
[exact_fn]
type = ParsedGradFunction
# function = x
# grad_x = 1
# grad_y = 0
# function = (x*x)+(y*y)
# grad_x = 2*x
# grad_y = 2*y
# function = (x*x)
# grad_x = 2*x
# grad_y = 0
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
# function = (x*x*x)
# grad_x = 3*x*x
# grad_y = 0
[]
[]
[Kernels]
active = 'diff abs forcing'
[diff]
type = Diffusion
variable = u
[]
[abs] # u * v
type = Reaction
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[DGKernels]
active = 'dg_diff'
[dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[]
[]
[BCs]
active = 'all'
[all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
# petsc_options = '-snes_mf'
# petsc_options_iname = '-pc_type -pc_hypre_type'
# petsc_options_value = 'hypre boomeramg'
# petsc_options = '-snes_mf'
# max_r_steps = 2
[Adaptivity]
steps = 2
refine_fraction = 1.0
coarsen_fraction = 0
max_h_level = 8
[]
nl_rel_tol = 1e-10
# nl_rel_tol = 1e-12
[]
[Postprocessors]
active = 'h dofs l2_err'
[h]
type = AverageElementSize
[]
[dofs]
type = NumDOFs
[]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[]
[]
[Outputs]
file_base = out
exodus = true
[]
(modules/solid_mechanics/test/tests/2D_different_planes/planestrain_xz.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
file = square_xz_plane.e
[]
[Variables]
[./disp_x]
[../]
[./disp_z]
[../]
[]
[AuxVariables]
[./temp]
[../]
[./disp_y]
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./plane_strain]
block = 1
strain = SMALL
out_of_plane_direction = y
planar_formulation = PLANE_STRAIN
eigenstrain_names = 'eigenstrain'
generate_output = 'stress_xx stress_xz stress_yy stress_zz strain_xx strain_xz strain_yy strain_zz'
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
[../]
[]
[Functions]
[./tempfunc]
type = ParsedFunction
expression = '(1-x)*t'
[../]
[]
[BCs]
[./bottomx]
type = DirichletBC
boundary = 3
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = DirichletBC
boundary = 3
variable = disp_z
value = 0.0
[../]
[]
[Materials]
[./elastic_stress]
type = ComputeLinearElasticStress
block = 1
[../]
[./thermal_strain]
type = ComputeThermalExpansionEigenstrain
temperature = temp
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
eigenstrain_name = eigenstrain
[../]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
block = 1
poissons_ratio = 0.3
youngs_modulus = 1e6
[../]
[]
[Postprocessors]
[./react_y]
type = MaterialTensorIntegral
use_displaced_mesh = false
rank_two_tensor = stress
index_i = 1
index_j = 1
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
# controls for linear iterations
l_max_its = 100
l_tol = 1e-10
# controls for nonlinear iterations
nl_max_its = 10
nl_rel_tol = 1e-12
# time control
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 2.0
[]
[Outputs]
file_base = planestrain_xz_small_out
exodus = true
[]
(test/tests/materials/functor_properties/functor-vector-mat-props.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
xmax = 2
ymax = 1
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[]
[AuxVariables]
# cant use nodal variables because of the two blocks, which material to use
# there is undefined
[mat_x]
family = MONOMIAL
order = CONSTANT
[]
[mat_y]
family = MONOMIAL
order = CONSTANT
[]
[mat_z]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[matprop_to_aux_x]
type = FunctorVectorElementalAux
variable = mat_x
functor = 'matprop'
component = '0'
[]
[matprop_to_aux_y]
type = FunctorVectorElementalAux
variable = mat_y
functor = 'matprop'
component = '1'
[]
[matprop_to_aux_z]
type = FunctorVectorElementalAux
variable = mat_z
functor = 'matprop'
component = '2'
[]
[]
[Materials]
[block0]
type = GenericVectorFunctorMaterial
block = '0'
prop_names = 'matprop'
prop_values = '4 2 1'
[]
[block1]
type = GenericVectorFunctorMaterial
block = '1'
prop_names = 'matprop'
prop_values = 'f_x f_x f_z'
[]
[]
[Functions]
[f_x]
type = ParsedFunction
expression = 'x + 2 * y'
[]
[f_z]
type = ParsedFunction
expression = 'x * y - 2'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(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
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/large-tests/1d.i)
# 1D strain controlled test
[GlobalParams]
displacements = 'disp_x'
large_kinematics = true
macro_gradient = hvar
homogenization_constraint = homogenization
[]
[Mesh]
[base]
type = FileMeshGenerator
file = '1d.exo'
[]
[ss]
type = SideSetsFromPointsGenerator
input = base
points = '-1 0 0
7 0 0'
new_boundary = 'left right'
[]
[]
[Variables]
[disp_x]
[]
[hvar]
family = SCALAR
order = FIRST
[]
[]
[AuxVariables]
[s11]
family = MONOMIAL
order = CONSTANT
[]
[s21]
family = MONOMIAL
order = CONSTANT
[]
[s31]
family = MONOMIAL
order = CONSTANT
[]
[s12]
family = MONOMIAL
order = CONSTANT
[]
[s22]
family = MONOMIAL
order = CONSTANT
[]
[s32]
family = MONOMIAL
order = CONSTANT
[]
[s13]
family = MONOMIAL
order = CONSTANT
[]
[s23]
family = MONOMIAL
order = CONSTANT
[]
[s33]
family = MONOMIAL
order = CONSTANT
[]
[F11]
family = MONOMIAL
order = CONSTANT
[]
[F21]
family = MONOMIAL
order = CONSTANT
[]
[F31]
family = MONOMIAL
order = CONSTANT
[]
[F12]
family = MONOMIAL
order = CONSTANT
[]
[F22]
family = MONOMIAL
order = CONSTANT
[]
[F32]
family = MONOMIAL
order = CONSTANT
[]
[F13]
family = MONOMIAL
order = CONSTANT
[]
[F23]
family = MONOMIAL
order = CONSTANT
[]
[F33]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[s11]
type = RankTwoAux
variable = s11
rank_two_tensor = pk1_stress
index_i = 0
index_j = 0
[]
[s21]
type = RankTwoAux
variable = s21
rank_two_tensor = pk1_stress
index_i = 1
index_j = 0
[]
[s31]
type = RankTwoAux
variable = s31
rank_two_tensor = pk1_stress
index_i = 2
index_j = 0
[]
[s12]
type = RankTwoAux
variable = s12
rank_two_tensor = pk1_stress
index_i = 0
index_j = 1
[]
[s22]
type = RankTwoAux
variable = s22
rank_two_tensor = pk1_stress
index_i = 1
index_j = 1
[]
[s32]
type = RankTwoAux
variable = s32
rank_two_tensor = pk1_stress
index_i = 2
index_j = 1
[]
[s13]
type = RankTwoAux
variable = s13
rank_two_tensor = pk1_stress
index_i = 0
index_j = 2
[]
[s23]
type = RankTwoAux
variable = s23
rank_two_tensor = pk1_stress
index_i = 1
index_j = 2
[]
[s33]
type = RankTwoAux
variable = s33
rank_two_tensor = pk1_stress
index_i = 2
index_j = 2
[]
[F11]
type = RankTwoAux
variable = F11
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 0
[]
[F21]
type = RankTwoAux
variable = F21
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 0
[]
[F31]
type = RankTwoAux
variable = F31
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 0
[]
[F12]
type = RankTwoAux
variable = F12
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 1
[]
[F22]
type = RankTwoAux
variable = F22
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 1
[]
[F32]
type = RankTwoAux
variable = F32
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 1
[]
[F13]
type = RankTwoAux
variable = F13
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 2
[]
[F23]
type = RankTwoAux
variable = F23
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 2
[]
[F33]
type = RankTwoAux
variable = F33
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 2
[]
[]
[UserObjects]
[homogenization]
type = HomogenizationConstraint
constraint_types = ${constraint_types}
targets = ${targets}
execute_on = 'INITIAL LINEAR NONLINEAR'
[]
[]
[Kernels]
[sdx]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[]
[ScalarKernels]
[enforce]
type = HomogenizationConstraintScalarKernel
variable = hvar
[]
[]
[Functions]
[func_stress]
type = ParsedFunction
expression = '400*t'
[]
[func_strain]
type = ParsedFunction
expression = '4.0e-1*t'
[]
[]
[BCs]
[Periodic]
[all]
variable = disp_x
auto_direction = 'x'
[]
[]
[centerfix_x]
type = DirichletBC
boundary = "fixme"
variable = disp_x
value = 0
[]
[]
[Materials]
[elastic_tensor_1]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
block = '1'
[]
[elastic_tensor_2]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 120000.0
poissons_ratio = 0.21
block = '2'
[]
[elastic_tensor_3]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 80000.0
poissons_ratio = 0.4
block = '3'
[]
[elastic_tensor_4]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 76000.0
poissons_ratio = 0.11
block = '4'
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
homogenization_gradient_names = 'homogenization_gradient'
[]
[compute_homogenization_gradient]
type = ComputeHomogenizedLagrangianStrain
[]
[]
[Postprocessors]
[s11]
type = ElementAverageValue
variable = s11
execute_on = 'initial timestep_end'
[]
[s21]
type = ElementAverageValue
variable = s21
execute_on = 'initial timestep_end'
[]
[s31]
type = ElementAverageValue
variable = s31
execute_on = 'initial timestep_end'
[]
[s12]
type = ElementAverageValue
variable = s12
execute_on = 'initial timestep_end'
[]
[s22]
type = ElementAverageValue
variable = s22
execute_on = 'initial timestep_end'
[]
[s32]
type = ElementAverageValue
variable = s32
execute_on = 'initial timestep_end'
[]
[s13]
type = ElementAverageValue
variable = s13
execute_on = 'initial timestep_end'
[]
[s23]
type = ElementAverageValue
variable = s23
execute_on = 'initial timestep_end'
[]
[s33]
type = ElementAverageValue
variable = s33
execute_on = 'initial timestep_end'
[]
[F11]
type = ElementAverageValue
variable = F11
execute_on = 'initial timestep_end'
[]
[F21]
type = ElementAverageValue
variable = F21
execute_on = 'initial timestep_end'
[]
[F31]
type = ElementAverageValue
variable = F31
execute_on = 'initial timestep_end'
[]
[F12]
type = ElementAverageValue
variable = F12
execute_on = 'initial timestep_end'
[]
[F22]
type = ElementAverageValue
variable = F22
execute_on = 'initial timestep_end'
[]
[F32]
type = ElementAverageValue
variable = F32
execute_on = 'initial timestep_end'
[]
[F13]
type = ElementAverageValue
variable = F13
execute_on = 'initial timestep_end'
[]
[F23]
type = ElementAverageValue
variable = F23
execute_on = 'initial timestep_end'
[]
[F33]
type = ElementAverageValue
variable = F33
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
solve_type = 'newton'
line_search = default
automatic_scaling = true
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-6
nl_abs_tol = 1e-8
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 1.0
[]
[Outputs]
exodus = false
csv = true
[]
(modules/phase_field/test/tests/grain_growth/temperature_gradient.i)
#
# This test ensures that a flat grain boundary does not move
# under a temperature gradient using the normal grain growth model
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 20
xmax = 1000
ymax = 500
elem_type = QUAD
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Functions]
[./TGradient]
type = ParsedFunction
expression = '450 + 0.1*x'
[../]
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalBoundingBoxIC]
x1 = 0.0
x2 = 500.0
y1 = 0.0
y2 = 500.0
[../]
[../]
[]
[AuxVariables]
[./bnds]
[../]
[./T]
[../]
[]
[Kernels]
[./PolycrystalKernel]
variable_mobility = true
coupled_variables = 'T'
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[./Tgrad]
type = FunctionAux
variable = T
function = TGradient
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
T = T # K
wGB = 60 # nm
GBmob0 = 2.5e-6 # m^4/(Js) from Schoenfelder 1997
Q = 0.23 # Migration energy in eV
GBenergy = 0.708 # GB energy in J/m^2
[../]
[]
[Postprocessors]
[./gr0_area]
type = ElementIntegralVariablePostprocessor
variable = gr0
execute_on = 'initial TIMESTEP_END'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
l_max_its = 30
l_tol = 1.0e-4
nl_max_its = 20
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 10
dt = 100.0
[]
[Outputs]
exodus = true
[]
(test/tests/ics/hermite_ic/hermite_ic.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
order = THIRD
family = HERMITE
[../]
[]
[Functions]
[./afunc]
type = ParsedFunction
expression = x^2
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[ICs]
[./func_ic]
function = afunc
variable = u
type = FunctionIC
[../]
[]
(modules/contact/test/tests/mortar_cartesian_lms/two_block_1st_order_constraint_lm_xy_friction.i)
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
theta = 0
velocity = 0.1
refine = 3
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.35
xmax = -0.05
ymin = -1
ymax = 0
nx = 1
ny = 3
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_sideset_names]
type = RenameBoundaryGenerator
input = left_block_sidesets
old_boundary = '10 11 12 13'
new_boundary = 'l_bottom l_right l_top l_left'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sideset_names
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.3
ymin = -1
ymax = 0
nx = 1
ny = 2
elem_type = QUAD4
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3'
new_boundary = '20 21 22 23'
[]
[right_block_sideset_names]
type = RenameBoundaryGenerator
input = right_block_sidesets
old_boundary = '20 21 22 23'
new_boundary = 'r_bottom r_right r_top r_left'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sideset_names
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[left_lower]
type = LowerDBlockFromSidesetGenerator
input = combined_mesh
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[right_lower]
type = LowerDBlockFromSidesetGenerator
input = left_lower
sidesets = '23'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[rotate_mesh]
type = TransformGenerator
input = right_lower
transform = ROTATE
vector_value = '0 0 ${theta}'
[]
uniform_refine = ${refine}
[]
[Variables]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[normal_lm]
family = LAGRANGE
order = FIRST
[]
[tangent_lm]
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[normal_lm]
type = MortarPressureComponentAux
variable = normal_lm
primary_boundary = '23'
secondary_boundary = '11'
lm_var_x = lm_x
lm_var_y = lm_y
component = 'NORMAL'
boundary = '11'
[]
[tangent_lm]
type = MortarPressureComponentAux
variable = tangent_lm
primary_boundary = '23'
secondary_boundary = '11'
lm_var_x = lm_x
lm_var_y = lm_y
component = 'tangent1'
boundary = '11'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
[]
[]
[Functions]
[horizontal_movement]
type = ParsedFunction
expression = '${velocity} * t * cos(${theta}/180*pi)'
[]
[vertical_movement]
type = ParsedFunction
expression = '${velocity} * t * sin(${theta}/180*pi)'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = horizontal_movement
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 21
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = 21
value = 0.0
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 13
function = vertical_movement
[]
[]
[Materials]
[elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e4
poissons_ratio = 0.3
[]
[stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e8
poissons_ratio = 0.3
[]
[stress_right]
type = ComputeFiniteStrainElasticStress
block = 2
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeFrictionalForceCartesianLMMechanicalContact # ComputeCartesianLMFrictionMechanicalContact
# type = ComputeWeightedGapLMMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
correct_edge_dropping = true
mu = 1.0
c_t = 1.0e5
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15'
line_search = none
dt = 0.1
dtmin = 0.1
end_time = 1.0
l_max_its = 100
nl_max_its = 20
nl_rel_tol = 1e-8
snesmf_reuse_base = false
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[avg_disp_x]
type = ElementAverageValue
variable = disp_x
block = '1 2'
[]
[avg_disp_y]
type = ElementAverageValue
variable = disp_y
block = '1 2'
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
[]
[min_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
value_type = min
[]
[min_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
value_type = min
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[tot_lin_it]
type = CumulativeValuePostprocessor
postprocessor = num_lin_it
[]
[tot_nonlin_it]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[max_norma_lm]
type = ElementExtremeValue
variable = normal_lm
[]
[min_norma_lm]
type = ElementExtremeValue
variable = normal_lm
value_type = min
[]
[]
[VectorPostprocessors]
[normal_lm]
type = NodalValueSampler
block = 'secondary_lower'
variable = normal_lm
sort_by = 'y'
[]
[tangent_lm]
type = NodalValueSampler
block = 'secondary_lower'
variable = tangent_lm
sort_by = 'y'
[]
[]
(test/tests/dirackernels/point_caching/point_caching_moving_mesh.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
uniform_refine = 4
# Mesh is dispaced by Aux variables computed by predetermined functions
displacements = 'disp_x disp_y'
[]
[Functions]
[disp_x_fn]
type = ParsedFunction
expression = t
[]
[disp_y_fn]
type = ParsedFunction
expression = 0
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[]
[AuxVariables]
[disp_x]
order = FIRST
family = LAGRANGE
[]
[disp_y]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[time_derivative]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[]
[AuxKernels]
[disp_x_auxk]
type = FunctionAux
variable = disp_x
function = disp_x_fn
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[disp_y_auxk]
type = FunctionAux
variable = disp_y
function = disp_y_fn
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[DiracKernels]
[point_source]
type = CachingPointSource
variable = u
# This is appropriate for this test, since we want the Dirac
# points to be found in elements on the displaced Mesh.
use_displaced_mesh = true
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
num_steps = 4
dt = .1
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/heat_conduction_patch/heat_conduction_patch_hex20.i)
#
# This problem is taken from the Abaqus verification manual:
# "1.5.8 Patch test for heat transfer elements"
#
# The temperature on the exterior nodes is 200x+100y+200z.
#
# This gives a constant flux at all Gauss points.
#
# In addition, the temperature at all nodes follows the same formula.
#
# Node x y z Temperature
# 1 1.000E+00 0.000E+00 1.000E+00 4.0000E+02
# 2 6.770E-01 3.050E-01 6.830E-01 3.0250E+02
# 3 3.200E-01 1.860E-01 6.430E-01 2.1120E+02
# 4 0.000E+00 0.000E+00 1.000E+00 2.0000E+02
# 5 1.000E+00 1.000E+00 1.000E+00 5.0000E+02
# 6 7.880E-01 6.930E-01 6.440E-01 3.5570E+02
# 7 1.650E-01 7.450E-01 7.020E-01 2.4790E+02
# 8 0.000E+00 1.000E+00 1.000E+00 3.0000E+02
# 9 8.385E-01 1.525E-01 8.415E-01 3.5125E+02
# 10 4.985E-01 2.455E-01 6.630E-01 2.5685E+02
# 11 1.600E-01 9.300E-02 8.215E-01 2.0560E+02
# 12 5.000E-01 0.000E+00 1.000E+00 3.0000E+02
# 13 1.000E+00 5.000E-01 1.000E+00 4.5000E+02
# 14 7.325E-01 4.990E-01 6.635E-01 3.2910E+02
# 15 2.425E-01 4.655E-01 6.725E-01 2.2955E+02
# 16 0.000E+00 5.000E-01 1.000E+00 2.5000E+02
# 17 8.940E-01 8.465E-01 8.220E-01 4.2785E+02
# 18 4.765E-01 7.190E-01 6.730E-01 3.0180E+02
# 19 8.250E-02 8.725E-01 8.510E-01 2.7395E+02
# 20 5.000E-01 1.000E+00 1.000E+00 4.0000E+02
# 21 1.000E+00 0.000E+00 0.000E+00 2.0000E+02
# 22 0.000E+00 0.000E+00 0.000E+00 0.0000E+00
# 23 8.260E-01 2.880E-01 2.880E-01 2.5160E+02
# 24 2.490E-01 3.420E-01 1.920E-01 1.2240E+02
# 25 1.000E+00 0.000E+00 5.000E-01 3.0000E+02
# 26 5.000E-01 0.000E+00 0.000E+00 1.0000E+02
# 27 0.000E+00 0.000E+00 5.000E-01 1.0000E+02
# 28 9.130E-01 1.440E-01 1.440E-01 2.2580E+02
# 29 1.245E-01 1.710E-01 9.600E-02 6.1200E+01
# 30 7.515E-01 2.965E-01 4.855E-01 2.7705E+02
# 31 5.375E-01 3.150E-01 2.400E-01 1.8700E+02
# 32 2.845E-01 2.640E-01 4.175E-01 1.6680E+02
# 33 2.730E-01 7.500E-01 2.300E-01 1.7560E+02
# 34 0.000E+00 1.000E+00 0.000E+00 1.0000E+02
# 35 2.610E-01 5.460E-01 2.110E-01 1.4900E+02
# 36 0.000E+00 5.000E-01 0.000E+00 5.0000E+01
# 37 2.190E-01 7.475E-01 4.660E-01 2.1175E+02
# 38 1.365E-01 8.750E-01 1.150E-01 1.3780E+02
# 39 0.000E+00 1.000E+00 5.000E-01 2.0000E+02
# 40 8.500E-01 6.490E-01 2.630E-01 2.8750E+02
# 41 8.380E-01 4.685E-01 2.755E-01 2.6955E+02
# 42 8.190E-01 6.710E-01 4.535E-01 3.2160E+02
# 43 5.615E-01 6.995E-01 2.465E-01 2.3155E+02
# 44 1.000E+00 1.000E+00 0.000E+00 3.0000E+02
# 45 1.000E+00 5.000E-01 0.000E+00 2.5000E+02
# 46 1.000E+00 1.000E+00 5.000E-01 4.0000E+02
# 47 9.250E-01 8.245E-01 1.315E-01 2.9375E+02
# 48 5.000E-01 1.000E+00 0.000E+00 2.0000E+02
[Mesh]#Comment
file = heat_conduction_patch_hex20.e
[] # Mesh
[Functions]
[./temps]
type = ParsedFunction
expression ='200*x+100*y+200*z'
[../]
[] # Functions
[Variables]
[./temp]
order = SECOND
family = LAGRANGE
[../]
[] # Variables
[Kernels]
[./heat_r]
type = HeatConduction
variable = temp
[../]
[] # Kernels
[BCs]
[./temps]
type = FunctionDirichletBC
variable = temp
boundary = 10
function = temps
[../]
[] # BCs
[Materials]
[./heat]
type = HeatConductionMaterial
block = 1
specific_heat = 0.116
thermal_conductivity = 4.85e-4
[../]
[] # Materials
[Executioner]
type = Steady
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
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
[./Quadrature]
order = THIRD
[../]
[] # Executioner
[Outputs]
exodus = true
[] # Output
(modules/porous_flow/test/tests/relperm/brooks_corey1.i)
# Test Brooks-Corey relative permeability curve by varying saturation over the mesh
# Exponent lambda = 2 for both phases
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[p0]
initial_condition = 1e6
[]
[s1]
[]
[]
[AuxVariables]
[s0aux]
family = MONOMIAL
order = CONSTANT
[]
[s1aux]
family = MONOMIAL
order = CONSTANT
[]
[kr0aux]
family = MONOMIAL
order = CONSTANT
[]
[kr1aux]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[s0]
type = PorousFlowPropertyAux
property = saturation
phase = 0
variable = s0aux
[]
[s1]
type = PorousFlowPropertyAux
property = saturation
phase = 1
variable = s1aux
[]
[kr0]
type = PorousFlowPropertyAux
property = relperm
phase = 0
variable = kr0aux
[]
[kr1]
type = PorousFlowPropertyAux
property = relperm
phase = 1
variable = kr1aux
[]
[]
[Functions]
[s1]
type = ParsedFunction
expression = x
[]
[]
[ICs]
[s1]
type = FunctionIC
variable = s1
function = s1
[]
[]
[Kernels]
[p0]
type = Diffusion
variable = p0
[]
[s1]
type = Diffusion
variable = s1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'p0 s1'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = p0
phase1_saturation = s1
capillary_pressure = pc
[]
[kr0]
type = PorousFlowRelativePermeabilityBC
phase = 0
lambda = 2
[]
[kr1]
type = PorousFlowRelativePermeabilityBC
phase = 1
lambda = 2
nw_phase = true
[]
[]
[VectorPostprocessors]
[vpp]
type = LineValueSampler
warn_discontinuous_face_values = false
variable = 's0aux s1aux kr0aux kr1aux'
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 20
sort_by = id
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-8
[]
[BCs]
[sleft]
type = DirichletBC
variable = s1
value = 0
boundary = left
[]
[sright]
type = DirichletBC
variable = s1
value = 1
boundary = right
[]
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(modules/contact/test/tests/sliding_block/in_and_out/frictional_04_penalty.i)
# This is a benchmark test that checks constraint based frictional
# contact using the penalty method. In this test a sinusoidal
# displacement is applied in the horizontal direction to simulate
# a small block come in and out of contact as it slides down a larger block.
#
# The sinusoid is of the form 0.4sin(4t)+0.2 and a friction coefficient
# of 0.4 is used. The gold file is run on one processor and the benchmark
# case is run on a minimum of 4 processors to ensure no parallel variability
# in the contact pressure and penetration results. Further documentation can
# found in moose/modules/contact/doc/sliding_block/
#
[Mesh]
file = sliding_elastic_blocks_2d.e
patch_size = 80
[]
[GlobalParams]
volumetric_locking_correction = false
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[penetration]
[]
[inc_slip_x]
[]
[inc_slip_y]
[]
[accum_slip_x]
[]
[accum_slip_y]
[]
[]
[Functions]
[vertical_movement]
type = ParsedFunction
expression = -t
[]
[horizontal_movement]
type = ParsedFunction
expression = -0.04*sin(4*t)+0.02
[]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = true
strain = FINITE
[]
[]
[AuxKernels]
[zeroslip_x]
type = ConstantAux
variable = inc_slip_x
boundary = 3
execute_on = timestep_begin
value = 0.0
[]
[zeroslip_y]
type = ConstantAux
variable = inc_slip_y
boundary = 3
execute_on = timestep_begin
value = 0.0
[]
[accum_slip_x]
type = AccumulateAux
variable = accum_slip_x
accumulate_from_variable = inc_slip_x
execute_on = timestep_end
[]
[accum_slip_y]
type = AccumulateAux
variable = accum_slip_y
accumulate_from_variable = inc_slip_y
execute_on = timestep_end
[]
[penetration]
type = PenetrationAux
variable = penetration
boundary = 3
paired_boundary = 2
[]
[]
[Postprocessors]
[nonlinear_its]
type = NumNonlinearIterations
execute_on = timestep_end
[]
[penetration]
type = NodalVariableValue
variable = penetration
nodeid = 222
[]
[contact_pressure]
type = NodalVariableValue
variable = contact_pressure
nodeid = 222
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[]
[right_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = horizontal_movement
[]
[right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = vertical_movement
[]
[]
[Materials]
[left]
type = ComputeIsotropicElasticityTensor
block = '1 2'
youngs_modulus = 1e6
poissons_ratio = 0.3
constant_on = SUBDOMAIN
[]
[left_stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -sub_pc_type -pc_asm_overlap -ksp_gmres_restart'
petsc_options_value = 'asm lu 20 101'
line_search = 'none'
l_max_its = 100
nl_max_its = 1000
dt = 0.1
end_time = 15
num_steps = 1000
l_tol = 1e-3
nl_rel_tol = 1e-10
nl_abs_tol = 1e-6
dtmin = 0.01
[Predictor]
type = SimplePredictor
scale = 1.0
[]
[]
[Outputs]
# csv = true
time_step_interval = 10
[out]
type = Exodus
elemental_as_nodal = true
[]
[console]
type = Console
max_rows = 5
[]
[]
[Contact]
[leftright]
secondary = 3
primary = 2
model = coulomb
penalty = 2e+6
friction_coefficient = 0.4
formulation = penalty
normal_smoothing_distance = 0.1
[]
[]
(test/tests/bcs/mat_neumann_bc/mat_neumann.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmax = 10
ymax = 10
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./phi]
[../]
[]
[ICs]
[./phi_IC]
type = FunctionIC
variable = phi
function = ic_func_phi
[../]
[]
[Functions]
[./ic_func_phi]
type = ParsedFunction
expression = '0.5 * (1 - tanh((x - 5) / 0.8))'
[../]
[]
[BCs]
[./top]
type = MatNeumannBC
variable = u
boundary = top
value = 2
boundary_material = hm
[../]
[]
[Kernels]
[./dudt]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[Materials]
[./hm]
type = ParsedMaterial
property_name = hm
coupled_variables = 'phi'
expression = '3*phi^2 - 2*phi^3'
outputs = exodus
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
end_time = 10
[]
[Outputs]
exodus = true
[]
(test/tests/outputs/debug/show_var_residual_norms.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Functions]
[forcing_fnu]
type = ParsedFunction
expression = -5.8*(x+y)+x*x*x-x+y*y*y-y
[]
[forcing_fnv]
type = ParsedFunction
expression = -4
[]
[slnu]
type = ParsedGradFunction
expression = x*x*x-x+y*y*y-y
grad_x = 3*x*x-1
grad_y = 3*y*y-1
[]
[slnv]
type = ParsedGradFunction
expression = x*x+y*y
grad_x = 2*x
grad_y = 2*y
[]
#NeumannBC functions
[bc_fnut]
type = ParsedFunction
expression = 3*y*y-1
[]
[bc_fnub]
type = ParsedFunction
expression = -3*y*y+1
[]
[bc_fnul]
type = ParsedFunction
expression = -3*x*x+1
[]
[bc_fnur]
type = ParsedFunction
expression = 3*x*x-1
[]
[]
[Variables]
[u]
order = THIRD
family = HIERARCHIC
[]
[v]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
active = 'diff1 diff2 test1 forceu forcev react'
[diff1]
type = Diffusion
variable = u
[]
[test1]
type = CoupledConvection
variable = u
velocity_vector = v
[]
[diff2]
type = Diffusion
variable = v
[]
[react]
type = Reaction
variable = u
[]
[forceu]
type = BodyForce
variable = u
function = forcing_fnu
[]
[forcev]
type = BodyForce
variable = v
function = forcing_fnv
[]
[]
[BCs]
active = 'bc_u_tb bc_v bc_ul bc_ur bc_ut bc_ub'
[bc_u]
type = FunctionPenaltyDirichletBC
variable = u
function = slnu
boundary = 'left right top bottom'
penalty = 1e6
[]
[bc_v]
type = FunctionDirichletBC
variable = v
function = slnv
boundary = 'left right top bottom'
[]
[bc_u_lr]
type = FunctionPenaltyDirichletBC
variable = u
function = slnu
boundary = 'left right top bottom'
penalty = 1e6
[]
[bc_u_tb]
type = CoupledKernelGradBC
variable = u
var2 = v
vel = '0.1 0.1'
boundary = 'top bottom left right'
[]
[bc_ul]
type = FunctionNeumannBC
variable = u
function = bc_fnul
boundary = 'left'
[]
[bc_ur]
type = FunctionNeumannBC
variable = u
function = bc_fnur
boundary = 'right'
[]
[bc_ut]
type = FunctionNeumannBC
variable = u
function = bc_fnut
boundary = 'top'
[]
[bc_ub]
type = FunctionNeumannBC
variable = u
function = bc_fnub
boundary = 'bottom'
[]
[]
[Preconditioning]
active = ' '
[prec]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'L2u L2v'
[dofs]
type = NumDOFs
[]
[h]
type = AverageElementSize
[]
[L2u]
type = ElementL2Error
variable = u
function = slnu
[]
[L2v]
type = ElementL2Error
variable = v
function = slnv
[]
[H1error]
type = ElementH1Error
variable = u
function = solution
[]
[H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-15
nl_abs_tol = 1e-13
[]
[Outputs]
execute_on = 'timestep_end'
[debug] # This is a test, use the [Debug] block to enable this
type = VariableResidualNormsDebugOutput
[]
[]
(modules/solid_mechanics/test/tests/umat/print/print_shear.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[]
[Functions]
[top_pull]
type = ParsedFunction
expression = -t/1000
[]
[]
[AuxVariables]
[strain_xy]
family = MONOMIAL
order = SECOND
[]
[strain_yy]
family = MONOMIAL
order = SECOND
[]
[]
[AuxKernels]
[strain_xy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xy
index_i = 1
index_j = 0
[]
[strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 1
index_j = 1
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
[]
[]
[BCs]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = bottom
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[z_bot]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0.0
[]
[]
[NodalKernels]
[force_x]
type = ConstantRate
variable = disp_x
boundary = top
rate = 1.0e0
[]
[]
[Materials]
# 1. Active for UMAT verification
[umat]
type = AbaqusUMATStress
constant_properties = '1000 0.3'
plugin = '../../../plugins/elastic_print_multiple_fields'
num_state_vars = 0
external_fields = 'strain_yy strain_xy'
use_one_based_indexing = true
[]
# 2. Active for reference MOOSE computations
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
base_name = 'base'
youngs_modulus = 1e3
poissons_ratio = 0.3
[]
[strain_dependent_elasticity_tensor]
type = CompositeElasticityTensor
args = 'strain_yy strain_xy'
tensors = 'base'
weights = 'prefactor_material'
[]
[prefactor_material_block]
type = DerivativeParsedMaterial
property_name = prefactor_material
coupled_variables = 'strain_yy strain_xy'
expression = '1.0/(1.0 + strain_yy + strain_xy)'
[]
[stress]
type = ComputeFiniteStrainElasticStress
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
end_time = 10
dt = 10.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/basic-primitive-pcnsfv-kt.i)
[GlobalParams]
fp = fp
limiter = 'central_difference'
two_term_boundary_expansion = true
[]
[Mesh]
[cartesian]
type = GeneratedMeshGenerator
dim = 1
xmin = .1
xmax = .6
nx = 2
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Problem]
fv_bcs_integrity_check = false
[]
[Variables]
[pressure]
type = MooseVariableFVReal
[]
[sup_vel_x]
type = MooseVariableFVReal
[]
[T_fluid]
type = MooseVariableFVReal
[]
[]
[ICs]
[pressure]
type = FunctionIC
variable = pressure
function = 'exact_p'
[]
[sup_vel_x]
type = FunctionIC
variable = sup_vel_x
function = 'exact_sup_vel_x'
[]
[T_fluid]
type = FunctionIC
variable = T_fluid
function = 'exact_T'
[]
[]
[FVKernels]
[mass_advection]
type = PCNSFVKT
variable = pressure
eqn = "mass"
[]
[mass_fn]
type = FVBodyForce
variable = pressure
function = 'forcing_rho'
[]
[momentum_x_advection]
type = PCNSFVKT
variable = sup_vel_x
momentum_component = x
eqn = "momentum"
[]
[momentum_fn]
type = FVBodyForce
variable = sup_vel_x
function = 'forcing_rho_ud'
[]
[fluid_energy_advection]
type = PCNSFVKT
variable = T_fluid
eqn = "energy"
[]
[energy_fn]
type = FVBodyForce
variable = T_fluid
function = 'forcing_rho_et'
[]
[]
[FVBCs]
[mass_left]
variable = pressure
type = PCNSFVStrongBC
boundary = left
T_fluid = 'exact_T'
superficial_velocity = 'exact_superficial_velocity'
eqn = 'mass'
[]
[momentum_left]
variable = sup_vel_x
type = PCNSFVStrongBC
boundary = left
T_fluid = 'exact_T'
superficial_velocity = 'exact_superficial_velocity'
eqn = 'momentum'
momentum_component = 'x'
[]
[energy_left]
variable = T_fluid
type = PCNSFVStrongBC
boundary = left
T_fluid = 'exact_T'
superficial_velocity = 'exact_superficial_velocity'
eqn = 'energy'
[]
[mass_right]
variable = pressure
type = PCNSFVStrongBC
boundary = right
eqn = 'mass'
pressure = 'exact_p'
[]
[momentum_right]
variable = sup_vel_x
type = PCNSFVStrongBC
boundary = right
eqn = 'momentum'
momentum_component = 'x'
pressure = 'exact_p'
[]
[energy_right]
variable = T_fluid
type = PCNSFVStrongBC
boundary = right
eqn = 'energy'
pressure = 'exact_p'
[]
# help gradient reconstruction
[pressure_right]
type = FVFunctionDirichletBC
variable = pressure
function = exact_p
boundary = 'right'
[]
[sup_vel_x_left]
type = FVFunctionDirichletBC
variable = sup_vel_x
function = exact_sup_vel_x
boundary = 'left'
[]
[T_fluid_left]
type = FVFunctionDirichletBC
variable = T_fluid
function = exact_T
boundary = 'left'
[]
[]
[Materials]
[var_mat]
type = PorousPrimitiveVarMaterial
pressure = pressure
superficial_vel_x = sup_vel_x
T_fluid = T_fluid
porosity = porosity
[]
[porosity]
type = GenericFunctionMaterial
prop_names = 'porosity'
prop_values = 'eps'
[]
[]
[Functions]
[exact_rho]
type = ParsedFunction
expression = '3.48788261470924*cos(x)'
[]
[forcing_rho]
type = ParsedFunction
expression = '-3.45300378856215*sin(1.1*x)'
[]
[exact_rho_ud]
type = ParsedFunction
expression = '3.13909435323832*cos(1.1*x)'
[]
[forcing_rho_ud]
type = ParsedFunction
expression = '-0.9*(10.6975765229419*cos(1.2*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + 0.9*(10.6975765229419*sin(x)*cos(1.2*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 12.8370918275302*sin(1.2*x)/cos(x))*cos(x) + 3.13909435323832*sin(x)*cos(1.1*x)^2/cos(x)^2 - 6.9060075771243*sin(1.1*x)*cos(1.1*x)/cos(x)'
[]
[exact_rho_et]
type = ParsedFunction
expression = '26.7439413073546*cos(1.2*x)'
[]
[forcing_rho_et]
type = ParsedFunction
expression = '0.9*(3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.2*x))*sin(x)*cos(1.1*x)/cos(x)^2 - 0.99*(3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.2*x))*sin(1.1*x)/cos(x) + 0.9*(-(10.6975765229419*cos(1.2*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + (10.6975765229419*sin(x)*cos(1.2*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 12.8370918275302*sin(1.2*x)/cos(x))*cos(x) - 32.0927295688256*sin(1.2*x))*cos(1.1*x)/cos(x)'
[]
[exact_T]
type = ParsedFunction
expression = '0.0106975765229418*cos(1.2*x)/cos(x) - 0.000697576522941848*cos(1.1*x)^2/cos(x)^2'
[]
[exact_eps_p]
type = ParsedFunction
expression = '3.13909435323832*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x)'
[]
[exact_p]
type = ParsedFunction
expression = '3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x)'
[]
[exact_sup_vel_x]
type = ParsedFunction
expression = '0.9*cos(1.1*x)/cos(x)'
[]
[exact_superficial_velocity]
type = ParsedVectorFunction
expression_x = '0.9*cos(1.1*x)/cos(x)'
[]
[eps]
type = ParsedFunction
expression = '0.9'
[]
[]
[Executioner]
solve_type = NEWTON
type = Transient
num_steps = 1
dtmin = 1
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_max_its = 50
line_search = bt
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
[]
[Outputs]
exodus = true
csv = true
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2pressure]
type = ElementL2Error
variable = pressure
function = exact_p
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2sup_vel_x]
variable = sup_vel_x
function = exact_sup_vel_x
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2T_fluid]
variable = T_fluid
function = exact_T
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(modules/phase_field/test/tests/GrandPotentialPFM/SinteringParabolic.i)
#input file to test the GrandPotentialSinteringMaterial using the parabolic energy profile
[Mesh]
type = GeneratedMesh
dim = 2
nx = 17
ny = 10
xmin = 0
xmax = 660
ymin = 0
ymax = 380
[]
[GlobalParams]
op_num = 2
var_name_base = gr
int_width = 40
[]
[Variables]
[./w]
[./InitialCondition]
type = FunctionIC
variable = w
function = f_w
[../]
[../]
[./phi]
[../]
[./PolycrystalVariables]
[../]
[]
[AuxVariables]
[./T]
order = CONSTANT
family = MONOMIAL
[./InitialCondition]
type = FunctionIC
variable = T
function = f_T
[../]
[../]
[]
[ICs]
[./phi_IC]
type = SpecifiedSmoothCircleIC
variable = phi
x_positions = '190 470'
y_positions = '190 190'
z_positions = ' 0 0'
radii = '150 150'
invalue = 0
outvalue = 1
[../]
[./gr0_IC]
type = SmoothCircleIC
variable = gr0
x1 = 190
y1 = 190
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[./gr1_IC]
type = SmoothCircleIC
variable = gr1
x1 = 470
y1 = 190
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[]
[Functions]
[./f_T]
type = ConstantFunction
value = 1600
[../]
[./f_w]
type = ParsedFunction
expression = '1.515e-7 * x'
[../]
[]
[Materials]
# Free energy coefficients for parabolic curve
[./ks]
type = ParsedMaterial
property_name = ks
coupled_variables = 'T'
constant_names = 'a b'
constant_expressions = '-0.0025 157.16'
expression = 'a*T + b'
[../]
[./kv]
type = ParsedMaterial
property_name = kv
material_property_names = 'ks'
expression = '10 * ks'
[../]
# Diffusivity and mobilities
[./chiD]
type = GrandPotentialTensorMaterial
f_name = chiD
solid_mobility = L
void_mobility = Lv
chi = chi
surface_energy = 19.7
c = phi
T = T
D0 = 2.0e11
GBmob0 = 1.4759e9
Q = 2.77
Em = 2.40
bulkindex = 1
gbindex = 20
surfindex = 100
[../]
# Equilibrium vacancy concentration
[./cs_eq]
type = DerivativeParsedMaterial
property_name = cs_eq
coupled_variables = 'gr0 gr1 T'
constant_names = 'Ef Egb kB'
constant_expressions = '2.69 2.1 8.617343e-5'
expression = 'bnds:=gr0^2 + gr1^2; cb:=exp(-Ef/kB/T); cgb:=exp(-(Ef-Egb)/kB/T);
cb + 4.0*(cgb-cb)*(1.0 - bnds)^2'
[../]
# Everything else
[./sintering]
type = GrandPotentialSinteringMaterial
chemical_potential = w
void_op = phi
Temperature = T
surface_energy = 19.7
grainboundary_energy = 9.86
void_energy_coefficient = kv
equilibrium_vacancy_concentration = cs_eq
solid_energy_model = PARABOLIC
outputs = exodus
[../]
# Concentration is only meant for output
[./c]
type = ParsedMaterial
property_name = c
material_property_names = 'hs rhos hv rhov'
constant_names = 'Va'
constant_expressions = '0.04092'
expression = 'Va*(hs*rhos + hv*rhov)'
outputs = exodus
[../]
[]
[Kernels]
[./dt_gr0]
type = TimeDerivative
variable = gr0
[../]
[./dt_gr1]
type = TimeDerivative
variable = gr1
[../]
[./dt_phi]
type = TimeDerivative
variable = phi
[../]
[./dt_w]
type = TimeDerivative
variable = w
[../]
[]
[AuxKernels]
[./T_aux]
type = FunctionAux
variable = T
function = f_T
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = JFNK
dt = 1
num_steps = 2
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/multiapp_userobject_transfer/tosub_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 8
xmax = 0.1
ymax = 0.5
[]
[Variables]
[./u]
initial_condition = 1
[../]
[]
[AuxVariables]
[./multi_layered_average]
[../]
[./element_multi_layered_average]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./axial_force]
type = ParsedFunction
expression = 1000*y
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = axial_force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.001
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[Problem]
coord_type = rz
type = FEProblem
[]
(test/tests/controls/pid_control/pid_pp_control.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
inactive = 'exception'
[diff]
type = CoefDiffusion
variable = u
coef = 1
[]
[exception]
type = NanKernel
variable = 'u'
timestep_to_nan = 2
[]
[]
[BCs]
[left]
type = PostprocessorDirichletBC
variable = u
boundary = 3
postprocessor = received_bc
[]
[right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[]
[]
[Functions]
[conditional_function]
type = ParsedFunction
expression = 't >= 1.9 & t < 2.1'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 20
dt = 1
nl_abs_tol = 1e-10
line_search = 'none'
# For picard tests
picard_abs_tol = 1e-3
[]
[Postprocessors]
[integral]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = 'initial timestep_end'
[]
[received_bc]
type = Receiver
default = 0
[]
[]
[Controls]
inactive = 'make_crash'
[integral_value]
type = PIDTransientControl
postprocessor = integral
target = 1.5
parameter_pp = 'received_bc'
K_integral = -1
K_proportional = -1
K_derivative = -0.1
execute_on = 'initial timestep_begin'
[]
[make_crash]
type = ConditionalFunctionEnableControl
enable_objects = 'Kernels::exception'
conditional_function = 'conditional_function'
execute_on = 'timestep_begin'
[]
[]
[MultiApps]
inactive = 'shortest_app'
[shortest_app]
type = TransientMultiApp
input_files = 'pid_pp_control_subapp.i'
[]
[]
[Outputs]
file_base = out
exodus = false
csv = true
[]
(test/tests/utils/spline_interpolation/bicubic_spline_interpolation_y_normal.i)
[Mesh]
type = GeneratedMesh
dim = 3
ny = 1 # needed to ensure Z is the problem dimension
nx = 4
nz = 4
xmax = 4
zmax = 4
[]
[Functions]
[./yx1]
type = ParsedFunction
expression = '3*z^2'
[../]
[./yx2]
type = ParsedFunction
expression = '6*x^2'
[../]
[./spline_fn]
type = BicubicSplineFunction
normal_component = y
x1 = '0 2 4'
x2 = '0 2 4 6'
y = '0 16 128 432 8 24 136 440 64 80 192 496'
yx11 = '0 0 0 0'
yx1n = '48 48 48 48'
yx21 = '0 0 0'
yx2n = '216 216 216'
yx1 = 'yx1'
yx2 = 'yx2'
[../]
[./u_func]
type = ParsedFunction
expression = 'z^3 + 2*x^3'
[../]
[./u2_forcing_func]
type = ParsedFunction
expression = '-6*z - 12*x'
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./bi_func_value]
order = FIRST
family = LAGRANGE
[../]
[./x_deriv]
order = FIRST
family = LAGRANGE
[../]
[./z_deriv]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./bi_func_value]
type = FunctionAux
variable = bi_func_value
function = spline_fn
[../]
[./deriv_1]
type = FunctionDerivativeAux
function = spline_fn
variable = z_deriv
component = z
[../]
[./deriv_2]
type = FunctionDerivativeAux
function = spline_fn
variable = x_deriv
component = x
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
function = u2_forcing_func
[../]
[]
[BCs]
[./sides]
type = FunctionDirichletBC
variable = u
boundary = 'left right front back'
function = u_func
[../]
[]
[Postprocessors]
[./nodal_l2_err_spline]
type = NodalL2Error
variable = u
function = spline_fn
execute_on = 'initial timestep_end'
[../]
[./nodal_l2_err_analytic]
type = NodalL2Error
variable = u
function = u_func
execute_on = 'initial timestep_end'
[../]
[./x_deriv_err_analytic]
type = NodalL2Error
variable = x_deriv
function = yx2
execute_on = 'initial timestep_end'
[../]
[./z_deriv_err_analytic]
type = NodalL2Error
variable = z_deriv
function = yx1
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = 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/mortar/convergence-studies/continuity-3d/continuity.i)
[Mesh]
second_order = true
[file]
type = FileMeshGenerator
file = hex_mesh.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
new_block_id = 11
new_block_name = "secondary"
sidesets = '101'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
new_block_id = 12
new_block_name = "primary"
sidesets = '102'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[T]
block = '1 2'
order = SECOND
[]
[lambda]
block = 'secondary'
# family = MONOMIAL
# order = CONSTANT
family = LAGRANGE
order = SECOND
use_dual = true
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln_primal
variable = T
boundary = '1 2'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi) + 3*pi^2*sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_primal]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_lambda]
type = ParsedFunction
expression = 'pi*sin(pi*y)*sin(pi*z)*cos(pi*x)'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = '12'
secondary_subdomain = '11'
variable = lambda
secondary_variable = T
# delta = 0.1
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
csv = true
[]
[Postprocessors]
[L2lambda]
type = ElementL2Error
variable = lambda
function = exact_soln_lambda
execute_on = 'timestep_end'
block = 'secondary'
[]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = '1 2'
[]
[h]
type = AverageElementSize
block = '1 2'
[]
[]
(modules/xfem/test/tests/init_solution_propagation/init_solution_propagation.i)
# The purpose of this test is to verify that the procedures for initializing
# the solution on nodes/elements affected by XFEM works correctly in both
# serial and parallel.
# The crack cuts near to domain boundaries in parallel, and the displacement
# solution will be wrong in parallel if this is not done correctly. This
# test also has multiple aux variables of various types that are only computed
# on initialization, and which will be wrong if the XFEM initializtion
# is not done correctly.
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[XFEM]
output_cut_plane = true
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 7
ny = 7
xmin = 0.0
xmax = 25.0
ymin = -12.5
ymax = 12.5
elem_type = QUAD4
[]
[UserObjects]
[./line_seg_cut_set_uo]
type = LineSegmentCutSetUserObject
cut_data ='0.0000e+000 0.0000e+000 5.5000e+000 0.0000e+000 0.0 0.0
5.5000e+000 0.0000e+000 2.5500e+001 0.0000e+000 0.05 1.05'
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[AuxVariables]
[./const_monomial]
order = CONSTANT
family = MONOMIAL
[../]
[./first_monomial]
order = FIRST
family = MONOMIAL
[../]
[./first_linear]
order = FIRST
family = LAGRANGE
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
add_variables = true
planar_formulation = PLANE_STRAIN
[../]
[]
[AuxKernels]
[./const_monomial]
type = FunctionAux
function = 'dummy'
variable = const_monomial
execute_on = 'initial'
[../]
[./first_monomial]
type = FunctionAux
function = 'dummy'
variable = first_monomial
execute_on = 'initial'
[../]
[./first_linear]
type = FunctionAux
function = 'dummy'
variable = first_linear
execute_on = 'initial'
[../]
[]
[Functions]
[./dummy]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[./disp_top_y]
type = PiecewiseLinear
x = '0 1'
y = '0 0.1'
[../]
[]
[BCs]
[./top_y]
type = FunctionDirichletBC
boundary = 2
variable = disp_y
function = disp_top_y
[../]
[./bottom_y]
type = DirichletBC
boundary = 0
variable = disp_y
value = 0.0
[../]
[./right_x]
type = DirichletBC
boundary = 1
variable = disp_x
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
petsc_options = '-snes_ksp_ew'
l_max_its = 100
nl_max_its = 25
nl_rel_tol = 1e-6
nl_abs_tol = 1e-8
start_time = 0.0
dt = 0.1
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(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/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad-rz-displacements.i)
[GlobalParams]
order = FIRST
integrate_p_by_parts = true
use_displaced_mesh = true
[]
[Mesh]
file = '2d_cone.msh'
displacements = 'disp_x disp_y'
[]
[Problem]
coord_type = RZ
[]
[AuxVariables]
[vel_x][]
[vel_y][]
[disp_x]
order = SECOND
[]
[disp_y]
order = SECOND
[]
[]
[AuxKernels]
[vel_x]
type = VectorVariableComponentAux
variable = vel_x
vector_variable = velocity
component = 'x'
[]
[vel_y]
type = VectorVariableComponentAux
variable = vel_y
vector_variable = velocity
component = 'y'
[]
[]
[Variables]
[velocity]
family = LAGRANGE_VEC
[]
[p]
[]
[]
# Need to set a non-zero initial condition because we have a velocity norm in
# the denominator for the tau coefficient of the stabilization term
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[Kernels]
[mass]
type = INSADMass
variable = p
[]
[mass_pspg]
type = INSADMassPSPG
variable = p
[]
[momentum_advection]
type = INSADMomentumAdvection
variable = velocity
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
[]
[momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[]
[]
[BCs]
[inlet]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom'
function_x = 0
function_y = 'inlet_func'
[]
[wall]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'right'
function_x = 0
function_y = 0
[]
[axis]
type = ADVectorFunctionDirichletBC
variable = velocity
boundary = 'left'
set_y_comp = false
function_x = 0
[]
[]
[Functions]
[inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[]
[ins_mat]
type = INSADTauMaterial
velocity = velocity
pressure = p
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
csv = true
[out]
type = Exodus
hide = 'disp_x disp_y'
[]
[]
[Postprocessors]
[flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[]
[flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[]
[]
(modules/richards/test/tests/buckley_leverett/bl22.i)
# two-phase version
# super-sharp front version
[Mesh]
type = GeneratedMesh
dim = 1
nx = 150
xmin = 0
xmax = 15
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1E-4 1E-3 1E-2 2E-2 5E-2 6E-2 0.1 0.2'
x = '0 1E-2 1E-1 1 5 20 40 41'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E6
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 2E6
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1E-4
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1E-4
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./SatWater]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SatGas]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGwater]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[./SUPGgas]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[./bounds_dummy]
[../]
[]
[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
[../]
[./richardsppenalty]
type = RichardsPPenalty
variable = pgas
a = 1E-18
lower_var = pwater
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = SeffWater
pressure_vars = 'pwater pgas'
[../]
[]
[ICs]
[./water_ic]
type = FunctionIC
variable = pwater
function = initial_water
[../]
[./gas_ic]
type = FunctionIC
variable = pgas
function = initial_gas
[../]
[]
[BCs]
[./left_w]
type = DirichletBC
variable = pwater
boundary = left
value = 1E6
[../]
[./left_g]
type = DirichletBC
variable = pgas
boundary = left
value = 1E6
[../]
[./right_w]
type = DirichletBC
variable = pwater
boundary = right
value = -100000
[../]
[./right_g]
type = DirichletBC
variable = pgas
boundary = right
value = 0
[../]
[]
[Functions]
[./initial_water]
type = ParsedFunction
expression = 1000000*(1-min(x/5,1))-100000*(max(x-5,0)/max(abs(x-5),1E-10))
[../]
[./initial_gas]
type = ParsedFunction
expression = max(1000000*(1-x/5),0)+1000
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.15
mat_permeability = '1E-10 0 0 0 1E-10 0 0 0 1E-10'
density_UO = 'DensityWater DensityGas'
relperm_UO = 'RelPermWater RelPermGas'
SUPG_UO = 'SUPGwater SUPGgas'
sat_UO = 'SatWater SatGas'
seff_UO = 'SeffWater SeffGas'
viscosity = '1E-3 1E-6'
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./standard]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_rtol -ksp_atol'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 20 1E-20 1E-20'
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 50
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = bl22
print_linear_converged_reason = false
print_nonlinear_converged_reason = false
[./exodus]
type = Exodus
time_step_interval = 100000
hide = pgas
execute_on = 'initial final timestep_end'
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_action_stabilized_transient.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = transient
velocity_boundary = 'bottom right top left'
velocity_function = '0 0 0 0 lid_function 0 0 0'
initial_velocity = '1e-15 1e-15 0'
add_standard_velocity_variables_for_ad = false
pressure_pinned_node = 0
density_name = rho
dynamic_viscosity_name = mu
use_ad = true
laplace = true
family = LAGRANGE
order = FIRST
add_temperature_equation = true
initial_temperature = 1
fixed_temperature_boundary = 'bottom top'
temperature_function = '1 0'
supg = true
pspg = true
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[]
[]
[Functions]
[lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/restart/parent2.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
ymin = 0
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[Functions]
[v_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[]
[AuxVariables]
[v]
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[ufn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = v_fn
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
app_type = MooseTestApp
type = TransientMultiApp
input_files = 'sub2.i'
execute_on = timestep_end
positions = '0 -1 0'
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[]
[]
[Problem]
restart_file_base = parent_out_cp/0005
[]
(test/tests/auxkernels/solution_scalar_aux/build.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./a]
family = SCALAR
order = FIRST
[../]
[]
[Functions]
[./a_fn]
type = ParsedFunction
expression = '4 - t'
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxScalarKernels]
[./a_sk]
type = FunctionScalarAux
variable = a
function = a_fn
execute_on = 'initial timestep_begin'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 2
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 3
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
nl_rel_tol = 1e-10
dt = 1
num_steps = 3
[]
[Outputs]
exodus = true
[]
(test/tests/outputs/debug/show_var_residual_norms_debug.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Functions]
[forcing_fnu]
type = ParsedFunction
expression = -5.8*(x+y)+x*x*x-x+y*y*y-y
[]
[forcing_fnv]
type = ParsedFunction
expression = -4
[]
[slnu]
type = ParsedGradFunction
expression = x*x*x-x+y*y*y-y
grad_x = 3*x*x-1
grad_y = 3*y*y-1
[]
[slnv]
type = ParsedGradFunction
expression = x*x+y*y
grad_x = 2*x
grad_y = 2*y
[]
#NeumannBC functions
[bc_fnut]
type = ParsedFunction
expression = 3*y*y-1
[]
[bc_fnub]
type = ParsedFunction
expression = -3*y*y+1
[]
[bc_fnul]
type = ParsedFunction
expression = -3*x*x+1
[]
[bc_fnur]
type = ParsedFunction
expression = 3*x*x-1
[]
[]
[Variables]
[u]
order = THIRD
family = HIERARCHIC
[]
[v]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
active = 'diff1 diff2 test1 forceu forcev react'
[diff1]
type = Diffusion
variable = u
[]
[test1]
type = CoupledConvection
variable = u
velocity_vector = v
[]
[diff2]
type = Diffusion
variable = v
[]
[react]
type = Reaction
variable = u
[]
[forceu]
type = BodyForce
variable = u
function = forcing_fnu
[]
[forcev]
type = BodyForce
variable = v
function = forcing_fnv
[]
[]
[BCs]
active = 'bc_u_tb bc_v bc_ul bc_ur bc_ut bc_ub'
[bc_u]
type = FunctionPenaltyDirichletBC
variable = u
function = slnu
boundary = 'left right top bottom'
penalty = 1e6
[]
[bc_v]
type = FunctionDirichletBC
variable = v
function = slnv
boundary = 'left right top bottom'
[]
[bc_u_lr]
type = FunctionPenaltyDirichletBC
variable = u
function = slnu
boundary = 'left right top bottom'
penalty = 1e6
[]
[bc_u_tb]
type = CoupledKernelGradBC
variable = u
var2 = v
vel = '0.1 0.1'
boundary = 'top bottom left right'
[]
[bc_ul]
type = FunctionNeumannBC
variable = u
function = bc_fnul
boundary = 'left'
[]
[bc_ur]
type = FunctionNeumannBC
variable = u
function = bc_fnur
boundary = 'right'
[]
[bc_ut]
type = FunctionNeumannBC
variable = u
function = bc_fnut
boundary = 'top'
[]
[bc_ub]
type = FunctionNeumannBC
variable = u
function = bc_fnub
boundary = 'bottom'
[]
[]
[Preconditioning]
active = ' '
[prec]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'L2u L2v'
[dofs]
type = NumDOFs
[]
[h]
type = AverageElementSize
[]
[L2u]
type = ElementL2Error
variable = u
function = slnu
[]
[L2v]
type = ElementL2Error
variable = v
function = slnv
[]
[H1error]
type = ElementH1Error
variable = u
function = solution
[]
[H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-15
nl_abs_tol = 1e-13
[]
[Outputs]
execute_on = 'timestep_end'
[]
[Debug]
show_var_residual_norms = 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/phase_field/examples/rigidbodymotion/grain_motion_GT.i)
# example showing grain motion due to applied force density on grains
[GlobalParams]
var_name_base = eta
op_num = 4
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 80
ny = 40
nz = 0
xmin = 0.0
xmax = 40.0
ymin = 0.0
ymax = 20.0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
[../]
[./w]
[../]
[./PolycrystalVariables]
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
coupled_variables = 'eta0 eta1 eta2 eta3'
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = 'eta0 eta1 eta2 eta3'
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[./RigidBodyMultiKernel]
# Creates all of the necessary Allen Cahn kernels automatically
c = c
f_name = F
mob_name = L
kappa_name = kappa_eta
grain_force = grain_force
grain_volumes = grain_volumes
grain_tracker_object = grain_center
[../]
[]
[Functions]
[./load_x]
# Defines the force on the grains in the x-direction
type = ParsedFunction
expression = 0.005*cos(x*pi/600)
[../]
[./load_y]
# Defines the force on the grains in the y-direction
type = ConstantFunction
value = 0.002
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M L kappa_c kappa_eta'
prop_values = '4.5 60 250 4000'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
#coupled_variables = 'c eta0 eta1 eta2 eta3'
#constant_names = 'barr_height cv_eq'
#constant_expressions = '0.1 1.0e-2'
#function = '16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2
# +eta0*(1-eta0)*c+eta1*(1-eta1)*c
# +eta2*(1-eta2)*c+eta3*(1-eta3)*c'
constant_names = 'A B'
constant_expressions = '450 1.5'
coupled_variables = 'c eta0 eta1 eta2 eta3' #Must be changed as op_num changes. Copy/paste from line 4
expression = 'A*c^2*(1-c)^2+B*(c^2+6*(1-c)*(eta0^2+eta1^2+eta2^2+eta3^2)
-4*(2-c)*(eta0^3+eta1^3+eta2^3+eta3^3)
+3*(eta0^2+eta1^2+eta2^2+eta3^2)^2)'
derivative_order = 2
[../]
#[./force_density]
# type = ForceDensityMaterial
# c = c
# etas = 'eta0 eta1 eta2 eta3'
#[../]
[./force_density]
type = ExternalForceDensityMaterial
c = c
k = 10.0
etas = 'eta0 eta1 eta2 eta3'
force_x = load_x
force_y = load_y
[../]
[]
[AuxVariables]
[./bnds]
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./centroids]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
#var_name_base = eta
#op_num = 4.0
v = 'eta0 eta1 eta2 eta3'
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_center
field_display = UNIQUE_REGION
execute_on = timestep_begin
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_center
field_display = VARIABLE_COLORING
execute_on = timestep_begin
[../]
[./centroids]
type = FeatureFloodCountAux
variable = centroids
execute_on = timestep_begin
field_display = CENTROID
flood_counter = grain_center
[../]
[]
[ICs]
[./ic_eta1]
x_positions = '32.5 24.0'
int_width = 1.0
z_positions = '0 0'
y_positions = '6.0 14.0'
radii = '4.0 4.0'
3D_spheres = false
outvalue = 0
variable = eta1
invalue = 1
type = SpecifiedSmoothCircleIC
block = 0
[../]
[./multip]
x_positions = '5.5 15.5 24.0 32.5 7.0 15.5 24.0 32.5'
int_width = 1.0
z_positions = '0 0'
y_positions = '6.0 6.0 6.0 6.0 14.5 14.5 14.0 14.5'
radii = '4.0 4.0 4.0 4.0 4.0 4.0 4.0 4.0'
3D_spheres = false
outvalue = 0.001
variable = c
invalue = 0.999
type = SpecifiedSmoothCircleIC
block = 0
[../]
[./ic_eta0]
x_positions = '5.5 15.5'
int_width = 1.0
z_positions = '0 0'
y_positions = '6.0 6.0'
radii = '4.0 4.0'
3D_spheres = false
outvalue = 0.0
variable = eta0
invalue = 1.0
type = SpecifiedSmoothCircleIC
block = 0
[../]
[./ic_eta2]
x_positions = '24.0 7.0'
int_width = 1.0
z_positions = '0 0'
y_positions = '6.0 14.5 '
radii = '4.0 4.0 '
3D_spheres = false
outvalue = 0.0
variable = eta2
invalue = 1.0
type = SpecifiedSmoothCircleIC
block = 0
[../]
[./ic_eta3]
x_positions = '15.5 32.5'
int_width = 1.0
z_positions = '0 0'
y_positions = '14.5 14.5'
radii = '4.0 4.0'
3D_spheres = false
outvalue = 0.0
variable = eta3
invalue = 1.0
type = SpecifiedSmoothCircleIC
block = 0
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ComputeExternalGrainForceAndTorque
c = c
grain_data = grain_center
force_density = force_density_ext
etas = 'eta0 eta1 eta2 eta3'
execute_on = 'initial linear nonlinear'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 20
dt = 0.01
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/special/rotate.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
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[]
[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_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_xz]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[angles]
type = PiecewiseLinear
x = '0 1 2'
y = '0 0 1.5707963'
[]
[stretch]
type = PiecewiseLinear
x = '0 1 2'
y = '0 0.1 0.1'
[]
[move_y]
type = ParsedFunction
expression = 'y*cos(theta) - z * (1 + a)*sin(theta) - y'
symbol_names = 'a theta'
symbol_values = 'stretch angles'
[]
[move_z]
type = ParsedFunction
expression = 'y*sin(theta) + z*(1+a)*cos(theta) - z'
symbol_names = 'a theta'
symbol_values = 'stretch angles'
[]
[dts]
type = PiecewiseConstant
x = '0 1 2'
y = '0.1 0.001 0.001'
direction = 'LEFT_INCLUSIVE'
[]
[]
[BCs]
[fix]
type = DirichletBC
preset = true
value = 0.0
boundary = left
variable = disp_x
[]
[front_y]
type = FunctionDirichletBC
boundary = front
variable = disp_y
function = move_y
preset = true
[]
[back_y]
type = FunctionDirichletBC
boundary = back
variable = disp_y
function = move_y
preset = true
[]
[front_z]
type = FunctionDirichletBC
boundary = front
variable = disp_z
function = move_z
preset = true
[]
[back_z]
type = FunctionDirichletBC
boundary = back
variable = disp_z
function = move_z
preset = true
[]
[]
[AuxKernels]
[stress_xx]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_xz
index_i = 0
index_j = 2
execute_on = timestep_end
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_yz
index_i = 1
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]
[sxx]
type = ElementAverageValue
variable = stress_xx
[]
[syy]
type = ElementAverageValue
variable = stress_yy
[]
[szz]
type = ElementAverageValue
variable = stress_zz
[]
[syz]
type = ElementAverageValue
variable = stress_yz
[]
[sxz]
type = ElementAverageValue
variable = stress_xz
[]
[sxy]
type = ElementAverageValue
variable = stress_xy
[]
[]
[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-4
nl_abs_tol = 1e-6
start_time = 0.0
end_time = 2.0
[TimeStepper]
type = FunctionDT
function = dts
interpolate = False
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/convergence-auto/3D/neumann.i)
# Simple 3D test
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = true
stabilize_strain = true
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 4
nz = 4
[]
[]
[ICs]
[disp_x]
type = RandomIC
variable = disp_x
min = -0.02
max = 0.02
[]
[disp_y]
type = RandomIC
variable = disp_y
min = -0.02
max = 0.02
[]
[disp_z]
type = RandomIC
variable = disp_z
min = -0.02
max = 0.02
[]
[]
[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
[]
[]
[Functions]
[pullx]
type = ParsedFunction
expression = '4000 * t'
[]
[pully]
type = ParsedFunction
expression = '-2000 * t'
[]
[pullz]
type = ParsedFunction
expression = '3000 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = left
variable = disp_y
value = 0.0
[]
[leftz]
type = DirichletBC
preset = true
boundary = left
variable = disp_z
value = 0.0
[]
[pull_x]
type = FunctionNeumannBC
boundary = right
variable = disp_x
function = pullx
[]
[pull_y]
type = FunctionNeumannBC
boundary = top
variable = disp_y
function = pully
[]
[pull_z]
type = FunctionNeumannBC
boundary = right
variable = disp_z
function = pullz
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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
[]
(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
[]
[]
(test/tests/mortar/convergence-studies/gap-conductance/gap-conductance.i)
[Problem]
error_on_jacobian_nonzero_reallocation = true
[]
[Mesh]
second_order = true
[./left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[../]
[./left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary_id = '0 1 2 3'
new_boundary = 'lb_bottom lb_right lb_top lb_left'
[../]
[./left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[../]
[./right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 2
xmax = 3
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[../]
[./right_block_id]
type = SubdomainIDGenerator
input = right_block
subdomain_id = 2
[../]
[right_block_change_boundary_id]
type = RenameBoundaryGenerator
input = right_block_id
old_boundary_id = '0 1 2 3'
new_boundary_id = '100 101 102 103'
[]
[./combined]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_change_boundary_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'left_block right_block'
[../]
[right_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = rb_right
block = right_block
normal = '1 0 0'
[]
[right_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_right_sideset
new_boundary = rb_left
block = right_block
normal = '-1 0 0'
[]
[right_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_left_sideset
new_boundary = rb_top
block = right_block
normal = '0 1 0'
[]
[right_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_top_sideset
new_boundary = rb_bottom
block = right_block
normal = '0 -1 0'
[]
[secondary]
input = right_bottom_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'lb_right'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'rb_left'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[./T]
block = 'left_block right_block'
order = SECOND
[../]
[./lambda]
block = 'secondary_lower'
family = MONOMIAL
order = CONSTANT
[../]
[]
[BCs]
[./neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln_primal
variable = T
boundary = 'lb_bottom lb_top lb_left rb_bottom rb_right rb_top'
[../]
[]
[Kernels]
[./conduction]
type = Diffusion
variable = T
block = 'left_block right_block'
[../]
[./sink]
type = Reaction
variable = T
block = 'left_block right_block'
[../]
[./forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = 'left_block right_block'
[../]
[]
[Functions]
[./forcing_function]
type = ParsedFunction
expression = ''
[../]
[./exact_soln_primal]
type = ParsedFunction
expression = ''
[../]
[exact_soln_lambda]
type = ParsedFunction
expression = ''
[]
[mms_secondary]
type = ParsedFunction
expression = ''
[]
[mms_primary]
type = ParsedFunction
expression = ''
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[./mortar]
type = GapHeatConductanceTest
primary_boundary = rb_left
secondary_boundary = lb_right
primary_subdomain = primary_lower
secondary_subdomain = secondary_lower
secondary_variable = T
variable = lambda
secondary_gap_conductance = 1
primary_gap_conductance = 1
secondary_mms_function = mms_secondary
primary_mms_function = mms_primary
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
[Postprocessors]
[L2lambda]
type = ElementL2Error
variable = lambda
function = exact_soln_lambda
execute_on = 'timestep_end'
block = 'secondary_lower'
[]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = 'left_block right_block'
[]
[h]
type = AverageElementSize
block = 'left_block right_block'
[]
[]
(modules/solid_mechanics/test/tests/generalized_plane_strain/plane_strain.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
block = 0
[]
[Mesh]
[./square]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[../]
[]
[AuxVariables]
[./temp]
[../]
[./saved_x]
[../]
[./saved_y]
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
use_displaced_mesh = false
[../]
[]
[Functions]
[./tempfunc]
type = ParsedFunction
expression = '(1-x)*t'
[../]
[]
[BCs]
[./bottomx]
type = DirichletBC
boundary = 0
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = DirichletBC
boundary = 0
variable = disp_y
value = 0.0
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = SMALL
add_variables = true
temperature = temp
generate_output = 'stress_xx stress_xy stress_yy stress_zz strain_xx strain_xy strain_yy strain_zz'
planar_formulation = PLANE_STRAIN
eigenstrain_names = eigenstrain
save_in = 'saved_x saved_y'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./elastic_stress]
type = ComputeLinearElasticStress
[../]
[./thermal_strain]
type = ComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 0.02
temperature = temp
stress_free_temperature = 0.5
eigenstrain_name = eigenstrain
[../]
[]
[Postprocessors]
[./react_z]
type = MaterialTensorIntegral
rank_two_tensor = stress
index_i = 2
index_j = 2
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
# controls for linear iterations
l_max_its = 100
l_tol = 1e-8
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-10
nl_abs_tol = 1e-12
# time control
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 2.0
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/rom_stress_update/creep_ramp_sub_false.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[temperature]
initial_condition = 889
[]
[effective_inelastic_strain]
order = FIRST
family = MONOMIAL
[]
[cell_dislocations]
order = FIRST
family = MONOMIAL
[]
[wall_dislocations]
order = FIRST
family = MONOMIAL
[]
[number_of_substeps]
order = FIRST
family = MONOMIAL
[]
[]
[AuxKernels]
[effective_inelastic_strain]
type = MaterialRealAux
variable = effective_inelastic_strain
property = effective_creep_strain
[]
[cell_dislocations]
type = MaterialRealAux
variable = cell_dislocations
property = cell_dislocations
[]
[wall_dislocations]
type = MaterialRealAux
variable = wall_dislocations
property = wall_dislocations
[]
[number_of_substeps]
type = MaterialRealAux
variable = number_of_substeps
property = number_of_substeps
[]
[]
[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 = -0.5
function = shear_function
[]
[pressure_y]
type = Pressure
variable = disp_y
boundary = top
factor = -0.5
function = shear_function
[]
[pressure_z]
type = Pressure
variable = disp_z
boundary = front
factor = 0.5
function = shear_function
[]
[]
[Functions]
[shear_function]
type = ParsedFunction
expression = 'timeToDoubleInHours := 10;
if(t<=28*60*60, 15.0e6, 15.0e6*(t-28*3600)/3600/timeToDoubleInHours+15.0e6)'
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1.68e11
poissons_ratio = 0.31
[]
[stress]
type = ComputeMultipleInelasticStress
inelastic_models = rom_stress_prediction
[]
[mx_phase_fraction]
type = GenericConstantMaterial
prop_names = mx_phase_fraction
prop_values = 5.13e-2 #precipitation bounds: 6e-3, 1e-1
outputs = all
[]
[rom_stress_prediction]
type = SS316HLAROMANCEStressUpdateTest
temperature = temperature
initial_cell_dislocation_density = 6.0e12
initial_wall_dislocation_density = 4.4e11
use_substepping = NONE
max_inelastic_increment = 0.0001
stress_input_window_low_failure = WARN
stress_input_window_high_failure = ERROR
cell_input_window_high_failure = ERROR
cell_input_window_low_failure = ERROR
wall_input_window_low_failure = ERROR
wall_input_window_high_failure = ERROR
temperature_input_window_high_failure = ERROR
temperature_input_window_low_failure = ERROR
environment_input_window_high_failure = ERROR
environment_input_window_low_failure = ERROR
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
nl_abs_tol = 1e-12
nl_rel_tol = 1e-4
automatic_scaling = true
compute_scaling_once = false
dtmin = 0.1
dtmax = 1e5
end_time = 136800
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.1 ## This model requires a tiny timestep at the onset for the first 10s
iteration_window = 4
optimal_iterations = 12
time_t = '100800'
time_dt = '1e5'
[]
[]
[Postprocessors]
[effective_strain_avg]
type = ElementAverageValue
variable = effective_inelastic_strain
[]
[temperature]
type = ElementAverageValue
variable = temperature
[]
[cell_dislocations]
type = ElementAverageValue
variable = cell_dislocations
[]
[wall_disloactions]
type = ElementAverageValue
variable = wall_dislocations
[]
[max_vonmises_stress]
type = ElementExtremeValue
variable = vonmises_stress
value_type = max
[]
[number_of_substeps]
type = ElementAverageValue
variable = number_of_substeps
[]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/radial_disp_aux/cylinder_2d_cartesian.i)
# The purpose of this set of tests is to check the values computed
# by the RadialDisplacementAux AuxKernel. They should match the
# radial component of the displacment for a cylindrical or spherical
# model.
# This particular model is of a cylinder subjected to uniform thermal
# expansion represented using a 2D Cartesian model.
[Mesh]
type = FileMesh
file = circle_sector_2d.e
[]
[GlobalParams]
displacements = 'disp_x disp_y'
order = SECOND
family = LAGRANGE
[]
[AuxVariables]
[./temp]
[../]
[./rad_disp]
[../]
[]
[Functions]
[./temperature_load]
type = ParsedFunction
expression = t+300.0
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
eigenstrain_names = eigenstrain
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = temperature_load
use_displaced_mesh = false
[../]
[./raddispaux]
type = RadialDisplacementCylinderAux
variable = rad_disp
origin = '0 0 0'
[../]
[]
[BCs]
[./x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./y]
type = DirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 300
thermal_expansion_coeff = 1.3e-5
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '51'
line_search = 'none'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
start_time = 0.0
end_time = 1
dt = 1
dtmin = 1
[]
[Outputs]
csv = true
exodus = true
[]
#[Postprocessors]
# [./strain_xx]
# type = SideAverageValue
# variable =
# block = 0
# [../]
#[]
(modules/xfem/test/tests/high_order_elements/diffusion_quad9_levelsetcut.i)
# A simple diffusion problem with quad9 elements
# The mesh is cut using levle set based cutter
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 3
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD9
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Functions]
[./u_left]
type = PiecewiseLinear
x = '0 2'
y = '3 5'
[../]
[./ls_func]
type = ParsedFunction
expression = 'x-0.53'
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
# Define boundary conditions
[./left_u]
type = DirichletBC
variable = u
boundary = 3
value = 3
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
line_search = 'none'
l_tol = 1e-3
nl_max_its = 15
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
start_time = 0.0
dt = 1
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = timestep_end
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/solid_mechanics/test/tests/j_integral_vtest/fgm_5.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
[file]
type = FileMeshGenerator
file = 2d_paulino.e
[]
# uniform_refine = 3
[]
[AuxVariables]
[react_z]
[]
[]
[DomainIntegral]
integrals = 'JIntegral InteractionIntegralKI'
boundary = 1001
radius_inner = '0.01 0.04 0.1 0.2'
radius_outer = '0.01 0.04 0.1 0.2'
crack_direction_method = CrackDirectionVector
crack_direction_vector = '1 0 0' # is it +?
2d = true
axis_2d = 2
incremental = true
symmetry_plane = 1
functionally_graded_youngs_modulus = elastic_mod_material_mat
functionally_graded_youngs_modulus_crack_dir_gradient = elastic_mod_material_der_mat
youngs_modulus = 2e6
poissons_ratio = 0.3
block = '1'
[]
[Physics/SolidMechanics/QuasiStatic]
[master]
strain = FINITE
add_variables = true
incremental = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress strain_xx strain_yy'
decomposition_method = EigenSolution
planar_formulation = PLANE_STRAIN
[]
[]
[Functions]
[parsed_load]
type = ParsedFunction
symbol_names = 'E1 E2 beta'
symbol_values = '1e3 3e3 5'
expression = '-1.0*((E1 + E2) / 2 + (E1 - E2)/2 * tanh(beta*(x+0.1)))'
[]
[elastic_mod_material_der]
type = ParsedFunction
symbol_names = 'E1 E2 beta'
symbol_values = '1e6 3e6 5'
expression = '(E1 - E2) / 2 * beta * (1.0 - tanh(beta*(x+0.1)) * tanh(beta*(x+0.1)))'
[]
[elastic_mod_material]
type = ParsedFunction
symbol_names = 'E1 E2 beta'
symbol_values = '1e6 3e6 5'
expression = '(E1 + E2) / 2 + (E1 - E2)/2 * tanh(beta*(x+0.1))'
[]
[]
[BCs]
[plane_1_x]
type = DirichletBC
variable = disp_x
boundary = 10001
value = 0.0
[]
[plane_y]
type = DirichletBC
variable = disp_y
boundary = '10005 6 1' #10001
value = 0.0
[]
[Pressure]
[Side1]
boundary = 4
function = parsed_load # BCs
[]
[]
[]
[Materials]
[generic_materials]
type = GenericFunctionMaterial
prop_names = 'elastic_mod_material_mat elastic_mod_material_der_mat'
prop_values = 'elastic_mod_material elastic_mod_material_der'
[]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = elastic_mod_material_mat
poissons_ratio = 0.3
args = ''
[]
[elastic_stress]
type = ComputeFiniteStrainElasticStress
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
line_search = 'none'
l_max_its = 50
nl_max_its = 20
nl_abs_tol = 1e-5
nl_rel_tol = 1e-8
l_tol = 1e-6
start_time = 0.0
dt = 1.0
end_time = 1
num_steps = 1
[]
[Postprocessors]
[_dt]
type = TimestepSize
[]
[nl_its]
type = NumNonlinearIterations
[]
[lin_its]
type = NumLinearIterations
[]
[react_z]
type = NodalSum
variable = react_z
boundary = '10005 6 1'
[]
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
exodus = true
[]
(modules/ray_tracing/test/tests/raykernels/material_integral_ray_kernel/material_integral_ray_kernel.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmax = 5
ymax = 5
[]
[modify_subdomain]
type = ParsedSubdomainMeshGenerator
input = gmg
block_id = 1
combinatorial_geometry = 'x > 2'
[]
[]
[Materials]
[generic_mat_block0]
type = GenericFunctionMaterial
block = 0
prop_names = 'mat'
prop_values = 'parsed_block0'
[]
[generic_mat_block1]
type = GenericFunctionMaterial
block = 1
prop_names = 'mat'
prop_values = 'parsed_block1'
[]
[]
[Functions]
[parsed_block0]
type = ParsedFunction
expression = 'x + 2 * y'
[]
[parsed_block1] # continuous at the interface
type = ParsedFunction
expression = '2 * x + 2 * y - 2'
[]
[]
[UserObjects]
[study]
type = RepeatableRayStudy
names = 'diag
top_across
bottom_across
partial'
start_points = '0 0 0
0 5 0
0 0 0
0.5 0.5 0'
end_points = '5 5 0
5 5 0
5 0 0
4.5 0.5 0'
[]
[]
[RayKernels]
[material_integral]
type = MaterialIntegralRayKernel
study = study
mat_prop = mat
[]
[]
[Postprocessors]
[diag_value]
type = RayIntegralValue
ray_kernel = material_integral
ray = diag
[]
[top_across_value]
type = RayIntegralValue
ray_kernel = material_integral
ray = top_across
[]
[bottom_across_value]
type = RayIntegralValue
ray_kernel = material_integral
ray = bottom_across
[]
[partial_value]
type = RayIntegralValue
ray_kernel = material_integral
ray = partial
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = false
csv = true
[]
(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'
expression = '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'
expression = '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/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/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/cp_slip_rate_integ/crysp_linesearch.i)
[Mesh]
type = GeneratedMesh
dim = 3
elem_type = HEX8
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
block = 0
[../]
[./disp_y]
block = 0
[../]
[./disp_z]
block = 0
[../]
[]
[AuxVariables]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./fp_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./e_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./gss1]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[]
[Functions]
[./tdisp]
type = ParsedFunction
expression = 0.0001*t
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_zz]
type = RankTwoAux
variable = stress_zz
rank_two_tensor = stress
index_j = 2
index_i = 2
execute_on = timestep_end
block = 0
[../]
[./fp_zz]
type = RankTwoAux
variable = fp_zz
rank_two_tensor = fp
index_j = 2
index_i = 2
execute_on = timestep_end
block = 0
[../]
[./e_zz]
type = RankTwoAux
variable = e_zz
rank_two_tensor = lage
index_j = 2
index_i = 2
execute_on = timestep_end
block = 0
[../]
[./gss1]
type = MaterialStdVectorAux
variable = gss1
property = gss
index = 0
execute_on = timestep_end
block = 0
[../]
[]
[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
[../]
[./tdisp]
type = FunctionDirichletBC
variable = disp_z
boundary = front
function = tdisp
[../]
[]
[Materials]
[./crysp]
type = FiniteStrainCPSlipRateRes
block = 0
slip_sys_file_name = input_slip_sys.txt
nss = 12
num_slip_sys_flowrate_props = 2 #Number of properties in a slip system
flowprops = '1 4 0.001 0.01 5 8 0.001 0.01 9 12 0.001 0.01'
hprops = '1.0 541.5 60.8 109.8 2.5'
gprops = '1 4 60.8 5 8 60.8 9 12 60.8'
tan_mod_type = exact
slip_incr_tol = 1
maximum_substep_iteration = 12
use_line_search = true
rtol = 1e-8
abs_tol = 1e-12
line_search_method = 'BISECTION'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensorCP
block = 0
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[]
[Postprocessors]
[./stress_zz]
type = ElementAverageValue
variable = stress_zz
block = 'ANY_BLOCK_ID 0'
[../]
[./fp_zz]
type = ElementAverageValue
variable = fp_zz
block = 'ANY_BLOCK_ID 0'
[../]
[./e_zz]
type = ElementAverageValue
variable = e_zz
block = 'ANY_BLOCK_ID 0'
[../]
[./gss1]
type = ElementAverageValue
variable = gss1
block = 'ANY_BLOCK_ID 0'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
dt = 10
dtmin = 0.05
dtmax = 1e4
num_steps = 10
[]
[Outputs]
file_base = crysp_linesearch_out
exodus = true
print_linear_residuals = true
perf_graph = true
[]
(test/tests/postprocessors/interface_diffusive_flux/interface_diffusive_flux_fv.i)
postprocessor_type = InterfaceDiffusiveFluxAverage
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 6
xmax = 3
ny = 9
ymax = 3
elem_type = QUAD4
[]
[subdomain_id]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '2 1 0'
block_id = 1
[]
[interface]
input = subdomain_id
type = SideSetsBetweenSubdomainsGenerator
primary_block = '1'
paired_block = '0'
new_boundary = 'interface'
[]
[]
[Functions]
[fn_exact]
type = ParsedFunction
expression = 'x*x+y*y'
[]
[]
[Variables]
[u]
type = MooseVariableFVReal
block = 0
[]
[v]
type = MooseVariableFVReal
block = 1
[]
[]
[FVKernels]
[diff_u]
type = FVDiffusion
variable = u
coeff = 1
[]
[body_u]
type = FVBodyForce
variable = u
function = 1
[]
[diff_v]
type = FVDiffusion
variable = v
coeff = 1
[]
[body_v]
type = FVBodyForce
variable = v
function = -1
[]
[]
[FVInterfaceKernels]
[reaction]
type = FVDiffusionInterface
variable1 = u
variable2 = v
coeff1 = 1
coeff2 = 2
boundary = 'interface'
subdomain1 = '0'
subdomain2 = '1'
coeff_interp_method = average
[]
[]
[FVBCs]
[all]
type = FVFunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = fn_exact
[]
[]
[Postprocessors]
[diffusive_flux]
type = ${postprocessor_type}
variable = v
neighbor_variable = u
diffusivity = 1
execute_on = TIMESTEP_END
boundary = 'interface'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
file_base = '${raw ${postprocessor_type} _fv}'
exodus = true
[]
(modules/porous_flow/examples/coal_mining/coarse_with_fluid.i)
# Strata deformation and fluid flow aaround a coal mine - 3D model
#
# A "half model" is used. The mine is 400m deep and
# just the roof is studied (-400<=z<=0). The mining panel
# sits between 0<=x<=150, and 0<=y<=1000, so this simulates
# a coal panel that is 300m wide and 1000m long. The outer boundaries
# are 1km from the excavation boundaries.
#
# The excavation takes 0.5 years.
#
# The boundary conditions for this simulation are:
# - disp_x = 0 at x=0 and x=1150
# - disp_y = 0 at y=-1000 and y=1000
# - disp_z = 0 at z=-400, but there is a time-dependent
# Young modulus that simulates excavation
# - wc_x = 0 at y=-1000 and y=1000
# - wc_y = 0 at x=0 and x=1150
# - no flow at x=0, z=-400 and z=0
# - fixed porepressure at y=-1000, y=1000 and x=1150
# That is, rollers on the sides, free at top,
# and prescribed at bottom in the unexcavated portion.
#
# A single-phase unsaturated fluid is used.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa, and time units are measured in years.
#
# The initial porepressure is hydrostatic with P=0 at z=0, so
# Porepressure ~ - 0.01*z MPa, where the fluid has density 1E3 kg/m^3 and
# gravity = = 10 m.s^-2 = 1E-5 MPa m^2/kg.
# To be more accurate, i use
# Porepressure = -bulk * log(1 + g*rho0*z/bulk)
# where bulk=2E3 MPa and rho0=1Ee kg/m^3.
# The initial stress is consistent with the weight force from undrained
# density 2500 kg/m^3, and fluid porepressure, and a Biot coefficient of 0.7, ie,
# stress_zz^effective = 0.025*z + 0.7 * initial_porepressure
# The maximum and minimum principal horizontal effective stresses are
# assumed to be equal to 0.8*stress_zz.
#
# Material properties:
# Young's modulus = 8 GPa
# Poisson's ratio = 0.25
# Cosserat layer thickness = 1 m
# Cosserat-joint normal stiffness = large
# Cosserat-joint shear stiffness = 1 GPa
# MC cohesion = 2 MPa
# MC friction angle = 35 deg
# MC dilation angle = 8 deg
# MC tensile strength = 1 MPa
# MC compressive strength = 100 MPa
# WeakPlane cohesion = 0.1 MPa
# WeakPlane friction angle = 30 deg
# WeakPlane dilation angle = 10 deg
# WeakPlane tensile strength = 0.1 MPa
# WeakPlane compressive strength = 100 MPa softening to 1 MPa at strain = 1
# Fluid density at zero porepressure = 1E3 kg/m^3
# Fluid bulk modulus = 2E3 MPa
# Fluid viscosity = 1.1E-3 Pa.s = 1.1E-9 MPa.s = 3.5E-17 MPa.year
#
[GlobalParams]
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
PorousFlowDictator = dictator
biot_coefficient = 0.7
[]
[Mesh]
[file]
type = FileMeshGenerator
file = mesh/coarse.e
[]
[xmin]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
new_boundary = xmin
normal = '-1 0 0'
input = file
[]
[xmax]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
new_boundary = xmax
normal = '1 0 0'
input = xmin
[]
[ymin]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
new_boundary = ymin
normal = '0 -1 0'
input = xmax
[]
[ymax]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
new_boundary = ymax
normal = '0 1 0'
input = ymin
[]
[zmax]
type = SideSetsAroundSubdomainGenerator
block = 16
new_boundary = zmax
normal = '0 0 1'
input = ymax
[]
[zmin]
type = SideSetsAroundSubdomainGenerator
block = 2
new_boundary = zmin
normal = '0 0 -1'
input = zmax
[]
[excav]
type = SubdomainBoundingBoxGenerator
input = zmin
block_id = 1
bottom_left = '0 0 -400'
top_right = '150 1000 -397'
[]
[roof]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 3
paired_block = 1
input = excav
new_boundary = roof
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[wc_x]
[]
[wc_y]
[]
[porepressure]
scaling = 1E-5
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = ini_pp
[]
[]
[Kernels]
[cx_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_x
component = 0
[]
[cy_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_y
component = 1
[]
[cz_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_z
component = 2
[]
[x_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[]
[y_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_y
displacements = 'wc_x wc_y wc_z'
component = 1
base_name = couple
[]
[x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[]
[y_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_y
component = 1
[]
[gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6 # remember this is in MPa
[]
[poro_x]
type = PorousFlowEffectiveStressCoupling
use_displaced_mesh = false
variable = disp_x
component = 0
[]
[poro_y]
type = PorousFlowEffectiveStressCoupling
use_displaced_mesh = false
variable = disp_y
component = 1
[]
[poro_z]
type = PorousFlowEffectiveStressCoupling
use_displaced_mesh = false
component = 2
variable = disp_z
[]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = porepressure
[]
[flux]
type = PorousFlowAdvectiveFlux
use_displaced_mesh = false
variable = porepressure
gravity = '0 0 -10E-6'
fluid_component = 0
[]
[poro_vol_exp]
type = PorousFlowMassVolumetricExpansion
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
variable = porepressure
fluid_component = 0
[]
[]
[AuxVariables]
[saturation]
order = CONSTANT
family = MONOMIAL
[]
[darcy_x]
order = CONSTANT
family = MONOMIAL
[]
[darcy_y]
order = CONSTANT
family = MONOMIAL
[]
[darcy_z]
order = CONSTANT
family = MONOMIAL
[]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[wc_z]
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xz]
order = CONSTANT
family = MONOMIAL
[]
[stress_yx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_yz]
order = CONSTANT
family = MONOMIAL
[]
[stress_zx]
order = CONSTANT
family = MONOMIAL
[]
[stress_zy]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_xz]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_yx]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_yz]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_zx]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_zy]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[perm_xx]
order = CONSTANT
family = MONOMIAL
[]
[perm_yy]
order = CONSTANT
family = MONOMIAL
[]
[perm_zz]
order = CONSTANT
family = MONOMIAL
[]
[mc_shear]
order = CONSTANT
family = MONOMIAL
[]
[mc_tensile]
order = CONSTANT
family = MONOMIAL
[]
[wp_shear]
order = CONSTANT
family = MONOMIAL
[]
[wp_tensile]
order = CONSTANT
family = MONOMIAL
[]
[wp_shear_f]
order = CONSTANT
family = MONOMIAL
[]
[wp_tensile_f]
order = CONSTANT
family = MONOMIAL
[]
[mc_shear_f]
order = CONSTANT
family = MONOMIAL
[]
[mc_tensile_f]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[saturation_water]
type = PorousFlowPropertyAux
variable = saturation
property = saturation
phase = 0
execute_on = timestep_end
[]
[darcy_x]
type = PorousFlowDarcyVelocityComponent
variable = darcy_x
gravity = '0 0 -10E-6'
component = x
[]
[darcy_y]
type = PorousFlowDarcyVelocityComponent
variable = darcy_y
gravity = '0 0 -10E-6'
component = y
[]
[darcy_z]
type = PorousFlowDarcyVelocityComponent
variable = darcy_z
gravity = '0 0 -10E-6'
component = z
[]
[porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
execute_on = timestep_end
[]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
execute_on = timestep_end
[]
[stress_yx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yx
index_i = 1
index_j = 0
execute_on = timestep_end
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[stress_zx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zx
index_i = 2
index_j = 0
execute_on = timestep_end
[]
[stress_zy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zy
index_i = 2
index_j = 1
execute_on = timestep_end
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[total_strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[total_strain_xy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[total_strain_xz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xz
index_i = 0
index_j = 2
execute_on = timestep_end
[]
[total_strain_yx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yx
index_i = 1
index_j = 0
execute_on = timestep_end
[]
[total_strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[total_strain_yz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[total_strain_zx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zx
index_i = 2
index_j = 0
execute_on = timestep_end
[]
[total_strain_zy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zy
index_i = 2
index_j = 1
execute_on = timestep_end
[]
[total_strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[perm_xx]
type = PorousFlowPropertyAux
property = permeability
variable = perm_xx
row = 0
column = 0
execute_on = timestep_end
[]
[perm_yy]
type = PorousFlowPropertyAux
property = permeability
variable = perm_yy
row = 1
column = 1
execute_on = timestep_end
[]
[perm_zz]
type = PorousFlowPropertyAux
property = permeability
variable = perm_zz
row = 2
column = 2
execute_on = timestep_end
[]
[mc_shear]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_internal_parameter
variable = mc_shear
execute_on = timestep_end
[]
[mc_tensile]
type = MaterialStdVectorAux
index = 1
property = mc_plastic_internal_parameter
variable = mc_tensile
execute_on = timestep_end
[]
[wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
execute_on = timestep_end
[]
[wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
execute_on = timestep_end
[]
[mc_shear_f]
type = MaterialStdVectorAux
index = 6
property = mc_plastic_yield_function
variable = mc_shear_f
execute_on = timestep_end
[]
[mc_tensile_f]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_yield_function
variable = mc_tensile_f
execute_on = timestep_end
[]
[wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
execute_on = timestep_end
[]
[wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
execute_on = timestep_end
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_x
boundary = 'xmin xmax'
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_y
boundary = 'ymin ymax'
value = 0.0
[]
[no_z]
type = DirichletBC
variable = disp_z
boundary = zmin
value = 0.0
[]
[no_wc_x]
type = DirichletBC
variable = wc_x
boundary = 'ymin ymax'
value = 0.0
[]
[no_wc_y]
type = DirichletBC
variable = wc_y
boundary = 'xmin xmax'
value = 0.0
[]
[fix_porepressure]
type = FunctionDirichletBC
variable = porepressure
boundary = 'ymin ymax xmax'
function = ini_pp
[]
[roof_porepressure]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
pt_vals = '-1E3 1E3'
multipliers = '-1 1'
fluid_phase = 0
flux_function = roof_conductance
boundary = roof
[]
[roof_bcs]
type = StickyBC
variable = disp_z
min_value = -3.0
boundary = roof
[]
[]
[Functions]
[ini_pp]
type = ParsedFunction
symbol_names = 'bulk p0 g rho0'
symbol_values = '2E3 0.0 1E-5 1E3'
expression = '-bulk*log(exp(-p0/bulk)+g*rho0*z/bulk)'
[]
[ini_xx]
type = ParsedFunction
symbol_names = 'bulk p0 g rho0 biot'
symbol_values = '2E3 0.0 1E-5 1E3 0.7'
expression = '0.8*(2500*10E-6*z+biot*(-bulk*log(exp(-p0/bulk)+g*rho0*z/bulk)))'
[]
[ini_zz]
type = ParsedFunction
symbol_names = 'bulk p0 g rho0 biot'
symbol_values = '2E3 0.0 1E-5 1E3 0.7'
expression = '2500*10E-6*z+biot*(-bulk*log(exp(-p0/bulk)+g*rho0*z/bulk))'
[]
[excav_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval slope'
symbol_values = '0.5 0 1000.0 1E-9 1 60'
# excavation face at ymin+(ymax-ymin)*min(t/end_t,1)
# slope is the distance over which the modulus reduces from maxval to minval
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,if(y<ymin+(ymax-ymin)*min(t/end_t,1)+slope,minval+(maxval-minval)*(y-(ymin+(ymax-ymin)*min(t/end_t,1)))/slope,maxval))'
[]
[density_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval'
symbol_values = '0.5 0 1000.0 0 2500'
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,maxval)'
[]
[roof_conductance]
type = ParsedFunction
symbol_names = 'end_t ymin ymax maxval minval'
symbol_values = '0.5 0 1000.0 1E7 0'
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),maxval,minval)'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1 # MPa^-1
[]
[mc_coh_strong_harden]
type = TensorMechanicsHardeningExponential
value_0 = 1.99 # MPa
value_residual = 2.01 # MPa
rate = 1.0
[]
[mc_fric]
type = TensorMechanicsHardeningConstant
value = 0.61 # 35deg
[]
[mc_dil]
type = TensorMechanicsHardeningConstant
value = 0.15 # 8deg
[]
[mc_tensile_str_strong_harden]
type = TensorMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.0 # MPa
rate = 1.0
[]
[mc_compressive_str]
type = TensorMechanicsHardeningCubic
value_0 = 100 # Large!
value_residual = 100
internal_limit = 0.1
[]
[wp_coh_harden]
type = TensorMechanicsHardeningCubic
value_0 = 0.05
value_residual = 0.05
internal_limit = 10
[]
[wp_tan_fric]
type = TensorMechanicsHardeningConstant
value = 0.26 # 15deg
[]
[wp_tan_dil]
type = TensorMechanicsHardeningConstant
value = 0.18 # 10deg
[]
[wp_tensile_str_harden]
type = TensorMechanicsHardeningCubic
value_0 = 0.05
value_residual = 0.05
internal_limit = 10
[]
[wp_compressive_str_soften]
type = TensorMechanicsHardeningCubic
value_0 = 100
value_residual = 1
internal_limit = 1.0
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E3
density0 = 1000
thermal_expansion = 0
viscosity = 3.5E-17
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity_bulk]
type = PorousFlowPorosity
fluid = true
mechanical = true
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
ensure_positive = true
porosity_zero = 0.02
solid_bulk = 5.3333E3
[]
[porosity_excav]
type = PorousFlowPorosityConst
block = 1
porosity = 1.0
[]
[permeability_bulk]
type = PorousFlowPermeabilityKozenyCarman
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
poroperm_function = kozeny_carman_phi0
k0 = 1E-15
phi0 = 0.02
n = 2
m = 2
[]
[permeability_excav]
type = PorousFlowPermeabilityConst
block = 1
permeability = '0 0 0 0 0 0 0 0 0'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 4
s_res = 0.4
sum_s_res = 0.4
phase = 0
[]
[elasticity_tensor_0]
type = ComputeLayeredCosseratElasticityTensor
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
[]
[elasticity_tensor_1]
type = ComputeLayeredCosseratElasticityTensor
block = 1
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
elasticity_tensor_prefactor = excav_sideways
[]
[strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[]
[ini_stress]
type = ComputeEigenstrainFromInitialStress
eigenstrain_name = ini_stress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
[]
[stress_0]
type = ComputeMultipleInelasticCosseratStress
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
inelastic_models = 'mc wp'
cycle_models = true
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[]
[stress_1]
type = ComputeMultipleInelasticCosseratStress
block = 1
inelastic_models = ''
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[]
[mc]
type = CappedMohrCoulombCosseratStressUpdate
warn_about_precision_loss = false
host_youngs_modulus = 8E3
host_poissons_ratio = 0.25
base_name = mc
tensile_strength = mc_tensile_str_strong_harden
compressive_strength = mc_compressive_str
cohesion = mc_coh_strong_harden
friction_angle = mc_fric
dilation_angle = mc_dil
max_NR_iterations = 100000
smoothing_tol = 0.1 # MPa # Must be linked to cohesion
yield_function_tol = 1E-9 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[]
[wp]
type = CappedWeakPlaneCosseratStressUpdate
warn_about_precision_loss = false
base_name = wp
cohesion = wp_coh_harden
tan_friction_angle = wp_tan_fric
tan_dilation_angle = wp_tan_dil
tensile_strength = wp_tensile_str_harden
compressive_strength = wp_compressive_str_soften
max_NR_iterations = 10000
tip_smoother = 0.05
smoothing_tol = 0.05 # MPa # Note, this must be tied to cohesion, otherwise get no possible return at cone apex
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0E-3
[]
[undrained_density_0]
type = GenericConstantMaterial
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
prop_names = density
prop_values = 2500
[]
[undrained_density_1]
type = GenericFunctionMaterial
block = 1
prop_names = density
prop_values = density_sideways
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Postprocessors]
[min_roof_disp]
type = NodalExtremeValue
boundary = roof
value_type = min
variable = disp_z
[]
[min_roof_pp]
type = NodalExtremeValue
boundary = roof
value_type = min
variable = porepressure
[]
[min_surface_disp]
type = NodalExtremeValue
boundary = zmax
value_type = min
variable = disp_z
[]
[min_surface_pp]
type = NodalExtremeValue
boundary = zmax
value_type = min
variable = porepressure
[]
[max_perm_zz]
type = ElementExtremeValue
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
variable = perm_zz
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
# best overall
# petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
# petsc_options_value = ' lu mumps'
# best if you do not have mumps:
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu superlu_dist'
# best if you do not have mumps or superlu_dist:
#petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
#petsc_options_value = ' asm 2 lu gmres 200'
# very basic:
#petsc_options_iname = '-pc_type -ksp_type -ksp_gmres_restart'
#petsc_options_value = ' bjacobi gmres 200'
line_search = bt
nl_abs_tol = 1e-3
nl_rel_tol = 1e-5
l_max_its = 200
nl_max_its = 30
start_time = 0.0
dt = 0.014706
end_time = 0.014706 #0.5
[]
[Outputs]
time_step_interval = 1
print_linear_residuals = true
exodus = true
csv = true
console = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/small-tests/2d.i)
# 2D with mixed conditions on stress/strain
[GlobalParams]
displacements = 'disp_x disp_y'
large_kinematics = false
macro_gradient = hvar
homogenization_constraint = homogenization
[]
[Mesh]
[base]
type = FileMeshGenerator
file = '2d.exo'
[]
[sidesets]
type = SideSetsFromNormalsGenerator
input = base
normals = '-1 0 0
1 0 0
0 -1 0
0 1 0'
fixed_normal = true
new_boundary = 'left right bottom top'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[hvar]
family = SCALAR
order = THIRD
[]
[]
[AuxVariables]
[sxx]
family = MONOMIAL
order = CONSTANT
[]
[syy]
family = MONOMIAL
order = CONSTANT
[]
[sxy]
family = MONOMIAL
order = CONSTANT
[]
[exx]
family = MONOMIAL
order = CONSTANT
[]
[eyy]
family = MONOMIAL
order = CONSTANT
[]
[exy]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[sxx]
type = RankTwoAux
variable = sxx
rank_two_tensor = pk1_stress
index_i = 0
index_j = 0
[]
[syy]
type = RankTwoAux
variable = syy
rank_two_tensor = pk1_stress
index_i = 1
index_j = 1
[]
[sxy]
type = RankTwoAux
variable = sxy
rank_two_tensor = pk1_stress
index_i = 0
index_j = 1
[]
[exx]
type = RankTwoAux
variable = exx
rank_two_tensor = mechanical_strain
index_i = 0
index_j = 0
[]
[eyy]
type = RankTwoAux
variable = eyy
rank_two_tensor = mechanical_strain
index_i = 1
index_j = 1
[]
[exy]
type = RankTwoAux
variable = exy
rank_two_tensor = mechanical_strain
index_i = 0
index_j = 1
[]
[]
[UserObjects]
[homogenization]
type = HomogenizationConstraint
constraint_types = ${constraint_types}
targets = ${targets}
execute_on = 'INITIAL LINEAR NONLINEAR'
[]
[]
[Kernels]
[sdx]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[sdy]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_y
component = 1
[]
[]
[ScalarKernels]
[enforce]
type = HomogenizationConstraintScalarKernel
variable = hvar
[]
[]
[Functions]
[strain11]
type = ParsedFunction
expression = '4.0e-2*t'
[]
[strain22]
type = ParsedFunction
expression = '-2.0e-2*t'
[]
[strain12]
type = ParsedFunction
expression = '1.0e-2*t'
[]
[stress11]
type = ParsedFunction
expression = '400*t'
[]
[stress22]
type = ParsedFunction
expression = '-200*t'
[]
[stress12]
type = ParsedFunction
expression = '100*t'
[]
[]
[BCs]
[Periodic]
[x]
variable = disp_x
auto_direction = 'x y'
[]
[y]
variable = disp_y
auto_direction = 'x y'
[]
[]
[fix1_x]
type = DirichletBC
boundary = "fix1"
variable = disp_x
value = 0
[]
[fix1_y]
type = DirichletBC
boundary = "fix1"
variable = disp_y
value = 0
[]
[fix2_y]
type = DirichletBC
boundary = "fix2"
variable = disp_y
value = 0
[]
[]
[Materials]
[elastic_tensor_1]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
block = '1'
[]
[elastic_tensor_2]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 120000.0
poissons_ratio = 0.21
block = '2'
[]
[elastic_tensor_3]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 80000.0
poissons_ratio = 0.4
block = '3'
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
homogenization_gradient_names = 'homogenization_gradient'
[]
[compute_homogenization_gradient]
type = ComputeHomogenizedLagrangianStrain
[]
[]
[Postprocessors]
[sxx]
type = ElementAverageValue
variable = sxx
execute_on = 'initial timestep_end'
[]
[syy]
type = ElementAverageValue
variable = syy
execute_on = 'initial timestep_end'
[]
[sxy]
type = ElementAverageValue
variable = sxy
execute_on = 'initial timestep_end'
[]
[exx]
type = ElementAverageValue
variable = exx
execute_on = 'initial timestep_end'
[]
[eyy]
type = ElementAverageValue
variable = eyy
execute_on = 'initial timestep_end'
[]
[exy]
type = ElementAverageValue
variable = exy
execute_on = 'initial timestep_end'
[]
[]
[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 = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 1.0
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/bcs/advection_bc/advection_bc.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 10.0
nx = 100
[]
[Variables]
[./phi]
[../]
[]
[AuxVariables]
[./vx]
[../]
[./force]
[../]
[]
[ICs]
[./vx]
type = FunctionIC
variable = vx
function = vx_function
[../]
[./force]
type = FunctionIC
variable = force
function = forcing
[../]
[]
[Kernels]
[./advection]
type = MassConvectiveFlux
variable = phi
vel_x = vx
[../]
[./rhs]
type = CoupledForce
variable = phi
v = force
[../]
[]
[BCs]
[./inflow_enthalpy]
type = DirichletBC
variable = phi
boundary = 'left'
value = 1
[../]
[./outflow_term]
type = AdvectionBC
variable = phi
velocity_vector = 'vx'
boundary = 'right'
[../]
[]
[Functions]
[./vx_function]
type = ParsedFunction
expression = '1 + x * x'
[../]
[./forcing]
type = ParsedFunction
expression = 'x'
[../]
[./analytical]
type = ParsedFunction
expression = '(1 + 0.5 * x * x) / (1 + x * x)'
[../]
[]
[Postprocessors]
[./error]
type = ElementL2Error
variable = phi
function = analytical
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
perf_graph = true
[]
(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/thermal_hydraulics/test/tests/components/heat_source_from_total_power/phy.cylinder_power_shape_fn.i)
[GlobalParams]
scaling_factor_temperature = 1e0
[]
[Functions]
[psf]
type = ParsedFunction
expression = 1
[]
[]
[SolidProperties]
[fuel-mat]
type = ThermalFunctionSolidProperties
k = 16
cp = 191.67
rho = 1.4583e4
[]
[gap-mat]
type = ThermalFunctionSolidProperties
k = 64
cp = 1272
rho = 865
[]
[clad-mat]
type = ThermalFunctionSolidProperties
k = 26
cp = 638
rho = 7.646e3
[]
[]
[Components]
[reactor]
type = TotalPower
power = 3.0e4
[]
[CH1:solid]
type = HeatStructureCylindrical
position = '0 -0.024 0'
orientation = '0 0 1'
length = 0.8
n_elems = 16
initial_T = 628.15
names = 'fuel gap clad'
widths = '0.003015 0.000465 0.00052'
n_part_elems = '20 2 2'
solid_properties = 'fuel-mat gap-mat clad-mat'
solid_properties_T_ref = '300 300 300'
[]
[CH1:hgen]
type = HeatSourceFromTotalPower
hs = CH1:solid
regions = 'fuel'
power = reactor
power_shape_function = psf
power_fraction = 1
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 1e-3
num_steps = 1
abort_on_solve_fail = true
solve_type = 'PJFNK'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-7
nl_max_its = 40
l_tol = 1e-5
l_max_its = 50
[]
[Outputs]
[out]
type = Exodus
[]
[]
(modules/solid_mechanics/test/tests/finite_strain_elastic/finite_strain_elastic_eigen_sol.i)
[Mesh]
type = GeneratedMesh
dim = 3
elem_type = HEX8
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Functions]
[./tdisp]
type = ParsedFunction
expression = '0.01 * t'
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
decomposition_method = EigenSolution
[../]
[]
[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
[../]
[./tdisp]
type = FunctionDirichletBC
variable = disp_z
boundary = front
function = tdisp
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1.684e5 0.176e5 0.176e5 1.684e5 0.176e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = -pc_hypre_type
petsc_options_value = boomeramg
nl_abs_tol = 1e-10
nl_rel_step_tol = 1e-10
nl_rel_tol = 1e-10
dt = 0.05
dtmin = 0.05
nl_abs_step_tol = 1e-10
num_steps = 10
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/stagnation/stagnation.i)
[GlobalParams]
gravity = '0 0 0'
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 2.0
ymin = 0
ymax = 2.0
nx = 20
ny = 20
elem_type = QUAD9
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = Newton
[../]
[]
[Executioner]
type = Transient
dt = 1.0
dtmin = 1.e-6
num_steps = 5
l_max_its = 100
nl_max_its = 15
nl_rel_tol = 1.e-9
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_shift_type -ksp_gmres_restart'
petsc_options_value = 'asm 2 lu NONZERO 1000'
line_search = none
[]
[Variables]
[./vel_x]
family = LAGRANGE
order = SECOND
[../]
[./vel_y]
family = LAGRANGE
order = SECOND
[../]
[./p]
family = LAGRANGE
order = FIRST
[../]
[]
[BCs]
[./u_in]
type = FunctionDirichletBC
boundary = 'top'
variable = vel_x
function = vel_x_inlet
[../]
[./v_in]
type = FunctionDirichletBC
boundary = 'top'
variable = vel_y
function = vel_y_inlet
[../]
[./vel_x_no_slip]
type = DirichletBC
boundary = 'left bottom'
variable = vel_x
value = 0
[../]
[./vel_y_no_slip]
type = DirichletBC
boundary = 'bottom'
variable = vel_y
value = 0
[../]
# Note: setting INSMomentumNoBCBC on the outlet boundary causes the
# matrix to be singular. The natural BC, on the other hand, is
# sufficient to specify the value of the pressure without requiring
# a pressure pin.
[]
[Functions]
[./vel_x_inlet]
type = ParsedFunction
expression = 'k*x'
symbol_names = 'k'
symbol_values = '1'
[../]
[./vel_y_inlet]
type = ParsedFunction
expression = '-k*y'
symbol_names = 'k'
symbol_values = '1'
[../]
[]
[Kernels]
[./x_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_x
[../]
[./y_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_y
[../]
[./mass]
type = INSMass
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '1 .01389' # 2/144
[../]
[]
[Outputs]
exodus = true
[./out]
type = CSV
execute_on = 'final'
[../]
[]
[VectorPostprocessors]
[./nodal_sample]
# Pick off the wall pressure values.
type = NodalValueSampler
variable = p
boundary = 'bottom'
sort_by = x
[../]
[]
(test/tests/fvkernels/mms/cylindrical/advection-reaction.i)
a = 1.1
[Mesh]
coord_type = 'RZ'
[gen_mesh]
type = GeneratedMeshGenerator
dim = 2
xmin = 2
xmax = 3
ymin = 0
ymax = 1
nx = 2
ny = 2
[]
[]
[Variables]
[v]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 1
[]
[]
[FVKernels]
[advection]
type = FVAdvection
variable = v
velocity = '${a} ${a} 0'
advected_interp_method = 'average'
[]
[reaction]
type = FVReaction
variable = v
[]
[body_v]
type = FVBodyForce
variable = v
function = 'forcing'
[]
[]
[FVBCs]
[left_u]
type = FVFunctionDirichletBC
boundary = 'left bottom'
function = 'exact'
variable = v
[]
[right_u]
type = FVConstantScalarOutflowBC
variable = v
velocity = '${a} ${a} 0'
boundary = 'right top'
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = 'sin(x)*cos(y)'
[]
[forcing]
type = ParsedFunction
expression = '-a*sin(x)*sin(y) + sin(x)*cos(y) + (x*a*cos(x)*cos(y) + a*sin(x)*cos(y))/x'
symbol_names = 'a'
symbol_values = '${a}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_shift_type -sub_pc_type'
petsc_options_value = 'asm NONZERO lu'
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[error]
type = ElementL2Error
variable = v
function = exact
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(modules/solid_mechanics/test/tests/plane_stress/weak_plane_stress_incremental.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
temperature = temp
out_of_plane_strain = strain_zz
[]
[Mesh]
[./square]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./strain_zz]
[../]
[]
[AuxVariables]
[./temp]
[../]
[./nl_strain_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Postprocessors]
[./react_z]
type = MaterialTensorIntegral
rank_two_tensor = stress
index_i = 2
index_j = 2
[../]
[./min_strain_zz]
type = NodalExtremeValue
variable = strain_zz
value_type = min
[../]
[./max_strain_zz]
type = NodalExtremeValue
variable = strain_zz
value_type = max
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[plane_stress]
planar_formulation = WEAK_PLANE_STRESS
strain = SMALL
incremental = true
generate_output = 'stress_xx stress_xy stress_yy stress_zz strain_xx strain_xy strain_yy'
eigenstrain_names = eigenstrain
[]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
use_displaced_mesh = false
[../]
[./strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = nl_strain_zz
index_i = 2
index_j = 2
[../]
[]
[Functions]
[./pull]
type = PiecewiseLinear
x='0 1 100'
y='0 0.00 0.00'
[../]
[./tempfunc]
type = ParsedFunction
expression = '(1 - x) * t'
[../]
[]
[BCs]
[./bottomx]
type = DirichletBC
boundary = 0
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = DirichletBC
boundary = 0
variable = disp_y
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
poissons_ratio = 0.3
youngs_modulus = 1e6
[../]
[./thermal_strain]
type = ComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
eigenstrain_name = eigenstrain
[../]
[./stress]
type = ComputeStrainIncrementBasedStress
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
# controls for linear iterations
l_max_its = 100
l_tol = 1e-06
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-12
# time control
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 2.0
[]
[Outputs]
exodus = true
[]
(test/tests/misc/check_error/scalar_dot_integrity_check.i)
# Test that coupling a time derivative of a scalar variable (ScalarDotCouplingAux) and
# using a Steady executioner errors out
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Functions]
[./a_fn]
type = ParsedFunction
expression = t
[../]
[]
[AuxVariables]
[./v]
[../]
[./a]
family = SCALAR
order = FIRST
[../]
[]
[AuxScalarKernels]
[./a_sak]
type = FunctionScalarAux
variable = a
function = a_fn
[../]
[]
[AuxKernels]
[./ak_v]
type = ScalarDotCouplingAux
variable = v
v = a
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[Executioner]
type = Steady
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/crysp_cutback.i)
[Mesh]
type = GeneratedMesh
dim = 3
elem_type = HEX8
displacements = 'ux uy uz'
[]
[Variables]
[./ux]
block = 0
[../]
[./uy]
block = 0
[../]
[./uz]
block = 0
[../]
[]
[AuxVariables]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./fp_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./rotout]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./e_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./gss1]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[]
[Functions]
[./tdisp]
type = ParsedFunction
expression = 0.01*t
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'ux uy uz'
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_zz]
type = RankTwoAux
variable = stress_zz
rank_two_tensor = stress
index_j = 2
index_i = 2
execute_on = timestep_end
block = 0
[../]
[./fp_zz]
type = RankTwoAux
variable = fp_zz
rank_two_tensor = fp
index_j = 2
index_i = 2
execute_on = timestep_end
block = 0
[../]
[./e_zz]
type = RankTwoAux
variable = e_zz
rank_two_tensor = lage
index_j = 2
index_i = 2
execute_on = timestep_end
block = 0
[../]
[./gss1]
type = MaterialStdVectorAux
variable = gss1
property = gss
index = 0
execute_on = timestep_end
block = 0
[../]
[]
[BCs]
[./symmy]
type = DirichletBC
variable = uy
boundary = bottom
value = 0
[../]
[./symmx]
type = DirichletBC
variable = ux
boundary = left
value = 0
[../]
[./symmz]
type = DirichletBC
variable = uz
boundary = back
value = 0
[../]
[./tdisp]
type = FunctionDirichletBC
variable = uz
boundary = front
function = tdisp
[../]
[]
[Materials]
[./crysp]
type = FiniteStrainCrystalPlasticity
block = 0
gtol = 1e-2
slip_sys_file_name = input_slip_sys.txt
nss = 12
num_slip_sys_flowrate_props = 2 #Number of properties in a slip system
flowprops = '1 4 0.001 0.1 5 8 0.001 0.1 9 12 0.001 0.1'
hprops = '1.0 541.5 60.8 109.8 2.5'
gprops = '1 4 60.8 5 8 60.8 9 12 60.8'
tan_mod_type = exact
gen_random_stress_flag = true
[../]
[./elasticity_tensor]
type = ComputeElasticityTensorCP
block = 0
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'ux uy uz'
[../]
[]
[Postprocessors]
[./stress_zz]
type = ElementAverageValue
variable = stress_zz
block = 'ANY_BLOCK_ID 0'
[../]
[./fp_zz]
type = ElementAverageValue
variable = fp_zz
block = 'ANY_BLOCK_ID 0'
[../]
[./e_zz]
type = ElementAverageValue
variable = e_zz
block = 'ANY_BLOCK_ID 0'
[../]
[./gss1]
type = ElementAverageValue
variable = gss1
block = 'ANY_BLOCK_ID 0'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_factor_shift_type'
petsc_options_value = 'nonzero'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
dt = 1.0
dtmax = 10.0
dtmin = 1e-5
num_steps = 3
snesmf_reuse_base = false
[]
[Outputs]
file_base = crysp_cutback_out
exodus = true
csv = true
gnuplot = true
[]
(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
[]
(test/tests/time_integrators/rk-2/1d-linear.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -1
xmax = 1
nx = 20
elem_type = EDGE2
[]
[Functions]
[./ic]
type = ParsedFunction
expression = 0
[../]
[./forcing_fn]
type = ParsedFunction
expression = x
[../]
[./exact_fn]
type = ParsedFunction
expression = t*x
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic
[../]
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
implicit = true
[../]
[./diff]
type = Diffusion
variable = u
implicit = false
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
implicit = false
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
[./TimeIntegrator]
type = ExplicitMidpoint
[../]
solve_type = 'LINEAR'
start_time = 0.0
num_steps = 10
dt = 0.001
l_tol = 1e-15
[]
[Outputs]
exodus = true
perf_graph = true
[]
(test/tests/kernels/ad_coupled_value/ad_aux_coupled_time_value.i)
###########################################################
# This is a simple test of coupling an aux variable into the
# ADCoupledTimeDerivative kernel.
# The expected solution for the variable v is
# v(x) = 1/2 * (x^2 + x)
###########################################################
[Mesh]
type = GeneratedMesh
nx = 5
ny = 5
dim = 2
[]
[Variables]
[./v]
[../]
[]
[AuxVariables]
[./u]
[../]
[]
[Functions]
[./u]
type = ParsedFunction
expression = 't'
[../]
[]
[AuxKernels]
[./u]
type = FunctionAux
variable = u
function = u
[../]
[]
[Kernels]
[./time_v]
type = ADCoupledTimeDerivative
variable = v
v = u
[../]
[./diff_v]
type = ADDiffusion
variable = v
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = v
boundary = 'left'
value = 0
[../]
[./right]
type = DirichletBC
variable = v
boundary = 'right'
value = 1
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[./l2]
type = ElementL2Error
variable = v
function = '1/2 * (x^2 + x)'
[../]
[]
[Executioner]
type = Transient
num_steps = 1
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/materials/mixture_material/mixture.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 5
[]
[]
[AuxVariables]
[fl]
type = MooseVariableFVReal
[]
[cp]
type = MooseVariableFVReal
[]
[k]
type = MooseVariableFVReal
[]
[]
[ICs]
[FunctionIC]
type = FunctionIC
variable = fl
function = 'x'
[]
[]
[AuxKernels]
[cp_aux]
type = FunctorAux
functor = cp_mixture
variable = cp
[]
[k_aux]
type = FunctorAux
functor = k_mixture
variable = k
[]
[]
[VectorPostprocessors]
[cp]
type = LineValueSampler
start_point = '0.1 0 0'
end_point = '0.9 0 0'
num_points = 5
variable = cp
sort_by = x
[]
[k]
type = LineValueSampler
start_point = '0.1 0 0'
end_point = '0.9 0 0'
num_points = 5
variable = k
sort_by = x
[]
[fl]
type = LineValueSampler
start_point = '0.1 0 0'
end_point = '0.9 0 0'
num_points = 5
variable = fl
sort_by = x
[]
[]
[Functions]
[cp_solid]
type = ADParsedFunction
expression = '1 - x'
[]
[cp_liquid]
type = ADParsedFunction
expression = 'x'
[]
[k_solid]
type = ADParsedFunction
expression = '2 - 3*x'
[]
[k_liquid]
type = ADParsedFunction
expression = '3*x'
[]
[]
[FunctorMaterials]
[eff_cp]
type = NSFVMixtureFunctorMaterial
phase_2_names = 'cp_solid k_solid'
phase_1_names = 'cp_liquid k_liquid'
prop_names = 'cp_mixture k_mixture'
phase_1_fraction = fl
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/mms/channel-flow/1d-average.i)
mu = 1.1
rho = 1.1
advected_interp_method = 'average'
velocity_interp_method = 'average'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = 1
nx = 2
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
pressure = pressure
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 1
two_term_boundary_expansion = false
[]
[pressure]
type = INSFVPressureVariable
two_term_boundary_expansion = false
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[mass_forcing]
type = FVBodyForce
variable = pressure
function = forcing_p
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[u_forcing]
type = INSFVBodyForce
variable = u
functor = forcing_u
momentum_component = 'x'
[]
[]
[FVBCs]
[inlet_u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = 'exact_u'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 'exact_p'
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'sin((1/2)*x*pi)'
[]
[exact_rhou]
type = ParsedFunction
expression = 'rho*sin((1/2)*x*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[forcing_u]
type = ParsedFunction
expression = '(1/4)*pi^2*mu*sin((1/2)*x*pi) + pi*rho*sin((1/2)*x*pi)*cos((1/2)*x*pi) - '
'1/2*pi*sin((1/2)*x*pi)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'cos((1/2)*x*pi)'
[]
[forcing_p]
type = ParsedFunction
expression = '(1/2)*pi*rho*cos((1/2)*x*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[Outputs]
csv = true
exodus = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2FunctorError
approximate = u
exact = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
approximate = pressure
exact = exact_p
type = ElementL2FunctorError
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(test/tests/materials/generic_materials/generic_function_rank_two_tensor.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Problem]
type = FEProblem
solve = false
[]
[Functions]
[fcn_00]
type = ParsedFunction
expression = '1 + t'
[]
[fcn_10]
type = ParsedFunction
expression = '4 + t'
[]
[fcn_20]
type = ParsedFunction
expression = '7 + t'
[]
[fcn_01]
type = ParsedFunction
expression = '2 + t'
[]
[fcn_11]
type = ParsedFunction
expression = '5 + t'
[]
[fcn_21]
type = ParsedFunction
expression = '8 + t'
[]
[fcn_02]
type = ParsedFunction
expression = '3 + t'
[]
[fcn_12]
type = ParsedFunction
expression = '6 + t'
[]
[fcn_22]
type = ParsedFunction
expression = '9 + t'
[]
[]
[Materials]
[./tensor]
type = GenericFunctionRankTwoTensor
tensor_name = function
# tensor values are column major-ordered
tensor_functions = 'fcn_00 fcn_10 fcn_20 fcn_01 fcn_11 fcn_21 fcn_02 fcn_12 fcn_22'
outputs = all
[../]
[]
[Executioner]
type = Transient
num_steps = 2
[]
[Postprocessors]
[00]
type = ElementAverageValue
variable = function_00
[]
[01]
type = ElementAverageValue
variable = function_01
[]
[02]
type = ElementAverageValue
variable = function_02
[]
[10]
type = ElementAverageValue
variable = function_10
[]
[11]
type = ElementAverageValue
variable = function_11
[]
[12]
type = ElementAverageValue
variable = function_12
[]
[20]
type = ElementAverageValue
variable = function_20
[]
[21]
type = ElementAverageValue
variable = function_21
[]
[22]
type = ElementAverageValue
variable = function_22
[]
[]
[Outputs]
csv = true
[]
(test/tests/adaptivity/initial_marker/initial_marker.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1
solve_type = 'PJFNK'
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 2
initial_steps = 4
initial_marker = initial_box
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = dont_mark
type = BoxMarker
[../]
[./initial_box]
type = BoxMarker
bottom_left = '0.8 0.1 0'
top_right = '0.9 0.2 0'
inside = refine
outside = dont_mark
[../]
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/solid_mechanics/test/tests/domain_integral_thermal/j_integral_2d_inst_ctefunc.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
file = crack2d.e
[]
[AuxVariables]
[./SED]
order = CONSTANT
family = MONOMIAL
[../]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./tempfunc]
type = ParsedFunction
expression = 10.0*(2*x/504)
[../]
[./cte_func_inst]
type = PiecewiseLinear
xy_data = '-10 -10
10 10'
scale_factor = 1e-6
[../]
[]
[DomainIntegral]
integrals = JIntegral
boundary = 800
crack_direction_method = CrackDirectionVector
crack_direction_vector = '1 0 0'
2d = true
axis_2d = 2
radius_inner = '60.0 80.0 100.0 120.0'
radius_outer = '80.0 100.0 120.0 140.0'
temperature = temp
incremental = true
eigenstrain_names = thermal_expansion
[]
[Physics/SolidMechanics/QuasiStatic]
[./master]
strain = FINITE
add_variables = true
incremental = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress'
planar_formulation = PLANE_STRAIN
eigenstrain_names = thermal_expansion
[../]
[]
[AuxKernels]
[./SED]
type = MaterialRealAux
variable = SED
property = strain_energy_density
execute_on = timestep_end
[../]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
block = 1
[../]
[]
[BCs]
[./crack_y]
type = DirichletBC
variable = disp_y
boundary = 100
value = 0.0
[../]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = 400
value = 0.0
[../]
[./no_x1]
type = DirichletBC
variable = disp_x
boundary = 900
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
[../]
[./elastic_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain]
type = ComputeInstantaneousThermalExpansionFunctionEigenstrain
block = 1
thermal_expansion_function = cte_func_inst
stress_free_temperature = 0.0
temperature = temp
eigenstrain_name = thermal_expansion
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
line_search = 'none'
l_max_its = 50
nl_max_its = 40
nl_rel_step_tol= 1e-10
nl_rel_tol = 1e-10
start_time = 0.0
dt = 1
end_time = 1
num_steps = 1
[]
[Outputs]
csv = true
execute_on = 'timestep_end'
[]
[Preconditioning]
[./smp]
type = SMP
pc_side = left
ksp_norm = preconditioned
full = true
[../]
[]
(modules/phase_field/test/tests/MultiPhase/crosstermbarrierfunction.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 200
xmin = 0
xmax = 9
[]
[Functions]
[./func1]
type = ParsedFunction
expression = 'il:=x-7; ir:=2-x; if(x<1, 1,
if(x<2, 0.5-0.5*cos(ir*pi),
if(x<7, 0,
if(x<8, 0.5-0.5*cos(il*pi),
1))))'
[../]
[./func2]
type = ParsedFunction
expression = 'il:=x-1; ir:=5-x; if(x<1, 0,
if(x<2, 0.5-0.5*cos(il*pi),
if(x<4, 1,
if(x<5, 0.5-0.5*cos(ir*pi),
0))))'
[../]
[./func3]
type = ParsedFunction
expression = 'il:=x-4; ir:=8-x; if(x<4, 0,
if(x<5, 0.5-0.5*cos(il*pi),
if(x<7, 1,
if(x<8, 0.5-0.5*cos(ir*pi),
0))))'
[../]
[]
[AuxVariables]
[./eta1]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = func1
[../]
[../]
[./eta2]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = func2
[../]
[../]
[./eta3]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = func3
[../]
[../]
[]
[Materials]
[./crosstermbarrier_simple]
type = CrossTermBarrierFunctionMaterial
etas = 'eta1 eta2 eta3'
W_ij = '0 1 2.2
1 0 3.1
2.2 3.1 0'
function_name = gsimple
g_order = SIMPLE
outputs = exodus
[../]
[./crosstermbarrier_low]
type = CrossTermBarrierFunctionMaterial
etas = 'eta1 eta2 eta3'
W_ij = '0 1 2.2
1 0 3.1
2.2 3.1 0'
function_name = glow
g_order = LOW
outputs = exodus
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
num_steps = 1
[]
[Problem]
solve = false
kernel_coverage_check = false
[]
[Outputs]
exodus = true
execute_on = final
[]
(modules/porous_flow/test/tests/capillary_pressure/brooks_corey1.i)
# Test Brooks-Corey capillary pressure curve by varying saturation over the mesh
# lambda = 2, sat_lr = 0.1, log_extension = false
[Mesh]
type = GeneratedMesh
dim = 1
nx = 500
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[p0]
initial_condition = 1e6
[]
[s1]
[]
[]
[AuxVariables]
[s0aux]
family = MONOMIAL
order = CONSTANT
[]
[s1aux]
family = MONOMIAL
order = CONSTANT
[]
[p0aux]
family = MONOMIAL
order = CONSTANT
[]
[p1aux]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[s0]
type = PorousFlowPropertyAux
property = saturation
phase = 0
variable = s0aux
[]
[s1]
type = PorousFlowPropertyAux
property = saturation
phase = 1
variable = s1aux
[]
[p0]
type = PorousFlowPropertyAux
property = pressure
phase = 0
variable = p0aux
[]
[p1]
type = PorousFlowPropertyAux
property = pressure
phase = 1
variable = p1aux
[]
[]
[Functions]
[s1]
type = ParsedFunction
expression = x
[]
[]
[ICs]
[s1]
type = FunctionIC
variable = s1
function = s1
[]
[]
[Kernels]
[p0]
type = Diffusion
variable = p0
[]
[s1]
type = Diffusion
variable = s1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'p0 s1'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureBC
lambda = 2
log_extension = false
pe = 1e5
sat_lr = 0.1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = p0
phase1_saturation = s1
capillary_pressure = pc
[]
[kr0]
type = PorousFlowRelativePermeabilityVG
phase = 0
m = 0.5
[]
[kr1]
type = PorousFlowRelativePermeabilityCorey
phase = 1
n = 2
[]
[]
[VectorPostprocessors]
[vpp]
type = LineValueSampler
variable = 's0aux s1aux p0aux p1aux'
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 500
sort_by = id
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-6
[]
[BCs]
[sleft]
type = DirichletBC
variable = s1
value = 0
boundary = left
[]
[sright]
type = DirichletBC
variable = s1
value = 1
boundary = right
[]
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(test/tests/outputs/exodus/exodus_discontinuous.i)
##
# \file exodus/exodus_discontinuous.i
# \example exodus/exodus_discontinuous.i
# Input file for testing discontinuous data output
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./disc_u]
family = monomial
order = first
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = disc_u
[../]
[./forcing]
type = BodyForce
variable = disc_u
value = 7
[../]
[]
[DGKernels]
[./diff_dg]
type = DGDiffusion
variable = disc_u
sigma = 1
epsilon = 1
[../]
[]
[Functions]
[./zero_fn]
type = ParsedFunction
expression = 0.0
[../]
[]
[BCs]
[./all]
type = DGFunctionDiffusionDirichletBC
variable = disc_u
boundary = 'left right top bottom'
function = zero_fn
sigma = 1
epsilon = 1
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
execute_on = 'timestep_end'
[./exo_out]
type = Exodus
discontinuous = true
file_base = 'exodus_discontinuous_out'
[../]
[]
(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/transfers/multiapp_variable_value_sample_transfer/parent_quad.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./parent_aux]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./func]
type = ParsedFunction
expression = x*y*t
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[AuxKernels]
[./func_aux]
type = FunctionAux
variable = parent_aux
function = func
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./quad]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0.05 0.05 0 0.95 0.05 0 0.05 0.95 0 0.95 0.95 0'
input_files = quad_sub.i
[../]
[]
[Transfers]
[./parent_to_sub]
type = MultiAppVariableValueSamplePostprocessorTransfer
to_multi_app = quad
source_variable = parent_aux
postprocessor = pp
[../]
[]
(test/tests/bcs/functor_dirichlet_bc/test.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
dim = 2
nx = 32
ny = 32
[]
[]
[Variables]
[u]
[]
[]
[Functions]
[ff_1]
type = ParsedFunction
expression = alpha*alpha*pi
symbol_names = 'alpha'
symbol_values = '16'
[]
[ff_2]
type = ParsedFunction
expression = pi*sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '16'
[]
[forcing_func]
type = CompositeFunction
functions = 'ff_1 ff_2'
[]
[bc_func]
type = ParsedFunction
expression = sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '16'
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = forcing_func
[]
[]
[BCs]
[all]
type = FunctorDirichletBC
variable = u
boundary = 'left right'
functor = bc_func
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/fvkernels/vector-interpolation/test.i)
a=1.1
[Mesh]
[gen_mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 0.1
xmax = 1.1
nx = 20
[]
[]
[GlobalParams]
limiter = 'vanLeer'
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = exact
[]
[v]
type = FunctionIC
variable = v
function = exact
[]
[w]
type = FunctionIC
variable = w
function = exact
[]
[]
[Variables]
[u]
type = MooseVariableFVReal
[]
[v]
type = MooseVariableFVReal
[]
[w]
type = MooseVariableFVReal
[]
[]
[FVKernels]
[advection_u]
type = FVLimitedVectorAdvection
variable = u
velocity = '${a} 0 0'
boundaries_to_force = 'right'
x_functor = 'u'
y_functor = 'v'
z_functor = 'w'
component = 0
[]
[body_u]
type = FVBodyForce
variable = u
function = 'forcing'
[]
[advection_v]
type = FVLimitedVectorAdvection
variable = v
velocity = '${a} 0 0'
boundaries_to_force = 'right'
x_functor = 'u'
y_functor = 'v'
z_functor = 'w'
component = 1
[]
[body_v]
type = FVBodyForce
variable = v
function = 'forcing'
[]
[advection_w]
type = FVLimitedVectorAdvection
variable = w
velocity = '${a} 0 0'
boundaries_to_force = 'right'
x_functor = 'u'
y_functor = 'v'
z_functor = 'w'
component = 2
[]
[body_w]
type = FVBodyForce
variable = w
function = 'forcing'
[]
[]
[FVBCs]
[left_u]
type = FVFunctionNeumannBC
boundary = 'left'
function = 'advection'
variable = u
[]
[left_v]
type = FVFunctionNeumannBC
boundary = 'left'
function = 'advection'
variable = v
[]
[left_w]
type = FVFunctionNeumannBC
boundary = 'left'
function = 'advection'
variable = w
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = 'cos(x)'
[]
[advection]
type = ParsedFunction
expression = '${a} * cos(x)'
[]
[forcing]
type = ParsedFunction
expression = '-${a} * sin(x)'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[Outputs]
exodus = true
[]
(modules/richards/test/tests/dirac/bh_fu_08.i)
#fullyupwind
[Mesh]
type = FileMesh
file = bh07_input.e
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = DensityConstBulk
relperm_UO = RelPermPower
sat_UO = Saturation
seff_UO = Seff1VG
SUPG_UO = SUPGstandard
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1000 10000'
x = '100 1000'
[../]
[]
[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
[../]
[]
[BCs]
[./fix_outer]
type = DirichletBC
boundary = perimeter
variable = pressure
value = 1E7
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFullyUpwindFlux
variable = pressure
[../]
[]
[DiracKernels]
[./bh]
type = RichardsBorehole
bottom_pressure = 0
point_file = bh08.bh
borehole_length = 1
borehole_direction = '0 0 1'
SumQuantityUO = borehole_total_outflow_mass
variable = pressure
unit_weight = '0 0 0'
re_constant = 0.1594
character = 2
fully_upwind = true
[../]
[]
[Postprocessors]
[./bh_report]
type = RichardsPlotQuantity
uo = borehole_total_outflow_mass
execute_on = 'initial timestep_end'
[../]
[./fluid_mass]
type = RichardsMass
variable = pressure
execute_on = 'initial timestep_end'
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 1E7
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = 1
viscosity = 1E-3
mat_porosity = 0.1
mat_permeability = '1E-11 0 0 0 1E-11 0 0 0 1E-11'
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 = 1000
solve_type = NEWTON
[./TimeStepper]
# get only marginally better results for smaller time steps
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = bh_fu_08
execute_on = 'initial timestep_end final'
time_step_interval = 10000
exodus = 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/solid_mechanics/test/tests/lagrangian/cartesian/updated/convergence-auto/3D/dirichlet.i)
# Simple 3D test
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = true
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[ICs]
[disp_x]
type = RandomIC
variable = disp_x
min = -0.02
max = 0.02
[]
[disp_y]
type = RandomIC
variable = disp_y
min = -0.02
max = 0.02
[]
[disp_z]
type = RandomIC
variable = disp_z
min = -0.02
max = 0.02
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 4
nz = 4
[]
[]
[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
[]
[]
[Functions]
[pullx]
type = ParsedFunction
expression = '0.4 * t'
[]
[pully]
type = ParsedFunction
expression = '-0.2 * t'
[]
[pullz]
type = ParsedFunction
expression = '0.3 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = left
variable = disp_y
value = 0.0
[]
[leftz]
type = DirichletBC
preset = true
boundary = left
variable = disp_z
value = 0.0
[]
[pull_x]
type = FunctionDirichletBC
boundary = right
variable = disp_x
function = pullx
preset = true
[]
[pull_y]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = pully
preset = true
[]
[pull_z]
type = FunctionDirichletBC
boundary = right
variable = disp_z
function = pullz
preset = true
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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 = 0.2
dtmin = 0.2
end_time = 0.2
[]
(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/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/solid_mechanics/test/tests/lagrangian/cartesian/total/convergence-auto/2D/dirichlet.i)
# Simple 2D plane strain test
[GlobalParams]
displacements = 'disp_x disp_y'
large_kinematics = true
stabilize_strain = true
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
[]
[]
[ICs]
[disp_x]
type = RandomIC
variable = disp_x
min = -0.01
max = 0.01
[]
[disp_y]
type = RandomIC
variable = disp_y
min = -0.01
max = 0.01
[]
[]
[Kernels]
[sdx]
type = TotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[sdy]
type = TotalLagrangianStressDivergence
variable = disp_y
component = 1
[]
[]
[Functions]
[pullx]
type = ParsedFunction
expression = '0.5 * t'
[]
[pully]
type = ParsedFunction
expression = '-0.3 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = left
variable = disp_y
value = 0.0
[]
[pull_x]
type = FunctionDirichletBC
boundary = right
variable = disp_x
function = pullx
preset = true
[]
[pull_y]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = pully
preset = true
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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-10
nl_abs_tol = 1e-12
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 0.2
[]
(test/tests/postprocessors/num_dofs/num_dofs.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./u_aux]
order = FIRST
family = LAGRANGE
[../]
[./v_aux]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1
solve_type = PJFNK
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 2
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Postprocessors]
[./num_dofs_nl]
type = NumDOFs
system = NL
[../]
[./num_dofs_aux]
type = NumDOFs
system = AUX
[../]
# default
[./num_dofs_all]
type = NumDOFs
system = ALL
[../]
[]
[Outputs]
csv = true
[]
(modules/level_set/test/tests/verification/1d_level_set_supg_mms/1d_level_set_supg_mms.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 32
nx = 64
[]
[Variables]
[./phi]
[../]
[]
[AuxVariables]
[./velocity]
family = LAGRANGE_VEC
[../]
[]
[ICs]
[./phi_ic]
function = phi_exact
variable = phi
type = FunctionIC
[../]
[./vel_ic]
type = VectorFunctionIC
variable = velocity
function = velocity_func
[]
[]
[Functions]
[./phi_exact]
type = ParsedFunction
expression = 'a*exp(1/(10*t))*sin(2*pi*x/b) + 1'
symbol_names = 'a b'
symbol_values = '1 8'
[../]
[./phi_mms]
type = ParsedFunction
expression = '-a*exp(1/(10*t))*sin(2*pi*x/b)/(10*t^2) + 2*pi*a*exp(1/(10*t))*cos(2*pi*x/b)/b'
symbol_names = 'a b'
symbol_values = '1 8'
[../]
[./velocity_func]
type = ParsedVectorFunction
expression_x = '1'
expression_y = '1'
[../]
[]
[Kernels]
[./time]
type = TimeDerivative
variable = phi
[../]
[./time_supg]
type = LevelSetTimeDerivativeSUPG
variable = phi
velocity = velocity
[../]
[./phi_advection]
type = LevelSetAdvection
variable = phi
velocity = velocity
[../]
[./phi_forcing]
type = BodyForce
variable = phi
function = phi_mms
[../]
[./phi_advection_supg]
type = LevelSetAdvectionSUPG
variable = phi
velocity = velocity
[../]
[./phi_forcing_supg]
type = LevelSetForcingFunctionSUPG
velocity = velocity
variable = phi
function = phi_mms
[../]
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = phi_exact
variable = phi
[../]
[./h]
type = AverageElementSize
[../]
[./point]
type = PointValue
point = '0.1 0 0'
variable = phi
[../]
[]
[Executioner]
type = Transient
start_time = 1
dt = 0.01
end_time = 1.25
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_sub_type'
petsc_options_value = 'asm ilu'
scheme = bdf2
nl_rel_tol = 1e-12
[]
[Outputs]
time_step_interval = 10
execute_on = 'timestep_end'
csv = true
[]
(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'
expression = '(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'
expression = '(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/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/solid_mechanics/test/tests/ad_thermal_expansion_function/finite_linear.i)
# This tests the thermal expansion coefficient function using both
# options to specify that function: mean and instantaneous. There
# two blocks, each containing a single element, and these use the
# two variants of the function.
# In this test, the instantaneous CTE function is a linear function
# while the mean CTE function is an analytic function designed to
# give the same response. If \bar{alpha}(T) is the mean CTE function,
# and \alpha(T) is the instantaneous CTE function,
# \bar{\alpha}(T) = 1/(T-Tref) \intA^{T}_{Tsf} \alpha(T) dT
# where Tref is the reference temperature used to define the mean CTE
# function, and Tsf is the stress-free temperature.
# This version of the test uses finite deformation theory.
# The two models produce very similar results. There are slight
# differences due to the large deformation treatment.
[Mesh]
file = 'blocks.e'
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
eigenstrain_names = eigenstrain
generate_output = 'strain_xx strain_yy strain_zz'
use_automatic_differentiation = true
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = disp_x
boundary = 3
value = 0.0
[../]
[./bottom]
type = DirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[./back]
type = DirichletBC
variable = disp_z
boundary = 1
value = 0.0
[../]
[]
[AuxKernels]
[./temp]
type = FunctionAux
variable = temp
block = '1 2'
function = temp_func
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./small_stress]
type = ADComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain1]
type = ADComputeMeanThermalExpansionFunctionEigenstrain
block = 1
thermal_expansion_function = cte_func_mean
thermal_expansion_function_reference_temperature = 0.5
stress_free_temperature = 0.0
temperature = temp
eigenstrain_name = eigenstrain
[../]
[./thermal_expansion_strain2]
type = ADComputeInstantaneousThermalExpansionFunctionEigenstrain
block = 2
thermal_expansion_function = cte_func_inst
stress_free_temperature = 0.0
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Functions]
[./cte_func_mean]
type = ParsedFunction
symbol_names = 'tsf tref scale' #stress free temp, reference temp, scale factor
symbol_values = '0.0 0.5 1e-4'
expression = 'scale * (0.5 * t^2 - 0.5 * tsf^2) / (t - tref)'
[../]
[./cte_func_inst]
type = PiecewiseLinear
xy_data = '0 0.0
2 2.0'
scale_factor = 1e-4
[../]
[./temp_func]
type = PiecewiseLinear
xy_data = '0 1
1 2'
[../]
[]
[Postprocessors]
[./disp_1]
type = NodalExtremeValue
variable = disp_x
boundary = 101
[../]
[./disp_2]
type = NodalExtremeValue
variable = disp_x
boundary = 102
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
l_max_its = 100
l_tol = 1e-4
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
start_time = 0.0
end_time = 1.0
dt = 0.1
[]
[Outputs]
csv = true
[]
(test/tests/auxkernels/functor_elemental_gradient/functor_gradient.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = 0
xmax = 3.141
ymin = 0
ymax = 3.141
[]
[Variables]
[u]
[]
[v]
[]
[w]
type = MooseVariableFVReal
[]
[]
[ICs]
[u_ic]
type = FunctionIC
variable = 'u'
function = parsed_function
[]
[v_ic]
type = FunctionIC
variable = 'v'
function = 'x'
[]
[w_ic]
type = FunctionIC
variable = 'w'
function = 'x + y'
[]
[]
[Functions]
[parsed_function]
type = ParsedFunction
value = 'sin(x)-cos(y/2)'
[]
[parsed_grad_function]
type = ParsedVectorFunction
expression_x = 'cos(x)'
expression_y = 'sin(y/2)/2'
[]
[parsed_gradx_function]
type = ParsedFunction
value = 'cos(x)'
[]
[]
[AuxVariables]
[funcGrad_u]
order = CONSTANT
family = MONOMIAL_VEC
[]
[auxGrad_u]
order = CONSTANT
family = MONOMIAL_VEC
[]
[auxGrad_v]
order = CONSTANT
family = MONOMIAL_VEC
[]
[auxGrad_fv]
order = CONSTANT
family = MONOMIAL_VEC
[]
[auxGrad_function]
order = CONSTANT
family = MONOMIAL_VEC
[]
[funcGrad_u_x]
order = CONSTANT
family = MONOMIAL
[]
[auxGrad_u_x]
order = CONSTANT
family = MONOMIAL
[]
[auxGrad_v_x]
order = CONSTANT
family = MONOMIAL
[]
[auxGrad_fv_x]
order = CONSTANT
family = MONOMIAL
[]
[auxGrad_function_x]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
# Verification
[vec]
type = VectorFunctionAux
variable = funcGrad_u
function = parsed_grad_function
[]
# Finite element variables with and without scaling by material
[grad_u]
type = ADFunctorElementalGradientAux
variable = auxGrad_u
functor = u
[]
[grad_v]
type = ADFunctorElementalGradientAux
variable = auxGrad_v
functor = v
factor_matprop = 'trig_material'
[]
# Finite volume variable
[grad_w]
type = ADFunctorElementalGradientAux
variable = auxGrad_fv
functor = w
factor = w
[]
# Functions
[grad_function]
type = FunctorElementalGradientAux
variable = auxGrad_function
functor = parsed_gradx_function
[]
# Output a component, line sampler does not do vector variables
[funcGrad_u_x]
type = VectorVariableComponentAux
variable = funcGrad_u_x
vector_variable = funcGrad_u
component = 'x'
[]
[auxGrad_u_x]
type = VectorVariableComponentAux
variable = auxGrad_u_x
vector_variable = auxGrad_u
component = 'x'
[]
[auxGrad_v_x]
type = VectorVariableComponentAux
variable = auxGrad_v_x
vector_variable = auxGrad_v
component = 'x'
[]
[funcGrad_fv_x]
type = VectorVariableComponentAux
variable = auxGrad_fv_x
vector_variable = auxGrad_fv
component = 'x'
[]
[auxGrad_function_x]
type = VectorVariableComponentAux
variable = auxGrad_function_x
vector_variable = auxGrad_function
component = 'x'
[]
[]
[Materials]
[steel]
type = ADGenericFunctionMaterial
prop_names = 'trig_material'
prop_values = 'parsed_gradx_function'
[]
[]
[VectorPostprocessors]
[results]
type = LineValueSampler
start_point = '0 1 0'
end_point = '3.141 1 0'
variable = 'funcGrad_u_x auxGrad_u_x auxGrad_v_x auxGrad_fv_x auxGrad_function_x'
num_points = 20
sort_by = x
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/misc/check_error/old_integrity_check.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = 0
ymax = 1
nx = 20
ny = 10
elem_type = QUAD9
[]
[Functions]
[./bc_fn_v]
type = ParsedFunction
expression = (x*x+y*y)
[../]
[]
[Variables]
[./v]
family = LAGRANGE
order = SECOND
[../]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]
[Kernels]
[./diff_v]
type = CoefDiffusion
variable = u
coef = 0.5
[../]
[./conv_v]
type = CoupledConvection
variable = v
velocity_vector = u
lag_coupling = true # Here we are asking for an old value but this is a steady test!
[../]
[]
[BCs]
[./top_v]
type = FunctionDirichletBC
variable = v
boundary = top
function = bc_fn_v
[../]
[./left_u]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
execute_on = 'timestep_end'
[]
(modules/solid_mechanics/test/tests/j_integral_vtest/j_int_fgm_sif.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[Mesh]
[file]
type = FileMeshGenerator
file = multiple_blocks_bimaterial.e
[]
partitioner = centroid
centroid_partitioner_direction = z
[]
[AuxVariables]
[SED]
order = CONSTANT
family = MONOMIAL
[]
[resid_z]
[]
[]
[Functions]
[rampConstantUp]
type = PiecewiseLinear
x = '0. 1.'
y = '0. 1'
scale_factor = -68.95 #MPa
[]
[elastic_mod_material_der]
type = ParsedFunction
expression = 'if(y < 229, 0.0, if(y>279, 0, 20680*0460517019*exp(0.0460517019*(y-229))))'
[]
[elastic_mod_material]
type = ParsedFunction
expression = 'if(y < 229, 20680, if(y>279, 206800, 20680*exp(0.0460517019*(y-229))))'
[]
[]
[DomainIntegral]
integrals = 'JIntegral InteractionIntegralKI'
boundary = 1001
crack_direction_method = CurvedCrackFront
crack_end_direction_method = CrackDirectionVector
crack_direction_vector_end_1 = '0.0 1.0 0.0'
crack_direction_vector_end_2 = '1.0 0.0 0.0'
radius_inner = '12.5 25.0 100'
radius_outer = '25.0 37.5 150.0'
intersecting_boundary = '1 2'
symmetry_plane = 2
incremental = true
functionally_graded_youngs_modulus = elastic_mod_material_mat
youngs_modulus = 20680
poissons_ratio = 0.3
block = '1 2'
[]
[Physics/SolidMechanics/QuasiStatic]
[master]
strain = FINITE
add_variables = true
incremental = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress'
block = '1 2'
[]
[]
[AuxKernels]
[SED]
type = MaterialRealAux
variable = SED
property = strain_energy_density
execute_on = timestep_end
[]
[]
[BCs]
[crack_y]
type = DirichletBC
variable = disp_z
boundary = 6
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_y
boundary = 12
value = 0.0
[]
[no_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[]
[Pressure]
[Side1]
boundary = 5
function = rampConstantUp # BCs
[]
[]
[]
[Materials]
[generic_materials]
type = GenericFunctionMaterial
prop_names = 'elastic_mod_material_mat elastic_mod_material_der_mat'
prop_values = 'elastic_mod_material elastic_mod_material_der'
[]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = elastic_mod_material_mat
poissons_ratio = 0.3
args = ''
[]
[elastic_stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
line_search = 'none'
l_max_its = 50
nl_max_its = 20
nl_abs_tol = 1e-5
nl_rel_tol = 1e-8
l_tol = 1e-6
start_time = 0.0
dt = 1
end_time = 1
num_steps = 1
[]
[Postprocessors]
[_dt]
type = TimestepSize
[]
[nl_its]
type = NumNonlinearIterations
[]
[lin_its]
type = NumLinearIterations
[]
[react_z]
type = NodalSum
variable = resid_z
boundary = 5
[]
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_mean_zero_pressure.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
elem_type = QUAD9
[]
[]
[AuxVariables]
[vel_x]
order = SECOND
[]
[vel_y]
order = SECOND
[]
[]
[AuxKernels]
[vel_x]
type = VectorVariableComponentAux
variable = vel_x
vector_variable = velocity
component = 'x'
[]
[vel_y]
type = VectorVariableComponentAux
variable = vel_y
vector_variable = velocity
component = 'y'
[]
[]
[Variables]
[./velocity]
order = SECOND
family = LAGRANGE_VEC
[../]
[./T]
order = SECOND
[./InitialCondition]
type = ConstantIC
value = 1.0
[../]
[../]
[./p]
[../]
[./lambda]
family = SCALAR
order = FIRST
[../]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./momentum_time]
type = INSADMomentumTimeDerivative
variable = velocity
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[../]
[./temperature_time]
type = INSADHeatConductionTimeDerivative
variable = T
[../]
[./temperature_advection]
type = INSADEnergyAdvection
variable = T
[../]
[./temperature_conduction]
type = ADHeatConduction
variable = T
thermal_conductivity = 'k'
[../]
[./mean_zero_pressure]
type = ScalarLagrangeMultiplier
variable = p
lambda = lambda
[../]
[]
[ScalarKernels]
[./mean_zero_pressure_lm]
type = AverageValueConstraint
variable = lambda
pp_name = pressure_integral
value = 0
[../]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left'
[../]
[./lid]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 'lid_function'
[../]
[./T_hot]
type = DirichletBC
variable = T
boundary = 'bottom'
value = 1
[../]
[./T_cold]
type = DirichletBC
variable = T
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat]
type = INSAD3Eqn
velocity = velocity
pressure = p
temperature = T
[]
[]
[Postprocessors]
[./pressure_integral]
type = ElementIntegralVariablePostprocessor
variable = p
execute_on = linear
[../]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels -sub_pc_factor_shift_type'
petsc_options_value = 'asm 2 ilu 4 NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
exodus = true
perf_graph = true
[]
(test/tests/postprocessors/constant/receiver.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
nx = 1
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 3
dt = 1
[]
[Controls]
[func_control]
type = RealFunctionControl
parameter = 'Postprocessors/recv/value'
function = 'val'
execute_on = 'timestep_begin'
[]
[]
[Functions]
[val]
type = ParsedFunction
expression = '1 + 2*t'
[]
[]
[Postprocessors]
[recv]
type = ConstantPostprocessor
[]
[]
[Outputs]
csv = true
[]
(test/tests/time_integrators/explicit-euler/ee-2d-quadratic.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Functions]
[./ic]
type = ParsedFunction
expression = 0
[../]
[./forcing_fn]
type = ParsedFunction
expression = ((x*x)+(y*y))-(4*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic
[../]
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
implicit = true
[../]
[./diff]
type = Diffusion
variable = u
implicit = false
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
implicit = false
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
implicit = true
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'explicit-euler'
solve_type = 'LINEAR'
l_tol = 1e-13
start_time = 0.0
num_steps = 20
dt = 0.00005
[]
[Outputs]
exodus = true
[./console]
type = Console
max_rows = 10
[../]
[]
(modules/solid_mechanics/test/tests/recompute_radial_return/isotropic_plasticity_incremental_strain.i)
# This simulation uses the piece-wise linear strain hardening model
# with the incremental small strain formulation; incremental small strain
# is required to produce the strain_increment for the DiscreteRadialReturnStressIncrement
# class, which handles the calculation of the stress increment to return
# to the yield surface in a J2 (isotropic) plasticity problem.
#
# This test assumes a Poissons ratio of zero and applies a displacement loading
# condition on the top in the y direction while fixing the displacement in the x
# and z directions; thus, only the normal stress and the normal strains in the
# y direction are compared in this problem.
#
# A similar problem was run in Abaqus on a similar 1 element mesh and was used
# to verify the SolidMechanics solution; this SolidMechanics code matches the
# SolidMechanics solution.
#
# Mechanical strain is the sum of the elastic and plastic strains but is different
# from total strain in cases with eigen strains, e.g. thermal strain.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Functions]
[./top_pull]
type = ParsedFunction
expression = t*(0.01)
[../]
[./hf]
type = PiecewiseLinear
x = '0 0.00004 0.0001 0.1'
y = '50 54 56 60'
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = SMALL
incremental = true
add_variables = true
generate_output = 'stress_yy plastic_strain_xx plastic_strain_yy plastic_strain_zz'
[../]
[]
[BCs]
[./y_pull_function]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = top_pull
[../]
[./x_sides]
type = DirichletBC
variable = disp_x
boundary = 'left right'
value = 0.0
[../]
[./y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./z_sides]
type = DirichletBC
variable = disp_z
boundary = 'back front'
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.5e5
poissons_ratio = 0.0
[../]
[./isotropic_plasticity]
type = IsotropicPlasticityStressUpdate
yield_stress = 25.
hardening_constant = 1000.0
[../]
[./radial_return_stress]
type = ComputeMultipleInelasticStress
tangent_operator = elastic
inelastic_models = 'isotropic_plasticity'
[../]
[]
[Executioner]
type = Transient
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 20
nl_max_its = 20
nl_rel_tol = 1e-10
nl_abs_tol = 1e-12
l_tol = 1e-9
start_time = 0.0
end_time = 0.01875
dt = 0.00125
dtmin = 0.0001
[]
[Outputs]
exodus = true
print_linear_residuals = true
perf_graph = 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
[]
(test/tests/outputs/variables/show_hide.i)
# Solving for 2 variables, putting one into hide list and the other one into show list
# We should only see the variable that is in show list in the output.
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[]
[Functions]
[./bc_fn]
type = ParsedFunction
expression = x
[../]
[]
[Variables]
[./u]
[../]
[./v]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
[./lr_u]
type = FunctionDirichletBC
variable = u
boundary = '1 3'
function = bc_fn
[../]
[./lr_v]
type = FunctionDirichletBC
variable = v
boundary = '1 3'
function = bc_fn
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
console = true
[./out]
type = Exodus
show = 'u'
hide = 'v'
[../]
[]
(test/tests/variables/fe_hermite_convergence/hermite_converge_dirichlet.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 4
ny = 4
elem_type = QUAD4
# This test will not work in parallel with DistributedMesh enabled
# due to a bug in PeriodicBCs.
parallel_type = replicated
[]
[Functions]
[./bc_fn]
type = ParsedGradFunction
value = -sin(pi*x)*sin(pi*y)
grad_x = -pi*cos(pi*x)*sin(pi*y)
grad_y = -pi*sin(pi*x)*cos(pi*y)
[../]
[./forcing_fn]
type = ParsedFunction
expression = -2*pi*pi*sin(pi*x)*sin(pi*y)-sin(pi*x)*sin(pi*y)
[../]
[]
[Variables]
[./u]
order = THIRD
family = HERMITE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionPenaltyDirichletBC
variable = u
boundary = 'bottom right top left'
function = bc_fn
penalty = 1e10
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = bc_fn
[../]
[./H1error]
type = ElementH1Error
variable = u
function = bc_fn
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = bc_fn
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
# We use higher-order quadrature to ensure that the forcing function
# is integrated accurately.
[./Quadrature]
order=ELEVENTH
[../]
[]
[Adaptivity]
steps = 2
marker = uniform
[./Markers]
[./uniform]
type = UniformMarker
mark = refine
[../]
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
print_mesh_changed_info = true
[]
(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/solid_mechanics/test/tests/lagrangian/cartesian/updated/special/rotate.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
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[]
[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_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_xz]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[angles]
type = PiecewiseLinear
x = '0 1 2'
y = '0 0 1.5707963'
[]
[stretch]
type = PiecewiseLinear
x = '0 1 2'
y = '0 0.1 0.1'
[]
[move_y]
type = ParsedFunction
expression = 'y*cos(theta) - z * (1 + a)*sin(theta) - y'
symbol_names = 'a theta'
symbol_values = 'stretch angles'
[]
[move_z]
type = ParsedFunction
expression = 'y*sin(theta) + z*(1+a)*cos(theta) - z'
symbol_names = 'a theta'
symbol_values = 'stretch angles'
[]
[dts]
type = PiecewiseConstant
x = '0 1 2'
y = '0.1 0.001 0.001'
direction = 'LEFT_INCLUSIVE'
[]
[]
[BCs]
[fix]
type = DirichletBC
preset = true
value = 0.0
boundary = left
variable = disp_x
[]
[front_y]
type = FunctionDirichletBC
boundary = front
variable = disp_y
function = move_y
preset = true
[]
[back_y]
type = FunctionDirichletBC
boundary = back
variable = disp_y
function = move_y
preset = true
[]
[front_z]
type = FunctionDirichletBC
boundary = front
variable = disp_z
function = move_z
preset = true
[]
[back_z]
type = FunctionDirichletBC
boundary = back
variable = disp_z
function = move_z
preset = true
[]
[]
[AuxKernels]
[stress_xx]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_xz
index_i = 0
index_j = 2
execute_on = timestep_end
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_yz
index_i = 1
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]
[sxx]
type = ElementAverageValue
variable = stress_xx
[]
[syy]
type = ElementAverageValue
variable = stress_yy
[]
[szz]
type = ElementAverageValue
variable = stress_zz
[]
[syz]
type = ElementAverageValue
variable = stress_yz
[]
[sxz]
type = ElementAverageValue
variable = stress_xz
[]
[sxy]
type = ElementAverageValue
variable = stress_xy
[]
[]
[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-4
nl_abs_tol = 1e-6
start_time = 0.0
end_time = 2.0
[TimeStepper]
type = FunctionDT
function = dts
interpolate = False
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/combined/test/tests/surface_tension_KKS/surface_tension_KKS.i)
#
# KKS coupled with elasticity. Physical parameters for matrix and precipitate phases
# are gamma and gamma-prime phases, respectively, in the Ni-Al system.
# Parameterization is as described in L.K. Aagesen et al., Computational Materials
# Science, 140, 10-21 (2017), with isotropic elastic properties in both phases
# and without eigenstrain.
#
[Mesh]
type = GeneratedMesh
dim = 1
nx = 200
xmax = 200
[]
[Problem]
coord_type = RSPHERICAL
[]
[GlobalParams]
displacements = 'disp_x'
[]
[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
initial_condition = 0.13
[../]
# solute phase concentration (precipitate)
[./cp]
order = FIRST
family = LAGRANGE
initial_condition = 0.235
[../]
[]
[AuxVariables]
[./energy_density]
family = MONOMIAL
[../]
[./extra_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./extra_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./extra_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./eta_ic]
variable = eta
type = FunctionIC
function = ic_func_eta
[../]
[./c_ic]
variable = c
type = FunctionIC
function = ic_func_c
[../]
[]
[Functions]
[./ic_func_eta]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2+z^2);0.5*(1.0-tanh((r-r0)/delta_eta/sqrt(2.0)))'
symbol_names = 'delta_eta r0'
symbol_values = '6.431 100'
[../]
[./ic_func_c]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2+z^2);eta_an:=0.5*(1.0-tanh((r-r0)/delta/sqrt(2.0)));0.235*eta_an^3*(6*eta_an^2-15*eta_an+10)+0.13*(1-eta_an^3*(6*eta_an^2-15*eta_an+10))'
symbol_names = 'delta r0'
symbol_values = '6.431 100'
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
generate_output = 'hydrostatic_stress stress_xx stress_yy stress_zz'
[../]
[]
[Kernels]
# 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.0033
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
[../]
[]
[AuxKernels]
[./extra_xx]
type = RankTwoAux
rank_two_tensor = extra_stress
index_i = 0
index_j = 0
variable = extra_xx
[../]
[./extra_yy]
type = RankTwoAux
rank_two_tensor = extra_stress
index_i = 1
index_j = 1
variable = extra_yy
[../]
[./extra_zz]
type = RankTwoAux
rank_two_tensor = extra_stress
index_i = 2
index_j = 2
variable = extra_zz
[../]
[./strain_xx]
type = RankTwoAux
rank_two_tensor = mechanical_strain
index_i = 0
index_j = 0
variable = strain_xx
[../]
[./strain_yy]
type = RankTwoAux
rank_two_tensor = mechanical_strain
index_i = 1
index_j = 1
variable = strain_yy
[../]
[./strain_zz]
type = RankTwoAux
rank_two_tensor = mechanical_strain
index_i = 2
index_j = 2
variable = strain_zz
[../]
[]
[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 = ' '
[../]
# 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 = ' '
[../]
# 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
outputs = exodus
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'M L kappa'
prop_values = '0.7 0.7 0.1365'
[../]
#Mechanical properties
[./Stiffness_matrix]
type = ComputeElasticityTensor
C_ijkl = '74.25 14.525'
base_name = matrix
fill_method = symmetric_isotropic
[../]
[./Stiffness_ppt]
type = ComputeElasticityTensor
C_ijkl = '74.25 14.525'
base_name = ppt
fill_method = symmetric_isotropic
[../]
[./strain_matrix]
type = ComputeRSphericalSmallStrain
base_name = matrix
[../]
[./strain_ppt]
type = ComputeRSphericalSmallStrain
base_name = ppt
[../]
[./stress_matrix]
type = ComputeLinearElasticStress
base_name = matrix
[../]
[./stress_ppt]
type = ComputeLinearElasticStress
base_name = ppt
[../]
[./global_stress]
type = TwoPhaseStressMaterial
base_A = matrix
base_B = ppt
[../]
[./interface_stress]
type = ComputeSurfaceTensionKKS
v = eta
kappa_name = kappa
w = 0.0033
[../]
[]
[BCs]
[./left_r]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[]
#
# Precondition using handcoded off-diagonal terms
#
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm lu nonzero'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-9
nl_abs_tol = 1.0e-10
num_steps = 2
dt = 0.5
[]
[Outputs]
exodus = true
[./csv]
type = CSV
execute_on = 'final'
[../]
[]
(modules/richards/test/tests/jacobian_2/jn_fu_17.i)
# two phase
# water saturated
# gravity = true
# supg = true
# transient = true
[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 = '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.0 # notice small quantity, so the PETSc constant state works
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 0.5
bulk_mod = 0.5 # notice small quantity, so the PETSc constant state works
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1 # notice small quantity, so the PETSc constant state works
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1 # notice small quantity, so the PETSc constant state works
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.2
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.1
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
[./InitialCondition]
type = FunctionIC
block = 0
function = init_p
[../]
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
block = 0
function = init_p
[../]
[../]
[]
[Functions]
[./init_p]
type = ParsedFunction
expression = x+0.6*y+0.3*z
[../]
[]
[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
[../]
[]
[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 2 3'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
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-15 1E-10 10000 test'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E-5
[]
[Outputs]
execute_on = 'timestep_end'
file_base = jn17
exodus = false
[]
(test/tests/misc/initial_solution_copy/solutions_equal.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./initial_func]
type = ParsedFunction
expression = sin(pi*x)*sin(pi*y)
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[./source]
type = BodyForce
variable = u
value = 1
[../]
[]
[BCs]
active = 'func_bc'
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./func_bc]
type = FunctionDirichletBC
variable = u
boundary = 'bottom right top left'
function = initial_func
[../]
[]
[Postprocessors]
[./test_pp]
type = TestCopyInitialSolution
execute_on = timestep_begin
[../]
[]
[Executioner]
type = Transient
num_steps = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[ICs]
[./initial]
function = initial_func
variable = u
type = FunctionIC
[../]
[]
(test/tests/transfers/multiapp_projection_transfer/high_order_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
[]
[Functions]
[./test_function]
type = ParsedFunction
expression = '2.5*x^2 + 0.75*y^2 + 0.15*x*y'
[../]
[]
[AuxVariables]
[./from_sub]
family = monomial
order = first
[../]
[./test_var]
family = monomial
order = first
[./InitialCondition]
type = FunctionIC
function = test_function
[../]
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
[MultiApps]
[./sub]
type = FullSolveMultiApp
app_type = MooseTestApp
execute_on = initial
positions = '0.0 0.0 0.0'
input_files = high_order_sub.i
[../]
[]
[Transfers]
[./from]
type = MultiAppProjectionTransfer
execute_on = same_as_multiapp
from_multi_app = sub
source_variable = test_var
variable = from_sub
[../]
[./to]
type = MultiAppProjectionTransfer
execute_on = same_as_multiapp
to_multi_app = sub
source_variable = test_var
variable = from_parent
[../]
[]
(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
[]
(test/tests/kernels/scalar_constraint/scalar_constraint_kernel.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[./ffn]
type = ParsedFunction
expression = -4
[../]
[./bottom_bc_fn]
type = ParsedFunction
expression = -2*y
[../]
[./right_bc_fn]
type = ParsedFunction
expression = 2*x
[../]
[./top_bc_fn]
type = ParsedFunction
expression = 2*y
[../]
[./left_bc_fn]
type = ParsedFunction
expression = -2*x
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[./lambda]
family = SCALAR
order = FIRST
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffnk]
type = BodyForce
variable = u
function = ffn
[../]
[./sk_lm]
type = ScalarLagrangeMultiplier
variable = u
lambda = lambda
[../]
[]
[ScalarKernels]
[./constraint]
type = AverageValueConstraint
variable = lambda
pp_name = pp
value = 2.666666666666666
[../]
[]
[BCs]
[./bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bottom_bc_fn
[../]
[./right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = right_bc_fn
[../]
[./top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = top_bc_fn
[../]
[./left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = left_bc_fn
[../]
[]
[Postprocessors]
[./pp]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = linear
[../]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
[./pc]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-9
l_tol = 1.e-10
nl_max_its = 10
# This example builds an indefinite matrix, so "-pc_type hypre -pc_hypre_type boomeramg" cannot
# be used reliably on this problem. ILU(0) seems to do OK in both serial and parallel in my testing,
# I have not seen any zero pivot issues.
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'bjacobi ilu'
# This is a linear problem, so we don't need to recompute the
# Jacobian. This isn't a big deal for a Steady problems, however, as
# there is only one solve.
solve_type = 'LINEAR'
[]
[Outputs]
exodus = true
hide = lambda
[]
(test/tests/utils/mathutils/poly.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Problem]
solve = false
[]
[Functions]
[./constant]
type = PolyTestFunction
coefficients = '1'
[../]
[./constant_exact]
type = ParsedFunction
expression = '1'
[../]
[./quadratic]
type = PolyTestFunction
coefficients = '2 0 0'
[../]
[./quadratic_exact]
type = ParsedFunction
expression = '2 * x * x'
[../]
[./tenth]
type = PolyTestFunction
coefficients = '-1.0 0.9 -0.8 0.7 -0.6 0.5 -0.4 0.3 -0.2 0.1 -0.1'
[../]
[./tenth_exact]
type = ParsedFunction
expression = '-0.1 + 0.1 * x - 0.2 * x^2 + 0.3 * x^3 - 0.4 * x^4 + 0.5 * x^5 - 0.6 * x^6 + 0.7 * x^7 - 0.8 * x^8 + 0.9 * x^9 - 1.0 * x^10'
[../]
[./tenth_derivative]
type = PolyTestFunction
coefficients = '-1.0 0.9 -0.8 0.7 -0.6 0.5 -0.4 0.3 -0.2 0.1 -0.1'
derivative = true
[../]
[./tenth_derivative_exact]
type = ParsedFunction
expression = '0.1 - 2.0 * 0.2 * x^1 + 3.0 * 0.3 * x^2 - 4.0 * 0.4 * x^3 + 5.0 * 0.5 * x^4 - 6.0 * 0.6 * x^5 + 7.0 * 0.7 * x^6 - 8.0 * 0.8 * x^7 + 9.0 * 0.9 * x^8 - 10.0 * 1.0 * x^9'
[../]
[]
[VectorPostprocessors]
[./out]
type = LineFunctionSampler
functions = 'constant constant_exact quadratic quadratic_exact tenth tenth_exact tenth_derivative tenth_derivative_exact'
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 10
sort_by = x
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/umat/multiple_blocks/multiple_blocks_two_materials.i)
# Testing the UMAT Interface - linear elastic model using the large strain formulation.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[mesh_1]
type = GeneratedMeshGenerator
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[block_1]
type = SubdomainIDGenerator
input = mesh_1
subdomain_id = 1
[]
[mesh_2]
type = GeneratedMeshGenerator
dim = 3
xmin = -2.0
xmax = -1.0
ymin = -2.0
ymax = -1.0
zmin = -2.0
zmax = -1.
boundary_name_prefix = 'second'
[]
[block_2]
type = SubdomainIDGenerator
input = mesh_2
subdomain_id = 2
[]
[combined]
type = CombinerGenerator
inputs = 'block_1 block_2'
[]
[]
[Functions]
[top_pull]
type = ParsedFunction
value = t/100
[]
# Forced evolution of temperature
[temperature_load]
type = ParsedFunction
value = '273'
[]
# Factor to multiply the elasticity tensor in MOOSE
[elasticity_prefactor]
type = ParsedFunction
value = '1'
[]
[]
[AuxVariables]
[temperature]
[]
[]
[AuxKernels]
[temperature_function]
type = FunctionAux
variable = temperature
function = temperature_load
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
generate_output = 'stress_yy'
[]
[]
[BCs]
[y_pull_function]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = top_pull
[]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[z_bot]
type = DirichletBC
variable = disp_z
boundary = front
value = 0.0
[]
[]
[Materials]
[umat_1]
type = AbaqusUMATStress
constant_properties = '1000 0.3'
plugin = '../../../plugins/elastic_temperature'
num_state_vars = 0
temperature = temperature
use_one_based_indexing = true
block = '1'
[]
# Linear strain hardening
[umat_2]
type = AbaqusUMATStress
# Young's modulus, Poisson's Ratio, Yield, Hardening
constant_properties = '1000 0.3 100 100'
plugin = '../../../plugins/linear_strain_hardening'
num_state_vars = 3
use_one_based_indexing = true
block = '2'
[]
[elastic]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1000
poissons_ratio = 0.3
elasticity_tensor_prefactor = 'elasticity_prefactor'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
num_steps = 30
dt = 1.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(test/tests/bcs/penalty_dirichlet_bc/penalty_dirichlet_bc_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = -2*(x*x+y*y-2)+(1-x*x)*(1-y*y)
[../]
[./solution]
type = ParsedGradFunction
value = (1-x*x)*(1-y*y)
grad_x = 2*(x*y*y-x)
grad_y = 2*(x*x*y-y)
[../]
[]
[Variables]
[./u]
order = SECOND
family = HIERARCHIC
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'bc_all'
[./bc_all]
type = PenaltyDirichletBC
variable = u
value = 0
boundary = 'top left right bottom'
penalty = 1e5
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-14
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/variables/mixed_order_variables/mixed_order_variables_test.i)
# FIRST order nodal variables on SECOND order grid
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Functions]
[./force_fn]
type = ParsedFunction
expression = -4
[../]
[./exact_fn]
type = ParsedFunction
expression = (x*x)+(y*y)
[../]
[./aux_fn]
type = ParsedFunction
expression = (1-x*x)*(1-y*y)
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = force_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
preset = false
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[AuxVariables]
[./aux1]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./ak1]
type = FunctionAux
variable = aux1
function = aux_fn
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out
exodus = true
[]
(modules/solid_mechanics/test/tests/ad_thermal_expansion_function/small_linear.i)
# This tests the thermal expansion coefficient function using both
# options to specify that function: mean and instantaneous. There
# two blocks, each containing a single element, and these use the
# two variants of the function.
# In this test, the instantaneous CTE function is a linear function
# while the mean CTE function is an analytic function designed to
# give the same response. If \bar{alpha}(T) is the mean CTE function,
# and \alpha(T) is the instantaneous CTE function,
# \bar{\alpha}(T) = 1/(T-Tref) \intA^{T}_{Tsf} \alpha(T) dT
# where Tref is the reference temperature used to define the mean CTE
# function, and Tsf is the stress-free temperature.
# This version of the test uses small deformation theory. The results
# from the two models are identical.
[Mesh]
file = 'blocks.e'
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = SMALL
add_variables = true
eigenstrain_names = eigenstrain
generate_output = 'strain_xx strain_yy strain_zz'
use_automatic_differentiation = true
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = disp_x
boundary = 3
value = 0.0
[../]
[./bottom]
type = DirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[./back]
type = DirichletBC
variable = disp_z
boundary = 1
value = 0.0
[../]
[]
[AuxKernels]
[./temp]
type = FunctionAux
variable = temp
block = '1 2'
function = temp_func
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./small_stress]
type = ADComputeLinearElasticStress
[../]
[./thermal_expansion_strain1]
type = ADComputeMeanThermalExpansionFunctionEigenstrain
block = 1
thermal_expansion_function = cte_func_mean
thermal_expansion_function_reference_temperature = 0.5
stress_free_temperature = 0.0
temperature = temp
eigenstrain_name = eigenstrain
[../]
[./thermal_expansion_strain2]
type = ADComputeInstantaneousThermalExpansionFunctionEigenstrain
block = 2
thermal_expansion_function = cte_func_inst
stress_free_temperature = 0.0
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Functions]
[./cte_func_mean]
type = ParsedFunction
symbol_names = 'tsf tref scale' #stress free temp, reference temp, scale factor
symbol_values = '0.0 0.5 1e-4'
expression = 'scale * (0.5 * t^2 - 0.5 * tsf^2) / (t - tref)'
[../]
[./cte_func_inst]
type = PiecewiseLinear
xy_data = '0 0.0
2 2.0'
scale_factor = 1e-4
[../]
[./temp_func]
type = PiecewiseLinear
xy_data = '0 1
1 2'
[../]
[]
[Postprocessors]
[./disp_1]
type = NodalExtremeValue
variable = disp_x
boundary = 101
[../]
[./disp_2]
type = NodalExtremeValue
variable = disp_x
boundary = 102
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
l_max_its = 100
l_tol = 1e-4
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
start_time = 0.0
end_time = 1.0
dt = 0.1
[]
[Outputs]
csv = true
[]
(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/mortar/convergence-studies/solution-continuity/continuity.i)
[Mesh]
second_order = true
[./left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[../]
[./left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary_id = '0 1 2 3'
new_boundary_name = 'lb_bottom lb_right lb_top lb_left'
[../]
[./left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[../]
[./right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 1
xmax = 2
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[../]
[./right_block_id]
type = SubdomainIDGenerator
input = right_block
subdomain_id = 2
[../]
[right_block_change_boundary_id]
type = RenameBoundaryGenerator
input = right_block_id
old_boundary_id = '0 1 2 3'
new_boundary_id = '100 101 102 103'
[]
[./combined]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_change_boundary_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'left_block right_block'
[../]
[right_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = rb_right
block = right_block
normal = '1 0 0'
[]
[right_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_right_sideset
new_boundary = rb_left
block = right_block
normal = '-1 0 0'
[]
[right_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_left_sideset
new_boundary = rb_top
block = right_block
normal = '0 1 0'
[]
[right_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_top_sideset
new_boundary = rb_bottom
block = right_block
normal = '0 -1 0'
[]
[secondary]
input = right_bottom_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'lb_right'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'rb_left'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[./T]
block = 'left_block right_block'
order = SECOND
[../]
[./lambda]
block = 'secondary_lower'
[../]
[]
[BCs]
[./neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln_primal
variable = T
boundary = 'lb_bottom lb_top lb_left rb_bottom rb_right rb_top'
[../]
[]
[Kernels]
[./conduction]
type = Diffusion
variable = T
block = 'left_block right_block'
[../]
[./sink]
type = Reaction
variable = T
block = 'left_block right_block'
[../]
[./forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = 'left_block right_block'
[../]
[]
[Functions]
[./forcing_function]
type = ParsedFunction
expression = ''
[../]
[./exact_soln_primal]
type = ParsedFunction
expression = ''
[../]
[exact_soln_lambda]
type = ParsedFunction
expression = ''
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[./mortar]
type = EqualValueConstraint
primary_boundary = rb_left
secondary_boundary = lb_right
primary_subdomain = primary_lower
secondary_subdomain = secondary_lower
secondary_variable = T
variable = lambda
delta = 0.4
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
[Outputs]
csv = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
[Postprocessors]
[L2lambda]
type = ElementL2Error
variable = lambda
function = exact_soln_lambda
execute_on = 'timestep_end'
block = 'secondary_lower'
[]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = 'left_block right_block'
[]
[h]
type = AverageElementSize
block = 'left_block right_block'
[]
[]
(tutorials/tutorial03_verification/app/test/tests/step04_mms/2d_main.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
ymax = 0
ymin = -0.2
nx = 20
ny = 4
[]
[]
[Variables]
[T]
[]
[]
[ICs]
[T_O]
type = ConstantIC
variable = T
value = 263.15
[]
[]
[Functions]
[source]
type = ParsedFunction
symbol_names = 'hours shortwave kappa'
symbol_values = '9 650 40'
expression = 'shortwave*sin(0.5*x*pi)*exp(kappa*y)*sin(1/(hours*3600)*pi*t)'
[]
[]
[Kernels]
[T_time]
type = HeatConductionTimeDerivative
variable = T
density_name = 150
specific_heat = 2000
[]
[T_cond]
type = HeatConduction
variable = T
diffusion_coefficient = 0.01
[]
[T_source]
type = HeatSource
variable = T
function = source
[]
[]
[BCs]
[top]
type = NeumannBC
boundary = top
variable = T
value = -5
[]
[bottom]
type = DirichletBC
boundary = bottom
variable = T
value = 263.15
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
dt = 600 # 10 min
end_time = 32400 # 9 hour
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/heat_structure_base/phy.variable_init_t.i)
# Tests that a function can be used to initialize temperature in a heat structure.
[GlobalParams]
[]
[Functions]
[fn-initial_T]
type = ParsedFunction
expression = 'baseT + (dT * sin((pi * x) / length))'
symbol_names = 'baseT dT length'
symbol_values = '560.0 30.0 3.6576'
[]
[]
[SolidProperties]
[fuel-mat]
type = ThermalFunctionSolidProperties
k = 3.65
cp = 288.734
rho = 1.0412e2
[]
[gap-mat]
type = ThermalFunctionSolidProperties
k = 0.1
cp = 1.0
rho = 1.0
[]
[clad-mat]
type = ThermalFunctionSolidProperties
k = 16.48672
cp = 321.384
rho = 6.6e1
[]
[]
[Components]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = 3.6576
n_elems = 100
names = 'FUEL GAP CLAD'
widths = '0.0046955 0.0000955 0.000673'
n_part_elems = '10 3 3'
solid_properties = 'fuel-mat gap-mat clad-mat'
solid_properties_T_ref = '300 300 300'
initial_T = fn-initial_T
[]
[temp_outside]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:outer
T = 580.0
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 0.01
num_steps = 10
abort_on_solve_fail = true
solve_type = 'PJFNK'
nl_rel_tol = 1e-5
nl_abs_tol = 1e-6
nl_max_its = 8
l_tol = 1e-4
l_max_its = 10
[]
[Outputs]
[out]
type = Exodus
[]
[console]
type = Console
execute_scalars_on = none
[]
[]
(test/tests/ics/from_exodus_solution/elem_part1.i)
# We run a simple problem (5 time steps and save off the solution)
# In part2, we load the solution and solve a steady problem. The test check, that the initial state in part 2 is the same as the last state from part1
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 20
ny = 20
[]
[Functions]
[exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[]
[forcing_fn]
type = ParsedFunction
expression = -4+(x*x+y*y)
[]
[]
[AuxVariables]
[e]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[ak]
type = FunctionAux
variable = e
function = exact_fn
[]
[]
[Variables]
active = 'u'
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
active = 'ie diff ffn'
[ie]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.2
start_time = 0
num_steps = 5
[]
[Outputs]
exodus = true
checkpoint = true
[]
(test/tests/fvkernels/mms/advective-outflow/advection.i)
a=1.1
[GlobalParams]
advected_interp_method = 'average'
[]
[Mesh]
[./gen_mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 0.1
xmax = 1.1
nx = 2
[../]
[]
[Variables]
[./u]
family = MONOMIAL
order = CONSTANT
fv = true
two_term_boundary_expansion = false
type = MooseVariableFVReal
[../]
[./v]
family = MONOMIAL
order = CONSTANT
fv = true
two_term_boundary_expansion = true
type = MooseVariableFVReal
[../]
[]
[FVKernels]
[./advection_u]
type = FVAdvection
variable = u
velocity = '${a} 0 0'
force_boundary_execution = true
[../]
[body_u]
type = FVBodyForce
variable = u
function = 'forcing'
[]
[./advection_v]
type = FVAdvection
variable = v
velocity = '${a} 0 0'
force_boundary_execution = true
[../]
[body_v]
type = FVBodyForce
variable = v
function = 'forcing'
[]
[]
[FVBCs]
[left_u]
type = FVFunctionDirichletBC
boundary = 'left'
function = 'exact'
variable = u
[]
[left_v]
type = FVFunctionDirichletBC
boundary = 'left'
function = 'exact'
variable = v
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = 'cos(x)'
[]
[forcing]
type = ParsedFunction
expression = '-${a} * sin(x)'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[./L2u]
type = ElementL2Error
variable = u
function = exact
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[./L2v]
type = ElementL2Error
variable = v
function = exact
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(modules/heat_transfer/test/tests/functormaterials/cylindrical_gap_heat_flux_functor_material/cylindrical_gap_heat_flux_functor_material.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 10
nz = 10
[]
[AuxVariables]
[q_cond]
family = MONOMIAL
order = CONSTANT
[]
[q_rad]
family = MONOMIAL
order = CONSTANT
[]
[q_total]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[q_cond_kern]
type = FunctorAux
variable = q_cond
functor = conduction_heat_flux
execute_on = 'INITIAL'
[]
[q_rad_kern]
type = FunctorAux
variable = q_rad
functor = radiation_heat_flux
execute_on = 'INITIAL'
[]
[q_total_kern]
type = FunctorAux
variable = q_total
functor = total_heat_flux
execute_on = 'INITIAL'
[]
[]
[Functions]
[r_outer_fn]
type = ParsedFunction
# vary gap distance from 1 um to 1 mm in (0,1)
expression = '1.0 + 10^(-6 + 3*z)'
[]
[T_inner_fn]
type = ParsedFunction
expression = '300 + 1000 * x'
[]
[T_outer_fn]
type = ParsedFunction
expression = '300 + 1000 * y'
[]
[]
[Materials]
[heat_flux_fmat]
type = CylindricalGapHeatFluxFunctorMaterial
r_inner = 1.0
r_outer = r_outer_fn
emissivity_inner = 0.25
emissivity_outer = 0.75
k_gap = 0.15
T_inner = T_inner_fn
T_outer = T_outer_fn
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/element_integral_var_pps/initial_pps.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 3
ny = 3
elem_type = QUAD9
[]
[Variables]
active = 'u v'
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 2.8
[../]
[../]
[./v]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 5.4
[../]
[../]
[]
[Functions]
active = 'force_fn exact_fn left_bc'
[./force_fn]
type = ParsedFunction
expression = '1-x*x+2*t'
[../]
[./exact_fn]
type = ParsedFunction
expression = '(1-x*x)*t'
[../]
[./left_bc]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
active = '
time_u diff_u ffn_u
time_v diff_v'
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'all_u left_v right_v'
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '1'
value = 0
[../]
[]
[Postprocessors]
[./initial_u]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = initial
[../]
[./initial_v]
type = ElementIntegralVariablePostprocessor
variable = v
execute_on = initial
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
end_time = 0.3
[]
[Outputs]
file_base = out_initial_pps
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/mms/lid-mesh-velocity/1d-simplified.i)
mu=1.1
rho=1.1
[GlobalParams]
rhie_chow_user_object = 'rc'
velocity_interp_method = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
pressure = pressure
disp_x = disp_x
use_displaced_mesh = true
[]
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
xmin = -1
xmax = 1
nx = 2
[]
displacements = 'disp_x'
[]
[Variables]
[u]
type = INSFVVelocityVariable
[]
[]
[AuxVariables]
[disp_x][]
[pressure]
type = INSFVPressureVariable
[]
[]
[ICs]
[pressure]
type = FunctionIC
function = 'x^3'
variable = pressure
[]
[]
[AuxKernels]
[disp_x]
type = FunctionAux
function = exact_disp_x
variable = disp_x
execute_on = 'initial timestep_begin'
[]
[]
[FVKernels]
[u_advection]
type = INSFVMomentumAdvection
variable = u
advected_interp_method = 'average'
rho = ${rho}
momentum_component = 'x'
use_displaced_mesh = true
boundaries_to_force = 'left right'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
use_displaced_mesh = true
[]
[u_mesh_advection]
type = INSFVMomentumMeshAdvection
variable = u
rho = ${rho}
momentum_component = 'x'
disp_x = disp_x
use_displaced_mesh = true
[]
[u_forcing]
type = INSFVBodyForce
variable = u
functor = forcing_u
momentum_component = 'x'
use_displaced_mesh = true
[]
[]
[FVBCs]
[no-slip-wall-u]
type = INSFVNoSlipWallBC
boundary = 'left right'
variable = u
function = 'exact_u'
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'cos(x)'
[]
[forcing_u]
type = ParsedFunction
expression = 'mu*cos(x) - rho*(-2*x/(2*t + 1) + cos(x))*sin(x) + rho*(-sin(x) - 2/(2*t + 1))*cos(x) + 2*rho*cos(x)/(2*t + 1)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_disp_x]
type = ParsedFunction
expression = '2*x*t'
[]
[]
[Executioner]
type = Transient
num_steps = 1
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
dt = 0.5
nl_rel_tol = 1e-12
[]
[Outputs]
csv = true
exodus = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
use_displaced_mesh = true
[]
[L2u]
type = ElementL2FunctorError
approximate = u
exact = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
use_displaced_mesh = true
[]
[]
(modules/combined/test/tests/elastic_thermal_patch/elastic_thermal_patch_rz.i)
#
# This problem is modified from the Abaqus verification manual:
# "1.5.4 Patch test for axisymmetric elements"
# The original stress solution is given as:
# xx = yy = zz = 2000
# xy = 400
#
# Here, E=1e6 and nu=0.25.
# However, with a +100 degree change in temperature and a coefficient
# of thermal expansion of 1e-6, the solution becomes:
# xx = yy = zz = 1800
# xy = 400
# since
# E*(1-nu)/(1+nu)/(1-2*nu)*(1+2*nu/(1-nu))*(1e-3-1e-4) = 1800
#
# Also,
#
# dSrr dSrz Srr-Stt
# ---- + ---- + ------- + br = 0
# dr dz r
#
# and
#
# dSrz Srz dSzz
# ---- + --- + ---- + bz = 0
# dr r dz
#
# where
# Srr = stress in rr
# Szz = stress in zz
# Stt = stress in theta-theta
# Srz = stress in rz
# br = body force in r direction
# bz = body force in z direction
#
[GlobalParams]
displacements = 'disp_x disp_y'
temperature = temp
volumetric_locking_correction = true
[]
[Problem]
coord_type = RZ
[]
[Mesh]
file = elastic_thermal_patch_rz_test.e
[]
[Functions]
[./ur]
type = ParsedFunction
expression = '1e-3*x'
[../]
[./uz]
type = ParsedFunction
expression = '1e-3*(x+y)'
[../]
[./body]
type = ParsedFunction
expression = '-400/x'
[../]
[./temp]
type = ParsedFunction
expression = '117.56+100*t'
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./temp]
initial_condition = 117.56
[../]
[]
[Modules/TensorMechanics/Master/All]
add_variables = true
strain = SMALL
incremental = true
eigenstrain_names = eigenstrain
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_zx'
[]
[Kernels]
[./body]
type = BodyForce
variable = disp_y
value = 1
function = body
[../]
[./heat]
type = HeatConduction
variable = temp
[../]
[]
[BCs]
[./ur]
type = FunctionDirichletBC
variable = disp_x
boundary = 10
function = ur
[../]
[./uz]
type = FunctionDirichletBC
variable = disp_y
boundary = 10
function = uz
[../]
[./temp]
type = FunctionDirichletBC
variable = temp
boundary = 10
function = temp
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
lambda = 400000.0
poissons_ratio = 0.25
[../]
[./thermal_strain]
type = ComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 1e-6
stress_free_temperature = 117.56
eigenstrain_name = eigenstrain
[../]
[./stress]
type = ComputeStrainIncrementBasedStress
[../]
[./heat]
type = HeatConductionMaterial
specific_heat = 0.116
thermal_conductivity = 4.85e-4
[../]
[./density]
type = Density
density = 0.283
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
nl_abs_tol = 1e-11
nl_rel_tol = 1e-12
l_max_its = 20
start_time = 0.0
dt = 1.0
num_steps = 1
end_time = 1.0
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/umat/predef/predef.i)
# Testing the UMAT Interface - linear elastic model using the large strain formulation.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[]
[Functions]
[top_pull]
type = ParsedFunction
expression = -t*10
[]
[]
[AuxVariables]
[strain_yy]
family = MONOMIAL
order = FIRST
[]
[]
[AuxKernels]
[strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 1
index_j = 1
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
[]
[]
[BCs]
[Pressure]
[bc_presssure]
boundary = top
function = top_pull
[]
[]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[z_bot]
type = DirichletBC
variable = disp_z
boundary = front
value = 0.0
[]
[]
[Materials]
# Active for
[umat]
type = AbaqusUMATStress
constant_properties = '1000 0.3'
plugin = '../../../plugins/elastic_predef'
num_state_vars = 0
external_fields = 'strain_yy'
use_one_based_indexing = true
[]
# 2. Active for reference MOOSE computations
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
base_name = 'base'
youngs_modulus = 1e3
poissons_ratio = 0.3
[]
[strain_dependent_elasticity_tensor]
type = CompositeElasticityTensor
args = strain_yy
tensors = 'base'
weights = 'prefactor_material'
[]
[prefactor_material_block]
type = DerivativeParsedMaterial
property_name = prefactor_material
coupled_variables = strain_yy
expression = '1.0/(1.0 + strain_yy)'
[]
[stress]
type = ComputeFiniteStrainElasticStress
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
end_time = 30
dt = 1.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/variable_residual_norm/variable_residual.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmin = -1
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[./u]
[../]
[./v]
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[Functions]
[./leg1]
type = ParsedFunction
expression = 'x'
[../]
[./leg2]
type = ParsedFunction
expression = '0.5*(3.0*x*x-1.0)'
[../]
[]
[BCs]
[./left_u]
type = DirichletBC
variable = u
preset = false
boundary = 1
value = 0
[../]
[./right_u]
type = DirichletBC
variable = u
preset = false
boundary = 2
value = 1
[../]
[./left_v]
type = DirichletBC
variable = v
preset = false
boundary = 1
value = 200
[../]
[./right_v]
type = DirichletBC
variable = v
preset = false
boundary = 2
value = 100
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
# this is large on purpose so we don't reduce the variable residual to machine zero
# and so that we can compare to larger numbers. This also means this test can run only
# in serial, since parallel runs yield different convergence history.
nl_rel_tol = 1e-4
[]
[Postprocessors]
[./u_res_l2]
type = VariableResidual
variable = u
[../]
[./v_res_l2]
type = VariableResidual
variable = v
[../]
[]
[Outputs]
csv = true
[./console]
type = Console
# turn this on, so we can visually compare the postprocessor value with what is computed by the Console object
all_variable_norms = true
[../]
[]
(modules/solid_mechanics/test/tests/rom_stress_update/creep_ramp_sub_true.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[temperature]
initial_condition = 889
[]
[effective_inelastic_strain]
order = FIRST
family = MONOMIAL
[]
[cell_dislocations]
order = FIRST
family = MONOMIAL
[]
[wall_dislocations]
order = FIRST
family = MONOMIAL
[]
[number_of_substeps]
order = FIRST
family = MONOMIAL
[]
[]
[AuxKernels]
[effective_inelastic_strain]
type = MaterialRealAux
variable = effective_inelastic_strain
property = effective_creep_strain
[]
[cell_dislocations]
type = MaterialRealAux
variable = cell_dislocations
property = cell_dislocations
[]
[wall_dislocations]
type = MaterialRealAux
variable = wall_dislocations
property = wall_dislocations
[]
[number_of_substeps]
type = MaterialRealAux
variable = number_of_substeps
property = number_of_substeps
[]
[]
[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 = -0.5
function = shear_function
[]
[pressure_y]
type = Pressure
variable = disp_y
boundary = top
factor = -0.5
function = shear_function
[]
[pressure_z]
type = Pressure
variable = disp_z
boundary = front
factor = 0.5
function = shear_function
[]
[]
[Functions]
[shear_function]
type = ParsedFunction
expression = 'timeToDoubleInHours := 10;
if(t<=28*60*60, 15.0e6, 15.0e6*(t-28*3600)/3600/timeToDoubleInHours+15.0e6)'
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1.68e11
poissons_ratio = 0.31
[]
[stress]
type = ComputeMultipleInelasticStress
inelastic_models = rom_stress_prediction
[]
[mx_phase_fraction]
type = GenericConstantMaterial
prop_names = mx_phase_fraction
prop_values = 5.13e-2 #precipitation bounds: 6e-3, 1e-1
outputs = all
[]
[rom_stress_prediction]
type = SS316HLAROMANCEStressUpdateTest
temperature = temperature
initial_cell_dislocation_density = 6.0e12
initial_wall_dislocation_density = 4.4e11
# outputs = all
use_substepping = ERROR_BASED
substep_strain_tolerance = 1.0e-5
stress_input_window_low_failure = WARN
stress_input_window_high_failure = ERROR
cell_input_window_high_failure = ERROR
cell_input_window_low_failure = ERROR
wall_input_window_low_failure = ERROR
wall_input_window_high_failure = ERROR
temperature_input_window_high_failure = ERROR
temperature_input_window_low_failure = ERROR
environment_input_window_high_failure = ERROR
environment_input_window_low_failure = ERROR
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
nl_abs_tol = 1e-12
nl_rel_tol = 1e-4
automatic_scaling = true
compute_scaling_once = false
dtmin = 0.1
dtmax = 1e5
end_time = 136800
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.1 ## This model requires a tiny timestep at the onset for the first 10s
iteration_window = 4
optimal_iterations = 12
time_t = '100800'
time_dt = '1e5'
[]
[]
[Postprocessors]
[effective_strain_avg]
type = ElementAverageValue
variable = effective_inelastic_strain
[]
[temperature]
type = ElementAverageValue
variable = temperature
[]
[cell_dislocations]
type = ElementAverageValue
variable = cell_dislocations
[]
[wall_disloactions]
type = ElementAverageValue
variable = wall_dislocations
[]
[max_vonmises_stress]
type = ElementExtremeValue
variable = vonmises_stress
value_type = max
[]
[number_of_substeps]
type = ElementAverageValue
variable = number_of_substeps
[]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/domain_integral_thermal/j_integral_2d_mean_ctefunc.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
file = crack2d.e
[]
[AuxVariables]
[./SED]
order = CONSTANT
family = MONOMIAL
[../]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./tempfunc]
type = ParsedFunction
expression = 10.0*(2*x/504)
[../]
[./cte_func_mean]
type = ParsedFunction
symbol_names = 'tsf tref scale' #stress free temp, reference temp, scale factor
symbol_values = '0.0 0.5 1e-6'
expression = 'scale * (0.5 * t^2 - 0.5 * tsf^2) / (t - tref)'
[../]
[]
[DomainIntegral]
integrals = JIntegral
boundary = 800
crack_direction_method = CrackDirectionVector
crack_direction_vector = '1 0 0'
2d = true
axis_2d = 2
radius_inner = '60.0 80.0 100.0 120.0'
radius_outer = '80.0 100.0 120.0 140.0'
temperature = temp
incremental = true
eigenstrain_names = thermal_expansion
[]
[Physics/SolidMechanics/QuasiStatic]
[./master]
strain = FINITE
add_variables = true
incremental = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress'
planar_formulation = PLANE_STRAIN
eigenstrain_names = thermal_expansion
[../]
[]
[AuxKernels]
[./SED]
type = MaterialRealAux
variable = SED
property = strain_energy_density
execute_on = timestep_end
[../]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
block = 1
[../]
[]
[BCs]
[./crack_y]
type = DirichletBC
variable = disp_y
boundary = 100
value = 0.0
[../]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = 400
value = 0.0
[../]
[./no_x1]
type = DirichletBC
variable = disp_x
boundary = 900
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
[../]
[./elastic_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain]
type = ComputeMeanThermalExpansionFunctionEigenstrain
block = 1
thermal_expansion_function = cte_func_mean
stress_free_temperature = 0.0
thermal_expansion_function_reference_temperature = 0.5
temperature = temp
eigenstrain_name = thermal_expansion
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
line_search = 'none'
l_max_its = 50
nl_max_its = 40
nl_rel_step_tol= 1e-10
nl_rel_tol = 1e-10
start_time = 0.0
dt = 1
end_time = 1
num_steps = 1
[]
[Outputs]
csv = true
execute_on = 'timestep_end'
[]
[Preconditioning]
[./smp]
type = SMP
pc_side = left
ksp_norm = preconditioned
full = true
[../]
[]
(test/tests/kernels/vector_fe/coupled_scalar_vector.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = -1
ymin = -1
elem_type = QUAD9
[]
[Variables]
[./u]
family = NEDELEC_ONE
order = FIRST
[../]
[./v]
[../]
[]
[Kernels]
[./wave]
type = VectorFEWave
variable = u
x_forcing_func = 'x_ffn'
y_forcing_func = 'y_ffn'
[../]
[./diff]
type = Diffusion
variable = v
[../]
[./source]
type = BodyForce
variable = v
[../]
[./advection]
type = EFieldAdvection
variable = v
efield = u
charge = 'positive'
mobility = 100
[../]
[]
[BCs]
[./bnd]
type = VectorCurlPenaltyDirichletBC
boundary = 'left right top bottom'
penalty = 1e10
function_x = 'x_sln'
function_y = 'y_sln'
variable = u
[../]
[./bnd_v]
type = DirichletBC
boundary = 'left right top bottom'
value = 0
variable = v
[../]
[]
[Functions]
[./x_ffn]
type = ParsedFunction
expression = '(2*pi*pi + 1)*cos(pi*x)*sin(pi*y)'
[../]
[./y_ffn]
type = ParsedFunction
expression = '-(2*pi*pi + 1)*sin(pi*x)*cos(pi*y)'
[../]
[./x_sln]
type = ParsedFunction
expression = 'cos(pi*x)*sin(pi*y)'
[../]
[./y_sln]
type = ParsedFunction
expression = '-sin(pi*x)*cos(pi*y)'
[../]
[]
[Preconditioning]
[./pre]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'asm'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
[]
[Outputs]
exodus = 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/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
[../]
[]
(test/tests/mortar/convergence-studies/fv-gap-conductance/gap-conductance.i)
[Problem]
error_on_jacobian_nonzero_reallocation = true
[]
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = 'lb_bottom lb_right lb_top lb_left'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 2
xmax = 3
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block
subdomain_id = 2
[]
[right_block_change_boundary_id]
type = RenameBoundaryGenerator
input = right_block_id
old_boundary = '0 1 2 3'
new_boundary = '100 101 102 103'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'left_block right_block'
[]
[right_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = rb_right
included_subdomains = right_block
normal = '1 0 0'
[]
[right_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_right_sideset
new_boundary = rb_left
included_subdomains = right_block
normal = '-1 0 0'
[]
[right_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_left_sideset
new_boundary = rb_top
included_subdomains = right_block
normal = '0 1 0'
[]
[right_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_top_sideset
new_boundary = rb_bottom
included_subdomains = right_block
normal = '0 -1 0'
[]
[secondary]
input = right_bottom_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'lb_right'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'rb_left'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[T]
block = 'left_block right_block'
type = MooseVariableFVReal
[]
[lambda]
block = 'secondary_lower'
family = MONOMIAL
order = CONSTANT
[]
[]
[FVBCs]
[neumann]
type = FVFunctionDirichletBC
function = exact_soln_primal
variable = T
boundary = 'lb_bottom lb_top lb_left rb_bottom rb_right rb_top'
[]
[]
[FVKernels]
[conduction]
type = FVDiffusion
variable = T
block = 'left_block right_block'
coeff = 1
[]
[sink]
type = FVReaction
variable = T
block = 'left_block right_block'
[]
[forcing_function]
type = FVBodyForce
variable = T
function = forcing_function
block = 'left_block right_block'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = ''
[]
[exact_soln_primal]
type = ParsedFunction
expression = ''
[]
[exact_soln_lambda]
type = ParsedFunction
expression = ''
[]
[mms_secondary]
type = ParsedFunction
expression = ''
[]
[mms_primary]
type = ParsedFunction
expression = ''
[]
[]
[Constraints]
[mortar]
type = GapHeatConductanceTest
primary_boundary = rb_left
secondary_boundary = lb_right
primary_subdomain = primary_lower
secondary_subdomain = secondary_lower
secondary_variable = T
variable = lambda
secondary_gap_conductance = 1
primary_gap_conductance = 1
secondary_mms_function = mms_secondary
primary_mms_function = mms_primary
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
[]
[Postprocessors]
[L2lambda]
type = ElementL2Error
variable = lambda
function = exact_soln_lambda
execute_on = 'timestep_end'
block = 'secondary_lower'
[]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = 'left_block right_block'
[]
[h]
type = AverageElementSize
block = 'left_block right_block'
[]
[]
(test/tests/actions/meta_action_multiple_tasks/circle_quads.i)
[Mesh]
file = circle-quads.e
[]
[Functions]
[./all_bc_fn]
type = ParsedFunction
expression = x*x+y*y
[../]
[./f_fn]
type = ParsedFunction
expression = -4
[../]
[./analytical_normal_x]
type = ParsedFunction
expression = x
[../]
[./analytical_normal_y]
type = ParsedFunction
expression = y
[../]
[]
# An Action that adds an Action that satisfies multiple tasks!
[MetaNodalNormals]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = f_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = 'all_bc_fn'
[../]
[]
[Postprocessors]
[./nx_pps]
type = NodalL2Error
variable = nodal_normal_x
boundary = '1'
function = analytical_normal_x
[../]
[./ny_pps]
type = NodalL2Error
variable = nodal_normal_y
boundary = '1'
function = analytical_normal_y
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-13
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/markers/two_circle_marker/two_circle_marker_gaussian_ic.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Variables]
[./u]
[../]
[]
[ICs]
[./gaussian_ic]
type = FunctionIC
variable = u
function = gaussian_2d
[../]
[]
[Functions]
[./gaussian_2d]
type = ParsedFunction
expression = exp(-((x-x0)*(x-x0)+(y-y0)*(y-y0))/2.0/sigma/sigma)
symbol_names = 'sigma x0 y0'
symbol_values = '0.05 0.35 0.25'
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.02
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./Periodic]
[./all]
variable = u
auto_direction = 'x y'
[../]
[../]
[]
[Executioner]
type = Transient
num_steps = 6
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Adaptivity]
initial_steps = 1
initial_marker = two_circle_marker
cycles_per_step = 1
marker = two_circle_marker
max_h_level = 1
[./Markers]
[./two_circle_marker]
type = TwoCircleMarker
point1 = '0.5 0.5 0'
radius1 = 0.3
point2 = '0.35 0.25 0'
radius2 = 0.3
shut_off_time = 0.15
inside = refine
outside = coarsen
[../]
[../]
[]
[Outputs]
exodus = true
[./console]
type = Console
print_mesh_changed_info = true
[../]
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/convergence/sd-stress.i)
# 3D test with stress control
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = false
constraint_types = 'stress none none stress stress none stress stress stress'
macro_gradient = hvar
homogenization_constraint = homogenization
[]
[Mesh]
[base]
type = FileMeshGenerator
file = '3d.exo'
[]
[sidesets]
type = SideSetsFromNormalsGenerator
input = base
normals = '-1 0 0
1 0 0
0 -1 0
0 1 0
'
' 0 0 -1
0 0 1'
fixed_normal = true
new_boundary = 'left right bottom top back front'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[hvar]
family = SCALAR
order = SIXTH
[]
[]
[ICs]
[disp_x]
type = RandomIC
variable = disp_x
min = -0.1
max = 0.1
[]
[disp_y]
type = RandomIC
variable = disp_y
min = -0.1
max = 0.1
[]
[disp_z]
type = RandomIC
variable = disp_z
min = -0.1
max = 0.1
[]
[hvar]
type = ScalarConstantIC
variable = hvar
value = 0.1
[]
[]
[AuxVariables]
[sxx]
family = MONOMIAL
order = CONSTANT
[]
[syy]
family = MONOMIAL
order = CONSTANT
[]
[sxy]
family = MONOMIAL
order = CONSTANT
[]
[szz]
family = MONOMIAL
order = CONSTANT
[]
[syz]
family = MONOMIAL
order = CONSTANT
[]
[sxz]
family = MONOMIAL
order = CONSTANT
[]
[exx]
family = MONOMIAL
order = CONSTANT
[]
[eyy]
family = MONOMIAL
order = CONSTANT
[]
[exy]
family = MONOMIAL
order = CONSTANT
[]
[ezz]
family = MONOMIAL
order = CONSTANT
[]
[eyz]
family = MONOMIAL
order = CONSTANT
[]
[exz]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[sxx]
type = RankTwoAux
variable = sxx
rank_two_tensor = pk1_stress
index_i = 0
index_j = 0
[]
[syy]
type = RankTwoAux
variable = syy
rank_two_tensor = pk1_stress
index_i = 1
index_j = 1
[]
[sxy]
type = RankTwoAux
variable = sxy
rank_two_tensor = pk1_stress
index_i = 0
index_j = 1
[]
[zz]
type = RankTwoAux
variable = szz
rank_two_tensor = pk1_stress
index_i = 2
index_j = 2
[]
[syz]
type = RankTwoAux
variable = syz
rank_two_tensor = pk1_stress
index_i = 1
index_j = 2
[]
[sxz]
type = RankTwoAux
variable = sxz
rank_two_tensor = pk1_stress
index_i = 0
index_j = 2
[]
[exx]
type = RankTwoAux
variable = exx
rank_two_tensor = mechanical_strain
index_i = 0
index_j = 0
[]
[eyy]
type = RankTwoAux
variable = eyy
rank_two_tensor = mechanical_strain
index_i = 1
index_j = 1
[]
[exy]
type = RankTwoAux
variable = exy
rank_two_tensor = mechanical_strain
index_i = 0
index_j = 1
[]
[ezz]
type = RankTwoAux
variable = ezz
rank_two_tensor = mechanical_strain
index_i = 2
index_j = 2
[]
[eyz]
type = RankTwoAux
variable = eyz
rank_two_tensor = mechanical_strain
index_i = 1
index_j = 2
[]
[exz]
type = RankTwoAux
variable = exz
rank_two_tensor = mechanical_strain
index_i = 0
index_j = 2
[]
[]
[UserObjects]
[homogenization]
type = HomogenizationConstraint
targets = 'stress11 stress12 stress22 stress13 stress23 stress33'
execute_on = 'INITIAL LINEAR NONLINEAR'
[]
[]
[Kernels]
[sdx]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[sdy]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_y
component = 1
[]
[sdz]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_z
component = 2
[]
[]
[ScalarKernels]
[enforce]
type = HomogenizationConstraintScalarKernel
variable = hvar
[]
[]
[Functions]
[stress11]
type = ParsedFunction
expression = '4.0e2*t'
[]
[stress22]
type = ParsedFunction
expression = '-2.0e2*t'
[]
[stress33]
type = ParsedFunction
expression = '8.0e2*t'
[]
[stress23]
type = ParsedFunction
expression = '2.0e2*t'
[]
[stress13]
type = ParsedFunction
expression = '-7.0e2*t'
[]
[stress12]
type = ParsedFunction
expression = '1.0e2*t'
[]
[]
[BCs]
[Periodic]
[x]
variable = disp_x
auto_direction = 'x y z'
[]
[y]
variable = disp_y
auto_direction = 'x y z'
[]
[z]
variable = disp_z
auto_direction = 'x y z'
[]
[]
[fix1_x]
type = DirichletBC
boundary = "fix_all"
variable = disp_x
value = 0
[]
[fix1_y]
type = DirichletBC
boundary = "fix_all"
variable = disp_y
value = 0
[]
[fix1_z]
type = DirichletBC
boundary = "fix_all"
variable = disp_z
value = 0
[]
[fix2_x]
type = DirichletBC
boundary = "fix_xy"
variable = disp_x
value = 0
[]
[fix2_y]
type = DirichletBC
boundary = "fix_xy"
variable = disp_y
value = 0
[]
[fix3_z]
type = DirichletBC
boundary = "fix_z"
variable = disp_z
value = 0
[]
[]
[Materials]
[elastic_tensor_1]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
block = '1'
[]
[elastic_tensor_2]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 120000.0
poissons_ratio = 0.21
block = '2'
[]
[elastic_tensor_3]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 80000.0
poissons_ratio = 0.4
block = '3'
[]
[elastic_tensor_4]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 76000.0
poissons_ratio = 0.11
block = '4'
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
homogenization_gradient_names = 'homogenization_gradient'
[]
[compute_homogenization_gradient]
type = ComputeHomogenizedLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[sxx]
type = ElementAverageValue
variable = sxx
execute_on = 'initial timestep_end'
[]
[syy]
type = ElementAverageValue
variable = syy
execute_on = 'initial timestep_end'
[]
[sxy]
type = ElementAverageValue
variable = sxy
execute_on = 'initial timestep_end'
[]
[szz]
type = ElementAverageValue
variable = szz
execute_on = 'initial timestep_end'
[]
[syz]
type = ElementAverageValue
variable = syz
execute_on = 'initial timestep_end'
[]
[sxz]
type = ElementAverageValue
variable = sxz
execute_on = 'initial timestep_end'
[]
[exx]
type = ElementAverageValue
variable = exx
execute_on = 'initial timestep_end'
[]
[eyy]
type = ElementAverageValue
variable = eyy
execute_on = 'initial timestep_end'
[]
[exy]
type = ElementAverageValue
variable = exy
execute_on = 'initial timestep_end'
[]
[ezz]
type = ElementAverageValue
variable = ezz
execute_on = 'initial timestep_end'
[]
[eyz]
type = ElementAverageValue
variable = eyz
execute_on = 'initial timestep_end'
[]
[exz]
type = ElementAverageValue
variable = exz
execute_on = 'initial timestep_end'
[]
[]
[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 = 10
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 0.2
[]
[Outputs]
exodus = false
csv = false
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_structure/test.i)
# Test that the initial conditions read from the exodus file are correct
[GlobalParams]
initial_from_file = 'steady_state_out.e'
[]
[SolidProperties]
[mat1]
type = ThermalFunctionSolidProperties
k = 16
cp = 356.
rho = 6.551400E+03
[]
[]
[Functions]
[Ts_bc]
type = ParsedFunction
expression = '2*sin(x*pi)+507'
[]
[]
[Components]
[hs]
type = HeatStructureCylindrical
position = '1 0 0'
orientation = '1 0 0'
length = 1
n_elems = 3
names = 'wall'
n_part_elems = 1
solid_properties = 'mat1'
solid_properties_T_ref = '300'
widths = 0.1
[]
[temp_outside]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:outer
T = Ts_bc
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 1
num_steps = 1
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
[]
[Outputs]
exodus = true
execute_on = 'initial'
velocity_as_vector = false
[]
(test/tests/vectorpostprocessors/cylindrical_average/cylindrical_average.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 10
nz = 1
xmin = -5
xmax = 5
ymin = -5
ymax = 5
zmin = 0
zmax = 1
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./c]
[../]
[]
[AuxVariables]
[./d]
[../]
[]
[AuxKernels]
[./d]
type = FunctionAux
variable = d
function = set_d
execute_on = initial
[../]
[]
[Functions]
[./set_d]
type = ParsedFunction
expression = 'r := sqrt(x * x + y * y); r'
[../]
[]
[VectorPostprocessors]
[./average]
type = CylindricalAverage
variable = d
radius = 5
bin_number = 10
origin = '0 0 0'
cylinder_axis = '0 0 1'
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
execute_on = 'initial timestep_end'
csv = true
[]
(modules/xfem/test/tests/nucleation_uo/nucleate_2edge_cracks_2d.i)
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[XFEM]
geometric_cut_userobjects = 'cut_mesh2'
qrule = volfrac
output_cut_plane = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 30
ny = 15
xmin = -2
xmax = -.2
ymin = 0.0
ymax = 1.0
elem_type = QUAD4
[]
[dispBlock_top]
type = BoundingBoxNodeSetGenerator
new_boundary = pull_top_y
bottom_left = '-2.1 0.99 0'
top_right = '-1.9 1.01 0'
input = gen
[]
[dispBlock_bot]
type = BoundingBoxNodeSetGenerator
new_boundary = pull_bot_y
bottom_left = '-2.1 -.01 0'
top_right = '-1.9 0.01 0'
input = dispBlock_top
[]
[]
[DomainIntegral]
integrals = 'Jintegral InteractionIntegralKI InteractionIntegralKII'
displacements = 'disp_x disp_y'
crack_front_points_provider = cut_mesh2
2d=true
number_points_from_provider = 1
crack_direction_method = CurvedCrackFront
radius_inner = '0.15'
radius_outer = '0.45'
poissons_ratio = 0.3
youngs_modulus = 207000
block = 0
incremental = true
used_by_xfem_to_grow_crack = true
[]
[UserObjects]
#fixme, nucleate has to be before cut_mesh2 in the input file or cut_mesh2 can't finde the nucleate_uo
[nucleate]
type = MeshCut2DRankTwoTensorNucleation
tensor = stress
scalar_type = MaxPrincipal
nucleation_threshold = nucleation_threshold
initiate_on_boundary = 'left bottom'
average = true
nucleation_length = .1
[]
[cut_mesh2]
type = MeshCut2DFractureUserObject
mesh_file = make_edge_crack_in.e
k_critical=80
growth_increment = 0.1
nucleate_uo = nucleate
[]
[]
[AuxVariables]
[nucleation_threshold]
order = CONSTANT
family = MONOMIAL
[]
[]
[ICs]
[nucleation]
type = FunctionIC
function = nucleation_x_y
variable = nucleation_threshold
[]
# [nucleation]
# type = VolumeWeightedWeibull
# variable = nucleation_threshold
# reference_volume = 0.01 #This is the volume of an element for a 100x100 mesh
# weibull_modulus = 2
# median = 5000.0
# []
[]
[Functions]
[nucleation_y]
type = ParsedFunction
expression = 'if(y>0.7,10000,if(y<0.5,10000,4000*(1-y)^2-10000))'
[]
[nucleation_x]
type = ParsedFunction
expression = 'if(x>-0.9,10000,if(x<-1.1,10000,1000*(x)^2-10000))'
[]
[nucleation_x_y]
type = LinearCombinationFunction
functions = 'nucleation_x nucleation_y'
w = '1 1'
[]
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
planar_formulation = plane_strain
add_variables = true
generate_output = 'stress_xx stress_yy vonmises_stress max_principal_stress'
[../]
[]
[Functions]
[bc_pull_top]
type = ParsedFunction
expression = 'if(t<6,0.0008*t,0.0008*5+0.0004*(t-6))'
[]
[bc_pull_bot]
type = ParsedFunction
expression = 0.0004*t
[]
[]
[BCs]
[top_left]
type = FunctionDirichletBC
boundary = pull_top_y
variable = disp_y
function = bc_pull_top
[]
[bot_left]
type = FunctionDirichletBC
boundary = pull_bot_y
variable = disp_y
function = bc_pull_bot
[]
[bottom_x]
type = DirichletBC
boundary = right
variable = disp_x
value = 0.0
[]
[bottom_y]
type = DirichletBC
boundary = right
variable = disp_y
value = 0.0
[]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
block = 0
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
line_search = 'none'
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
# controls for linear iterations
l_max_its = 100
l_tol = 1e-2
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
# time control
start_time = 0.0
dt = 1.0
end_time = 55
max_xfem_update = 2
[]
[Outputs]
# csv=true
exodus = true
execute_on = TIMESTEP_END
# [xfemcutter]
# type=XFEMCutMeshOutput
# xfem_cutter_uo=cut_mesh2
# []
# console = false
[./console]
type = Console
output_linear = false
output_nonlinear = false
[../]
[]
(modules/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
[]
(modules/solid_mechanics/test/tests/plane_stress/weak_plane_stress_finite.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
temperature = temp
out_of_plane_strain = strain_zz
[]
[Mesh]
[./square]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./strain_zz]
[../]
[]
[AuxVariables]
[./temp]
[../]
[./nl_strain_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Postprocessors]
[./react_z]
type = MaterialTensorIntegral
rank_two_tensor = stress
index_i = 2
index_j = 2
[../]
[./min_strain_zz]
type = NodalExtremeValue
variable = strain_zz
value_type = min
[../]
[./max_strain_zz]
type = NodalExtremeValue
variable = strain_zz
value_type = max
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[plane_stress]
planar_formulation = WEAK_PLANE_STRESS
strain = FINITE
generate_output = 'stress_xx stress_xy stress_yy stress_zz strain_xx strain_xy strain_yy'
eigenstrain_names = eigenstrain
[]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
use_displaced_mesh = false
[../]
[./strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = nl_strain_zz
index_i = 2
index_j = 2
[../]
[]
[Functions]
[./pull]
type = PiecewiseLinear
x='0 1 100'
y='0 0.00 0.00'
[../]
[./tempfunc]
type = ParsedFunction
expression = '(1 - x) * t'
[../]
[]
[BCs]
[./bottomx]
type = DirichletBC
boundary = 0
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = DirichletBC
boundary = 0
variable = disp_y
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
poissons_ratio = 0.3
youngs_modulus = 1e6
[../]
[./thermal_strain]
type = ComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
eigenstrain_name = eigenstrain
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
# controls for linear iterations
l_max_its = 100
l_tol = 1e-06
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
# time control
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 2.0
[]
[Outputs]
exodus = true
[]
(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/solid_mechanics/test/tests/radial_disp_aux/sphere_3d_cartesian.i)
# The purpose of this set of tests is to check the values computed
# by the RadialDisplacementAux AuxKernel. They should match the
# radial component of the displacment for a cylindrical or spherical
# model.
# This particular model is of a sphere subjected to uniform thermal
# expansion represented using a 3D Cartesian model.
[Mesh]
type = FileMesh
file = sphere_sector_3d.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
order = SECOND
family = LAGRANGE
[]
[AuxVariables]
[./temp]
[../]
[./rad_disp]
[../]
[]
[Functions]
[./temperature_load]
type = ParsedFunction
expression = t+300.0
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
eigenstrain_names = eigenstrain
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = temperature_load
use_displaced_mesh = false
[../]
[./raddispaux]
type = RadialDisplacementSphereAux
variable = rad_disp
origin = '0 0 0'
[../]
[]
[BCs]
[./x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./y]
type = DirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[./z]
type = DirichletBC
variable = disp_z
boundary = 3
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 300
thermal_expansion_coeff = 1.3e-5
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '51'
line_search = 'none'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
start_time = 0.0
end_time = 1
dt = 1
dtmin = 1
[]
[Outputs]
csv = true
exodus = true
[]
#[Postprocessors]
# [./strain_xx]
# type = SideAverageValue
# variable =
# block = 0
# [../]
#[]
(test/tests/time_integrators/scalar/stiff.i)
# This is a linear model problem described in Frank et al, "Order
# results for implicit Runge-Kutta methods applied to stiff systems",
# SIAM J. Numerical Analysis, vol. 22, no. 3, 1985, pp. 515-534.
#
# Problems "PL" and "PNL" from page 527 of the paper:
# { dy1/dt = lambda*y1 + y2**p, y1(0) = -1/(lambda+p)
# { dy2/dt = -y2, y2(0) = 1
#
# The exact solution is:
# y1 = -exp(-p*t)/(lambda+p)
# y2 = exp(-t)
#
# According to the following paragraph from the reference above, the
# p=1 version of this problem should not exhibit order reductions
# regardless of stiffness, while the nonlinear version (p>=2) will
# exhibit order reductions down to the "stage order" of the method for
# lambda large, negative.
# Use Dollar Bracket Expressions (DBEs) to set the value of LAMBDA in
# a single place. You can also set this on the command line with
# e.g. LAMBDA=-4, but note that this does not seem to override the
# value set in the input file. This is a bit different from the way
# that command line values normally work...
# Note that LAMBDA == Y2_EXPONENT is not allowed!
# LAMBDA = -10
# Y2_EXPONENT = 2
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 1
ny = 1
elem_type = QUAD4
[]
[Variables]
[./y1]
family = SCALAR
order = FIRST
[../]
[./y2]
family = SCALAR
order = FIRST
[../]
[]
[ICs]
[./y1_init]
type = FunctionScalarIC
variable = y1
function = y1_exact
[../]
[./y2_init]
type = FunctionScalarIC
variable = y2
function = y2_exact
[../]
[]
[ScalarKernels]
[./y1_time]
type = ODETimeDerivative
variable = y1
[../]
[./y1_space]
type = ParsedODEKernel
variable = y1
expression = '-(${LAMBDA})*y1 - y2^${Y2_EXPONENT}'
coupled_variables = 'y2'
[../]
[./y2_time]
type = ODETimeDerivative
variable = y2
[../]
[./y2_space]
type = ParsedODEKernel
variable = y2
expression = 'y2'
[../]
[]
[Executioner]
type = Transient
[./TimeIntegrator]
type = LStableDirk2
[../]
start_time = 0
end_time = 1
dt = 0.125
solve_type = 'PJFNK'
nl_max_its = 6
nl_abs_tol = 1.e-13
nl_rel_tol = 1.e-32 # Force nl_abs_tol to be used.
line_search = 'none'
[]
[Functions]
[./y1_exact]
type = ParsedFunction
expression = '-exp(-${Y2_EXPONENT}*t)/(lambda+${Y2_EXPONENT})'
symbol_names = 'lambda'
symbol_values = ${LAMBDA}
[../]
[./y2_exact]
type = ParsedFunction
expression = exp(-t)
[../]
[]
[Postprocessors]
[./error_y1]
type = ScalarL2Error
variable = y1
function = y1_exact
execute_on = 'initial timestep_end'
[../]
[./error_y2]
type = ScalarL2Error
variable = y2
function = y2_exact
execute_on = 'initial timestep_end'
[../]
[./max_error_y1]
# Estimate ||e_1||_{\infty}
type = TimeExtremeValue
value_type = max
postprocessor = error_y1
execute_on = 'initial timestep_end'
[../]
[./max_error_y2]
# Estimate ||e_2||_{\infty}
type = TimeExtremeValue
value_type = max
postprocessor = error_y2
execute_on = 'initial timestep_end'
[../]
[./value_y1]
type = ScalarVariable
variable = y1
execute_on = 'initial timestep_end'
[../]
[./value_y2]
type = ScalarVariable
variable = y2
execute_on = 'initial timestep_end'
[../]
[./value_y1_abs_max]
type = TimeExtremeValue
value_type = abs_max
postprocessor = value_y1
execute_on = 'initial timestep_end'
[../]
[./value_y2_abs_max]
type = TimeExtremeValue
value_type = abs_max
postprocessor = value_y2
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/action/no_action_1D.i)
# Simple 1D plane strain test
[GlobalParams]
displacements = 'disp_x'
large_kinematics = true
[]
[Variables]
[disp_x]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 1
nx = 10
[]
[]
[Kernels]
[sdx]
type = UpdatedLagrangianStressDivergence
variable = disp_x
component = 0
use_displaced_mesh = true
[]
[]
[Functions]
[pull]
type = ParsedFunction
expression = '0.06 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = right
variable = disp_x
value = 0.0
[]
[pull]
type = FunctionDirichletBC
boundary = left
variable = disp_x
function = pull
preset = true
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[stress_base]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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 = 5.0
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/user_object_based/user_object_Voce_BCC.i)
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
displacements = 'disp_x disp_y'
nx = 2
ny = 2
[]
[GlobalParams]
volumetric_locking_correction = true
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y'
use_displaced_mesh = true
[../]
[]
[AuxVariables]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./e_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./fp_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./gss]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./tdisp]
type = ParsedFunction
expression = 0.01*t
[../]
[]
[UserObjects]
[./prop_read]
type = PropertyReadFile
prop_file_name = 'euler_ang_file.txt'
# Enter file data as prop#1, prop#2, .., prop#nprop
nprop = 3
read_type = element
[../]
[]
[AuxKernels]
[./stress_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = stress
index_j = 1
index_i = 1
execute_on = timestep_end
[../]
[./e_yy]
type = RankTwoAux
variable = e_yy
rank_two_tensor = lage
index_j = 1
index_i = 1
execute_on = timestep_end
[../]
[./fp_yy]
type = RankTwoAux
variable = fp_yy
rank_two_tensor = fp
index_j = 1
index_i = 1
execute_on = timestep_end
[../]
[./gss]
type = MaterialStdVectorAux
variable = gss
property = state_var_gss
index = 0
execute_on = timestep_end
[../]
[]
[BCs]
[./fix_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0
[../]
[./fix_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./tdisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = tdisp
[../]
[]
[UserObjects]
[./slip_rate_gss]
type = CrystalPlasticitySlipRateGSS
variable_size = 48
slip_sys_file_name = input_slip_sys_bcc48.txt
num_slip_sys_flowrate_props = 2
flowprops = '1 12 0.001 0.1 13 24 0.001 0.1 25 48 0.001 0.1'
uo_state_var_name = state_var_gss
[../]
[./slip_resistance_gss]
type = CrystalPlasticitySlipResistanceGSS
variable_size = 48
uo_state_var_name = state_var_gss
[../]
[./state_var_gss]
type = CrystalPlasticityStateVariable
variable_size = 48
groups = '0 12 24 48'
group_values = '50 51 52'
uo_state_var_evol_rate_comp_name = state_var_evol_rate_comp_voce
scale_factor = 1.0
[../]
[./state_var_evol_rate_comp_voce]
type = CrystalPlasticityStateVarRateComponentVoce
variable_size = 48
crystal_lattice_type = 'BCC'
groups = '0 12 24 48'
h0_group_values = '1 2 3'
tau0_group_values = '50 51 52'
tauSat_group_values = '70 81 92'
hardeningExponent_group_values = '1 2 3'
selfHardening_group_values ='4 5 6'
coplanarHardening_group_values='7 8 9'
GroupGroup_Hardening_group_values = '10 20 30
40 50 60
70 80 90'
uo_slip_rate_name = slip_rate_gss
uo_state_var_name = state_var_gss
[../]
[]
[Materials]
[./crysp]
type = FiniteStrainUObasedCP
stol = 1e-2
tan_mod_type = exact
uo_slip_rates = 'slip_rate_gss'
uo_slip_resistances = 'slip_resistance_gss'
uo_state_vars = 'state_var_gss'
uo_state_var_evol_rate_comps = 'state_var_evol_rate_comp_voce'
[../]
[./strain]
type = ComputeFiniteStrain
displacements = 'disp_x disp_y'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensorCP
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
read_prop_user_object = prop_read
[../]
[]
[Postprocessors]
[./stress_yy]
type = ElementAverageValue
variable = stress_yy
[../]
[./e_yy]
type = ElementAverageValue
variable = e_yy
[../]
[./fp_yy]
type = ElementAverageValue
variable = fp_yy
[../]
[./gss]
type = ElementAverageValue
variable = gss
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
dt = 0.01
solve_type = 'PJFNK'
petsc_options_iname = -pc_hypre_type
petsc_options_value = boomerang
nl_abs_tol = 1e-10
nl_rel_step_tol = 1e-10
dtmax = 10.0
nl_rel_tol = 1e-10
end_time = 1
dtmin = 0.01
num_steps = 10
nl_abs_step_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(test/tests/vectorpostprocessors/element_variables_difference_max/element_variables_difference_max.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 10
nz = 10
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./forcing_v]
type = ParsedFunction
expression = 'x * y * z'
[../]
[]
[Kernels]
[./diffusion_u]
type = Diffusion
variable = u
[../]
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diffusion_v]
type = Diffusion
variable = v
[../]
[./forcing_v]
type = BodyForce
variable = v
function = forcing_v
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = 'u'
boundary = 'bottom'
value = 1
[../]
[./top]
type = DirichletBC
variable = 'u'
boundary = 'top'
value = 0
[../]
[]
[VectorPostprocessors]
[./difference]
type = ElementVariablesDifferenceMax
compare_a = u
compare_b = v
[../]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 1
solve_type = PJFNK
[]
[Outputs]
execute_on = 'initial timestep_end'
csv = true
[]
(test/tests/bcs/periodic/orthogonal_pbc_on_square.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
nz = 0
xmax = 10
ymax = 10
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Functions]
[./tr_x]
type = ParsedFunction
expression = 0
[../]
[./tr_y]
type = ParsedFunction
expression = x
[../]
[./itr_x]
type = ParsedFunction
expression = y
[../]
[./itr_y]
type = ParsedFunction
expression = 0
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./forcing]
type = GaussContForcing
variable = u
y_center = 1
x_spread = 0.25
y_spread = 0.5
[../]
[./dot]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
# active = ' '
[./Periodic]
[./x]
primary = bottom
secondary = left
transform_func = 'tr_x tr_y'
inv_transform_func = 'itr_x itr_y'
[../]
[../]
[]
[Executioner]
type = Transient
dt = 0.5
num_steps = 10
solve_type = NEWTON
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/materials/boundary_material/fv_material_quadrature.i)
# Parsed material properties depend on the physical location of the element
# This requires the initialization of the quadrature in the FVFlux loop
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 4
ny = 4
elem_type = QUAD9
[]
[Functions]
[linear_x]
type = ParsedFunction
expression = 'x'
[]
[piecewise_linear_x]
type = PiecewiseLinear
x = '-1 2'
y = '-1 2'
axis = 'x'
[]
[]
[Variables]
[u]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[]
[FVKernels]
[diff]
type = FVDiffusion
variable = u
coeff = k1
coeff_interp_method = average
[]
[r]
type = FVReaction
variable = u
[]
[]
[FVBCs]
[all]
type = FVDirichletBC
variable = u
boundary = 'left right bottom top'
value = 1
[]
[]
[Materials]
active = 'k1'
[k1]
type = ADGenericFunctorMaterial
prop_names = 'k1'
prop_values = linear_x
block = 0
[]
[k1_piecewise]
type = ADGenericFunctorMaterial
prop_names = 'k1'
prop_values = piecewise_linear_x
block = 0
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/mms/pspg/pspg_mms_test.i)
mu=1.5
rho=2.5
[GlobalParams]
gravity = '0 0 0'
pspg = true
convective_term = true
integrate_p_by_parts = true
laplace = true
u = vel_x
v = vel_y
pressure = p
alpha = 1e-6
order = FIRST
family = LAGRANGE
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
elem_type = QUAD9
nx = 4
ny = 4
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./vel_x]
[../]
[./vel_y]
[../]
[./p]
[../]
[]
[Kernels]
# mass
[./mass]
type = INSMass
variable = p
x_vel_forcing_func = vel_x_source_func
y_vel_forcing_func = vel_y_source_func
[../]
# x-momentum, space
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
component = 0
forcing_func = vel_x_source_func
[../]
# y-momentum, space
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
component = 1
forcing_func = vel_y_source_func
[../]
[./p_source]
type = BodyForce
function = p_source_func
variable = p
[../]
[]
[BCs]
[./vel_x]
type = FunctionDirichletBC
boundary = 'left right top bottom'
function = vel_x_func
variable = vel_x
[../]
[./vel_y]
type = FunctionDirichletBC
boundary = 'left right top bottom'
function = vel_y_func
variable = vel_y
[../]
[./p]
type = FunctionDirichletBC
boundary = 'left right top bottom'
function = p_func
variable = p
[../]
[]
[Functions]
[./vel_x_source_func]
type = ParsedFunction
expression = '-${mu}*(-0.028*pi^2*x^2*sin(0.2*pi*x*y) - 0.028*pi^2*y^2*sin(0.2*pi*x*y) - 0.1*pi^2*sin(0.5*pi*x) - 0.4*pi^2*sin(pi*y)) + ${rho}*(0.14*pi*x*cos(0.2*pi*x*y) + 0.4*pi*cos(pi*y))*(0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3) + ${rho}*(0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x))*(0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5) + 0.1*pi*y*cos(0.2*pi*x*y) + 0.25*pi*cos(0.5*pi*x)'
[../]
[./vel_y_source_func]
type = ParsedFunction
expression = '-${mu}*(-0.018*pi^2*x^2*sin(0.3*pi*x*y) - 0.018*pi^2*y^2*sin(0.3*pi*x*y) - 0.384*pi^2*sin(0.8*pi*x) - 0.027*pi^2*sin(0.3*pi*y)) + ${rho}*(0.06*pi*x*cos(0.3*pi*x*y) + 0.09*pi*cos(0.3*pi*y))*(0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3) + ${rho}*(0.06*pi*y*cos(0.3*pi*x*y) + 0.48*pi*cos(0.8*pi*x))*(0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5) + 0.1*pi*x*cos(0.2*pi*x*y) + 0.3*pi*cos(0.3*pi*y)'
[../]
[./p_source_func]
type = ParsedFunction
expression = '-0.06*pi*x*cos(0.3*pi*x*y) - 0.14*pi*y*cos(0.2*pi*x*y) - 0.2*pi*cos(0.5*pi*x) - 0.09*pi*cos(0.3*pi*y)'
[../]
[./vel_x_func]
type = ParsedFunction
expression = '0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5'
[../]
[./vel_y_func]
type = ParsedFunction
expression = '0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3'
[../]
[./p_func]
type = ParsedFunction
expression = '0.5*sin(0.5*pi*x) + 1.0*sin(0.3*pi*y) + 0.5*sin(0.2*pi*x*y) + 0.5'
[../]
[./vxx_func]
type = ParsedFunction
expression = '0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x)'
[../]
[./px_func]
type = ParsedFunction
expression = '0.1*pi*y*cos(0.2*pi*x*y) + 0.25*pi*cos(0.5*pi*x)'
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
[./exodus]
type = Exodus
[../]
[./csv]
type = CSV
[../]
[]
[Postprocessors]
[./L2vel_x]
type = ElementL2Error
variable = vel_x
function = vel_x_func
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2vel_y]
variable = vel_y
function = vel_y_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2p]
variable = p
function = p_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2vxx]
variable = vxx
function = vxx_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2px]
variable = px
function = px_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[]
[AuxVariables]
[./vxx]
family = MONOMIAL
order = FIRST
[../]
[./px]
family = MONOMIAL
order = FIRST
[../]
[]
[AuxKernels]
[./vxx]
type = VariableGradientComponent
component = x
variable = vxx
gradient_variable = vel_x
[../]
[./px]
type = VariableGradientComponent
component = x
variable = px
gradient_variable = p
[../]
[]
(modules/thermal_hydraulics/test/tests/jacobians/materials/ad_solid_material.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
allow_renumbering = false
[]
[Variables]
[T]
[]
[]
[Functions]
[k_fn]
type = ParsedFunction
expression = 't*t + 2*t'
[]
[cp_fn]
type = ParsedFunction
expression = 't*t*t + 3*t'
[]
[rho_fn]
type = ParsedFunction
expression = 't*t*t*t + 4*t'
[]
[]
[HeatStructureMaterials]
[prop_uo]
type = SolidMaterialProperties
k = k_fn
cp = cp_fn
rho = rho_fn
[]
[]
[Components]
[]
[Materials]
[solid_mat]
type = ADSolidMaterial
T = T
properties = prop_uo
[]
[]
[Kernels]
[td]
type = ADHeatConductionTimeDerivative
variable = T
specific_heat = specific_heat
density_name = density
[]
[diff]
type = ADHeatConduction
variable = T
thermal_conductivity = thermal_conductivity
[]
[forcing_fn]
type = BodyForce
variable = T
value = -4
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
variable = T
value = 0
[]
[right]
type = DirichletBC
boundary = right
variable = T
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
[]
(test/tests/controls/time_periods/aux_scalar_kernels/control.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./aux0]
family = SCALAR
[../]
[./aux1]
family = SCALAR
[../]
[]
[Functions]
[./func]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[AuxScalarKernels]
[./scalar_aux0]
type = FunctionScalarAux
variable = aux0
function = func
[../]
[./scalar_aux1]
type = FunctionScalarAux
variable = aux1
function = func
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
[]
[Controls]
[./damping_control]
type = TimePeriod
disable_objects = '*/scalar_aux0 */scalar_aux1'
start_time = 0.25
end_time = 0.75
execute_on = 'initial timestep_begin'
[../]
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/convergence-auto/1D/neumann.i)
# Simple 1D plane strain test
[GlobalParams]
displacements = 'disp_x'
large_kinematics = true
stabilize_strain = true
[]
[Variables]
[disp_x]
[]
[]
[ICs]
[disp_x]
type = RandomIC
variable = disp_x
min = -0.1
max = 0.1
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 1
nx = 10
[]
[]
[Kernels]
[sdx]
type = UpdatedLagrangianStressDivergence
variable = disp_x
component = 0
use_displaced_mesh = true
[]
[]
[Functions]
[pull]
type = ParsedFunction
expression = '200 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = right
variable = disp_x
value = 0.0
[]
[pull]
type = FunctionNeumannBC
boundary = left
variable = disp_x
function = pull
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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 = 5.0
dtmin = 5.0
end_time = 5.0
[]
(test/tests/mortar/continuity-2d-conforming/conforming_two_var.i)
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-conf.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Functions]
[./exact_sln]
type = ParsedFunction
expression= y
[../]
[./ffn]
type = ParsedFunction
expression= 0
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./lm_u]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[../]
[./v]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./lm_v]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = ffn
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[./coupled_u]
type = CoupledForce
variable = v
v = u
[../]
[]
[Problem]
extra_tag_vectors = 'ref'
[]
[Constraints]
[./ced_u]
type = EqualValueConstraint
variable = lm_u
secondary_variable = u
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
absolute_value_vector_tags = 'ref'
[../]
[./ced_v]
type = EqualValueConstraint
variable = lm_v
secondary_variable = v
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
absolute_value_vector_tags = 'ref'
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '1 2 3 4'
function = exact_sln
[../]
[./allv]
type = DirichletBC
variable = v
boundary = '1 2 3 4'
value = 0
[../]
[]
[Postprocessors]
[./l2_error]
type = ElementL2Error
variable = u
function = exact_sln
block = '1 2'
execute_on = 'initial timestep_end'
[../]
[./l2_v]
type = ElementL2Norm
variable = v
block = '1 2'
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
[./fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
l_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/kernels/ad_jacobians/adfunction.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
displacements = 'disp_x disp_y'
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[c]
[]
[disp_x]
[]
[disp_y]
[]
[]
[Kernels]
[source]
type = ADBodyForce
variable = c
function = source_func
use_displaced_mesh = true
displacements = ''
#displacements = 'disp_x disp_y'
[]
[dt]
type = ADTimeDerivative
variable = c
[]
[]
[Functions]
[source_func]
type = ParsedFunction
expression = 'x + y^2'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
num_steps = 1
[]
(test/tests/time_integrators/multi_stage_time_integrator/unconverged_1st_stage.i)
# This test is designed to check that a time step solve should stop if *any*
# time integrator solve stage fails, not just the *last* stage. If a time
# integrator does not check convergence per stage, then a time step proceeds
# past intermediate stages without checking nonlinear convergence. This test
# is designed to check that the 2nd stage is never even entered by making it
# impossible for the first stage to converge.
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -1
xmax = 1
nx = 5
[]
[Functions]
[./ic]
type = ParsedFunction
expression = 0
[../]
[./forcing_fn]
type = ParsedFunction
expression = x
[../]
[./exact_fn]
type = ParsedFunction
expression = t*x
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./time]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./body]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[ICs]
[./u_ic]
type = FunctionIC
variable = u
function = ic
[../]
[]
[BCs]
[./bcs]
type = FunctionDirichletBC
variable = u
boundary = '0 1'
function = exact_fn
[../]
[]
[Executioner]
type = Transient
[./TimeIntegrator]
type = LStableDirk2
[../]
num_steps = 1
abort_on_solve_fail = true
solve_type = NEWTON
nl_max_its = 0
[]
(modules/solid_mechanics/test/tests/lagrangian/materials/correctness/stvenantkirchhoff.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
[]
[]
[Functions]
[strain]
type = ParsedFunction
expression = 't'
[]
[]
[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_x]
type = FunctionDirichletBC
boundary = right
variable = disp_x
function = strain
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
shear_modulus = 67000.0
lambda = 40000.0
[]
[compute_stress]
type = ComputeStVenantKirchhoffStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[AuxVariables]
[s11]
family = MONOMIAL
order = CONSTANT
[]
[s21]
family = MONOMIAL
order = CONSTANT
[]
[s31]
family = MONOMIAL
order = CONSTANT
[]
[s12]
family = MONOMIAL
order = CONSTANT
[]
[s22]
family = MONOMIAL
order = CONSTANT
[]
[s32]
family = MONOMIAL
order = CONSTANT
[]
[s13]
family = MONOMIAL
order = CONSTANT
[]
[s23]
family = MONOMIAL
order = CONSTANT
[]
[s33]
family = MONOMIAL
order = CONSTANT
[]
[F11]
family = MONOMIAL
order = CONSTANT
[]
[F21]
family = MONOMIAL
order = CONSTANT
[]
[F31]
family = MONOMIAL
order = CONSTANT
[]
[F12]
family = MONOMIAL
order = CONSTANT
[]
[F22]
family = MONOMIAL
order = CONSTANT
[]
[F32]
family = MONOMIAL
order = CONSTANT
[]
[F13]
family = MONOMIAL
order = CONSTANT
[]
[F23]
family = MONOMIAL
order = CONSTANT
[]
[F33]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[s11]
type = RankTwoAux
variable = s11
rank_two_tensor = pk1_stress
index_i = 0
index_j = 0
[]
[s21]
type = RankTwoAux
variable = s21
rank_two_tensor = pk1_stress
index_i = 1
index_j = 0
[]
[s31]
type = RankTwoAux
variable = s31
rank_two_tensor = pk1_stress
index_i = 2
index_j = 0
[]
[s12]
type = RankTwoAux
variable = s12
rank_two_tensor = pk1_stress
index_i = 0
index_j = 1
[]
[s22]
type = RankTwoAux
variable = s22
rank_two_tensor = pk1_stress
index_i = 1
index_j = 1
[]
[s32]
type = RankTwoAux
variable = s32
rank_two_tensor = pk1_stress
index_i = 2
index_j = 1
[]
[s13]
type = RankTwoAux
variable = s13
rank_two_tensor = pk1_stress
index_i = 0
index_j = 2
[]
[s23]
type = RankTwoAux
variable = s23
rank_two_tensor = pk1_stress
index_i = 1
index_j = 2
[]
[s33]
type = RankTwoAux
variable = s33
rank_two_tensor = pk1_stress
index_i = 2
index_j = 2
[]
[F11]
type = RankTwoAux
variable = F11
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 0
[]
[F21]
type = RankTwoAux
variable = F21
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 0
[]
[F31]
type = RankTwoAux
variable = F31
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 0
[]
[F12]
type = RankTwoAux
variable = F12
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 1
[]
[F22]
type = RankTwoAux
variable = F22
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 1
[]
[F32]
type = RankTwoAux
variable = F32
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 1
[]
[F13]
type = RankTwoAux
variable = F13
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 2
[]
[F23]
type = RankTwoAux
variable = F23
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 2
[]
[F33]
type = RankTwoAux
variable = F33
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 2
[]
[]
[Postprocessors]
[s11]
type = ElementAverageValue
variable = s11
execute_on = 'initial timestep_end'
[]
[s21]
type = ElementAverageValue
variable = s21
execute_on = 'initial timestep_end'
[]
[s31]
type = ElementAverageValue
variable = s31
execute_on = 'initial timestep_end'
[]
[s12]
type = ElementAverageValue
variable = s12
execute_on = 'initial timestep_end'
[]
[s22]
type = ElementAverageValue
variable = s22
execute_on = 'initial timestep_end'
[]
[s32]
type = ElementAverageValue
variable = s32
execute_on = 'initial timestep_end'
[]
[s13]
type = ElementAverageValue
variable = s13
execute_on = 'initial timestep_end'
[]
[s23]
type = ElementAverageValue
variable = s23
execute_on = 'initial timestep_end'
[]
[s33]
type = ElementAverageValue
variable = s33
execute_on = 'initial timestep_end'
[]
[F11]
type = ElementAverageValue
variable = F11
execute_on = 'initial timestep_end'
[]
[F21]
type = ElementAverageValue
variable = F21
execute_on = 'initial timestep_end'
[]
[F31]
type = ElementAverageValue
variable = F31
execute_on = 'initial timestep_end'
[]
[F12]
type = ElementAverageValue
variable = F12
execute_on = 'initial timestep_end'
[]
[F22]
type = ElementAverageValue
variable = F22
execute_on = 'initial timestep_end'
[]
[F32]
type = ElementAverageValue
variable = F32
execute_on = 'initial timestep_end'
[]
[F13]
type = ElementAverageValue
variable = F13
execute_on = 'initial timestep_end'
[]
[F23]
type = ElementAverageValue
variable = F23
execute_on = 'initial timestep_end'
[]
[F33]
type = ElementAverageValue
variable = F33
execute_on = 'initial timestep_end'
[]
[]
[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 = 5
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.01
dtmin = 0.01
end_time = 0.01
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/fvkernels/mms/broken-domain/diffusion.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 2
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface_primary_side]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary_interface'
[]
[interface_secondary_side]
input = interface_primary_side
type = SideSetsBetweenSubdomainsGenerator
primary_block = '1'
paired_block = '0'
new_boundary = 'secondary_interface'
[]
[]
[Variables]
[u]
type = MooseVariableFVReal
block = 0
initial_condition = 0.5
[]
[v]
type = MooseVariableFVReal
block = 1
initial_condition = 0.5
[]
[]
[FVKernels]
[diff_left]
type = FVDiffusion
variable = u
coeff = 'left'
block = 0
[]
[diff_right]
type = FVDiffusion
variable = v
coeff = 'right'
block = 1
[]
[body_left]
type = FVBodyForce
variable = u
function = 'forcing'
block = 0
[]
[body_right]
type = FVBodyForce
variable = v
function = 'forcing'
block = 1
[]
[]
[FVInterfaceKernels]
# This will add a flux term for variable1, e.g. u
[interface]
type = FVOnlyAddDiffusionToOneSideOfInterface
variable1 = u
variable2 = v
boundary = 'primary_interface'
subdomain1 = '0'
subdomain2 = '1'
coeff2 = 'right'
[]
[]
[FVBCs]
[left]
type = FVFunctionDirichletBC
variable = u
boundary = 'left'
function = 'exact'
[]
[right]
type = FVFunctionDirichletBC
variable = v
boundary = 'right'
function = 'exact'
[]
[middle]
# by adding a dirichlet BC we ensure that flux kernels will run for variable v
type = FVADUseFunctorSideForSsfDirichletBC
variable = v
functor = u
boundary = 'secondary_interface'
[]
[]
[Materials]
[block0]
type = ADGenericFunctorMaterial
block = '0'
prop_names = 'left'
prop_values = '1'
[]
[block1]
type = ADGenericFunctorMaterial
block = '1'
prop_names = 'right'
prop_values = '1'
[]
[composite]
type = ADPiecewiseByBlockFunctorMaterial
prop_name = 'composite'
subdomain_to_prop_value = '0 u 1 v'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm lu NONZERO'
[]
[Outputs]
exodus = true
csv = true
[]
[Functions]
[exact]
type = ParsedFunction
value = '3*x^2 + 2*x + 1'
[]
[forcing]
type = ParsedFunction
value = '-6'
[]
[]
[Postprocessors]
[error]
type = ElementL2FunctorError
approximate = composite
exact = exact
outputs = 'console csv'
[]
[h]
type = AverageElementSize
outputs = 'console csv'
[]
[]
(modules/solid_mechanics/test/tests/elem_prop_read_user_object/prop_grain_read.i)
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
displacements = 'disp_x disp_y'
nx = 10
ny = 10
[]
[Variables]
[./disp_x]
block = 0
[../]
[./disp_y]
block = 0
[../]
[]
[GlobalParams]
volumetric_locking_correction=true
[]
[AuxVariables]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./e_yy]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[]
[Functions]
[./tdisp]
type = ParsedFunction
expression = 0.05*t
[../]
[]
[UserObjects]
[./prop_read]
type = PropertyReadFile
prop_file_name = 'input_file.txt'
# Enter file data as prop#1, prop#2, .., prop#nprop
nprop = 4
read_type = voronoi
nvoronoi = 3
use_random_voronoi = true
rand_seed = 25346
rve_type = periodic
[../]
[]
[AuxKernels]
[./stress_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = stress
index_j = 1
index_i = 1
execute_on = timestep_end
block = 0
[../]
[./e_yy]
type = RankTwoAux
variable = e_yy
rank_two_tensor = elastic_strain
index_j = 1
index_i = 1
execute_on = timestep_end
block = 0
[../]
[]
[BCs]
[./fix_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0
[../]
[./fix_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./tdisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = tdisp
[../]
[]
[Materials]
[./elasticity_tensor_with_Euler]
type = ComputeElasticityTensorCP
block = 0
C_ijkl = '1.684e5 0.176e5 0.176e5 1.684e5 0.176e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
read_prop_user_object = prop_read
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'disp_x disp_y'
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[]
[Postprocessors]
[./stress_yy]
type = ElementAverageValue
variable = stress_yy
block = 'ANY_BLOCK_ID 0'
[../]
[./e_yy]
type = ElementAverageValue
variable = e_yy
block = 'ANY_BLOCK_ID 0'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
dt = 0.05
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = -pc_hypre_type
petsc_options_value = boomerang
nl_abs_tol = 1e-10
nl_rel_step_tol = 1e-10
dtmax = 10.0
nl_rel_tol = 1e-10
end_time = 1
dtmin = 0.05
num_steps = 1
nl_abs_step_tol = 1e-10
[]
[Outputs]
file_base = prop_grain_read_out
exodus = true
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y'
use_displaced_mesh = true
[../]
[]
(test/tests/userobjects/nearest_point_layered_average/nearest_radius_layered_average.i)
# This input tests the NearestRadiusLayeredAverage object by taking the average
# of layered rings and using the variable u(x,y,x) = r + z, where r sqrt(x^2 + y^2)
# Given a ring of inner and outer radii r1 and r2, respectively, and of height z1 and z2,
# the analytical solution is given by:
# avg(r1,r2,z1,z2) = 2/3 * (r1^2 + r1*r2 + r2^2) / (r1 + r2) + (z1 + z2) / 2
# Convergence to these values as num_sectors is increased is verified.
[Mesh]
[./ccmg]
type = ConcentricCircleMeshGenerator
num_sectors = 8
radii = '0.1 0.2 0.3 0.4 0.5'
rings = '2 2 2 2 2'
has_outer_square = false
preserve_volumes = true
smoothing_max_it = 3
[]
[./extruder]
type = MeshExtruderGenerator
input = ccmg
extrusion_vector = '0 0 1'
num_layers = 4
[]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ring_average]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./reac]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = func
[../]
[]
[Functions]
[func]
type = ParsedFunction
expression = 'sqrt(x * x + y * y) + z'
[]
[]
[AuxKernels]
[./np_layered_average]
type = SpatialUserObjectAux
variable = ring_average
execute_on = timestep_end
user_object = nrla
[../]
[]
[UserObjects]
[./nrla]
type = NearestRadiusLayeredAverage
direction = z
num_layers = 2
points = '0.05 0 0
0.15 0 0
0.25 0 0
0.35 0 0
0.45 0 0'
variable = u
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/user_object_based/substep.i)
[Mesh]
type = GeneratedMesh
dim = 3
elem_type = HEX8
displacements = 'ux uy uz'
[]
[Variables]
[./ux]
block = 0
[../]
[./uy]
block = 0
[../]
[./uz]
block = 0
[../]
[]
[AuxVariables]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./fp_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./e_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./gss]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./tdisp]
type = ParsedFunction
expression = 0.01*t
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'ux uy uz'
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_zz]
type = RankTwoAux
variable = stress_zz
rank_two_tensor = stress
index_j = 2
index_i = 2
execute_on = timestep_end
[../]
[./fp_zz]
type = RankTwoAux
variable = fp_zz
rank_two_tensor = fp
index_j = 2
index_i = 2
execute_on = timestep_end
[../]
[./e_zz]
type = RankTwoAux
variable = e_zz
rank_two_tensor = lage
index_j = 2
index_i = 2
execute_on = timestep_end
[../]
[./gss]
type = MaterialStdVectorAux
variable = gss
property = state_var_gss
index = 0
execute_on = timestep_end
[../]
[]
[BCs]
[./symmy]
type = DirichletBC
variable = uy
boundary = bottom
value = 0
[../]
[./symmx]
type = DirichletBC
variable = ux
boundary = left
value = 0
[../]
[./symmz]
type = DirichletBC
variable = uz
boundary = back
value = 0
[../]
[./tdisp]
type = FunctionDirichletBC
variable = uz
boundary = front
function = tdisp
[../]
[]
[UserObjects]
[./slip_rate_gss]
type = CrystalPlasticitySlipRateGSS
variable_size = 12
slip_sys_file_name = input_slip_sys.txt
num_slip_sys_flowrate_props = 2
flowprops = '1 4 0.001 0.1 5 8 0.001 0.1 9 12 0.001 0.1'
uo_state_var_name = state_var_gss
[../]
[./slip_resistance_gss]
type = CrystalPlasticitySlipResistanceGSS
variable_size = 12
uo_state_var_name = state_var_gss
[../]
[./state_var_gss]
type = CrystalPlasticityStateVariable
variable_size = 12
groups = '0 4 8 12'
group_values = '60.8 60.8 60.8'
uo_state_var_evol_rate_comp_name = state_var_evol_rate_comp_gss
scale_factor = 1.0
[../]
[./state_var_evol_rate_comp_gss]
type = CrystalPlasticityStateVarRateComponentGSS
variable_size = 12
hprops = '1.0 541.5 109.8 2.5'
uo_slip_rate_name = slip_rate_gss
uo_state_var_name = state_var_gss
[../]
[]
[Materials]
[./crysp]
type = FiniteStrainUObasedCP
block = 0
stol = 1e-2
tan_mod_type = exact
maximum_substep_iteration = 10
uo_slip_rates = 'slip_rate_gss'
uo_slip_resistances = 'slip_resistance_gss'
uo_state_vars = 'state_var_gss'
uo_state_var_evol_rate_comps = 'state_var_evol_rate_comp_gss'
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'ux uy uz'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensorCP
block = 0
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
[../]
[]
[Postprocessors]
[./stress_zz]
type = ElementAverageValue
variable = stress_zz
block = 'ANY_BLOCK_ID 0'
[../]
[./fp_zz]
type = ElementAverageValue
variable = fp_zz
block = 'ANY_BLOCK_ID 0'
[../]
[./e_zz]
type = ElementAverageValue
variable = e_zz
block = 'ANY_BLOCK_ID 0'
[../]
[./gss]
type = ElementAverageValue
variable = gss
block = 'ANY_BLOCK_ID 0'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
dt = 2.0
solve_type = 'PJFNK'
petsc_options_iname = -pc_hypre_type
petsc_options_value = boomerang
nl_abs_tol = 1e-10
nl_rel_step_tol = 1e-10
dtmax = 10.0
nl_rel_tol = 1e-10
end_time = 30.0
dtmin = 0.5
num_steps = 10
nl_abs_step_tol = 1e-10
[]
[Outputs]
exodus = true
csv = true
gnuplot = true
[]
(test/tests/time_integrators/explicit-euler/ee-1d-quadratic.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -1
xmax = 1
nx = 20
elem_type = EDGE3
[]
[Functions]
[./ic]
type = ParsedFunction
expression = 0
[../]
[./forcing_fn]
type = ParsedFunction
expression = x*x-2*t
[../]
[./exact_fn]
type = ParsedFunction
expression = t*x*x
[../]
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic
[../]
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
# lumping = true
implicit = true
[../]
[./diff]
type = Diffusion
variable = u
implicit = false
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
implicit = false
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1'
function = exact_fn
implicit = true
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'explicit-euler'
solve_type = 'LINEAR'
l_tol = 1e-12
start_time = 0.0
num_steps = 20
dt = 0.00005
[]
[Outputs]
exodus = true
[./console]
type = Console
max_rows = 10
[../]
[]
(test/tests/outputs/nemesis/nemesis_scalar.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 1
nx = 4
[]
[Variables]
[./f]
family = SCALAR
order = FIRST
initial_condition = 1
[../]
[./f_times_mult]
family = SCALAR
order = FIRST
initial_condition = 1
[../]
[]
[ScalarKernels]
[./dT]
type = CoupledODETimeDerivative
variable = f
v = f_times_mult
[../]
[./src]
type = ParsedODEKernel
variable = f
expression = '-1'
[../]
[./f_times_mult_1]
type = ParsedODEKernel
variable = f_times_mult
expression = 'f_times_mult'
[../]
[./f_times_mult_2]
type = ParsedODEKernel
variable = f_times_mult
expression = '-f * g'
coupled_variables = 'f g'
[../]
[]
[AuxVariables]
[./g]
family = SCALAR
order = FIRST
[../]
[]
[Functions]
[./function_g]
type = ParsedFunction
expression = '(1 + t)'
[../]
[]
[AuxScalarKernels]
[./set_g]
type = FunctionScalarAux
function = function_g
variable = g
execute_on = 'linear initial'
[../]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 3
nl_abs_tol = 1e-9
[]
[Outputs]
nemesis = true
[]
(modules/electromagnetics/test/tests/benchmarks/slab_reflection/slab_reflection.i)
# 1D metal backed dielectric slab benchmark (electric field edition)
# Based on Section 3.4 of Jin, "The Finite Element Method in Electromagnetics, 3rd Ed."
# frequency = 20 MHz
# eps_R = 4 + (2 - j0.1)(1 - x/L)^2
# mu_R = 2 - j0.1
# L = 5 * wavelength
k = 0.41887902047863906 # 2 * pi * 20e6 / 3e8
L = 75 # = 5 * c / freq. (in m)
E0 = 1 # magnitude of the incident field (in V/m)
theta = 0 # wave incidence angle, in degrees
[GlobalParams]
theta = ${theta}
[]
[Mesh]
[slab]
type = GeneratedMeshGenerator
dim = 1
nx = 100
xmin = 0
xmax = ${L}
[]
[rename]
type = RenameBoundaryGenerator
input = slab
old_boundary = 'left right'
new_boundary = 'metal vacuum'
[]
[]
[Variables]
[E_real]
order = FIRST
family = LAGRANGE
[]
[E_imag]
order = FIRST
family = LAGRANGE
[]
[]
[Functions]
[coeff_real]
type = JinSlabCoeffFunc
k = ${k}
length = ${L}
component = real
[]
[coeff_imag]
type = JinSlabCoeffFunc
k = ${k}
length = ${L}
component = imaginary
[]
[negative_coeff_imag]
type = JinSlabCoeffFunc
k = ${k}
length = ${L}
coef = -1
component = imaginary
[]
[cosTheta]
type = ParsedFunction
expression = 'cos(${theta})'
[]
[]
[Materials]
[coeff_real_material]
type = ADGenericFunctionMaterial
prop_names = coeff_real_material
prop_values = coeff_real
[]
[coeff_imag_material]
type = ADGenericFunctionMaterial
prop_names = coeff_imag_material
prop_values = coeff_imag
[]
[negative_coeff_imag_material]
type = ADGenericFunctionMaterial
prop_names = negative_coeff_imag_material
prop_values = negative_coeff_imag
[]
[]
[Kernels]
[diffusion_real]
type = Diffusion
variable = E_real
[]
[field_real]
type = ADMatReaction
reaction_rate = coeff_real_material
variable = E_real
[]
[coupled_real]
type = ADMatCoupledForce
mat_prop_coef = negative_coeff_imag_material
v = E_imag
variable = E_real
[]
[diffusion_imag]
type = Diffusion
variable = E_imag
[]
[field_imag]
type = ADMatReaction
reaction_rate = coeff_real_material
variable = E_imag
[]
[coupled_imag]
type = ADMatCoupledForce
mat_prop_coef = coeff_imag_material
v = E_real
variable = E_imag
[]
[]
[BCs]
[metal_real]
type = DirichletBC
value = 0
variable = E_real
boundary = metal
[]
[metal_imag]
type = DirichletBC
value = 0
variable = E_imag
boundary = metal
[]
[vacuum_real]
type = EMRobinBC
coeff_real = ${k}
func_real = cosTheta
profile_func_real = ${E0}
boundary = vacuum
component = real
field_real = E_real
field_imaginary = E_imag
variable = E_real
sign = negative
[]
[vacuum_imag]
type = EMRobinBC
coeff_real = ${k}
func_real = cosTheta
profile_func_real = ${E0}
boundary = vacuum
component = imaginary
field_real = E_real
field_imaginary = E_imag
variable = E_imag
sign = negative
[]
[]
[Postprocessors]
[reflection_coefficient]
type = ReflectionCoefficient
k = ${k}
length = ${L}
incoming_field_magnitude = ${E0}
field_real = E_real
field_imag = E_imag
boundary = vacuum
outputs = 'csv console'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
exodus = false
csv = true
print_linear_residuals = true
[]
(test/tests/ics/vector_function_ic/vector_function_ic_comp.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
[]
[Problem]
solve = false
kernel_coverage_check = false
[]
[Variables/A]
family = LAGRANGE_VEC
[]
[ICs/A]
type = VectorFunctionIC
variable = A
function_x = func
[]
[Functions/func]
type = ParsedFunction
expression = '2*x'
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = 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/solid_mechanics/test/tests/lagrangian/cartesian/total/convergence-auto/1D/dirichlet.i)
# Simple 1D plane strain test
[GlobalParams]
displacements = 'disp_x'
large_kinematics = true
stabilize_strain = true
[]
[Variables]
[disp_x]
[]
[]
[ICs]
[disp_x]
type = RandomIC
variable = disp_x
min = -0.1
max = 0.1
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 1
nx = 10
[]
[]
[Kernels]
[sdx]
type = TotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[]
[Functions]
[pull]
type = ParsedFunction
expression = '0.06 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = right
variable = disp_x
value = 0.0
[]
[pull]
type = FunctionDirichletBC
boundary = left
variable = disp_x
function = pull
preset = true
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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 = 5.0
dtmin = 5.0
end_time = 5.0
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/RZ_cone_high_reynolds.i)
[GlobalParams]
gravity = '0 0 0'
laplace = true
transient_term = false
supg = true
pspg = true
family = LAGRANGE
order = FIRST
[]
[Mesh]
file = 'cone_linear_alltri.e'
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = NEWTON
[../]
[]
[Executioner]
# type = Transient
# dt = 0.005
# dtmin = 0.005
# num_steps = 5
# l_max_its = 100
# Block Jacobi works well for this problem, as does "-pc_type asm
# -pc_asm_overlap 2", but an overlap of 1 does not work for some
# reason?
# petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
# petsc_options_value = 'bjacobi ilu 4'
# Note: The Steady executioner can be used for this problem, if you
# drop the INSMomentumTimeDerivative kernels and use the following
# direct solver options.
type = Steady
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
nl_max_its = 20
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Variables]
[./vel_x]
# Velocity in radial (r) direction
[../]
[./vel_y]
# Velocity in axial (z) direction
[../]
[./p]
order = FIRST
[../]
[]
[BCs]
[./u_in]
type = DirichletBC
boundary = bottom
variable = vel_x
value = 0
[../]
[./v_in]
type = FunctionDirichletBC
boundary = bottom
variable = vel_y
function = 'inlet_func'
[../]
[./u_axis_and_walls]
type = DirichletBC
boundary = 'left right'
variable = vel_x
value = 0
[../]
[./v_no_slip]
type = DirichletBC
boundary = 'right'
variable = vel_y
value = 0
[../]
[]
[Kernels]
# [./x_momentum_time]
# type = INSMomentumTimeDerivative
# variable = vel_x
# [../]
# [./y_momentum_time]
# type = INSMomentumTimeDerivative
# variable = vel_y
# [../]
[./mass]
type = INSMassRZ
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 1
prop_names = 'rho mu'
prop_values = '1 1e-3'
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
outputs = 'console' execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
outputs = 'console' execute_on = 'timestep_end'
[../]
[]
(test/tests/auxkernels/time_derivative/time_derivative_nl.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = -5.0
xmax = 5.0
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./c_dot]
order = FIRST
family = LAGRANGE
[../]
[./c_dot_elem]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./coupled_dot]
type = DotCouplingAux
variable = c_dot
v = c
[../]
[./coupled_dot_elem]
type = DotCouplingAux
variable = c_dot_elem
v = c
[../]
[]
[ICs]
[./centered_gauss_func]
type = FunctionIC
variable = c
function = gaussian_1d
[../]
[]
[Functions]
[./gaussian_1d]
type = ParsedFunction
expression = exp(-x*x/2.0/1.0/1.0)
[../]
[]
[Kernels]
[./dot]
type = TimeDerivative
variable = c
[../]
[./diff]
type = Diffusion
variable = c
[../]
[]
[BCs]
[./Periodic]
[./auto]
variable = c
auto_direction = 'x'
[../]
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
dt = 0.1
num_steps = 5
petsc_options_iname = -ksp_rtol
petsc_options_value = 1e-12
[]
[Outputs]
exodus = true
#
[]
(modules/richards/test/tests/buckley_leverett/bl01_lumped_fu.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 150
xmin = 0
xmax = 15
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = DensityConstBulk
relperm_UO = RelPermPower
SUPG_UO = SUPGstandard
sat_UO = Saturation
seff_UO = SeffVG
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2.0E6
[../]
[./SeffVG]
type = RichardsSeff1VG
m = 0.8
al = 1E-4
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[AuxKernels]
active = 'calculate_seff'
[./calculate_seff]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = SeffVG
pressure_vars = pressure
[../]
[]
[Variables]
[./pressure]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_pressure
[../]
[../]
[]
[BCs]
active = 'left'
[./left]
type = DirichletBC
variable = pressure
boundary = left
value = 980000
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsLumpedMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFullyUpwindFlux
variable = pressure
[../]
[]
[Functions]
active = 'initial_pressure'
[./initial_pressure]
type = ParsedFunction
expression = max((1000000-x/5*1000000)-20000,-20000)
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.15
mat_permeability = '1E-10 0 0 0 1E-10 0 0 0 1E-10'
viscosity = 1E-3
gravity = '-1 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
active = 'andy'
[./andy]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 20'
[../]
[]
[Executioner]
type = Transient
end_time = 50
dt = 2
snesmf_reuse_base = false
[]
[Outputs]
file_base = bl01_lumped_fu
execute_on = 'initial timestep_end final'
time_step_interval = 10000
exodus = true
[]
(tutorials/tutorial03_verification/app/test/tests/step03_analytical/1d_analytical.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
xmax = 0.03
nx = 200
[]
[]
[Variables]
[T]
[]
[]
[ICs]
[T_O]
type = ConstantIC
variable = T
value = 300
[]
[]
[Kernels]
[T_time]
type = HeatConductionTimeDerivative
variable = T
density_name = 7800
specific_heat = 450
[]
[T_cond]
type = HeatConduction
variable = T
diffusion_coefficient = 80.2
[]
[]
[BCs]
[left]
type = NeumannBC
variable = T
boundary = left
value = 7e5
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
dt = 0.01
end_time = 1
[]
[Outputs]
exodus = true
csv = true
[]
[Functions]
[T_exact]
type = ParsedFunction
symbol_names = 'k rho cp T0 qs'
symbol_values = '80.2 7800 450 300 7e5'
expression = 'T0 + '
'qs/k*(2*sqrt(k/(rho*cp)*t/pi)*exp(-x^2/(4*k/(rho*cp)*(t+1e-50))) - '
'x*(1-erf(x/(2*sqrt(k/(rho*cp)*(t+1e-50))))))'
[]
[]
[Postprocessors]
[error]
type = NodalL2Error
variable = T
function = T_exact
[]
[h]
type = AverageElementSize
[]
[]
[VectorPostprocessors]
[T_exact]
type = LineFunctionSampler
functions = T_exact
start_point = '0 0 0'
end_point = '0.03 0 0'
num_points = 200
sort_by = x
execute_on = 'INITIAL TIMESTEP_END'
[]
[T_simulation]
type = LineValueSampler
variable = T
start_point = '0 0 0'
end_point = '0.03 0 0'
num_points = 200
sort_by = x
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
(modules/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/porous_flow/test/tests/relperm/vangenuchten1.i)
# Test van Genuchten relative permeability curve by varying saturation over the mesh
# van Genuchten exponent m = 0.5 for both phases
# No residual saturation in either phase
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[p0]
initial_condition = 1e6
[]
[s1]
[]
[]
[AuxVariables]
[s0aux]
family = MONOMIAL
order = CONSTANT
[]
[s1aux]
family = MONOMIAL
order = CONSTANT
[]
[kr0aux]
family = MONOMIAL
order = CONSTANT
[]
[kr1aux]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[s0]
type = PorousFlowPropertyAux
property = saturation
phase = 0
variable = s0aux
[]
[s1]
type = PorousFlowPropertyAux
property = saturation
phase = 1
variable = s1aux
[]
[kr0]
type = PorousFlowPropertyAux
property = relperm
phase = 0
variable = kr0aux
[]
[kr1]
type = PorousFlowPropertyAux
property = relperm
phase = 1
variable = kr1aux
[]
[]
[Functions]
[s1]
type = ParsedFunction
expression = x
[]
[]
[ICs]
[s1]
type = FunctionIC
variable = s1
function = s1
[]
[]
[Kernels]
[p0]
type = Diffusion
variable = p0
[]
[s1]
type = Diffusion
variable = s1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'p0 s1'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = p0
phase1_saturation = s1
capillary_pressure = pc
[]
[kr0]
type = PorousFlowRelativePermeabilityVG
phase = 0
m = 0.5
[]
[kr1]
type = PorousFlowRelativePermeabilityVG
phase = 1
m = 0.5
wetting = false
[]
[]
[VectorPostprocessors]
[vpp]
type = LineValueSampler
warn_discontinuous_face_values = false
variable = 's0aux s1aux kr0aux kr1aux'
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 20
sort_by = id
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-7
[]
[BCs]
[sleft]
type = DirichletBC
variable = s1
value = 0
boundary = left
[]
[sright]
type = DirichletBC
variable = s1
value = 1
boundary = right
[]
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(test/tests/ics/from_exodus_solution/nodal_part1.i)
# We run a simple problem (5 time steps and save off the solution)
# In part2, we load the solution and solve a steady problem. The test check, that the initial state in part 2 is the same as the last state from part1
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 20
ny = 20
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[./forcing_fn]
type = ParsedFunction
expression = -4+(x*x+y*y)
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'ie diff ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.2
start_time = 0
num_steps = 5
[]
[Outputs]
file_base = out_nodal_part1
exodus = true
xda = true
[]
(test/tests/executioners/eigen_executioners/ipm.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 100
ymin = 0
ymax = 100
elem_type = QUAD4
nx = 8
ny = 8
uniform_refine = 0
displacements = 'x_disp y_disp'
[]
#The minimum eigenvalue for this problem is 2*(pi/a)^2 + 2 with a = 100.
#Its inverse will be 0.49950700634518.
[Variables]
active = 'u'
[./u]
# second order is way better than first order
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./x_disp]
[../]
[./y_disp]
[../]
[]
[AuxKernels]
[./x_disp]
type = FunctionAux
variable = x_disp
function = x_disp_func
[../]
[./y_disp]
type = FunctionAux
variable = y_disp
function = y_disp_func
[../]
[]
[Functions]
[./x_disp_func]
type = ParsedFunction
expression = 0
[../]
[./y_disp_func]
type = ParsedFunction
expression = 0
[../]
[]
[Kernels]
active = 'diff rea rhs'
[./diff]
type = Diffusion
variable = u
use_displaced_mesh = true
[../]
[./rea]
type = CoefReaction
variable = u
coefficient = 2.0
use_displaced_mesh = true
[../]
[./rhs]
type = MassEigenKernel
variable = u
use_displaced_mesh = true
[../]
[]
[BCs]
active = 'homogeneous'
[./homogeneous]
type = DirichletBC
variable = u
boundary = '0 1 2 3'
value = 0
use_displaced_mesh = true
[../]
[]
[Executioner]
type = InversePowerMethod
min_power_iterations = 11
max_power_iterations = 400
Chebyshev_acceleration_on = true
eig_check_tol = 1e-12
k0 = 0.5
bx_norm = 'unorm'
xdiff = 'udiff'
normalization = 'unorm'
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
[]
[Postprocessors]
active = 'unorm udiff'
[./unorm]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = linear
use_displaced_mesh = true
[../]
[./udiff]
type = ElementL2Diff
variable = u
execute_on = 'linear timestep_end'
use_displaced_mesh = true
[../]
[]
[Outputs]
file_base = ipm
exodus = true
hide = 'x_disp y_disp'
[]
(test/tests/predictors/simple/predictor_test_pre_smo.i)
# The purpose of this test is to test the simple predictor. This is a very
# small, monotonically loaded block of material. If things are working right,
# the predictor should come very close to exactly nailing the solution on steps
# after the first step.
# The main thing to check here is that when the predictor is applied in the
# second step, the initial residual is almost zero.
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 3
ny = 3
[]
[Functions]
[ramp1]
type = ParsedFunction
expression = 't'
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
[]
[]
[BCs]
[bot]
type = DirichletBC
variable = u
boundary = bottom
value = 0.0
[]
[ss2_x]
type = FunctionDirichletBC
variable = u
boundary = top
function = ramp1
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-14
start_time = 0.0
dt = 0.5
end_time = 1.0
[Predictor]
type = SimplePredictor
scale = 1.0
[]
use_pre_SMO_residual = true
[]
[Postprocessors]
[final_residual]
type = Residual
residual_type = FINAL
[]
[pre_smo_residual]
type = Residual
residual_type = PRE_SMO
[]
[initial_residual]
type = Residual
residual_type = INITIAL
[]
[]
[Outputs]
csv = true
[]
(modules/richards/test/tests/jacobian_2/jn17.i)
# two phase
# water saturated
# gravity = true
# supg = true
# transient = true
[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 = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 1.0 # notice small quantity, so the PETSc constant state works
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 0.5
bulk_mod = 0.5 # notice small quantity, so the PETSc constant state works
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1 # notice small quantity, so the PETSc constant state works
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1 # notice small quantity, so the PETSc constant state works
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.2
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.1
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
[./InitialCondition]
type = FunctionIC
block = 0
function = init_p
[../]
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
block = 0
function = init_p
[../]
[../]
[]
[Functions]
[./init_p]
type = ParsedFunction
expression = x+0.6*y+0.3*z
[../]
[]
[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
[../]
[]
[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 2 3'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
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-15 1E-10 10000 test'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E-5
[]
[Outputs]
execute_on = 'timestep_end'
file_base = jn17
exodus = false
[]
(test/tests/restart/restart_transient_from_transient/pseudo_trans_with_2subs.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = 'replicated'
[]
[AuxVariables]
[Tf]
[]
[]
[Variables]
[power_density]
[]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2'
[]
[]
[Kernels]
[timedt]
type = TimeDerivative
variable = power_density
[]
[diff]
type = Diffusion
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[BCs]
[left]
type = DirichletBC
variable = power_density
boundary = left
value = 50
[]
[right]
type = DirichletBC
variable = power_density
boundary = right
value = 1e3
[]
[]
[Postprocessors]
[pwr_avg]
type = ElementAverageValue
variable = power_density
execute_on = 'initial timestep_end'
[]
[temp_avg]
type = ElementAverageValue
variable = Tf
execute_on = 'initial timestep_end'
[]
[temp_max]
type = ElementExtremeValue
value_type = max
variable = Tf
execute_on = 'initial timestep_end'
[]
[temp_min]
type = ElementExtremeValue
value_type = min
variable = Tf
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
end_time = 20
dt = 2.0
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0
0.5 0 0'
input_files = pseudo_trans_with_2subs_sub.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[p_to_sub]
type = MultiAppProjectionTransfer
source_variable = power_density
variable = power_density
to_multi_app = sub
execute_on = 'timestep_end'
[]
[t_from_sub]
type = MultiAppGeometricInterpolationTransfer
source_variable = temp
variable = Tf
from_multi_app = sub
execute_on = 'timestep_end'
[]
[]
[Outputs]
exodus = true
perf_graph = true
checkpoint = true
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
(modules/richards/test/tests/buckley_leverett/bl20_lumped_fu.i)
# two-phase version
[Mesh]
type = GeneratedMesh
dim = 1
nx = 30
xmin = 0
xmax = 15
[]
[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 = '0.1 0.5 0.5 1 2 4'
x = '0 0.1 1 5 40 42'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E6
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 2E6
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1E-5
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1E-5
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./SatWater]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SatGas]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGwater]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[./SUPGgas]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./w_aux_seff]
[../]
[]
[Kernels]
[./richardstwater]
type = RichardsLumpedMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFullyUpwindFlux
variable = pwater
[../]
[./richardstgas]
type = RichardsLumpedMassChange
variable = pgas
[../]
[./richardsfgas]
type = RichardsFullyUpwindFlux
variable = pgas
[../]
[]
[AuxKernels]
[./w_aux_seff_auxk]
type = RichardsSeffAux
seff_UO = SeffWater
pressure_vars = 'pwater pgas'
variable = w_aux_seff
[../]
[]
[ICs]
[./water_ic]
type = FunctionIC
variable = pwater
function = initial_water
[../]
[./gas_ic]
type = FunctionIC
variable = pgas
function = initial_gas
[../]
[]
[BCs]
[./left_w]
type = DirichletBC
variable = pwater
boundary = left
value = 1E6
[../]
[./left_g]
type = DirichletBC
variable = pgas
boundary = left
value = 1000
[../]
[./right_w]
type = DirichletBC
variable = pwater
boundary = right
value = -300000
[../]
[./right_g]
type = DirichletBC
variable = pgas
boundary = right
value = 0
[../]
[]
[Functions]
[./initial_water]
type = ParsedFunction
expression = 1000000*(1-min(x/5,1))-if(x<5,0,300000)
[../]
[./initial_gas]
type = ParsedFunction
expression = 1000
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.15
mat_permeability = '1E-10 0 0 0 1E-10 0 0 0 1E-10'
viscosity = '1E-3 1E-6'
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
active = 'standard'
[./bounded]
# must use --use-petsc-dm command line argument
type = SMP
full = true
petsc_options_iname = '-snes_type -pc_factor_shift_type'
petsc_options_value = 'vinewtonssls nonzero'
[../]
[./standard]
type = SMP
full = true
petsc_options_iname = '-pc_factor_shift_type'
petsc_options_value = 'nonzero'
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 50
nl_rel_tol = 1.e-9
nl_max_its = 10
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = bl20_lumped_fu
execute_on = 'initial timestep_end final'
time_step_interval = 100000
exodus = true
hide = pgas
[./console_out]
type = Console
time_step_interval = 1
[../]
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/small-tests/3d.i)
# 2D test with just strain control
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = false
macro_gradient = hvar
homogenization_constraint = homogenization
[]
[Mesh]
[base]
type = FileMeshGenerator
file = '3d.exo'
[]
[sidesets]
type = SideSetsFromNormalsGenerator
input = base
normals = '-1 0 0
1 0 0
0 -1 0
0 1 0
'
' 0 0 -1
0 0 1'
fixed_normal = true
new_boundary = 'left right bottom top back front'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[hvar]
family = SCALAR
order = SIXTH
[]
[]
[AuxVariables]
[sxx]
family = MONOMIAL
order = CONSTANT
[]
[syy]
family = MONOMIAL
order = CONSTANT
[]
[sxy]
family = MONOMIAL
order = CONSTANT
[]
[szz]
family = MONOMIAL
order = CONSTANT
[]
[syz]
family = MONOMIAL
order = CONSTANT
[]
[sxz]
family = MONOMIAL
order = CONSTANT
[]
[exx]
family = MONOMIAL
order = CONSTANT
[]
[eyy]
family = MONOMIAL
order = CONSTANT
[]
[exy]
family = MONOMIAL
order = CONSTANT
[]
[ezz]
family = MONOMIAL
order = CONSTANT
[]
[eyz]
family = MONOMIAL
order = CONSTANT
[]
[exz]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[sxx]
type = RankTwoAux
variable = sxx
rank_two_tensor = pk1_stress
index_i = 0
index_j = 0
[]
[syy]
type = RankTwoAux
variable = syy
rank_two_tensor = pk1_stress
index_i = 1
index_j = 1
[]
[sxy]
type = RankTwoAux
variable = sxy
rank_two_tensor = pk1_stress
index_i = 0
index_j = 1
[]
[zz]
type = RankTwoAux
variable = szz
rank_two_tensor = pk1_stress
index_i = 2
index_j = 2
[]
[syz]
type = RankTwoAux
variable = syz
rank_two_tensor = pk1_stress
index_i = 1
index_j = 2
[]
[sxz]
type = RankTwoAux
variable = sxz
rank_two_tensor = pk1_stress
index_i = 0
index_j = 2
[]
[exx]
type = RankTwoAux
variable = exx
rank_two_tensor = mechanical_strain
index_i = 0
index_j = 0
[]
[eyy]
type = RankTwoAux
variable = eyy
rank_two_tensor = mechanical_strain
index_i = 1
index_j = 1
[]
[exy]
type = RankTwoAux
variable = exy
rank_two_tensor = mechanical_strain
index_i = 0
index_j = 1
[]
[ezz]
type = RankTwoAux
variable = ezz
rank_two_tensor = mechanical_strain
index_i = 2
index_j = 2
[]
[eyz]
type = RankTwoAux
variable = eyz
rank_two_tensor = mechanical_strain
index_i = 1
index_j = 2
[]
[exz]
type = RankTwoAux
variable = exz
rank_two_tensor = mechanical_strain
index_i = 0
index_j = 2
[]
[]
[UserObjects]
[homogenization]
type = HomogenizationConstraint
constraint_types = ${constraint_types}
targets = ${targets}
execute_on = 'INITIAL LINEAR NONLINEAR'
[]
[]
[Kernels]
[sdx]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[sdy]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_y
component = 1
[]
[sdz]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_z
component = 2
[]
[]
[ScalarKernels]
[enforce]
type = HomogenizationConstraintScalarKernel
variable = hvar
[]
[]
[Functions]
[strain11]
type = ParsedFunction
expression = '4.0e-2*t'
[]
[strain22]
type = ParsedFunction
expression = '-2.0e-2*t'
[]
[strain33]
type = ParsedFunction
expression = '8.0e-2*t'
[]
[strain23]
type = ParsedFunction
expression = '2.0e-2*t'
[]
[strain13]
type = ParsedFunction
expression = '-7.0e-2*t'
[]
[strain12]
type = ParsedFunction
expression = '1.0e-2*t'
[]
[stress11]
type = ParsedFunction
expression = '4.0e2*t'
[]
[stress22]
type = ParsedFunction
expression = '-2.0e2*t'
[]
[stress33]
type = ParsedFunction
expression = '8.0e2*t'
[]
[stress23]
type = ParsedFunction
expression = '2.0e2*t'
[]
[stress13]
type = ParsedFunction
expression = '-7.0e2*t'
[]
[stress12]
type = ParsedFunction
expression = '1.0e2*t'
[]
[]
[BCs]
[Periodic]
[x]
variable = disp_x
auto_direction = 'x y z'
[]
[y]
variable = disp_y
auto_direction = 'x y z'
[]
[z]
variable = disp_z
auto_direction = 'x y z'
[]
[]
[fix1_x]
type = DirichletBC
boundary = "fix_all"
variable = disp_x
value = 0
[]
[fix1_y]
type = DirichletBC
boundary = "fix_all"
variable = disp_y
value = 0
[]
[fix1_z]
type = DirichletBC
boundary = "fix_all"
variable = disp_z
value = 0
[]
[fix2_x]
type = DirichletBC
boundary = "fix_xy"
variable = disp_x
value = 0
[]
[fix2_y]
type = DirichletBC
boundary = "fix_xy"
variable = disp_y
value = 0
[]
[fix3_z]
type = DirichletBC
boundary = "fix_z"
variable = disp_z
value = 0
[]
[]
[Materials]
[elastic_tensor_1]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
block = '1'
[]
[elastic_tensor_2]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 120000.0
poissons_ratio = 0.21
block = '2'
[]
[elastic_tensor_3]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 80000.0
poissons_ratio = 0.4
block = '3'
[]
[elastic_tensor_4]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 76000.0
poissons_ratio = 0.11
block = '4'
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
homogenization_gradient_names = 'homogenization_gradient'
[]
[compute_homogenization_gradient]
type = ComputeHomogenizedLagrangianStrain
[]
[]
[Postprocessors]
[sxx]
type = ElementAverageValue
variable = sxx
execute_on = 'initial timestep_end'
[]
[syy]
type = ElementAverageValue
variable = syy
execute_on = 'initial timestep_end'
[]
[sxy]
type = ElementAverageValue
variable = sxy
execute_on = 'initial timestep_end'
[]
[szz]
type = ElementAverageValue
variable = szz
execute_on = 'initial timestep_end'
[]
[syz]
type = ElementAverageValue
variable = syz
execute_on = 'initial timestep_end'
[]
[sxz]
type = ElementAverageValue
variable = sxz
execute_on = 'initial timestep_end'
[]
[exx]
type = ElementAverageValue
variable = exx
execute_on = 'initial timestep_end'
[]
[eyy]
type = ElementAverageValue
variable = eyy
execute_on = 'initial timestep_end'
[]
[exy]
type = ElementAverageValue
variable = exy
execute_on = 'initial timestep_end'
[]
[ezz]
type = ElementAverageValue
variable = ezz
execute_on = 'initial timestep_end'
[]
[eyz]
type = ElementAverageValue
variable = eyz
execute_on = 'initial timestep_end'
[]
[exz]
type = ElementAverageValue
variable = exz
execute_on = 'initial timestep_end'
[]
[]
[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 = 10
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 1.0
[]
[Outputs]
csv = true
[]
(test/tests/dgkernels/dg_displacement/dg_displacement.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
displacements = 'disp_x disp_y'
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[../]
[./exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[../]
[./disp_func]
type = ParsedFunction
expression = x
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./abs]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGKernels]
[./dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
use_displaced_mesh = true
[../]
[]
[BCs]
[./all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_rel_tol = 1e-10
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out
exodus = true
[]
[ICs]
[./disp_x_ic]
function = disp_func
variable = disp_x
type = FunctionIC
[../]
[]
(modules/contact/examples/3d_berkovich/indenter_berkovich_friction.i)
[Mesh]
file = indenter.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
order = FIRST
family = LAGRANGE
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxVariables]
[./saved_x]
[../]
[./saved_y]
[../]
[./saved_z]
[../]
[]
[AuxKernels]
[]
[Functions]
[./push_down]
type = ParsedFunction
expression = 'if(t < 1.5, -t, t-3.0)'
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
strain = FINITE
block = '1 2'
use_automatic_differentiation = false
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_zz'
save_in = 'saved_x saved_y saved_z'
use_finite_deform_jacobian = true
[../]
[]
[BCs]
[./botz]
type = DirichletBC
variable = disp_z
boundary = 101
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
boundary = 101
value = 0.0
[../]
[./botx]
type = DirichletBC
variable = disp_x
boundary = 101
value = 0.0
[../]
[./boty111]
type = DirichletBC
variable = disp_y
boundary = 111
value = 0.0
[../]
[./botx111]
type = DirichletBC
variable = disp_x
boundary = 111
value = 0.0
[../]
[./topz]
type = FunctionDirichletBC
variable = disp_z
boundary = '201'
function = push_down
[../]
[./topy]
type = DirichletBC
variable = disp_y
boundary = 201
value = 0.0
[../]
[./topx]
type = DirichletBC
variable = disp_x
boundary = 201
value = 0.0
[../]
[]
[UserObjects]
[./slip_rate_gss]
type = CrystalPlasticitySlipRateGSS
variable_size = 48
slip_sys_file_name = input_slip_sys_bcc48.txt
num_slip_sys_flowrate_props = 2
flowprops = '1 48 0.0001 0.01'
uo_state_var_name = state_var_gss
slip_incr_tol = 10.0
block = 1
[../]
[./slip_resistance_gss]
type = CrystalPlasticitySlipResistanceGSS
variable_size = 48
uo_state_var_name = state_var_gss
block = 1
[../]
[./state_var_gss]
type = CrystalPlasticityStateVariable
variable_size = 48
groups = '0 24 48'
group_values = '900 1000' #120
uo_state_var_evol_rate_comp_name = state_var_evol_rate_comp_gss
scale_factor = 1.0
block = 1
[../]
[./state_var_evol_rate_comp_gss]
type = CrystalPlasticityStateVarRateComponentGSS
variable_size = 48
hprops = '1.4 1000 1200 2.5'
uo_slip_rate_name = slip_rate_gss
uo_state_var_name = state_var_gss
block = 1
[../]
[]
[Materials]
[./crysp]
type = FiniteStrainUObasedCP
block = 1
stol = 1e-2
tan_mod_type = exact
uo_slip_rates = 'slip_rate_gss'
uo_slip_resistances = 'slip_resistance_gss'
uo_state_vars = 'state_var_gss'
uo_state_var_evol_rate_comps = 'state_var_evol_rate_comp_gss'
maximum_substep_iteration = 25
[../]
[./elasticity_tensor]
type = ComputeElasticityTensorCP
block = 1
C_ijkl = '265190 113650 113650 265190 113650 265190 75769 75769 75760'
fill_method = symmetric9
[../]
[./elasticity_tensor_indenter]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1000000.0
poissons_ratio = 0.3
block = 2
[../]
[./stress_indenter]
type = ComputeFiniteStrainElasticStress
block = 2
[../]
[]
[Postprocessors]
[./stress_zz]
type = ElementAverageValue
variable = stress_zz
block = 1
[../]
[./resid_z]
type = NodalSum
variable = saved_z
boundary = 201
[../]
[./disp_z]
type = NodalExtremeValue
variable = disp_z
boundary = 201
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
line_search = 'none'
l_max_its = 60
nl_max_its = 50
dt = 0.004
dtmin = 0.00001
end_time = 1.8
nl_rel_tol = 1e-8
nl_abs_tol = 1e-6 # 6 if no friction
l_tol = 1e-3
automatic_scaling = true
[]
[Outputs]
[./my_checkpoint]
type = Checkpoint
time_step_interval = 50
[../]
exodus = true
csv = true
print_linear_residuals = true
print_perf_log = true
[./console]
type = Console
max_rows = 5
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Dampers]
[./contact_slip]
type = ContactSlipDamper
primary = '202'
secondary = '102'
[../]
[]
[Contact]
[./ind_base]
primary = 202
secondary = 102
model = coulomb
friction_coefficient = 0.4
normalize_penalty = true
formulation = tangential_penalty
penalty = 1e7
capture_tolerance = 0.0001
[../]
[]
(test/tests/postprocessors/nodal_var_value/nodal_aux_var_value.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
# This test can only be run with renumering disabled, so the
# NodalVariableValue postprocessor's node id is well-defined.
allow_renumbering = false
[]
[Variables]
active = 'v'
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
active = 'v1'
[./v1]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
active = 'left_bc'
[./left_bc]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
active = 'time_v diff_v'
[./time_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[AuxKernels]
active = 'ak1'
[./ak1]
type = CoupledAux
variable = v1
coupled = v
value = 1
operator = '+'
[../]
[]
[BCs]
active = 'left_v right_v'
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '1'
value = 1
[../]
[]
[Postprocessors]
active = 'node4v node4v1'
[./node4v]
type = NodalVariableValue
variable = v
nodeid = 3
[../]
[./node4v1]
type = NodalVariableValue
variable = v1
nodeid = 3
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_nodal_aux_var_value
exodus = true
[]
(test/tests/functors/get_functor/get_functor.i)
[GlobalParams]
execute_on = 'INITIAL'
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 5
[]
[AuxVariables]
[testvar]
[]
[testppdot]
family = MONOMIAL
order = CONSTANT
[]
[testppdiv]
[]
[]
[AuxKernels]
[testvar_auxkern]
type = FunctionAux
variable = testvar
function = testvar_fn
execute_on = 'INITIAL'
[]
[testppdot_auxkern]
type = TimeDerivativeAux
variable = testppdot
functor = testpp
[]
[testppdiv_auxkern]
type = DivergenceAux
variable = testppdiv
u = testpp
v = testpp
w = testpp
[]
[]
[FunctorMaterials]
[testfmat]
type = GenericFunctorMaterial
prop_names = 'testfmprop'
prop_values = 'testfmat_fn'
[]
[]
[Functions]
[testvar_fn]
type = ParsedFunction
expression = '10*x'
[]
[testfmat_fn]
type = ParsedFunction
expression = '50*x'
[]
[testfn]
type = ParsedFunction
expression = '25*x'
[]
[]
[Postprocessors]
[testpp]
type = ConstantPostprocessor
value = 2
[]
[get_var]
type = ElementIntegralFunctorPostprocessor
functor = testvar
[]
[get_fn]
type = ElementExtremeFunctorValue
functor = testfn
value_type = max
[]
[get_fmprop]
type = ElementExtremeFunctorValue
functor = testfmprop
value_type = max
[]
[get_pp]
type = ElementExtremeFunctorValue
functor = testpp
value_type = max
execution_order_group = 1
[]
[get_ppdiv]
type = ElementAverageValue
variable = testppdiv
[]
[get_ppdot]
type = ElementAverageValue
variable = testppdot
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/bcs/periodic/all_periodic_trans.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
nz = 0
xmax = 10
ymax = 10
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Functions]
[./tr_x]
type = ParsedFunction
expression = x
[../]
[./tr_y]
type = ParsedFunction
expression = y+10
[../]
[./itr_x]
type = ParsedFunction
expression = x
[../]
[./itr_y]
type = ParsedFunction
expression = y-10
[../]
[./tr_x2]
type = ParsedFunction
expression = x+10
[../]
[./tr_y2]
type = ParsedFunction
expression = y
[../]
[./itr_x2]
type = ParsedFunction
expression = x-10
[../]
[./itr_y2]
type = ParsedFunction
expression = y
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./forcing]
type = GaussContForcing
variable = u
x_center = 2
y_center = 1
x_spread = 0.25
y_spread = 0.5
[../]
[./dot]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
# active = ' '
[./Periodic]
[./x]
primary = bottom
secondary = top
transform_func = 'tr_x tr_y'
inv_transform_func = 'itr_x itr_y'
[../]
[./y]
primary = left
secondary = right
transform_func = 'tr_x2 tr_y2'
inv_transform_func = 'itr_x2 itr_y2'
[../]
[../]
[]
[Executioner]
type = Transient
dt = 0.5
num_steps = 10
solve_type = NEWTON
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(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
[]
(test/tests/preconditioners/reuse/convergence.i)
# Simple 3D test with diffusion, setup to make sure
# there is a sensible difference in the linear iteration
# counts with re-use versus without re-use
[Variables]
[u]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 4
nz = 4
[]
[]
[Kernels]
[diffusion]
type = FunctionDiffusion
variable = u
function = 'arg'
[]
[time]
type = TimeDerivative
variable = u
[]
[body_force]
type = BodyForce
variable = u
function = body
[]
[]
[Functions]
[body]
type = ParsedFunction
expression = 100*sin(t)
[]
[arg]
type = ParsedFunction
expression = 'x*y*z*cos(t)+1'
[]
[]
[BCs]
[fix_concentration]
type = DirichletBC
preset = true
boundary = left
variable = u
value = 0.0
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'newton'
line_search = none
petsc_options = ''
petsc_options_iname = '-pc_type -ksp_type'
petsc_options_value = 'lu gmres'
l_tol = 1e-8
l_max_its = 100
reuse_preconditioner = false
reuse_preconditioner_max_linear_its = 10
nl_max_its = 10
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 10.0
[./Adaptivity]
interval = 5
max_h_level = 1
start_time = 11.0
stop_time = 6.0
[../]
[]
[Reporters/iteration_info]
type = IterationInfo
[]
[Outputs]
exodus = false
[./csv]
type = CSV
file_base = base_case
[../]
[]
(modules/solid_mechanics/test/tests/generalized_plane_strain/plane_strain_prescribed.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
scalar_out_of_plane_strain = scalar_strain_zz
block = 0
[]
[Mesh]
[./square]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[../]
[]
[AuxVariables]
[./temp]
[../]
[./scalar_strain_zz]
order = FIRST
family = SCALAR
[../]
[./saved_x]
[../]
[./saved_y]
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
use_displaced_mesh = false
[../]
[]
[AuxScalarKernels]
[./strain_zz]
type = FunctionScalarAux
variable = scalar_strain_zz
function = scalar_strain_zz_func
[../]
[]
[Functions]
[./tempfunc]
type = ParsedFunction
expression = '(1-x)*t'
[../]
[./scalar_strain_zz_func]
type = PiecewiseLinear
xy_data = '0 0
1 7.901e-5
2 1.103021e-2'
[../]
[]
[BCs]
[./bottomx]
type = DirichletBC
boundary = 0
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = DirichletBC
boundary = 0
variable = disp_y
value = 0.0
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = SMALL
add_variables = true
temperature = temp
generate_output = 'stress_xx stress_xy stress_yy stress_zz strain_xx strain_xy strain_yy strain_zz'
planar_formulation = PLANE_STRAIN
eigenstrain_names = eigenstrain
save_in = 'saved_x saved_y'
[../]
[]
[Materials]
[./elastic_tensor]
type = ComputeIsotropicElasticityTensor
poissons_ratio = 0.3
youngs_modulus = 1e6
[../]
[./thermal_strain]
type = ComputeThermalExpansionEigenstrain
temperature = temp
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
eigenstrain_name = eigenstrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[]
[Postprocessors]
[./react_z]
type = MaterialTensorIntegral
rank_two_tensor = stress
index_i = 2
index_j = 2
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
# controls for linear iterations
l_max_its = 100
l_tol = 1e-4
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-10
nl_abs_tol = 1e-5
# time control
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 2.0
num_steps = 5000
[]
[Outputs]
exodus = true
[]
(test/tests/outputs/oversample/over_sampling_second_file.i)
[Mesh]
type = FileMesh
# Read in and work with a second order mesh
file = wedge18_mesh.e
# If we have an oversample mesh file, we haven not yet implemented
# synchronization of its partitioning with the problem mesh, so we
# need to keep the problem mesh replicated.
parallel_type = replicated
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[./forcing_fn]
type = ParsedFunction
expression = -4+(x*x+y*y)
[../]
[]
[Variables]
active = 'u'
[./u]
[../]
[]
[Kernels]
active = 'ie diff ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '1 2 4'
function = exact_fn
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.2
start_time = 0
num_steps = 3
[]
[Outputs]
file_base = out_wedge
[./oversample]
type = Exodus
file_base = out_wedge_oversample
file = wedge6_mesh.e
[../]
[]
(modules/fsi/test/tests/2d-finite-strain-steady/thermal-me.i)
# Units: specific_heat_capacity--cp--J/(kg.K); density--rho--kg/(cm^3);
# dynamic_viscosity--mu--kg/(cm.s); thermal_conductivity--k--W/(cm.K);
# pressure--kg/(cm.s^2); force--kg.cm/s^2
outlet_pressure = 0
inlet_velocity = 150 # cm/s
ini_temp = 593 # K
heat_transfer_coefficient = 9 # W/(cm2.K)
g = -981 # cm/s2
alpha_fluid = 2e-4 # thermal expansion coefficient of fluid used in INSADBoussinesqBodyForce
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = '2layers_2d_midline.msh'
[]
[Variables]
[velocity]
family = LAGRANGE_VEC
order = FIRST
block = 'fluid'
[]
[p]
family = LAGRANGE
order = FIRST
block = 'fluid'
[]
[Tf]
family = LAGRANGE
order = FIRST
block = 'fluid'
[]
[Ts]
family = LAGRANGE
order = FIRST
block = 'solid'
[]
[disp_x]
family = LAGRANGE
order = FIRST
block = 'solid fluid'
[]
[disp_y]
family = LAGRANGE
order = FIRST
block = 'solid fluid'
[]
[]
[AuxVariables]
[heat_source]
family = MONOMIAL
order = FIRST
block = 'solid'
[]
[]
[ICs]
[initial_velocity]
type = VectorConstantIC
variable = velocity
x_value = 0
y_value = ${inlet_velocity}
z_value = 0
[]
[initial_p]
type = FunctionIC
variable = p
function = ini_p
[]
[initial_Tf]
type = ConstantIC
variable = Tf
value = ${ini_temp}
[]
[initial_Ts]
type = ConstantIC
variable = Ts
value = ${ini_temp}
[]
[]
[Kernels]
[fluid_mass]
type = INSADMass
variable = p
use_displaced_mesh = true
[]
[fluid_mass_pspg]
type = INSADMassPSPG
variable = p
use_displaced_mesh = true
[]
[fluid_momentum_time]
type = INSADMomentumTimeDerivative
variable = velocity
use_displaced_mesh = true
[]
[fluid_momentum_convection]
type = INSADMomentumAdvection
variable = velocity
use_displaced_mesh = true
[]
[fluid_momentum_viscous]
type = INSADMomentumViscous
variable = velocity
use_displaced_mesh = true
[]
[fluid_momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
use_displaced_mesh = true
[]
[fluid_momentum_gravity]
type = INSADGravityForce
variable = velocity
gravity = '0 ${g} 0'
use_displaced_mesh = true
[]
[fluid_momentum_buoyancy]
type = INSADBoussinesqBodyForce
variable = velocity
gravity = '0 ${g} 0'
alpha_name = 'alpha_fluid'
ref_temp = 'T_ref'
temperature = Tf
use_displaced_mesh = true
[]
[fluid_momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
use_displaced_mesh = true
[]
[fluid_temperature_time]
type = INSADHeatConductionTimeDerivative
variable = Tf
use_displaced_mesh = true
[]
[fluid_temperature_conduction]
type = ADHeatConduction
variable = Tf
thermal_conductivity = 'k'
use_displaced_mesh = true
[]
[fluid_temperature_advection]
type = INSADEnergyAdvection
variable = Tf
use_displaced_mesh = true
[]
[fluid_temperature_supg]
type = INSADEnergySUPG
variable = Tf
velocity = velocity
use_displaced_mesh = true
[]
[solid_temperature_time]
type = ADHeatConductionTimeDerivative
variable = Ts
density_name = 'rho'
specific_heat = 'cp'
block = 'solid'
use_displaced_mesh = true
[]
[solid_temperature_conduction]
type = ADHeatConduction
variable = Ts
thermal_conductivity = 'k'
block = 'solid'
use_displaced_mesh = true
[]
[heat_source]
type = ADCoupledForce
variable = Ts
v = heat_source
block = 'solid'
use_displaced_mesh = true
[]
[disp_x_smooth]
type = Diffusion
variable = disp_x
block = fluid
[]
[disp_y_smooth]
type = Diffusion
variable = disp_y
block = fluid
[]
[]
[Modules/TensorMechanics/Master]
strain = FINITE
material_output_order = FIRST
generate_output = 'vonmises_stress stress_xx stress_yy stress_zz strain_xx strain_yy strain_zz'
[solid]
block = 'solid'
temperature = Ts
automatic_eigenstrain_names = true
[]
[]
[InterfaceKernels]
[convection_heat_transfer]
type = ConjugateHeatTransfer
variable = Tf
T_fluid = Tf
neighbor_var = 'Ts'
boundary = 'solid_wall'
htc = 'htc'
use_displaced_mesh = true
[]
[]
[AuxKernels]
[heat_source_distribution_auxk]
type = FunctionAux
variable = heat_source
function = heat_source_distribution_function
block = 'solid'
use_displaced_mesh = true
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[BCs]
[no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'solid_wall'
use_displaced_mesh = true
[]
[inlet_velocity]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'fluid_bottom'
function_y = ${inlet_velocity}
use_displaced_mesh = true
[]
[symmetry]
type = ADVectorFunctionDirichletBC
variable = velocity
boundary = 'fluid_wall'
function_x = 0
set_x_comp = true
set_y_comp = false
set_z_comp = false
use_displaced_mesh = true
[]
[outlet_p]
type = DirichletBC
variable = p
boundary = 'fluid_top'
value = ${outlet_pressure}
use_displaced_mesh = true
[]
[inlet_T]
type = DirichletBC
variable = Tf
boundary = 'fluid_bottom'
value = ${ini_temp}
use_displaced_mesh = true
[]
[pin1_y]
type = DirichletBC
variable = disp_y
boundary = 'pin1'
value = 0
use_displaced_mesh = true
[]
[pin1_x]
type = DirichletBC
variable = disp_x
boundary = 'pin1'
value = 0
use_displaced_mesh = true
[]
[top_and_bottom_y]
type = DirichletBC
variable = disp_y
boundary = 'solid_bottom solid_top fluid_top fluid_bottom'
value = 0
use_displaced_mesh = true
[]
[left_and_right_x]
type = DirichletBC
variable = disp_x
boundary = 'fluid_wall fluid_bottom'
value = 0
use_displaced_mesh = true
[]
[]
[Materials]
[rho_solid]
type = ADParsedMaterial
property_name = rho
expression = '0.0110876 * pow(9.9672e-1 + 1.179e-5 * Ts - 2.429e-9 * pow(Ts,2) + 1.219e-12 * pow(Ts,3),-3)'
coupled_variables = 'Ts'
block = 'solid'
use_displaced_mesh = true
[]
[cp_solid]
type = ADParsedMaterial
property_name = cp
expression = '0.76 * ((302.27 * pow((548.68 / Ts),2) * exp(548.68 / Ts)) / pow((exp(548.68 / Ts) - 1),2) + 2 * 8.463e-3 * Ts + 8.741e7 * 18531.7 * exp(-18531.7 / Ts) / pow(Ts,2)) + 0.24 * ((322.49 * pow((587.41/Ts),2) * exp(587.41 / Ts)) / pow((exp(587.41 / Ts) - 1),2) + 2 * 1.4679e-2 * Ts)'
coupled_variables = 'Ts'
block = 'solid'
use_displaced_mesh = true
[]
[k_solid]
type = ADParsedMaterial
property_name = k
expression = '1.158/(7.5408 + 17.692 * (Ts / 1000) + 3.6142 * pow((Ts/1000),2)) + 74.105 * pow((Ts / 1000),-2.5) * exp(-16.35 / (Ts / 1000))'
coupled_variables = 'Ts'
block = 'solid'
use_displaced_mesh = true
[]
[rho_fluid]
type = ADParsedMaterial
property_name = rho
expression = '(11096 - 1.3236 * Tf) * 1e-6'
coupled_variables = 'Tf'
block = 'fluid'
use_displaced_mesh = true
[]
[cp_fluid]
type = ADParsedMaterial
property_name = cp
expression = '159 - 2.72e-2 * Tf + 7.12e-6 * pow(Tf,2)'
coupled_variables = 'Tf'
block = 'fluid'
use_displaced_mesh = true
[]
[k_fluid]
type = ADParsedMaterial
property_name = k
expression = '(3.61 + 1.517e-2 * Tf - 1.741e-6 * pow(Tf,2)) * 1e-2'
coupled_variables = 'Tf'
block = 'fluid'
use_displaced_mesh = true
[]
[mu_fluid]
type = ADParsedMaterial
property_name = mu
expression = '4.94e-6 * exp(754.1/Tf)'
coupled_variables = 'Tf'
block = 'fluid'
use_displaced_mesh = true
[]
[buoyancy_thermal_expansion_coefficient_fluid]
type = ADGenericConstantMaterial
prop_names = 'alpha_fluid'
prop_values = '${alpha_fluid}'
block = 'fluid'
use_displaced_mesh = true
[]
[buoyancy_reference_temperature_fluid]
type = GenericConstantMaterial
prop_names = 'T_ref'
prop_values = '${ini_temp}'
block = 'fluid'
use_displaced_mesh = true
[]
[ins_mat_fluid]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = Tf
block = 'fluid'
use_displaced_mesh = true
[]
[htc]
type = ADGenericFunctionMaterial
prop_names = htc
prop_values = htc_function
use_displaced_mesh = true
[]
[elasticity_solid]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2e7
poissons_ratio = 0.32
block = 'solid'
use_displaced_mesh = true
[]
[thermal_expansion_solid]
type = ComputeThermalExpansionEigenstrain
temperature = Ts
thermal_expansion_coeff = 2e-4
stress_free_temperature = 593
eigenstrain_name = thermal_expansion
block = 'solid'
use_displaced_mesh = true
[]
[stress_solid]
type = ComputeFiniteStrainElasticStress
block = 'solid'
[]
[]
[Functions]
[htc_function]
type = ParsedFunction
expression = ${heat_transfer_coefficient}
[]
[ini_p]
type = ParsedFunction
expression = '0.010302 * 981 * (10 - y)'
[]
[heat_source_distribution_function]
type = ParsedFunction
expression = '300 * sin(pi * y / 10)'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
solve_type = 'PJFNK'
[]
[]
[Executioner]
type = Transient
end_time = 1e4
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_max_its = 30
l_max_its = 100
automatic_scaling = true
compute_scaling_once = true
off_diagonals_in_auto_scaling = true
dtmin = 1
nl_abs_tol = 1e-12
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 6
growth_factor = 1.5
dt = 1
[]
[]
[Outputs]
[csv]
type = CSV
file_base = 'thermal-me'
execute_on = 'final'
[]
[]
[Postprocessors]
[average_solid_Ts]
type = ElementAverageValue
variable = Ts
block = 'solid'
use_displaced_mesh = true
[]
[average_fluid_Tf]
type = ElementAverageValue
variable = Tf
block = 'fluid'
use_displaced_mesh = true
[]
[max_solid_Ts]
type = ElementExtremeValue
variable = Ts
value_type = max
block = 'solid'
use_displaced_mesh = true
[]
[max_fluid_Tf]
type = ElementExtremeValue
variable = Tf
value_type = max
block = 'fluid'
use_displaced_mesh = true
[]
[min_solid_Ts]
type = ElementExtremeValue
variable = Ts
value_type = min
block = 'solid'
use_displaced_mesh = true
[]
[min_fluid_Tf]
type = ElementExtremeValue
variable = Tf
value_type = min
block = 'fluid'
use_displaced_mesh = true
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/xfem/test/tests/moving_interface/moving_ad_diffusion.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 3
xmin = 0.0
xmax = 1
ymin = 0.0
ymax = 1
elem_type = QUAD4
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./ls_func]
type = ParsedFunction
expression = 'x-0.76+0.21*t'
[../]
[]
[Kernels]
[./diff]
type = ADMatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./time_deriv]
type = ADTimeDerivative
variable = u
[../]
[]
[Constraints]
[./u_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = u
jump = 0
use_penalty = true
alpha = 1e5
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[]
[BCs]
[./right_u]
type = ADDirichletBC
variable = u
boundary = left
value = 0
[../]
[./left_u]
type = ADDirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Materials]
[./diffusivity_A]
type = ADGenericConstantMaterial
prop_names = A_diffusion_coefficient
prop_values = 5
[../]
[./diffusivity_B]
type = ADGenericConstantMaterial
prop_names = B_diffusion_coefficient
prop_values = 0.5
[../]
[./diff_combined]
type = ADLevelSetBiMaterialReal
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = diffusion_coefficient
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
l_max_its = 20
l_tol = 1e-8
nl_max_its = 15
nl_rel_tol = 2e-12
nl_abs_tol = 1e-50
start_time = 0.0
dt = 1
end_time = 2
max_xfem_update = 1
[]
[Outputs]
exodus = true
execute_on = timestep_end
file_base = moving_diffusion_out
perf_graph = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/transfers/multiapp_projection_transfer/fromsub_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
ymin = 0
xmax = 3
ymax = 3
nx = 3
ny = 3
[]
[Variables]
[./v]
[../]
[]
[AuxVariables]
[./x]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./x_func]
type = ParsedFunction
expression = x
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = v
[../]
[]
[AuxKernels]
[./x_func_aux]
type = FunctionAux
variable = x
function = x_func
execute_on = initial
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = v
boundary = left
value = 2
[../]
[./right]
type = DirichletBC
variable = v
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
[]
(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/outputs/oversample/over_sampling_test_file.i)
[Mesh]
type = FileMesh
file = square_3x3.e
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[./forcing_fn]
type = ParsedFunction
expression = -4+(x*x+y*y)
[../]
[]
[Variables]
active = 'u'
[./u]
order = THIRD
family = HERMITE
[../]
[]
[Kernels]
active = 'ie diff ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '1 2 3 4'
function = exact_fn
[../]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.2
start_time = 0
num_steps = 5
[]
[Outputs]
file_base = out_file
exodus = true
[./oversampling]
file_base = out_file_oversample
type = Exodus
refinements = 3
[../]
[]
(test/tests/bcs/nodal_normals/circle_tris.i)
[Mesh]
file = circle-tris.e
[]
[Functions]
[all_bc_fn]
type = ParsedFunction
expression = x*x+y*y
[]
[f_fn]
type = ParsedFunction
expression = -4
[]
[analytical_normal_x]
type = ParsedFunction
expression = x
[]
[analytical_normal_y]
type = ParsedFunction
expression = y
[]
[]
[NodalNormals]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = f_fn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = 'all_bc_fn'
[]
[]
[Postprocessors]
[nx_pps]
type = NodalL2Error
variable = nodal_normal_x
boundary = '1'
function = analytical_normal_x
[]
[ny_pps]
type = NodalL2Error
variable = nodal_normal_y
boundary = '1'
function = analytical_normal_y
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-13
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/time_integrators/scalar/scalar.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 1
ny = 1
elem_type = QUAD4
[]
[Variables]
[./n]
family = SCALAR
order = FIRST
initial_condition = 1
[../]
[]
[ScalarKernels]
[./dn]
type = ODETimeDerivative
variable = n
[../]
[./ode1]
type = ParsedODEKernel
expression = '-n'
variable = n
# implicit = false
[../]
[]
[Executioner]
type = Transient
[./TimeIntegrator]
# type = ImplicitEuler
# type = BDF2
type = CrankNicolson
# type = ImplicitMidpoint
# type = LStableDirk2
# type = LStableDirk3
# type = LStableDirk4
# type = AStableDirk4
#
# Explicit methods
# type = ExplicitEuler
# type = ExplicitMidpoint
# type = Heun
# type = Ralston
[../]
start_time = 0
end_time = 1
dt = 0.001
dtmin = 0.001 # Don't allow timestep cutting
solve_type = 'PJFNK'
nl_max_its = 2
nl_abs_tol = 1.e-12 # This is an ODE, so nl_abs_tol makes sense.
[]
[Functions]
[./exact_solution]
type = ParsedFunction
expression = exp(t)
[../]
[]
[Postprocessors]
[./error_n]
# Post processor that computes the difference between the computed
# and exact solutions. For the exact solution used here, the
# error at the final time should converge at O(dt^p), where p is
# the order of the method.
type = ScalarL2Error
variable = n
function = exact_solution
# final is not currently supported for Postprocessor execute_on...
# execute_on = 'final'
[../]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/convergence/1D/dirichlet.i)
# Simple 1D plane strain test
[GlobalParams]
displacements = 'disp_x'
large_kinematics = true
[]
[Variables]
[disp_x]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 1
nx = 10
[]
[]
[Kernels]
[sdx]
type = UpdatedLagrangianStressDivergence
variable = disp_x
component = 0
use_displaced_mesh = true
[]
[]
[Functions]
[pull]
type = ParsedFunction
expression = '0.06 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = right
variable = disp_x
value = 0.0
[]
[pull]
type = FunctionDirichletBC
boundary = left
variable = disp_x
function = pull
preset = true
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[stress_base]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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 = 5.0
[]
[Postprocessors]
[nonlin]
type = NumNonlinearIterations
[]
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/dirackernels/function_dirac_source/function_dirac_source.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 5
ny = 5
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./time]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[DiracKernels]
[./point_source]
type = FunctionDiracSource
variable = u
function = switch_off
point = '0.1 0.2 0.0'
[../]
[]
[Functions]
[./switch_off]
type = ParsedFunction
expression = 'if(t < 1.0001, 1, 0)'
[../]
[]
[BCs]
[./external]
type = NeumannBC
variable = u
boundary = '0 1 2 3'
value = 0
[../]
[]
[Postprocessors]
[./total_internal_energy]
type = ElementIntegralVariablePostprocessor
variable = u
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 1
l_tol = 1e-03
[]
[Outputs]
exodus = true
[]
(test/tests/kernels/vector_fe/ad_lagrange_vec.i)
# This example reproduces the libmesh vector_fe example 1 results
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
xmin = -1
ymin = -1
elem_type = QUAD9
[]
[Variables]
[./u]
family = LAGRANGE_VEC
order = SECOND
[../]
[]
[Kernels]
[./diff]
type = ADVectorDiffusion
variable = u
[../]
[./body_force]
type = VectorBodyForce
variable = u
function_x = 'ffx'
function_y = 'ffy'
[../]
[]
[BCs]
[./bnd]
type = ADVectorFunctionDirichletBC
variable = u
function_x = 'x_exact_sln'
function_y = 'y_exact_sln'
boundary = 'left right top bottom'
[../]
[]
[Functions]
[./x_exact_sln]
type = ParsedFunction
expression = 'cos(.5*pi*x)*sin(.5*pi*y)'
[../]
[./y_exact_sln]
type = ParsedFunction
expression = 'sin(.5*pi*x)*cos(.5*pi*y)'
[../]
[./ffx]
type = ParsedFunction
expression = '.5*pi*pi*cos(.5*pi*x)*sin(.5*pi*y)'
[../]
[./ffy]
type = ParsedFunction
expression = '.5*pi*pi*sin(.5*pi*x)*cos(.5*pi*y)'
[../]
[]
[Preconditioning]
[./pre]
type = SMP
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
[]
(test/tests/bcs/mat_neumann_bc/ad_mat_neumann.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmax = 10
ymax = 10
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./phi]
[../]
[]
[ICs]
[./phi_IC]
type = FunctionIC
variable = phi
function = ic_func_phi
[../]
[]
[Functions]
[./ic_func_phi]
type = ParsedFunction
expression = '0.5 * (1 - tanh((x - 5) / 0.8))'
[../]
[]
[BCs]
[./top]
type = ADMatNeumannBC
variable = u
boundary = top
value = 2
boundary_material = hm
[../]
[]
[Kernels]
[./dudt]
type = ADTimeDerivative
variable = u
[../]
[./diff]
type = ADDiffusion
variable = u
[../]
[]
[Materials]
[./hm]
type = ADParsedMaterial
property_name = hm
coupled_variables = 'phi'
expression = '3*phi^2 - 2*phi^3'
outputs = exodus
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
end_time = 10
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/element_l2_error_pps/element_l2_error_pp_test.i)
###########################################################
# This is a simple test of the Postprocessor System. This
# test uses a forcing function and the MMS to verify
# correctness of the implementation.
# Grid adaptivity is applied at successively finer grids
# to verify the correct slope of the measure of error
# against the analytical solution.
#
# @Requirement F6.10
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 3
xmin = 0
xmax = 2
ymin = 0
ymax = 2
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
active = 'forcing_func u_func'
[./forcing_func]
type = ParsedFunction
expression = alpha*alpha*pi*pi*sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '4'
[../]
[./u_func]
type = ParsedFunction
expression = sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '4'
[../]
[]
[Kernels]
active = 'diff forcing'
[./diff]
type = Diffusion
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_func
[../]
[]
[BCs]
active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = '1'
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = '3'
value = 0
[../]
[]
[Executioner]
type = Steady
[./Adaptivity]
refine_fraction = 1.0
coarsen_fraction = 0.0
max_h_level = 10
steps = 4
[../]
[]
# Postprocessor System
[Postprocessors]
[./integral]
type = ElementL2Error
variable = u
function = u_func
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
file_base = out
exodus = false
csv = true
[]
(test/tests/fvkernels/mms/cylindrical/advection-diffusion-reaction.i)
a=1.1
diff=1.1
[Mesh]
coord_type = 'RZ'
[./gen_mesh]
type = GeneratedMeshGenerator
dim = 2
xmin = 2
xmax = 3
ymin = 0
ymax = 1
nx = 2
ny = 2
[../]
[]
[Variables]
[./v]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 1
[../]
[]
[FVKernels]
[./advection]
type = FVAdvection
variable = v
velocity = '${a} ${a} 0'
advected_interp_method = 'average'
[../]
[reaction]
type = FVReaction
variable = v
[]
[diff_v]
type = FVDiffusion
variable = v
coeff = ${diff}
[]
[body_v]
type = FVBodyForce
variable = v
function = 'forcing'
[]
[]
[FVBCs]
[exact]
type = FVFunctionDirichletBC
boundary = 'left right top bottom'
function = 'exact'
variable = v
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = 'sin(x)*cos(y)'
[]
[forcing]
type = ParsedFunction
expression = '-a*sin(x)*sin(y) + diff*sin(x)*cos(y) + sin(x)*cos(y) + (x*a*cos(x)*cos(y) + a*sin(x)*cos(y))/x - (-x*diff*sin(x)*cos(y) + diff*cos(x)*cos(y))/x'
symbol_names = 'a diff'
symbol_values = '${a} ${diff}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_shift_type -sub_pc_type'
petsc_options_value = 'asm NONZERO lu'
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[./error]
type = ElementL2Error
variable = v
function = exact
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(test/tests/variables/time_derivatives_neighbor/test.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 4
nx = 2
[]
[Functions]
[a_fn]
type = ParsedFunction
expression = 't*(t+x)'
[]
[]
[AuxVariables]
[a]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[a_ak]
type = FunctionAux
variable = a
function = a_fn
[]
[]
[Materials]
[cm]
type = CoupledValuesMaterial
variable = a
[]
[]
[Variables]
[u]
family = MONOMIAL
order = CONSTANT
[]
[]
[Kernels]
[td]
type = TimeDerivative
variable = u
[]
[]
[DGKernels]
[dgk]
type = MatDGKernel
variable = u
mat_prop = a_value
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 3
[TimeIntegrator]
type = NewmarkBeta
[]
[Quadrature]
type = GAUSS
order = FIRST
[]
[]
[Outputs]
[./out]
type = Exodus
output_material_properties = true
show_material_properties = 'a_value a_dot a_dot_dot a_dot_du a_dot_dot_du'
execute_on = 'TIMESTEP_END'
[../]
[]
(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'
expression = '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'
expression = '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}
[]
[]
(test/tests/misc/multiple-nl-systems/test-fv.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
[]
[Problem]
nl_sys_names = 'u v'
error_on_jacobian_nonzero_reallocation = true
[]
[Variables]
[u]
type = MooseVariableFVReal
solver_sys = 'u'
[]
[v]
type = MooseVariableFVReal
solver_sys = 'v'
[]
[]
[FVKernels]
[diff_u]
type = FVDiffusion
variable = u
coeff = 1.0
[]
[diff_v]
type = FVDiffusion
variable = v
coeff = 1.0
[]
[force]
type = FVCoupledForce
variable = v
v = u
[]
[]
[FVBCs]
[left_u]
type = FVDirichletBC
variable = u
boundary = left
value = 0
[]
[right_u]
type = FVDirichletBC
variable = u
boundary = right
value = 1
[]
[left_v]
type = FVDirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = FVDirichletBC
variable = v
boundary = right
value = 1
[]
[]
[Executioner]
type = SteadySolve2
solve_type = 'NEWTON'
petsc_options = '-snes_monitor'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
first_nl_sys_to_solve = 'u'
second_nl_sys_to_solve = 'v'
[]
[Functions]
[exact]
type = ParsedFunction
value = '-1/6*x*x*x +7/6*x'
[]
[]
[Postprocessors]
[error]
type = ElementL2Error
function = exact
variable = v
execute_on = FINAL
outputs = 'csv'
[]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = FINAL
[]
[]
[Outputs]
print_nonlinear_residuals = false
print_linear_residuals = false
exodus = true
[csv]
type = CSV
execute_on = 'FINAL'
[]
[]
(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
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts_steady_stabilized.i)
[GlobalParams]
order = FIRST
integrate_p_by_parts = true
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[AuxVariables]
[vel_x]
[]
[vel_y]
[]
[]
[AuxKernels]
[vel_x]
type = VectorVariableComponentAux
variable = vel_x
vector_variable = velocity
component = 'x'
[]
[vel_y]
type = VectorVariableComponentAux
variable = vel_y
vector_variable = velocity
component = 'y'
[]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[]
# Need to set a non-zero initial condition because we have a velocity norm in
# the denominator for the tau coefficient of the stabilization term
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[mass_pspg]
type = INSADMassPSPG
variable = p
[]
[momentum_advection]
type = INSADMomentumAdvection
variable = velocity
[]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
[../]
[momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[]
[]
[BCs]
[inlet]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom'
function_x = 0
function_y = 'inlet_func'
[../]
[wall]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'right'
function_x = 0
function_y = 0
[]
[axis]
type = ADVectorFunctionDirichletBC
variable = velocity
boundary = 'left'
set_y_comp = false
function_x = 0
[]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADTauMaterial
velocity = velocity
pressure = p
[]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(modules/solid_mechanics/test/tests/plane_stress/ad_weak_plane_stress_finite.i)
[GlobalParams]
displacements = 'disp_x disp_y'
temperature = temp
out_of_plane_strain = strain_zz
[]
[Mesh]
[./square]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./strain_zz]
[../]
[]
[AuxVariables]
[./temp]
[../]
[./nl_strain_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Postprocessors]
[./react_z]
type = ADMaterialTensorIntegral
rank_two_tensor = stress
index_i = 2
index_j = 2
[../]
[./min_strain_zz]
type = NodalExtremeValue
variable = strain_zz
value_type = min
[../]
[./max_strain_zz]
type = NodalExtremeValue
variable = strain_zz
value_type = max
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./plane_stress]
planar_formulation = WEAK_PLANE_STRESS
strain = FINITE
generate_output = 'stress_xx stress_xy stress_yy stress_zz strain_xx strain_xy strain_yy'
eigenstrain_names = eigenstrain
use_automatic_differentiation = true
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
use_displaced_mesh = false
[../]
[./strain_zz]
type = ADRankTwoAux
rank_two_tensor = total_strain
variable = nl_strain_zz
index_i = 2
index_j = 2
[../]
[]
[Functions]
[./pull]
type = PiecewiseLinear
x='0 1 100'
y='0 0.00 0.00'
[../]
[./tempfunc]
type = ParsedFunction
expression = '(1 - x) * t'
[../]
[]
[BCs]
[./bottomx]
type = DirichletBC
boundary = 0
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = DirichletBC
boundary = 0
variable = disp_y
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
poissons_ratio = 0.3
youngs_modulus = 1e6
[../]
[./thermal_strain]
type = ADComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
eigenstrain_name = eigenstrain
[../]
[./stress]
type = ADComputeFiniteStrainElasticStress
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-12
# time control
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 2.0
[]
[Outputs]
file_base = 'weak_plane_stress_finite_out'
exodus = true
[]
(test/tests/linearfvkernels/advection/advection-1d.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 2
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[LinearFVKernels]
[advection]
type = LinearFVAdvection
variable = u
velocity = "0.5 0 0"
advected_interp_method = upwind
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
[inflow]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "left"
functor = analytic_solution
[]
[outflow]
type = LinearFVAdvectionDiffusionOutflowBC
variable = u
boundary = "right"
use_two_term_expansion = false
[]
[]
[Functions]
[source_func]
type = ParsedFunction
expression = '0.5*x'
[]
[analytic_solution]
type = ParsedFunction
expression = '0.5+0.5*x*x'
[]
[]
[Postprocessors]
[error]
type = ElementL2FunctorError
approximate = u
exact = analytic_solution
execute_on = FINAL
[]
[h]
type = AverageElementSize
execute_on = FINAL
[]
[]
[Executioner]
type = LinearPicardSteady
linear_systems_to_solve = u_sys
number_of_iterations = 1
[]
[Outputs]
[csv]
type = CSV
execute_on = FINAL
[]
[]
(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/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
[]
(test/tests/postprocessors/nodal_var_value/pps_output_test.i)
[Mesh]
file = square-2x2-nodeids.e
# This test can only be run with renumering disabled, so the
# NodalVariableValue postprocessor's node id is well-defined.
allow_renumbering = false
[]
[Variables]
active = 'u v'
[./u]
order = SECOND
family = LAGRANGE
[../]
[./v]
order = SECOND
family = LAGRANGE
[../]
[]
[Functions]
active = 'force_fn exact_fn left_bc'
[./force_fn]
type = ParsedFunction
expression = '1-x*x+2*t'
[../]
[./exact_fn]
type = ParsedFunction
expression = '(1-x*x)*t'
[../]
[./left_bc]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
active = '
time_u diff_u ffn_u
time_v diff_v'
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'all_u left_v right_v'
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = exact_fn
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '2'
value = 0
[../]
[]
[Postprocessors]
[./l2]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./node1]
type = NodalVariableValue
variable = u
nodeid = 15
outputs = exodus
[../]
[./node4]
type = NodalVariableValue
variable = v
nodeid = 10
outputs = console
[../]
[./avg_v]
type = AverageElementSize
outputs = none
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/solid_mechanics/test/tests/ad_thermal_expansion_function/small_const.i)
# This tests the thermal expansion coefficient function using both
# options to specify that function: mean and instantaneous. There
# two blocks, each containing a single element, and these use the
# two variants of the function.
# In this test, the instantaneous CTE function has a constant value,
# while the mean CTE function is an analytic function designed to
# give the same response. If \bar{alpha}(T) is the mean CTE function,
# and \alpha(T) is the instantaneous CTE function,
# \bar{\alpha}(T) = 1/(T-Tref) \intA^{T}_{Tsf} \alpha(T) dT
# where Tref is the reference temperature used to define the mean CTE
# function, and Tsf is the stress-free temperature.
# This version of the test uses small deformation theory. The results
# from the two models are identical.
[Mesh]
file = 'blocks.e'
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = SMALL
add_variables = true
eigenstrain_names = eigenstrain
generate_output = 'strain_xx strain_yy strain_zz'
use_automatic_differentiation = true
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = disp_x
boundary = 3
value = 0.0
[../]
[./bottom]
type = DirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[./back]
type = DirichletBC
variable = disp_z
boundary = 1
value = 0.0
[../]
[]
[AuxKernels]
[./temp]
type = FunctionAux
variable = temp
block = '1 2'
function = temp_func
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./small_stress]
type = ADComputeLinearElasticStress
[../]
[./thermal_expansion_strain1]
type = ADComputeMeanThermalExpansionFunctionEigenstrain
block = 1
thermal_expansion_function = cte_func_mean
thermal_expansion_function_reference_temperature = 0.5
stress_free_temperature = 0.0
temperature = temp
eigenstrain_name = eigenstrain
[../]
[./thermal_expansion_strain2]
type = ADComputeInstantaneousThermalExpansionFunctionEigenstrain
block = 2
thermal_expansion_function = cte_func_inst
stress_free_temperature = 0.0
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Functions]
[./cte_func_mean]
type = ParsedFunction
symbol_names = 'tsf tref scale' #stress free temp, reference temp, scale factor
symbol_values = '0.0 0.5 1e-4'
expression = 'scale * (t - tsf) / (t - tref)'
[../]
[./cte_func_inst]
type = PiecewiseLinear
xy_data = '0 1.0
2 1.0'
scale_factor = 1e-4
[../]
[./temp_func]
type = PiecewiseLinear
xy_data = '0 1
1 2'
[../]
[]
[Postprocessors]
[./disp_1]
type = NodalExtremeValue
variable = disp_x
boundary = 101
[../]
[./disp_2]
type = NodalExtremeValue
variable = disp_x
boundary = 102
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
l_max_its = 100
l_tol = 1e-4
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
start_time = 0.0
end_time = 1.0
dt = 0.1
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_no_parts_steady_stabilized.i)
[GlobalParams]
order = FIRST
integrate_p_by_parts = false
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[AuxVariables]
[vel_x]
[]
[vel_y]
[]
[]
[AuxKernels]
[vel_x]
type = VectorVariableComponentAux
variable = vel_x
vector_variable = velocity
component = 'x'
[]
[vel_y]
type = VectorVariableComponentAux
variable = vel_y
vector_variable = velocity
component = 'y'
[]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[]
# Need to set a non-zero initial condition because we have a velocity norm in
# the denominator for the tau coefficient of the stabilization term
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[mass_pspg]
type = INSADMassPSPG
variable = p
[]
[momentum_advection]
type = INSADMomentumAdvection
variable = velocity
[]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
[../]
[momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[]
[]
[BCs]
[p_corner]
type = DirichletBC
boundary = top_right
value = 0
variable = p
[]
[inlet]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom'
function_x = 0
function_y = 'inlet_func'
[../]
[wall]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'right'
function_x = 0
function_y = 0
[]
[axis]
type = ADVectorFunctionDirichletBC
variable = velocity
boundary = 'left'
set_y_comp = false
function_x = 0
[]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADTauMaterial
velocity = velocity
pressure = p
[]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(test/tests/functions/linear_combination_function/lcf1.i)
# LinearCombinationFunction function test
# See [Functions] block for a description of the tests
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 2
nx = 10
[]
[Variables]
[./dummy]
[../]
[]
[Kernels]
[./dummy_u]
type = TimeDerivative
variable = dummy
[../]
[]
[AuxVariables]
[./the_linear_combo]
[../]
[]
[AuxKernels]
[./the_linear_combo]
type = FunctionAux
variable = the_linear_combo
function = the_linear_combo
[../]
[]
[Functions]
[./xtimes]
type = ParsedFunction
expression = 1.1*x
[../]
[./twoxplus1]
type = ParsedFunction
expression = 2*x+1
[../]
[./xsquared]
type = ParsedFunction
expression = (x-2)*x
[../]
[./tover2]
type = ParsedFunction
expression = 0.5*t
[../]
[./the_linear_combo]
type = LinearCombinationFunction
functions = 'xtimes twoxplus1 xsquared tover2'
w = '3 -1.2 0.4 3'
[../]
[./should_be_answer]
type = ParsedFunction
expression = 3*1.1*x-1.2*(2*x+1)+0.4*(x-2)*x+3*0.5*t
[../]
[]
[Postprocessors]
[./should_be_zero]
type = NodalL2Error
function = should_be_answer
variable = the_linear_combo
[../]
[]
[Executioner]
type = Transient
dt = 0.5
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = lcf1
hide = dummy
exodus = false
csv = true
[]
(test/tests/interfacekernels/adaptivity/adaptivity.i)
# This input file is used for two tests:
# 1) Check that InterfaceKernels work with mesh adaptivity
# 2) Error out when InterfaceKernels are used with adaptivity
# and stateful material prpoerties
[Mesh]
parallel_type = 'replicated'
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0.5 0 0'
top_right = '1 1 0'
block_id = 1
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./break_boundary]
input = interface
type = BreakBoundaryOnSubdomainGenerator
[../]
[]
[Variables]
[./u]
[./InitialCondition]
type = ConstantIC
value = 1
[../]
block = 0
[../]
[./u_neighbor]
[./InitialCondition]
type = ConstantIC
value = 1
[../]
block = 1
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = (x*x*x)-6.0*x
[../]
[./bc_fn]
type = ParsedFunction
expression = (x*x*x)
[../]
[]
[Kernels]
[./diff]
type = MatDiffusionTest
variable = u
prop_name = diffusivity
block = 0
[../]
[./abs]
type = Reaction
variable = u
block = 0
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
block = 0
[../]
[./diffn]
type = MatDiffusionTest
variable = u_neighbor
prop_name = diffusivity
block = 1
[../]
[./absn]
type = Reaction
variable = u_neighbor
block = 1
[../]
[./forcingn]
type = BodyForce
variable = u_neighbor
function = forcing_fn
block = 1
[../]
[]
[InterfaceKernels]
[./flux_match]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = u_neighbor
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = FunctionDirichletBC
variable = u
boundary = 'left'
function = bc_fn
[../]
[./u_neighbor]
type = FunctionDirichletBC
variable = u_neighbor
boundary = 'right'
function = bc_fn
[../]
[]
[Materials]
active = 'constant'
[./stateful]
type = StatefulTest
prop_names = 'diffusivity'
prop_values = '1'
block = '0 1'
[../]
[./constant]
type = GenericConstantMaterial
prop_names = 'diffusivity'
prop_values = '1'
block = '0 1'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Adaptivity]
marker = 'marker'
steps = 1
[./Markers]
[./marker]
type = BoxMarker
bottom_left = '0 0 0'
top_right = '1 1 0'
inside = refine
outside = coarsen
[../]
[../]
[]
[Outputs]
exodus = true
[]
(modules/phase_field/examples/rigidbodymotion/AC_CH_Multigrain.i)
# Tests the rigid body motion due to applied force of multiple particles.
# ***COPY AND PASTE THESE AS NEEDED***
# 'gr0 gr1 gr2 gr3 gr4 gr5 gr6 gr7 gr8 gr9 gr10 gr11 gr12 gr13 gr14 gr15 gr16 gr17 gr18 gr19'
# (gr0^2+gr1^2+gr2^2+gr3^2+gr4^2+gr5^2+gr6^2+gr7^2+gr8^2+gr9^2+gr10^2+gr11^2+gr12^2+gr13^2+gr14^2+gr15^2+gr16^2+gr17^2+gr18^2+gr19^2)
# (gr0^3+gr1^3+gr2^3+gr3^3+gr4^3+gr5^3+gr6^3+gr7^3+gr8^3+gr9^3+gr10^3+gr11^3+gr12^3+gr13^3+gr14^3+gr15^3+gr16^3+gr17^3+gr18^3+gr19^3)
[GlobalParams]
op_num = 4
var_name_base = gr
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
xmin = 0
xmax = 600
ymin = 0
ymax = 600
elem_type = QUAD4
uniform_refine = 1
[]
[Variables]
[./c]
[../]
[./w]
[../]
[./PolycrystalVariables] # Automatically creates order parameter variables
[../]
[]
[AuxVariables]
[./bnds]
[../]
[./force]
order = CONSTANT
family = MONOMIAL
[../]
[./free_energy]
order = CONSTANT
family = MONOMIAL
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./centroids]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./load_x]
# Defines the force on the grains in the x-direction
type = ParsedFunction
expression = 0.005*cos(x*pi/600)
[../]
[./load_y]
# Defines the force on the grains in the y-direction
type = ConstantFunction
value = 0.002
[../]
[]
[Kernels]
[./RigidBodyMultiKernel]
# Creates all of the necessary Allen Cahn kernels automatically
c = c
f_name = f_loc
mob_name = L
kappa_name = kappa_gr
grain_force = grain_force
grain_volumes = grain_volumes
grain_tracker_object = grain_center
[../]
# Cahn Hilliard kernels
[./dt_w]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./CH_wres]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./CH_Parsed]
type = SplitCHParsed
variable = c
f_name = f_loc
w = w
kappa_name = kappa_c
coupled_variables = 'gr0 gr1 gr2 gr3' # Must be changed as op_num changes. Copy/paste from line 4
[../]
[./CH_RBM]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = 'gr0 gr1 gr2 gr3'
grain_force = grain_force
grain_volumes = grain_volumes
grain_tracker_object = grain_center
[../]
[]
[AuxKernels]
[./force_x]
type = FunctionAux
variable = force
function = load_x
[../]
[./force_y]
type = FunctionAux
variable = force
function = load_y
[../]
[./energy_density]
type = TotalFreeEnergy
variable = free_energy
f_name = f_loc
kappa_names = kappa_c
interfacial_vars = c
[../]
[./bnds]
type = BndsCalcAux
variable = bnds
[../]
[]
[BCs]
[./bcs]
#zero flux BC
type = NeumannBC
value = 0
variable = c
boundary = '0 1 2 3'
[../]
[]
[Materials]
[./constants]
type = GenericConstantMaterial
prop_names = 'kappa_gr kappa_c M L'
prop_values = '250 4000 4.5 60'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = f_loc
constant_names = 'A B'
constant_expressions = '450 1.5'
coupled_variables = 'c gr0 gr1 gr2 gr3' #Must be changed as op_num changes. Copy/paste from line 4
expression = 'A*c^2*(1-c)^2+B*(c^2+6*(1-c)*(gr0^2+gr1^2+gr2^2+gr3^2)
-4*(2-c)*(gr0^3+gr1^3+gr2^3+gr3^3)
+3*(gr0^2+gr1^2+gr2^2+gr3^2)^2)'
#Copy/paste from lines 5-6
derivative_order = 2
[../]
[./force_density]
type = ExternalForceDensityMaterial
c = c
k = 10.0
force_x = load_x
force_y = load_y
[../]
[]
[Postprocessors]
[./total_energy]
type = ElementIntegralVariablePostprocessor
variable = free_energy
execute_on = 'initial timestep_end'
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ComputeExternalGrainForceAndTorque
grain_data = grain_center
c = c
etas = 'gr0 gr1 gr2 gr3'
force_density = force_density_ext
execute_on = 'linear nonlinear'
[../]
[]
[Preconditioning]
[./coupled]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type
-sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly
ilu 2'
l_tol = 1e-05
nl_max_its = 30
l_max_its = 30
nl_rel_tol = 1e-07
nl_abs_tol = 1e-09
start_time = 0.0
end_time = 4
dt = 0.05
[]
[Outputs]
exodus = true
perf_graph = true
[./display]
type = Console
max_rows = 12
[../]
[]
[ICs]
[./concentration_IC]
type = SpecifiedSmoothCircleIC
x_positions = '150 450 150 450'
y_positions = '150 150 450 450'
z_positions = '0 0 0 0'
radii = '120 120 120 120'
variable = c
invalue = 1.0
outvalue = 0.0
int_width = 25
[../]
[./gr0_IC]
type = SmoothCircleIC
variable = gr0
x1 = 150
y1 = 150
radius = 120
invalue = 1.0
outvalue = 0.0
int_width = 25
[../]
[./gr1_IC]
type = SmoothCircleIC
variable = gr1
x1 = 450
y1 = 150
radius = 120
invalue = 1.0
outvalue = 0.0
int_width = 25
[../]
[./gr2_IC]
type = SmoothCircleIC
variable = gr2
x1 = 150
y1 = 450
radius = 120
invalue = 1.0
outvalue = 0.0
int_width = 25
[../]
[./gr3_IC]
type = SmoothCircleIC
variable = gr3
x1 = 450
y1 = 450
radius = 120
invalue = 1.0
outvalue = 0.0
int_width = 25
[../]
[]
(modules/solid_mechanics/examples/hyper_elastic_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 5
ny = 5
nz = 5
use_displaced_mesh = false
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[Functions]
[./top_displacement]
type = ParsedFunction
expression = t
[../]
[]
[BCs]
[./bottom_x]
type = DirichletBC
variable = 'disp_x'
boundary = bottom
value = 0
[../]
[./bottom_y]
type = DirichletBC
variable = 'disp_y'
boundary = bottom
value = 0
[../]
[./bottom_z]
type = DirichletBC
variable = 'disp_z'
boundary = bottom
value = 0
[../]
[./top_x]
type = DirichletBC
variable = 'disp_x'
boundary = top
value = 0
[../]
[./top_y]
type = FunctionDirichletBC
variable = 'disp_y'
boundary = top
function = top_displacement
[../]
[./top_z]
type = DirichletBC
variable = 'disp_z'
boundary = top
value = 0
[../]
[]
[Kernels]
[./x]
type = ADStressDivergenceTensors
variable = disp_x
component = 0
[../]
[./y]
type = ADStressDivergenceTensors
variable = disp_y
component = 1
[../]
[./z]
type = ADStressDivergenceTensors
variable = disp_z
component = 2
[../]
[]
[Materials]
[./rubber_elasticity]
type = ComputeIsotropicElasticityTensor
# lambda = 1.2e7
# shear_modulus = 1.2e7
youngs_modulus = 1
poissons_ratio = 0.45 # the closer this gets to 0.5 the worse the problem becomes
[../]
[]
[Materials]
[./strain]
type = ADComputeGreenLagrangeStrain
[../]
[./stress]
type = ADComputeLinearElasticStress
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 0.05
dtmin = 0.05
nl_abs_tol = 1e-10
num_steps = 500
[]
[Outputs]
execute_on = 'INITIAL TIMESTEP_END'
exodus = true
print_linear_residuals = false
[]
(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/navier_stokes/test/tests/finite_volume/ins/mms/channel-flow/rotated/rotated-pp-flow.i)
mu=0.5
rho=1.1
advected_interp_method='average'
velocity_interp_method='average'
two_term_boundary_expansion=true
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 10
ymin = -1
ymax = 1
nx = 10
ny = 2
[]
[rotate]
type = TransformGenerator
input = gen
transform = 'rotate'
vector_value = '45 0 0'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
[]
[]
[AuxVariables]
[vel_exact_x][]
[vel_exact_y][]
[p_exact][]
[]
[AuxKernels]
[u_exact]
type = FunctionAux
variable = vel_exact_x
function = exact_u
[]
[v_exact]
type = FunctionAux
variable = vel_exact_y
function = exact_v
[]
[p_exact]
type = FunctionAux
variable = p_exact
function = exact_p
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 1
two_term_boundary_expansion = ${two_term_boundary_expansion}
[]
[v]
type = INSFVVelocityVariable
initial_condition = 1
two_term_boundary_expansion = ${two_term_boundary_expansion}
[]
[pressure]
type = INSFVPressureVariable
two_term_boundary_expansion = ${two_term_boundary_expansion}
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[mass_forcing]
type = FVBodyForce
variable = pressure
function = forcing_p
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[u_forcing]
type = INSFVBodyForce
variable = u
functor = forcing_u
momentum_component = 'x'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[v_forcing]
type = INSFVBodyForce
variable = v
functor = forcing_v
momentum_component = 'y'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = 'exact_u'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = v
function = 'exact_v'
[]
[walls-u]
type = INSFVNoSlipWallBC
variable = u
boundary = 'top bottom'
function = 'exact_u'
[]
[walls-v]
type = INSFVNoSlipWallBC
variable = v
boundary = 'top bottom'
function = 'exact_v'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 'exact_p'
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = '0.25*sqrt(2)*(1.0 - 1/2*(-x + y)^2)/mu'
symbol_names = 'mu'
symbol_values = '${mu}'
[]
[exact_rhou]
type = ParsedFunction
expression = '0.25*sqrt(2)*rho*(1.0 - 1/2*(-x + y)^2)/mu'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[forcing_u]
type = ParsedFunction
expression = '0'
[]
[exact_v]
type = ParsedFunction
expression = '0.25*sqrt(2)*(1.0 - 1/2*(-x + y)^2)/mu'
symbol_names = 'mu'
symbol_values = '${mu}'
[]
[exact_rhov]
type = ParsedFunction
expression = '0.25*sqrt(2)*rho*(1.0 - 1/2*(-x + y)^2)/mu'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[forcing_v]
type = ParsedFunction
expression = '0'
[]
[exact_p]
type = ParsedFunction
expression = '-1/2*sqrt(2)*(x + y) + 10.0'
[]
[forcing_p]
type = ParsedFunction
expression = '0'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm 100 lu NONZERO'
line_search = 'none'
[]
[Outputs]
csv = true
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[./L2u]
type = ElementL2Error
variable = u
function = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[./L2v]
type = ElementL2Error
variable = v
function = exact_v
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[./L2p]
variable = pressure
function = exact_p
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/block-restriction/two-mats-two-eqn-sets.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = 0
ymax = 1
nx = 16
ny = 8
elem_type = QUAD9
[]
[./corner_node_0]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_0'
coord = '0 0 0'
input = gen
[../]
[./corner_node_1]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_1'
coord = '1 0 0'
input = corner_node_0
[../]
[./subdomain1]
input = corner_node_1
type = SubdomainBoundingBoxGenerator
bottom_left = '1 0 0'
top_right = '2 1 0'
block_id = 1
[../]
[./break_boundary]
input = subdomain1
type = BreakBoundaryOnSubdomainGenerator
[../]
[./interface0]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '0'
paired_block = '1'
new_boundary = 'interface0'
[../]
[./interface1]
type = SideSetsBetweenSubdomainsGenerator
input = interface0
primary_block = '1'
paired_block = '0'
new_boundary = 'interface1'
[../]
[]
[Variables]
[velocity0]
order = SECOND
family = LAGRANGE_VEC
block = 0
[]
[T0]
order = SECOND
[InitialCondition]
type = ConstantIC
value = 1.0
[]
block = 0
[]
[p0]
block = 0
[]
[velocity1]
order = SECOND
family = LAGRANGE_VEC
block = 1
[]
[T1]
order = SECOND
[InitialCondition]
type = ConstantIC
value = 1.0
[]
block = 1
[]
[p1]
block = 1
[]
[]
[Kernels]
[./mass0]
type = INSADMass
variable = p0
block = 0
[../]
[./momentum_time0]
type = INSADMomentumTimeDerivative
variable = velocity0
block = 0
[../]
[./momentum_convection0]
type = INSADMomentumAdvection
variable = velocity0
block = 0
[../]
[./momentum_viscous0]
type = INSADMomentumViscous
variable = velocity0
block = 0
[../]
[./momentum_pressure0]
type = INSADMomentumPressure
variable = velocity0
pressure = p0
integrate_p_by_parts = true
block = 0
[../]
[./temperature_time0]
type = INSADHeatConductionTimeDerivative
variable = T0
block = 0
[../]
[./temperature_advection0]
type = INSADEnergyAdvection
variable = T0
block = 0
[../]
[./temperature_conduction0]
type = ADHeatConduction
variable = T0
thermal_conductivity = 'k'
block = 0
[../]
[./mass1]
type = INSADMass
variable = p1
block = 1
[../]
[./momentum_time1]
type = INSADMomentumTimeDerivative
variable = velocity1
block = 1
[../]
[./momentum_convection1]
type = INSADMomentumAdvection
variable = velocity1
block = 1
[../]
[./momentum_viscous1]
type = INSADMomentumViscous
variable = velocity1
block = 1
[../]
[./momentum_pressure1]
type = INSADMomentumPressure
variable = velocity1
pressure = p1
integrate_p_by_parts = true
block = 1
[../]
[./temperature_time1]
type = INSADHeatConductionTimeDerivative
variable = T1
block = 1
[../]
[./temperature_advection1]
type = INSADEnergyAdvection
variable = T1
block = 1
[../]
[./temperature_conduction1]
type = ADHeatConduction
variable = T1
thermal_conductivity = 'k'
block = 1
[../]
[]
[BCs]
[./no_slip0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'bottom_to_0 interface0 left'
[../]
[./lid0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'top_to_0'
function_x = 'lid_function0'
[../]
[./T_hot0]
type = DirichletBC
variable = T0
boundary = 'bottom_to_0'
value = 1
[../]
[./T_cold0]
type = DirichletBC
variable = T0
boundary = 'top_to_0'
value = 0
[../]
[./pressure_pin0]
type = DirichletBC
variable = p0
boundary = 'pinned_node_0'
value = 0
[../]
[./no_slip1]
type = VectorFunctionDirichletBC
variable = velocity1
boundary = 'bottom_to_1 interface1 right'
[../]
[./lid1]
type = VectorFunctionDirichletBC
variable = velocity1
boundary = 'top_to_1'
function_x = 'lid_function1'
[../]
[./T_hot1]
type = DirichletBC
variable = T1
boundary = 'bottom_to_1'
value = 1
[../]
[./T_cold1]
type = DirichletBC
variable = T1
boundary = 'top_to_1'
value = 0
[../]
[./pressure_pin1]
type = DirichletBC
variable = p1
boundary = 'pinned_node_1'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat0]
type = INSAD3Eqn
velocity = velocity0
pressure = p0
temperature = T0
block = 0
[]
[ins_mat1]
type = INSAD3Eqn
velocity = velocity1
pressure = p1
temperature = T1
block = 1
[]
[]
[Functions]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
[./lid_function0]
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[./lid_function1]
type = ParsedFunction
expression = '4*(x-1)*(2-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels -sub_pc_factor_shift_type'
petsc_options_value = 'asm 2 ilu 4 NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/postprocessor_dependency/element_side_pp.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 3
ny = 3
elem_type = QUAD9
[]
[Variables]
active = 'u v'
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 2.8
[../]
[../]
[./v]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 5.4
[../]
[../]
[]
[Functions]
active = 'force_fn exact_fn left_bc'
[./force_fn]
type = ParsedFunction
expression = '1-x*x+2*t'
[../]
[./exact_fn]
type = ParsedFunction
expression = '(1-x*x)*t'
[../]
[./left_bc]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
active = '
time_u diff_u ffn_u
time_v diff_v'
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'all_u left_v right_v'
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '1'
value = 0
[../]
[]
[Postprocessors]
[./sidepp]
type = SideIntegralVariablePostprocessor
variable = v
execute_on = timestep_end
boundary = '0 1 2 3'
[../]
[./passsidepp]
type = ElementSidePP
side_pp = sidepp
execute_on = timestep_end
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
end_time = 0.3
[]
[Outputs]
file_base = out
csv = true
[]
(test/tests/ics/from_exodus_solution/nodal_part2.i)
# Use the exodus file for restarting the problem:
# - restart one variable
# - and have one extra variable with IC
#
[Mesh]
file = out_nodal_part1.e
[]
[Functions]
[exact_fn]
type = ParsedFunction
expression = ((x*x)+(y*y))
[]
[forcing_fn]
type = ParsedFunction
expression = -4
[]
[]
[Variables]
active = 'u v'
[u]
order = FIRST
family = LAGRANGE
initial_from_file_var = u
initial_from_file_timestep = 6
[]
[v]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = BoundingBoxIC
x1 = 0.0
x2 = 1.0
y1 = 0.0
y2 = 1.0
inside = 3.0
outside = 1.0
[]
[]
[]
[Problem]
allow_initial_conditions_with_restart = true
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = forcing_fn
[]
[diff_v]
type = Diffusion
variable = v
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[]
[left_v]
type = DirichletBC
variable = v
boundary = '3'
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = '1'
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out_nodal_var_restart
exodus = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/convergence-auto/2D/dirichlet.i)
# Simple 2D plane strain test
[GlobalParams]
displacements = 'disp_x disp_y'
large_kinematics = true
stabilize_strain = true
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
[]
[]
[ICs]
[disp_x]
type = RandomIC
variable = disp_x
min = -0.01
max = 0.01
[]
[disp_y]
type = RandomIC
variable = disp_y
min = -0.01
max = 0.01
[]
[]
[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
[]
[]
[Functions]
[pullx]
type = ParsedFunction
expression = '0.5 * t'
[]
[pully]
type = ParsedFunction
expression = '-0.3 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = left
variable = disp_y
value = 0.0
[]
[pull_x]
type = FunctionDirichletBC
boundary = right
variable = disp_x
function = pullx
preset = true
[]
[pull_y]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = pully
preset = true
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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-10
nl_abs_tol = 1e-12
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 0.2
[]
(modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/varying-eps-hllc.i)
[GlobalParams]
fp = fp
[]
[Mesh]
[cartesian]
type = GeneratedMeshGenerator
dim = 1
xmin = .1
xmax = .6
nx = 2
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Problem]
fv_bcs_integrity_check = false
[]
[Variables]
[pressure]
type = MooseVariableFVReal
[]
[sup_mom_x]
type = MooseVariableFVReal
[]
[T_fluid]
type = MooseVariableFVReal
[]
[]
[ICs]
[pressure]
type = FunctionIC
variable = pressure
function = 'exact_p'
[]
[sup_mom_x]
type = FunctionIC
variable = sup_mom_x
function = 'exact_rho_ud'
[]
[T_fluid]
type = FunctionIC
variable = T_fluid
function = 'exact_T'
[]
[]
[FVKernels]
[mass_advection]
type = PCNSFVMassHLLC
variable = pressure
[]
[mass_fn]
type = FVBodyForce
variable = pressure
function = 'forcing_rho'
[]
[momentum_x_advection]
type = PCNSFVMomentumHLLC
variable = sup_mom_x
momentum_component = x
[]
[eps_grad]
type = PNSFVPGradEpsilon
variable = sup_mom_x
momentum_component = 'x'
epsilon_function = 'eps'
[]
[momentum_fn]
type = FVBodyForce
variable = sup_mom_x
function = 'forcing_rho_ud'
[]
[fluid_energy_advection]
type = PCNSFVFluidEnergyHLLC
variable = T_fluid
[]
[energy_fn]
type = FVBodyForce
variable = T_fluid
function = 'forcing_rho_et'
[]
[]
[FVBCs]
[mass_left]
variable = pressure
type = PCNSFVStrongBC
boundary = left
T_fluid = 'exact_T'
superficial_velocity = 'exact_superficial_velocity'
eqn = 'mass'
[]
[momentum_left]
variable = sup_mom_x
type = PCNSFVStrongBC
boundary = left
T_fluid = 'exact_T'
superficial_velocity = 'exact_superficial_velocity'
eqn = 'momentum'
momentum_component = 'x'
[]
[energy_left]
variable = T_fluid
type = PCNSFVStrongBC
boundary = left
T_fluid = 'exact_T'
superficial_velocity = 'exact_superficial_velocity'
eqn = 'energy'
[]
[mass_right]
variable = pressure
type = PCNSFVStrongBC
boundary = right
eqn = 'mass'
pressure = 'exact_p'
[]
[momentum_right]
variable = sup_mom_x
type = PCNSFVStrongBC
boundary = right
eqn = 'momentum'
momentum_component = 'x'
pressure = 'exact_p'
[]
[energy_right]
variable = T_fluid
type = PCNSFVStrongBC
boundary = right
eqn = 'energy'
pressure = 'exact_p'
[]
[]
[Materials]
[var_mat]
type = PorousMixedVarMaterial
pressure = pressure
superficial_rhou = sup_mom_x
T_fluid = T_fluid
porosity = porosity
[]
[porosity]
type = GenericFunctionMaterial
prop_names = 'porosity'
prop_values = 'eps'
[]
[]
[Functions]
[exact_rho]
type = ParsedFunction
expression = '3.48788261470924*cos(x)'
[]
[forcing_rho]
type = ParsedFunction
expression = '-3.83667087618017*sin(1.1*x)*cos(1.3*x) - 4.53424739912202*sin(1.3*x)*cos(1.1*x)'
[]
[exact_rho_ud]
type = ParsedFunction
expression = '3.48788261470924*cos(1.1*x)*cos(1.3*x)'
[]
[forcing_rho_ud]
type = ParsedFunction
expression = '(-(10.6975765229419*cos(1.5*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + (10.6975765229419*sin(x)*cos(1.5*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 16.0463647844128*sin(1.5*x)/cos(x))*cos(x))*cos(1.3*x) + 3.48788261470924*sin(x)*cos(1.1*x)^2*cos(1.3*x)/cos(x)^2 - 7.67334175236034*sin(1.1*x)*cos(1.1*x)*cos(1.3*x)/cos(x) - 4.53424739912202*sin(1.3*x)*cos(1.1*x)^2/cos(x)'
[]
[exact_rho_et]
type = ParsedFunction
expression = '26.7439413073546*cos(1.5*x)'
[]
[forcing_rho_et]
type = ParsedFunction
expression = '1.0*(3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.5*x))*sin(x)*cos(1.1*x)*cos(1.3*x)/cos(x)^2 - 1.1*(3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.5*x))*sin(1.1*x)*cos(1.3*x)/cos(x) - 1.3*(3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.5*x))*sin(1.3*x)*cos(1.1*x)/cos(x) + 1.0*(-(10.6975765229419*cos(1.5*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + (10.6975765229419*sin(x)*cos(1.5*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 16.0463647844128*sin(1.5*x)/cos(x))*cos(x) - 40.1159119610319*sin(1.5*x))*cos(1.1*x)*cos(1.3*x)/cos(x)'
[]
[exact_T]
type = ParsedFunction
expression = '0.0106975765229418*cos(1.5*x)/cos(x) - 0.000697576522941848*cos(1.1*x)^2/cos(x)^2'
[]
[exact_eps_p]
type = ParsedFunction
expression = '3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x)*cos(1.3*x)'
[]
[exact_p]
type = ParsedFunction
expression = '3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x)'
[]
[exact_sup_vel_x]
type = ParsedFunction
expression = '1.0*cos(1.1*x)*cos(1.3*x)/cos(x)'
[]
[eps]
type = ParsedFunction
expression = 'cos(1.3*x)'
[]
[exact_superficial_velocity]
type = ParsedVectorFunction
expression_x = '1.0*cos(1.1*x)*cos(1.3*x)/cos(x)'
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_max_its = 50
line_search = bt
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
[]
[Outputs]
exodus = true
csv = true
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2pressure]
type = ElementL2Error
variable = pressure
function = exact_p
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2sup_mom_x]
variable = sup_mom_x
function = exact_rho_ud
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2T_fluid]
variable = T_fluid
function = exact_T
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(modules/phase_field/test/tests/conserved_noise/normal_masked.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = 0.0
xmax = 10.0
ymin = 0.0
ymax = 10.0
elem_type = QUAD4
[]
[Functions]
[./mask_func]
type = ParsedFunction
expression = 'r:=sqrt((x-5)^2+(y-5)^2); if (r<3, 1.0, 0.0)'
[../]
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[../]
[]
[Kernels]
[./time]
type = TimeDerivative
variable = c
[../]
[./conserved_langevin]
type = ConservedLangevinNoise
amplitude = 0.5
variable = c
noise = normal_masked_noise
[]
[]
[BCs]
[./Periodic]
[./all]
variable = c
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./mask_material]
type = GenericFunctionMaterial
prop_names = 'mask_prop'
prop_values = 'mask_func'
[../]
[]
[UserObjects]
[./normal_masked_noise]
type = ConservedMaskedNormalNoise
mask = mask_prop
[../]
[]
[Postprocessors]
[./total_c]
type = ElementIntegralVariablePostprocessor
variable = c
[../]
[]
[Executioner]
type = Transient
scheme = 'BDF2'
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 30
l_tol = 1.0e-3
nl_max_its = 30
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-10
dt = 10.0
num_steps = 4
[]
[Outputs]
file_base = normal_masked
[./csv]
type = CSV
[../]
[]
(modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/pwcnsfv.i)
rho='rho'
advected_interp_method='upwind'
velocity_interp_method='rc'
gamma=1.4
R=8.3145
molar_mass=29.0e-3
R_specific=${fparse R/molar_mass}
cp=${fparse gamma*R_specific/(gamma-1)}
[GlobalParams]
two_term_boundary_expansion = true
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = sup_vel_x
pressure = pressure
porosity = porosity
[]
[]
[Mesh]
[cartesian]
type = GeneratedMeshGenerator
dim = 1
xmin = .1
xmax = .6
nx = 2
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Problem]
fv_bcs_integrity_check = false
[]
[Variables]
[pressure]
type = INSFVPressureVariable
[]
[sup_vel_x]
type = PINSFVSuperficialVelocityVariable
[]
[]
[AuxVariables]
[porosity]
type = MooseVariableFVReal
[]
[T_fluid]
type = INSFVEnergyVariable
[]
[]
[ICs]
[pressure]
type = FunctionIC
variable = pressure
function = 'exact_p'
[]
[sup_vel_x]
type = FunctionIC
variable = sup_vel_x
function = 'exact_sup_vel_x'
[]
[T_fluid]
type = FunctionIC
variable = T_fluid
function = 'exact_T'
[]
[eps]
type = FunctionIC
variable = porosity
function = 'eps'
[]
[]
[FVKernels]
[mass_advection]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[mass_fn]
type = FVBodyForce
variable = pressure
function = 'forcing_rho'
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = sup_vel_x
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressureFlux
variable = sup_vel_x
pressure = pressure
porosity = porosity
momentum_component = 'x'
force_boundary_execution = false
[]
[momentum_fn]
type = INSFVBodyForce
variable = sup_vel_x
functor = 'forcing_rho_ud'
momentum_component = 'x'
[]
[]
[FVBCs]
[mass]
variable = pressure
type = PINSFVFunctorBC
boundary = 'left right'
superficial_vel_x = sup_vel_x
pressure = pressure
eqn = 'mass'
porosity = porosity
[]
[momentum]
variable = sup_vel_x
type = PINSFVFunctorBC
boundary = 'left right'
superficial_vel_x = sup_vel_x
pressure = pressure
eqn = 'momentum'
momentum_component = 'x'
porosity = porosity
[]
# help gradient reconstruction *and* create Dirichlet values for use in PINSFVFunctorBC
[pressure_right]
type = FVFunctionDirichletBC
variable = pressure
function = exact_p
boundary = 'right'
[]
[sup_vel_x_left]
type = FVFunctionDirichletBC
variable = sup_vel_x
function = exact_sup_vel_x
boundary = 'left'
[]
[T_fluid_left]
type = FVFunctionDirichletBC
variable = T_fluid
function = exact_T
boundary = 'left'
[]
[]
[FunctorMaterials]
[const_functor]
type = ADGenericFunctorMaterial
prop_names = 'cp'
prop_values = '${cp}'
[]
[rho]
type = RhoFromPTFunctorMaterial
fp = fp
temperature = T_fluid
pressure = pressure
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = T_fluid
rho = ${rho}
[]
[]
[Functions]
[forcing_rho]
type = ParsedFunction
expression = '-3.45300378856215*sin(1.1*x)'
[]
[forcing_rho_ud]
type = ParsedFunction
expression = '-0.9*(10.6975765229419*cos(1.2*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + 0.9*(10.6975765229419*sin(x)*cos(1.2*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 12.8370918275302*sin(1.2*x)/cos(x))*cos(x) + 3.13909435323832*sin(x)*cos(1.1*x)^2/cos(x)^2 - 6.9060075771243*sin(1.1*x)*cos(1.1*x)/cos(x)'
[]
[exact_T]
type = ParsedFunction
expression = '0.0106975765229418*cos(1.2*x)/cos(x) - 0.000697576522941848*cos(1.1*x)^2/cos(x)^2'
[]
[exact_p]
type = ParsedFunction
expression = '3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x)'
[]
[exact_sup_vel_x]
type = ParsedFunction
expression = '0.9*cos(1.1*x)/cos(x)'
[]
[eps]
type = ParsedFunction
expression = '0.9'
[]
[]
[Executioner]
solve_type = NEWTON
type = Transient
num_steps = 1
dtmin = 1
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_max_its = 50
line_search = bt
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
[]
[Outputs]
exodus = true
csv = true
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2pressure]
type = ElementL2FunctorError
approximate = pressure
exact = exact_p
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2sup_vel_x]
approximate = sup_vel_x
exact = exact_sup_vel_x
type = ElementL2FunctorError
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(modules/navier_stokes/test/tests/ics/test_function.i)
[Mesh]
[cartesian]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 1
ymax = 2
nx = 3
ny = 3
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Problem]
kernel_coverage_check = false
solve = false
skip_nl_system_check = true
[]
[AuxVariables]
[pressure]
type = MooseVariableFVReal
[]
[vel_x]
type = MooseVariableFVReal
[]
[vel_y]
type = MooseVariableFVReal
[]
[vel_z]
type = MooseVariableFVReal
[]
[temperature]
type = MooseVariableFVReal
[]
[ht]
type = MooseVariableFVReal
[]
[e]
type = MooseVariableFVReal
[]
[Mach]
type = MooseVariableFVReal
[]
[rho]
type = MooseVariableFVReal
[]
[rhou]
type = MooseVariableFVReal
[]
[rhov]
type = MooseVariableFVReal
[]
[rhow]
type = MooseVariableFVReal
[]
[rho_et]
type = MooseVariableFVReal
[]
[specific_volume]
type = MooseVariableFVReal
[]
[pressure_2]
[]
[vel_x_2]
[]
[vel_y_2]
[]
[vel_z_2]
[]
[temperature_2]
[]
[ht_2]
[]
[e_2]
[]
[Mach_2]
[]
[rho_2]
[]
[rhou_2]
[]
[rhov_2]
[]
[rhow_2]
[]
[rho_et_2]
[]
[specific_volume_2]
[]
[]
[GlobalParams]
fluid_properties = 'fp'
initial_pressure = p_func
initial_temperature = T_func
initial_velocity = 'vx vy vz'
[]
[Functions]
[p_func]
type = ParsedFunction
expression = '3+3+1e5 - x'
[]
[T_func]
type = ParsedFunction
expression = '273.15 + x*y*2'
[]
[vx]
type = ParsedFunction
expression = '14'
[]
[vy]
type = ParsedFunction
expression = '10 + x'
[]
[vz]
type = ParsedFunction
expression = '12 -7*y'
[]
[]
[ICs]
[p]
type = NSFunctionInitialCondition
variable = 'pressure'
[]
[vel_x]
type = NSFunctionInitialCondition
variable = 'vel_x'
[]
[vel_y]
type = NSFunctionInitialCondition
variable = 'vel_y'
[]
[vel_z]
type = NSFunctionInitialCondition
variable = 'vel_z'
[]
[temperature]
type = NSFunctionInitialCondition
variable = 'temperature'
[]
[ht]
type = NSFunctionInitialCondition
variable = 'ht'
[]
[e]
type = NSFunctionInitialCondition
variable = 'e'
[]
[Mach]
type = NSFunctionInitialCondition
variable = 'Mach'
[]
[rho]
type = NSFunctionInitialCondition
fluid_properties = 'fp'
initial_pressure = p_func
initial_temperature = T_func
initial_velocity = 'vx vy vz'
variable = 'rho'
[]
[rhou]
type = NSFunctionInitialCondition
variable = 'rhou'
[]
[rhov]
type = NSFunctionInitialCondition
variable = 'rhov'
[]
[rhow]
type = NSFunctionInitialCondition
variable = 'rhow'
[]
[rho_et]
type = NSFunctionInitialCondition
variable = 'rho_et'
[]
[specific_volume]
type = NSFunctionInitialCondition
variable = 'specific_volume'
[]
[p_2]
type = NSFunctionInitialCondition
variable = 'pressure_2'
variable_type = 'pressure'
[]
[vel_x_2]
type = NSFunctionInitialCondition
variable = 'vel_x_2'
variable_type = 'vel_x'
[]
[vel_y_2]
type = NSFunctionInitialCondition
variable = 'vel_y_2'
variable_type = 'vel_y'
[]
[vel_z_2]
type = NSFunctionInitialCondition
variable = 'vel_z_2'
variable_type = 'vel_z'
[]
[temperature_2]
type = NSFunctionInitialCondition
variable = 'temperature_2'
variable_type = 'temperature'
[]
[ht_2]
type = NSFunctionInitialCondition
variable = 'ht_2'
variable_type = 'ht'
[]
[e_2]
type = NSFunctionInitialCondition
variable = 'e_2'
variable_type = 'e'
[]
[Mach_2]
type = NSFunctionInitialCondition
variable = 'Mach_2'
variable_type = 'Mach'
[]
[rho_2]
type = NSFunctionInitialCondition
variable = 'rho_2'
variable_type = 'rho'
[]
[rhou_2]
type = NSFunctionInitialCondition
variable = 'rhou_2'
variable_type = 'rhou'
[]
[rhov_2]
type = NSFunctionInitialCondition
variable = 'rhov_2'
variable_type = 'rhov'
[]
[rhow_2]
type = NSFunctionInitialCondition
variable = 'rhow_2'
variable_type = 'rhow'
[]
[rho_et_2]
type = NSFunctionInitialCondition
variable = 'rho_et_2'
variable_type = 'rho_et'
[]
[specific_volume_2]
type = NSFunctionInitialCondition
variable = 'specific_volume_2'
variable_type = 'specific_volume'
[]
[]
[Executioner]
type = Steady
[]
[Debug]
show_actions = true
[]
[Outputs]
exodus = true
[]
(test/tests/outputs/displacement/displaced_eq_transient_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 5
ny = 5
elem_type = QUAD4
displacements = 'u v'
[]
[Functions]
[./right_u]
type = ParsedFunction
expression = 0.1*t
[../]
[./fn_v]
type = ParsedFunction
expression = (x+1)*y*0.1*t
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./td_u]
type = TimeDerivative
variable = u
use_displaced_mesh = true
[../]
[./diff_u]
type = Diffusion
variable = u
use_displaced_mesh = true
[../]
[./td_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
[./left_u]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right_u]
type = FunctionDirichletBC
variable = u
boundary = 1
function = right_u
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '0 2'
function = fn_v
[../]
[]
[Executioner]
type = Transient
dt = 0.1
start_time = 0
num_steps = 10
solve_type = 'PJFNK'
[]
[Outputs]
[./out_displaced]
type = Exodus
use_displaced = true
[../]
[]
(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/contact/test/tests/mortar_cartesian_lms/two_block_1st_order_constraint_lm_xy_friction_pg.i)
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
theta = 0
velocity = 0.1
refine = 3
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.35
xmax = -0.05
ymin = -1
ymax = 0
nx = 1
ny = 3
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_sideset_names]
type = RenameBoundaryGenerator
input = left_block_sidesets
old_boundary = '10 11 12 13'
new_boundary = 'l_bottom l_right l_top l_left'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sideset_names
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.3
ymin = -1
ymax = 0
nx = 1
ny = 2
elem_type = QUAD4
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3'
new_boundary = '20 21 22 23'
[]
[right_block_sideset_names]
type = RenameBoundaryGenerator
input = right_block_sidesets
old_boundary = '20 21 22 23'
new_boundary = 'r_bottom r_right r_top r_left'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sideset_names
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[left_lower]
type = LowerDBlockFromSidesetGenerator
input = combined_mesh
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[right_lower]
type = LowerDBlockFromSidesetGenerator
input = left_lower
sidesets = '23'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[rotate_mesh]
type = TransformGenerator
input = right_lower
transform = ROTATE
vector_value = '0 0 ${theta}'
[]
uniform_refine = ${refine}
[]
[Variables]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[normal_lm]
family = LAGRANGE
order = FIRST
[]
[tangent_lm]
family = LAGRANGE
order = FIRST
[]
[aux_lm]
block = 'secondary_lower'
use_dual = false
[]
[]
[AuxKernels]
[normal_lm]
type = MortarPressureComponentAux
variable = normal_lm
primary_boundary = '23'
secondary_boundary = '11'
lm_var_x = lm_x
lm_var_y = lm_y
component = 'NORMAL'
boundary = '11'
[]
[tangent_lm]
type = MortarPressureComponentAux
variable = tangent_lm
primary_boundary = '23'
secondary_boundary = '11'
lm_var_x = lm_x
lm_var_y = lm_y
component = 'tangent1'
boundary = '11'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
[]
[]
[Functions]
[horizontal_movement]
type = ParsedFunction
expression = '${velocity} * t * cos(${theta}/180*pi)'
[]
[vertical_movement]
type = ParsedFunction
expression = '${velocity} * t * sin(${theta}/180*pi)'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = horizontal_movement
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 21
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = 21
value = 0.0
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 13
function = vertical_movement
[]
[]
[Materials]
[elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e4
poissons_ratio = 0.3
[]
[stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e8
poissons_ratio = 0.3
[]
[stress_right]
type = ComputeFiniteStrainElasticStress
block = 2
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeFrictionalForceCartesianLMMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
correct_edge_dropping = true
mu = 1.0
c_t = 1.0e5
use_petrov_galerkin = true
aux_lm = aux_lm
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15'
line_search = none
dt = 0.1
dtmin = 0.1
end_time = 1.0
l_max_its = 100
nl_max_its = 20
nl_rel_tol = 1e-8
snesmf_reuse_base = false
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[avg_disp_x]
type = ElementAverageValue
variable = disp_x
block = '1 2'
[]
[avg_disp_y]
type = ElementAverageValue
variable = disp_y
block = '1 2'
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
[]
[min_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
value_type = min
[]
[min_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
value_type = min
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[tot_lin_it]
type = CumulativeValuePostprocessor
postprocessor = num_lin_it
[]
[tot_nonlin_it]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[max_norma_lm]
type = ElementExtremeValue
variable = normal_lm
[]
[min_norma_lm]
type = ElementExtremeValue
variable = normal_lm
value_type = min
[]
[]
[VectorPostprocessors]
[normal_lm]
type = NodalValueSampler
block = 'secondary_lower'
variable = normal_lm
sort_by = 'y'
[]
[tangent_lm]
type = NodalValueSampler
block = 'secondary_lower'
variable = tangent_lm
sort_by = 'y'
[]
[]
(modules/porous_flow/test/tests/relperm/corey2.i)
# Test Corey relative permeability curve by varying saturation over the mesh
# Corey exponent n = 2 for both phases
# No residual saturation in either phase
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[p0]
initial_condition = 1e6
[]
[s1]
family = LAGRANGE
order = FIRST
[]
[]
[AuxVariables]
[s0aux]
family = MONOMIAL
order = CONSTANT
[]
[s1aux]
family = MONOMIAL
order = CONSTANT
[]
[kr0aux]
family = MONOMIAL
order = CONSTANT
[]
[kr1aux]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[s0]
type = PorousFlowPropertyAux
property = saturation
phase = 0
variable = s0aux
[]
[s1]
type = PorousFlowPropertyAux
property = saturation
phase = 1
variable = s1aux
[]
[kr0]
type = PorousFlowPropertyAux
property = relperm
phase = 0
variable = kr0aux
[]
[kr1]
type = PorousFlowPropertyAux
property = relperm
phase = 1
variable = kr1aux
[]
[]
[Functions]
[s1]
type = ParsedFunction
expression = x
[]
[]
[ICs]
[s1]
type = FunctionIC
variable = s1
function = s1
[]
[]
[Kernels]
[p0]
type = Diffusion
variable = p0
[]
[s1]
type = Diffusion
variable = s1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'p0 s1'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = p0
phase1_saturation = s1
capillary_pressure = pc
[]
[kr0]
type = PorousFlowRelativePermeabilityCorey
phase = 0
n = 2
[]
[kr1]
type = PorousFlowRelativePermeabilityCorey
phase = 1
n = 2
[]
[]
[VectorPostprocessors]
[vpp]
type = LineValueSampler
warn_discontinuous_face_values = false
variable = 's0aux s1aux kr0aux kr1aux'
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 20
sort_by = id
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-8
[]
[BCs]
[sleft]
type = DirichletBC
variable = s1
value = 0
boundary = left
[]
[sright]
type = DirichletBC
variable = s1
value = 1
boundary = right
[]
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(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
[]
(test/tests/problems/eigen_problem/eigensolvers/gipm.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 100
ymin = 0
ymax = 100
elem_type = QUAD4
nx = 64
ny = 64
displacements = 'x_disp y_disp'
[]
#The minimum eigenvalue for this problem is 2*(pi/a)^2 + 2 with a = 100.
#Its inverse will be 0.49950700634518.
[Variables]
[./u]
order = first
family = LAGRANGE
[../]
[]
[AuxVariables]
[./x_disp]
[../]
[./y_disp]
[../]
[]
[AuxKernels]
[./x_disp]
type = FunctionAux
variable = x_disp
function = x_disp_func
[../]
[./y_disp]
type = FunctionAux
variable = y_disp
function = y_disp_func
[../]
[]
[Functions]
[./x_disp_func]
type = ParsedFunction
expression = 0
[../]
[./y_disp_func]
type = ParsedFunction
expression = 0
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
use_displaced_mesh = true
[../]
[./rea]
type = CoefReaction
variable = u
coefficient = 2.0
use_displaced_mesh = true
[../]
[./rhs]
type = CoefReaction
variable = u
coefficient = -1.0
use_displaced_mesh = true
extra_vector_tags = 'eigen'
[../]
[]
[BCs]
[./homogeneous]
type = DirichletBC
variable = u
boundary = '0 1 2 3'
value = 0
use_displaced_mesh = true
[../]
[./eigen_bc]
type = EigenDirichletBC
variable = u
boundary = '0 1 2 3'
use_displaced_mesh = true
[../]
[]
[Executioner]
type = Eigenvalue
eigen_problem_type = gen_non_hermitian
which_eigen_pairs = SMALLEST_MAGNITUDE
n_eigen_pairs = 1
n_basis_vectors = 18
solve_type = jacobi_davidson
petsc_options = '-eps_view'
[]
[VectorPostprocessors]
[./eigenvalues]
type = Eigenvalues
execute_on = 'timestep_end'
[../]
[]
[Outputs]
csv = true
execute_on = 'timestep_end'
[./console]
type = Console
outlier_variable_norms = false
[../]
[]
(test/tests/functions/piecewise_multilinear/twoD_const.i)
# PiecewiseMultilinear function tests in 2D
# See [Functions] block for a description of the tests
# The functions are compared with ParsedFunctions using postprocessors
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 2
nx = 4
ymin = -1
ymax = 1
ny = 4
[]
[Variables]
[./dummy]
[../]
[]
[Kernels]
[./dummy_u]
type = TimeDerivative
variable = dummy
[../]
[]
[AuxVariables]
[./constant]
family = MONOMIAL
order = CONSTANT
[../]
[./constant_ref]
family = MONOMIAL
order = CONSTANT
[../]
[./diff]
family = MONOMIAL
order = CONSTANT
[../]
[]
[AuxKernels]
[./const_AuxK]
type = FunctionAux
variable = constant
function = const_fcn
[../]
[./const_ref_AuxK]
type = FunctionAux
variable = constant_ref
function = const_ref
[../]
[./diff]
type = ParsedAux
variable = diff
expression = 'constant - constant_ref'
coupled_variables = 'constant constant_ref'
[../]
[]
[Functions]
[./const_fcn]
type = PiecewiseMulticonstant
direction = 'left right'
data_file = twoD_const.txt
[../]
[./const_ref]
type = ParsedFunction
expression = '
ix := if(x < 0.5, 0, if(x < 1, 1, 2));
iy := if(y > 0, 2, if(y > -0.5, 1, 0));
iy * 3 + ix
'
[../]
[]
[Postprocessors]
[./diff_pp]
type = ElementIntegralVariablePostprocessor
variable = diff
[../]
[]
[Executioner]
type = Transient
dt = 1
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = twoD_const
hide = dummy
exodus = true
[]
(tutorials/darcy_thermo_mech/step04_velocity_aux/tests/auxkernels/velocity_aux/velocity_aux.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[]
coord_type = RZ
rz_coord_axis = X
[]
[Variables]
[pressure]
[]
[]
[AuxVariables]
[velocity]
order = CONSTANT
family = MONOMIAL_VEC
[]
[]
[AuxKernels]
[velocity]
type = DarcyVelocity
variable = velocity
execute_on = timestep_end
pressure = pressure
[]
[]
[Functions]
[pressure_ic_func]
type = ParsedFunction
expression = 2000*x*y*x*y
[]
[]
[ICs]
[pressure_ic]
type = FunctionIC
variable = pressure
function = pressure_ic_func
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Materials]
[pressure]
type = ADGenericConstantMaterial
prop_values = '0.8451e-9 7.98e-4'
prop_names = 'permeability viscosity'
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(framework/contrib/hit/test/output.i)
# This tests the thermal expansion coefficient function using both
# options to specify that function: mean and instantaneous. There
# two blocks, each containing a single element, and these use the
# two variants of the function.
# In this test, the instantaneous CTE function has a constant value,
# while the mean CTE function is an analytic function designed to
# give the same response. If \bar{alpha}(T) is the mean CTE function,
# and \alpha(T) is the instantaneous CTE function,
# \bar{\alpha}(T) = 1/(T-Tref) \intA^{T}_{Tsf} \alpha(T) dT
# where Tref is the reference temperature used to define the mean CTE
# function, and Tsf is the stress-free temperature.
# The two models produce very similar results. There are slight
# differences due to the large deformation treatment.
[Mesh]
file = 'blocks.e'
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[]
[SolidMechanics]
[./solid]
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[left]
type = FunctionDirichletBC
variable = disp_x
function = 0.02*t
boundary = 3
[]
[back]
type = FunctionDirichletBC
variable = disp_z
function = 0.01*t
boundary = 1
[]
[]
[AuxKernels]
[./temp]
type = FunctionAux
variable = temp
block = '1 2'
function = temp_func
[../]
[]
[Materials]
[./mean_alpha]
type = Elastic
block = 1
youngs_modulus = 1e6
poissons_ratio = .3
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
temp = temp
thermal_expansion_function = cte_func_mean
stress_free_temperature = 0.0
thermal_expansion_reference_temperature = 0.5
thermal_expansion_function_type = mean
[../]
[./inst_alpha]
type = Elastic
block = 2
youngs_modulus = 1e6
poissons_ratio = .3
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
temp = temp
thermal_expansion_function = cte_func_inst
stress_free_temperature = 0.0
thermal_expansion_function_type = instantaneous
[../]
[]
[Functions]
[./cte_func_mean]
type = ParsedFunction
symbol_names = 'tsf tref scale' #stress free temp, reference temp, scale factor
symbol_values = '0.0 0.5 1e-4'
expression = 'scale * (t - tsf) / (t - tref)'
[../]
[./cte_func_inst]
type = PiecewiseLinear
xy_data = '0 1.0
2 1.0'
scale_factor = 1e-4
[../]
[./temp_func]
type = PiecewiseLinear
xy_data = '0 1
1 2'
[../]
[]
[Postprocessors]
[./disp_1]
type = NodalMaxValue
variable = disp_x
boundary = 101
[../]
[./disp_2]
type = NodalMaxValue
variable = disp_x
boundary = 102
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
l_max_its = 100
l_tol = 1e-4
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
start_time = 0.0
end_time = 1.0
dt = 0.1
[]
[Outputs]
file_base = const_alpha_out
exodus = true
csv = true
[]
(modules/porous_flow/examples/tidal/atm_tides_open_hole.i)
# A 100m x 10m "slab" of height 100m is subjected to cyclic pressure at its top
# Assumptions:
# the boundaries are impermeable, except the top boundary
# only vertical displacement is allowed
# the atmospheric pressure sets the total stress at the top of the model
# at the slab left-hand side there is a borehole that taps into the base of the slab.
[Mesh]
[the_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 1
nz = 10
xmin = 0
xmax = 100
ymin = -5
ymax = 5
zmin = -100
zmax = 0
[]
[bh_back]
type = ExtraNodesetGenerator
coord = '0 -5 -100'
input = the_mesh
new_boundary = 11
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
biot_coefficient = 0.6
multiply_by_density = false
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
scaling = 1E11
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = '-10000*z' # this is only approximately correct
[]
[]
[Functions]
[ini_stress_zz]
type = ParsedFunction
expression = '(25000 - 0.6*10000)*z' # remember this is effective stress
[]
[cyclic_porepressure]
type = ParsedFunction
expression = 'if(t>0,5000 * sin(2 * pi * t / 3600.0 / 24.0),0)'
[]
[cyclic_porepressure_at_depth]
type = ParsedFunction
expression = '-10000*z + if(t>0,5000 * sin(2 * pi * t / 3600.0 / 24.0),0)'
[]
[neg_cyclic_porepressure]
type = ParsedFunction
expression = '-if(t>0,5000 * sin(2 * pi * t / 3600.0 / 24.0),0)'
[]
[]
[BCs]
# zmin is called 'back'
# zmax is called 'front'
# ymin is called 'bottom'
# ymax is called 'top'
# xmin is called 'left'
# xmax is called 'right'
[no_x_disp]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'bottom top' # because of 1-element meshing, this fixes u_x=0 everywhere
[]
[no_y_disp]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top' # because of 1-element meshing, this fixes u_y=0 everywhere
[]
[no_z_disp_at_bottom]
type = DirichletBC
variable = disp_z
value = 0
boundary = back
[]
[pp]
type = FunctionDirichletBC
variable = porepressure
function = cyclic_porepressure
boundary = front
[]
[pp_downhole]
type = FunctionDirichletBC
variable = porepressure
function = cyclic_porepressure_at_depth
boundary = 11
[]
[total_stress_at_top]
type = FunctionNeumannBC
variable = disp_z
function = neg_cyclic_porepressure
boundary = front
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.0
bulk_modulus = 2E9
viscosity = 1E-3
density0 = 1000.0
[]
[]
[PorousFlowBasicTHM]
coupling_type = HydroMechanical
displacements = 'disp_x disp_y disp_z'
porepressure = porepressure
gravity = '0 0 -10'
fp = the_simple_fluid
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
bulk_modulus = 10.0E9 # drained bulk modulus
poissons_ratio = 0.25
[]
[strain]
type = ComputeSmallStrain
eigenstrain_names = ini_stress
[]
[stress]
type = ComputeLinearElasticStress
[]
[ini_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = '0 0 0 0 0 0 0 0 ini_stress_zz'
eigenstrain_name = ini_stress
[]
[porosity]
type = PorousFlowPorosityConst # only the initial value of this is ever used
porosity = 0.1
[]
[biot_modulus]
type = PorousFlowConstantBiotModulus
solid_bulk_compliance = 1E-10
fluid_bulk_modulus = 2E9
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[]
[density]
type = GenericConstantMaterial
prop_names = density
prop_values = 2500.0
[]
[]
[Postprocessors]
[p0_0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
[]
[p100_0]
type = PointValue
outputs = csv
point = '100 0 0'
variable = porepressure
[]
[p0_100]
type = PointValue
outputs = csv
point = '0 0 -100'
variable = porepressure
[]
[p100_100]
type = PointValue
outputs = csv
point = '100 0 -100'
variable = porepressure
[]
[uz0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = disp_z
[]
[uz100]
type = PointValue
outputs = csv
point = '100 0 0'
variable = disp_z
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = -3600
dt = 3600
end_time = 172800
nl_rel_tol = 1E-10
nl_abs_tol = 1E-5
[]
[Outputs]
print_linear_residuals = false
csv = true
[]
(test/tests/time_integrators/dirk/dirk-2d-heat-adap.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 4
ny = 4
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
start_time = 0.0
num_steps = 5
dt = 0.25
[./TimeIntegrator]
type = LStableDirk2
[../]
[./Adaptivity]
refine_fraction = 0.07
coarsen_fraction = 0.
max_h_level = 4
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/rz-x-axial-coord/hand-coded-jac-pipe-flow-natural-bc.i)
mu=1
rho=1
pipe_length=10 # m
pipe_radius=1 # m
u_inlet=1
[GlobalParams]
integrate_p_by_parts = true
supg = true
pspg = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${pipe_length}
ymin = 0
ymax = ${pipe_radius}
nx = 50
ny = 5
[]
coord_type = 'RZ'
rz_coord_axis = x
[]
[Variables]
[velocity_x]
family = LAGRANGE
[]
[velocity_y]
family = LAGRANGE
[]
[p][]
[]
[Kernels]
[mass]
type = INSMassRZ
variable = p
u = velocity_x
v = velocity_y
pressure = p
[]
[x_momentum]
type = INSMomentumLaplaceFormRZ
variable = velocity_x
u = velocity_x
v = velocity_y
pressure = p
component = 0
[]
[y_momentum]
type = INSMomentumLaplaceFormRZ
variable = velocity_y
u = velocity_x
v = velocity_y
pressure = p
component = 1
[]
[]
[Functions]
[vel_x_inlet]
type = ParsedFunction
expression = '${u_inlet} * (${pipe_radius}^2 - y^2)'
[]
[]
[BCs]
[inlet_x]
type = FunctionDirichletBC
variable = velocity_x
boundary = 'left'
function = vel_x_inlet
[]
[zero_y]
type = FunctionDirichletBC
variable = velocity_y
boundary = 'left top bottom'
function = 0
[]
[zero_x]
type = FunctionDirichletBC
variable = velocity_x
boundary = 'top'
function = 0
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
line_search = 'none'
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/examples/wave_propagation/cantilever_sweep.i)
# Frequency Response function for cantilever beam:
# Analytic results: 509Hz and 763Hz
# Simulation results with coarse mesh: 600Hz and 800Hz
[Mesh]
type = GeneratedMesh
elem_type = HEX8
dim = 3
xmin=0
xmax=1
nx=10
ymin=0
ymax=0.1
ny = 1
zmin=0
zmax=0.15
nz = 2
[]
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y disp_z'
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
group_variables = 'disp_x disp_y disp_z'
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = SMALL
add_variables = true
new_system = true
formulation = TOTAL
[]
[]
[]
[]
[Kernels]
#reaction terms
[reaction_realx]
type = Reaction
variable = disp_x
rate = 0# filled by controller
extra_vector_tags = 'ref'
[]
[reaction_realy]
type = Reaction
variable = disp_y
rate = 0# filled by controller
extra_vector_tags = 'ref'
[]
[reaction_realz]
type = Reaction
variable = disp_z
rate = 0# filled by controller
extra_vector_tags = 'ref'
[]
[]
[AuxVariables]
[disp_mag]
[]
[]
[AuxKernels]
[disp_mag]
type = ParsedAux
variable = disp_mag
coupled_variables = 'disp_x disp_y disp_z'
expression = 'sqrt(disp_x^2+disp_y^2+disp_z^2)'
[]
[]
[BCs]
#Left
[disp_x_left]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0.0
[]
[disp_y_left]
type = DirichletBC
variable = disp_y
boundary = 'left'
value = 0.0
[]
[disp_z_left]
type = DirichletBC
variable = disp_z
boundary = 'left'
value = 0.0
[]
#Right
[BC_right_yreal]
type = NeumannBC
variable = disp_y
boundary = 'right'
value = 1000
[]
[BC_right_zreal]
type = NeumannBC
variable = disp_z
boundary = 'right'
value = 1000
[]
[]
[Materials]
[elastic_tensor_Al]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 68e9
poissons_ratio = 0.36
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[]
[Postprocessors]
[dispMag]
type = NodalExtremeValue
value_type = max
variable = disp_mag
[]
[]
[Functions]
[./freq2]
type = ParsedFunction
symbol_names = density
symbol_values = 2.7e3 #Al kg/m3
expression = '-t*t*density'
[../]
[]
[Controls]
[./func_control]
type = RealFunctionControl
parameter = 'Kernels/*/rate'
function = 'freq2'
execute_on = 'initial timestep_begin'
[../]
[]
[Executioner]
type = Transient
solve_type=LINEAR
petsc_options_iname = ' -pc_type'
petsc_options_value = 'lu'
start_time = 300 #starting frequency
end_time = 1200 #ending frequency
nl_abs_tol = 1e-6
[TimeStepper]
type = ConstantDT
dt = 50 #frequency stepsize
[]
[]
[Outputs]
csv=true
exodus=false
console = false
[]
(test/tests/times/functor_times.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dx = 1
dim = 1
[]
[]
[Times]
[functor]
type = FunctorTimes
functor = 'f1'
[]
[]
[Functions]
[f1]
type = ParsedFunction
expression = '1 + x * 2'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
# Test recover
num_steps = 2
[]
[Outputs]
[out]
type = JSON
execute_system_information_on = none
[]
[]
(modules/peridynamics/test/tests/generalized_plane_strain/generalized_plane_strain_OSPD.i)
[GlobalParams]
displacements = 'disp_x disp_y'
scalar_out_of_plane_strain = scalar_strain_zz
[]
[Mesh]
type = PeridynamicsMesh
horizon_number = 3
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
[]
[gpd]
type = MeshGeneratorPD
input = gmg
retain_fe_mesh = false
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[scalar_strain_zz]
order = FIRST
family = SCALAR
[]
[]
[AuxVariables]
[temp]
order = FIRST
family = LAGRANGE
[]
[stress_zz]
order = FIRST
family = LAGRANGE
[]
[]
[Modules/Peridynamics/Mechanics]
[Master]
[all]
formulation = ORDINARY_STATE
[]
[]
[GeneralizedPlaneStrain]
[all]
formulation = ORDINARY_STATE
out_of_plane_stress_variable = stress_zz
[]
[]
[]
[AuxKernels]
[tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
use_displaced_mesh = false
[]
[stress_zz]
type = NodalRankTwoPD
variable = stress_zz
poissons_ratio = 0.3
youngs_modulus = 1e6
temperature = temp
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
rank_two_tensor = stress
output_type = component
index_i = 2
index_j = 2
[]
[]
[Postprocessors]
[react_z]
type = NodalVariableIntegralPD
variable = stress_zz
[]
[]
[Functions]
[tempfunc]
type = ParsedFunction
expression = '(1-x)*t'
[]
[]
[BCs]
[bottom_x]
type = DirichletBC
boundary = 1000
variable = disp_x
value = 0.0
[]
[bottom_y]
type = DirichletBC
boundary = 1000
variable = disp_y
value = 0.0
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
poissons_ratio = 0.3
youngs_modulus = 1e6
[]
[force_density]
type = ComputeSmallStrainVariableHorizonMaterialOSPD
temperature = temp
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
nl_rel_tol = 1e-15
nl_abs_tol = 1e-09
start_time = 0.0
end_time = 1.0
use_pre_SMO_residual = true
[]
[Outputs]
exodus = true
file_base = generalized_plane_strain_OSPD
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_action_stabilized_steady.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = steady-state
velocity_boundary = 'bottom right top left'
velocity_function = '0 0 0 0 lid_function 0 0 0'
initial_velocity = '1e-15 1e-15 0'
add_standard_velocity_variables_for_ad = false
pressure_pinned_node = 0
density_name = rho
dynamic_viscosity_name = mu
use_ad = true
laplace = true
family = LAGRANGE
order = FIRST
add_temperature_equation = true
fixed_temperature_boundary = 'bottom top'
temperature_function = '1 0'
supg = true
pspg = true
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[]
[]
[Functions]
[lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = 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/heat_transfer/test/tests/function_ellipsoid_heat_source/function_heat_source.i)
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -5.0
xmax = 5.0
nx = 10
ymin = -5.0
ymax = 5.0
ny = 10
zmin = 0.0
zmax = 1.0
nz = 1
[]
[Variables]
[./temp]
initial_condition = 300
[../]
[]
[Kernels]
[./time]
type = ADHeatConductionTimeDerivative
variable = temp
[../]
[./heat_conduct]
type = ADHeatConduction
variable = temp
thermal_conductivity = thermal_conductivity
[../]
[./heat_source]
type = ADMatHeatSource
material_property = volumetric_heat
variable = temp
[../]
[]
[BCs]
[./temp_bottom_fix]
type = ADDirichletBC
variable = temp
boundary = 1
value = 300
[../]
[]
[Materials]
[./heat]
type = ADHeatConductionMaterial
specific_heat = 603
thermal_conductivity = 10e-2
[../]
[./density]
type = ADGenericConstantMaterial
prop_names = 'density'
prop_values = '4.43e-6'
[../]
[./volumetric_heat]
type = FunctionPathEllipsoidHeatSource
rx = 1
ry = 1
rz = 1
power = 1000
efficiency = 0.5
factor = 2
function_x= path_x
function_y= path_y
function_z= path_z
[../]
[]
[Functions]
[./path_x]
type = ParsedFunction
expression = 2*cos(2.0*pi*t)
[../]
[./path_y]
type = ParsedFunction
expression = 2*sin(2.0*pi*t)
[../]
[./path_z]
type = ParsedFunction
expression = 1.0
[../]
[]
[Postprocessors]
[temp_max]
type = ElementExtremeValue
variable = temp
[]
[temp_min]
type = ElementExtremeValue
variable = temp
value_type = min
[]
[temp_avg]
type = ElementAverageValue
variable = temp
[]
[]
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'preonly lu superlu_dist'
l_max_its = 100
end_time = 1
dt = 0.1
dtmin = 1e-4
[]
[Outputs]
csv = true
[]
(test/tests/fvkernels/mms/non-orthogonal/extended-adr.i)
a=1.1
diff=1.1
[Mesh]
[./gen_mesh]
type = GeneratedMeshGenerator
dim = 2
xmin = 2
xmax = 3
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = TRI3
[../]
[]
[Variables]
[./v]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 1
type = MooseVariableFVReal
face_interp_method = vertex-based
[../]
[]
[FVKernels]
[./advection]
type = FVAdvection
variable = v
velocity = '${a} ${fparse 2*a} 0'
advected_interp_method = 'average'
[../]
[reaction]
type = FVReaction
variable = v
[]
[diff_v]
type = FVDiffusion
variable = v
coeff = ${diff}
use_point_neighbors = true
[]
[body_v]
type = FVBodyForce
variable = v
function = 'forcing'
[]
[]
[FVBCs]
[exact]
type = FVFunctionDirichletBC
boundary = 'left right top bottom'
function = 'exact'
variable = v
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = 'sin(x)*cos(y)'
[]
[forcing]
type = ParsedFunction
expression = '-2*a*sin(x)*sin(y) + a*cos(x)*cos(y) + 2*diff*sin(x)*cos(y) + sin(x)*cos(y)'
symbol_names = 'a diff'
symbol_values = '${a} ${diff}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'hypre'
[]
[Outputs]
csv = true
[]
[Postprocessors]
[./error]
type = ElementL2Error
variable = v
function = exact
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(test/tests/auxkernels/flux_average/flux_average.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./flux]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./bc_func]
type = ParsedFunction
expression = y+1
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[AuxKernels]
[./flux_average]
type = FluxAverageAux
variable = flux
coupled = u
diffusivity = 0.1
boundary = right
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = FunctionDirichletBC
variable = u
boundary = right
function = bc_func
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/convergence/1D/neumann.i)
# Simple 1D plane strain test
[GlobalParams]
displacements = 'disp_x'
large_kinematics = true
[]
[Variables]
[disp_x]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 1
nx = 10
[]
[]
[Kernels]
[sdx]
type = UpdatedLagrangianStressDivergence
variable = disp_x
component = 0
use_displaced_mesh = true
[]
[]
[Functions]
[pull]
type = ParsedFunction
expression = '200 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = right
variable = disp_x
value = 0.0
[]
[pull]
type = FunctionNeumannBC
boundary = left
variable = disp_x
function = pull
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[stress_base]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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 = 5.0
[]
[Postprocessors]
[nonlin]
type = NumNonlinearIterations
[]
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/fvkernels/mms/grad-reconstruction/mat-cartesian.i)
a=1.1
diff=1.1
[Mesh]
[gen_mesh]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
[]
[]
[Variables]
[v]
type = MooseVariableFVReal
initial_condition = 1
[]
[]
[FVKernels]
[advection]
type = FVElementalAdvection
variable = v
velocity = '${a} ${fparse 2 * a} 0'
advected_quantity = 'mat_u'
grad_advected_quantity = 'mat_grad_u'
[]
[reaction]
type = FVReaction
variable = v
[]
[diff_v]
type = FVDiffusion
variable = v
coeff = ${diff}
[]
[body_v]
type = FVBodyForce
variable = v
function = 'forcing'
[]
[]
[FVBCs]
[diri]
type = FVFunctionDirichletBC
boundary = 'left right top bottom'
function = 'exact'
variable = v
[]
[]
[Materials]
[mat]
type = ADCoupledGradientMaterial
mat_prop = 'mat_u'
grad_mat_prop = 'mat_grad_u'
u = v
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = 'sin(x)*cos(y)'
[]
[forcing]
type = ParsedFunction
expression = '-2*a*sin(x)*sin(y) + a*cos(x)*cos(y) + 2*diff*sin(x)*cos(y) + sin(x)*cos(y)'
symbol_names = 'a diff'
symbol_values = '${a} ${diff}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_shift_type -sub_pc_type'
petsc_options_value = 'asm NONZERO lu'
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[error]
type = ElementL2Error
variable = v
function = exact
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(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
[]
(test/tests/transfers/multiapp_userobject_transfer/two_pipe_sub.i)
[Mesh]
type = FileMesh
file = two_pipe.e
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[./var]
order = CONSTANT
family = MONOMIAL
block = p1
[../]
[]
[ICs]
[./var]
type = FunctionIC
variable = var
function = setvar
block = p1
[../]
[]
[Functions]
[./setvar]
type = ParsedFunction
expression = '1 + z * z'
[../]
[]
[UserObjects]
[./sub_app_uo]
type = LayeredAverage
direction = z
variable = var
num_layers = 10
execute_on = TIMESTEP_END
block = p1
[../]
[]
[Executioner]
type = Transient
[]
(modules/contact/test/tests/sliding_block/in_and_out/frictional_02_penalty.i)
# This is a benchmark test that checks constraint based frictional
# contact using the penalty method. In this test a sinusoidal
# displacement is applied in the horizontal direction to simulate
# a small block come in and out of contact as it slides down a larger block.
#
# The sinusoid is of the form 0.4sin(4t)+0.2 and a friction coefficient
# of 0.2 is used. The gold file is run on one processor and the benchmark
# case is run on a minimum of 4 processors to ensure no parallel variability
# in the contact pressure and penetration results. Further documentation can
# found in moose/modules/contact/doc/sliding_block/
#
[Mesh]
file = sliding_elastic_blocks_2d.e
patch_size = 80
[]
[GlobalParams]
volumetric_locking_correction = false
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[penetration]
[]
[inc_slip_x]
[]
[inc_slip_y]
[]
[accum_slip_x]
[]
[accum_slip_y]
[]
[]
[Functions]
[vertical_movement]
type = ParsedFunction
expression = -t
[]
[horizontal_movement]
type = ParsedFunction
expression = -0.04*sin(4*t)+0.02
[]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = true
strain = FINITE
[]
[]
[AuxKernels]
[zeroslip_x]
type = ConstantAux
variable = inc_slip_x
boundary = 3
execute_on = timestep_begin
value = 0.0
[]
[zeroslip_y]
type = ConstantAux
variable = inc_slip_y
boundary = 3
execute_on = timestep_begin
value = 0.0
[]
[accum_slip_x]
type = AccumulateAux
variable = accum_slip_x
accumulate_from_variable = inc_slip_x
execute_on = timestep_end
[]
[accum_slip_y]
type = AccumulateAux
variable = accum_slip_y
accumulate_from_variable = inc_slip_y
execute_on = timestep_end
[]
[penetration]
type = PenetrationAux
variable = penetration
boundary = 3
paired_boundary = 2
[]
[]
[Postprocessors]
[nonlinear_its]
type = NumNonlinearIterations
execute_on = timestep_end
[]
[penetration]
type = NodalVariableValue
variable = penetration
nodeid = 222
[]
[contact_pressure]
type = NodalVariableValue
variable = contact_pressure
nodeid = 222
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[]
[right_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = horizontal_movement
[]
[right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = vertical_movement
[]
[]
[Materials]
[left]
type = ComputeIsotropicElasticityTensor
block = '1 2'
youngs_modulus = 1e6
poissons_ratio = 0.3
constant_on = SUBDOMAIN
[]
[left_stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -sub_pc_type -pc_asm_overlap -ksp_gmres_restart'
petsc_options_value = 'asm lu 20 101'
line_search = 'none'
l_max_its = 100
nl_max_its = 1000
dt = 0.1
end_time = 15
num_steps = 1000
l_tol = 1e-3
nl_rel_tol = 1e-10
nl_abs_tol = 1e-6
dtmin = 0.01
[Predictor]
type = SimplePredictor
scale = 1.0
[]
[]
[Outputs]
time_step_interval = 10
[out]
type = Exodus
elemental_as_nodal = true
[]
[console]
type = Console
max_rows = 5
[]
[]
[Contact]
[leftright]
secondary = 3
primary = 2
model = coulomb
penalty = 4e+6
friction_coefficient = 0.2
formulation = penalty
normal_smoothing_distance = 0.1
[]
[]
(test/tests/functions/piecewise_multilinear/time.i)
# PiecewiseMultilinear function tests for time-dependent data
# See [Functions] block for a description of the tests
[Mesh]
type = GeneratedMesh
dim = 3
xmin = 0
xmax = 1
nx = 1
ymin = 0
ymax = 1
ny = 1
zmin = 0
zmax = 1
nz = 1
[]
[Variables]
[./dummy]
[../]
[]
[Kernels]
[./dummy_u]
type = TimeDerivative
variable = dummy
[../]
[]
[AuxVariables]
[./time1_var]
[../]
[]
[AuxKernels]
[./time1_AuxK]
type = FunctionAux
variable = time1_var
function = time1_fcn
[../]
[]
[Functions]
# This increases linearly: f = t
[./time1_fcn]
type = PiecewiseMultilinear
data_file = time1.txt
[../]
[./time1_answer]
type = ParsedFunction
expression = t
[../]
[]
[Postprocessors]
[./time1_pp]
type = NodalL2Error
function = time1_answer
variable = time1_var
[../]
[]
[Executioner]
type = Transient
dt = 0.1
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = time
hide = dummy
csv = true
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/cp_slip_rate_integ/crysp_substep.i)
[Mesh]
type = GeneratedMesh
dim = 3
elem_type = HEX8
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
block = 0
[../]
[./disp_y]
block = 0
[../]
[./disp_z]
block = 0
[../]
[]
[AuxVariables]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./fp_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./e_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./gss1]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[]
[Functions]
[./tdisp]
type = ParsedFunction
expression = 0.01*t
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_zz]
type = RankTwoAux
variable = stress_zz
rank_two_tensor = stress
index_j = 2
index_i = 2
execute_on = timestep_end
block = 0
[../]
[./fp_zz]
type = RankTwoAux
variable = fp_zz
rank_two_tensor = fp
index_j = 2
index_i = 2
execute_on = timestep_end
block = 0
[../]
[./e_zz]
type = RankTwoAux
variable = e_zz
rank_two_tensor = lage
index_j = 2
index_i = 2
execute_on = timestep_end
block = 0
[../]
[./gss1]
type = MaterialStdVectorAux
variable = gss1
property = gss
index = 0
execute_on = timestep_end
block = 0
[../]
[]
[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
[../]
[./tdisp]
type = FunctionDirichletBC
variable = disp_z
boundary = front
function = tdisp
[../]
[]
[Materials]
[./crysp]
type = FiniteStrainCPSlipRateRes
block = 0
gtol = 1e-2
slip_sys_file_name = input_slip_sys.txt
nss = 12
num_slip_sys_flowrate_props = 2 #Number of properties in a slip system
flowprops = '1 4 0.001 0.01 5 8 0.001 0.01 9 12 0.001 0.01'
hprops = '1.0 541.5 60.8 109.8 2.5'
gprops = '1 4 60.8 5 8 60.8 9 12 60.8'
tan_mod_type = exact
slip_incr_tol = 1
maximum_substep_iteration = 8
[../]
[./elasticity_tensor]
type = ComputeElasticityTensorCP
block = 0
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[]
[Postprocessors]
[./stress_zz]
type = ElementAverageValue
variable = stress_zz
block = 'ANY_BLOCK_ID 0'
[../]
[./fp_zz]
type = ElementAverageValue
variable = fp_zz
block = 'ANY_BLOCK_ID 0'
[../]
[./e_zz]
type = ElementAverageValue
variable = e_zz
block = 'ANY_BLOCK_ID 0'
[../]
[./gss1]
type = ElementAverageValue
variable = gss1
block = 'ANY_BLOCK_ID 0'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
dt = 0.2
dtmax = 10.0
dtmin = 0.05
end_time = 1
[]
[Outputs]
file_base = crysp_substep_out
exodus = true
print_linear_residuals = true
perf_graph = true
[]
(test/tests/auxkernels/lower_d_var/lower-d-aux-var.i)
[Mesh]
inactive = 'refine_left_and_top'
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[lower_left]
type = LowerDBlockFromSidesetGenerator
input = gen
sidesets = 'left'
new_block_name = 'lower_left'
[]
[lower_right]
type = LowerDBlockFromSidesetGenerator
input = lower_left
sidesets = 'right'
new_block_name = 'lower_right'
[]
[lower_top]
type = LowerDBlockFromSidesetGenerator
input = lower_right
sidesets = 'top'
new_block_name = 'lower_top'
[]
[lower_bottom]
type = LowerDBlockFromSidesetGenerator
input = lower_top
sidesets = 'bottom'
new_block_name = 'lower_bottom'
[]
[refine_left_and_top]
type = RefineSidesetGenerator
boundaries = 'left top'
refinement = '1 1'
boundary_side = 'primary primary'
input = lower_bottom
[]
[]
[Problem]
solve = false
[]
[AuxVariables]
[lower_constant]
family = MONOMIAL
order = CONSTANT
block = 'lower_top lower_right lower_bottom lower_left'
[]
[lower_first]
family = MONOMIAL
order = FIRST
block = 'lower_top lower_right lower_bottom lower_left'
[]
[higher]
family = MONOMIAL
order = CONSTANT
block = '0'
[]
[]
[AuxKernels]
[lower_constant]
type = MaterialRealAux
property = 'prop'
variable = lower_constant
boundary = 'top bottom right left'
[]
[lower_first]
type = MaterialRealAux
property = 'prop'
variable = lower_first
boundary = 'top bottom right left'
[]
[higher]
type = MaterialRealAux
property = 'prop'
variable = higher
block = 0
[]
[]
[Functions]
[func]
type = ParsedFunction
expression = 'x + y'
[]
[]
[Materials]
[func]
type = GenericFunctionMaterial
prop_names = 'prop'
prop_values = 'func'
[]
[]
[Outputs]
csv = true
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[avg_lower_constant_left]
type = ElementAverageValue
variable = lower_constant
block = lower_left
[]
[avg_lower_first_left]
type = ElementAverageValue
variable = lower_first
block = lower_left
[]
[avg_lower_constant_bottom]
type = ElementAverageValue
variable = lower_constant
block = lower_bottom
[]
[avg_lower_first_bottom]
type = ElementAverageValue
variable = lower_first
block = lower_bottom
[]
[avg_lower_constant_top]
type = ElementAverageValue
variable = lower_constant
block = lower_top
[]
[avg_lower_first_top]
type = ElementAverageValue
variable = lower_first
block = lower_top
[]
[avg_lower_constant_right]
type = ElementAverageValue
variable = lower_constant
block = lower_right
[]
[avg_lower_first_right]
type = ElementAverageValue
variable = lower_first
block = lower_right
[]
[]
(test/tests/interfacekernels/ik_displaced/displaced.i)
[Mesh]
displacements = 'disp_x disp_y'
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./break_boundary]
input = interface
type = BreakBoundaryOnSubdomainGenerator
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./v]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[../]
[./source_u]
type = BodyForce
variable = u
value = 1
[../]
[]
[InterfaceKernels]
[./interface]
type = InterfacialSource
variable = u
neighbor_var = v
boundary = primary0_interface
use_displaced_mesh = true
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 right top'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1'
[../]
[]
[Postprocessors]
[./u_int]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[../]
[./v_int]
type = ElementIntegralVariablePostprocessor
variable = v
block = 1
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
file_base = displaced
exodus = true
[]
[Functions]
[./disp_x_func]
type = ParsedFunction
expression = x
[../]
[./disp_y_func]
type = ParsedFunction
expression = y
[../]
[]
[ICs]
[./disp_x_ic]
function = disp_x_func
variable = disp_x
type = FunctionIC
[../]
[./disp_y_ic]
function = disp_y_func
variable = disp_y
type = FunctionIC
[../]
[]
(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/contact/test/tests/sliding_block/sliding/frictionless_aug.i)
# This is a benchmark test that checks constraint based frictionless
# contact using the augmented lagrangian method. In this test a constant
# displacement is applied in the horizontal direction to simulate
# a small block come sliding down a larger block.
#
# The gold file is run on one processor
# and the benchmark case is run on a minimum of 4 processors to ensure no
# parallel variability in the contact pressure and penetration results.
#
[Mesh]
file = sliding_elastic_blocks_2d.e
patch_size = 80
[]
[GlobalParams]
volumetric_locking_correction = false
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./saved_x]
[../]
[./saved_y]
[../]
[./contact_traction]
[../]
[./penetration]
[../]
[./inc_slip_x]
[../]
[./inc_slip_y]
[../]
[./accum_slip_x]
[../]
[./accum_slip_y]
[../]
[]
[Functions]
[./vertical_movement]
type = ParsedFunction
expression = -t
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
strain = FINITE
save_in = 'saved_x saved_y'
extra_vector_tags = 'ref'
[../]
[]
[AuxKernels]
[./zeroslip_x]
type = ConstantAux
variable = inc_slip_x
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./zeroslip_y]
type = ConstantAux
variable = inc_slip_y
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./accum_slip_x]
type = AccumulateAux
variable = accum_slip_x
accumulate_from_variable = inc_slip_x
execute_on = timestep_end
[../]
[./accum_slip_y]
type = AccumulateAux
variable = accum_slip_y
accumulate_from_variable = inc_slip_y
execute_on = timestep_end
[../]
[./penetration]
type = PenetrationAux
variable = penetration
boundary = 3
paired_boundary = 2
[../]
[]
[Postprocessors]
[./nonlinear_its]
type = NumNonlinearIterations
execute_on = timestep_end
[../]
[./penetration]
type = NodalVariableValue
variable = penetration
nodeid = 222
[../]
[./contact_pressure]
type = NodalVariableValue
variable = contact_pressure
nodeid = 222
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = 4
value = -0.02
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = vertical_movement
[../]
[]
[Materials]
[./left]
type = ComputeIsotropicElasticityTensor
block = '1 2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
dt = 0.1
end_time = 15
num_steps = 200
l_tol = 1e-6
nl_rel_tol = 1e-7
nl_abs_tol = 1e-6
dtmin = 0.01
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
[]
[Outputs]
time_step_interval = 10
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[./console]
type = Console
max_rows = 5
[../]
[]
[Problem]
type = AugmentedLagrangianContactProblem
solution_variables = 'disp_x disp_y'
extra_tag_vectors = 'ref'
reference_vector = 'ref'
maximum_lagrangian_update_iterations = 25
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Contact]
[./leftright]
secondary = 3
primary = 2
model = frictionless
penalty = 1e+7
normalize_penalty = true
formulation = augmented_lagrange
tangential_tolerance = 1e-3
normal_smoothing_distance = 0.1
al_penetration_tolerance = 1e-9
[../]
[]
(modules/fsi/test/tests/2d-small-strain-transient/fsi_flat_channel.i)
[GlobalParams]
gravity = '0 0 0'
integrate_p_by_parts = true
laplace = true
convective_term = true
transient_term = true
pspg = true
supg = true
displacements = 'disp_x disp_y'
preset = false
order = FIRST
use_displaced_mesh = true
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 3.0
ymin = 0
ymax = 1.0
nx = 10
ny = 15
elem_type = QUAD4
[]
[subdomain1]
type = SubdomainBoundingBoxGenerator
bottom_left = '0.0 0.5 0'
block_id = 1
top_right = '3.0 1.0 0'
input = gmg
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'master0_interface'
input = subdomain1
[]
[break_boundary]
type = BreakBoundaryOnSubdomainGenerator
input = interface
[]
[]
[Variables]
[./vel_x]
block = 0
[../]
[./vel_y]
block = 0
[../]
[./p]
block = 0
[../]
[./disp_x]
[../]
[./disp_y]
[../]
[./vel_x_solid]
block = 1
[../]
[./vel_y_solid]
block = 1
[../]
[]
[Kernels]
[./vel_x_time]
type = INSMomentumTimeDerivative
variable = vel_x
block = 0
[../]
[./vel_y_time]
type = INSMomentumTimeDerivative
variable = vel_y
block = 0
[../]
[./mass]
type = INSMass
variable = p
u = vel_x
v = vel_y
pressure = p
block = 0
disp_x = disp_x
disp_y = disp_y
[../]
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
block = 0
disp_x = disp_x
disp_y = disp_y
[../]
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
block = 0
disp_x = disp_x
disp_y = disp_y
[../]
[./vel_x_mesh]
type = ConvectedMesh
disp_x = disp_x
disp_y = disp_y
variable = vel_x
u = vel_x
v = vel_y
pressure = p
block = 0
[../]
[./vel_y_mesh]
type = ConvectedMesh
disp_x = disp_x
disp_y = disp_y
variable = vel_y
u = vel_x
v = vel_y
pressure = p
block = 0
[../]
[./p_mesh]
type = ConvectedMeshPSPG
disp_x = disp_x
disp_y = disp_y
variable = p
u = vel_x
v = vel_y
pressure = p
block = 0
[../]
[./disp_x_fluid]
type = Diffusion
variable = disp_x
block = 0
use_displaced_mesh = false
[../]
[./disp_y_fluid]
type = Diffusion
variable = disp_y
block = 0
use_displaced_mesh = false
[../]
[./accel_tensor_x]
type = CoupledTimeDerivative
variable = disp_x
v = vel_x_solid
block = 1
use_displaced_mesh = false
[../]
[./accel_tensor_y]
type = CoupledTimeDerivative
variable = disp_y
v = vel_y_solid
block = 1
use_displaced_mesh = false
[../]
[./vxs_time_derivative_term]
type = CoupledTimeDerivative
variable = vel_x_solid
v = disp_x
block = 1
use_displaced_mesh = false
[../]
[./vys_time_derivative_term]
type = CoupledTimeDerivative
variable = vel_y_solid
v = disp_y
block = 1
use_displaced_mesh = false
[../]
[./source_vxs]
type = MatReaction
variable = vel_x_solid
block = 1
mob_name = 1
use_displaced_mesh = false
[../]
[./source_vys]
type = MatReaction
variable = vel_y_solid
block = 1
mob_name = 1
use_displaced_mesh = false
[../]
[]
[InterfaceKernels]
[./penalty_interface_x]
type = CoupledPenaltyInterfaceDiffusion
variable = vel_x
neighbor_var = disp_x
secondary_coupled_var = vel_x_solid
boundary = master0_interface
penalty = 1e6
[../]
[./penalty_interface_y]
type = CoupledPenaltyInterfaceDiffusion
variable = vel_y
neighbor_var = disp_y
secondary_coupled_var = vel_y_solid
boundary = master0_interface
penalty = 1e6
[../]
[]
[Modules/TensorMechanics/Master]
[./solid_domain]
strain = SMALL
incremental = false
# generate_output = 'strain_xx strain_yy strain_zz' ## Not at all necessary, but nice
block = '1'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e2
poissons_ratio = 0.3
block = '1'
use_displaced_mesh = false
[../]
[./small_stress]
type = ComputeLinearElasticStress
block = 1
[../]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '1 1'
use_displaced_mesh = false
[../]
[]
[BCs]
[./fluid_x_no_slip]
type = DirichletBC
variable = vel_x
boundary = 'bottom'
value = 0.0
[../]
[./fluid_y_no_slip]
type = DirichletBC
variable = vel_y
boundary = 'bottom left_to_0'
value = 0.0
[../]
[./x_inlet]
type = FunctionDirichletBC
variable = vel_x
boundary = 'left_to_0'
function = 'inlet_func'
[../]
[./no_disp_x]
type = DirichletBC
variable = disp_x
boundary = 'bottom top left_to_1 right_to_1 left_to_0 right_to_0'
value = 0
[../]
[./no_disp_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom top left_to_1 right_to_1 left_to_0 right_to_0'
value = 0
[../]
[./solid_x_no_slip]
type = DirichletBC
variable = vel_x_solid
boundary = 'top left_to_1 right_to_1'
value = 0.0
[../]
[./solid_y_no_slip]
type = DirichletBC
variable = vel_y_solid
boundary = 'top left_to_1 right_to_1'
value = 0.0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
num_steps = 5
# num_steps = 60
dt = 0.1
dtmin = 0.1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = none
nl_rel_tol = 1e-50
nl_abs_tol = 1e-10
[]
[Outputs]
[./out]
type = Exodus
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '(-16 * (y - 0.25)^2 + 1) * (1 + cos(t))'
[../]
[]
(modules/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/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/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/phy.conservation_1phase.i)
# Tests conservation for heat transfer between a cylindrical heat structure and
# a 1-phase flow channel
[GlobalParams]
gravity_vector = '0 0 0'
scaling_factor_1phase = '1e-3 1e-3 1e-8'
scaling_factor_temperature = 1e-3
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
[]
[]
[SolidProperties]
[main-material]
type = ThermalFunctionSolidProperties
k = 1e4
cp = 500.0
rho = 100.0
[]
[]
[Functions]
[T0_fn]
type = ParsedFunction
expression = '290 + 20 * (y - 1)'
[]
[]
[Components]
[left_wall]
type = SolidWall1Phase
input = 'pipe:in'
[]
[pipe]
type = FlowChannel1Phase
fp = fp
position = '0 2 0'
orientation = '1 0 0'
length = 1.0
n_elems = 5
A = 1.0
initial_T = 300
initial_p = 1e5
initial_vel = 0
f = 0
[]
[right_wall]
type = SolidWall1Phase
input = 'pipe:out'
[]
[heat_transfer]
type = HeatTransferFromHeatStructure1Phase
flow_channel = pipe
hs = heat_structure
hs_side = inner
Hw = 1e3
[]
[heat_structure]
#type = set externally
num_rods = 5
position = '0 2 0'
orientation = '1 0 0'
length = 1.0
n_elems = 5
names = 'main'
solid_properties = 'main-material'
solid_properties_T_ref = '300'
widths = '1.0'
n_part_elems = '5'
initial_T = T0_fn
[]
[]
[Postprocessors]
[E_pipe]
type = ElementIntegralVariablePostprocessor
variable = rhoEA
block = pipe
execute_on = 'initial timestep_end'
[]
[E_heat_structure]
block = 'heat_structure:main'
n_units = 5
execute_on = 'initial timestep_end'
[]
[E_tot]
type = SumPostprocessor
values = 'E_pipe E_heat_structure'
execute_on = 'initial timestep_end'
[]
[E_tot_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = E_tot
compute_relative_change = true
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 0
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-3
l_max_its = 10
start_time = 0.0
dt = 0.01
num_steps = 5
abort_on_solve_fail = true
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Outputs]
file_base = 'phy.conservation_1phase_cylinder'
csv = true
show = 'E_tot_change'
execute_on = 'final'
[]
(test/tests/misc/deprecation/deprecate-old-for-new-param.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Functions]
[diff_func_x]
type = ParsedFunction
expression = 1/t
[]
[diff_func_y]
type = ParsedFunction
expression = 't*t + x'
[]
[]
[Kernels]
[diff]
type = VectorMatDiffusion
variable = u
coef = diffusion
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = '0'
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = '1'
[]
[]
[Materials]
[gfm]
type = GenericFunctionVectorMaterial
block = 0
prop_names = diffusion
prop_values = 'diff_func_x diff_func_y 0'
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/variable_inner_product/variable_inner_product.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmin = -1
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD9
[]
[AuxVariables]
[./f]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = leg2
[../]
[../]
[./g]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = leg1
[../]
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[Functions]
[./leg1]
type = ParsedFunction
expression = 'x'
[../]
[./leg2]
type = ParsedFunction
expression = '0.5*(3.0*x*x-1.0)'
[../]
[]
[BCs]
active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[./Quadrature]
order = fourth
[]
[]
[Postprocessors]
[./f_dot_g]
type = VariableInnerProduct
variable = f
second_variable = g
[../]
[./f_dot_f]
type = VariableInnerProduct
variable = f
second_variable = f
[../]
[./norm_f]
type = ElementL2Norm
variable = f
[../]
[]
[Outputs]
file_base = variable_inner_product
csv = true
[]
(test/tests/auxkernels/time_integration/time_integration.i)
# This test covers the usage of the VariableTimeIntegrationAux
# kernel. Here we test three different schemes for integrating a field
# variable in time. Midpoint, Trapezoidal, and Simpson's rule are
# used. For this test, we use a manufactured solution and we compare
# the Trapezoidal and Simpson's rule, which must be exact for this
# exact solution, which is a linear function of time.
#
# The set up problem is
#
# du/dt - Laplacian(u) = Q
#
# with exact solution: u = t*(x*x+y*y).
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD9
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
[]
[Functions]
[./dts]
type = PiecewiseLinear
x = '0.01 0.1'
y = '0.005 0.05'
[../]
[]
[Variables]
[./u]
initial_condition = 0.0
family = LAGRANGE
order = SECOND
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./timederivative]
type = TimeDerivative
variable = u
[../]
[./sourceterm]
type = BodyForce
variable = u
function = Source
[../]
[]
[AuxVariables]
[./v_midpoint]
[../]
[./v_trapazoid]
[../]
[./v_simpson]
[../]
[]
[AuxKernels]
[./MidpointTimeIntegrator]
type = VariableTimeIntegrationAux
variable_to_integrate = u
variable = v_midpoint
order = 1
[../]
[./TrapazoidalTimeIntegrator]
type = VariableTimeIntegrationAux
variable_to_integrate = u
variable = v_trapazoid
order = 2
[../]
[./SimpsonsTimeIntegrator]
type = VariableTimeIntegrationAux
variable_to_integrate = u
variable = v_simpson
order = 3
[../]
[]
[BCs]
[./RightBC]
type = FunctionDirichletBC
variable = u
function = RightBC
boundary = 'right'
[../]
[./LeftBC]
type = FunctionDirichletBC
variable = u
function = LeftBC
boundary = 'left'
[../]
[./TopBC]
type = FunctionDirichletBC
variable = u
function = TopBC
boundary = 'top'
[../]
[./BottomBC]
type = FunctionDirichletBC
variable = u
function = BottomBC
boundary = 'bottom'
[../]
[]
[Functions]
[./Soln]
type = ParsedFunction
expression = 't*(x*x+y*y)'
[../]
[./Source]
type = ParsedFunction
expression = '(x*x + y*y) - 4*t'
[../]
[./TopBC]
type = ParsedFunction
expression = 't*(x*x+1)'
[../]
[./BottomBC]
type = ParsedFunction
expression = 't*x*x'
[../]
[./RightBC]
type = ParsedFunction
expression = 't*(y*y+1)'
[../]
[./LeftBC]
type = ParsedFunction
expression = 't*y*y'
[../]
[]
[Postprocessors]
[./l2_error]
type = NodalL2Error
variable = u
function = Soln
[../]
[]
[Executioner]
type = Transient
end_time = 0.1
# dt = 0.1
# num_steps = 10
[./TimeStepper]
type = FunctionDT
function = dts
[../]
nl_abs_tol = 1.e-15
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/porous_flow/examples/restart/gravityeq.i)
# Initial run to establish gravity equilibrium. As only brine is present (no gas),
# we can use the single phase equation of state and kernels, reducing the computational
# cost. An estimate of the hydrostatic pressure gradient is used as the initial condition
# using an approximate brine density of 1060 kg/m^3.
# The end time is set to a large value (~100 years) to allow the pressure to reach
# equilibrium. Steady state detection is used to halt the run when a steady state is reached.
[Mesh]
type = GeneratedMesh
dim = 2
ny = 10
nx = 10
ymax = 100
xmax = 5000
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 -9.81 0'
temperature_unit = Celsius
[]
[Variables]
[porepressure]
[]
[]
[ICs]
[porepressure]
type = FunctionIC
function = ppic
variable = porepressure
[]
[]
[Functions]
[ppic]
type = ParsedFunction
expression = '10e6 + 1060*9.81*(100-y)'
[]
[]
[BCs]
[top]
type = DirichletBC
variable = porepressure
value = 10e6
boundary = top
[]
[]
[AuxVariables]
[temperature]
initial_condition = 50
[]
[xnacl]
initial_condition = 0.1
[]
[brine_density]
family = MONOMIAL
order = CONSTANT
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
variable = porepressure
[]
[flux0]
type = PorousFlowFullySaturatedDarcyFlow
variable = porepressure
[]
[]
[AuxKernels]
[brine_density]
type = PorousFlowPropertyAux
property = density
variable = brine_density
execute_on = 'initial timestep_end'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = porepressure
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[FluidProperties]
[brine]
type = BrineFluidProperties
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temperature
[]
[ps]
type = PorousFlow1PhaseFullySaturated
porepressure = porepressure
[]
[massfrac]
type = PorousFlowMassFraction
[]
[brine]
type = PorousFlowBrine
compute_enthalpy = false
compute_internal_energy = false
xnacl = xnacl
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-13 0 0 0 1e-13 0 0 0 1e-13'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 3e9
nl_abs_tol = 1e-12
nl_rel_tol = 1e-06
steady_state_detection = true
steady_state_tolerance = 1e-12
[TimeStepper]
type = IterationAdaptiveDT
dt = 1e1
[]
[]
[Outputs]
execute_on = 'initial timestep_end'
exodus = true
perf_graph = true
[]
(test/tests/variables/fe_hier/hier-1-3d.i)
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
nx = 5
ny = 5
elem_type = HEX8
[]
[Functions]
[./bc_fnt]
type = ParsedFunction
expression = 1
[../]
[./bc_fnb]
type = ParsedFunction
expression = -1
[../]
[./bc_fnl]
type = ParsedFunction
expression = -1
[../]
[./bc_fnr]
type = ParsedFunction
expression = 1
[../]
[./bc_fnf]
type = ParsedFunction
expression = 1
[../]
[./bc_fnk]
type = ParsedFunction
expression = -1
[../]
[./forcing_fn]
type = ParsedFunction
expression = x+y+z
[../]
[./solution]
type = ParsedGradFunction
expression = x+y+z
grad_x = 1
grad_y = 1
grad_z = 1
[../]
[]
[Variables]
[./u]
order = FIRST
family = HIERARCHIC
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./bc_top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = bc_fnt
[../]
[./bc_bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bc_fnb
[../]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[./bc_front]
type = FunctionNeumannBC
variable = u
boundary = 'front'
function = bc_fnf
[../]
[./bc_back]
type = FunctionNeumannBC
variable = u
boundary = 'back'
function = bc_fnk
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/convergence-auto/1D/neumann.i)
# Simple 1D plane strain test
[GlobalParams]
displacements = 'disp_x'
large_kinematics = true
stabilize_strain = true
[]
[Variables]
[disp_x]
[]
[]
[ICs]
[disp_x]
type = RandomIC
variable = disp_x
min = -0.1
max = 0.1
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 1
nx = 10
[]
[]
[Kernels]
[sdx]
type = TotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[]
[Functions]
[pull]
type = ParsedFunction
expression = '200 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = right
variable = disp_x
value = 0.0
[]
[pull]
type = FunctionNeumannBC
boundary = left
variable = disp_x
function = pull
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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 = 5.0
dtmin = 5.0
end_time = 5.0
[]
(modules/thermal_hydraulics/test/tests/components/heat_structure_base/interior_axial_boundaries.i)
# This input file is used to test that the interior axial boundaries of a
# heat structure are being created correctly.
#
# To test this, an arbitrary temperature distribution is imposed on the heat
# structure, and the average temperature on the interior axial boundaries is
# tested against expected values.
#
# The interior axial boundaries are located at x={20,40}, and radial boundaries
# are located at y={0,0.5,1,1.5}. The temperature is set to be T(x,y) = xy. The
# following table gives the resulting expected average temperature values on
# each face:
# Boundary T_avg
# -----------------------------------
# hs:radial1:axial1:axial2 5
# hs:radial1:axial2:axial3 10
# hs:radial2:axial1:axial2 15
# hs:radial2:axial2:axial3 30
# hs:radial3:axial1:axial2 25
# hs:radial3:axial2:axial3 50
[Functions]
[initial_T_fn]
type = ParsedFunction
expression = 'x * y'
[]
[]
[SolidProperties]
[hs_mat]
type = ThermalFunctionSolidProperties
k = 1
cp = 1
rho = 1
[]
[]
[Components]
[hs]
type = HeatStructurePlate
position = '0 0 0'
orientation = '1 0 0'
length = '20 20 20'
n_elems = '2 2 2'
axial_region_names = 'axial1 axial2 axial3'
names = 'radial1 radial2 radial3'
widths = '0.5 0.5 0.5'
n_part_elems = '2 2 2'
solid_properties = 'hs_mat hs_mat hs_mat'
solid_properties_T_ref = '300 300 300'
depth = 1.0
initial_T = initial_T_fn
[]
[]
[Postprocessors]
[T_avg_radial1_axial1_axial2]
type = SideAverageValue
variable = T_solid
boundary = 'hs:radial1:axial1:axial2'
execute_on = 'INITIAL'
[]
[T_avg_radial1_axial2_axial3]
type = SideAverageValue
variable = T_solid
boundary = 'hs:radial1:axial2:axial3'
execute_on = 'INITIAL'
[]
[T_avg_radial2_axial1_axial2]
type = SideAverageValue
variable = T_solid
boundary = 'hs:radial2:axial1:axial2'
execute_on = 'INITIAL'
[]
[T_avg_radial2_axial2_axial3]
type = SideAverageValue
variable = T_solid
boundary = 'hs:radial2:axial2:axial3'
execute_on = 'INITIAL'
[]
[T_avg_radial3_axial1_axial2]
type = SideAverageValue
variable = T_solid
boundary = 'hs:radial3:axial1:axial2'
execute_on = 'INITIAL'
[]
[T_avg_radial3_axial2_axial3]
type = SideAverageValue
variable = T_solid
boundary = 'hs:radial3:axial2:axial3'
execute_on = 'INITIAL'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
csv = true
execute_on = 'INITIAL'
[]
(modules/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
[]
(test/tests/userobjects/shape_element_user_object/shape_side_uo_physics_test.i)
u_left = 0.5
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./pot]
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./adv_u]
type = PotentialAdvection
variable = u
potential = pot
[../]
[./diff_pot]
type = Diffusion
variable = pot
[../]
[]
[BCs]
[./left]
boundary = left
type = DirichletBC
value = ${u_left}
variable = u
[../]
[./right]
boundary = right
type = DirichletBC
variable = u
value = 0
[../]
[./left_pot]
boundary = left
type = ExampleShapeSideIntegratedBC
variable = pot
num_user_object = num_user_object
denom_user_object = denom_user_object
v = u
Vb = 1
[../]
[./right_pot]
boundary = right
type = DirichletBC
variable = pot
value = 0
[../]
[]
[UserObjects]
[./num_user_object]
type = NumShapeSideUserObject
u = u
boundary = left
execute_on = 'linear nonlinear'
[../]
[./denom_user_object]
type = DenomShapeSideUserObject
u = u
boundary = left
execute_on = 'linear nonlinear'
[../]
[]
[AuxVariables]
[./u_flux]
family = MONOMIAL
order = CONSTANT
[../]
[]
[AuxKernels]
[./u_flux]
type = DriftDiffusionFluxAux
variable = u_flux
u = u
potential = pot
component = 0
[../]
[]
[Problem]
type = FEProblem
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
petsc_options_iname = '-pc_type -sub_pc_type -sub_ksp_type'
petsc_options_value = 'asm lu preonly'
[]
[Outputs]
exodus = true
perf_graph = true
[]
[ICs]
[./u]
type = FunctionIC
variable = u
function = ic_u
[../]
[./pot]
type = FunctionIC
variable = pot
function = ic_pot
[../]
[]
[Functions]
[./ic_u]
type = ParsedFunction
expression = '${u_left} * (1 - x)'
[../]
[./ic_pot]
type = ParsedFunction
expression = '1 - x'
[../]
[]
(test/tests/bcs/nodal_normals/cylinder_hexes.i)
[Mesh]
file = cylinder-hexes.e
[]
[Functions]
[./all_bc_fn]
type = ParsedFunction
expression = x*x+y*y
[../]
[./f_fn]
type = ParsedFunction
expression = -4
[../]
[]
[NodalNormals]
boundary = '1'
corner_boundary = 100
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = f_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = 'all_bc_fn'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-13
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/contact/test/tests/simple_contact/simple_contact_rspherical.i)
#
# This is similar to the patch test for 1D spherical elements with the
# addition of a contact interface.
#
# The 1D mesh is pinned at x=0. The displacement at the outer node is set to
# -3e-3*X where X is the x-coordinate of that node. That gives a strain of
# -3e-3 for the x, y, and z directions.
#
# Young's modulus is 1e6, and Poisson's ratio is 0.25. This gives:
#
# Stress xx, yy, zz = E/(1+nu)/(1-2nu)*strain*((1-nu) + nu + nu) = -6000
#
[Problem]
coord_type = RSPHERICAL
[]
[Mesh]
file = simple_contact_rspherical.e
construct_side_list_from_node_list = true
[]
[GlobalParams]
displacements = 'disp_x'
[]
[Functions]
[./ur]
type = ParsedFunction
expression = '-3e-3*x'
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz'
[../]
[]
[BCs]
[./ur]
type = FunctionDirichletBC
variable = disp_x
boundary = '1 4'
function = ur
[../]
[]
[Contact]
[./fred]
primary = 2
secondary = 3
[../]
[]
[Materials]
[./stiffStuff1]
type = ComputeIsotropicElasticityTensor
block = '1 2 3'
youngs_modulus = 1e6
poissons_ratio = 0.25
[../]
[./stiffStuff1_stress]
type = ComputeFiniteStrainElasticStress
block = '1 2 3'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -ksp_gmres_restart'
petsc_options_value = 'lu 101'
line_search = 'none'
nl_abs_tol = 1e-7
nl_rel_tol = 1e-11
l_max_its = 20
start_time = 0.0
dt = 1.0
num_steps = 1
end_time = 1.0
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/nodal_extreme_value/nodal_extreme_pps_test.i)
[Mesh]
type = FileMesh
file = trapezoid.e
uniform_refine = 1
# This test will not work in parallel with DistributedMesh enabled
# due to a bug in PeriodicBCs.
parallel_type = replicated
[]
[Functions]
[./tr_x]
type = ParsedFunction
expression = -x*cos(pi/3)
[../]
[./tr_y]
type = ParsedFunction
expression = x*sin(pi/3)
[../]
[./itr_x]
type = ParsedFunction
expression = -x/cos(pi/3)
[../]
[./itr_y]
type = ParsedFunction
expression = 0
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./forcing]
type = GaussContForcing
variable = u
x_center = 2
y_center = -1
x_spread = 0.25
y_spread = 0.5
[../]
[./dot]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
# active = ' '
[./Periodic]
[./x]
primary = 1
secondary = 4
transform_func = 'tr_x tr_y'
inv_transform_func = 'itr_x itr_y'
[../]
[../]
[]
[Postprocessors]
[./max_nodal_pps]
type = NodalExtremeValue
variable = u
[../]
[./max_node_id]
type = NodalMaxValueId
variable = u
[../]
[./min_nodal_pps]
type = NodalExtremeValue
variable = u
value_type = min
[../]
[]
[Executioner]
type = Transient
dt = 0.5
num_steps = 6
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/mms/supg/supg_mms_test.i)
mu=1.5
rho=2.5
[GlobalParams]
gravity = '0 0 0'
supg = true
convective_term = true
integrate_p_by_parts = false
laplace = true
u = vel_x
v = vel_y
pressure = p
alpha = 1
order = SECOND
family = LAGRANGE
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
elem_type = QUAD9
nx = 4
ny = 4
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./vel_x]
[../]
[./vel_y]
[../]
[./p]
order = FIRST
[../]
[]
[Kernels]
# mass
[./mass]
type = INSMass
variable = p
[../]
# x-momentum, space
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
component = 0
forcing_func = vel_x_source_func
[../]
# y-momentum, space
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
component = 1
forcing_func = vel_y_source_func
[../]
[./p_source]
type = BodyForce
function = p_source_func
variable = p
[../]
[]
[BCs]
[./vel_x]
type = FunctionDirichletBC
preset = false
boundary = 'left right top bottom'
function = vel_x_func
variable = vel_x
[../]
[./vel_y]
type = FunctionDirichletBC
preset = false
boundary = 'left right top bottom'
function = vel_y_func
variable = vel_y
[../]
[./p]
type = FunctionDirichletBC
preset = false
boundary = 'left right top bottom'
function = p_func
variable = p
[../]
[]
[Functions]
[./vel_x_source_func]
type = ParsedFunction
expression = '-${mu}*(-0.028*pi^2*x^2*sin(0.2*pi*x*y) - 0.028*pi^2*y^2*sin(0.2*pi*x*y) - 0.1*pi^2*sin(0.5*pi*x) - 0.4*pi^2*sin(pi*y)) + ${rho}*(0.14*pi*x*cos(0.2*pi*x*y) + 0.4*pi*cos(pi*y))*(0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3) + ${rho}*(0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x))*(0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5) + 0.1*pi*y*cos(0.2*pi*x*y) + 0.25*pi*cos(0.5*pi*x)'
[../]
[./vel_y_source_func]
type = ParsedFunction
expression = '-${mu}*(-0.018*pi^2*x^2*sin(0.3*pi*x*y) - 0.018*pi^2*y^2*sin(0.3*pi*x*y) - 0.384*pi^2*sin(0.8*pi*x) - 0.027*pi^2*sin(0.3*pi*y)) + ${rho}*(0.06*pi*x*cos(0.3*pi*x*y) + 0.09*pi*cos(0.3*pi*y))*(0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3) + ${rho}*(0.06*pi*y*cos(0.3*pi*x*y) + 0.48*pi*cos(0.8*pi*x))*(0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5) + 0.1*pi*x*cos(0.2*pi*x*y) + 0.3*pi*cos(0.3*pi*y)'
[../]
[./p_source_func]
type = ParsedFunction
expression = '-0.06*pi*x*cos(0.3*pi*x*y) - 0.14*pi*y*cos(0.2*pi*x*y) - 0.2*pi*cos(0.5*pi*x) - 0.09*pi*cos(0.3*pi*y)'
[../]
[./vel_x_func]
type = ParsedFunction
expression = '0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5'
[../]
[./vel_y_func]
type = ParsedFunction
expression = '0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3'
[../]
[./p_func]
type = ParsedFunction
expression = '0.5*sin(0.5*pi*x) + 1.0*sin(0.3*pi*y) + 0.5*sin(0.2*pi*x*y) + 0.5'
[../]
[./vxx_func]
type = ParsedFunction
expression = '0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x)'
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
[./exodus]
type = Exodus
[../]
[./csv]
type = CSV
[../]
[]
[Postprocessors]
[./L2vel_x]
type = ElementL2Error
variable = vel_x
function = vel_x_func
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2vel_y]
variable = vel_y
function = vel_y_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2p]
variable = p
function = p_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2vxx]
variable = vxx
function = vxx_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[]
[AuxVariables]
[./vxx]
family = MONOMIAL
order = FIRST
[../]
[]
[AuxKernels]
[./vxx]
type = VariableGradientComponent
component = x
variable = vxx
gradient_variable = vel_x
[../]
[]
(test/tests/controls/time_periods/dgkernels/dgkernels.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]
[Adaptivity]
marker = uniform_marker
[Markers]
[uniform_marker]
type = UniformMarker
mark = REFINE
[]
[]
[]
[Variables]
[u]
order = FIRST
family = MONOMIAL
initial_condition = 1
[]
[]
[Functions]
[forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[]
[exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[abs] # u * v
type = Reaction
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[DGKernels]
[dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[]
[dg_diff2]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 4
[]
[]
[BCs]
[all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
num_steps = 4
dt = 1
nl_rel_tol = 1e-10
[]
[Outputs]
exodus = true
[]
[Controls]
[dg_problem]
type = TimePeriod
enable_objects = 'DGKernels/dg_diff2'
disable_objects = 'DGKernel::dg_diff'
start_time = '2'
execute_on = 'initial timestep_begin'
[]
[]
(test/tests/kernels/ad_scalar_kernel_constraint/scalar_constraint_together.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[exact_fn]
type = ParsedFunction
value = 'x*x+y*y'
[]
[ffn]
type = ParsedFunction
value = -4
[]
[bottom_bc_fn]
type = ParsedFunction
value = -2*y
[]
[right_bc_fn]
type = ParsedFunction
value = 2*x
[]
[top_bc_fn]
type = ParsedFunction
value = 2*y
[]
[left_bc_fn]
type = ParsedFunction
value = -2*x
[]
[]
[Variables]
[u]
family = LAGRANGE
order = SECOND
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[Kernels]
[diff]
type = ADDiffusion
variable = u
[]
[ffnk]
type = ADBodyForce
variable = u
function = ffn
[]
[sk_lm]
type = ADScalarLMKernel
variable = u
kappa = lambda
pp_name = pp
value = 2.666666666666666
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[bottom]
type = ADFunctionNeumannBC
variable = u
boundary = 'bottom'
function = bottom_bc_fn
[]
[right]
type = ADFunctionNeumannBC
variable = u
boundary = 'right'
function = right_bc_fn
[]
[top]
type = ADFunctionNeumannBC
variable = u
boundary = 'top'
function = top_bc_fn
[]
[left]
type = ADFunctionNeumannBC
variable = u
boundary = 'left'
function = left_bc_fn
[]
[]
[Postprocessors]
# integrate the volume of domain since original objects set
# int(phi)=V0, rather than int(phi-V0)=0
[pp]
type = FunctionElementIntegral
function = 1
execute_on = initial
[]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Steady
residual_and_jacobian_together = true
nl_rel_tol = 1e-9
l_tol = 1.e-10
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
solve_type = NEWTON
[]
[Outputs]
# exodus = true
csv = true
hide = lambda
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_action.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
elem_type = QUAD9
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = transient
velocity_boundary = 'bottom right top left'
velocity_function = '0 0 0 0 lid_function 0 0 0'
pressure_pinned_node = 0
density_name = rho
dynamic_viscosity_name = mu
laplace = true
family = LAGRANGE
order = SECOND
add_temperature_equation = true
temperature_variable = T
initial_temperature = 1
thermal_conductivity_name = k
specific_heat_name = cp
natural_temperature_boundary = 'left right'
fixed_temperature_boundary = 'top bottom'
temperature_function = '0 1'
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[]
[]
[Functions]
[lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'asm 2 ilu 4'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
file_base = lid_driven_out
exodus = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/umat/steps/elastic_temperature_steps_uo_durations.i)
# Testing the UMAT Interface - linear elastic model using the large strain formulation.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[]
[Functions]
[top_pull_step2]
type = ParsedFunction
expression = (t-5.0)/20
[]
# Forced evolution of temperature
[temperature_load]
type = ParsedFunction
expression = '273'
[]
[]
[AuxVariables]
[temperature]
[]
[]
[AuxKernels]
[temperature_function]
type = FunctionAux
variable = temperature
function = temperature_load
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
generate_output = 'stress_yy'
[]
[]
[BCs]
[y_step1]
type = DirichletBC
variable = disp_y
boundary = top
value = 0.0
[]
[y_pull_function_step2]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = top_pull_step2
[]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[z_bot]
type = DirichletBC
variable = disp_z
boundary = front
value = 0.0
[]
[]
[Controls]
[step1]
type = StepPeriod
enable_objects = 'BCs::y_step1'
disable_objects = 'BCs::y_pull_function_step2'
step_user_object = step_uo
step_number = 0
[]
[step2]
type = StepPeriod
enable_objects = 'BCs::y_pull_function_step2'
disable_objects = 'BCs::y_step1'
step_user_object = step_uo
step_number = 1
[]
[]
[UserObjects]
[step_uo]
type = StepUserObject
step_durations = '5'
[]
[]
[Materials]
[umat]
type = AbaqusUMATStress
constant_properties = '1000 0.3'
plugin = '../../../plugins/elastic_temperature'
num_state_vars = 0
temperature = temperature
use_one_based_indexing = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
num_steps = 10
dt = 1.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/mms/channel-flow/cylindrical/2d-rc.i)
mu=1.1
rho=1.1
advected_interp_method='average'
velocity_interp_method='rc'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
[]
[]
[Problem]
coord_type = 'RZ'
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 1
[]
[v]
type = INSFVVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[mass_forcing]
type = FVBodyForce
variable = pressure
function = forcing_p
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[u_forcing]
type = INSFVBodyForce
variable = u
functor = forcing_u
momentum_component = 'x'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[v_forcing]
type = INSFVBodyForce
variable = v
functor = forcing_v
momentum_component = 'y'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'bottom'
variable = u
function = 'exact_u'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'bottom'
variable = v
function = 'exact_v'
[]
[no-slip-wall-u]
type = INSFVNoSlipWallBC
boundary = 'right'
variable = u
function = 'exact_u'
[]
[no-slip-wall-v]
type = INSFVNoSlipWallBC
boundary = 'right'
variable = v
function = 'exact_v'
[]
[outlet-p]
type = INSFVOutletPressureBC
boundary = 'top'
variable = pressure
function = 'exact_p'
[]
[axis-u]
type = INSFVSymmetryVelocityBC
boundary = 'left'
variable = u
u = u
v = v
mu = ${mu}
momentum_component = x
[]
[axis-v]
type = INSFVSymmetryVelocityBC
boundary = 'left'
variable = v
u = u
v = v
mu = ${mu}
momentum_component = y
[]
[axis-p]
type = INSFVSymmetryPressureBC
boundary = 'left'
variable = pressure
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'sin(x*pi)^2*sin((1/2)*y*pi)'
[]
[exact_rhou]
type = ParsedFunction
expression = 'rho*sin(x*pi)^2*sin((1/2)*y*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[forcing_u]
type = ParsedFunction
expression = '(1/4)*pi^2*mu*sin(x*pi)^2*sin((1/2)*y*pi) - pi*sin(x*pi)*cos((1/2)*y*pi) + (4*x*pi*rho*sin(x*pi)^3*sin((1/2)*y*pi)^2*cos(x*pi) + rho*sin(x*pi)^4*sin((1/2)*y*pi)^2)/x + (-x*pi*rho*sin(x*pi)^2*sin((1/2)*y*pi)*sin(y*pi)*cos(x*pi) + (1/2)*x*pi*rho*sin(x*pi)^2*cos(x*pi)*cos((1/2)*y*pi)*cos(y*pi))/x - (-2*x*pi^2*mu*sin(x*pi)^2*sin((1/2)*y*pi) + 2*x*pi^2*mu*sin((1/2)*y*pi)*cos(x*pi)^2 + 2*pi*mu*sin(x*pi)*sin((1/2)*y*pi)*cos(x*pi))/x'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_v]
type = ParsedFunction
expression = 'cos(x*pi)*cos(y*pi)'
[]
[exact_rhov]
type = ParsedFunction
expression = 'rho*cos(x*pi)*cos(y*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[forcing_v]
type = ParsedFunction
expression = 'pi^2*mu*cos(x*pi)*cos(y*pi) - 2*pi*rho*sin(y*pi)*cos(x*pi)^2*cos(y*pi) - 1/2*pi*sin((1/2)*y*pi)*cos(x*pi) - (-x*pi^2*mu*cos(x*pi)*cos(y*pi) - pi*mu*sin(x*pi)*cos(y*pi))/x + (-x*pi*rho*sin(x*pi)^3*sin((1/2)*y*pi)*cos(y*pi) + 2*x*pi*rho*sin(x*pi)*sin((1/2)*y*pi)*cos(x*pi)^2*cos(y*pi) + rho*sin(x*pi)^2*sin((1/2)*y*pi)*cos(x*pi)*cos(y*pi))/x'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'cos(x*pi)*cos((1/2)*y*pi)'
[]
[forcing_p]
type = ParsedFunction
expression = '-pi*rho*sin(y*pi)*cos(x*pi) + (2*x*pi*rho*sin(x*pi)*sin((1/2)*y*pi)*cos(x*pi) + rho*sin(x*pi)^2*sin((1/2)*y*pi))/x'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm 200 lu NONZERO'
line_search = 'none'
[]
[Outputs]
csv = true
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[./L2u]
type = ElementL2Error
variable = u
function = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[./L2v]
type = ElementL2Error
variable = v
function = exact_v
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[./L2p]
variable = pressure
function = exact_p
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[]
(test/tests/postprocessors/num_adaptivity_cycles/num_adaptivity_cycles_toggle_adaptivity_wait.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1
solve_type = 'PJFNK'
[]
[Adaptivity]
cycles_per_step = 1
marker = box
max_h_level = 2
initial_steps = 4
initial_marker = initial_box
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = dont_mark
type = BoxMarker
[../]
[./initial_box]
type = BoxMarker
bottom_left = '0.8 0.1 0'
top_right = '0.9 0.2 0'
inside = refine
outside = dont_mark
[../]
[../]
[]
[UserObjects]
[./toggle_adaptivity]
type = ToggleMeshAdaptivity
mesh_adaptivity = 'off'
apply_after_timestep = 1
[../]
[]
[Postprocessors]
[./adaptivity_cycles]
type = NumAdaptivityCycles
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
csv = true
[]
(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/solid_mechanics/test/tests/lagrangian/cartesian/total/cross_material/convergence/plastic_j2.i)
# Simple 3D test
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = false
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 4
nz = 4
[]
[]
[ICs]
[disp_x]
type = RandomIC
variable = disp_x
min = -0.02
max = 0.02
[]
[disp_y]
type = RandomIC
variable = disp_y
min = -0.02
max = 0.02
[]
[disp_z]
type = RandomIC
variable = disp_z
min = -0.02
max = 0.02
[]
[]
[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
[]
[]
[Functions]
[pullx]
type = ParsedFunction
expression = '4000 * t'
[]
[pully]
type = ParsedFunction
expression = '-2000 * t'
[]
[pullz]
type = ParsedFunction
expression = '3000 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = left
variable = disp_y
value = 0.0
[]
[leftz]
type = DirichletBC
preset = true
boundary = left
variable = disp_z
value = 0.0
[]
[pull_x]
type = FunctionNeumannBC
boundary = right
variable = disp_x
function = pullx
[]
[pull_y]
type = FunctionNeumannBC
boundary = top
variable = disp_y
function = pully
[]
[pull_z]
type = FunctionNeumannBC
boundary = right
variable = disp_z
function = pullz
[]
[]
[UserObjects]
[./str]
type = SolidMechanicsHardeningPowerRule
value_0 = 100.0
epsilon0 = 1.0
exponent = 1.0
[../]
[./j2]
type = SolidMechanicsPlasticJ2
yield_strength = str
yield_function_tolerance = 1E-3
internal_constraint_tolerance = 1E-9
[../]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianWrappedStress
[]
[compute_stress_base]
type = ComputeMultiPlasticityStress
plastic_models = j2
ep_plastic_tolerance = 1E-9
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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
[]
(modules/fsi/test/tests/fsi_acoustics/wave_height_bc/wave_height_bc.i)
# Test for `FluidFreeSurfaceBC` BC with only the fluid domain. The domain is 3D with
# lengths 1 X 1 X 0.01 meters. It is subjected to a 2D Gaussian initial condition
# with the peak at the midpoint (0.5, 0.5, 0.01). Wave heights are recorded at the
# midpoint at different times. The recorded wave heights should match with the values
# that are provided.
# Input parameters:
# Dimensions = 3
# Lengths = 1 X 1 X 0.01 meters
# Fluid speed of sound = 1500 m/s
# Initial condition = 0.00001*exp(-((x-0.5)/0.1)^2-((y-0.5)/0.1)^2)
# Fluid domain = true
# Fluid BCs = pressures are zero on all the four edges of the domain and `FluidFreeSurfaceBC` is applied on the front
# Structural domain = false
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 15
ny = 15
nz = 1
xmax = 1
ymax = 1
zmax = 0.01
[]
[]
[GlobalParams]
[]
[Variables]
[./p]
[../]
[]
[AuxVariables]
[./Wave1]
[../]
[]
[Kernels]
[./diffusion]
type = Diffusion
variable = 'p'
[../]
[./inertia]
type = AcousticInertia
variable = p
[../]
[]
[AuxKernels]
[./waves]
type = WaveHeightAuxKernel
variable = 'Wave1'
pressure = p
density = 1e-6
gravity = 9.81
execute_on = timestep_end
[../]
[]
[BCs]
[./leftright_pressure]
type = DirichletBC
variable = p
boundary = 'left right top bottom'
value = 0
[../]
[./free]
type = FluidFreeSurfaceBC
variable = p
boundary = 'front'
alpha = '0.1'
[]
[]
[ICs]
[./u_ic]
type = FunctionIC
variable = 'p'
function = initial_cond
boundary = 'front'
[../]
[]
[Functions]
[./initial_cond]
type = ParsedFunction
expression = '0.00001*exp(-((x-0.5)/0.1)^2-((y-0.5)/0.1)^2)'
[../]
[]
[Materials]
[./co_sq]
type = GenericConstantMaterial
prop_names = inv_co_sq
prop_values = 4.44e-7
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
start_time = 0.0
end_time = 0.2
dt = 0.005
dtmin = 0.00001
nl_abs_tol = 1e-12
nl_rel_tol = 1e-12
l_tol = 1e-12
l_max_its = 25
timestep_tolerance = 1e-8
automatic_scaling = true
[TimeIntegrator]
type = NewmarkBeta
[]
[]
[Postprocessors]
[./W1]
type = PointValue
point = '0.5 0.5 0.01'
variable = Wave1
[../]
[]
[Outputs]
csv = true
perf_graph = true
print_linear_residuals = true
[]
(test/tests/bcs/nodal_normals/cylinder_hexes_2nd.i)
[Mesh]
file = cylinder-hexes-2nd.e
[]
[Functions]
[./all_bc_fn]
type = ParsedFunction
expression = x*x+y*y
[../]
[./f_fn]
type = ParsedFunction
expression = -4
[../]
[]
[NodalNormals]
boundary = '1'
corner_boundary = 100
order = SECOND
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = f_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = 'all_bc_fn'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-13
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/action/action_3d.i)
# 3D mixed test
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[base]
type = FileMeshGenerator
file = '3d.exo'
[]
[sidesets]
type = SideSetsFromNormalsGenerator
input = base
normals = '-1 0 0
1 0 0
0 -1 0
0 1 0
'
' 0 0 -1
0 0 1'
fixed_normal = true
new_boundary = 'left right bottom top back front'
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = FINITE
add_variables = true
new_system = true
formulation = TOTAL
volumetric_locking_correction = false
constraint_types = 'stress strain strain strain stress strain strain strain strain'
targets = 'stress11 strain21 strain31 strain12 stress22 strain32 strain13 strain23 strain33'
generate_output = 'pk1_stress_xx pk1_stress_xy pk1_stress_xz pk1_stress_yx pk1_stress_yy '
'pk1_stress_yz pk1_stress_zx pk1_stress_zy pk1_stress_zz '
'deformation_gradient_xx deformation_gradient_xy deformation_gradient_xz '
'deformation_gradient_yx deformation_gradient_yy deformation_gradient_yz '
'deformation_gradient_zx deformation_gradient_zy deformation_gradient_zz'
[]
[]
[]
[]
[Functions]
[stress11]
type = ParsedFunction
expression = '120.0*t'
[]
[stress22]
type = ParsedFunction
expression = '65*t'
[]
[strain33]
type = ParsedFunction
expression = '8.0e-2*t'
[]
[strain23]
type = ParsedFunction
expression = '2.0e-2*t'
[]
[strain13]
type = ParsedFunction
expression = '-7.0e-2*t'
[]
[strain12]
type = ParsedFunction
expression = '1.0e-2*t'
[]
[strain32]
type = ParsedFunction
expression = '1.0e-2*t'
[]
[strain31]
type = ParsedFunction
expression = '2.0e-2*t'
[]
[strain21]
type = ParsedFunction
expression = '-1.5e-2*t'
[]
[zero]
type = ConstantFunction
value = 0
[]
[]
[BCs]
[Periodic]
[x]
variable = disp_x
auto_direction = 'x y z'
[]
[y]
variable = disp_y
auto_direction = 'x y z'
[]
[z]
variable = disp_z
auto_direction = 'x y z'
[]
[]
[fix1_x]
type = DirichletBC
boundary = "fix_all"
variable = disp_x
value = 0
[]
[fix1_y]
type = DirichletBC
boundary = "fix_all"
variable = disp_y
value = 0
[]
[fix1_z]
type = DirichletBC
boundary = "fix_all"
variable = disp_z
value = 0
[]
[fix2_x]
type = DirichletBC
boundary = "fix_xy"
variable = disp_x
value = 0
[]
[fix2_y]
type = DirichletBC
boundary = "fix_xy"
variable = disp_y
value = 0
[]
[fix3_z]
type = DirichletBC
boundary = "fix_z"
variable = disp_z
value = 0
[]
[]
[Materials]
[elastic_tensor_1]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
block = '1'
[]
[elastic_tensor_2]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 120000.0
poissons_ratio = 0.21
block = '2'
[]
[elastic_tensor_3]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 80000.0
poissons_ratio = 0.4
block = '3'
[]
[elastic_tensor_4]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 76000.0
poissons_ratio = 0.11
block = '4'
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
large_kinematics = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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 = 20
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 1.0
[]
[Outputs]
[out]
type = Exodus
file_base = '3d'
[]
[]
(modules/heat_transfer/test/tests/code_verification/cylindrical_test_no3.i)
# Problem II.3
#
# The thermal conductivity of an infinitely long hollow cylinder varies
# linearly with temperature: k = k0(1+beta*u). The tube inside radius is ri and
# outside radius is ro. It has a constant internal heat generation q and
# is exposed to the same constant temperature on both surfaces: u(ri) = u(ro) = uo.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
xmin = 0.2
nx = 4
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Problem]
coord_type = RZ
[]
[Functions]
[./exact]
type = ParsedFunction
symbol_names = 'q k0 ri ro beta u0'
symbol_values = '1200 1 0.2 1.0 1e-3 0'
expression = 'u0+(1/beta)*( ( 1 + 0.5*beta*((ro^2-x^2)-(ro^2-ri^2) * log(ro/x)/log(ro/ri))*q/k0 )^0.5 - 1)'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[./heatsource]
type = HeatSource
function = 1200
variable = u
[../]
[]
[BCs]
[./uo]
type = DirichletBC
boundary = 'left right'
variable = u
value = 0
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat'
prop_values = '1.0 1.0'
[../]
[./thermal_conductivity]
type = ParsedMaterial
property_name = 'thermal_conductivity'
coupled_variables = u
expression = '1 * (1 + 1e-3*u)'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = true
[]
(test/tests/meshdivisions/nearest_position_division.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 3
dx = '1.5 2.4 0.1'
dy = '1.3 0.9'
dz = '0.4 0.5 0.6 0.7'
ix = '2 1 1'
iy = '2 3'
iz = '1 1 1 1'
[]
# To keep VPP output consistently ordered
allow_renumbering = false
[]
[Positions]
[input]
type = InputPositions
# avoid indetermination
positions = '0.0001 0 0
1 0 0
1.46543 2.1233 3.1211'
[]
[]
[MeshDivisions]
[nearest_pos_div]
type = NearestPositionsDivision
positions = input
[]
[]
[Functions]
[xf]
type = ParsedFunction
expression = 'x'
[]
[]
[AuxVariables]
[div]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[mesh_div]
type = MeshDivisionAux
variable = div
mesh_division = 'nearest_pos_div'
[]
[]
[VectorPostprocessors]
[div_out]
type = ElementValueSampler
variable = 'div'
sort_by = 'id'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/thermal_expansion/ad_constant_expansion_coeff.i)
# This test involves only thermal expansion strains on a 2x2x2 cube of approximate
# steel material. An initial temperature of 25 degrees C is given for the material,
# and an auxkernel is used to calculate the temperature in the entire cube to
# raise the temperature each time step. After the first timestep,in which the
# temperature jumps, the temperature increases by 6.25C each timestep.
# The thermal strain increment should therefore be
# 6.25 C * 1.3e-5 1/C = 8.125e-5 m/m.
# This test is also designed to be used to identify problems with restart files
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./temp]
[../]
[]
[Functions]
[./temperature_load]
type = ParsedFunction
expression = t*(500.0)+300.0
[../]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[./all]
strain = SMALL
incremental = true
add_variables = true
eigenstrain_names = eigenstrain
generate_output = 'strain_xx strain_yy strain_zz'
use_automatic_differentiation = true
[../]
[../]
[../]
[]
[Kernels]
[./tempfuncaux]
type = Diffusion
variable = temp
[../]
[]
[BCs]
[./x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./z_bot]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[./temp]
type = FunctionDirichletBC
variable = temp
function = temperature_load
boundary = 'left right'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./small_stress]
type = ADComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain]
type = ADComputeThermalExpansionEigenstrain
stress_free_temperature = 298
thermal_expansion_coeff = 1.3e-5
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
end_time = 0.075
dt = 0.0125
dtmin = 0.0001
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[./strain_xx]
type = ElementAverageValue
variable = strain_xx
[../]
[./strain_yy]
type = ElementAverageValue
variable = strain_yy
[../]
[./strain_zz]
type = ElementAverageValue
variable = strain_zz
[../]
[./temperature]
type = AverageNodalVariableValue
variable = temp
[../]
[]
(modules/solid_mechanics/test/tests/action/reduced_eigenstrain_action.i)
#
# This test checks whether the ComputeReducedOrderEigenstrain is functioning properly
# when using the automatic_eigenstrain_names within the SolidMechanics QuasiStatic Physics. These
# results should match the results found in the eigenstrain folder for reducedOrderRZLinear.i
#
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = false
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 1
xmax = 3
xmin = 1
ymax = 1
ymin = 0
#second_order = true
[]
[Problem]
solve = false
[]
[Functions]
[./tempLinear]
type = ParsedFunction
expression = '715-5*x'
[../]
[./tempQuadratic]
type = ParsedFunction
expression = '2.5*x*x-15*x+722.5'
[../]
[./tempCubic]
type = ParsedFunction
expression = '-1.25*x*x*x+11.25*x*x-33.75*x+733.75'
[../]
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
initial_condition = 700
[../]
[]
[AuxVariables]
[./hydro_constant]
order = CONSTANT
family = MONOMIAL
[../]
[./hydro_first]
order = FIRST
family = MONOMIAL
[../]
[./hydro_second]
order = SECOND
family = MONOMIAL
[../]
[./sxx_constant]
order = CONSTANT
family = MONOMIAL
[../]
[./sxx_first]
order = FIRST
family = MONOMIAL
[../]
[./sxx_second]
order = SECOND
family = MONOMIAL
[../]
[./szz_constant]
order = CONSTANT
family = MONOMIAL
[../]
[./szz_first]
order = FIRST
family = MONOMIAL
[../]
[./szz_second]
order = SECOND
family = MONOMIAL
[../]
[./temp2]
order = FIRST
family = LAGRANGE
initial_condition = 700
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
add_variables = true
strain = SMALL
incremental = true
temperature = temp2
automatic_eigenstrain_names = true
[../]
[]
[Kernels]
[./heat]
type = Diffusion
variable = temp
[../]
[]
[AuxKernels]
[./hydro_constant_aux]
type = RankTwoScalarAux
variable = hydro_constant
rank_two_tensor = stress
scalar_type = Hydrostatic
[../]
[./hydro_first_aux]
type = RankTwoScalarAux
variable = hydro_first
rank_two_tensor = stress
scalar_type = Hydrostatic
[../]
[./hydro_second_aux]
type = RankTwoScalarAux
variable = hydro_second
rank_two_tensor = stress
scalar_type = Hydrostatic
[../]
[./sxx_constant_aux]
type = RankTwoAux
variable = sxx_constant
rank_two_tensor = stress
index_i = 0
index_j = 0
[../]
[./sxx_first_aux]
type = RankTwoAux
variable = sxx_first
rank_two_tensor = stress
index_i = 0
index_j = 0
[../]
[./sxx_second_aux]
type = RankTwoAux
variable = sxx_second
rank_two_tensor = stress
index_i = 0
index_j = 0
[../]
[./szz_constant_aux]
type = RankTwoAux
variable = szz_constant
rank_two_tensor = stress
index_i = 2
index_j = 2
[../]
[./szz_first_aux]
type = RankTwoAux
variable = szz_first
rank_two_tensor = stress
index_i = 2
index_j = 2
[../]
[./szz_second_aux]
type = RankTwoAux
variable = szz_second
rank_two_tensor = stress
index_i = 2
index_j = 2
[../]
[./temp2]
type = FunctionAux
variable = temp2
function = tempLinear
execute_on = timestep_begin
[../]
[]
[BCs]
[./no_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom top'
value = 0.0
[../]
[./temp_right]
type = DirichletBC
variable = temp
boundary = right
value = 700
[../]
[./temp_left]
type = DirichletBC
variable = temp
boundary = left
value = 710
[../]
[]
[Materials]
[./fuel_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1
poissons_ratio = 0
[../]
[./fuel_thermal_expansion]
type = ComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 1
temperature = temp2
stress_free_temperature = 700.0
eigenstrain_name = 'thermal_eigenstrain'
[../]
[./reduced_order_eigenstrain]
type = ComputeReducedOrderEigenstrain
input_eigenstrain_names = 'thermal_eigenstrain'
eigenstrain_name = 'reduced_eigenstrain'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew '
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type'
petsc_options_value = '70 hypre boomeramg'
num_steps = 1
nl_rel_tol = 1e-8 #1e-12
[]
[Postprocessors]
[./_dt]
type = TimestepSize
[../]
[]
[VectorPostprocessors]
[./hydro]
type = LineValueSampler
warn_discontinuous_face_values = false
num_points = 100
start_point = '1 0.07e-3 0'
end_point = '3 0.07e-3 0'
sort_by = x
variable = 'hydro_constant hydro_first hydro_second temp2 disp_x disp_y'
[../]
[]
[Outputs]
exodus = true
[]
(modules/xfem/test/tests/solid_mechanics_basic/edge_crack_2d_propagation.i)
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[XFEM]
geometric_cut_userobjects = 'cut_mesh'
qrule = volfrac
output_cut_plane = true
[]
[Mesh]
[block]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
elem_type = QUAD4
[]
[]
[UserObjects]
[./cut_mesh]
type = MeshCut2DFunctionUserObject
mesh_file = 2D_edge_crack.e
growth_direction_x = growth_func_x
growth_direction_y = growth_func_y
growth_rate = growth_func_v
[../]
[]
[Functions]
[./growth_func_x]
type = ParsedFunction
expression = 0.4*t
[../]
[./growth_func_y]
type = ParsedFunction
expression = 1.8*(t-1)
[../]
[./growth_func_v]
type = ParsedFunction
expression = 0.1*t
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
planar_formulation = plane_strain
add_variables = true
generate_output = 'stress_xx stress_yy vonmises_stress'
[../]
[]
[Functions]
[./top_trac_y]
type = ConstantFunction
value = 10
[../]
[]
[BCs]
[./top_y]
type = FunctionNeumannBC
boundary = top
variable = disp_y
function = top_trac_y
[../]
[./bottom_x]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[../]
[./bottom_y]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
block = 0
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
line_search = 'none'
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
# controls for linear iterations
l_max_its = 100
l_tol = 1e-2
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
# time control
start_time = 0.0
dt = 1.0
end_time = 2.0
max_xfem_update = 2
[]
[Outputs]
exodus = true
execute_on = TIMESTEP_END
[xfemcutter]
type=XFEMCutMeshOutput
xfem_cutter_uo=cut_mesh
[]
[./console]
type = Console
output_linear = true
[../]
[]
(modules/solid_mechanics/examples/coal_mining/cosserat_mc_wp_sticky.i)
# Strata deformation and fracturing around a coal mine
#
# A 2D geometry is used that simulates a transverse section of
# the coal mine. The model is actually 3D, but the "x"
# dimension is only 10m long, meshed with 1 element, and
# there is no "x" displacement. The mine is 400m deep
# and just the roof is studied (0<=z<=400). The model sits
# between 0<=y<=450. The excavation sits in 0<=y<=150. This
# is a "half model": the boundary conditions are such that
# the model simulates an excavation sitting in -150<=y<=150
# inside a model of the region -450<=y<=450. The
# excavation height is 3m (ie, the excavation lies within
# 0<=z<=3).
#
# Time is meaningless in this example
# as quasi-static solutions are sought at each timestep, but
# the number of timesteps controls the resolution of the
# process.
#
# The boundary conditions for this elastic simulation are:
# - disp_x = 0 everywhere
# - disp_y = 0 at y=0 and y=450
# - disp_z = 0 at z=0, but there is a time-dependent
# Young's modulus that simulates excavation
# - wc_x = 0 at y=0 and y=450.
# That is, rollers on the sides, free at top,
# and prescribed at bottom in the unexcavated portion.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa. The initial stress is consistent with
# the weight force from density 2500 kg/m^3, ie, stress_zz = -0.025*(300-z) MPa
# where gravity = 10 m.s^-2 = 1E-5 MPa m^2/kg. The maximum and minimum
# principal horizontal stresses are assumed to be equal to 0.8*stress_zz.
#
# Material properties:
# Young's modulus = 8 GPa
# Poisson's ratio = 0.25
# Cosserat layer thickness = 1 m
# Cosserat-joint normal stiffness = large
# Cosserat-joint shear stiffness = 1 GPa
# MC cohesion = 3 MPa
# MC friction angle = 37 deg
# MC dilation angle = 8 deg
# MC tensile strength = 1 MPa
# MC compressive strength = 100 MPa, varying down to 1 MPa when tensile strain = 1
# WeakPlane cohesion = 0.1 MPa
# WeakPlane friction angle = 30 deg
# WeakPlane dilation angle = 10 deg
# WeakPlane tensile strength = 0.1 MPa
# WeakPlane compressive strength = 100 MPa softening to 1 MPa at strain = 1
#
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
xmin = -5
xmax = 5
nz = 40
zmin = 0
zmax = 403.003
bias_z = 1.1
ny = 30 # make this a multiple of 3, so y=150 is at a node
ymin = 0
ymax = 450
[]
[left]
type = SideSetsAroundSubdomainGenerator
block = 0
new_boundary = 11
normal = '0 -1 0'
input = generated_mesh
[]
[right]
type = SideSetsAroundSubdomainGenerator
block = 0
new_boundary = 12
normal = '0 1 0'
input = left
[]
[front]
type = SideSetsAroundSubdomainGenerator
block = 0
new_boundary = 13
normal = '-1 0 0'
input = right
[]
[back]
type = SideSetsAroundSubdomainGenerator
block = 0
new_boundary = 14
normal = '1 0 0'
input = front
[]
[top]
type = SideSetsAroundSubdomainGenerator
block = 0
new_boundary = 15
normal = '0 0 1'
input = back
[]
[bottom]
type = SideSetsAroundSubdomainGenerator
block = 0
new_boundary = 16
normal = '0 0 -1'
input = top
[]
[excav]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '-5 0 0'
top_right = '5 150 3'
input = bottom
[]
[roof]
type = SideSetsAroundSubdomainGenerator
block = 1
new_boundary = 18
normal = '0 0 1'
input = excav
[]
[]
[GlobalParams]
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
[]
[Variables]
[./disp_y]
[../]
[./disp_z]
[../]
[./wc_x]
[../]
[]
[Kernels]
[./cy_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_y
component = 1
[../]
[./cz_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_z
component = 2
[../]
[./x_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[../]
[./x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[../]
[./gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6 # remember this is in MPa
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./wc_y]
[../]
[./wc_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[../]
[./stress_yx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yx
index_i = 1
index_j = 0
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zx
index_i = 2
index_j = 0
[../]
[./stress_zy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zy
index_i = 2
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./mc_shear]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_internal_parameter
variable = mc_shear
[../]
[./mc_tensile]
type = MaterialStdVectorAux
index = 1
property = mc_plastic_internal_parameter
variable = mc_tensile
[../]
[./wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
[../]
[./wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
[../]
[./mc_shear_f]
type = MaterialStdVectorAux
index = 6
property = mc_plastic_yield_function
variable = mc_shear_f
[../]
[./mc_tensile_f]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_yield_function
variable = mc_tensile_f
[../]
[./wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
[../]
[./wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
[../]
[]
[BCs]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '11 12'
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '16'
value = 0.0
[../]
[./no_wc_x]
type = DirichletBC
variable = wc_x
boundary = '11 12'
value = 0.0
[../]
[./roof]
type = StickyBC
variable = disp_z
min_value = -3.0
boundary = '18'
[../]
[]
[Functions]
[./ini_xx]
type = ParsedFunction
expression = '-0.8*2500*10E-6*(403.003-z)'
[../]
[./ini_zz]
type = ParsedFunction
expression = '-2500*10E-6*(403.003-z)'
[../]
[./excav_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval slope'
symbol_values = '1.0 0 150.0 1E-9 1 15'
# excavation face at ymin+(ymax-ymin)*min(t/end_t,1)
# slope is the distance over which the modulus reduces from maxval to minval
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,if(y<ymin+(ymax-ymin)*min(t/end_t,1)+slope,minval+(maxval-minval)*(y-(ymin+(ymax-ymin)*min(t/end_t,1)))/slope,maxval))'
[../]
[./density_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval'
symbol_values = '1.0 0 150.0 0 2500'
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,maxval)'
[../]
[]
[UserObjects]
[./mc_coh_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 2.99 # MPa
value_residual = 3.01 # MPa
rate = 1.0
[../]
[./mc_fric]
type = SolidMechanicsHardeningConstant
value = 0.65 # 37deg
[../]
[./mc_dil]
type = SolidMechanicsHardeningConstant
value = 0.15 # 8deg
[../]
[./mc_tensile_str_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.0 # MPa
rate = 1.0
[../]
[./mc_compressive_str]
type = SolidMechanicsHardeningCubic
value_0 = 100 # Large!
value_residual = 100
internal_limit = 0.1
[../]
[./wp_coh_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_tan_fric]
type = SolidMechanicsHardeningConstant
value = 0.36 # 20deg
[../]
[./wp_tan_dil]
type = SolidMechanicsHardeningConstant
value = 0.18 # 10deg
[../]
[./wp_tensile_str_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_compressive_str_soften]
type = SolidMechanicsHardeningCubic
value_0 = 100
value_residual = 1
internal_limit = 1.0
[../]
[]
[Materials]
[./elasticity_tensor_0]
type = ComputeLayeredCosseratElasticityTensor
block = 0
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
[../]
[./elasticity_tensor_1]
type = ComputeLayeredCosseratElasticityTensor
block = 1
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
elasticity_tensor_prefactor = excav_sideways
[../]
[./strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[../]
[./ini_stress]
type = ComputeEigenstrainFromInitialStress
eigenstrain_name = ini_stress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
[../]
[./stress_0]
# this is needed so as to correctly apply the initial stress
type = ComputeMultipleInelasticCosseratStress
block = 0
inelastic_models = 'mc wp'
cycle_models = true
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./stress_1]
type = ComputeMultipleInelasticCosseratStress
block = 1
inelastic_models = ''
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./mc]
type = CappedMohrCoulombCosseratStressUpdate
warn_about_precision_loss = false
host_youngs_modulus = 8E3
host_poissons_ratio = 0.25
base_name = mc
tensile_strength = mc_tensile_str_strong_harden
compressive_strength = mc_compressive_str
cohesion = mc_coh_strong_harden
friction_angle = mc_fric
dilation_angle = mc_dil
max_NR_iterations = 100000
smoothing_tol = 0.1 # MPa # Must be linked to cohesion
yield_function_tol = 1E-9 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[../]
[./wp]
type = CappedWeakPlaneCosseratStressUpdate
warn_about_precision_loss = false
base_name = wp
cohesion = wp_coh_harden
tan_friction_angle = wp_tan_fric
tan_dilation_angle = wp_tan_dil
tensile_strength = wp_tensile_str_harden
compressive_strength = wp_compressive_str_soften
max_NR_iterations = 10000
tip_smoother = 0.1
smoothing_tol = 0.1 # MPa # Note, this must be tied to cohesion, otherwise get no possible return at cone apex
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0E-3
[../]
[./density_0]
type = GenericConstantMaterial
block = 0
prop_names = density
prop_values = 2500
[../]
[./density_1]
type = GenericFunctionMaterial
block = 1
prop_names = density
prop_values = density_sideways
[../]
[]
[Postprocessors]
[./subs_max]
type = PointValue
point = '0 0 403.003'
variable = disp_z
use_displaced_mesh = false
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
line_search = bt
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
l_max_its = 30
nl_max_its = 1000
start_time = 0.0
dt = 0.01
end_time = 1.0
[]
[Outputs]
file_base = cosserat_mc_wp_sticky
time_step_interval = 1
print_linear_residuals = false
exodus = true
csv = true
console = true
[]
(test/tests/kernels/scalar_kernel_constraint/scalar_constraint_kernel.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[exact_fn]
type = ParsedFunction
value = 'x*x+y*y'
[]
[ffn]
type = ParsedFunction
value = -4
[]
[bottom_bc_fn]
type = ParsedFunction
value = -2*y
[]
[right_bc_fn]
type = ParsedFunction
value = 2*x
[]
[top_bc_fn]
type = ParsedFunction
value = 2*y
[]
[left_bc_fn]
type = ParsedFunction
value = -2*x
[]
[]
[Variables]
[u]
family = LAGRANGE
order = SECOND
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[ffnk]
type = BodyForce
variable = u
function = ffn
[]
[sk_lm]
type = ScalarLMKernel
variable = u
kappa = lambda
pp_name = pp
value = 2.666666666666666
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bottom_bc_fn
[]
[right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = right_bc_fn
[]
[top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = top_bc_fn
[]
[left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = left_bc_fn
[]
[]
[Postprocessors]
# integrate the volume of domain since original objects set
# int(phi)=V0, rather than int(phi-V0)=0
[pp]
type = FunctionElementIntegral
function = 1
execute_on = initial
[]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-9
l_tol = 1.e-10
nl_max_its = 10
# This example builds an indefinite matrix, so "-pc_type hypre -pc_hypre_type boomeramg" cannot
# be used reliably on this problem
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
# This is a linear problem, so we don't need to recompute the
# Jacobian. This isn't a big deal for a Steady problems, however, as
# there is only one solve.
solve_type = 'LINEAR'
[]
[Outputs]
exodus = true
hide = lambda
[]
(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
[]
[]
(test/tests/executioners/time_period/time_period_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Functions]
[./exact_p1]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[./ffn_p1]
type = ParsedFunction
expression = (x*x+y*y)-4*t
[../]
[./exact_p2]
type = ParsedFunction
expression = t*((x*x*x)+(y*y*y))
[../]
[./ffn_p2]
type = ParsedFunction
expression = (x*x*x+y*y*y)-6*t*(x+y)
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn1]
type = BodyForce
variable = u
function = ffn_p1
[../]
[./ffn2]
type = BodyForce
variable = u
function = ffn_p2
[../]
[]
[BCs]
[./all1]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_p1
[../]
[./all2]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_p2
[../]
[]
[Executioner]
type = Transient
start_time = 0
dt = 0.1
num_steps = 10
[]
[Controls]
[./first_period]
type = TimePeriod
start_time = 0.0
end_time = 0.45
enable_objects = '*/ffn1 */all1'
disable_objects = '*/ffn2 */all2'
execute_on = 'initial timestep_begin'
set_sync_times = true
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/functions/parsed/function.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -1
xmax = 1
nx = 20
[]
[AuxVariables]
[f]
[]
[]
[AuxKernels]
[function_aux]
type = FunctionAux
variable = f
function = fn
execute_on = initial
[../]
[]
[Functions]
[sin_fn]
type = ParsedFunction
expression = sin(x)
[]
[cos_fn]
type = ParsedFunction
expression = cos(x)
[]
[fn]
type = ParsedFunction
expression = 's/c'
symbol_names = 's c'
symbol_values = 'sin_fn cos_fn'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
show = f
exodus = true
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_structure_3d/steady_state.i)
[Materials]
[mat]
type = ADGenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '16 356 6.5514e3'
[]
[]
[Functions]
[Ts_init]
type = ParsedFunction
expression = '2*sin(x*pi/2)+2*sin(pi*y) +507'
[]
[]
[Components]
[blk]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
initial_T = Ts_init
[]
[right_bnd]
type = HSBoundarySpecifiedTemperature
hs = blk
boundary = blk:right
T = Ts_init
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 100
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
[]
[Outputs]
exodus = true
execute_on = 'initial final'
[]
(test/tests/time_integrators/actually_explicit_euler_verification/ee-1d-quadratic-neumann.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -1
xmax = 1
nx = 10
elem_type = EDGE3
[]
[Functions]
[./ic]
type = ParsedFunction
expression = 0
[../]
[./forcing_fn]
type = ParsedFunction
expression = x*x-2*t+t*x*x
[../]
[./exact_fn]
type = ParsedFunction
expression = t*x*x
[../]
[./left_bc_fn]
type = ParsedFunction
expression = -t*2*x
[../]
[./right_bc_fn]
type = ParsedFunction
expression = t*2*x
[../]
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic
[../]
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./abs]
type = Reaction
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./left]
type = FunctionNeumannBC
variable = u
boundary = '0'
function = left_bc_fn
[../]
[./right]
type = FunctionNeumannBC
variable = u
boundary = '1'
function = right_bc_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
l_tol = 1e-12
start_time = 0.0
num_steps = 10
dt = 0.001
[./TimeIntegrator]
type = ActuallyExplicitEuler
[../]
[]
[Outputs]
exodus = true
[./console]
type = Console
max_rows = 10
[../]
[]
(test/tests/transfers/multiapp_high_order_variable_transfer/parent_L2_Lagrange.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Variables]
[power_density]
family = L2_LAGRANGE
order = FIRST
[]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2'
[]
[]
[Kernels]
[diff]
type = Reaction
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[Postprocessors]
[pwr_avg]
type = ElementAverageValue
block = '0'
variable = power_density
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = sub_L2_Lagrange.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[p_to_sub]
type = MultiAppShapeEvaluationTransfer
source_variable = power_density
variable = power_density
to_multi_app = sub
execute_on = 'timestep_end'
[]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/fluid_properties/test/tests/co2/co2.i)
# Test thermophysical property calculations in CO2FluidProperties
#
# Comparison with values from Span and Wagner, "A New Equation of State for
# Carbon Dioxide Covering the Fluid Region from the Triple-Point Temperature
# to 1100K at Pressures up to 800 MPa", J. Phys. Chem. Ref. Data, 25 (1996)
#
# Viscosity values from Fenghour et al., "The viscosity of carbon dioxide",
# J. Phys. Chem. Ref. Data, 27, 31-44 (1998)
#
#
# --------------------------------------------------------------
# Pressure (Mpa) | 1 | 1 | 1
# Temperature (K) | 280 | 360 | 500
# --------------------------------------------------------------
# Expected values
# --------------------------------------------------------------
# Density (kg/m^3) | 20.199 | 15.105 | 10.664
# Internal energy (kJ/kg/K) | -75.892 | -18.406 | 91.829
# Enthalpy (kJ/kg) | -26.385 | 47.797 | 185.60
# Entropy (kJ/kg/K) | -0.51326 | -0.28033 | 0.04225
# cv (kJ/kg/K) | 0.67092 | 0.72664 | 0.82823
# cp (kJ/kg/K) | 0.92518 | 0.94206 | 1.0273
# Speed of sound (m/s) | 252.33 | 289.00 | 339.81
# Viscosity (1e-6Pa.s) | 14.15 | 17.94 | 24.06
# --------------------------------------------------------------
# Calculated values
# --------------------------------------------------------------
# Density (kg/m^3) | 20.199 | 15.105 | 10.664
# Internal energy (kJ/kg/K) | -75.892 | -18.406 | 91.829
# Enthalpy (kJ/kg) | -26.385 | 47.797 | 185.60
# Entropy (kJ/kg/K) | -0.51326 | -0.28033 | 0.04225
# cv (kJ/kg/K) | 0.67092 | 0.72664 | 0.82823
# cp (kJ/kg/K) | 0.92518 | 0.94206 | 1.0273
# Speed of sound (m/s) | 252.33 | 289.00 | 339.81
# Viscosity (1e-6 Pa.s) | 14.15 | 17.94 | 24.06
# --------------------------------------------------------------
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
xmax = 3
# This test uses ElementalVariableValue postprocessors on specific
# elements, so element numbering needs to stay unchanged
allow_renumbering = false
[]
[Variables]
[./dummy]
[../]
[]
[AuxVariables]
[./pressure]
initial_condition = 1e6
family = MONOMIAL
order = CONSTANT
[../]
[./temperature]
family = MONOMIAL
order = CONSTANT
[../]
[./rho]
family = MONOMIAL
order = CONSTANT
[../]
[./mu]
family = MONOMIAL
order = CONSTANT
[../]
[./e]
family = MONOMIAL
order = CONSTANT
[../]
[./h]
family = MONOMIAL
order = CONSTANT
[../]
[./s]
family = MONOMIAL
order = CONSTANT
[../]
[./cv]
family = MONOMIAL
order = CONSTANT
[../]
[./cp]
family = MONOMIAL
order = CONSTANT
[../]
[./c]
family = MONOMIAL
order = CONSTANT
[../]
[]
[Functions]
[./tic]
type = ParsedFunction
expression = if(x<1,280,if(x<2,360,500))
[../]
[]
[ICs]
[./t_ic]
type = FunctionIC
function = tic
variable = temperature
[../]
[]
[AuxKernels]
[./rho]
type = MaterialRealAux
variable = rho
property = density
[../]
[./my]
type = MaterialRealAux
variable = mu
property = viscosity
[../]
[./internal_energy]
type = MaterialRealAux
variable = e
property = e
[../]
[./enthalpy]
type = MaterialRealAux
variable = h
property = h
[../]
[./entropy]
type = MaterialRealAux
variable = s
property = s
[../]
[./cv]
type = MaterialRealAux
variable = cv
property = cv
[../]
[./cp]
type = MaterialRealAux
variable = cp
property = cp
[../]
[./c]
type = MaterialRealAux
variable = c
property = c
[../]
[]
[FluidProperties]
[./co2]
type = CO2FluidProperties
[../]
[]
[Materials]
[./fp_mat]
type = FluidPropertiesMaterialPT
pressure = pressure
temperature = temperature
fp = co2
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = dummy
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Postprocessors]
[./rho0]
type = ElementalVariableValue
elementid = 0
variable = rho
[../]
[./rho1]
type = ElementalVariableValue
elementid = 1
variable = rho
[../]
[./rho2]
type = ElementalVariableValue
elementid = 2
variable = rho
[../]
[./mu0]
type = ElementalVariableValue
elementid = 0
variable = mu
[../]
[./mu1]
type = ElementalVariableValue
elementid = 1
variable = mu
[../]
[./mu2]
type = ElementalVariableValue
elementid = 2
variable = mu
[../]
[./e0]
type = ElementalVariableValue
elementid = 0
variable = e
[../]
[./e1]
type = ElementalVariableValue
elementid = 1
variable = e
[../]
[./e2]
type = ElementalVariableValue
elementid = 2
variable = e
[../]
[./h0]
type = ElementalVariableValue
elementid = 0
variable = h
[../]
[./h1]
type = ElementalVariableValue
elementid = 1
variable = h
[../]
[./h2]
type = ElementalVariableValue
elementid = 2
variable = h
[../]
[./s0]
type = ElementalVariableValue
elementid = 0
variable = s
[../]
[./s1]
type = ElementalVariableValue
elementid = 1
variable = s
[../]
[./s2]
type = ElementalVariableValue
elementid = 2
variable = s
[../]
[./cv0]
type = ElementalVariableValue
elementid = 0
variable = cv
[../]
[./cv1]
type = ElementalVariableValue
elementid = 1
variable = cv
[../]
[./cv2]
type = ElementalVariableValue
elementid = 2
variable = cv
[../]
[./cp0]
type = ElementalVariableValue
elementid = 0
variable = cp
[../]
[./cp1]
type = ElementalVariableValue
elementid = 1
variable = cp
[../]
[./cp2]
type = ElementalVariableValue
elementid = 2
variable = cp
[../]
[./c0]
type = ElementalVariableValue
elementid = 0
variable = c
[../]
[./c1]
type = ElementalVariableValue
elementid = 1
variable = c
[../]
[./c2]
type = ElementalVariableValue
elementid = 2
variable = c
[../]
[]
[Outputs]
csv = true
execute_on = 'TIMESTEP_END'
[]
(modules/solid_mechanics/test/tests/umat/temperature/elastic_dtemperature.i)
# Testing the UMAT Interface - linear elastic model using the large strain formulation.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[]
[Functions]
[top_pull]
type = ParsedFunction
expression = t/100
[]
# Forced evolution of temperature
[temperature_load]
type = ParsedFunction
expression = '273 + 10*t'
[]
# Factor to multiply the elasticity tensor in MOOSE
[elasticity_prefactor]
type = ParsedFunction
expression = '273/(273 + 10*t + 10)'
[]
[]
[AuxVariables]
[temperature]
[]
[]
[AuxKernels]
[temperature_function]
type = FunctionAux
variable = temperature
function = temperature_load
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
generate_output = 'stress_yy'
[]
[]
[ICs]
[ic_temperature]
type = ConstantIC
value = 273
variable = temperature
[]
[]
[BCs]
[y_pull_function]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = top_pull
[]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[z_bot]
type = DirichletBC
variable = disp_z
boundary = front
value = 0.0
[]
[]
[Materials]
# This input file is used to compare the MOOSE and UMAT models, activating
# specific ones with cli variable_names.
# 1. Active for umat calculation
[umat]
type = AbaqusUMATStress
constant_properties = '1000 0.3'
plugin = '../../../plugins/elastic_dtemperature'
num_state_vars = 0
temperature = temperature
use_one_based_indexing = true
[]
# 2. Active for reference MOOSE computations
[elastic]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1000
poissons_ratio = 0.3
elasticity_tensor_prefactor = 'elasticity_prefactor'
[]
[stress]
type = ComputeFiniteStrainElasticStress
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
num_steps = 30
dt = 1.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(test/tests/time_integrators/convergence/explicit_convergence.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 4
ny = 4
elem_type = QUAD9
[]
[Variables]
active = 'u'
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[./forcing_fn]
type = ParsedFunction
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
implicit = false
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
implicit = false
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
# We are solving only mass matrices in this problem. The Jacobi
# preconditioner is a bit faster than ILU or AMG for this.
petsc_options_iname = '-pc_type'
petsc_options_value = 'jacobi'
start_time = 0.0
end_time = 0.03125
dt = 0.00390625
[./TimeIntegrator]
type = Heun
[../]
# For explicit methods, we use the LINEAR solve type.
solve_type = 'LINEAR'
l_tol = 1e-13
[]
[Outputs]
execute_on = 'initial timestep_end'
exodus = true
[]
(test/tests/fvkernels/fv_adapt/transient-adapt.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
elem_type = QUAD4
[]
[]
[Variables]
[u]
order = CONSTANT
family = MONOMIAL
[]
[v][]
[]
[Functions]
[force]
type = ParsedFunction
expression = t
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = v
[]
[force]
type = BodyForce
variable = v
function = force
[]
[]
[FVKernels]
[diff]
type = FVDiffusion
variable = u
coeff = coeff
[]
[force]
type = FVBodyForce
variable = u
function = force
[]
[]
[FVBCs]
[right]
type = FVDirichletBC
variable = u
boundary = right
value = 1
[]
[left]
type = FVDirichletBC
variable = u
boundary = left
value = 0
[]
[]
[BCs]
[right]
type = DirichletBC
variable = v
boundary = right
value = 1
[]
[left]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[]
[Materials]
[diff]
type = ADGenericFunctorMaterial
prop_names = 'coeff'
prop_values = '1'
[]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 1
solve_type = 'NEWTON'
[]
[Adaptivity]
marker = box
initial_steps = 1
[Markers]
[box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[]
[]
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/cross_material/correctness/plastic_j2.i)
# Simple 3D test
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = false
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 1
nz = 1
[]
[]
[AuxVariables]
[strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[strain_xz]
order = CONSTANT
family = MONOMIAL
[]
[strain_yz]
order = CONSTANT
family = MONOMIAL
[]
[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_xz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[stress_xx]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_xz
index_i = 0
index_j = 2
execute_on = timestep_end
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = cauchy_stress
variable = stress_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[strain_xx]
type = RankTwoAux
rank_two_tensor = mechanical_strain
variable = strain_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[strain_yy]
type = RankTwoAux
rank_two_tensor = mechanical_strain
variable = strain_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[strain_zz]
type = RankTwoAux
rank_two_tensor = mechanical_strain
variable = strain_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[strain_xy]
type = RankTwoAux
rank_two_tensor = mechanical_strain
variable = strain_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[strain_xz]
type = RankTwoAux
rank_two_tensor = mechanical_strain
variable = strain_xz
index_i = 0
index_j = 2
execute_on = timestep_end
[]
[strain_yz]
type = RankTwoAux
rank_two_tensor = mechanical_strain
variable = strain_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[]
[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
[]
[]
[Functions]
[pullx]
type = ParsedFunction
expression = 't'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = bottom
variable = disp_y
value = 0.0
[]
[leftz]
type = DirichletBC
preset = true
boundary = back
variable = disp_z
value = 0.0
[]
[pull_x]
type = FunctionDirichletBC
boundary = right
variable = disp_x
function = pullx
[]
[]
[UserObjects]
[./str]
type = SolidMechanicsHardeningPowerRule
value_0 = 100.0
epsilon0 = 0.1
exponent = 2.0
[../]
[./j2]
type = SolidMechanicsPlasticJ2
yield_strength = str
yield_function_tolerance = 1E-3
internal_constraint_tolerance = 1E-9
[../]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianWrappedStress
[]
[compute_stress_base]
type = ComputeMultiPlasticityStress
plastic_models = j2
ep_plastic_tolerance = 1E-9
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[./strain]
type = ElementAverageValue
variable = strain_xx
[]
[./stress]
type = ElementAverageValue
variable = stress_xx
[]
[]
[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 = 0.001
dtmin = 0.001
end_time = 0.05
[]
[Outputs]
exodus = false
csv = true
[]
(modules/solid_mechanics/test/tests/umat/multiple_blocks/multiple_blocks.i)
# Testing the UMAT Interface - linear elastic model using the large strain formulation.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[mesh_1]
type = GeneratedMeshGenerator
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[block_1]
type = SubdomainIDGenerator
input = mesh_1
subdomain_id = 1
[]
[mesh_2]
type = GeneratedMeshGenerator
dim = 3
xmin = -2.0
xmax = -1.0
ymin = -2.0
ymax = -1.0
zmin = -2.0
zmax = -1.
boundary_name_prefix = 'second'
[]
[block_2]
type = SubdomainIDGenerator
input = mesh_2
subdomain_id = 2
[]
[combined]
type = CombinerGenerator
inputs = 'block_1 block_2'
[]
[]
[Functions]
[top_pull]
type = ParsedFunction
value = t/100
[]
# Forced evolution of temperature
[temperature_load]
type = ParsedFunction
value = '273 + 10*t'
[]
# Factor to multiply the elasticity tensor in MOOSE
[elasticity_prefactor]
type = ParsedFunction
value = '273/(273 + 10*t)'
[]
[]
[AuxVariables]
[temperature]
[]
[]
[AuxKernels]
[temperature_function]
type = FunctionAux
variable = temperature
function = temperature_load
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
generate_output = 'stress_yy'
[]
[]
[BCs]
[y_pull_function]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = top_pull
[]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[z_bot]
type = DirichletBC
variable = disp_z
boundary = front
value = 0.0
[]
[]
[Materials]
[umat_1]
type = AbaqusUMATStress
constant_properties = '1000 0.3'
plugin = '../../../plugins/elastic_temperature'
num_state_vars = 0
temperature = temperature
use_one_based_indexing = true
block = '1'
[]
[umat_2]
type = AbaqusUMATStress
constant_properties = '10000 0.3'
plugin = '../../../plugins/elastic_temperature'
num_state_vars = 0
temperature = temperature
use_one_based_indexing = true
block = '2'
[]
[elastic]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1000
poissons_ratio = 0.3
elasticity_tensor_prefactor = 'elasticity_prefactor'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
num_steps = 30
dt = 1.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(python/mms/test/mms_temporal.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 8
ny = 8
[]
[Variables]
[u][]
[]
[Kernels]
[time]
type = ADTimeDerivative
variable = u
[]
[diff]
type = ADDiffusion
variable = u
[]
[force]
type = BodyForce
variable = u
function = force
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = 't^3*x*y'
[]
[force]
type = ParsedFunction
expression = '3*x*y*t^2'
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
function = exact
boundary = 'left right top bottom'
[]
[]
[Postprocessors]
[error]
type = ElementL2Error
function = exact
variable = u
[]
[h]
type = AverageElementSize
[]
[]
[Executioner]
type = Transient
dt = 1
end_time = 3
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/materials/stateful_internal_side_uo/internal_side_uo_stateful.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
ymin = -1
xmax = 1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[]
[Functions]
[./fn_exact]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[./ffn]
type = ParsedFunction
expression = -4
[../]
[]
[UserObjects]
[./isuo]
type = InsideUserObject
variable = u
diffusivity = diffusivity
execute_on = 'initial timestep_end'
# use_old_prop = true # Access a stateful material on an internal side
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = FIRST
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = ffn
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = fn_exact
[../]
[]
[Postprocessors]
[./value]
type = InsideValuePPS
user_object = isuo
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 5
[]
[Materials]
[./stateful]
type = StatefulMaterial
block = 0
[../]
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/umat/elastic_hardening/elastic.i)
# Testing the UMAT Interface - linear elastic model using the large strain formulation.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[]
[Functions]
[top_pull]
type = ParsedFunction
expression = t/100
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
[]
[]
[BCs]
[y_pull_function]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = top_pull
[]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[z_bot]
type = DirichletBC
variable = disp_z
boundary = front
value = 0.0
[]
[]
[Materials]
# this input file is used to compare the MOOSE and UMAT models, activating
# specific ones with cli variable_names.
# 1. active for umat calculation
[umat]
type = AbaqusUMATStress
constant_properties = '1000 0.3'
plugin = '../../../plugins/elastic'
num_state_vars = 0
use_one_based_indexing = true
[]
# 2. active for moose built-in finite strain elasticity reference
[elastic]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1000
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
num_steps = 30
dt = 1.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/capillary_pressure/vangenuchten3.i)
# Test van Genuchten relative permeability curve by varying saturation over the mesh
# van Genuchten exponent m = 0.5 for both phases
# No residual saturation in either phase
[Mesh]
type = GeneratedMesh
dim = 1
nx = 500
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[p0]
initial_condition = 1e6
[]
[s1]
[]
[]
[AuxVariables]
[s0aux]
family = MONOMIAL
order = CONSTANT
[]
[s1aux]
family = MONOMIAL
order = CONSTANT
[]
[p0aux]
family = MONOMIAL
order = CONSTANT
[]
[p1aux]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[s0]
type = PorousFlowPropertyAux
property = saturation
phase = 0
variable = s0aux
[]
[s1]
type = PorousFlowPropertyAux
property = saturation
phase = 1
variable = s1aux
[]
[p0]
type = PorousFlowPropertyAux
property = pressure
phase = 0
variable = p0aux
[]
[p1]
type = PorousFlowPropertyAux
property = pressure
phase = 1
variable = p1aux
[]
[]
[Functions]
[s1]
type = ParsedFunction
expression = x
[]
[]
[ICs]
[s1]
type = FunctionIC
variable = s1
function = s1
[]
[]
[Kernels]
[p0]
type = Diffusion
variable = p0
[]
[s1]
type = Diffusion
variable = s1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'p0 s1'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
alpha = 1e-5
m = 0.5
sat_lr = 0.1
s_scale = 0.8
log_extension = false
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = p0
phase1_saturation = s1
capillary_pressure = pc
[]
[kr0]
type = PorousFlowRelativePermeabilityVG
phase = 0
m = 0.5
[]
[kr1]
type = PorousFlowRelativePermeabilityCorey
phase = 1
n = 2
[]
[]
[VectorPostprocessors]
[vpp]
type = LineValueSampler
variable = 's0aux s1aux p0aux p1aux'
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 500
sort_by = id
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-6
[]
[BCs]
[sleft]
type = DirichletBC
variable = s1
value = 0
boundary = left
[]
[sright]
type = DirichletBC
variable = s1
value = 1
boundary = right
[]
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(test/tests/linearfvkernels/block-restriction/block-restricted-adr.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '0.1 1 0.1'
dy = '0.1 0.5 0.1'
ix = '1 2 1'
iy = '1 1 1'
subdomain_id = '1 1 1 1 2 3 1 1 1'
[]
[transform]
type = TransformGenerator
input = cmg
transform = TRANSLATE
vector_value = '-0.1 -0.1 0.0'
[]
[create_sides]
type = SideSetsBetweenSubdomainsGenerator
input = transform
new_boundary = sides
primary_block = 2
paired_block = 1
[]
[create_outlet]
type = SideSetsBetweenSubdomainsGenerator
input = create_sides
new_boundary = outlet
primary_block = 2
paired_block = 3
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
block = 2
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = diff_coeff_func
use_nonorthogonal_correction = false
[]
[advection]
type = LinearFVAdvection
variable = u
velocity = "0.5 0 0"
advected_interp_method = average
[]
[reaction]
type = LinearFVReaction
variable = u
coeff = coeff_func
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
inactive = "outflow"
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "sides outlet"
functor = analytic_solution
[]
[outflow]
type = LinearFVAdvectionDiffusionOutflowBC
variable = u
boundary = "right"
use_two_term_expansion = true
[]
[]
[Functions]
[diff_coeff_func]
type = ParsedFunction
expression = '1.0+0.5*x*y'
[]
[coeff_func]
type = ParsedFunction
expression = '1.0+1.0/(1+x*y)'
[]
[source_func]
type = ParsedFunction
expression = '-1.0*x*pi*sin((1/2)*x*pi)*cos(2*y*pi) - 0.25*y*pi*sin(2*y*pi)*cos((1/2)*x*pi) + (1.0 + 1.0/(x*y + 1))*(sin((1/2)*x*pi)*sin(2*y*pi) + 1.5) + (17/4)*pi^2*(0.5*x*y + 1.0)*sin((1/2)*x*pi)*sin(2*y*pi) + 0.25*pi*sin(2*y*pi)*cos((1/2)*x*pi)'
[]
[analytic_solution]
type = ParsedFunction
expression = 'sin((1/2)*x*pi)*sin(2*y*pi) + 1.5'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = FINAL
block = 2
[]
[error]
type = ElementL2FunctorError
approximate = u
exact = analytic_solution
execute_on = FINAL
block = 2
[]
[]
[Executioner]
type = LinearPicardSteady
linear_systems_to_solve = u_sys
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
[csv]
type = CSV
execute_on = FINAL
[]
[]
(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/ics/function_scalar_ic/function_scalar_ic.i)
[Mesh]
# a dummy mesh
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 1
ny = 1
elem_type = QUAD4
[]
[Variables]
[./n]
family = SCALAR
order = FIRST
[../]
[]
[Functions]
[./f]
type = ParsedFunction
expression = cos(t)
[../]
[]
[ICs]
[./f]
type = FunctionScalarIC
variable = n
function = f
[../]
[]
[ScalarKernels]
[./dn]
type = ODETimeDerivative
variable = n
[../]
[./ode1]
type = ParsedODEKernel
expression = '-n'
variable = n
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 1
dt = 0.01
scheme = bdf2
solve_type = 'PJFNK'
timestep_tolerance = 1e-12
[]
[Outputs]
csv = true
[]
(modules/richards/test/tests/user_objects/uo4.i)
# Seff 2-phase User objects give the correct value
#
# If you want to add another test for another UserObject
# then add the UserObject, add a Function defining the expected result,
# add an AuxVariable and AuxKernel that will record the UserObjects value
# and finally add a NodalL2Error that compares this with the Function
#
# Here pressure is x where x is between -5 and 5
[UserObjects]
[./Seff2waterVG]
type = RichardsSeff2waterVG
m = 0.8
al = 0.3
[../]
[./Seff2gasVG]
type = RichardsSeff2gasVG
m = 0.8
al = 0.3
[../]
[./Seff2waterVGshifted]
type = RichardsSeff2waterVGshifted
m = 0.8
al = 0.3
shift = 2
[../]
[./Seff2gasVGshifted]
type = RichardsSeff2gasVGshifted
m = 0.8
al = 0.3
shift = 2
[../]
# following are unimportant in this test
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E6
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.10101
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0.05
sum_s_res = 0.1
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1
[../]
[]
[Functions]
[./initial_pwater]
type = ParsedFunction
expression = x
[../]
[./initial_pgas]
type = ParsedFunction
expression = 5.0
[../]
[./answer_Seff2waterVG]
type = ParsedFunction
expression = (1+max((-(x-5))*al,0)^(1/(1-m)))^(-m)
symbol_names = 'al m'
symbol_values = '0.3 0.8'
[../]
[./answer_dSeff2waterVG]
type = GradParsedFunction
direction = '1E-5 0 0'
expression = (1+max((-(x-5))*al,0)^(1/(1-m)))^(-m)
symbol_names = 'al m'
symbol_values = '0.3 0.8'
[../]
[./answer_d2Seff2waterVG]
type = Grad2ParsedFunction
direction = '1E-4 0 0'
expression = (1+max((-(x-5))*al,0)^(1/(1-m)))^(-m)
symbol_names = 'al m'
symbol_values = '0.3 0.8'
[../]
[./answer_Seff2gasVG]
type = ParsedFunction
expression = 1-(1+max((-(x-5))*al,0)^(1/(1-m)))^(-m)
symbol_names = 'al m'
symbol_values = '0.3 0.8'
[../]
[./answer_dSeff2gasVG]
type = GradParsedFunction
direction = '1E-5 0 0'
expression = 1-(1+max((-(x-5))*al,0)^(1/(1-m)))^(-m)
symbol_names = 'al m'
symbol_values = '0.3 0.8'
[../]
[./answer_d2Seff2gasVG]
type = Grad2ParsedFunction
direction = '1E-4 0 0'
expression = 1-(1+max((-(x-5))*al,0)^(1/(1-m)))^(-m)
symbol_names = 'al m'
symbol_values = '0.3 0.8'
[../]
[./answer_Seff2waterVGshifted]
type = ParsedFunction
expression = ((1+max((-(x-5-shift))*al,0)^(1/(1-m)))^(-m))/((1+max((-(-shift))*al,0)^(1/(1-m)))^(-m))
symbol_names = 'al m shift'
symbol_values = '0.3 0.8 2'
[../]
[./answer_dSeff2waterVGshifted]
type = GradParsedFunction
direction = '1E-5 0 0'
expression = ((1+max((-(x-5-shift))*al,0)^(1/(1-m)))^(-m))/((1+max((-(-shift))*al,0)^(1/(1-m)))^(-m))
symbol_names = 'al m shift'
symbol_values = '0.3 0.8 2'
[../]
[./answer_d2Seff2waterVGshifted]
type = Grad2ParsedFunction
direction = '1E-4 0 0'
expression = ((1+max((-(x-5-shift))*al,0)^(1/(1-m)))^(-m))/((1+max((-(-shift))*al,0)^(1/(1-m)))^(-m))
symbol_names = 'al m shift'
symbol_values = '0.3 0.8 2'
[../]
[./answer_Seff2gasVGshifted]
type = ParsedFunction
expression = 1-((1+max((-(x-5-shift))*al,0)^(1/(1-m)))^(-m))/((1+max((-(-shift))*al,0)^(1/(1-m)))^(-m))
symbol_names = 'al m shift'
symbol_values = '0.3 0.8 2'
[../]
[./answer_dSeff2gasVGshifted]
type = GradParsedFunction
direction = '1E-5 0 0'
expression = 1-((1+max((-(x-5-shift))*al,0)^(1/(1-m)))^(-m))/((1+max((-(-shift))*al,0)^(1/(1-m)))^(-m))
symbol_names = 'al m shift'
symbol_values = '0.3 0.8 2'
[../]
[./answer_d2Seff2gasVGshifted]
type = Grad2ParsedFunction
direction = '1E-4 0 0'
expression = 1-((1+max((-(x-5-shift))*al,0)^(1/(1-m)))^(-m))/((1+max((-(-shift))*al,0)^(1/(1-m)))^(-m))
symbol_names = 'al m shift'
symbol_values = '0.3 0.8 2'
[../]
[]
[AuxVariables]
[./Seff2waterVG_Aux]
[../]
[./dSeff2waterVG_Aux]
[../]
[./d2Seff2waterVG_Aux]
[../]
[./Seff2gasVG_Aux]
[../]
[./dSeff2gasVG_Aux]
[../]
[./d2Seff2gasVG_Aux]
[../]
[./Seff2waterVGshifted_Aux]
[../]
[./dSeff2waterVGshifted_Aux]
[../]
[./d2Seff2waterVGshifted_Aux]
[../]
[./Seff2gasVGshifted_Aux]
[../]
[./dSeff2gasVGshifted_Aux]
[../]
[./d2Seff2gasVGshifted_Aux]
[../]
[./check_Aux]
[../]
[]
[AuxKernels]
[./Seff2waterVG_AuxK]
type = RichardsSeffAux
variable = Seff2waterVG_Aux
seff_UO = Seff2waterVG
pressure_vars = 'pwater pgas'
[../]
[./dSeff2waterVG_AuxK]
type = RichardsSeffPrimeAux
variable = dSeff2waterVG_Aux
seff_UO = Seff2waterVG
pressure_vars = 'pwater pgas'
wrtnum = 0
[../]
[./d2Seff2waterVG_AuxK]
type = RichardsSeffPrimePrimeAux
variable = d2Seff2waterVG_Aux
seff_UO = Seff2waterVG
pressure_vars = 'pwater pgas'
wrtnum1 = 0
wrtnum2 = 0
[../]
[./Seff2gasVG_AuxK]
type = RichardsSeffAux
variable = Seff2gasVG_Aux
seff_UO = Seff2gasVG
pressure_vars = 'pwater pgas'
[../]
[./dSeff2gasVG_AuxK]
type = RichardsSeffPrimeAux
variable = dSeff2gasVG_Aux
seff_UO = Seff2gasVG
pressure_vars = 'pwater pgas'
wrtnum = 0
[../]
[./d2Seff2gasVG_AuxK]
type = RichardsSeffPrimePrimeAux
variable = d2Seff2gasVG_Aux
seff_UO = Seff2gasVG
pressure_vars = 'pwater pgas'
wrtnum1 = 0
wrtnum2 = 0
[../]
[./Seff2waterVGshifted_AuxK]
type = RichardsSeffAux
variable = Seff2waterVGshifted_Aux
seff_UO = Seff2waterVGshifted
pressure_vars = 'pwater pgas'
[../]
[./dSeff2waterVGshifted_AuxK]
type = RichardsSeffPrimeAux
variable = dSeff2waterVGshifted_Aux
seff_UO = Seff2waterVGshifted
pressure_vars = 'pwater pgas'
wrtnum = 0
[../]
[./d2Seff2waterVGshifted_AuxK]
type = RichardsSeffPrimePrimeAux
variable = d2Seff2waterVGshifted_Aux
seff_UO = Seff2waterVGshifted
pressure_vars = 'pwater pgas'
wrtnum1 = 0
wrtnum2 = 0
[../]
[./Seff2gasVGshifted_AuxK]
type = RichardsSeffAux
variable = Seff2gasVGshifted_Aux
seff_UO = Seff2gasVGshifted
pressure_vars = 'pwater pgas'
[../]
[./dSeff2gasVGshifted_AuxK]
type = RichardsSeffPrimeAux
variable = dSeff2gasVGshifted_Aux
seff_UO = Seff2gasVGshifted
pressure_vars = 'pwater pgas'
wrtnum = 0
[../]
[./d2Seff2gasVGshifted_AuxK]
type = RichardsSeffPrimePrimeAux
variable = d2Seff2gasVGshifted_Aux
seff_UO = Seff2gasVGshifted
pressure_vars = 'pwater pgas'
wrtnum1 = 0
wrtnum2 = 0
[../]
[./check_AuxK]
type = FunctionAux
variable = check_Aux
function = answer_d2Seff2waterVGshifted
[../]
[]
[Postprocessors]
[./cf_Seff2waterVG]
type = NodalL2Error
function = answer_Seff2waterVG
variable = Seff2waterVG_Aux
[../]
[./cf_dSeff2waterVG]
type = NodalL2Error
function = answer_dSeff2waterVG
variable = dSeff2waterVG_Aux
[../]
[./cf_d2Seff2waterVG]
type = NodalL2Error
function = answer_d2Seff2waterVG
variable = d2Seff2waterVG_Aux
[../]
[./cf_Seff2gasVG]
type = NodalL2Error
function = answer_Seff2gasVG
variable = Seff2gasVG_Aux
[../]
[./cf_dSeff2gasVG]
type = NodalL2Error
function = answer_dSeff2gasVG
variable = dSeff2gasVG_Aux
[../]
[./cf_d2Seff2gasVG]
type = NodalL2Error
function = answer_d2Seff2gasVG
variable = d2Seff2gasVG_Aux
[../]
[./cf_Seff2waterVGshifted]
type = NodalL2Error
function = answer_Seff2waterVGshifted
variable = Seff2waterVGshifted_Aux
[../]
[./cf_dSeff2waterVGshifted]
type = NodalL2Error
function = answer_dSeff2waterVGshifted
variable = dSeff2waterVGshifted_Aux
[../]
[./cf_d2Seff2waterVGshifted]
type = NodalL2Error
function = answer_d2Seff2waterVGshifted
variable = d2Seff2waterVGshifted_Aux
[../]
[./cf_Seff2gasVGshifted]
type = NodalL2Error
function = answer_Seff2gasVGshifted
variable = Seff2gasVGshifted_Aux
[../]
[./cf_dSeff2gasVGshifted]
type = NodalL2Error
function = answer_dSeff2gasVGshifted
variable = dSeff2gasVGshifted_Aux
[../]
[./cf_d2Seff2gasVGshifted]
type = NodalL2Error
function = answer_d2Seff2gasVGshifted
variable = d2Seff2gasVGshifted_Aux
[../]
[]
#############################################################################
#
# Following is largely unimportant as we are not running an actual similation
#
#############################################################################
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = -5
xmax = 5
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_pwater
[../]
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_pgas
[../]
[../]
[]
[Kernels]
active = 'watert gast'
[./watert]
type = RichardsMassChange
richardsVarNames_UO = PPNames
variable = pwater
[../]
[./gast]
type = RichardsMassChange
richardsVarNames_UO = PPNames
variable = pgas
[../]
[]
[Materials]
[./unimportant_material]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-20 0 0 0 1E-20 0 0 0 1E-20'
richardsVarNames_UO = PPNames
density_UO = 'DensityConstBulk DensityConstBulk'
relperm_UO = 'RelPermPower RelPermPower'
sat_UO = 'Saturation Saturation'
seff_UO = 'Seff2waterVG Seff2gasVG'
SUPG_UO = 'SUPGstandard SUPGstandard'
viscosity = '1E-3 1E-5'
gravity = '0 0 -10'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./does_nothing]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E50 1E50 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
num_steps = 1
dt = 1E-100
[]
[Outputs]
execute_on = 'timestep_end'
active = 'csv'
file_base = uo4
[./csv]
type = CSV
[../]
[./exodus]
type = Exodus
[../]
[]
(test/tests/time_integrators/explicit-euler/ee-2d-linear-adapt.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Functions]
[./ic]
type = ParsedFunction
expression = 0
[../]
[./forcing_fn]
type = ParsedFunction
expression = (x+y)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*(x+y)
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic
[../]
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
lumping = true
implicit = true
[../]
[./diff]
type = Diffusion
variable = u
implicit = false
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
implicit = false
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
implicit = true
[../]
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 2
[./Markers]
[./box]
bottom_left = '-0.4 -0.4 0'
inside = refine
top_right = '0.4 0.4 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'explicit-euler'
start_time = 0.0
num_steps = 4
dt = 0.005
[]
[Outputs]
exodus = true
[./console]
type = Console
max_rows = 10
[../]
[]
(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
[]
(test/tests/multiapps/restart_subapp_ic/parent2.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
ymin = 0
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[Functions]
[v_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[]
[AuxVariables]
[v]
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[ufn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = v_fn
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
app_type = MooseTestApp
type = TransientMultiApp
input_files = 'sub2.i'
execute_on = timestep_end
positions = '0 -1 0'
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[]
[]
[Problem]
restart_file_base = parent_out_cp/0005
[]
(test/tests/postprocessors/function_element_average/function_element_average.i)
A = 2
B = 5
x2 = 4
y2 = 3
integral_exact = ${fparse 0.5 * A * x2^2 * y2 + 0.5 * B * x2 * y2^2}
avg_exact = ${fparse integral_exact / (x2 * y2)}
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmax = ${x2}
ymax = ${y2}
[]
[Functions]
[test_fn]
type = ParsedFunction
expression = '${A}*x + ${B}*y'
[]
[]
[Postprocessors]
[avg]
type = FunctionElementAverage
function = test_fn
execute_on = 'INITIAL'
[]
[avg_err]
type = RelativeDifferencePostprocessor
value1 = avg
value2 = ${avg_exact}
execute_on = 'INITIAL'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
show = 'avg_err'
[]
(modules/solid_mechanics/test/tests/umat/predef/predef_multiple_mat.i)
# Testing the UMAT Interface - linear elastic model using the large strain formulation.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[]
[Functions]
[top_pull]
type = ParsedFunction
expression = -t*10
[]
[right_pull]
type = ParsedFunction
expression = -t*0.5
[]
[]
[AuxVariables]
[strain_yy]
family = MONOMIAL
order = FIRST
[]
[strain_xx]
family = MONOMIAL
order = FIRST
[]
[]
[AuxKernels]
[strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xx
index_i = 0
index_j = 0
[]
[strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 1
index_j = 1
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
[]
[]
[BCs]
[Pressure]
[bc_presssure_top]
boundary = top
function = top_pull
[]
[bc_presssure_right]
boundary = right
function = right_pull
[]
[]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = bottom
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[z_bot]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0.0
[]
[]
[Materials]
# 1. Active for UMAT
[strain_xx]
type = RankTwoCartesianComponent
property_name = strain_xx
rank_two_tensor = total_strain
index_i = 0
index_j = 0
[]
[strain_yy]
type = RankTwoCartesianComponent
property_name = strain_yy
rank_two_tensor = total_strain
index_i = 1
index_j = 1
[]
[umat]
type = AbaqusUMATStress
constant_properties = '1000 0.3'
plugin = '../../../plugins/elastic_multiple_predef'
num_state_vars = 0
external_properties = 'strain_xx strain_yy'
use_one_based_indexing = true
[]
# 2. Active for reference MOOSE computations
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
base_name = 'base'
youngs_modulus = 1e3
poissons_ratio = 0.3
[]
[strain_dependent_elasticity_tensor]
type = CompositeElasticityTensor
args = 'strain_yy strain_xx'
tensors = 'base'
weights = 'prefactor_material'
[]
[prefactor_material_block]
type = DerivativeParsedMaterial
property_name = prefactor_material
material_property_names = 'strain_yy strain_xx'
expression = '1.0/(1.0 + strain_yy + strain_xx)'
[]
[stress]
type = ComputeFiniteStrainElasticStress
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
end_time = 30
dt = 1.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(test/tests/fvkernels/mms/non-orthogonal/advection-diffusion-reaction.i)
a=1.1
diff=1.1
[Mesh]
[./gen_mesh]
type = GeneratedMeshGenerator
dim = 2
xmin = 2
xmax = 3
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = TRI3
[../]
[]
[Variables]
[v]
type = MooseVariableFVReal
initial_condition = 1
[]
[]
[FVKernels]
[advection]
type = FVAdvection
variable = v
velocity = '${a} ${fparse 2*a} 0'
advected_interp_method = 'average'
[]
[reaction]
type = FVReaction
variable = v
[]
[diff_v]
type = FVDiffusion
variable = v
coeff = ${diff}
[]
[body_v]
type = FVBodyForce
variable = v
function = 'forcing'
[]
[]
[FVBCs]
[exact]
type = FVFunctionDirichletBC
boundary = 'left right top bottom'
function = 'exact'
variable = v
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = 'sin(x)*cos(y)'
[]
[forcing]
type = ParsedFunction
expression = '-2*a*sin(x)*sin(y) + a*cos(x)*cos(y) + 2*diff*sin(x)*cos(y) + sin(x)*cos(y)'
symbol_names = 'a diff'
symbol_values = '${a} ${diff}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
csv = true
[]
[Postprocessors]
[error]
type = ElementL2Error
variable = v
function = exact
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/crysp_linesearch.i)
[Mesh]
type = GeneratedMesh
dim = 3
elem_type = HEX8
displacements = 'ux uy uz'
[]
[Variables]
[./ux]
block = 0
[../]
[./uy]
block = 0
[../]
[./uz]
block = 0
[../]
[]
[AuxVariables]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./fp_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./e_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./gss1]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[]
[Functions]
[./tdisp]
type = ParsedFunction
expression = 0.01*t
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'ux uy uz'
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_zz]
type = RankTwoAux
variable = stress_zz
rank_two_tensor = stress
index_j = 2
index_i = 2
execute_on = timestep_end
block = 0
[../]
[./fp_zz]
type = RankTwoAux
variable = fp_zz
rank_two_tensor = fp
index_j = 2
index_i = 2
execute_on = timestep_end
block = 0
[../]
[./e_zz]
type = RankTwoAux
variable = e_zz
rank_two_tensor = lage
index_j = 2
index_i = 2
execute_on = timestep_end
block = 0
[../]
[./gss1]
type = MaterialStdVectorAux
variable = gss1
property = gss
index = 0
execute_on = timestep_end
block = 0
[../]
[]
[BCs]
[./symmy]
type = DirichletBC
variable = uy
boundary = bottom
value = 0
[../]
[./symmx]
type = DirichletBC
variable = ux
boundary = left
value = 0
[../]
[./symmz]
type = DirichletBC
variable = uz
boundary = back
value = 0
[../]
[./tdisp]
type = FunctionDirichletBC
variable = uz
boundary = front
function = tdisp
[../]
[]
[Materials]
[./crysp]
type = FiniteStrainCrystalPlasticity
block = 0
rtol = 1e-6
abs_tol = 1e-8
gtol = 1e-2
slip_sys_file_name = input_slip_sys.txt
nss = 12
num_slip_sys_flowrate_props = 2 #Number of properties in a slip system
flowprops = '1 4 0.001 0.1 5 8 0.001 0.1 9 12 0.001 0.1'
hprops = '1.0 541.5 60.8 109.8 2.5'
gprops = '1 4 60.8 5 8 60.8 9 12 60.8'
tan_mod_type = exact
use_line_search = true
min_line_search_step_size = 0.01
[../]
[./elasticity_tensor]
type = ComputeElasticityTensorCP
block = 0
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'ux uy uz'
[../]
[]
[Postprocessors]
[./stress_zz]
type = ElementAverageValue
variable = stress_zz
block = 'ANY_BLOCK_ID 0'
[../]
[./fp_zz]
type = ElementAverageValue
variable = fp_zz
block = 'ANY_BLOCK_ID 0'
[../]
[./e_zz]
type = ElementAverageValue
variable = e_zz
block = 'ANY_BLOCK_ID 0'
[../]
[./gss1]
type = ElementAverageValue
variable = gss1
block = 'ANY_BLOCK_ID 0'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
dt = 0.025
dtmax = 10.0
dtmin = 0.02
num_steps = 10
[]
[Outputs]
file_base = crysp_lsearch_out
exodus = true
[]
(test/tests/postprocessors/num_vars/num_vars.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Functions]
[forcing_fnu]
type = ParsedFunction
expression = -6*(x+y)+x*x+y*y
[]
[forcing_fnv]
type = ParsedFunction
expression = -4+x*x*x-x+y*y*y-y
[]
[bc_fnut]
type = ParsedFunction
expression = 3*y*y-1
[]
[bc_fnub]
type = ParsedFunction
expression = -3*y*y+1
[]
[bc_fnul]
type = ParsedFunction
expression = -3*x*x+1
[]
[bc_fnur]
type = ParsedFunction
expression = 3*x*x-1
[]
[slnu]
type = ParsedGradFunction
expression = x*x*x-x+y*y*y-y
grad_x = 3*x*x-1
grad_y = 3*y*y-1
[]
[slnv]
type = ParsedGradFunction
expression = x*x+y*y
grad_x = 2*x
grad_y = 2*y
[]
[]
[Variables]
[u]
order = THIRD
family = HIERARCHIC
[]
[v]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
[]
[diff2]
type = Diffusion
variable = v
[]
[forceu]
type = BodyForce
variable = u
function = forcing_fnu
[]
[forcev]
type = BodyForce
variable = v
function = forcing_fnv
[]
[]
[BCs]
[bc_ut]
type = FunctionDirichletBC
variable = u
boundary = top
function = bc_fnut
[]
[bc_ub]
type = FunctionDirichletBC
variable = u
boundary = bottom
function = bc_fnub
[]
[bc_ul]
type = FunctionDirichletBC
variable = u
boundary = left
function = bc_fnul
[]
[bc_ur]
type = FunctionDirichletBC
variable = u
boundary = right
function = bc_fnur
[]
[bc_v]
type = FunctionDirichletBC
variable = v
function = slnv
boundary = 'top left right bottom'
[]
[]
[Preconditioning]
[prec]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_vars'
[dofs]
type = NumDOFs
[]
[h]
type = AverageElementSize
[]
[L2u]
type = ElementL2Error
variable = u
function = slnu
[]
[L2v]
type = ElementL2Error
variable = v
function = slnv
[]
[H1error]
type = ElementH1Error
variable = u
function = solution
[]
[H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[]
[num_vars]
type = NumVars
system = 'NL'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_rel_tol = 1e-15
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/mms/channel-flow/cylindrical/cartesian-version/2d-rc-rz-symmetry.i)
mu=1.1
rho=1.1
offset=0e0
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = ${offset}
xmax = ${fparse 1 + offset}
ymin = -1
ymax = 1
nx = 2
ny = 2
[]
[]
[Problem]
fv_bcs_integrity_check = false
coord_type = 'RZ'
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
two_term_boundary_expansion = true
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
[]
[v]
type = INSFVVelocityVariable
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[ICs]
[u]
type = FunctionIC
function = 'exact_u'
variable = u
[]
[v]
type = FunctionIC
function = 'exact_v'
variable = v
[]
[pressure]
type = FunctionIC
function = 'exact_p'
variable = pressure
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
rho = ${rho}
[]
[mass_forcing]
type = FVBodyForce
variable = pressure
function = forcing_p
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[u_forcing]
type = INSFVBodyForce
variable = u
functor = forcing_u
momentum_component = 'x'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[v_forcing]
type = INSFVBodyForce
variable = v
functor = forcing_v
momentum_component = 'y'
[]
[]
[FVBCs]
[u_wall]
type = INSFVNoSlipWallBC
variable = u
boundary = 'right'
function = 'exact_u'
[]
[v_wall]
type = INSFVNoSlipWallBC
variable = v
boundary = 'right'
function = 'exact_v'
[]
[p]
type = INSFVOutletPressureBC
variable = pressure
function = 'exact_p'
boundary = 'top'
[]
[inlet_u]
type = INSFVInletVelocityBC
variable = u
function = 'exact_u'
boundary = 'bottom'
[]
[inlet_v]
type = INSFVInletVelocityBC
variable = v
function = 'exact_v'
boundary = 'bottom'
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'sin(x*pi)^2*cos(y*pi)'
[]
[forcing_u]
type = ParsedFunction
expression = 'pi^2*mu*sin(x*pi)^2*cos(y*pi) - 2*pi*rho*sin(x*pi)^2*sin(y*pi)*cos(x*pi)*cos(y*pi) - pi*sin(x*pi)*cos(1.6*y) + (4*x*pi*rho*sin(x*pi)^3*cos(x*pi)*cos(y*pi)^2 + rho*sin(x*pi)^4*cos(y*pi)^2)/x - (-2*x*pi^2*mu*sin(x*pi)^2*cos(y*pi) + 2*x*pi^2*mu*cos(x*pi)^2*cos(y*pi) + 2*pi*mu*sin(x*pi)*cos(x*pi)*cos(y*pi))/x'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_v]
type = ParsedFunction
expression = 'cos(x*pi)*cos(y*pi)'
[]
[forcing_v]
type = ParsedFunction
expression = 'pi^2*mu*cos(x*pi)*cos(y*pi) - 2*pi*rho*sin(y*pi)*cos(x*pi)^2*cos(y*pi) - 1.6*sin(1.6*y)*cos(x*pi) - (-x*pi^2*mu*cos(x*pi)*cos(y*pi) - pi*mu*sin(x*pi)*cos(y*pi))/x + (-x*pi*rho*sin(x*pi)^3*cos(y*pi)^2 + 2*x*pi*rho*sin(x*pi)*cos(x*pi)^2*cos(y*pi)^2 + rho*sin(x*pi)^2*cos(x*pi)*cos(y*pi)^2)/x'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'cos(1.6*y)*cos(x*pi)'
[]
[forcing_p]
type = ParsedFunction
expression = '-pi*rho*sin(y*pi)*cos(x*pi) + (2*x*pi*rho*sin(x*pi)*cos(x*pi)*cos(y*pi) + rho*sin(x*pi)^2*cos(y*pi))/x'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO superlu_dist'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
[]
[Outputs]
exodus = false
csv = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[./L2u]
type = ElementL2FunctorError
approximate = u
exact = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[./L2v]
type = ElementL2FunctorError
approximate = v
exact = exact_v
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[./L2p]
approximate = pressure
exact = exact_p
type = ElementL2FunctorError
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[]
(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/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_no_parts_steady.i)
# This input file tests several different things:
# .) The axisymmetric (RZ) form of the governing equations.
# .) An open boundary.
# .) Not integrating the pressure by parts, thereby requiring a pressure pin.
# .) Natural boundary condition at the outlet.
[GlobalParams]
integrate_p_by_parts = false
laplace = true
gravity = '0 0 0'
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = Newton
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Variables]
[./vel_x]
# Velocity in radial (r) direction
family = LAGRANGE
order = SECOND
[../]
[./vel_y]
# Velocity in axial (z) direction
family = LAGRANGE
order = SECOND
[../]
[./p]
family = LAGRANGE
order = FIRST
[../]
[]
[BCs]
[./p_corner]
# This is required, because pressure term is *not* integrated by parts.
type = DirichletBC
boundary = top_right
value = 0
variable = p
[../]
[./u_in]
type = DirichletBC
boundary = bottom
variable = vel_x
value = 0
[../]
[./v_in]
type = FunctionDirichletBC
boundary = bottom
variable = vel_y
function = 'inlet_func'
[../]
[./u_axis_and_walls]
type = DirichletBC
boundary = 'left right'
variable = vel_x
value = 0
[../]
[./v_no_slip]
type = DirichletBC
boundary = 'right'
variable = vel_y
value = 0
[../]
[]
[Kernels]
[./mass]
type = INSMassRZ
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 'volume'
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(test/tests/predictors/simple/predictor_skip_test.i)
# The purpose of this test is to test the simple predictor. This is a very
# small, monotonically loaded block of material. If things are working right,
# the predictor should come very close to exactly nailing the solution on steps
# after the first step.
#This test checks to see that the predictor is skipped in the last step.
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 3
ny = 3
[]
[Functions]
[ramp1]
type = ParsedFunction
expression = 't'
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
[]
[]
[BCs]
[bot]
type = DirichletBC
variable = u
boundary = bottom
value = 0.0
[]
[ss2_x]
type = FunctionDirichletBC
variable = u
boundary = top
function = ramp1
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-14
start_time = 0.0
dt = 0.5
end_time = 1.0
[Predictor]
type = SimplePredictor
scale = 1.0
skip_times = '1.0'
[]
[]
[Postprocessors]
[final_residual]
type = Residual
residual_type = FINAL
[]
[initial_residual]
type = Residual
residual_type = INITIAL
[]
[]
[Outputs]
csv = true
[]
(test/tests/userobjects/element_subdomain_modifier/no_moving_boundary.i)
[Problem]
solve = false
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 16
ny = 16
[]
[left]
type = SubdomainBoundingBoxGenerator
input = 'gen'
block_id = 1
bottom_left = '0 0 0'
top_right = '0.25 1 1'
[]
[right]
type = SubdomainBoundingBoxGenerator
input = 'left'
block_id = 2
bottom_left = '0.25 0 0'
top_right = '1 1 1'
[]
[]
[UserObjects]
[moving_circle]
type = CoupledVarThresholdElementSubdomainModifier
coupled_var = 'phi'
block = 2
criterion_type = BELOW
threshold = 0
subdomain_id = 1
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[Functions]
[moving_circle]
type = ParsedFunction
expression = '(x-t)^2+(y)^2-0.5^2'
[]
[]
[AuxVariables]
[phi]
[]
[]
[AuxKernels]
[phi]
type = FunctionAux
variable = phi
function = moving_circle
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 3
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/elastic_thermal_patch/elastic_thermal_jacobian_rz_smp.i)
# This problem is intended to exercise the Jacobian for coupled RZ
# problems. Only two iterations should be needed.
[GlobalParams]
temperature = temp
volumetric_locking_correction = true
[]
[Problem]
coord_type = RZ
[]
[Mesh]
file = elastic_thermal_patch_rz_test.e
[]
[Functions]
[./ur]
type = ParsedFunction
expression = '0'
[../]
[./uz]
type = ParsedFunction
expression = '0'
[../]
[./body]
type = ParsedFunction
expression = '-400/x'
[../]
[./temp]
type = ParsedFunction
expression = '117.56+100*t'
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./temp]
initial_condition = 117.56
[../]
[]
[Modules]
[TensorMechanics]
[Master]
displacements = 'disp_x disp_y'
[All]
displacements = 'disp_x disp_y'
add_variables = true
strain = SMALL
incremental = true
eigenstrain_names = eigenstrain
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_zx'
[../]
[../]
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[]
[BCs]
[./ur]
type = FunctionDirichletBC
variable = disp_x
boundary = 1
function = ur
[../]
[./uz]
type = FunctionDirichletBC
variable = disp_y
boundary = 2
function = uz
[../]
[./temp]
type = FunctionDirichletBC
variable = temp
boundary = 10
function = temp
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.25
[../]
[./thermal_strain]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 117.56
thermal_expansion_coeff = 1e-6
eigenstrain_name = eigenstrain
[../]
[./stress]
type = ComputeStrainIncrementBasedStress
[../]
[./heat]
type = HeatConductionMaterial
specific_heat = 0.116
thermal_conductivity = 4.85e-4
[../]
[./density]
type = Density
density = 0.283
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
nl_abs_tol = 1e-9
nl_rel_tol = 1e-12
l_max_its = 20
start_time = 0.0
dt = 1.0
num_steps = 1
end_time = 1.0
[]
[Outputs]
file_base = elastic_thermal_jacobian_rz_smp_out
[./exodus]
type = Exodus
execute_on = 'initial timestep_end nonlinear'
nonlinear_residual_dt_divisor = 100
[../]
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/convergence/ld-stress.i)
# 2D test with just strain control
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = true
constraint_types = 'stress strain strain stress stress strain stress stress stress'
macro_gradient = hvar
homogenization_constraint = homogenization
[]
[Mesh]
[base]
type = FileMeshGenerator
file = '3d.exo'
[]
[sidesets]
type = SideSetsFromNormalsGenerator
input = base
normals = '-1 0 0
1 0 0
0 -1 0
0 1 0
'
' 0 0 -1
0 0 1'
fixed_normal = true
new_boundary = 'left right bottom top back front'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[hvar]
family = SCALAR
order = NINTH
[]
[]
[ICs]
[disp_x]
type = RandomIC
variable = disp_x
min = -0.1
max = 0.1
[]
[disp_y]
type = RandomIC
variable = disp_y
min = -0.1
max = 0.1
[]
[disp_z]
type = RandomIC
variable = disp_z
min = -0.1
max = 0.1
[]
[hvar]
type = ScalarConstantIC
variable = hvar
value = 0.1
[]
[]
[AuxVariables]
[s11]
family = MONOMIAL
order = CONSTANT
[]
[s21]
family = MONOMIAL
order = CONSTANT
[]
[s31]
family = MONOMIAL
order = CONSTANT
[]
[s12]
family = MONOMIAL
order = CONSTANT
[]
[s22]
family = MONOMIAL
order = CONSTANT
[]
[s32]
family = MONOMIAL
order = CONSTANT
[]
[s13]
family = MONOMIAL
order = CONSTANT
[]
[s23]
family = MONOMIAL
order = CONSTANT
[]
[s33]
family = MONOMIAL
order = CONSTANT
[]
[F11]
family = MONOMIAL
order = CONSTANT
[]
[F21]
family = MONOMIAL
order = CONSTANT
[]
[F31]
family = MONOMIAL
order = CONSTANT
[]
[F12]
family = MONOMIAL
order = CONSTANT
[]
[F22]
family = MONOMIAL
order = CONSTANT
[]
[F32]
family = MONOMIAL
order = CONSTANT
[]
[F13]
family = MONOMIAL
order = CONSTANT
[]
[F23]
family = MONOMIAL
order = CONSTANT
[]
[F33]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[s11]
type = RankTwoAux
variable = s11
rank_two_tensor = pk1_stress
index_i = 0
index_j = 0
[]
[s21]
type = RankTwoAux
variable = s21
rank_two_tensor = pk1_stress
index_i = 1
index_j = 0
[]
[s31]
type = RankTwoAux
variable = s31
rank_two_tensor = pk1_stress
index_i = 2
index_j = 0
[]
[s12]
type = RankTwoAux
variable = s12
rank_two_tensor = pk1_stress
index_i = 0
index_j = 1
[]
[s22]
type = RankTwoAux
variable = s22
rank_two_tensor = pk1_stress
index_i = 1
index_j = 1
[]
[s32]
type = RankTwoAux
variable = s32
rank_two_tensor = pk1_stress
index_i = 2
index_j = 1
[]
[s13]
type = RankTwoAux
variable = s13
rank_two_tensor = pk1_stress
index_i = 0
index_j = 2
[]
[s23]
type = RankTwoAux
variable = s23
rank_two_tensor = pk1_stress
index_i = 1
index_j = 2
[]
[s33]
type = RankTwoAux
variable = s33
rank_two_tensor = pk1_stress
index_i = 2
index_j = 2
[]
[F11]
type = RankTwoAux
variable = F11
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 0
[]
[F21]
type = RankTwoAux
variable = F21
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 0
[]
[F31]
type = RankTwoAux
variable = F31
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 0
[]
[F12]
type = RankTwoAux
variable = F12
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 1
[]
[F22]
type = RankTwoAux
variable = F22
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 1
[]
[F32]
type = RankTwoAux
variable = F32
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 1
[]
[F13]
type = RankTwoAux
variable = F13
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 2
[]
[F23]
type = RankTwoAux
variable = F23
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 2
[]
[F33]
type = RankTwoAux
variable = F33
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 2
[]
[]
[UserObjects]
[homogenization]
type = HomogenizationConstraint
targets = 'stress11 zero zero stress12 stress22 zero stress13 stress23 stress33'
execute_on = 'INITIAL LINEAR NONLINEAR'
[]
[]
[Kernels]
[sdx]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[sdy]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_y
component = 1
[]
[sdz]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_z
component = 2
[]
[]
[ScalarKernels]
[enforce]
type = HomogenizationConstraintScalarKernel
variable = hvar
[]
[]
[Functions]
[stress11]
type = ParsedFunction
expression = '4.0e2*t'
[]
[stress22]
type = ParsedFunction
expression = '-2.0e2*t'
[]
[stress33]
type = ParsedFunction
expression = '8.0e2*t'
[]
[stress23]
type = ParsedFunction
expression = '2.0e2*t'
[]
[stress13]
type = ParsedFunction
expression = '-7.0e2*t'
[]
[stress12]
type = ParsedFunction
expression = '1.0e2*t'
[]
[stress32]
type = ParsedFunction
expression = '1.0e2*t'
[]
[stress31]
type = ParsedFunction
expression = '2.0e2*t'
[]
[stress21]
type = ParsedFunction
expression = '-1.5e2*t'
[]
[zero]
type = ConstantFunction
value = 0
[]
[]
[BCs]
[Periodic]
[x]
variable = disp_x
auto_direction = 'x y z'
[]
[y]
variable = disp_y
auto_direction = 'x y z'
[]
[z]
variable = disp_z
auto_direction = 'x y z'
[]
[]
[fix1_x]
type = DirichletBC
boundary = "fix_all"
variable = disp_x
value = 0
[]
[fix1_y]
type = DirichletBC
boundary = "fix_all"
variable = disp_y
value = 0
[]
[fix1_z]
type = DirichletBC
boundary = "fix_all"
variable = disp_z
value = 0
[]
[fix2_x]
type = DirichletBC
boundary = "fix_xy"
variable = disp_x
value = 0
[]
[fix2_y]
type = DirichletBC
boundary = "fix_xy"
variable = disp_y
value = 0
[]
[fix3_z]
type = DirichletBC
boundary = "fix_z"
variable = disp_z
value = 0
[]
[]
[Materials]
[elastic_tensor_1]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
block = '1'
[]
[elastic_tensor_2]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 120000.0
poissons_ratio = 0.21
block = '2'
[]
[elastic_tensor_3]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 80000.0
poissons_ratio = 0.4
block = '3'
[]
[elastic_tensor_4]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 76000.0
poissons_ratio = 0.11
block = '4'
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
homogenization_gradient_names = 'homogenization_gradient'
[]
[compute_homogenization_gradient]
type = ComputeHomogenizedLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[s11]
type = ElementAverageValue
variable = s11
execute_on = 'initial timestep_end'
[]
[s21]
type = ElementAverageValue
variable = s21
execute_on = 'initial timestep_end'
[]
[s31]
type = ElementAverageValue
variable = s31
execute_on = 'initial timestep_end'
[]
[s12]
type = ElementAverageValue
variable = s12
execute_on = 'initial timestep_end'
[]
[s22]
type = ElementAverageValue
variable = s22
execute_on = 'initial timestep_end'
[]
[s32]
type = ElementAverageValue
variable = s32
execute_on = 'initial timestep_end'
[]
[s13]
type = ElementAverageValue
variable = s13
execute_on = 'initial timestep_end'
[]
[s23]
type = ElementAverageValue
variable = s23
execute_on = 'initial timestep_end'
[]
[s33]
type = ElementAverageValue
variable = s33
execute_on = 'initial timestep_end'
[]
[F11]
type = ElementAverageValue
variable = F11
execute_on = 'initial timestep_end'
[]
[F21]
type = ElementAverageValue
variable = F21
execute_on = 'initial timestep_end'
[]
[F31]
type = ElementAverageValue
variable = F31
execute_on = 'initial timestep_end'
[]
[F12]
type = ElementAverageValue
variable = F12
execute_on = 'initial timestep_end'
[]
[F22]
type = ElementAverageValue
variable = F22
execute_on = 'initial timestep_end'
[]
[F32]
type = ElementAverageValue
variable = F32
execute_on = 'initial timestep_end'
[]
[F13]
type = ElementAverageValue
variable = F13
execute_on = 'initial timestep_end'
[]
[F23]
type = ElementAverageValue
variable = F23
execute_on = 'initial timestep_end'
[]
[F33]
type = ElementAverageValue
variable = F33
execute_on = 'initial timestep_end'
[]
[]
[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 = 10
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 0.2
[]
[Outputs]
exodus = false
csv = false
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/convergence-auto/3D/neumann.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 = 4
ny = 4
nz = 4
[]
[]
[ICs]
[disp_x]
type = RandomIC
variable = disp_x
min = -0.02
max = 0.02
[]
[disp_y]
type = RandomIC
variable = disp_y
min = -0.02
max = 0.02
[]
[disp_z]
type = RandomIC
variable = disp_z
min = -0.02
max = 0.02
[]
[]
[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
[]
[]
[Functions]
[pullx]
type = ParsedFunction
expression = '4000 * t'
[]
[pully]
type = ParsedFunction
expression = '-2000 * t'
[]
[pullz]
type = ParsedFunction
expression = '3000 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = left
variable = disp_y
value = 0.0
[]
[leftz]
type = DirichletBC
preset = true
boundary = left
variable = disp_z
value = 0.0
[]
[pull_x]
type = FunctionNeumannBC
boundary = right
variable = disp_x
function = pullx
[]
[pull_y]
type = FunctionNeumannBC
boundary = top
variable = disp_y
function = pully
[]
[pull_z]
type = FunctionNeumannBC
boundary = right
variable = disp_z
function = pullz
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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
[]
(modules/electromagnetics/test/tests/kernels/scalar_complex_helmholtz/scalar_complex_helmholtz.i)
# problem: -(cu')' - k^2 * u = -F , 0 < x < L, u: R -> C
# u(x=0) = g0 , u(x=L) = gL
# k = a + jb
# a = a(x) = 2 * (1 + x/L)
# b = b(x) = (1 + x/L)
# c = d + jh
# d = d(x) = 12 * (1 + x/L)^2
# h = h(x) = 4 * (1 + x/L)^2
# L = 10
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = 10
nx = 100
[]
[]
[Variables]
[u_real]
order = FIRST
family = LAGRANGE
[]
[u_imag]
order = FIRST
family = LAGRANGE
[]
[]
[Functions]
[k_real]
type = ParsedFunction
expression = '2*(1 + x/10)'
[]
[k_imag]
type = ParsedFunction
expression = '(1 + x/10)'
[]
[d_func]
type = ParsedFunction
expression = '12 * (1 + x/10)^2'
[]
[h_func]
type = ParsedFunction
expression = '4 * (1 + x/10)^2'
[]
[negative_h_func]
type = ParsedFunction
expression = '-4 * (1 + x/10)^2'
[]
[RHS_real]
type = MMSTestFunc
L = 10
g0_real = 1
g0_imag = -1
gL_real = 0
gL_imag = 0
component = real
[]
[RHS_imag]
type = MMSTestFunc
L = 10
g0_real = 1
g0_imag = -1
gL_real = 0
gL_imag = 0
component = imaginary
[]
[]
[Materials]
[k_real_mat]
type = ADGenericFunctionMaterial
prop_names = k_real_mat
prop_values = k_real
[]
[k_imag_mat]
type = ADGenericFunctionMaterial
prop_names = k_imag_mat
prop_values = k_imag
[]
[wave_equation_coefficient]
type = WaveEquationCoefficient
k_real = k_real_mat
k_imag = k_imag_mat
eps_rel_real = 1
eps_rel_imag = 0
mu_rel_real = 1
mu_rel_imag = 0
[]
[negative_wave_equation_coefficient_imaginary]
type = ADParsedMaterial
property_name = negative_wave_equation_coefficient_imaginary
material_property_names = wave_equation_coefficient_imaginary
expression = '-1 * wave_equation_coefficient_imaginary'
[]
[]
[Kernels]
[laplacian_real]
type = FunctionDiffusion
function = d_func
variable = u_real
[]
[coupledLaplacian_real]
type = FunctionDiffusion
function = negative_h_func
v = u_imag
variable = u_real
[]
[coeffField_real]
type = ADMatReaction
reaction_rate = wave_equation_coefficient_real
variable = u_real
[]
[coupledField_real]
type = ADMatCoupledForce
v = u_imag
mat_prop_coef = negative_wave_equation_coefficient_imaginary
variable = u_real
[]
[bodyForce_real]
type = BodyForce
function = RHS_real
variable = u_real
[]
[laplacian_imag]
type = FunctionDiffusion
function = d_func
variable = u_imag
[]
[coupledLaplacian_imag]
type = FunctionDiffusion
function = h_func
v = u_real
variable = u_imag
[]
[coeffField_imag]
type = ADMatReaction
reaction_rate = wave_equation_coefficient_real
variable = u_imag
[]
[coupledField_imag]
type = ADMatCoupledForce
v = u_real
mat_prop_coef = wave_equation_coefficient_imaginary
variable = u_imag
[]
[bodyForce_imag]
type = BodyForce
function = RHS_imag
variable = u_imag
[]
[]
[BCs]
[left_real]
type = DirichletBC
value = 1
boundary = left
variable = u_real
[]
[left_imag]
type = DirichletBC
value = -1
boundary = left
variable = u_imag
[]
[right_real]
type = DirichletBC
value = 0
boundary = right
variable = u_real
[]
[right_imag]
type = DirichletBC
value = 0
boundary = right
variable = u_imag
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/side_pps/side_pps_multi_bnd_test.i)
#
# Tests elemental PPS running on multiple blocks
#
[Mesh]
type = StripeMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 3
ny = 3
elem_type = QUAD4
stripes = 3
# StripeMesh currently only works correctly with ReplicatedMesh.
parallel_type = replicated
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = x*(y+1)
[../]
[]
[Variables]
[./u]
family = MONOMIAL
order = CONSTANT
[../]
[]
[Kernels]
[./uv]
type = Reaction
variable = u
[../]
[./fv]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[Postprocessors]
[./int_0_1]
type = SideIntegralVariablePostprocessor
variable = u
boundary = '0 1'
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
execute_on = 'timestep_end'
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[]
(test/tests/time_steppers/timesequence_stepper/timesequence_restart_failure.i)
[Mesh]
file = timesequence_restart_failure1_cp/0002-mesh.cpr
[]
[Problem]
restart_file_base = timesequence_restart_failure1_cp/0002
# There is an initial conditions overwriting the restart on the nonlinear variable u
# As you can see in the gold file, this makes the initial step output be from the
# initial condition
allow_initial_conditions_with_restart = true
[]
[Functions]
[exact_fn]
type = ParsedFunction
expression = t*t*(x*x+y*y)
[]
[forcing_fn]
type = ParsedFunction
expression = 2*t*(x*x+y*y)-4*t*t
[]
[]
[Variables]
[u]
family = LAGRANGE
order = SECOND
[]
[]
[ICs]
[u_var]
type = FunctionIC
variable = u
function = exact_fn
[]
[]
[Kernels]
[td]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[]
[]
[Executioner]
type = Transient
end_time = 4.0
[TimeStepper]
type = TimeSequenceStepper
time_sequence = '0 0.85 1.2 1.3 2 4'
[]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/mms/channel-flow/cylindrical/2d-average.i)
mu=1.1
rho=1.1
advected_interp_method='average'
velocity_interp_method='average'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
[]
[]
[Problem]
coord_type = 'RZ'
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 1
two_term_boundary_expansion = false
[]
[v]
type = INSFVVelocityVariable
initial_condition = 1
two_term_boundary_expansion = false
[]
[pressure]
type = INSFVPressureVariable
two_term_boundary_expansion = false
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[mass_forcing]
type = FVBodyForce
variable = pressure
function = forcing_p
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[u_forcing]
type = INSFVBodyForce
variable = u
functor = forcing_u
momentum_component = 'x'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[v_forcing]
type = INSFVBodyForce
variable = v
functor = forcing_v
momentum_component = 'y'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'bottom'
variable = u
function = 'exact_u'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'bottom'
variable = v
function = 'exact_v'
[]
[no-slip-wall-u]
type = INSFVNoSlipWallBC
boundary = 'right'
variable = u
function = 'exact_u'
[]
[no-slip-wall-v]
type = INSFVNoSlipWallBC
boundary = 'right'
variable = v
function = 'exact_v'
[]
[outlet-p]
type = INSFVOutletPressureBC
boundary = 'top'
variable = pressure
function = 'exact_p'
[]
[axis-u]
type = INSFVSymmetryVelocityBC
boundary = 'left'
variable = u
u = u
v = v
mu = ${mu}
momentum_component = x
[]
[axis-v]
type = INSFVSymmetryVelocityBC
boundary = 'left'
variable = v
u = u
v = v
mu = ${mu}
momentum_component = y
[]
[axis-p]
type = INSFVSymmetryPressureBC
boundary = 'left'
variable = pressure
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'sin(x*pi)^2*sin((1/2)*y*pi)'
[]
[exact_rhou]
type = ParsedFunction
expression = 'rho*sin(x*pi)^2*sin((1/2)*y*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[forcing_u]
type = ParsedFunction
expression = '(1/4)*pi^2*mu*sin(x*pi)^2*sin((1/2)*y*pi) - pi*sin(x*pi)*cos((1/2)*y*pi) + (4*x*pi*rho*sin(x*pi)^3*sin((1/2)*y*pi)^2*cos(x*pi) + rho*sin(x*pi)^4*sin((1/2)*y*pi)^2)/x + (-x*pi*rho*sin(x*pi)^2*sin((1/2)*y*pi)*sin(y*pi)*cos(x*pi) + (1/2)*x*pi*rho*sin(x*pi)^2*cos(x*pi)*cos((1/2)*y*pi)*cos(y*pi))/x - (-2*x*pi^2*mu*sin(x*pi)^2*sin((1/2)*y*pi) + 2*x*pi^2*mu*sin((1/2)*y*pi)*cos(x*pi)^2 + 2*pi*mu*sin(x*pi)*sin((1/2)*y*pi)*cos(x*pi))/x'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_v]
type = ParsedFunction
expression = 'cos(x*pi)*cos(y*pi)'
[]
[exact_rhov]
type = ParsedFunction
expression = 'rho*cos(x*pi)*cos(y*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[forcing_v]
type = ParsedFunction
expression = 'pi^2*mu*cos(x*pi)*cos(y*pi) - 2*pi*rho*sin(y*pi)*cos(x*pi)^2*cos(y*pi) - 1/2*pi*sin((1/2)*y*pi)*cos(x*pi) - (-x*pi^2*mu*cos(x*pi)*cos(y*pi) - pi*mu*sin(x*pi)*cos(y*pi))/x + (-x*pi*rho*sin(x*pi)^3*sin((1/2)*y*pi)*cos(y*pi) + 2*x*pi*rho*sin(x*pi)*sin((1/2)*y*pi)*cos(x*pi)^2*cos(y*pi) + rho*sin(x*pi)^2*sin((1/2)*y*pi)*cos(x*pi)*cos(y*pi))/x'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'cos(x*pi)*cos((1/2)*y*pi)'
[]
[forcing_p]
type = ParsedFunction
expression = '-pi*rho*sin(y*pi)*cos(x*pi) + (2*x*pi*rho*sin(x*pi)*sin((1/2)*y*pi)*cos(x*pi) + rho*sin(x*pi)^2*sin((1/2)*y*pi))/x'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm 100 lu NONZERO'
line_search = 'none'
[]
[Outputs]
csv = true
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[./L2u]
type = ElementL2FunctorError
approximate = u
exact = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[./L2v]
type = ElementL2FunctorError
approximate = v
exact = exact_v
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[./L2p]
approximate = pressure
exact = exact_p
type = ElementL2FunctorError
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/energy_source/steady.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[temperature][]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./mass_pspg]
type = INSADMassPSPG
variable = p
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[../]
[./momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[../]
[./temperature_advection]
type = INSADEnergyAdvection
variable = temperature
[../]
[./temperature_conduction]
type = ADHeatConduction
variable = temperature
thermal_conductivity = 'k'
[../]
[temperature_source]
type = INSADEnergySource
variable = temperature
source_function = 1
[]
[temperature_supg]
type = INSADEnergySUPG
variable = temperature
velocity = velocity
[]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left'
[../]
[./lid]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 'lid_function'
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[./temperature_hot]
type = DirichletBC
variable = temperature
boundary = 'bottom'
value = 1
[../]
[./temperature_cold]
type = DirichletBC
variable = temperature
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = temperature
[]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(test/tests/mortar/continuity-2d-non-conforming/dual-soln-continuity-vcp.i)
[Mesh]
second_order = false
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[]
[secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[]
[]
[Variables]
[T]
block = '1 2'
order = FIRST
[]
[lambda]
block = '10'
order = FIRST
use_dual = true
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln
variable = T
boundary = '3 4 5 6 7 8'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression= '-4 + x^2 + y^2'
[]
[exact_soln]
type = ParsedFunction
expression= 'x^2 + y^2'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
[]
[]
[Preconditioning]
[vcp]
type = VCP
full = true
lm_variable = 'lambda'
primary_variable = 'T'
preconditioner = 'AMG'
is_lm_coupling_diagonal = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = ' -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' NONZERO 1e-15'
[]
[Outputs]
file_base = 'dual-soln-continuity_out'
exodus = true
[]
(test/tests/time_steppers/timesequence_stepper/timesequence.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*t*(x*x+y*y)
[../]
[./forcing_fn]
type = ParsedFunction
expression = 2*t*(x*x+y*y)-4*t*t
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]
[ICs]
[./u_var]
type = FunctionIC
variable = u
function = exact_fn
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[../]
[]
[Executioner]
type = Transient
end_time = 4.0
[./TimeStepper]
type = TimeSequenceStepper
time_sequence = '0 0.85 1.3 2 4'
[../]
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/crysp_fileread.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx=1
ny=1
nz=1
xmin=0.0
xmax=1.0
ymin=0.0
ymax=1.0
zmin=0.0
zmax=1.0
elem_type = HEX8
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
block = 0
[../]
[./disp_y]
block = 0
[../]
[./disp_z]
block = 0
[../]
[]
[AuxVariables]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./fp_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./rotout]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./e_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./gss1]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[]
[Functions]
[./tdisp]
type = ParsedFunction
expression = 0.01*t
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_zz]
type = RankTwoAux
variable = stress_zz
rank_two_tensor = stress
index_j = 2
index_i = 2
execute_on = timestep_end
block = 0
[../]
[./fp_zz]
type = RankTwoAux
variable = fp_zz
rank_two_tensor = fp
index_j = 2
index_i = 2
execute_on = 'initial timestep_end'
block = 0
[../]
[./e_zz]
type = RankTwoAux
variable = e_zz
rank_two_tensor = lage
index_j = 2
index_i = 2
execute_on = timestep_end
block = 0
[../]
[./gss1]
type = MaterialStdVectorAux
variable = gss1
property = gss
index = 0
execute_on = 'initial timestep_end'
block = 0
[../]
[]
[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
[../]
[./tdisp]
type = FunctionDirichletBC
variable = disp_z
boundary = front
function = tdisp
[../]
[]
[Materials]
[./crysp]
type = FiniteStrainCrystalPlasticity
block = 0
gtol = 1e-2
slip_sys_file_name = input_slip_sys.txt
slip_sys_res_prop_file_name = input_slip_sys_res.txt
slip_sys_flow_prop_file_name = input_slip_sys_flow_prop.txt
hprops = '1.0 541.5 60.8 109.8 2.5'
nss = 12
intvar_read_type = slip_sys_res_file
[../]
[./elasticity_tensor]
type = ComputeElasticityTensorCP
block = 0
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[]
[Postprocessors]
[./stress_zz]
type = ElementAverageValue
variable = stress_zz
execute_on = 'initial timestep_end'
[../]
[./fp_zz]
type = ElementAverageValue
variable = fp_zz
execute_on = 'initial timestep_end'
[../]
[./e_zz]
type = ElementAverageValue
variable = e_zz
execute_on = 'initial timestep_end'
[../]
[./gss1]
type = ElementAverageValue
variable = gss1
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
dt = 0.05
dtmax = 10.0
dtmin = 0.05
num_steps = 10
[]
[Outputs]
file_base = crysp_fileread_out
exodus = true
[]
(modules/fluid_properties/test/tests/materials/fluid_properties_material/test_pt.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
elem_type = QUAD4
[]
[Functions]
[fn_1]
type = ParsedFunction
expression = '2e5 * (1 + x)'
[]
[fn_2]
type = ParsedFunction
expression = '300 * (1 + x*x+y*y)'
[]
[]
[AuxVariables]
[pressure]
[InitialCondition]
type = FunctionIC
function = fn_1
[]
[]
[temperature]
[InitialCondition]
type = FunctionIC
function = fn_2
[]
[]
[rho]
family = MONOMIAL
order = CONSTANT
[]
[mu]
family = MONOMIAL
order = CONSTANT
[]
[cp]
family = MONOMIAL
order = CONSTANT
[]
[cv]
family = MONOMIAL
order = CONSTANT
[]
[k]
family = MONOMIAL
order = CONSTANT
[]
[h]
family = MONOMIAL
order = CONSTANT
[]
[e]
family = MONOMIAL
order = CONSTANT
[]
[s]
family = MONOMIAL
order = CONSTANT
[]
[c]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[rho]
type = MaterialRealAux
variable = rho
property = density
[]
[mu]
type = MaterialRealAux
variable = mu
property = viscosity
[]
[cp]
type = MaterialRealAux
variable = cp
property = cp
[]
[cv]
type = MaterialRealAux
variable = cv
property = cv
[]
[k]
type = MaterialRealAux
variable = k
property = k
[]
[h]
type = MaterialRealAux
variable = h
property = h
[]
[e]
type = MaterialRealAux
variable = e
property = e
[]
[s]
type = MaterialRealAux
variable = s
property = s
[]
[c]
type = MaterialRealAux
variable = c
property = c
[]
[]
[FluidProperties]
[ideal_gas]
type = IdealGasFluidProperties
gamma = 1.4
molar_mass = 1.000536678700361
[]
[]
[Materials]
[fp_mat]
type = FluidPropertiesMaterialPT
pressure = pressure
temperature = temperature
fp = ideal_gas
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Problem]
solve = false
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/avg_nodal_var_value/avg_nodal_var_value.i)
[Mesh]
file = square-2x2-nodeids.e
[]
[Variables]
active = 'u v'
[./u]
order = SECOND
family = LAGRANGE
[../]
[./v]
order = SECOND
family = LAGRANGE
[../]
[]
[Functions]
active = 'force_fn exact_fn left_bc'
[./force_fn]
type = ParsedFunction
expression = '1-x*x+2*t'
[../]
[./exact_fn]
type = ParsedFunction
expression = '(1-x*x)*t'
[../]
[./left_bc]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
active = '
time_u diff_u ffn_u
time_v diff_v'
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'all_u left_v right_v'
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = exact_fn
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '2'
value = 0
[../]
[]
[Postprocessors]
[./l2]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./node1]
type = AverageNodalVariableValue
variable = u
boundary = 10
[../]
[./node4]
type = AverageNodalVariableValue
variable = v
boundary = 13
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_avg_nodal_var_value
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/mms/channel-flow/cylindrical/cartesian-version/2d-rc-no-slip-walls.i)
mu=1.1
rho=1.1
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
[]
[]
[Problem]
fv_bcs_integrity_check = false
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
two_term_boundary_expansion = true
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
[]
[v]
type = INSFVVelocityVariable
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[ICs]
[u]
type = FunctionIC
function = 'exact_u'
variable = u
[]
[v]
type = FunctionIC
function = 'exact_v'
variable = v
[]
[pressure]
type = FunctionIC
function = 'exact_p'
variable = pressure
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
rho = ${rho}
[]
[mass_forcing]
type = FVBodyForce
variable = pressure
function = forcing_p
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[u_forcing]
type = INSFVBodyForce
variable = u
functor = forcing_u
momentum_component = 'x'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[v_forcing]
type = INSFVBodyForce
variable = v
functor = forcing_v
momentum_component = 'y'
[]
[]
[FVBCs]
[u_walls]
type = INSFVNoSlipWallBC
variable = u
boundary = 'left right'
function = 'exact_u'
[]
[v_walls]
type = INSFVNoSlipWallBC
variable = v
boundary = 'left right'
function = 'exact_v'
[]
[p]
type = INSFVOutletPressureBC
variable = pressure
function = 'exact_p'
boundary = 'top'
[]
[inlet_u]
type = INSFVInletVelocityBC
variable = u
function = 'exact_u'
boundary = 'bottom'
[]
[inlet_v]
type = INSFVInletVelocityBC
variable = v
function = 'exact_v'
boundary = 'bottom'
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'sin(x*pi)*cos(y*pi)'
[]
[forcing_u]
type = ParsedFunction
expression = '2*pi^2*mu*sin(x*pi)*cos(y*pi) - 2*pi*rho*sin(x*pi)*sin(y*pi)*cos(1.3*x)*cos(y*pi) + 2*pi*rho*sin(x*pi)*cos(x*pi)*cos(y*pi)^2 + 1.5*cos(1.5*x)*cos(1.6*y)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_v]
type = ParsedFunction
expression = 'cos(1.3*x)*cos(y*pi)'
[]
[forcing_v]
type = ParsedFunction
expression = '1.69*mu*cos(1.3*x)*cos(y*pi) + pi^2*mu*cos(1.3*x)*cos(y*pi) - 1.3*rho*sin(1.3*x)*sin(x*pi)*cos(y*pi)^2 - 2*pi*rho*sin(y*pi)*cos(1.3*x)^2*cos(y*pi) + pi*rho*cos(1.3*x)*cos(x*pi)*cos(y*pi)^2 - 1.6*sin(1.5*x)*sin(1.6*y)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'sin(1.5*x)*cos(1.6*y)'
[]
[forcing_p]
type = ParsedFunction
expression = '-pi*rho*sin(y*pi)*cos(1.3*x) + pi*rho*cos(x*pi)*cos(y*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO superlu_dist'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
[]
[Outputs]
csv = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[./L2u]
type = ElementL2FunctorError
approximate = u
exact = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[./L2v]
type = ElementL2FunctorError
approximate = v
exact = exact_v
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[./L2p]
approximate = pressure
exact = exact_p
type = ElementL2FunctorError
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/rz-x-axial-coord/pipe-flow.i)
mu=1
rho=1
pipe_length=10 # m
pipe_radius=1 # m
u_inlet=1
[GlobalParams]
integrate_p_by_parts = false
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${pipe_length}
ymin = 0
ymax = ${pipe_radius}
nx = 50
ny = 5
[]
coord_type = 'RZ'
rz_coord_axis = x
[]
[Variables]
[velocity]
family = LAGRANGE_VEC
[]
[p][]
[]
[Kernels]
[mass]
type = INSADMass
variable = p
[]
[mass_pspg]
type = INSADMassPSPG
variable = p
[]
[momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
[]
[momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[]
[]
[Functions]
[vel_x_inlet]
type = ParsedFunction
expression = '${u_inlet} * (${pipe_radius}^2 - y^2)'
[]
[]
[BCs]
[inlet]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'left'
function_x = vel_x_inlet
function_y = 0
[../]
[wall]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 0
function_y = 0
[]
[axis]
type = ADVectorFunctionDirichletBC
variable = velocity
boundary = 'bottom'
set_x_comp = false
function_y = 0
[]
# pressure is not integrated by parts so we cannot remove the nullspace through a natural condition
[p_corner]
type = DirichletBC
boundary = 'right'
value = 0
variable = p
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[ins_mat]
type = INSADTauMaterial
velocity = velocity
pressure = p
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
line_search = 'none'
[]
[Outputs]
exodus = true
[]
(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/navier_stokes/test/tests/finite_element/ins/velocity_channel/ad-traction-supg.i)
# This input file tests outflow boundary conditions for the incompressible NS equations.
[GlobalParams]
integrate_p_by_parts = true
viscous_form = traction
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 3.0
ymin = 0
ymax = 1.0
nx = 30
ny = 10
elem_type = QUAD9
[]
[Variables]
[vel]
order = SECOND
family = LAGRANGE_VEC
[]
[p]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[mass]
type = INSADMass
variable = p
[]
[momentum_convection]
type = INSADMomentumAdvection
variable = vel
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = vel
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = vel
pressure = p
[]
[momentum_supg]
type = INSADMomentumSUPG
variable = vel
velocity = vel
[]
[]
[BCs]
[wall]
type = VectorFunctionDirichletBC
variable = vel
boundary = 'top bottom'
function_x = 0
function_y = 0
[]
[inlet]
type = VectorFunctionDirichletBC
variable = vel
boundary = 'left'
function_x = inlet_func
function_y = 0
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '1 1'
[]
[ins_mat]
type = INSADTauMaterial
velocity = vel
pressure = p
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
solve_type = NEWTON
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = none
nl_rel_tol = 1e-12
[]
[Outputs]
[out]
type = Exodus
[]
[]
[Functions]
[inlet_func]
type = ParsedFunction
expression = '-4 * (y - 0.5)^2 + 1'
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/energy_source/steady-var.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[AuxVariables]
[u]
initial_condition = 1
[]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[temperature][]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./mass_pspg]
type = INSADMassPSPG
variable = p
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[../]
[./momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[../]
[./temperature_advection]
type = INSADEnergyAdvection
variable = temperature
[../]
[./temperature_conduction]
type = ADHeatConduction
variable = temperature
thermal_conductivity = 'k'
[../]
[temperature_source]
type = INSADEnergySource
variable = temperature
source_variable = u
[]
[temperature_supg]
type = INSADEnergySUPG
variable = temperature
velocity = velocity
[]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left'
[../]
[./lid]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 'lid_function'
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[./temperature_hot]
type = DirichletBC
variable = temperature
boundary = 'bottom'
value = 1
[../]
[./temperature_cold]
type = DirichletBC
variable = temperature
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = temperature
[]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
[out]
type = Exodus
hide = 'u'
[]
[]
(test/tests/userobjects/nearest_point_layered_average/radius_points_from_uo.i)
[Mesh]
[ccmg]
type = ConcentricCircleMeshGenerator
num_sectors = 8
radii = '0.1 0.2 0.3 0.4 0.5'
rings = '2 2 2 2 2'
has_outer_square = false
preserve_volumes = true
smoothing_max_it = 3
[]
[extruder]
type = MeshExtruderGenerator
input = ccmg
extrusion_vector = '0 0 1'
num_layers = 4
[]
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[ring_average]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[reac]
type = Reaction
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = func
[]
[]
[Functions]
[func]
type = ParsedFunction
expression = 'sqrt(x * x + y * y) + z'
[]
[]
[AuxKernels]
[np_layered_average]
type = SpatialUserObjectAux
variable = ring_average
execute_on = timestep_end
user_object = nrla
[]
[]
[UserObjects]
[nrla]
type = NearestRadiusLayeredAverage
direction = z
num_layers = 2
points = '0.05 0 0
0.15 0 0
0.25 0 0
0.35 0 0
0.45 0 0'
variable = u
[]
[]
[VectorPostprocessors]
# getting the points from the user object itself is here exactly equivalent to the points
# provided in the 'spatial_manually_provided' vector postprocessor
[spatial_from_uo]
type = SpatialUserObjectVectorPostprocessor
userobject = nrla
[]
[spatial_manually_provided]
type = SpatialUserObjectVectorPostprocessor
userobject = nrla
points = '0.05 0 0.25
0.05 0 0.75
0.15 0 0.25
0.15 0 0.75
0.25 0 0.25
0.25 0 0.75
0.35 0 0.25
0.35 0 0.75
0.45 0 0.25
0.45 0 0.75'
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
exodus = true
execute_on = final
[]
(modules/solid_mechanics/test/tests/central_difference/lumped/3D/3d_nodalmass_explicit.i)
# Test for the CentralDifference time integrator
[Mesh]
[./generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 2
xmin = 0.0
xmax = 1
ymin = 0.0
ymax = 1
zmin = 0.0
zmax = 2
[../]
[./all_nodes]
type = BoundingBoxNodeSetGenerator
new_boundary = 'all'
input = 'generated_mesh'
top_right = '1 1 2'
bottom_left = '0 0 0'
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxVariables]
[./vel_x]
[../]
[./accel_x]
[../]
[./vel_y]
[../]
[./accel_y]
[../]
[./vel_z]
[../]
[./accel_z]
[../]
[]
[Kernels]
[./DynamicSolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[]
[AuxKernels]
[./accel_x]
type = TestNewmarkTI
variable = accel_x
displacement = disp_x
first = false
[../]
[./vel_x]
type = TestNewmarkTI
variable = vel_x
displacement = disp_x
[../]
[./accel_y]
type = TestNewmarkTI
variable = accel_y
displacement = disp_y
first = false
[../]
[./vel_y]
type = TestNewmarkTI
variable = vel_y
displacement = disp_y
[../]
[./accel_z]
type = TestNewmarkTI
variable = accel_z
displacement = disp_z
first = false
[../]
[./vel_z]
type = TestNewmarkTI
variable = vel_z
displacement = disp_z
[../]
[]
[BCs]
[./x_bot]
type = FunctionDirichletBC
boundary = 'back'
variable = disp_x
function = dispx
preset = false
[../]
[./y_bot]
type = FunctionDirichletBC
variable = disp_y
boundary = back
function = dispy
preset = false
[../]
[./z_bot]
type = FunctionDirichletBC
variable = disp_z
boundary = back
function = dispz
preset = false
[../]
[]
[Functions]
[./dispx]
type = PiecewiseLinear
x = '0.0 1.0 2.0 3.0 4.0' # time
y = '0.0 1.0 0.0 -1.0 0.0' # displacement
[../]
[./dispy]
type = ParsedFunction
expression = 0.1*t*t*sin(10*t)
[../]
[./dispz]
type = ParsedFunction
expression = 0.1*t*t*sin(20*t)
[../]
[]
[NodalKernels]
[./nodal_mass_x]
type = NodalTranslationalInertia
boundary = 'all'
nodal_mass_file = 'nodal_mass_file.csv'
variable = 'disp_x'
[../]
[./nodal_mass_y]
type = NodalTranslationalInertia
boundary = 'all'
nodal_mass_file = 'nodal_mass_file.csv'
variable = 'disp_y'
[../]
[./nodal_mass_z]
type = NodalTranslationalInertia
boundary = 'all'
nodal_mass_file = 'nodal_mass_file.csv'
variable = 'disp_z'
[../]
[]
[Materials]
[./elasticity_tensor_block]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.25
block = 0
[../]
[./strain_block]
type = ComputeIncrementalSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
implicit = false
[../]
[./stress_block]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[]
[Executioner]
type = Transient
start_time = -0.01
end_time = 0.1
dt = 0.005
timestep_tolerance = 1e-6
[./TimeIntegrator]
type = CentralDifference
[../]
[]
[Postprocessors]
[./accel_10x]
type = NodalVariableValue
nodeid = 10
variable = accel_x
[../]
[]
[Outputs]
exodus = false
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'
[]
(test/tests/predictors/simple/predictor_test.i)
# The purpose of this test is to test the simple predictor. This is a very
# small, monotonically loaded block of material. If things are working right,
# the predictor should come very close to exactly nailing the solution on steps
# after the first step.
# The main thing to check here is that when the predictor is applied in the
# second step, the initial residual is almost zero.
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 3
ny = 3
[]
[Functions]
[ramp1]
type = ParsedFunction
expression = 't'
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
[]
[]
[BCs]
[bot]
type = DirichletBC
variable = u
boundary = bottom
value = 0.0
[]
[ss2_x]
type = FunctionDirichletBC
variable = u
boundary = top
function = ramp1
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-14
start_time = 0.0
dt = 0.5
end_time = 1.0
[Predictor]
type = SimplePredictor
scale = 1.0
[]
[]
[Postprocessors]
[final_residual]
type = Residual
residual_type = FINAL
[]
[initial_residual]
type = Residual
residual_type = INITIAL
[]
[]
[Outputs]
csv = true
[]
(modules/richards/test/tests/buckley_leverett/bl01_lumped.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 150
xmin = 0
xmax = 15
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = DensityConstBulk
relperm_UO = RelPermPower
SUPG_UO = SUPGstandard
sat_UO = Saturation
seff_UO = SeffVG
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2.0E6
[../]
[./SeffVG]
type = RichardsSeff1VG
m = 0.8
al = 1E-4
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[AuxKernels]
active = 'calculate_seff'
[./calculate_seff]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = SeffVG
pressure_vars = pressure
[../]
[]
[Variables]
[./pressure]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_pressure
[../]
[../]
[]
[BCs]
active = 'left'
[./left]
type = DirichletBC
variable = pressure
boundary = left
value = 980000
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsLumpedMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
variable = pressure
[../]
[]
[Functions]
active = 'initial_pressure'
[./initial_pressure]
type = ParsedFunction
expression = max((1000000-x/5*1000000)-20000,-20000)
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.15
mat_permeability = '1E-10 0 0 0 1E-10 0 0 0 1E-10'
viscosity = 1E-3
gravity = '-1 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
active = 'andy'
[./andy]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 20'
[../]
[]
[Executioner]
type = Transient
end_time = 50
dt = 2
snesmf_reuse_base = false
[]
[Outputs]
file_base = bl01_lumped
execute_on = 'initial timestep_end final'
time_step_interval = 10000
exodus = true
[]
(modules/solid_mechanics/test/tests/umat/multiple_blocks/multiple_blocks_two_materials_parallel.i)
# Testing the UMAT Interface - linear elastic model using the large strain formulation.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[mesh_1]
type = GeneratedMeshGenerator
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
nx = 2
ny = 2
nz = 2
[]
[block_1]
type = SubdomainIDGenerator
input = mesh_1
subdomain_id = 1
[]
[mesh_2]
type = GeneratedMeshGenerator
dim = 3
xmin = -2.0
xmax = -1.0
ymin = -2.0
ymax = -1.0
zmin = -2.0
zmax = -1.0
nx = 2
ny = 2
nz = 2
boundary_name_prefix = 'second'
[]
[block_2]
type = SubdomainIDGenerator
input = mesh_2
subdomain_id = 2
[]
[combined]
type = CombinerGenerator
inputs = 'block_1 block_2'
[]
[]
[Functions]
[top_pull]
type = ParsedFunction
value = t/100
[]
# Forced evolution of temperature
[temperature_load]
type = ParsedFunction
value = '273'
[]
# Factor to multiply the elasticity tensor in MOOSE
[elasticity_prefactor]
type = ParsedFunction
value = '1'
[]
[]
[AuxVariables]
[temperature]
[]
[]
[AuxKernels]
[temperature_function]
type = FunctionAux
variable = temperature
function = temperature_load
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
generate_output = 'stress_yy'
[]
[]
[BCs]
[y_pull_function]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = top_pull
[]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[z_bot]
type = DirichletBC
variable = disp_z
boundary = front
value = 0.0
[]
[]
[Materials]
[umat_1]
type = AbaqusUMATStress
constant_properties = '1000 0.3'
plugin = '../../../plugins/elastic_temperature'
num_state_vars = 0
temperature = temperature
use_one_based_indexing = true
block = '1'
[]
# Linear strain hardening
[umat_2]
type = AbaqusUMATStress
# Young's modulus, Poisson's Ratio, Yield, Hardening
constant_properties = '1000 0.3 100 100'
plugin = '../../../plugins/linear_strain_hardening'
num_state_vars = 3
use_one_based_indexing = true
block = '2'
[]
[elastic]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1000
poissons_ratio = 0.3
elasticity_tensor_prefactor = 'elasticity_prefactor'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
num_steps = 30
dt = 1.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(modules/misc/test/tests/coupled_directional_mesh_height_interpolation/coupled_directional_mesh_height_interpolation.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = 1
xmax = 2
displacements = 'disp_x disp_y'
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./disp_y]
[../]
[./stretch]
[../]
[]
[Functions]
[./stretch_func]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./interpolation]
type = CoupledDirectionalMeshHeightInterpolation
variable = disp_x
direction = x
execute_on = timestep_begin
coupled_var = stretch
[../]
[./stretch_aux]
type = FunctionAux
variable = stretch
function = stretch_func
execute_on = timestep_begin
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
use_displaced_mesh = true
[../]
[./right]
type = NeumannBC
variable = u
boundary = right
value = 1
use_displaced_mesh = true
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 1
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/convergence/2D/dirichlet.i)
# Simple 2D plane strain test
[GlobalParams]
displacements = 'disp_x disp_y'
large_kinematics = true
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
[]
[]
[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
[]
[]
[Functions]
[pullx]
type = ParsedFunction
expression = '0.5 * t'
[]
[pully]
type = ParsedFunction
expression = '-0.3 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = left
variable = disp_y
value = 0.0
[]
[pull_x]
type = FunctionDirichletBC
boundary = right
variable = disp_x
function = pullx
preset = true
[]
[pull_y]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = pully
preset = true
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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-10
nl_abs_tol = 1e-12
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 1.0
[]
[Postprocessors]
[nonlin]
type = NumNonlinearIterations
[]
[]
[Outputs]
exodus = false
csv = true
[]
(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
[../]
[]
(test/tests/kernels/ode/coupled_ode_td_auxvar_ic_from_mesh.i)
[Mesh]
type = FileMesh
file = 'coupled_ode_td_out.e'
[]
[Variables]
[f]
family = SCALAR
order = FIRST
initial_condition = 1
[]
[f_times_mult]
family = SCALAR
order = FIRST
initial_condition = 1
[]
[]
[ScalarKernels]
[dT]
type = CoupledODETimeDerivative
variable = f
v = f_times_mult
[]
[src]
type = ParsedODEKernel
variable = f
expression = '-1'
[]
[f_times_mult_1]
type = ParsedODEKernel
variable = f_times_mult
expression = 'f_times_mult'
[]
[f_times_mult_2]
type = ParsedODEKernel
variable = f_times_mult
expression = '-f * g'
coupled_variables = 'f g'
[]
[]
[AuxVariables]
[g]
family = SCALAR
order = FIRST
initial_from_file_var = g
initial_from_file_timestep = 'LATEST'
[]
[]
[Functions]
[function_g]
type = ParsedFunction
expression = '(1 + t)'
[]
[]
[AuxScalarKernels]
[set_g]
type = FunctionScalarAux
function = function_g
variable = g
execute_on = 'timestep_end'
[]
[]
[Problem]
# There are initial conditions overwriting the restart on the nonlinear variables
# However this test is targeted at the auxiliary variable restart so it's ok
allow_initial_conditions_with_restart = true
[]
[Executioner]
type = Transient
dt = 1
num_steps = 3
nl_abs_tol = 1e-9
[]
[Outputs]
csv = true
[]
(test/tests/restart/restart_transient_from_steady/steady_with_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[AuxVariables]
[Tf]
[]
[]
[Variables]
[power_density]
[]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2'
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[BCs]
[left]
type = DirichletBC
variable = power_density
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = power_density
boundary = right
value = 1e3
[]
[]
[Postprocessors]
[pwr_avg]
type = ElementAverageValue
variable = power_density
execute_on = 'initial timestep_end'
[]
[temp_avg]
type = ElementAverageValue
variable = Tf
execute_on = 'initial final'
[]
[temp_max]
type = ElementExtremeValue
value_type = max
variable = Tf
execute_on = 'initial final'
[]
[temp_min]
type = ElementExtremeValue
value_type = min
variable = Tf
execute_on = 'initial final'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
fixed_point_rel_tol = 1E-7
fixed_point_abs_tol = 1.0e-07
fixed_point_max_its = 12
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = steady_with_sub_sub.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[p_to_sub]
type = MultiAppShapeEvaluationTransfer
source_variable = power_density
variable = power_density
to_multi_app = sub
execute_on = 'timestep_end'
[]
[t_from_sub]
type = MultiAppShapeEvaluationTransfer
source_variable = temp
variable = Tf
from_multi_app = sub
execute_on = 'timestep_end'
[]
[]
[Outputs]
exodus = true
perf_graph = true
checkpoint = true
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
(test/tests/markers/error_tolerance_marker/error_tolerance_marker_adapt_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
nz = 4
uniform_refine = 2
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./solution]
type = ParsedFunction
expression = (exp(x)-1)/(exp(1)-1)
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./conv]
type = Convection
variable = u
velocity = '1 0 0'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Adaptivity]
steps = 1
marker = marker
[./Indicators]
[./error]
type = AnalyticalIndicator
variable = u
function = solution
[../]
[../]
[./Markers]
[./marker]
type = ErrorToleranceMarker
coarsen = 3e-10
indicator = error
refine = 7e-10
[../]
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/kernels/scalar_kernel_constraint/diffusion_override_scalar.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[exact_fn]
type = ParsedFunction
value = 'x*x+y*y'
[]
[ffn]
type = ParsedFunction
value = -4
[]
[bottom_bc_fn]
type = ParsedFunction
value = -2*y
[]
[right_bc_fn]
type = ParsedFunction
value = 2*x
[]
[top_bc_fn]
type = ParsedFunction
value = 2*y
[]
[left_bc_fn]
type = ParsedFunction
value = -2*x
[]
[]
[Variables]
[u]
family = LAGRANGE
order = SECOND
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[Kernels]
# Make sure that we can derive from the scalar base class
# but actually not assign a scalar variable
[diff]
type = DiffusionNoScalar
variable = u
scalar_variable = lambda
[]
[ffnk]
type = BodyForce
variable = u
function = ffn
[]
[sk_lm]
type = ScalarLMKernel
variable = u
kappa = lambda
pp_name = pp
value = 2.666666666666666
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bottom_bc_fn
[]
[right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = right_bc_fn
[]
[top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = top_bc_fn
[]
[left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = left_bc_fn
[]
[]
[Postprocessors]
# integrate the volume of domain since original objects set
# int(phi)=V0, rather than int(phi-V0)=0
[pp]
type = FunctionElementIntegral
function = 1
execute_on = initial
[]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-9
l_tol = 1.e-10
nl_max_its = 10
# This example builds an indefinite matrix, so "-pc_type hypre -pc_hypre_type boomeramg" cannot
# be used reliably on this problem. ILU(0) seems to do OK in both serial and parallel in my testing,
# I have not seen any zero pivot issues.
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'bjacobi ilu'
# This is a linear problem, so we don't need to recompute the
# Jacobian. This isn't a big deal for a Steady problems, however, as
# there is only one solve.
solve_type = 'LINEAR'
[]
[Outputs]
# exodus = true
csv = true
hide = lambda
[]
(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/auxkernels/ranktwoscalaraux.i)
[Mesh]
displacements = 'disp_x disp_y disp_z'
[generated_mesh]
type = GeneratedMeshGenerator
elem_type = HEX8
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
zmin = 0.0
zmax = 1.0
[]
[node]
type = ExtraNodesetGenerator
coord = '0.0 0.0 0.0'
new_boundary = 6
input = generated_mesh
[]
[snode]
type = ExtraNodesetGenerator
coord = '1.0 0.0 0.0'
new_boundary = 7
input = node
[]
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[]
[Materials]
[./fplastic]
type = FiniteStrainPlasticMaterial
block = 0
yield_stress='0. 445. 0.05 610. 0.1 680. 0.38 810. 0.95 920. 2. 950.'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
C_ijkl = '2.827e5 1.21e5 1.21e5 2.827e5 1.21e5 2.827e5 0.808e5 0.808e5 0.808e5'
fill_method = symmetric9
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[]
[Functions]
[./topfunc]
type = ParsedFunction
expression = 't'
[../]
[]
[BCs]
[./bottom3]
type = DirichletBC
variable = disp_z
boundary = 0
value = 0.0
[../]
[./top]
type = FunctionDirichletBC
variable = disp_z
boundary = 5
function = topfunc
[../]
[./corner1]
type = DirichletBC
variable = disp_x
boundary = 6
value = 0.0
[../]
[./corner2]
type = DirichletBC
variable = disp_y
boundary = 6
value = 0.0
[../]
[./corner3]
type = DirichletBC
variable = disp_z
boundary = 6
value = 0.0
[../]
[./side1]
type = DirichletBC
variable = disp_y
boundary = 7
value = 0.0
[../]
[./side2]
type = DirichletBC
variable = disp_z
boundary = 7
value = 0.0
[../]
[]
[AuxVariables]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./vonmises]
order = CONSTANT
family = MONOMIAL
[../]
[./hydrostatic]
order = CONSTANT
family = MONOMIAL
[../]
[./L2norm]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./vonmises]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = vonmises
scalar_type = VonMisesStress
[../]
[./hydrostatic]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = hydrostatic
scalar_type = Hydrostatic
[../]
[./L2norm]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = L2norm
scalar_type = L2norm
[../]
[]
[Postprocessors]
[./stress_zz]
type = ElementAverageValue
variable = stress_zz
[../]
[./vonmises]
type = ElementAverageValue
variable = vonmises
[../]
[./hydrostatic]
type = ElementAverageValue
variable = hydrostatic
[../]
[./L2norm]
type = ElementAverageValue
variable = L2norm
[../]
[]
[Executioner]
type = Transient
dt=0.1
dtmin=0.1
dtmax=1
end_time=1.0
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(modules/electromagnetics/test/tests/benchmarks/evanescent_wave/evanescent_wave.i)
# Evanescent wave decay benchmark
# frequency = 20 GHz
# eps_R = 1.0
# mu_R = 1.0
[Mesh]
[fmg]
type = FileMeshGenerator
file = waveguide_discontinuous.msh
[]
[]
[Functions]
[waveNumberSquared]
type = ParsedFunction
expression = '(2*pi*20e9/3e8)^2'
[]
[omegaMu]
type = ParsedFunction
expression = '2*pi*20e9*4*pi*1e-7'
[]
[beta]
type = ParsedFunction
expression = '2*pi*20e9/3e8'
[]
[curr_real]
type = ParsedVectorFunction
expression_y = 1.0
[]
[curr_imag] # defaults to '0.0 0.0 0.0'
type = ParsedVectorFunction
[]
[]
[Variables]
[E_real]
family = NEDELEC_ONE
order = FIRST
[]
[E_imag]
family = NEDELEC_ONE
order = FIRST
[]
[]
[Kernels]
[curlCurl_real]
type = CurlCurlField
variable = E_real
[]
[coeff_real]
type = VectorFunctionReaction
variable = E_real
function = waveNumberSquared
sign = negative
[]
[source_real]
type = VectorCurrentSource
variable = E_real
component = real
source_real = curr_real
source_imag = curr_imag
function_coefficient = omegaMu
block = source
[]
[curlCurl_imag]
type = CurlCurlField
variable = E_imag
[]
[coeff_imag]
type = VectorFunctionReaction
variable = E_imag
function = waveNumberSquared
sign = negative
[]
[source_imaginary]
type = VectorCurrentSource
variable = E_imag
component = imaginary
source_real = curr_real
source_imag = curr_imag
function_coefficient = omegaMu
block = source
[]
[]
[BCs]
[absorbing_left_real]
type = VectorEMRobinBC
variable = E_real
component = real
beta = beta
coupled_field = E_imag
mode = absorbing
boundary = 'port'
[]
[absorbing_right_real]
type = VectorEMRobinBC
variable = E_real
component = real
beta = beta
coupled_field = E_imag
mode = absorbing
boundary = 'exit'
[]
[absorbing_left_imag]
type = VectorEMRobinBC
variable = E_imag
component = imaginary
beta = beta
coupled_field = E_real
mode = absorbing
boundary = 'port'
[]
[absorbing_right_imag]
type = VectorEMRobinBC
variable = E_imag
component = imaginary
beta = beta
coupled_field = E_real
mode = absorbing
boundary = 'exit'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
[Debug]
show_var_residual_norms = 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
[]
(test/tests/materials/output/output_block_displaced.i)
[Mesh]
type = FileMesh
file = rectangle.e
dim = 2
uniform_refine = 1
displacements = 'disp disp'
[]
[Functions]
[./disp_fn]
type = ParsedFunction
expression = x
[../]
[]
[AuxVariables]
[./disp]
[../]
[]
[AuxKernels]
[./disp_ak]
type = FunctionAux
variable = disp
function = disp_fn
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.5
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 2
[../]
[]
[Materials]
[./block_1]
type = OutputTestMaterial
block = 1
output_properties = 'real_property tensor_property'
outputs = exodus
variable = u
[../]
[./block_2]
type = OutputTestMaterial
block = 2
output_properties = 'vector_property tensor_property'
outputs = exodus
variable = u
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
[./exodus]
type = Exodus
use_displaced = true
sequence = false
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_by_parts_steady_nobcbc.i)
# This input file tests several different things:
# .) The axisymmetric (RZ) form of the governing equations.
# .) An open boundary.
# .) Not integrating the pressure by parts, thereby requiring a pressure pin.
# .) Natural boundary condition at the outlet.
[GlobalParams]
integrate_p_by_parts = true
laplace = true
gravity = '0 0 0'
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = Newton
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Variables]
[./vel_x]
# Velocity in radial (r) direction
family = LAGRANGE
order = SECOND
[../]
[./vel_y]
# Velocity in axial (z) direction
family = LAGRANGE
order = SECOND
[../]
[./p]
family = LAGRANGE
order = FIRST
[../]
[]
[BCs]
[./u_in]
type = DirichletBC
boundary = bottom
variable = vel_x
value = 0
[../]
[./v_in]
type = FunctionDirichletBC
boundary = bottom
variable = vel_y
function = 'inlet_func'
[../]
[./u_axis_and_walls]
type = DirichletBC
boundary = 'left right'
variable = vel_x
value = 0
[../]
[./v_no_slip]
type = DirichletBC
boundary = 'right'
variable = vel_y
value = 0
[../]
[./u_out]
type = INSMomentumNoBCBCLaplaceForm
boundary = top
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./v_out]
type = INSMomentumNoBCBCLaplaceForm
boundary = top
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
# When the NoBCBC is applied on the outlet boundary then there is nothing
# constraining the pressure. Thus we must pin the pressure somewhere to ensure
# that the problem is not singular. If the below BC is not applied then
# -pc_type svd -pc_svd_monitor reveals a singular value
[p_corner]
type = DirichletBC
boundary = top_right
value = 0
variable = p
[]
[]
[Kernels]
[./mass]
type = INSMassRZ
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 'volume'
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(test/tests/outputs/xml/xml_iterations.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
[]
[Variables/u]
[]
[Kernels]
[diff]
type = ADDiffusion
variable = u
[]
[time]
type = ADTimeDerivative
variable = u
[]
[]
[Functions/function]
type = ParsedFunction
expression = 2*x
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 2
[]
[]
[Executioner]
type = Transient
num_steps = 2
solve_type = NEWTON
[]
[VectorPostprocessors]
[line]
type = LineFunctionSampler
functions = function
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 5
sort_by = x
execute_on = 'LINEAR'
[]
[]
[Outputs]
[out]
type = XMLOutput
execute_on = 'LINEAR NONLINEAR'
[]
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/convergence/ld-strain.i)
# 2D test with just strain control
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = true
constraint_types = 'strain strain strain strain strain strain strain strain strain'
macro_gradient = hvar
homogenization_constraint = homogenization
[]
[Mesh]
[base]
type = FileMeshGenerator
file = '3d.exo'
[]
[sidesets]
type = SideSetsFromNormalsGenerator
input = base
normals = '-1 0 0
1 0 0
0 -1 0
0 1 0
'
' 0 0 -1
0 0 1'
fixed_normal = true
new_boundary = 'left right bottom top back front'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[hvar]
family = SCALAR
order = NINTH
[]
[]
[ICs]
[disp_x]
type = RandomIC
variable = disp_x
min = -0.1
max = 0.1
[]
[disp_y]
type = RandomIC
variable = disp_y
min = -0.1
max = 0.1
[]
[disp_z]
type = RandomIC
variable = disp_z
min = -0.1
max = 0.1
[]
[hvar]
type = ScalarConstantIC
variable = hvar
value = 0.1
[]
[]
[AuxVariables]
[s11]
family = MONOMIAL
order = CONSTANT
[]
[s21]
family = MONOMIAL
order = CONSTANT
[]
[s31]
family = MONOMIAL
order = CONSTANT
[]
[s12]
family = MONOMIAL
order = CONSTANT
[]
[s22]
family = MONOMIAL
order = CONSTANT
[]
[s32]
family = MONOMIAL
order = CONSTANT
[]
[s13]
family = MONOMIAL
order = CONSTANT
[]
[s23]
family = MONOMIAL
order = CONSTANT
[]
[s33]
family = MONOMIAL
order = CONSTANT
[]
[F11]
family = MONOMIAL
order = CONSTANT
[]
[F21]
family = MONOMIAL
order = CONSTANT
[]
[F31]
family = MONOMIAL
order = CONSTANT
[]
[F12]
family = MONOMIAL
order = CONSTANT
[]
[F22]
family = MONOMIAL
order = CONSTANT
[]
[F32]
family = MONOMIAL
order = CONSTANT
[]
[F13]
family = MONOMIAL
order = CONSTANT
[]
[F23]
family = MONOMIAL
order = CONSTANT
[]
[F33]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[s11]
type = RankTwoAux
variable = s11
rank_two_tensor = pk1_stress
index_i = 0
index_j = 0
[]
[s21]
type = RankTwoAux
variable = s21
rank_two_tensor = pk1_stress
index_i = 1
index_j = 0
[]
[s31]
type = RankTwoAux
variable = s31
rank_two_tensor = pk1_stress
index_i = 2
index_j = 0
[]
[s12]
type = RankTwoAux
variable = s12
rank_two_tensor = pk1_stress
index_i = 0
index_j = 1
[]
[s22]
type = RankTwoAux
variable = s22
rank_two_tensor = pk1_stress
index_i = 1
index_j = 1
[]
[s32]
type = RankTwoAux
variable = s32
rank_two_tensor = pk1_stress
index_i = 2
index_j = 1
[]
[s13]
type = RankTwoAux
variable = s13
rank_two_tensor = pk1_stress
index_i = 0
index_j = 2
[]
[s23]
type = RankTwoAux
variable = s23
rank_two_tensor = pk1_stress
index_i = 1
index_j = 2
[]
[s33]
type = RankTwoAux
variable = s33
rank_two_tensor = pk1_stress
index_i = 2
index_j = 2
[]
[F11]
type = RankTwoAux
variable = F11
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 0
[]
[F21]
type = RankTwoAux
variable = F21
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 0
[]
[F31]
type = RankTwoAux
variable = F31
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 0
[]
[F12]
type = RankTwoAux
variable = F12
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 1
[]
[F22]
type = RankTwoAux
variable = F22
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 1
[]
[F32]
type = RankTwoAux
variable = F32
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 1
[]
[F13]
type = RankTwoAux
variable = F13
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 2
[]
[F23]
type = RankTwoAux
variable = F23
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 2
[]
[F33]
type = RankTwoAux
variable = F33
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 2
[]
[]
[UserObjects]
[homogenization]
type = HomogenizationConstraint
targets = 'strain11 strain21 strain31 strain12 strain22 strain32 strain13 strain23 strain33'
execute_on = 'INITIAL LINEAR NONLINEAR'
[]
[]
[Kernels]
[sdx]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[sdy]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_y
component = 1
[]
[sdz]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_z
component = 2
[]
[]
[ScalarKernels]
[enforce]
type = HomogenizationConstraintScalarKernel
variable = hvar
[]
[]
[Functions]
[strain11]
type = ParsedFunction
expression = '8.0e-2*t'
[]
[strain22]
type = ParsedFunction
expression = '-4.0e-2*t'
[]
[strain33]
type = ParsedFunction
expression = '8.0e-2*t'
[]
[strain23]
type = ParsedFunction
expression = '2.0e-2*t'
[]
[strain13]
type = ParsedFunction
expression = '-7.0e-2*t'
[]
[strain12]
type = ParsedFunction
expression = '1.0e-2*t'
[]
[strain32]
type = ParsedFunction
expression = '1.0e-2*t'
[]
[strain31]
type = ParsedFunction
expression = '2.0e-2*t'
[]
[strain21]
type = ParsedFunction
expression = '-1.5e-2*t'
[]
[zero]
type = ConstantFunction
value = 0
[]
[]
[BCs]
[Periodic]
[x]
variable = disp_x
auto_direction = 'x y z'
[]
[y]
variable = disp_y
auto_direction = 'x y z'
[]
[z]
variable = disp_z
auto_direction = 'x y z'
[]
[]
[fix1_x]
type = DirichletBC
boundary = "fix_all"
variable = disp_x
value = 0
[]
[fix1_y]
type = DirichletBC
boundary = "fix_all"
variable = disp_y
value = 0
[]
[fix1_z]
type = DirichletBC
boundary = "fix_all"
variable = disp_z
value = 0
[]
[fix2_x]
type = DirichletBC
boundary = "fix_xy"
variable = disp_x
value = 0
[]
[fix2_y]
type = DirichletBC
boundary = "fix_xy"
variable = disp_y
value = 0
[]
[fix3_z]
type = DirichletBC
boundary = "fix_z"
variable = disp_z
value = 0
[]
[]
[Materials]
[elastic_tensor_1]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
block = '1'
[]
[elastic_tensor_2]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 120000.0
poissons_ratio = 0.21
block = '2'
[]
[elastic_tensor_3]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 80000.0
poissons_ratio = 0.4
block = '3'
[]
[elastic_tensor_4]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 76000.0
poissons_ratio = 0.11
block = '4'
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
homogenization_gradient_names = 'homogenization_gradient'
[]
[compute_homogenization_gradient]
type = ComputeHomogenizedLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[s11]
type = ElementAverageValue
variable = s11
execute_on = 'initial timestep_end'
[]
[s21]
type = ElementAverageValue
variable = s21
execute_on = 'initial timestep_end'
[]
[s31]
type = ElementAverageValue
variable = s31
execute_on = 'initial timestep_end'
[]
[s12]
type = ElementAverageValue
variable = s12
execute_on = 'initial timestep_end'
[]
[s22]
type = ElementAverageValue
variable = s22
execute_on = 'initial timestep_end'
[]
[s32]
type = ElementAverageValue
variable = s32
execute_on = 'initial timestep_end'
[]
[s13]
type = ElementAverageValue
variable = s13
execute_on = 'initial timestep_end'
[]
[s23]
type = ElementAverageValue
variable = s23
execute_on = 'initial timestep_end'
[]
[s33]
type = ElementAverageValue
variable = s33
execute_on = 'initial timestep_end'
[]
[F11]
type = ElementAverageValue
variable = F11
execute_on = 'initial timestep_end'
[]
[F21]
type = ElementAverageValue
variable = F21
execute_on = 'initial timestep_end'
[]
[F31]
type = ElementAverageValue
variable = F31
execute_on = 'initial timestep_end'
[]
[F12]
type = ElementAverageValue
variable = F12
execute_on = 'initial timestep_end'
[]
[F22]
type = ElementAverageValue
variable = F22
execute_on = 'initial timestep_end'
[]
[F32]
type = ElementAverageValue
variable = F32
execute_on = 'initial timestep_end'
[]
[F13]
type = ElementAverageValue
variable = F13
execute_on = 'initial timestep_end'
[]
[F23]
type = ElementAverageValue
variable = F23
execute_on = 'initial timestep_end'
[]
[F33]
type = ElementAverageValue
variable = F33
execute_on = 'initial timestep_end'
[]
[]
[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 = 20
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 0.2
[]
[Outputs]
exodus = false
csv = false
[]
(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
[]
(test/tests/time_integrators/dirk/dirk-2d-heat.i)
#
# Testing a solution that is second order in space and first order in time.
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 20
ny = 20
elem_type = QUAD9
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = exact_fn
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = ((x*x)+(y*y))-(4*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
start_time = 0.0
end_time = 1.0
dt = 1.0
nl_abs_tol=1e-13
nl_rel_tol=1e-13
[./TimeIntegrator]
type = LStableDirk2
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/richards/test/tests/buckley_leverett/bl01_adapt.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 15
xmin = 0
xmax = 15
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2.0E6
[../]
[./SeffVG]
type = RichardsSeff1VG
m = 0.8
al = 1E-4
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[AuxKernels]
active = 'calculate_seff'
[./calculate_seff]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = SeffVG
pressure_vars = pressure
[../]
[]
[Variables]
[./pressure]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_pressure
[../]
[../]
[]
[BCs]
active = 'left'
[./left]
type = DirichletBC
variable = pressure
boundary = left
value = 980000
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
variable = pressure
[../]
[]
[Functions]
active = 'initial_pressure'
[./initial_pressure]
type = ParsedFunction
expression = max((1000000-x/5*1000000)-20000,-20000)
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.15
mat_permeability = '1E-10 0 0 0 1E-10 0 0 0 1E-10'
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
[../]
[]
[Adaptivity]
marker = errorfrac
max_h_level = 3
[./Indicators]
[./error]
type = RichardsFluxJumpIndicator
variable = pressure
[../]
[../]
[./Markers]
[./errorfrac]
type = ErrorFractionMarker
refine = 0.5
coarsen = 0.3
indicator = error
[../]
[../]
[]
[Preconditioning]
active = 'andy'
[./andy]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 20'
[../]
[]
[Executioner]
type = Transient
end_time = 50
[./TimeStepper]
type = FunctionControlledDT
functions = ''
maximums = ''
minimums = ''
dt = 0.3
increment = 1.1
decrement = 1.1
maxDt = 0.3
minDt = 1E-5
adapt_log = false
percent_change = 0.1
[../]
[]
[Outputs]
file_base = bl01_adapt
time_step_interval = 10000
exodus = true
[]
(modules/combined/examples/phase_field-mechanics/kks_mechanics_VTS.i)
# KKS phase-field model coupled with elasticity using the Voigt-Taylor scheme as
# described in L.K. Aagesen et al., Computational Materials Science, 140, 10-21 (2017)
# Original run #170329e
[Mesh]
type = GeneratedMesh
dim = 3
nx = 640
ny = 1
nz = 1
xmin = -10
xmax = 10
ymin = 0
ymax = 0.03125
zmin = 0
zmax = 0.03125
elem_type = HEX8
[]
[Variables]
# order parameter
[./eta]
order = FIRST
family = LAGRANGE
[../]
# solute concentration
[./c]
order = FIRST
family = LAGRANGE
[../]
# chemical potential
[./w]
order = FIRST
family = LAGRANGE
[../]
# solute phase concentration (matrix)
[./cm]
order = FIRST
family = LAGRANGE
[../]
# solute phase concentration (precipitate)
[./cp]
order = FIRST
family = LAGRANGE
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./eta_ic]
variable = eta
type = FunctionIC
function = ic_func_eta
block = 0
[../]
[./c_ic]
variable = c
type = FunctionIC
function = ic_func_c
block = 0
[../]
[./w_ic]
variable = w
type = ConstantIC
value = 0.00991
block = 0
[../]
[./cm_ic]
variable = cm
type = ConstantIC
value = 0.131
block = 0
[../]
[./cp_ic]
variable = cp
type = ConstantIC
value = 0.236
block = 0
[../]
[]
[Functions]
[./ic_func_eta]
type = ParsedFunction
expression = '0.5*(1.0+tanh((x)/delta_eta/sqrt(2.0)))'
symbol_names = 'delta_eta'
symbol_values = '0.8034'
[../]
[./ic_func_c]
type = ParsedFunction
expression = '0.2388*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^3*(6*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^2-15*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))+10)+0.1338*(1-(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^3*(6*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^2-15*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))+10))'
symbol_names = 'delta'
symbol_values = '0.8034'
[../]
[./psi_eq_int]
type = ParsedFunction
expression = 'volume*psi_alpha'
symbol_names = 'volume psi_alpha'
symbol_values = 'volume psi_alpha'
[../]
[./gamma]
type = ParsedFunction
expression = '(psi_int - psi_eq_int) / dy / dz'
symbol_names = 'psi_int psi_eq_int dy dz'
symbol_values = 'psi_int psi_eq_int 0.03125 0.03125'
[../]
[]
[AuxVariables]
[./sigma11]
order = CONSTANT
family = MONOMIAL
[../]
[./sigma22]
order = CONSTANT
family = MONOMIAL
[../]
[./sigma33]
order = CONSTANT
family = MONOMIAL
[../]
[./e11]
order = CONSTANT
family = MONOMIAL
[../]
[./e12]
order = CONSTANT
family = MONOMIAL
[../]
[./e22]
order = CONSTANT
family = MONOMIAL
[../]
[./e33]
order = CONSTANT
family = MONOMIAL
[../]
[./e_el11]
order = CONSTANT
family = MONOMIAL
[../]
[./e_el12]
order = CONSTANT
family = MONOMIAL
[../]
[./e_el22]
order = CONSTANT
family = MONOMIAL
[../]
[./f_el]
order = CONSTANT
family = MONOMIAL
[../]
[./eigen_strain00]
order = CONSTANT
family = MONOMIAL
[../]
[./Fglobal]
order = CONSTANT
family = MONOMIAL
[../]
[./psi]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./matl_sigma11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = sigma11
[../]
[./matl_sigma22]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = sigma22
[../]
[./matl_sigma33]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = sigma33
[../]
[./matl_e11]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 0
index_j = 0
variable = e11
[../]
[./matl_e12]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 0
index_j = 1
variable = e12
[../]
[./matl_e22]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 1
index_j = 1
variable = e22
[../]
[./matl_e33]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 2
index_j = 2
variable = e33
[../]
[./f_el]
type = MaterialRealAux
variable = f_el
property = f_el_mat
execute_on = timestep_end
[../]
[./GlobalFreeEnergy]
variable = Fglobal
type = KKSGlobalFreeEnergy
fa_name = fm
fb_name = fp
w = 0.0264
kappa_names = kappa
interfacial_vars = eta
[../]
[./psi_potential]
variable = psi
type = ParsedAux
coupled_variables = 'Fglobal w c f_el sigma11 e11'
expression = 'Fglobal - w*c + f_el - sigma11*e11'
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = right
value = 0
[../]
[./front_y]
type = DirichletBC
variable = disp_y
boundary = front
value = 0
[../]
[./back_y]
type = DirichletBC
variable = disp_y
boundary = back
value = 0
[../]
[./top_z]
type = DirichletBC
variable = disp_z
boundary = top
value = 0
[../]
[./bottom_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0
[../]
[]
[Materials]
# Chemical free energy of the matrix
[./fm]
type = DerivativeParsedMaterial
property_name = fm
coupled_variables = 'cm'
expression = '6.55*(cm-0.13)^2'
[../]
# Elastic energy of the matrix
[./elastic_free_energy_m]
type = ElasticEnergyMaterial
base_name = matrix
f_name = fe_m
args = ' '
outputs = exodus
[../]
# Total free energy of the matrix
[./Total_energy_matrix]
type = DerivativeSumMaterial
property_name = f_total_matrix
sum_materials = 'fm fe_m'
coupled_variables = 'cm'
[../]
# Free energy of the precipitate phase
[./fp]
type = DerivativeParsedMaterial
property_name = fp
coupled_variables = 'cp'
expression = '6.55*(cp-0.235)^2'
[../]
# Elastic energy of the precipitate
[./elastic_free_energy_p]
type = ElasticEnergyMaterial
base_name = ppt
f_name = fe_p
args = ' '
outputs = exodus
[../]
# Total free energy of the precipitate
[./Total_energy_ppt]
type = DerivativeSumMaterial
property_name = f_total_ppt
sum_materials = 'fp fe_p'
coupled_variables = 'cp'
[../]
# Total elastic energy
[./Total_elastic_energy]
type = DerivativeTwoPhaseMaterial
eta = eta
f_name = f_el_mat
fa_name = fe_m
fb_name = fe_p
outputs = exodus
W = 0
[../]
# h(eta)
[./h_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta
[../]
# g(eta)
[./g_eta]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'M L kappa misfit'
prop_values = '0.7 0.7 0.01704 0.00377'
[../]
#Mechanical properties
[./Stiffness_matrix]
type = ComputeElasticityTensor
C_ijkl = '103.3 74.25 74.25 103.3 74.25 103.3 46.75 46.75 46.75'
base_name = matrix
fill_method = symmetric9
[../]
[./Stiffness_ppt]
type = ComputeElasticityTensor
C_ijkl = '100.7 71.45 71.45 100.7 71.45 100.7 50.10 50.10 50.10'
base_name = ppt
fill_method = symmetric9
[../]
[./stress_matrix]
type = ComputeLinearElasticStress
base_name = matrix
[../]
[./stress_ppt]
type = ComputeLinearElasticStress
base_name = ppt
[../]
[./strain_matrix]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
base_name = matrix
[../]
[./strain_ppt]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
base_name = ppt
eigenstrain_names = 'eigenstrain_ppt'
[../]
[./eigen_strain]
type = ComputeEigenstrain
base_name = ppt
eigen_base = '1 1 1 0 0 0'
prefactor = misfit
eigenstrain_name = 'eigenstrain_ppt'
[../]
[./global_stress]
type = TwoPhaseStressMaterial
base_A = matrix
base_B = ppt
[../]
[./global_strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
[../]
[]
[Kernels]
[./TensorMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
# enforce c = (1-h(eta))*cm + h(eta)*cp
[./PhaseConc]
type = KKSPhaseConcentration
ca = cm
variable = cp
c = c
eta = eta
[../]
# enforce pointwise equality of chemical potentials
[./ChemPotVacancies]
type = KKSPhaseChemicalPotential
variable = cm
cb = cp
fa_name = f_total_matrix
fb_name = f_total_ppt
[../]
#
# Cahn-Hilliard Equation
#
[./CHBulk]
type = KKSSplitCHCRes
variable = c
ca = cm
fa_name = f_total_matrix
w = w
[../]
[./dcdt]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./ckernel]
type = SplitCHWRes
mob_name = M
variable = w
[../]
#
# Allen-Cahn Equation
#
[./ACBulkF]
type = KKSACBulkF
variable = eta
fa_name = f_total_matrix
fb_name = f_total_ppt
w = 0.0264
args = 'cp cm'
[../]
[./ACBulkC]
type = KKSACBulkC
variable = eta
ca = cm
cb = cp
fa_name = f_total_matrix
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = kappa
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm ilu nonzero'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-11
num_steps = 200
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.5
[../]
[]
[VectorPostprocessors]
#[./eta]
# type = LineValueSampler
# start_point = '-10 0 0'
# end_point = '10 0 0'
# variable = eta
# num_points = 321
# sort_by = id
#[../]
#[./eta_position]
# type = FindValueOnLineSample
# vectorpostprocessor = eta
# variable_name = eta
# search_value = 0.5
#[../]
# [./f_el]
# type = LineMaterialRealSampler
# start = '-20 0 0'
# end = '20 0 0'
# sort_by = id
# property = f_el
# [../]
# [./f_el_a]
# type = LineMaterialRealSampler
# start = '-20 0 0'
# end = '20 0 0'
# sort_by = id
# property = fe_m
# [../]
# [./f_el_b]
# type = LineMaterialRealSampler
# start = '-20 0 0'
# end = '20 0 0'
# sort_by = id
# property = fe_p
# [../]
# [./h_out]
# type = LineMaterialRealSampler
# start = '-20 0 0'
# end = '20 0 0'
# sort_by = id
# property = h
# [../]
# [./fm_out]
# type = LineMaterialRealSampler
# start = '-20 0 0'
# end = '20 0 0'
# sort_by = id
# property = fm
# [../]
[]
[Postprocessors]
[./f_el_int]
type = ElementIntegralMaterialProperty
mat_prop = f_el_mat
[../]
[./c_alpha]
type = SideAverageValue
boundary = left
variable = c
[../]
[./c_beta]
type = SideAverageValue
boundary = right
variable = c
[../]
[./e11_alpha]
type = SideAverageValue
boundary = left
variable = e11
[../]
[./e11_beta]
type = SideAverageValue
boundary = right
variable = e11
[../]
[./s11_alpha]
type = SideAverageValue
boundary = left
variable = sigma11
[../]
[./s22_alpha]
type = SideAverageValue
boundary = left
variable = sigma22
[../]
[./s33_alpha]
type = SideAverageValue
boundary = left
variable = sigma33
[../]
[./s11_beta]
type = SideAverageValue
boundary = right
variable = sigma11
[../]
[./s22_beta]
type = SideAverageValue
boundary = right
variable = sigma22
[../]
[./s33_beta]
type = SideAverageValue
boundary = right
variable = sigma33
[../]
[./f_el_alpha]
type = SideAverageValue
boundary = left
variable = f_el
[../]
[./f_el_beta]
type = SideAverageValue
boundary = right
variable = f_el
[../]
[./f_c_alpha]
type = SideAverageValue
boundary = left
variable = Fglobal
[../]
[./f_c_beta]
type = SideAverageValue
boundary = right
variable = Fglobal
[../]
[./chem_pot_alpha]
type = SideAverageValue
boundary = left
variable = w
[../]
[./chem_pot_beta]
type = SideAverageValue
boundary = right
variable = w
[../]
[./psi_alpha]
type = SideAverageValue
boundary = left
variable = psi
[../]
[./psi_beta]
type = SideAverageValue
boundary = right
variable = psi
[../]
[./total_energy]
type = ElementIntegralVariablePostprocessor
variable = Fglobal
[../]
# Get simulation cell size from postprocessor
[./volume]
type = ElementIntegralMaterialProperty
mat_prop = 1
[../]
[./psi_eq_int]
type = FunctionValuePostprocessor
function = psi_eq_int
[../]
[./psi_int]
type = ElementIntegralVariablePostprocessor
variable = psi
[../]
[./gamma]
type = FunctionValuePostprocessor
function = gamma
[../]
[]
#
# Precondition using handcoded off-diagonal terms
#
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Outputs]
[./exodus]
type = Exodus
time_step_interval = 20
[../]
[./csv]
type = CSV
execute_on = 'final'
[../]
#[./console]
# type = Console
# output_file = true
# [../]
[]
(test/tests/markers/error_tolerance_marker/error_tolerance_marker_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 10
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./solution]
type = ParsedFunction
expression = (exp(x)-1)/(exp(1)-1)
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./conv]
type = Convection
variable = u
velocity = '1 0 0'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Adaptivity]
[./Indicators]
[./error]
type = AnalyticalIndicator
variable = u
function = solution
[../]
[../]
[./Markers]
[./marker]
type = ErrorToleranceMarker
coarsen = 4e-9
indicator = error
refine = 1e-8
[../]
[../]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_by_parts_steady.i)
# This input file tests several different things:
# .) The axisymmetric (RZ) form of the governing equations.
# .) An open boundary.
# .) Not integrating the pressure by parts, thereby requiring a pressure pin.
# .) Natural boundary condition at the outlet.
[GlobalParams]
integrate_p_by_parts = true
laplace = true
gravity = '0 0 0'
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = Newton
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Variables]
[./vel_x]
# Velocity in radial (r) direction
family = LAGRANGE
order = SECOND
[../]
[./vel_y]
# Velocity in axial (z) direction
family = LAGRANGE
order = SECOND
[../]
[./p]
family = LAGRANGE
order = FIRST
[../]
[]
[BCs]
[./u_in]
type = DirichletBC
boundary = bottom
variable = vel_x
value = 0
[../]
[./v_in]
type = FunctionDirichletBC
boundary = bottom
variable = vel_y
function = 'inlet_func'
[../]
[./u_axis_and_walls]
type = DirichletBC
boundary = 'left right'
variable = vel_x
value = 0
[../]
[./v_no_slip]
type = DirichletBC
boundary = 'right'
variable = vel_y
value = 0
[../]
[]
[Kernels]
[./mass]
type = INSMassRZ
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 'volume'
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
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
[]
[]
(test/tests/bcs/bc_preset_nodal/bc_function_preset.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./left]
type = ParsedFunction
expression = 'y'
[../]
[./right]
type = ParsedFunction
expression = '1+y'
[../]
[]
[Kernels]
active = 'diff'
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
active = 'left right'
[./left]
type = FunctionDirichletBC
variable = u
boundary = 3
function = left
[../]
[./right]
type = FunctionDirichletBC
variable = u
boundary = 1
function = right
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = bc_func_out
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/rz-x-axial-coord/pipe-flow-natural-bc.i)
mu=1
rho=1
pipe_length=10 # m
pipe_radius=1 # m
u_inlet=1
[GlobalParams]
integrate_p_by_parts = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${pipe_length}
ymin = 0
ymax = ${pipe_radius}
nx = 50
ny = 5
[]
coord_type = 'RZ'
rz_coord_axis = x
[]
[Variables]
[velocity]
family = LAGRANGE_VEC
[]
[p][]
[]
[Kernels]
[mass]
type = INSADMass
variable = p
[]
[mass_pspg]
type = INSADMassPSPG
variable = p
[]
[momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
[]
[momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[]
[]
[Functions]
[vel_x_inlet]
type = ParsedFunction
expression = '${u_inlet} * (${pipe_radius}^2 - y^2)'
[]
[]
[BCs]
[inlet]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'left'
function_x = vel_x_inlet
function_y = 0
[../]
[wall]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 0
function_y = 0
[]
[axis]
type = ADVectorFunctionDirichletBC
variable = velocity
boundary = 'bottom'
set_x_comp = false
function_y = 0
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[ins_mat]
type = INSADTauMaterial
velocity = velocity
pressure = p
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
line_search = 'none'
[]
[Outputs]
exodus = true
[]
(test/tests/materials/coupled_value_function/order.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 4
nz = 4
[]
[]
[Functions]
[test]
type = ParsedFunction
expression = 't + x^2 + y^3 + sin(5*z)'
[]
[]
[AuxVariables]
[a]
[]
[b]
[]
[c]
[]
[d]
[]
[]
[ICs]
[a]
type = FunctionIC
variable = a
function = x
[]
[b]
type = FunctionIC
variable = b
function = y
[]
[c]
type = FunctionIC
variable = c
function = z
[]
[d]
type = FunctionIC
variable = d
function = t
[]
[]
[Variables]
[u]
[]
[]
[Materials]
[cvf]
type = CoupledValueFunctionMaterial
function = test
v = 'a b c d'
prop_name = p
outputs = exodus
[]
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[Executioner]
type = Transient
dt = 0.25
num_steps = 4
[]
[Outputs]
exodus = 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/phase_field/examples/multiphase/GrandPotential3Phase_AD.i)
# This is an example of implementation of the multi-phase, multi-order parameter
# grand potential based phase-field model described in Phys. Rev. E, 98, 023309
# (2018). It includes 3 phases with 1 grain of each phase. This example was used
# to generate the results shown in Fig. 3 of the paper.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 60
xmin = -15
xmax = 15
[]
[Variables]
[w]
[]
[etaa0]
[]
[etab0]
[]
[etad0]
[]
[]
[ICs]
[IC_etaa0]
type = FunctionIC
variable = etaa0
function = ic_func_etaa0
[]
[IC_etab0]
type = FunctionIC
variable = etab0
function = ic_func_etab0
[]
[IC_etad0]
type = ConstantIC
variable = etad0
value = 0.1
[]
[IC_w]
type = FunctionIC
variable = w
function = ic_func_w
[]
[]
[Functions]
[ic_func_etaa0]
type = ADParsedFunction
value = '0.9*0.5*(1.0-tanh((x)/sqrt(2.0)))'
[]
[ic_func_etab0]
type = ADParsedFunction
value = '0.9*0.5*(1.0+tanh((x)/sqrt(2.0)))'
[]
[ic_func_w]
type = ADParsedFunction
value = 0
[]
[]
[Kernels]
# Order parameter eta_alpha0
[ACa0_bulk]
type = ADACGrGrMulti
variable = etaa0
v = 'etab0 etad0'
gamma_names = 'gab gad'
[]
[ACa0_sw]
type = ADACSwitching
variable = etaa0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
[]
[ACa0_int]
type = ADACInterface
variable = etaa0
kappa_name = kappa
variable_L = false
[]
[ea0_dot]
type = ADTimeDerivative
variable = etaa0
[]
# Order parameter eta_beta0
[ACb0_bulk]
type = ADACGrGrMulti
variable = etab0
v = 'etaa0 etad0'
gamma_names = 'gab gbd'
[]
[ACb0_sw]
type = ADACSwitching
variable = etab0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
[]
[ACb0_int]
type = ADACInterface
variable = etab0
kappa_name = kappa
variable_L = false
[]
[eb0_dot]
type = ADTimeDerivative
variable = etab0
[]
# Order parameter eta_delta0
[ACd0_bulk]
type = ADACGrGrMulti
variable = etad0
v = 'etaa0 etab0'
gamma_names = 'gad gbd'
[]
[ACd0_sw]
type = ADACSwitching
variable = etad0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
[]
[ACd0_int]
type = ADACInterface
variable = etad0
kappa_name = kappa
variable_L = false
[]
[ed0_dot]
type = ADTimeDerivative
variable = etad0
[]
#Chemical potential
[w_dot]
type = ADSusceptibilityTimeDerivative
variable = w
f_name = chi
[]
[Diffusion]
type = ADMatDiffusion
variable = w
diffusivity = Dchi
[]
[coupled_etaa0dot]
type = ADCoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob rhod'
hj_names = 'ha hb hd'
args = 'etaa0 etab0 etad0'
[]
[coupled_etab0dot]
type = ADCoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob rhod'
hj_names = 'ha hb hd'
args = 'etaa0 etab0 etad0'
[]
[coupled_etad0dot]
type = ADCoupledSwitchingTimeDerivative
variable = w
v = etad0
Fj_names = 'rhoa rhob rhod'
hj_names = 'ha hb hd'
args = 'etaa0 etab0 etad0'
[]
[]
[Materials]
[ha_test]
type = ADSwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etaa0'
[]
[hb_test]
type = ADSwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etab0'
[]
[hd_test]
type = ADSwitchingFunctionMultiPhaseMaterial
h_name = hd
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etad0'
[]
[omegaa]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = omegaa
material_property_names = 'Vm ka caeq'
function = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
derivative_order = 2
[]
[omegab]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = omegab
material_property_names = 'Vm kb cbeq'
function = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
derivative_order = 2
[]
[omegad]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = omegad
material_property_names = 'Vm kd cdeq'
function = '-0.5*w^2/Vm^2/kd-w/Vm*cdeq'
derivative_order = 2
[]
[rhoa]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = rhoa
material_property_names = 'Vm ka caeq'
function = 'w/Vm^2/ka + caeq/Vm'
derivative_order = 2
[]
[rhob]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = rhob
material_property_names = 'Vm kb cbeq'
function = 'w/Vm^2/kb + cbeq/Vm'
derivative_order = 2
[]
[rhod]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = rhod
material_property_names = 'Vm kd cdeq'
function = 'w/Vm^2/kd + cdeq/Vm'
derivative_order = 2
[]
[c]
type = ADParsedMaterial
material_property_names = 'Vm rhoa rhob rhod ha hb hd'
function = 'Vm * (ha * rhoa + hb * rhob + hd * rhod)'
f_name = c
[]
[const]
type = ADGenericConstantMaterial
prop_names = 'kappa_c kappa L D Vm ka caeq kb cbeq kd cdeq gab gad gbd mu tgrad_corr_mult'
prop_values = '0 1 1.0 1.0 1.0 10.0 0.1 10.0 0.9 10.0 0.5 1.5 1.5 1.5 1.0 0.0'
[]
[Mobility]
type = ADDerivativeParsedMaterial
f_name = Dchi
material_property_names = 'D chi'
function = 'D*chi'
derivative_order = 2
[]
[chi]
type = ADDerivativeParsedMaterial
f_name = chi
material_property_names = 'Vm ha(etaa0,etab0,etad0) ka hb(etaa0,etab0,etad0) kb hd(etaa0,etab0,etad0) kd'
function = '(ha/ka + hb/kb + hd/kd) / Vm^2'
args = 'etaa0 etab0 etad0'
derivative_order = 2
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[etaa0]
type = LineValueSampler
variable = etaa0
start_point = '-15 0 0'
end_point = '15 0 0'
num_points = 61
sort_by = x
execute_on = 'initial timestep_end final'
[]
[etab0]
type = LineValueSampler
variable = etab0
start_point = '-15 0 0'
end_point = '15 0 0'
num_points = 61
sort_by = x
execute_on = 'initial timestep_end final'
[]
[etad0]
type = LineValueSampler
variable = etad0
start_point = '-15 0 0'
end_point = '15 0 0'
num_points = 61
sort_by = x
execute_on = 'initial timestep_end final'
[]
[]
[Executioner]
type = Transient
nl_max_its = 15
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = -pc_type
petsc_options_value = lu
l_max_its = 15
l_tol = 1.0e-3
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 20
nl_abs_tol = 1e-10
dt = 1.0
[]
[Outputs]
[exodus]
type = Exodus
execute_on = 'initial timestep_end final'
interval = 1
[]
[csv]
type = CSV
execute_on = 'initial timestep_end final'
interval = 1
[]
[]
(modules/thermal_hydraulics/test/tests/misc/restart_1phase/test.i)
[GlobalParams]
gravity_vector = '0 0 0'
closures = simple_closures
[]
[FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[SolidProperties]
[mat1]
type = ThermalFunctionSolidProperties
k = 16
cp = 356.
rho = 6.551400E+03
[]
[]
[Functions]
[Ts_init]
type = ParsedFunction
expression = '2*sin(x*pi)+507'
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
fp = eos
# geometry
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 5
A = 1.907720E-04
D_h = 1.698566E-02
f = 0.1
[]
[jct1]
type = VolumeJunction1Phase
connections = 'pipe1:out pipe2:in'
position = '1 0 0'
volume = 1e-5
[]
[pipe2]
type = FlowChannel1Phase
fp = eos
# geometry
position = '1 0 0'
orientation = '1 0 0'
length = 1
n_elems = 5
A = 1.907720E-04
D_h = 1.698566E-02
f = 0.1
[]
[jct2]
type = VolumeJunction1Phase
connections = 'pipe2:out pipe3:in'
position = '2 0 0'
volume = 1e-5
[]
[pipe3]
type = FlowChannel1Phase
fp = eos
# geometry
position = '2 0 0'
orientation = '1 0 0'
length = 1
n_elems = 5
A = 1.907720E-04
D_h = 1.698566E-02
f = 0.1
[]
[hs]
type = HeatStructureCylindrical
position = '1 0.01 0'
orientation = '1 0 0'
length = 1
n_elems = 5
names = '0'
n_part_elems = 1
solid_properties = 'mat1'
solid_properties_T_ref = '300'
widths = 0.1
[]
[temp_outside]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:outer
T = Ts_init
[]
[inlet]
type = InletVelocityTemperature1Phase
input = 'pipe1:in'
T = 507
vel = 1
[]
[outlet]
type = Outlet1Phase
input = 'pipe3:out'
p = 6e6
[]
[hx3ext]
type = HeatTransferFromExternalAppTemperature1Phase
flow_channel = pipe3
P_hf = 0.0449254
Hw = 100000
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
dt = 0.01
num_steps = 5
abort_on_solve_fail = true
solve_type = 'newton'
line_search = 'basic'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
automatic_scaling = true
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
[]
[Outputs]
exodus = true
velocity_as_vector = false
[]
(test/tests/vectorpostprocessors/dynamic_point_sampler/dynamic_point_sampler.i)
[Mesh]
type = GeneratedMesh
nx = 5
ny = 5
dim = 2
[]
[Variables]
[u]
[]
[]
[Functions]
[forcing_func]
type = ParsedFunction
expression = alpha*alpha*pi*pi*sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '4'
[]
[u_func]
type = ParsedGradFunction
value = sin(alpha*pi*x)
grad_x = alpha*pi*sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '4'
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[forcing]
type = BodyForce
variable = u
function = forcing_func
[]
[time]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = 'u'
boundary = 'left'
value = 0
[]
[right]
type = DirichletBC
variable = 'u'
boundary = 'right'
value = 0
[]
[]
[Executioner]
type = Transient
num_steps = 7
dt = 0.1
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[l2_error]
type = ElementL2Error
variable = u
function = u_func
[]
[dofs]
type = NumDOFs
[]
[]
[Adaptivity]
max_h_level = 3
marker = error
[Indicators]
[jump]
type = GradientJumpIndicator
variable = u
[]
[]
[Markers]
[error]
type = ErrorFractionMarker
indicator = jump
coarsen = 0.1
refine = 0.3
[]
[]
[]
[VectorPostprocessors]
[dynamic_line_sampler]
type = DynamicPointValueSampler
variable = u
start_point = '0 0.5 0'
end_point = '1 0.5 0'
num_points = 6
sort_by = x
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
csv = true
[]
(test/tests/vectorpostprocessors/positions_functor_value_sampler/positions_functor_sampler.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Problem]
solve = false
[]
[AuxVariables]
[fv]
type = MooseVariableFVReal
initial_condition = 3
[]
[]
[Functions]
[fx]
type = ParsedFunction
expression = 'x'
[]
[fy]
type = ParsedFunction
expression = 'y'
[]
[]
[Positions]
[pos]
type = InputPositions
positions = '0.11 0.11 0
0.21 0.15 0
0.11 0.21 0'
[]
[]
[VectorPostprocessors]
[point_sample]
type = PositionsFunctorValueSampler
functors = 'fv 2 fx fy'
positions = 'pos'
sort_by = id
execute_on = TIMESTEP_END
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/convergence-auto/3D/dirichlet.i)
# Simple 3D test
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = true
stabilize_strain = true
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[ICs]
[disp_x]
type = RandomIC
variable = disp_x
min = -0.02
max = 0.02
[]
[disp_y]
type = RandomIC
variable = disp_y
min = -0.02
max = 0.02
[]
[disp_z]
type = RandomIC
variable = disp_z
min = -0.02
max = 0.02
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 4
nz = 4
[]
[]
[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
[]
[]
[Functions]
[pullx]
type = ParsedFunction
expression = '0.4 * t'
[]
[pully]
type = ParsedFunction
expression = '-0.2 * t'
[]
[pullz]
type = ParsedFunction
expression = '0.3 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = left
variable = disp_y
value = 0.0
[]
[leftz]
type = DirichletBC
preset = true
boundary = left
variable = disp_z
value = 0.0
[]
[pull_x]
type = FunctionDirichletBC
boundary = right
variable = disp_x
function = pullx
preset = true
[]
[pull_y]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = pully
preset = true
[]
[pull_z]
type = FunctionDirichletBC
boundary = right
variable = disp_z
function = pullz
preset = true
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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 = 0.2
dtmin = 0.2
end_time = 0.2
[]
(modules/navier_stokes/test/tests/finite_volume/ins/mixing_length_total_viscosity_material/steady-action.i)
von_karman_const = 0.41
H = 1 #halfwidth of the channel
L = 150
Re = 100
rho = 1
bulk_u = 1
mu = '${fparse rho * bulk_u * 2 * H / Re}'
[Mesh]
[gen]
type = CartesianMeshGenerator
dim = 2
dx = '${L}'
dy = '0.667 0.333'
ix = '200'
iy = '10 1'
[]
[]
[Modules]
[NavierStokesFV]
compressibility = 'incompressible'
turbulence_handling = 'mixing-length'
density = ${rho}
dynamic_viscosity = ${mu}
initial_velocity = '1e-6 1e-6 0'
initial_pressure = 0.0
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_function = '1 0'
wall_boundaries = 'top bottom'
momentum_wall_types = 'wallfunction symmetry'
outlet_boundaries = 'right'
momentum_outlet_types = 'fixed-pressure'
pressure_function = '0'
von_karman_const = ${von_karman_const}
mixing_length_delta = 0.5
mixing_length_walls = 'top'
mixing_length_aux_execute_on = 'initial'
momentum_advection_interpolation = 'upwind'
mass_advection_interpolation = 'upwind'
[]
[]
[Functions]
[delta_func]
type = ParsedFunction
expression = '1.0-x/150'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/misc/check_error/scalar_old_integrity_check.i)
# Test that coupling a time derivative of a scalar variable (ScalarDotCouplingAux) and
# using a Steady executioner errors out
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Functions]
[./a_fn]
type = ParsedFunction
expression = t
[../]
[]
[AuxVariables]
[./v]
[../]
[./a]
family = SCALAR
order = FIRST
[../]
[]
[AuxScalarKernels]
[./a_sak]
type = FunctionScalarAux
variable = a
function = a_fn
[../]
[]
[AuxKernels]
[./ak_v]
type = CoupledScalarAux
variable = v
coupled = a
lag = OLD
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[]
[Executioner]
type = Steady
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_structure/steady_state.i)
[SolidProperties]
[mat1]
type = ThermalFunctionSolidProperties
k = 16
cp = 356.
rho = 6.551400E+03
[]
[]
[Functions]
[Ts_init]
type = ParsedFunction
expression = '2*sin(x*pi)+507'
[]
[]
[Components]
[hs]
type = HeatStructureCylindrical
position = '1 0 0'
orientation = '1 0 0'
length = 1
n_elems = 3
names = 'wall'
n_part_elems = 1
solid_properties = 'mat1'
solid_properties_T_ref = '300'
widths = 0.1
initial_T = Ts_init
[]
[temp_outside]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:outer
T = Ts_init
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 1
num_steps = 100
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
[]
[Outputs]
exodus = true
execute_on = 'initial final'
velocity_as_vector = false
[]
(modules/xfem/test/tests/single_var_constraint_2d/stationary_jump_func.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
elem_type = QUAD4
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./line_seg_cut_uo]
type = LineSegmentCutUserObject
cut_data = '0.5 1.0 0.5 0.0'
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
jump = jump_func
jump_flux = 0
geometric_cut_userobject = 'line_seg_cut_uo'
[../]
[]
[Functions]
[./jump_func]
type = ParsedFunction
expression = '0.5'
[../]
[]
[BCs]
# Define boundary conditions
[./left_u]
type = DirichletBC
variable = u
boundary = 3
value = 1
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
line_search = 'none'
l_tol = 1e-3
nl_max_its = 15
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
start_time = 0.0
dt = 1.0
end_time = 2.0
[]
[Outputs]
time_step_interval = 1
execute_on = timestep_end
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/transfers/multiapp_variable_value_sample_transfer/parent_array_centroid.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
[]
[Variables]
[u_parent]
components = 2
[]
[]
[AuxVariables]
[u_sub]
family = MONOMIAL
order = CONSTANT
components = 2
[]
[]
[Functions]
[u0_fun]
type = ParsedFunction
expression = 'x'
[]
[u1_fun]
type = ParsedFunction
expression = 'y'
[]
[]
[ICs]
[uic]
type = ArrayFunctionIC
variable = u_parent
function = 'u0_fun u1_fun'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
[Positions]
[centroid]
type = ElementCentroidPositions
[]
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
input_files = sub_array_sample.i
execute_on = timestep_end
positions_objects = 'centroid centroid'
[]
[]
[Transfers]
[to_transfer]
type = MultiAppVariableValueSamplePostprocessorTransfer
to_multi_app = sub
postprocessor = from_parent
source_variable = u_parent
map_array_variable_components_to_child_apps = true
[]
[from_transfer]
type = MultiAppVariableValueSamplePostprocessorTransfer
from_multi_app = sub
postprocessor = to_parent
source_variable = u_sub
map_array_variable_components_to_child_apps = true
[]
[]
(test/tests/time_integrators/implicit-euler/ie_adapt.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 4
ny = 4
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.25
[./Adaptivity]
refine_fraction = 0.2
coarsen_fraction = 0.3
max_h_level = 4
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/variables/fe_hier/hier-2-2d.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 5
ny = 5
elem_type = QUAD9
[]
[Functions]
[./bc_fnt]
type = ParsedFunction
expression = 2*y
[../]
[./bc_fnb]
type = ParsedFunction
expression = -2*y
[../]
[./bc_fnl]
type = ParsedFunction
expression = -2*x
[../]
[./bc_fnr]
type = ParsedFunction
expression = 2*x
[../]
[./forcing_fn]
type = ParsedFunction
expression = -4+x*x+y*y
[../]
[./solution]
type = ParsedGradFunction
expression = x*x+y*y
grad_x = 2*x
grad_y = 2*y
[../]
[]
[Variables]
[./u]
order = SECOND
family = HIERARCHIC
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./bc_top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = bc_fnt
[../]
[./bc_bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bc_fnb
[../]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/solid_mechanics/test/tests/generalized_plane_strain/generalized_plane_strain_scalar_vector.i)
[Mesh]
file = 2squares.e
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./scalar_strain_zz1]
order = FIRST
family = SCALAR
[../]
[./scalar_strain_zz2]
order = FIRST
family = SCALAR
[../]
[]
[AuxVariables]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[./saved_x]
order = FIRST
family = LAGRANGE
[../]
[./saved_y]
order = FIRST
family = LAGRANGE
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./aux_strain_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Postprocessors]
[./react_z1]
type = MaterialTensorIntegral
rank_two_tensor = stress
index_i = 2
index_j = 2
block = 1
[../]
[./react_z2]
type = MaterialTensorIntegral
rank_two_tensor = stress
index_i = 2
index_j = 2
block = 2
[../]
[]
[Physics]
[SolidMechanics]
[./GeneralizedPlaneStrain]
[./gps1]
use_displaced_mesh = true
displacements = 'disp_x disp_y'
scalar_out_of_plane_strain = scalar_strain_zz1
block = '1'
[../]
[./gps2]
use_displaced_mesh = true
displacements = 'disp_x disp_y'
scalar_out_of_plane_strain = scalar_strain_zz2
block = '2'
[../]
[../]
[../]
[]
[Kernels]
[SolidMechanics]
use_displaced_mesh = false
displacements = 'disp_x disp_y'
temperature = temp
save_in = 'saved_x saved_y'
block = '1 2'
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
use_displaced_mesh = false
[../]
[./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_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xx
index_i = 0
index_j = 0
[../]
[./strain_xy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xy
index_i = 0
index_j = 1
[../]
[./strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 1
index_j = 1
[../]
[./aux_strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = aux_strain_zz
index_i = 2
index_j = 2
[../]
[]
[Functions]
[./tempfunc]
type = ParsedFunction
expression = '(1-x)*t'
[../]
[]
[BCs]
[./bottom1x]
type = DirichletBC
boundary = 1
variable = disp_x
value = 0.0
[../]
[./bottom1y]
type = DirichletBC
boundary = 1
variable = disp_y
value = 0.0
[../]
[./bottom2x]
type = DirichletBC
boundary = 2
variable = disp_x
value = 0.0
[../]
[./bottom2y]
type = DirichletBC
boundary = 2
variable = disp_y
value = 0.0
[../]
[]
[Materials]
[./elastic_tensor]
type = ComputeIsotropicElasticityTensor
poissons_ratio = 0.3
youngs_modulus = 1e6
block = '1 2'
[../]
[./strain1]
type = ComputePlaneSmallStrain
displacements = 'disp_x disp_y'
subblock_index_provider = test_subblock_index_provider
scalar_out_of_plane_strain = 'scalar_strain_zz1 scalar_strain_zz2'
block = '1 2'
eigenstrain_names = eigenstrain
[../]
[./thermal_strain]
type = ComputeThermalExpansionEigenstrain
temperature = temp
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
block = '1 2'
eigenstrain_name = eigenstrain
[../]
[./stress]
type = ComputeLinearElasticStress
block = '1 2'
[../]
[]
[UserObjects]
[./test_subblock_index_provider]
type = TestSubblockIndexProvider
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
# controls for linear iterations
l_max_its = 100
l_tol = 1e-10
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
# time control
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 2.0
num_steps = 5000
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/hcp_single_crystal/hcp_volumetric_eigenstrain.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
elem_type = HEX8
[]
[AuxVariables]
[temperature]
order = FIRST
family = LAGRANGE
[]
[e_xtalpl_xx]
order = CONSTANT
family = MONOMIAL
[]
[e_xtalpl_yy]
order = CONSTANT
family = MONOMIAL
[]
[ev_zz]
order = CONSTANT
family = MONOMIAL
[]
[e_xtalpl_zz]
order = CONSTANT
family = MONOMIAL
[]
[fv_xx]
order = CONSTANT
family = MONOMIAL
[]
[fv_yy]
order = CONSTANT
family = MONOMIAL
[]
[fv_zz]
order = CONSTANT
family = MONOMIAL
[]
[fp_xx]
order = CONSTANT
family = MONOMIAL
[]
[fp_yy]
order = CONSTANT
family = MONOMIAL
[]
[fp_zz]
order = CONSTANT
family = MONOMIAL
[]
[f_xx]
order = CONSTANT
family = MONOMIAL
[]
[f_yy]
order = CONSTANT
family = MONOMIAL
[]
[f_zz]
order = CONSTANT
family = MONOMIAL
[]
[]
[Physics/SolidMechanics/QuasiStatic/all]
strain = FINITE
incremental = true
add_variables = true
additional_generate_output = 'stress_zz stress_xx stress_yy vonmises_stress l2norm_strain'
additional_material_output_order = FIRST
[]
[Functions]
[temperature_ramp]
type = ParsedFunction
expression = 'if(t<=1500.0, 600.0 + t/6.0, 850.0)'
[]
[]
[AuxKernels]
[temperature]
type = FunctionAux
variable = temperature
function = 'temperature_ramp'
execute_on = timestep_begin
[]
[e_xtalpl_xx]
type = RankTwoAux
variable = e_xtalpl_xx
rank_two_tensor = total_lagrangian_strain
index_j = 0
index_i = 0
execute_on = timestep_end
[]
[e_xtalpl_yy]
type = RankTwoAux
variable = e_xtalpl_yy
rank_two_tensor = total_lagrangian_strain
index_j = 1
index_i = 1
execute_on = timestep_end
[]
[ev_zz]
type = RankTwoAux
variable = ev_zz
rank_two_tensor = void_eigenstrain
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[e_xtalpl_zz]
type = RankTwoAux
variable = e_xtalpl_zz
rank_two_tensor = total_lagrangian_strain
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[fv_xx]
type = RankTwoAux
variable = fv_xx
rank_two_tensor = volumetric_deformation_gradient
index_j = 0
index_i = 0
execute_on = timestep_end
[]
[fv_yy]
type = RankTwoAux
variable = fv_yy
rank_two_tensor = volumetric_deformation_gradient
index_j = 1
index_i = 1
execute_on = timestep_end
[]
[fv_zz]
type = RankTwoAux
variable = fv_zz
rank_two_tensor = volumetric_deformation_gradient
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[fp_xx]
type = RankTwoAux
variable = fp_xx
rank_two_tensor = plastic_deformation_gradient
index_j = 0
index_i = 0
execute_on = timestep_end
[]
[fp_yy]
type = RankTwoAux
variable = fp_yy
rank_two_tensor = plastic_deformation_gradient
index_j = 1
index_i = 1
execute_on = timestep_end
[]
[fp_zz]
type = RankTwoAux
variable = fp_zz
rank_two_tensor = plastic_deformation_gradient
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[f_xx]
type = RankTwoAux
variable = f_xx
rank_two_tensor = deformation_gradient
index_j = 0
index_i = 0
execute_on = timestep_end
[]
[f_yy]
type = RankTwoAux
variable = f_yy
rank_two_tensor = deformation_gradient
index_j = 1
index_i = 1
execute_on = timestep_end
[]
[f_zz]
type = RankTwoAux
variable = f_zz
rank_two_tensor = deformation_gradient
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[]
[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
[]
[tdisp]
type = DirichletBC
variable = disp_z
boundary = front
value = 0
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensorCP
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
[]
[stress]
type = ComputeMultipleCrystalPlasticityStress
crystal_plasticity_models = 'trial_xtalpl'
eigenstrain_names = void_eigenstrain
tan_mod_type = exact
line_search_method = CUT_HALF
use_line_search = true
maximum_substep_iteration = 10
[]
[trial_xtalpl]
type = CrystalPlasticityHCPDislocationSlipBeyerleinUpdate
number_slip_systems = 15
slip_sys_file_name = hcp_aprismatic_capyramidal_slip_sys.txt
unit_cell_dimension = '2.934e-7 2.934e-7 4.657e-7' #Ti, in mm, https://materialsproject.org/materials/mp-46/
temperature = temperature
initial_forest_dislocation_density = 15.0e3
initial_substructure_density = 1.0e3
slip_system_modes = 2
number_slip_systems_per_mode = '3 12'
lattice_friction_per_mode = '9 22' #Knezevic et al MSEA 654 (2013)
effective_shear_modulus_per_mode = '4.7e2 4.7e2' #Ti, in MPa, https://materialsproject.org/materials/mp-46/
burgers_vector_per_mode = '2.934e-7 6.586e-7' #Ti, in mm, https://materialsproject.org/materials/mp-46/
slip_generation_coefficient_per_mode = '1.25e5 2.25e7' #from Beyerlein and Tome 2008 IJP
normalized_slip_activiation_energy_per_mode = '3.73e-3 3.2e-2' #from Beyerlein and Tome 2008 IJP
slip_energy_proportionality_factor_per_mode = '330 100' #from Beyerlein and Tome 2008 IJP
substructure_rate_coefficient_per_mode = '355 0.4' #from Capolungo et al MSEA (2009)
applied_strain_rate = 0.001
gamma_o = 1.0e-3
Hall_Petch_like_constant_per_mode = '0.2 0.2' #Estimated to match graph in Capolungo et al MSEA (2009), Figure 2
grain_size = 20.0e-3 #20 microns, Beyerlein and Tome IJP (2008)
[]
[void_eigenstrain]
type = ComputeCrystalPlasticityVolumetricEigenstrain
eigenstrain_name = void_eigenstrain
deformation_gradient_name = volumetric_deformation_gradient
mean_spherical_void_radius = void_radius
spherical_void_number_density = void_density
[]
[void_density]
type = ParsedMaterial
property_name = void_density
coupled_variables = temperature
expression = 'if(temperature<611.0, 0.0,
if(temperature<=835.0, 2.387e13 *(temperature - 611.0) / 1344.0, 0.0))' #1/mm^3, gives an eigenstrain of 1.0e-5 with radius=1.0e-6mm
# outputs = exodus
[]
[void_radius]
type = GenericConstantMaterial
prop_names = void_radius
prop_values = '1.0e-6' ##1 nm avg particle radius
[]
[]
[Postprocessors]
[stress_zz]
type = ElementAverageValue
variable = stress_zz
[]
[e_xtalpl_xx]
type = ElementAverageValue
variable = e_xtalpl_xx
[]
[e_xtalpl_yy]
type = ElementAverageValue
variable = e_xtalpl_yy
[]
[ev_zz]
type = ElementAverageValue
variable = ev_zz
[]
[e_xtalpl_zz]
type = ElementAverageValue
variable = e_xtalpl_zz
[]
[fv_xx]
type = ElementAverageValue
variable = fv_xx
[]
[fv_yy]
type = ElementAverageValue
variable = fv_yy
[]
[fv_zz]
type = ElementAverageValue
variable = fv_zz
[]
[temperature]
type = ElementAverageValue
variable = temperature
[]
[fp_xx]
type = ElementAverageValue
variable = fp_xx
[]
[fp_yy]
type = ElementAverageValue
variable = fp_yy
[]
[fp_zz]
type = ElementAverageValue
variable = fp_zz
[]
[f_xx]
type = ElementAverageValue
variable = f_xx
[]
[f_yy]
type = ElementAverageValue
variable = f_yy
[]
[f_zz]
type = ElementAverageValue
variable = f_zz
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-10
nl_abs_step_tol = 1e-10
dt = 10.0
dtmin = 1e-4
# end_time = 10
num_steps = 10
[]
[Outputs]
csv = true
[console]
type = Console
# max_rows = 5
[]
[]
(test/tests/kernels/vector_fe/electromagnetic_coulomb_gauge.i)
# This is an MMS problem that demonstrates solution of Maxwell's equations in the
# Coulomb gauge potential form. The equations solved are:
# -\nabla^2 V = f_{V,mms}
# -\nabla^2 A - \omega^2 A + \nabla \frac{\partial V}{\partial t} = f_{A,mms}
# This tests the value and gradient of a VectorMooseVariable as well as the time
# derivative of the gradient of a standard MooseVariable
#
# This input file is subject to two tests:
# 1) An exodiff test of the physics
# 2) A Jacobian test to verify accuracy of hand-coded Jacobian routines
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
xmin = -1
ymin = -1
[]
[Variables]
[./V]
[../]
[./A]
family = LAGRANGE_VEC
order = FIRST
scaling = 1e-10
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = V
coef = 5
[../]
[./V_frc]
type = BodyForce
function = 'V_forcing_function'
variable = V
[../]
[./A_diff]
type = VectorCoefDiffusion
variable = A
coef = 5
[../]
[./A_coeff_reaction]
type = VectorCoeffReaction
variable = A
coefficient = -.09
[../]
[./A_coupled_grad_td]
type = VectorCoupledGradientTimeDerivative
variable = A
v = V
[../]
[./A_frc]
type = VectorBodyForce
variable = A
function_x = 'Ax_forcing_function'
function_y = 'Ay_forcing_function'
function_z = '0'
[../]
[]
[BCs]
[./bnd_V]
type = FunctionDirichletBC
variable = V
boundary = 'left right top bottom'
function = 'V_exact_sln'
[../]
[./bnd_A]
type = VectorPenaltyDirichletBC
variable = A
x_exact_sln = 'Ax_exact_sln'
y_exact_sln = 'Ay_exact_sln'
z_exact_sln = '0'
penalty = 1e10
boundary = 'left right top bottom'
[../]
[]
[Functions]
[./V_exact_sln]
type = ParsedFunction
expression = 'cos(0.3*t)*cos(1.1*x)*cos(1.2*y)'
[../]
[./Ax_exact_sln]
type = ParsedFunction
expression = 'cos(0.3*t)*cos(0.4*x)*cos(0.5*y)'
[../]
[./Ay_exact_sln]
type = ParsedFunction
expression = 'cos(0.3*t)*cos(0.6*x)*cos(0.7*y)'
[../]
[./V_forcing_function]
type = ParsedFunction
expression = '0.33*sin(0.3*t)*sin(1.1*x)*cos(1.2*y) + 13.25*cos(0.3*t)*cos(1.1*x)*cos(1.2*y)'
[../]
[./Ax_forcing_function]
type = ParsedFunction
expression = '0.33*sin(0.3*t)*sin(1.1*x)*cos(1.2*y) + 1.96*cos(0.3*t)*cos(0.4*x)*cos(0.5*y)'
[../]
[./Ay_forcing_function]
type = ParsedFunction
expression = '0.36*sin(0.3*t)*sin(1.2*y)*cos(1.1*x) + 4.16*cos(0.3*t)*cos(0.6*x)*cos(0.7*y)'
[../]
[]
[Preconditioning]
[./pre]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
num_steps = 10
end_time = 3
l_max_its = 100
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart'
petsc_options_value = 'asm 100'
petsc_options = '-ksp_converged_reason -ksp_monitor_true_residual -ksp_monitor_singular_value -snes_linesearch_monitor'
line_search = 'bt'
[]
[Outputs]
exodus = true
print_linear_residuals = false
[]
[Debug]
show_var_residual_norms = true
[]
(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
[]
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/convergence/2D/neumann.i)
# Simple 2D plane strain test
[GlobalParams]
displacements = 'disp_x disp_y'
large_kinematics = true
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
[]
[]
[Kernels]
[sdx]
type = TotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[sdy]
type = TotalLagrangianStressDivergence
variable = disp_y
component = 1
[]
[]
[Functions]
[pullx]
type = ParsedFunction
expression = '50000 * t'
[]
[pully]
type = ParsedFunction
expression = '-30000 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = left
variable = disp_y
value = 0.0
[]
[pull_x]
type = FunctionNeumannBC
boundary = right
variable = disp_x
function = pullx
[]
[pull_y]
type = FunctionNeumannBC
boundary = top
variable = disp_y
function = pully
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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-10
nl_abs_tol = 1e-12
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 1.0
[]
[Postprocessors]
[nonlin]
type = NumNonlinearIterations
[]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/heat_transfer/test/tests/code_verification/cartesian_test_no5.i)
# Problem I.5
#
# The volumetric heat generation in an infinite plate varies linearly
# with spatial location. It has constant thermal conductivity.
# It is insulated on the left boundary and exposed to a
# constant temperature on the right.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
nx = 1
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Functions]
[./volumetric_heat]
type = ParsedFunction
symbol_names = 'q L beta'
symbol_values = '1200 1 0.1'
expression = 'q * (1-beta*x/L)'
[../]
[./exact]
type = ParsedFunction
symbol_names = 'uo q k L beta'
symbol_values = '300 1200 1 1 0.1'
expression = 'uo + (0.5*q*L^2/k) * ( (1-(x/L)^2) - (1-(x/L)^3) * beta/3 )'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[./heatsource]
type = HeatSource
function = volumetric_heat
variable = u
[../]
[]
[BCs]
[./uo]
type = DirichletBC
boundary = right
variable = u
value = 300
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1.0 1.0 1.0'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = true
[]
(test/tests/fviks/one-var-diffusion/no-ik.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[]
[Variables]
[u]
type = MooseVariableFVReal
[]
[]
[FVKernels]
[diff]
type = FVDiffusion
variable = u
coeff = 'coeff'
coeff_interp_method = average
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = u
boundary = 'left'
value = 1
[]
[right]
type = FVDirichletBC
variable = u
boundary = 'right'
value = 0
[]
[]
[Materials]
[block0]
type = ADGenericFunctorMaterial
block = '0'
prop_names = 'coeff'
prop_values = '4'
[]
[block1]
type = ADGenericFunctorMaterial
block = '1'
prop_names = 'coeff'
prop_values = '2'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
csv = true
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'if(x<1, 1 - x/3, 4/3 - 2*x/3)'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2Error
variable = u
function = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(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/phase_field/test/tests/free_energy_material/CoupledValueFunctionFreeEnergy.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
xmin = 0
xmax = 500
ymin = 0
ymax = 500
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[GlobalParams]
op_num = 4
var_name_base = gr
[]
[Variables]
[PolycrystalVariables]
[]
[]
[Functions]
[grain_growth_energy]
type = PiecewiseMultilinear
data_file = grain_growth_energy.data
[]
[grain_growth_mu0]
type = PiecewiseMultilinear
data_file = grain_growth_mu0.data
[]
[grain_growth_mu1]
type = PiecewiseMultilinear
data_file = grain_growth_mu1.data
[]
[grain_growth_mu2]
type = PiecewiseMultilinear
data_file = grain_growth_mu2.data
[]
[grain_growth_mu3]
type = PiecewiseMultilinear
data_file = grain_growth_mu3.data
[]
[matrix]
type = ParsedFunction
expression = '1-x-y-z'
[]
[]
[ICs]
[gr1]
type = SmoothCircleIC
variable = gr1
x1 = 0
y1 = 0
radius = 150
int_width = 90
invalue = 1
outvalue = 0
[]
[gr2]
type = SmoothCircleIC
variable = gr2
x1 = 500
y1 = 0
radius = 120
int_width = 90
invalue = 1
outvalue = 0
[]
[gr3]
type = SmoothCircleIC
variable = gr3
x1 = 250
y1 = 500
radius = 300
int_width = 90
invalue = 1
outvalue = 0
[]
[gr0]
type = CoupledValueFunctionIC
variable = gr0
v = 'gr1 gr2 gr3'
function = matrix
[]
[]
[AuxVariables]
[bnds]
order = FIRST
family = LAGRANGE
[]
[local_energy]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[gr0dot]
type = TimeDerivative
variable = gr0
[]
[gr0bulk]
type = AllenCahn
variable = gr0
f_name = F
coupled_variables = 'gr1 gr2 gr3'
[]
[gr0int]
type = ACInterface
variable = gr0
kappa_name = kappa_op
[]
[gr1dot]
type = TimeDerivative
variable = gr1
[]
[gr1bulk]
type = AllenCahn
variable = gr1
f_name = F
coupled_variables = 'gr0 gr2 gr3'
[]
[gr1int]
type = ACInterface
variable = gr1
kappa_name = kappa_op
[]
[gr2dot]
type = TimeDerivative
variable = gr2
[]
[gr2bulk]
type = AllenCahn
variable = gr2
f_name = F
coupled_variables = 'gr0 gr1 gr3'
[]
[gr2int]
type = ACInterface
variable = gr2
kappa_name = kappa_op
[]
[gr3dot]
type = TimeDerivative
variable = gr3
[]
[gr3bulk]
type = AllenCahn
variable = gr3
f_name = F
coupled_variables = 'gr0 gr1 gr2'
[]
[gr3int]
type = ACInterface
variable = gr3
kappa_name = kappa_op
[]
[]
[AuxKernels]
[BndsCalc]
type = BndsCalcAux
variable = bnds
[]
[local_free_energy]
type = TotalFreeEnergy
variable = local_energy
kappa_names = 'kappa_op kappa_op kappa_op kappa_op'
interfacial_vars = 'gr0 gr1 gr2 gr3'
[]
[]
[Materials]
[Copper]
type = GBEvolution
T = 500 # K
wGB = 60 # nm
GBmob0 = 2.5e-6 # m^4/(Js) from Schoenfelder 1997
Q = 0.23 # Migration energy in eV
GBenergy = 0.708 # GB energy in J/m^2
[]
[Tabulated]
type = CoupledValueFunctionFreeEnergy
free_energy_function = grain_growth_energy
chemical_potential_functions = 'grain_growth_mu0 grain_growth_mu1 grain_growth_mu2 '
'grain_growth_mu3'
v = 'gr0 gr1 gr2 gr3'
[]
[]
[Postprocessors]
[total_energy]
type = ElementIntegralVariablePostprocessor
variable = local_energy
[]
[]
[Preconditioning]
[SMP]
type = SMP
coupled_groups = 'gr0,gr1 gr0,gr2 gr0,gr3'
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 30
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 3
dt = 100.0
[]
[Outputs]
exodus = true
print_linear_residuals = false
perf_graph = true
[]
(test/tests/userobjects/postprocessor_spatial_user_object/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
[]
[Functions]
[./ic_fn]
type = ParsedFunction
expression = 'x * y'
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = FIRST
[../]
[]
[ICs]
[./u_ic]
type = FunctionIC
variable = u
function = ic_fn
[../]
[./a_ic]
type = ConstantIC
variable = a
value = 1
[../]
[]
[AuxVariables]
[./a]
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./rhs]
type = BodyForce
variable = u
function = 1
[../]
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
input_files = 'sub.i'
positions = '
0.25 0.25 0
0.75 0.75 0'
execute_on = 'initial timestep_end'
[../]
[]
[Transfers]
[./master_to_sub]
type = MultiAppNearestNodeTransfer
to_multi_app = sub
source_variable = u
variable = a
[../]
[./sub_to_master]
type = MultiAppUserObjectTransfer
from_multi_app = sub
user_object = fn_uo
variable = a
[../]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 10
[]
[Outputs]
exodus = true
[]
(test/tests/mortar/continuity-3d-non-conforming/continuity_non_conforming_tet.i)
[Mesh]
second_order = false
[file]
type = FileMeshGenerator
file = tet_non_mesh.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
new_block_id = 11
new_block_name = "secondary"
sidesets = '101'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
new_block_id = 12
new_block_name = "primary"
sidesets = '102'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[T]
block = '1 2'
[]
[lambda]
block = 'secondary'
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln_primal
variable = T
boundary = '1 2'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi) + 3*pi^2*sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_primal]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_lambda]
type = ParsedFunction
expression = 'pi*sin(pi*y)*sin(pi*z)*cos(pi*x)'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = '12'
secondary_subdomain = '11'
variable = lambda
secondary_variable = T
delta = 0.1
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[L2lambda]
type = ElementL2Error
variable = lambda
function = exact_soln_lambda
execute_on = 'timestep_end'
block = 'secondary'
[]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = '1 2'
[]
[h]
type = AverageElementSize
block = '1 2'
[]
[]
(test/tests/multiapps/restart/sub2.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 1
nx = 10
[]
[Functions]
[./u_fn]
type = ParsedFunction
expression = t*x
[../]
[./ffn]
type = ParsedFunction
expression = x
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[./fn]
type = BodyForce
variable = u
function = ffn
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = FunctionDirichletBC
variable = u
boundary = right
function = u_fn
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(test/tests/dgkernels/3d_diffusion_dg/3d_diffusion_p_refinement.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 1
elem_type = HEX8
[]
[Variables]
[u]
order = FIRST
family = MONOMIAL
[InitialCondition]
type = ConstantIC
value = 0.5
[]
[]
[]
[Functions]
[forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[]
[exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[abs]
type = Reaction
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[DGKernels]
[dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[]
[]
[BCs]
[all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3 4 5'
function = exact_fn
epsilon = -1
sigma = 6
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[Adaptivity]
switch_h_to_p_refinement = true
steps = 2
refine_fraction = 1.0
coarsen_fraction = 0
max_h_level = 8
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = 'initial timestep_end'
[]
[dofs]
type = NumDOFs
execute_on = 'initial timestep_end'
[]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
exodus = true
[]
(test/tests/problems/eigen_problem/eigensolvers/gipm_ibc.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 100
ymin = 0
ymax = 100
elem_type = QUAD4
nx = 64
ny = 64
displacements = 'x_disp y_disp'
[]
[Variables]
[./u]
order = first
family = LAGRANGE
[../]
[]
[AuxVariables]
[./x_disp]
[../]
[./y_disp]
[../]
[]
[AuxKernels]
[./x_disp]
type = FunctionAux
variable = x_disp
function = x_disp_func
[../]
[./y_disp]
type = FunctionAux
variable = y_disp
function = y_disp_func
[../]
[]
[Functions]
[./x_disp_func]
type = ParsedFunction
expression = 0
[../]
[./y_disp_func]
type = ParsedFunction
expression = 0
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
use_displaced_mesh = true
[../]
[./rea]
type = CoefReaction
variable = u
coefficient = 2.0
use_displaced_mesh = true
[../]
[./rhs]
type = CoefReaction
variable = u
use_displaced_mesh = true
coefficient = -1.0
extra_vector_tags = 'eigen'
[../]
[]
[BCs]
[./nbc_homogeneous]
type = DirichletBC
variable = u
boundary = '0'
value = 0
use_displaced_mesh = true
[../]
[./nbc_eigen]
type = EigenDirichletBC
variable = u
boundary = '0'
use_displaced_mesh = true
[../]
[./ibc]
type = VacuumBC
variable = u
boundary = '1 2 3'
extra_vector_tags = 'eigen'
use_displaced_mesh = true
[]
[]
[Executioner]
type = Eigenvalue
eigen_problem_type = gen_non_hermitian
which_eigen_pairs = SMALLEST_MAGNITUDE
n_eigen_pairs = 1
n_basis_vectors = 18
solve_type = jacobi_davidson
petsc_options = '-eps_view'
[]
[VectorPostprocessors]
[./eigenvalues]
type = Eigenvalues
execute_on = 'timestep_end'
[../]
[]
[Outputs]
csv = true
execute_on = 'timestep_end'
[./console]
type = Console
outlier_variable_norms = false
[../]
[]
(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/navier_stokes/test/tests/finite_element/ins/scalar_adr/supg/tauOpt.i)
velocity=1
[GlobalParams]
u = ${velocity}
pressure = 0
tau_type = opt
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 15
xmax = 15
[]
[Variables]
[./c]
[../]
[]
[Kernels]
[./adv]
type = AdvectionSUPG
variable = c
forcing_func = 'ffn'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = c
boundary = left
value = 0
[../]
[]
[Materials]
[./mat]
# These Materials are required by the INSBase class; we don't use them for anything.
type = GenericConstantMaterial
prop_names = 'mu rho'
prop_values = '0 1'
[../]
[]
[Functions]
[./ffn]
type = ParsedFunction
expression = 'if(x < 6, 1 - .25 * x, if(x < 8, -2 + .25 * x, 0))'
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(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
[]
[]
(modules/contact/test/tests/mortar_dynamics/frictional-mortar-3d-dynamics-light-function.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[mortar_tangent_x]
family = LAGRANGE
order = FIRST
[]
[mortar_tangent_y]
family = LAGRANGE
order = FIRST
[]
[mortar_tangent_z]
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[friction_x_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_x
component = 0
boundary = 'top_bottom'
[]
[friction_y_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_y
component = 1
boundary = 'top_bottom'
[]
[friction_z_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_z
component = 2
boundary = 'top_bottom'
[]
[]
[Mesh]
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 1
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 1
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
uniform_refine = 0
[]
[Functions]
# x: Contact pressure
# y: Magnitude of tangential relative velocity
# z: Temperature (to be implemented)
[mu_function]
type = ParsedFunction
expression = '0.3 + 0.5 * 2.17^(-x/100) - 10.0 * y'
[]
[]
[Variables]
[mortar_normal_lm]
block = 'secondary_lower'
use_dual = true
scaling = 1e-3
[]
[mortar_tangential_lm]
block = 'secondary_lower'
use_dual = true
scaling = 1e-3
[]
[mortar_tangential_3d_lm]
block = 'secondary_lower'
use_dual = true
scaling = 1e-3
[]
[]
[Modules/TensorMechanics/DynamicMaster]
[all]
add_variables = true
hht_alpha = 0.0
newmark_beta = 0.25
newmark_gamma = 0.5
mass_damping_coefficient = 0.0
stiffness_damping_coefficient = 0.02
displacements = 'disp_x disp_y disp_z'
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_zz'
block = '1 2'
strain = FINITE
density = density
[]
[]
[Materials]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[]
[tensor]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1.0e4
poissons_ratio = 0.0
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[tensor_1000]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e5
poissons_ratio = 0.0
[]
[stress_1000]
type = ComputeFiniteStrainElasticStress
block = '2'
[]
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable_normal = mortar_normal_lm
lm_variable_tangential_one = mortar_tangential_lm
lm_variable_tangential_two = mortar_tangential_3d_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[friction]
type = ComputeDynamicFrictionalForceLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
friction_lm = mortar_tangential_lm
friction_lm_dir = mortar_tangential_3d_lm
c = 1e5
c_t = 1.0e5
newmark_beta = 0.25
newmark_gamma = 0.5
interpolate_normals = false
correct_edge_dropping = true
capture_tolerance = 1e-04
function_friction = mu_function
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
interpolate_normals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
interpolate_normals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_vel_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
interpolate_normals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
interpolate_normals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
interpolate_normals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
interpolate_normals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_x
component = x
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
interpolate_normals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_y
component = y
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
interpolate_normals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_z
component = z
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
interpolate_normals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back bottom_top bottom_bottom'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back bottom_top bottom_bottom'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back bottom_top bottom_bottom'
value = 0.0
[]
[topx]
type = FunctionDirichletBC
variable = disp_x
boundary = 'top_top'
function = '0.1*t'
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-0.1*t'
[]
[]
[Executioner]
type = Transient
end_time = .04
dt = .02
dtmin = .001
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = ' lu NONZERO '
nl_rel_tol = 5e-13
nl_abs_tol = 5e-13
line_search = 'basic'
[TimeIntegrator]
type = NewmarkBeta
gamma = 0.5
beta = 0.25
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'contact'
[contact]
type = ContactDOFSetSize
variable = mortar_normal_lm
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_normal_lm
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[frictional-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangential_lm
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[frictional-pressure-3d]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangential_3d_lm
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[tangent_x]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangent_x
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[tangent_y]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangent_y
sort_by = 'id'
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/time_integrators/tvdrk2/2d-quadratic.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 20
ny = 20
elem_type = QUAD9
[]
[Functions]
[./ic]
type = ParsedFunction
expression = 0
[../]
[./forcing_fn]
type = ParsedFunction
expression = 2*t*((x*x)+(y*y))-(4*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*((x*x)+(y*y))
[../]
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
implicit = true
[../]
[./diff]
type = Diffusion
variable = u
implicit = false
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
implicit = false
[../]
[]
[ICs]
[./u_ic]
type = FunctionIC
variable = u
function = ic
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
[./TimeIntegrator]
type = ExplicitTVDRK2
[../]
solve_type = 'LINEAR'
start_time = 0.0
num_steps = 10
dt = 0.0001
l_tol = 1e-8
[]
[Outputs]
exodus = true
perf_graph = true
[]
(test/tests/kernels/vector_fe/lagrange_vec.i)
# This example reproduces the libmesh vector_fe example 1 results
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
xmin = -1
ymin = -1
elem_type = QUAD9
[]
[Variables]
[./u]
family = LAGRANGE_VEC
order = SECOND
[../]
[]
[Kernels]
[./diff]
type = VectorDiffusion
variable = u
[../]
[./body_force]
type = VectorBodyForce
variable = u
function_x = 'ffx'
function_y = 'ffy'
[../]
[]
[BCs]
[./bnd]
type = VectorFunctionDirichletBC
variable = u
function_x = 'x_exact_sln'
function_y = 'y_exact_sln'
function_z = '0'
boundary = 'left right top bottom'
[../]
[]
[Functions]
[./x_exact_sln]
type = ParsedFunction
expression = 'cos(.5*pi*x)*sin(.5*pi*y)'
[../]
[./y_exact_sln]
type = ParsedFunction
expression = 'sin(.5*pi*x)*cos(.5*pi*y)'
[../]
[./ffx]
type = ParsedFunction
expression = '.5*pi*pi*cos(.5*pi*x)*sin(.5*pi*y)'
[../]
[./ffy]
type = ParsedFunction
expression = '.5*pi*pi*sin(.5*pi*x)*cos(.5*pi*y)'
[../]
[]
[Preconditioning]
[./pre]
type = SMP
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/fieldsplit/frictional_mortar_FS.i)
offset = 0.021
vy = 0.15
vx = 0.04
refine = 1
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
[original_file_mesh]
type = FileMeshGenerator
file = long_short_blocks.e
[]
uniform_refine = ${refine}
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
use_automatic_differentiation = true
[]
[]
[Functions]
[horizontal_movement]
type = ParsedFunction
expression = 'if(t<0.5,${vx}*t-${offset},${vx}-${offset})'
[]
[vertical_movement]
type = ParsedFunction
expression = 'if(t<0.5,${offset},${vy}*(t-0.5)+${offset})'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 30
function = horizontal_movement
preset = false
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = '40'
value = 0.0
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = '30'
function = vertical_movement
preset = false
[]
[]
[Materials]
[elasticity_tensor_left]
type = ADComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_left]
type = ADComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ADComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_right]
type = ADComputeFiniteStrainElasticStress
block = 2
[]
[]
[Contact]
[leftright]
secondary = 10
primary = 20
model = coulomb
friction_coefficient = 0.2
formulation = mortar
c_normal = 1e5
c_tangential = 1e4
[]
[]
[ICs]
[disp_y]
block = 1
variable = disp_y
value = ${offset}
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = -${offset}
type = ConstantIC
[]
[]
[Preconditioning]
[FSP]
type = FSP
topsplit = 'contact_interior'
[contact_interior]
splitting = 'interior contact'
splitting_type = schur
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart -pc_fieldsplit_schur_fact_type -mat_mffd_err'
petsc_options_value = '200 full 1e-5'
schur_pre = 'S'
[]
[interior]
vars = 'disp_x disp_y'
petsc_options_iname = '-ksp_type -pc_type -pc_hypre_type '
petsc_options_value = 'gmres hypre boomeramg'
[]
[contact]
vars = 'leftright_normal_lm leftright_tangential_lm'
[]
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
end_time = 1
abort_on_solve_fail = true
l_max_its = 200
nl_abs_tol = 1e-8
line_search = 'none'
nl_max_its = 20
[]
[Outputs]
exodus = true
[]
(test/tests/controls/time_periods/aux_scalar_kernels/control_different.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./aux0]
family = SCALAR
[../]
[./aux1]
family = SCALAR
[../]
[]
[Functions]
[./func]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[AuxScalarKernels]
[./scalar_aux0]
type = FunctionScalarAux
variable = aux0
function = func
[../]
[./scalar_aux1]
type = FunctionScalarAux
variable = aux1
function = func
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
[]
[Controls]
[./damping_control]
type = TimePeriod
disable_objects = 'AuxScalarKernels/scalar_aux0 */scalar_aux1'
start_time = '0.25 0.45'
end_time = '0.55 0.75'
execute_on = 'initial timestep_begin'
[../]
[]
(modules/phase_field/test/tests/actions/grain_growth_with_T_grad.i)
#
# This test ensures that a flat grain boundary does not move
# under a temperature gradient using the normal grain growth model
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 20
xmax = 1000
ymax = 500
elem_type = QUAD
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Modules]
[./PhaseField]
[./GrainGrowth]
coupled_variables = T
variable_mobility = true
[../]
[../]
[]
[Functions]
[./TGradient]
type = ParsedFunction
expression = '450 + 0.1*x'
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalBoundingBoxIC]
x1 = 0.0
x2 = 500.0
y1 = 0.0
y2 = 500.0
[../]
[../]
[]
[AuxVariables]
[./T]
[../]
[]
[AuxKernels]
[./Tgrad]
type = FunctionAux
variable = T
function = TGradient
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
T = T # K
wGB = 60 # nm
GBmob0 = 2.5e-6 # m^4/(Js) from Schoenfelder 1997
Q = 0.23 # Migration energy in eV
GBenergy = 0.708 # GB energy in J/m^2
[../]
[]
[Postprocessors]
[./gr0_area]
type = ElementIntegralVariablePostprocessor
variable = gr0
execute_on = 'initial TIMESTEP_END'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
l_max_its = 30
l_tol = 1.0e-4
nl_max_its = 20
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 10
dt = 100.0
[]
[Outputs]
exodus = true
[]
(test/tests/adaptivity/interval/adapt_interval.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 6
dt = 1
solve_type = 'PJFNK'
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 2
interval = 2
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Outputs]
exodus = true
[]
(modules/combined/examples/mortar/mortar_gradient.i)
#
# Compare a diffusion equation with (c) and without (v) periodic gradient
# constraints and a ramped sloped initial condition and value-periodic diffusion (p)
# without a slope.
#
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 40
[]
[secondary_x]
input = gen
type = LowerDBlockFromSidesetGenerator
sidesets = '3'
new_block_id = 10
new_block_name = "secondary_x"
[]
[primary_x]
input = secondary_x
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = 12
new_block_name = "primary_x"
[]
[secondary_y]
input = primary_x
type = LowerDBlockFromSidesetGenerator
sidesets = '0'
new_block_id = 11
new_block_name = "secondary_y"
[]
[primary_y]
input = secondary_y
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = 13
new_block_name = "primary_y"
[]
[]
[Functions]
[./init_slope]
# slope with a concentration spike close to the lower interface
type = ParsedFunction
expression = 'if(x>0.4 & x<0.6 & y>0.1 & y<0.3, 3+y, y)'
[../]
[./init_flat]
# no-slope and the same spike
type = ParsedFunction
expression = 'if(x>0.4 & x<0.6 & y>0.1 & y<0.3, 3, 0)'
[../]
[]
[Variables]
# gradient constrained concentration
[./c]
order = FIRST
family = LAGRANGE
block = 0
[./InitialCondition]
type = FunctionIC
function = init_slope
[../]
[../]
# unconstrained concentrarion
[./v]
order = FIRST
family = LAGRANGE
block = 0
[./InitialCondition]
type = FunctionIC
function = init_slope
[../]
[../]
# flat value periodic diffusion
[./p]
order = FIRST
family = LAGRANGE
block = 0
[./InitialCondition]
type = FunctionIC
function = init_flat
[../]
[../]
# Lagrange multipliers for gradient component in the horizontal directon
[./lm_left_right_x]
order = FIRST
family = LAGRANGE
block = "secondary_x"
[../]
[./lm_left_right_y]
order = FIRST
family = LAGRANGE
block = "secondary_x"
[../]
# Lagrange multipliers for gradient component in the vertical directon
[./lm_up_down_x]
order = FIRST
family = LAGRANGE
block = "secondary_y"
[../]
[./lm_up_down_y]
order = FIRST
family = LAGRANGE
block = "secondary_y"
[../]
[]
[Kernels]
# the gradient constrained concentration
[./diff]
type = Diffusion
variable = c
block = 0
[../]
[./dt]
type = TimeDerivative
variable = c
block = 0
[../]
# the un-constrained concentration
[./diff2]
type = Diffusion
variable = v
block = 0
[../]
[./dt2]
type = TimeDerivative
variable = v
block = 0
[../]
# the value periodic concentration
[./diff3]
type = Diffusion
variable = p
block = 0
[../]
[./dt3]
type = TimeDerivative
variable = p
block = 0
[../]
[]
[Constraints]
[./equaly_grad_x]
type = EqualGradientConstraint
variable = lm_up_down_x
component = 0
secondary_variable = c
secondary_boundary = bottom
primary_boundary = top
secondary_subdomain = secondary_y
primary_subdomain = primary_y
periodic = true
[../]
[./equaly_grad_y]
type = EqualGradientConstraint
variable = lm_up_down_y
component = 1
secondary_variable = c
secondary_boundary = bottom
primary_boundary = top
secondary_subdomain = secondary_y
primary_subdomain = primary_y
periodic = true
[../]
[./equalx_grad_x]
type = EqualGradientConstraint
variable = lm_left_right_x
component = 0
secondary_variable = c
secondary_boundary = left
primary_boundary = right
secondary_subdomain = secondary_x
primary_subdomain = primary_x
periodic = true
[../]
[./equalx_grad_y]
type = EqualGradientConstraint
variable = lm_left_right_y
component = 1
secondary_variable = c
secondary_boundary = left
primary_boundary = right
secondary_subdomain = secondary_x
primary_subdomain = primary_x
periodic = true
[../]
[]
[BCs]
# DiffusionFluxBC is the surface term in the weak form of the Diffusion equation
[./surface]
type = DiffusionFluxBC
boundary = 'top bottom left right'
variable = c
[../]
[./surface2]
type = DiffusionFluxBC
boundary = 'top bottom left right'
variable = v
[../]
# for the value periodic diffusion we skip the surface term and apply value PBCs
[./Periodic]
[./up_down]
variable = p
primary = 0
secondary = 2
translation = '0 1 0'
[../]
[./left_right]
variable = p
primary = 1
secondary = 3
translation = '-1 0 0'
[../]
[../]
[]
[AuxVariables]
[./diff_constraint]
block = 0
[../]
[./diff_periodic]
block = 0
[../]
[./diff_slope]
block = 0
[../]
[./slope]
block = 0
[./InitialCondition]
type = FunctionIC
function = y
[../]
[../]
[]
[AuxKernels]
# difference between the constrained and unconstrained sloped diffusions
[./diff_constraint]
type = ParsedAux
variable = diff_constraint
expression = 'c-v'
coupled_variables = 'c v'
block = 0
[../]
# difference between the periodic gradient constrained diffusion and the flat
# value period diffusien with a constant slope added. This should be the same,
# but they aren't quite because the gradient constraint affects the gradient in
# the entire elements (i.e. a larger volume is affected by the gradient constraint
# compared to the nodal value periodicity)
[./diff_periodic]
type = ParsedAux
variable = diff_periodic
expression = 'c-p-slope'
coupled_variables = 'c p slope'
block = 0
[../]
# subtract the constant slope from the gradient periodic simulation (should yield
# almost p - per the argument above)
[./diff_slope]
type = ParsedAux
variable = diff_slope
expression = 'c-slope'
coupled_variables = 'c slope'
block = 0
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
# the shift is necessary to facilitate the solve. The Lagrange multipliers
# introduce zero-on diaginal blocks, which make the matrix hard to invert.
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' lu NONZERO 1e-10'
nl_rel_tol = 1e-11
nl_abs_tol = 1e-10
l_tol = 1e-10
dt = 0.01
num_steps = 20
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/examples/coal_mining/cosserat_wp_only.i)
# Strata deformation and fracturing around a coal mine
#
# A 2D geometry is used that simulates a transverse section of
# the coal mine. The model is actually 3D, but the "x"
# dimension is only 10m long, meshed with 1 element, and
# there is no "x" displacement. The mine is 300m deep
# and just the roof is studied (0<=z<=300). The model sits
# between 0<=y<=450. The excavation sits in 0<=y<=150. This
# is a "half model": the boundary conditions are such that
# the model simulates an excavation sitting in -150<=y<=150
# inside a model of the region -450<=y<=450. The
# excavation height is 3m (ie, the excavation lies within
# 0<=z<=3). Mining is simulated by moving the excavation's
# roof down, until disp_z=-3 at t=1.
# Time is meaningless in this example
# as quasi-static solutions are sought at each timestep, but
# the number of timesteps controls the resolution of the
# process.
#
# The boundary conditions are:
# - disp_x = 0 everywhere
# - disp_y = 0 at y=0 and y=450
# - disp_z = 0 for y>150
# - disp_z = -3 at maximum, for 0<=y<=150. See excav function.
# That is, rollers on the sides, free at top, and prescribed at bottom.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa. The initial stress is consistent with
# the weight force from density 2500 kg/m^3, ie, stress_zz = -0.025*(300-z) MPa
# where gravity = 10 m.s^-2 = 1E-5 MPa m^2/kg. The maximum and minimum
# principal horizontal stresses are assumed to be equal to 0.8*stress_zz.
#
# Below you will see Drucker-Prager parameters and AuxVariables, etc.
# These are not actally used in this example.
#
# Material properties:
# Young's modulus = 8 GPa
# Poisson's ratio = 0.25
# Cosserat layer thickness = 1 m
# Cosserat-joint normal stiffness = large
# Cosserat-joint shear stiffness = 1 GPa
# Weak-plane cohesion = 0.1 MPa
# Weak-plane friction angle = 20 deg
# Weak-plane dilation angle = 10 deg
# Weak-plane tensile strength = 0.1 MPa
# Weak-plane compressive strength = 100 MPa, varying down to 1 MPa when tensile strain = 1
#
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
xmin = -5
xmax = 5
nz = 40
zmin = 0
zmax = 400
bias_z = 1.1
ny = 30 # make this a multiple of 3, so y=150 is at a node
ymin = 0
ymax = 450
[]
[left]
type = SideSetsAroundSubdomainGenerator
new_boundary = 11
normal = '0 -1 0'
input = generated_mesh
[]
[right]
type = SideSetsAroundSubdomainGenerator
new_boundary = 12
normal = '0 1 0'
input = left
[]
[front]
type = SideSetsAroundSubdomainGenerator
new_boundary = 13
normal = '-1 0 0'
input = right
[]
[back]
type = SideSetsAroundSubdomainGenerator
new_boundary = 14
normal = '1 0 0'
input = front
[]
[top]
type = SideSetsAroundSubdomainGenerator
new_boundary = 15
normal = '0 0 1'
input = back
[]
[bottom]
type = SideSetsAroundSubdomainGenerator
new_boundary = 16
normal = '0 0 -1'
input = top
[]
[excav]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '-5 0 0'
top_right = '5 150 3'
input = bottom
[]
[roof]
type = SideSetsBetweenSubdomainsGenerator
new_boundary = 21
primary_block = 0
paired_block = 1
input = excav
[]
[hole]
type = BlockDeletionGenerator
block = 1
input = roof
[]
[]
[GlobalParams]
block = 0
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
[]
[Variables]
[./disp_y]
[../]
[./disp_z]
[../]
[./wc_x]
[../]
[]
[Kernels]
[./cy_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_y
component = 1
[../]
[./cz_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_z
component = 2
[../]
[./x_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[../]
[./x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[../]
[./gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./wc_y]
[../]
[./wc_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./dp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./dp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[./dp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./dp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./dp_shear]
type = MaterialStdVectorAux
index = 0
property = dp_plastic_internal_parameter
variable = dp_shear
[../]
[./dp_tensile]
type = MaterialStdVectorAux
index = 1
property = dp_plastic_internal_parameter
variable = dp_tensile
[../]
[./wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
[../]
[./wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
[../]
[./dp_shear_f]
type = MaterialStdVectorAux
index = 0
property = dp_plastic_yield_function
variable = dp_shear_f
[../]
[./dp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = dp_plastic_yield_function
variable = dp_tensile_f
[../]
[./wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
[../]
[./wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
[../]
[]
[BCs]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '11 12 16 21' # note addition of 16 and 21
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '16'
value = 0.0
[../]
[./no_wc_x]
type = DirichletBC
variable = wc_x
boundary = '11 12'
value = 0.0
[../]
[./roof]
type = FunctionDirichletBC
variable = disp_z
boundary = 21
function = excav_sideways
[../]
[]
[Functions]
[./ini_xx]
type = ParsedFunction
expression = '-0.8*2500*10E-6*(400-z)'
[../]
[./ini_zz]
type = ParsedFunction
expression = '-2500*10E-6*(400-z)'
[../]
[./excav_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax e_h closure_dist'
symbol_values = '1.0 0 150.0 -3.0 15.0'
expression = 'e_h*max(min((t/end_t*(ymax-ymin)+ymin-y)/closure_dist,1),0)'
[../]
[./excav_downwards]
type = ParsedFunction
symbol_names = 'end_t ymin ymax e_h closure_dist'
symbol_values = '1.0 0 150.0 -3.0 15.0'
expression = 'e_h*t/end_t*max(min(((ymax-ymin)+ymin-y)/closure_dist,1),0)'
[../]
[]
[UserObjects]
[./dp_coh_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 2.9 # MPa
value_residual = 3.1 # MPa
rate = 1.0
[../]
[./dp_fric]
type = SolidMechanicsHardeningConstant
value = 0.65 # 37deg
[../]
[./dp_dil]
type = SolidMechanicsHardeningConstant
value = 0.65
[../]
[./dp_tensile_str_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.4 # MPa
rate = 1.0
[../]
[./dp_compressive_str]
type = SolidMechanicsHardeningConstant
value = 1.0E3 # Large!
[../]
[./drucker_prager_model]
type = SolidMechanicsPlasticDruckerPrager
mc_cohesion = dp_coh_strong_harden
mc_friction_angle = dp_fric
mc_dilation_angle = dp_dil
internal_constraint_tolerance = 1 # irrelevant here
yield_function_tolerance = 1 # irrelevant here
[../]
[./wp_coh_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_tan_fric]
type = SolidMechanicsHardeningConstant
value = 0.36 # 20deg
[../]
[./wp_tan_dil]
type = SolidMechanicsHardeningConstant
value = 0.18 # 10deg
[../]
[./wp_tensile_str_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_compressive_str_soften]
type = SolidMechanicsHardeningCubic
value_0 = 100
value_residual = 1.0
internal_limit = 1.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeLayeredCosseratElasticityTensor
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3
[../]
[./strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[../]
[./ini_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
eigenstrain_name = ini_stress
[../]
[./stress]
type = ComputeMultipleInelasticCosseratStress
block = 0
inelastic_models = 'wp'
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./dp]
type = CappedDruckerPragerCosseratStressUpdate
block = 0
warn_about_precision_loss = false
host_youngs_modulus = 8E3
host_poissons_ratio = 0.25
base_name = dp
DP_model = drucker_prager_model
tensile_strength = dp_tensile_str_strong_harden
compressive_strength = dp_compressive_str
max_NR_iterations = 100000
tip_smoother = 0.1E1
smoothing_tol = 0.1E1 # MPa # Must be linked to cohesion
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[../]
[./wp]
type = CappedWeakPlaneCosseratStressUpdate
block = 0
warn_about_precision_loss = false
base_name = wp
cohesion = wp_coh_harden
tan_friction_angle = wp_tan_fric
tan_dilation_angle = wp_tan_dil
tensile_strength = wp_tensile_str_harden
compressive_strength = wp_compressive_str_soften
max_NR_iterations = 10000
tip_smoother = 0.1
smoothing_tol = 0.1 # MPa # Note, this must be tied to cohesion, otherwise get no possible return at cone apex
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0E-3
[../]
[./density]
type = GenericConstantMaterial
prop_names = density
prop_values = 2500
[../]
[]
[Postprocessors]
[./subsidence]
type = PointValue
point = '0 0 400'
variable = disp_z
use_displaced_mesh = false
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
line_search = bt
nl_abs_tol = 1e-3
nl_rel_tol = 1e-5
l_max_its = 30
nl_max_its = 1000
start_time = 0.0
dt = 0.2
end_time = 0.2
[]
[Outputs]
file_base = cosserat_wp_only
time_step_interval = 1
print_linear_residuals = false
csv = true
exodus = true
[./console]
type = Console
output_linear = false
[../]
[]
(test/tests/userobjects/solution_user_object/discontinuous_value_solution_uo_p1.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./discontinuous_variable]
order = CONSTANT
family = MONOMIAL
[../]
[./continuous_variable]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./discontinuous_function]
type = ParsedFunction
expression = 'if(x<0.5,3,5)'
[../]
[./continuous_function]
type = ParsedFunction
expression = 'if(x<0.5,x,2*x-0.5)'
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[ICs]
[./discontinuous_variable]
type = FunctionIC
variable = discontinuous_variable
function = discontinuous_function
[../]
[./continuous_variable]
type = FunctionIC
variable = continuous_variable
function = continuous_function
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./one]
type = DirichletBC
variable = u
boundary = 'right top bottom'
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
file_base = discontinuous_value_solution_uo_p1
exodus = true
[]
(test/tests/functions/parsed/function_curl.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = -1
ymin = -1
elem_type = QUAD9
[]
[Variables]
# u = (y, -x, 0)
[./u]
family = NEDELEC_ONE
order = FIRST
[../]
[]
[Functions]
# Simple "clockwise rotating" field in XY plane. curl(u) = (0, 0, -2)
[./field]
type = ParsedVectorFunction
expression_x = 'y'
expression_y = '-x'
curl_z = '-2'
[../]
[./ffn_x]
type = ParsedFunction
expression = 'y'
[../]
[./ffn_y]
type = ParsedFunction
expression = '-x'
[../]
[]
[Kernels]
[./diff]
type = VectorFEWave
variable = u
x_forcing_func = ffn_x
y_forcing_func = ffn_y
[../]
[]
[BCs]
[./top]
type = VectorCurlBC
curl_value = field
variable = u
boundary = 'left right top bottom'
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/kernels/mass_lumping/mass_lumping_jacobian.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -1
xmax = 1
nx = 2
[]
[Variables]
[./u]
[../]
[]
[ICs]
[./u_init]
type = FunctionIC
variable = u
function = init_f
[../]
[]
[Kernels]
[./time_deriv]
type = MassLumpedTimeDerivative
variable = u
[../]
[./diff]
type = FuncCoefDiffusion
variable = u
coef = diff_f
[../]
[]
[Functions]
[./init_f]
type = ParsedFunction
expression = max(x,0) #(x>0)
[../]
[./diff_f]
type = ParsedFunction
expression = max(x,0)
[../]
[]
[Executioner]
type = Transient
end_time = 1
solve_type = 'NEWTON'
petsc_options_iname = '-snes_type'
petsc_options_value = 'test'
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/domain_integral_thermal/j_integral_2d_ctefunc.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
file = crack2d.e
[]
[AuxVariables]
[./SED]
order = CONSTANT
family = MONOMIAL
[../]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./tempfunc]
type = ParsedFunction
expression = 10.0*(2*x/504)
[../]
[./cte_func]
type = PiecewiseLinear
x = '-10 -6 -2 0 2 6 10'
y = '1.484e-5 1.489e-5 1.494e-5 1.496e-5 1.498e-5 1.502e-5 1.505e-5'
[../]
[]
[DomainIntegral]
integrals = JIntegral
boundary = 800
crack_direction_method = CrackDirectionVector
crack_direction_vector = '1 0 0'
2d = true
axis_2d = 2
radius_inner = '60.0 80.0 100.0 120.0'
radius_outer = '80.0 100.0 120.0 140.0'
temperature = temp
incremental = true
eigenstrain_names = thermal_expansion
[]
[Physics/SolidMechanics/QuasiStatic]
[./master]
strain = FINITE
add_variables = true
incremental = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress'
planar_formulation = PLANE_STRAIN
eigenstrain_names = thermal_expansion
[../]
[]
[AuxKernels]
[./SED]
type = MaterialRealAux
variable = SED
property = strain_energy_density
execute_on = timestep_end
[../]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
block = 1
[../]
[]
[BCs]
[./crack_y]
type = DirichletBC
variable = disp_y
boundary = 100
value = 0.0
[../]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = 400
value = 0.0
[../]
[./no_x1]
type = DirichletBC
variable = disp_x
boundary = 900
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
[../]
[./elastic_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain]
type = ComputeInstantaneousThermalExpansionFunctionEigenstrain
block = 1
thermal_expansion_function = cte_func
stress_free_temperature = 0.0
temperature = temp
eigenstrain_name = thermal_expansion
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
line_search = 'none'
l_max_its = 50
nl_max_its = 40
nl_rel_step_tol= 1e-10
nl_rel_tol = 1e-10
start_time = 0.0
dt = 1
end_time = 1
num_steps = 1
[]
[Outputs]
csv = true
[]
[Preconditioning]
[./smp]
type = SMP
pc_side = left
ksp_norm = preconditioned
full = true
[../]
[]
(test/tests/materials/functor_properties/vector-magnitude/vector-test.i)
# This example reproduces the libmesh vector_fe example 1 results
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
xmin = -1
ymin = -1
[]
[Variables]
[u]
family = LAGRANGE_VEC
[]
[]
[AuxVariables]
[mag]
order = FIRST
family = MONOMIAL
[]
[]
[AuxKernels]
[mag]
type = FunctorAux
variable = mag
functor = mat_mag
[]
[]
[Kernels]
[diff]
type = VectorDiffusion
variable = u
[]
[body_force]
type = VectorBodyForce
variable = u
function_x = 'ffx'
function_y = 'ffy'
[]
[]
[BCs]
[bnd]
type = VectorFunctionDirichletBC
variable = u
function_x = 'x_exact_sln'
function_y = 'y_exact_sln'
function_z = '0'
boundary = 'left right top bottom'
[]
[]
[Functions]
[x_exact_sln]
type = ParsedFunction
expression = 'cos(.5*pi*x)*sin(.5*pi*y)'
[]
[y_exact_sln]
type = ParsedFunction
expression = 'sin(.5*pi*x)*cos(.5*pi*y)'
[]
[ffx]
type = ParsedFunction
expression = '.5*pi*pi*cos(.5*pi*x)*sin(.5*pi*y)'
[]
[ffy]
type = ParsedFunction
expression = '.5*pi*pi*sin(.5*pi*x)*cos(.5*pi*y)'
[]
[]
[Materials]
[functor]
type = ADVectorMagnitudeFunctorMaterial
vector_functor = u
vector_magnitude_name = mat_mag
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/large-tests/2d.i)
# 2D with mixed conditions on stress/strain
[GlobalParams]
displacements = 'disp_x disp_y'
large_kinematics = true
macro_gradient = hvar
homogenization_constraint = homogenization
[]
[Mesh]
[base]
type = FileMeshGenerator
file = '2d.exo'
[]
[sidesets]
type = SideSetsFromNormalsGenerator
input = base
normals = '-1 0 0
1 0 0
0 -1 0
0 1 0'
fixed_normal = true
new_boundary = 'left right bottom top'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[hvar]
family = SCALAR
order = FOURTH
[]
[]
[AuxVariables]
[s11]
family = MONOMIAL
order = CONSTANT
[]
[s21]
family = MONOMIAL
order = CONSTANT
[]
[s31]
family = MONOMIAL
order = CONSTANT
[]
[s12]
family = MONOMIAL
order = CONSTANT
[]
[s22]
family = MONOMIAL
order = CONSTANT
[]
[s32]
family = MONOMIAL
order = CONSTANT
[]
[s13]
family = MONOMIAL
order = CONSTANT
[]
[s23]
family = MONOMIAL
order = CONSTANT
[]
[s33]
family = MONOMIAL
order = CONSTANT
[]
[F11]
family = MONOMIAL
order = CONSTANT
[]
[F21]
family = MONOMIAL
order = CONSTANT
[]
[F31]
family = MONOMIAL
order = CONSTANT
[]
[F12]
family = MONOMIAL
order = CONSTANT
[]
[F22]
family = MONOMIAL
order = CONSTANT
[]
[F32]
family = MONOMIAL
order = CONSTANT
[]
[F13]
family = MONOMIAL
order = CONSTANT
[]
[F23]
family = MONOMIAL
order = CONSTANT
[]
[F33]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[s11]
type = RankTwoAux
variable = s11
rank_two_tensor = pk1_stress
index_i = 0
index_j = 0
[]
[s21]
type = RankTwoAux
variable = s21
rank_two_tensor = pk1_stress
index_i = 1
index_j = 0
[]
[s31]
type = RankTwoAux
variable = s31
rank_two_tensor = pk1_stress
index_i = 2
index_j = 0
[]
[s12]
type = RankTwoAux
variable = s12
rank_two_tensor = pk1_stress
index_i = 0
index_j = 1
[]
[s22]
type = RankTwoAux
variable = s22
rank_two_tensor = pk1_stress
index_i = 1
index_j = 1
[]
[s32]
type = RankTwoAux
variable = s32
rank_two_tensor = pk1_stress
index_i = 2
index_j = 1
[]
[s13]
type = RankTwoAux
variable = s13
rank_two_tensor = pk1_stress
index_i = 0
index_j = 2
[]
[s23]
type = RankTwoAux
variable = s23
rank_two_tensor = pk1_stress
index_i = 1
index_j = 2
[]
[s33]
type = RankTwoAux
variable = s33
rank_two_tensor = pk1_stress
index_i = 2
index_j = 2
[]
[F11]
type = RankTwoAux
variable = F11
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 0
[]
[F21]
type = RankTwoAux
variable = F21
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 0
[]
[F31]
type = RankTwoAux
variable = F31
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 0
[]
[F12]
type = RankTwoAux
variable = F12
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 1
[]
[F22]
type = RankTwoAux
variable = F22
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 1
[]
[F32]
type = RankTwoAux
variable = F32
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 1
[]
[F13]
type = RankTwoAux
variable = F13
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 2
[]
[F23]
type = RankTwoAux
variable = F23
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 2
[]
[F33]
type = RankTwoAux
variable = F33
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 2
[]
[]
[UserObjects]
[homogenization]
type = HomogenizationConstraint
constraint_types = ${constraint_types}
targets = ${targets}
execute_on = 'INITIAL LINEAR NONLINEAR'
[]
[]
[Kernels]
[sdx]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[sdy]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_y
component = 1
[]
[]
[ScalarKernels]
[enforce]
type = HomogenizationConstraintScalarKernel
variable = hvar
[]
[]
[Functions]
[strain11]
type = ParsedFunction
expression = '4.0e-1*t'
[]
[strain22]
type = ParsedFunction
expression = '-2.0e-1*t'
[]
[strain12]
type = ParsedFunction
expression = '1.0e-1*t'
[]
[strain21]
type = ParsedFunction
expression = '-1.5e-1*t'
[]
[stress11]
type = ParsedFunction
expression = '4.0e2*t'
[]
[stress22]
type = ParsedFunction
expression = '-2.0e2*t'
[]
[stress12]
type = ParsedFunction
expression = '1.0e2*t'
[]
[stress21]
type = ParsedFunction
expression = '-1.5e2*t'
[]
[]
[BCs]
[Periodic]
[x]
variable = disp_x
auto_direction = 'x y'
[]
[y]
variable = disp_y
auto_direction = 'x y'
[]
[]
[fix1_x]
type = DirichletBC
boundary = "fix1"
variable = disp_x
value = 0
[]
[fix1_y]
type = DirichletBC
boundary = "fix1"
variable = disp_y
value = 0
[]
[fix2_y]
type = DirichletBC
boundary = "fix2"
variable = disp_y
value = 0
[]
[]
[Materials]
[elastic_tensor_1]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
block = '1'
[]
[elastic_tensor_2]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 120000.0
poissons_ratio = 0.21
block = '2'
[]
[elastic_tensor_3]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 80000.0
poissons_ratio = 0.4
block = '3'
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
homogenization_gradient_names = 'homogenization_gradient'
[]
[compute_homogenization_gradient]
type = ComputeHomogenizedLagrangianStrain
[]
[]
[Postprocessors]
[s11]
type = ElementAverageValue
variable = s11
execute_on = 'initial timestep_end'
[]
[s21]
type = ElementAverageValue
variable = s21
execute_on = 'initial timestep_end'
[]
[s31]
type = ElementAverageValue
variable = s31
execute_on = 'initial timestep_end'
[]
[s12]
type = ElementAverageValue
variable = s12
execute_on = 'initial timestep_end'
[]
[s22]
type = ElementAverageValue
variable = s22
execute_on = 'initial timestep_end'
[]
[s32]
type = ElementAverageValue
variable = s32
execute_on = 'initial timestep_end'
[]
[s13]
type = ElementAverageValue
variable = s13
execute_on = 'initial timestep_end'
[]
[s23]
type = ElementAverageValue
variable = s23
execute_on = 'initial timestep_end'
[]
[s33]
type = ElementAverageValue
variable = s33
execute_on = 'initial timestep_end'
[]
[F11]
type = ElementAverageValue
variable = F11
execute_on = 'initial timestep_end'
[]
[F21]
type = ElementAverageValue
variable = F21
execute_on = 'initial timestep_end'
[]
[F31]
type = ElementAverageValue
variable = F31
execute_on = 'initial timestep_end'
[]
[F12]
type = ElementAverageValue
variable = F12
execute_on = 'initial timestep_end'
[]
[F22]
type = ElementAverageValue
variable = F22
execute_on = 'initial timestep_end'
[]
[F32]
type = ElementAverageValue
variable = F32
execute_on = 'initial timestep_end'
[]
[F13]
type = ElementAverageValue
variable = F13
execute_on = 'initial timestep_end'
[]
[F23]
type = ElementAverageValue
variable = F23
execute_on = 'initial timestep_end'
[]
[F33]
type = ElementAverageValue
variable = F33
execute_on = 'initial timestep_end'
[]
[]
[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 = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 1.0
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/umat/plane_strain/generalized_plane_strain.i)
# Testing the UMAT Interface - creep linear strain hardening model using the finite strain formulation - visco-plastic material.
# Uses 2D plane strain
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
[]
[]
[Functions]
[top_pull]
type = ParsedFunction
expression = t/100
[]
[]
[Variables]
[scalar_strain_zz]
order = FIRST
family = SCALAR
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
generate_output = 'strain_yy stress_yy stress_zz'
planar_formulation = GENERALIZED_PLANE_STRAIN
scalar_out_of_plane_strain = scalar_strain_zz
[]
[]
[BCs]
[y_pull_function]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = top_pull
[]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[]
[Materials]
[constant]
type = AbaqusUMATStress
# Young's modulus, Poisson's Ratio, Yield, Hardening
constant_properties = '1000 0.3 10 100'
plugin = ../../../plugins/linear_strain_hardening
num_state_vars = 3
use_one_based_indexing = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
num_steps = 30
dt = 1.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[average_strain_yy]
type = ElementAverageValue
variable = 'strain_yy'
[]
[average_stress_yy]
type = ElementAverageValue
variable = 'stress_yy'
[]
[average_stress_zz]
type = ElementAverageValue
variable = 'stress_zz'
[]
[]
[Outputs]
[out]
type = Exodus
elemental_as_nodal = true
[]
[]
(test/tests/utils/spline_interpolation/bicubic_spline_interpolation_x_normal.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1 # needed to ensure Z is the problem dimension
ny = 4
nz = 4
ymax = 4
zmax = 4
[]
[Functions]
[./yx1]
type = ParsedFunction
expression = '3*y^2'
[../]
[./yx2]
type = ParsedFunction
expression = '6*z^2'
[../]
[./spline_fn]
type = BicubicSplineFunction
normal_component = 'x'
x1 = '0 2 4'
x2 = '0 2 4 6'
y = '0 16 128 432 8 24 136 440 64 80 192 496'
yx11 = '0 0 0 0'
yx1n = '48 48 48 48'
yx21 = '0 0 0'
yx2n = '216 216 216'
yx1 = 'yx1'
yx2 = 'yx2'
[../]
[./u_func]
type = ParsedFunction
expression = 'y^3 + 2*z^3'
[../]
[./u2_forcing_func]
type = ParsedFunction
expression = '-6*y - 12*z'
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./bi_func_value]
order = FIRST
family = LAGRANGE
[../]
[./y_deriv]
order = FIRST
family = LAGRANGE
[../]
[./z_deriv]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./bi_func_value]
type = FunctionAux
variable = bi_func_value
function = spline_fn
[../]
[./deriv_1]
type = FunctionDerivativeAux
function = spline_fn
variable = y_deriv
component = y
[../]
[./deriv_2]
type = FunctionDerivativeAux
function = spline_fn
variable = z_deriv
component = z
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
function = u2_forcing_func
[../]
[]
[BCs]
[./sides]
type = FunctionDirichletBC
variable = u
boundary = 'left right front back'
function = u_func
[../]
[]
[Postprocessors]
[./nodal_l2_err_spline]
type = NodalL2Error
variable = u
function = spline_fn
execute_on = 'initial timestep_end'
[../]
[./nodal_l2_err_analytic]
type = NodalL2Error
variable = u
function = u_func
execute_on = 'initial timestep_end'
[../]
[./y_deriv_err_analytic]
type = NodalL2Error
variable = y_deriv
function = yx1
execute_on = 'initial timestep_end'
[../]
[./z_deriv_err_analytic]
type = NodalL2Error
variable = z_deriv
function = yx2
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/mortar/continuity-2d-conforming/conforming-2nd-order.i)
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-conf-2nd.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Functions]
[./exact_sln]
type = ParsedFunction
expression= x*x+y*y
[../]
[./ffn]
type = ParsedFunction
expression= -4
[../]
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
block = '1 2'
[../]
[./lm]
order = SECOND
family = LAGRANGE
block = secondary_lower
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = ffn
[../]
[]
[Constraints]
[./ced]
type = EqualValueConstraint
variable = lm
secondary_variable = u
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '1 2 3 4'
function = exact_sln
[../]
[]
[Postprocessors]
[./l2_error]
type = ElementL2Error
variable = u
function = exact_sln
block = '1 2'
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
[./fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-14
l_tol = 1e-14
[]
[Outputs]
exodus = true
[]
(test/tests/controls/real_function_control/real_function_control.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 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
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
dtmin = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
[]
[Functions]
[./func_coef]
type = ParsedFunction
expression = '2*t + 0.1'
[../]
[]
[Postprocessors]
[./coef]
type = RealControlParameterReporter
parameter = 'Kernels/diff/coef'
[../]
[]
[Controls]
[./func_control]
type = RealFunctionControl
parameter = '*/*/coef'
function = 'func_coef'
execute_on = 'initial timestep_begin'
[../]
[]
(modules/contact/test/tests/sliding_block/in_and_out/frictionless_lm.i)
[Mesh]
patch_size = 80
[file]
type = FileMeshGenerator
file = sliding_elastic_blocks_2d.e
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = false
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = true
strain = FINITE
block = '1 2'
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[]
[right_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = horizontal_movement
[]
[right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = vertical_movement
[]
[]
[Materials]
[left]
type = ComputeIsotropicElasticityTensor
block = '1 2'
youngs_modulus = 1e6
poissons_ratio = 0.3
constant_on = SUBDOMAIN
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_ksp_ew'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 15
dt = 0.1
dtmin = 0.01
l_max_its = 30
nl_max_its = 20
line_search = 'none'
timestep_tolerance = 1e-6
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
sync_times = '1 2 3 4 5 6 7 8 9 10 11 12 13 14 15'
[out]
type = Exodus
sync_only = true
[]
[dof]
execute_on = 'initial'
type = DOFMap
[]
[csv]
type = CSV
execute_on = 'nonlinear timestep_end'
[]
[]
[Functions]
[vertical_movement]
type = ParsedFunction
expression = -t
[]
[horizontal_movement]
type = ParsedFunction
expression = -0.04*sin(4*t)+0.02
[]
[]
[Contact]
[contact]
secondary = 3
primary = 2
model = frictionless
formulation = mortar
[]
[]
[Postprocessors]
[num_nl]
type = NumNonlinearIterations
[]
[lin]
type = NumLinearIterations
[]
[contact]
type = ContactDOFSetSize
variable = contact_normal_lm
subdomain = '30'
execute_on = 'nonlinear timestep_end'
[]
[]
(test/tests/problems/reference_residual_problem/ad_abs_ref.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
[]
[GlobalParams]
absolute_value_vector_tags = 'absref'
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'absref'
extra_tag_vectors = 'absref'
[]
[Variables]
[u][]
[v]
scaling = 1e-6
[]
[]
[Functions]
[ramp]
type = ParsedFunction
expression = 'if(t < 5, t - 5, 0) * x'
[]
[]
[Kernels]
[u_dt]
type = ADTimeDerivative
variable = u
[]
[u_coupled_rx]
type = ADCoupledForce
variable = u
v = v
coef = 1
[]
[v_dt]
type = ADTimeDerivative
variable = v
[]
[v_neg_force]
type = ADBodyForce
variable = v
value = ${fparse -1 / 2}
function = ramp
[]
[v_force]
type = ADBodyForce
variable = v
value = 1
function = ramp
[]
[]
[Postprocessors]
[u_avg]
type = ElementAverageValue
variable = u
execute_on = 'TIMESTEP_END INITIAL'
[]
[v_avg]
type = ElementAverageValue
variable = v
execute_on = 'TIMESTEP_END INITIAL'
[]
[timestep]
type = TimePostprocessor
outputs = 'none'
[]
[v_old]
type = ElementAverageValue
variable = v
execute_on = TIMESTEP_BEGIN
outputs = none
[]
[u_old]
type = ElementAverageValue
variable = u
execute_on = TIMESTEP_BEGIN
outputs = none
[]
[v_exact]
type = ParsedPostprocessor
pp_names = 'timestep v_old'
expression = 't := if(timestep > 5, 5, timestep); (t^2 - 9 * t) / 8'
[]
[u_exact]
type = ParsedPostprocessor
pp_names = 'u_old v_exact'
expression = 'u_old + v_exact'
[]
[]
[Executioner]
type = Transient
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = none
num_steps = 10
nl_rel_tol = 1e-06
verbose = true
[]
[Outputs]
csv = true
[]
(test/tests/fvkernels/mms/grad-reconstruction/rz.i)
a=1.1
diff=1.1
[Mesh]
[./gen_mesh]
type = GeneratedMeshGenerator
dim = 2
xmin = 2
xmax = 3
ymin = 0
ymax = 1
nx = 2
ny = 2
[../]
[]
[Problem]
coord_type = 'RZ'
[]
[Variables]
[./v]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 1
[../]
[]
[FVKernels]
[./advection]
type = FVElementalAdvection
variable = v
velocity = '${a} ${a} 0'
[../]
[reaction]
type = FVReaction
variable = v
[]
[diff_v]
type = FVDiffusion
variable = v
coeff = ${diff}
[]
[body_v]
type = FVBodyForce
variable = v
function = 'forcing'
[]
[]
[FVBCs]
[diri]
type = FVFunctionDirichletBC
boundary = 'left right top bottom'
function = 'exact'
variable = v
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = 'sin(x)*cos(y)'
[]
[forcing]
type = ParsedFunction
expression = '-a*sin(x)*sin(y) + diff*sin(x)*cos(y) + sin(x)*cos(y) + (x*a*cos(x)*cos(y) + a*sin(x)*cos(y))/x - (-x*diff*sin(x)*cos(y) + diff*cos(x)*cos(y))/x'
symbol_names = 'a diff'
symbol_values = '${a} ${diff}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_shift_type -sub_pc_type'
petsc_options_value = 'asm NONZERO lu'
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[./error]
type = ElementL2Error
variable = v
function = exact
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(modules/optimization/test/tests/optimizationreporter/material/adjoint_explicit.i)
[Mesh]
[]
[Variables]
[adjoint_var]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = adjoint_var
diffusivity = thermal_conductivity
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = adjoint_var
x_coord_name = misfit/measurement_xcoord
y_coord_name = misfit/measurement_ycoord
z_coord_name = misfit/measurement_zcoord
value_name = misfit/misfit_values
[]
[]
[Reporters]
[misfit]
type = OptimizationData
[]
[]
[AuxVariables]
[temperature_forward]
[]
[grad_Tx]
order = CONSTANT
family = MONOMIAL
[]
[grad_Ty]
order = CONSTANT
family = MONOMIAL
[]
[grad_Tz]
order = CONSTANT
family = MONOMIAL
[]
[grad_Tfx]
order = CONSTANT
family = MONOMIAL
[]
[grad_Tfy]
order = CONSTANT
family = MONOMIAL
[]
[grad_Tfz]
order = CONSTANT
family = MONOMIAL
[]
[negative_gradient]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[grad_Tx]
type = VariableGradientComponent
component = x
variable = grad_Tx
gradient_variable = adjoint_var
[]
[grad_Ty]
type = VariableGradientComponent
component = y
variable = grad_Ty
gradient_variable = adjoint_var
[]
[grad_Tz]
type = VariableGradientComponent
component = z
variable = grad_Tz
gradient_variable = adjoint_var
[]
[grad_Tfx]
type = VariableGradientComponent
component = x
variable = grad_Tfx
gradient_variable = temperature_forward
[]
[grad_Tfy]
type = VariableGradientComponent
component = y
variable = grad_Tfy
gradient_variable = temperature_forward
[]
[grad_Tfz]
type = VariableGradientComponent
component = z
variable = grad_Tfz
gradient_variable = temperature_forward
[]
[negative_gradient]
type = ParsedAux
variable = negative_gradient
args = 'grad_Tx grad_Ty grad_Tz grad_Tfx grad_Tfy grad_Tfz'
function = '-(grad_Tx*grad_Tfx+grad_Ty*grad_Tfy+grad_Tz*grad_Tfz)'
[]
[]
[BCs]
[left]
type = NeumannBC
variable = adjoint_var
boundary = left
value = 0
[]
[right]
type = NeumannBC
variable = adjoint_var
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = adjoint_var
boundary = bottom
value = 0
[]
[top]
type = DirichletBC
variable = adjoint_var
boundary = top
value = 0
[]
[]
[Functions]
[thermo_conduct]
type = ParsedFunction
value = alpha
vars = 'alpha'
vals = 'p1'
[]
[]
[Materials]
[thermalProp]
type = GenericFunctionMaterial
prop_names = 'thermal_conductivity'
prop_values = 'thermo_conduct'
[]
[thermalPropDeriv]
type = GenericFunctionMaterial
prop_names = 'thermal_conductivity_deriv'
prop_values = '1'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'preonly lu superlu_dist'
[]
[Postprocessors]
[pp_adjoint_grad_parsedFunc]
type = ElementIntegralVariablePostprocessor
variable = negative_gradient
execute_on = 'initial linear'
[]
[p1]
type = ConstantValuePostprocessor
value = 10
execute_on = 'initial linear'
[]
[]
[Controls]
[parameterReceiver]
type = ControlsReceiver
[]
[]
[VectorPostprocessors]
[adjoint_grad]
type = VectorOfPostprocessors
postprocessors = 'pp_adjoint_grad_parsedFunc'
[]
[]
[Outputs]
console = false
file_base = 'adjoint'
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/large-tests/3d.i)
# 2D test with just strain control
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = true
macro_gradient = hvar
homogenization_constraint = homogenization
[]
[Mesh]
[base]
type = FileMeshGenerator
file = '3d.exo'
[]
[sidesets]
type = SideSetsFromNormalsGenerator
input = base
normals = '-1 0 0
1 0 0
0 -1 0
0 1 0
'
' 0 0 -1
0 0 1'
fixed_normal = true
new_boundary = 'left right bottom top back front'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[hvar]
family = SCALAR
order = NINTH
[]
[]
[AuxVariables]
[s11]
family = MONOMIAL
order = CONSTANT
[]
[s21]
family = MONOMIAL
order = CONSTANT
[]
[s31]
family = MONOMIAL
order = CONSTANT
[]
[s12]
family = MONOMIAL
order = CONSTANT
[]
[s22]
family = MONOMIAL
order = CONSTANT
[]
[s32]
family = MONOMIAL
order = CONSTANT
[]
[s13]
family = MONOMIAL
order = CONSTANT
[]
[s23]
family = MONOMIAL
order = CONSTANT
[]
[s33]
family = MONOMIAL
order = CONSTANT
[]
[F11]
family = MONOMIAL
order = CONSTANT
[]
[F21]
family = MONOMIAL
order = CONSTANT
[]
[F31]
family = MONOMIAL
order = CONSTANT
[]
[F12]
family = MONOMIAL
order = CONSTANT
[]
[F22]
family = MONOMIAL
order = CONSTANT
[]
[F32]
family = MONOMIAL
order = CONSTANT
[]
[F13]
family = MONOMIAL
order = CONSTANT
[]
[F23]
family = MONOMIAL
order = CONSTANT
[]
[F33]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[s11]
type = RankTwoAux
variable = s11
rank_two_tensor = pk1_stress
index_i = 0
index_j = 0
[]
[s21]
type = RankTwoAux
variable = s21
rank_two_tensor = pk1_stress
index_i = 1
index_j = 0
[]
[s31]
type = RankTwoAux
variable = s31
rank_two_tensor = pk1_stress
index_i = 2
index_j = 0
[]
[s12]
type = RankTwoAux
variable = s12
rank_two_tensor = pk1_stress
index_i = 0
index_j = 1
[]
[s22]
type = RankTwoAux
variable = s22
rank_two_tensor = pk1_stress
index_i = 1
index_j = 1
[]
[s32]
type = RankTwoAux
variable = s32
rank_two_tensor = pk1_stress
index_i = 2
index_j = 1
[]
[s13]
type = RankTwoAux
variable = s13
rank_two_tensor = pk1_stress
index_i = 0
index_j = 2
[]
[s23]
type = RankTwoAux
variable = s23
rank_two_tensor = pk1_stress
index_i = 1
index_j = 2
[]
[s33]
type = RankTwoAux
variable = s33
rank_two_tensor = pk1_stress
index_i = 2
index_j = 2
[]
[F11]
type = RankTwoAux
variable = F11
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 0
[]
[F21]
type = RankTwoAux
variable = F21
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 0
[]
[F31]
type = RankTwoAux
variable = F31
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 0
[]
[F12]
type = RankTwoAux
variable = F12
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 1
[]
[F22]
type = RankTwoAux
variable = F22
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 1
[]
[F32]
type = RankTwoAux
variable = F32
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 1
[]
[F13]
type = RankTwoAux
variable = F13
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 2
[]
[F23]
type = RankTwoAux
variable = F23
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 2
[]
[F33]
type = RankTwoAux
variable = F33
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 2
[]
[]
[UserObjects]
[homogenization]
type = HomogenizationConstraint
constraint_types = ${constraint_types}
targets = ${targets}
execute_on = 'INITIAL LINEAR NONLINEAR'
[]
[]
[Kernels]
[sdx]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[sdy]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_y
component = 1
[]
[sdz]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_z
component = 2
[]
[]
[ScalarKernels]
[enforce]
type = HomogenizationConstraintScalarKernel
variable = hvar
[]
[]
[Functions]
[strain11]
type = ParsedFunction
expression = '8.0e-2*t'
[]
[strain22]
type = ParsedFunction
expression = '-4.0e-2*t'
[]
[strain33]
type = ParsedFunction
expression = '8.0e-2*t'
[]
[strain23]
type = ParsedFunction
expression = '2.0e-2*t'
[]
[strain13]
type = ParsedFunction
expression = '-7.0e-2*t'
[]
[strain12]
type = ParsedFunction
expression = '1.0e-2*t'
[]
[strain32]
type = ParsedFunction
expression = '1.0e-2*t'
[]
[strain31]
type = ParsedFunction
expression = '2.0e-2*t'
[]
[strain21]
type = ParsedFunction
expression = '-1.5e-2*t'
[]
[stress11]
type = ParsedFunction
expression = '4.0e2*t'
[]
[stress22]
type = ParsedFunction
expression = '-2.0e2*t'
[]
[stress33]
type = ParsedFunction
expression = '8.0e2*t'
[]
[stress23]
type = ParsedFunction
expression = '2.0e2*t'
[]
[stress13]
type = ParsedFunction
expression = '-7.0e2*t'
[]
[stress12]
type = ParsedFunction
expression = '1.0e2*t'
[]
[stress32]
type = ParsedFunction
expression = '1.0e2*t'
[]
[stress31]
type = ParsedFunction
expression = '2.0e2*t'
[]
[stress21]
type = ParsedFunction
expression = '-1.5e2*t'
[]
[]
[BCs]
[Periodic]
[x]
variable = disp_x
auto_direction = 'x y z'
[]
[y]
variable = disp_y
auto_direction = 'x y z'
[]
[z]
variable = disp_z
auto_direction = 'x y z'
[]
[]
[fix1_x]
type = DirichletBC
boundary = "fix_all"
variable = disp_x
value = 0
[]
[fix1_y]
type = DirichletBC
boundary = "fix_all"
variable = disp_y
value = 0
[]
[fix1_z]
type = DirichletBC
boundary = "fix_all"
variable = disp_z
value = 0
[]
[fix2_x]
type = DirichletBC
boundary = "fix_xy"
variable = disp_x
value = 0
[]
[fix2_y]
type = DirichletBC
boundary = "fix_xy"
variable = disp_y
value = 0
[]
[fix3_z]
type = DirichletBC
boundary = "fix_z"
variable = disp_z
value = 0
[]
[]
[Materials]
[elastic_tensor_1]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
block = '1'
[]
[elastic_tensor_2]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 120000.0
poissons_ratio = 0.21
block = '2'
[]
[elastic_tensor_3]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 80000.0
poissons_ratio = 0.4
block = '3'
[]
[elastic_tensor_4]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 76000.0
poissons_ratio = 0.11
block = '4'
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
homogenization_gradient_names = 'homogenization_gradient'
[]
[compute_homogenization_gradient]
type = ComputeHomogenizedLagrangianStrain
[]
[]
[Postprocessors]
[s11]
type = ElementAverageValue
variable = s11
execute_on = 'initial timestep_end'
[]
[s21]
type = ElementAverageValue
variable = s21
execute_on = 'initial timestep_end'
[]
[s31]
type = ElementAverageValue
variable = s31
execute_on = 'initial timestep_end'
[]
[s12]
type = ElementAverageValue
variable = s12
execute_on = 'initial timestep_end'
[]
[s22]
type = ElementAverageValue
variable = s22
execute_on = 'initial timestep_end'
[]
[s32]
type = ElementAverageValue
variable = s32
execute_on = 'initial timestep_end'
[]
[s13]
type = ElementAverageValue
variable = s13
execute_on = 'initial timestep_end'
[]
[s23]
type = ElementAverageValue
variable = s23
execute_on = 'initial timestep_end'
[]
[s33]
type = ElementAverageValue
variable = s33
execute_on = 'initial timestep_end'
[]
[F11]
type = ElementAverageValue
variable = F11
execute_on = 'initial timestep_end'
[]
[F21]
type = ElementAverageValue
variable = F21
execute_on = 'initial timestep_end'
[]
[F31]
type = ElementAverageValue
variable = F31
execute_on = 'initial timestep_end'
[]
[F12]
type = ElementAverageValue
variable = F12
execute_on = 'initial timestep_end'
[]
[F22]
type = ElementAverageValue
variable = F22
execute_on = 'initial timestep_end'
[]
[F32]
type = ElementAverageValue
variable = F32
execute_on = 'initial timestep_end'
[]
[F13]
type = ElementAverageValue
variable = F13
execute_on = 'initial timestep_end'
[]
[F23]
type = ElementAverageValue
variable = F23
execute_on = 'initial timestep_end'
[]
[F33]
type = ElementAverageValue
variable = F33
execute_on = 'initial timestep_end'
[]
[]
[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 = 10
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 1.0
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/stress_update_material_based/linesearch.i)
[GlobalParams]
displacements = 'ux uy uz'
[]
[Mesh]
type = GeneratedMesh
dim = 3
elem_type = HEX8
[]
[AuxVariables]
[fp_zz]
order = CONSTANT
family = MONOMIAL
[]
[e_zz]
order = CONSTANT
family = MONOMIAL
[]
[gss]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[tdisp]
type = ParsedFunction
expression = 0.01*t
[]
[]
[Physics/SolidMechanics/QuasiStatic/all]
strain = FINITE
add_variables = true
generate_output = stress_zz
[]
[AuxKernels]
[fp_zz]
type = RankTwoAux
variable = fp_zz
rank_two_tensor = plastic_deformation_gradient
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[e_zz]
type = RankTwoAux
variable = e_zz
rank_two_tensor = total_lagrangian_strain
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[gss1]
type = MaterialStdVectorAux
variable = gss
property = slip_resistance
index = 0
execute_on = timestep_end
[]
[]
[BCs]
[symmy]
type = DirichletBC
variable = uy
boundary = bottom
value = 0
[]
[symmx]
type = DirichletBC
variable = ux
boundary = left
value = 0
[]
[symmz]
type = DirichletBC
variable = uz
boundary = back
value = 0
[]
[tdisp]
type = FunctionDirichletBC
variable = uz
boundary = front
function = tdisp
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensorCP
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
[]
[stress]
type = ComputeMultipleCrystalPlasticityStress
crystal_plasticity_models = 'trial_xtalpl'
tan_mod_type = exact
maximum_substep_iteration = 200
use_line_search = true
min_line_search_step_size = 0.01
[]
[trial_xtalpl]
type = CrystalPlasticityKalidindiUpdate
number_slip_systems = 12
slip_sys_file_name = input_slip_sys.txt
resistance_tol = 0.01
[]
[]
[Postprocessors]
[stress_zz]
type = ElementAverageValue
variable = stress_zz
[]
[fp_zz]
type = ElementAverageValue
variable = fp_zz
[]
[e_zz]
type = ElementAverageValue
variable = e_zz
[]
[gss]
type = ElementAverageValue
variable = gss
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
dt = 0.05
solve_type = 'PJFNK'
petsc_options_iname = -pc_hypre_type
petsc_options_value = boomerang
nl_abs_tol = 1e-10
nl_rel_step_tol = 1e-10
dtmax = 10.0
nl_rel_tol = 1e-10
end_time = 1
dtmin = 0.02
num_steps = 10
nl_abs_step_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/side_diffusive_flux_integral/side_diffusive_flux_integral.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./right_bc]
# Flux BC for computing the analytical solution in the postprocessor
type = ParsedFunction
expression = exp(y)+1
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = FunctionNeumannBC
variable = u
boundary = right
function = right_bc
[../]
[]
[Materials]
[./mat_props]
type = GenericConstantMaterial
block = 0
prop_names = diffusivity
prop_values = 2
[../]
[./mat_props_bnd]
type = GenericConstantMaterial
boundary = right
prop_names = diffusivity
prop_values = 1
[../]
[./mat_props_vector]
type = GenericConstantVectorMaterial
boundary = 'right top'
prop_names = diffusivity_vec
prop_values = '1 1.5 1'
[../]
[]
[Postprocessors]
inactive = 'avg_flux_top'
[./avg_flux_right]
# Computes -\int(exp(y)+1) from 0 to 1 which is -2.718281828
type = SideDiffusiveFluxIntegral
variable = u
boundary = right
diffusivity = diffusivity
[../]
[./avg_flux_top]
type = SideVectorDiffusivityFluxIntegral
variable = u
boundary = top
diffusivity = diffusivity_vec
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/multiapp_projection_transfer/tosub_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 9
ymin = 0
ymax = 9
nx = 9
ny = 9
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[x]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[x_func]
type = ParsedFunction
expression = x
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[AuxKernels]
[x_func_aux]
type = FunctionAux
variable = x
function = x_func
execute_on = initial
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
[]
[Debug]
# show_actions = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_end
positions = '1 1 0 5 5 0'
input_files = tosub_sub.i
[]
[]
[Transfers]
[tosub]
type = MultiAppProjectionTransfer
to_multi_app = sub
source_variable = u
variable = u_nodal
[]
[elemental_tosub]
type = MultiAppProjectionTransfer
to_multi_app = sub
source_variable = u
variable = u_elemental
[]
[elemental_to_sub_elemental]
type = MultiAppProjectionTransfer
to_multi_app = sub
source_variable = x
variable = x_elemental
[]
[elemental_to_sub_nodal]
type = MultiAppProjectionTransfer
to_multi_app = sub
source_variable = x
variable = x_nodal
[]
[]
(test/tests/executioners/executioner/steady-adapt.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 3
ny = 3
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = -4
[../]
[./exact_fn]
type = ParsedFunction
expression = ((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ffn'
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[./Adaptivity]
steps = 3
coarsen_fraction = 0.1
refine_fraction = 0.2
max_h_level = 5
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_steady_adapt
exodus = true
print_mesh_changed_info = true
[]
(modules/solid_mechanics/test/tests/initial_stress/gravity.i)
# Apply an initial stress that should be
# exactly that caused by gravity, and then
# do a transient step to check that nothing
# happens
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 10
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -10
zmax = 0
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[./weight]
type = BodyForce
variable = disp_z
value = -0.5 # this is density*gravity
[../]
[]
[BCs]
# back = zmin
# front = zmax
# bottom = ymin
# top = ymax
# left = xmin
# right = xmax
[./x]
type = DirichletBC
variable = disp_x
boundary = 'left right'
value = 0
[../]
[./y]
type = DirichletBC
variable = disp_y
boundary = 'bottom top'
value = 0
[../]
[./z]
type = DirichletBC
variable = disp_z
boundary = 'back'
value = 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
[../]
[]
[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
[../]
[]
[Functions]
[./weight]
type = ParsedFunction
expression = '0.5*z' # initial stress that should result from the weight force
[../]
[./kxx]
type = ParsedFunction
expression = '0.4*z' # some arbitrary xx and yy stress that should not affect the result
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1
poissons_ratio = 0.25
[../]
[./strain]
type = ComputeSmallStrain
eigenstrain_names = ini_stress
[../]
[./strain_from_initial_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = 'kxx 0 0 0 kxx 0 0 0 weight'
eigenstrain_name = ini_stress
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
end_time = 1.0
dt = 1.0
solve_type = NEWTON
type = Transient
nl_abs_tol = 1E-8
nl_rel_tol = 1E-12
l_tol = 1E-3
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
file_base = gravity
exodus = true
[]
(test/tests/actions/add_auxkernel_action/flux_average.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[flux]
order = CONSTANT
family = MONOMIAL
[AuxKernel]
type = FluxAverageAux
coupled = u
diffusivity = 0.1
boundary = right
[]
[]
[]
[Functions]
[bc_func]
type = ParsedFunction
expression = y+1
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[]
[AuxKernels]
[flux_average]
type = FluxAverageAux
variable = flux
coupled = u
diffusivity = 0.1
boundary = right
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = FunctionDirichletBC
variable = u
boundary = right
function = bc_func
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/user_object_based/save_euler.i)
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
displacements = 'disp_x disp_y'
nx = 2
ny = 2
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[GlobalParams]
volumetric_locking_correction = true
[]
[AuxVariables]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./e_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./fp_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./gss]
order = CONSTANT
family = MONOMIAL
[../]
[./euler1]
order = CONSTANT
family = MONOMIAL
[../]
[./euler2]
order = CONSTANT
family = MONOMIAL
[../]
[./euler3]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./tdisp]
type = ParsedFunction
expression = 0.01*t
[../]
[]
[UserObjects]
[./prop_read]
type = PropertyReadFile
prop_file_name = 'euler_ang_file.txt'
# Enter file data as prop#1, prop#2, .., prop#nprop
nprop = 3
read_type = element
[../]
[]
[AuxKernels]
[./stress_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = stress
index_j = 1
index_i = 1
execute_on = timestep_end
[../]
[./e_yy]
type = RankTwoAux
variable = e_yy
rank_two_tensor = lage
index_j = 1
index_i = 1
execute_on = timestep_end
[../]
[./fp_yy]
type = RankTwoAux
variable = fp_yy
rank_two_tensor = fp
index_j = 1
index_i = 1
execute_on = timestep_end
[../]
[./gss]
type = MaterialStdVectorAux
variable = gss
property = state_var_gss
index = 0
execute_on = timestep_end
[../]
[./euler1]
type = MaterialRealVectorValueAux
variable = euler1
property = Euler_angles
component = 0
execute_on = timestep_end
[../]
[./euler2]
type = MaterialRealVectorValueAux
variable = euler2
property = Euler_angles
component = 1
execute_on = timestep_end
[../]
[./euler3]
type = MaterialRealVectorValueAux
variable = euler3
property = Euler_angles
component = 2
execute_on = timestep_end
[../]
[]
[BCs]
[./fix_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0
[../]
[./fix_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./tdisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = tdisp
[../]
[]
[UserObjects]
[./slip_rate_gss]
type = CrystalPlasticitySlipRateGSS
variable_size = 12
slip_sys_file_name = input_slip_sys.txt
num_slip_sys_flowrate_props = 2
flowprops = '1 4 0.001 0.1 5 8 0.001 0.1 9 12 0.001 0.1'
uo_state_var_name = state_var_gss
[../]
[./slip_resistance_gss]
type = CrystalPlasticitySlipResistanceGSS
variable_size = 12
uo_state_var_name = state_var_gss
[../]
[./state_var_gss]
type = CrystalPlasticityStateVariable
variable_size = 12
groups = '0 4 8 12'
group_values = '60.8 60.8 60.8'
uo_state_var_evol_rate_comp_name = state_var_evol_rate_comp_gss
scale_factor = 1.0
[../]
[./state_var_evol_rate_comp_gss]
type = CrystalPlasticityStateVarRateComponentGSS
variable_size = 12
hprops = '1.0 541.5 109.8 2.5'
uo_slip_rate_name = slip_rate_gss
uo_state_var_name = state_var_gss
[../]
[]
[Materials]
[./crysp]
type = FiniteStrainUObasedCP
stol = 1e-2
tan_mod_type = exact
uo_slip_rates = 'slip_rate_gss'
uo_slip_resistances = 'slip_resistance_gss'
uo_state_vars = 'state_var_gss'
uo_state_var_evol_rate_comps = 'state_var_evol_rate_comp_gss'
[../]
[./strain]
type = ComputeFiniteStrain
displacements = 'disp_x disp_y'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensorCP
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
read_prop_user_object = prop_read
[../]
[]
[Postprocessors]
[./stress_yy]
type = ElementAverageValue
variable = stress_yy
[../]
[./e_yy]
type = ElementAverageValue
variable = e_yy
[../]
[./fp_yy]
type = ElementAverageValue
variable = fp_yy
[../]
[./gss]
type = ElementAverageValue
variable = gss
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
dt = 0.01
solve_type = 'PJFNK'
petsc_options_iname = -pc_hypre_type
petsc_options_value = boomerang
nl_abs_tol = 1e-10
nl_rel_step_tol = 1e-10
dtmax = 10.0
nl_rel_tol = 1e-10
end_time = 1
dtmin = 0.01
num_steps = 10
nl_abs_step_tol = 1e-10
[]
[Outputs]
exodus = true
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y'
use_displaced_mesh = true
[../]
[]
(modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialMultiphase_AD.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = -20
xmax = 20
ymin = -20
ymax = 20
[]
[GlobalParams]
op_num = 2
var_name_base = etab
[]
[Variables]
[w]
[]
[etaa0]
[]
[etab0]
[]
[etab1]
[]
[]
[AuxVariables]
[bnds]
order = FIRST
family = LAGRANGE
[]
[]
[ICs]
[IC_etaa0]
type = FunctionIC
variable = etaa0
function = ic_func_etaa0
[]
[IC_etab0]
type = FunctionIC
variable = etab0
function = ic_func_etab0
[]
[IC_etab1]
type = FunctionIC
variable = etab1
function = ic_func_etab1
[]
[IC_w]
type = ConstantIC
value = -0.05
variable = w
[]
[]
[Functions]
[ic_func_etaa0]
type = ADParsedFunction
value = 'r:=sqrt(x^2+y^2);0.5*(1.0-tanh((r-10.0)/sqrt(2.0)))'
[]
[ic_func_etab0]
type = ADParsedFunction
value = 'r:=sqrt(x^2+y^2);0.5*(1.0+tanh((r-10)/sqrt(2.0)))*0.5*(1.0+tanh((y)/sqrt(2.0)))'
[]
[ic_func_etab1]
type = ADParsedFunction
value = 'r:=sqrt(x^2+y^2);0.5*(1.0+tanh((r-10)/sqrt(2.0)))*0.5*(1.0-tanh((y)/sqrt(2.0)))'
[]
[]
[BCs]
[]
[Kernels]
# Order parameter eta_alpha0
[ACa0_bulk]
type = ADACGrGrMulti
variable = etaa0
v = 'etab0 etab1'
gamma_names = 'gab gab'
[]
[ACa0_sw]
type = ADACSwitching
variable = etaa0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
[]
[ACa0_int]
type = ADACInterface
variable = etaa0
kappa_name = kappa
variable_L = false
[]
[ea0_dot]
type = ADTimeDerivative
variable = etaa0
[]
# Order parameter eta_beta0
[ACb0_bulk]
type = ADACGrGrMulti
variable = etab0
v = 'etaa0 etab1'
gamma_names = 'gab gbb'
[]
[ACb0_sw]
type = ADACSwitching
variable = etab0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
[]
[ACb0_int]
type = ADACInterface
variable = etab0
kappa_name = kappa
variable_L = false
[]
[eb0_dot]
type = ADTimeDerivative
variable = etab0
[]
# Order parameter eta_beta1
[ACb1_bulk]
type = ADACGrGrMulti
variable = etab1
v = 'etaa0 etab0'
gamma_names = 'gab gbb'
[]
[ACb1_sw]
type = ADACSwitching
variable = etab1
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
[]
[ACb1_int]
type = ADACInterface
variable = etab1
kappa_name = kappa
variable_L = false
[]
[eb1_dot]
type = ADTimeDerivative
variable = etab1
[]
#Chemical potential
[w_dot]
type = ADSusceptibilityTimeDerivative
variable = w
f_name = chi
[]
[Diffusion]
type = ADMatDiffusion
variable = w
diffusivity = Dchi
[]
[coupled_etaa0dot]
type = ADCoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
args = 'etaa0 etab0 etab1'
[]
[coupled_etab0dot]
type = ADCoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
args = 'etaa0 etab0 etab1'
[]
[coupled_etab1dot]
type = ADCoupledSwitchingTimeDerivative
variable = w
v = etab1
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
args = 'etaa0 etab0 etab1'
[]
[]
[AuxKernels]
[BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[]
[]
# enable_jit set to false in many materials to make this test start up faster.
# It is recommended to set enable_jit = true or just remove these lines for
# production runs with this model
[Materials]
[ha]
type = ADSwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0 etab1'
phase_etas = 'etaa0'
[]
[hb]
type = ADSwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0 etab1'
phase_etas = 'etab0 etab1'
[]
[omegaa]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
derivative_order = 2
[]
[omegab]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = omegab
material_property_names = 'Vm kb cbeq'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
derivative_order = 2
[]
[rhoa]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
derivative_order = 2
[]
[rhob]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
derivative_order = 2
[]
[const]
type = ADGenericConstantMaterial
prop_names = 'kappa_c kappa L D chi Vm ka caeq kb cbeq gab gbb mu'
prop_values = '0 1 1.0 1.0 1.0 1.0 10.0 0.1 10.0 0.9 4.5 1.5 1.0'
[]
[Mobility]
type = ADDerivativeParsedMaterial
f_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
derivative_order = 2
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type '
petsc_options_value = 'lu '
l_tol = 1.0e-3
nl_rel_tol = 1.0e-8
nl_abs_tol = 1e-8
num_steps = 2
[TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.1
[]
[]
[Outputs]
exodus = true
file_base = GrandPotentialMultiphase_out
[]
(test/tests/mesh/adapt/initial_adaptivity_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = x*x+y*y
[../]
[./ffn]
type = ParsedFunction
expression = -4
[../]
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = -2
y1 = -2
x2 = 0
y2 = 2
inside = 1
outside = 0
[../]
[../]
[]
[Kernels]
[./udiff]
type = Diffusion
variable = u
[../]
[./forcing_fn]
type = BodyForce
variable = u
function = ffn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[./Adaptivity]
initial_adaptivity = 5
refine_fraction = 0.2
coarsen_fraction = 0.3
max_h_level = 4
[../]
[]
[Outputs]
exodus = true
[]
(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/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
[]
(test/tests/mortar/continuity-2d-non-conforming/sequencing-stateful-soln-continuity.i)
[Mesh]
second_order = true
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[./primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[../]
[./secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[../]
[]
[Variables]
[./T]
block = '1 2'
order = SECOND
[../]
[./lambda]
block = '10'
[../]
[]
[AuxVariables]
[ssm]
order = CONSTANT
family = MONOMIAL
block = '1 2'
[]
[]
[BCs]
[./neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln
variable = T
boundary = '3 4 5 6 7 8'
[../]
[]
[Kernels]
[./conduction]
type = Diffusion
variable = T
block = '1 2'
[../]
[./sink]
type = Reaction
variable = T
block = '1 2'
[../]
[./forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[../]
[]
[AuxKernels]
[ssm]
type = MaterialRealAux
variable = ssm
property = diffusivity
block = '1 2'
[]
[]
[Materials]
[./ssm]
type = SpatialStatefulMaterial
block = '1 2'
[../]
[]
[Functions]
[./forcing_function]
type = ParsedFunction
expression= '-4 + x^2 + y^2'
[../]
[./exact_soln]
type = ParsedFunction
expression= 'x^2 + y^2'
[../]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[./mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Steady
nl_abs_tol = 1e-12
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
num_grids = 2
[]
[Outputs]
exodus = true
[]
[Adaptivity]
steps = 1
marker = uniform
[Markers]
[uniform]
type = UniformMarker
mark = refine
[]
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/velocity_channel/velocity_inletBC_by_parts.i)
# This input file tests outflow boundary conditions for the incompressible NS equations.
[GlobalParams]
gravity = '0 0 0'
integrate_p_by_parts = true
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 3.0
ymin = 0
ymax = 1.0
nx = 30
ny = 10
elem_type = QUAD9
[]
[Variables]
[./vel_x]
order = SECOND
family = LAGRANGE
[../]
[./vel_y]
order = SECOND
family = LAGRANGE
[../]
[./p]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./mass]
type = INSMass
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[BCs]
[./x_no_slip]
type = DirichletBC
variable = vel_x
boundary = 'top bottom'
value = 0.0
[../]
[./y_no_slip]
type = DirichletBC
variable = vel_y
boundary = 'left top bottom'
value = 0.0
[../]
[./x_inlet]
type = FunctionDirichletBC
variable = vel_x
boundary = 'left'
function = 'inlet_func'
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = NEWTON
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-ksp_gmres_restart -pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = '300 bjacobi ilu 4'
line_search = none
nl_rel_tol = 1e-12
nl_max_its = 6
l_tol = 1e-6
l_max_its = 300
[]
[Outputs]
[./out]
type = Exodus
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * (y - 0.5)^2 + 1'
[../]
[]
(modules/thermal_hydraulics/test/tests/misc/surrogate_power_profile/power_profile.i)
# This input file generates an Exodus output file with a surrogate power profile
# that is used in the RELAP-7 run. There is dummy diffusion solve to step through
# the simulation. The power profile (given as power density) is generated via
# aux variable
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0.020652
xmax = 0.024748
ymin = 0
ymax = 3.865
nx = 5
ny = 20
[]
[Variables]
[u]
[]
[]
[Kernels]
[td]
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 = 0
[]
[]
[Functions]
[power_density_fn]
type = ParsedFunction
expression = 'sin(y/3.865*pi)*sin((x-0.020652)/4.096e-3*pi/2.)*10e7*t'
[]
[]
[AuxVariables]
[power_density]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[pd_aux]
type = FunctionAux
variable = power_density
function = power_density_fn
[]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 0.1
dt = 0.01
abort_on_solve_fail = true
[]
[Outputs]
[expdus]
type = Exodus
file_base = power_profile
[]
[]
(modules/xfem/test/tests/moving_interface/verification/1D_xy_lsdep1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: quasi-1D
# Coordinate System: xy
# Material Numbers/Types: level set dep 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# A simple transient heat transfer problem in Cartesian coordinates designed
# with the Method of Manufactured Solutions. This problem was developed to
# verify XFEM performance in the presence of a moving interface for linear
# element models that can be exactly evaluated by FEM/Moose. Both the
# temperature solution and level set function are designed to be linear to
# attempt to minimize error between the Moose/exact solution and XFEM results.
# Thermal conductivity is dependent upon the value of the level set function
# at each timestep.
# Results:
# The temperature at the left boundary (x=0) exhibits the largest difference
# between the FEM/Moose solution and XFEM results. We present the XFEM
# results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 479.9999722
# 0.6 520 519.9998726
# 0.8 560 559.9997314
# 1.0 600 599.9996885
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 1
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 0.5
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = 'rhoCp*(-200*x+200)-(0.05*200*t/1.04)'
symbol_names = 'rhoCp'
symbol_values = 10
[../]
[./neumann_func]
type = ParsedFunction
expression = '((0.05/1.04)*(1-(x-0.04)-0.2*t) + 1.5)*200*t'
[../]
[./k_func]
type = ParsedFunction
expression = '(0.05/1.04)*(1-(x-0.04)-0.2*t) + 1.5'
[../]
[./ls_func]
type = ParsedFunction
expression = '1.04 - x - 0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericFunctionMaterial
prop_names = 'diffusion_coefficient'
prop_values = 'k_func'
[../]
[]
[BCs]
[./left_u]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 'right'
value = 400
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/chemical_reactions/examples/calcium_bicarbonate/calcium_bicarbonate.i)
# Example of reactive transport model with precipitation and dissolution.
# Calcium (ca2) and bicarbonate (hco3) reaction to form calcite (CaCO3).
# Models bicarbonate injection following calcium injection, so that a
# moving reaction front forms a calcite precipitation zone. As the front moves,
# the upstream side of the front continues to form calcite via precipitation,
# while at the downstream side, dissolution of the solid calcite occurs.
#
# The reaction network considered is as follows:
# Aqueous equilibrium reactions:
# a) h+ + hco3- = CO2(aq), Keq = 10^(6.341)
# b) hco3- = h+ + CO23-, Keq = 10^(-10.325)
# c) ca2+ + hco3- = h+ + CaCO3(aq), Keq = 10^(-7.009)
# d) ca2+ + hco3- = cahco3+, Keq = 10^(-0.653)
# e) ca2+ = h+ + CaOh+, Keq = 10^(-12.85)
# f) - h+ = oh-, Keq = 10^(-13.991)
#
# Kinetic reactions
# g) ca2+ + hco3- = h+ + CaCO3(s), A = 0.461 m^2/L, k = 6.456542e-2 mol/m^2 s,
# Keq = 10^(1.8487)
#
# The primary chemical species are h+, hco3- and ca2+. The pressure gradient is fixed,
# and a conservative tracer is also included.
#
# This example is taken from:
# Guo et al, A parallel, fully coupled, fully implicit solution to reactive
# transport in porous media using the preconditioned Jacobian-Free Newton-Krylov
# Method, Advances in Water Resources, 53, 101-108 (2013).
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
xmax = 1
ymax = 0.25
[]
[Variables]
[./tracer]
[../]
[./ca2+]
[../]
[./h+]
initial_condition = 1.0e-7
scaling = 1e6
[../]
[./hco3-]
[../]
[]
[AuxVariables]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./pressure_ic]
type = FunctionIC
variable = pressure
function = pic
[../]
[./hco3_ic]
type = BoundingBoxIC
variable = hco3-
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 0.25
inside = 5.0e-2
outside = 1.0e-6
[../]
[./ca2_ic]
type = BoundingBoxIC
variable = ca2+
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 0.25
inside = 1.0e-6
outside = 5.0e-2
[../]
[./tracer_ic]
type = BoundingBoxIC
variable = tracer
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 0.25
inside = 1.0
outside = 0.0
[../]
[]
[Functions]
[./pic]
type = ParsedFunction
expression = 60-50*x
[../]
[]
[ReactionNetwork]
[./AqueousEquilibriumReactions]
primary_species = 'ca2+ hco3- h+'
secondary_species = 'co2_aq co32- caco3_aq cahco3+ caoh+ oh-'
pressure = pressure
reactions = 'h+ + hco3- = co2_aq 6.341,
hco3- - h+ = co32- -10.325,
ca2+ + hco3- - h+ = caco3_aq -7.009,
ca2+ + hco3- = cahco3+ -0.653,
ca2+ - h+ = caoh+ -12.85,
- h+ = oh- -13.991'
[../]
[./SolidKineticReactions]
primary_species = 'ca2+ hco3- h+'
kin_reactions = 'ca2+ + hco3- - h+ = caco3_s'
secondary_species = caco3_s
log10_keq = 1.8487
reference_temperature = 298.15
system_temperature = 298.15
gas_constant = 8.314
specific_reactive_surface_area = 4.61e-4
kinetic_rate_constant = 6.456542e-7
activation_energy = 1.5e4
[../]
[]
[Kernels]
[./tracer_ie]
type = PrimaryTimeDerivative
variable = tracer
[../]
[./tracer_pd]
type = PrimaryDiffusion
variable = tracer
[../]
[./tracer_conv]
type = PrimaryConvection
variable = tracer
p = pressure
[../]
[./ca2+_ie]
type = PrimaryTimeDerivative
variable = ca2+
[../]
[./ca2+_pd]
type = PrimaryDiffusion
variable = ca2+
[../]
[./ca2+_conv]
type = PrimaryConvection
variable = ca2+
p = pressure
[../]
[./h+_ie]
type = PrimaryTimeDerivative
variable = h+
[../]
[./h+_pd]
type = PrimaryDiffusion
variable = h+
[../]
[./h+_conv]
type = PrimaryConvection
variable = h+
p = pressure
[../]
[./hco3-_ie]
type = PrimaryTimeDerivative
variable = hco3-
[../]
[./hco3-_pd]
type = PrimaryDiffusion
variable = hco3-
[../]
[./hco3-_conv]
type = PrimaryConvection
variable = hco3-
p = pressure
[../]
[]
[BCs]
[./tracer_left]
type = DirichletBC
variable = tracer
boundary = left
value = 1.0
[../]
[./tracer_right]
type = ChemicalOutFlowBC
variable = tracer
boundary = right
[../]
[./ca2+_left]
type = SinDirichletBC
variable = ca2+
boundary = left
initial = 5.0e-2
final = 1.0e-6
duration = 1
[../]
[./ca2+_right]
type = ChemicalOutFlowBC
variable = ca2+
boundary = right
[../]
[./hco3-_left]
type = SinDirichletBC
variable = hco3-
boundary = left
initial = 1.0e-6
final = 5.0e-2
duration = 1
[../]
[./hco3-_right]
type = ChemicalOutFlowBC
variable = hco3-
boundary = right
[../]
[./h+_left]
type = DirichletBC
variable = h+
boundary = left
value = 1.0e-7
[../]
[./h+_right]
type = ChemicalOutFlowBC
variable = h+
boundary = right
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-7 2e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
l_max_its = 50
l_tol = 1e-5
nl_max_its = 10
nl_rel_tol = 1e-5
end_time = 10
[./TimeStepper]
type = ConstantDT
dt = 0.1
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Outputs]
perf_graph = true
exodus = true
[]
(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
[]
(test/tests/postprocessors/element_integral_var_pps/pps_old_value_fv.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 4
ny = 4
elem_type = QUAD4
[]
[Variables]
[./u]
order = CONSTANT
family = MONOMIAL
fv = true
initial_condition = 1
[../]
[]
[Functions]
[./force_fn]
type = ParsedFunction
expression = '1'
[../]
[./exact_fn]
type = ParsedFunction
expression = 't'
[../]
[]
[FVKernels]
[./diff_u]
type = FVDiffusion
variable = u
coeff = '1'
block = '0'
[../]
[./ffn_u]
type = FVBodyForce
variable = u
function = force_fn
[../]
[]
[FVBCs]
[./all_u]
type = FVFunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./a]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = 'initial timestep_end'
[../]
[./total_a]
type = TimeIntegratedPostprocessor
value = a
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/time_steppers/timesequence_stepper/timesequence_restart3.i)
[Mesh]
file = timesequence_restart1_cp/0002-mesh.cpr
[]
[Problem]
restart_file_base = timesequence_restart1_cp/0002
# There is an initial conditions overwriting the restart on the nonlinear variable u
# As you can see in the gold file, this makes the initial step output be from the
# initial condition
allow_initial_conditions_with_restart = true
[]
[Functions]
[exact_fn]
type = ParsedFunction
expression = t*t*(x*x+y*y)
[]
[forcing_fn]
type = ParsedFunction
expression = 2*t*(x*x+y*y)-4*t*t
[]
[]
[Variables]
[u]
family = LAGRANGE
order = SECOND
[]
[]
[ICs]
[u_var]
type = FunctionIC
variable = u
function = exact_fn
[]
[]
[Kernels]
[td]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[]
[]
[Executioner]
type = Transient
end_time = 4.5
[TimeStepper]
type = TimeSequenceStepper
time_sequence = '0 0.85 1.3 1.9 2 4 4.5'
[]
[]
[Outputs]
exodus = true
[]
(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
[]
(test/tests/multiapps/picard/function_dt_sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 1
nx = 10
[]
[Functions]
[./u_fn]
type = ParsedFunction
expression = t*x
[../]
[./ffn]
type = ParsedFunction
expression = x
[../]
[./dts]
type = PiecewiseLinear
x = '0.1 10'
y = '0.1 10'
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[./fn]
type = BodyForce
variable = u
function = ffn
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = FunctionDirichletBC
variable = u
boundary = right
function = u_fn
[../]
[]
[Executioner]
type = Transient
dt = 0.1
solve_type = 'PJFNK'
nl_abs_tol = 1e-10
start_time = 0
num_steps = 3
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/element_h1_error_pps/element_h1_error_pp_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 3
xmin = 0
xmax = 2
ymin = 0
ymax = 2
[]
[Variables]
active = 'u'
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Functions]
active = 'forcing_func u_func'
[forcing_func]
type = ParsedFunction
expression = alpha*alpha*pi*pi*sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '4'
[]
[u_func]
type = ParsedGradFunction
expression = sin(alpha*pi*x)
grad_x = alpha*pi*cos(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '4'
[]
[]
[Kernels]
active = 'diff forcing'
[diff]
type = Diffusion
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = forcing_func
[]
[]
[BCs]
active = 'left right'
[left]
type = DirichletBC
variable = u
boundary = '1'
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = '3'
value = 0
[]
[]
[Executioner]
type = Steady
[Adaptivity]
refine_fraction = 1.0
coarsen_fraction = 0.0
max_h_level = 10
steps = 4
[]
[]
[Postprocessors]
[dofs]
type = NumDOFs
execute_on = 'initial timestep_end'
[]
[h1_error]
type = ElementH1Error
variable = u
function = u_func
execute_on = 'initial timestep_end'
[]
[h1_semi]
type = ElementH1SemiError
variable = u
function = u_func
execute_on = 'initial timestep_end'
[]
[l2_error]
type = ElementL2Error
variable = u
function = u_func
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
file_base = out
exodus = false
csv = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/scalar_kernel/2drow.i)
# 2D with mixed conditions on stress/strain
[GlobalParams]
displacements = 'disp_x disp_y'
large_kinematics = false
[]
[Mesh]
[base]
type = FileMeshGenerator
file = '2d.exo'
[]
[sidesets]
type = SideSetsFromNormalsGenerator
input = base
normals = '-1 0 0
1 0 0
0 -1 0
0 1 0'
fixed_normal = true
new_boundary = 'left right bottom top'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[hvar]
family = SCALAR
order = FIRST
[]
[hvarA]
family = SCALAR
order = SECOND
[]
[]
[AuxVariables]
[sxx]
family = MONOMIAL
order = CONSTANT
[]
[syy]
family = MONOMIAL
order = CONSTANT
[]
[sxy]
family = MONOMIAL
order = CONSTANT
[]
[exx]
family = MONOMIAL
order = CONSTANT
[]
[eyy]
family = MONOMIAL
order = CONSTANT
[]
[exy]
family = MONOMIAL
order = CONSTANT
[]
[]
[Kernels]
[sdx]
type = HomogenizedTotalLagrangianStressDivergenceR
variable = disp_x
component = 0
macro_var = hvar
macro_other = hvarA
prime_scalar = 0
compute_field_residuals = true
compute_scalar_residuals = false
constraint_types = ${constraint_types}
targets = ${targets}
[]
[sdy]
type = HomogenizedTotalLagrangianStressDivergenceR
variable = disp_y
component = 1
macro_var = hvar
macro_other = hvarA
prime_scalar = 0
compute_field_residuals = true
compute_scalar_residuals = false
constraint_types = ${constraint_types}
targets = ${targets}
[]
[sd0]
type = HomogenizedTotalLagrangianStressDivergenceR
variable = disp_x
component = 0
macro_var = hvar
macro_other = hvarA
prime_scalar = 0
compute_field_residuals = false
compute_scalar_residuals = true
constraint_types = ${constraint_types}
targets = ${targets}
[]
[sd1]
type = HomogenizedTotalLagrangianStressDivergenceR
variable = disp_y
component = 1
macro_var = hvarA
macro_other = hvar
prime_scalar = 1
compute_field_residuals = false
compute_scalar_residuals = true
constraint_types = ${constraint_types}
targets = ${targets}
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[AuxKernels]
[sxx]
type = RankTwoAux
variable = sxx
rank_two_tensor = pk1_stress
index_i = 0
index_j = 0
[]
[syy]
type = RankTwoAux
variable = syy
rank_two_tensor = pk1_stress
index_i = 1
index_j = 1
[]
[sxy]
type = RankTwoAux
variable = sxy
rank_two_tensor = pk1_stress
index_i = 0
index_j = 1
[]
[exx]
type = RankTwoAux
variable = exx
rank_two_tensor = mechanical_strain
index_i = 0
index_j = 0
[]
[eyy]
type = RankTwoAux
variable = eyy
rank_two_tensor = mechanical_strain
index_i = 1
index_j = 1
[]
[exy]
type = RankTwoAux
variable = exy
rank_two_tensor = mechanical_strain
index_i = 0
index_j = 1
[]
[]
[Functions]
[strain11]
type = ParsedFunction
value = '4.0e-2*t'
[]
[strain22]
type = ParsedFunction
value = '-2.0e-2*t'
[]
[strain12]
type = ParsedFunction
value = '1.0e-2*t'
[]
[stress11]
type = ParsedFunction
value = '400*t'
[]
[stress22]
type = ParsedFunction
value = '-200*t'
[]
[stress12]
type = ParsedFunction
value = '100*t'
[]
[]
[BCs]
[Periodic]
[x]
variable = disp_x
auto_direction = 'x y'
[]
[y]
variable = disp_y
auto_direction = 'x y'
[]
[]
[fix1_x]
type = DirichletBC
boundary = "fix1"
variable = disp_x
value = 0
[]
[fix1_y]
type = DirichletBC
boundary = "fix1"
variable = disp_y
value = 0
[]
[fix2_y]
type = DirichletBC
boundary = "fix2"
variable = disp_y
value = 0
[]
[]
[Materials]
[elastic_tensor_1]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
block = '1'
[]
[elastic_tensor_2]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 120000.0
poissons_ratio = 0.21
block = '2'
[]
[elastic_tensor_3]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 80000.0
poissons_ratio = 0.4
block = '3'
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
homogenization_gradient_names = 'homogenization_gradient'
[]
[compute_homogenization_gradient]
type = ComputeHomogenizedLagrangianStrainA
macro_gradientA = hvar
macro_gradient = hvarA
constraint_types = ${constraint_types}
targets = ${targets}
[]
[]
[Postprocessors]
[sxx]
type = ElementAverageValue
variable = sxx
execute_on = 'initial timestep_end'
[]
[syy]
type = ElementAverageValue
variable = syy
execute_on = 'initial timestep_end'
[]
[sxy]
type = ElementAverageValue
variable = sxy
execute_on = 'initial timestep_end'
[]
[exx]
type = ElementAverageValue
variable = exx
execute_on = 'initial timestep_end'
[]
[eyy]
type = ElementAverageValue
variable = eyy
execute_on = 'initial timestep_end'
[]
[exy]
type = ElementAverageValue
variable = exy
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
solve_type = 'newton'
# solve_type = 'PJFNK'
line_search = none
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 2
l_tol = 1e-14
nl_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 1.0
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/action/action_1D.i)
# Simple 1D plane strain test
[GlobalParams]
displacements = 'disp_x'
large_kinematics = true
[]
[Variables]
[disp_x]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 1
nx = 10
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = FINITE
add_variables = true
new_system = true
formulation = UPDATED
volumetric_locking_correction = false
[]
[]
[]
[]
[Functions]
[pull]
type = ParsedFunction
expression = '0.06 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = right
variable = disp_x
value = 0.0
[]
[pull]
type = FunctionDirichletBC
boundary = left
variable = disp_x
function = pull
preset = true
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[stress_base]
type = ComputeLagrangianLinearElasticStress
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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 = 5.0
[]
[Outputs]
exodus = 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
[]
[]
(test/tests/materials/functor_conversion/conversion.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
initial_condition = 2
[]
[]
[AuxVariables]
[v]
order = FIRST
family = MONOMIAL
initial_condition = 3
[]
[]
[Functions]
[f1]
type = ParsedFunction
expression = '2 + x'
[]
[]
[FunctorMaterials]
[block0]
type = GenericFunctorMaterial
block = '0'
prop_names = 'D D_block0'
prop_values = '4 3'
[]
[block1]
type = GenericFunctorMaterial
block = '1'
prop_names = 'D'
prop_values = '2'
[]
[]
[Materials]
[convert_to_reg]
type = MaterialFunctorConverter
functors_in = 'D f1 u v'
reg_props_out = 'm1 m2 m3 m4'
outputs = 'exo'
[]
[convert_to_ad]
type = MaterialFunctorConverter
functors_in = 'D f1 u v'
ad_props_out = 'm1a m2a m3a m4a'
outputs = 'exo'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Problem]
solve = false
[]
[Outputs]
[exo]
type = Exodus
hide = 'u v'
[]
[]
(test/tests/kernels/vector_fe/lagrange_vec_1d.i)
# This example reproduces the libmesh vector_fe example 1 results
[Mesh]
type = GeneratedMesh
dim = 1
nx = 15
xmin = -1
elem_type = EDGE3
[]
[Variables]
[./u]
family = LAGRANGE_VEC
order = SECOND
[../]
[]
[Kernels]
[./diff]
type = VectorDiffusion
variable = u
[../]
[./body_force]
type = VectorBodyForce
variable = u
function_x = 'ffx'
[../]
[]
[BCs]
[./bnd]
type = VectorFunctionDirichletBC
variable = u
function_x = 'x_exact_sln'
boundary = 'left right'
[../]
[]
[Functions]
[./x_exact_sln]
type = ParsedFunction
expression = 'cos(.5*pi*x)'
[../]
[./ffx]
type = ParsedFunction
expression = '.25*pi*pi*cos(.5*pi*x)'
[../]
[]
[Preconditioning]
[./pre]
type = SMP
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(modules/xfem/test/tests/moving_interface/verification/2D_rz_homog1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: 2D
# Coordinate System: rz
# Material Numbers/Types: homogeneous 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# Transient 2D heat transfer problem in cylindrical coordinates designed with
# the Method of Manufactured Solutions. This problem was developed to verify
# XFEM performance on linear elements in the presence of a moving interface
# sweeping across the x-y coordinates of a system with homogeneous material
# properties. This problem can be exactly evaluated by FEM/Moose without the
# moving interface. Both the temperature and level set function are designed
# to be linear to attempt to minimize error between the Moose/exact solution
# and XFEM results.
# Results:
# The temperature at the bottom left boundary (x=1, y=1) exhibits the largest
# difference between the FEM/Moose solution and XFEM results. We present the
# XFEM results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 479.9998745
# 0.6 520 519.9995067
# 0.8 560 559.9989409
# 1.0 600 599.9987054
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 1.0
xmax = 2.0
ymin = 1.0
ymax = 2.0
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraints]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-100*x-100*y+400) + 100*1.5*t/x'
[../]
[./neumann_func]
type = ParsedFunction
expression = '1.5*100*t'
[../]
[./dirichlet_right_func]
type = ParsedFunction
expression = '(-100*y+200)*t+400'
[../]
[./dirichlet_top_func]
type = ParsedFunction
expression = '(-100*x+200)*t+400'
[../]
[./ls_func]
type = ParsedFunction
expression = '-0.5*(x+y) + 2.04 - 0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericConstantMaterial
prop_names = 'diffusion_coefficient'
prop_values = 1.5
[../]
[]
[BCs]
[./left_du]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = FunctionDirichletBC
variable = u
boundary = 'right'
function = dirichlet_right_func
[../]
[./bottom_du]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = neumann_func
[../]
[./top_u]
type = FunctionDirichletBC
variable = u
boundary = 'top'
function = dirichlet_top_func
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/outputs/residual/output_residual_test.i)
[Mesh]
file = sq-2blk.e
uniform_refine = 3
[]
[Variables]
# variable in the whole domain
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
# subdomain restricted variable
[./v]
order = FIRST
family = LAGRANGE
block = '1'
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[./exact_fn_v]
type = ParsedFunction
expression = t+1
[../]
[]
[Kernels]
[./ie_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = forcing_fn
[../]
[./ie_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '1 2 3 4'
function = exact_fn
[../]
[./bottom_v]
type = DirichletBC
variable = v
boundary = 5
value = 0
[../]
[./top_v]
type = FunctionDirichletBC
variable = v
boundary = 6
function = exact_fn_v
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out
exodus = true
[]
[Debug]
show_var_residual = 'u v'
show_var_residual_norms = true
[]
(modules/optimization/examples/simpleTransient/forward_mesh.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin = -1
xmax = 1
ymin = -1
ymax = 1
[]
[]
[Variables]
[u]
[]
[]
[ICs]
[initial]
type = FunctionIC
variable = u
function = exact
[]
[]
[Kernels]
[dt]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[src]
type = BodyForce
variable = u
function = source
[]
[]
[BCs]
[dirichlet]
type = DirichletBC
variable = u
boundary = 'left right top bottom'
value = 0
[]
[]
[Functions]
[exact]
type = ParsedFunction
value = '2*exp(-2.0*(x - sin(2*pi*t))^2)*exp(-2.0*(y - cos(2*pi*t))^2)*cos((1/2)*x*pi)*cos((1/2)*y*pi)/pi'
[]
[source]
type = ParameterMeshFunction
exodus_mesh = source_mesh_in.e
time_name = src_values/time
parameter_name = src_values/values
[]
[]
[Executioner]
type = Transient
num_steps = 100
end_time = 1
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Reporters]
[measured_data]
type = OptimizationData
measurement_file = mms_data.csv
file_xcoord = x
file_ycoord = y
file_zcoord = z
file_time = t
file_value = u
variable = u
execute_on = timestep_end
outputs = csv
[]
[src_values]
type = ConstantReporter
real_vector_names = 'time values'
real_vector_values = '0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0;
0' # dummy
[]
[]
[AuxVariables/source]
[]
[AuxKernels]
[source_aux]
type = FunctionAux
variable = source
function = source
[]
[]
[Outputs]
console = false
exodus = true
[]
(modules/fluid_properties/test/tests/ideal_gas/test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
elem_type = QUAD4
[]
[Functions]
[./f_fn]
type = ParsedFunction
expression = -4
[../]
[./bc_fn]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./e]
initial_condition = 6232.5
[../]
[./v]
initial_condition = 0.02493
[../]
[./p]
family = MONOMIAL
order = CONSTANT
[../]
[./T]
family = MONOMIAL
order = CONSTANT
[../]
[./cp]
family = MONOMIAL
order = CONSTANT
[../]
[./cv]
family = MONOMIAL
order = CONSTANT
[../]
[./c]
family = MONOMIAL
order = CONSTANT
[../]
[./mu]
family = MONOMIAL
order = CONSTANT
[../]
[./k]
family = MONOMIAL
order = CONSTANT
[../]
[./g]
family = MONOMIAL
order = CONSTANT
[../]
[]
[AuxKernels]
[./p]
type = MaterialRealAux
variable = p
property = pressure
[../]
[./T]
type = MaterialRealAux
variable = T
property = temperature
[../]
[./cp]
type = MaterialRealAux
variable = cp
property = cp
[../]
[./cv]
type = MaterialRealAux
variable = cv
property = cv
[../]
[./c]
type = MaterialRealAux
variable = c
property = c
[../]
[./mu]
type = MaterialRealAux
variable = mu
property = mu
[../]
[./k]
type = MaterialRealAux
variable = k
property = k
[../]
[./g]
type = MaterialRealAux
variable = g
property = g
[../]
[]
[FluidProperties]
[./ideal_gas]
type = IdealGasFluidProperties
gamma = 1.4
molar_mass = 1.000536678700361
[../]
[]
[Materials]
[./fp_mat]
type = FluidPropertiesMaterialVE
e = e
v = v
fp = ideal_gas
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = f_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = bc_fn
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/layered_side_average_functor/layered_side_average_functor.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 40
ny = 10
nz = 10
allow_renumbering = false
[]
[Materials]
[u_mat]
type = GenericFunctorMaterial
prop_names = 'u'
prop_values = 'u_fn'
[]
[]
[AuxVariables]
[u_layered_average]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[u_layered_average_kern]
type = SpatialUserObjectAux
variable = u_layered_average
user_object = nplaf
boundary = 'bottom top'
execute_on = 'INITIAL'
[]
[]
[Functions]
[u_fn]
type = ParsedFunction
expression = 'x + y + z'
[]
[]
[UserObjects]
[nplaf]
type = LayeredSideAverageFunctor
direction = x
num_layers = 10
functor = u
boundary = 'bottom top'
execute_on = 'INITIAL'
[]
[]
[VectorPostprocessors]
[test_vpp]
type = SideValueSampler
variable = u_layered_average
boundary = 'bottom top'
sort_by = id
execute_on = 'INITIAL'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = 'INITIAL'
[]
(test/tests/fvkernels/mms/cylindrical/advection.i)
a = 1.1
[Mesh]
coord_type = 'RZ'
[gen_mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 2
xmax = 3
nx = 2
[]
[]
[Variables]
[v]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 1
[]
[]
[FVKernels]
# Flux kernel
[advection]
type = FVAdvection
variable = v
velocity = '${a} 0 0'
advected_interp_method = 'average'
[]
[body_v]
type = FVBodyForce
variable = v
function = 'forcing'
[]
[]
[FVBCs]
[left_u]
type = FVFunctionDirichletBC
boundary = 'left'
function = 'exact'
variable = v
[]
[right_u]
type = FVConstantScalarOutflowBC
variable = v
velocity = '${a} 0 0'
boundary = 'right'
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = 'sin(x)'
[]
[forcing]
type = ParsedFunction
expression = '(x*a*cos(x) + a*sin(x))/x'
symbol_names = 'a'
symbol_values = '${a}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_shift_type -sub_pc_type'
petsc_options_value = 'asm NONZERO lu'
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[error]
type = ElementL2Error
variable = v
function = exact
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(test/tests/userobjects/nearest_point_layered_side_integral/nearest_point_layered_side_integral.i)
# This input computes both a layered average and layered integral with the
# same direction, points, and number of layers. The layered integral for "bin"
# i is directly equal to the layered average for "bin" i multiplied by
# by 0.05 (side length of 1 divided by 10 layers X side length of 1 divided by 2 points).
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 10
nz = 10
[]
[Variables]
[dummy]
[]
[]
[Kernels]
[diffusion]
type = Diffusion
variable = dummy
[]
[]
[AuxVariables]
[u]
[]
[]
[AuxVariables]
[np_layered_integral]
order = CONSTANT
family = MONOMIAL
[]
[np_layered_average]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[u]
type = FunctionAux
variable = u
function = u
[]
[np_layered_integral]
type = SpatialUserObjectAux
variable = np_layered_integral
user_object = npli
boundary = 'front'
execute_on = timestep_end
[]
[np_layered_average]
type = SpatialUserObjectAux
variable = np_layered_average
user_object = npla
boundary = 'front'
execute_on = timestep_end
[]
[]
[Functions]
[u]
type = ParsedFunction
expression = 'x+2*y+3*z'
[]
[]
[UserObjects]
[npla]
type = NearestPointLayeredSideAverage
direction = x
points = '0.5 0.25 0.5
0.5 0.75 0.5'
num_layers = 10
variable = u
boundary = 'front'
[]
[npli]
type = NearestPointLayeredSideIntegral
direction = x
points = '0.5 0.25 0.5
0.5 0.75 0.5'
num_layers = 10
variable = u
boundary = 'front'
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
hide = 'dummy'
[]
(modules/combined/test/tests/phase_field_fracture/crack2d_vi_solver.i)
#This input uses PhaseField-Nonconserved Action to add phase field fracture bulk rate kernels
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 20
xmax = 1
ymax = 1
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Modules]
[./PhaseField]
[./Nonconserved]
[./c]
free_energy = F
kappa = kappa_op
mobility = L
[../]
[../]
[../]
[./TensorMechanics]
[./Master]
[./mech]
add_variables = true
strain = SMALL
additional_generate_output = 'stress_yy'
save_in = 'resid_x resid_y'
[../]
[../]
[../]
[]
[ICs]
[./c_ic]
type = FunctionIC
function = ic
variable = c
[../]
[]
[Functions]
[./ic]
type = ParsedFunction
expression = 'if(x<0.5 & y < 0.55 & y > 0.45,1, 0)'
[../]
[]
[AuxVariables]
[./resid_x]
[../]
[./resid_y]
[../]
[./bounds_dummy]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./solid_x]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_x
component = 0
c = c
[../]
[./solid_y]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_y
component = 1
c = c
[../]
[]
[BCs]
[./ydisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = 't'
[../]
[./yfix]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[../]
[./xfix]
type = DirichletBC
variable = disp_x
boundary = 'top bottom'
value = 0
[../]
[]
[Materials]
[./pfbulkmat]
type = GenericConstantMaterial
prop_names = 'gc_prop l visco'
prop_values = '1e-3 0.04 1e-4'
[../]
[./define_mobility]
type = ParsedMaterial
material_property_names = 'gc_prop visco'
property_name = L
expression = '1.0/(gc_prop * visco)'
[../]
[./define_kappa]
type = ParsedMaterial
material_property_names = 'gc_prop l'
property_name = kappa_op
expression = 'gc_prop * l'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '120.0 80.0'
fill_method = symmetric_isotropic
[../]
[./damage_stress]
type = ComputeLinearElasticPFFractureStress
c = c
E_name = 'elastic_energy'
D_name = 'degradation'
F_name = 'local_fracture_energy'
decomposition_type = strain_spectral
use_snes_vi_solver = true
[../]
[./degradation]
type = DerivativeParsedMaterial
property_name = degradation
coupled_variables = 'c'
expression = '(1.0-c)^2*(1.0 - eta) + eta'
constant_names = 'eta'
constant_expressions = '0.0'
derivative_order = 2
[../]
[./local_fracture_energy]
type = DerivativeParsedMaterial
property_name = local_fracture_energy
coupled_variables = 'c'
material_property_names = 'gc_prop l'
expression = 'c^2 * gc_prop / 2 / l'
derivative_order = 2
[../]
[./fracture_driving_energy]
type = DerivativeSumMaterial
coupled_variables = c
sum_materials = 'elastic_energy local_fracture_energy'
derivative_order = 2
property_name = F
[../]
[]
[Postprocessors]
[./resid_x]
type = NodalSum
variable = resid_x
boundary = 2
[../]
[./resid_y]
type = NodalSum
variable = resid_y
boundary = 2
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Bounds]
[./c_upper_bound]
type = ConstantBounds
variable = bounds_dummy
bounded_variable = c
bound_type = upper
bound_value = 1.0
[../]
[./c_lower_bound]
type = VariableOldValueBounds
variable = bounds_dummy
bounded_variable = c
bound_type = lower
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -snes_type'
petsc_options_value = 'lu vinewtonrsls'
nl_rel_tol = 1e-8
l_max_its = 10
nl_max_its = 10
dt = 1e-4
dtmin = 1e-4
num_steps = 2
[]
[Outputs]
exodus = true
[]
(test/tests/time_steppers/function_dt/function_dt_no_interpolation.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*t*(x*x+y*y)
[../]
[./forcing_fn]
type = ParsedFunction
expression = 2*t*(x*x+y*y)-4*t*t
[../]
[./dts]
type = PiecewiseConstant
x = '0 4 8 12 20'
y = '0 1 2 4 8'
direction = right
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]
[ICs]
[./u_var]
type = FunctionIC
variable = u
function = exact_fn
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 20
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/materials/ad_material/conversion/1d_dirichlet.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmax = 2
[]
[Variables]
[v]
initial_condition = 1.1
[]
[]
[Kernels]
inactive = 'ad_diff'
[diff]
type = MatDiffusion
variable = v
diffusivity = 'coef'
[]
[ad_diff]
type = ADMatDiffusion
variable = v
diffusivity = 'ad_coef_2'
[]
[sink]
type = ADBodyForce
variable = v
function = 'sink'
[]
[]
[BCs]
[bounds]
type = DirichletBC
variable = v
boundary = 'left right'
value = 0
[]
[]
[Functions]
[sink]
type = ParsedFunction
expression = '3*x^3'
[]
[]
[Materials]
[ad_coef]
type = ADParsedMaterial
property_name = 'ad_coef'
expression = '0.01 * max(v, 1)'
coupled_variables = 'v'
[]
[converter_to_regular]
type = MaterialADConverter
ad_props_in = 'ad_coef'
reg_props_out = 'coef'
[]
# at this point we should have lost the derivatives
[converter_to_ad]
type = MaterialADConverter
reg_props_in = 'coef'
ad_props_out = 'ad_coef_2'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/beam_eigenstrain_transfer/subapp_err_3.i)
# SubApp with 2D model to test multi app vectorpostprocessor to aux var transfer
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 5
xmin = 0.0
xmax = 0.5
ymin = 0.0
ymax = 0.150080
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./temp]
[../]
[./axial_strain]
order = FIRST
family = MONOMIAL
[../]
[]
[Functions]
[./temperature_load]
type = ParsedFunction
expression = t*(500.0)+300.0
[../]
[]
[Modules]
[./TensorMechanics]
[./Master]
[./all]
strain = SMALL
incremental = true
add_variables = true
eigenstrain_names = eigenstrain
[../]
[../]
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = temperature_load
[../]
[./axial_strain]
type = RankTwoAux
variable = axial_strain
rank_two_tensor = total_strain
index_i = 1
index_j = 1
execute_on = timestep_end
[../]
[]
[BCs]
[./x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 298
thermal_expansion_coeff = 1.3e-5
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Executioner]
type = Transient
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
l_tol = 1e-9
start_time = 0.0
end_time = 0.075
dt = 0.0125
dtmin = 0.0001
[]
[Outputs]
exodus = true
[]
[VectorPostprocessors]
[./axial_str]
type = LineValueSampler
warn_discontinuous_face_values = false
start_point = '0.5 0.0 0.0'
end_point = '0.5 0.150080 0.0'
variable = axial_strain
num_points = 21
sort_by = 'y'
[../]
[]
[Postprocessors]
[./end_disp]
type = PointValue
variable = disp_y
point = '0.5 0.150080 0.0'
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
elem_type = QUAD9
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[AuxVariables]
[vel_x]
order = SECOND
[]
[vel_y]
order = SECOND
[]
[]
[AuxKernels]
[vel_x]
type = VectorVariableComponentAux
variable = vel_x
vector_variable = velocity
component = 'x'
[]
[vel_y]
type = VectorVariableComponentAux
variable = vel_y
vector_variable = velocity
component = 'y'
[]
[]
[Variables]
[./velocity]
order = SECOND
family = LAGRANGE_VEC
[../]
[./T]
order = SECOND
[./InitialCondition]
type = ConstantIC
value = 1.0
[../]
[../]
[./p]
[../]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./momentum_time]
type = INSADMomentumTimeDerivative
variable = velocity
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[../]
[./temperature_time]
type = INSADHeatConductionTimeDerivative
variable = T
[../]
[./temperature_advection]
type = INSADEnergyAdvection
variable = T
[../]
[./temperature_conduction]
type = ADHeatConduction
variable = T
thermal_conductivity = 'k'
[../]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left'
[../]
[./lid]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 'lid_function'
[../]
[./T_hot]
type = DirichletBC
variable = T
boundary = 'bottom'
value = 1
[../]
[./T_cold]
type = DirichletBC
variable = T
boundary = 'top'
value = 0
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat]
type = INSAD3Eqn
velocity = velocity
pressure = p
temperature = T
[]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'asm 2 ilu 4'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
file_base = lid_driven_out
exodus = true
perf_graph = true
[]
(modules/heat_transfer/test/tests/code_verification/spherical_test_no3.i)
# Problem III.3
#
# The thermal conductivity of a spherical shell varies linearly with
# temperature: k = k0(1+beta* u). The inside radius is ri and the outside radius
# is ro. It has a constant internal heat generation q and is exposed to
# the same constant temperature on both surfaces: u(ri) = u(ro) = uo.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
nx = 4
xmin = 0.2
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Problem]
coord_type = RSPHERICAL
[]
[Functions]
[./exact]
type = ParsedFunction
symbol_names = 'q k0 ri ro beta u0'
symbol_values = '1200 1 0.2 1.0 1e-3 0'
expression = 'u0+(1/beta)*( ( 1 + (1/3)*beta*((ro^2-x^2)-(ro^2-ri^2) * (1/x-1/ro)/(1/ri-1/ro))*q/k0 )^0.5 - 1)'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[./heatsource]
type = HeatSource
function = 1200
variable = u
[../]
[]
[BCs]
[./uo]
type = DirichletBC
boundary = 'left right'
variable = u
value = 0
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat'
prop_values = '1.0 1.0'
[../]
[./thermal_conductivity]
type = ParsedMaterial
property_name = 'thermal_conductivity'
coupled_variables = u
expression = '1 * (1 + 1e-3*u)'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/lid-driven/lid-driven-with-energy-action.i)
mu = 1
rho = 1
k = .01
cp = 1
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 32
ny = 32
[]
[]
[Modules]
[NavierStokesFV]
compressibility = 'incompressible'
add_energy_equation = true
density = 'rho'
dynamic_viscosity = 'mu'
thermal_conductivity = 'k'
specific_heat = 'cp'
initial_pressure = 0.0
initial_temperature = 0.0
inlet_boundaries = 'top'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_function = 'lid_function 0'
energy_inlet_types = 'fixed-temperature'
energy_inlet_function = '0'
wall_boundaries = 'left right bottom'
momentum_wall_types = 'noslip noslip noslip'
energy_wall_types = 'heatflux heatflux fixed-temperature'
energy_wall_function = '0 0 1'
pin_pressure = true
pinned_pressure_type = average
pinned_pressure_value = 0
mass_advection_interpolation = 'average'
momentum_advection_interpolation = 'average'
energy_advection_interpolation = 'average'
[]
[]
[AuxVariables]
[U]
order = CONSTANT
family = MONOMIAL
fv = true
[]
[]
[AuxKernels]
[mag]
type = VectorMagnitudeAux
variable = U
x = vel_x
y = vel_y
[]
[]
[FunctorMaterials]
[functor_constants]
type = ADGenericFunctorMaterial
prop_names = 'cp k rho mu'
prop_values = '${cp} ${k} ${rho} ${mu}'
[]
[]
[Functions]
[lid_function]
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/kernels/scalar_kernel_constraint/diffusion_bipass_scalar.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[exact_fn]
type = ParsedFunction
value = 'x*x+y*y'
[]
[ffn]
type = ParsedFunction
value = -4
[]
[bottom_bc_fn]
type = ParsedFunction
value = -2*y
[]
[right_bc_fn]
type = ParsedFunction
value = 2*x
[]
[top_bc_fn]
type = ParsedFunction
value = 2*y
[]
[left_bc_fn]
type = ParsedFunction
value = -2*x
[]
[]
[Variables]
[u]
family = LAGRANGE
order = SECOND
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[Kernels]
# Make sure that we can derive from the scalar base class
# but actually not assign a scalar variable
[diff]
type = DiffusionNoScalar
variable = u
[]
[ffnk]
type = BodyForce
variable = u
function = ffn
[]
[sk_lm]
type = ScalarLMKernel
variable = u
kappa = lambda
pp_name = pp
value = 2.666666666666666
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bottom_bc_fn
[]
[right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = right_bc_fn
[]
[top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = top_bc_fn
[]
[left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = left_bc_fn
[]
[]
[Postprocessors]
# integrate the volume of domain since original objects set
# int(phi)=V0, rather than int(phi-V0)=0
[pp]
type = FunctionElementIntegral
function = 1
execute_on = initial
[]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-9
l_tol = 1.e-10
nl_max_its = 10
# This example builds an indefinite matrix, so "-pc_type hypre -pc_hypre_type boomeramg" cannot
# be used reliably on this problem
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
# This is a linear problem, so we don't need to recompute the
# Jacobian. This isn't a big deal for a Steady problems, however, as
# there is only one solve.
solve_type = 'LINEAR'
[]
[Outputs]
# exodus = true
csv = true
hide = lambda
[]
(test/tests/predictors/simple/predictor_skip_old_test.i)
# The purpose of this test is to test the simple predictor. This is a very
# small, monotonically loaded block of material. If things are working right,
# the predictor should come very close to exactly nailing the solution on steps
# after the first step.
#This test checks to see that the predictor is skipped in the last step.
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 3
ny = 3
[]
[Functions]
[ramp1]
type = ParsedFunction
expression = 't'
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
[]
[]
[BCs]
[bot]
type = DirichletBC
variable = u
boundary = bottom
value = 0.0
[]
[ss2_x]
type = FunctionDirichletBC
variable = u
boundary = top
function = ramp1
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-14
start_time = 0.0
dt = 0.5
end_time = 1.5
[Predictor]
type = SimplePredictor
scale = 1.0
skip_times_old = '1.0'
[]
[]
[Postprocessors]
[final_residual]
type = Residual
residual_type = FINAL
[]
[initial_residual]
type = Residual
residual_type = INITIAL
[]
[]
[Outputs]
csv = true
[]
(modules/peridynamics/test/tests/heat_conduction/2D_steady_state_BPD.i)
# This test solves a 2D steady state heat equation
# The error is found by comparing to the analytical solution
[Mesh]
type = PeridynamicsMesh
horizon_number = 3
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[../]
[./gpd]
type = MeshGeneratorPD
input = gmg
retain_fe_mesh = false
[../]
[]
[Variables]
[./temp]
[../]
[]
[AuxVariables]
[./bond_status]
order = CONSTANT
family = MONOMIAL
initial_condition = 1
[../]
[]
[Functions]
[./analytical_sol]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[]
[Kernels]
[./heat_conduction]
type = HeatConductionBPD
variable = temp
[../]
[./heat_source]
type = HeatSourceBPD
variable = temp
power_density = -4
[../]
[]
[BCs]
[./left]
type = FunctionDirichletBC
variable = temp
boundary = 1003
function = analytical_sol
[../]
[./bottom]
type = FunctionDirichletBC
variable = temp
boundary = 1000
function = analytical_sol
[../]
[./right]
type = FunctionDirichletBC
variable = temp
boundary = 1001
function = analytical_sol
[../]
[./top]
type = FunctionDirichletBC
variable = temp
boundary = 1002
function = analytical_sol
[../]
[]
[Materials]
[./thermal_mat]
type = ThermalConstantHorizonMaterialBPD
temperature = temp
thermal_conductivity = 1
[../]
[]
[Postprocessors]
[./nodal_error]
type = NodalL2Error
function = 'analytical_sol'
variable = temp
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
start_time = 0.0
end_time = 1.0
[]
[Outputs]
exodus = true
file_base = 2D_steady_state_BPD
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/steady_fsp.i)
rho=1
mu=2e-3
U=1
l=1
prefactor=${fparse 1/(l/2)^2}
n=64
[GlobalParams]
gravity = '0 0 0'
[]
[Mesh]
[gen]
type = DistributedRectilinearMeshGenerator
dim = 2
xmin = 0
xmax = ${l}
ymin = 0
ymax = ${l}
nx = ${n}
ny = ${n}
elem_type = QUAD4
[]
second_order = true
parallel_type = distributed
[]
[Variables]
[vel_x]
order = SECOND
family = LAGRANGE
[]
[vel_y]
order = SECOND
family = LAGRANGE
[]
[p]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[mass]
type = INSMass
variable = p
u = vel_x
v = vel_y
pressure = p
[]
[x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[]
[momentum_x_mass]
type = MassMatrix
variable = vel_x
density = ${rho}
matrix_tags = 'mass'
[]
[y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[]
[momentum_y_mass]
type = MassMatrix
variable = vel_y
density = ${rho}
matrix_tags = 'mass'
[]
[]
[BCs]
[x_no_slip]
type = DirichletBC
variable = vel_x
boundary = 'bottom right left'
value = 0.0
[]
[lid]
type = FunctionDirichletBC
variable = vel_x
boundary = 'top'
function = 'lid_function'
[]
[y_no_slip]
type = DirichletBC
variable = vel_y
boundary = 'bottom right top left'
value = 0.0
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[]
[Functions]
[lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '${prefactor}*${U}*x*(${l}-x)'
[]
[]
[Problem]
type = NavierStokesProblem
mass_matrix = 'mass'
extra_tag_matrices = 'mass'
[]
[Preconditioning]
[FSP]
type = FSP
topsplit = 'up'
[up]
splitting = 'u p'
splitting_type = schur
petsc_options_iname = '-pc_fieldsplit_schur_fact_type -pc_fieldsplit_schur_precondition -ksp_gmres_restart -ksp_type -ksp_pc_side -ksp_rtol'
petsc_options_value = 'full self 300 fgmres right 1e-4'
[]
[u]
vars = 'vel_x vel_y'
# petsc_options = '-ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_type -ksp_rtol -ksp_gmres_restart -ksp_pc_side'
petsc_options_value = 'hypre boomeramg gmres 1e-2 300 right'
[]
[p]
vars = 'p'
petsc_options = '-pc_lsc_scale_diag -ksp_converged_reason'# -lsc_ksp_converged_reason -lsc_ksp_monitor_true_residual
petsc_options_iname = '-ksp_type -ksp_gmres_restart -ksp_rtol -pc_type -ksp_pc_side -lsc_pc_type -lsc_pc_hypre_type -lsc_ksp_type -lsc_ksp_rtol -lsc_ksp_pc_side -lsc_ksp_gmres_restart'
petsc_options_value = 'fgmres 300 1e-2 lsc right hypre boomeramg gmres 1e-1 right 300'
[]
[]
[]
[Postprocessors]
[pavg]
type = ElementAverageValue
variable = p
[]
[]
[UserObjects]
[set_pressure]
type = NSPressurePin
pin_type = 'average'
variable = p
pressure_average = 'pavg'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
[exo]
type = Exodus
execute_on = 'final'
hide = 'pavg'
[]
[]
(test/tests/variables/high_order_monomial/high_order_monomial.i)
###########################################################
# This is a simple test demonstrating the use of the
# Higher order monomial variable type.
#
# @Requirement F3.10
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Variables]
[./u]
[../]
[]
# Monomial variable types
[AuxVariables]
[./first]
family = MONOMIAL
[../]
[./second]
order = SECOND
family = MONOMIAL
[../]
[./third]
order = THIRD
family = MONOMIAL
[../]
[]
[Functions]
[./first]
type = ParsedFunction
expression = 1+2*x+2*y
[../]
[./second]
type = ParsedFunction
expression = 1+2*x+4*x*x+2*y+4*y*y+4*x*y
[../]
[./third]
type = ParsedFunction
expression = 1+2*x+4*x*x+8*x*x*x+2*y+4*y*y+8*y*y*y+4*x*y+8*x*x*y
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./first]
type = FunctionAux
variable = first
function = first
execute_on = timestep_end
[../]
[./second]
type = FunctionAux
variable = second
function = second
execute_on = timestep_end
[../]
[./third]
type = FunctionAux
variable = third
function = third
execute_on = timestep_end
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Postprocessors]
[./first_error]
type = ElementL2Error
variable = first
function = first
execute_on = 'initial timestep_end'
[../]
[./second_error]
type = ElementL2Error
variable = second
function = second
execute_on = 'initial timestep_end'
[../]
[./third_error]
type = ElementL2Error
variable = third
function = third
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/interface_diffusive_flux/interface_diffusive_flux.i)
postprocessor_type = InterfaceDiffusiveFluxAverage
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 6
xmax = 3
ny = 9
ymax = 3
elem_type = QUAD4
[]
[subdomain_id]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '2 1 0'
block_id = 1
[]
[interface]
input = subdomain_id
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'interface'
[]
[]
[Functions]
[fn_exact]
type = ParsedFunction
expression = 'x*x+y*y'
[]
[]
[Variables]
[u]
block = 0
[]
[v]
block = 1
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
[]
[body_u]
type = BodyForce
variable = u
function = 1
[]
[diff_v]
type = Diffusion
variable = v
[]
[body_v]
type = BodyForce
variable = v
function = -1
[]
[]
# Not a diffusion interface but can test the postprocessor anyway
[InterfaceKernels]
[reaction]
type = InterfaceReaction
kb = 1
kf = 2
variable = u
neighbor_var = v
boundary = 'interface'
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = fn_exact
[]
[]
[Postprocessors]
[diffusive_flux]
type = ${postprocessor_type}
variable = u
neighbor_variable = v
diffusivity = 1
execute_on = TIMESTEP_END
boundary = 'interface'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
file_base = ${raw ${postprocessor_type} _fe}
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized_action.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 64
ny = 64
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = steady-state
velocity_boundary = 'bottom right top left'
velocity_function = '0 0 0 0 lid_function 0 0 0'
pressure_pinned_node = 0
density_name = rho
dynamic_viscosity_name = mu
initial_velocity = '1e-15 1e-15 0'
use_ad = true
pspg = true
supg = true
alpha = 0.1
family = LAGRANGE
order = FIRST
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[]
[]
[Functions]
[lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
exodus = true
file_base = lid_driven_stabilized_out
[]
[Postprocessors]
[lin]
type = NumLinearIterations
[]
[nl]
type = NumNonlinearIterations
[]
[lin_tot]
type = CumulativeValuePostprocessor
postprocessor = 'lin'
[]
[nl_tot]
type = CumulativeValuePostprocessor
postprocessor = 'nl'
[]
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/crysp_read_slip_prop.i)
[Mesh]
type = GeneratedMesh
dim = 3
elem_type = HEX8
displacements = 'ux uy uz'
[]
[Variables]
[./ux]
block = 0
[../]
[./uy]
block = 0
[../]
[./uz]
block = 0
[../]
[]
[AuxVariables]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./fp_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./rotout]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./e_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./gss1]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[]
[Functions]
[./tdisp]
type = ParsedFunction
expression = 0.01*t
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'ux uy uz'
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_zz]
type = RankTwoAux
variable = stress_zz
rank_two_tensor = stress
index_j = 2
index_i = 2
execute_on = timestep_end
block = 0
[../]
[./fp_zz]
type = RankTwoAux
variable = fp_zz
rank_two_tensor = fp
index_j = 2
index_i = 2
execute_on = timestep_end
block = 0
[../]
[./e_zz]
type = RankTwoAux
variable = e_zz
rank_two_tensor = lage
index_j = 2
index_i = 2
execute_on = timestep_end
block = 0
[../]
[./gss1]
type = MaterialStdVectorAux
variable = gss1
property = gss
index = 0
execute_on = timestep_end
block = 0
[../]
[]
[BCs]
[./symmy]
type = DirichletBC
variable = uy
boundary = bottom
value = 0
[../]
[./symmx]
type = DirichletBC
variable = ux
boundary = left
value = 0
[../]
[./symmz]
type = DirichletBC
variable = uz
boundary = back
value = 0
[../]
[./tdisp]
type = FunctionDirichletBC
variable = uz
boundary = front
function = tdisp
[../]
[]
[Materials]
[./crysp]
type = FiniteStrainCrystalPlasticity
block = 0
gtol = 1e-2
slip_sys_file_name = input_slip_sys_prop.txt
nss = 12
num_slip_sys_flowrate_props = 2 #Number of properties in a slip system
flowprops = '1 4 0.001 0.1 5 8 0.001 0.1 9 12 0.001 0.1'
hprops = '1.0 541.5 60.8 109.8 2.5'
tan_mod_type = exact
intvar_read_type = slip_sys_file
num_slip_sys_props = 1
[../]
[./elasticity_tensor]
type = ComputeElasticityTensorCP
block = 0
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'ux uy uz'
[../]
[]
[Postprocessors]
[./stress_zz]
type = ElementAverageValue
variable = stress_zz
block = 'ANY_BLOCK_ID 0'
[../]
[./fp_zz]
type = ElementAverageValue
variable = fp_zz
block = 'ANY_BLOCK_ID 0'
[../]
[./e_zz]
type = ElementAverageValue
variable = e_zz
block = 'ANY_BLOCK_ID 0'
[../]
[./gss1]
type = ElementAverageValue
variable = gss1
block = 'ANY_BLOCK_ID 0'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
dt = 0.05
dtmax = 10.0
dtmin = 0.05
num_steps = 10
[]
[Outputs]
file_base = crysp_read_slip_prop_out
exodus = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/cross_material/convergence/elastic.i)
# Simple 3D test
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = false
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 4
nz = 4
[]
[]
[ICs]
[disp_x]
type = RandomIC
variable = disp_x
min = -0.02
max = 0.02
[]
[disp_y]
type = RandomIC
variable = disp_y
min = -0.02
max = 0.02
[]
[disp_z]
type = RandomIC
variable = disp_z
min = -0.02
max = 0.02
[]
[]
[Kernels]
[sdx]
type = UpdatedLagrangianStressDivergence
variable = disp_x
component = 0
use_displaced_mesh = false
[]
[sdy]
type = UpdatedLagrangianStressDivergence
variable = disp_y
component = 1
use_displaced_mesh = false
[]
[sdz]
type = UpdatedLagrangianStressDivergence
variable = disp_z
component = 2
use_displaced_mesh = false
[]
[]
[Functions]
[pullx]
type = ParsedFunction
expression = '4000 * t'
[]
[pully]
type = ParsedFunction
expression = '-2000 * t'
[]
[pullz]
type = ParsedFunction
expression = '3000 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = left
variable = disp_y
value = 0.0
[]
[leftz]
type = DirichletBC
preset = true
boundary = left
variable = disp_z
value = 0.0
[]
[pull_x]
type = FunctionNeumannBC
boundary = right
variable = disp_x
function = pullx
[]
[pull_y]
type = FunctionNeumannBC
boundary = top
variable = disp_y
function = pully
[]
[pull_z]
type = FunctionNeumannBC
boundary = right
variable = disp_z
function = pullz
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianWrappedStress
[]
[compute_stress_base]
type = ComputeFiniteStrainElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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
[]
(modules/porous_flow/examples/multiapp_fracture_flow/3dFracture/matrix_app.i)
# 3D matrix app doing thermo-hydro PorousFlow and receiving heat energy via a VectorPostprocessor from the 2D fracture App
[Mesh]
uniform_refine = 0
[generate]
type = GeneratedMeshGenerator
dim = 3
nx = 11
xmin = -10
xmax = 210
ny = 9
ymin = -10
ymax = 160
nz = 11
zmin = -10
zmax = 210
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[matrix_P]
scaling = 1E6
[]
[matrix_T]
initial_condition = 473
[]
[]
[ICs]
[frac_P]
type = FunctionIC
variable = matrix_P
function = insitu_pp
[]
[]
[Functions]
[insitu_pp]
type = ParsedFunction
expression = '10 - 0.847E-2 * z' # Approximate hydrostatic in MPa
[]
[]
[PorousFlowFullySaturated]
coupling_type = ThermoHydro
porepressure = matrix_P
temperature = matrix_T
fp = water
gravity = '0 0 -9.81E-6' # Note the value, because of pressure_unit
pressure_unit = MPa
[]
[DiracKernels]
[heat_from_fracture]
type = ReporterPointSource
variable = matrix_T
value_name = heat_transfer_rate/transferred_joules_per_s
x_coord_name = heat_transfer_rate/x
y_coord_name = heat_transfer_rate/y
z_coord_name = heat_transfer_rate/z
[]
[]
[FluidProperties]
[water]
type = SimpleFluidProperties # this is largely irrelevant here since we care about heat conduction only
thermal_expansion = 0 # to prevent depressurization as the reservoir is cooled
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 1E-3 # small porosity of rock
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-18 0 0 0 1E-18 0 0 0 1E-18'
[]
[internal_energy]
type = PorousFlowMatrixInternalEnergy
density = 2700 # kg/m^3
specific_heat_capacity = 800 # rough guess at specific heat capacity
[]
[aq_thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '5 0 0 0 5 0 0 0 5'
[]
[]
[VectorPostprocessors]
[heat_transfer_rate]
type = ConstantVectorPostprocessor
vector_names = 'transferred_joules_per_s x y z'
value = '0; 0; 0; 0'
outputs = none
[]
[]
[AuxVariables]
[normal_thermal_conductivity]
family = MONOMIAL
order = CONSTANT
[]
[fracture_normal_x]
family = MONOMIAL
order = CONSTANT
initial_condition = 0
[]
[fracture_normal_y]
family = MONOMIAL
order = CONSTANT
initial_condition = 1
[]
[fracture_normal_z]
family = MONOMIAL
order = CONSTANT
initial_condition = 0
[]
[element_normal_length]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[normal_thermal_conductivity_auxk]
type = ConstantAux
variable = normal_thermal_conductivity
value = 5 # very simple in this case
[]
[element_normal_length_auxk]
type = PorousFlowElementLength
variable = element_normal_length
direction = 'fracture_normal_x fracture_normal_y fracture_normal_z'
[]
[]
[Preconditioning]
[entire_jacobian]
type = SMP
full = true
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
[TimeStepper]
type = IterationAdaptiveDT
dt = 1
growth_factor = 1.1
optimal_iterations = 4
[]
dtmax = 1E8
end_time = 1E8
nl_abs_tol = 1E-2
[]
[Outputs]
print_linear_residuals = false
exodus = false
[]
[MultiApps]
[fracture_app]
type = TransientMultiApp
input_files = fracture_only_aperture_changing.i
cli_args = 'Outputs/ex/sync_only=false'
execute_on = TIMESTEP_BEGIN
sub_cycling = true
### catch_up = true
### max_catch_up_steps = 100
[]
[]
[Transfers]
[element_normal_length_to_fracture]
type = MultiAppNearestNodeTransfer
to_multi_app = fracture_app
source_variable = element_normal_length
variable = enclosing_element_normal_length
[]
[element_normal_thermal_cond_to_fracture]
type = MultiAppNearestNodeTransfer
to_multi_app = fracture_app
source_variable = normal_thermal_conductivity
variable = enclosing_element_normal_thermal_cond
[]
[T_to_fracture]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = fracture_app
source_variable = matrix_T
variable = transferred_matrix_T
[]
[normal_x_from_fracture]
type = MultiAppNearestNodeTransfer
from_multi_app = fracture_app
source_variable = normal_dirn_x
variable = fracture_normal_x
[]
[normal_y_from_fracture]
type = MultiAppNearestNodeTransfer
from_multi_app = fracture_app
source_variable = normal_dirn_y
variable = fracture_normal_y
[]
[normal_z_from_fracture]
type = MultiAppNearestNodeTransfer
from_multi_app = fracture_app
source_variable = normal_dirn_z
variable = fracture_normal_z
[]
[heat_from_fracture]
type = MultiAppReporterTransfer
from_multi_app = fracture_app
from_reporters = 'heat_transfer_rate/joules_per_s heat_transfer_rate/x heat_transfer_rate/y heat_transfer_rate/z'
to_reporters = 'heat_transfer_rate/transferred_joules_per_s heat_transfer_rate/x heat_transfer_rate/y heat_transfer_rate/z'
[]
[]
(test/tests/bcs/function_dirichlet_bc/test.i)
###########################################################
# This is a test of Boundary Condition System. The
# FunctionDirichletBC is used to contribute the residuals
# to the boundary term operators in the weak form.
#
# @Requirement F3.40
###########################################################
[Mesh]
[./square]
type = GeneratedMeshGenerator
dim = 2
nx = 32
ny = 32
[../]
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./ff_1]
type = ParsedFunction
expression = alpha*alpha*pi
symbol_names = 'alpha'
symbol_values = '16'
[../]
[./ff_2]
type = ParsedFunction
expression = pi*sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '16'
[../]
[./forcing_func]
type = CompositeFunction
functions = 'ff_1 ff_2'
[../]
[./bc_func]
type = ParsedFunction
expression = sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '16'
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_func
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right'
function = bc_func
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/solid_mechanics/test/tests/domain_integral_thermal/interaction_integral_2d_rot.i)
#This problem from [Wilson 1979] tests the thermal strain term in the
#interaction integral
#
#theta_e = 10 degrees C; a = 252; E = 207000; nu = 0.3; alpha = 1.35e-5
#
#With uniform_refine = 3, KI converges to
#KI = 5.602461e+02 (interaction integral)
#KI = 5.655005e+02 (J-integral)
#
#Both are in good agreement with [Shih 1986]:
#average_value = 0.4857 = KI / (sigma_theta * sqrt(pi * a))
#sigma_theta = E * alpha * theta_e / (1 - nu)
# = 207000 * 1.35e-5 * 10 / (1 - 0.3) = 39.9214
#KI = average_value * sigma_theta * sqrt(pi * a) = 5.656e+02
#
#References:
#W.K. Wilson, I.-W. Yu, Int J Fract 15 (1979) 377-387
#C.F. Shih, B. Moran, T. Nakamura, Int J Fract 30 (1986) 79-102
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
volumetric_locking_correction = False
[]
[Mesh]
displacements = 'disp_x disp_y'
[file_mesh]
type = FileMeshGenerator
file = crack2d.e
[]
[rotate]
type = TransformGenerator
transform = ROTATE
vector_value = '0 0 90'
input = file_mesh
[]
[]
[AuxVariables]
[./SED]
order = CONSTANT
family = MONOMIAL
[../]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./tempfunc]
type = ParsedFunction
expression = 10.0*(2*y/504)
[../]
[]
[DomainIntegral]
integrals = 'KFromJIntegral InteractionIntegralKI'
boundary = 800
crack_direction_method = CrackDirectionVector
crack_direction_vector = '0 1 0'
2d = true
axis_2d = 2
radius_inner = '60.0 80.0 100.0 120.0'
radius_outer = '80.0 100.0 120.0 140.0'
symmetry_plane = 0
incremental = true
# interaction integral parameters
disp_x = disp_x
disp_y = disp_y
block = 1
youngs_modulus = 207000
poissons_ratio = 0.3
temperature = temp
eigenstrain_names = thermal_expansion
[]
[Physics/SolidMechanics/QuasiStatic]
[./master]
strain = FINITE
add_variables = true
incremental = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress'
planar_formulation = PLANE_STRAIN
eigenstrain_names = thermal_expansion
[../]
[]
[AuxKernels]
[./SED]
type = MaterialRealAux
variable = SED
property = strain_energy_density
execute_on = timestep_end
[../]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
block = 1
[../]
[]
[BCs]
[./crack_x]
type = DirichletBC
variable = disp_x
boundary = 100
value = 0.0
[../]
[./no_x]
type = DirichletBC
variable = disp_x
boundary = 400
value = 0.0
[../]
[./no_y1]
type = DirichletBC
variable = disp_y
boundary = 900
value = 0.0
[../]
[] # BCs
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
[../]
[./elastic_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 0.0
thermal_expansion_coeff = 1.35e-5
temperature = temp
eigenstrain_name = thermal_expansion
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
line_search = 'none'
l_max_its = 50
nl_max_its = 40
nl_rel_step_tol= 1e-10
nl_rel_tol = 1e-10
start_time = 0.0
dt = 1
end_time = 1
num_steps = 1
[]
[Outputs]
file_base = interaction_integral_2d_rot_out
exodus = true
csv = true
[]
[Preconditioning]
active = 'smp'
[./smp]
type = SMP
pc_side = left
ksp_norm = preconditioned
full = true
[../]
[]
(modules/solid_mechanics/test/tests/radial_disp_aux/sphere_2d_axisymmetric.i)
# The purpose of this set of tests is to check the values computed
# by the RadialDisplacementAux AuxKernel. They should match the
# radial component of the displacment for a cylindrical or spherical
# model.
# This particular model is of a sphere subjected to uniform thermal
# expansion represented using a 2D axisymmetric model.
[Mesh]
type = FileMesh
file = circle_sector_2d.e
[]
[GlobalParams]
displacements = 'disp_x disp_y'
order = SECOND
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[AuxVariables]
[./temp]
[../]
[./rad_disp]
[../]
[]
[Functions]
[./temperature_load]
type = ParsedFunction
expression = t+300.0
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
eigenstrain_names = eigenstrain
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = temperature_load
use_displaced_mesh = false
[../]
[./raddispaux]
type = RadialDisplacementSphereAux
variable = rad_disp
origin = '0 0 0'
[../]
[]
[BCs]
[./x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./y]
type = DirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 300
thermal_expansion_coeff = 1.3e-5
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '51'
line_search = 'none'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
start_time = 0.0
end_time = 1
dt = 1
dtmin = 1
[]
[Outputs]
csv = true
exodus = true
[]
#[Postprocessors]
# [./strain_xx]
# type = SideAverageValue
# variable =
# block = 0
# [../]
#[]
(modules/solid_mechanics/test/tests/crystal_plasticity/user_object_based/orthotropic_rotation_Cijkl.i)
# This test is designed to test the correct application of the Euler angle
# rotations to the elasticity tensor. The test uses values for the nine C_ijkl
# entries that correspond to the engineering notation placement:
# e.g. C11 = 11e3, c12 = 12e3, c13 = 13e3, c22 = 22e3 ..... c66 = 66e3
#
# A rotation of (0, 90, 0) is applied to the 1x1x1 cube, such that the values of
# c12 and c13 switch, c22 and c33 switch, and c55 and c66 switch. Postprocessors
# are used to verify this switch (made simple with the value convention above)
# and to verify that the unrotated components along the x-axis remain constant.
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./lage_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./lage_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./pk2_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./lage_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./fp_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./c11]
order = CONSTANT
family = MONOMIAL
[../]
[./c12]
order = CONSTANT
family = MONOMIAL
[../]
[./c13]
order = CONSTANT
family = MONOMIAL
[../]
[./c22]
order = CONSTANT
family = MONOMIAL
[../]
[./c23]
order = CONSTANT
family = MONOMIAL
[../]
[./c33]
order = CONSTANT
family = MONOMIAL
[../]
[./c44]
order = CONSTANT
family = MONOMIAL
[../]
[./c55]
order = CONSTANT
family = MONOMIAL
[../]
[./c66]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./tdisp]
type = ParsedFunction
expression = 0.01*t
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
[../]
[]
[AuxKernels]
[./lage_xx]
type = RankTwoAux
rank_two_tensor = lage
variable = lage_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[../]
[./lage_yy]
type = RankTwoAux
rank_two_tensor = lage
variable = lage_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[../]
[./pk2_yy]
type = RankTwoAux
variable = pk2_yy
rank_two_tensor = pk2
index_j = 1
index_i = 1
execute_on = timestep_end
[../]
[./lage_zz]
type = RankTwoAux
rank_two_tensor = lage
variable = lage_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[../]
[./fp_yy]
type = RankTwoAux
variable = fp_yy
rank_two_tensor = fp
index_i = 1
index_j = 1
execute_on = timestep_end
[../]
[./c11]
type = RankFourAux
variable = c11
rank_four_tensor = elasticity_tensor
index_i = 0
index_j = 0
index_k = 0
index_l = 0
execute_on = timestep_end
[../]
[./c12]
type = RankFourAux
variable = c12
rank_four_tensor = elasticity_tensor
index_i = 0
index_j = 0
index_k = 1
index_l = 1
execute_on = timestep_end
[../]
[./c13]
type = RankFourAux
variable = c13
rank_four_tensor = elasticity_tensor
index_i = 0
index_j = 0
index_k = 2
index_l = 2
execute_on = timestep_end
[../]
[./c22]
type = RankFourAux
variable = c22
rank_four_tensor = elasticity_tensor
index_i = 1
index_j = 1
index_k = 1
index_l = 1
execute_on = timestep_end
[../]
[./c23]
type = RankFourAux
variable = c23
rank_four_tensor = elasticity_tensor
index_i = 1
index_j = 1
index_k = 2
index_l = 2
execute_on = timestep_end
[../]
[./c33]
type = RankFourAux
variable = c33
rank_four_tensor = elasticity_tensor
index_i = 2
index_j = 2
index_k = 2
index_l = 2
execute_on = timestep_end
[../]
[./c44]
type = RankFourAux
variable = c44
rank_four_tensor = elasticity_tensor
index_i = 1
index_j = 2
index_k = 1
index_l = 2
execute_on = timestep_end
[../]
[./c55]
type = RankFourAux
variable = c55
rank_four_tensor = elasticity_tensor
index_i = 2
index_j = 0
index_k = 2
index_l = 0
execute_on = timestep_end
[../]
[./c66]
type = RankFourAux
variable = c66
rank_four_tensor = elasticity_tensor
index_i = 0
index_j = 1
index_k = 0
index_l = 1
execute_on = timestep_end
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[../]
[./left]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./back]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[../]
[./top]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = tdisp
[../]
[]
[Materials]
[./crysp]
type = FiniteStrainUObasedCP
stol = 1e-2
tan_mod_type = exact
uo_slip_rates = 'slip_rate_gss'
uo_slip_resistances = 'slip_resistance_gss'
uo_state_vars = 'state_var_gss'
uo_state_var_evol_rate_comps = 'state_var_evol_rate_comp_gss'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensorCP
C_ijkl = '11e3 12e3 13e3 22e3 23e3 33e3 44e3 55e3 66e3'
fill_method = symmetric9
euler_angle_1 = 0.0
euler_angle_2 = 45.0
euler_angle_3 = 45.0
[../]
[]
[UserObjects]
[./slip_rate_gss]
type = CrystalPlasticitySlipRateGSS
variable_size = 12
slip_sys_file_name = input_slip_sys.txt
num_slip_sys_flowrate_props = 2
flowprops = '1 4 0.001 0.1 5 8 0.001 0.1 9 12 0.001 0.1'
uo_state_var_name = state_var_gss
[../]
[./slip_resistance_gss]
type = CrystalPlasticitySlipResistanceGSS
variable_size = 12
uo_state_var_name = state_var_gss
[../]
[./state_var_gss]
type = CrystalPlasticityStateVariable
variable_size = 12
groups = '0 4 8 12'
group_values = '60.8 60.8 60.8' #strength units in MPa
uo_state_var_evol_rate_comp_name = state_var_evol_rate_comp_gss
scale_factor = 1.0
[../]
[./state_var_evol_rate_comp_gss]
type = CrystalPlasticityStateVarRateComponentGSS
variable_size = 12
hprops = '1.0 541.5 109.8 2.5'
uo_slip_rate_name = slip_rate_gss
uo_state_var_name = state_var_gss
[../]
[]
[Postprocessors]
[./lage_xx]
type = ElementAverageValue
variable = lage_xx
[../]
[./pk2_yy]
type = ElementAverageValue
variable = pk2_yy
[../]
[./lage_yy]
type = ElementAverageValue
variable = lage_yy
[../]
[./lage_zz]
type = ElementAverageValue
variable = lage_zz
[../]
[./fp_yy]
type = ElementAverageValue
variable = fp_yy
[../]
[./c11]
type = ElementAverageValue
variable = c11
[../]
[./c12]
type = ElementAverageValue
variable = c12
[../]
[./c13]
type = ElementAverageValue
variable = c13
[../]
[./c22]
type = ElementAverageValue
variable = c22
[../]
[./c23]
type = ElementAverageValue
variable = c23
[../]
[./c33]
type = ElementAverageValue
variable = c33
[../]
[./c44]
type = ElementAverageValue
variable = c44
[../]
[./c55]
type = ElementAverageValue
variable = c55
[../]
[./c66]
type = ElementAverageValue
variable = c66
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
l_tol = 1e-3
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 1 lu gmres 200'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-10
dtmax = 0.1
dtmin = 1.0e-3
dt = 0.05
end_time = 0.5
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/time_integrators/implicit-euler/ie-monomials.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
variable = u
value = 1
[../]
[]
[Functions]
active = 'forcing_fn exact_fn'
[./forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[../]
[./exact_fn]
type = ParsedGradFunction
value = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[../]
[]
[Kernels]
[./time]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./abs] # u * v
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGKernels]
[./dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[../]
[]
[BCs]
[./all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
nl_rel_tol = 1e-10
num_steps = 1
[]
[Outputs]
execute_on = 'timestep_end'
console = true
[]
(modules/richards/test/tests/user_objects/uo1.i)
# Relative-permeability User objects give the correct value
# (note that here p is x, where x runs between 0.01 and 0.99
# and that seff is p in the aux vars)
#
# If you want to add another test for another UserObject
# then add the UserObject, add a Function defining the expected result,
# add an AuxVariable and AuxKernel that will record the UserObjects value
# and finally add a NodalL2Error that compares this with the Function.
[UserObjects]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermPower5]
type = RichardsRelPermPower
simm = 0.0
n = 5
[../]
[./RelPermVG]
type = RichardsRelPermVG
simm = 0.0
m = 0.8
[../]
[./RelPermVG1]
type = RichardsRelPermVG1
simm = 0.0
m = 0.8
scut = 1E-6 # then we get a cubic
[../]
[./RelPermBW]
type = RichardsRelPermBW
Sn = 0.05
Ss = 0.95
Kn = 0.0
Ks = 1.0
C = 1.5
[../]
[./RelPermMonomial]
type = RichardsRelPermMonomial
simm = 0.0
n = 3
[../]
[./RelPermPowerGas]
type = RichardsRelPermPowerGas
simm = 0.0
n = 5
[../]
[./Q2PRelPermPowerGas]
type = Q2PRelPermPowerGas
simm = 0.0
n = 5
[../]
[./RelPermMonomial_zero]
type = RichardsRelPermMonomial
simm = 0.1
n = 0
zero_to_the_zero = 0
[../]
# following are unimportant in this test
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E6
[../]
[./SeffVG]
type = RichardsSeff1VG
m = 0.8
al = 1E-6
[../]
[./RelPermPower_unimportant]
type = RichardsRelPermPower
simm = 0.10101
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0.054321
sum_s_res = 0.054321
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E5
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = x
[../]
[./answer_RelPermPower]
type = ParsedFunction
expression = ((n+1)*(x^n))-(n*(x^(n+1)))
symbol_names = 'n'
symbol_values = '2'
[../]
[./answer_dRelPermPower]
type = GradParsedFunction
direction = '1E-4 0 0'
expression = ((n+1)*(x^n))-(n*(x^(n+1)))
symbol_names = 'n'
symbol_values = '2'
[../]
[./answer_d2RelPermPower]
type = Grad2ParsedFunction
direction = '1E-3 0 0'
expression = ((n+1)*(x^n))-(n*(x^(n+1)))
symbol_names = 'n'
symbol_values = '2'
[../]
[./answer_RelPermPower5]
type = ParsedFunction
expression = ((n+1)*(x^n))-(n*(x^(n+1)))
symbol_names = 'n'
symbol_values = '5'
[../]
[./answer_dRelPermPower5]
type = GradParsedFunction
direction = '1E-4 0 0'
expression = ((n+1)*(x^n))-(n*(x^(n+1)))
symbol_names = 'n'
symbol_values = '5'
[../]
[./answer_d2RelPermPower5]
type = Grad2ParsedFunction
direction = '1E-5 0 0'
expression = ((n+1)*(x^n))-(n*(x^(n+1)))
symbol_names = 'n'
symbol_values = '5'
[../]
[./answer_RelPermVG]
type = ParsedFunction
expression = (x^(0.5))*(1-(1-(x^(1.0/m)))^m)^2
symbol_names = 'm'
symbol_values = '0.8'
[../]
[./answer_dRelPermVG]
type = GradParsedFunction
direction = '1E-4 0 0'
expression = (x^(0.5))*(1-(1-(x^(1.0/m)))^m)^2
symbol_names = 'm'
symbol_values = '0.8'
[../]
[./answer_d2RelPermVG]
type = Grad2ParsedFunction
direction = '1E-5 0 0'
expression = (x^(0.5))*(1-(1-(x^(1.0/m)))^m)^2
symbol_names = 'm'
symbol_values = '0.8'
[../]
[./answer_RelPermVG1]
type = ParsedFunction
expression = x^3
[../]
[./answer_dRelPermVG1]
type = GradParsedFunction
direction = '1E-4 0 0'
expression = x^3
[../]
[./answer_d2RelPermVG1]
type = Grad2ParsedFunction
direction = '1E-5 0 0'
expression = x^3
[../]
[./answer_RelPermBW]
type = ParsedFunction
expression = if(x>ss,1,if(x<sn,0,kn+(((x-sn)/(ss-sn))^2)*(c-1)*(ks-kn)/(c-((x-sn)/(ss-sn)))))
symbol_names = 'kn ks c sn ss'
symbol_values = '0 1 1.5 0.05 0.95'
[../]
[./answer_dRelPermBW]
type = GradParsedFunction
direction = '1E-4 0 0'
expression = if(x>ss,1,if(x<sn,0,kn+(((x-sn)/(ss-sn))^2)*(c-1)*(ks-kn)/(c-((x-sn)/(ss-sn)))))
symbol_names = 'kn ks c sn ss'
symbol_values = '0 1 1.5 0.05 0.95'
[../]
[./answer_d2RelPermBW]
type = Grad2ParsedFunction
direction = '1E-5 0 0'
expression = if(x>ss,1,if(x<sn,0,kn+(((x-sn)/(ss-sn))^2)*(c-1)*(ks-kn)/(c-((x-sn)/(ss-sn)))))
symbol_names = 'kn ks c sn ss'
symbol_values = '0 1 1.5 0.05 0.95'
[../]
[./answer_RelPermMonomial]
type = ParsedFunction
expression = x^n
symbol_names = 'n'
symbol_values = '3'
[../]
[./answer_dRelPermMonomial]
type = GradParsedFunction
direction = '1E-4 0 0'
expression = x^n
symbol_names = 'n'
symbol_values = '3'
[../]
[./answer_d2RelPermMonomial]
type = Grad2ParsedFunction
direction = '1E-3 0 0'
expression = x^n
symbol_names = 'n'
symbol_values = '3'
[../]
[./answer_RelPermMonomial_zero]
type = ParsedFunction
expression = if(x>simm,1,0)
symbol_names = 'simm'
symbol_values = '0.1'
[../]
[./answer_dRelPermMonomial_zero]
type = GradParsedFunction
direction = '1E-4 0 0'
expression = if(x>simm,1,0)
symbol_names = 'simm'
symbol_values = '0.1'
[../]
[./answer_d2RelPermMonomial_zero]
type = Grad2ParsedFunction
direction = '1E-3 0 0'
expression = if(x>simm,1,0)
symbol_names = 'simm'
symbol_values = '0.1'
[../]
[./answer_RelPermPowerGas]
type = ParsedFunction
expression = 1-((n+1)*((1-x)^n))+(n*((1-x)^(n+1)))
symbol_names = 'n'
symbol_values = '5'
[../]
[./answer_dRelPermPowerGas]
type = GradParsedFunction
direction = '1E-4 0 0'
expression = 1-((n+1)*((1-x)^n))+(n*((1-x)^(n+1)))
symbol_names = 'n'
symbol_values = '5'
[../]
[./answer_d2RelPermPowerGas]
type = Grad2ParsedFunction
direction = '1E-5 0 0'
expression = 1-((n+1)*((1-x)^n))+(n*((1-x)^(n+1)))
symbol_names = 'n'
symbol_values = '5'
[../]
[./answer_Q2PRelPermPowerGas]
type = ParsedFunction
expression = 1-((n+1)*(x^n))+(n*(x^(n+1)))
symbol_names = 'n'
symbol_values = '5'
[../]
[./answer_dQ2PRelPermPowerGas]
type = GradParsedFunction
direction = '1E-4 0 0'
expression = 1-((n+1)*(x^n))+(n*(x^(n+1)))
symbol_names = 'n'
symbol_values = '5'
[../]
[./answer_d2Q2PRelPermPowerGas]
type = Grad2ParsedFunction
direction = '1E-5 0 0'
expression = 1-((n+1)*(x^n))+(n*(x^(n+1)))
symbol_names = 'n'
symbol_values = '5'
[../]
[]
[AuxVariables]
[./RelPermPower_Aux]
[../]
[./dRelPermPower_Aux]
[../]
[./d2RelPermPower_Aux]
[../]
[./RelPermPower5_Aux]
[../]
[./dRelPermPower5_Aux]
[../]
[./d2RelPermPower5_Aux]
[../]
[./RelPermVG_Aux]
[../]
[./dRelPermVG_Aux]
[../]
[./d2RelPermVG_Aux]
[../]
[./RelPermVG1_Aux]
[../]
[./dRelPermVG1_Aux]
[../]
[./d2RelPermVG1_Aux]
[../]
[./RelPermBW_Aux]
[../]
[./dRelPermBW_Aux]
[../]
[./d2RelPermBW_Aux]
[../]
[./RelPermMonomial_Aux]
[../]
[./dRelPermMonomial_Aux]
[../]
[./d2RelPermMonomial_Aux]
[../]
[./RelPermPowerGas_Aux]
[../]
[./dRelPermPowerGas_Aux]
[../]
[./d2RelPermPowerGas_Aux]
[../]
[./Q2PRelPermPowerGas_Aux]
[../]
[./dQ2PRelPermPowerGas_Aux]
[../]
[./d2Q2PRelPermPowerGas_Aux]
[../]
[./RelPermMonomial_zero_Aux]
[../]
[./dRelPermMonomial_zero_Aux]
[../]
[./d2RelPermMonomial_zero_Aux]
[../]
[./check_Aux]
[../]
[]
[AuxKernels]
[./RelPermPower_AuxK]
type = RichardsRelPermAux
variable = RelPermPower_Aux
relperm_UO = RelPermPower
seff_var = pressure
[../]
[./dRelPermPower_AuxK]
type = RichardsRelPermPrimeAux
variable = dRelPermPower_Aux
relperm_UO = RelPermPower
seff_var = pressure
[../]
[./d2RelPermPower_AuxK]
type = RichardsRelPermPrimePrimeAux
variable = d2RelPermPower_Aux
relperm_UO = RelPermPower
seff_var = pressure
[../]
[./RelPermPower5_AuxK]
type = RichardsRelPermAux
variable = RelPermPower5_Aux
relperm_UO = RelPermPower5
seff_var = pressure
[../]
[./dRelPermPower5_AuxK]
type = RichardsRelPermPrimeAux
variable = dRelPermPower5_Aux
relperm_UO = RelPermPower5
seff_var = pressure
[../]
[./d2RelPermPower5_AuxK]
type = RichardsRelPermPrimePrimeAux
variable = d2RelPermPower5_Aux
relperm_UO = RelPermPower5
seff_var = pressure
[../]
[./RelPermVG_AuxK]
type = RichardsRelPermAux
variable = RelPermVG_Aux
relperm_UO = RelPermVG
seff_var = pressure
[../]
[./dRelPermVG_AuxK]
type = RichardsRelPermPrimeAux
variable = dRelPermVG_Aux
relperm_UO = RelPermVG
seff_var = pressure
[../]
[./d2RelPermVG_AuxK]
type = RichardsRelPermPrimePrimeAux
variable = d2RelPermVG_Aux
relperm_UO = RelPermVG
seff_var = pressure
[../]
[./RelPermVG1_AuxK]
type = RichardsRelPermAux
variable = RelPermVG1_Aux
relperm_UO = RelPermVG1
seff_var = pressure
[../]
[./dRelPermVG1_AuxK]
type = RichardsRelPermPrimeAux
variable = dRelPermVG1_Aux
relperm_UO = RelPermVG1
seff_var = pressure
[../]
[./d2RelPermVG1_AuxK]
type = RichardsRelPermPrimePrimeAux
variable = d2RelPermVG1_Aux
relperm_UO = RelPermVG1
seff_var = pressure
[../]
[./RelPermBW_AuxK]
type = RichardsRelPermAux
variable = RelPermBW_Aux
relperm_UO = RelPermBW
seff_var = pressure
[../]
[./dRelPermBW_AuxK]
type = RichardsRelPermPrimeAux
variable = dRelPermBW_Aux
relperm_UO = RelPermBW
seff_var = pressure
[../]
[./d2RelPermBW_AuxK]
type = RichardsRelPermPrimePrimeAux
variable = d2RelPermBW_Aux
relperm_UO = RelPermBW
seff_var = pressure
[../]
[./RelPermMonomial_AuxK]
type = RichardsRelPermAux
variable = RelPermMonomial_Aux
relperm_UO = RelPermMonomial
seff_var = pressure
[../]
[./dRelPermMonomial_AuxK]
type = RichardsRelPermPrimeAux
variable = dRelPermMonomial_Aux
relperm_UO = RelPermMonomial
seff_var = pressure
[../]
[./d2RelPermMonomial_AuxK]
type = RichardsRelPermPrimePrimeAux
variable = d2RelPermMonomial_Aux
relperm_UO = RelPermMonomial
seff_var = pressure
[../]
[./RelPermPowerGas_AuxK]
type = RichardsRelPermAux
variable = RelPermPowerGas_Aux
relperm_UO = RelPermPowerGas
seff_var = pressure
[../]
[./dRelPermPowerGas_AuxK]
type = RichardsRelPermPrimeAux
variable = dRelPermPowerGas_Aux
relperm_UO = RelPermPowerGas
seff_var = pressure
[../]
[./d2RelPermPowerGas_AuxK]
type = RichardsRelPermPrimePrimeAux
variable = d2RelPermPowerGas_Aux
relperm_UO = RelPermPowerGas
seff_var = pressure
[../]
[./Q2PRelPermPowerGas_AuxK]
type = RichardsRelPermAux
variable = Q2PRelPermPowerGas_Aux
relperm_UO = Q2PRelPermPowerGas
seff_var = pressure
[../]
[./dQ2PRelPermPowerGas_AuxK]
type = RichardsRelPermPrimeAux
variable = dQ2PRelPermPowerGas_Aux
relperm_UO = Q2PRelPermPowerGas
seff_var = pressure
[../]
[./d2Q2PRelPermPowerGas_AuxK]
type = RichardsRelPermPrimePrimeAux
variable = d2Q2PRelPermPowerGas_Aux
relperm_UO = Q2PRelPermPowerGas
seff_var = pressure
[../]
[./RelPermMonomial_zero_AuxK]
type = RichardsRelPermAux
variable = RelPermMonomial_zero_Aux
relperm_UO = RelPermMonomial_zero
seff_var = pressure
[../]
[./dRelPermMonomial_zero_AuxK]
type = RichardsRelPermPrimeAux
variable = dRelPermMonomial_zero_Aux
relperm_UO = RelPermMonomial_zero
seff_var = pressure
[../]
[./d2RelPermMonomial_zero_AuxK]
type = RichardsRelPermPrimePrimeAux
variable = d2RelPermMonomial_zero_Aux
relperm_UO = RelPermMonomial_zero
seff_var = pressure
[../]
[./check_AuxK]
type = FunctionAux
variable = check_Aux
function = answer_RelPermBW
[../]
[]
[Postprocessors]
[./cf_RelPermPower]
type = NodalL2Error
function = answer_RelPermPower
variable = RelPermPower_Aux
[../]
[./cf_dRelPermPower]
type = NodalL2Error
function = answer_dRelPermPower
variable = dRelPermPower_Aux
[../]
[./cf_d2RelPermPower]
type = NodalL2Error
function = answer_d2RelPermPower
variable = d2RelPermPower_Aux
[../]
[./cf_RelPermPower5]
type = NodalL2Error
function = answer_RelPermPower5
variable = RelPermPower5_Aux
[../]
[./cf_dRelPermPower5]
type = NodalL2Error
function = answer_dRelPermPower5
variable = dRelPermPower5_Aux
[../]
[./cf_d2RelPermPower5]
type = NodalL2Error
function = answer_d2RelPermPower5
variable = d2RelPermPower5_Aux
[../]
[./cf_RelPermVG]
type = NodalL2Error
function = answer_RelPermVG
variable = RelPermVG_Aux
[../]
[./cf_dRelPermVG]
type = NodalL2Error
function = answer_dRelPermVG
variable = dRelPermVG_Aux
[../]
[./cf_d2RelPermVG]
type = NodalL2Error
function = answer_d2RelPermVG
variable = d2RelPermVG_Aux
[../]
[./cf_RelPermVG1]
type = NodalL2Error
function = answer_RelPermVG1
variable = RelPermVG1_Aux
[../]
[./cf_dRelPermVG1]
type = NodalL2Error
function = answer_dRelPermVG1
variable = dRelPermVG1_Aux
[../]
[./cf_d2RelPermVG1]
type = NodalL2Error
function = answer_d2RelPermVG1
variable = d2RelPermVG1_Aux
[../]
[./cf_RelPermBW]
type = NodalL2Error
function = answer_RelPermBW
variable = RelPermBW_Aux
[../]
[./cf_dRelPermBW]
type = NodalL2Error
function = answer_dRelPermBW
variable = dRelPermBW_Aux
[../]
[./cf_d2RelPermBW]
type = NodalL2Error
function = answer_d2RelPermBW
variable = d2RelPermBW_Aux
[../]
[./cf_RelPermMonomial]
type = NodalL2Error
function = answer_RelPermMonomial
variable = RelPermMonomial_Aux
[../]
[./cf_dRelPermMonomial]
type = NodalL2Error
function = answer_dRelPermMonomial
variable = dRelPermMonomial_Aux
[../]
[./cf_d2RelPermMonomial]
type = NodalL2Error
function = answer_d2RelPermMonomial
variable = d2RelPermMonomial_Aux
[../]
[./cf_RelPermPowerGas]
type = NodalL2Error
function = answer_RelPermPowerGas
variable = RelPermPowerGas_Aux
[../]
[./cf_dRelPermPowerGas]
type = NodalL2Error
function = answer_dRelPermPowerGas
variable = dRelPermPowerGas_Aux
[../]
[./cf_d2RelPermPowerGas]
type = NodalL2Error
function = answer_d2RelPermPowerGas
variable = d2RelPermPowerGas_Aux
[../]
[./cf_Q2PRelPermPowerGas]
type = NodalL2Error
function = answer_Q2PRelPermPowerGas
variable = Q2PRelPermPowerGas_Aux
[../]
[./cf_dQ2PRelPermPowerGas]
type = NodalL2Error
function = answer_dQ2PRelPermPowerGas
variable = dQ2PRelPermPowerGas_Aux
[../]
[./cf_d2Q2PRelPermPowerGas]
type = NodalL2Error
function = answer_d2Q2PRelPermPowerGas
variable = d2Q2PRelPermPowerGas_Aux
[../]
[./cf_RelPermMonomial_zero]
type = NodalL2Error
function = answer_RelPermMonomial_zero
variable = RelPermMonomial_zero_Aux
[../]
[./cf_dRelPermMonomial_zero]
type = NodalL2Error
function = answer_dRelPermMonomial_zero
variable = dRelPermMonomial_zero_Aux
[../]
[./cf_d2RelPermMonomial_zero]
type = NodalL2Error
function = answer_d2RelPermMonomial_zero
variable = d2RelPermMonomial_zero_Aux
[../]
[]
#############################################################################
#
# Following is largely unimportant as we are not running an actual similation
#
#############################################################################
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = 0.01
xmax = 0.99
[]
[Variables]
[./pressure]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_pressure
[../]
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
richardsVarNames_UO = PPNames
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
richardsVarNames_UO = PPNames
variable = pressure
[../]
[]
[Materials]
[./unimportant_material]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-20 0 0 0 1E-20 0 0 0 1E-20'
richardsVarNames_UO = PPNames
density_UO = DensityConstBulk
relperm_UO = RelPermPower_unimportant
sat_UO = Saturation
seff_UO = SeffVG
SUPG_UO = SUPGstandard
viscosity = 1E-3
gravity = '0 0 -10'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./does_nothing]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E50 1E50 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
num_steps = 1
dt = 1E-100
[]
[Outputs]
execute_on = 'timestep_end'
active = 'csv'
file_base = uo1
[./csv]
type = CSV
[../]
[./exodus]
type = Exodus
hide = pressure
[../]
[]
(test/tests/time_integrators/actually_explicit_euler_verification/ee-2d-linear.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Functions]
[./ic]
type = ParsedFunction
expression = 0
[../]
[./forcing_fn]
type = ParsedFunction
expression = (x+y)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*(x+y)
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic
[../]
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
preset = false
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
start_time = 0.0
num_steps = 20
dt = 0.00005
l_tol = 1e-12
[./TimeIntegrator]
type = ActuallyExplicitEuler
[../]
[]
[Outputs]
exodus = true
[./console]
type = Console
max_rows = 10
[../]
[]
(test/tests/postprocessors/num_nodes/num_nodes.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
nz = 0
zmax = 0
elem_type = QUAD4
uniform_refine = 1
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./u_aux]
order = FIRST
family = LAGRANGE
[../]
[./v_aux]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 3
dt = 1
solve_type = PJFNK
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 3
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Postprocessors]
[./num_nodes]
type = NumNodes
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
csv = true
[]
(test/tests/auxkernels/time_derivative/time_derivative.i)
# This test is setting the values of an auxiliary varaible f according to the
# function f_fn. This function is time dependent.
#
# Then the f_dot is brought as a forcing function into the L2 projection, thus
# the resulting values of u should give the f_dot which is known.
#
# NOTE: There is no need to do more than 2 time steps, because f_dot is constant
# in time. That means that the projection is exactly the same for the second time
# step as is for the first time step. The solver has nothing to do and you can
# see that on the "zero" initial non-linear residual.
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
[]
[Functions]
[./f_fn]
type = ParsedFunction
expression = t*(x+y)
[../]
[./f_dot_fn]
type = ParsedFunction
expression = (x+y)
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./l2_proj]
type = Reaction
variable = u
[../]
[./dck]
type = DotCouplingKernel
variable = u
v = f
[../]
[]
[AuxVariables]
[./f]
[../]
[]
[AuxKernels]
[./f_k]
type = FunctionAux
variable = f
function = f_fn
[../]
[]
[Postprocessors]
[./l2_error]
type = ElementL2Error
variable = u
function = f_dot_fn
[../]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 2
nl_abs_tol = 1.e-15
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/boussinesq/transient-wcnsfv.i)
mu = 1
rho = 'rho'
k = 1
cp = 1
l = 10
velocity_interp_method = 'rc'
advected_interp_method = 'average'
cold_temp=300
hot_temp=310
[GlobalParams]
two_term_boundary_expansion = true
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
[]
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${l}
ymin = 0
ymax = ${l}
nx = 16
ny = 16
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 1e-15
[]
[v]
type = INSFVVelocityVariable
initial_condition = 1e-15
[]
[pressure]
type = INSFVPressureVariable
initial_condition = 1e5
[]
[T]
type = INSFVEnergyVariable
scaling = 1e-4
initial_condition = ${cold_temp}
[]
[]
[AuxVariables]
[U]
order = CONSTANT
family = MONOMIAL
fv = true
[]
[vel_x]
order = FIRST
family = MONOMIAL
[]
[vel_y]
order = FIRST
family = MONOMIAL
[]
[viz_T]
order = FIRST
family = MONOMIAL
[]
[]
[AuxKernels]
[mag]
type = VectorMagnitudeAux
variable = U
x = u
y = v
execute_on = 'initial timestep_end'
[]
[vel_x]
type = ParsedAux
variable = vel_x
expression = 'u'
execute_on = 'initial timestep_end'
coupled_variables = 'u'
[]
[vel_y]
type = ParsedAux
variable = vel_y
expression = 'v'
execute_on = 'initial timestep_end'
coupled_variables = 'v'
[]
[viz_T]
type = ParsedAux
variable = viz_T
expression = 'T'
execute_on = 'initial timestep_end'
coupled_variables = 'T'
[]
[]
[FVKernels]
[mass_time]
type = WCNSFVMassTimeDerivative
variable = pressure
drho_dt = drho_dt
[]
[mass]
type = WCNSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_time]
type = WCNSFVMomentumTimeDerivative
variable = u
drho_dt = drho_dt
rho = rho
momentum_component = 'x'
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[u_gravity]
type = INSFVMomentumGravity
variable = u
gravity = '0 -1 0'
rho = ${rho}
momentum_component = 'x'
[]
[v_time]
type = WCNSFVMomentumTimeDerivative
variable = v
drho_dt = drho_dt
rho = rho
momentum_component = 'y'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[v_gravity]
type = INSFVMomentumGravity
variable = v
gravity = '0 -1 0'
rho = ${rho}
momentum_component = 'y'
[]
[temp_conduction]
type = FVDiffusion
coeff = 'k'
variable = T
[]
[temp_advection]
type = INSFVEnergyAdvection
variable = T
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
[]
[]
[FVBCs]
[no_slip_x]
type = INSFVNoSlipWallBC
variable = u
boundary = 'left right top bottom'
function = 0
[]
[no_slip_y]
type = INSFVNoSlipWallBC
variable = v
boundary = 'left right top bottom'
function = 0
[]
[T_hot]
type = FVDirichletBC
variable = T
boundary = left
value = ${hot_temp}
[]
[T_cold]
type = FVDirichletBC
variable = T
boundary = right
value = ${cold_temp}
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[FunctorMaterials]
[const_functor]
type = ADGenericFunctorMaterial
prop_names = 'cp k'
prop_values = '${cp} ${k}'
[]
[rho]
type = RhoFromPTFunctorMaterial
fp = fp
temperature = T
pressure = pressure
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = 'T'
rho = ${rho}
[]
[]
[Functions]
[lid_function]
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
steady_state_detection = true
[TimeStepper]
type = IterationAdaptiveDT
dt = 1e-5
optimal_iterations = 6
[]
nl_abs_tol = 1e-9
normalize_solution_diff_norm_by_dt = false
nl_max_its = 10
[]
[Outputs]
[out]
type = Exodus
[]
[]
(test/tests/markers/error_fraction_marker/error_fraction_marker_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 10
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Functions]
[solution]
type = ParsedFunction
expression = (exp(x)-1)/(exp(1)-1)
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[conv]
type = Convection
variable = u
velocity = '1 0 0'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Adaptivity]
[Indicators]
[error]
type = AnalyticalIndicator
variable = u
function = solution
[]
[]
[Markers]
[marker]
type = ErrorFractionMarker
coarsen = 0.1
indicator = error
refine = 0.3
[]
[]
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/side_diffusive_flux_integral/vector_functor_prop.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./right_bc]
# Flux BC for computing the analytical solution in the postprocessor
type = ParsedFunction
expression = exp(y)+1
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = FunctionNeumannBC
variable = u
boundary = right
function = right_bc
[../]
[]
[Materials]
[./mat_props_vector_functor]
type = ADGenericVectorFunctorMaterial
prop_names = diffusivity_vec
prop_values = '1 1.5 1'
[../]
[conversion]
type = PropFromFunctorProp
vector_functor = diffusivity_vec
vector_prop = diffusivity_vec
[]
[]
[Postprocessors]
[./avg_flux_right]
# Computes -\int(exp(y)+1) from 0 to 1 which is -2.718281828
type = ADSideVectorDiffusivityFluxIntegral
variable = u
boundary = right
diffusivity = diffusivity_vec
[../]
[./avg_flux_top]
type = ADSideVectorDiffusivityFluxIntegral
variable = u
boundary = top
diffusivity = diffusivity_vec
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/variables/coupled_scalar/coupled_scalar_old.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Functions]
[./lin1_fn]
type = ParsedFunction
expression = t
[../]
[./lin2_fn]
type = ParsedFunction
expression = 't+1'
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./aux_scalar]
order = SECOND
family = SCALAR
[../]
[./coupled]
[../]
[./coupled_1]
[../]
[]
[ICs]
[./aux_scalar_ic]
variable = aux_scalar
values = '1.2 4.3'
type = ScalarComponentIC
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./coupled]
type = CoupledScalarAux
variable = coupled
coupled = aux_scalar
[../]
[./coupled_1]
# Coupling to the "1" component of an aux scalar
type = CoupledScalarAux
variable = coupled_1
component = 1
coupled = aux_scalar
[../]
[]
[AuxScalarKernels]
[./aux_scalar_k]
type = FunctionScalarAux
variable = aux_scalar
function = 'lin1_fn lin2_fn'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 4
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/heat_conduction_patch/heat_conduction_patch_hex20_aniso.i)
# This problem is taken from the Abaqus verification manual:
# "1.5.8 Patch test for heat transfer elements"
#
# The temperature on the exterior nodes is 200x+100y+200z.
#
# This gives a constant flux at all Gauss points.
#
# In addition, the temperature at all nodes follows the same formula.
#
# Node x y z Temperature
# 1 1.000E+00 0.000E+00 1.000E+00 4.0000E+02
# 2 6.770E-01 3.050E-01 6.830E-01 3.0250E+02
# 3 3.200E-01 1.860E-01 6.430E-01 2.1120E+02
# 4 0.000E+00 0.000E+00 1.000E+00 2.0000E+02
# 5 1.000E+00 1.000E+00 1.000E+00 5.0000E+02
# 6 7.880E-01 6.930E-01 6.440E-01 3.5570E+02
# 7 1.650E-01 7.450E-01 7.020E-01 2.4790E+02
# 8 0.000E+00 1.000E+00 1.000E+00 3.0000E+02
# 9 8.385E-01 1.525E-01 8.415E-01 3.5125E+02
# 10 4.985E-01 2.455E-01 6.630E-01 2.5685E+02
# 11 1.600E-01 9.300E-02 8.215E-01 2.0560E+02
# 12 5.000E-01 0.000E+00 1.000E+00 3.0000E+02
# 13 1.000E+00 5.000E-01 1.000E+00 4.5000E+02
# 14 7.325E-01 4.990E-01 6.635E-01 3.2910E+02
# 15 2.425E-01 4.655E-01 6.725E-01 2.2955E+02
# 16 0.000E+00 5.000E-01 1.000E+00 2.5000E+02
# 17 8.940E-01 8.465E-01 8.220E-01 4.2785E+02
# 18 4.765E-01 7.190E-01 6.730E-01 3.0180E+02
# 19 8.250E-02 8.725E-01 8.510E-01 2.7395E+02
# 20 5.000E-01 1.000E+00 1.000E+00 4.0000E+02
# 21 1.000E+00 0.000E+00 0.000E+00 2.0000E+02
# 22 0.000E+00 0.000E+00 0.000E+00 0.0000E+00
# 23 8.260E-01 2.880E-01 2.880E-01 2.5160E+02
# 24 2.490E-01 3.420E-01 1.920E-01 1.2240E+02
# 25 1.000E+00 0.000E+00 5.000E-01 3.0000E+02
# 26 5.000E-01 0.000E+00 0.000E+00 1.0000E+02
# 27 0.000E+00 0.000E+00 5.000E-01 1.0000E+02
# 28 9.130E-01 1.440E-01 1.440E-01 2.2580E+02
# 29 1.245E-01 1.710E-01 9.600E-02 6.1200E+01
# 30 7.515E-01 2.965E-01 4.855E-01 2.7705E+02
# 31 5.375E-01 3.150E-01 2.400E-01 1.8700E+02
# 32 2.845E-01 2.640E-01 4.175E-01 1.6680E+02
# 33 2.730E-01 7.500E-01 2.300E-01 1.7560E+02
# 34 0.000E+00 1.000E+00 0.000E+00 1.0000E+02
# 35 2.610E-01 5.460E-01 2.110E-01 1.4900E+02
# 36 0.000E+00 5.000E-01 0.000E+00 5.0000E+01
# 37 2.190E-01 7.475E-01 4.660E-01 2.1175E+02
# 38 1.365E-01 8.750E-01 1.150E-01 1.3780E+02
# 39 0.000E+00 1.000E+00 5.000E-01 2.0000E+02
# 40 8.500E-01 6.490E-01 2.630E-01 2.8750E+02
# 41 8.380E-01 4.685E-01 2.755E-01 2.6955E+02
# 42 8.190E-01 6.710E-01 4.535E-01 3.2160E+02
# 43 5.615E-01 6.995E-01 2.465E-01 2.3155E+02
# 44 1.000E+00 1.000E+00 0.000E+00 3.0000E+02
# 45 1.000E+00 5.000E-01 0.000E+00 2.5000E+02
# 46 1.000E+00 1.000E+00 5.000E-01 4.0000E+02
# 47 9.250E-01 8.245E-01 1.315E-01 2.9375E+02
# 48 5.000E-01 1.000E+00 0.000E+00 2.0000E+02
[Mesh]#Comment
file = heat_conduction_patch_hex20.e
[] # Mesh
[Functions]
[./temp_function]
type = ParsedFunction
expression ='200*x+100*y+200*z'
[../]
[] # Functions
[Variables]
[./temp]
order = SECOND
family = LAGRANGE
[../]
[] # Variables
[Kernels]
[./heat_r]
type = AnisoHeatConduction
variable = temp
[../]
[] # Kernels
[BCs]
[./temperatures]
type = FunctionDirichletBC
variable = temp
boundary = 10
function = temp_function
[../]
[] # BCs
[Materials]
[./heat]
type = AnisoHeatConductionMaterial
block = 1
specific_heat = 0.116
thermal_conductivity = '4.85e-4 0 0 0 4.85e-4 0 0 0 4.85e-4'
temperature = temp
[../]
[] # Materials
[Executioner]
type = Steady
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
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
[./Quadrature]
order = THIRD
[../]
[] # Executioner
[Outputs]
file_base = heat_conduction_patch_hex20_out
exodus = true
[] # Output
(modules/optimization/examples/diffusion_reaction/forward_exact.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
dim = 2
nx = 16
ny = 16
xmin = 0
xmax = 1
ymin = 0
ymax = 1
[]
[]
[Variables/u]
[]
[Functions]
[rxn_func]
type = ParsedFunction
expression = 'exp(x * y) - 1'
[]
[]
[Materials]
[ad_dc_prop]
type = ADParsedMaterial
expression = '1 + u'
coupled_variables = 'u'
property_name = dc_prop
[]
[ad_rxn_prop]
type = ADGenericFunctionMaterial
prop_values = 'rxn_func'
prop_names = rxn_prop
outputs = exodus
[]
#ADMatReaction includes a negative sign in residual evaluation, so we need to
#reverse this with a negative reaction rate. However, we wanted the parameter
#to remain positive in the optimization problem so we do the same thing here,
#which is why there is one object to evaluate function and another to flip
#it's sign for the kernel
[ad_neg_rxn_prop]
type = ADParsedMaterial
expression = '-rxn_prop'
material_property_names = 'rxn_prop'
property_name = 'neg_rxn_prop'
[]
[]
[Kernels]
[udot]
type = ADTimeDerivative
variable = u
[]
[diff]
type = ADMatDiffusion
variable = u
diffusivity = dc_prop
[]
[reaction]
type = ADMatReaction
variable = u
reaction_rate = neg_rxn_prop
[]
[src]
type = ADBodyForce
variable = u
value = 1
[]
[]
[BCs]
[dirichlet]
type = DirichletBC
variable = u
boundary = 'left bottom'
value = 0
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 0.1
end_time = 1
[]
[Reporters]
[sample]
type = TransientSyntheticDataCreator
variable = u
single_set_of_measurement_points = '0.625 0.625 0 0.5 0.5 0 0.25 0.25 0
0.875 0.625 0 0.625 0.875 0 0.75 0.25 0 0.25 0.75 0 0.8125 0.9375 0
0.75 0.75 0
0.8125 0.75 0
0.875 0.75 0
0.9375 0.75 0
1 0.75 0
0.8125 0.8125 0
0.875 0.8125 0
0.9375 0.8125 0
1 0.8125 0
0.875 0.875 0
0.9375 0.875 0
1 0.875 0
0.9375 0.9375 0
1 0.9375 0
1 1 0'
measurement_times_for_all_points = '0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0'
outputs = csv_final
[]
[]
[AuxVariables]
[reaction_rate]
[]
[]
[AuxKernels]
[reaction_rate_aux]
type = FunctionAux
variable = reaction_rate
function = rxn_func
execute_on = TIMESTEP_END
[]
[]
[Postprocessors]
[u1]
type = PointValue
variable = u
point = '0.25 0.25 0'
[]
[u2]
type = PointValue
variable = u
point = '0.75 0.75 0'
[]
[u3]
type = PointValue
variable = u
point = '1 1 0'
[]
[]
[Outputs]
exodus = true
csv = true
[csv_final]
type = CSV
execute_on = 'FINAL'
file_base = forward_exact_csv
[]
[]
(test/tests/indicators/laplacian_jump_indicator/biharmonic.i)
[GlobalParams]
# Parameters used by Functions.
vars = 'c'
vals = '50'
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
nx = 10
ny = 10
[]
[Variables]
[./u]
order = THIRD
family = HERMITE
[../]
[]
[Kernels]
[./biharmonic]
type = Biharmonic
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
function = forcing_func
[../]
[]
[BCs]
active = 'all_value all_flux'
[./all_value]
type = FunctionPenaltyDirichletBC
variable = u
boundary = 'left right top bottom'
function = u_func
penalty = 1e10
[../]
[./all_flux]
type = FunctionPenaltyFluxBC
variable = u
boundary = 'left right top bottom'
function = u_func
penalty = 1e10
[../]
[./all_laplacian]
type = BiharmonicLapBC
variable = u
boundary = 'left right top bottom'
laplacian_function = lapu_func
[../]
[]
[Adaptivity]
[Indicators]
[error]
type = LaplacianJumpIndicator
variable = u
scale_by_flux_faces = true
[]
[]
[]
[Executioner]
type = Steady
# Note: the unusually tight tolerances here are due to the penalty
# BCs (currently the only way of accurately Dirichlet boundary
# conditions on Hermite elements in MOOSE).
nl_rel_tol = 1.e-15
l_tol = 1.e-15
# We have exact Jacobians
solve_type = 'NEWTON'
# Use 6x6 quadrature to ensure the forcing function is integrated
# accurately.
[./Quadrature]
type = GAUSS
order = ELEVENTH
[../]
[]
[Functions]
[./u_func]
type = ParsedGradFunction
value = 'exp(-c*(x^2+y^2))'
grad_x = '-2*c*exp(-c*(x^2+y^2))*x'
grad_y = '-2*c*exp(-c*(x^2+y^2))*y'
[../]
[./lapu_func]
type = ParsedFunction
expression = '4*c*(c*(x^2+y^2) - 1)*exp(-c*(x^2+y^2))'
[../]
[./forcing_func]
type = ParsedFunction
expression = '16*c^2*(c^2*(x^2+y^2)^2 - 4*c*(x^2+y^2) + 2)*exp(-c*(x^2+y^2))'
[../]
[]
[Postprocessors]
[./l2_error]
type = ElementL2Error
variable = u
function = u_func
[../]
[./h1_error]
type = ElementH1Error
variable = u
function = u_func
[../]
[]
[Outputs]
exodus = 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/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/cp_slip_rate_integ/crysp.i)
[Mesh]
type = GeneratedMesh
dim = 3
elem_type = HEX8
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxVariables]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./fp_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./e_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./gss1]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./tdisp]
type = ParsedFunction
expression = 0.01*t
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_zz]
type = RankTwoAux
variable = stress_zz
rank_two_tensor = stress
index_j = 2
index_i = 2
execute_on = timestep_end
[../]
[./fp_zz]
type = RankTwoAux
variable = fp_zz
rank_two_tensor = fp
index_j = 2
index_i = 2
execute_on = timestep_end
[../]
[./e_zz]
type = RankTwoAux
variable = e_zz
rank_two_tensor = lage
index_j = 2
index_i = 2
execute_on = timestep_end
[../]
[./gss1]
type = MaterialStdVectorAux
variable = gss1
property = gss
index = 0
execute_on = timestep_end
[../]
[]
[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
[../]
[./tdisp]
type = FunctionDirichletBC
variable = disp_z
boundary = front
function = tdisp
[../]
[]
[Materials]
[./crysp]
type = FiniteStrainCPSlipRateRes
gtol = 1e-2
rtol = 1e-8
abs_tol = 1e-15
slip_sys_file_name = input_slip_sys.txt
nss = 12
num_slip_sys_flowrate_props = 2 #Number of properties in a slip system
flowprops = '1 4 0.001 0.1 5 8 0.001 0.1 9 12 0.001 0.1'
hprops = '1.0 541.5 60.8 109.8 2.5'
gprops = '1 4 60.8 5 8 60.8 9 12 60.8'
tan_mod_type = exact
slip_incr_tol = 1
[../]
[./elasticity_tensor]
type = ComputeElasticityTensorCP
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
[../]
[./strain]
type = ComputeFiniteStrain
displacements = 'disp_x disp_y disp_z'
[../]
[]
[Postprocessors]
[./stress_zz]
type = ElementAverageValue
variable = stress_zz
[../]
[./fp_zz]
type = ElementAverageValue
variable = fp_zz
[../]
[./e_zz]
type = ElementAverageValue
variable = e_zz
[../]
[./gss1]
type = ElementAverageValue
variable = gss1
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
dt = 0.2
dtmin = 0.05
dtmax = 10.0
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
end_time = 1
[]
[Outputs]
file_base = out
exodus = true
print_linear_residuals = true
perf_graph = true
[]
(test/tests/executioners/transient_sync_time/transient_time_interval_output_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./bc_func]
type = ParsedFunction
expression = sin(pi*0.1*x*t)
[../]
# Laplacian of the function above
[./interior_func]
type = ParsedFunction
expression = 0.01*pi*pi*t*t*sin(0.1*pi*x*t)
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = interior_func
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = bc_func
[../]
[]
[Executioner]
type = Transient
dt = 1
start_time = 0
num_steps = 10
# These times will be sync'd in the output
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_tio
time_step_interval = 3
[./exodus]
type = Exodus
execute_on = 'final timestep_end'
[../]
[]
(modules/xfem/test/tests/moving_interface/verification/2D_xy_lsdep1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: 2D
# Coordinate System: xy
# Material Numbers/Types: level set dep 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# Transient 2D heat transfer problem in Cartesian coordinates designed with
# the Method of Manufactured Solutions. This problem was developed to verify
# XFEM performance on linear elements in the presence of a moving interface
# sweeping across the x-y coordinates of a system with thermal conductivity
# dependent upon the transient level set function. This problem can be
# exactly evaluated by FEM/Moose without the moving interface. Both the
# temperature and level set function are designed to be linear to attempt to
# minimize the error between the Moose/exact solution and XFEM results.
# Results:
# The temperature at the bottom left boundary (x=0, y=0) exhibits the largest
# difference between the FEM/Moose solution and XFEM results. We present the
# XFEM results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 479.9998738
# 0.6 520 519.9995114
# 0.8 560 559.9989360
# 1.0 600 599.9983833
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraints]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-100*x-100*y+200)-(5*t/1.04)'
[../]
[./neumann_func]
type = ParsedFunction
expression = '((0.01/1.04)*(-2.5*x-2.5*y-t)+1.55)*100*t'
[../]
[./dirichlet_right_func]
type = ParsedFunction
expression = '(-100*y+100)*t+400'
[../]
[./dirichlet_top_func]
type = ParsedFunction
expression = '(-100*x+100)*t+400'
[../]
[./k_func]
type = ParsedFunction
expression = '(0.01/1.04)*(-2.5*x-2.5*y-t)+1.55'
[../]
[./ls_func]
type = ParsedFunction
expression = '-0.5*(x+y) + 1.04 -0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericFunctionMaterial
prop_names = 'diffusion_coefficient'
prop_values = 'k_func'
[../]
[]
[BCs]
[./left_du]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = FunctionDirichletBC
variable = u
boundary = 'right'
function = dirichlet_right_func
[../]
[./bottom_du]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = neumann_func
[../]
[./top_u]
type = FunctionDirichletBC
variable = u
boundary = 'top'
function = dirichlet_top_func
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/bcs/ad_bc_preset_nodal/bc_function_preset.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./left]
type = ParsedFunction
expression = 'y'
[../]
[./right]
type = ParsedFunction
expression = '1+y'
[../]
[]
[Kernels]
active = 'diff'
[./diff]
type = ADDiffusion
variable = u
[../]
[]
[BCs]
active = 'left right'
[./left]
type = ADFunctionDirichletBC
variable = u
boundary = 3
function = left
[../]
[./right]
type = ADFunctionDirichletBC
variable = u
boundary = 1
function = right
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = bc_func_out
exodus = true
[]
(test/tests/linearfvkernels/block-restriction/block-restricted-diffusion.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '0.1 1 0.1'
dy = '0.1 0.5 0.1'
ix = '1 2 1'
iy = '1 1 1'
subdomain_id = '1 1 1 1 2 3 1 1 1'
[]
[transform]
type = TransformGenerator
input = cmg
transform = TRANSLATE
vector_value = '-0.1 -0.1 0.0'
[]
[create_sides]
type = SideSetsBetweenSubdomainsGenerator
input = transform
new_boundary = sides
primary_block = 2
paired_block = 1
[]
[create_outlet]
type = SideSetsBetweenSubdomainsGenerator
input = create_sides
new_boundary = outlet
primary_block = 2
paired_block = 3
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
block = 2
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = diff_coeff_func
use_nonorthogonal_correction = false
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "sides outlet"
functor = analytic_solution
[]
[]
[Functions]
[diff_coeff_func]
type = ParsedFunction
expression = '1.0+0.5*x*y'
[]
[source_func]
type = ParsedFunction
expression = '-1.0*x*pi*sin(x*pi)*cos(2*y*pi) - 0.5*y*pi*sin(2*y*pi)*cos(x*pi) + 5*pi^2*(0.5*x*y + 1.0)*sin(x*pi)*sin(2*y*pi)'
[]
[analytic_solution]
type = ParsedFunction
expression = 'sin(x*pi)*sin(2*y*pi) + 1.5'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = FINAL
block = 2
[]
[error]
type = ElementL2FunctorError
approximate = u
exact = analytic_solution
execute_on = FINAL
block = 2
[]
[]
[Executioner]
type = LinearPicardSteady
linear_systems_to_solve = u_sys
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
[csv]
type = CSV
execute_on = FINAL
[]
[]
(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
[]
[]
(test/tests/linearfvkernels/diffusion/diffusion-2d-rz.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 1
ymax = 0.5
[]
coord_type = RZ
rz_coord_axis = Y
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = coeff_func
use_nonorthogonal_correction = true
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "left right top bottom"
functor = analytic_solution
[]
[]
[Functions]
[coeff_func]
type = ParsedFunction
expression = '1+0.5*x*y'
[]
[source_func]
type = ParsedFunction
expression = '-(-1.0*x^2*y*(1.5 - x^2) + x*(1.5 - x^2)*(-1.0*x*y - 2))/x - (-1.0*x^2*y*(1.5 - y^2) - 4*x*(1.5 - y^2)*(0.5*x*y + 1))/x'
[]
[analytic_solution]
type = ParsedFunction
expression = '(1.5-x*x)*(1.5-y*y)'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = FINAL
[]
[error]
type = ElementL2FunctorError
approximate = u
exact = analytic_solution
execute_on = FINAL
[]
[]
[Executioner]
type = LinearPicardSteady
linear_systems_to_solve = u_sys
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
[csv]
type = CSV
execute_on = FINAL
[]
[exo]
type = Exodus
execute_on = FINAL
[]
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/scalar_kernel/2dscalar.i)
# 2D with mixed conditions on stress/strain
[GlobalParams]
displacements = 'disp_x disp_y'
large_kinematics = false
macro_gradient = hvar
[]
[Mesh]
[base]
type = FileMeshGenerator
file = '2d.exo'
[]
[sidesets]
type = SideSetsFromNormalsGenerator
input = base
normals = '-1 0 0
1 0 0
0 -1 0
0 1 0'
fixed_normal = true
new_boundary = 'left right bottom top'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[hvar]
family = SCALAR
order = THIRD
[]
[]
[AuxVariables]
[sxx]
family = MONOMIAL
order = CONSTANT
[]
[syy]
family = MONOMIAL
order = CONSTANT
[]
[sxy]
family = MONOMIAL
order = CONSTANT
[]
[exx]
family = MONOMIAL
order = CONSTANT
[]
[eyy]
family = MONOMIAL
order = CONSTANT
[]
[exy]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[sxx]
type = RankTwoAux
variable = sxx
rank_two_tensor = pk1_stress
index_i = 0
index_j = 0
[]
[syy]
type = RankTwoAux
variable = syy
rank_two_tensor = pk1_stress
index_i = 1
index_j = 1
[]
[sxy]
type = RankTwoAux
variable = sxy
rank_two_tensor = pk1_stress
index_i = 0
index_j = 1
[]
[exx]
type = RankTwoAux
variable = exx
rank_two_tensor = mechanical_strain
index_i = 0
index_j = 0
[]
[eyy]
type = RankTwoAux
variable = eyy
rank_two_tensor = mechanical_strain
index_i = 1
index_j = 1
[]
[exy]
type = RankTwoAux
variable = exy
rank_two_tensor = mechanical_strain
index_i = 0
index_j = 1
[]
[]
[Kernels]
[sdx]
type = HomogenizedTotalLagrangianStressDivergenceS
variable = disp_x
component = 0
macro_var = hvar
constraint_types = ${constraint_types}
targets = ${targets}
[]
[sdy]
type = HomogenizedTotalLagrangianStressDivergenceS
variable = disp_y
component = 1
macro_var = hvar
constraint_types = ${constraint_types}
targets = ${targets}
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[Functions]
[strain11]
type = ParsedFunction
value = '4.0e-2*t'
[]
[strain22]
type = ParsedFunction
value = '-2.0e-2*t'
[]
[strain12]
type = ParsedFunction
value = '1.0e-2*t'
[]
[stress11]
type = ParsedFunction
value = '400*t'
[]
[stress22]
type = ParsedFunction
value = '-200*t'
[]
[stress12]
type = ParsedFunction
value = '100*t'
[]
[]
[BCs]
[Periodic]
[x]
variable = disp_x
auto_direction = 'x y'
[]
[y]
variable = disp_y
auto_direction = 'x y'
[]
[]
[fix1_x]
type = DirichletBC
boundary = "fix1"
variable = disp_x
value = 0
[]
[fix1_y]
type = DirichletBC
boundary = "fix1"
variable = disp_y
value = 0
[]
[fix2_y]
type = DirichletBC
boundary = "fix2"
variable = disp_y
value = 0
[]
[]
[Materials]
[elastic_tensor_1]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
block = '1'
[]
[elastic_tensor_2]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 120000.0
poissons_ratio = 0.21
block = '2'
[]
[elastic_tensor_3]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 80000.0
poissons_ratio = 0.4
block = '3'
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
homogenization_gradient_names = 'homogenization_gradient'
[]
[compute_homogenization_gradient]
type = ComputeHomogenizedLagrangianStrainS
constraint_types = ${constraint_types}
targets = ${targets}
[]
[]
[Postprocessors]
[sxx]
type = ElementAverageValue
variable = sxx
execute_on = 'initial timestep_end'
[]
[syy]
type = ElementAverageValue
variable = syy
execute_on = 'initial timestep_end'
[]
[sxy]
type = ElementAverageValue
variable = sxy
execute_on = 'initial timestep_end'
[]
[exx]
type = ElementAverageValue
variable = exx
execute_on = 'initial timestep_end'
[]
[eyy]
type = ElementAverageValue
variable = eyy
execute_on = 'initial timestep_end'
[]
[exy]
type = ElementAverageValue
variable = exy
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
solve_type = 'newton'
# solve_type = 'PJFNK'
line_search = none
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 2
l_tol = 1e-14
nl_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 1.0
[]
[Outputs]
csv = true
[]
(test/tests/time_steppers/timesequence_stepper/timesequence_restart2.i)
[Mesh]
file = timesequence_restart1_cp/0002-mesh.cpr
[]
[Problem]
restart_file_base = timesequence_restart1_cp/0002
# There is an initial conditions overwriting the restart on the nonlinear variable u
# As you can see in the gold file, this makes the initial step output be from the
# initial condition
allow_initial_conditions_with_restart = true
[]
[Functions]
[exact_fn]
type = ParsedFunction
expression = t*t*(x*x+y*y)
[]
[forcing_fn]
type = ParsedFunction
expression = 2*t*(x*x+y*y)-4*t*t
[]
[]
[Variables]
[u]
family = LAGRANGE
order = SECOND
[]
[]
[ICs]
[u_var]
type = FunctionIC
variable = u
function = exact_fn
[]
[]
[Kernels]
[td]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[]
[]
[Executioner]
type = Transient
end_time = 4.0
[TimeStepper]
type = TimeSequenceStepper
time_sequence = '0 0.85 1.3 2 4'
[]
[]
[Outputs]
exodus = true
[]
(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/misc/check_error/coupled_grad_without_declare.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Functions]
[forcing_fnu]
type = ParsedFunction
expression = -5.8*(x+y)+x*x*x-x+y*y*y-y
[]
[forcing_fnv]
type = ParsedFunction
expression = -4
[]
[slnu]
type = ParsedGradFunction
expression = x*x*x-x+y*y*y-y
grad_x = 3*x*x-1
grad_y = 3*y*y-1
[]
[slnv]
type = ParsedGradFunction
expression = x*x+y*y
grad_x = 2*x
grad_y = 2*y
[]
#NeumannBC functions
[bc_fnut]
type = ParsedFunction
expression = 3*y*y-1
[]
[bc_fnub]
type = ParsedFunction
expression = -3*y*y+1
[]
[bc_fnul]
type = ParsedFunction
expression = -3*x*x+1
[]
[bc_fnur]
type = ParsedFunction
expression = 3*x*x-1
[]
[]
[Variables]
[u]
order = THIRD
family = HIERARCHIC
[]
[v]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
active = 'diff1 diff2 test1 forceu forcev react'
[diff1]
type = Diffusion
variable = u
[]
[test1]
type = CoupledConvection
variable = u
velocity_vector = v
# Trigger the error in this class
test_coupling_declaration_error = true
[]
[diff2]
type = Diffusion
variable = v
[]
[react]
type = Reaction
variable = u
[]
[forceu]
type = BodyForce
variable = u
function = forcing_fnu
[]
[forcev]
type = BodyForce
variable = v
function = forcing_fnv
[]
[]
[BCs]
active = 'bc_u_tb bc_v bc_ul bc_ur bc_ut bc_ub'
[bc_u]
type = FunctionPenaltyDirichletBC
variable = u
function = slnu
boundary = 'left right top bottom'
penalty = 1e6
[]
[bc_v]
type = FunctionDirichletBC
variable = v
function = slnv
boundary = 'left right top bottom'
[]
[bc_u_lr]
type = FunctionPenaltyDirichletBC
variable = u
function = slnu
boundary = 'left right top bottom'
penalty = 1e6
[]
[bc_u_tb]
type = CoupledKernelGradBC
variable = u
var2 = v
vel = '0.1 0.1'
boundary = 'top bottom left right'
[]
[bc_ul]
type = FunctionNeumannBC
variable = u
function = bc_fnul
boundary = 'left'
[]
[bc_ur]
type = FunctionNeumannBC
variable = u
function = bc_fnur
boundary = 'right'
[]
[bc_ut]
type = FunctionNeumannBC
variable = u
function = bc_fnut
boundary = 'top'
[]
[bc_ub]
type = FunctionNeumannBC
variable = u
function = bc_fnub
boundary = 'bottom'
[]
[]
[Preconditioning]
active = ' '
[prec]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'L2u L2v'
[dofs]
type = NumDOFs
[]
[h]
type = AverageElementSize
[]
[L2u]
type = ElementL2Error
variable = u
function = slnu
[]
[L2v]
type = ElementL2Error
variable = v
function = slnv
[]
[H1error]
type = ElementH1Error
variable = u
function = solution
[]
[H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-15
nl_abs_tol = 1e-13
[]
[Outputs]
execute_on = 'timestep_end'
[]
[Debug]
show_var_residual_norms = true
[]
(modules/thermal_hydraulics/test/tests/problems/mms/mms_1phase.i)
# Method of manufactured solutions (MMS) problem for 1-phase flow model.
#
# The python script mms_derivation.py derives the MMS sources used in this
# input file.
#
# To perform a convergence study, run this input file with different values of
# 'refinement_level', starting with 0. Manually create a CSV file (call it the
# "convergence CSV file") to store the error vs. mesh size data. It should have
# the columns specified in the plot script plot_convergence_1phase.py. Copy the
# CSV output from each run into the convergence CSV file. After all of the runs,
# run the plot script using python.
refinement_level = 0 # 0 is initial
n_elems_coarse = 10
n_elems = ${fparse int(n_elems_coarse * 2^refinement_level)}
dt = 1e-6
t_end = ${fparse dt * 10}
area = 1.0
gamma = 2.0
M = 0.05
A = 1
B = 1
C = 1
aA = ${fparse area}
R_univ = 8.3144598
R = ${fparse R_univ / M}
cp = ${fparse gamma * R / (gamma - 1.0)}
cv = ${fparse cp / gamma}
[GlobalParams]
gravity_vector = '0 0 0'
closures = simple_closures
[]
[Functions]
# solutions
[rho_fn]
type = ParsedFunction
expression = 'A * (sin(B*x + C*t) + 2)'
symbol_names = 'A B C'
symbol_values = '${A} ${B} ${C}'
[]
[vel_fn]
type = ParsedFunction
expression = 'A * t * sin(pi * x)'
symbol_names = 'A'
symbol_values = '${A}'
[]
[p_fn]
type = ParsedFunction
expression = 'A * (cos(B*x + C*t) + 2)'
symbol_names = 'A B C'
symbol_values = '${A} ${B} ${C}'
[]
[T_fn]
type = ParsedFunction
expression = '(cos(B*x + C*t) + 2)/(cv*(gamma - 1)*(sin(B*x + C*t) + 2))'
symbol_names = 'B C gamma cv'
symbol_values = '${B} ${C} ${gamma} ${cv}'
[]
# MMS sources
[rho_src_fn]
type = ParsedFunction
expression = 'A^2*B*t*sin(pi*x)*cos(B*x + C*t) + pi*A^2*t*(sin(B*x + C*t) + 2)*cos(pi*x) + A*C*cos(B*x + C*t)'
symbol_names = 'A B C'
symbol_values = '${A} ${B} ${C}'
[]
[rhou_src_fn]
type = ParsedFunction
expression = 'A^3*B*t^2*sin(pi*x)^2*cos(B*x + C*t) + 2*pi*A^3*t^2*(sin(B*x + C*t) + 2)*sin(pi*x)*cos(pi*x) + A^2*C*t*sin(pi*x)*cos(B*x + C*t) + A^2*(sin(B*x + C*t) + 2)*sin(pi*x) - A*B*sin(B*x + C*t)'
symbol_names = 'A B C'
symbol_values = '${A} ${B} ${C}'
[]
[rhoE_src_fn]
type = ParsedFunction
expression = 'A*C*(A^2*t^2*sin(pi*x)^2/2 + (cos(B*x + C*t) + 2)/((gamma - 1)*(sin(B*x + C*t) + 2)))*cos(B*x + C*t) + pi*A*t*(A*(A^2*t^2*sin(pi*x)^2/2 + (cos(B*x + C*t) + 2)/((gamma - 1)*(sin(B*x + C*t) + 2)))*(sin(B*x + C*t) + 2) + A*(cos(B*x + C*t) + 2))*cos(pi*x) + A*t*(A*B*(A^2*t^2*sin(pi*x)^2/2 + (cos(B*x + C*t) + 2)/((gamma - 1)*(sin(B*x + C*t) + 2)))*cos(B*x + C*t) - A*B*sin(B*x + C*t) + A*(sin(B*x + C*t) + 2)*(pi*A^2*t^2*sin(pi*x)*cos(pi*x) - B*sin(B*x + C*t)/((gamma - 1)*(sin(B*x + C*t) + 2)) - B*(cos(B*x + C*t) + 2)*cos(B*x + C*t)/((gamma - 1)*(sin(B*x + C*t) + 2)^2)))*sin(pi*x) + A*(sin(B*x + C*t) + 2)*(A^2*t*sin(pi*x)^2 - C*sin(B*x + C*t)/((gamma - 1)*(sin(B*x + C*t) + 2)) - C*(cos(B*x + C*t) + 2)*cos(B*x + C*t)/((gamma - 1)*(sin(B*x + C*t) + 2)^2))'
symbol_names = 'A B C gamma'
symbol_values = '${A} ${B} ${C} ${gamma}'
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
gamma = ${gamma}
molar_mass = ${M}
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = fp
# geometry
position = '0 0 0'
orientation = '1 0 0'
length = 1.0
n_elems = ${n_elems}
A = ${area}
# IC
initial_p = p_fn
initial_T = T_fn
initial_vel = 0
f = 0
[]
[left_boundary]
type = InletFunction1Phase
input = 'pipe:in'
p = p_fn
rho = rho_fn
vel = vel_fn
[]
[right_boundary]
type = InletFunction1Phase
input = 'pipe:out'
p = p_fn
rho = rho_fn
vel = vel_fn
[]
[]
[Kernels]
[rho_src]
type = BodyForce
variable = rhoA
function = rho_src_fn
value = ${aA}
[]
[rhou_src]
type = BodyForce
variable = rhouA
function = rhou_src_fn
value = ${aA}
[]
[rhoE_src]
type = BodyForce
variable = rhoEA
function = rhoE_src_fn
value = ${aA}
[]
[]
[Postprocessors]
[rho_err]
type = ElementL1Error
variable = rho
function = rho_fn
execute_on = 'INITIAL TIMESTEP_END'
[]
[vel_err]
type = ElementL1Error
variable = vel
function = vel_fn
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_err]
type = ElementL1Error
variable = p
function = p_fn
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
[TimeIntegrator]
type = ExplicitSSPRungeKutta
order = 3
[]
start_time = 0
dt = ${dt}
end_time = ${t_end}
abort_on_solve_fail = true
[Quadrature]
type = GAUSS
order = FIRST
[]
[]
[Outputs]
csv = true
execute_on = 'FINAL'
velocity_as_vector = false
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_no_parts_steady_stabilized_second_order.i)
[GlobalParams]
order = SECOND
integrate_p_by_parts = false
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[AuxVariables]
[vel_x]
[]
[vel_y]
[]
[]
[AuxKernels]
[vel_x]
type = VectorVariableComponentAux
variable = vel_x
vector_variable = velocity
component = 'x'
[]
[vel_y]
type = VectorVariableComponentAux
variable = vel_y
vector_variable = velocity
component = 'y'
[]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
order = FIRST
[../]
[]
# Need to set a non-zero initial condition because we have a velocity norm in
# the denominator for the tau coefficient of the stabilization term
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[mass_pspg]
type = INSADMassPSPG
variable = p
[]
[momentum_advection]
type = INSADMomentumAdvection
variable = velocity
[]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
[../]
[momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[]
[]
[BCs]
[p_corner]
type = DirichletBC
boundary = top_right
value = 0
variable = p
[]
[inlet]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom'
function_x = 0
function_y = 'inlet_func'
[../]
[wall]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'right'
function_x = 0
function_y = 0
[]
[axis]
type = ADVectorFunctionDirichletBC
variable = velocity
boundary = 'left'
set_y_comp = false
function_x = 0
[]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADTauMaterial
velocity = velocity
pressure = p
[]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(python/peacock/tests/common/transient_with_date.i)
###########################################################
# This is a simple test with a time-dependent problem
# demonstrating the use of a "Transient" Executioner.
#
# @Requirement F1.10
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./dt]
type = TimestepSize
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
# Preconditioned JFNK (default)
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = with_date
exodus = true
[./with_date]
type = Exodus
file_base = with_date
append_date = true
append_date_format = '%Y-%m-%d'
[../]
[]
(test/tests/functions/piecewise_multilinear/twoDa.i)
# PiecewiseMultilinear function tests in 2D
# See [Functions] block for a description of the tests
# The functions are compared with ParsedFunctions using postprocessors
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
nx = 6
ymin = 0
ymax = 1
ny = 6
[]
[Variables]
[./dummy]
[../]
[]
[Kernels]
[./dummy_u]
type = TimeDerivative
variable = dummy
[../]
[]
[AuxVariables]
[./bilinear1_var]
[../]
[]
[AuxKernels]
[./bilinear1_AuxK]
type = FunctionAux
variable = bilinear1_var
function = bilinear1_fcn
[../]
[]
[Functions]
# This is just f = 1 + 2x + 3y
[./bilinear1_fcn]
type = PiecewiseMultilinear
data_file = twoD1.txt
[../]
[./bilinear1_answer]
type = ParsedFunction
expression = 1+2*x+3*y
[../]
[]
[Postprocessors]
[./bilinear1_pp]
type = NodalL2Error
function = bilinear1_answer
variable = bilinear1_var
[../]
[]
[Executioner]
type = Transient
dt = 1
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = twoDa
hide = dummy
csv = true
[]
(test/tests/kernels/scalar_constraint/scalar_constraint_kernel_disp.i)
#
# This test is identical to scalar_constraint_kernel.i, but it everything is evaluated on the displaced mesh
#
[GlobalParams]
use_displaced_mesh = true
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
displacements = 'disp_x disp_y'
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[./ffn]
type = ParsedFunction
expression = -4
[../]
[./bottom_bc_fn]
type = ParsedFunction
expression = -2*y
[../]
[./right_bc_fn]
type = ParsedFunction
expression = 2*x
[../]
[./top_bc_fn]
type = ParsedFunction
expression = 2*y
[../]
[./left_bc_fn]
type = ParsedFunction
expression = -2*x
[../]
[]
[AuxVariables]
[./disp_x]
family = LAGRANGE
order = SECOND
[../]
[./disp_y]
family = LAGRANGE
order = SECOND
[../]
[]
[AuxKernels]
[./disp_x_ak]
type = ConstantAux
variable = disp_x
value = 0
[../]
[./disp_y_ak]
type = ConstantAux
variable = disp_y
value = 0
[../]
[]
# NL
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[./lambda]
family = SCALAR
order = FIRST
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffnk]
type = BodyForce
variable = u
function = ffn
[../]
[./sk_lm]
type = ScalarLagrangeMultiplier
variable = u
lambda = lambda
[../]
[]
[ScalarKernels]
[./constraint]
type = AverageValueConstraint
variable = lambda
pp_name = pp
value = 2.666666666666666
# overrride the global setting, scalar kernels do not live on a mesh
use_displaced_mesh = false
[../]
[]
[BCs]
[./bottom]
type = FunctionNeumannBC
variable = u
boundary = '0'
function = bottom_bc_fn
[../]
[./right]
type = FunctionNeumannBC
variable = u
boundary = '1'
function = right_bc_fn
[../]
[./top]
type = FunctionNeumannBC
variable = u
boundary = '2'
function = top_bc_fn
[../]
[./left]
type = FunctionNeumannBC
variable = u
boundary = '3'
function = left_bc_fn
[../]
[]
[Postprocessors]
[./pp]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = linear
[../]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
[./pc]
type = SMP
full = true
solve_type = 'PJFNK'
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-14
l_tol = 1e-7
[]
[Outputs]
exodus = true
hide = lambda
[]
(test/tests/mortar/continuity-3d-non-conforming/continuity_mixed.i)
[Mesh]
second_order = false
[file]
type = FileMeshGenerator
file = mixed_mesh.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
new_block_id = 11
new_block_name = "secondary"
sidesets = '101'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
new_block_id = 12
new_block_name = "primary"
sidesets = '102'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[T]
block = '1 2'
[]
[lambda]
block = 'secondary'
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln_primal
variable = T
boundary = '1 2'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi) + 3*pi^2*sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_primal]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_lambda]
type = ParsedFunction
expression = 'pi*sin(pi*y)*sin(pi*z)*cos(pi*x)'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = '12'
secondary_subdomain = '11'
variable = lambda
secondary_variable = T
delta = 0.1
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[L2lambda]
type = ElementL2Error
variable = lambda
function = exact_soln_lambda
execute_on = 'timestep_end'
block = 'secondary'
[]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = '1 2'
[]
[h]
type = AverageElementSize
block = '1 2'
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_no_parts_steady_nobcbc.i)
[GlobalParams]
integrate_p_by_parts = false
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[AuxVariables]
[vel_x]
order = SECOND
[]
[vel_y]
order = SECOND
[]
[]
[AuxKernels]
[vel_x]
type = VectorVariableComponentAux
variable = vel_x
vector_variable = velocity
component = 'x'
[]
[vel_y]
type = VectorVariableComponentAux
variable = vel_y
vector_variable = velocity
component = 'y'
[]
[]
[Variables]
[./velocity]
order = SECOND
family = LAGRANGE_VEC
[../]
[./p]
[../]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[momentum_advection]
type = INSADMomentumAdvection
variable = velocity
[]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
[../]
[]
[BCs]
[p_corner]
type = DirichletBC
boundary = top_right
value = 0
variable = p
[]
[inlet]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom'
function_x = 0
function_y = 'inlet_func'
[../]
[wall]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'right'
function_x = 0
function_y = 0
[]
[axis]
type = ADVectorFunctionDirichletBC
variable = velocity
boundary = 'left'
set_y_comp = false
function_x = 0
[]
[outlet]
type = INSADMomentumNoBCBC
variable = velocity
pressure = p
boundary = 'top'
[]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADMaterial
velocity = velocity
pressure = p
[]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(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/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
[]
[]
(test/tests/multiapps/restart_subapp_ic/sub2.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 1
nx = 10
[]
[Functions]
[u_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[]
[Variables]
[u]
initial_condition = 4.2
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[fn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = FunctionDirichletBC
variable = u
boundary = right
function = u_fn
[]
[]
[Problem]
# Being restarted by the parent, yet the ICs are overriding the initial solution
# See t=0.5s in the gold/parent2_out_sub_app0.e file
allow_initial_conditions_with_restart = true
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/avg_nodal_var_value/avg_nodal_var_value_ts_begin.i)
[Mesh]
file = square-2x2-nodeids.e
[]
[Variables]
active = 'u v'
[./u]
order = SECOND
family = LAGRANGE
[../]
[./v]
order = SECOND
family = LAGRANGE
[../]
[]
[Functions]
active = 'force_fn exact_fn left_bc'
[./force_fn]
type = ParsedFunction
expression = '1-x*x+2*t'
[../]
[./exact_fn]
type = ParsedFunction
expression = '(1-x*x)*t'
[../]
[./left_bc]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
active = '
time_u diff_u ffn_u
time_v diff_v'
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'all_u left_v right_v'
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = exact_fn
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '2'
value = 0
[../]
[]
[Postprocessors]
[./l2]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./node1]
type = AverageNodalVariableValue
variable = u
boundary = 10
execute_on = TIMESTEP_BEGIN
[../]
[./node4]
type = AverageNodalVariableValue
variable = v
boundary = 13
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_avg_nodal_var_value_ts_begin
exodus = true
[]
(modules/contact/test/tests/mortar_aux_kernels/pressure-aux-frictionless.i)
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.35
xmax = -0.05
ymin = -1
ymax = 0
nx = 1
ny = 3
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_sideset_names]
type = RenameBoundaryGenerator
input = left_block_sidesets
old_boundary = '10 11 12 13'
new_boundary = 'l_bottom l_right l_top l_left'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sideset_names
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.3
ymin = -1
ymax = 0
nx = 1
ny = 2
elem_type = QUAD4
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3'
new_boundary = '20 21 22 23'
[]
[right_block_sideset_names]
type = RenameBoundaryGenerator
input = right_block_sidesets
old_boundary = '20 21 22 23'
new_boundary = 'r_bottom r_right r_top r_left'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sideset_names
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[left_lower]
type = LowerDBlockFromSidesetGenerator
input = combined_mesh
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[right_lower]
type = LowerDBlockFromSidesetGenerator
input = left_lower
sidesets = '23'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
uniform_refine = 1
[]
[Variables]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[normal_lm]
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[normal_lm]
type = MortarPressureComponentAux
variable = normal_lm
primary_boundary = '23'
secondary_boundary = '11'
lm_var_x = lm_x
lm_var_y = lm_y
component = 'NORMAL'
boundary = '11'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
[]
[]
[Functions]
[horizontal_movement]
type = ParsedFunction
expression = '0.1 * t'
[]
[vertical_movement]
type = ConstantFunction
value = '0.0'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = horizontal_movement
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 21
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = 21
value = 0.0
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 13
function = vertical_movement
[]
[]
[Materials]
[elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_right]
type = ComputeFiniteStrainElasticStress
block = 2
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapCartesianLMMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
correct_edge_dropping = true
interpolate_normals = false
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -mat_mffd_err -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist 1e-5 NONZERO 1e-10'
line_search = none
dt = 0.1
dtmin = 0.1
end_time = 1.0
l_max_its = 100
nl_max_its = 20
nl_rel_tol = 1e-6
snesmf_reuse_base = false
[]
[Outputs]
exodus = false
csv = true
execute_on = 'FINAL'
[]
[VectorPostprocessors]
[normal_lm]
type = NodalValueSampler
block = 'secondary_lower'
variable = normal_lm
sort_by = 'id'
[]
[]
(modules/solid_mechanics/test/tests/domain_integral_thermal/interaction_integral_2d_eig_grad.i)
#This problem from [Wilson 1979] tests the thermal strain term in the
#interaction integral. In this variant of this test, rather than using the
#standard mechanism for applying thermal strain, the eigenstrain for the
#thermal strain is applied using a generic object, which also supplies its
#gradient. This gradient is used in the interaction integral, with a nearly
#identical result to that from the version of this test that applies that
#in the standard manner.
#
#theta_e = 10 degrees C; a = 252; E = 207000; nu = 0.3; alpha = 1.35e-5
#
#With uniform_refine = 3, KI converges to
#KI = 5.602461e+02 (interaction integral)
#KI = 5.655005e+02 (J-integral)
#
#Both are in good agreement with [Shih 1986]:
#average_value = 0.4857 = KI / (sigma_theta * sqrt(pi * a))
#sigma_theta = E * alpha * theta_e / (1 - nu)
# = 207000 * 1.35e-5 * 10 / (1 - 0.3) = 39.9214
#KI = average_value * sigma_theta * sqrt(pi * a) = 5.656e+02
#
#References:
#W.K. Wilson, I.-W. Yu, Int J Fract 15 (1979) 377-387
#C.F. Shih, B. Moran, T. Nakamura, Int J Fract 30 (1986) 79-102
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = False
[]
[Mesh]
file = crack2d.e
displacements = 'disp_x disp_y'
# uniform_refine = 3
[]
[Functions]
[eigfunc]
type = ParsedFunction
expression = 1.35e-5*10.0*(2*x/504)
[]
[]
[DomainIntegral]
integrals = 'InteractionIntegralKI'
boundary = 800
crack_direction_method = CrackDirectionVector
crack_direction_vector = '1 0 0'
2d = true
axis_2d = 2
radius_inner = '60.0 80.0 100.0 120.0'
radius_outer = '80.0 100.0 120.0 140.0'
symmetry_plane = 1
incremental = true
# interaction integral parameters
block = 1
youngs_modulus = 207000
poissons_ratio = 0.3
eigenstrain_gradient = thermal_expansion_gradient
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress'
planar_formulation = PLANE_STRAIN
eigenstrain_names = thermal_expansion
[]
[]
[BCs]
[crack_y]
type = DirichletBC
variable = disp_y
boundary = 100
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_y
boundary = 400
value = 0.0
[]
[no_x1]
type = DirichletBC
variable = disp_x
boundary = 900
value = 0.0
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
[]
[elastic_stress]
type = ComputeFiniteStrainElasticStress
[]
[thermal_expansion_strain]
type = FunctionIsotropicEigenstrain
function = eigfunc
eigenstrain_name = thermal_expansion
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
line_search = 'none'
l_max_its = 50
nl_max_its = 40
nl_rel_step_tol= 1e-10
nl_rel_tol = 1e-10
start_time = 0.0
dt = 1
end_time = 1
num_steps = 1
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
pc_side = left
ksp_norm = preconditioned
full = true
[]
[]
(modules/xfem/test/tests/bimaterials/inclusion_ad_bimaterials_2d.i)
# This test is for a matrix-inclusion composite materials using AD
# The global stress is determined by switching the stress based on level set values
# The inclusion geometry is marked by a level set function
# The matrix and inclusion are glued together
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
[../]
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 11
ny = 11
xmin = 0.0
xmax = 5.
ymin = 0.0
ymax = 5.
elem_type = QUAD4
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Functions]
[./ls_func]
type = ParsedFunction
expression = 'sqrt((y-2.5)*(y-2.5) + (x-2.5)*(x-2.5)) - 1.5'
[../]
[]
[AuxVariables]
[./a_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
strain = SMALL
use_automatic_differentiation = true
add_variables = true
generate_output = 'stress_xx stress_yy stress_xy'
[../]
[]
[AuxKernels]
[./a_strain_xx]
type = ADRankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 0
variable = a_strain_xx
[../]
[./a_strain_yy]
type = ADRankTwoAux
rank_two_tensor = A_total_strain
index_i = 1
index_j = 1
variable = a_strain_yy
[../]
[./a_strain_xy]
type = ADRankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 1
variable = a_strain_xy
[../]
[./b_strain_xx]
type = ADRankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 0
variable = b_strain_xx
[../]
[./b_strain_yy]
type = ADRankTwoAux
rank_two_tensor = B_total_strain
index_i = 1
index_j = 1
variable = b_strain_yy
[../]
[./b_strain_xy]
type = ADRankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 1
variable = b_strain_xy
[../]
[]
[Constraints]
[./dispx_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_x
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[./dispy_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_y
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[]
[BCs]
[./bottomx]
type = ADDirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = ADDirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[./topx]
type = ADFunctionDirichletBC
boundary = top
variable = disp_x
function = '0.03*t'
[../]
[./topy]
type = ADFunctionDirichletBC
boundary = top
variable = disp_y
function = '0.03*t'
[../]
[]
[Materials]
[./elasticity_tensor_A]
type = ADComputeIsotropicElasticityTensor
base_name = A
youngs_modulus = 1e9
poissons_ratio = 0.3
[../]
[./strain_A]
type = ADComputeSmallStrain
base_name = A
[../]
[./stress_A]
type = ADComputeLinearElasticStress
base_name = A
[../]
[./elasticity_tensor_B]
type = ADComputeIsotropicElasticityTensor
base_name = B
youngs_modulus = 1e5
poissons_ratio = 0.3
[../]
[./strain_B]
type = ADComputeSmallStrain
base_name = B
[../]
[./stress_B]
type = ADComputeLinearElasticStress
base_name = B
[../]
[./combined_stress]
type = ADLevelSetBiMaterialRankTwo
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = stress
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
# controls for linear iterations
l_max_its = 20
l_tol = 1e-8
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-50 #1e-7
# time control
start_time = 0.0
dt = 0.5
end_time = 1.0
num_steps = 2
max_xfem_update = 1
[]
[Outputs]
exodus = true
file_base = inclusion_bimaterials_2d_out
execute_on = timestep_end
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/userobjects/internal_side_user_object/internal_side_user_object_two_materials.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = -1
ymin = -1
xmax = 1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[]
[./subdomain_id]
input = gen
type = SubdomainPerElementGenerator
subdomain_ids = '0 1
1 1'
[../]
[]
[Functions]
[./fn_exact]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[./ffn]
type = ParsedFunction
expression = -4
[../]
[]
[UserObjects]
[./isuo]
type = InsideUserObject
variable = u
diffusivity = diffusivity
execute_on = 'initial timestep_end'
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = FIRST
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = ffn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = fn_exact
[../]
[]
[Materials]
[./stateful1]
type = StatefulMaterial
block = 0
initial_diffusivity = 1
[../]
[./stateful2]
type = StatefulMaterial
block = 1
initial_diffusivity = 2
[../]
[]
[Postprocessors]
[./value]
type = InsideValuePPS
user_object = isuo
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = 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/solid_mechanics/test/tests/thermal_expansion/constant_expansion_stress_free_temp.i)
# This test involves only thermal expansion strains on a 2x2x2 cube of approximate
# steel material; however, in this case the stress free temperature of the material
# has been set to 200K so that there is an initial delta temperature of 100K.
# An initial temperature of 300K is given for the material,
# and an auxkernel is used to calculate the temperature in the entire cube to
# raise the temperature each time step. The final temperature is 675K
# The thermal strain increment should therefore be
# (675K - 300K) * 1.3e-5 1/K + 100K * 1.3e-5 1/K = 6.175e-3 m/m.
# This test uses a start up step to identify problems in the calculation of
# eigenstrains with a stress free temperature that is different from the initial
# value of the temperature in the problem
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./temp]
initial_condition = 300.0
[../]
[./eigenstrain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./eigenstrain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./eigenstrain_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./total_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./total_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./total_strain_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./temperature_load]
type = ParsedFunction
expression = t*(5000.0)+300.0
[../]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[./all]
strain = SMALL
incremental = true
add_variables = true
eigenstrain_names = eigenstrain
[../]
[../]
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = temperature_load
[../]
[./eigenstrain_yy]
type = RankTwoAux
rank_two_tensor = eigenstrain
variable = eigenstrain_yy
index_i = 1
index_j = 1
execute_on = 'initial timestep_end'
[../]
[./eigenstrain_xx]
type = RankTwoAux
rank_two_tensor = eigenstrain
variable = eigenstrain_xx
index_i = 0
index_j = 0
execute_on = 'initial timestep_end'
[../]
[./eigenstrain_zz]
type = RankTwoAux
rank_two_tensor = eigenstrain
variable = eigenstrain_zz
index_i = 2
index_j = 2
execute_on = 'initial timestep_end'
[../]
[./total_strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yy
index_i = 1
index_j = 1
execute_on = 'initial timestep_end'
[../]
[./total_strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xx
index_i = 0
index_j = 0
execute_on = 'initial timestep_end'
[../]
[./total_strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zz
index_i = 2
index_j = 2
execute_on = 'initial timestep_end'
[../]
[]
[BCs]
[./x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./z_bot]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 200
thermal_expansion_coeff = 1.3e-5
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = -0.0125
n_startup_steps = 1
end_time = 0.075
dt = 0.0125
dtmin = 0.0001
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[./eigenstrain_xx]
type = ElementAverageValue
variable = eigenstrain_xx
execute_on = 'initial timestep_end'
[../]
[./eigenstrain_yy]
type = ElementAverageValue
variable = eigenstrain_yy
execute_on = 'initial timestep_end'
[../]
[./eigenstrain_zz]
type = ElementAverageValue
variable = eigenstrain_zz
execute_on = 'initial timestep_end'
[../]
[./total_strain_xx]
type = ElementAverageValue
variable = total_strain_xx
execute_on = 'initial timestep_end'
[../]
[./total_strain_yy]
type = ElementAverageValue
variable = total_strain_yy
execute_on = 'initial timestep_end'
[../]
[./total_strain_zz]
type = ElementAverageValue
variable = total_strain_zz
execute_on = 'initial timestep_end'
[../]
[./temperature]
type = AverageNodalVariableValue
variable = temp
execute_on = 'initial timestep_end'
[../]
[]
(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/navier_stokes/test/tests/finite_element/ins/wall_convection/steady-action.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[]
[Variables]
active = ''
[temperature][]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = steady-state
velocity_boundary = 'bottom right top left'
velocity_function = '0 0 0 0 lid_function 0 0 0'
initial_velocity = '1e-15 1e-15 0'
add_standard_velocity_variables_for_ad = false
pressure_pinned_node = 0
density_name = rho
dynamic_viscosity_name = mu
use_ad = true
laplace = true
family = LAGRANGE
order = FIRST
add_temperature_equation = true
fixed_temperature_boundary = 'bottom top'
temperature_function = '1 0'
has_ambient_convection = true
ambient_convection_alpha = 1
ambient_temperature = 0.5
supg = true
pspg = true
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[]
[]
[Functions]
[lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/mixed-transient-steady/mixed.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[temperature]
[InitialCondition]
type = ConstantIC
value = 1.0
[]
[]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./mass_pspg]
type = INSADMassPSPG
variable = p
[../]
[./momentum_time]
type = INSADMomentumTimeDerivative
variable = velocity
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[../]
[./momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[../]
[./temperature_advection]
type = INSADEnergyAdvection
variable = temperature
[../]
[./temperature_conduction]
type = ADHeatConduction
variable = temperature
thermal_conductivity = 'k'
[../]
[temperature_supg]
type = INSADEnergySUPG
variable = temperature
velocity = velocity
[]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left'
[../]
[./lid]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 'lid_function'
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[./temperature_hot]
type = DirichletBC
variable = temperature
boundary = 'bottom'
value = 1
[../]
[./temperature_cold]
type = DirichletBC
variable = temperature
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = temperature
[]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/convergence/2D/neumann.i)
# Simple 2D plane strain test
[GlobalParams]
displacements = 'disp_x disp_y'
large_kinematics = true
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
[]
[]
[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
[]
[]
[Functions]
[pullx]
type = ParsedFunction
expression = '50000 * t'
[]
[pully]
type = ParsedFunction
expression = '-30000 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = left
variable = disp_y
value = 0.0
[]
[pull_x]
type = FunctionNeumannBC
boundary = right
variable = disp_x
function = pullx
[]
[pull_y]
type = FunctionNeumannBC
boundary = top
variable = disp_y
function = pully
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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-10
nl_abs_tol = 1e-12
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 1.0
[]
[Postprocessors]
[nonlin]
type = NumNonlinearIterations
[]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/contact/test/tests/sliding_block/sliding/frictionless_penalty.i)
# This is a benchmark test that checks constraint based frictionless
# contact using the penalty method. In this test a constant
# displacement is applied in the horizontal direction to simulate
# a small block come sliding down a larger block.
#
# The gold file is run on one processor
# and the benchmark case is run on a minimum of 4 processors to ensure no
# parallel variability in the contact pressure and penetration results.
#
[Mesh]
file = sliding_elastic_blocks_2d.e
patch_size = 80
[]
[GlobalParams]
volumetric_locking_correction = false
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./penetration]
[../]
[./inc_slip_x]
[../]
[./inc_slip_y]
[../]
[./accum_slip_x]
[../]
[./accum_slip_y]
[../]
[]
[Functions]
[./vertical_movement]
type = ParsedFunction
expression = -t
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
strain = FINITE
[../]
[]
[AuxKernels]
[./zeroslip_x]
type = ConstantAux
variable = inc_slip_x
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./zeroslip_y]
type = ConstantAux
variable = inc_slip_y
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./accum_slip_x]
type = AccumulateAux
variable = accum_slip_x
accumulate_from_variable = inc_slip_x
execute_on = timestep_end
[../]
[./accum_slip_y]
type = AccumulateAux
variable = accum_slip_y
accumulate_from_variable = inc_slip_y
execute_on = timestep_end
[../]
[./penetration]
type = PenetrationAux
variable = penetration
boundary = 3
paired_boundary = 2
[../]
[]
[Postprocessors]
[./nonlinear_its]
type = NumNonlinearIterations
execute_on = timestep_end
[../]
[./penetration]
type = NodalVariableValue
variable = penetration
nodeid = 222
[../]
[./contact_pressure]
type = NodalVariableValue
variable = contact_pressure
nodeid = 222
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = 4
value = -0.02
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = vertical_movement
[../]
[]
[Materials]
[./left]
type = ComputeIsotropicElasticityTensor
block = '1 2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./left_stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
line_search = 'none'
l_max_its = 100
nl_max_its = 1000
dt = 0.1
end_time = 15
num_steps = 1000
l_tol = 1e-6
nl_rel_tol = 1e-10
nl_abs_tol = 1e-6
dtmin = 0.01
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
[]
[Outputs]
time_step_interval = 10
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[./console]
type = Console
max_rows = 5
[../]
[]
[Contact]
[./leftright]
secondary = 3
primary = 2
model = frictionless
penalty = 1e+7
formulation = penalty
normal_smoothing_distance = 0.1
[../]
[]
(test/tests/postprocessors/volume/sphere1D.i)
# The volume of each block should be 3
[Mesh]
file = sphere1D.e
coord_type = RSPHERICAL
[]
[Functions]
[fred]
type = ParsedFunction
expression = '200'
[]
[]
[AuxVariables]
[constantVar]
order = FIRST
family = LAGRANGE
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
initial_condition = 100
[]
[]
[AuxKernels]
[fred]
type = ConstantAux
variable = constantVar
block = 1
value = 1
[]
[]
[ICs]
[ic1]
type = ConstantIC
variable = constantVar
value = 1
block = 1
[]
[]
[Kernels]
[heat_r]
type = Diffusion
variable = u
[]
[]
[BCs]
[temps]
type = FunctionDirichletBC
variable = u
boundary = 1
function = fred
[]
[]
[Materials]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -snes_ls -ksp_gmres_restart'
petsc_options_value = 'lu basic 101'
line_search = 'none'
nl_abs_tol = 1e-11
nl_rel_tol = 1e-10
l_max_its = 20
[]
[Postprocessors]
[should_be_one]
type = ElementAverageValue
block = 1
variable = constantVar
execute_on = 'initial timestep_end'
[]
[volume1]
type = VolumePostprocessor
block = 1
execute_on = 'initial timestep_end'
[]
[volume2]
type = VolumePostprocessor
block = 2
execute_on = 'initial timestep_end'
[]
[volume3]
type = VolumePostprocessor
block = 3
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/examples/coal_mining/fine_with_fluid.i)
#################################################################
#
# NOTE:
# The mesh for this model is too large for the MOOSE repository
# so is kept in the the large_media submodule
#
#################################################################
#
# Strata deformation and fluid flow aaround a coal mine - 3D model
#
# A "half model" is used. The mine is 400m deep and
# just the roof is studied (-400<=z<=0). The mining panel
# sits between 0<=x<=150, and 0<=y<=1000, so this simulates
# a coal panel that is 300m wide and 1000m long. The outer boundaries
# are 1km from the excavation boundaries.
#
# The excavation takes 0.5 years.
#
# The boundary conditions for this simulation are:
# - disp_x = 0 at x=0 and x=1150
# - disp_y = 0 at y=-1000 and y=1000
# - disp_z = 0 at z=-400, but there is a time-dependent
# Young modulus that simulates excavation
# - wc_x = 0 at y=-1000 and y=1000
# - wc_y = 0 at x=0 and x=1150
# - no flow at x=0, z=-400 and z=0
# - fixed porepressure at y=-1000, y=1000 and x=1150
# That is, rollers on the sides, free at top,
# and prescribed at bottom in the unexcavated portion.
#
# A single-phase unsaturated fluid is used.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa, and time units are measured in years.
#
# The initial porepressure is hydrostatic with P=0 at z=0, so
# Porepressure ~ - 0.01*z MPa, where the fluid has density 1E3 kg/m^3 and
# gravity = = 10 m.s^-2 = 1E-5 MPa m^2/kg.
# To be more accurate, i use
# Porepressure = -bulk * log(1 + g*rho0*z/bulk)
# where bulk=2E3 MPa and rho0=1Ee kg/m^3.
# The initial stress is consistent with the weight force from undrained
# density 2500 kg/m^3, and fluid porepressure, and a Biot coefficient of 0.7, ie,
# stress_zz^effective = 0.025*z + 0.7 * initial_porepressure
# The maximum and minimum principal horizontal effective stresses are
# assumed to be equal to 0.8*stress_zz.
#
# Material properties:
# Young's modulus = 8 GPa
# Poisson's ratio = 0.25
# Cosserat layer thickness = 1 m
# Cosserat-joint normal stiffness = large
# Cosserat-joint shear stiffness = 1 GPa
# MC cohesion = 2 MPa
# MC friction angle = 35 deg
# MC dilation angle = 8 deg
# MC tensile strength = 1 MPa
# MC compressive strength = 100 MPa
# WeakPlane cohesion = 0.1 MPa
# WeakPlane friction angle = 30 deg
# WeakPlane dilation angle = 10 deg
# WeakPlane tensile strength = 0.1 MPa
# WeakPlane compressive strength = 100 MPa softening to 1 MPa at strain = 1
# Fluid density at zero porepressure = 1E3 kg/m^3
# Fluid bulk modulus = 2E3 MPa
# Fluid viscosity = 1.1E-3 Pa.s = 1.1E-9 MPa.s = 3.5E-17 MPa.year
#
[GlobalParams]
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
PorousFlowDictator = dictator
biot_coefficient = 0.7
[]
[Mesh]
[file]
type = FileMeshGenerator
file = fine.e
[]
[xmin]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = xmin
normal = '-1 0 0'
input = file
[]
[xmax]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = xmax
normal = '1 0 0'
input = xmin
[]
[ymin]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = ymin
normal = '0 -1 0'
input = xmax
[]
[ymax]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = ymax
normal = '0 1 0'
input = ymin
[]
[zmax]
type = SideSetsAroundSubdomainGenerator
block = 30
new_boundary = zmax
normal = '0 0 1'
input = ymax
[]
[zmin]
type = SideSetsAroundSubdomainGenerator
block = 2
new_boundary = zmin
normal = '0 0 -1'
input = zmax
[]
[excav]
type = SubdomainBoundingBoxGenerator
input = zmin
block_id = 1
bottom_left = '0 0 -400'
top_right = '150 1000 -397'
[]
[roof]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 3
paired_block = 1
input = excav
new_boundary = roof
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[wc_x]
[]
[wc_y]
[]
[porepressure]
scaling = 1E-5
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = ini_pp
[]
[]
[Kernels]
[cx_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_x
component = 0
[]
[cy_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_y
component = 1
[]
[cz_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_z
component = 2
[]
[x_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[]
[y_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_y
displacements = 'wc_x wc_y wc_z'
component = 1
base_name = couple
[]
[x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[]
[y_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_y
component = 1
[]
[gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6 # remember this is in MPa
[]
[poro_x]
type = PorousFlowEffectiveStressCoupling
use_displaced_mesh = false
variable = disp_x
component = 0
[]
[poro_y]
type = PorousFlowEffectiveStressCoupling
use_displaced_mesh = false
variable = disp_y
component = 1
[]
[poro_z]
type = PorousFlowEffectiveStressCoupling
use_displaced_mesh = false
component = 2
variable = disp_z
[]
[poro_vol_exp]
type = PorousFlowMassVolumetricExpansion
use_displaced_mesh = false
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
variable = porepressure
fluid_component = 0
[]
[mass0]
type = PorousFlowMassTimeDerivative
use_displaced_mesh = false
fluid_component = 0
variable = porepressure
[]
[flux]
type = PorousFlowAdvectiveFlux
use_displaced_mesh = false
variable = porepressure
gravity = '0 0 -10E-6'
fluid_component = 0
[]
[]
[AuxVariables]
[saturation]
order = CONSTANT
family = MONOMIAL
[]
[darcy_x]
order = CONSTANT
family = MONOMIAL
[]
[darcy_y]
order = CONSTANT
family = MONOMIAL
[]
[darcy_z]
order = CONSTANT
family = MONOMIAL
[]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[wc_z]
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xz]
order = CONSTANT
family = MONOMIAL
[]
[stress_yx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_yz]
order = CONSTANT
family = MONOMIAL
[]
[stress_zx]
order = CONSTANT
family = MONOMIAL
[]
[stress_zy]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_xz]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_yx]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_yz]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_zx]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_zy]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[perm_xx]
order = CONSTANT
family = MONOMIAL
[]
[perm_yy]
order = CONSTANT
family = MONOMIAL
[]
[perm_zz]
order = CONSTANT
family = MONOMIAL
[]
[mc_shear]
order = CONSTANT
family = MONOMIAL
[]
[mc_tensile]
order = CONSTANT
family = MONOMIAL
[]
[wp_shear]
order = CONSTANT
family = MONOMIAL
[]
[wp_tensile]
order = CONSTANT
family = MONOMIAL
[]
[wp_shear_f]
order = CONSTANT
family = MONOMIAL
[]
[wp_tensile_f]
order = CONSTANT
family = MONOMIAL
[]
[mc_shear_f]
order = CONSTANT
family = MONOMIAL
[]
[mc_tensile_f]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[saturation_water]
type = PorousFlowPropertyAux
variable = saturation
property = saturation
phase = 0
execute_on = timestep_end
[]
[darcy_x]
type = PorousFlowDarcyVelocityComponent
variable = darcy_x
gravity = '0 0 -10E-6'
component = x
[]
[darcy_y]
type = PorousFlowDarcyVelocityComponent
variable = darcy_y
gravity = '0 0 -10E-6'
component = y
[]
[darcy_z]
type = PorousFlowDarcyVelocityComponent
variable = darcy_z
gravity = '0 0 -10E-6'
component = z
[]
[porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
execute_on = timestep_end
[]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
execute_on = timestep_end
[]
[stress_yx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yx
index_i = 1
index_j = 0
execute_on = timestep_end
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[stress_zx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zx
index_i = 2
index_j = 0
execute_on = timestep_end
[]
[stress_zy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zy
index_i = 2
index_j = 1
execute_on = timestep_end
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[total_strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[total_strain_xy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[total_strain_xz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xz
index_i = 0
index_j = 2
execute_on = timestep_end
[]
[total_strain_yx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yx
index_i = 1
index_j = 0
execute_on = timestep_end
[]
[total_strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[total_strain_yz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[total_strain_zx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zx
index_i = 2
index_j = 0
execute_on = timestep_end
[]
[total_strain_zy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zy
index_i = 2
index_j = 1
execute_on = timestep_end
[]
[total_strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[perm_xx]
type = PorousFlowPropertyAux
property = permeability
variable = perm_xx
row = 0
column = 0
execute_on = timestep_end
[]
[perm_yy]
type = PorousFlowPropertyAux
property = permeability
variable = perm_yy
row = 1
column = 1
execute_on = timestep_end
[]
[perm_zz]
type = PorousFlowPropertyAux
property = permeability
variable = perm_zz
row = 2
column = 2
execute_on = timestep_end
[]
[mc_shear]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_internal_parameter
variable = mc_shear
execute_on = timestep_end
[]
[mc_tensile]
type = MaterialStdVectorAux
index = 1
property = mc_plastic_internal_parameter
variable = mc_tensile
execute_on = timestep_end
[]
[wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
execute_on = timestep_end
[]
[wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
execute_on = timestep_end
[]
[mc_shear_f]
type = MaterialStdVectorAux
index = 6
property = mc_plastic_yield_function
variable = mc_shear_f
execute_on = timestep_end
[]
[mc_tensile_f]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_yield_function
variable = mc_tensile_f
execute_on = timestep_end
[]
[wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
execute_on = timestep_end
[]
[wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
execute_on = timestep_end
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_x
boundary = 'xmin xmax'
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_y
boundary = 'ymin ymax'
value = 0.0
[]
[no_z]
type = DirichletBC
variable = disp_z
boundary = zmin
value = 0.0
[]
[no_wc_x]
type = DirichletBC
variable = wc_x
boundary = 'ymin ymax'
value = 0.0
[]
[no_wc_y]
type = DirichletBC
variable = wc_y
boundary = 'xmin xmax'
value = 0.0
[]
[fix_porepressure]
type = FunctionDirichletBC
variable = porepressure
boundary = 'ymin ymax xmax'
function = ini_pp
[]
[roof_porepressure]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
pt_vals = '-1E3 1E3'
multipliers = '-1 1'
fluid_phase = 0
flux_function = roof_conductance
boundary = roof
[]
[roof]
type = StickyBC
variable = disp_z
min_value = -3.0
boundary = roof
[]
[]
[Functions]
[ini_pp]
type = ParsedFunction
symbol_names = 'bulk p0 g rho0'
symbol_values = '2E3 0.0 1E-5 1E3'
expression = '-bulk*log(exp(-p0/bulk)+g*rho0*z/bulk)'
[]
[ini_xx]
type = ParsedFunction
symbol_names = 'bulk p0 g rho0 biot'
symbol_values = '2E3 0.0 1E-5 1E3 0.7'
expression = '0.8*(2500*10E-6*z+biot*(-bulk*log(exp(-p0/bulk)+g*rho0*z/bulk)))'
[]
[ini_zz]
type = ParsedFunction
symbol_names = 'bulk p0 g rho0 biot'
symbol_values = '2E3 0.0 1E-5 1E3 0.7'
expression = '2500*10E-6*z+biot*(-bulk*log(exp(-p0/bulk)+g*rho0*z/bulk))'
[]
[excav_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval slope'
symbol_values = '0.5 0 1000.0 1E-9 1 10'
# excavation face at ymin+(ymax-ymin)*min(t/end_t,1)
# slope is the distance over which the modulus reduces from maxval to minval
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,if(y<ymin+(ymax-ymin)*min(t/end_t,1)+slope,minval+(maxval-minval)*(y-(ymin+(ymax-ymin)*min(t/end_t,1)))/slope,maxval))'
[]
[density_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval'
symbol_values = '0.5 0 1000.0 0 2500'
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,maxval)'
[]
[roof_conductance]
type = ParsedFunction
symbol_names = 'end_t ymin ymax maxval minval'
symbol_values = '0.5 0 1000.0 1E7 0'
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),maxval,minval)'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1 # MPa^-1
[]
[mc_coh_strong_harden]
type = TensorMechanicsHardeningExponential
value_0 = 1.99 # MPa
value_residual = 2.01 # MPa
rate = 1.0
[]
[mc_fric]
type = TensorMechanicsHardeningConstant
value = 0.61 # 35deg
[]
[mc_dil]
type = TensorMechanicsHardeningConstant
value = 0.15 # 8deg
[]
[mc_tensile_str_strong_harden]
type = TensorMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.0 # MPa
rate = 1.0
[]
[mc_compressive_str]
type = TensorMechanicsHardeningCubic
value_0 = 100 # Large!
value_residual = 100
internal_limit = 0.1
[]
[wp_coh_harden]
type = TensorMechanicsHardeningCubic
value_0 = 0.05
value_residual = 0.05
internal_limit = 10
[]
[wp_tan_fric]
type = TensorMechanicsHardeningConstant
value = 0.26 # 15deg
[]
[wp_tan_dil]
type = TensorMechanicsHardeningConstant
value = 0.18 # 10deg
[]
[wp_tensile_str_harden]
type = TensorMechanicsHardeningCubic
value_0 = 0.05
value_residual = 0.05
internal_limit = 10
[]
[wp_compressive_str_soften]
type = TensorMechanicsHardeningCubic
value_0 = 100
value_residual = 1
internal_limit = 1.0
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E3
density0 = 1000
thermal_expansion = 0
viscosity = 3.5E-17
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity_for_aux]
type = PorousFlowPorosity
at_nodes = false
fluid = true
mechanical = true
ensure_positive = true
porosity_zero = 0.02
solid_bulk = 5.3333E3
[]
[porosity_bulk]
type = PorousFlowPorosity
fluid = true
mechanical = true
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
ensure_positive = true
porosity_zero = 0.02
solid_bulk = 5.3333E3
[]
[porosity_excav]
type = PorousFlowPorosityConst
block = 1
porosity = 1.0
[]
[permeability_bulk]
type = PorousFlowPermeabilityKozenyCarman
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
poroperm_function = kozeny_carman_phi0
k0 = 1E-15
phi0 = 0.02
n = 2
m = 2
[]
[permeability_excav]
type = PorousFlowPermeabilityConst
block = 1
permeability = '0 0 0 0 0 0 0 0 0'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 4
s_res = 0.4
sum_s_res = 0.4
phase = 0
[]
[elasticity_tensor_0]
type = ComputeLayeredCosseratElasticityTensor
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
[]
[elasticity_tensor_1]
type = ComputeLayeredCosseratElasticityTensor
block = 1
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
elasticity_tensor_prefactor = excav_sideways
[]
[strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[]
[ini_stress]
type = ComputeEigenstrainFromInitialStress
eigenstrain_name = ini_stress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
[]
[stress_0]
type = ComputeMultipleInelasticCosseratStress
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
inelastic_models = 'mc wp'
cycle_models = true
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[]
[stress_1]
type = ComputeMultipleInelasticCosseratStress
block = 1
inelastic_models = ''
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[]
[mc]
type = CappedMohrCoulombCosseratStressUpdate
warn_about_precision_loss = false
host_youngs_modulus = 8E3
host_poissons_ratio = 0.25
base_name = mc
tensile_strength = mc_tensile_str_strong_harden
compressive_strength = mc_compressive_str
cohesion = mc_coh_strong_harden
friction_angle = mc_fric
dilation_angle = mc_dil
max_NR_iterations = 100000
smoothing_tol = 0.1 # MPa # Must be linked to cohesion
yield_function_tol = 1E-9 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[]
[wp]
type = CappedWeakPlaneCosseratStressUpdate
warn_about_precision_loss = false
base_name = wp
cohesion = wp_coh_harden
tan_friction_angle = wp_tan_fric
tan_dilation_angle = wp_tan_dil
tensile_strength = wp_tensile_str_harden
compressive_strength = wp_compressive_str_soften
max_NR_iterations = 10000
tip_smoother = 0.05
smoothing_tol = 0.05 # MPa # Note, this must be tied to cohesion, otherwise get no possible return at cone apex
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0E-3
[]
[undrained_density_0]
type = GenericConstantMaterial
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
prop_names = density
prop_values = 2500
[]
[undrained_density_1]
type = GenericFunctionMaterial
block = 1
prop_names = density
prop_values = density_sideways
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Postprocessors]
[min_roof_disp]
type = NodalExtremeValue
boundary = roof
value_type = min
variable = disp_z
[]
[min_roof_pp]
type = NodalExtremeValue
boundary = roof
value_type = min
variable = porepressure
[]
[min_surface_disp]
type = NodalExtremeValue
boundary = zmax
value_type = min
variable = disp_z
[]
[min_surface_pp]
type = NodalExtremeValue
boundary = zmax
value_type = min
variable = porepressure
[]
[max_perm_zz]
type = ElementExtremeValue
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
variable = perm_zz
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
# best overall
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
# best if you don't have mumps:
#petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
#petsc_options_value = ' asm 2 lu gmres 200'
# very basic:
#petsc_options_iname = '-pc_type -ksp_type -ksp_gmres_restart'
#petsc_options_value = ' bjacobi gmres 200'
line_search = bt
nl_abs_tol = 1e-3
nl_rel_tol = 1e-5
l_max_its = 200
nl_max_its = 30
start_time = 0.0
dt = 0.0025
end_time = 0.5
[]
[Outputs]
time_step_interval = 1
print_linear_residuals = true
exodus = true
csv = true
console = true
[]
(modules/thermal_hydraulics/test/tests/vectorpostprocessors/sampler_1d_real/ad_sampler_1d_real.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 5
xmin = 0
xmax = 5
[]
[Functions]
[test_fn]
type = ParsedFunction
expression = 'x'
[]
[]
[Materials]
[test_mat]
type = ADGenericFunctionMaterial
prop_names = 'test_prop'
prop_values = 'test_fn'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[VectorPostprocessors]
[test_vpp]
type = ADSampler1DReal
block = 0
property = test_prop
sort_by = x
execute_on = 'INITIAL'
[]
[]
[Outputs]
csv = true
execute_on = 'INITIAL'
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/convergence/2D/dirichlet.i)
# Simple 2D plane strain test
[GlobalParams]
displacements = 'disp_x disp_y'
large_kinematics = true
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
[]
[]
[Kernels]
[sdx]
type = TotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[sdy]
type = TotalLagrangianStressDivergence
variable = disp_y
component = 1
[]
[]
[Functions]
[pullx]
type = ParsedFunction
expression = '0.5 * t'
[]
[pully]
type = ParsedFunction
expression = '-0.3 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = left
variable = disp_y
value = 0.0
[]
[pull_x]
type = FunctionDirichletBC
boundary = right
variable = disp_x
function = pullx
preset = true
[]
[pull_y]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = pully
preset = true
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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-10
nl_abs_tol = 1e-12
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 1.0
[]
[Postprocessors]
[nonlin]
type = NumNonlinearIterations
[]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/solid_mechanics/test/tests/thermal_expansion_function/small_linear.i)
# This tests the thermal expansion coefficient function using both
# options to specify that function: mean and instantaneous. There
# two blocks, each containing a single element, and these use the
# two variants of the function.
# In this test, the instantaneous CTE function is a linear function
# while the mean CTE function is an analytic function designed to
# give the same response. If \bar{alpha}(T) is the mean CTE function,
# and \alpha(T) is the instantaneous CTE function,
# \bar{\alpha}(T) = 1/(T-Tref) \intA^{T}_{Tsf} \alpha(T) dT
# where Tref is the reference temperature used to define the mean CTE
# function, and Tsf is the stress-free temperature.
# This version of the test uses small deformation theory. The results
# from the two models are identical.
[Mesh]
file = 'blocks.e'
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = SMALL
add_variables = true
eigenstrain_names = eigenstrain
generate_output = 'strain_xx strain_yy strain_zz'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = disp_x
boundary = 3
value = 0.0
[../]
[./bottom]
type = DirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[./back]
type = DirichletBC
variable = disp_z
boundary = 1
value = 0.0
[../]
[]
[AuxKernels]
[./temp]
type = FunctionAux
variable = temp
block = '1 2'
function = temp_func
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeLinearElasticStress
[../]
[./thermal_expansion_strain1]
type = ComputeMeanThermalExpansionFunctionEigenstrain
block = 1
thermal_expansion_function = cte_func_mean
thermal_expansion_function_reference_temperature = 0.5
stress_free_temperature = 0.0
temperature = temp
eigenstrain_name = eigenstrain
[../]
[./thermal_expansion_strain2]
type = ComputeInstantaneousThermalExpansionFunctionEigenstrain
block = 2
thermal_expansion_function = cte_func_inst
stress_free_temperature = 0.0
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Functions]
[./cte_func_mean]
type = ParsedFunction
symbol_names = 'tsf tref scale' #stress free temp, reference temp, scale factor
symbol_values = '0.0 0.5 1e-4'
expression = 'scale * (0.5 * t^2 - 0.5 * tsf^2) / (t - tref)'
[../]
[./cte_func_inst]
type = PiecewiseLinear
xy_data = '0 0.0
2 2.0'
scale_factor = 1e-4
[../]
[./temp_func]
type = PiecewiseLinear
xy_data = '0 1
1 2'
[../]
[]
[Postprocessors]
[./disp_1]
type = NodalExtremeValue
variable = disp_x
boundary = 101
[../]
[./disp_2]
type = NodalExtremeValue
variable = disp_x
boundary = 102
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
l_max_its = 100
l_tol = 1e-4
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
start_time = 0.0
end_time = 1.0
dt = 0.1
[]
[Outputs]
csv = true
[]
(modules/phase_field/examples/multiphase/GrandPotential3Phase.i)
# This is an example of implementation of the multi-phase, multi-order parameter
# grand potential based phase-field model described in Phys. Rev. E, 98, 023309
# (2018). It includes 3 phases with 1 grain of each phase. This example was used
# to generate the results shown in Fig. 3 of the paper.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 60
xmin = -15
xmax = 15
[]
[Variables]
[./w]
[../]
[./etaa0]
[../]
[./etab0]
[../]
[./etad0]
[../]
[]
[ICs]
[./IC_etaa0]
type = FunctionIC
variable = etaa0
function = ic_func_etaa0
[../]
[./IC_etab0]
type = FunctionIC
variable = etab0
function = ic_func_etab0
[../]
[./IC_etad0]
type = ConstantIC
variable = etad0
value = 0.1
[../]
[./IC_w]
type = FunctionIC
variable = w
function = ic_func_w
[../]
[]
[Functions]
[./ic_func_etaa0]
type = ParsedFunction
expression = '0.9*0.5*(1.0-tanh((x)/sqrt(2.0)))'
[../]
[./ic_func_etab0]
type = ParsedFunction
expression = '0.9*0.5*(1.0+tanh((x)/sqrt(2.0)))'
[../]
[./ic_func_w]
type = ParsedFunction
expression = 0
[../]
[]
[Kernels]
# Order parameter eta_alpha0
[./ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0 etad0'
gamma_names = 'gab gad'
[../]
[./ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
coupled_variables = 'etab0 etad0 w'
[../]
[./ACa0_int]
type = ACInterface
variable = etaa0
kappa_name = kappa
[../]
[./ea0_dot]
type = TimeDerivative
variable = etaa0
[../]
# Order parameter eta_beta0
[./ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etaa0 etad0'
gamma_names = 'gab gbd'
[../]
[./ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etad0 w'
[../]
[./ACb0_int]
type = ACInterface
variable = etab0
kappa_name = kappa
[../]
[./eb0_dot]
type = TimeDerivative
variable = etab0
[../]
# Order parameter eta_delta0
[./ACd0_bulk]
type = ACGrGrMulti
variable = etad0
v = 'etaa0 etab0'
gamma_names = 'gad gbd'
[../]
[./ACd0_sw]
type = ACSwitching
variable = etad0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etab0 w'
[../]
[./ACd0_int]
type = ACInterface
variable = etad0
kappa_name = kappa
[../]
[./ed0_dot]
type = TimeDerivative
variable = etad0
[../]
#Chemical potential
[./w_dot]
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
coupled_variables = 'etaa0 etab0 etad0'
[../]
[./Diffusion]
type = MatDiffusion
variable = w
diffusivity = Dchi
args = ''
[../]
[./coupled_etaa0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob rhod'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etab0 etad0'
[../]
[./coupled_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob rhod'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etab0 etad0'
[../]
[./coupled_etad0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etad0
Fj_names = 'rhoa rhob rhod'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etab0 etad0'
[../]
[]
[Materials]
[./ha_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etaa0'
[../]
[./hb_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etab0'
[../]
[./hd_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hd
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etad0'
[../]
[./omegaa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
derivative_order = 2
[../]
[./omegab]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegab
material_property_names = 'Vm kb cbeq'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
derivative_order = 2
[../]
[./omegad]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegad
material_property_names = 'Vm kd cdeq'
expression = '-0.5*w^2/Vm^2/kd-w/Vm*cdeq'
derivative_order = 2
[../]
[./rhoa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
derivative_order = 2
[../]
[./rhob]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
derivative_order = 2
[../]
[./rhod]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhod
material_property_names = 'Vm kd cdeq'
expression = 'w/Vm^2/kd + cdeq/Vm'
derivative_order = 2
[../]
[./c]
type = ParsedMaterial
material_property_names = 'Vm rhoa rhob rhod ha hb hd'
expression = 'Vm * (ha * rhoa + hb * rhob + hd * rhod)'
property_name = c
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'kappa_c kappa L D Vm ka caeq kb cbeq kd cdeq gab gad gbd mu tgrad_corr_mult'
prop_values = '0 1 1.0 1.0 1.0 10.0 0.1 10.0 0.9 10.0 0.5 1.5 1.5 1.5 1.0 0.0'
[../]
[./Mobility]
type = DerivativeParsedMaterial
property_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
derivative_order = 2
[../]
[./chi]
type = DerivativeParsedMaterial
property_name = chi
material_property_names = 'Vm ha(etaa0,etab0,etad0) ka hb(etaa0,etab0,etad0) kb hd(etaa0,etab0,etad0) kd'
expression = '(ha/ka + hb/kb + hd/kd) / Vm^2'
coupled_variables = 'etaa0 etab0 etad0'
derivative_order = 2
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[VectorPostprocessors]
[./etaa0]
type = LineValueSampler
variable = etaa0
start_point = '-15 0 0'
end_point = '15 0 0'
num_points = 61
sort_by = x
execute_on = 'initial timestep_end final'
[../]
[./etab0]
type = LineValueSampler
variable = etab0
start_point = '-15 0 0'
end_point = '15 0 0'
num_points = 61
sort_by = x
execute_on = 'initial timestep_end final'
[../]
[./etad0]
type = LineValueSampler
variable = etad0
start_point = '-15 0 0'
end_point = '15 0 0'
num_points = 61
sort_by = x
execute_on = 'initial timestep_end final'
[../]
[]
[Executioner]
type = Transient
nl_max_its = 15
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = -pc_type
petsc_options_value = asm
l_max_its = 15
l_tol = 1.0e-3
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 20
nl_abs_tol = 1e-10
dt = 1.0
[]
[Outputs]
[./exodus]
type = Exodus
execute_on = 'initial timestep_end final'
time_step_interval = 1
[../]
[./csv]
type = CSV
execute_on = 'initial timestep_end final'
time_step_interval = 1
[../]
[]
(test/tests/utils/spline_interpolation/bicubic_spline_interpolation.i)
[Mesh]
type = GeneratedMesh
dim = 3
nz = 1
nx = 4
ny = 4
xmax = 4
ymax = 4
[]
[Functions]
[./yx1]
type = ParsedFunction
expression = '3*x^2'
[../]
[./yx2]
type = ParsedFunction
expression = '6*y^2'
[../]
[./spline_fn]
type = BicubicSplineFunction
x1 = '0 2 4'
x2 = '0 2 4 6'
y = '0 16 128 432 8 24 136 440 64 80 192 496'
yx11 = '0 0 0 0'
yx1n = '48 48 48 48'
yx21 = '0 0 0'
yx2n = '216 216 216'
yx1 = 'yx1'
yx2 = 'yx2'
[../]
[./u_func]
type = ParsedFunction
expression = 'x^3 + 2*y^3'
[../]
[./u2_forcing_func]
type = ParsedFunction
expression = '-6*x - 12*y'
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./bi_func_value]
order = FIRST
family = LAGRANGE
[../]
[./x_deriv]
order = FIRST
family = LAGRANGE
[../]
[./y_deriv]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./bi_func_value]
type = FunctionAux
variable = bi_func_value
function = spline_fn
[../]
[./deriv_1]
type = FunctionDerivativeAux
function = spline_fn
variable = x_deriv
component = x
[../]
[./deriv_2]
type = FunctionDerivativeAux
function = spline_fn
variable = y_deriv
component = y
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
function = u2_forcing_func
[../]
[]
[BCs]
[./sides]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = u_func
[../]
[]
[Postprocessors]
[./nodal_l2_err_spline]
type = NodalL2Error
variable = u
function = spline_fn
execute_on = 'initial timestep_end'
[../]
[./nodal_l2_err_analytic]
type = NodalL2Error
variable = u
function = u_func
execute_on = 'initial timestep_end'
[../]
[./x_deriv_err_analytic]
type = NodalL2Error
variable = x_deriv
function = yx1
execute_on = 'initial timestep_end'
[../]
[./y_deriv_err_analytic]
type = NodalL2Error
variable = y_deriv
function = yx2
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/relperm/vangenuchten2.i)
# Test van Genuchten relative permeability curve by varying saturation over the mesh
# van Genuchten exponent m = 0.4 for both phases
# Phase 0 residual saturation s0r = 0.1
# Phase 1 residual saturation s1r = 0.2
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[p0]
initial_condition = 1e6
[]
[s1]
[]
[]
[AuxVariables]
[s0aux]
family = MONOMIAL
order = CONSTANT
[]
[s1aux]
family = MONOMIAL
order = CONSTANT
[]
[kr0aux]
family = MONOMIAL
order = CONSTANT
[]
[kr1aux]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[s0]
type = PorousFlowPropertyAux
property = saturation
phase = 0
variable = s0aux
[]
[s1]
type = PorousFlowPropertyAux
property = saturation
phase = 1
variable = s1aux
[]
[kr0]
type = PorousFlowPropertyAux
property = relperm
phase = 0
variable = kr0aux
[]
[kr1]
type = PorousFlowPropertyAux
property = relperm
phase = 1
variable = kr1aux
[]
[]
[Functions]
[s1]
type = ParsedFunction
expression = x
[]
[]
[ICs]
[s1]
type = FunctionIC
variable = s1
function = s1
[]
[]
[Kernels]
[p0]
type = Diffusion
variable = p0
[]
[s1]
type = Diffusion
variable = s1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'p0 s1'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = p0
phase1_saturation = s1
capillary_pressure = pc
[]
[kr0]
type = PorousFlowRelativePermeabilityVG
phase = 0
m = 0.4
s_res = 0.1
sum_s_res = 0.3
[]
[kr1]
type = PorousFlowRelativePermeabilityVG
phase = 1
m = 0.4
s_res = 0.2
sum_s_res = 0.3
wetting = false
[]
[]
[VectorPostprocessors]
[vpp]
type = LineValueSampler
warn_discontinuous_face_values = false
variable = 's0aux s1aux kr0aux kr1aux'
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 20
sort_by = id
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-7
[]
[BCs]
[sleft]
type = DirichletBC
variable = s1
value = 0
boundary = left
[]
[sright]
type = DirichletBC
variable = s1
value = 1
boundary = right
[]
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(modules/solid_mechanics/test/tests/umat/shear_order/shear_order_umat.i)
# Testing the UMAT Interface - linear elastic model using the large strain formulation.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
nx = 1
ny = 1
nz = 1
[]
[]
[Functions]
[top_pull]
type = ParsedFunction
expression = 1.0e-5*t
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
generate_output = 'stress_xy stress_yz stress_xz strain_xy strain_yz strain_xz'
[]
[]
[BCs]
[pull_function]
type = FunctionDirichletBC
variable = disp_x
boundary = top
function = top_pull
[]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = bottom
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[z_bot]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0.0
[]
[]
[Materials]
# This input file is used to compare the MOOSE and UMAT models, activating
# specific ones with cli variable_names.
# 1. Active for umat calculation
[umat]
type = AbaqusUMATStress
constant_properties = ' '
plugin = '../../../plugins/elastic_incremental_anisotropic'
num_state_vars = 0
use_one_based_indexing = true
[]
# 2. Active for reference MOOSE computations
[elastic]
type = ComputeElasticityTensor
fill_method = orthotropic
C_ijkl = '1.0e5 1.0e5 1.0e5 1.0e4 2.0e4 3.0e4 0.0 0.0 0.0 0.0 0.0 0.0'
# skip_check = true
[]
[stress]
type = ComputeFiniteStrainElasticStress
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-11
nl_abs_tol = 1e-11
l_tol = 1e-9
start_time = 0.0
end_time = 10.0
dt = 1.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(modules/richards/test/tests/buckley_leverett/bl02.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 150
xmin = 0
xmax = 15
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2.0E6
[../]
[./SeffVG]
type = RichardsSeff1VG
m = 0.8
al = 1E-3
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[AuxKernels]
active = 'calculate_seff'
[./calculate_seff]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = SeffVG
pressure_vars = pressure
[../]
[]
[Variables]
[./pressure]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_pressure
[../]
[../]
[]
[BCs]
active = 'left'
[./left]
type = DirichletBC
variable = pressure
boundary = left
value = 980000
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
variable = pressure
[../]
[]
[Functions]
active = 'initial_pressure'
[./initial_pressure]
type = ParsedFunction
expression = max((1000000-x/5*1000000)-20000,-20000)
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.15
mat_permeability = '1E-10 0 0 0 1E-10 0 0 0 1E-10'
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]
active = 'andy'
[./andy]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 20'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 50
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.01
[../]
[]
[Outputs]
file_base = bl02
time_step_interval = 1000000
exodus = true
[]
(test/tests/postprocessors/num_elems/num_elems.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
nz = 0
zmax = 0
elem_type = QUAD4
uniform_refine = 1
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./u_aux]
order = FIRST
family = LAGRANGE
[../]
[./v_aux]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 3
dt = 1
solve_type = PJFNK
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 3
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Postprocessors]
[./num_elems_active]
type = NumElems
elem_filter = 'ACTIVE'
execute_on = 'initial timestep_end'
[../]
[./num_elems_total]
type = NumElems
elem_filter = 'TOTAL'
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven.i)
[GlobalParams]
gravity = '0 0 0'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
elem_type = QUAD9
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./vel_x]
order = SECOND
family = LAGRANGE
[../]
[./vel_y]
order = SECOND
family = LAGRANGE
[../]
[./T]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 1.0
[../]
[../]
[./p]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
# mass
[./mass]
type = INSMass
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
# x-momentum, time
[./x_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_x
[../]
# x-momentum, space
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
# y-momentum, time
[./y_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_y
[../]
# y-momentum, space
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
# temperature
[./temperature_time]
type = INSTemperatureTimeDerivative
variable = T
[../]
[./temperature_space]
type = INSTemperature
variable = T
u = vel_x
v = vel_y
[../]
[]
[BCs]
[./x_no_slip]
type = DirichletBC
variable = vel_x
boundary = 'bottom right left'
value = 0.0
[../]
[./lid]
type = FunctionDirichletBC
variable = vel_x
boundary = 'top'
function = 'lid_function'
[../]
[./y_no_slip]
type = DirichletBC
variable = vel_y
boundary = 'bottom right top left'
value = 0.0
[../]
[./T_hot]
type = DirichletBC
variable = T
boundary = 'bottom'
value = 1
[../]
[./T_cold]
type = DirichletBC
variable = T
boundary = 'top'
value = 0
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'asm 2 ilu 4'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
file_base = lid_driven_out
exodus = true
perf_graph = true
[]
(modules/thermal_hydraulics/test/tests/components/form_loss_from_external_app_1phase/phy.form_loss_1phase.parent.i)
# This tests a form loss transfer using the MultiApp system. A dummy heat
# conduction problem is solved, then the form loss evaluated and transferred
# to the child app side of the solve, then the child app solves and then the
# parent continues solving
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 2
nx = 10
[]
[Functions]
[left_bc_fn]
type = PiecewiseLinear
x = '0 1'
y = '300 310'
[]
[K_prime_fn]
type = ParsedFunction
expression = 't*(2-x)*x'
[]
[]
[AuxVariables]
[K_prime]
[]
[]
[AuxKernels]
[K_prime_ak]
type = FunctionAux
variable = K_prime
function = K_prime_fn
[]
[]
[Variables]
[T]
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T
value = 300
[]
[]
[Kernels]
[td]
type = TimeDerivative
variable = T
[]
[diff]
type = Diffusion
variable = T
[]
[]
[BCs]
[left]
type = FunctionDirichletBC
variable = T
boundary = left
function = left_bc_fn
[]
[]
[Executioner]
type = Transient
dt = 0.5
end_time = 5
nl_abs_tol = 1e-10
abort_on_solve_fail = true
[]
[MultiApps]
[child]
type = TransientMultiApp
app_type = ThermalHydraulicsApp
input_files = phy.form_loss_1phase.child.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[K_to_s]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = child
source_variable = K_prime
variable = K_prime
[]
[]
(modules/phase_field/examples/kim-kim-suzuki/kks_example_noflux.i)
#
# KKS simple example in the split form
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 150
ny = 15
nz = 0
xmin = -25
xmax = 25
ymin = -2.5
ymax = 2.5
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[AuxVariables]
[./Fglobal]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Variables]
# order parameter
[./eta]
order = FIRST
family = LAGRANGE
[../]
# solute concentration
[./c]
order = FIRST
family = LAGRANGE
[../]
# chemical potential
[./w]
order = FIRST
family = LAGRANGE
[../]
# Liquid phase solute concentration
[./cl]
order = FIRST
family = LAGRANGE
initial_condition = 0.1
[../]
# Solid phase solute concentration
[./cs]
order = FIRST
family = LAGRANGE
initial_condition = 0.9
[../]
[]
[Functions]
[./ic_func_eta]
type = ParsedFunction
expression = '0.5*(1.0-tanh((x)/sqrt(2.0)))'
[../]
[./ic_func_c]
type = ParsedFunction
expression = '0.9*(0.5*(1.0-tanh(x/sqrt(2.0))))^3*(6*(0.5*(1.0-tanh(x/sqrt(2.0))))^2-15*(0.5*(1.0-tanh(x/sqrt(2.0))))+10)+0.1*(1-(0.5*(1.0-tanh(x/sqrt(2.0))))^3*(6*(0.5*(1.0-tanh(x/sqrt(2.0))))^2-15*(0.5*(1.0-tanh(x/sqrt(2.0))))+10))'
[../]
[]
[ICs]
[./eta]
variable = eta
type = FunctionIC
function = ic_func_eta
[../]
[./c]
variable = c
type = FunctionIC
function = ic_func_c
[../]
[]
[Materials]
# Free energy of the liquid
[./fl]
type = DerivativeParsedMaterial
property_name = fl
coupled_variables = 'cl'
expression = '(0.1-cl)^2'
[../]
# Free energy of the solid
[./fs]
type = DerivativeParsedMaterial
property_name = fs
coupled_variables = 'cs'
expression = '(0.9-cs)^2'
[../]
# 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 eps_sq'
prop_values = '0.7 0.7 1.0 '
[../]
[]
[Kernels]
active = 'PhaseConc ChemPotSolute CHBulk ACBulkF ACBulkC ACInterface dcdt detadt ckernel'
# enforce c = (1-h(eta))*cl + h(eta)*cs
[./PhaseConc]
type = KKSPhaseConcentration
ca = cl
variable = cs
c = c
eta = eta
[../]
# enforce pointwise equality of chemical potentials
[./ChemPotSolute]
type = KKSPhaseChemicalPotential
variable = cl
cb = cs
fa_name = fl
fb_name = fs
[../]
#
# Cahn-Hilliard Equation
#
[./CHBulk]
type = KKSSplitCHCRes
variable = c
ca = cl
fa_name = fl
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 = fl
fb_name = fs
w = 1.0
coupled_variables = 'cl cs'
[../]
[./ACBulkC]
type = KKSACBulkC
variable = eta
ca = cl
cb = cs
fa_name = fl
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = eps_sq
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[AuxKernels]
[./GlobalFreeEnergy]
variable = Fglobal
type = KKSGlobalFreeEnergy
fa_name = fl
fb_name = fs
w = 1.0
[../]
[]
[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 = 100
nl_max_its = 100
num_steps = 50
dt = 0.1
[]
#
# Precondition using handcoded off-diagonal terms
#
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[VectorPostprocessors]
[./c]
type = LineValueSampler
start_point = '-25 0 0'
end_point = '25 0 0'
variable = c
num_points = 151
sort_by = id
execute_on = timestep_end
[../]
[./eta]
type = LineValueSampler
start_point = '-25 0 0'
end_point = '25 0 0'
variable = eta
num_points = 151
sort_by = id
execute_on = timestep_end
[../]
[]
[Outputs]
exodus = true
[./csv]
type = CSV
execute_on = final
[../]
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/convergence/3D/neumann.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 = 4
ny = 4
nz = 4
[]
[]
[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
[]
[]
[Functions]
[pullx]
type = ParsedFunction
expression = '4000 * t'
[]
[pully]
type = ParsedFunction
expression = '-2000 * t'
[]
[pullz]
type = ParsedFunction
expression = '3000 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = left
variable = disp_y
value = 0.0
[]
[leftz]
type = DirichletBC
preset = true
boundary = left
variable = disp_z
value = 0.0
[]
[pull_x]
type = FunctionNeumannBC
boundary = right
variable = disp_x
function = pullx
[]
[pull_y]
type = FunctionNeumannBC
boundary = top
variable = disp_y
function = pully
[]
[pull_z]
type = FunctionNeumannBC
boundary = right
variable = disp_z
function = pullz
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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 = 0.2
dtmin = 0.2
end_time = 1.0
[]
[Postprocessors]
[nonlin]
type = NumNonlinearIterations
[]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized_with_temp.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[temperature][]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./mass_pspg]
type = INSADMassPSPG
variable = p
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[../]
[./momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[../]
[./temperature_advection]
type = INSADEnergyAdvection
variable = temperature
[../]
[./temperature_conduction]
type = ADHeatConduction
variable = temperature
thermal_conductivity = 'k'
[../]
[temperature_supg]
type = INSADEnergySUPG
variable = temperature
velocity = velocity
[]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left'
[../]
[./lid]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 'lid_function'
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[./temperature_hot]
type = DirichletBC
variable = temperature
boundary = 'bottom'
value = 1
[../]
[./temperature_cold]
type = DirichletBC
variable = temperature
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = temperature
[]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/mms/skew-correction/skewed-vortex.i)
mu = 1.0
rho = 1.0
[Problem]
error_on_jacobian_nonzero_reallocation = true
[]
[Mesh]
[gen_mesh]
type = FileMeshGenerator
file = skewed.msh
[]
coord_type = 'XYZ'
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = vel_x
v = vel_y
pressure = pressure
[]
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
initial_condition = 1
face_interp_method = 'skewness-corrected'
[]
[vel_y]
type = INSFVVelocityVariable
initial_condition = 1
face_interp_method = 'skewness-corrected'
[]
[pressure]
type = INSFVPressureVariable
face_interp_method = 'skewness-corrected'
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = 'skewness-corrected'
velocity_interp_method = 'rc'
rho = ${rho}
[]
[mean_zero_pressure]
type = FVIntegralValueConstraint
variable = pressure
lambda = lambda
[]
[u_advection]
type = INSFVMomentumAdvection
variable = vel_x
advected_interp_method = 'skewness-corrected'
velocity_interp_method = 'rc'
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = vel_x
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = vel_x
momentum_component = 'x'
pressure = pressure
[]
[u_forcing]
type = INSFVBodyForce
variable = vel_x
functor = forcing_u
momentum_component = 'x'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = vel_y
advected_interp_method = 'skewness-corrected'
velocity_interp_method = 'rc'
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = vel_y
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = vel_y
momentum_component = 'y'
pressure = pressure
[]
[v_forcing]
type = INSFVBodyForce
variable = vel_y
functor = forcing_v
momentum_component = 'y'
[]
[]
[FVBCs]
[no-slip-wall-u]
type = INSFVNoSlipWallBC
boundary = 'left right top bottom'
variable = vel_x
function = '0'
[]
[no-slip-wall-v]
type = INSFVNoSlipWallBC
boundary = 'left right top bottom'
variable = vel_y
function = '0'
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'x^2*(1-x)^2*(2*y-6*y^2+4*y^3)'
[]
[exact_v]
type = ParsedFunction
expression = '-y^2*(1-y)^2*(2*x-6*x^2+4*x^3)'
[]
[exact_p]
type = ParsedFunction
expression = 'x*(1-x)-2/12'
[]
[forcing_u]
type = ParsedFunction
expression = '-4*mu/rho*(-1+2*y)*(y^2-6*x*y^2+6*x^2*y^2-y+6*x*y-6*x^2*y+3*x^2-6*x^3+3*x^4)+1-2*x+4*x^3'
'*y^2*(2*y^2-2*y+1)*(y-1)^2*(-1+2*x)*(x-1)^3'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[forcing_v]
type = ParsedFunction
expression = '4*mu/rho*(-1+2*x)*(x^2-6*y*x^2+6*x^2*y^2-x+6*x*y-6*x*y^2+3*y^2-6*y^3+3*y^4)+4*y^3*x^2*(2'
'*x^2-2*x+1)*(x-1)^2*(-1+2*y)*(y-1)^3'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-8
[]
[Outputs]
[out]
type = Exodus
hide = lambda
[]
csv = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2FunctorError
approximate = vel_x
exact = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2v]
type = ElementL2FunctorError
approximate = vel_y
exact = exact_v
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
approximate = pressure
exact = exact_p
type = ElementL2FunctorError
outputs = 'console 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
[]
(test/tests/preconditioners/vcp/vcp_test.i)
[Mesh]
[original_file_mesh]
type = FileMeshGenerator
file = non_conform_2blocks.e
[]
[secondary_side]
input = original_file_mesh
type = LowerDBlockFromSidesetGenerator
sidesets = '10'
new_block_id = '100'
new_block_name = 'secondary_side'
[]
[primary_side]
input = secondary_side
type = LowerDBlockFromSidesetGenerator
sidesets = '20'
new_block_id = '200'
new_block_name = 'primary_side'
[]
[]
[Functions]
[exact_sln]
type = ParsedFunction
expression = sin(2*pi*x)*sin(2*pi*y)
[]
[ffn]
type = ParsedFunction
expression = 8*pi*pi*sin(2*pi*x)*sin(2*pi*y)
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[lm]
order = FIRST
family = LAGRANGE
block = secondary_side
use_dual = true
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = ffn
[]
[]
[Constraints]
[ced]
type = EqualValueConstraint
variable = lm
secondary_variable = u
primary_boundary = 20
primary_subdomain = 200
secondary_boundary = 10
secondary_subdomain = 100
[]
[]
[BCs]
[all]
type = DirichletBC
variable = u
boundary = '30 40'
value = 0.0
[]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_sln
variable = u
boundary = '50 60'
[]
[]
[Postprocessors]
[l2_error]
type = ElementL2Error
variable = u
function = exact_sln
block = '1 2'
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[vcp]
type = VCP
full = true
lm_variable = 'lm'
primary_variable = 'u'
preconditioner = 'AMG'
is_lm_coupling_diagonal = true
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_view'
l_max_its = 100
nl_rel_tol = 1e-6
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/scalar_adr/supg/advection_error_testing.i)
velocity=1
[GlobalParams]
u = ${velocity}
pressure = 0
tau_type = mod
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 4
xmax = 1
elem_type = EDGE2
[]
[Variables]
[./c]
family = LAGRANGE
order = FIRST
[../]
[]
[Kernels]
[./adv]
type = AdvectionSUPG
variable = c
forcing_func = 'ffn'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = c
boundary = left
value = 0
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'mu rho'
prop_values = '0 1'
[../]
[]
[Functions]
[./ffn]
type = ParsedFunction
expression = '1-x^2'
[../]
[./c_func]
type = ParsedFunction
expression = 'x-x^3/3'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[Outputs]
[./exodus]
type = Exodus
[../]
[./csv]
type = CSV
[../]
[]
[Postprocessors]
[./L2c]
type = ElementL2Error
variable = c
function = c_func
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2cx]
type = ElementL2Error
variable = cx
function = ffn
outputs = 'console' execute_on = 'timestep_end'
[../]
[]
[AuxVariables]
[./cx]
family = MONOMIAL
order = FIRST
[../]
[]
[AuxKernels]
[./cx]
type = VariableGradientComponent
component = x
variable = cx
gradient_variable = c
[../]
[]
(test/tests/fvkernels/mms/mass-mom-mat-advection-diffusion/input.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 2
xmin = -.6
xmax = .6
[]
[]
[GlobalParams]
advected_interp_method = 'average'
[]
[Variables]
[fv_rho]
order = CONSTANT
family = MONOMIAL
fv = true
initial_condition = 2
[]
[fv_vel]
order = CONSTANT
family = MONOMIAL
fv = true
initial_condition = 2
[]
[]
[FVKernels]
[adv_rho]
type = FVMatAdvection
variable = fv_rho
vel = 'fv_velocity'
[]
[diff_rho]
type = FVDiffusion
variable = fv_rho
coeff = coeff
[]
[forcing_rho]
type = FVBodyForce
variable = fv_rho
function = 'forcing_rho'
[]
[adv_rho_u]
type = FVMatAdvection
variable = fv_vel
vel = 'fv_velocity'
advected_quantity = 'rho_u'
[]
[diff_vel]
type = FVDiffusion
variable = fv_vel
coeff = coeff
[]
[forcing_vel]
type = FVBodyForce
variable = fv_vel
function = 'forcing_vel'
[]
[]
[FVBCs]
[boundary_rho]
type = FVFunctionDirichletBC
boundary = 'left right'
function = 'exact_rho'
variable = fv_rho
[]
[boundary_vel]
type = FVFunctionDirichletBC
boundary = 'left right'
function = 'exact_vel'
variable = fv_vel
[]
[]
[Materials]
[euler_material]
type = ADCoupledVelocityMaterial
vel_x = fv_vel
rho = fv_rho
velocity = 'fv_velocity'
[]
[diff]
type = ADGenericFunctorMaterial
prop_names = 'coeff'
prop_values = '1'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
csv = true
[]
[Functions]
[forcing_rho]
type = ParsedFunction
expression = '-1.331*sin(1.1*x)^2 + 1.331*sin(1.1*x) + 1.331*cos(1.1*x)^2'
[]
[exact_rho]
type = ParsedFunction
expression = '1.1*sin(1.1*x)'
[]
[forcing_vel]
type = ParsedFunction
expression = '-2.9282*sin(1.1*x)^2*cos(1.1*x) + 1.4641*cos(1.1*x)^3 + 1.331*cos(1.1*x)'
[]
[exact_vel]
type = ParsedFunction
expression = '1.1*cos(1.1*x)'
[]
[]
[Postprocessors]
[./l2_rho]
type = ElementL2Error
variable = fv_rho
function = exact_rho
execute_on = timestep_end
[../]
[./l2_vel]
type = ElementL2Error
variable = fv_vel
function = exact_vel
execute_on = timestep_end
[../]
[h]
type = AverageElementSize
execute_on = timestep_end
[]
[]
(test/tests/kernels/ode/coupled_ode_td.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 1
nx = 1
[]
[Variables]
[./f]
family = SCALAR
order = FIRST
initial_condition = 1
[../]
[./f_times_mult]
family = SCALAR
order = FIRST
initial_condition = 1
[../]
[]
[ScalarKernels]
[./dT]
type = CoupledODETimeDerivative
variable = f
v = f_times_mult
[../]
[./src]
type = ParsedODEKernel
variable = f
expression = '-1'
[../]
[./f_times_mult_1]
type = ParsedODEKernel
variable = f_times_mult
expression = 'f_times_mult'
[../]
[./f_times_mult_2]
type = ParsedODEKernel
variable = f_times_mult
expression = '-f * g'
coupled_variables = 'f g'
[../]
[]
[AuxVariables]
[./g]
family = SCALAR
order = FIRST
[../]
[]
[Functions]
[./function_g]
type = ParsedFunction
expression = '(1 + t)'
[../]
[]
[AuxScalarKernels]
[./set_g]
type = FunctionScalarAux
function = function_g
variable = g
execute_on = 'linear initial'
[../]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 3
nl_abs_tol = 1e-9
[]
[Outputs]
csv = true
[]
(test/tests/outputs/debug/show_execution_userobjects.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1.5 2.4'
dy = '1.3 0.9'
ix = '3 2'
iy = '2 3'
subdomain_id = '0 1
1 0'
[]
[add_interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'cmg'
primary_block = 0
paired_block = 1
new_boundary = 'interface'
[]
second_order = true
[]
[Functions]
[forcing_fnu]
type = ParsedFunction
expression = -5.8*(x+y)+x*x*x-x+y*y*y-y
[]
[forcing_fnv]
type = ParsedFunction
expression = -4
[]
[slnu]
type = ParsedGradFunction
expression = x*x*x-x+y*y*y-y
grad_x = 3*x*x-1
grad_y = 3*y*y-1
[]
[slnv]
type = ParsedGradFunction
expression = x*x+y*y
grad_x = 2*x
grad_y = 2*y
[]
# NeumannBC functions
[bc_fnut]
type = ParsedFunction
expression = 3*y*y-1
[]
[bc_fnub]
type = ParsedFunction
expression = -3*y*y+1
[]
[bc_fnul]
type = ParsedFunction
expression = -3*x*x+1
[]
[bc_fnur]
type = ParsedFunction
expression = 3*x*x-1
[]
[]
[Variables]
[u]
order = SECOND
family = HIERARCHIC
[]
[v]
order = SECOND
family = LAGRANGE
initial_condition = 1
[]
[]
[AuxVariables]
[v_elem]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
active = 'diff1 diff2 test1 forceu forcev react'
[diff1]
type = Diffusion
variable = u
[]
[test1]
type = CoupledConvection
variable = u
velocity_vector = v
[]
[diff2]
type = Diffusion
variable = v
[]
[react]
type = Reaction
variable = u
[]
[forceu]
type = BodyForce
variable = u
function = forcing_fnu
[]
[forcev]
type = BodyForce
variable = v
function = forcing_fnv
[]
[]
[AuxKernels]
[set_v_elem]
type = FunctionAux
variable = v_elem
# selected not to be the solution for no particular reason
function = forcing_fnv
[]
[]
[BCs]
[bc_v]
type = FunctionDirichletBC
variable = v
function = slnv
boundary = 'left right top bottom'
[]
[bc_u_tb]
type = CoupledKernelGradBC
variable = u
var2 = v
vel = '0.1 0.1'
boundary = 'top bottom left right'
[]
[bc_ul]
type = FunctionNeumannBC
variable = u
function = bc_fnul
boundary = 'left'
[]
[bc_ur]
type = FunctionNeumannBC
variable = u
function = bc_fnur
boundary = 'right'
[]
[bc_ut]
type = FunctionNeumannBC
variable = u
function = bc_fnut
boundary = 'top'
[]
[bc_ub]
type = FunctionNeumannBC
variable = u
function = bc_fnub
boundary = 'bottom'
[]
[]
[Postprocessors]
# Global user objects
[dofs]
type = NumDOFs
[]
[h]
type = AverageElementSize
[]
# Elemental user objects
[L2u]
type = ElementL2Error
variable = u
function = slnu
# Testing an option
force_preic = true
[]
[L2v]
type = ElementL2Error
variable = v
function = slnv
# Testing an option
force_preaux = true
[]
[H1error]
type = ElementH1Error
variable = u
function = slnu
[]
[H1Semierror]
type = ElementH1SemiError
variable = u
function = slnu
[]
[L2v_elem]
type = ElementL2Error
variable = v_elem
function = slnv
[]
[f_integral]
type = FunctionElementIntegral
function = slnv
[]
[int_v]
type = ElementIntegralVariablePostprocessor
variable = v
block = 1
execute_on = 'TIMESTEP_END transfer'
[]
[int_v_elem]
type = ElementIntegralVariablePostprocessor
variable = v_elem
block = 1
execute_on = 'TIMESTEP_END transfer'
[]
# Side user objects
[integral_v]
type = SideIntegralVariablePostprocessor
variable = v
boundary = 0
[]
[]
[VectorPostprocessors]
# General UOs
[memory]
type = VectorMemoryUsage
[]
[line]
type = LineValueSampler
variable = v
num_points = 10
start_point = '0 0 0'
end_point = '0.5 0.5 0'
sort_by = 'x'
[]
# Nodal UOs
[nodal_sampler_y]
type = NodalValueSampler
variable = v
sort_by = 'y'
[]
[nodal_sampler_x]
type = NodalValueSampler
variable = v
sort_by = 'x'
[]
# Element UO
[elem_sample]
type = ElementValueSampler
variable = v_elem
sort_by = 'x'
[]
[]
[UserObjects]
# Nodal user objects
[find_node]
type = NearestNodeNumberUO
point = '0.5 0.5 0'
[]
# Side user objects
[side_int]
type = LayeredSideIntegral
variable = v
boundary = 0
direction = y
num_layers = 4
[]
[side_int_2]
type = NearestPointLayeredSideIntegral
variable = v
boundary = 0
direction = x
num_layers = 3
points = '1 1 0'
[]
# Interface user objects
[values]
type = InterfaceQpValueUserObject
var = v
boundary = interface
[]
inactive = 'prime_1 prime_2'
# Threaded general user objects
[prime_2]
type = PrimeProductUserObject
[]
[prime_1]
type = PrimeProductUserObject
[]
# Domain user objects
[domain_2]
type = InterfaceDomainUserObject
u = u
v = v
block = '0'
robin_boundaries = 'left'
interface_boundaries = 'interface'
interface_penalty = 1e-10
nl_abs_tol = 1e1
[]
[domain_1]
type = InterfaceDomainUserObject
u = u
v = v
block = '0 1'
robin_boundaries = 'left'
interface_boundaries = 'interface'
interface_penalty = 1e-10
nl_abs_tol = 1e1
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_tol = 1e-5
[]
[Problem]
kernel_coverage_check = false
[]
[MultiApps]
active = ''
[full_solve]
type = FullSolveMultiApp
execute_on = 'initial timestep_end final'
input_files = show_execution_userobjects.i
cli_args = 'Problem/solve=false'
[]
[]
[Transfers]
active = ''
[conservative]
type = MultiAppNearestNodeTransfer
from_multi_app = full_solve
source_variable = v
variable = v_elem
from_postprocessors_to_be_preserved = int_v
to_postprocessors_to_be_preserved = int_v_elem
[]
[]
[Debug]
show_execution_order = 'ALWAYS INITIAL NONLINEAR LINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/action/action_2d.i)
# 2D with mixed conditions on stress/strain
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[base]
type = FileMeshGenerator
file = '2d.exo'
[]
[sidesets]
type = SideSetsFromNormalsGenerator
input = base
normals = '-1 0 0
1 0 0
0 -1 0
0 1 0'
fixed_normal = true
new_boundary = 'left right bottom top'
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = SMALL
add_variables = true
new_system = true
formulation = TOTAL
volumetric_locking_correction = false
constraint_types = 'stress none none stress strain none none none none'
targets = 'stress11 stress12 strain22'
generate_output = 'pk1_stress_xx pk1_stress_xy pk1_stress_xz pk1_stress_yx pk1_stress_yy '
'pk1_stress_yz pk1_stress_zx pk1_stress_zy pk1_stress_zz '
'deformation_gradient_xx deformation_gradient_xy deformation_gradient_xz '
'deformation_gradient_yx deformation_gradient_yy deformation_gradient_yz '
'deformation_gradient_zx deformation_gradient_zy deformation_gradient_zz'
[]
[]
[]
[]
[Functions]
[stress11]
type = ParsedFunction
expression = '400*t'
[]
[strain22]
type = ParsedFunction
expression = '-2.0e-2*t'
[]
[stress12]
type = ParsedFunction
expression = '100*t'
[]
[]
[BCs]
[Periodic]
[x]
variable = disp_x
auto_direction = 'x y'
[]
[y]
variable = disp_y
auto_direction = 'x y'
[]
[]
[fix1_x]
type = DirichletBC
boundary = "fix1"
variable = disp_x
value = 0
[]
[fix1_y]
type = DirichletBC
boundary = "fix1"
variable = disp_y
value = 0
[]
[fix2_y]
type = DirichletBC
boundary = "fix2"
variable = disp_y
value = 0
[]
[]
[Materials]
[elastic_tensor_1]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
block = '1'
[]
[elastic_tensor_2]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 120000.0
poissons_ratio = 0.21
block = '2'
[]
[elastic_tensor_3]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 80000.0
poissons_ratio = 0.4
block = '3'
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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 = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 1.0
[]
[Outputs]
[out]
type = Exodus
file_base = '2d'
[]
[]
(modules/solid_mechanics/test/tests/finite_strain_tensor_mechanics_tests/elastic_rotation.i)
#
# Rotation Test
#
# This test is designed to compute a uniaxial stress and then follow that
# stress as the mesh is rotated 90 degrees.
#
# The mesh is composed of one block with a single element. The nodal
# displacements in the x and y directions are prescribed. Poisson's
# ratio is zero.
#
[Mesh]
file = rotation_test.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Functions]
# Functions
[./x_200]
type = ParsedFunction
symbol_names = 'delta t0'
symbol_values = '-1e-6 1.0'
expression = 'if(t<=1.0, delta*t, (1.0+delta)*cos(pi/2*(t-t0)) - 1.0)'
[../]
[./y_200]
type = ParsedFunction
symbol_names = 'delta t0'
symbol_values = '-1e-6 1.0'
expression = 'if(t<=1.0, 0.0, (1.0+delta)*sin(pi/2*(t-t0)))'
[../]
[./x_300]
type = ParsedFunction
symbol_names = 'delta t0'
symbol_values = '-1e-6 1.0'
expression = 'if(t<=1.0, delta*t, (1.0+delta)*cos(pi/2.0*(t-t0)) - sin(pi/2.0*(t-t0)) - 1.0)'
[../]
[./y_300]
type = ParsedFunction
symbol_names = 'delta t0'
symbol_values = '-1e-6 1.0'
expression = 'if(t<=1.0, 0.0, cos(pi/2.0*(t-t0)) + (1+delta)*sin(pi/2.0*(t-t0)) - 1.0)'
[../]
[./x_400]
type = ParsedFunction
symbol_names = 'delta t0'
symbol_values = '-1e-6 1.0'
expression = 'if(t<=1.0, 0.0, -sin(pi/2.0*(t-t0)))'
[../]
[./y_400]
type = ParsedFunction
symbol_names = 'delta t0'
symbol_values = '-1e-6 1.0'
expression = 'if(t<=1.0, 0.0, cos(pi/2.0*(t-t0)) - 1.0)'
[../]
[]
[Variables]
# Variables
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
# AuxVariables
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[SolidMechanics]
use_displaced_mesh = true
[../]
[]
[AuxKernels]
# AuxKernels
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[]
[BCs]
# BCs
[./no_x]
type = DirichletBC
variable = disp_x
boundary = 100
value = 0.0
[../]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = 100
value = 0.0
[../]
[./x_200]
type = FunctionDirichletBC
variable = disp_x
boundary = 200
function = x_200
[../]
[./y_200]
type = FunctionDirichletBC
variable = disp_y
boundary = 200
function = y_200
[../]
[./x_300]
type = FunctionDirichletBC
variable = disp_x
boundary = 300
function = x_300
[../]
[./y_300]
type = FunctionDirichletBC
variable = disp_y
boundary = 300
function = y_300
[../]
[./x_400]
type = FunctionDirichletBC
variable = disp_x
boundary = 400
function = x_400
[../]
[./y_400]
type = FunctionDirichletBC
variable = disp_y
boundary = 400
function = y_400
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '100 200 300 400'
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 1
C_ijkl = '1.0e6 0.0 0.0 1.0e6 0.0 1.0e6 0.5e6 0.5e6 0.5e6'
fill_method = symmetric9
[../]
[./strain]
type = ComputeFiniteStrain
block = 1
displacements = 'disp_x disp_y disp_z'
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 1
[../]
[]
[Postprocessors]
[./stress_xx]
type = ElementAverageValue
variable = stress_xx
[../]
[./stress_yy]
type = ElementAverageValue
variable = stress_yy
[../]
[./stress_xy]
type = ElementAverageValue
variable = stress_xy
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
# Executioner
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type '
petsc_options_value = 'lu'
nl_rel_tol = 1e-30
nl_abs_tol = 1e-20
l_max_its = 20
start_time = 0.0
dt = 0.01
end_time = 2.0
[]
[Outputs]
exodus = true
[] # Outputs
(test/tests/transfers/multiapp_conservative_transfer/sub_userobject.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 8
xmax = 0.1
ymax = 0.5
coord_type = rz
[]
[Variables]
[u]
initial_condition = 1
[]
[]
[AuxVariables]
[layered_average_value]
order = CONSTANT
family = MONOMIAL
[]
[]
[Postprocessors]
[from_postprocessor]
type = ElementIntegralVariablePostprocessor
variable = layered_average_value
[]
[]
[Functions]
[axial_force]
type = ParsedFunction
expression = 1000*y
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[force]
type = BodyForce
variable = u
function = axial_force
[]
[]
[AuxKernels]
[layered_aux]
type = SpatialUserObjectAux
variable = layered_average_value
execute_on = 'nonlinear TIMESTEP_END'
user_object = layered_average
[]
[]
[BCs]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[UserObjects]
[layered_average]
type = LayeredAverage
variable = u
direction = y
num_layers = 4
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.001
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/bcs/periodic/wedge.i)
[Mesh]
file = wedge.e
uniform_refine = 1
[]
[Functions]
active = 'tr_x tr_y'
[./tr_x]
type = ParsedFunction
expression = -x
[../]
[./tr_y]
type = ParsedFunction
expression = y
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff forcing dot'
[./diff]
type = Diffusion
variable = u
[../]
[./forcing]
type = GaussContForcing
variable = u
x_center = -0.5
y_center = 3.0
x_spread = 0.2
y_spread = 0.2
[../]
[./dot]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
#active = ' '
[./Periodic]
[./x]
primary = 1
secondary = 2
transform_func = 'tr_x tr_y'
inv_transform_func = 'tr_x tr_y'
[../]
[../]
[]
[Executioner]
type = Transient
dt = 0.5
num_steps = 6
solve_type = NEWTON
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_wedge
exodus = true
[]
(modules/fluid_properties/test/tests/stiffened_gas/test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
elem_type = QUAD4
[]
[Functions]
[./f_fn]
type = ParsedFunction
expression = -4
[../]
[./bc_fn]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./e]
initial_condition = 113206.45935406466
[../]
[./v]
initial_condition = 0.0007354064593540647
[../]
[./p]
family = MONOMIAL
order = CONSTANT
[../]
[./T]
family = MONOMIAL
order = CONSTANT
[../]
[./cp]
family = MONOMIAL
order = CONSTANT
[../]
[./cv]
family = MONOMIAL
order = CONSTANT
[../]
[./c]
family = MONOMIAL
order = CONSTANT
[../]
[./mu]
family = MONOMIAL
order = CONSTANT
[../]
[./k]
family = MONOMIAL
order = CONSTANT
[../]
[./g]
family = MONOMIAL
order = CONSTANT
[../]
[]
[AuxKernels]
[./p]
type = MaterialRealAux
variable = p
property = pressure
[../]
[./T]
type = MaterialRealAux
variable = T
property = temperature
[../]
[./cp]
type = MaterialRealAux
variable = cp
property = cp
[../]
[./cv]
type = MaterialRealAux
variable = cv
property = cv
[../]
[./c]
type = MaterialRealAux
variable = c
property = c
[../]
[./mu]
type = MaterialRealAux
variable = mu
property = mu
[../]
[./k]
type = MaterialRealAux
variable = k
property = k
[../]
[./g]
type = MaterialRealAux
variable = g
property = g
[../]
[]
[FluidProperties]
[./sg]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
mu = 0.9
k = 0.6
[../]
[]
[Materials]
[./fp_mat]
type = FluidPropertiesMaterialVE
e = e
v = v
fp = sg
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = f_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = bc_fn
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/heat_conduction_patch/heat_conduction_patch.i)
#
# This problem is taken from the Abaqus verification manual:
# "1.5.8 Patch test for heat transfer elements"
#
# The temperature on the exterior nodes is 200x+100y+200z.
#
# This gives a constant flux at all Gauss points.
#
# In addition, the temperature at all nodes follows the same formula.
#
# Node x y z Temperature
# 1 1.00E+00 0.00E+00 1.00E+00 400
# 2 6.77E-01 3.05E-01 6.83E-01 302.5
# 3 3.20E-01 1.86E-01 6.43E-01 211.2
# 4 0.00E+00 0.00E+00 1.00E+00 200
# 5 1.00E+00 1.00E+00 1.00E+00 500
# 6 7.88E-01 6.93E-01 6.44E-01 355.7
# 7 1.65E-01 7.45E-01 7.02E-01 247.9
# 8 0.00E+00 1.00E+00 1.00E+00 300
# 9 1.00E+00 0.00E+00 0.00E+00 200
# 10 0.00E+00 0.00E+00 0.00E+00 0
# 11 8.26E-01 2.88E-01 2.88E-01 251.6
# 12 2.49E-01 3.42E-01 1.92E-01 122.4
# 13 2.73E-01 7.50E-01 2.30E-01 175.6
# 14 0.00E+00 1.00E+00 0.00E+00 100
# 15 8.50E-01 6.49E-01 2.63E-01 287.5
# 16 1.00E+00 1.00E+00 0.00E+00 300
[Mesh]#Comment
file = heat_conduction_patch.e
[] # Mesh
[Functions]
[./temps]
type = ParsedFunction
expression ='200*x+100*y+200*z'
[../]
[] # Functions
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[] # Variables
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[] # Kernels
[BCs]
[./temps]
type = FunctionDirichletBC
variable = temp
boundary = 10
function = temps
[../]
[] # BCs
[Materials]
[./heat]
type = HeatConductionMaterial
block = 1
specific_heat = 0.116
thermal_conductivity = 4.85e-4
[../]
[] # Materials
[Executioner]
type = Steady
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
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
[] # Executioner
[Outputs]
exodus = true
[] # Output
(modules/porous_flow/test/tests/heterogeneous_materials/constant_poroperm_fv.i)
# Assign porosity and permeability variables from constant AuxVariables to create
# a heterogeneous model and solve with FV variables
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmax = 3
ymax = 3
zmax = 3
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 -10'
[]
[Variables]
[ppwater]
type = MooseVariableFVReal
initial_condition = 1.5e6
[]
[]
[AuxVariables]
[poro]
type = MooseVariableFVReal
[]
[permxx]
type = MooseVariableFVReal
[]
[permxy]
type = MooseVariableFVReal
[]
[permxz]
type = MooseVariableFVReal
[]
[permyx]
type = MooseVariableFVReal
[]
[permyy]
type = MooseVariableFVReal
[]
[permyz]
type = MooseVariableFVReal
[]
[permzx]
type = MooseVariableFVReal
[]
[permzy]
type = MooseVariableFVReal
[]
[permzz]
type = MooseVariableFVReal
[]
[poromat]
family = MONOMIAL
order = CONSTANT
[]
[permxxmat]
family = MONOMIAL
order = CONSTANT
[]
[permxymat]
family = MONOMIAL
order = CONSTANT
[]
[permxzmat]
family = MONOMIAL
order = CONSTANT
[]
[permyxmat]
family = MONOMIAL
order = CONSTANT
[]
[permyymat]
family = MONOMIAL
order = CONSTANT
[]
[permyzmat]
family = MONOMIAL
order = CONSTANT
[]
[permzxmat]
family = MONOMIAL
order = CONSTANT
[]
[permzymat]
family = MONOMIAL
order = CONSTANT
[]
[permzzmat]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[poromat]
type = ADPorousFlowPropertyAux
property = porosity
variable = poromat
[]
[permxxmat]
type = ADPorousFlowPropertyAux
property = permeability
variable = permxxmat
column = 0
row = 0
[]
[permxymat]
type = ADPorousFlowPropertyAux
property = permeability
variable = permxymat
column = 1
row = 0
[]
[permxzmat]
type = ADPorousFlowPropertyAux
property = permeability
variable = permxzmat
column = 2
row = 0
[]
[permyxmat]
type = ADPorousFlowPropertyAux
property = permeability
variable = permyxmat
column = 0
row = 1
[]
[permyymat]
type = ADPorousFlowPropertyAux
property = permeability
variable = permyymat
column = 1
row = 1
[]
[permyzmat]
type = ADPorousFlowPropertyAux
property = permeability
variable = permyzmat
column = 2
row = 1
[]
[permzxmat]
type = ADPorousFlowPropertyAux
property = permeability
variable = permzxmat
column = 0
row = 2
[]
[permzymat]
type = ADPorousFlowPropertyAux
property = permeability
variable = permzymat
column = 1
row = 2
[]
[permzzmat]
type = ADPorousFlowPropertyAux
property = permeability
variable = permzzmat
column = 2
row = 2
[]
[]
[ICs]
[poro]
type = RandomIC
seed = 0
variable = poro
max = 0.5
min = 0.1
[]
[permx]
type = FunctionIC
function = permx
variable = permxx
[]
[permy]
type = FunctionIC
function = permy
variable = permyy
[]
[permz]
type = FunctionIC
function = permz
variable = permzz
[]
[]
[Functions]
[permx]
type = ParsedFunction
expression = '(1+x)*1e-11'
[]
[permy]
type = ParsedFunction
expression = '(1+y)*1e-11'
[]
[permz]
type = ParsedFunction
expression = '(1+z)*1e-11'
[]
[]
[FVKernels]
[mass0]
type = FVPorousFlowMassTimeDerivative
variable = ppwater
[]
[flux0]
type = FVPorousFlowAdvectiveFlux
variable = ppwater
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
viscosity = 1e-3
thermal_expansion = 0
cv = 2
[]
[]
[Materials]
[temperature]
type = ADPorousFlowTemperature
[]
[ppss]
type = ADPorousFlow1PhaseFullySaturated
porepressure = ppwater
[]
[massfrac]
type = ADPorousFlowMassFraction
[]
[simple_fluid]
type = ADPorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = ADPorousFlowPorosityConst
porosity = poro
[]
[permeability]
type = ADPorousFlowPermeabilityConstFromVar
perm_xx = permxx
perm_yy = permyy
perm_zz = permzz
[]
[relperm_water]
type = ADPorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[Postprocessors]
[mass_ph0]
type = FVPorousFlowFluidMass
fluid_component = 0
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 100
dt = 100
[]
[Outputs]
execute_on = 'initial timestep_end'
exodus = true
perf_graph = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_stabilized_action.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 64
ny = 64
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = steady-state
block = 0
velocity_boundary = 'bottom right top left'
velocity_function = '0 0 0 0 lid_function 0 0 0'
pressure_pinned_node = 0
density_name = rho
dynamic_viscosity_name = mu
# There are multiple types of stabilization possible in incompressible
# Navier Stokes. The user can specify supg = true to apply streamline
# upwind petrov-galerkin stabilization to the momentum equations. This
# is most useful for high Reynolds numbers, e.g. when inertial effects
# dominate over viscous effects. The user can also specify pspg = true
# to apply pressure stabilized petrov-galerkin stabilization to the mass
# equation. PSPG is a form of Galerkin Least Squares. This stabilization
# allows equal order interpolations to be used for pressure and velocity.
# Finally, the alpha parameter controls the amount of stabilization.
# For PSPG, decreasing alpha leads to increased accuracy but may induce
# spurious oscillations in the pressure field. Some numerical experiments
# suggest that alpha between .1 and 1 may be optimal for accuracy and
# robustness.
supg = true
pspg = true
alpha = 1e-1
laplace = true
integrate_p_by_parts = true
gravity = '0 0 0'
family = LAGRANGE
order = FIRST
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '1 1'
[]
[]
[Functions]
[lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'asm 2 ilu 4'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
file_base = lid_driven_stabilized_out
exodus = true
[]
[Postprocessors]
[lin]
type = NumLinearIterations
[]
[nl]
type = NumNonlinearIterations
[]
[lin_tot]
type = CumulativeValuePostprocessor
postprocessor = 'lin'
[]
[nl_tot]
type = CumulativeValuePostprocessor
postprocessor = 'nl'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/cns/straight_channel_porosity_step/dc.i)
p_initial=1.01e5
T=273.15
# u refers to the superficial velocity
u_in=1
rho_in=1.30524
sup_mom_y_in=${fparse u_in * rho_in}
user_limiter='min_mod'
friction_coeff=10
[GlobalParams]
fp = fp
two_term_boundary_expansion = true
limiter = ${user_limiter}
[]
[Mesh]
[cartesian]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
nx = 3
ymin = 0
ymax = 18
ny = 90
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Problem]
fv_bcs_integrity_check = false
[]
[Variables]
[pressure]
type = MooseVariableFVReal
initial_condition = ${p_initial}
[]
[sup_mom_x]
type = MooseVariableFVReal
initial_condition = 1e-15
[]
[sup_mom_y]
type = MooseVariableFVReal
initial_condition = 1e-15
[]
[T_fluid]
type = MooseVariableFVReal
initial_condition = ${T}
[]
[]
[AuxVariables]
[vel_y]
type = MooseVariableFVReal
[]
[rho]
type = MooseVariableFVReal
[]
[eps]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[vel_y]
type = ADMaterialRealAux
variable = vel_y
property = vel_y
execute_on = 'timestep_end'
[]
[rho]
type = ADMaterialRealAux
variable = rho
property = rho
execute_on = 'timestep_end'
[]
[eps]
type = MaterialRealAux
variable = eps
property = porosity
execute_on = 'timestep_end'
[]
[]
[FVKernels]
[mass_time]
type = FVMatPropTimeKernel
mat_prop_time_derivative = 'dsuperficial_rho_dt'
variable = pressure
[]
[mass_advection]
type = PCNSFVKTDC
variable = pressure
eqn = "mass"
[]
[momentum_time]
type = FVMatPropTimeKernel
mat_prop_time_derivative = 'dsuperficial_rhou_dt'
variable = sup_mom_x
[]
[momentum_advection]
type = PCNSFVKTDC
variable = sup_mom_x
eqn = "momentum"
momentum_component = 'x'
[]
[eps_grad]
type = PNSFVPGradEpsilon
variable = sup_mom_x
momentum_component = 'x'
epsilon_function = 'eps'
[]
[drag]
type = PCNSFVMomentumFriction
variable = sup_mom_x
momentum_component = 'x'
Darcy_name = 'cl'
momentum_name = superficial_rhou
[]
[momentum_time_y]
type = FVMatPropTimeKernel
mat_prop_time_derivative = 'dsuperficial_rhov_dt'
variable = sup_mom_y
[]
[momentum_advection_y]
type = PCNSFVKTDC
variable = sup_mom_y
eqn = "momentum"
momentum_component = 'y'
[]
[eps_grad_y]
type = PNSFVPGradEpsilon
variable = sup_mom_y
momentum_component = 'y'
epsilon_function = 'eps'
[]
[drag_y]
type = PCNSFVMomentumFriction
variable = sup_mom_y
momentum_component = 'y'
Darcy_name = 'cl'
momentum_name = superficial_rhov
[]
[energy_time]
type = FVMatPropTimeKernel
mat_prop_time_derivative = 'dsuperficial_rho_et_dt'
variable = T_fluid
[]
[energy_advection]
type = PCNSFVKTDC
variable = T_fluid
eqn = "energy"
[]
[]
[FVBCs]
[rho_bottom]
type = PCNSFVStrongBC
boundary = 'bottom'
variable = pressure
superficial_velocity = 'ud_in'
T_fluid = ${T}
eqn = 'mass'
velocity_function_includes_rho = true
[]
[rhou_bottom]
type = PCNSFVStrongBC
boundary = 'bottom'
variable = sup_mom_x
superficial_velocity = 'ud_in'
T_fluid = ${T}
eqn = 'momentum'
momentum_component = 'x'
velocity_function_includes_rho = true
[]
[rhov_bottom]
type = PCNSFVStrongBC
boundary = 'bottom'
variable = sup_mom_y
superficial_velocity = 'ud_in'
T_fluid = ${T}
eqn = 'momentum'
momentum_component = 'y'
velocity_function_includes_rho = true
[]
[rho_et_bottom]
type = PCNSFVStrongBC
boundary = 'bottom'
variable = T_fluid
superficial_velocity = 'ud_in'
T_fluid = ${T}
eqn = 'energy'
velocity_function_includes_rho = true
[]
[rho_top]
type = PCNSFVStrongBC
boundary = 'top'
variable = pressure
pressure = ${p_initial}
eqn = 'mass'
[]
[rhou_top]
type = PCNSFVStrongBC
boundary = 'top'
variable = sup_mom_x
pressure = ${p_initial}
eqn = 'momentum'
momentum_component = 'x'
[]
[rhov_top]
type = PCNSFVStrongBC
boundary = 'top'
variable = sup_mom_y
pressure = ${p_initial}
eqn = 'momentum'
momentum_component = 'y'
[]
[rho_et_top]
type = PCNSFVStrongBC
boundary = 'top'
variable = T_fluid
pressure = ${p_initial}
eqn = 'energy'
[]
[wall_pressure_x]
type = PCNSFVImplicitMomentumPressureBC
momentum_component = 'x'
boundary = 'left right'
variable = sup_mom_x
[]
[wall_pressure_y]
type = PCNSFVImplicitMomentumPressureBC
momentum_component = 'y'
boundary = 'left right'
variable = sup_mom_y
[]
# Use these to help create more accurate cell centered gradients for cells adjacent to boundaries
[T_bottom]
type = FVDirichletBC
variable = T_fluid
value = ${T}
boundary = 'bottom'
[]
[sup_mom_x_bottom_and_walls]
type = FVDirichletBC
variable = sup_mom_x
value = 0
boundary = 'bottom left right'
[]
[sup_mom_y_walls]
type = FVDirichletBC
variable = sup_mom_y
value = 0
boundary = 'left right'
[]
[sup_mom_y_bottom]
type = FVDirichletBC
variable = sup_mom_y
value = ${sup_mom_y_in}
boundary = 'bottom'
[]
[p_top]
type = FVDirichletBC
variable = pressure
value = ${p_initial}
boundary = 'top'
[]
[]
[Functions]
[ud_in]
type = ParsedVectorFunction
expression_x = '0'
expression_y = '${sup_mom_y_in}'
[]
[eps]
type = ParsedFunction
expression = 'if(y < 2.8, 1,
if(y < 3.2, 1 - .5 / .4 * (y - 2.8),
if(y < 6.8, .5,
if(y < 7.2, .5 - .25 / .4 * (y - 6.8),
if(y < 10.8, .25,
if(y < 11.2, .25 + .25 / .4 * (y - 10.8),
if(y < 14.8, .5,
if(y < 15.2, .5 + .5 / .4 * (y - 14.8),
1))))))))'
[]
[]
[Materials]
[var_mat]
type = PorousMixedVarMaterial
pressure = pressure
T_fluid = T_fluid
superficial_rhou = sup_mom_x
superficial_rhov = sup_mom_y
porosity = porosity
[]
[porosity]
type = GenericFunctionMaterial
prop_names = 'porosity'
prop_values = 'eps'
[]
[ad_generic]
type = ADGenericConstantVectorMaterial
prop_names = 'cl'
prop_values = '${friction_coeff} ${friction_coeff} ${friction_coeff}'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
line_search = 'bt'
type = Transient
nl_max_its = 20
[TimeStepper]
type = IterationAdaptiveDT
dt = 5e-5
optimal_iterations = 6
growth_factor = 1.2
[]
num_steps = 10
nl_abs_tol = 1e-8
automatic_scaling = true
compute_scaling_once = false
resid_vs_jac_scaling_param = 0.5
verbose = true
steady_state_detection = true
steady_state_tolerance = 1e-8
normalize_solution_diff_norm_by_dt = false
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
[out]
type = Exodus
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
active = ''
[num_nl]
type = NumNonlinearIterations
[]
[total_nl]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[]
(test/tests/transfers/multiapp_interpolation_transfer/fromsub_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = .21
xmax = .79
displacements = 'disp_x disp_y'
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./disp_x]
initial_condition = -0.4
[../]
[./disp_y]
[../]
[./elemental]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./x_func]
type = ParsedFunction
expression = x
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./x_func_aux]
type = FunctionAux
variable = elemental
function = x_func
execute_on = initial
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/side_diffusive_flux_average/side_diffusive_flux_average.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./right_bc]
# Flux BC for computing the analytical solution in the postprocessor
type = ParsedFunction
expression = exp(y)+1
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = FunctionNeumannBC
variable = u
boundary = right
function = right_bc
[../]
[]
[Materials]
[./mat_props]
type = GenericConstantMaterial
block = 0
prop_names = diffusivity
prop_values = 2
[../]
[./mat_props_bnd]
type = GenericConstantMaterial
boundary = right
prop_names = diffusivity
prop_values = 1
[../]
[]
[Postprocessors]
[./avg_flux_right]
# Computes -\int(exp(y)+1) from 0 to 1 which is -2.718281828
type = SideDiffusiveFluxAverage
variable = u
boundary = right
diffusivity = diffusivity
[../]
[]
[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/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/contact/test/tests/frictional/single_point_2d/single_point_2d_tp.i)
[Mesh]
file = single_point_2d.e
[]
[GlobalParams]
volumetric_locking_correction = false
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./penetration]
[../]
[./saved_x]
[../]
[./saved_y]
[../]
[./diag_saved_x]
[../]
[./diag_saved_y]
[../]
[./inc_slip_x]
[../]
[./inc_slip_y]
[../]
[./accum_slip_x]
[../]
[./accum_slip_y]
[../]
[]
[Functions]
[./horizontal_movement]
type = ParsedFunction
expression = t
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
strain = FINITE
save_in = 'saved_x saved_y'
diag_save_in = 'diag_saved_x diag_saved_y'
[../]
[]
[AuxKernels]
[./incslip_x]
type = PenetrationAux
variable = inc_slip_x
quantity = incremental_slip_x
boundary = 3
paired_boundary = 2
[../]
[./incslip_y]
type = PenetrationAux
variable = inc_slip_y
quantity = incremental_slip_y
boundary = 3
paired_boundary = 2
[../]
[./accum_slip_x]
type = AccumulateAux
variable = accum_slip_x
accumulate_from_variable = inc_slip_x
execute_on = timestep_end
[../]
[./accum_slip_y]
type = AccumulateAux
variable = accum_slip_y
accumulate_from_variable = inc_slip_y
execute_on = timestep_end
[../]
[./penetration]
type = PenetrationAux
variable = penetration
boundary = 3
paired_boundary = 2
[../]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./botx2]
type = DirichletBC
variable = disp_x
boundary = 2
value = 0.0
[../]
[./boty2]
type = DirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[./topx]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = horizontal_movement
[../]
[./topy]
type = DirichletBC
variable = disp_y
boundary = 4
value = -0.005
[../]
[]
[Materials]
[./bottom]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1.0e9
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[../]
[./top]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[../]
[]
[Postprocessors]
[./bot_react_x]
type = NodalSum
variable = saved_x
boundary = 1
[../]
[./bot_react_y]
type = NodalSum
variable = saved_y
boundary = 1
[../]
[./top_react_x]
type = NodalSum
variable = saved_x
boundary = 4
[../]
[./top_react_y]
type = NodalSum
variable = saved_y
boundary = 4
[../]
[./ref_resid_x]
type = NodalL2Norm
execute_on = timestep_end
variable = saved_x
[../]
[./ref_resid_y]
type = NodalL2Norm
execute_on = timestep_end
variable = saved_y
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
line_search = 'none'
l_max_its = 100
nl_max_its = 200
dt = 0.001
end_time = 0.01
num_steps = 1000
nl_rel_tol = 1e-08
nl_abs_tol = 1e-08
dtmin = 0.001
l_tol = 1e-3
[]
[Outputs]
exodus = true
print_linear_residuals = true
perf_graph = true
[./console]
type = Console
max_rows = 5
[../]
[]
[Contact]
[./leftright]
primary = 2
secondary = 3
model = coulomb
friction_coefficient = '0.25'
formulation = tangential_penalty
penalty = 1e10
[../]
[]
[Dampers]
[./contact_slip]
type = ContactSlipDamper
primary = '2'
secondary = '3'
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/steady_vector_fsp_elman.i)
rho=1
mu=1
U=1
l=1
prefactor=${fparse 1/(l/2)^2}
n=8
[Mesh]
[gen]
type = DistributedRectilinearMeshGenerator
dim = 2
xmin = 0
xmax = ${l}
ymin = 0
ymax = ${l}
nx = ${n}
ny = ${n}
elem_type = QUAD4
[]
second_order = true
parallel_type = distributed
[]
[Variables]
[vel]
order = SECOND
family = LAGRANGE_VEC
[]
[p]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[mass]
type = INSADMass
variable = p
[]
[velocity_mass_kernel]
type = VectorMassMatrix
variable = vel
matrix_tags = 'mass'
[]
[momentum_convection]
type = INSADMomentumAdvection
variable = vel
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = vel
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = vel
pressure = p
integrate_p_by_parts = true
[]
[]
[BCs]
[no_slip]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'bottom right left'
[]
[lid]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'top'
function_x = 'lid_function'
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[insad]
type = INSADMaterial
velocity = vel
pressure = p
[]
[]
[Functions]
[lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '${prefactor}*${U}*x*(${l}-x)'
[]
[]
[Problem]
type = NavierStokesProblem
mass_matrix = 'mass'
extra_tag_matrices = 'mass'
[]
[Preconditioning]
[FSP]
type = FSP
topsplit = 'up'
[up]
splitting = 'u p'
splitting_type = schur
petsc_options_iname = '-pc_fieldsplit_schur_fact_type -pc_fieldsplit_schur_precondition -ksp_gmres_restart -ksp_type -ksp_pc_side -ksp_rtol'
petsc_options_value = 'full self 300 fgmres right 1e-4'
[]
[u]
vars = 'vel'
# petsc_options = '-ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_type -ksp_rtol -ksp_gmres_restart -ksp_pc_side'
petsc_options_value = 'hypre boomeramg gmres 1e-2 300 right'
[]
[p]
vars = 'p'
petsc_options = '-ksp_converged_reason -pc_lsc_scale_diag'
petsc_options_iname = '-ksp_type -ksp_gmres_restart -ksp_rtol -pc_type -ksp_pc_side -lsc_pc_type -lsc_pc_hypre_type -lsc_ksp_type -lsc_ksp_rtol -lsc_ksp_pc_side -lsc_ksp_gmres_restart'
petsc_options_value = 'fgmres 300 1e-2 lsc right hypre boomeramg gmres 1e-1 right 300'
[]
[]
[]
[Postprocessors]
[pavg]
type = ElementAverageValue
variable = p
[]
[]
[UserObjects]
[set_pressure]
type = NSPressurePin
pin_type = 'average'
variable = p
pressure_average = 'pavg'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
print_linear_residuals = false
[exo]
type = Exodus
execute_on = 'final'
hide = 'pavg'
[]
[]
(test/tests/mortar/continuity-2d-non-conforming/soln-continuity-pg.i)
[Mesh]
second_order = false
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[]
[secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[]
[]
[Variables]
[T]
block = '1 2'
order = FIRST
[]
[lambda]
block = '10'
order = FIRST
use_dual = true
[]
[]
[AuxVariables]
[aux_lm]
block = '10'
order = FIRST
use_dual = false
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln
variable = T
boundary = '3 4 5 6 7 8'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = '-4 + x^2 + y^2'
[]
[exact_soln]
type = ParsedFunction
expression = 'x^2 + y^2'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
use_petrov_galerkin = true
aux_lm = aux_lm
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/heat_conduction/2d_quadrature_gap_heat_transfer/moving.i)
[Mesh]
file = nonmatching.e
displacements = 'disp_x disp_y'
[]
[Variables]
[temp]
[]
[]
[AuxVariables]
[disp_x]
[]
[disp_y]
[]
[]
[Functions]
[disp_y]
type = ParsedFunction
expression = 0.1*t
[]
[left_temp]
type = ParsedFunction
expression = 1000+t
[]
[]
[Kernels]
[hc]
type = HeatConduction
variable = temp
[]
[]
[AuxKernels]
[disp_y]
type = FunctionAux
variable = disp_y
function = disp_y
block = left
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[BCs]
[left]
type = FunctionDirichletBC
variable = temp
boundary = leftleft
function = left_temp
[]
[right]
type = DirichletBC
variable = temp
boundary = rightright
value = 400
[]
[]
[ThermalContact]
[left_to_right]
secondary = leftright
quadrature = true
primary = rightleft
emissivity_primary = 0
emissivity_secondary = 0
variable = temp
type = GapHeatTransfer
[]
[]
[Materials]
[hcm]
type = HeatConductionMaterial
block = 'left right'
specific_heat = 1
thermal_conductivity = 1
use_displaced_mesh = true
[]
[]
[Postprocessors]
[left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = leftright
diffusivity = thermal_conductivity
[]
[right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = rightleft
diffusivity = thermal_conductivity
[]
[]
[Executioner]
type = Transient
num_steps = 9
dt = 1
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/restart_multilevel/parent2.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
ymin = 0
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[Functions]
[v_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[]
[AuxVariables]
[v]
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[ufn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = v_fn
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
app_type = MooseTestApp
type = TransientMultiApp
input_files = 'sub.i'
execute_on = timestep_end
positions = '0 -1 0'
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[]
[]
[Problem]
restart_file_base = parent_out_cp/0005
[]
(modules/navier_stokes/test/tests/finite_element/ins/energy_source/steady-var-action.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[]
[AuxVariables]
[u]
initial_condition = 1
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = steady-state
velocity_boundary = 'bottom right top left'
velocity_function = '0 0 0 0 lid_function 0 0 0'
initial_velocity = '1e-15 1e-15 0'
add_standard_velocity_variables_for_ad = false
pressure_pinned_node = 0
density_name = rho
dynamic_viscosity_name = mu
use_ad = true
laplace = true
family = LAGRANGE
order = FIRST
add_temperature_equation = true
fixed_temperature_boundary = 'bottom top'
temperature_function = '1 0'
has_heat_source = true
heat_source_var = u
supg = true
pspg = true
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[]
[]
[Functions]
[lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
[out]
type = Exodus
hide = 'u'
[]
[]
(python/peacock/tests/common/transient_big.i)
###########################################################
# This is a simple test with a time-dependent problem
# demonstrating the use of a "Transient" Executioner.
#
# @Requirement F1.10
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
uniform_refine = 2
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./dt]
type = TimestepSize
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
# Preconditioned JFNK (default)
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
file_base = out_transient
exodus = true
[]
(test/tests/outputs/postprocessor/show_hide.i)
# Having 2 postprocessors, putting one into hide list and the other one into show list
# We should only see the PPS that is in the show list in the output.
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
# This test uses ElementalVariableValue postprocessors on specific
# elements, so element numbering needs to stay unchanged
allow_renumbering = false
[]
[Functions]
[./bc_fn]
type = ParsedFunction
expression = x
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '1 3'
function = bc_fn
[../]
[]
[Postprocessors]
[./elem_56]
type = ElementalVariableValue
variable = u
elementid = 56
[../]
[./elem_12]
type = ElementalVariableValue
variable = u
elementid = 12
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
[./console]
type = Console
show = 'elem_56'
hide = 'elem_12'
[../]
[./out]
type = CSV
show = 'elem_56'
hide = 'elem_12'
[../]
[]
(modules/navier_stokes/test/tests/finite_volume/cns/straight_channel_porosity_step/rotated-2d-bkt-function-porosity.i)
p_initial=1.01e5
T=273.15
# u refers to the superficial velocity
u_in=1
user_limiter='upwind'
friction_coeff=10
[GlobalParams]
fp = fp
two_term_boundary_expansion = true
limiter = ${user_limiter}
[]
[Mesh]
[cartesian]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
nx = 3
ymin = 0
ymax = 18
ny = 90
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Problem]
fv_bcs_integrity_check = false
[]
[Variables]
[pressure]
type = MooseVariableFVReal
initial_condition = ${p_initial}
[]
[sup_vel_x]
type = MooseVariableFVReal
initial_condition = 1e-15
scaling = 1e-2
[]
[sup_vel_y]
type = MooseVariableFVReal
initial_condition = 1e-15
scaling = 1e-2
[]
[T_fluid]
type = MooseVariableFVReal
initial_condition = ${T}
scaling = 1e-5
[]
[]
[AuxVariables]
[vel_y]
type = MooseVariableFVReal
[]
[sup_mom_y]
type = MooseVariableFVReal
[]
[rho]
type = MooseVariableFVReal
[]
[eps]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[vel_y]
type = ADMaterialRealAux
variable = vel_y
property = vel_y
execute_on = 'timestep_end'
[]
[sup_mom_y]
type = ADMaterialRealAux
variable = sup_mom_y
property = superficial_rhov
execute_on = 'timestep_end'
[]
[rho]
type = ADMaterialRealAux
variable = rho
property = rho
execute_on = 'timestep_end'
[]
[eps]
type = MaterialRealAux
variable = eps
property = porosity
execute_on = 'timestep_end'
[]
[]
[FVKernels]
[mass_time]
type = FVMatPropTimeKernel
mat_prop_time_derivative = 'dsuperficial_rho_dt'
variable = pressure
[]
[mass_advection]
type = PCNSFVKT
variable = pressure
eqn = "mass"
[]
[momentum_time]
type = FVMatPropTimeKernel
mat_prop_time_derivative = 'dsuperficial_rhou_dt'
variable = sup_vel_x
[]
[momentum_advection]
type = PCNSFVKT
variable = sup_vel_x
eqn = "momentum"
momentum_component = 'x'
[]
[eps_grad]
type = PNSFVPGradEpsilon
variable = sup_vel_x
momentum_component = 'x'
epsilon_function = 'eps'
[]
[drag]
type = PCNSFVMomentumFriction
variable = sup_vel_x
momentum_component = 'x'
Darcy_name = 'cl'
momentum_name = superficial_rhou
[]
[momentum_time_y]
type = FVMatPropTimeKernel
mat_prop_time_derivative = 'dsuperficial_rhov_dt'
variable = sup_vel_y
[]
[momentum_advection_y]
type = PCNSFVKT
variable = sup_vel_y
eqn = "momentum"
momentum_component = 'y'
[]
[eps_grad_y]
type = PNSFVPGradEpsilon
variable = sup_vel_y
momentum_component = 'y'
epsilon_function = 'eps'
[]
[drag_y]
type = PCNSFVMomentumFriction
variable = sup_vel_y
momentum_component = 'y'
Darcy_name = 'cl'
momentum_name = superficial_rhov
[]
[energy_time]
type = FVMatPropTimeKernel
mat_prop_time_derivative = 'dsuperficial_rho_et_dt'
variable = T_fluid
[]
[energy_advection]
type = PCNSFVKT
variable = T_fluid
eqn = "energy"
[]
[]
[FVBCs]
[rho_bottom]
type = PCNSFVStrongBC
boundary = 'bottom'
variable = pressure
superficial_velocity = 'ud_in'
T_fluid = ${T}
eqn = 'mass'
[]
[rhou_bottom]
type = PCNSFVStrongBC
boundary = 'bottom'
variable = sup_vel_x
superficial_velocity = 'ud_in'
T_fluid = ${T}
eqn = 'momentum'
momentum_component = 'x'
[]
[rhov_bottom]
type = PCNSFVStrongBC
boundary = 'bottom'
variable = sup_vel_y
superficial_velocity = 'ud_in'
T_fluid = ${T}
eqn = 'momentum'
momentum_component = 'y'
[]
[rho_et_bottom]
type = PCNSFVStrongBC
boundary = 'bottom'
variable = T_fluid
superficial_velocity = 'ud_in'
T_fluid = ${T}
eqn = 'energy'
[]
[rho_top]
type = PCNSFVStrongBC
boundary = 'top'
variable = pressure
pressure = ${p_initial}
eqn = 'mass'
[]
[rhou_top]
type = PCNSFVStrongBC
boundary = 'top'
variable = sup_vel_x
pressure = ${p_initial}
eqn = 'momentum'
momentum_component = 'x'
[]
[rhov_top]
type = PCNSFVStrongBC
boundary = 'top'
variable = sup_vel_y
pressure = ${p_initial}
eqn = 'momentum'
momentum_component = 'y'
[]
[rho_et_top]
type = PCNSFVStrongBC
boundary = 'top'
variable = T_fluid
pressure = ${p_initial}
eqn = 'energy'
[]
[wall_pressure_x]
type = PCNSFVImplicitMomentumPressureBC
momentum_component = 'x'
boundary = 'left right'
variable = sup_vel_x
[]
[wall_pressure_y]
type = PCNSFVImplicitMomentumPressureBC
momentum_component = 'y'
boundary = 'left right'
variable = sup_vel_y
[]
# Use these to help create more accurate cell centered gradients for cells adjacent to boundaries
[T_bottom]
type = FVDirichletBC
variable = T_fluid
value = ${T}
boundary = 'bottom'
[]
[sup_vel_x_bottom_and_walls]
type = FVDirichletBC
variable = sup_vel_x
value = 0
boundary = 'bottom left right'
[]
[sup_vel_y_walls]
type = FVDirichletBC
variable = sup_vel_y
value = 0
boundary = 'left right'
[]
[sup_vel_y_bottom]
type = FVDirichletBC
variable = sup_vel_y
value = ${u_in}
boundary = 'bottom'
[]
[p_top]
type = FVDirichletBC
variable = pressure
value = ${p_initial}
boundary = 'top'
[]
[]
[Functions]
[ud_in]
type = ParsedVectorFunction
expression_x = '0'
expression_y = '${u_in}'
[]
[eps]
type = ParsedFunction
expression = 'if(y < 2.8, 1,
if(y < 3.2, 1 - .5 / .4 * (y - 2.8),
if(y < 6.8, .5,
if(y < 7.2, .5 - .25 / .4 * (y - 6.8),
if(y < 10.8, .25,
if(y < 11.2, .25 + .25 / .4 * (y - 10.8),
if(y < 14.8, .5,
if(y < 15.2, .5 + .5 / .4 * (y - 14.8),
1))))))))'
[]
[]
[Materials]
[var_mat]
type = PorousPrimitiveVarMaterial
pressure = pressure
T_fluid = T_fluid
superficial_vel_x = sup_vel_x
superficial_vel_y = sup_vel_y
fp = fp
porosity = porosity
[]
[porosity]
type = GenericFunctionMaterial
prop_names = 'porosity'
prop_values = 'eps'
[]
[ad_generic]
type = ADGenericConstantVectorMaterial
prop_names = 'cl'
prop_values = '${friction_coeff} ${friction_coeff} ${friction_coeff}'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
line_search = 'bt'
type = Transient
nl_max_its = 20
[TimeStepper]
type = IterationAdaptiveDT
dt = 5e-5
optimal_iterations = 6
growth_factor = 1.2
[]
num_steps = 10000
end_time = 500
nl_abs_tol = 1e-7
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu mumps'
[]
[Outputs]
[out]
type = Exodus
execute_on = 'final'
[]
checkpoint = true
[]
[Debug]
show_var_residual_norms = true
[]
(test/tests/outputs/oversample/over_sampling_test_gen.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 3
ny = 3
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[./forcing_fn]
type = ParsedFunction
expression = -4+(x*x+y*y)
[../]
[]
[Variables]
active = 'u'
[./u]
order = THIRD
family = HERMITE
[../]
[]
[Kernels]
active = 'ie diff ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.2
start_time = 0
num_steps = 5
[]
[Outputs]
file_base = out_gen
exodus = true
[./oversampling]
file_base = out_gen_oversample
type = Exodus
refinements = 3
[../]
[]
(test/tests/tag/scalar_tag_vector.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 1
ny = 1
elem_type = QUAD4
[]
[Variables]
[./n]
family = SCALAR
order = FIRST
initial_condition = 1
[../]
[]
[AuxVariables]
[./tag_vector_var1]
family = SCALAR
order = FIRST
[../]
[./tag_vector_var2]
family = SCALAR
order = FIRST
[../]
[./tag_matrix_var2]
family = SCALAR
order = FIRST
[../]
[]
[ScalarKernels]
[./dn]
type = ODETimeDerivative
variable = n
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1'
[../]
[./ode1]
type = ParsedODEKernel
expression = '-n'
variable = n
extra_matrix_tags = 'mat_tag1'
extra_vector_tags = 'vec_tag1'
[../]
[./ode2]
type = ParsedODEKernel
expression = '-n'
variable = n
vector_tags = 'vec_tag2'
matrix_tags = 'mat_tag2'
[../]
[]
[AuxScalarKernels]
[./TagVectorAux]
type = ScalarTagVectorAux
variable = tag_vector_var1
v = n
vector_tag = vec_tag1
execute_on = timestep_end
[../]
[./TagVectorAux2]
type = ScalarTagVectorAux
variable = tag_vector_var2
v = n
vector_tag = vec_tag2
execute_on = timestep_end
[../]
[./TagMatrixAux2]
type = ScalarTagMatrixAux
variable = tag_matrix_var2
v = n
matrix_tag = mat_tag2
execute_on = timestep_end
[../]
[]
[Problem]
type = TagTestProblem
test_tag_vectors = 'time nontime residual vec_tag1 vec_tag2'
test_tag_matrices = 'mat_tag1 mat_tag2'
extra_tag_matrices = 'mat_tag1 mat_tag2'
extra_tag_vectors = 'vec_tag1 vec_tag2'
[]
[Executioner]
type = Transient
start_time = 0
num_steps = 10
dt = 0.001
dtmin = 0.001 # Don't allow timestep cutting
solve_type = NEWTON
nl_max_its = 2
nl_abs_tol = 1.e-12 # This is an ODE, so nl_abs_tol makes sense.
[]
[Functions]
[./exact_solution]
type = ParsedFunction
expression = exp(t)
[../]
[]
[Postprocessors]
[./error_n]
# Post processor that computes the difference between the computed
# and exact solutions. For the exact solution used here, the
# error at the final time should converge at O(dt^p), where p is
# the order of the method.
type = ScalarL2Error
variable = n
function = exact_solution
# final is not currently supported for Postprocessor execute_on...
# execute_on = 'final'
[../]
[]
[Outputs]
csv = true
[]
(test/tests/variables/linearfv/diffusion-1d-aux.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 10
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[AuxVariables]
[v_volume]
type = MooseLinearVariableFVReal
initial_condition = 50
[]
[v_functor]
type = MooseLinearVariableFVReal
initial_condition = 25
[]
[v_parsed]
type = MooseLinearVariableFVReal
initial_condition = 12.5
[]
[]
[AuxKernels]
[volume]
type = VolumeAux
variable = v_volume
[]
[functor]
type = FunctorAux
variable = v_functor
functor = u
[]
[parsed]
type = ParsedAux
variable = v_parsed
coupled_variables = 'v_volume v_functor'
expression = '0.5*v_volume+0.5*v_functor'
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = coeff_func
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "left right"
functor = analytic_solution
[]
[]
[Functions]
[coeff_func]
type = ParsedFunction
expression = '0.5*x'
[]
[source_func]
type = ParsedFunction
expression = '2*x'
[]
[analytic_solution]
type = ParsedFunction
expression = '1-x*x'
[]
[]
[Executioner]
type = LinearPicardSteady
linear_systems_to_solve = u_sys
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
execute_on = TIMESTEP_END
[]
(test/tests/transfers/general_field/user_object/duplicated_user_object_tests/tosub_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 8
xmax = 0.1
ymax = 0.5
coord_type = rz
[]
[Variables]
[u]
initial_condition = 1
[]
[]
[AuxVariables]
[multi_layered_average]
[]
[element_multi_layered_average]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[axial_force]
type = ParsedFunction
expression = 1000*y
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[force]
type = BodyForce
variable = u
function = axial_force
[]
[]
[BCs]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.001
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/free_boundary_1phase/phy.conservation_free_boundary_1phase.i)
# This test tests conservation of mass, momentum, and energy on a transient
# problem with an inlet and outlet (using free boundaries for each). This test
# takes 1 time step with Crank-Nicolson and some boundary flux integral
# post-processors needed for the full conservation statement. Lastly, the
# conservation quantities are shown on the console, which should ideally be zero
# for full conservation.
[GlobalParams]
gravity_vector = '0 0 0'
scaling_factor_1phase = '1 1 1e-6'
closures = simple_closures
[]
[Functions]
[T_fn]
type = ParsedFunction
expression = '300 + 10 * (cos(2*pi*x + pi))'
[]
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[inlet]
type = FreeBoundary1Phase
input = pipe:in
[]
[pipe]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1.0
n_elems = 10
A = 1.0
initial_T = T_fn
initial_p = 1e5
initial_vel = 1
f = 0
fp = fp
[]
[outlet]
type = FreeBoundary1Phase
input = pipe:out
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = crank-nicolson
start_time = 0.0
end_time = 0.01
dt = 0.01
abort_on_solve_fail = true
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 1e-6
nl_abs_tol = 1e-4
nl_max_its = 10
l_tol = 1e-2
l_max_its = 20
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Postprocessors]
# MASS
[massflux_left]
type = MassFluxIntegral
boundary = inlet
arhouA = rhouA
[]
[massflux_right]
type = MassFluxIntegral
boundary = outlet
arhouA = rhouA
[]
[massflux_difference]
type = DifferencePostprocessor
value1 = massflux_right
value2 = massflux_left
[]
[massflux_integral]
type = TimeIntegratedPostprocessor
value = massflux_difference
[]
[mass]
type = ElementIntegralVariablePostprocessor
variable = rhoA
execute_on = 'initial timestep_end'
[]
[mass_change]
type = ChangeOverTimePostprocessor
postprocessor = mass
change_with_respect_to_initial = true
execute_on = 'initial timestep_end'
[]
[mass_conservation]
type = SumPostprocessor
values = 'mass_change massflux_integral'
[]
# MOMENTUM
[momentumflux_left]
type = MomentumFluxIntegral
boundary = inlet
arhouA = rhouA
vel = vel
p = p
A = A
[]
[momentumflux_right]
type = MomentumFluxIntegral
boundary = outlet
arhouA = rhouA
vel = vel
p = p
A = A
[]
[momentumflux_difference]
type = DifferencePostprocessor
value1 = momentumflux_right
value2 = momentumflux_left
[]
[momentumflux_integral]
type = TimeIntegratedPostprocessor
value = momentumflux_difference
[]
[momentum]
type = ElementIntegralVariablePostprocessor
variable = rhouA
execute_on = 'initial timestep_end'
[]
[momentum_change]
type = ChangeOverTimePostprocessor
postprocessor = momentum
change_with_respect_to_initial = true
execute_on = 'initial timestep_end'
[]
[momentum_conservation]
type = SumPostprocessor
values = 'momentum_change momentumflux_integral'
[]
# ENERGY
[energyflux_left]
type = EnergyFluxIntegral
boundary = inlet
arhouA = rhouA
H = H
[]
[energyflux_right]
type = EnergyFluxIntegral
boundary = outlet
arhouA = rhouA
H = H
[]
[energyflux_difference]
type = DifferencePostprocessor
value1 = energyflux_right
value2 = energyflux_left
[]
[energyflux_integral]
type = TimeIntegratedPostprocessor
value = energyflux_difference
[]
[energy]
type = ElementIntegralVariablePostprocessor
variable = rhoEA
execute_on = 'initial timestep_end'
[]
[energy_change]
type = ChangeOverTimePostprocessor
postprocessor = energy
change_with_respect_to_initial = true
execute_on = 'initial timestep_end'
[]
[energy_conservation]
type = SumPostprocessor
values = 'energy_change energyflux_integral'
[]
[]
[Outputs]
[console]
type = Console
show = 'mass_conservation momentum_conservation energy_conservation'
[]
velocity_as_vector = false
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/cross_material/convergence/elastic.i)
# Simple 3D test
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = false
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 4
nz = 4
[]
[]
[ICs]
[disp_x]
type = RandomIC
variable = disp_x
min = -0.02
max = 0.02
[]
[disp_y]
type = RandomIC
variable = disp_y
min = -0.02
max = 0.02
[]
[disp_z]
type = RandomIC
variable = disp_z
min = -0.02
max = 0.02
[]
[]
[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
[]
[]
[Functions]
[pullx]
type = ParsedFunction
expression = '4000 * t'
[]
[pully]
type = ParsedFunction
expression = '-2000 * t'
[]
[pullz]
type = ParsedFunction
expression = '3000 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = left
variable = disp_y
value = 0.0
[]
[leftz]
type = DirichletBC
preset = true
boundary = left
variable = disp_z
value = 0.0
[]
[pull_x]
type = FunctionNeumannBC
boundary = right
variable = disp_x
function = pullx
[]
[pull_y]
type = FunctionNeumannBC
boundary = top
variable = disp_y
function = pully
[]
[pull_z]
type = FunctionNeumannBC
boundary = right
variable = disp_z
function = pullz
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianWrappedStress
[]
[compute_stress_base]
type = ComputeFiniteStrainElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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
[]
(test/tests/variables/fe_hermite_convergence/hermite_converge_periodic.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 4
ny = 4
elem_type = QUAD4
# This test will not work in parallel with DistributedMesh enabled
# due to a bug in PeriodicBCs.
parallel_type = replicated
[]
[Functions]
[./bc_fn]
type = ParsedGradFunction
value = -sin(pi*x)*sin(pi*y)
grad_x = -pi*cos(pi*x)*sin(pi*y)
grad_y = -pi*sin(pi*x)*cos(pi*y)
[../]
[./bc_fnt]
type = ParsedFunction
expression = -pi*sin(pi*x)*cos(pi*y)
[../]
[./bc_fnb]
type = ParsedFunction
expression = pi*sin(pi*x)*cos(pi*y)
[../]
[./forcing_fn]
type = ParsedFunction
expression = -2*pi*pi*sin(pi*x)*sin(pi*y)-sin(pi*x)*sin(pi*y)
[../]
[]
[Variables]
[./u]
order = THIRD
family = HERMITE
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./Periodic]
[./all]
variable = u
auto_direction= 'x y'
[../]
[../]
[./bc_top]
type=FunctionNeumannBC
variable = u
boundary = 'top'
function = bc_fnt
[../]
[./bc_bottom]
type=FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bc_fnb
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = bc_fn
[../]
[./H1error]
type = ElementH1Error
variable = u
function = bc_fn
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = bc_fn
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
# We use higher-order quadrature to ensure that the forcing function
# is integrated accurately.
[./Quadrature]
order=ELEVENTH
[../]
[]
[Adaptivity]
steps = 2
marker = uniform
[./Markers]
[./uniform]
type = UniformMarker
mark = refine
[../]
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
print_mesh_changed_info = 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/solid_mechanics/test/tests/plane_stress/weak_plane_stress_small.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
temperature = temp
out_of_plane_strain = strain_zz
[]
[Mesh]
[./square]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./strain_zz]
[../]
[]
[AuxVariables]
[./temp]
[../]
[./nl_strain_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Postprocessors]
[./react_z]
type = MaterialTensorIntegral
rank_two_tensor = stress
index_i = 2
index_j = 2
[../]
[./min_strain_zz]
type = NodalExtremeValue
variable = strain_zz
value_type = min
[../]
[./max_strain_zz]
type = NodalExtremeValue
variable = strain_zz
value_type = max
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[plane_stress]
planar_formulation = WEAK_PLANE_STRESS
strain = SMALL
generate_output = 'stress_xx stress_xy stress_yy stress_zz strain_xx strain_xy strain_yy'
eigenstrain_names = eigenstrain
[]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
use_displaced_mesh = false
[../]
[./strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = nl_strain_zz
index_i = 2
index_j = 2
[../]
[]
[Functions]
[./pull]
type = PiecewiseLinear
x='0 1 100'
y='0 0.00 0.00'
[../]
[./tempfunc]
type = ParsedFunction
expression = '(1 - x) * t'
[../]
[]
[BCs]
[./bottomx]
type = DirichletBC
boundary = 0
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = DirichletBC
boundary = 0
variable = disp_y
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
poissons_ratio = 0.3
youngs_modulus = 1e6
[../]
[./thermal_strain]
type = ComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
eigenstrain_name = eigenstrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
# controls for linear iterations
l_max_its = 100
l_tol = 1e-06
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-12
# time control
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 2.0
[]
[Outputs]
exodus = true
[]
(modules/electromagnetics/test/tests/benchmarks/dipole_antenna/dipole.i)
# Verification Benchmark - Half-wave Dipole Antenna (Frequency Domain)
# Resonant Frequency = 1 GHz
# Wave Propagation Medium: Vacuum
[Mesh]
[file_mesh]
type = FileMeshGenerator
file = dipole_antenna_1G.msh
[]
[refine]
type = RefineBlockGenerator
input = file_mesh
block = 'vacuum'
refinement = 2
[]
[]
[Variables]
[E_real]
order = FIRST
family = NEDELEC_ONE
[]
[E_imag]
order = FIRST
family = NEDELEC_ONE
[]
[]
[Functions]
[WaveNumberSquared]
type = ParsedFunction
expression = '(2*pi*1e9/3e8)*(2*pi*1e9/3e8)'
[]
[]
[Kernels]
[curl_curl_real]
type = CurlCurlField
variable = E_real
[]
[coeff_real]
type = VectorFunctionReaction
variable = E_real
function = WaveNumberSquared
sign = negative
[]
[curl_curl_imag]
type = CurlCurlField
variable = E_imag
[]
[coeff_imag]
type = VectorFunctionReaction
variable = E_imag
function = WaveNumberSquared
sign = negative
[]
[]
[BCs]
[antenna_real] # Impose exact solution of E-field onto antenna surface.
type = VectorCurlPenaltyDirichletBC # Replace with proper antenna surface current condition.
penalty = 1e5
function_y = '1'
boundary = antenna
variable = E_real
[]
[antenna_imag]
type = VectorCurlPenaltyDirichletBC
penalty = 1e5
function_y = '1'
boundary = antenna
variable = E_imag
[]
[radiation_condition_real]
type = VectorEMRobinBC
variable = E_real
coupled_field = E_imag
boundary = boundary
component = real
mode = absorbing
beta = 20.9439510239 # wave number at 1 GHz
[]
[radiation_condition_imag]
type = VectorEMRobinBC
variable = E_imag
coupled_field = E_real
boundary = boundary
component = imaginary
mode = absorbing
beta = 20.9439510239 # wave number at 1 GHz
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
exodus = true
perf_graph = true
[]
(test/tests/executioners/nullspace/singular.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 10
nx = 8
[]
[Problem]
null_space_dimension = 1
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./eig]
type = MassEigenKernel
variable = u
eigen_postprocessor = 1.0002920196258376e+01
eigen = false
[../]
[./force]
type = CoupledForce
variable = u
v = aux_v
[../]
[]
[AuxVariables]
[./aux_v]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = eigen_mode
[../]
[../]
[]
[AuxKernels]
[./set_source]
type = FunctionAux
variable = aux_v
function = second_harmonic
execute_on = timestep_begin
[../]
[]
[Functions]
[./eigen_mode]
type = ParsedFunction
expression = 'sqrt(2.0 / L) * sin(mode * pi * x / L)'
symbol_names = 'L mode'
symbol_values = '10 1'
[../]
[./second_harmonic]
type = ParsedFunction
expression = 'sqrt(2.0 / L) * sin(mode * pi * x / L)'
symbol_names = 'L mode'
symbol_values = '10 2'
[../]
[]
[BCs]
[./homogeneous]
type = DirichletBC
variable = u
boundary = '0 1'
value = 0
[../]
[]
[VectorPostprocessors]
[./sample_solution]
type = LineValueSampler
variable = u
start_point = '0 0 0'
end_point = '10 0 0'
sort_by = x
num_points = 9
execute_on = timestep_end
[../]
[]
[Preconditioning]
[./prec]
type = SMP
full = true
[../]
[]
[Executioner]
type = SteadyWithNull
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_pc_side -snes_type -ksp_norm_type'
petsc_options_value = 'hypre boomeramg left ksponly preconditioned'
nl_rel_tol = 1.0e-14
nl_abs_tol = 1.0e-14
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
[]
(test/tests/controls/real_function_control/multi_real_function_control.i)
###########################################################
# This is a test of the Control Logic System. This test
# uses the RealFunctionControl to change a multiple Kernel
# coefficients based on an analytical function at the end
# of each timestep.
#
# @Requirement F8.10
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[./v]
[../]
[]
[Kernels]
[./diff_u]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_v]
type = CoefDiffusion
variable = v
coef = 0.2
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
[]
[Functions]
[./func_coef]
type = ParsedFunction
expression = '2*t + 0.1'
[../]
[]
[Postprocessors]
[./u_coef]
type = RealControlParameterReporter
parameter = 'Kernels/diff_u/coef'
[../]
[./v_coef]
type = RealControlParameterReporter
parameter = 'Kernels/diff_v/coef'
[../]
[]
[Controls]
[./func_control]
type = RealFunctionControl
parameter = '*/*/coef'
function = 'func_coef'
execute_on = 'timestep_begin'
[../]
[]
(modules/heat_transfer/test/tests/code_verification/cartesian_test_no1.i)
# Problem I.1
#
# An infinite plate with constant thermal conductivity k and
# internal heat generation q. It is exposed on each boundary
# to a constant temperature: u(0) = ui and u(L) = uo.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
nx = 1
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Functions]
[./exact]
type = ParsedFunction
symbol_names = 'q L k ui uo'
symbol_values = '1200 1 12 100 0'
expression = 'ui + (uo-ui)*x/L + (q/k) * x * (L-x) / 2'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[./heatsource]
type = HeatSource
function = 1200
variable = u
[../]
[]
[BCs]
[./ui]
type = DirichletBC
boundary = left
variable = u
value = 100
[../]
[./uo]
type = DirichletBC
boundary = right
variable = u
value = 0
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1.0 1.0 12.0'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = true
[]
(test/tests/postprocessors/element_time_derivative/el_time_deriv_1d_test.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -5
xmax = 5
ymin = -1
nx = 5
elem_type = EDGE
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = t*x+1
[../]
[]
[Kernels]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[./diffusion]
type = Diffusion
variable = u
[../]
[./timeDer]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./all]
type = DirichletBC
variable = u
boundary = '0 1'
value = 0
[../]
[]
[Postprocessors]
[./elementAvgTimeDerivative]
type = ElementAverageTimeDerivative
variable = u
[../]
[./elementAvgValue]
type = ElementAverageValue
variable = u
[../]
[]
[Executioner]
type = Transient
scheme = implicit-euler
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_el_time_deriv_1d
csv = true
[]
(modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/hoop_strain_comparison.i)
# This test compares the hoop strain at two different elements in an internally
# pressurized cylinder with anisotropic plasticity: different yield condition
# for hoop and axial directions. The elements are located circumferentially
# apart but at same axial position. It is expected that due to pressurization
# hoop strains will develop with uniform magnitude along hoop direction. The
# test verifies that the plastic hoop strain is uniform in hoop direction.
# For 3D simulations with material properties oriented along the curved
# geometry such as cylinder or sphere, the stresses and strains are rotated to
# the local coordinate system from the global coordinate system. The plastic
# strain is calculated in the local coordinate system and then transformed to
# the global coordinate system. This test involves a 3D cylindrical geometry,
# and helps in indirectly verifying that this transformation of stresses and
# strains back and forth between the local and global coordinate system is
# correctly implemented.
[Mesh]
file = quarter_cylinder.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[plasticity_strain_xx]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xx
index_i = 0
index_j = 0
[]
[plasticity_strain_xy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xy
index_i = 0
index_j = 1
[]
[plasticity_strain_yy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_yy
index_i = 1
index_j = 1
[]
[plasticity_strain_zz]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_zz
index_i = 2
index_j = 2
[]
[stress_zz]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[]
[stress_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[]
[stress_yy]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[]
[Functions]
[push]
type = PiecewiseLinear
x = '0 1e2'
y = '0 200e6'
[]
[swelling_func]
type = ParsedFunction
expression = 0
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_zz elastic_strain_xx elastic_strain_yy stress_xx stress_yy stress_zz strain_zz plastic_strain_zz plastic_strain_xx plastic_strain_yy hoop_stress hoop_strain'
use_automatic_differentiation = true
add_variables = true
cylindrical_axis_point1 = '0 0 0'
cylindrical_axis_point2 = '0 1 0'
[]
[]
[Constraints]
[mid_section_plane]
type = EqualValueBoundaryConstraint
variable = disp_y
secondary = top # boundary
penalty = 1.0e+10
[]
[]
[Materials]
[swelling]
type = ADGenericFunctionMaterial
prop_values = swelling_func
prop_names = swelling
[]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 200.0e9
poissons_ratio = 0.2
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "plasticity"
max_iterations = 50
absolute_tolerance = 1e-30 #1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
# hill_constants = "0.5 0.5 0.5 1.5 1.5 1.5"
hill_constants = "0.5 0.25 0.5 1.5 1.5 1.5"
[]
[plasticity]
type = ADHillElastoPlasticityStressUpdate
hardening_constant = 1.5e10
hardening_exponent = 1.0
yield_stress = 0.0 # 60e6
local_cylindrical_csys = true
# local_spherical_csys = false
axis = y
absolute_tolerance = 1e-15 # 1e-8
relative_tolerance = 1e-13 # 1e-15
internal_solve_full_iteration_history = true
max_inelastic_increment = 2.0e-6
internal_solve_output_on = on_error
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = x_face
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 = z_face
value = 0.0
[]
[Pressure]
[Side1]
boundary = inner
function = push
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-14
# nl_abs_tol = 1e-10
l_max_its = 90
nl_max_its = 30
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 30
iteration_window = 9
growth_factor = 1.05
cutback_factor = 0.5
timestep_limiting_postprocessor = matl_ts_min
dt = 0.1e-4
time_t = '0 6.23 10'
time_dt = '0.1 1.0e-2 1.0e-2'
[]
num_steps = 3
start_time = 0
end_time = 200.0
automatic_scaling = true
dtmax = 0.1e-4
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[hoop_strain_elementA]
type = ElementalVariableValue
elementid = 464
variable = hoop_strain
[]
[hoop_strain_elementB]
type = ElementalVariableValue
elementid = 478
variable = hoop_strain
[]
[hoop_strain_diff]
type = DifferencePostprocessor
value1 = hoop_strain_elementA
value2 = hoop_strain_elementB
[]
[]
[Outputs]
csv = true
exodus = false
perf_graph = true
[]
(modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialMultiphase.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = -20
xmax = 20
ymin = -20
ymax = 20
[]
[GlobalParams]
op_num = 2
var_name_base = etab
[]
[Variables]
[./w]
[../]
[./etaa0]
[../]
[./etab0]
[../]
[./etab1]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./IC_etaa0]
type = FunctionIC
variable = etaa0
function = ic_func_etaa0
[../]
[./IC_etab0]
type = FunctionIC
variable = etab0
function = ic_func_etab0
[../]
[./IC_etab1]
type = FunctionIC
variable = etab1
function = ic_func_etab1
[../]
[./IC_w]
type = ConstantIC
value = -0.05
variable = w
[../]
[]
[Functions]
[./ic_func_etaa0]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2);0.5*(1.0-tanh((r-10.0)/sqrt(2.0)))'
[../]
[./ic_func_etab0]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2);0.5*(1.0+tanh((r-10)/sqrt(2.0)))*0.5*(1.0+tanh((y)/sqrt(2.0)))'
[../]
[./ic_func_etab1]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2);0.5*(1.0+tanh((r-10)/sqrt(2.0)))*0.5*(1.0-tanh((y)/sqrt(2.0)))'
[../]
[]
[BCs]
[]
[Kernels]
# Order parameter eta_alpha0
[./ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0 etab1'
gamma_names = 'gab gab'
[../]
[./ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etab0 etab1 w'
[../]
[./ACa0_int]
type = ACInterface
variable = etaa0
kappa_name = kappa
[../]
[./ea0_dot]
type = TimeDerivative
variable = etaa0
[../]
# Order parameter eta_beta0
[./ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etaa0 etab1'
gamma_names = 'gab gbb'
[../]
[./ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab1 w'
[../]
[./ACb0_int]
type = ACInterface
variable = etab0
kappa_name = kappa
[../]
[./eb0_dot]
type = TimeDerivative
variable = etab0
[../]
# Order parameter eta_beta1
[./ACb1_bulk]
type = ACGrGrMulti
variable = etab1
v = 'etaa0 etab0'
gamma_names = 'gab gbb'
[../]
[./ACb1_sw]
type = ACSwitching
variable = etab1
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0 w'
[../]
[./ACb1_int]
type = ACInterface
variable = etab1
kappa_name = kappa
[../]
[./eb1_dot]
type = TimeDerivative
variable = etab1
[../]
#Chemical potential
[./w_dot]
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
coupled_variables = '' # in this case chi (the susceptibility) is simply a constant
[../]
[./Diffusion]
type = MatDiffusion
variable = w
diffusivity = Dchi
args = ''
[../]
[./coupled_etaa0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0 etab1'
[../]
[./coupled_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0 etab1'
[../]
[./coupled_etab1dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab1
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0 etab1'
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[]
# enable_jit set to false in many materials to make this test start up faster.
# It is recommended to set enable_jit = true or just remove these lines for
# production runs with this model
[Materials]
[./ha]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0 etab1'
phase_etas = 'etaa0'
[../]
[./hb]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0 etab1'
phase_etas = 'etab0 etab1'
[../]
[./omegaa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
derivative_order = 2
enable_jit = false
[../]
[./omegab]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegab
material_property_names = 'Vm kb cbeq'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
derivative_order = 2
enable_jit = false
[../]
[./rhoa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
derivative_order = 2
enable_jit = false
[../]
[./rhob]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
derivative_order = 2
enable_jit = false
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'kappa_c kappa L D chi Vm ka caeq kb cbeq gab gbb mu'
prop_values = '0 1 1.0 1.0 1.0 1.0 10.0 0.1 10.0 0.9 4.5 1.5 1.0'
[../]
[./Mobility]
type = DerivativeParsedMaterial
property_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
derivative_order = 2
enable_jit = false
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 lu 1'
l_tol = 1.0e-3
nl_rel_tol = 1.0e-8
nl_abs_tol = 1e-8
num_steps = 2
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.1
[../]
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/relperm/brooks_corey2.i)
# Test Brooks-Corey relative permeability curve by varying saturation over the mesh
# Exponent lambda = 2 for both phases
# Residual saturation of phase 0: s0r = 0.2
# Residual saturation of phase 1: s1r = 0.3
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[p0]
initial_condition = 1e6
[]
[s1]
[]
[]
[AuxVariables]
[s0aux]
family = MONOMIAL
order = CONSTANT
[]
[s1aux]
family = MONOMIAL
order = CONSTANT
[]
[kr0aux]
family = MONOMIAL
order = CONSTANT
[]
[kr1aux]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[s0]
type = PorousFlowPropertyAux
property = saturation
phase = 0
variable = s0aux
[]
[s1]
type = PorousFlowPropertyAux
property = saturation
phase = 1
variable = s1aux
[]
[kr0]
type = PorousFlowPropertyAux
property = relperm
phase = 0
variable = kr0aux
[]
[kr1]
type = PorousFlowPropertyAux
property = relperm
phase = 1
variable = kr1aux
[]
[]
[Functions]
[s1]
type = ParsedFunction
expression = x
[]
[]
[ICs]
[s1]
type = FunctionIC
variable = s1
function = s1
[]
[]
[Kernels]
[p0]
type = Diffusion
variable = p0
[]
[s1]
type = Diffusion
variable = s1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'p0 s1'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = p0
phase1_saturation = s1
capillary_pressure = pc
[]
[kr0]
type = PorousFlowRelativePermeabilityBC
phase = 0
lambda = 2
s_res = 0.2
sum_s_res = 0.5
[]
[kr1]
type = PorousFlowRelativePermeabilityBC
phase = 1
lambda = 2
nw_phase = true
s_res = 0.3
sum_s_res = 0.5
[]
[]
[VectorPostprocessors]
[vpp]
type = LineValueSampler
warn_discontinuous_face_values = false
variable = 's0aux s1aux kr0aux kr1aux'
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 20
sort_by = id
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-8
[]
[BCs]
[sleft]
type = DirichletBC
variable = s1
value = 0
boundary = left
[]
[sright]
type = DirichletBC
variable = s1
value = 1
boundary = right
[]
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(modules/fluid_properties/test/tests/brine/brine.i)
# Test BrineFluidProperties calculations of density, viscosity and thermal
# conductivity
#
# Experimental density values from Pitzer et al, "Thermodynamic properties
# of aqueous sodium chloride solution", Journal of Physical and Chemical
# Reference Data, 13, 1-102 (1984)
#
# Experimental viscosity values from Phillips et al, "Viscosity of NaCl and
# other solutions up to 350C and 50MPa pressures", LBL-11586 (1980)
#
# Thermal conductivity values from Ozbek and Phillips, "Thermal conductivity of
# aqueous NaCl solutions from 20C to 330C", LBL-9086 (1980)
#
# --------------------------------------------------------------
# Pressure (Mpa) | 20 | 20 | 40
# Temperature (C) | 50 | 200 | 200
# NaCl molality (mol/kg) | 2 | 2 | 5
# NaCl mass fraction (kg/kg) | 0.1047 | 0.1047 | 0.2261
# --------------------------------------------------------------
# Expected values
# --------------------------------------------------------------
# Density (kg/m^3) | 1068.52 | 959.27 | 1065.58
# Viscosity (1e-6Pa.s) | 679.8 | 180.0 | 263.1
# Thermal conductivity (W/m/K) | 0.630 | 0.649 | 0.633
# --------------------------------------------------------------
# Calculated values
# --------------------------------------------------------------
# Density (kg/m^3) | 1067.18 | 958.68 | 1065.46
# Viscosity (1e-6 Pa.s) | 681.1 | 181.98 | 266.1
# Thermal conductivity (W/m/K) | 0.637 | 0.662 | 0.658
# --------------------------------------------------------------
#
# All results are within expected accuracy
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 1
xmax = 3
# This test uses ElementalVariableValue postprocessors on specific
# elements, so element numbering needs to stay unchanged
allow_renumbering = false
[]
[Variables]
[./dummy]
[../]
[]
[AuxVariables]
[./pressure]
family = MONOMIAL
order = CONSTANT
[../]
[./temperature]
family = MONOMIAL
order = CONSTANT
[../]
[./xnacl]
family = MONOMIAL
order = CONSTANT
[../]
[./density]
family = MONOMIAL
order = CONSTANT
[../]
[./enthalpy]
family = MONOMIAL
order = CONSTANT
[../]
[./internal_energy]
family = MONOMIAL
order = CONSTANT
[../]
[]
[Functions]
[./pic]
type = ParsedFunction
expression = 'if(x<2,20e6, 40e6)'
[../]
[./tic]
type = ParsedFunction
expression = 'if(x<1, 323.15, 473.15)'
[../]
[./xic]
type = ParsedFunction
expression = 'if(x<2,0.1047, 0.2261)'
[../]
[]
[ICs]
[./p_ic]
type = FunctionIC
function = pic
variable = pressure
[../]
[./t_ic]
type = FunctionIC
function = tic
variable = temperature
[../]
[./x_ic]
type = FunctionIC
function = xic
variable = xnacl
[../]
[]
[AuxKernels]
[./density]
type = MaterialRealAux
variable = density
property = density
[../]
[./enthalpy]
type = MaterialRealAux
variable = enthalpy
property = enthalpy
[../]
[./internal_energy]
type = MaterialRealAux
variable = internal_energy
property = e
[../]
[]
[FluidProperties]
[./brine]
type = BrineFluidProperties
[../]
[]
[Materials]
[./fp_mat]
type = MultiComponentFluidPropertiesMaterialPT
pressure = pressure
temperature = temperature
xmass = xnacl
fp = brine
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = dummy
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Postprocessors]
[./density0]
type = ElementalVariableValue
variable = density
elementid = 0
[../]
[./density1]
type = ElementalVariableValue
variable = density
elementid = 1
[../]
[./density2]
type = ElementalVariableValue
variable = density
elementid = 2
[../]
[./enthalpy0]
type = ElementalVariableValue
variable = enthalpy
elementid = 0
[../]
[./enthalpy1]
type = ElementalVariableValue
variable = enthalpy
elementid = 1
[../]
[./enthalpy2]
type = ElementalVariableValue
variable = enthalpy
elementid = 2
[../]
[./e0]
type = ElementalVariableValue
variable = internal_energy
elementid = 0
[../]
[./e1]
type = ElementalVariableValue
variable = internal_energy
elementid = 1
[../]
[./e2]
type = ElementalVariableValue
variable = internal_energy
elementid = 2
[../]
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_les.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = transient
velocity_boundary = 'bottom right top left'
velocity_function = '0 0 0 0 lid_function 0 0 0'
initial_velocity = '1e-15 1e-15 0'
add_standard_velocity_variables_for_ad = false
pressure_pinned_node = 0
density_name = rho
dynamic_viscosity_name = mu
use_ad = true
laplace = true
family = LAGRANGE
order = FIRST
supg = true
pspg = true
[]
[]
[Kernels]
[eddy_viscosity]
type = INSADSmagorinskyEddyViscosity
variable = velocity
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 0.001'
[]
[]
[Functions]
[lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(test/tests/restart/restart_transient_from_steady/steady_with_2subs.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = 'replicated'
[]
[AuxVariables]
[Tf]
[]
[]
[Variables]
[power_density]
[]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2'
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[BCs]
[left]
type = DirichletBC
variable = power_density
boundary = left
value = 50
[]
[right]
type = DirichletBC
variable = power_density
boundary = right
value = 1e3
[]
[]
[Postprocessors]
[pwr_avg]
type = ElementAverageValue
variable = power_density
execute_on = 'initial timestep_end'
[]
[temp_avg]
type = ElementAverageValue
variable = Tf
execute_on = 'initial final'
[]
[temp_max]
type = ElementExtremeValue
value_type = max
variable = Tf
execute_on = 'initial final'
[]
[temp_min]
type = ElementExtremeValue
value_type = min
variable = Tf
execute_on = 'initial final'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
fixed_point_rel_tol = 1E-7
fixed_point_abs_tol = 1.0e-07
fixed_point_max_its = 12
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0
0.5 0 0'
input_files = steady_with_sub_sub.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[p_to_sub]
type = MultiAppProjectionTransfer
source_variable = power_density
variable = power_density
to_multi_app = sub
execute_on = 'timestep_end'
[]
[t_from_sub]
type = MultiAppGeometricInterpolationTransfer
source_variable = temp
variable = Tf
from_multi_app = sub
execute_on = 'timestep_end'
[]
[]
[Outputs]
exodus = true
perf_graph = true
checkpoint = true
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
(test/tests/transfers/multiapp_high_order_variable_transfer/parent_L2_Lagrange_userobject.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
parallel_type = replicated
[]
[Variables]
[power_density]
family = L2_LAGRANGE
order = FIRST
[]
[]
[AuxVariables]
[./multi_layered_average]
family = LAGRANGE
order = FIRST
[../]
[]
[UserObjects]
[./multi_layered_average]
type = LayeredAverage
variable = power_density
direction = y
num_layers = 4
[../]
[]
[AuxKernels]
[./layered_aux]
type = SpatialUserObjectAux
variable = multi_layered_average
execute_on = 'nonlinear TIMESTEP_END'
user_object = multi_layered_average
[../]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2'
[]
[]
[Kernels]
[diff]
type = Reaction
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[Postprocessors]
[layered_avg]
type = ElementAverageValue
block = '0'
variable = multi_layered_average
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = sub_L2_Lagrange.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[p_to_sub]
type = MultiAppUserObjectTransfer
user_object = multi_layered_average
variable = power_density
to_multi_app = sub
execute_on = 'timestep_end'
[]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(test/tests/linearfvkernels/advection/advection-2d-rz.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny= 1
ymax = 0.5
[]
coord_type = RZ
rz_coord_axis = Y
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[LinearFVKernels]
[advection]
type = LinearFVAdvection
variable = u
velocity = "0.0 0.5 0"
advected_interp_method = average
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
[inflow]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "left right bottom"
functor = analytic_solution
[]
[outflow]
type = LinearFVAdvectionDiffusionOutflowBC
variable = u
boundary = "top"
use_two_term_expansion = true
[]
[]
[Functions]
[source_func]
type = ParsedFunction
expression = '1.0*pi*sin(x*pi)*cos(2*y*pi)'
[]
[analytic_solution]
type = ParsedFunction
expression = 'sin(x*pi)*sin(2*y*pi) + 1.5'
[]
[]
[Postprocessors]
[error]
type = ElementL2FunctorError
approximate = u
exact = analytic_solution
execute_on = FINAL
[]
[h]
type = AverageElementSize
execute_on = FINAL
[]
[]
[Executioner]
type = LinearPicardSteady
linear_systems_to_solve = u_sys
number_of_iterations = 2
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-10'
[]
[Outputs]
[csv]
type = CSV
execute_on = FINAL
[]
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/user_object_based/prop_block_read.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
ymin = 0
xmax = 1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[]
[./subdomain_id]
input = gen
type = SubdomainPerElementGenerator
subdomain_ids = '0 1
0 1'
[../]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[GlobalParams]
volumetric_locking_correction = true
[]
[AuxVariables]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./e_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./fp_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./gss]
order = CONSTANT
family = MONOMIAL
[../]
[./euler1]
order = CONSTANT
family = MONOMIAL
[../]
[./euler2]
order = CONSTANT
family = MONOMIAL
[../]
[./euler3]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./tdisp]
type = ParsedFunction
expression = 0.01*t
[../]
[]
[UserObjects]
[./prop_read]
type = PropertyReadFile
prop_file_name = 'euler_ang_file.txt'
# Enter file data as prop#1, prop#2, .., prop#nprop
nprop = 3
read_type = block
nblock= 2
[../]
[]
[AuxKernels]
[./stress_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = stress
index_j = 1
index_i = 1
execute_on = timestep_end
[../]
[./e_yy]
type = RankTwoAux
variable = e_yy
rank_two_tensor = lage
index_j = 1
index_i = 1
execute_on = timestep_end
[../]
[./fp_yy]
type = RankTwoAux
variable = fp_yy
rank_two_tensor = fp
index_j = 1
index_i = 1
execute_on = timestep_end
[../]
[./gss]
type = MaterialStdVectorAux
variable = gss
property = state_var_gss
index = 0
execute_on = timestep_end
[../]
[./euler1]
type = MaterialRealVectorValueAux
variable = euler1
property = Euler_angles
component = 0
execute_on = timestep_end
[../]
[./euler2]
type = MaterialRealVectorValueAux
variable = euler2
property = Euler_angles
component = 1
execute_on = timestep_end
[../]
[./euler3]
type = MaterialRealVectorValueAux
variable = euler3
property = Euler_angles
component = 2
execute_on = timestep_end
[../]
[]
[BCs]
[./fix_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0
[../]
[./fix_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./tdisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = tdisp
[../]
[]
[UserObjects]
[./slip_rate_gss]
type = CrystalPlasticitySlipRateGSS
variable_size = 12
slip_sys_file_name = input_slip_sys.txt
num_slip_sys_flowrate_props = 2
flowprops = '1 4 0.001 0.1 5 8 0.001 0.1 9 12 0.001 0.1'
uo_state_var_name = state_var_gss
[../]
[./slip_resistance_gss]
type = CrystalPlasticitySlipResistanceGSS
variable_size = 12
uo_state_var_name = state_var_gss
[../]
[./state_var_gss]
type = CrystalPlasticityStateVariable
variable_size = 12
groups = '0 4 8 12'
group_values = '60.8 60.8 60.8'
uo_state_var_evol_rate_comp_name = state_var_evol_rate_comp_gss
scale_factor = 1.0
[../]
[./state_var_evol_rate_comp_gss]
type = CrystalPlasticityStateVarRateComponentGSS
variable_size = 12
hprops = '1.0 541.5 109.8 2.5'
uo_slip_rate_name = slip_rate_gss
uo_state_var_name = state_var_gss
[../]
[]
[Materials]
[./crysp]
type = FiniteStrainUObasedCP
stol = 1e-2
tan_mod_type = exact
uo_slip_rates = 'slip_rate_gss'
uo_slip_resistances = 'slip_resistance_gss'
uo_state_vars = 'state_var_gss'
uo_state_var_evol_rate_comps = 'state_var_evol_rate_comp_gss'
[../]
[./strain]
type = ComputeFiniteStrain
displacements = 'disp_x disp_y'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensorCP
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
read_prop_user_object = prop_read
[../]
[]
[Postprocessors]
[./stress_yy]
type = ElementAverageValue
variable = stress_yy
[../]
[./e_yy]
type = ElementAverageValue
variable = e_yy
[../]
[./fp_yy]
type = ElementAverageValue
variable = fp_yy
[../]
[./gss]
type = ElementAverageValue
variable = gss
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
dt = 0.01
solve_type = 'PJFNK'
petsc_options_iname = -pc_hypre_type
petsc_options_value = boomerang
nl_abs_tol = 1e-10
nl_rel_step_tol = 1e-10
dtmax = 10.0
nl_rel_tol = 1e-10
end_time = 1
dtmin = 0.01
num_steps = 10
nl_abs_step_tol = 1e-10
[]
[Outputs]
exodus = true
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y'
use_displaced_mesh = true
[../]
[]
(modules/richards/test/tests/user_objects/uo3.i)
# Seff User objects give the correct value
# Sat User objects give the correct value
#
# If you want to add another test for another UserObject
# then add the UserObject, add a Function defining the expected result,
# add an AuxVariable and AuxKernel that will record the UserObjects value
# and finally add a NodalL2Error that compares this with the Function
#
# Here pressure is x where x runs between -5E6 and 5E6
[UserObjects]
[./Seff1VG]
type = RichardsSeff1VG
m = 0.8
al = 1E-6
[../]
[./Seff1BWsmall]
type = RichardsSeff1BWsmall
Sn = 0.0
Ss = 1.0
C = 1.01
las = 1E5
[../]
[./Seff1RSC]
type = RichardsSeff1RSC
oil_viscosity = 4.0
scale_ratio = 1E6
shift = -2E6
[../]
[./Seff1VGcut]
type = RichardsSeff1VGcut
m = 0.8
al = 1E-6
p_cut = -1E6
[../]
# following are unimportant in this test
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E6
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.10101
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0.054321
sum_s_res = 0.054321
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E5
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = x
[../]
[./answer_Seff1VG]
type = ParsedFunction
expression = (1+max((-x)*al,0)^(1/(1-m)))^(-m)
symbol_names = 'al m'
symbol_values = '1E-6 0.8'
[../]
[./answer_dSeff1VG]
type = GradParsedFunction
direction = '1 0 0'
expression = (1+max((-x)*al,0)^(1/(1-m)))^(-m)
symbol_names = 'al m'
symbol_values = '1E-6 0.8'
[../]
[./answer_d2Seff1VG]
type = Grad2ParsedFunction
direction = '1 0 0'
expression = (1+max((-x)*al,0)^(1/(1-m)))^(-m)
symbol_names = 'al m'
symbol_values = '1E-6 0.8'
[../]
[./answer_Seff1BW]
type = PiecewiseLinear
format = columns
data_file = satBW.csv
axis = x
[../]
[./answer_Seff1BWprime]
type = PiecewiseLinear
format = columns
data_file = satBWprime.csv
axis = x
[../]
[./answer_Seff1BW2prime]
type = PiecewiseLinear
format = columns
data_file = satBW2prime.csv
axis = x
[../]
[./answer_Seff1RSC]
type = ParsedFunction
expression = (1+exp((-x-shift)/scale))^(-0.5)
symbol_names = 'shift scale'
symbol_values = '-2E6 1E6'
[../]
[./answer_dSeff1RSC]
type = GradParsedFunction
direction = '1 0 0'
expression = (1+exp((-x-shift)/scale))^(-0.5)
symbol_names = 'shift scale'
symbol_values = '-2E6 1E6'
[../]
[./answer_d2Seff1RSC]
type = Grad2ParsedFunction
direction = '1 0 0'
expression = (1+exp((-x-shift)/scale))^(-0.5)
symbol_names = 'shift scale'
symbol_values = '-2E6 1E6'
[../]
[./answer_Seff1VGcut]
type = ParsedFunction
expression = if(x<pcut,scut+dscut*(x-pcut),(1+max((-x)*al,0)^(1/(1-m)))^(-m))
symbol_names = 'al m pcut scut dscut'
symbol_values = '1E-6 0.8 -1E6 0.574349177498517 1.14869835499703e-06'
[../]
[./answer_dSeff1VGcut]
type = GradParsedFunction
direction = '1 0 0'
expression = if(x<pcut,scut+dscut*(x-pcut),(1+max((-x)*al,0)^(1/(1-m)))^(-m))
symbol_names = 'al m pcut scut dscut'
symbol_values = '1E-6 0.8 -1E6 0.574349177498517 1.14869835499703e-06'
[../]
[./answer_d2Seff1VGcut]
type = Grad2ParsedFunction
direction = '1 0 0'
expression = if(x<pcut,scut+dscut*(x-pcut),(1+max((-x)*al,0)^(1/(1-m)))^(-m))
symbol_names = 'al m pcut scut dscut'
symbol_values = '1E-6 0.8 -1E6 0.574349177498517 1.14869835499703e-06'
[../]
[./answer_Sat]
type = ParsedFunction
expression = sres+((1-sumsres)*((1+max((-x)*al,0)^(1/(1-m)))^(-m)))
symbol_names = 'al m sres sumsres'
symbol_values = '1E-6 0.8 0.054321 0.054321'
[../]
[./answer_dSat]
type = ParsedFunction
expression = 1-sumsres
symbol_names = 'sumsres'
symbol_values = '0.054321'
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[./dSeff1VG_Aux]
[../]
[./d2Seff1VG_Aux]
[../]
[./Seff1BWsmall_Aux]
[../]
[./dSeff1BWsmall_Aux]
[../]
[./d2Seff1BWsmall_Aux]
[../]
[./Seff1RSC_Aux]
[../]
[./dSeff1RSC_Aux]
[../]
[./d2Seff1RSC_Aux]
[../]
[./Seff1VGcut_Aux]
[../]
[./dSeff1VGcut_Aux]
[../]
[./d2Seff1VGcut_Aux]
[../]
[./Sat_Aux]
[../]
[./dSat_Aux]
[../]
[./check_Aux]
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = Seff1VG
pressure_vars = pressure
[../]
[./dSeff1VG_AuxK]
type = RichardsSeffPrimeAux
variable = dSeff1VG_Aux
seff_UO = Seff1VG
pressure_vars = pressure
wrtnum = 0
[../]
[./d2Seff1VG_AuxK]
type = RichardsSeffPrimePrimeAux
variable = d2Seff1VG_Aux
seff_UO = Seff1VG
pressure_vars = pressure
wrtnum1 = 0
wrtnum2 = 0
[../]
[./Seff1BWsmall_AuxK]
type = RichardsSeffAux
variable = Seff1BWsmall_Aux
seff_UO = Seff1BWsmall
pressure_vars = pressure
[../]
[./dSeff1BWsmall_AuxK]
type = RichardsSeffPrimeAux
variable = dSeff1BWsmall_Aux
seff_UO = Seff1BWsmall
pressure_vars = pressure
wrtnum = 0
[../]
[./d2Seff1BWsmall_AuxK]
type = RichardsSeffPrimePrimeAux
variable = d2Seff1BWsmall_Aux
seff_UO = Seff1BWsmall
pressure_vars = pressure
wrtnum1 = 0
wrtnum2 = 0
[../]
[./Seff1RSC_AuxK]
type = RichardsSeffAux
variable = Seff1RSC_Aux
seff_UO = Seff1RSC
pressure_vars = pressure
[../]
[./dSeff1RSC_AuxK]
type = RichardsSeffPrimeAux
variable = dSeff1RSC_Aux
seff_UO = Seff1RSC
pressure_vars = pressure
wrtnum = 0
[../]
[./d2Seff1RSC_AuxK]
type = RichardsSeffPrimePrimeAux
variable = d2Seff1RSC_Aux
seff_UO = Seff1RSC
pressure_vars = pressure
wrtnum1 = 0
wrtnum2 = 0
[../]
[./Seff1VGcut_AuxK]
type = RichardsSeffAux
variable = Seff1VGcut_Aux
seff_UO = Seff1VGcut
pressure_vars = pressure
[../]
[./dSeff1VGcut_AuxK]
type = RichardsSeffPrimeAux
variable = dSeff1VGcut_Aux
seff_UO = Seff1VGcut
pressure_vars = pressure
wrtnum = 0
[../]
[./d2Seff1VGcut_AuxK]
type = RichardsSeffPrimePrimeAux
variable = d2Seff1VGcut_Aux
seff_UO = Seff1VGcut
pressure_vars = pressure
wrtnum1 = 0
wrtnum2 = 0
[../]
[./Sat_AuxK]
type = RichardsSatAux
sat_UO = Saturation
seff_var = Seff1VG_Aux
variable = Sat_Aux
[../]
[./dSat_AuxK]
type = RichardsSatPrimeAux
sat_UO = Saturation
seff_var = Seff1VG_Aux
variable = dSat_Aux
[../]
[./check_AuxK]
type = FunctionAux
variable = check_Aux
function = answer_Seff1VGcut
[../]
[]
[Postprocessors]
[./cf_Seff1VG]
type = NodalL2Error
function = answer_Seff1VG
variable = Seff1VG_Aux
[../]
[./cf_dSeff1VG]
type = NodalL2Error
function = answer_dSeff1VG
variable = dSeff1VG_Aux
[../]
[./cf_d2Seff1VG]
type = NodalL2Error
function = answer_d2Seff1VG
variable = d2Seff1VG_Aux
[../]
[./cf_Seff1BW]
type = NodalL2Error
function = answer_Seff1BW
variable = Seff1BWsmall_Aux
[../]
[./cf_Seff1BWprime]
type = NodalL2Error
function = answer_Seff1BWprime
variable = dSeff1BWsmall_Aux
[../]
[./cf_Seff1BW2prime]
type = NodalL2Error
function = answer_Seff1BW2prime
variable = d2Seff1BWsmall_Aux
[../]
[./cf_Seff1RSC]
type = NodalL2Error
function = answer_Seff1RSC
variable = Seff1RSC_Aux
[../]
[./cf_dSeff1RSC]
type = NodalL2Error
function = answer_dSeff1RSC
variable = dSeff1RSC_Aux
[../]
[./cf_d2Seff1RSC]
type = NodalL2Error
function = answer_d2Seff1RSC
variable = d2Seff1RSC_Aux
[../]
[./cf_Seff1VGcut]
type = NodalL2Error
function = answer_Seff1VGcut
variable = Seff1VGcut_Aux
[../]
[./cf_dSeff1VGcut]
type = NodalL2Error
function = answer_dSeff1VGcut
variable = dSeff1VGcut_Aux
[../]
[./cf_d2Seff1VGcut]
type = NodalL2Error
function = answer_d2Seff1VGcut
variable = d2Seff1VGcut_Aux
[../]
[./cf_Sat]
type = NodalL2Error
function = answer_Sat
variable = Sat_Aux
[../]
[./cf_dSat]
type = NodalL2Error
function = answer_dSat
variable = dSat_Aux
[../]
[]
#############################################################################
#
# Following is largely unimportant as we are not running an actual similation
#
#############################################################################
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = -5E6
xmax = 5E6
[]
[Variables]
[./pressure]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_pressure
[../]
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
richardsVarNames_UO = PPNames
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
richardsVarNames_UO = PPNames
variable = pressure
[../]
[]
[Materials]
[./unimportant_material]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-20 0 0 0 1E-20 0 0 0 1E-20'
richardsVarNames_UO = PPNames
density_UO = DensityConstBulk
relperm_UO = RelPermPower
sat_UO = Saturation
seff_UO = Seff1VG
SUPG_UO = SUPGstandard
viscosity = 1E-3
gravity = '0 0 -10'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./does_nothing]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E50 1E50 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
num_steps = 1
dt = 1E-100
[]
[Outputs]
execute_on = 'timestep_end'
active = 'csv'
file_base = uo3
[./csv]
type = CSV
[../]
[./exodus]
type = Exodus
hide = pressure
[../]
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/action/no_action_1D.i)
# Simple 1D plane strain test
[GlobalParams]
displacements = 'disp_x'
large_kinematics = true
[]
[Variables]
[disp_x]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 1
nx = 10
[]
[]
[Kernels]
[sdx]
type = TotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[]
[Functions]
[pull]
type = ParsedFunction
expression = '0.06 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = right
variable = disp_x
value = 0.0
[]
[pull]
type = FunctionDirichletBC
boundary = left
variable = disp_x
function = pull
preset = true
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[stress_base]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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 = 5.0
[]
[Outputs]
exodus = true
[]
(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
[../]
[]
(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/time_integrators/convergence/implicit_convergence.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 4
ny = 4
elem_type = QUAD9
[]
[Variables]
active = 'u'
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[./forcing_fn]
type = ParsedFunction
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
preset = false
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
start_time = 0.0
end_time = 1.0
dt = 0.0625
[./TimeIntegrator]
type = ImplicitMidpoint
[../]
[]
[Outputs]
execute_on = 'initial timestep_end'
exodus = true
[]
(test/tests/time_steppers/function_dt/function_dt_min.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*t*(x*x+y*y)
[../]
[./forcing_fn]
type = ParsedFunction
expression = 2*t*(x*x+y*y)-4*t*t
[../]
[./dts]
type = PiecewiseLinear
x = '0 0.85 2'
y = '0.2 0.2 0.2'
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]
[ICs]
[./u_var]
type = FunctionIC
variable = u
function = exact_fn
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[../]
[]
[Executioner]
type = Transient
start_time = 0
num_steps = 10
[./TimeStepper]
type = FunctionDT
function = dts
min_dt = 0.1
[../]
[]
[Outputs]
exodus = true
[]
(modules/ray_tracing/test/tests/raykernels/function_integral_ray_kernel/function_integral_ray_kernel.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmax = 5
ymax = 5
[]
[]
[Functions/parsed_function]
type = ParsedFunction
expression = 'x + sin(y)'
[]
[UserObjects/study]
type = RepeatableRayStudy
names = 'diag
top_across
bottom_across
partial'
start_points = '0 0 0
0 5 0
0 0 0
0.5 0.5 0'
end_points = '5 5 0
5 5 0
5 0 0
4.5 0.5 0'
[]
[RayKernels/function_integral]
type = FunctionIntegralRayKernel
function = parsed_function
rays = 'diag top_across bottom_across partial'
[]
[Postprocessors]
[diag_value]
type = RayIntegralValue
ray_kernel = function_integral
ray = diag
[]
[top_across_value]
type = RayIntegralValue
ray_kernel = function_integral
ray = top_across
[]
[bottom_across_value]
type = RayIntegralValue
ray_kernel = function_integral
ray = bottom_across
[]
[partial_value]
type = RayIntegralValue
ray_kernel = function_integral
ray = partial
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = false
csv = true
[]
(modules/solid_mechanics/test/tests/pressure/cantilever.i)
#
#
#
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 3
nx = 1
xmin = 0
xmax = 10
ymin = 0
ymax = 1
zmin = 0
zmax = 1
[]
[move_nodes]
type = MoveNodeGenerator
input = MeshGenerator
node_id = 6
new_position = '9.9 1.1 1'
[]
[]
[Functions]
[pressure]
type = ParsedFunction
expression = 100*t
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Kernels]
[SolidMechanics]
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_y
boundary = left
value = 0.0
[]
[no_z]
type = DirichletBC
variable = disp_z
boundary = left
value = 0.0
[]
[Pressure]
[top]
boundary = 'top front right'
function = pressure
[]
[]
[]
[Materials]
[Elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric_isotropic
C_ijkl = '0 0.5e6'
[]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
petsc_options = '-snes_test_jacobian -snes_test_jacobian_view'
nl_abs_tol = 1e-10
l_max_its = 20
start_time = 0.0
dt = 1.0
num_steps = 10
end_time = 2.0
[]
[Outputs]
[out]
type = Exodus
[]
[]
(test/tests/auxkernels/time_derivative/coupled_aux_time_derivative.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
[]
[Functions]
[./f_fn]
type = ParsedFunction
expression = t*(x+y)
[../]
[./f_dot_fn]
type = ParsedFunction
expression = (x+y)
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./l2_proj]
type = Reaction
variable = u
[../]
[./dck]
type = DotCouplingKernel
variable = u
v = f
[../]
[]
[AuxVariables]
[./f]
[../]
[./g]
[../]
[]
[AuxKernels]
[./f_k]
type = FunctionAux
variable = f
function = f_fn
[../]
# We do not allow coupling of time derivatives of aux vars into the aux vars
[./g_k]
type = DotCouplingAux
variable = g
v = f
[../]
[]
[Postprocessors]
[./l2_error]
type = ElementL2Error
variable = u
function = f_dot_fn
[../]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 2
nl_abs_tol = 1.e-15
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/mms/channel-flow/2d-average-with-temp.i)
mu = 1.1
rho = 1.1
k = 1.1
cp = 1.1
advected_interp_method = 'average'
velocity_interp_method = 'average'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = -1
ymax = 1
nx = 2
ny = 2
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 1
two_term_boundary_expansion = false
[]
[v]
type = INSFVVelocityVariable
initial_condition = 1
two_term_boundary_expansion = false
[]
[pressure]
type = INSFVPressureVariable
two_term_boundary_expansion = false
[]
[temperature]
type = INSFVEnergyVariable
two_term_boundary_expansion = false
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[mass_forcing]
type = FVBodyForce
variable = pressure
function = forcing_p
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[u_forcing]
type = INSFVBodyForce
variable = u
functor = forcing_u
momentum_component = 'x'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[v_forcing]
type = INSFVBodyForce
variable = v
functor = forcing_v
momentum_component = 'y'
[]
[temp_conduction]
type = FVDiffusion
coeff = 'k'
variable = temperature
[]
[temp_advection]
type = INSFVEnergyAdvection
variable = temperature
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
[]
[temp_forcing]
type = FVBodyForce
variable = temperature
function = forcing_t
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = 'exact_u'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = v
function = 'exact_v'
[]
[walls-u]
type = INSFVNoSlipWallBC
boundary = 'top bottom'
variable = u
function = 'exact_u'
[]
[walls-v]
type = INSFVNoSlipWallBC
boundary = 'top bottom'
variable = v
function = 'exact_v'
[]
[inlet-and-walls-t]
type = FVFunctionDirichletBC
boundary = 'left top bottom'
variable = temperature
function = 'exact_t'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 'exact_p'
[]
[]
[FunctorMaterials]
[const]
type = ADGenericFunctorMaterial
prop_names = 'k cp'
prop_values = '${k} ${cp}'
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = 'temperature'
rho = ${rho}
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'sin((1/2)*y*pi)*cos((1/2)*x*pi)'
[]
[exact_rhou]
type = ParsedFunction
expression = 'rho*sin((1/2)*y*pi)*cos((1/2)*x*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[forcing_u]
type = ParsedFunction
expression = '(1/2)*pi^2*mu*sin((1/2)*y*pi)*cos((1/2)*x*pi) - '
'1/2*pi*rho*sin((1/4)*x*pi)*sin((1/2)*y*pi)^2*cos((1/2)*x*pi) + '
'(1/2)*pi*rho*sin((1/4)*x*pi)*cos((1/2)*x*pi)*cos((1/2)*y*pi)^2 - '
'pi*rho*sin((1/2)*x*pi)*sin((1/2)*y*pi)^2*cos((1/2)*x*pi) - '
'1/4*pi*sin((1/4)*x*pi)*sin((3/2)*y*pi)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_v]
type = ParsedFunction
expression = 'sin((1/4)*x*pi)*cos((1/2)*y*pi)'
[]
[exact_rhov]
type = ParsedFunction
expression = 'rho*sin((1/4)*x*pi)*cos((1/2)*y*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[forcing_v]
type = ParsedFunction
expression = '(5/16)*pi^2*mu*sin((1/4)*x*pi)*cos((1/2)*y*pi) - '
'pi*rho*sin((1/4)*x*pi)^2*sin((1/2)*y*pi)*cos((1/2)*y*pi) - '
'1/2*pi*rho*sin((1/4)*x*pi)*sin((1/2)*x*pi)*sin((1/2)*y*pi)*cos((1/2)*y*pi) + '
'(1/4)*pi*rho*sin((1/2)*y*pi)*cos((1/4)*x*pi)*cos((1/2)*x*pi)*cos((1/2)*y*pi) + '
'(3/2)*pi*cos((1/4)*x*pi)*cos((3/2)*y*pi)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'sin((3/2)*y*pi)*cos((1/4)*x*pi)'
[]
[forcing_p]
type = ParsedFunction
expression = '-1/2*pi*rho*sin((1/4)*x*pi)*sin((1/2)*y*pi) - '
'1/2*pi*rho*sin((1/2)*x*pi)*sin((1/2)*y*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[exact_t]
type = ParsedFunction
expression = 'sin((1/4)*x*pi)*cos((1/2)*y*pi)'
[]
[forcing_t]
type = ParsedFunction
expression = '-pi*cp*rho*sin((1/4)*x*pi)^2*sin((1/2)*y*pi)*cos((1/2)*y*pi) - '
'1/2*pi*cp*rho*sin((1/4)*x*pi)*sin((1/2)*x*pi)*sin((1/2)*y*pi)*cos((1/2)*y*pi) + '
'(1/4)*pi*cp*rho*sin((1/2)*y*pi)*cos((1/4)*x*pi)*cos((1/2)*x*pi)*cos((1/2)*y*pi) + '
'(5/16)*pi^2*k*sin((1/4)*x*pi)*cos((1/2)*y*pi)'
symbol_names = 'k rho cp'
symbol_values = '${k} ${rho} ${cp}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[Outputs]
csv = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2Error
variable = u
function = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2v]
type = ElementL2Error
variable = v
function = exact_v
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
variable = pressure
function = exact_p
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2t]
variable = temperature
function = exact_t
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(modules/richards/test/tests/theis/th22.i)
# two-phase, fully-saturated
# production
[Mesh]
type = FileMesh
file = th02_input.e
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1 2 4 20'
x = '0 1 10 100'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 2E6
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1E-5
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1E-5
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.0
n = 3
[../]
[./SatWater]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SatGas]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGwater]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[./SUPGgas]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[./total_outflow_mass]
type = RichardsSumQuantity
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./water_ic]
type = FunctionIC
variable = pwater
function = initial_pressure
[../]
[./gas_ic]
type = FunctionIC
variable = pgas
function = initial_pressure
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[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
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = SeffWater
pressure_vars = 'pwater pgas'
[../]
[]
[DiracKernels]
[./bh]
type = RichardsPolyLineSink
pressures = '-1E9 1E9'
fluxes = '200 200'
point_file = th01.points
SumQuantityUO = total_outflow_mass
variable = pwater
[../]
[]
[Postprocessors]
[./flow_report]
type = RichardsPlotQuantity
uo = total_outflow_mass
[../]
[./p50]
type = PointValue
variable = pwater
point = '50 0 0'
execute_on = timestep_end
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 1E5
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = 1
mat_porosity = 0.1
mat_permeability = '1E-10 0 0 0 1E-10 0 0 0 1E-10'
density_UO = 'DensityWater DensityGas'
relperm_UO = 'RelPermWater RelPermGas'
SUPG_UO = 'SUPGwater SUPGgas'
sat_UO = 'SatWater SatGas'
seff_UO = 'SeffWater SeffGas'
viscosity = '1E-3 1E-5'
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason -ksp_diagonal_scale -ksp_diagonal_scale_fix -ksp_gmres_modifiedgramschmidt -snes_linesearch_monitor'
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap -snes_atol -snes_rtol -snes_max_it -ksp_rtol -ksp_atol'
petsc_options_value = 'gmres asm lu NONZERO 2 1E-7 1E-10 20 1E-10 1E-100'
[../]
[]
[Executioner]
type = Transient
end_time = 100
solve_type = NEWTON
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = th22
csv = true
[]
(tutorials/darcy_thermo_mech/step06_coupled_darcy_heat_conduction/problems/step6b_transient_inflow.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 200
ny = 10
xmax = 0.304 # Length of test chamber
ymax = 0.0257 # Test chamber radius
[]
coord_type = RZ
rz_coord_axis = X
[]
[Variables]
[pressure]
[]
[temperature]
initial_condition = 300 # Start at room temperature
[]
[]
[AuxVariables]
[velocity]
order = CONSTANT
family = MONOMIAL_VEC
[]
[]
[Kernels]
[darcy_pressure]
type = DarcyPressure
variable = pressure
[]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[heat_conduction_time_derivative]
type = ADHeatConductionTimeDerivative
variable = temperature
[]
[heat_convection]
type = DarcyAdvection
variable = temperature
pressure = pressure
[]
[]
[AuxKernels]
[velocity]
type = DarcyVelocity
variable = velocity
execute_on = timestep_end
pressure = pressure
[]
[]
[Functions]
[inlet_function]
type = ParsedFunction
expression = 2000*sin(0.466*pi*t) # Inlet signal from Fig. 3
[]
[outlet_function]
type = ParsedFunction
expression = 2000*cos(0.466*pi*t) # Outlet signal from Fig. 3
[]
[]
[BCs]
[inlet]
type = FunctionDirichletBC
variable = pressure
boundary = left
function = inlet_function
[]
[outlet]
type = FunctionDirichletBC
variable = pressure
boundary = right
function = outlet_function
[]
[inlet_temperature]
type = FunctionDirichletBC
variable = temperature
boundary = left
function = 'if(t<0,350+50*t,350)'
[]
[outlet_temperature]
type = HeatConductionOutflow
variable = temperature
boundary = right
[]
[]
[Materials]
[column]
type = PackedColumn
radius = 1
temperature = temperature
fluid_viscosity_file = data/water_viscosity.csv
fluid_density_file = data/water_density.csv
fluid_thermal_conductivity_file = data/water_thermal_conductivity.csv
fluid_specific_heat_file = data/water_specific_heat.csv
outputs = exodus
[]
[]
[Problem]
type = FEProblem
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = true
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
end_time = 100
dt = 0.25
start_time = -1
steady_state_tolerance = 1e-5
steady_state_detection = true
[TimeStepper]
type = FunctionDT
function = 'if(t<0,0.1,(2*pi/(0.466*pi))/16)' # dt to always hit the peaks of sine/cosine BC
[]
[]
[Outputs]
exodus = true
[]
(test/tests/kernels/ode/coupled_ode_td_var_ic_from_mesh.i)
[Mesh]
type = FileMesh
file = 'coupled_ode_td_out.e'
[]
[Variables]
[f]
family = SCALAR
order = FIRST
initial_from_file_var = f
initial_from_file_timestep = 'LATEST'
[]
[f_times_mult]
family = SCALAR
order = FIRST
initial_from_file_var = f_times_mult
initial_from_file_timestep = 'LATEST'
[]
[]
[ScalarKernels]
[dT]
type = CoupledODETimeDerivative
variable = f
v = f_times_mult
[]
[src]
type = ParsedODEKernel
variable = f
expression = '-1'
[]
[f_times_mult_1]
type = ParsedODEKernel
variable = f_times_mult
expression = 'f_times_mult'
[]
[f_times_mult_2]
type = ParsedODEKernel
variable = f_times_mult
expression = '-f * g'
coupled_variables = 'f g'
[]
[]
[AuxVariables]
[g]
family = SCALAR
order = FIRST
[]
[]
[Functions]
[function_g]
type = ParsedFunction
expression = '(1 + t)'
[]
[]
[AuxScalarKernels]
[set_g]
type = FunctionScalarAux
function = function_g
variable = g
execute_on = 'linear initial'
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 3
nl_abs_tol = 1e-9
[]
[Outputs]
csv = true
[]
(modules/combined/test/tests/additive_manufacturing/check_element_addition_2D.i)
[Problem]
kernel_coverage_check = false
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
ymin = 0
xmax = 1
ymax = 0.5
nx = 20
ny = 10
[]
[bottom_domain]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = ' 1 0.1 0'
block_id = 1
[]
[top_domain]
input = bottom_domain
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0.1 0'
top_right = '1 0.5 00'
block_id = 2
[]
[sidesets]
input = top_domain
type = SideSetsAroundSubdomainGenerator
normal = '1 0 0'
block = 1
new_boundary = 'moving_interface'
[]
[]
[Variables]
[temp]
block = '1'
[]
[]
[Functions]
[fy]
type = ParsedFunction
expression = '0.2'
[]
[fx]
type = ParsedFunction
expression = 't'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
automatic_scaling = true
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_max_its = 10
nl_max_its = 20
nl_rel_tol = 1e-4
start_time = 0.0
end_time = 1
dt = 1e-1
dtmin = 1e-4
[]
[UserObjects]
[activated_elem_uo]
type = ActivateElementsByPath
execute_on = timestep_begin
activate_distance = 0.2
function_x = fx
function_y = fy
active_subdomain_id = 1
expand_boundary_name = 'moving_interface'
[]
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/2D_different_planes/gps_xy.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = square_xy_plane.e
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./scalar_strain_zz]
order = FIRST
family = SCALAR
[../]
[]
[AuxVariables]
[./temp]
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./generalized_plane_strain]
block = 1
strain = SMALL
scalar_out_of_plane_strain = scalar_strain_zz
out_of_plane_direction = z
planar_formulation = GENERALIZED_PLANE_STRAIN
eigenstrain_names = 'eigenstrain'
generate_output = 'stress_xx stress_xy stress_yy stress_zz strain_xx strain_xy strain_yy strain_zz'
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
[../]
[]
[Functions]
[./tempfunc]
type = ParsedFunction
expression = '(1-x)*t'
[../]
[]
[BCs]
[./bottomx]
type = DirichletBC
boundary = 3
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = DirichletBC
boundary = 3
variable = disp_y
value = 0.0
[../]
[]
[Materials]
[./elastic_stress]
type = ComputeLinearElasticStress
block = 1
[../]
[./thermal_strain]
type = ComputeThermalExpansionEigenstrain
temperature = temp
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
eigenstrain_name = eigenstrain
[../]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
block = 1
poissons_ratio = 0.3
youngs_modulus = 1e6
[../]
[]
[Postprocessors]
[./react_z]
type = MaterialTensorIntegral
use_displaced_mesh = false
rank_two_tensor = stress
index_i = 2
index_j = 2
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
# controls for linear iterations
l_max_its = 100
l_tol = 1e-10
# controls for nonlinear iterations
nl_max_its = 10
nl_rel_tol = 1e-12
# time control
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 2.0
[]
[Outputs]
file_base = gps_xy_small_out
[./exodus]
type = Exodus
[../]
[]
(modules/contact/test/tests/mortar_cartesian_lms/two_block_1st_order_constraint_lm_xy.i)
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
theta = 0
velocity = 0.1
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.35
xmax = -0.05
ymin = -1
ymax = 0
nx = 1
ny = 3
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_sideset_names]
type = RenameBoundaryGenerator
input = left_block_sidesets
old_boundary = '10 11 12 13'
new_boundary = 'l_bottom l_right l_top l_left'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sideset_names
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.3
ymin = -1
ymax = 0
nx = 1
ny = 2
elem_type = QUAD4
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3'
new_boundary = '20 21 22 23'
[]
[right_block_sideset_names]
type = RenameBoundaryGenerator
input = right_block_sidesets
old_boundary = '20 21 22 23'
new_boundary = 'r_bottom r_right r_top r_left'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sideset_names
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[left_lower]
type = LowerDBlockFromSidesetGenerator
input = combined_mesh
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[right_lower]
type = LowerDBlockFromSidesetGenerator
input = left_lower
sidesets = '23'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[rotate_mesh]
type = TransformGenerator
input = right_lower
transform = ROTATE
vector_value = '0 0 ${theta}'
[]
[]
[Variables]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
[]
[]
[Functions]
[horizontal_movement]
type = ParsedFunction
expression = '${velocity} * t * cos(${theta}/180*pi)'
[]
[vertical_movement]
type = ParsedFunction
expression = '${velocity} * t * sin(${theta}/180*pi)'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = horizontal_movement
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 21
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = 21
value = 0.0
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 13
function = vertical_movement
[]
[]
[Materials]
[elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_right]
type = ComputeFiniteStrainElasticStress
block = 2
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapCartesianLMMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
correct_edge_dropping = true
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist NONZERO 1e-10'
line_search = none
dt = 0.1
dtmin = 0.1
end_time = 1.0
l_max_its = 100
nl_max_its = 20
nl_rel_tol = 1e-6
snesmf_reuse_base = false
[]
[Outputs]
exodus = false
file_base = './output/1st_order_${theta}_degree_out'
[comp]
type = CSV
show = 'tot_lin_it tot_nonlin_it'
execute_on = 'FINAL'
[]
[]
[Postprocessors]
[avg_disp_x]
type = ElementAverageValue
variable = disp_x
block = '1 2'
[]
[avg_disp_y]
type = ElementAverageValue
variable = disp_y
block = '1 2'
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
[]
[min_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
value_type = min
[]
[min_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
value_type = min
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[tot_lin_it]
type = CumulativeValuePostprocessor
postprocessor = num_lin_it
[]
[tot_nonlin_it]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[]
(test/tests/outputs/png/wedge.i)
[Mesh]
file = wedge.e
uniform_refine = 1
[]
[Functions]
active = 'tr_x tr_y'
[./tr_x]
type = ParsedFunction
expression = -x
[../]
[./tr_y]
type = ParsedFunction
expression = y
[../]
[]
[AuxVariables]
[two_u]
[]
[]
[AuxKernels]
[two_u]
type = ParsedAux
variable = two_u
coupled_variables = 'u'
expression = '2*u'
[]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff forcing dot'
[./diff]
type = Diffusion
variable = u
[../]
[./forcing]
type = GaussContForcing
variable = u
x_center = -0.5
y_center = 3.0
x_spread = 0.2
y_spread = 0.2
[../]
[./dot]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
#active = ' '
[./Periodic]
[./x]
primary = 1
secondary = 2
transform_func = 'tr_x tr_y'
inv_transform_func = 'tr_x tr_y'
[../]
[../]
[]
[Executioner]
type = Transient
dt = 0.5
num_steps = 6
solve_type = NEWTON
[]
[Outputs]
[png]
type = PNGOutput
resolution = 25
color = RWB
variable = 'two_u'
[]
[]
(modules/solid_mechanics/test/tests/elem_prop_read_user_object/prop_grain_read_3d.i)
[Mesh]
type = GeneratedMesh
dim = 3
elem_type = HEX8
displacements = 'disp_x disp_y disp_z'
nx = 30
ny = 30
nz = 30
[]
[Variables]
[./disp_x]
block = 0
[../]
[./disp_y]
block = 0
[../]
[./disp_z]
block = 0
[../]
[]
[AuxVariables]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./e_yy]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[]
[Functions]
[./tdisp]
type = ParsedFunction
expression = 0.05*t
[../]
[]
[UserObjects]
[./prop_read]
type = PropertyReadFile
prop_file_name = 'input_file.txt'
nprop = 4
read_type = grain
ngrain = 4
[../]
[]
[AuxKernels]
[./stress_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = stress
index_j = 1
index_i = 1
execute_on = timestep_end
block = 0
[../]
[./e_yy]
type = RankTwoAux
variable = e_yy
rank_two_tensor = elastic_strain
index_j = 1
index_i = 1
execute_on = timestep_end
block = 0
[../]
[]
[BCs]
[./fix_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0
[../]
[./fix_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./fix_z]
type = DirichletBC
variable = disp_z
boundary = 'back'
value = 0
[../]
[./tdisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = tdisp
[../]
[]
[Materials]
[./elasticity_tensor_with_Euler]
type = ComputeElasticityTensorCP
block = 0
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
read_prop_user_object = prop_read
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[]
[Postprocessors]
[./stress_yy]
type = ElementAverageValue
variable = stress_yy
block = 'ANY_BLOCK_ID 0'
[../]
[./e_yy]
type = ElementAverageValue
variable = e_yy
block = 'ANY_BLOCK_ID 0'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
dt = 0.05
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = -pc_hypre_type
petsc_options_value = boomerang
nl_abs_tol = 1e-10
nl_rel_step_tol = 1e-10
dtmax = 10.0
nl_rel_tol = 1e-10
end_time = 1
dtmin = 0.05
num_steps = 2
nl_abs_step_tol = 1e-10
[]
[Outputs]
file_base = prop_grain_read_3d_out
exodus = true
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
use_displaced_mesh = true
[../]
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/crysp.i)
[Mesh]
type = GeneratedMesh
dim = 3
elem_type = HEX8
displacements = 'ux uy uz'
[]
[Variables]
[./ux]
block = 0
[../]
[./uy]
block = 0
[../]
[./uz]
block = 0
[../]
[]
[AuxVariables]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./fp_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./rotout]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./e_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./gss1]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[]
[Functions]
[./tdisp]
type = ParsedFunction
expression = 0.01*t
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'ux uy uz'
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_zz]
type = RankTwoAux
variable = stress_zz
rank_two_tensor = stress
index_j = 2
index_i = 2
execute_on = timestep_end
block = 0
[../]
[./fp_zz]
type = RankTwoAux
variable = fp_zz
rank_two_tensor = fp
index_j = 2
index_i = 2
execute_on = timestep_end
block = 0
[../]
[./e_zz]
type = RankTwoAux
variable = e_zz
rank_two_tensor = lage
index_j = 2
index_i = 2
execute_on = timestep_end
block = 0
[../]
[./gss1]
type = MaterialStdVectorAux
variable = gss1
property = gss
index = 0
execute_on = timestep_end
block = 0
[../]
[]
[BCs]
[./symmy]
type = DirichletBC
variable = uy
boundary = bottom
value = 0
[../]
[./symmx]
type = DirichletBC
variable = ux
boundary = left
value = 0
[../]
[./symmz]
type = DirichletBC
variable = uz
boundary = back
value = 0
[../]
[./tdisp]
type = FunctionDirichletBC
variable = uz
boundary = front
function = tdisp
[../]
[]
[Materials]
[./crysp]
type = FiniteStrainCrystalPlasticity
block = 0
gtol = 1e-2
slip_sys_file_name = input_slip_sys.txt
nss = 12
num_slip_sys_flowrate_props = 2 #Number of properties in a slip system
flowprops = '1 4 0.001 0.1 5 8 0.001 0.1 9 12 0.001 0.1'
hprops = '1.0 541.5 60.8 109.8 2.5'
gprops = '1 4 60.8 5 8 60.8 9 12 60.8'
tan_mod_type = exact
[../]
[./elasticity_tensor]
type = ComputeElasticityTensorCP
block = 0
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'ux uy uz'
[../]
[]
[Postprocessors]
[./stress_zz]
type = ElementAverageValue
variable = stress_zz
block = 'ANY_BLOCK_ID 0'
[../]
[./fp_zz]
type = ElementAverageValue
variable = fp_zz
block = 'ANY_BLOCK_ID 0'
[../]
[./e_zz]
type = ElementAverageValue
variable = e_zz
block = 'ANY_BLOCK_ID 0'
[../]
[./gss1]
type = ElementAverageValue
variable = gss1
block = 'ANY_BLOCK_ID 0'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
dt = 0.05
dtmax = 10.0
dtmin = 0.05
num_steps = 10
[]
[Outputs]
file_base = out
exodus = true
[]
(modules/combined/test/tests/power_law_hardening/PowerLawHardening.i)
# This is a test of the isotropic power law hardening constitutive model.
# In this problem, a single Hex 8 element is fixed at the bottom and pulled at the top
# at a constant rate of 0.1.
# Before yield, stress = strain (=0.1*t) as youngs modulus is 1.0.
# The yield stress for this problem is 0.25 ( as strength coefficient is 0.5 and strain rate exponent is 0.5).
# Therefore, the material should start yielding at t = 2.5 seconds and then follow stress = K *pow(strain,n) or
# stress ~ 0.5*pow(0.1*t,0.5).
#
# This tensor mechanics version of the power law hardening plasticity model matches
# the solid mechanics version for this toy problem under exodiff limits
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[Mesh]
type = GeneratedMesh
dim = 3
[]
[AuxVariables]
[./total_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./top_pull]
type = ParsedFunction
expression = t*(0.1)
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
strain = SMALL
incremental = true
generate_output = 'stress_yy'
[]
[]
[AuxKernels]
[./total_strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yy
index_i = 1
index_j = 1
[../]
[]
[BCs]
[./y_pull_function]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = top_pull
[../]
[./x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./z_bot]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1.0
poissons_ratio = 0.3
[../]
[./power_law_hardening]
type = IsotropicPowerLawHardeningStressUpdate
strength_coefficient = 0.5 #K
strain_hardening_exponent = 0.5 #n
[../]
[./radial_return_stress]
type = ComputeMultipleInelasticStress
inelastic_models = 'power_law_hardening'
tangent_operator = elastic
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-ksp_snes_ew'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 4'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
end_time = 5.0
dt = 0.25
[]
[Postprocessors]
[./stress_yy]
type = ElementAverageValue
variable = stress_yy
[../]
[./strain_yy]
type = ElementAverageValue
variable = total_strain_yy
[../]
[]
[Outputs]
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[]
(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/solid_mechanics/test/tests/action/action_multi_eigenstrain_same_conditions.i)
# This tests a thermal expansion coefficient function using defined on both
# blocks. There two blocks, each containing a single element, and these use
# automatic_eigenstrain_names function of the SolidMechanics QuasiStatic Physics to ensure
# the names are passed correctly.
# In this test, the instantaneous CTE function has a constant value,
# while the mean CTE function is an analytic function designed to
# give the same response. If \bar{alpha}(T) is the mean CTE function,
# and \alpha(T) is the instantaneous CTE function,
# \bar{\alpha}(T) = 1/(T-Tref) \intA^{T}_{Tsf} \alpha(T) dT
# where Tref is the reference temperature used to define the mean CTE
# function, and Tsf is the stress-free temperature.
# This version of the test uses finite deformation theory.
# The two models produce very similar results. There are slight
# differences due to the large deformation treatment.
[Mesh]
file = 'blocks.e'
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[]
[Problem]
solve = false
[]
[Physics/SolidMechanics/QuasiStatic]
[./block1]
block = 1
strain = FINITE
add_variables = true
automatic_eigenstrain_names = true
generate_output = 'strain_xx strain_yy strain_zz'
[../]
[./block2]
block = 2
strain = FINITE
add_variables = true
automatic_eigenstrain_names = true
generate_output = 'strain_xx strain_yy strain_zz'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = disp_x
boundary = 3
value = 0.0
[../]
[./bottom]
type = DirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[./back]
type = DirichletBC
variable = disp_z
boundary = 1
value = 0.0
[../]
[]
[AuxKernels]
[./temp]
type = FunctionAux
variable = temp
block = '1 2'
function = temp_func
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain1]
type = ComputeMeanThermalExpansionFunctionEigenstrain
block = '1 2'
thermal_expansion_function = cte_func_mean
thermal_expansion_function_reference_temperature = 0.5
stress_free_temperature = 0.0
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Functions]
[./cte_func_mean]
type = ParsedFunction
symbol_names = 'tsf tref scale' #stress free temp, reference temp, scale factor
symbol_values = '0.0 0.5 1e-4'
expression = 'scale * (t - tsf) / (t - tref)'
[../]
[./cte_func_inst]
type = PiecewiseLinear
xy_data = '0 1.0
2 1.0'
scale_factor = 1e-4
[../]
[./temp_func]
type = PiecewiseLinear
xy_data = '0 1
1 2'
[../]
[]
[Postprocessors]
[./disp_1]
type = NodalExtremeValue
variable = disp_x
boundary = 101
[../]
[./disp_2]
type = NodalExtremeValue
variable = disp_x
boundary = 102
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
l_max_its = 100
l_tol = 1e-4
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
start_time = 0.0
end_time = 1.0
dt = 0.1
[]
(test/tests/userobjects/nearest_point_layered_side_integral_functor/nearest_point_layered_side_integral_functor.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 40
ny = 10
nz = 10
allow_renumbering = false
[]
[Materials]
[u_mat]
type = GenericFunctorMaterial
prop_names = 'u'
prop_values = 'u_fn'
[]
[]
[AuxVariables]
[u_layered_integral]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[u_layered_integral_kern]
type = SpatialUserObjectAux
variable = u_layered_integral
user_object = nplaf
boundary = 'bottom top'
execute_on = 'INITIAL'
[]
[]
[Functions]
[u_fn]
type = ParsedFunction
expression = 'x + y + z'
[]
[]
[UserObjects]
[nplaf]
type = NearestPointLayeredSideIntegralFunctor
direction = x
points='
0.25 0 0.25
0.75 0 0.25
0.25 0 0.75
0.75 0 0.75'
# Each layer has exactly 4 elements in the x direction. Note that to avoid inconsistent
# results, we should always avoid aligning layer edges with element centroids.
num_layers = 10
functor = u
boundary = 'bottom top'
execute_on = 'INITIAL'
[]
[]
[VectorPostprocessors]
[test_vpp]
type = SideValueSampler
variable = u_layered_integral
boundary = 'bottom top'
sort_by = id
execute_on = 'INITIAL'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = 'INITIAL'
[]
(modules/peridynamics/test/tests/generalized_plane_strain/generalized_plane_strain_H1NOSPD.i)
[GlobalParams]
displacements = 'disp_x disp_y'
scalar_out_of_plane_strain = scalar_strain_zz
[]
[Mesh]
type = PeridynamicsMesh
horizon_number = 3
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
[]
[gpd]
type = MeshGeneratorPD
input = gmg
retain_fe_mesh = false
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[scalar_strain_zz]
order = FIRST
family = SCALAR
[]
[]
[AuxVariables]
[temp]
order = FIRST
family = LAGRANGE
[]
[]
[Modules/Peridynamics/Mechanics]
[Master]
[all]
formulation = NONORDINARY_STATE
stabilization = BOND_HORIZON_I
[]
[]
[GeneralizedPlaneStrain]
[all]
formulation = NONORDINARY_STATE
[]
[]
[]
[AuxKernels]
[tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
use_displaced_mesh = false
[]
[]
[Functions]
[tempfunc]
type = ParsedFunction
expression = '(1-x)*t'
[]
[]
[BCs]
[bottom_x]
type = DirichletBC
boundary = 1000
variable = disp_x
value = 0.0
[]
[bottom_y]
type = DirichletBC
boundary = 1000
variable = disp_y
value = 0.0
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
poissons_ratio = 0.3
youngs_modulus = 1e6
[]
[strain]
type = ComputePlaneSmallStrainNOSPD
stabilization = BOND_HORIZON_I
eigenstrain_names = thermal
[]
[thermal_strain]
type = ComputeThermalExpansionEigenstrain
temperature = temp
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
eigenstrain_name = thermal
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
nl_rel_tol = 1e-12
start_time = 0.0
end_time = 1.0
[Quadrature]
type = GAUSS_LOBATTO
order = FIRST
[]
use_pre_SMO_residual = true
[]
[Outputs]
exodus = true
file_base = generalized_plane_strain_H1NOSPD
[]
(modules/xfem/test/tests/moving_interface/verification/1D_xy_homog1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: quasi-1D
# Coordinate System: xy
# Material Numbers/Types: homogeneous 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed linear level set function
# Description:
# A simple transient heat transfer problem in Cartesian coordinates designed
# with the Method of Manufactured Solutions. This problem was developed to
# verify XFEM performance in the presence of a moving interface for linear
# element models that can be exactly evaluated by FEM/Moose. Both the
# temperature solution and level set function are designed to be linear to
# attempt to minimize error between the Moose/exact solution and XFEM results.
# Thermal conductivity is a single, constant value at all points in the system.
# Results:
# The temperature at the left boundary (x=0) exhibits the largest difference
# between the FEM/Moose solution and XFEM results. We present the XFEM results
# at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 480.0000064
# 0.6 520 520.0000323
# 0.8 560 560.0000896
# 1.0 600 600.0001870
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 1
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 0.5
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-200*x+200)'
[../]
[./ls_func]
type = ParsedFunction
expression = '1-(x-0.04)-0.2*t'
[../]
[./neumann_func]
type = ParsedFunction
expression = '1.5*200*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericConstantMaterial
prop_names = 'diffusion_coefficient'
prop_values = 1.5
[../]
[]
[BCs]
[./left_du]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 'right'
value = 400
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(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
[]
[]
(test/tests/vectorpostprocessors/element_value_sampler/fv_element_value_sampler.i)
# Tests the ElementValueSampler vector post-processor. In this test, 2 FV
# variables are given distributions by a function and are output to a CSV file.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]
[Functions]
[./u_fn]
type = ParsedFunction
expression = '2 * x + 3 * y'
[../]
[./v_fn]
type = ParsedFunction
expression = 'x + y'
[../]
[]
[AuxVariables]
[./u]
family = MONOMIAL
order = CONSTANT
fv = true
[../]
[./v]
family = MONOMIAL
order = CONSTANT
fv = true
[../]
[]
[ICs]
[./u_ic]
type = FunctionIC
variable = u
function = u_fn
[../]
[./v_ic]
type = FunctionIC
variable = v
function = v_fn
[../]
[]
[VectorPostprocessors]
[./element_value_sampler]
type = ElementValueSampler
variable = 'u v'
sort_by = id
execute_on = 'initial'
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
file_base = 'element_value_sampler'
csv = true
execute_on = 'initial'
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure/test.i)
# Test that the initial conditions read from the exodus file are correct
[GlobalParams]
scaling_factor_1phase = '1. 1.e-2 1.e-4'
scaling_factor_temperature = 1e-2
closures = simple_closures
initial_from_file = 'steady_state_out.e'
[]
[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
[]
[]
[SolidProperties]
[mat1]
type = ThermalFunctionSolidProperties
k = 16
cp = 356.
rho = 6.551400E+03
[]
[]
[Functions]
[Ts_bc]
type = ParsedFunction
expression = '2*sin(x*pi)+507'
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = fp
# geometry
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 3
A = 1.907720E-04
D_h = 1.698566E-02
f = 0.1
[]
[hs]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 3
names = 'wall'
n_part_elems = 1
solid_properties = 'mat1'
solid_properties_T_ref = '300'
inner_radius = 0.01
widths = 0.1
[]
[ht]
type = HeatTransferFromHeatStructure1Phase
flow_channel = pipe
hs = hs
hs_side = INNER
Hw = 10000
[]
[temp_outside]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:outer
T = Ts_bc
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe:in'
m_dot = 0.1
T = 500
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = 6e6
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 1
num_steps = 1
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
[]
[Outputs]
exodus = true
execute_on = 'initial'
velocity_as_vector = false
[]
(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/combined/test/tests/surface_tension_KKS/surface_tension_VDWgas.i)
# Test for ComputeExtraStressVDWGas
# Gas bubble with r = 15 nm in a solid matrix
# The gas pressure is counterbalanced by the surface tension of the solid-gas interface,
# which is included with ComputeSurfaceTensionKKS
[Mesh]
type = GeneratedMesh
dim = 1
nx = 300
xmin = 0
xmax = 30
[]
[Problem]
coord_type = RSPHERICAL
[]
[GlobalParams]
displacements = 'disp_x'
[]
[Variables]
# order parameter
[./eta]
order = FIRST
family = LAGRANGE
[../]
# gas concentration
[./cg]
order = FIRST
family = LAGRANGE
[../]
# vacancy concentration
[./cv]
order = FIRST
family = LAGRANGE
[../]
# gas chemical potential
[./wg]
order = FIRST
family = LAGRANGE
[../]
# vacancy chemical potential
[./wv]
order = FIRST
family = LAGRANGE
[../]
# Matrix phase gas concentration
[./cgm]
order = FIRST
family = LAGRANGE
initial_condition = 1.01e-31
[../]
# Matrix phase vacancy concentration
[./cvm]
order = FIRST
family = LAGRANGE
initial_condition = 2.25e-11
[../]
# Bubble phase gas concentration
[./cgb]
order = FIRST
family = LAGRANGE
initial_condition = 0.2714
[../]
# Bubble phase vacancy concentration
[./cvb]
order = FIRST
family = LAGRANGE
initial_condition = 0.7286
[../]
[]
[ICs]
[./eta_ic]
variable = eta
type = FunctionIC
function = ic_func_eta
[../]
[./cv_ic]
variable = cv
type = FunctionIC
function = ic_func_cv
[../]
[./cg_ic]
variable = cg
type = FunctionIC
function = ic_func_cg
[../]
[]
[Functions]
[./ic_func_eta]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2+z^2);0.5*(1.0-tanh((r-r0)/delta_eta/sqrt(2.0)))'
symbol_names = 'delta_eta r0'
symbol_values = '0.321 15'
[../]
[./ic_func_cv]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2+z^2);eta_an:=0.5*(1.0-tanh((r-r0)/delta/sqrt(2.0)));cvbubinit*eta_an^3*(6*eta_an^2-15*eta_an+10)+cvmatrixinit*(1-eta_an^3*(6*eta_an^2-15*eta_an+10))'
symbol_names = 'delta r0 cvbubinit cvmatrixinit'
symbol_values = '0.321 15 0.7286 2.25e-11'
[../]
[./ic_func_cg]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2+z^2);eta_an:=0.5*(1.0-tanh((r-r0)/delta/sqrt(2.0)));cgbubinit*eta_an^3*(6*eta_an^2-15*eta_an+10)+cgmatrixinit*(1-eta_an^3*(6*eta_an^2-15*eta_an+10))'
symbol_names = 'delta r0 cgbubinit cgmatrixinit'
symbol_values = '0.321 15 0.2714 1.01e-31'
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
generate_output = 'hydrostatic_stress stress_xx stress_yy stress_zz'
[../]
[]
[Kernels]
# enforce cg = (1-h(eta))*cgm + h(eta)*cgb
[./PhaseConc_g]
type = KKSPhaseConcentration
ca = cgm
variable = cgb
c = cg
eta = eta
[../]
# enforce cv = (1-h(eta))*cvm + h(eta)*cvb
[./PhaseConc_v]
type = KKSPhaseConcentration
ca = cvm
variable = cvb
c = cv
eta = eta
[../]
# enforce pointwise equality of chemical potentials
[./ChemPotVacancies]
type = KKSPhaseChemicalPotential
variable = cvm
cb = cvb
fa_name = f_total_matrix
fb_name = f_total_bub
args_a = 'cgm'
args_b = 'cgb'
[../]
[./ChemPotGas]
type = KKSPhaseChemicalPotential
variable = cgm
cb = cgb
fa_name = f_total_matrix
fb_name = f_total_bub
args_a = 'cvm'
args_b = 'cvb'
[../]
#
# Cahn-Hilliard Equations
#
[./CHBulk_g]
type = KKSSplitCHCRes
variable = cg
ca = cgm
fa_name = f_total_matrix
w = wg
args_a = 'cvm'
[../]
[./CHBulk_v]
type = KKSSplitCHCRes
variable = cv
ca = cvm
fa_name = f_total_matrix
w = wv
args_a = 'cgm'
[../]
[./dcgdt]
type = CoupledTimeDerivative
variable = wg
v = cg
[../]
[./dcvdt]
type = CoupledTimeDerivative
variable = wv
v = cv
[../]
[./wgkernel]
type = SplitCHWRes
mob_name = M
variable = wg
[../]
[./wvkernel]
type = SplitCHWRes
mob_name = M
variable = wv
[../]
#
# Allen-Cahn Equation
#
[./ACBulkF]
type = KKSACBulkF
variable = eta
fa_name = f_total_matrix
fb_name = f_total_bub
w = 0.356
args = 'cvm cvb cgm cgb'
[../]
[./ACBulkCv]
type = KKSACBulkC
variable = eta
ca = cvm
cb = cvb
fa_name = f_total_matrix
args = 'cgm'
[../]
[./ACBulkCg]
type = KKSACBulkC
variable = eta
ca = cgm
cb = cgb
fa_name = f_total_matrix
args = 'cvm'
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = kappa
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[Materials]
# Chemical free energy of the matrix
[./fm]
type = DerivativeParsedMaterial
property_name = fm
coupled_variables = 'cvm cgm'
material_property_names = 'kvmatrix kgmatrix cvmatrixeq cgmatrixeq'
expression = '0.5*kvmatrix*(cvm-cvmatrixeq)^2 + 0.5*kgmatrix*(cgm-cgmatrixeq)^2'
[../]
# Elastic energy of the matrix
[./elastic_free_energy_m]
type = ElasticEnergyMaterial
base_name = matrix
f_name = fe_m
args = ' '
[../]
# Total free energy of the matrix
[./Total_energy_matrix]
type = DerivativeSumMaterial
property_name = f_total_matrix
sum_materials = 'fm fe_m'
coupled_variables = 'cvm cgm'
[../]
# Free energy of the bubble phase
[./fb]
type = DerivativeParsedMaterial
property_name = fb
coupled_variables = 'cvb cgb'
material_property_names = 'kToverV nQ Va b f0 kpen kgbub kvbub cvbubeq cgbubeq'
expression = '0.5*kgbub*(cvb-cvbubeq)^2 + 0.5*kvbub*(cgb-cgbubeq)^2'
[../]
# Elastic energy of the bubble
[./elastic_free_energy_p]
type = ElasticEnergyMaterial
base_name = bub
f_name = fe_b
args = ' '
[../]
# Total free energy of the bubble
[./Total_energy_bub]
type = DerivativeSumMaterial
property_name = f_total_bub
sum_materials = 'fb fe_b'
# sum_materials = 'fb'
coupled_variables = 'cvb cgb'
[../]
# 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 Va kvmatrix kgmatrix kgbub kvbub f0 kpen cvbubeq cgbubeq b T'
prop_values = '0.7 0.7 0.0368 0.03629 223.16 223.16 2.23 2.23 0.0224 1.0 0.6076 0.3924 0.085 800'
[../]
[./cvmatrixeq]
type = ParsedMaterial
property_name = cvmatrixeq
material_property_names = 'T'
constant_names = 'kB Efv'
constant_expressions = '8.6173324e-5 1.69'
expression = 'exp(-Efv/(kB*T))'
[../]
[./cgmatrixeq]
type = ParsedMaterial
property_name = cgmatrixeq
material_property_names = 'T'
constant_names = 'kB Efg'
constant_expressions = '8.6173324e-5 4.92'
expression = 'exp(-Efg/(kB*T))'
[../]
[./kToverV]
type = ParsedMaterial
property_name = kToverV
material_property_names = 'T Va'
constant_names = 'k C44dim' #k in J/K and dimensional C44 in J/m^3
constant_expressions = '1.38e-23 63e9'
expression = 'k*T*1e27/Va/C44dim'
[../]
[./nQ]
type = ParsedMaterial
property_name = nQ
material_property_names = 'T'
constant_names = 'k Pi M hbar' #k in J/K, M is Xe atomic mass in kg, hbar in J s
constant_expressions = '1.38e-23 3.14159 2.18e-25 1.05459e-34'
expression = '(M*k*T/2/Pi/hbar^2)^1.5 * 1e-27' #1e-27 converts from #/m^3 to #/nm^3
[../]
#Mechanical properties
[./Stiffness_matrix]
type = ComputeElasticityTensor
C_ijkl = '0.778 0.7935'
fill_method = symmetric_isotropic
base_name = matrix
[../]
[./Stiffness_bub]
type = ComputeElasticityTensor
C_ijkl = '0.0778 0.07935'
fill_method = symmetric_isotropic
base_name = bub
[../]
[./strain_matrix]
type = ComputeRSphericalSmallStrain
base_name = matrix
[../]
[./strain_bub]
type = ComputeRSphericalSmallStrain
base_name = bub
[../]
[./stress_matrix]
type = ComputeLinearElasticStress
base_name = matrix
[../]
[./stress_bub]
type = ComputeLinearElasticStress
base_name = bub
[../]
[./global_stress]
type = TwoPhaseStressMaterial
base_A = matrix
base_B = bub
[../]
[./surface_tension]
type = ComputeSurfaceTensionKKS
v = eta
kappa_name = kappa
w = 0.356
[../]
[./gas_pressure]
type = ComputeExtraStressVDWGas
T = T
b = b
cg = cgb
Va = Va
nondim_factor = 63e9
base_name = bub
outputs = exodus
[../]
[]
[BCs]
[./left_r]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[]
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm lu nonzero'
l_max_its = 30
nl_max_its = 15
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
nl_abs_tol = 1e-11
num_steps = 2
dt = 0.5
[]
[Outputs]
exodus = true
[]
(test/tests/functions/linear_combination_function/except1.i)
# LinearCombinationFunction function test
# See [Functions] block for a description of the tests
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 2
nx = 10
[]
[Variables]
[./dummy]
[../]
[]
[Kernels]
[./dummy_u]
type = TimeDerivative
variable = dummy
[../]
[]
[AuxVariables]
[./the_linear_combo]
[../]
[]
[AuxKernels]
[./the_linear_combo]
type = FunctionAux
variable = the_linear_combo
function = the_linear_combo
[../]
[]
[Functions]
[./twoxplus1]
type = ParsedFunction
expression = 2*x+1
[../]
[./xsquared]
type = ParsedFunction
expression = x*x
[../]
[./the_linear_combo]
type = LinearCombinationFunction
functions = 'x twoxplus1 xsquared'
w = '0.5 5 0.4 0.3'
[../]
[./should_be_answer]
type = ParsedFunction
expression = 0.5*x+5*(2*x+1)*0.4*x*x+0.3*7
[../]
[]
[Postprocessors]
[./should_be_zero]
type = NodalL2Error
function = should_be_answer
variable = the_linear_combo
[../]
[]
[Executioner]
type = Transient
dt = 0.5
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
hide = dummy
exodus = false
csv = true
[]
(modules/xfem/test/tests/bimaterials/glued_ad_bimaterials_2d.i)
# This test is for two layer materials with different youngs modulus using AD
# The global stress is determined by switching the stress based on level set values
# The material interface is marked by a level set function
# The two layer materials are glued together
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
[../]
[]
[Mesh]
displacements = 'disp_x disp_y'
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmin = 0.0
xmax = 5.
ymin = 0.0
ymax = 5.
elem_type = QUAD4
[]
[./left_bottom]
type = ExtraNodesetGenerator
new_boundary = 'left_bottom'
coord = '0.0 0.0'
input = gen
[../]
[./left_top]
type = ExtraNodesetGenerator
new_boundary = 'left_top'
coord = '0.0 5.'
input = left_bottom
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[Functions]
[./ls_func]
type = ParsedFunction
expression = 'y-2.5'
[../]
[]
[AuxVariables]
[./a_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
strain = SMALL
use_automatic_differentiation = true
add_variables = true
generate_output = 'stress_xx stress_yy stress_xy'
[../]
[]
[AuxKernels]
[./a_strain_xx]
type = ADRankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 0
variable = a_strain_xx
[../]
[./a_strain_yy]
type = ADRankTwoAux
rank_two_tensor = A_total_strain
index_i = 1
index_j = 1
variable = a_strain_yy
[../]
[./a_strain_xy]
type = ADRankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 1
variable = a_strain_xy
[../]
[./b_strain_xx]
type = ADRankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 0
variable = b_strain_xx
[../]
[./b_strain_yy]
type = ADRankTwoAux
rank_two_tensor = B_total_strain
index_i = 1
index_j = 1
variable = b_strain_yy
[../]
[./b_strain_xy]
type = ADRankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 1
variable = b_strain_xy
[../]
[]
[Constraints]
[./dispx_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_x
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[./dispy_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_y
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[]
[BCs]
[./bottomx]
type = ADDirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = ADDirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[./topx]
type = ADFunctionDirichletBC
boundary = top
variable = disp_x
function = 0.03*t
[../]
[./topy]
type = ADFunctionDirichletBC
boundary = top
variable = disp_y
function = '0.03*t'
[../]
[]
[Materials]
[./elasticity_tensor_A]
type = ADComputeIsotropicElasticityTensor
base_name = A
youngs_modulus = 1e9
poissons_ratio = 0.3
[../]
[./strain_A]
type = ADComputeSmallStrain
base_name = A
[../]
[./stress_A]
type = ADComputeLinearElasticStress
base_name = A
[../]
[./elasticity_tensor_B]
type = ADComputeIsotropicElasticityTensor
base_name = B
youngs_modulus = 1e5
poissons_ratio = 0.3
[../]
[./strain_B]
type = ADComputeSmallStrain
base_name = B
[../]
[./stress_B]
type = ADComputeLinearElasticStress
base_name = B
[../]
[./combined_stress]
type = ADLevelSetBiMaterialRankTwo
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = stress
[../]
[./combined_elasticity_tensor]
type = ADLevelSetBiMaterialRankFour
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = elasticity_tensor
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
line_search = 'bt'
# controls for linear iterations
l_max_its = 20
l_tol = 1e-8
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-50
# time control
start_time = 0.0
dt = 0.1
num_steps = 2
max_xfem_update = 1
[]
[Outputs]
exodus = true
file_base = glued_bimaterials_2d_out
execute_on = timestep_end
[./console]
type = Console
output_linear = true
[../]
[]
(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/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/crysp_user_object.i)
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
displacements = 'disp_x disp_y'
nx = 2
ny = 2
[]
[Variables]
[./disp_x]
block = 0
[../]
[./disp_y]
block = 0
[../]
[]
[GlobalParams]
volumetric_locking_correction=true
[]
[AuxVariables]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./e_yy]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./fp_yy]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./rotout]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./gss1]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[]
[Functions]
[./tdisp]
type = ParsedFunction
expression = 0.01*t
[../]
[]
[UserObjects]
[./prop_read]
type = PropertyReadFile
prop_file_name = 'euler_ang_file.txt'
# Enter file data as prop#1, prop#2, .., prop#nprop
nprop = 3
read_type = element
[../]
[]
[AuxKernels]
[./stress_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = stress
index_j = 1
index_i = 1
execute_on = timestep_end
block = 0
[../]
[./e_yy]
type = RankTwoAux
variable = e_yy
rank_two_tensor = lage
index_j = 1
index_i = 1
execute_on = timestep_end
block = 0
[../]
[./fp_yy]
type = RankTwoAux
variable = fp_yy
rank_two_tensor = fp
index_j = 1
index_i = 1
execute_on = timestep_end
block = 0
[../]
[./gss1]
type = MaterialStdVectorAux
variable = gss1
property = gss
index = 0
execute_on = timestep_end
block = 0
[../]
[]
[BCs]
[./fix_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0
[../]
[./fix_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./tdisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = tdisp
[../]
[]
[Materials]
[./crysp]
type = FiniteStrainCrystalPlasticity
block = 0
gtol = 1e-2
slip_sys_file_name = input_slip_sys.txt
nss = 12
num_slip_sys_flowrate_props = 2 #Number of properties in a slip system
flowprops = '1 4 0.001 0.1 5 8 0.001 0.1 9 12 0.001 0.1'
hprops = '1.0 541.5 60.8 109.8 2.5'
gprops = '1 4 60.8 5 8 60.8 9 12 60.8'
tan_mod_type = exact
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'disp_x disp_y'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensorCP
block = 0
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
read_prop_user_object = prop_read
[../]
[]
[Postprocessors]
[./stress_yy]
type = ElementAverageValue
variable = stress_yy
block = 'ANY_BLOCK_ID 0'
[../]
[./e_yy]
type = ElementAverageValue
variable = e_yy
block = 'ANY_BLOCK_ID 0'
[../]
[./fp_yy]
type = ElementAverageValue
variable = fp_yy
block = 'ANY_BLOCK_ID 0'
[../]
[./gss1]
type = ElementAverageValue
variable = gss1
block = 'ANY_BLOCK_ID 0'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
dt = 0.01
dtmax = 10.0
dtmin = 0.01
num_steps = 10
[]
[Outputs]
file_base = crysp_user_object_out
exodus = true
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y'
use_displaced_mesh = true
[../]
[]
(modules/porous_flow/test/tests/capillary_pressure/vangenuchten2.i)
# Test van Genuchten relative permeability curve by varying saturation over the mesh
# van Genuchten exponent m = 0.5 for both phases
# No residual saturation in either phase
[Mesh]
type = GeneratedMesh
dim = 1
nx = 500
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[p0]
initial_condition = 1e6
[]
[s1]
[]
[]
[AuxVariables]
[s0aux]
family = MONOMIAL
order = CONSTANT
[]
[s1aux]
family = MONOMIAL
order = CONSTANT
[]
[p0aux]
family = MONOMIAL
order = CONSTANT
[]
[p1aux]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[s0]
type = PorousFlowPropertyAux
property = saturation
phase = 0
variable = s0aux
[]
[s1]
type = PorousFlowPropertyAux
property = saturation
phase = 1
variable = s1aux
[]
[p0]
type = PorousFlowPropertyAux
property = pressure
phase = 0
variable = p0aux
[]
[p1]
type = PorousFlowPropertyAux
property = pressure
phase = 1
variable = p1aux
[]
[]
[Functions]
[s1]
type = ParsedFunction
expression = x
[]
[]
[ICs]
[s1]
type = FunctionIC
variable = s1
function = s1
[]
[]
[Kernels]
[p0]
type = Diffusion
variable = p0
[]
[s1]
type = Diffusion
variable = s1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'p0 s1'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
alpha = 1e-5
m = 0.5
sat_lr = 0.1
log_extension = true
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = p0
phase1_saturation = s1
capillary_pressure = pc
[]
[kr0]
type = PorousFlowRelativePermeabilityVG
phase = 0
m = 0.5
[]
[kr1]
type = PorousFlowRelativePermeabilityCorey
phase = 1
n = 2
[]
[]
[VectorPostprocessors]
[vpp]
type = LineValueSampler
variable = 's0aux s1aux p0aux p1aux'
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 500
sort_by = id
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-6
[]
[BCs]
[sleft]
type = DirichletBC
variable = s1
value = 0
boundary = left
[]
[sright]
type = DirichletBC
variable = s1
value = 1
boundary = right
[]
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(test/tests/kernels/body_force/forcing_function_test.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[]
uniform_refine = 4
[]
[Variables]
[u]
[]
[]
[Functions]
[forcing_func]
type = ParsedFunction
expression = alpha*alpha*pi*pi*sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '16'
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = forcing_func
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/solid_mechanics/test/tests/lagrangian/materials/convergence/neohookean.i)
# Simple 3D test
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 4
nz = 4
[]
[]
[ICs]
[disp_x]
type = RandomIC
variable = disp_x
min = -0.01
max = 0.01
[]
[disp_y]
type = RandomIC
variable = disp_y
min = -0.01
max = 0.01
[]
[disp_z]
type = RandomIC
variable = disp_z
min = -0.01
max = 0.01
[]
[]
[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
[]
[]
[Functions]
[pullx]
type = ParsedFunction
expression = '4000 * t'
[]
[pully]
type = ParsedFunction
expression = '-2000 * t'
[]
[pullz]
type = ParsedFunction
expression = '3000 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = left
variable = disp_y
value = 0.0
[]
[leftz]
type = DirichletBC
preset = true
boundary = left
variable = disp_z
value = 0.0
[]
[pull_x]
type = FunctionNeumannBC
boundary = right
variable = disp_x
function = pullx
[]
[pull_y]
type = FunctionNeumannBC
boundary = top
variable = disp_y
function = pully
[]
[pull_z]
type = FunctionNeumannBC
boundary = right
variable = disp_z
function = pullz
[]
[]
[Materials]
[compute_stress]
type = ComputeNeoHookeanStress
lambda = 4000.0
mu = 6700.0
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'newton'
line_search = none
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
l_max_its = 2
l_tol = 1e-14
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 2.0
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/convergence/sd-strain.i)
# 2D test with just strain control
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = false
constraint_types = 'strain none none strain strain none strain strain strain'
macro_gradient = hvar
homogenization_constraint = homogenization
[]
[Mesh]
[base]
type = FileMeshGenerator
file = '3d.exo'
[]
[sidesets]
type = SideSetsFromNormalsGenerator
input = base
normals = '-1 0 0
1 0 0
0 -1 0
0 1 0
'
' 0 0 -1
0 0 1'
fixed_normal = true
new_boundary = 'left right bottom top back front'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[hvar]
family = SCALAR
order = SIXTH
[]
[]
[ICs]
[disp_x]
type = RandomIC
variable = disp_x
min = -0.1
max = 0.1
[]
[disp_y]
type = RandomIC
variable = disp_y
min = -0.1
max = 0.1
[]
[disp_z]
type = RandomIC
variable = disp_z
min = -0.1
max = 0.1
[]
[hvar]
type = ScalarConstantIC
variable = hvar
value = 0.1
[]
[]
[AuxVariables]
[sxx]
family = MONOMIAL
order = CONSTANT
[]
[syy]
family = MONOMIAL
order = CONSTANT
[]
[sxy]
family = MONOMIAL
order = CONSTANT
[]
[szz]
family = MONOMIAL
order = CONSTANT
[]
[syz]
family = MONOMIAL
order = CONSTANT
[]
[sxz]
family = MONOMIAL
order = CONSTANT
[]
[exx]
family = MONOMIAL
order = CONSTANT
[]
[eyy]
family = MONOMIAL
order = CONSTANT
[]
[exy]
family = MONOMIAL
order = CONSTANT
[]
[ezz]
family = MONOMIAL
order = CONSTANT
[]
[eyz]
family = MONOMIAL
order = CONSTANT
[]
[exz]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[sxx]
type = RankTwoAux
variable = sxx
rank_two_tensor = pk1_stress
index_i = 0
index_j = 0
[]
[syy]
type = RankTwoAux
variable = syy
rank_two_tensor = pk1_stress
index_i = 1
index_j = 1
[]
[sxy]
type = RankTwoAux
variable = sxy
rank_two_tensor = pk1_stress
index_i = 0
index_j = 1
[]
[zz]
type = RankTwoAux
variable = szz
rank_two_tensor = pk1_stress
index_i = 2
index_j = 2
[]
[syz]
type = RankTwoAux
variable = syz
rank_two_tensor = pk1_stress
index_i = 1
index_j = 2
[]
[sxz]
type = RankTwoAux
variable = sxz
rank_two_tensor = pk1_stress
index_i = 0
index_j = 2
[]
[exx]
type = RankTwoAux
variable = exx
rank_two_tensor = mechanical_strain
index_i = 0
index_j = 0
[]
[eyy]
type = RankTwoAux
variable = eyy
rank_two_tensor = mechanical_strain
index_i = 1
index_j = 1
[]
[exy]
type = RankTwoAux
variable = exy
rank_two_tensor = mechanical_strain
index_i = 0
index_j = 1
[]
[ezz]
type = RankTwoAux
variable = ezz
rank_two_tensor = mechanical_strain
index_i = 2
index_j = 2
[]
[eyz]
type = RankTwoAux
variable = eyz
rank_two_tensor = mechanical_strain
index_i = 1
index_j = 2
[]
[exz]
type = RankTwoAux
variable = exz
rank_two_tensor = mechanical_strain
index_i = 0
index_j = 2
[]
[]
[UserObjects]
[homogenization]
type = HomogenizationConstraint
targets = 'strain11 strain12 strain22 strain13 strain23 strain33'
execute_on = 'INITIAL LINEAR NONLINEAR'
[]
[]
[Kernels]
[sdx]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[sdy]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_y
component = 1
[]
[sdz]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_z
component = 2
[]
[]
[ScalarKernels]
[enforce]
type = HomogenizationConstraintScalarKernel
variable = hvar
[]
[]
[Functions]
[strain11]
type = ParsedFunction
expression = '4.0e-2*t'
[]
[strain22]
type = ParsedFunction
expression = '-2.0e-2*t'
[]
[strain33]
type = ParsedFunction
expression = '8.0e-2*t'
[]
[strain23]
type = ParsedFunction
expression = '2.0e-2*t'
[]
[strain13]
type = ParsedFunction
expression = '-7.0e-2*t'
[]
[strain12]
type = ParsedFunction
expression = '1.0e-2*t'
[]
[]
[BCs]
[Periodic]
[x]
variable = disp_x
auto_direction = 'x y z'
[]
[y]
variable = disp_y
auto_direction = 'x y z'
[]
[z]
variable = disp_z
auto_direction = 'x y z'
[]
[]
[fix1_x]
type = DirichletBC
boundary = "fix_all"
variable = disp_x
value = 0
[]
[fix1_y]
type = DirichletBC
boundary = "fix_all"
variable = disp_y
value = 0
[]
[fix1_z]
type = DirichletBC
boundary = "fix_all"
variable = disp_z
value = 0
[]
[fix2_x]
type = DirichletBC
boundary = "fix_xy"
variable = disp_x
value = 0
[]
[fix2_y]
type = DirichletBC
boundary = "fix_xy"
variable = disp_y
value = 0
[]
[fix3_z]
type = DirichletBC
boundary = "fix_z"
variable = disp_z
value = 0
[]
[]
[Materials]
[elastic_tensor_1]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
block = '1'
[]
[elastic_tensor_2]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 120000.0
poissons_ratio = 0.21
block = '2'
[]
[elastic_tensor_3]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 80000.0
poissons_ratio = 0.4
block = '3'
[]
[elastic_tensor_4]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 76000.0
poissons_ratio = 0.11
block = '4'
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
homogenization_gradient_names = 'homogenization_gradient'
[]
[compute_homogenization_gradient]
type = ComputeHomogenizedLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[sxx]
type = ElementAverageValue
variable = sxx
execute_on = 'initial timestep_end'
[]
[syy]
type = ElementAverageValue
variable = syy
execute_on = 'initial timestep_end'
[]
[sxy]
type = ElementAverageValue
variable = sxy
execute_on = 'initial timestep_end'
[]
[szz]
type = ElementAverageValue
variable = szz
execute_on = 'initial timestep_end'
[]
[syz]
type = ElementAverageValue
variable = syz
execute_on = 'initial timestep_end'
[]
[sxz]
type = ElementAverageValue
variable = sxz
execute_on = 'initial timestep_end'
[]
[exx]
type = ElementAverageValue
variable = exx
execute_on = 'initial timestep_end'
[]
[eyy]
type = ElementAverageValue
variable = eyy
execute_on = 'initial timestep_end'
[]
[exy]
type = ElementAverageValue
variable = exy
execute_on = 'initial timestep_end'
[]
[ezz]
type = ElementAverageValue
variable = ezz
execute_on = 'initial timestep_end'
[]
[eyz]
type = ElementAverageValue
variable = eyz
execute_on = 'initial timestep_end'
[]
[exz]
type = ElementAverageValue
variable = exz
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
solve_type = 'newton'
line_search = none
#automatic_scaling = true
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 2
l_tol = 1e-14
nl_max_its = 10
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 0.2
[]
[Outputs]
exodus = false
csv = false
[]
(test/tests/mortar/aux-gap/mismatch.i)
[Mesh]
second_order = true
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[]
[secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[]
[]
[Variables]
[T]
block = '1 2'
order = SECOND
[]
[lambda]
block = '10'
use_dual = true
order = SECOND
[]
[]
[AuxVariables]
[gap]
block = '10'
[]
[]
[AuxKernels]
[gap]
type = WeightedGapAux
variable = gap
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln
variable = T
boundary = '3 4 5 6 7 8'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = '-4 + x^2 + y^2'
[]
[exact_soln]
type = ParsedFunction
expression = 'x^2 + y^2'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
exodus = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
(modules/heat_transfer/test/tests/code_verification/cylindrical_test_no4.i)
# Problem II.4
#
# An infinitely long hollow cylinder has thermal conductivity k and internal
# heat generation q. Its inner radius is ri and outer radius is ro.
# A constant heat flux is applied to the inside surface qin and
# the outside surface is exposed to a fluid temperature T and heat transfer
# coefficient h, which results in the convective boundary condition.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
xmin = 0.2
nx = 4
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Problem]
coord_type = RZ
[]
[Functions]
[./exact]
type = ParsedFunction
symbol_names = 'qin q k ri ro uf h'
symbol_values = '100 1200 1.0 0.2 1 100 10'
expression = 'uf+ (0.25*q/k) * ( 2*k*(ro^2-ri^2)/(h*ro) + ro^2-x^2 + 2*ri^2*log(x/ro)) + (k/(h*ro) - log(x/ro)) * qin * ri / k'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[./heatsource]
type = HeatSource
function = 1200
variable = u
[../]
[]
[BCs]
[./ui]
type = NeumannBC
boundary = left
variable = u
value = 100
[../]
[./uo]
type = CoupledConvectiveHeatFluxBC
boundary = right
variable = u
htc = 10.0
T_infinity = 100
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1.0 1.0 1.0'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = true
[]
(modules/porous_flow/test/tests/relperm/unity.i)
# Test perfectly mobile relative permeability curve by varying saturation over the mesh
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[p0]
initial_condition = 1e6
[]
[s1]
[]
[]
[AuxVariables]
[s0aux]
family = MONOMIAL
order = CONSTANT
[]
[s1aux]
family = MONOMIAL
order = CONSTANT
[]
[kr0aux]
family = MONOMIAL
order = CONSTANT
[]
[kr1aux]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[s0]
type = PorousFlowPropertyAux
property = saturation
phase = 0
variable = s0aux
[]
[s1]
type = PorousFlowPropertyAux
property = saturation
phase = 1
variable = s1aux
[]
[kr0]
type = PorousFlowPropertyAux
property = relperm
phase = 0
variable = kr0aux
[]
[kr1]
type = PorousFlowPropertyAux
property = relperm
phase = 1
variable = kr1aux
[]
[]
[Functions]
[s1]
type = ParsedFunction
expression = x
[]
[]
[ICs]
[s1]
type = FunctionIC
variable = s1
function = s1
[]
[]
[Kernels]
[p0]
type = Diffusion
variable = p0
[]
[s1]
type = Diffusion
variable = s1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'p0 s1'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = p0
phase1_saturation = s1
capillary_pressure = pc
[]
[kr0]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[kr1]
type = PorousFlowRelativePermeabilityConst
phase = 1
[]
[]
[VectorPostprocessors]
[vpp]
type = LineValueSampler
warn_discontinuous_face_values = false
variable = 's0aux s1aux kr0aux kr1aux'
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 20
sort_by = id
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-8
[]
[BCs]
[sleft]
type = DirichletBC
variable = s1
value = 0
boundary = left
[]
[sright]
type = DirichletBC
variable = s1
value = 1
boundary = right
[]
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(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/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts_steady.i)
[GlobalParams]
integrate_p_by_parts = true
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[AuxVariables]
[vel_x]
order = SECOND
[]
[vel_y]
order = SECOND
[]
[]
[AuxKernels]
[vel_x]
type = VectorVariableComponentAux
variable = vel_x
vector_variable = velocity
component = 'x'
[]
[vel_y]
type = VectorVariableComponentAux
variable = vel_y
vector_variable = velocity
component = 'y'
[]
[]
[Variables]
[./velocity]
order = SECOND
family = LAGRANGE_VEC
[../]
[./p]
[../]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
[../]
[]
[BCs]
[inlet]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom'
function_x = 0
function_y = 'inlet_func'
[../]
[wall]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'right'
function_x = 0
function_y = 0
[]
[axis]
type = ADVectorFunctionDirichletBC
variable = velocity
boundary = 'left'
set_y_comp = false
function_x = 0
[]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADMaterial
velocity = velocity
pressure = p
[]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(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/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'
[]
[]
(test/tests/variables/fe_hier/hier-1-2d.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 5
ny = 5
elem_type = QUAD9
[]
[Functions]
[./bc_fnt]
type = ParsedFunction
expression = 1
[../]
[./bc_fnb]
type = ParsedFunction
expression = -1
[../]
[./bc_fnl]
type = ParsedFunction
expression = -1
[../]
[./bc_fnr]
type = ParsedFunction
expression = 1
[../]
[./forcing_fn]
type = ParsedFunction
expression = x+y
[../]
[./solution]
type = ParsedGradFunction
expression = x+y
grad_x = 1
grad_y = 1
[../]
[]
[Variables]
[./u]
order = FIRST
family = HIERARCHIC
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./bc_top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = bc_fnt
[../]
[./bc_bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bc_fnb
[../]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/outputs/exodus/variable_output_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./aux]
family = SCALAR
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1
solve_type = PJFNK
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 2
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Postprocessors]
[./aux_pp]
type = ScalarVariable
variable = aux
outputs = none
[../]
[]
[Outputs]
execute_on = 'timestep_end'
[./exodus]
type = Exodus
file_base = new_out
hide_variables = 'u box aux_pp'
scalar_as_nodal = true
execute_scalars_on = none
[../]
[./console]
Type = Console
[../]
[]
(modules/porous_flow/test/tests/capillary_pressure/vangenuchten1.i)
# Test van Genuchten relative permeability curve by varying saturation over the mesh
# van Genuchten exponent m = 0.5 for both phases
# No residual saturation in either phase
[Mesh]
type = GeneratedMesh
dim = 1
nx = 500
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[p0]
initial_condition = 1e6
[]
[s1]
[]
[]
[AuxVariables]
[s0aux]
family = MONOMIAL
order = CONSTANT
[]
[s1aux]
family = MONOMIAL
order = CONSTANT
[]
[p0aux]
family = MONOMIAL
order = CONSTANT
[]
[p1aux]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[s0]
type = PorousFlowPropertyAux
property = saturation
phase = 0
variable = s0aux
[]
[s1]
type = PorousFlowPropertyAux
property = saturation
phase = 1
variable = s1aux
[]
[p0]
type = PorousFlowPropertyAux
property = pressure
phase = 0
variable = p0aux
[]
[p1]
type = PorousFlowPropertyAux
property = pressure
phase = 1
variable = p1aux
[]
[]
[Functions]
[s1]
type = ParsedFunction
expression = x
[]
[]
[ICs]
[s1]
type = FunctionIC
variable = s1
function = s1
[]
[]
[Kernels]
[p0]
type = Diffusion
variable = p0
[]
[s1]
type = Diffusion
variable = s1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'p0 s1'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
alpha = 1e-5
m = 0.5
sat_lr = 0.1
log_extension = false
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = p0
phase1_saturation = s1
capillary_pressure = pc
[]
[kr0]
type = PorousFlowRelativePermeabilityVG
phase = 0
m = 0.5
[]
[kr1]
type = PorousFlowRelativePermeabilityCorey
phase = 1
n = 2
[]
[]
[VectorPostprocessors]
[vpp]
type = LineValueSampler
variable = 's0aux s1aux p0aux p1aux'
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 500
sort_by = id
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-6
[]
[BCs]
[sleft]
type = DirichletBC
variable = s1
value = 0
boundary = left
[]
[sright]
type = DirichletBC
variable = s1
value = 1
boundary = right
[]
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(modules/thermal_hydraulics/test/tests/components/volume_junction_1phase/phy.deadend.i)
# Junction between 3 pipes, 1 of which goes to a dead-end. In the steady-state,
# no flow should go into the dead-end pipe.
[GlobalParams]
gravity_vector = '0 0 0'
scaling_factor_1phase = '1 1 1e-5'
initial_T = 250
initial_p = 1e5
initial_vel_x = 1
initial_vel_y = 0
initial_vel_z = 0
closures = simple_closures
[]
[AuxVariables]
[p0]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[p0_kernel]
type = StagnationPressureAux
variable = p0
fp = eos
e = e
v = v
vel = vel
[]
[]
[FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 1.4
cv = 725
q = 0
q_prime = 0
p_inf = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[T0]
type = ParsedFunction
expression = 'if (x < 1, 300 + 50 * sin(2*pi*x + 1.5*pi), 250)'
[]
[]
[Components]
[inlet]
type = InletDensityVelocity1Phase
input = 'inlet_pipe:in'
rho = 1.37931034483
vel = 1
[]
[inlet_pipe]
type = FlowChannel1Phase
fp = eos
position = '0 0 0'
orientation = '1 0 0'
length = 1
A = 1
f = 0
initial_T = T0
initial_p = 1e5
initial_vel = 1
n_elems = 20
[]
[junction1]
type = VolumeJunction1Phase
connections = 'inlet_pipe:out deadend_pipe:in outlet_pipe:in'
position = '1 0 0'
volume = 1e-8
[]
[outlet_pipe]
type = FlowChannel1Phase
fp = eos
position = '1 0 0'
orientation = '1 0 0'
length = 1
A = 1
f = 0
initial_T = 250
initial_p = 1e5
initial_vel = 1
n_elems = 20
[]
[outlet]
type = Outlet1Phase
input = 'outlet_pipe:out'
p = 1e5
[]
[deadend_pipe]
type = FlowChannel1Phase
fp = eos
position = '1 0 0'
orientation = '0 1 0'
length = 1
A = 1
f = 0
initial_T = 250
initial_p = 1e5
initial_vel = 0
n_elems = 20
[]
[deadend]
type = SolidWall1Phase
input = 'deadend_pipe:out'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 0
nl_abs_tol = 1e-6
nl_max_its = 10
l_tol = 1e-6
l_max_its = 10
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
start_time = 0
end_time = 5
dt = 0.1
abort_on_solve_fail = true
[]
[Postprocessors]
# These post-processors are used for testing that the stagnation pressure in
# the dead-end pipe is equal to the inlet stagnation pressure.
[p0_inlet]
type = SideAverageValue
variable = p0
boundary = inlet_pipe:in
[]
[p0_deadend]
type = SideAverageValue
variable = p0
boundary = deadend_pipe:out
[]
[test_rel_err]
type = RelativeDifferencePostprocessor
value1 = p0_deadend
value2 = p0_inlet
[]
[]
[Outputs]
[out]
type = CSV
show = test_rel_err
sync_only = true
sync_times = '1 2 3 4 5'
[]
velocity_as_vector = false
[]
(modules/solid_mechanics/test/tests/central_difference/consistent/3D/3d_consistent_implicit.i)
# One element test for the Newmark-Beta time integrator.
[Mesh]
type = GeneratedMesh # Can generate simple lines, rectangles and rectangular prisms
dim = 3 # Dimension of the mesh
nx = 1 # Number of elements in the x direction
ny = 1 # Number of elements in the y direction
nz = 2 # Number of elements in the z direction
xmin = 0.0
xmax = 1
ymin = 0.0
ymax = 1
zmin = 0.0
zmax = 2
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxVariables]
[./vel_x]
[../]
[./accel_x]
[../]
[./vel_y]
[../]
[./accel_y]
[../]
[./vel_z]
[../]
[./accel_z]
[../]
[]
[Kernels]
[./DynamicSolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[./inertia_x]
type = InertialForce
variable = disp_x
[../]
[./inertia_y]
type = InertialForce
variable = disp_y
[../]
[./inertia_z]
type = InertialForce
variable = disp_z
[../]
[]
[AuxKernels]
[./accel_x]
type = TestNewmarkTI
variable = accel_x
displacement = disp_x
first = false
[../]
[./vel_x]
type = TestNewmarkTI
variable = vel_x
displacement = disp_x
[../]
[./accel_y]
type = TestNewmarkTI
variable = accel_y
displacement = disp_y
first = false
[../]
[./vel_y]
type = TestNewmarkTI
variable = vel_y
displacement = disp_y
[../]
[./accel_z]
type = TestNewmarkTI
variable = accel_z
displacement = disp_z
first = false
[../]
[./vel_z]
type = TestNewmarkTI
variable = vel_z
displacement = disp_z
[../]
[]
[BCs]
[./x_bot]
type = PresetDisplacement
boundary = 'back'
variable = disp_x
beta = 0.25
velocity = vel_x
acceleration = accel_x
function = dispx
[../]
[./y_bot]
type = PresetDisplacement
boundary = 'back'
variable = disp_y
beta = 0.25
velocity = vel_y
acceleration = accel_y
function = dispy
[../]
[./z_bot]
type = PresetDisplacement
boundary = 'back'
variable = disp_z
beta = 0.25
velocity = vel_z
acceleration = accel_z
function = dispz
[../]
[./Periodic]
[./x_dir]
variable = 'disp_x disp_y disp_z'
primary = 'left'
secondary = 'right'
translation = '1.0 0.0 0.0'
[../]
[./y_dir]
variable = 'disp_x disp_y disp_z'
primary = 'bottom'
secondary = 'top'
translation = '0.0 1.0 0.0'
[../]
[../]
[]
[Functions]
[./dispx]
type = PiecewiseLinear
x = '0.0 1.0 2.0 3.0 4.0' # time
y = '0.0 1.0 0.0 -1.0 0.0' # displacement
[../]
[./dispy]
type = ParsedFunction
expression = 0.1*t*t*sin(10*t)
[../]
[./dispz]
type = ParsedFunction
expression = 0.1*t*t*sin(20*t)
[../]
[]
[Materials]
[./elasticity_tensor_block]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.25
block = 0
[../]
[./strain_block]
type = ComputeIncrementalSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./stress_block]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = density
prop_values = 1e4
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
nl_abs_tol = 1e-08
nl_rel_tol = 1e-08
timestep_tolerance = 1e-6
start_time = -0.01
end_time = 0.1
dt = 0.005
[./TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[../]
[]
[Postprocessors]
[./accel_6x]
type = NodalVariableValue
nodeid = 6
variable = accel_x
[../]
[]
[Outputs]
exodus = false
csv = true
[]
(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/contact/test/tests/mechanical_constraint/frictionless_penalty.i)
[Mesh]
file = blocks_2d.e
[]
[GlobalParams]
volumetric_locking_correction = false
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./penetration]
[../]
[./inc_slip_x]
[../]
[./inc_slip_y]
[../]
[./accum_slip_x]
[../]
[./accum_slip_y]
[../]
[]
[Functions]
[./vertical_movement]
type = ParsedFunction
expression = -t
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
strain = FINITE
[../]
[]
[AuxKernels]
[./zeroslip_x]
type = ConstantAux
variable = inc_slip_x
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./zeroslip_y]
type = ConstantAux
variable = inc_slip_y
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./accum_slip_x]
type = AccumulateAux
variable = accum_slip_x
accumulate_from_variable = inc_slip_x
execute_on = timestep_end
[../]
[./accum_slip_y]
type = AccumulateAux
variable = accum_slip_y
accumulate_from_variable = inc_slip_y
execute_on = timestep_end
[../]
[./penetration]
type = PenetrationAux
variable = penetration
boundary = 3
paired_boundary = 2
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = 4
#Initial gap is 0.01
value = -0.02
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = vertical_movement
[../]
[]
[Materials]
[./left]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e7
poissons_ratio = 0.3
[../]
[./right]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_max_its = 100
nl_max_its = 1000
dt = 0.01
end_time = 0.10
num_steps = 1000
l_tol = 1e-6
nl_rel_tol = 1e-10
nl_abs_tol = 1e-8
dtmin = 0.01
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
[]
[Outputs]
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[./console]
type = Console
max_rows = 5
[../]
[]
[Contact]
[./leftright]
primary = 2
secondary = 3
model = frictionless
formulation = penalty
penalty = 1e+7
[../]
[]
(modules/contact/test/tests/sliding_block/sliding/frictional_04_penalty.i)
# This is a benchmark test that checks constraint based frictional
# contact using the penalty method. In this test a constant
# displacement is applied in the horizontal direction to simulate
# a small block come sliding down a larger block.
#
# A friction coefficient of 0.4 is used. The gold file is run on one processor
# and the benchmark case is run on a minimum of 4 processors to ensure no
# parallel variability in the contact pressure and penetration results.
#
[Mesh]
file = sliding_elastic_blocks_2d.e
patch_size = 80
[]
[GlobalParams]
volumetric_locking_correction = false
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[penetration]
[]
[inc_slip_x]
[]
[inc_slip_y]
[]
[accum_slip_x]
[]
[accum_slip_y]
[]
[]
[Functions]
[vertical_movement]
type = ParsedFunction
expression = -t
[]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = true
strain = FINITE
[]
[]
[AuxKernels]
[zeroslip_x]
type = ConstantAux
variable = inc_slip_x
boundary = 3
execute_on = timestep_begin
value = 0.0
[]
[zeroslip_y]
type = ConstantAux
variable = inc_slip_y
boundary = 3
execute_on = timestep_begin
value = 0.0
[]
[accum_slip_x]
type = AccumulateAux
variable = accum_slip_x
accumulate_from_variable = inc_slip_x
execute_on = timestep_end
[]
[accum_slip_y]
type = AccumulateAux
variable = accum_slip_y
accumulate_from_variable = inc_slip_y
execute_on = timestep_end
[]
[penetration]
type = PenetrationAux
variable = penetration
boundary = 3
paired_boundary = 2
[]
[]
[Postprocessors]
[nonlinear_its]
type = NumNonlinearIterations
execute_on = timestep_end
[]
[penetration]
type = NodalVariableValue
variable = penetration
nodeid = 222
[]
[contact_pressure]
type = NodalVariableValue
variable = contact_pressure
nodeid = 222
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[]
[right_x]
type = DirichletBC
variable = disp_x
boundary = 4
value = -0.02
[]
[right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = vertical_movement
[]
[]
[Materials]
[left]
type = ComputeIsotropicElasticityTensor
block = '1 2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
line_search = 'none'
l_max_its = 100
nl_max_its = 1000
dt = 0.1
end_time = 14.99999
num_steps = 1000
l_tol = 1e-6
nl_rel_tol = 1e-10
nl_abs_tol = 1e-6
dtmin = 0.01
[Predictor]
type = SimplePredictor
scale = 1.0
[]
[]
[Outputs]
time_step_interval = 10
[out]
type = Exodus
elemental_as_nodal = true
[]
[console]
type = Console
max_rows = 5
[]
[]
[Contact]
[leftright]
secondary = 3
primary = 2
model = coulomb
penalty = 1e+6
friction_coefficient = 0.4
formulation = penalty
normal_smoothing_distance = 0.1
[]
[]
(test/tests/dgkernels/2d_diffusion_dg/no_mallocs_with_action.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[AuxVariables]
[v]
order = FIRST
family = MONOMIAL
[]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[../]
[./exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./abs] # u * v
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGDiffusionAction]
variable = u
epsilon = -1
sigma = 6
# We couple in an auxiliary variable in order to ensure that we've properly
# ghosted both non-linear and auxiliary solution vectors
coupled_var = v
[]
[BCs]
[./all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[console]
type = Console
system_info = 'framework mesh aux nonlinear relationship execution'
[]
[]
[Problem]
error_on_jacobian_nonzero_reallocation = true
[]
[Postprocessors]
active = 'num_rm'
[num_rm]
type = NumRelationshipManagers
[]
[num_internal_sides]
type = NumInternalSides
[]
[]
(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/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
[]
(modules/porous_flow/test/tests/fluidstate/coldwater_injection_radial.i)
# Cold water injection into 1D radial hot reservoir (Avdonin, 1964)
#
# To generate results presented in documentation for this problem,
# set xmax = 1000 and nx = 200 in the Mesh block, and dtmax = 1e4
# and end_time = 1e6 in the Executioner block.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 50
xmin = 0.1
xmax = 5
bias_x = 1.05
rz_coord_axis = Y
coord_type = RZ
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[AuxVariables]
[temperature]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[temperature]
type = PorousFlowPropertyAux
variable = temperature
property = temperature
execute_on = 'initial timestep_end'
[]
[]
[Variables]
[pliquid]
initial_condition = 5e6
[]
[h]
scaling = 1e-6
[]
[]
[ICs]
[hic]
type = PorousFlowFluidPropertyIC
variable = h
porepressure = pliquid
property = enthalpy
temperature = 170
temperature_unit = Celsius
fp = water
[]
[]
[Functions]
[injection_rate]
type = ParsedFunction
symbol_values = injection_area
symbol_names = area
expression = '-0.1/area'
[]
[]
[BCs]
[source]
type = PorousFlowSink
variable = pliquid
flux_function = injection_rate
boundary = left
[]
[pright]
type = DirichletBC
variable = pliquid
value = 5e6
boundary = right
[]
[hleft]
type = DirichletBC
variable = h
value = 678.52e3
boundary = left
[]
[hright]
type = DirichletBC
variable = h
value = 721.4e3
boundary = right
[]
[]
[Kernels]
[mass]
type = PorousFlowMassTimeDerivative
variable = pliquid
[]
[massflux]
type = PorousFlowAdvectiveFlux
variable = pliquid
[]
[heat]
type = PorousFlowEnergyTimeDerivative
variable = h
[]
[heatflux]
type = PorousFlowHeatAdvection
variable = h
[]
[heatcond]
type = PorousFlowHeatConduction
variable = h
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pliquid h'
number_fluid_phases = 2
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
pc_max = 1e6
sat_lr = 0.1
m = 0.5
alpha = 1e-5
[]
[fs]
type = PorousFlowWaterVapor
water_fp = water
capillary_pressure = pc
[]
[]
[FluidProperties]
[water]
type = Water97FluidProperties
[]
[]
[Materials]
[watervapor]
type = PorousFlowFluidStateSingleComponent
porepressure = pliquid
enthalpy = h
temperature_unit = Celsius
capillary_pressure = pc
fluid_state = fs
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.2
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1.8e-11 0 0 0 1.8e-11 0 0 0 1.8e-11'
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
s_res = 0.1
sum_s_res = 0.1
[]
[relperm_gas]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 1
sum_s_res = 0.1
[]
[internal_energy]
type = PorousFlowMatrixInternalEnergy
density = 2900
specific_heat_capacity = 740
[]
[rock_thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '20 0 0 0 20 0 0 0 20'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 1e3
nl_abs_tol = 1e-8
[TimeStepper]
type = IterationAdaptiveDT
dt = 100
[]
[]
[Postprocessors]
[injection_area]
type = AreaPostprocessor
boundary = left
execute_on = initial
[]
[]
[VectorPostprocessors]
[line]
type = ElementValueSampler
sort_by = x
variable = temperature
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
perf_graph = true
[csv]
type = CSV
execute_on = final
[]
[]
(modules/solid_mechanics/test/tests/initial_stress/gravity_cosserat.i)
# Apply an initial stress that should be
# exactly that caused by gravity, and then
# do a transient step to check that nothing
# happens
# TODO: currently this has no div(moment_stress)
# contriution to the Kernels. This is because
# there is no way in MOOSE of calculating
# moment stresses and applying initial stresses.
# This will become possible after issue #7243 is
# resolved.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 10
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -10
zmax = 0
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./wc_x]
[../]
[./wc_y]
[../]
[./wc_z]
[../]
[]
[Kernels]
[./cx_elastic]
type = CosseratStressDivergenceTensors
variable = disp_x
component = 0
[../]
[./cy_elastic]
type = CosseratStressDivergenceTensors
variable = disp_y
component = 1
[../]
[./cz_elastic]
type = CosseratStressDivergenceTensors
variable = disp_z
component = 2
[../]
[./x_moment]
type = MomentBalancing
variable = wc_x
component = 0
[../]
[./y_moment]
type = MomentBalancing
variable = wc_y
component = 1
[../]
[./z_moment]
type = MomentBalancing
variable = wc_z
component = 2
[../]
[./weight]
type = BodyForce
variable = disp_z
value = -0.5 # this is density*gravity
[../]
[]
[BCs]
# back = zmin
# front = zmax
# bottom = ymin
# top = ymax
# left = xmin
# right = xmax
[./x]
type = DirichletBC
variable = disp_x
boundary = 'left right'
value = 0
[../]
[./y]
type = DirichletBC
variable = disp_y
boundary = 'bottom top'
value = 0
[../]
[./z]
type = DirichletBC
variable = disp_z
boundary = 'back'
value = 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
[../]
[]
[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
[../]
[]
[Functions]
[./weight]
type = ParsedFunction
expression = '0.5*z' # initial stress that should result from the weight force
[../]
[./kxx]
type = ParsedFunction
expression = '0.4*z' # some arbitrary xx and yy stress that should not affect the result
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeCosseratElasticityTensor
B_ijkl = '1.1 0.6 0.6' # In Forest notation this is alpha=1.1 (this is unimportant), beta=gamma=0.6.
fill_method_bending = 'general_isotropic'
fill_method = symmetric_isotropic
E_ijkl = '0.4 0.4' # young = 1, poisson = 0.25
[../]
[./strain]
type = ComputeCosseratSmallStrain
eigenstrain_names = ini_stress
[../]
[./ini_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = 'kxx 0 0 0 kxx 0 0 0 weight'
eigenstrain_name = ini_stress
[../]
[./stress]
type = ComputeCosseratLinearElasticStress
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
end_time = 1.0
dt = 1.0
solve_type = NEWTON
type = Transient
nl_abs_tol = 1E-8
nl_rel_tol = 1E-12
l_tol = 1E-3
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
file_base = gravity_cosserat
exodus = true
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/crysp_substep.i)
[Mesh]
type = GeneratedMesh
dim = 3
elem_type = HEX8
displacements = 'ux uy uz'
[]
[Variables]
[./ux]
block = 0
[../]
[./uy]
block = 0
[../]
[./uz]
block = 0
[../]
[]
[AuxVariables]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./fp_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./rotout]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./e_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./gss1]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[]
[Functions]
[./tdisp]
type = ParsedFunction
expression = 0.01*t
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'ux uy uz'
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_zz]
type = RankTwoAux
variable = stress_zz
rank_two_tensor = stress
index_j = 2
index_i = 2
execute_on = timestep_end
block = 0
[../]
[./fp_zz]
type = RankTwoAux
variable = fp_zz
rank_two_tensor = fp
index_j = 2
index_i = 2
execute_on = timestep_end
block = 0
[../]
[./e_zz]
type = RankTwoAux
variable = e_zz
rank_two_tensor = lage
index_j = 2
index_i = 2
execute_on = timestep_end
block = 0
[../]
[./gss1]
type = MaterialStdVectorAux
variable = gss1
property = gss
index = 0
execute_on = timestep_end
block = 0
[../]
[]
[BCs]
[./symmy]
type = DirichletBC
variable = uy
boundary = bottom
value = 0
[../]
[./symmx]
type = DirichletBC
variable = ux
boundary = left
value = 0
[../]
[./symmz]
type = DirichletBC
variable = uz
boundary = back
value = 0
[../]
[./tdisp]
type = FunctionDirichletBC
variable = uz
boundary = front
function = tdisp
[../]
[]
[Materials]
[./crysp]
type = FiniteStrainCrystalPlasticity
block = 0
gtol = 1e-2
slip_sys_file_name = input_slip_sys.txt
nss = 12
num_slip_sys_flowrate_props = 2 #Number of properties in a slip system
flowprops = '1 4 0.001 0.1 5 8 0.001 0.1 9 12 0.001 0.1'
hprops = '1.0 541.5 60.8 109.8 2.5'
gprops = '1 4 60.8 5 8 60.8 9 12 60.8'
tan_mod_type = exact
gen_random_stress_flag = false
maximum_substep_iteration = 2
[../]
[./elasticity_tensor]
type = ComputeElasticityTensorCP
block = 0
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'ux uy uz'
[../]
[]
[Postprocessors]
[./stress_zz]
type = ElementAverageValue
variable = stress_zz
block = 'ANY_BLOCK_ID 0'
[../]
[./fp_zz]
type = ElementAverageValue
variable = fp_zz
block = 'ANY_BLOCK_ID 0'
[../]
[./e_zz]
type = ElementAverageValue
variable = e_zz
block = 'ANY_BLOCK_ID 0'
[../]
[./gss1]
type = ElementAverageValue
variable = gss1
block = 'ANY_BLOCK_ID 0'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
dt = 0.5
dtmax = 10.0
dtmin = 0.5
num_steps = 3
[]
[Outputs]
file_base = crysp_substep_out
exodus = true
csv = true
gnuplot = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized_with_temp_transient.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[temperature]
[InitialCondition]
type = ConstantIC
value = 1.0
[]
[]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./mass_pspg]
type = INSADMassPSPG
variable = p
[../]
[./momentum_time]
type = INSADMomentumTimeDerivative
variable = velocity
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[../]
[./momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[../]
[./temperature_advection]
type = INSADEnergyAdvection
variable = temperature
[../]
[temperature_time]
type = INSADHeatConductionTimeDerivative
variable = temperature
[]
[./temperature_conduction]
type = ADHeatConduction
variable = temperature
thermal_conductivity = 'k'
[../]
[temperature_supg]
type = INSADEnergySUPG
variable = temperature
velocity = velocity
[]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left'
[../]
[./lid]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 'lid_function'
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[./temperature_hot]
type = DirichletBC
variable = temperature
boundary = 'bottom'
value = 1
[../]
[./temperature_cold]
type = DirichletBC
variable = temperature
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = temperature
[]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/generalized_plane_strain/generalized_plane_strain_small.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[square]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[]
[]
[Variables]
[scalar_strain_zz]
order = FIRST
family = SCALAR
[]
[]
[AuxVariables]
[temp]
order = FIRST
family = LAGRANGE
[]
[saved_x]
order = FIRST
family = LAGRANGE
[]
[saved_y]
order = FIRST
family = LAGRANGE
[]
[]
[Postprocessors]
[react_z]
type = MaterialTensorIntegral
rank_two_tensor = stress
index_i = 2
index_j = 2
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = SMALL
add_variables = true
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_xy stress_yy stress_zz strain_xx strain_xy strain_yy strain_zz'
planar_formulation = GENERALIZED_PLANE_STRAIN
eigenstrain_names = eigenstrain
scalar_out_of_plane_strain = scalar_strain_zz
temperature = temp
save_in = 'saved_x saved_y'
[]
[]
[AuxKernels]
[tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
use_displaced_mesh = false
[]
[]
[Functions]
[tempfunc]
type = ParsedFunction
expression = '(1-x)*t'
[]
[]
[BCs]
[bottomx]
type = DirichletBC
boundary = 0
variable = disp_x
value = 0.0
[]
[bottomy]
type = DirichletBC
boundary = 0
variable = disp_y
value = 0.0
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
poissons_ratio = 0.3
youngs_modulus = 1e6
[]
[thermal_strain]
type = ComputeThermalExpansionEigenstrain
temperature = temp
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
eigenstrain_name = eigenstrain
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -ksp_gmres_restart'
petsc_options_value = 'lu superlu_dist 51'
# controls for linear iterations
l_max_its = 100
l_tol = 1e-4
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-12
nl_abs_tol = 1e-8
# time control
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 2.0
num_steps = 5000
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/thermal_expansion/constant_expansion_coeff_restart.i)
# This test involves only thermal expansion strains on a 2x2x2 cube of approximate
# steel material. An initial temperature of 25 degrees C is given for the material,
# and an auxkernel is used to calculate the temperature in the entire cube to
# raise the temperature each time step. After the first timestep,in which the
# temperature jumps, the temperature increases by 6.25C each timestep.
# The thermal strain increment should therefore be
# 6.25 C * 1.3e-5 1/C = 8.125e-5 m/m.
# This test is also designed to be used to identify problems with restart files
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
[]
[Problem]
restart_file_base = constant_expansion_coeff_out_cp/LATEST
force_restart = true
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./temp]
[../]
[]
[Functions]
[./temperature_load]
type = ParsedFunction
expression = t*(500.0)+300.0
[../]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[./all]
strain = SMALL
incremental = true
add_variables = true
eigenstrain_names = eigenstrain
generate_output = 'strain_xx strain_yy strain_zz'
[../]
[../]
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = temperature_load
use_displaced_mesh = false
[../]
[]
[BCs]
[./x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./z_bot]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 298
thermal_expansion_coeff = 1.3e-5
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
end_time = 0.1
dt = 0.0125
dtmin = 0.0001
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Postprocessors]
[./strain_xx]
type = ElementAverageValue
variable = strain_xx
[../]
[./strain_yy]
type = ElementAverageValue
variable = strain_yy
[../]
[./strain_zz]
type = ElementAverageValue
variable = strain_zz
[../]
[./temperature]
type = AverageNodalVariableValue
variable = temp
[../]
[]
(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
[]
(test/tests/meshgenerators/flip_sideset_generator/flux_flip_2D.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 3
ny = 3
xmax = 3
ymax = 3
[]
[s1]
type = ParsedGenerateSideset
input = gmg
combinatorial_geometry = 'x > 0.9 & x < 1.1 & y > -0.1 & y < 1.1'
normal = '1 0 0'
new_sideset_name = s1
[]
[s2]
type = ParsedGenerateSideset
input = s1
combinatorial_geometry = 'x > 0.9 & x < 2.1 & y > 0.9 & y < 1.1'
normal = '0 1 0'
new_sideset_name = s2
[]
[s3]
type = ParsedGenerateSideset
input = s2
combinatorial_geometry = 'x > 1.9 & x < 2.1 & y > 0.9 & y < 2.1'
normal = '1 0 0'
new_sideset_name = s3
[]
[s4]
type = ParsedGenerateSideset
input = s3
combinatorial_geometry = 'x > 1.9 & x < 3.1 & y > 1.9 & y < 2.1'
normal = '0 1 0'
new_sideset_name = s4
[]
[sideset]
type = SideSetsFromBoundingBoxGenerator
input = s4
bottom_left = '0 0 0'
top_right = '3 3 3'
included_boundaries = 's1 s2 s3 s4'
boundary_new = 's_combined'
[]
[flip]
type = FlipSidesetGenerator
input = sideset
boundary = s_combined
[]
[]
[AuxVariables]
[u]
[]
[]
[AuxKernels]
[diffusion]
type = FunctionAux
variable = u
function = func
[]
[]
[Functions]
[func]
type = ParsedFunction
expression = x+y
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Postprocessors]
[flux]
type = SideDiffusiveFluxIntegral
variable = u
boundary = s_combined
diffusivity = 1
[]
[area]
type = AreaPostprocessor
boundary = s_combined
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(modules/richards/test/tests/jacobian_2/jn_lumped_17.i)
# two phase
# water saturated
# gravity = true
# supg = true
# transient = true
[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 = 'DensityWater DensityGas'
relperm_UO = 'RelPermWater RelPermGas'
SUPG_UO = 'SUPGwater SUPGgas'
sat_UO = 'SatWater SatGas'
seff_UO = 'SeffWater SeffGas'
viscosity = '1E-3 0.5E-3'
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 1.0 # notice small quantity, so the PETSc constant state works
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 0.5
bulk_mod = 0.5 # notice small quantity, so the PETSc constant state works
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1 # notice small quantity, so the PETSc constant state works
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1 # notice small quantity, so the PETSc constant state works
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.2
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.1
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
[./InitialCondition]
type = FunctionIC
block = 0
function = init_p
[../]
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
block = 0
function = init_p
[../]
[../]
[]
[Functions]
[./init_p]
type = ParsedFunction
expression = x+0.6*y+0.3*z
[../]
[]
[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
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
gravity = '1 2 3'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
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-15 1E-10 10000 test'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E-10
[]
[Outputs]
execute_on = 'timestep_end'
file_base = jn17
exodus = false
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/stress_update_material_based/orthotropic_rotation_Cijkl.i)
# This test is designed to test the correct application of the Euler angle
# rotations to the elasticity tensor. The test uses values for the nine C_ijkl
# entries that correspond to the engineering notation placement:
# e.g. C11 = 11e3, c12 = 12e3, c13 = 13e3, c22 = 22e3 ..... c66 = 66e3
#
# A rotation of (0, 90, 0) is applied to the 1x1x1 cube, such that the values of
# c12 and c13 switch, c22 and c33 switch, and c55 and c66 switch. Postprocessors
# are used to verify this switch (made simple with the value convention above)
# and to verify that the unrotated components along the x-axis remain constant.
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[lage_xx]
order = CONSTANT
family = MONOMIAL
[]
[lage_yy]
order = CONSTANT
family = MONOMIAL
[]
[pk2_yy]
order = CONSTANT
family = MONOMIAL
[]
[lage_zz]
order = CONSTANT
family = MONOMIAL
[]
[fp_yy]
order = CONSTANT
family = MONOMIAL
[]
[c11]
order = CONSTANT
family = MONOMIAL
[]
[c12]
order = CONSTANT
family = MONOMIAL
[]
[c13]
order = CONSTANT
family = MONOMIAL
[]
[c22]
order = CONSTANT
family = MONOMIAL
[]
[c23]
order = CONSTANT
family = MONOMIAL
[]
[c33]
order = CONSTANT
family = MONOMIAL
[]
[c44]
order = CONSTANT
family = MONOMIAL
[]
[c55]
order = CONSTANT
family = MONOMIAL
[]
[c66]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[tdisp]
type = ParsedFunction
expression = 0.01*t
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
[]
[]
[AuxKernels]
[lage_xx]
type = RankTwoAux
rank_two_tensor = total_lagrangian_strain
variable = lage_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[lage_yy]
type = RankTwoAux
rank_two_tensor = total_lagrangian_strain
variable = lage_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[pk2_yy]
type = RankTwoAux
variable = pk2_yy
rank_two_tensor = second_piola_kirchhoff_stress
index_j = 1
index_i = 1
execute_on = timestep_end
[]
[lage_zz]
type = RankTwoAux
rank_two_tensor = total_lagrangian_strain
variable = lage_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[fp_yy]
type = RankTwoAux
variable = fp_yy
rank_two_tensor = plastic_deformation_gradient
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[c11]
type = RankFourAux
variable = c11
rank_four_tensor = elasticity_tensor
index_i = 0
index_j = 0
index_k = 0
index_l = 0
execute_on = timestep_end
[]
[c12]
type = RankFourAux
variable = c12
rank_four_tensor = elasticity_tensor
index_i = 0
index_j = 0
index_k = 1
index_l = 1
execute_on = timestep_end
[]
[c13]
type = RankFourAux
variable = c13
rank_four_tensor = elasticity_tensor
index_i = 0
index_j = 0
index_k = 2
index_l = 2
execute_on = timestep_end
[]
[c22]
type = RankFourAux
variable = c22
rank_four_tensor = elasticity_tensor
index_i = 1
index_j = 1
index_k = 1
index_l = 1
execute_on = timestep_end
[]
[c23]
type = RankFourAux
variable = c23
rank_four_tensor = elasticity_tensor
index_i = 1
index_j = 1
index_k = 2
index_l = 2
execute_on = timestep_end
[]
[c33]
type = RankFourAux
variable = c33
rank_four_tensor = elasticity_tensor
index_i = 2
index_j = 2
index_k = 2
index_l = 2
execute_on = timestep_end
[]
[c44]
type = RankFourAux
variable = c44
rank_four_tensor = elasticity_tensor
index_i = 1
index_j = 2
index_k = 1
index_l = 2
execute_on = timestep_end
[]
[c55]
type = RankFourAux
variable = c55
rank_four_tensor = elasticity_tensor
index_i = 2
index_j = 0
index_k = 2
index_l = 0
execute_on = timestep_end
[]
[c66]
type = RankFourAux
variable = c66
rank_four_tensor = elasticity_tensor
index_i = 0
index_j = 1
index_k = 0
index_l = 1
execute_on = timestep_end
[]
[]
[BCs]
[bottom]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[left]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[back]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[]
[top]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = tdisp
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensorCP
C_ijkl = '11e3 12e3 13e3 22e3 23e3 33e3 44e3 55e3 66e3'
fill_method = symmetric9
euler_angle_1 = 0.0
euler_angle_2 = 45.0
euler_angle_3 = 45.0
[]
[stress]
type = ComputeMultipleCrystalPlasticityStress
crystal_plasticity_models = 'trial_xtalpl'
tan_mod_type = exact
[]
[trial_xtalpl]
type = CrystalPlasticityKalidindiUpdate
number_slip_systems = 12
slip_sys_file_name = input_slip_sys.txt
[]
[]
[Postprocessors]
[lage_xx]
type = ElementAverageValue
variable = lage_xx
[]
[pk2_yy]
type = ElementAverageValue
variable = pk2_yy
[]
[lage_yy]
type = ElementAverageValue
variable = lage_yy
[]
[lage_zz]
type = ElementAverageValue
variable = lage_zz
[]
[fp_yy]
type = ElementAverageValue
variable = fp_yy
[]
[c11]
type = ElementAverageValue
variable = c11
[]
[c12]
type = ElementAverageValue
variable = c12
[]
[c13]
type = ElementAverageValue
variable = c13
[]
[c22]
type = ElementAverageValue
variable = c22
[]
[c23]
type = ElementAverageValue
variable = c23
[]
[c33]
type = ElementAverageValue
variable = c33
[]
[c44]
type = ElementAverageValue
variable = c44
[]
[c55]
type = ElementAverageValue
variable = c55
[]
[c66]
type = ElementAverageValue
variable = c66
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
l_tol = 1e-3
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 1 lu gmres 200'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-10
dtmax = 0.1
dtmin = 1.0e-3
dt = 0.05
end_time = 0.5
[]
[Outputs]
exodus = false
csv = true
[]
(modules/porous_flow/test/tests/poroperm/PermTensorFromVar02.i)
# Testing permeability calculated from scalar and tensor
# Trivial test, checking calculated permeability is correct
# when scalar is a FunctionAux.
# k = k_anisotropy * perm
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 3
[]
[GlobalParams]
block = 0
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[InitialCondition]
type = ConstantIC
value = 0
[]
[]
[]
[Kernels]
[flux]
type = PorousFlowAdvectiveFlux
gravity = '0 0 0'
variable = pp
[]
[]
[BCs]
[ptop]
type = DirichletBC
variable = pp
boundary = right
value = 0
[]
[pbase]
type = DirichletBC
variable = pp
boundary = left
value = 1
[]
[]
[Functions]
[perm_fn]
type = ParsedFunction
expression = '2*(x+1)'
[]
[]
[AuxVariables]
[perm_var]
order = CONSTANT
family = MONOMIAL
[]
[perm_x]
order = CONSTANT
family = MONOMIAL
[]
[perm_y]
order = CONSTANT
family = MONOMIAL
[]
[perm_z]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[perm_var]
type = FunctionAux
function = perm_fn
variable = perm_var
[]
[perm_x]
type = PorousFlowPropertyAux
property = permeability
variable = perm_x
row = 0
column = 0
[]
[perm_y]
type = PorousFlowPropertyAux
property = permeability
variable = perm_y
row = 1
column = 1
[]
[perm_z]
type = PorousFlowPropertyAux
property = permeability
variable = perm_z
row = 2
column = 2
[]
[]
[Postprocessors]
[perm_x_left]
type = PointValue
variable = perm_x
point = '0.5 0 0'
[]
[perm_y_left]
type = PointValue
variable = perm_y
point = '0.5 0 0'
[]
[perm_z_left]
type = PointValue
variable = perm_z
point = '0.5 0 0'
[]
[perm_x_right]
type = PointValue
variable = perm_x
point = '2.5 0 0'
[]
[perm_y_right]
type = PointValue
variable = perm_y
point = '2.5 0 0'
[]
[perm_z_right]
type = PointValue
variable = perm_z
point = '2.5 0 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
# unimportant in this fully-saturated test
m = 0.8
alpha = 1e-4
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[permeability]
type = PorousFlowPermeabilityTensorFromVar
k_anisotropy = '1 0 0 0 2 0 0 0 0.1'
perm = perm_var
[]
[temperature]
type = PorousFlowTemperature
[]
[massfrac]
type = PorousFlowMassFraction
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = Newton
type = Steady
l_tol = 1E-5
nl_abs_tol = 1E-3
nl_rel_tol = 1E-8
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
csv = true
execute_on = 'timestep_end'
[]
(test/tests/functions/parsed/vals_error.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./dummy1]
[../]
[]
[Problem]
kernel_coverage_check = false
[]
[Functions]
[./left_bc]
type = ParsedFunction
expression = dummy2
symbol_values = invalid
symbol_names = dummy2
[../]
[]
[Executioner]
type = Steady
[]
(test/tests/executioners/executioner/sln-time-adapt.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./dt]
type = TimestepSize
[../]
[]
[Executioner]
type = Transient
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.1
[../]
scheme = 'implicit-euler'
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_sta
exodus = true
[]
(test/tests/mortar/continuity-2d-non-conforming/soln-continuity.i)
[Mesh]
second_order = true
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[./primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[../]
[./secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[../]
[]
[Variables]
[./T]
block = '1 2'
order = SECOND
[../]
[./lambda]
block = '10'
[../]
[]
[BCs]
[./neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln
variable = T
boundary = '3 4 5 6 7 8'
[../]
[]
[Kernels]
[./conduction]
type = Diffusion
variable = T
block = '1 2'
[../]
[./sink]
type = Reaction
variable = T
block = '1 2'
[../]
[./forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[../]
[]
[Functions]
[./forcing_function]
type = ParsedFunction
expression= '-4 + x^2 + y^2'
[../]
[./exact_soln]
type = ParsedFunction
expression= 'x^2 + y^2'
[../]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[./mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
exodus = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
(test/tests/userobjects/toggle_mesh_adaptivity/toggle_mesh_adaptivity_gaussian_ic.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Variables]
[./u]
[../]
[]
[ICs]
[./gaussian_ic]
type = FunctionIC
variable = u
function = gaussian_2d
[../]
[]
[Functions]
[./gaussian_2d]
type = ParsedFunction
expression = exp(-((x-x0)*(x-x0)+(y-y0)*(y-y0))/2.0/sigma/sigma)
symbol_names = 'sigma x0 y0'
symbol_values = '0.05 0.35 0.25'
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.02
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./Periodic]
[./all]
variable = u
auto_direction = 'x y'
[../]
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Adaptivity]
initial_steps = 1
initial_marker = marker
cycles_per_step = 1
marker = marker
max_h_level = 2
[./Markers]
[./marker]
type = CircleMarker
point = '0.35 0.25 0'
radius = 0.2
inside = refine
outside = coarsen
[../]
[../]
[]
[UserObjects]
[./mesh_adaptivity_off]
type = ToggleMeshAdaptivity
mesh_adaptivity = 'off'
[../]
[]
[Outputs]
exodus = true
[./console]
type = Console
print_mesh_changed_info = true
[../]
[]
(modules/fsi/test/tests/2d-small-strain-transient/ad-fsi-flat-channel.i)
[GlobalParams]
displacements = 'disp_x disp_y'
order = FIRST
preset = false
use_displaced_mesh = true
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 3.0
ymin = 0
ymax = 1.0
nx = 10
ny = 15
elem_type = QUAD4
[]
[subdomain1]
type = SubdomainBoundingBoxGenerator
bottom_left = '0.0 0.5 0'
block_id = 1
top_right = '3.0 1.0 0'
input = gmg
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'master0_interface'
input = subdomain1
[]
[break_boundary]
type = BreakBoundaryOnSubdomainGenerator
input = interface
[]
[]
[Variables]
[vel]
block = 0
family = LAGRANGE_VEC
[]
[p]
block = 0
order = FIRST
[]
[disp_x]
[]
[disp_y]
[]
[vel_x_solid]
block = 1
[]
[vel_y_solid]
block = 1
[]
[]
[Kernels]
[mass]
type = INSADMass
variable = p
block = 0
[]
[mass_pspg]
type = INSADMassPSPG
variable = p
block = 0
[]
[momentum_time]
type = INSADMomentumTimeDerivative
variable = vel
block = 0
[]
[momentum_convection]
type = INSADMomentumAdvection
variable = vel
block = 0
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = vel
block = 0
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = vel
pressure = p
integrate_p_by_parts = true
block = 0
[]
[momentum_supg]
type = INSADMomentumSUPG
variable = vel
material_velocity = relative_velocity
block = 0
[]
[momentum_mesh]
type = INSADMomentumMeshAdvection
variable = vel
disp_x = 'disp_x'
disp_y = 'disp_y'
block = 0
[]
[disp_x_fluid]
type = Diffusion
variable = disp_x
block = 0
use_displaced_mesh = false
[]
[disp_y_fluid]
type = Diffusion
variable = disp_y
block = 0
use_displaced_mesh = false
[]
[accel_tensor_x]
type = CoupledTimeDerivative
variable = disp_x
v = vel_x_solid
block = 1
use_displaced_mesh = false
[]
[accel_tensor_y]
type = CoupledTimeDerivative
variable = disp_y
v = vel_y_solid
block = 1
use_displaced_mesh = false
[]
[vxs_time_derivative_term]
type = CoupledTimeDerivative
variable = vel_x_solid
v = disp_x
block = 1
use_displaced_mesh = false
[]
[vys_time_derivative_term]
type = CoupledTimeDerivative
variable = vel_y_solid
v = disp_y
block = 1
use_displaced_mesh = false
[]
[source_vxs]
type = MatReaction
variable = vel_x_solid
block = 1
mob_name = 1
use_displaced_mesh = false
[]
[source_vys]
type = MatReaction
variable = vel_y_solid
block = 1
mob_name = 1
use_displaced_mesh = false
[]
[]
[InterfaceKernels]
[penalty]
type = ADPenaltyVelocityContinuity
variable = vel
fluid_velocity = vel
displacements = 'disp_x disp_y'
solid_velocities = 'vel_x_solid vel_y_solid'
boundary = master0_interface
penalty = 1e6
[]
[]
[Modules/TensorMechanics/Master]
[solid_domain]
strain = SMALL
incremental = false
# generate_output = 'strain_xx strain_yy strain_zz' ## Not at all necessary, but nice
block = '1'
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e2
poissons_ratio = 0.3
block = '1'
use_displaced_mesh = false
[]
[small_stress]
type = ComputeLinearElasticStress
block = 1
[]
[const]
type = ADGenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '1 1'
[]
[ins_mat]
type = INSADTauMaterial
velocity = vel
pressure = p
block = 0
[]
[]
[BCs]
[fluid_bottom]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'bottom'
function_x = 0
function_y = 0
[]
[fluid_left]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'left_to_0'
function_x = 'inlet_func'
function_y = 0
# The displacements actually affect the result of the function evaluation so in order to eliminate the impact
# on the Jacobian we set 'use_displaced_mesh = false' here
use_displaced_mesh = false
[]
[no_disp_x]
type = DirichletBC
variable = disp_x
boundary = 'bottom top left_to_1 right_to_1 left_to_0 right_to_0'
value = 0
[]
[no_disp_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom top left_to_1 right_to_1 left_to_0 right_to_0'
value = 0
[]
[solid_x_no_slip]
type = DirichletBC
variable = vel_x_solid
boundary = 'top left_to_1 right_to_1'
value = 0.0
[]
[solid_y_no_slip]
type = DirichletBC
variable = vel_y_solid
boundary = 'top left_to_1 right_to_1'
value = 0.0
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = 5
# num_steps = 60
dt = 0.1
dtmin = 0.1
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = none
nl_rel_tol = 1e-50
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
[Functions]
[inlet_func]
type = ParsedFunction
expression = '(-16 * (y - 0.25)^2 + 1) * (1 + cos(t))'
[]
[]
(modules/contact/test/tests/adaptivity/contact_initial_adaptivity.i)
# This is a test of the usage of initial adaptivity with contact.
# It ensures that contact is enforced on the new nodes that are
# created due to refinement on the secondary side of the interface.
[GlobalParams]
volumetric_locking_correction = false
displacements = 'disp_x disp_y'
[]
[Mesh]
file = 2blocks.e
patch_size = 80
parallel_type = replicated
[]
[AuxVariables]
[./penetration]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./negramp]
type = ParsedFunction
expression = -t/10
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
strain = FINITE
[]
[]
[AuxKernels]
[./penetration]
type = PenetrationAux
variable = penetration
boundary = 3
paired_boundary = 2
[../]
[]
[Postprocessors]
[./nonlinear_its]
type = NumNonlinearIterations
execute_on = timestep_end
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./right_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = negramp
[../]
[./right_y]
type = DirichletBC
variable = disp_y
boundary = 4
value = 0.0
[../]
[]
[Materials]
[./stiffStuff1]
type = ComputeIsotropicElasticityTensor
block = '1 2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./stiffStuff1_stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[../]
[]
[Contact]
[./leftright]
secondary = 3
primary = 2
model = frictionless
penalty = 1e+6
normal_smoothing_distance = 0.1
[../]
[]
[Adaptivity]
steps = 0
marker = box
max_h_level = 2
initial_steps = 2
[./Markers]
[./box]
type = BoxMarker
bottom_left = '0.5 -2.0 0.0'
top_right = '0.75 2.0 0.0'
inside = refine
outside = do_nothing
[../]
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
line_search = 'none'
l_max_its = 100
nl_max_its = 1000
dt = 0.2
end_time = 1.0
l_tol = 1e-6
nl_rel_tol = 1e-12
nl_abs_tol = 1e-9
[]
[Outputs]
exodus = true
console = true
[]
(modules/solid_mechanics/test/tests/thermal_expansion/multiple_thermal_eigenstrains.i)
# The primary purpose of this test is to verify that the ability to combine
# multiple eigenstrains works correctly. It should behave identically to the
# constant_expansion_coeff.i model in this directory. Instead of applying the
# thermal expansion in one eigenstrain, it splits that into two eigenstrains
# that get added together.
# This test involves only thermal expansion strains on a 2x2x2 cube of approximate
# steel material. An initial temperature of 25 degrees C is given for the material,
# and an auxkernel is used to calculate the temperature in the entire cube to
# raise the temperature each time step. After the first timestep,in which the
# temperature jumps, the temperature increases by 6.25C each timestep.
# The thermal strain increment should therefore be
# 6.25 C * 1.3e-5 1/C = 8.125e-5 m/m.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxVariables]
[./temp]
[../]
[./strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./temperature_load]
type = ParsedFunction
expression = t*(500.0)+300.0
[../]
[]
[Kernels]
[SolidMechanics]
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = temperature_load
use_displaced_mesh = false
[../]
[./strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xx
index_i = 0
index_j = 0
[../]
[./strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 1
index_j = 1
[../]
[./strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_zz
index_i = 2
index_j = 2
[../]
[]
[BCs]
[./x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./z_bot]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./small_strain]
type = ComputeIncrementalSmallStrain
eigenstrain_names = 'eigenstrain1 eigenstrain2'
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain1]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 298
thermal_expansion_coeff = 1.0e-5
temperature = temp
eigenstrain_name = eigenstrain1
mean_thermal_expansion_coefficient_name = mean1
[../]
[./thermal_expansion_strain2]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 298
thermal_expansion_coeff = 0.3e-5
temperature = temp
eigenstrain_name = eigenstrain2
mean_thermal_expansion_coefficient_name = mean2
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
end_time = 0.075
dt = 0.0125
dtmin = 0.0001
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Postprocessors]
[./strain_xx]
type = ElementAverageValue
variable = strain_xx
block = 0
[../]
[./strain_yy]
type = ElementAverageValue
variable = strain_yy
block = 0
[../]
[./strain_zz]
type = ElementAverageValue
variable = strain_zz
block = 0
[../]
[./temperature]
type = AverageNodalVariableValue
variable = temp
block = 0
[../]
[]
(modules/solid_mechanics/test/tests/lagrangian/materials/convergence/cauchy-elastic.i)
# Simple 3D test
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 4
nz = 4
[]
[]
[ICs]
[disp_x]
type = RandomIC
variable = disp_x
min = -0.01
max = 0.01
[]
[disp_y]
type = RandomIC
variable = disp_y
min = -0.01
max = 0.01
[]
[disp_z]
type = RandomIC
variable = disp_z
min = -0.01
max = 0.01
[]
[]
[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
[]
[]
[Functions]
[pullx]
type = ParsedFunction
expression = '4000 * t'
[]
[pully]
type = ParsedFunction
expression = '-2000 * t'
[]
[pullz]
type = ParsedFunction
expression = '3000 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = left
variable = disp_y
value = 0.0
[]
[leftz]
type = DirichletBC
preset = true
boundary = left
variable = disp_z
value = 0.0
[]
[pull_x]
type = FunctionNeumannBC
boundary = right
variable = disp_x
function = pullx
[]
[pull_y]
type = FunctionNeumannBC
boundary = top
variable = disp_y
function = pully
[]
[pull_z]
type = FunctionNeumannBC
boundary = right
variable = disp_z
function = pullz
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'newton'
line_search = none
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
l_max_its = 2
l_tol = 1e-14
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 2.0
[]
(test/tests/mortar/continuity-2d-conforming/conforming.i)
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-conf.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Functions]
[./exact_sln]
type = ParsedFunction
expression= y
[../]
[./ffn]
type = ParsedFunction
expression= 0
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = ffn
[../]
[]
[Constraints]
[./ced]
type = EqualValueConstraint
variable = lm
secondary_variable = u
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '1 2 3 4'
function = exact_sln
[../]
[]
[Postprocessors]
[./l2_error]
type = ElementL2Error
variable = u
function = exact_sln
block = '1 2'
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
[./fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
l_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(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'
expression = '(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'
expression = '(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
[]
(test/tests/postprocessors/element_l1_error/element_l1_error.i)
# Tests the ElementL1Error post-processor.
#
# The Element L1 error is defined as follows:
# \sum\limits_i = int\limits_{\Omega_i} |y_{h,i} - y(x)| d\Omega
# where i is the element index and y_h is the approximate solution.
#
# This example uses 2 uniform elements on (0,10) with the following values:
# (0,5): y = 3, y_h = 5
# (5,10): y = 2, y_h = 6
# Thus the gold value is
# gold = 5*(5-3) + 5*(6-2) = 10 + 20 = 30
[Mesh]
type = GeneratedMesh
dim = 1
nx = 2
xmin = 0
xmax = 10
[]
[Variables]
[u]
order = CONSTANT
family = MONOMIAL
[]
[]
[ICs]
[u_ic]
type = FunctionIC
variable = u
function = u_ic_fn
[]
[]
[Functions]
[u_ic_fn]
type = ParsedFunction
expression = 'if(x<5,5,6)'
[]
[u_exact_fn]
type = ParsedFunction
expression = 'if(x<5,3,2)'
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Postprocessors]
[err]
type = ElementL1Error
variable = u
function = u_exact_fn
execute_on = 'initial'
[]
[]
[Outputs]
csv = true
execute_on = 'initial'
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/cp_eigenstrains/volumetric_eigenstrain_increase.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[cube]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
elem_type = HEX27
[]
[]
[AuxVariables]
[temperature]
order = FIRST
family = LAGRANGE
[]
[linear_void_strain]
order = CONSTANT
family = MONOMIAL
[]
[e_void_xx]
order = CONSTANT
family = MONOMIAL
[]
[e_void_yy]
order = CONSTANT
family = MONOMIAL
[]
[e_void_zz]
order = CONSTANT
family = MONOMIAL
[]
[f_void_zz]
order = CONSTANT
family = MONOMIAL
[]
[pk2_zz]
order = CONSTANT
family = MONOMIAL
[]
[fp_zz]
order = CONSTANT
family = MONOMIAL
[]
[tau_0]
order = FIRST
family = MONOMIAL
[]
[tau_10]
order = FIRST
family = MONOMIAL
[]
[]
[Physics/SolidMechanics/QuasiStatic/all]
strain = FINITE
incremental = true
add_variables = true
[]
[Functions]
[temperature_ramp]
type = ParsedFunction
expression = '600.0 + t'
[]
[]
[AuxKernels]
[temperature]
type = FunctionAux
variable = temperature
function = 'temperature_ramp'
execute_on = timestep_begin
[]
[linear_void_strain]
type = MaterialRealAux
variable = linear_void_strain
property = equivalent_linear_change
execute_on = timestep_end
[]
[e_void_xx]
type = RankTwoAux
variable = e_void_xx
rank_two_tensor = void_eigenstrain
index_j = 0
index_i = 0
execute_on = timestep_end
[]
[e_void_yy]
type = RankTwoAux
variable = e_void_yy
rank_two_tensor = void_eigenstrain
index_j = 1
index_i = 1
execute_on = timestep_end
[]
[e_void_zz]
type = RankTwoAux
variable = e_void_zz
rank_two_tensor = void_eigenstrain
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[f_void_zz]
type = RankTwoAux
variable = f_void_zz
rank_two_tensor = volumetric_deformation_gradient
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[pk2_zz]
type = RankTwoAux
variable = pk2_zz
rank_two_tensor = second_piola_kirchhoff_stress
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[fp_zz]
type = RankTwoAux
variable = fp_zz
rank_two_tensor = plastic_deformation_gradient
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[tau_0]
type = MaterialStdVectorAux
variable = tau_0
property = applied_shear_stress
index = 0
execute_on = timestep_end
[]
[tau_10]
type = MaterialStdVectorAux
variable = tau_10
property = applied_shear_stress
index = 10
execute_on = timestep_end
[]
[]
[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
[]
[hold_front]
type = DirichletBC
variable = disp_z
boundary = front
value = 0
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensorCP
C_ijkl = '1.98e5 1.25e5 1.25e5 1.98e5 1.25e5 1.98e5 1.22e5 1.22e5 1.22e5'
fill_method = symmetric9
[]
[stress]
type = ComputeMultipleCrystalPlasticityStress
crystal_plasticity_models = 'trial_xtalpl'
eigenstrain_names = void_eigenstrain
tan_mod_type = exact
line_search_method = CUT_HALF
use_line_search = true
maximum_substep_iteration = 5
[]
[trial_xtalpl]
type = CrystalPlasticityKalidindiUpdate
number_slip_systems = 12
slip_sys_file_name = input_slip_sys.txt
[]
[void_eigenstrain]
type = ComputeCrystalPlasticityVolumetricEigenstrain
eigenstrain_name = void_eigenstrain
deformation_gradient_name = volumetric_deformation_gradient
mean_spherical_void_radius = void_radius
spherical_void_number_density = void_density
[]
[void_density]
type = ParsedMaterial
property_name = void_density
coupled_variables = temperature
expression = '1.0e8 * (temperature - 600.0)'
[]
[void_radius]
type = GenericConstantMaterial
prop_names = void_radius
prop_values = '1.0e-6' ##1 nm avg particle radius
[]
[]
[Postprocessors]
[linear_void_strain]
type = ElementAverageValue
variable = linear_void_strain
[]
[e_void_xx]
type = ElementAverageValue
variable = e_void_xx
[]
[e_void_yy]
type = ElementAverageValue
variable = e_void_yy
[]
[e_void_zz]
type = ElementAverageValue
variable = e_void_zz
[]
[f_void_zz]
type = ElementAverageValue
variable = f_void_zz
[]
[density]
type = ElementAverageMaterialProperty
mat_prop = void_density
execute_on = TIMESTEP_END
[]
[radius]
type = ElementAverageMaterialProperty
mat_prop = void_radius
execute_on = TIMESTEP_END
[]
[pk2_zz]
type = ElementAverageValue
variable = pk2_zz
[]
[fp_zz]
type = ElementAverageValue
variable = fp_zz
[]
[tau_0]
type = ElementAverageValue
variable = tau_0
[]
[tau_10]
type = ElementAverageValue
variable = tau_10
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
line_search = 'none'
nl_abs_tol = 1e-12
nl_rel_tol = 1e-8
nl_forced_its = 1
dt = 1.0
dtmin = 0.1
end_time = 5.0
[]
[Outputs]
csv = true
perf_graph = true
[]
(test/tests/executioners/steady_time/steady_time.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
nx = 4
ny = 4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = time_function
[../]
[]
[Functions]
[./time_function]
type = ParsedFunction
expression = 't+1'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left right bottom top'
value = 0
[../]
[]
[Postprocessors]
[./norm]
type = ElementL2Norm
variable = u
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/nodal_var_value/screen_output_test.i)
[Mesh]
file = square-2x2-nodeids.e
# This test can only be run with renumering disabled, so the
# NodalVariableValue postprocessor's node id is well-defined.
allow_renumbering = false
[]
[Variables]
active = 'u v'
[./u]
order = SECOND
family = LAGRANGE
[../]
[./v]
order = SECOND
family = LAGRANGE
[../]
[]
[Functions]
active = 'force_fn exact_fn left_bc'
[./force_fn]
type = ParsedFunction
expression = '1-x*x+2*t'
[../]
[./exact_fn]
type = ParsedFunction
expression = '(1-x*x)*t'
[../]
[./left_bc]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
active = '
time_u diff_u ffn_u
time_v diff_v'
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'all_u left_v right_v'
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = exact_fn
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '2'
value = 0
[../]
[]
[Postprocessors]
active = 'l2 node1 node4'
[./l2]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./node1]
type = NodalVariableValue
variable = u
nodeid = 15
[../]
[./node4]
type = NodalVariableValue
variable = v
nodeid = 10
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[./console]
type = Console
max_rows = 2
[../]
[]
(test/tests/kernels/anisotropic_diffusion/aniso_diffusion.i)
[Mesh]
file = mixed_block.e
uniform_refine=3
[]
[Functions]
[./top_bc]
type = ParsedFunction
expression = 'x'
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = AnisotropicDiffusion
variable = u
tensor_coeff = '2 0 0
0 4 0
0 0 0'
[../]
[]
[BCs]
active = 'lower_left top'
[./lower_left]
type = DirichletBC
variable = u
boundary = '1 4'
value = 1
[../]
[./top]
type = FunctionNeumannBC
variable = u
boundary = 3
function = top_bc
[../]
[./right]
type = NeumannBC
variable = u
boundary = 2
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(test/tests/auxkernels/old_older_material_aux/old_mat_in_aux.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[AuxVariables]
[./aux]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./old_mat_aux]
type = OldMaterialAux
property_name = prop
variable = aux
[../]
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./func]
type = ParsedFunction
expression = t
[../]
[]
[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
[../]
[]
[Materials]
[./mat]
type = GenericFunctionMaterial
prop_names = prop
prop_values = func
block = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/examples/coal_mining/cosserat_mc_wp.i)
# Strata deformation and fracturing around a coal mine
#
# A 2D geometry is used that simulates a transverse section of
# the coal mine. The model is actually 3D, but the "x"
# dimension is only 10m long, meshed with 1 element, and
# there is no "x" displacement. The mine is 300m deep
# and just the roof is studied (0<=z<=300). The model sits
# between 0<=y<=450. The excavation sits in 0<=y<=150. This
# is a "half model": the boundary conditions are such that
# the model simulates an excavation sitting in -150<=y<=150
# inside a model of the region -450<=y<=450. The
# excavation height is 3m (ie, the excavation lies within
# 0<=z<=3). Mining is simulated by moving the excavation's
# roof down, until disp_z=-3 at t=1.
# Time is meaningless in this example
# as quasi-static solutions are sought at each timestep, but
# the number of timesteps controls the resolution of the
# process.
#
# The boundary conditions are:
# - disp_x = 0 everywhere
# - disp_y = 0 at y=0 and y=450
# - disp_z = 0 for y>150
# - disp_z = -3 at maximum, for 0<=y<=150. See excav function.
# That is, rollers on the sides, free at top, and prescribed at bottom.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa. The initial stress is consistent with
# the weight force from density 2500 kg/m^3, ie, stress_zz = -0.025*(300-z) MPa
# where gravity = 10 m.s^-2 = 1E-5 MPa m^2/kg. The maximum and minimum
# principal horizontal stresses are assumed to be equal to 0.8*stress_zz.
#
# Material properties:
# Young's modulus = 8 GPa
# Poisson's ratio = 0.25
# Cosserat layer thickness = 1 m
# Cosserat-joint normal stiffness = large
# Cosserat-joint shear stiffness = 1 GPa
# MC cohesion = 3 MPa
# MC friction angle = 37 deg
# MC dilation angle = 8 deg
# MC tensile strength = 1 MPa
# MC compressive strength = 100 MPa, varying down to 1 MPa when tensile strain = 1
# WeakPlane cohesion = 0.1 MPa
# WeakPlane friction angle = 30 deg
# WeakPlane dilation angle = 10 deg
# WeakPlane tensile strength = 0.1 MPa
# WeakPlane compressive strength = 100 MPa softening to 1 MPa at strain = 1
#
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
xmin = -5
xmax = 5
nz = 40
zmin = 0
zmax = 400.0
bias_z = 1.1
ny = 30 # make this a multiple of 3, so y=150 is at a node
ymin = 0
ymax = 450
[]
[left]
type = SideSetsAroundSubdomainGenerator
new_boundary = 11
normal = '0 -1 0'
input = generated_mesh
[]
[right]
type = SideSetsAroundSubdomainGenerator
new_boundary = 12
normal = '0 1 0'
input = left
[]
[front]
type = SideSetsAroundSubdomainGenerator
new_boundary = 13
normal = '-1 0 0'
input = right
[]
[back]
type = SideSetsAroundSubdomainGenerator
new_boundary = 14
normal = '1 0 0'
input = front
[]
[top]
type = SideSetsAroundSubdomainGenerator
new_boundary = 15
normal = '0 0 1'
input = back
[]
[bottom]
type = SideSetsAroundSubdomainGenerator
new_boundary = 16
normal = '0 0 -1'
input = top
[]
[excav]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '-5 0 0'
top_right = '5 150 3'
input = bottom
[]
[roof]
type = SideSetsBetweenSubdomainsGenerator
new_boundary = 21
primary_block = 0
paired_block = 1
input = excav
[]
[hole]
type = BlockDeletionGenerator
block = 1
input = roof
[]
[]
[GlobalParams]
block = 0
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
[]
[Variables]
[./disp_y]
[../]
[./disp_z]
[../]
[./wc_x]
[../]
[]
[Kernels]
[./cy_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_y
component = 1
[../]
[./cz_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_z
component = 2
[../]
[./x_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[../]
[./x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[../]
[./gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./wc_y]
[../]
[./wc_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./mc_shear]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_internal_parameter
variable = mc_shear
[../]
[./mc_tensile]
type = MaterialStdVectorAux
index = 1
property = mc_plastic_internal_parameter
variable = mc_tensile
[../]
[./wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
[../]
[./wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
[../]
[./mc_shear_f]
type = MaterialStdVectorAux
index = 6
property = mc_plastic_yield_function
variable = mc_shear_f
[../]
[./mc_tensile_f]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_yield_function
variable = mc_tensile_f
[../]
[./wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
[../]
[./wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
[../]
[]
[BCs]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '11 12 16 21' # note addition of 16 and 21
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '16'
value = 0.0
[../]
[./no_wc_x]
type = DirichletBC
variable = wc_x
boundary = '11 12'
value = 0.0
[../]
[./roof]
type = FunctionDirichletBC
variable = disp_z
boundary = 21
function = excav_sideways
[../]
[]
[Functions]
[./ini_xx]
type = ParsedFunction
expression = '-0.8*2500*10E-6*(400-z)'
[../]
[./ini_zz]
type = ParsedFunction
expression = '-2500*10E-6*(400-z)'
[../]
[./excav_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax e_h closure_dist'
symbol_values = '1.0 0 150.0 -3.0 15.0'
expression = 'e_h*max(min((min(t/end_t,1)*(ymax-ymin)+ymin-y)/closure_dist,1),0)'
[../]
[./excav_downwards]
type = ParsedFunction
symbol_names = 'end_t ymin ymax e_h closure_dist'
symbol_values = '1.0 0 150.0 -3.0 15.0'
expression = 'e_h*min(t/end_t,1)*max(min(((ymax-ymin)+ymin-y)/closure_dist,1),0)'
[../]
[]
[UserObjects]
[./mc_coh_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 2.99 # MPa
value_residual = 3.01 # MPa
rate = 1.0
[../]
[./mc_fric]
type = SolidMechanicsHardeningConstant
value = 0.65 # 37deg
[../]
[./mc_dil]
type = SolidMechanicsHardeningConstant
value = 0.15 # 8deg
[../]
[./mc_tensile_str_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.0 # MPa
rate = 1.0
[../]
[./mc_compressive_str]
type = SolidMechanicsHardeningCubic
value_0 = 100 # Large!
value_residual = 100
internal_limit = 0.1
[../]
[./wp_coh_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_tan_fric]
type = SolidMechanicsHardeningConstant
value = 0.36 # 20deg
[../]
[./wp_tan_dil]
type = SolidMechanicsHardeningConstant
value = 0.18 # 10deg
[../]
[./wp_tensile_str_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_compressive_str_soften]
type = SolidMechanicsHardeningCubic
value_0 = 100
value_residual = 1
internal_limit = 1.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeLayeredCosseratElasticityTensor
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3
[../]
[./strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[../]
[./ini_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
eigenstrain_name = ini_stress
[../]
[./stress]
type = ComputeMultipleInelasticCosseratStress
block = 0
inelastic_models = 'mc wp'
cycle_models = true
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./mc]
type = CappedMohrCoulombCosseratStressUpdate
block = 0
warn_about_precision_loss = false
host_youngs_modulus = 8E3
host_poissons_ratio = 0.25
base_name = mc
tensile_strength = mc_tensile_str_strong_harden
compressive_strength = mc_compressive_str
cohesion = mc_coh_strong_harden
friction_angle = mc_fric
dilation_angle = mc_dil
max_NR_iterations = 10000
smoothing_tol = 0.1 # MPa # Must be linked to cohesion
yield_function_tol = 1E-9 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[../]
[./wp]
type = CappedWeakPlaneCosseratStressUpdate
block = 0
warn_about_precision_loss = false
base_name = wp
cohesion = wp_coh_harden
tan_friction_angle = wp_tan_fric
tan_dilation_angle = wp_tan_dil
tensile_strength = wp_tensile_str_harden
compressive_strength = wp_compressive_str_soften
max_NR_iterations = 10000
tip_smoother = 0.1
smoothing_tol = 0.1 # MPa # Note, this must be tied to cohesion, otherwise get no possible return at cone apex
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[../]
[./density]
type = GenericConstantMaterial
prop_names = density
prop_values = 2500
[../]
[]
[Postprocessors]
[./subsidence]
type = PointValue
point = '0 0 400'
variable = disp_z
use_displaced_mesh = false
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
line_search = bt
nl_abs_tol = 1e-3
nl_rel_tol = 1e-5
l_max_its = 30
nl_max_its = 1000
start_time = 0.0
dt = 0.2
end_time = 0.2
[]
[Outputs]
file_base = cosserat_mc_wp
time_step_interval = 1
print_linear_residuals = false
csv = true
exodus = true
[./console]
type = Console
output_linear = false
[../]
[]
(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/richards/test/tests/dirac/bh_fu_07.i)
#fullyupwind
[Mesh]
type = FileMesh
file = bh07_input.e
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = DensityConstBulk
relperm_UO = RelPermPower
sat_UO = Saturation
seff_UO = Seff1VG
SUPG_UO = SUPGstandard
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1000 10000'
x = '100 1000'
[../]
[]
[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
[../]
[]
[BCs]
[./fix_outer]
type = DirichletBC
boundary = perimeter
variable = pressure
value = 1E7
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFullyUpwindFlux
variable = pressure
[../]
[]
[DiracKernels]
[./bh]
type = RichardsBorehole
bottom_pressure = 0
point_file = bh07.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pressure
unit_weight = '0 0 0'
re_constant = 0.1594
character = 2
fully_upwind = true
[../]
[]
[Postprocessors]
[./bh_report]
type = RichardsPlotQuantity
uo = borehole_total_outflow_mass
execute_on = 'initial timestep_end'
[../]
[./fluid_mass]
type = RichardsMass
variable = pressure
execute_on = 'initial timestep_end'
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 1E7
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = 1
viscosity = 1E-3
mat_porosity = 0.1
mat_permeability = '1E-11 0 0 0 1E-11 0 0 0 1E-11'
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 = 1000
solve_type = NEWTON
[./TimeStepper]
# get only marginally better results for smaller time steps
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = bh_fu_07
execute_on = 'initial timestep_end final'
time_step_interval = 10000
exodus = true
[]
(modules/heat_transfer/test/tests/code_verification/cartesian_test_no3.i)
# Problem I.3
#
# The thermal conductivity of an infinite plate varies linearly with
# temperature: k = ko(1+beta*u). It has a constant internal heat generation q,
# and has the boundary conditions du/dx = 0 at x= L and u(L) = uo.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
nx = 4
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Functions]
[./exact]
type = ParsedFunction
symbol_names = 'q L beta uo ko'
symbol_values = '1200 1 1e-3 0 1'
expression = 'uo+(1/beta)*( ( 1 + (1-(x/L)^2) * (beta*q*L^2) / ko )^0.5 - 1)'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[./heatsource]
type = HeatSource
function = 1200
variable = u
[../]
[]
[BCs]
[./ui]
type = NeumannBC
boundary = left
variable = u
value = 0
[../]
[./uo]
type = DirichletBC
boundary = right
variable = u
value = 0
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat'
prop_values = '1.0 1.0'
[../]
[./thermal_conductivity]
type = ParsedMaterial
property_name = 'thermal_conductivity'
coupled_variables = u
expression = '1 * (1 + 1e-3*u)'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/RZ_cone_by_parts.i)
# This input file tests several different things:
# .) The axisymmetric (RZ) form of the governing equations.
# .) An open boundary.
# .) Integrating the pressure by parts.
# .) Natural boundary condition at the outlet.
[GlobalParams]
gravity = '0 0 0'
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = Newton
[../]
[]
[Executioner]
type = Transient
dt = 0.005
dtmin = 0.005
num_steps = 5
l_max_its = 100
# Note: The Steady executioner can be used for this problem, if you
# drop the INSMomentumTimeDerivative kernels and use the following
# direct solver options.
# petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -ksp_type'
# petsc_options_value = 'lu NONZERO 1.e-10 preonly'
# Block Jacobi works well for this problem, as does "-pc_type asm
# -pc_asm_overlap 2", but an overlap of 1 does not work for some
# reason?
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Variables]
[./vel_x]
# Velocity in radial (r) direction
family = LAGRANGE
order = SECOND
[../]
[./vel_y]
# Velocity in axial (z) direction
family = LAGRANGE
order = SECOND
[../]
[./p]
family = LAGRANGE
order = FIRST
[../]
[]
[BCs]
[./u_in]
type = DirichletBC
boundary = bottom
variable = vel_x
value = 0
[../]
[./v_in]
type = FunctionDirichletBC
boundary = bottom
variable = vel_y
function = 'inlet_func'
[../]
[./u_axis_and_walls]
type = DirichletBC
boundary = 'left right'
variable = vel_x
value = 0
[../]
[./v_no_slip]
type = DirichletBC
boundary = 'right'
variable = vel_y
value = 0
[../]
[]
[Kernels]
[./x_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_x
[../]
[./y_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_y
[../]
[./mass]
type = INSMassRZ
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 'volume'
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
outputs = 'console' execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
outputs = 'console' execute_on = 'timestep_end'
[../]
[]
(modules/navier_stokes/test/tests/finite_volume/fvbcs/FVFunctorHeatFluxBC/wall_heat_transfer.i)
flux=10
[GlobalParams]
porosity = 'porosity'
splitting = 'porosity'
locality = 'global'
average_porosity = 'average_eps'
average_k_fluid='average_k_fluid'
average_k_solid='average_k_solid'
average_kappa='average_k_fluid' # because of vector matprop, should be kappa
average_kappa_solid='average_kappa_solid'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 20
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
[]
[Variables]
[Tf]
type = MooseVariableFVReal
[]
[Ts]
type = MooseVariableFVReal
[]
[]
[AuxVariables]
[k]
type = MooseVariableFVReal
[]
[kappa]
type = MooseVariableFVReal
[]
[k_s]
type = MooseVariableFVReal
[]
[kappa_s]
type = MooseVariableFVReal
[]
[porosity]
type = MooseVariableFVReal
initial_condition = 0.2
[]
[]
[Functions]
[k_function]
type = ParsedFunction
expression = 0.1*(100*y+1)
[]
[kappa_function]
type = ParsedFunction
expression = 0.2*(200*y+1)
[]
[kappa_s_function]
type = ParsedFunction
expression = 0.4*(200*y+1)
[]
[k_s_function]
type = ParsedFunction
expression = 0.2*(200*y+1)+2*x
[]
[]
[FVKernels]
[Tf_diffusion]
type = FVDiffusion
variable = Tf
coeff = 1
[]
[Ts_diffusion]
type = FVDiffusion
variable = Ts
coeff = 1
[]
[]
[FVBCs]
[left_Ts]
type = NSFVFunctorHeatFluxBC
variable = Ts
boundary = 'left'
phase = 'solid'
value = ${flux}
k = 'k_mat'
k_s = 'k_s_mat'
kappa = 'kappa_mat'
kappa_s = 'kappa_s_mat'
[]
[right_Ts]
type = FVDirichletBC
variable = Ts
boundary = 'right'
value = 1000.0
[]
[left_Tf]
type = NSFVFunctorHeatFluxBC
variable = Tf
boundary = 'left'
phase = 'fluid'
value = ${flux}
k = 'k_mat'
k_s = 'k_s_mat'
kappa = 'kappa_mat'
kappa_s = 'kappa_s_mat'
[]
[right_Tf]
type = FVDirichletBC
variable = Tf
boundary = 'right'
value = 1000.0
[]
[]
[AuxKernels]
[k]
type = FunctorAux
variable = k
functor = 'k_mat'
[]
[k_s]
type = FunctorAux
variable = k_s
functor = 'k_s_mat'
[]
[kappa_s]
type = FunctorAux
variable = kappa_s
functor = 'kappa_s_mat'
[]
[]
[FunctorMaterials]
[thermal_conductivities_k]
type = ADGenericFunctorMaterial
prop_names = 'k_mat'
prop_values = 'k_function'
[]
[thermal_conductivities_k_s]
type = ADGenericFunctorMaterial
prop_names = 'k_s_mat'
prop_values = 'k_s_function'
[]
[thermal_conductivities_kappa]
type = ADGenericVectorFunctorMaterial
prop_names = 'kappa_mat'
prop_values = '0.1 0.2 .03'
[]
[thermal_conductivities_kappa_s]
type = ADGenericFunctorMaterial
prop_names = 'kappa_s_mat'
prop_values = 'kappa_s_function'
[]
[]
[Postprocessors]
[average_eps]
type = ElementAverageValue
variable = porosity
# because porosity is constant in time, we evaluate this only once
execute_on = 'initial'
[]
[average_k_fluid]
type = ElementAverageValue
variable = k
[]
[average_k_solid]
type = ElementAverageValue
variable = k_s
[]
[average_kappa_solid]
type = ElementAverageValue
variable = kappa_s
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
hide = 'porosity average_eps'
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure_3d/test.i)
[GlobalParams]
scaling_factor_1phase = '1. 1.e-2 1.e-4'
scaling_factor_temperature = 1e-2
initial_from_file = 'steady_state_out.e'
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
[]
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '16 356 6.5514e3'
[]
[]
[Functions]
[Ts_bc]
type = ParsedFunction
expression = '2*sin(x*pi/2)+2*sin(pi*y) +507'
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = fp
# geometry
position = '-1 0 -2.5'
orientation = '1 0 0'
length = 2
n_elems = 2
A = 0.3
D_h = 0.1935483871
f = 0.1
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe:in'
m_dot = 0.1
T = 500
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = 6e6
[]
[ht]
type = HeatTransferFromHeatStructure3D1Phase
flow_channels = 'pipe'
hs = blk
boundary = blk:right
P_hf = 3
Hw = 1000
[]
[blk]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
[]
[right_bnd]
type = HSBoundarySpecifiedTemperature
hs = blk
boundary = blk:bottom
T = Ts_bc
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 1
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
[]
[Outputs]
exodus = true
execute_on = 'initial'
[]
(modules/peridynamics/test/tests/auxkernels/planestrain_thermomechanics_stretch_H1NOSPD.i)
[GlobalParams]
displacements = 'disp_x disp_y'
temperature = temp
[]
[Mesh]
type = PeridynamicsMesh
horizon_number = 3
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 6
ny = 6
[../]
[./gpd]
type = MeshGeneratorPD
input = gmg
retain_fe_mesh = false
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[AuxVariables]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[./total_stretch]
order = CONSTANT
family = MONOMIAL
[../]
[./mechanical_stretch]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Modules/Peridynamics/Mechanics/Master]
[./all]
formulation = NONORDINARY_STATE
stabilization = BOND_HORIZON_I
eigenstrain_names = thermal_strain
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
use_displaced_mesh = false
[../]
[./total_stretch]
type = MaterialRealAux
variable = total_stretch
property = total_stretch
[../]
[./mechanical_stretch]
type = MaterialRealAux
variable = mechanical_stretch
property = mechanical_stretch
[../]
[]
[Functions]
[./tempfunc]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
boundary = 1003
preset = false
variable = disp_x
value = 0.0
[../]
[./bottom_y]
type = DirichletBC
boundary = 1000
preset = false
variable = disp_y
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
poissons_ratio = 0.3
youngs_modulus = 1e6
[../]
[./strain]
type = ComputePlaneSmallStrainNOSPD
stabilization = BOND_HORIZON_I
eigenstrain_names = thermal_strain
plane_strain = true
[../]
[./thermal_strain]
type = ComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 0.0002
stress_free_temperature = 0.0
eigenstrain_name = thermal_strain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
l_tol = 1e-8
nl_rel_tol = 1e-10
start_time = 0.0
end_time = 1.0
[./Quadrature]
type = GAUSS_LOBATTO
order = FIRST
[../]
[]
[Outputs]
exodus = true
file_base = planestrain_thermomechanics_stretch_H1NOSPD
[]
(modules/navier_stokes/test/tests/finite_element/ins/rz-x-axial-coord/hand-coded-jac-pipe-flow.i)
mu=1
rho=1
pipe_length=10 # m
pipe_radius=1 # m
u_inlet=1
[GlobalParams]
integrate_p_by_parts = false
supg = true
pspg = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${pipe_length}
ymin = 0
ymax = ${pipe_radius}
nx = 50
ny = 5
[]
coord_type = 'RZ'
rz_coord_axis = x
[]
[Variables]
[velocity_x]
family = LAGRANGE
[]
[velocity_y]
family = LAGRANGE
[]
[p][]
[]
[Kernels]
[mass]
type = INSMassRZ
variable = p
u = velocity_x
v = velocity_y
pressure = p
[]
[x_momentum]
type = INSMomentumLaplaceFormRZ
variable = velocity_x
u = velocity_x
v = velocity_y
pressure = p
component = 0
[]
[y_momentum]
type = INSMomentumLaplaceFormRZ
variable = velocity_y
u = velocity_x
v = velocity_y
pressure = p
component = 1
[]
[]
[Functions]
[vel_x_inlet]
type = ParsedFunction
expression = '${u_inlet} * (${pipe_radius}^2 - y^2)'
[]
[]
[BCs]
[inlet_x]
type = FunctionDirichletBC
variable = velocity_x
boundary = 'left'
function = vel_x_inlet
[]
[zero_y]
type = FunctionDirichletBC
variable = velocity_y
boundary = 'left top bottom'
function = 0
[]
[zero_x]
type = FunctionDirichletBC
variable = velocity_x
boundary = 'top'
function = 0
[]
# pressure is not integrated by parts so we cannot remove the nullspace through a natural condition
[p_corner]
type = DirichletBC
boundary = 'right'
value = 0
variable = p
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
line_search = 'none'
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/power_law_hardening/ADPowerLawHardening.i)
# This is a test of the isotropic power law hardening constitutive model.
# In this problem, a single Hex 8 element is fixed at the bottom and pulled at the top
# at a constant rate of 0.1.
# Before yield, stress = strain (=0.1*t) as youngs modulus is 1.0.
# The yield stress for this problem is 0.25 ( as strength coefficient is 0.5 and strain rate exponent is 0.5).
# Therefore, the material should start yielding at t = 2.5 seconds and then follow stress = K *pow(strain,n) or
# stress ~ 0.5*pow(0.1*t,0.5).
#
# This tensor mechanics version of the power law hardening plasticity model matches
# the solid mechanics version for this toy problem under exodiff limits
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[Mesh]
type = GeneratedMesh
dim = 3
[]
[AuxVariables]
[total_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[top_pull]
type = ParsedFunction
expression = t*(0.1)
[]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = true
strain = SMALL
incremental = true
generate_output = 'stress_yy'
use_automatic_differentiation = true
[]
[]
[AuxKernels]
[total_strain_yy]
type = ADRankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yy
index_i = 1
index_j = 1
[]
[]
[BCs]
[y_pull_function]
type = ADFunctionDirichletBC
variable = disp_y
boundary = top
function = top_pull
[]
[x_bot]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[y_bot]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[z_bot]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1.0
poissons_ratio = 0.3
[]
[power_law_hardening]
type = ADIsotropicPowerLawHardeningStressUpdate
strength_coefficient = 0.5 #K
strain_hardening_exponent = 0.5 #n
[]
[radial_return_stress]
type = ADComputeMultipleInelasticStress
inelastic_models = 'power_law_hardening'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-ksp_snes_ew'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 4'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
end_time = 5.0
dt = 0.25
[]
[Postprocessors]
[stress_yy]
type = ElementAverageValue
variable = stress_yy
[]
[strain_yy]
type = ElementAverageValue
variable = total_strain_yy
[]
[]
[Outputs]
[out]
type = Exodus
elemental_as_nodal = true
file_base = PowerLawHardening_out
[]
[]
(test/tests/mortar/continuity-3d-non-conforming/continuity_tet.i)
[Mesh]
second_order = false
[left_block]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 2
nz = 2
xmin = 0
xmax = 0.3
ymin = 0
ymax = .5
zmin = 0
zmax = .5
elem_type = TET4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'lb_bottom lb_back lb_right lb_front lb_left lb_top'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 2
nz = 2
xmin = 0.3
xmax = 0.6
ymin = 0
ymax = .5
zmin = 0
zmax = .5
elem_type = TET4
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block
subdomain_id = 2
[]
[right_block_change_boundary_id]
type = RenameBoundaryGenerator
input = right_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'left_block right_block'
[]
[right_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = rb_right
block = right_block
normal = '1 0 0'
[]
[right_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_right_sideset
new_boundary = rb_left
block = right_block
normal = '-1 0 0'
[]
[right_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_left_sideset
new_boundary = rb_top
block = right_block
normal = '0 0 1'
[]
[right_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_top_sideset
new_boundary = rb_bottom
block = right_block
normal = '0 0 -1'
[]
[right_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_bottom_sideset
new_boundary = rb_front
block = right_block
normal = '0 1 0'
[]
[right_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_front_sideset
new_boundary = rb_back
block = right_block
normal = '0 -1 0'
[]
[secondary]
input = right_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'lb_right'
new_block_id = '12'
new_block_name = 'secondary'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'rb_left'
new_block_id = '11'
new_block_name = 'primary'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[T]
block = '1 2'
order = FIRST
[]
[lambda]
block = 'secondary'
family = MONOMIAL
order = CONSTANT
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln_primal
variable = T
boundary = 'lb_back lb_front lb_left lb_top lb_bottom rb_right rb_top rb_bottom rb_front rb_back'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi) + 3*pi^2*sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_primal]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_lambda]
type = ParsedFunction
expression = 'pi*sin(pi*y)*sin(pi*z)*cos(pi*x)'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = EqualValueConstraint
primary_boundary = 'rb_left'
secondary_boundary = 'lb_right'
primary_subdomain = '11'
secondary_subdomain = '12'
variable = lambda
secondary_variable = T
delta = .1
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[L2lambda]
type = ElementL2Error
variable = lambda
function = exact_soln_lambda
execute_on = 'timestep_end'
block = 'secondary'
[]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = 'left_block right_block'
[]
[h]
type = AverageElementSize
block = 'left_block right_block'
[]
[]
(test/tests/transfers/general_field/user_object/duplicated_user_object_tests/tosub_displaced_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 8
xmax = 0.1
ymax = 0.5
displacements = 'disp_x disp_y'
coord_type = rz
[]
[Variables]
[u]
initial_condition = 1
[]
[]
[AuxVariables]
[multi_layered_average]
[]
[element_multi_layered_average]
order = CONSTANT
family = MONOMIAL
[]
[disp_x]
initial_condition = 0.0
[]
[disp_y]
initial_condition = 0.5
[]
[]
[Functions]
[axial_force]
type = ParsedFunction
expression = 1000*y
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[force]
type = BodyForce
variable = u
function = axial_force
[]
[]
[BCs]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.001
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(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/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/karthik-eg-1.i)
[Mesh]
type = GeneratedMesh
elem_type = HEX8
dim = 3
nz = 10
xmax = 10
ymax = 10
zmax = 100
[]
[Variables]
[./x_disp]
block = 0
[../]
[./y_disp]
block = 0
[../]
[./z_disp]
block = 0
[../]
[]
[SolidMechanics]
[./solid]
# disp_x = x_disp
# disp_y = y_disp
# disp_z = z_disp
displacements = 'disp_x disp_y disp_z'
[../]
[]
[Materials]
active = 'fcrysp'
[./felastic]
type = FiniteStrainElasticMaterial
block = 0
fill_method = symmetric9
disp_x = x_disp
disp_y = y_disp
disp_z = z_disp
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
[../]
[./fcrysp]
type = FiniteStrainCrystalPlasticity
block = 0
disp_y = y_disp
disp_x = x_disp
disp_z = z_disp
flowprops = '1 12 0.001 0.1'
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
nss = 12
hprops = '1.0 541.5 60.8 109.8'
gprops = '1 12 60.8'
fill_method = symmetric9
slip_sys_file_name = input_slip_sys.txt
[../]
[]
[Functions]
[./topdisp]
type = ParsedFunction
expression = 0.7*t
[../]
[./tpress]
type = ParsedFunction
expression = -200*t
[../]
[]
[BCs]
[./zbc]
type = DirichletBC
variable = z_disp
boundary = back
value = 0
[../]
[./ybc]
type = DirichletBC
variable = y_disp
boundary = bottom
value = 0
[../]
[./xbc]
type = DirichletBC
variable = x_disp
boundary = left
value = 0
[../]
[./zmove]
type = FunctionDirichletBC
variable = z_disp
boundary = front
function = topdisp
[../]
[]
[AuxVariables]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./e_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[]
[AuxKernels]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 3
index_j = 3
execute_on = timestep_end
block = 0
[../]
[./e_zz]
type = RankTwoAux
rank_two_tensor = lage
variable = e_zz
index_i = 3
index_j = 3
execute_on = timestep_end
block = 0
[../]
[]
[Postprocessors]
[./szz]
type = ElementAverageValue
variable = stress_zz
block = 'ANY_BLOCK_ID 0'
[../]
[./ezz]
type = ElementAverageValue
variable = e_zz
block = 'ANY_BLOCK_ID 0'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
num_steps = 1000
end_time = 1
dt = 0.02
dtmax = 0.02
dtmin = 0.02
type = Transient
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = -pc_hypre_type
petsc_options_value = boomerang
nl_abs_tol = 1e-08
nl_rel_step_tol = 1e-08
nl_abs_step_tol = 1e-08
abort_on_solve_fail = true
n_startup_steps = 0.0
[]
[Outputs]
file_base = out
exodus = true
csv = true
[]
(test/tests/nodalkernels/high_order_time_integration/high_order_time_integration.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[./v]
[../]
[]
[AuxVariables]
[./exact_solution]
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[NodalKernels]
[./td]
type = TimeDerivativeNodalKernel
variable = v
[../]
[./f]
type = UserForcingFunctionNodalKernel
variable = v
function = t*t*t+4
[../]
[]
[AuxKernels]
[./exact]
type = FunctionAux
variable = exact_solution
function = exact_solution_function
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Functions]
[./exact_solution_function]
type = ParsedFunction
expression = (1.0/4.0)*(16*t+t*t*t*t)
[../]
[]
[Postprocessors]
[./error]
type = NodalL2Error
variable = v
function = exact_solution_function
[../]
[]
[Executioner]
type = Transient
end_time = 10
dt = 1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
scheme = 'crank-nicolson'
[]
[Outputs]
exodus = true
[]
(test/tests/functions/constant_function/constant_function_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 4
ny = 4
elem_type = QUAD4
[]
[Functions]
[./bc_fn]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[./icfn]
type = ConstantFunction
value = 1
[../]
[./ffn]
type = ConstantFunction
value = -4
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = icfn
[../]
[../]
[]
[Kernels]
# Coupling of nonlinear to Aux
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = ffn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = bc_fn
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/action/ad_converter_action_multi_eigenstrain.i)
# This tests the thermal expansion coefficient function using both
# options to specify that function: mean and instantaneous. There
# two blocks, each containing a single element, and these use the
# two variants of the function.
# In this test, the instantaneous CTE function has a constant value,
# while the mean CTE function is an analytic function designed to
# give the same response. If \bar{alpha}(T) is the mean CTE function,
# and \alpha(T) is the instantaneous CTE function,
# \bar{\alpha}(T) = 1/(T-Tref) \intA^{T}_{Tsf} \alpha(T) dT
# where Tref is the reference temperature used to define the mean CTE
# function, and Tsf is the stress-free temperature.
# This version of the test uses finite deformation theory.
# The two models produce very similar results. There are slight
# differences due to the large deformation treatment.
[Mesh]
file = 'blocks.e'
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[]
[Problem]
solve = false
[]
[Physics/SolidMechanics/QuasiStatic]
[./block1]
block = 1
strain = FINITE
add_variables = true
automatic_eigenstrain_names = true
generate_output = 'strain_xx strain_yy strain_zz'
use_automatic_differentiation = true
[../]
[./block2]
block = 2
strain = FINITE
add_variables = true
automatic_eigenstrain_names = true
generate_output = 'strain_xx strain_yy strain_zz'
use_automatic_differentiation = true
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = disp_x
boundary = 3
value = 0.0
[../]
[./bottom]
type = DirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[./back]
type = DirichletBC
variable = disp_z
boundary = 1
value = 0.0
[../]
[]
[AuxKernels]
[./temp]
type = FunctionAux
variable = temp
block = '1 2'
function = temp_func
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./small_stress]
type = ADComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain1]
type = ComputeMeanThermalExpansionFunctionEigenstrain
block = 1
thermal_expansion_function = cte_func_mean
thermal_expansion_function_reference_temperature = 0.5
stress_free_temperature = 0.0
temperature = temp
eigenstrain_name = reg_eigenstrain1
[../]
[./converter1]
type = RankTwoTensorMaterialADConverter
block = 1
reg_props_in = 'reg_eigenstrain1'
ad_props_out = 'eigenstrain1'
[../]
[./thermal_expansion_strain2]
type = ADComputeInstantaneousThermalExpansionFunctionEigenstrain
block = 2
thermal_expansion_function = cte_func_inst
stress_free_temperature = 0.0
temperature = temp
eigenstrain_name = eigenstrain2
[../]
[]
[Functions]
[./cte_func_mean]
type = ParsedFunction
symbol_names = 'tsf tref scale' #stress free temp, reference temp, scale factor
symbol_values = '0.0 0.5 1e-4'
expression = 'scale * (t - tsf) / (t - tref)'
[../]
[./cte_func_inst]
type = PiecewiseLinear
xy_data = '0 1.0
2 1.0'
scale_factor = 1e-4
[../]
[./temp_func]
type = PiecewiseLinear
xy_data = '0 1
1 2'
[../]
[]
[Postprocessors]
[./disp_1]
type = NodalExtremeValue
variable = disp_x
boundary = 101
[../]
[./disp_2]
type = NodalExtremeValue
variable = disp_x
boundary = 102
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
l_max_its = 100
l_tol = 1e-4
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
start_time = 0.0
end_time = 1.0
dt = 0.1
[]
(modules/porous_flow/examples/fluidflower/fluidflower.i)
# FluidFlower International Benchmark study model
# CSIRO 2023
#
# This example can be used to reproduce the results presented by the
# CSIRO team as part of this benchmark study. See
# Green, C., Jackson, S.J., Gunning, J., Wilkins, A. and Ennis-King, J.,
# 2023. Modelling the FluidFlower: Insights from Characterisation and
# Numerical Predictions. Transport in Porous Media.
#
# This example takes a long time to run! The large density contrast
# between the gas phase CO2 and the water makes convergence very hard,
# so small timesteps must be taken during injection.
#
# This example uses a simplified mesh in order to be run during the
# automated testing. To reproduce the results of the benchmark study,
# replace the simple layered input mesh with the one located in the
# large_media submodule.
#
# The mesh file contains:
# - porosity as given by FluidFlower description
# - permeability as given by FluidFlower description
# - subdomain ids for each sand type
#
# The nominal thickness of the FluidFlower tank is 19mm. To keep masses consistent
# with the experiment, porosity and permeability are multiplied by the thickness
thickness = 0.019
#
# Properties associated with each sand type associated with mesh block ids
#
# block 0 - ESF (very fine sand)
sandESF = '0 10 20'
sandESF_pe = 1471.5
sandESF_krg = 0.09
sandESF_swi = 0.32
sandESF_krw = 0.71
sandESF_sgi = 0.14
# block 1 - C - Coarse lower
sandC = '1 21'
sandC_pe = 294.3
sandC_krg = 0.05
sandC_swi = 0.14
sandC_krw = 0.93
sandC_sgi = 0.1
# block 2 - D - Coarse upper
sandD = '2 22'
sandD_pe = 98.1
sandD_krg = 0.02
sandD_swi = 0.12
sandD_krw = 0.95
sandD_sgi = 0.08
# block 3 - E - Very Coarse lower
sandE = '3 13 23'
sandE_pe = 10
sandE_krg = 0.1
sandE_swi = 0.12
sandE_krw = 0.93
sandE_sgi = 0.06
# block 4 - F - Very Coarse upper
sandF = '4 14 24 34'
sandF_pe = 10
sandF_krg = 0.11
sandF_swi = 0.12
sandF_krw = 0.72
sandF_sgi = 0.13
# block 5 - G - Flush Zone
sandG = '5 15 35'
sandG_pe = 10
sandG_krg = 0.16
sandG_swi = 0.1
sandG_krw = 0.75
sandG_sgi = 0.06
# block 6 - Fault 1 - Heterogeneous
fault1 = '6 26'
fault1_pe = 10
fault1_krg = 0.16
fault1_swi = 0.1
fault1_krw = 0.75
fault1_sgi = 0.06
# block 7 - Fault 2 - Impermeable
# Note: this fault has been removed from the mesh (no elements in this region)
# block 8 - Fault 3 - Homogeneous
fault3 = '8'
fault3_pe = 10
fault3_krg = 0.16
fault3_swi = 0.1
fault3_krw = 0.75
fault3_sgi = 0.06
# Top layer
top_layer = '9'
# Boxes A, B an C used to report values (sg, sgr, xco2, etc)
boxA = '10 13 14 15 34 35'
boxB = '20 21 22 23 24 26'
boxC = '34 35'
# Furthermore, the seal sand unit in boxes A and B
seal_boxA = '10'
seal_boxB = '20'
# CO2 injection details:
# CO2 density ~1.8389 kg/m3 at 293.15 K, 1.01325e5 Pa
# Injection in Port (9, 3) for 5 hours.
# Injection in Port (17, 7) for 2:45 hours.
# Injection of 10 ml/min = 0.1666 ml/s = 1.666e-7 m3/s = ~3.06e-7 kg/s.
# Total mass of CO2 injected ~ 8.5g.
inj_rate = 3.06e-7
[Mesh]
[mesh]
type = FileMeshGenerator
file = 'fluidflower_test.e'
# file = '../../../../large_media/porous_flow/examples/fluidflower/fluidflower.e'
use_for_exodus_restart = true
[]
[]
[Debug]
show_var_residual_norms = true
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 -9.81 0'
temperature = temperature
log_extension = false
[]
[Variables]
[pgas]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[z]
family = MONOMIAL
order = CONSTANT
fv = true
scaling = 1e4
[]
[]
[AuxVariables]
[xnacl]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 0.0055
[]
[temperature]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 20
[]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
initial_from_file_var = porosity
[]
[porosity_times_thickness]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[permeability]
family = MONOMIAL
order = CONSTANT
fv = true
initial_from_file_var = permeability
[]
[permeability_times_thickness]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[saturation_water]
family = MONOMIAL
order = CONSTANT
[]
[saturation_gas]
family = MONOMIAL
order = CONSTANT
[]
[pressure_water]
family = MONOMIAL
order = CONSTANT
[]
[pc]
family = MONOMIAL
order = CONSTANT
[]
[x0_water]
order = CONSTANT
family = MONOMIAL
[]
[x0_gas]
order = CONSTANT
family = MONOMIAL
[]
[x1_water]
order = CONSTANT
family = MONOMIAL
[]
[x1_gas]
order = CONSTANT
family = MONOMIAL
[]
[density_water]
order = CONSTANT
family = MONOMIAL
[]
[density_gas]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[porosity_times_thickness]
type = ParsedAux
variable = porosity_times_thickness
coupled_variables = porosity
expression = 'porosity * ${thickness}'
execute_on = 'initial'
[]
[permeability_times_thickness]
type = ParsedAux
variable = permeability_times_thickness
coupled_variables = permeability
expression = 'permeability * ${thickness}'
execute_on = 'initial'
[]
[pressure_water]
type = ADPorousFlowPropertyAux
variable = pressure_water
property = pressure
phase = 0
execute_on = 'initial timestep_end'
[]
[saturation_water]
type = ADPorousFlowPropertyAux
variable = saturation_water
property = saturation
phase = 0
execute_on = 'initial timestep_end'
[]
[saturation_gas]
type = ADPorousFlowPropertyAux
variable = saturation_gas
property = saturation
phase = 1
execute_on = 'initial timestep_end'
[]
[density_water]
type = ADPorousFlowPropertyAux
variable = density_water
property = density
phase = 0
execute_on = 'initial timestep_end'
[]
[density_gas]
type = ADPorousFlowPropertyAux
variable = density_gas
property = density
phase = 1
execute_on = 'initial timestep_end'
[]
[x1_water]
type = ADPorousFlowPropertyAux
variable = x1_water
property = mass_fraction
phase = 0
fluid_component = 1
execute_on = 'initial timestep_end'
[]
[x1_gas]
type = ADPorousFlowPropertyAux
variable = x1_gas
property = mass_fraction
phase = 1
fluid_component = 1
execute_on = 'initial timestep_end'
[]
[x0_water]
type = ADPorousFlowPropertyAux
variable = x0_water
property = mass_fraction
phase = 0
fluid_component = 0
execute_on = 'initial timestep_end'
[]
[x0_gas]
type = ADPorousFlowPropertyAux
variable = x0_gas
property = mass_fraction
phase = 1
fluid_component = 0
execute_on = 'initial timestep_end'
[]
[pc]
type = ADPorousFlowPropertyAux
variable = pc
property = capillary_pressure
execute_on = 'initial timestep_end'
[]
[]
[FVKernels]
[mass0]
type = FVPorousFlowMassTimeDerivative
variable = pgas
fluid_component = 0
[]
[flux0]
type = FVPorousFlowAdvectiveFlux
variable = pgas
fluid_component = 0
[]
[diff0]
type = FVPorousFlowDispersiveFlux
variable = pgas
fluid_component = 0
disp_long = '0 0'
disp_trans = '0 0'
[]
[mass1]
type = FVPorousFlowMassTimeDerivative
variable = z
fluid_component = 1
[]
[flux1]
type = FVPorousFlowAdvectiveFlux
variable = z
fluid_component = 1
[]
[diff1]
type = FVPorousFlowDispersiveFlux
variable = z
fluid_component = 1
disp_long = '0 0'
disp_trans = '0 0'
[]
[]
[DiracKernels]
[injector1]
type = ConstantPointSource
point = '0.9 0.3 0'
value = ${inj_rate}
variable = z
[]
[injector2]
type = ConstantPointSource
point = '1.7 0.7 0'
value = ${inj_rate}
variable = z
[]
[]
[Controls]
[injection1]
type = ConditionalFunctionEnableControl
enable_objects = 'DiracKernels::injector1'
conditional_function = injection_schedule1
[]
[injection2]
type = ConditionalFunctionEnableControl
enable_objects = 'DiracKernels::injector2'
conditional_function = injection_schedule2
[]
[]
[Functions]
[initial_p]
type = ParsedFunction
symbol_names = 'p0 g H rho0'
symbol_values = '101.325e3 9.81 1.5 1002'
expression = 'p0 + rho0 * g * (H - y)'
[]
[injection_schedule1]
type = ParsedFunction
expression = 'if(t >= 0 & t <= 1.8e4, 1, 0)'
[]
[injection_schedule2]
type = ParsedFunction
expression = 'if(t >= 8.1e3 & t <= 1.8e4, 1, 0)'
[]
[]
[ICs]
[p]
type = FunctionIC
variable = pgas
function = initial_p
[]
[]
[FVBCs]
[pressure_top]
type = FVPorousFlowAdvectiveFluxBC
boundary = top
porepressure_value = 1.01325e5
variable = pgas
[]
[]
[FluidProperties]
[water]
type = Water97FluidProperties
[]
[watertab]
type = TabulatedBicubicFluidProperties
fp = water
save_file = false
pressure_min = 1e5
pressure_max = 1e6
temperature_min = 290
temperature_max = 300
num_p = 20
num_T = 10
[]
[co2]
type = CO2FluidProperties
[]
[co2tab]
type = TabulatedBicubicFluidProperties
fp = co2
save_file = false
pressure_min = 1e5
pressure_max = 1e6
temperature_min = 290
temperature_max = 300
num_p = 20
num_T = 10
[]
[brine]
type = BrineFluidProperties
water_fp = watertab
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pgas z'
number_fluid_phases = 2
number_fluid_components = 2
[]
[sandESF_pc]
type = PorousFlowCapillaryPressureBC
pe = ${sandESF_pe}
lambda = 2
block = ${sandESF}
pc_max = 1e4
sat_lr = ${sandESF_swi}
[]
[sandC_pc]
type = PorousFlowCapillaryPressureBC
pe = ${sandC_pe}
lambda = 2
block = ${sandC}
pc_max = 1e4
sat_lr = ${sandC_swi}
[]
[sandD_pc]
type = PorousFlowCapillaryPressureBC
pe = ${sandD_pe}
lambda = 2
block = ${sandD}
pc_max = 1e4
sat_lr = ${sandD_swi}
[]
[sandE_pc]
type = PorousFlowCapillaryPressureBC
pe = ${sandE_pe}
lambda = 2
block = ${sandE}
pc_max = 1e4
sat_lr = ${sandE_swi}
[]
[sandF_pc]
type = PorousFlowCapillaryPressureBC
pe = ${sandF_pe}
lambda = 2
block = ${sandF}
pc_max = 1e4
sat_lr = ${sandF_swi}
[]
[sandG_pc]
type = PorousFlowCapillaryPressureBC
pe = ${sandG_pe}
lambda = 2
block = ${sandG}
pc_max = 1e4
sat_lr = ${sandG_swi}
[]
[fault1_pc]
type = PorousFlowCapillaryPressureBC
pe = ${fault1_pe}
lambda = 2
block = ${fault1}
pc_max = 1e4
sat_lr = ${fault1_swi}
[]
[fault3_pc]
type = PorousFlowCapillaryPressureBC
pe = ${fault3_pe}
lambda = 2
block = ${fault3}
pc_max = 1e4
sat_lr = ${fault3_swi}
[]
[top_layer_pc]
type = PorousFlowCapillaryPressureConst
pc = 0
block = ${top_layer}
[]
[sandESF_fs]
type = PorousFlowBrineCO2
brine_fp = brine
co2_fp = co2tab
capillary_pressure = sandESF_pc
[]
[sandC_fs]
type = PorousFlowBrineCO2
brine_fp = brine
co2_fp = co2tab
capillary_pressure = sandC_pc
[]
[sandD_fs]
type = PorousFlowBrineCO2
brine_fp = brine
co2_fp = co2tab
capillary_pressure = sandD_pc
[]
[sandE_fs]
type = PorousFlowBrineCO2
brine_fp = brine
co2_fp = co2tab
capillary_pressure = sandE_pc
[]
[sandF_fs]
type = PorousFlowBrineCO2
brine_fp = brine
co2_fp = co2tab
capillary_pressure = sandF_pc
[]
[sandG_fs]
type = PorousFlowBrineCO2
brine_fp = brine
co2_fp = co2tab
capillary_pressure = sandG_pc
[]
[fault1_fs]
type = PorousFlowBrineCO2
brine_fp = brine
co2_fp = co2tab
capillary_pressure = fault1_pc
[]
[fault3_fs]
type = PorousFlowBrineCO2
brine_fp = brine
co2_fp = co2tab
capillary_pressure = fault3_pc
[]
[top_layer_fs]
type = PorousFlowBrineCO2
brine_fp = brine
co2_fp = co2tab
capillary_pressure = top_layer_pc
[]
[]
[Materials]
[temperature]
type = ADPorousFlowTemperature
temperature = temperature
[]
[sandESF_brineco2]
type = ADPorousFlowFluidState
gas_porepressure = pgas
z = z
temperature_unit = Celsius
xnacl = xnacl
fluid_state = sandESF_fs
capillary_pressure = sandESF_pc
block = ${sandESF}
[]
[sandC_brineco2]
type = ADPorousFlowFluidState
gas_porepressure = pgas
z = z
temperature_unit = Celsius
xnacl = xnacl
fluid_state = sandC_fs
capillary_pressure = sandC_pc
block = ${sandC}
[]
[sandD_brineco2]
type = ADPorousFlowFluidState
gas_porepressure = pgas
z = z
temperature_unit = Celsius
xnacl = xnacl
fluid_state = sandD_fs
capillary_pressure = sandD_pc
block = ${sandD}
[]
[sandE_brineco2]
type = ADPorousFlowFluidState
gas_porepressure = pgas
z = z
temperature_unit = Celsius
xnacl = xnacl
fluid_state = sandE_fs
capillary_pressure = sandE_pc
block = ${sandE}
[]
[sandF_brineco2]
type = ADPorousFlowFluidState
gas_porepressure = pgas
z = z
temperature_unit = Celsius
xnacl = xnacl
fluid_state = sandF_fs
capillary_pressure = sandF_pc
block = ${sandF}
[]
[sandG_brineco2]
type = ADPorousFlowFluidState
gas_porepressure = pgas
z = z
temperature_unit = Celsius
xnacl = xnacl
fluid_state = sandG_fs
capillary_pressure = sandG_pc
block = ${sandG}
[]
[fault1_brineco2]
type = ADPorousFlowFluidState
gas_porepressure = pgas
z = z
temperature_unit = Celsius
xnacl = xnacl
fluid_state = fault1_fs
capillary_pressure = fault1_pc
block = ${fault1}
[]
[fault3_brineco2]
type = ADPorousFlowFluidState
gas_porepressure = pgas
z = z
temperature_unit = Celsius
xnacl = xnacl
fluid_state = fault3_fs
capillary_pressure = fault3_pc
block = ${fault3}
[]
[top_layer_brineco2]
type = ADPorousFlowFluidState
gas_porepressure = pgas
z = z
temperature_unit = Celsius
xnacl = xnacl
fluid_state = top_layer_fs
capillary_pressure = top_layer_pc
block = ${top_layer}
[]
[porosity]
type = ADPorousFlowPorosityConst
porosity = porosity_times_thickness
[]
[permeability]
type = ADPorousFlowPermeabilityConstFromVar
perm_xx = permeability_times_thickness
perm_yy = permeability_times_thickness
perm_zz = permeability_times_thickness
[]
[diffcoeff]
type = ADPorousFlowDiffusivityConst
tortuosity = '1 1'
diffusion_coeff = '2e-9 2e-9 0 0'
[]
[sandESF_relperm0]
type = ADPorousFlowRelativePermeabilityBC
phase = 0
lambda = 2
s_res = ${sandESF_swi}
sum_s_res = ${fparse sandESF_sgi + sandESF_swi}
scaling = ${sandESF_krw}
block = ${sandESF}
[]
[sandESF_relperm1]
type = ADPorousFlowRelativePermeabilityBC
phase = 1
nw_phase = true
lambda = 2
s_res = ${sandESF_sgi}
sum_s_res = ${fparse sandESF_sgi + sandESF_swi}
scaling = ${sandESF_krg}
block = ${sandESF}
[]
[sandC_relperm0]
type = ADPorousFlowRelativePermeabilityBC
phase = 0
lambda = 2
s_res = ${sandC_swi}
sum_s_res = ${fparse sandC_sgi + sandC_swi}
scaling = ${sandC_krw}
block = ${sandC}
[]
[sandC_relperm1]
type = ADPorousFlowRelativePermeabilityBC
phase = 1
nw_phase = true
lambda = 2
s_res = ${sandC_sgi}
sum_s_res = ${fparse sandC_sgi + sandC_swi}
scaling = ${sandC_krg}
block = ${sandC}
[]
[sandD_relperm0]
type = ADPorousFlowRelativePermeabilityBC
phase = 0
lambda = 2
s_res = ${sandD_swi}
sum_s_res = ${fparse sandD_sgi + sandD_swi}
scaling = ${sandD_krw}
block = ${sandD}
[]
[sandD_relperm1]
type = ADPorousFlowRelativePermeabilityBC
phase = 1
nw_phase = true
lambda = 2
s_res = ${sandD_sgi}
sum_s_res = ${fparse sandD_sgi + sandD_swi}
scaling = ${sandD_krg}
block = ${sandD}
[]
[sandE_relperm0]
type = ADPorousFlowRelativePermeabilityBC
phase = 0
lambda = 2
s_res = ${sandE_swi}
sum_s_res = ${fparse sandE_sgi + sandE_swi}
scaling = ${sandE_krw}
block = ${sandE}
[]
[sandE_relperm1]
type = ADPorousFlowRelativePermeabilityBC
phase = 1
nw_phase = true
lambda = 2
s_res = ${sandE_sgi}
sum_s_res = ${fparse sandE_sgi + sandE_swi}
scaling = ${sandE_krg}
block = ${sandE}
[]
[sandF_relperm0]
type = ADPorousFlowRelativePermeabilityBC
phase = 0
lambda = 2
s_res = ${sandF_swi}
sum_s_res = ${fparse sandF_sgi + sandF_swi}
scaling = ${sandF_krw}
block = ${sandF}
[]
[sandF_relperm1]
type = ADPorousFlowRelativePermeabilityBC
phase = 1
nw_phase = true
lambda = 2
s_res = ${sandF_sgi}
sum_s_res = ${fparse sandF_sgi + sandF_swi}
scaling = ${sandF_krg}
block = ${sandF}
[]
[sandG_relperm0]
type = ADPorousFlowRelativePermeabilityBC
phase = 0
lambda = 2
s_res = ${sandG_swi}
sum_s_res = ${fparse sandG_sgi + sandG_swi}
scaling = ${sandG_krw}
block = ${sandG}
[]
[sandG_relperm1]
type = ADPorousFlowRelativePermeabilityBC
phase = 1
nw_phase = true
lambda = 2
s_res = ${sandG_sgi}
sum_s_res = ${fparse sandG_sgi + sandG_swi}
scaling = ${sandG_krg}
block = ${sandG}
[]
[fault1_relperm0]
type = ADPorousFlowRelativePermeabilityBC
phase = 0
lambda = 2
s_res = ${fault1_swi}
sum_s_res = ${fparse fault1_sgi + fault1_swi}
scaling = ${fault1_krw}
block = ${fault1}
[]
[fault1_relperm1]
type = ADPorousFlowRelativePermeabilityBC
phase = 1
nw_phase = true
lambda = 2
s_res = ${fault1_sgi}
sum_s_res = ${fparse fault1_sgi + fault1_swi}
scaling = ${fault1_krg}
block = ${fault1}
[]
[fault3_relperm0]
type = ADPorousFlowRelativePermeabilityBC
phase = 0
lambda = 2
s_res = ${fault3_swi}
sum_s_res = ${fparse fault3_sgi + fault3_swi}
scaling = ${fault3_krw}
block = ${fault3}
[]
[fault3_relperm1]
type = ADPorousFlowRelativePermeabilityBC
phase = 1
nw_phase = true
lambda = 2
s_res = ${fault3_sgi}
sum_s_res = ${fparse fault3_sgi + fault3_swi}
scaling = ${fault3_krg}
block = ${fault3}
[]
[top_layer_relperm0]
type = ADPorousFlowRelativePermeabilityBC
phase = 0
lambda = 2
block = ${top_layer}
[]
[top_layer_relperm1]
type = ADPorousFlowRelativePermeabilityBC
phase = 1
nw_phase = true
lambda = 2
block = ${top_layer}
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options = '-ksp_snes_ew'
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package -sub_pc_factor_shift_type'
petsc_options_value = 'gmres lu mumps NONZERO'
# petsc_options_iname = '-ksp_type -pc_type -pc_hypre_type -sub_pc_type -sub_pc_factor_shift_type -sub_pc_factor_levels -ksp_gmres_restart'
# petsc_options_value = 'gmres hypre boomeramg lu NONZERO 4 301'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dtmax = 60
start_time = 0
end_time = 4.32e5
nl_rel_tol = 1e-6
nl_abs_tol = 1e-8
nl_max_its = 15
l_tol = 1e-5
l_abs_tol = 1e-8
# line_search = none # Can be a useful option for this problem
[TimeSteppers]
[time]
type = FunctionDT
growth_factor = 2
cutback_factor_at_failure = 0.5
function = 'if(t<1.8e4, 2, if(t<3.6e4, 20, 60))'
[]
[]
[]
[Postprocessors]
[p_5_3]
type = PointValue
variable = pgas
point = '0.5 0.3 0'
execute_on = 'initial timestep_end'
[]
[p_5_3_w]
type = PointValue
variable = pressure_water
point = '0.5 0.3 0'
execute_on = 'initial timestep_end'
[]
[p_5_7]
type = PointValue
variable = pgas
point = '0.5 0.7 0'
execute_on = 'initial timestep_end'
[]
[p_5_7_w]
type = PointValue
variable = pressure_water
point = '0.5 0.7 0'
execute_on = 'initial timestep_end'
[]
[p_9_3]
type = PointValue
variable = pgas
point = '0.9 0.3 0'
execute_on = 'initial timestep_end'
[]
[p_9_3_w]
type = PointValue
variable = pressure_water
point = '0.9 0.3 0'
execute_on = 'initial timestep_end'
[]
[p_15_5]
type = PointValue
variable = pgas
point = '1.5 0.5 0'
execute_on = 'initial timestep_end'
[]
[p_15_5_w]
type = PointValue
variable = pressure_water
point = '1.5 0.5 0'
execute_on = 'initial timestep_end'
[]
[p_17_7]
type = PointValue
variable = pgas
point = '1.7 0.7 0'
execute_on = 'initial timestep_end'
[]
[p_17_7_w]
type = PointValue
variable = pressure_water
point = '1.7 0.7 0'
execute_on = 'initial timestep_end'
[]
[p_17_11]
type = PointValue
variable = pgas
point = '1.7 1.1 0'
execute_on = 'initial timestep_end'
[]
[p_17_11_w]
type = PointValue
variable = pressure_water
point = '1.7 1.1 0'
execute_on = 'initial timestep_end'
[]
[x0mass]
type = FVPorousFlowFluidMass
fluid_component = 0
phase = '0 1'
execute_on = 'initial timestep_end'
[]
[x1mass]
type = FVPorousFlowFluidMass
fluid_component = 1
phase = '0 1'
execute_on = 'initial timestep_end'
[]
[x1gas]
type = FVPorousFlowFluidMass
fluid_component = 1
phase = '1'
execute_on = 'initial timestep_end'
[]
[boxA]
type = FVPorousFlowFluidMass
fluid_component = 1
phase = '0 1'
block = ${boxA}
execute_on = 'initial timestep_end'
[]
[imm_A_sandESF]
type = FVPorousFlowFluidMass
fluid_component = 1
phase = 1
saturation_threshold = ${sandESF_sgi}
block = 10
execute_on = 'initial timestep_end'
[]
[imm_A_sandE]
type = FVPorousFlowFluidMass
fluid_component = 1
phase = 1
saturation_threshold = ${sandE_sgi}
block = 13
execute_on = 'initial timestep_end'
[]
[imm_A_sandF]
type = FVPorousFlowFluidMass
fluid_component = 1
phase = 1
saturation_threshold = ${sandF_sgi}
block = '14 34'
execute_on = 'initial timestep_end'
[]
[imm_A_sandG]
type = FVPorousFlowFluidMass
fluid_component = 1
phase = 1
saturation_threshold = ${sandG_sgi}
block = '15 35'
execute_on = 'initial timestep_end'
[]
[imm_A]
type = LinearCombinationPostprocessor
pp_names = 'imm_A_sandESF imm_A_sandE imm_A_sandF imm_A_sandG'
pp_coefs = '1 1 1 1'
execute_on = 'initial timestep_end'
[]
[diss_A]
type = FVPorousFlowFluidMass
fluid_component = 1
phase = 0
block = ${boxA}
execute_on = 'initial timestep_end'
[]
[seal_A]
type = FVPorousFlowFluidMass
fluid_component = 1
phase = '0 1'
block = ${seal_boxA}
execute_on = 'initial timestep_end'
[]
[boxB]
type = FVPorousFlowFluidMass
fluid_component = 1
phase = '0 1'
block = ${boxB}
execute_on = 'initial timestep_end'
[]
[imm_B_sandESF]
type = FVPorousFlowFluidMass
fluid_component = 1
phase = 1
saturation_threshold = ${sandESF_sgi}
block = 20
execute_on = 'initial timestep_end'
[]
[imm_B_sandC]
type = FVPorousFlowFluidMass
fluid_component = 1
phase = 1
saturation_threshold = ${sandC_sgi}
block = 21
execute_on = 'initial timestep_end'
[]
[imm_B_sandD]
type = FVPorousFlowFluidMass
fluid_component = 1
phase = 1
saturation_threshold = ${sandD_sgi}
block = 22
execute_on = 'initial timestep_end'
[]
[imm_B_sandE]
type = FVPorousFlowFluidMass
fluid_component = 1
phase = 1
saturation_threshold = ${sandE_sgi}
block = 23
execute_on = 'initial timestep_end'
[]
[imm_B_sandF]
type = FVPorousFlowFluidMass
fluid_component = 1
phase = 1
saturation_threshold = ${sandF_sgi}
block = 24
execute_on = 'initial timestep_end'
[]
[imm_B_fault1]
type = FVPorousFlowFluidMass
fluid_component = 1
phase = 1
saturation_threshold = ${fault1_sgi}
block = 26
execute_on = 'initial timestep_end'
[]
[imm_B]
type = LinearCombinationPostprocessor
pp_names = 'imm_B_sandESF imm_B_sandC imm_B_sandD imm_B_sandE imm_B_sandF imm_B_fault1'
pp_coefs = '1 1 1 1 1 1'
execute_on = 'initial timestep_end'
[]
[diss_B]
type = FVPorousFlowFluidMass
fluid_component = 1
phase = 0
block = ${boxB}
execute_on = 'initial timestep_end'
[]
[seal_B]
type = FVPorousFlowFluidMass
fluid_component = 1
phase = '0 1'
block = ${seal_boxB}
execute_on = 'initial timestep_end'
[]
[boxC]
type = FVPorousFlowFluidMass
fluid_component = 1
phase = '0'
block = ${boxC}
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
print_linear_residuals = false
perf_graph = true
# exodus = true
[csv]
type = CSV
[]
[]
(modules/porous_flow/examples/thm_example/2D_c.i)
# Two phase, temperature-dependent, with mechanics and chemistry, radial with fine mesh, constant injection of cold co2 into a overburden-reservoir-underburden containing mostly water
# species=0 is water
# species=1 is co2
# phase=0 is liquid, and since massfrac_ph0_sp0 = 1, this is all water
# phase=1 is gas, and since massfrac_ph1_sp0 = 0, this is all co2
#
# The mesh used below has very high resolution, so the simulation takes a long time to complete.
# Some suggested meshes of different resolution:
# nx=50, bias_x=1.2
# nx=100, bias_x=1.1
# nx=200, bias_x=1.05
# nx=400, bias_x=1.02
# nx=1000, bias_x=1.01
# nx=2000, bias_x=1.003
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2000
bias_x = 1.003
xmin = 0.1
xmax = 5000
ny = 1
ymin = 0
ymax = 11
[]
[Problem]
coord_type = RZ
[]
[GlobalParams]
displacements = 'disp_r disp_z'
PorousFlowDictator = dictator
gravity = '0 0 0'
biot_coefficient = 1.0
[]
[Variables]
[pwater]
initial_condition = 18.3e6
[]
[sgas]
initial_condition = 0.0
[]
[temp]
initial_condition = 358
[]
[disp_r]
[]
[]
[AuxVariables]
[rate]
[]
[disp_z]
[]
[massfrac_ph0_sp0]
initial_condition = 1 # all H20 in phase=0
[]
[massfrac_ph1_sp0]
initial_condition = 0 # no H2O in phase=1
[]
[pgas]
family = MONOMIAL
order = FIRST
[]
[swater]
family = MONOMIAL
order = FIRST
[]
[stress_rr]
order = CONSTANT
family = MONOMIAL
[]
[stress_tt]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[mineral_conc_m3_per_m3]
family = MONOMIAL
order = CONSTANT
initial_condition = 0.1
[]
[eqm_const]
initial_condition = 0.0
[]
[porosity]
family = MONOMIAL
order = CONSTANT
[]
[]
[Kernels]
[mass_water_dot]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pwater
[]
[flux_water]
type = PorousFlowAdvectiveFlux
fluid_component = 0
use_displaced_mesh = false
variable = pwater
[]
[mass_co2_dot]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = sgas
[]
[flux_co2]
type = PorousFlowAdvectiveFlux
fluid_component = 1
use_displaced_mesh = false
variable = sgas
[]
[energy_dot]
type = PorousFlowEnergyTimeDerivative
variable = temp
[]
[advection]
type = PorousFlowHeatAdvection
use_displaced_mesh = false
variable = temp
[]
[conduction]
type = PorousFlowExponentialDecay
use_displaced_mesh = false
variable = temp
reference = 358
rate = rate
[]
[grad_stress_r]
type = StressDivergenceRZTensors
temperature = temp
eigenstrain_names = thermal_contribution
variable = disp_r
use_displaced_mesh = false
component = 0
[]
[poro_r]
type = PorousFlowEffectiveStressCoupling
variable = disp_r
use_displaced_mesh = false
component = 0
[]
[]
[AuxKernels]
[rate]
type = FunctionAux
variable = rate
execute_on = timestep_begin
function = decay_rate
[]
[pgas]
type = PorousFlowPropertyAux
property = pressure
phase = 1
variable = pgas
[]
[swater]
type = PorousFlowPropertyAux
property = saturation
phase = 0
variable = swater
[]
[stress_rr]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_rr
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
[]
[mineral]
type = PorousFlowPropertyAux
property = mineral_concentration
mineral_species = 0
variable = mineral_conc_m3_per_m3
[]
[eqm_const_auxk]
type = ParsedAux
variable = eqm_const
coupled_variables = temp
expression = '(358 - temp) / (358 - 294)'
[]
[porosity_auxk]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[]
[]
[Functions]
[decay_rate]
# Eqn(26) of the first paper of LaForce et al.
# Ka * (rho C)_a = 10056886.914
# h = 11
type = ParsedFunction
expression = 'sqrt(10056886.914/t)/11.0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp pwater sgas disp_r'
number_fluid_phases = 2
number_fluid_components = 2
number_aqueous_kinetic = 1
aqueous_phase_number = 1
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[]
[FluidProperties]
[water]
type = SimpleFluidProperties
bulk_modulus = 2.27e14
density0 = 970.0
viscosity = 0.3394e-3
cv = 4149.0
cp = 4149.0
porepressure_coefficient = 0.0
thermal_expansion = 0
[]
[co2]
type = SimpleFluidProperties
bulk_modulus = 2.27e14
density0 = 516.48
viscosity = 0.0393e-3
cv = 2920.5
cp = 2920.5
porepressure_coefficient = 0.0
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = pwater
phase1_saturation = sgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[water]
type = PorousFlowSingleComponentFluid
fp = water
phase = 0
[]
[gas]
type = PorousFlowSingleComponentFluid
fp = co2
phase = 1
[]
[porosity_reservoir]
type = PorousFlowPorosity
porosity_zero = 0.2
chemical = true
reference_chemistry = 0.1
initial_mineral_concentrations = 0.1
[]
[permeability_reservoir]
type = PorousFlowPermeabilityConst
permeability = '2e-12 0 0 0 0 0 0 0 0'
[]
[relperm_liquid]
type = PorousFlowRelativePermeabilityCorey
n = 4
phase = 0
s_res = 0.200
sum_s_res = 0.405
[]
[relperm_gas]
type = PorousFlowRelativePermeabilityBC
phase = 1
s_res = 0.205
sum_s_res = 0.405
nw_phase = true
lambda = 2
[]
[thermal_conductivity_reservoir]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0 0 0 0 1.320 0 0 0 0'
wet_thermal_conductivity = '0 0 0 0 3.083 0 0 0 0'
[]
[internal_energy_reservoir]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 1100
density = 2350.0
[]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
shear_modulus = 6.0E9
poissons_ratio = 0.2
[]
[strain]
type = ComputeAxisymmetricRZSmallStrain
eigenstrain_names = 'thermal_contribution ini_stress'
[]
[ini_strain]
type = ComputeEigenstrainFromInitialStress
initial_stress = '-12.8E6 0 0 0 -51.3E6 0 0 0 -12.8E6'
eigenstrain_name = ini_stress
[]
[thermal_contribution]
type = ComputeThermalExpansionEigenstrain
temperature = temp
stress_free_temperature = 358
thermal_expansion_coeff = 5E-6
eigenstrain_name = thermal_contribution
[]
[stress]
type = ComputeLinearElasticStress
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[predis]
type = PorousFlowAqueousPreDisChemistry
num_reactions = 1
primary_concentrations = 1.0 # fixed activity
equilibrium_constants_as_log10 = true
equilibrium_constants = eqm_const
primary_activity_coefficients = 1.0 # fixed activity
reactions = 1
kinetic_rate_constant = 1E-6
molar_volume = 1.0
specific_reactive_surface_area = 1.0
activation_energy = 0.0 # no Arrhenius
[]
[mineral_conc]
type = PorousFlowAqueousPreDisMineral
initial_concentrations = 0.1
[]
[predis_nodes]
type = PorousFlowAqueousPreDisChemistry
at_nodes = true
num_reactions = 1
primary_concentrations = 1.0 # fixed activity
equilibrium_constants_as_log10 = true
equilibrium_constants = eqm_const
primary_activity_coefficients = 1.0 # fixed activity
reactions = 1
kinetic_rate_constant = 1E-6
molar_volume = 1.0
specific_reactive_surface_area = 1.0
activation_energy = 0.0 # no Arrhenius
[]
[mineral_conc_nodes]
type = PorousFlowAqueousPreDisMineral
at_nodes = true
initial_concentrations = 0.1
[]
[]
[BCs]
[outer_pressure_fixed]
type = DirichletBC
boundary = right
value = 18.3e6
variable = pwater
[]
[outer_saturation_fixed]
type = DirichletBC
boundary = right
value = 0.0
variable = sgas
[]
[outer_temp_fixed]
type = DirichletBC
boundary = right
value = 358
variable = temp
[]
[fixed_outer_r]
type = DirichletBC
variable = disp_r
value = 0
boundary = right
[]
[co2_injection]
type = PorousFlowSink
boundary = left
variable = sgas
use_mobility = false
use_relperm = false
fluid_phase = 1
flux_function = 'min(t/100.0,1)*(-2.294001475)' # 5.0E5 T/year = 15.855 kg/s, over area of 2Pi*0.1*11
[]
[cold_co2]
type = DirichletBC
boundary = left
variable = temp
value = 294
[]
[cavity_pressure_x]
type = Pressure
boundary = left
variable = disp_r
component = 0
postprocessor = p_bh # note, this lags
use_displaced_mesh = false
[]
[]
[Postprocessors]
[p_bh]
type = PointValue
variable = pwater
point = '0.1 0 0'
execute_on = timestep_begin
use_displaced_mesh = false
[]
[mineral_bh] # mineral concentration (m^3(mineral)/m^3(rock)) at the borehole
type = PointValue
variable = mineral_conc_m3_per_m3
point = '0.1 0 0'
use_displaced_mesh = false
[]
[]
[VectorPostprocessors]
[ptsuss]
type = LineValueSampler
use_displaced_mesh = false
start_point = '0.1 0 0'
end_point = '5000 0 0'
sort_by = x
num_points = 50000
outputs = csv
variable = 'pwater temp sgas disp_r stress_rr stress_tt mineral_conc_m3_per_m3 porosity'
[]
[]
[Preconditioning]
active = 'smp'
[smp]
type = SMP
full = true
#petsc_options = '-snes_converged_reason -ksp_diagonal_scale -ksp_diagonal_scale_fix -ksp_gmres_modifiedgramschmidt -snes_linesearch_monitor'
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'gmres asm lu NONZERO 2 1E2 1E-5 50'
[]
[mumps]
type = SMP
full = true
petsc_options = '-snes_converged_reason -ksp_diagonal_scale -ksp_diagonal_scale_fix -ksp_gmres_modifiedgramschmidt -snes_linesearch_monitor'
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package -pc_factor_shift_type -snes_rtol -snes_atol -snes_max_it'
petsc_options_value = 'gmres lu mumps NONZERO 1E-5 1E2 50'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 1.5768e8
#dtmax = 1e6
[TimeStepper]
type = IterationAdaptiveDT
dt = 1
growth_factor = 1.1
[]
[]
[Outputs]
print_linear_residuals = false
sync_times = '3600 86400 2.592E6 1.5768E8'
perf_graph = true
exodus = true
[csv]
type = CSV
sync_only = true
[]
[]
(modules/navier_stokes/test/tests/finite_volume/pins/mms/porosity_change/1d-rc-continuous.i)
mu = 1.5
rho = 1.1
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 1
dx = '1 1'
ix = '15 15'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
porosity = porosity
pressure = pressure
[]
[]
[Problem]
error_on_jacobian_nonzero_reallocation = true
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[]
[ICs]
[porosity_continuous]
type = FunctionIC
variable = porosity
function = smooth_jump
[]
[]
[Functions]
[smooth_jump]
type = ParsedFunction
expression = '1 - 0.5 * 1 / (1 + exp(-30*(x-1)))'
[]
# Generated by compute-functions-1d.py
[exact_u]
type = ParsedFunction
expression = 'cos((1/2)*x*pi)'
[]
[forcing_u]
type = ParsedFunction
expression = '-mu*(1 - 0.5/(exp(30 - 30*x) + 1))*(-1/4*pi^2*cos((1/2)*x*pi)/(1 - 0.5/(exp(30 - 30*x) + 1)) - 15.0*pi*exp(30 - 30*x)*sin((1/2)*x*pi)/((1 - 0.5/(exp(30 - 30*x) + 1))^2*(exp(30 - 30*x) + 1)^2) - 450.0*exp(30 - 30*x)*cos((1/2)*x*pi)/((1 - 0.5/(exp(30 - 30*x) + 1))^2*(exp(30 - 30*x) + 1)^2) + 900.0*exp(60 - 60*x)*cos((1/2)*x*pi)/((1 - 0.5/(exp(30 - 30*x) + 1))^2*(exp(30 - 30*x) + 1)^3) + 450.0*exp(60 - 60*x)*cos((1/2)*x*pi)/((1 - 0.5/(exp(30 - 30*x) + 1))^3*(exp(30 - 30*x) + 1)^4)) + 15.0*mu*(-1/2*pi*sin((1/2)*x*pi)/(1 - 0.5/(exp(30 - 30*x) + 1)) + 15.0*exp(30 - 30*x)*cos((1/2)*x*pi)/((1 - 0.5/(exp(30 - 30*x) + 1))^2*(exp(30 - 30*x) + 1)^2))*exp(30 - 30*x)/(exp(30 - 30*x) + 1)^2 - pi*rho*sin((1/2)*x*pi)*cos((1/2)*x*pi)/(1 - 0.5/(exp(30 - 30*x) + 1)) + 15.0*rho*exp(30 - 30*x)*cos((1/2)*x*pi)^2/((1 - 0.5/(exp(30 - 30*x) + 1))^2*(exp(30 - 30*x) + 1)^2) + (1 - 0.5/(exp(30 - 30*x) + 1))*cos(x)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'sin(x)'
[]
[forcing_p]
type = ParsedFunction
expression = '-1/2*pi*rho*sin((1/2)*x*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[mass_forcing]
type = FVBodyForce
variable = pressure
function = forcing_p
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = u
mu = ${mu}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = u
pressure = pressure
porosity = porosity
momentum_component = 'x'
[]
[u_forcing]
type = INSFVBodyForce
variable = u
functor = forcing_u
momentum_component = 'x'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
functor = 'exact_u'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 'exact_p'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm 200 lu NONZERO'
line_search = 'none'
# ksp_gmres_restart bumped to 200 for linear convergence
nl_max_its = 100
[]
[Postprocessors]
[inlet_p]
type = SideAverageValue
variable = 'pressure'
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 'right'
[]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2FunctorError
approximate = u
exact = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
approximate = pressure
exact = exact_p
type = ElementL2FunctorError
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
[Outputs]
csv = true
[]
(modules/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/navier_stokes/test/tests/finite_volume/pins/mms/1d-rc-no-diffusion-strong-bc.i)
mu=1e-15
rho=1.1
advected_interp_method='upwind'
velocity_interp_method='rc'
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
nx = 2
xmax = 0.5
[]
[]
[GlobalParams]
two_term_boundary_expansion = true
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
pressure = pressure
porosity = porosity
[]
[]
[Problem]
fv_bcs_integrity_check = false
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = .1
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 0.8
[]
[]
[Problem]
error_on_jacobian_nonzero_reallocation = true
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'cos((1/2)*x*pi)'
[]
[forcing_u]
type = ParsedFunction
expression = '-1.25*pi*rho*sin((1/2)*x*pi)*cos((1/2)*x*pi) + 0.8*cos(x)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'sin(x)'
[]
[forcing_p]
type = ParsedFunction
expression = '-1/2*pi*rho*sin((1/2)*x*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[mass_forcing]
type = FVBodyForce
variable = pressure
function = forcing_p
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressureFlux
variable = u
pressure = pressure
porosity = porosity
momentum_component = 'x'
force_boundary_execution = false
[]
[u_forcing]
type = INSFVBodyForce
variable = u
functor = forcing_u
momentum_component = 'x'
[]
[]
[FVBCs]
[mass]
variable = pressure
type = PINSFVFunctorBC
boundary = 'left right'
superficial_vel_x = u
pressure = pressure
eqn = 'mass'
porosity = porosity
[]
[momentum]
variable = u
type = PINSFVFunctorBC
boundary = 'left right'
superficial_vel_x = u
pressure = pressure
eqn = 'momentum'
momentum_component = 'x'
porosity = porosity
[]
[inlet-u]
type = FVFunctionDirichletBC
boundary = 'left'
variable = u
function = 'exact_u'
[]
[outlet_p]
type = FVFunctionDirichletBC
boundary = 'right'
variable = pressure
function = 'exact_p'
[]
[]
[FunctorMaterials]
[const]
type = ADGenericFunctorMaterial
prop_names = 'rho'
prop_values = '${rho}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm 100 lu NONZERO'
line_search = 'bt'
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2FunctorError
approximate = u
exact = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
approximate = pressure
exact = exact_p
type = ElementL2FunctorError
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
[Outputs]
csv = true
[]
(test/tests/ics/array_function_ic/array_function_ic_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 8
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[Variables]
[u]
components = 2
[]
[u0]
[]
[u1]
[]
[]
[AuxVariables]
[v]
components = 2
[]
[]
[Functions]
[sinx]
type = ParsedFunction
expression = sin(x)
[]
[siny]
type = ParsedFunction
expression = sin(y)
[]
[]
[ICs]
[uic]
type = ArrayFunctionIC
variable = u
function = 'sinx siny'
[]
[u0ic]
type = FunctionIC
variable = u0
function = sinx
[]
[u1ic]
type = FunctionIC
variable = u1
function = siny
[]
[vic]
type = ArrayFunctionIC
variable = v
function = 'sinx siny'
[]
[]
[Postprocessors]
[uint0]
type = ElementIntegralArrayVariablePostprocessor
variable = u
component = 0
[]
[uint1]
type = ElementIntegralArrayVariablePostprocessor
variable = u
component = 1
[]
[u0int]
type = ElementIntegralVariablePostprocessor
variable = u0
[]
[u1int]
type = ElementIntegralVariablePostprocessor
variable = u1
[]
[vint0]
type = ElementIntegralArrayVariablePostprocessor
variable = v
component = 0
[]
[vint1]
type = ElementIntegralArrayVariablePostprocessor
variable = v
component = 1
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/dirackernels/injection_with_plasticity.i)
# Example: Injection into a uniform aquifer 10 x 10 x 5 km
# Drucker-Prager deformation
# Darcy flow
gravity = -9.81
solid_density = 2350
fluid_density = 1000
porosity0 = 0.1
[Mesh]
type = GeneratedMesh
dim = 3
xmin = 0
xmax = 1e4
ymin = 0
ymax = 1e4
zmax = 0
zmin = -5e3
nx = 2
ny = 2
nz = 2
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 ${gravity}'
displacements = 'disp_x disp_y disp_z'
strain_at_nearest_qp = true
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0 # Not doing a thermal simulation
bulk_modulus = 2E9
density0 = ${fluid_density}
viscosity = 5E-4
[]
[]
[PorousFlowFullySaturated]
coupling_type = HydroMechanical
porepressure = pp
dictator_name = dictator
fp = simple_fluid
add_darcy_aux = false
add_stress_aux = false
stabilization = none
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[pp]
scaling = 1E6
[InitialCondition]
type = FunctionIC
function = ini_pp
[]
[]
[]
[Functions]
[ini_stress]
type = ParsedFunction
expression = '-${gravity} * z * (${solid_density} - ${fluid_density}) * (1.0 - ${porosity0})' # initial effective stress that should result from weight force
[]
[ini_pp]
type = ParsedFunction
expression = '${gravity} * z * ${fluid_density} + 1E5'
[]
[]
[BCs]
[p_top]
type = FunctionDirichletBC
variable = pp
boundary = front
function = ini_pp
[]
[x_roller]
type = DirichletBC
variable = disp_x
boundary = 'left right'
value = 0
[]
[y_roller]
type = DirichletBC
variable = disp_y
boundary = 'top bottom'
value = 0
[]
[z_confined]
type = DirichletBC
variable = disp_z
boundary = 'back front'
value = 0
[]
[]
[UserObjects]
[pls_total_outflow_mass]
type = PorousFlowSumQuantity
[]
# Cohesion
[mc_coh]
type = TensorMechanicsHardeningConstant
value = 6.0E6
[]
# Friction angle
[mc_phi]
type = TensorMechanicsHardeningConstant
value = 35.0
convert_to_radians = true
[]
# Dilation angle
[mc_psi]
type = TensorMechanicsHardeningConstant
value = 2
convert_to_radians = true
[]
# Drucker-Prager objects
[dp]
type = TensorMechanicsPlasticDruckerPragerHyperbolic
mc_cohesion = mc_coh
mc_friction_angle = mc_phi
mc_dilation_angle = mc_psi
yield_function_tolerance = 1E-3
internal_constraint_tolerance = 1E-6
[]
# Tensile strength
[tens]
type = TensorMechanicsHardeningConstant
value = 3.0E6
[]
# Compressive strength (cap on yield envelope)
[compr_all]
type = TensorMechanicsHardeningConstant
value = 1E10
[]
[]
[Materials]
[strain]
type = ComputeIncrementalSmallStrain
eigenstrain_names = eigenstrain_all
[]
[eigenstrain_all]
type = ComputeEigenstrainFromInitialStress
initial_stress = 'ini_stress 0 0 0 ini_stress 0 0 0 ini_stress'
eigenstrain_name = eigenstrain_all
[]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
bulk_modulus = 3.3333E9
shear_modulus = 2.5E9
[]
[dp_mat]
type = CappedDruckerPragerStressUpdate
DP_model = dp
tensile_strength = tens
compressive_strength = compr_all
smoothing_tol = 1E5
yield_function_tol = 1E-3
tip_smoother = 0
[]
[stress]
type = ComputeMultipleInelasticStress
inelastic_models = dp_mat
[]
# Permeability
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-13 0 0 0 1E-13 0 0 0 1E-13'
[]
# Porosity
[porosity]
type = PorousFlowPorosity
porosity_zero = ${porosity0}
biot_coefficient = 1.0
solid_bulk = 1.0 # Required but irrelevant when biot_coefficient is unity
mechanical = true
fluid = true
[]
# Density of saturated rock
[density]
type = PorousFlowTotalGravitationalDensityFullySaturatedFromPorosity
rho_s = ${solid_density}
[]
[]
[DiracKernels]
[pls]
type = PorousFlowPolyLineSink
variable = pp
SumQuantityUO = pls_total_outflow_mass
point_file = two_nodes.bh
function_of = pressure
fluid_phase = 0
p_or_t_vals = '0 1E7'
fluxes = '-1.59 -1.59'
[]
[]
[Preconditioning]
[usual]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = Newton
type = Transient
dt = 1E6
end_time = 1E6
nl_rel_tol = 1E-7
[]
[Outputs]
exodus = true
[]
(test/tests/controls/conditional_functional_enable/conditional_function_enable.i)
# This tests controllability of the enable parameter of a MOOSE object via a
# conditional function.
#
# There are 2 scalar variables, {u, v}, with the ODEs:
# du/dt = 1 u(0) = 0
# v = u v(0) = -10
# A control switches the ODE 'v = u' to the following ODE when u >= 1.99:
# dv/dt = 2
#
# 5 time steps (of size dt = 1) will be taken, and the predicted values are as follows:
# t u v
# ------------------
# 0 0 -10
# 1 1 1
# 2 2 2
# 3 3 4
# 4 4 6
# 5 5 8
u_initial = 0
u_growth = 1
u_threshold = 1.99
v_initial = -10
v_growth = 2
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
[]
[Variables]
[./u]
family = SCALAR
order = FIRST
[../]
[./v]
family = SCALAR
order = FIRST
[../]
[]
[ICs]
[./u_ic]
type = ScalarConstantIC
variable = u
value = ${u_initial}
[../]
[./v_ic]
type = ScalarConstantIC
variable = v
value = ${v_initial}
[../]
[]
[ScalarKernels]
[./u_time]
type = ODETimeDerivative
variable = u
[../]
[./u_src]
type = ParsedODEKernel
variable = u
expression = '-${u_growth}'
[../]
[./v_time]
type = ODETimeDerivative
variable = v
enable = false
[../]
[./v_src]
type = ParsedODEKernel
variable = v
expression = '-${v_growth}'
enable = false
[../]
[./v_constraint]
type = ParsedODEKernel
variable = v
coupled_variables = 'u'
expression = 'v - u'
[../]
[]
[Functions]
[./conditional_function]
type = ParsedFunction
symbol_names = 'u_sol'
symbol_values = 'u'
expression = 'u_sol >= ${u_threshold}'
[../]
[]
[Controls]
[./u_threshold]
type = ConditionalFunctionEnableControl
conditional_function = conditional_function
enable_objects = 'ScalarKernel::v_time ScalarKernel::v_src'
disable_objects = 'ScalarKernel::v_constraint'
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
[Executioner]
type = Transient
scheme = implicit-euler
dt = 1
num_steps = 5
abort_on_solve_fail = true
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
[]
[Outputs]
csv = true
[]
(test/tests/utils/mathutils/smootherstep.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Problem]
solve = false
[]
[Functions]
[./smootherstep_value]
type = SmootherStepTestFunction
[../]
[./exact_value]
type = ParsedFunction
expression = 'u := (x - 0.2) / (0.8 - 0.2);
val := 6.0 * u^5 - 15 * u^4 + 10 * u^3;
if(x < 0.2, 0, if(x > 0.8, 1, val))'
[../]
[./smootherstep_derivative]
type = SmootherStepTestFunction
derivative = true
[../]
[./exact_derivative]
type = ParsedFunction
expression = 'u := (x - 0.2) / (0.8 - 0.2);
val := 30.0 * u^4 - 60 * u^3 + 30 * u^2;
if(x < 0.2, 0, if(x > 0.8, 0, val / (0.8 - 0.2)))'
[../]
[]
[VectorPostprocessors]
[./functions]
type = LineFunctionSampler
functions = 'smootherstep_value exact_value smootherstep_derivative exact_derivative'
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 10
sort_by = x
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/wall_convection/steady.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[temperature][]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./mass_pspg]
type = INSADMassPSPG
variable = p
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[../]
[./momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[../]
[./temperature_advection]
type = INSADEnergyAdvection
variable = temperature
[../]
[./temperature_conduction]
type = ADHeatConduction
variable = temperature
thermal_conductivity = 'k'
[../]
[temperature_ambient_convection]
type = INSADEnergyAmbientConvection
variable = temperature
alpha = 1
T_ambient = 0.5
[]
[temperature_supg]
type = INSADEnergySUPG
variable = temperature
velocity = velocity
[]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left'
[../]
[./lid]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 'lid_function'
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[./temperature_hot]
type = DirichletBC
variable = temperature
boundary = 'bottom'
value = 1
[../]
[./temperature_cold]
type = DirichletBC
variable = temperature
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = temperature
[]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/hs_coupler_2d3d/hs_coupler_2d3d.i)
# Tests physics and energy conservation for HSCoupler2D3D.
R_pipe = 0.005
length_matrix = 0.5
length_extend = 0.6
n_elems_radial = 3
n_elems_axial_matrix = 10
n_elems_axial_extend = 12
[Materials]
[matrix_mat]
type = ADGenericConstantMaterial
block = 'hs3d:0 hs2d:pipe'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '8000 500 15'
[]
[]
[Functions]
[initial_T_matrix_fn]
type = ParsedFunction
expression = '300 + 100*z - 1000*x'
[]
[]
[Components]
[hs3d]
type = HeatStructureFromFile3D
file = mesh/mesh.e
position = '0 0 0'
initial_T = initial_T_matrix_fn
[]
[hs2d]
type = HeatStructureCylindrical
orientation = '0 0 1'
position = '0 0 0'
length = '${length_matrix} ${length_extend}'
n_elems = '${n_elems_axial_matrix} ${n_elems_axial_extend}'
axial_region_names = 'matrix extend'
inner_radius = 0
widths = '${R_pipe}'
n_part_elems = '${n_elems_radial}'
names = 'pipe'
initial_T = 300
[]
[hs_coupler]
type = HSCoupler2D3D
heat_structure_2d = hs2d
heat_structure_3d = hs3d
boundary_2d = hs2d:matrix:outer
boundary_3d = hs3d:rmin
emissivity_2d = 0.4
emissivity_3d = 0.6
gap_thickness = 0.00001
gap_thermal_conductivity = 0.05
[]
[]
[Postprocessors]
[energy_hs3d]
type = ADHeatStructureEnergy3D
block = 'hs3d:0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_hs2d]
type = ADHeatStructureEnergyRZ
block = 'hs2d:pipe'
axis_dir = '0 0 1'
axis_point = '0 0 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[total_energy]
type = SumPostprocessor
values = 'energy_hs3d energy_hs2d'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = total_energy
compute_relative_change = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 0.1
num_steps = 10
solve_type = NEWTON
abort_on_solve_fail = true
nl_abs_tol = 1e-8
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
exodus = true
[]
(test/tests/variables/linearfv/diffusion-1d-pp.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 50
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = coeff_func
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "left right"
functor = analytic_solution
[]
[]
[Functions]
[coeff_func]
type = ParsedFunction
expression = '0.5*x'
[]
[source_func]
type = ParsedFunction
expression = '2*x'
[]
[analytic_solution]
type = ParsedFunction
expression = '1-x*x'
[]
[]
[Postprocessors]
[average]
type = ElementAverageValue
variable = u
execute_on = FINAL
outputs = csv
[]
[min]
type = ElementExtremeValue
variable = u
value_type = min
execute_on = FINAL
outputs = csv
[]
[max]
type = ElementExtremeValue
variable = u
value_type = max
execute_on = FINAL
outputs = csv
[]
[num_dofs]
type = NumDOFs
execute_on = FINAL
outputs = csv
[]
[elem_value]
type = ElementalVariableValue
variable = u
elementid = 10
execute_on = FINAL
outputs = csv
[]
[point_value]
type = PointValue
variable = u
point = '0.33333 0 0'
execute_on = FINAL
outputs = csv
[]
[]
[VectorPostprocessors]
[line-sample]
type = LineValueSampler
variable = u
start_point = '0.13333 0 0'
end_point = '0.766666 0 0'
num_points = 9
sort_by = x
execute_on = FINAL
outputs = vpp_csv
[]
[]
[Executioner]
type = LinearPicardSteady
linear_systems_to_solve = u_sys
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
[csv]
type = CSV
execute_on = FINAL
[]
[vpp_csv]
type = CSV
execute_on = FINAL
[]
[]
(test/tests/userobjects/element_subdomain_modifier/steady.i)
[Problem]
solve = false
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 16
ny = 16
[]
[left]
type = SubdomainBoundingBoxGenerator
input = 'gen'
block_id = 1
bottom_left = '0 0 0'
top_right = '0.25 1 1'
[]
[right]
type = SubdomainBoundingBoxGenerator
input = 'left'
block_id = 2
bottom_left = '0.25 0 0'
top_right = '1 1 1'
[]
[]
[UserObjects]
[moving_circle]
type = CoupledVarThresholdElementSubdomainModifier
coupled_var = 'phi'
block = 2
criterion_type = BELOW
threshold = 0
subdomain_id = 1
moving_boundary_name = moving_boundary
execute_on = 'INITIAL'
[]
[]
[Functions]
[moving_circle]
type = ParsedFunction
expression = '(x-t)^2+(y)^2-0.5^2'
[]
[]
[AuxVariables]
[phi]
[]
[]
[AuxKernels]
[phi]
type = FunctionAux
variable = phi
function = moving_circle
execute_on = 'INITIAL'
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/cns/straight_channel_porosity_step/hllc.i)
p_initial=1.01e5
T=273.15
# u refers to the superficial velocity
u_in=1
[GlobalParams]
fp = fp
two_term_boundary_expansion = true
[]
[Mesh]
[cartesian]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = 18
nx = 180
[]
[to_pt5]
input = cartesian
type = SubdomainBoundingBoxGenerator
bottom_left = '2 0 0'
top_right = '4 1 0'
block_id = 1
[]
[pt5]
input = to_pt5
type = SubdomainBoundingBoxGenerator
bottom_left = '4 0 0'
top_right = '6 1 0'
block_id = 2
[]
[to_pt25]
input = pt5
type = SubdomainBoundingBoxGenerator
bottom_left = '6 0 0'
top_right = '8 1 0'
block_id = 3
[]
[pt25]
input = to_pt25
type = SubdomainBoundingBoxGenerator
bottom_left = '8 0 0'
top_right = '10 1 0'
block_id = 4
[]
[to_pt5_again]
input = pt25
type = SubdomainBoundingBoxGenerator
bottom_left = '10 0 0'
top_right = '12 1 0'
block_id = 5
[]
[pt5_again]
input = to_pt5_again
type = SubdomainBoundingBoxGenerator
bottom_left = '12 0 0'
top_right = '14 1 0'
block_id = 6
[]
[to_one]
input = pt5_again
type = SubdomainBoundingBoxGenerator
bottom_left = '14 0 0'
top_right = '16 1 0'
block_id = 7
[]
[one]
input = to_one
type = SubdomainBoundingBoxGenerator
bottom_left = '16 0 0'
top_right = '18 1 0'
block_id = 8
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Problem]
fv_bcs_integrity_check = false
[]
[Variables]
[pressure]
type = MooseVariableFVReal
initial_condition = ${p_initial}
[]
[sup_vel_x]
type = MooseVariableFVReal
initial_condition = 1
scaling = 1e-2
[]
[T_fluid]
type = MooseVariableFVReal
initial_condition = ${T}
scaling = 1e-5
[]
[]
[AuxVariables]
[vel_x]
type = MooseVariableFVReal
[]
[sup_mom_x]
type = MooseVariableFVReal
[]
[rho]
type = MooseVariableFVReal
[]
[worst_courant]
type = MooseVariableFVReal
[]
[porosity]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[vel_x]
type = ADMaterialRealAux
variable = vel_x
property = vel_x
execute_on = 'timestep_end'
[]
[sup_mom_x]
type = ADMaterialRealAux
variable = sup_mom_x
property = superficial_rhou
execute_on = 'timestep_end'
[]
[rho]
type = ADMaterialRealAux
variable = rho
property = rho
execute_on = 'timestep_end'
[]
[worst_courant]
type = Courant
variable = worst_courant
u = sup_vel_x
execute_on = 'timestep_end'
[]
[porosity]
type = MaterialRealAux
variable = porosity
property = porosity
execute_on = 'timestep_end'
[]
[]
[FVKernels]
[mass_advection]
type = PCNSFVMassHLLC
variable = pressure
[]
[momentum_advection]
type = PCNSFVMomentumHLLC
variable = sup_vel_x
momentum_component = 'x'
[]
[eps_grad]
type = PNSFVPGradEpsilon
variable = sup_vel_x
momentum_component = 'x'
epsilon_function = 'eps'
[]
[energy_advection]
type = PCNSFVFluidEnergyHLLC
variable = T_fluid
[]
[]
[FVBCs]
[rho_left]
type = PCNSFVStrongBC
boundary = 'left'
variable = pressure
superficial_velocity = 'ud_in'
T_fluid = ${T}
eqn = 'mass'
[]
[rhou_left]
type = PCNSFVStrongBC
boundary = 'left'
variable = sup_vel_x
superficial_velocity = 'ud_in'
T_fluid = ${T}
eqn = 'momentum'
momentum_component = 'x'
[]
[rho_et_left]
type = PCNSFVStrongBC
boundary = 'left'
variable = T_fluid
superficial_velocity = 'ud_in'
T_fluid = ${T}
eqn = 'energy'
[]
[rho_right]
type = PCNSFVStrongBC
boundary = 'right'
variable = pressure
pressure = ${p_initial}
eqn = 'mass'
[]
[rhou_right]
type = PCNSFVStrongBC
boundary = 'right'
variable = sup_vel_x
pressure = ${p_initial}
eqn = 'momentum'
momentum_component = 'x'
[]
[rho_et_right]
type = PCNSFVStrongBC
boundary = 'right'
variable = T_fluid
pressure = ${p_initial}
eqn = 'energy'
[]
# Use these to help create more accurate cell centered gradients for cells adjacent to boundaries
[T_left]
type = FVDirichletBC
variable = T_fluid
value = ${T}
boundary = 'left'
[]
[sup_vel_left]
type = FVDirichletBC
variable = sup_vel_x
value = ${u_in}
boundary = 'left'
[]
[p_right]
type = FVDirichletBC
variable = pressure
value = ${p_initial}
boundary = 'right'
[]
[]
[Functions]
[ud_in]
type = ParsedVectorFunction
expression_x = '${u_in}'
[]
[eps]
type = ParsedFunction
expression = 'if(x < 2, 1,
if(x < 4, 1 - .5 / 2 * (x - 2),
if(x < 6, .5,
if(x < 8, .5 - .25 / 2 * (x - 6),
if(x < 10, .25,
if(x < 12, .25 + .25 / 2 * (x - 10),
if(x < 14, .5,
if(x < 16, .5 + .5 / 2 * (x - 14),
1))))))))'
[]
[]
[Materials]
[var_mat]
type = PorousPrimitiveVarMaterial
pressure = pressure
T_fluid = T_fluid
superficial_vel_x = sup_vel_x
porosity = porosity
[]
[porosity]
type = GenericFunctionMaterial
prop_names = 'porosity'
prop_values = 'eps'
[]
[]
[Executioner]
solve_type = NEWTON
line_search = 'bt'
type = Steady
[]
[Outputs]
[out]
type = Exodus
execute_on = 'final'
[]
checkpoint = true
[]
[Debug]
show_var_residual_norms = true
[]
(test/tests/userobjects/element_subdomain_modifier/reversible.i)
[Problem]
solve = false
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 16
ny = 16
[]
[left]
type = SubdomainBoundingBoxGenerator
input = 'gen'
block_id = 1
bottom_left = '0 0 0'
top_right = '0.25 1 1'
[]
[right]
type = SubdomainBoundingBoxGenerator
input = 'left'
block_id = 2
bottom_left = '0.25 0 0'
top_right = '1 1 1'
[]
[]
[UserObjects]
[moving_circle]
type = CoupledVarThresholdElementSubdomainModifier
coupled_var = 'phi'
criterion_type = BELOW
threshold = 0
subdomain_id = 1
complement_subdomain_id = 2
moving_boundary_name = moving_boundary
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[Functions]
[moving_circle]
type = ParsedFunction
expression = '(x-t)^2+(y)^2-0.5^2'
[]
[]
[AuxVariables]
[phi]
[InitialCondition]
type = FunctionIC
function = moving_circle
[]
[]
[]
[AuxKernels]
[phi]
type = FunctionAux
variable = phi
function = moving_circle
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[Executioner]
type = Transient
dt = 0.3
num_steps = 3
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/block-restriction/two-mats-one-eqn-set.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = 0
ymax = 1
nx = 16
ny = 8
elem_type = QUAD9
[]
[./corner_node_0]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_0'
coord = '0 0 0'
input = gen
[../]
[./corner_node_1]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_1'
coord = '1 0 0'
input = corner_node_0
[../]
[./subdomain1]
input = corner_node_1
type = SubdomainBoundingBoxGenerator
bottom_left = '1 0 0'
top_right = '2 1 0'
block_id = 1
[../]
[./break_boundary]
input = subdomain1
type = BreakBoundaryOnSubdomainGenerator
[../]
[./interface0]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '0'
paired_block = '1'
new_boundary = 'interface0'
[../]
[./interface1]
type = SideSetsBetweenSubdomainsGenerator
input = interface0
primary_block = '1'
paired_block = '0'
new_boundary = 'interface1'
[../]
[]
[Variables]
[velocity0]
order = SECOND
family = LAGRANGE_VEC
[]
[T0]
order = SECOND
[InitialCondition]
type = ConstantIC
value = 1.0
[]
[]
[p0]
[]
[]
[Kernels]
[./mass0]
type = INSADMass
variable = p0
[../]
[./momentum_time0]
type = INSADMomentumTimeDerivative
variable = velocity0
[../]
[./momentum_convection0]
type = INSADMomentumAdvection
variable = velocity0
[../]
[./momentum_viscous0]
type = INSADMomentumViscous
variable = velocity0
[../]
[./momentum_pressure0]
type = INSADMomentumPressure
variable = velocity0
pressure = p0
integrate_p_by_parts = true
[../]
[./temperature_time0]
type = INSADHeatConductionTimeDerivative
variable = T0
[../]
[./temperature_advection0]
type = INSADEnergyAdvection
variable = T0
[../]
[./temperature_conduction0]
type = ADHeatConduction
variable = T0
thermal_conductivity = 'k'
[../]
[]
[BCs]
[./no_slip0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'bottom_to_0 interface0 left'
[../]
[./lid0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'top_to_0'
function_x = 'lid_function0'
[../]
[./T_hot0]
type = DirichletBC
variable = T0
boundary = 'bottom_to_0'
value = 1
[../]
[./T_cold0]
type = DirichletBC
variable = T0
boundary = 'top_to_0'
value = 0
[../]
[./pressure_pin0]
type = DirichletBC
variable = p0
boundary = 'pinned_node_0'
value = 0
[../]
[./no_slip1]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'bottom_to_1 interface1 right'
[../]
[./lid1]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'top_to_1'
function_x = 'lid_function1'
[../]
[./T_hot1]
type = DirichletBC
variable = T0
boundary = 'bottom_to_1'
value = 1
[../]
[./T_cold1]
type = DirichletBC
variable = T0
boundary = 'top_to_1'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat0]
type = INSAD3Eqn
velocity = velocity0
pressure = p0
temperature = T0
block = '0'
[]
[ins_mat1]
type = INSAD3Eqn
velocity = velocity0
pressure = p0
temperature = T0
block = '1'
[]
[]
[Functions]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
[./lid_function0]
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[./lid_function1]
type = ParsedFunction
expression = '4*(x-1)*(2-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels -sub_pc_factor_shift_type'
petsc_options_value = 'asm 2 ilu 4 NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/block-restriction/one-mat-two-eqn-sets.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = 0
ymax = 1
nx = 16
ny = 8
elem_type = QUAD9
[]
[./corner_node_0]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_0'
coord = '0 0 0'
input = gen
[../]
[./corner_node_1]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_1'
coord = '1 0 0'
input = corner_node_0
[../]
[./subdomain1]
input = corner_node_1
type = SubdomainBoundingBoxGenerator
bottom_left = '1 0 0'
top_right = '2 1 0'
block_id = 1
[../]
[./break_boundary]
input = subdomain1
type = BreakBoundaryOnSubdomainGenerator
[../]
[./interface0]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '0'
paired_block = '1'
new_boundary = 'interface0'
[../]
[./interface1]
type = SideSetsBetweenSubdomainsGenerator
input = interface0
primary_block = '1'
paired_block = '0'
new_boundary = 'interface1'
[../]
[]
[Variables]
[velocity0]
order = SECOND
family = LAGRANGE_VEC
[]
[T0]
order = SECOND
[InitialCondition]
type = ConstantIC
value = 1.0
[]
[]
[p0]
[]
[]
[Kernels]
[./mass0]
type = INSADMass
variable = p0
block = 0
[../]
[./momentum_time0]
type = INSADMomentumTimeDerivative
variable = velocity0
block = 0
[../]
[./momentum_convection0]
type = INSADMomentumAdvection
variable = velocity0
block = 0
[../]
[./momentum_viscous0]
type = INSADMomentumViscous
variable = velocity0
block = 0
[../]
[./momentum_pressure0]
type = INSADMomentumPressure
variable = velocity0
pressure = p0
integrate_p_by_parts = true
block = 0
[../]
[./temperature_time0]
type = INSADHeatConductionTimeDerivative
variable = T0
block = 0
[../]
[./temperature_advection0]
type = INSADEnergyAdvection
variable = T0
block = 0
[../]
[./temperature_conduction0]
type = ADHeatConduction
variable = T0
thermal_conductivity = 'k'
block = 0
[../]
[./mass1]
type = INSADMass
variable = p0
block = 1
[../]
[./momentum_time1]
type = INSADMomentumTimeDerivative
variable = velocity0
block = 1
[../]
[./momentum_convection1]
type = INSADMomentumAdvection
variable = velocity0
block = 1
[../]
[./momentum_viscous1]
type = INSADMomentumViscous
variable = velocity0
block = 1
[../]
[./momentum_pressure1]
type = INSADMomentumPressure
variable = velocity0
pressure = p0
integrate_p_by_parts = true
block = 1
[../]
[./temperature_time1]
type = INSADHeatConductionTimeDerivative
variable = T0
block = 1
[../]
[./temperature_advection1]
type = INSADEnergyAdvection
variable = T0
block = 1
[../]
[./temperature_conduction1]
type = ADHeatConduction
variable = T0
thermal_conductivity = 'k'
block = 1
[../]
[]
[BCs]
[./no_slip0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'bottom_to_0 interface0 left'
[../]
[./lid0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'top_to_0'
function_x = 'lid_function0'
[../]
[./T_hot0]
type = DirichletBC
variable = T0
boundary = 'bottom_to_0'
value = 1
[../]
[./T_cold0]
type = DirichletBC
variable = T0
boundary = 'top_to_0'
value = 0
[../]
[./pressure_pin0]
type = DirichletBC
variable = p0
boundary = 'pinned_node_0'
value = 0
[../]
[./no_slip1]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'bottom_to_1 interface1 right'
[../]
[./lid1]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'top_to_1'
function_x = 'lid_function1'
[../]
[./T_hot1]
type = DirichletBC
variable = T0
boundary = 'bottom_to_1'
value = 1
[../]
[./T_cold1]
type = DirichletBC
variable = T0
boundary = 'top_to_1'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat0]
type = INSAD3Eqn
velocity = velocity0
pressure = p0
temperature = T0
block = '0 1'
[]
[]
[Functions]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
[./lid_function0]
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[./lid_function1]
type = ParsedFunction
expression = '4*(x-1)*(2-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels -sub_pc_factor_shift_type'
petsc_options_value = 'asm 2 ilu 4 NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
exodus = true
[]
(test/tests/dgkernels/ad_dg_diffusion/2d_diffusion_ad_dg_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[u]
order = FIRST
family = MONOMIAL
[InitialCondition]
type = ConstantIC
value = 1
[]
[]
[]
[Functions]
[forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[]
[exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[abs] # u * v
type = Reaction
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[DGKernels]
[dg_diff]
type = ADDGDiffusion
variable = u
epsilon = -1
sigma = 6
diff = diff
[]
[]
[Materials]
[ad_coupled_mat]
type = ADCoupledMaterial
coupled_var = u
ad_mat_prop = diff
regular_mat_prop = diff_regular
[]
[]
[BCs]
[all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[Adaptivity]
steps = 2
refine_fraction = 1.0
coarsen_fraction = 0
max_h_level = 8
[]
nl_rel_tol = 1e-10
[]
[Postprocessors]
[h]
type = AverageElementSize
[]
[dofs]
type = NumDOFs
[]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[]
[]
[Outputs]
exodus = true
[]
(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
[]
(modules/navier_stokes/test/tests/finite_volume/ins/lid-driven/transient-lid-driven-with-energy.i)
mu = 1
rho = 1
k = .01
cp = 1
velocity_interp_method = 'rc'
advected_interp_method = 'average'
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
[]
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 32
ny = 32
[]
[pin]
type = ExtraNodesetGenerator
input = gen
new_boundary = 'pin'
nodes = '0'
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
[]
[v]
type = INSFVVelocityVariable
[]
[pressure]
type = INSFVPressureVariable
[]
[T]
type = INSFVEnergyVariable
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[ICs]
[T]
type = ConstantIC
variable = T
value = 1
[]
[]
[AuxVariables]
[U]
order = CONSTANT
family = MONOMIAL
fv = true
[]
[]
[AuxKernels]
[mag]
type = VectorMagnitudeAux
variable = U
x = u
y = v
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[mean_zero_pressure]
type = FVIntegralValueConstraint
variable = pressure
lambda = lambda
[]
[u_time]
type = INSFVMomentumTimeDerivative
variable = 'u'
rho = ${rho}
momentum_component = 'x'
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[v_time]
type = INSFVMomentumTimeDerivative
variable = v
rho = ${rho}
momentum_component = 'y'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[temp_time]
type = INSFVEnergyTimeDerivative
variable = T
rho = ${rho}
dh_dt = dh_dt
[]
[temp_conduction]
type = FVDiffusion
coeff = 'k'
variable = T
[]
[temp_advection]
type = INSFVEnergyAdvection
variable = T
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
[]
[]
[FVBCs]
[top_x]
type = INSFVNoSlipWallBC
variable = u
boundary = 'top'
function = 'lid_function'
[]
[no_slip_x]
type = INSFVNoSlipWallBC
variable = u
boundary = 'left right bottom'
function = 0
[]
[no_slip_y]
type = INSFVNoSlipWallBC
variable = v
boundary = 'left right top bottom'
function = 0
[]
[T_hot]
type = FVDirichletBC
variable = T
boundary = 'bottom'
value = 1
[]
[T_cold]
type = FVDirichletBC
variable = T
boundary = 'top'
value = 0
[]
[]
[FunctorMaterials]
[functor_constants]
type = ADGenericFunctorMaterial
prop_names = 'cp k'
prop_values = '${cp} ${k}'
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = 'T'
rho = ${rho}
[]
[]
[Functions]
[lid_function]
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(test/tests/fvkernels/fv_adapt/steady-adapt.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 1
elem_type = QUAD4
[]
[]
[Variables]
[u]
order = CONSTANT
family = MONOMIAL
fv = true
type = MooseVariableFVReal
[]
[]
[Functions]
[exact-quadratic]
type = ParsedFunction
expression = '-(x-1)^2+1'
[]
[exact-linear]
type = ParsedFunction
expression = 'x'
[]
[]
[FVKernels]
inactive = 'source'
[diff]
type = FVDiffusion
variable = u
coeff = coeff
use_point_neighbors = true
[]
[source]
type = FVBodyForce
variable = u
function = 2
[]
[]
[FVBCs]
[right]
type = FVDirichletBC
variable = u
boundary = right
value = 1
[]
[left]
type = FVDirichletBC
variable = u
boundary = left
value = 0
[]
[]
[Materials]
[diff]
type = ADGenericFunctorMaterial
prop_names = 'coeff'
prop_values = '1'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'hypre'
[]
[Adaptivity]
marker = box
initial_steps = 1
[Markers]
[box]
bottom_left = '0.5 0 0'
inside = refine
top_right = '1 1 0'
outside = do_nothing
type = BoxMarker
[]
[]
[]
[Outputs]
exodus = true
csv = true
[console]
type = Console
system_info = 'framework mesh aux nonlinear relationship execution'
[]
[]
[Postprocessors]
[error]
type = ElementL2Error
variable = u
function = exact-linear
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(modules/solid_mechanics/examples/coal_mining/coarse.i)
# Strata deformation and fracturing around a coal mine - 3D model
#
# A "half model" is used. The mine is 400m deep and
# just the roof is studied (-400<=z<=0). The mining panel
# sits between 0<=x<=150, and 0<=y<=1000, so this simulates
# a coal panel that is 300m wide and 1000m long. The outer boundaries
# are 1km from the excavation boundaries.
#
# Time is meaningless in this example
# as quasi-static solutions are sought at each timestep, but
# the number of timesteps controls the resolution of the
# process.
#
# The boundary conditions for this simulation are:
# - disp_x = 0 at x=0 and x=1150
# - disp_y = 0 at y=-1000 and y=1000
# - disp_z = 0 at z=-400, but there is a time-dependent
# Young's modulus that simulates excavation
# - wc_x = 0 at y=-1000 and y=1000
# - wc_y = 0 at x=0 and x=1150
# That is, rollers on the sides, free at top,
# and prescribed at bottom in the unexcavated portion.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa. The initial stress is consistent with
# the weight force from density 2500 kg/m^3, ie, stress_zz = 0.025*z MPa
# where gravity = 10 m.s^-2 = 1E-5 MPa m^2/kg. The maximum and minimum
# principal horizontal stresses are assumed to be equal to 0.8*stress_zz.
#
# Material properties:
# Young's modulus = 8 GPa
# Poisson's ratio = 0.25
# Cosserat layer thickness = 1 m
# Cosserat-joint normal stiffness = large
# Cosserat-joint shear stiffness = 1 GPa
# MC cohesion = 3 MPa
# MC friction angle = 37 deg
# MC dilation angle = 8 deg
# MC tensile strength = 1 MPa
# MC compressive strength = 100 MPa
# WeakPlane cohesion = 0.1 MPa
# WeakPlane friction angle = 30 deg
# WeakPlane dilation angle = 10 deg
# WeakPlane tensile strength = 0.1 MPa
# WeakPlane compressive strength = 100 MPa softening to 1 MPa at strain = 1
#
[Mesh]
[file]
type = FileMeshGenerator
file = mesh/coarse.e
[]
[./xmin]
input = file
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
new_boundary = xmin
normal = '-1 0 0'
[../]
[./xmax]
input = xmin
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
new_boundary = xmax
normal = '1 0 0'
[../]
[./ymin]
input = xmax
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
new_boundary = ymin
normal = '0 -1 0'
[../]
[./ymax]
input = ymin
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
new_boundary = ymax
normal = '0 1 0'
[../]
[./zmax]
input = ymax
type = SideSetsAroundSubdomainGenerator
block = 16
new_boundary = zmax
normal = '0 0 1'
[../]
[./zmin]
input = zmax
type = SideSetsAroundSubdomainGenerator
block = 2
new_boundary = zmin
normal = '0 0 -1'
[../]
[./excav]
type = SubdomainBoundingBoxGenerator
input = zmin
block_id = 1
bottom_left = '0 0 -400'
top_right = '150 1000 -397'
[../]
[./roof]
type = SideSetsAroundSubdomainGenerator
block = 1
input = excav
new_boundary = roof
normal = '0 0 1'
[../]
[]
[GlobalParams]
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./wc_x]
[../]
[./wc_y]
[../]
[]
[Kernels]
[./cx_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_x
component = 0
[../]
[./cy_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_y
component = 1
[../]
[./cz_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_z
component = 2
[../]
[./x_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[../]
[./y_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_y
displacements = 'wc_x wc_y wc_z'
component = 1
base_name = couple
[../]
[./x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[../]
[./y_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_y
component = 1
[../]
[./gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6 # remember this is in MPa
[../]
[]
[AuxVariables]
[./wc_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[../]
[./stress_yx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yx
index_i = 1
index_j = 0
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zx
index_i = 2
index_j = 0
[../]
[./stress_zy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zy
index_i = 2
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./mc_shear]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_internal_parameter
variable = mc_shear
[../]
[./mc_tensile]
type = MaterialStdVectorAux
index = 1
property = mc_plastic_internal_parameter
variable = mc_tensile
[../]
[./wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
[../]
[./wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
[../]
[./mc_shear_f]
type = MaterialStdVectorAux
index = 6
property = mc_plastic_yield_function
variable = mc_shear_f
[../]
[./mc_tensile_f]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_yield_function
variable = mc_tensile_f
[../]
[./wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
[../]
[./wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
[../]
[]
[BCs]
[./no_x]
type = DirichletBC
variable = disp_x
boundary = 'xmin xmax'
value = 0.0
[../]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = 'ymin ymax'
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = zmin
value = 0.0
[../]
[./no_wc_x]
type = DirichletBC
variable = wc_x
boundary = 'ymin ymax'
value = 0.0
[../]
[./no_wc_y]
type = DirichletBC
variable = wc_y
boundary = 'xmin xmax'
value = 0.0
[../]
[./roof]
type = StickyBC
variable = disp_z
min_value = -3.0
boundary = roof
[../]
[]
[Functions]
[./ini_xx]
type = ParsedFunction
expression = '0.8*2500*10E-6*z'
[../]
[./ini_zz]
type = ParsedFunction
expression = '2500*10E-6*z'
[../]
[./excav_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval slope'
symbol_values = '17.0 0 1000.0 1E-9 1 60'
# excavation face at ymin+(ymax-ymin)*min(t/end_t,1)
# slope is the distance over which the modulus reduces from maxval to minval
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,if(y<ymin+(ymax-ymin)*min(t/end_t,1)+slope,minval+(maxval-minval)*(y-(ymin+(ymax-ymin)*min(t/end_t,1)))/slope,maxval))'
[../]
[./density_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval'
symbol_values = '17.0 0 1000.0 0 2500'
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,maxval)'
[../]
[]
[UserObjects]
[./mc_coh_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 2.99 # MPa
value_residual = 3.01 # MPa
rate = 1.0
[../]
[./mc_fric]
type = SolidMechanicsHardeningConstant
value = 0.65 # 37deg
[../]
[./mc_dil]
type = SolidMechanicsHardeningConstant
value = 0.15 # 8deg
[../]
[./mc_tensile_str_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.0 # MPa
rate = 1.0
[../]
[./mc_compressive_str]
type = SolidMechanicsHardeningCubic
value_0 = 100 # Large!
value_residual = 100
internal_limit = 0.1
[../]
[./wp_coh_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_tan_fric]
type = SolidMechanicsHardeningConstant
value = 0.36 # 20deg
[../]
[./wp_tan_dil]
type = SolidMechanicsHardeningConstant
value = 0.18 # 10deg
[../]
[./wp_tensile_str_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_compressive_str_soften]
type = SolidMechanicsHardeningCubic
value_0 = 100
value_residual = 1
internal_limit = 1.0
[../]
[]
[Materials]
[./elasticity_tensor_0]
type = ComputeLayeredCosseratElasticityTensor
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
[../]
[./elasticity_tensor_1]
type = ComputeLayeredCosseratElasticityTensor
block = 1
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
elasticity_tensor_prefactor = excav_sideways
[../]
[./strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[../]
[./ini_stress]
type = ComputeEigenstrainFromInitialStress
eigenstrain_name = ini_stress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
[../]
[./stress_0]
type = ComputeMultipleInelasticCosseratStress
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
inelastic_models = 'mc wp'
cycle_models = true
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./stress_1]
type = ComputeMultipleInelasticCosseratStress
block = 1
inelastic_models = ''
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./mc]
type = CappedMohrCoulombCosseratStressUpdate
warn_about_precision_loss = false
host_youngs_modulus = 8E3
host_poissons_ratio = 0.25
base_name = mc
tensile_strength = mc_tensile_str_strong_harden
compressive_strength = mc_compressive_str
cohesion = mc_coh_strong_harden
friction_angle = mc_fric
dilation_angle = mc_dil
max_NR_iterations = 100000
smoothing_tol = 0.1 # MPa # Must be linked to cohesion
yield_function_tol = 1E-9 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[../]
[./wp]
type = CappedWeakPlaneCosseratStressUpdate
warn_about_precision_loss = false
base_name = wp
cohesion = wp_coh_harden
tan_friction_angle = wp_tan_fric
tan_dilation_angle = wp_tan_dil
tensile_strength = wp_tensile_str_harden
compressive_strength = wp_compressive_str_soften
max_NR_iterations = 10000
tip_smoother = 0.1
smoothing_tol = 0.1 # MPa # Note, this must be tied to cohesion, otherwise get no possible return at cone apex
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0E-3
[../]
[./density_0]
type = GenericConstantMaterial
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
prop_names = density
prop_values = 2500
[../]
[./density_1]
type = GenericFunctionMaterial
block = 1
prop_names = density
prop_values = density_sideways
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[]
[]
[Postprocessors]
[./min_roof_disp]
type = NodalExtremeValue
boundary = roof
value_type = min
variable = disp_z
[../]
[./min_surface_disp]
type = NodalExtremeValue
boundary = zmax
value_type = min
variable = disp_z
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' bjacobi gmres 200'
line_search = bt
nl_abs_tol = 1e-3
nl_rel_tol = 1e-5
l_max_its = 30
nl_max_its = 1000
start_time = 0.0
dt = 0.5 # this gives min(disp_z)=-4.3, use dt=0.0625 if you want to restrict disp_z>=-3.2
end_time = 17.0
[]
[Outputs]
time_step_interval = 1
print_linear_residuals = false
exodus = true
csv = true
console = 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/thermal_hydraulics/test/tests/components/hs_boundary_external_app_temperature/phy.parent.i)
# This tests a transfer of temperature values computed by master app and used by a child app
# as a heat structure boundary condition
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 1
nx = 10
[]
[Functions]
[T_bc_fn]
type = ParsedFunction
expression = '300+t*x*10'
[]
[T_ffn]
type = ParsedFunction
expression = 'x*10'
[]
[]
[Variables]
[T]
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T
value = 300
[]
[]
[Kernels]
[td]
type = ADTimeDerivative
variable = T
[]
[diff]
type = ADDiffusion
variable = T
[]
[ffn]
type = BodyForce
variable = T
function = T_ffn
[]
[]
[BCs]
[left]
type = FunctionDirichletBC
variable = T
boundary = 'left right'
function = T_bc_fn
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 2
nl_abs_tol = 1e-10
abort_on_solve_fail = true
solve_type = NEWTON
[]
[MultiApps]
[thm]
type = TransientMultiApp
app_type = ThermalHydraulicsApp
input_files = phy.child.i
execute_on = 'initial timestep_end'
[]
[]
[Transfers]
[T_to_thm]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = thm
source_variable = T
variable = T_ext
to_boundaries = 'hs:outer'
[]
[]
[Outputs]
exodus = true
show = 'T'
[]
(test/tests/postprocessors/num_adaptivity_cycles/num_adaptivity_cycles.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1
solve_type = 'PJFNK'
[]
[Adaptivity]
cycles_per_step = 1
marker = box
max_h_level = 2
initial_steps = 4
initial_marker = initial_box
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = dont_mark
type = BoxMarker
[../]
[./initial_box]
type = BoxMarker
bottom_left = '0.8 0.1 0'
top_right = '0.9 0.2 0'
inside = refine
outside = dont_mark
[../]
[../]
[]
[Postprocessors]
[./adaptivity_cycles]
type = NumAdaptivityCycles
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
csv = true
[]
(modules/combined/test/tests/beam_eigenstrain_transfer/subapp_err_4.i)
# SubApp with 2D model to test multi app vectorpostprocessor to aux var transfer
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 5
xmin = 0.0
xmax = 0.5
ymin = 0.0
ymax = 0.150080
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./temp]
[../]
[./axial_strain]
order = FIRST
family = MONOMIAL
[../]
[]
[Functions]
[./temperature_load]
type = ParsedFunction
expression = t*(500.0)+300.0
[../]
[]
[Modules]
[./TensorMechanics]
[./Master]
[./all]
strain = SMALL
incremental = true
add_variables = true
eigenstrain_names = eigenstrain
[../]
[../]
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = temperature_load
[../]
[./axial_strain]
type = RankTwoAux
variable = axial_strain
rank_two_tensor = total_strain
index_i = 1
index_j = 1
execute_on = timestep_end
[../]
[]
[BCs]
[./x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 298
thermal_expansion_coeff = 1.3e-5
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Executioner]
type = Transient
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
l_tol = 1e-9
start_time = 0.0
end_time = 0.075
dt = 0.0125
dtmin = 0.0001
[]
[Outputs]
exodus = true
[]
[VectorPostprocessors]
[./axial_str]
type = LineValueSampler
warn_discontinuous_face_values = false
start_point = '0.5 0.0 0.0'
end_point = '0.5 0.1 0.0'
variable = axial_strain
num_points = 21
sort_by = 'id'
[../]
[]
[Postprocessors]
[./end_disp]
type = PointValue
variable = disp_y
point = '0.5 0.150080 0.0'
[../]
[]
(modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_1D.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
nx = 2
xmax = 2
[]
[split]
type = SubdomainBoundingBoxGenerator
input = mesh
block_id = 1
bottom_left = '1 0 0'
top_right = '2 0 0'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = split
primary_block = 1
paired_block = 0
new_boundary = 'interface0'
[]
uniform_refine = 4
[]
[Variables]
# Defining a DFEM variable to handle gap discontinuity
[T]
order = FIRST
family = MONOMIAL
[]
[]
[AuxVariables]
# Auxvariable containing bulk temperature of gap
[Tbulk]
order = FIRST
family = LAGRANGE
initial_condition = 300 # K
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = T
diffusivity = conductivity
[]
[source]
type = BodyForce
variable = T
value = 1.0
[]
[]
[DGKernels]
# DG kernel to represent diffusion accross element faces
[./dg_diff]
type = DGDiffusion
variable = T
epsilon = -1
sigma = 6
diff = conductivity
# Ignoring gap side set because no diffusion accross there
exclude_boundary = 'interface0'
[../]
[]
[InterfaceKernels]
active = 'gap'
# Heat transfer kernel using Tbulk as material
[gap]
type = SideSetHeatTransferKernel
variable = T
neighbor_var = T
boundary = 'interface0'
[]
# Heat transfer kernel using Tbulk as auxvariable
[gap_var]
type = SideSetHeatTransferKernel
variable = T
neighbor_var = T
boundary = 'interface0'
Tbulk_var = Tbulk
[]
[]
[Functions]
[bc_func]
type = ConstantFunction
value = 300
[]
[exact]
type = ParsedFunction
expression = '
A := if(x < 1, -0.5, -0.25);
B := if(x < 1, -0.293209850655001, 0.0545267662299068);
C := if(x < 1, 300.206790149345, 300.19547323377);
d := -1;
A * (x+d) * (x+d) + B * (x+d) + C'
[]
[]
[BCs]
[bc_left]
type = DGFunctionDiffusionDirichletBC
boundary = 'left'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[bc_right]
type = DGFunctionDiffusionDirichletBC
boundary = 'right'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[]
[Materials]
[k0]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 1.0
block = 0
[]
[k1]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 2.0
block = 1
[]
[gap_mat]
type = SideSetHeatTransferMaterial
boundary = 'interface0'
conductivity = 1.5
gap_length = 1.0
h_primary = 1
h_neighbor = 1
Tbulk = 300
emissivity_primary = 1
emissivity_neighbor = 1
[]
[]
[Postprocessors]
[error]
type = ElementL2Error
variable = T
function = exact
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/nodal_extreme_value/nodal_proxy_extreme_value.i)
[Problem]
type = FEProblem
solve = false
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
[]
[AuxVariables]
[u]
[]
[w]
[]
[v_x]
[]
[v_y]
[]
[]
[AuxKernels]
[u]
type = FunctionAux
variable = u
function = u
[]
[w]
type = FunctionAux
variable = w
function = w
[]
[v_x]
type = FunctionAux
variable = v_x
function = v_x
[]
[v_y]
type = FunctionAux
variable = v_y
function = v_y
[]
[]
[Functions]
[u] # reaches a maximum value at (0.5, 0.6)
type = ParsedFunction
expression = 'sin(pi*x)*sin(pi*y/1.2)'
[]
[w] # reaches a minium expression at (0.7, 0.8)
type = ParsedFunction
expression = '-sin(pi*x/1.4)*sin(pi*y/1.6)'
[]
[v_x]
type = ParsedFunction
expression = 'x'
[]
[v_y]
type = ParsedFunction
expression = 'y'
[]
[]
[Postprocessors]
# because we set v_x and v_y equal to the x and y coordinates, these two postprocessors
# should just return the point at which u reaches a maximum value
[max_v_from_proxy_x]
type = NodalExtremeValue
variable = v_x
proxy_variable = u
value_type = max
[]
[max_v_from_proxy_y]
type = NodalExtremeValue
variable = v_y
proxy_variable = u
value_type = max
[]
# because we set v_x and v_y equal to the x and y coordinates, these two postprocessors
# should just return the point at which w reaches a minimum value
[min_v_from_proxy_x]
type = NodalExtremeValue
variable = v_x
proxy_variable = w
value_type = min
[]
[min_v_from_proxy_y]
type = NodalExtremeValue
variable = v_y
proxy_variable = w
value_type = min
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
csv = true
[]
(modules/richards/test/tests/buckley_leverett/bl21.i)
# two-phase version
# sharp front version
[Mesh]
type = GeneratedMesh
dim = 1
nx = 150
xmin = 0
xmax = 15
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1E-3 1E-2 3E-2 4E-2 0.5 0.5 1'
x = '0 1E-2 1E-1 1 5 40 41'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E6
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 2E6
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 3E-5
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 3E-5
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./SatWater]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SatGas]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGwater]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[./SUPGgas]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[./bounds_dummy]
[../]
[]
[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
[../]
[./richardsppenalty]
type = RichardsPPenalty
variable = pgas
a = 1E-18
lower_var = pwater
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = SeffWater
pressure_vars = 'pwater pgas'
[../]
[]
[Bounds]
[./pwater_upper_bounds]
type = ConstantBounds
variable = bounds_dummy
bounded_variable = pwater
bound_type = upper
bound_value = 1E7
[../]
[./pwater_lower_bounds]
type = ConstantBounds
variable = bounds_dummy
bounded_variable = pwater
bound_type = lower
bound_value = -110000
[../]
[]
[ICs]
[./water_ic]
type = FunctionIC
variable = pwater
function = initial_water
[../]
[./gas_ic]
type = FunctionIC
variable = pgas
function = initial_gas
[../]
[]
[BCs]
[./left_w]
type = DirichletBC
variable = pwater
boundary = left
value = 1E6
[../]
[./left_g]
type = DirichletBC
variable = pgas
boundary = left
value = 1E6+1000
[../]
[./right_w]
type = DirichletBC
variable = pwater
boundary = right
value = -100000
[../]
[./right_g]
type = DirichletBC
variable = pgas
boundary = right
value = 0+1000
[../]
[]
[Functions]
[./initial_water]
type = ParsedFunction
expression = 1000000*(1-min(x/5,1))-100000*(max(x-5,0)/max(abs(x-5),1E-10))
[../]
[./initial_gas]
type = ParsedFunction
expression = max(1000000*(1-x/5),0)+1000
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.15
mat_permeability = '1E-10 0 0 0 1E-10 0 0 0 1E-10'
density_UO = 'DensityWater DensityGas'
relperm_UO = 'RelPermWater RelPermGas'
SUPG_UO = 'SUPGwater SUPGgas'
sat_UO = 'SatWater SatGas'
seff_UO = 'SeffWater SeffGas'
viscosity = '1E-3 1E-6'
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
active = 'standard'
[./bounded]
# must use --use-petsc-dm command line argument
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type -ksp_rtol -ksp_atol'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 50 vinewtonssls 1E-20 1E-20'
[../]
[./standard]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_rtol -ksp_atol'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 20 1E-20 1E-20'
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 50
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = bl21
time_step_interval = 10000
exodus = true
[]
(modules/thermal_hydraulics/test/tests/postprocessors/heat_rate_conduction_rz/heat_rate_conduction_rz.i)
# Tests the HeatRateConductionRZ post-processor.
R_i = 0.1
thickness = 0.2
L = 3.0
R_o = ${fparse R_i + thickness}
S = ${fparse 2 * pi * R_o * L}
k = 20.0
T_i = 300.0
T_o = 500.0
dT_dr = ${fparse (T_o - T_i) / thickness}
Q_exact = ${fparse k * dT_dr * S}
[Materials]
[hs_mat]
type = ADGenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1.0 1.0 ${k}'
[]
[]
[Functions]
[T_fn]
type = ParsedFunction
expression = '${T_i} + (y - ${R_i}) * ${dT_dr}'
[]
[]
[Components]
[heat_structure]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
inner_radius = ${R_i}
length = ${L}
n_elems = 50
names = 'region1'
widths = '${thickness}'
n_part_elems = '5'
initial_T = T_fn
[]
[]
[Postprocessors]
[Q_pp]
type = HeatRateConductionRZ
boundary = heat_structure:outer
axis_point = '0 0 0'
axis_dir = '1 0 0'
temperature = T_solid
thermal_conductivity = thermal_conductivity
inward = true
execute_on = 'INITIAL'
[]
[Q_err]
type = RelativeDifferencePostprocessor
value1 = Q_pp
value2 = ${Q_exact}
execute_on = 'INITIAL'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
file_base = 'heat_rate_conduction_rz'
[csv]
type = CSV
show = 'Q_err'
execute_on = 'INITIAL'
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_by_parts_traction_steady_stabilized.i)
# This input file tests several different things:
# .) The axisymmetric (RZ) form of the governing equations.
# .) An open boundary.
# .) Not integrating the pressure by parts, thereby requiring a pressure pin.
# .) Natural boundary condition at the outlet.
[GlobalParams]
integrate_p_by_parts = true
laplace = false
gravity = '0 0 0'
supg = true
pspg = true
order = FIRST
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
# Jacobian doesn't appear to be correct for RZ traction form
solve_type = PJFNK
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Variables]
[./vel_x]
# Velocity in radial (r) direction
[../]
[./vel_y]
# Velocity in axial (z) direction
[../]
[./p]
[../]
[]
[BCs]
[./u_in]
type = DirichletBC
boundary = bottom
variable = vel_x
value = 0
[../]
[./v_in]
type = FunctionDirichletBC
boundary = bottom
variable = vel_y
function = 'inlet_func'
[../]
[./u_axis_and_walls]
type = DirichletBC
boundary = 'left right'
variable = vel_x
value = 0
[../]
[./v_no_slip]
type = DirichletBC
boundary = 'right'
variable = vel_y
value = 0
[../]
[]
[Kernels]
[./mass]
type = INSMassRZ
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumTractionFormRZ
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumTractionFormRZ
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 'volume'
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(modules/xfem/test/tests/moving_interface/verification/1D_xy_discrete2mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: quasi-1D
# Coordinate System: xy
# Material Numbers/Types:discrete homog 2 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description
# A transient heat transfer problem in Cartesian coordinates designed with
# the Method of Manufactured Solutions. This problem was developed to verify
# XFEM performance in the presence of a moving interface separating two
# discrete material regions for linear element models. Both the temperature
# solution and level set function are designed to be linear to attempt to
# minimize error between the exact solution and XFEM results. Thermal
# conductivity, density, and heat capacity are homogeneous in each material
# region with a discontinuous jump in thermal flux between the two material
# regions.
# Results:
# The temperature at the left boundary is determined by the analytical
# solution, so temperature at the right boundary (x=1) should exhibit the
# largest difference between the analytical solution and XFEM results. We
# present the analytical and XFEM results at the material interface position
# and right side boundary at various times.
# Interface:
# Time Expected Temperature XFEM Calculated Temperature
# 20 746.75 746.7235521
# 40 893.05 893.0379081
# 60 1040.15 1040.1527530
#
# Right Boundary (x=1):
# Time Expected Temperature XFEM Calculated Temperature
# 20 720 719.9708681
# 40 840 839.9913293
# 60 960 960.0100886
#
# IMPORTANT NOTE:
# When running this input file, add the --allow-test-objects tag!!!
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 1
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 0.5
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = phi
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./phi]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = 'diffusion_coefficient'
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = phi
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
jump_flux = jump_flux_func
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = 'phi:=(0.75-x-0.001*t);
i:=(0.75-0.001*t);
if (phi>=0,
10*(8-x),
(7/(1-i))*((i-2)*x + (8-7*i)) )'
[../]
[./right_du_func]
type = ParsedFunction
expression = 'i:=(0.75-0.001*t);
(2.0/(1-i))*(-5+5*i+i*t-2*t)'
[../]
[./exact_u_func]
type = ParsedFunction
expression = 'phi:=(0.75-x-0.001*t);
i:=(0.75-0.001*t);
if (phi>=0,
605 - 5*x + t*(8-x),
(1/(1-i))*((-5+5*i+i*t-2*t)*x + (605-605*i+8*t-7*t*i)) )'
[../]
[./jump_flux_func]
type = ParsedFunction
expression = 'i:=(0.75-0.001*t);
k_1:=(20.0);
k_2:=(2.0);
k_1*(5+t) + (k_2/(1-i))*(-5+5*i+i*t-2*t)'
[../]
[./ls_func]
type = ParsedFunction
expression = '0.75 - x - 0.001*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'A_rhoCp B_rhoCp'
prop_values = '10 7'
[../]
[./therm_cond_prop]
type = GenericConstantMaterial
prop_names = 'A_diffusion_coefficient B_diffusion_coefficient'
prop_values = '20.0 2.0'
[../]
[./combined_rhoCp]
type = LevelSetBiMaterialReal
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = phi
prop_name = rhoCp
[../]
[./combined_diffusion_coefficient]
type = LevelSetBiMaterialReal
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = phi
prop_name = diffusion_coefficient
[../]
[]
[BCs]
[./left_u]
type = FunctionDirichletBC
variable = u
boundary = 'left'
function = exact_u_func
[../]
[./right_du]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = right_du_func
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 600
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
# petsc_options_iname = '-pc_type -pc_hypre_type'
# petsc_options_value = 'hypre boomeramg'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 20
end_time = 60.0
max_xfem_update = 2
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/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
[]
(modules/optimization/test/tests/executioners/constrained/inequality/forward_and_adjoint.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 20
xmax = 1
ymax = 1
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
kernel_coverage_check = false
[]
[Variables]
[temperature]
[]
[temperature_adjoint]
solver_sys = adjoint
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[]
[BCs]
[left]
type = FunctionNeumannBC
variable = temperature
boundary = left
function = left_function
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 200
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 100
[]
[]
[Functions]
[left_function]
type = ParsedOptimizationFunction
expression = 'a + b*y'
param_symbol_names = 'a b'
param_vector_name = 'params/left'
[]
[dc_db]
type = ParsedFunction
expression = 'y'
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = SteadyAndAdjoint
forward_system = nl0
adjoint_system = adjoint
line_search = none
nl_rel_tol = 1e-12
l_tol = 1e-12
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = temperature_adjoint
x_coord_name = measure_data/measurement_xcoord
y_coord_name = measure_data/measurement_ycoord
z_coord_name = measure_data/measurement_zcoord
value_name = measure_data/misfit_values
[]
[]
[VectorPostprocessors]
[grad_bc_left]
type = SideOptimizationNeumannFunctionInnerProduct
variable = temperature_adjoint
function = left_function
boundary = left
execute_on = ADJOINT_TIMESTEP_END
[]
[]
[Postprocessors]
[sum]
type = FunctionSideIntegral
boundary = left
function = left_function
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
[]
[params]
type = ConstantReporter
real_vector_names = 'left'
real_vector_values = '0 0' # Dummy
execute_on = NONE
[]
[]
[Outputs]
console = false
exodus = false
json = true
[]
#---------Inequality constraints------------#
[VectorPostprocessors]
[gradient_c]
type = VectorOfPostprocessors
postprocessors = 'dc_da dc_db'
[]
[ineq]
type = VectorOfPostprocessors
postprocessors = 'constraint'
[]
[]
[Postprocessors]
[constraint]
type = ParsedPostprocessor
expression = '150 - sum' # 150 is the constraint we want to satisfy
pp_names = sum
[]
[dc_da]
type = FunctionSideIntegral
boundary = left
function = -1
[]
[dc_db]
type = FunctionSideIntegral
boundary = left
function = '-y'
[]
[]
(modules/solid_mechanics/test/tests/generalized_plane_strain/generalized_plane_strain_ref_resid.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[square]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[]
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
group_variables = 'disp_x disp_y'
[]
[Variables]
[scalar_strain_zz]
order = FIRST
family = SCALAR
[]
[]
[AuxVariables]
[temp]
order = FIRST
family = LAGRANGE
[]
[saved_x]
order = FIRST
family = LAGRANGE
[]
[saved_y]
order = FIRST
family = LAGRANGE
[]
[saved_strain_zz]
family = SCALAR
order = FIRST
[]
[]
[Postprocessors]
[react_z]
type = MaterialTensorIntegral
rank_two_tensor = stress
index_i = 2
index_j = 2
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = SMALL
add_variables = true
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_xy stress_yy stress_zz strain_xx strain_xy strain_yy strain_zz'
planar_formulation = GENERALIZED_PLANE_STRAIN
eigenstrain_names = eigenstrain
scalar_out_of_plane_strain = scalar_strain_zz
temperature = temp
absolute_value_vector_tags = 'ref'
[]
[]
[AuxKernels]
[tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
use_displaced_mesh = false
[]
[saved_x]
type = TagVectorAux
variable = 'saved_x'
vector_tag = 'ref'
v = 'disp_x'
execute_on = timestep_end
[]
[saved_y]
type = TagVectorAux
variable = 'saved_y'
vector_tag = 'ref'
execute_on = timestep_end
v = 'disp_y'
[]
[]
[AuxScalarKernels]
[saved_strain_zz]
type = ScalarTagVectorAux
variable = 'saved_strain_zz'
vector_tag = 'ref'
execute_on = timestep_end
v = 'scalar_strain_zz'
[]
[]
[Functions]
[tempfunc]
type = ParsedFunction
expression = '(1-x)*t'
[]
[]
[BCs]
[bottomx]
type = DirichletBC
boundary = 0
variable = disp_x
value = 0.0
[]
[bottomy]
type = DirichletBC
boundary = 0
variable = disp_y
value = 0.0
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
poissons_ratio = 0.3
youngs_modulus = 1e6
[]
[thermal_strain]
type = ComputeThermalExpansionEigenstrain
temperature = temp
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
eigenstrain_name = eigenstrain
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -ksp_gmres_restart'
petsc_options_value = 'lu superlu_dist 51'
# controls for linear iterations
l_max_its = 100
l_tol = 1e-4
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-12
nl_abs_tol = 1e-8
# time control
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 2.0
num_steps = 5000
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/heat_conduction/min_gap/min_gap.i)
[Mesh]
type = MeshGeneratorMesh
displacements = 'disp_x disp_y'
[./left_gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 3
xmin = -3
xmax = 0
ymin = -5
ymax = 5
[../]
[./right_gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 3
xmin = 3
xmax = 6
ymin = -5
ymax = 5
[../]
[./left_and_right]
type = MeshCollectionGenerator
inputs = 'left_gen right_gen'
[../]
[./leftleft]
type = SideSetsAroundSubdomainGenerator
block = 0
new_boundary = leftleft
normal = '-1 0 0'
input = left_and_right
[../]
[./leftright]
type = SideSetsAroundSubdomainGenerator
block = 0
new_boundary = leftright
normal = '1 0 0'
input = leftleft
[../]
[./right]
type = SubdomainBoundingBoxGenerator
top_right = '6 5 0'
bottom_left = '3 -5 0'
block_id = 1
input = leftright
[../]
[./rightleft]
type = SideSetsAroundSubdomainGenerator
block = 1
new_boundary = rightleft
normal = '-1 0 0'
input = right
[../]
[./rightright]
type = SideSetsAroundSubdomainGenerator
block = 1
new_boundary = rightright
normal = '1 0 0'
input = rightleft
[../]
[]
[Variables]
[./temp]
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./disp_y]
[../]
[./gap_conductance]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./disp_x]
type = ParsedFunction
expression = -3+t
[../]
[./left_temp]
type = ParsedFunction
expression = 1000+t
[../]
[]
[Kernels]
[./hc]
type = HeatConduction
variable = temp
[../]
[]
[AuxKernels]
[./disp_x]
type = FunctionAux
block = 1
variable = disp_x
function = disp_x
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./gap_conductivity]
type = MaterialRealAux
boundary = leftright
property = gap_conductance
variable = gap_conductance
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
[BCs]
[./left]
type = FunctionDirichletBC
variable = temp
boundary = leftleft
function = left_temp
[../]
[./right]
type = DirichletBC
variable = temp
boundary = rightright
value = 400
[../]
[]
[ThermalContact]
[./left_to_right]
secondary = leftright
quadrature = true
primary = rightleft
variable = temp
min_gap = 1
min_gap_order = 1
emissivity_primary = 0
emissivity_secondary = 0
type = GapHeatTransfer
[../]
[]
[Materials]
[./hcm]
type = HeatConductionMaterial
block = '0 1'
specific_heat = 1
thermal_conductivity = 1
use_displaced_mesh = true
[../]
[]
[Postprocessors]
[./gap_conductance]
type = PointValue
point = '0 0 0'
variable = gap_conductance
[../]
[]
[Executioner]
type = Transient
dt = 0.25
end_time = 3.0
solve_type = 'PJFNK'
[]
[Outputs]
csv = true
execute_on = 'TIMESTEP_END'
[]
(modules/xfem/test/tests/diffusion_xfem/levelsetcut3d.i)
# 3D: Mesh is cut by level set based cutter
# The level set is a MOOSE auxvariable
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 5
ny = 5
nz = 5
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
zmin = 0.0
zmax = 1.0
elem_type = HEX8
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
[../]
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./u_left]
type = PiecewiseLinear
x = '0 2'
y = '0 0.1'
[../]
[./ls_func]
type = ParsedFunction
expression = 'sqrt(x*x + y*y + z*z) - 0.5'
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
# Define boundary conditions
[./left_u]
type = DirichletBC
variable = u
boundary = left
value = 2
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
line_search = 'none'
l_tol = 1e-3
nl_max_its = 15
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
start_time = 0.0
dt = 1
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = timestep_end
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/contact/test/tests/fieldsplit/2blocks3d.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[Mesh]
file = 2blocks3d.e
patch_size = 5
[]
[Problem]
error_on_jacobian_nonzero_reallocation = true
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
incremental = true
add_variables = true
[../]
[]
[AuxVariables]
[./penetration]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./horizontal_movement]
type = ParsedFunction
expression = t/10.0
[../]
[]
[AuxKernels]
[./penetration]
type = PenetrationAux
variable = penetration
boundary = 2
paired_boundary = 3
order = FIRST
[../]
[]
[BCs]
[./push_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 1
function = horizontal_movement
[../]
[./fix_x]
type = DirichletBC
variable = disp_x
boundary = 4
value = 0.0
[../]
[./fix_y]
type = DirichletBC
variable = disp_y
boundary = '1 4'
value = 0.0
[../]
[./fix_z]
type = DirichletBC
variable = disp_z
boundary = '1 4'
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[../]
[./stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[../]
[./elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[../]
[./stress_right]
type = ComputeFiniteStrainElasticStress
block = 2
[../]
[]
[Contact]
[./leftright]
secondary = 2
primary = 3
model = frictionless
penalty = 1e+6
normalize_penalty = true
formulation = kinematic
normal_smoothing_distance = 0.1
[../]
[]
[Preconditioning]
[./FSP]
type = FSP
# It is the starting point of splitting
topsplit = 'contact_interior' # 'contact_interior' should match the following block name
[./contact_interior]
splitting = 'contact interior'
splitting_type = multiplicative
[../]
[./interior]
type = ContactSplit
vars = 'disp_x disp_y disp_z'
uncontact_primary = '3'
uncontact_secondary = '2'
uncontact_displaced = '1'
blocks = '1 2'
include_all_contact_nodes = 1
petsc_options_iname = '-ksp_type -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter -pc_hypre_boomeramg_strong_threshold'
petsc_options_value = 'preonly hypre boomeramg 1 0.25'
[../]
[./contact]
type = ContactSplit
vars = 'disp_x disp_y disp_z'
contact_primary = '3'
contact_secondary = '2'
contact_displaced = '1'
include_all_contact_nodes = 1
petsc_options_iname = '-ksp_type -pc_type -pc_asm_overlap -sub_pc_type'
petsc_options_value = 'preonly asm 1 lu'
[../]
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
dtmin = 0.1
end_time = 0.1
l_tol = 1e-4
l_max_its = 100
nl_rel_tol = 1e-10
nl_abs_tol = 1e-6
nl_max_its = 100
[]
[Outputs]
file_base = 2blocks3d_out
[./exodus]
type = Exodus
[../]
[./console]
type = Console
max_rows = 5
[../]
[]
(modules/porous_flow/examples/lava_lamp/1phase_convection.i)
# Two phase density-driven convection of dissolved CO2 in brine
#
# The model starts with CO2 in the liquid phase only. The CO2 diffuses into the brine.
# As the density of the CO2-saturated brine is greater
# than the unsaturated brine, a gravitational instability arises and density-driven
# convection of CO2-rich fingers descend into the unsaturated brine.
#
# The instability is seeded by a random perturbation to the porosity field.
# Mesh adaptivity is used to refine the mesh as the fingers form.
#
# Note: this model is computationally expensive, so should be run with multiple cores.
[GlobalParams]
PorousFlowDictator = 'dictator'
gravity = '0 -9.81 0'
[]
[Adaptivity]
max_h_level = 2
marker = marker
initial_marker = initial
initial_steps = 2
[Indicators]
[indicator]
type = GradientJumpIndicator
variable = zi
[]
[]
[Markers]
[marker]
type = ErrorFractionMarker
indicator = indicator
refine = 0.8
[]
[initial]
type = BoxMarker
bottom_left = '0 1.95 0'
top_right = '2 2 0'
inside = REFINE
outside = DO_NOTHING
[]
[]
[]
[Mesh]
type = GeneratedMesh
dim = 2
ymin = 1.5
ymax = 2
xmax = 2
ny = 20
nx = 40
bias_y = 0.95
[]
[AuxVariables]
[xnacl]
initial_condition = 0.01
[]
[saturation_gas]
order = FIRST
family = MONOMIAL
[]
[xco2l]
order = FIRST
family = MONOMIAL
[]
[density_liquid]
order = FIRST
family = MONOMIAL
[]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[saturation_gas]
type = PorousFlowPropertyAux
variable = saturation_gas
property = saturation
phase = 1
execute_on = 'timestep_end'
[]
[xco2l]
type = PorousFlowPropertyAux
variable = xco2l
property = mass_fraction
phase = 0
fluid_component = 1
execute_on = 'timestep_end'
[]
[density_liquid]
type = PorousFlowPropertyAux
variable = density_liquid
property = density
phase = 0
execute_on = 'timestep_end'
[]
[]
[Variables]
[pgas]
[]
[zi]
scaling = 1e4
[]
[]
[ICs]
[pressure]
type = FunctionIC
function = 10e6-9.81*1000*y
variable = pgas
[]
[zi]
type = ConstantIC
value = 0
variable = zi
[]
[porosity]
type = RandomIC
variable = porosity
min = 0.25
max = 0.275
seed = 0
[]
[]
[BCs]
[top]
type = DirichletBC
value = 0.04
variable = zi
boundary = top
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pgas
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pgas
[]
[diff0]
type = PorousFlowDispersiveFlux
fluid_component = 0
variable = pgas
disp_long = '0 0'
disp_trans = '0 0'
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = zi
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = zi
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = zi
disp_long = '0 0'
disp_trans = '0 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pgas zi'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[fs]
type = PorousFlowBrineCO2
brine_fp = brine
co2_fp = co2
capillary_pressure = pc
[]
[]
[FluidProperties]
[co2sw]
type = CO2FluidProperties
[]
[co2]
type = TabulatedBicubicFluidProperties
fp = co2sw
[]
[brine]
type = BrineFluidProperties
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = '45'
[]
[brineco2]
type = PorousFlowFluidState
gas_porepressure = 'pgas'
z = 'zi'
temperature_unit = Celsius
xnacl = 'xnacl'
capillary_pressure = pc
fluid_state = fs
[]
[porosity]
type = PorousFlowPorosityConst
porosity = porosity
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-11 0 0 0 1e-11 0 0 0 1e-11'
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
phase = 0
n = 2
s_res = 0.1
sum_s_res = 0.2
[]
[relperm_gas]
type = PorousFlowRelativePermeabilityCorey
phase = 1
n = 2
s_res = 0.1
sum_s_res = 0.2
[]
[diffusivity]
type = PorousFlowDiffusivityConst
diffusion_coeff = '2e-9 2e-9 2e-9 2e-9'
tortuosity = '1 1'
[]
[]
[Preconditioning]
active = basic
[mumps_is_best_for_parallel_jobs]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[basic]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu NONZERO 2 '
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 1e6
nl_max_its = 25
l_max_its = 100
dtmax = 1e4
nl_abs_tol = 1e-6
[TimeStepper]
type = IterationAdaptiveDT
dt = 100
growth_factor = 2
cutback_factor = 0.5
[]
[]
[Functions]
[flux]
type = ParsedFunction
symbol_values = 'delta_xco2 dt'
symbol_names = 'dx dt'
expression = 'dx/dt'
[]
[]
[Postprocessors]
[total_co2_in_gas]
type = PorousFlowFluidMass
phase = 1
fluid_component = 1
[]
[total_co2_in_liquid]
type = PorousFlowFluidMass
phase = 0
fluid_component = 1
[]
[numdofs]
type = NumDOFs
[]
[delta_xco2]
type = ChangeOverTimePostprocessor
postprocessor = total_co2_in_liquid
[]
[dt]
type = TimestepSize
[]
[flux]
type = FunctionValuePostprocessor
function = flux
[]
[]
[Outputs]
print_linear_residuals = false
perf_graph = true
exodus = true
csv = true
[]
(test/tests/dgkernels/2d_diffusion_dg/dg_stateful.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[../]
[./exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./abs]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGKernels]
[./dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[../]
[]
[BCs]
[./all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[]
[Materials]
[./stateful]
type = StatefulMaterial
initial_diffusivity = 1
boundary = 'left'
[../]
[./general]
type = GenericConstantMaterial
block = '0'
prop_names = 'dummy'
prop_values = '1'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-10
[]
(modules/richards/test/tests/mass/m01.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 2
xmin = -1
xmax = 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
[../]
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = x
[../]
[]
[Postprocessors]
[./total_mass]
type = RichardsMass
variable = pressure
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
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 1 1 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E-10
end_time = 1E-10
[]
[Outputs]
execute_on = 'timestep_end'
file_base = m01
csv = true
[]
(modules/xfem/test/tests/moving_interface/verification/1D_rz_lsdep1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: quasi-1D
# Coordinate System: rz
# Material Numbers/Types: level set dep 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# A simple transient heat transfer problem in cylindrical coordinates designed
# with the Method of Manufactured Solutions. This problem was developed to
# verify XFEM performance in the presence of a moving interface for linear
# element models that can be exactly evaluated by FEM/Moose. Both the
# temperature solution and level set function are designed to be linear to
# attempt to minimize error between the Moose/exact solution and XFEM results.
# Thermal conductivity is dependent upon the value of the level set function
# at each timestep.
# Results:
# The temperature at the left boundary (x=1) exhibits the largest difference
# between the FEM/Moose solution and XFEM results. We present the XFEM
# results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 480.0008131
# 0.6 520 520.0038333
# 0.8 560 560.0088286
# 1.0 600 600.0131612
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 1
xmin = 1.0
xmax = 2.0
ymin = 0.0
ymax = 0.5
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-200*x+400) + (1/x)*(310*t - (10/1.02)*x*t - (1/1.02)*t^2)'
[../]
[./neumann_func]
type = ParsedFunction
expression = '((0.05/2.04)*(2.04-x-0.2*t) + 1.5)*200*t'
[../]
[./k_func]
type = ParsedFunction
expression = '(0.05/2.04)*(2.04-x-0.2*t) + 1.5'
[../]
[./ls_func]
type = ParsedFunction
expression = '2.04 - x -0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericFunctionMaterial
prop_names = 'diffusion_coefficient'
prop_values = 'k_func'
[../]
[]
[BCs]
[./left_u]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 'right'
value = 400
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/transfers/multiapp_high_order_variable_transfer/parent_L2_Lagrange_conservative.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Variables]
[power_density]
family = L2_LAGRANGE
order = FIRST
[]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2'
[]
[]
[Kernels]
[diff]
type = Reaction
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[Postprocessors]
[pwr_avg]
type = ElementAverageValue
block = '0'
variable = power_density
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
[]
[Postprocessors]
[./from_postprocessor]
type = ElementIntegralVariablePostprocessor
variable = power_density
[../]
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = sub_L2_Lagrange_conservative.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[p_to_sub]
type = MultiAppShapeEvaluationTransfer
source_variable = power_density
variable = power_density
to_multi_app = sub
execute_on = 'timestep_end'
from_postprocessors_to_be_preserved = 'from_postprocessor'
to_postprocessors_to_be_preserved = 'pwr_density'
[]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined_constM.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, s, has units m^3/second/m^3. 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/second/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
[]
[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*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
viscosity = 1
[]
[]
[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 = PorousFlowPorosityHMBiotModulus
porosity_zero = 0.1
biot_coefficient = 0.3
solid_bulk = 2
constant_fluid_bulk_modulus = 3.3333333333
constant_biot_modulus = 10.0
[]
[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 = 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
[]
[]
[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_constM
[csv]
type = CSV
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts_steady_nobcbc.i)
[GlobalParams]
integrate_p_by_parts = true
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[AuxVariables]
[vel_x]
order = SECOND
[]
[vel_y]
order = SECOND
[]
[]
[AuxKernels]
[vel_x]
type = VectorVariableComponentAux
variable = vel_x
vector_variable = velocity
component = 'x'
[]
[vel_y]
type = VectorVariableComponentAux
variable = vel_y
vector_variable = velocity
component = 'y'
[]
[]
[Variables]
[./velocity]
order = SECOND
family = LAGRANGE_VEC
[../]
[./p]
[../]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
[../]
[]
[BCs]
[inlet]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom'
function_x = 0
function_y = 'inlet_func'
[../]
[wall]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'right'
function_x = 0
function_y = 0
[]
[axis]
type = ADVectorFunctionDirichletBC
variable = velocity
boundary = 'left'
set_y_comp = false
function_x = 0
[]
[outlet]
type = INSADMomentumNoBCBC
variable = velocity
pressure = p
boundary = 'top'
[]
# When the NoBCBC is applied on the outlet boundary then there is nothing
# constraining the pressure. Thus we must pin the pressure somewhere to ensure
# that the problem is not singular. If the below BC is not applied then
# -pc_type svd -pc_svd_monitor reveals a singular value
[p_corner]
type = DirichletBC
boundary = top_right
value = 0
variable = p
[]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADMaterial
velocity = velocity
pressure = p
[]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(test/tests/fvkernels/mms/grad-reconstruction/mat-rz.i)
a=1.1
diff=1.1
[Mesh]
[gen_mesh]
type = GeneratedMeshGenerator
dim = 2
xmin = 2
xmax = 3
ymin = 0
ymax = 1
nx = 2
ny = 2
[]
[]
[Problem]
coord_type = 'RZ'
[]
[Variables]
[v]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 1
[]
[]
[FVKernels]
[advection]
type = FVElementalAdvection
variable = v
velocity = '${a} ${a} 0'
advected_quantity = 'mat_u'
grad_advected_quantity = 'mat_grad_u'
[]
[reaction]
type = FVReaction
variable = v
[]
[diff_v]
type = FVDiffusion
variable = v
coeff = ${diff}
[]
[body_v]
type = FVBodyForce
variable = v
function = 'forcing'
[]
[]
[FVBCs]
[diri]
type = FVFunctionDirichletBC
boundary = 'left right top bottom'
function = 'exact'
variable = v
[]
[]
[Materials]
[mat]
type = ADCoupledGradientMaterial
mat_prop = 'mat_u'
grad_mat_prop = 'mat_grad_u'
u = v
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = 'sin(x)*cos(y)'
[]
[forcing]
type = ParsedFunction
expression = '-a*sin(x)*sin(y) + diff*sin(x)*cos(y) + sin(x)*cos(y) + (x*a*cos(x)*cos(y) + a*sin(x)*cos(y))/x - (-x*diff*sin(x)*cos(y) + diff*cos(x)*cos(y))/x'
symbol_names = 'a diff'
symbol_values = '${a} ${diff}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_shift_type -sub_pc_type'
petsc_options_value = 'asm NONZERO lu'
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[error]
type = ElementL2Error
variable = v
function = exact
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/user_object_based/linesearch.i)
[Mesh]
type = GeneratedMesh
dim = 3
elem_type = HEX8
displacements = 'ux uy uz'
[]
[Variables]
[./ux]
[../]
[./uy]
[../]
[./uz]
[../]
[]
[AuxVariables]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./fp_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./e_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./gss]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./tdisp]
type = ParsedFunction
expression = 0.01*t
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'ux uy uz'
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_zz]
type = RankTwoAux
variable = stress_zz
rank_two_tensor = stress
index_j = 2
index_i = 2
execute_on = timestep_end
[../]
[./fp_zz]
type = RankTwoAux
variable = fp_zz
rank_two_tensor = fp
index_j = 2
index_i = 2
execute_on = timestep_end
[../]
[./e_zz]
type = RankTwoAux
variable = e_zz
rank_two_tensor = lage
index_j = 2
index_i = 2
execute_on = timestep_end
[../]
[./gss1]
type = MaterialStdVectorAux
variable = gss
property = state_var_gss
index = 0
execute_on = timestep_end
[../]
[]
[BCs]
[./symmy]
type = DirichletBC
variable = uy
boundary = bottom
value = 0
[../]
[./symmx]
type = DirichletBC
variable = ux
boundary = left
value = 0
[../]
[./symmz]
type = DirichletBC
variable = uz
boundary = back
value = 0
[../]
[./tdisp]
type = FunctionDirichletBC
variable = uz
boundary = front
function = tdisp
[../]
[]
[UserObjects]
[./slip_rate_gss]
type = CrystalPlasticitySlipRateGSS
variable_size = 12
slip_sys_file_name = input_slip_sys.txt
num_slip_sys_flowrate_props = 2
flowprops = '1 4 0.001 0.1 5 8 0.001 0.1 9 12 0.001 0.1'
uo_state_var_name = state_var_gss
[../]
[./slip_resistance_gss]
type = CrystalPlasticitySlipResistanceGSS
variable_size = 12
uo_state_var_name = state_var_gss
[../]
[./state_var_gss]
type = CrystalPlasticityStateVariable
variable_size = 12
groups = '0 4 8 12'
group_values = '60.8 60.8 60.8'
uo_state_var_evol_rate_comp_name = state_var_evol_rate_comp_gss
scale_factor = 1.0
[../]
[./state_var_evol_rate_comp_gss]
type = CrystalPlasticityStateVarRateComponentGSS
variable_size = 12
hprops = '1.0 541.5 109.8 2.5'
uo_slip_rate_name = slip_rate_gss
uo_state_var_name = state_var_gss
[../]
[]
[Materials]
[./crysp]
type = FiniteStrainUObasedCP
stol = 1e-2
tan_mod_type = exact
maximum_substep_iteration = 200
use_line_search = true
min_line_search_step_size = 0.01
uo_slip_rates = 'slip_rate_gss'
uo_slip_resistances = 'slip_resistance_gss'
uo_state_vars = 'state_var_gss'
uo_state_var_evol_rate_comps = 'state_var_evol_rate_comp_gss'
[../]
[./strain]
type = ComputeFiniteStrain
displacements = 'ux uy uz'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensorCP
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
[../]
[]
[Postprocessors]
[./stress_zz]
type = ElementAverageValue
variable = stress_zz
[../]
[./fp_zz]
type = ElementAverageValue
variable = fp_zz
[../]
[./e_zz]
type = ElementAverageValue
variable = e_zz
[../]
[./gss]
type = ElementAverageValue
variable = gss
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
dt = 0.05
solve_type = 'PJFNK'
petsc_options_iname = -pc_hypre_type
petsc_options_value = boomerang
nl_abs_tol = 1e-10
nl_rel_step_tol = 1e-10
dtmax = 10.0
nl_rel_tol = 1e-10
end_time = 1
dtmin = 0.02
num_steps = 10
nl_abs_step_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/layered_extremum/layered_extremum_matprop.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 6
ny = 13
nz = 6
[]
[AuxVariables]
[layered_extremum]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[liaux]
type = SpatialUserObjectAux
variable = layered_extremum
user_object = layered_uo
execute_on = 'INITIAL LINEAR'
[]
[]
[UserObjects]
[layered_uo]
type = LayeredExtremumMaterialProperty
direction = y
num_layers = 10
mat_prop = mat
value_type = 'min'
execute_on = 'INITIAL LINEAR'
[]
[]
[Materials]
[mat]
type = GenericFunctionMaterial
prop_names = 'mat'
prop_values = 'linear_one'
output_properties = 'mat'
outputs = 'exodus'
[]
[]
[Functions]
[linear_one]
type = ParsedFunction
expression = 'x + 2*y + 1'
[]
[]
[VectorPostprocessors]
[output]
type = SpatialUserObjectVectorPostprocessor
userobject = layered_uo
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
file_base = out
exodus = true
csv = true
[]
(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
[]
(test/tests/outputs/displacement/displacement_transient_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 5
ny = 5
elem_type = QUAD4
displacements = 'u v'
[]
[Functions]
[./right_u]
type = ParsedFunction
expression = 0.1*t
[../]
[./fn_v]
type = ParsedFunction
expression = (x+1)*y*0.1*t
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./td_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./td_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
[./left_u]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right_u]
type = FunctionDirichletBC
variable = u
boundary = 1
function = right_u
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '0 2'
function = fn_v
[../]
[]
[Executioner]
type = Transient
dt = 0.1
start_time = 0
num_steps = 10
solve_type = 'PJFNK'
[]
[Outputs]
[./out_displaced]
type = Exodus
use_displaced = true
[../]
[]
(modules/fluid_properties/test/tests/materials/fluid_properties_material/test_ph.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
elem_type = QUAD4
[]
[Functions]
[fn_1]
type = ParsedFunction
expression = '2e5 * (1 + x)'
[]
[fn_2]
type = ParsedFunction
expression = '2000 * (1 + x*x+y*y)'
[]
[]
[AuxVariables]
[p]
[InitialCondition]
type = FunctionIC
function = fn_1
[]
[]
[h]
[InitialCondition]
type = FunctionIC
function = fn_2
[]
[]
[T]
family = MONOMIAL
order = CONSTANT
[]
[s]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[T]
type = MaterialRealAux
variable = T
property = T
[]
[s]
type = MaterialRealAux
variable = s
property = s
[]
[]
[FluidProperties]
[ideal_gas]
type = IdealGasFluidProperties
gamma = 1.4
molar_mass = 1.000536678700361
[]
[]
[Materials]
[fp_mat]
type = FluidPropertiesMaterialPH
pressure = p
h = h
fp = ideal_gas
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Problem]
solve = false
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/mms/porosity_change/pressure-interpolation-corrected-action.i)
mu=1.1
rho=1.1
darcy=1.1
forch=1.1
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = -1
ymax = 1
nx = 2
ny = 2
[]
[]
[AuxVariables]
[eps_out]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[eps_out]
type = FunctorAux
variable = eps_out
functor = porosity
execute_on = 'timestep_end'
[]
[]
[Modules]
[NavierStokesFV]
compressibility = 'incompressible'
porous_medium_treatment = true
porosity = porosity
porosity_smoothing_layers = 2
friction_types = 'darcy forchheimer'
friction_coeffs = 'Darcy_coefficient Forchheimer_coefficient'
use_friction_correction = true
consistent_scaling = 1.0
density = 'rho'
dynamic_viscosity = 'mu'
initial_velocity = '1 1 0'
initial_pressure = 0.0
inlet_boundaries = 'left top bottom'
momentum_inlet_types = 'fixed-velocity fixed-velocity fixed-velocity'
momentum_inlet_function = 'exact_u exact_v; exact_u exact_v; exact_u exact_v'
outlet_boundaries = 'right'
momentum_outlet_types = 'fixed-pressure'
pressure_function = 'exact_p'
mass_advection_interpolation = 'average'
momentum_advection_interpolation = 'average'
[]
[]
[FVKernels]
[mass_forcing]
type = FVBodyForce
variable = pressure
function = forcing_p
[]
[u_forcing]
type = INSFVBodyForce
variable = superficial_vel_x
functor = forcing_u
momentum_component = 'x'
rhie_chow_user_object = 'pins_rhie_chow_interpolator'
[]
[v_forcing]
type = INSFVBodyForce
variable = superficial_vel_y
functor = forcing_v
momentum_component = 'y'
rhie_chow_user_object = 'pins_rhie_chow_interpolator'
[]
[]
[FunctorMaterials]
[darcy]
type = ADGenericVectorFunctorMaterial
prop_names = 'Darcy_coefficient Forchheimer_coefficient'
prop_values = '${darcy} ${darcy} ${darcy} ${forch} ${forch} ${forch}'
[]
[constants]
type = ADGenericFunctorMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[]
[Functions]
[porosity]
type = ParsedFunction
expression = '.5 + .1 * sin(pi * x / 4) * cos(pi * y / 4)'
[]
[exact_u]
type = ParsedFunction
expression = 'sin((1/2)*y*pi)*cos((1/2)*x*pi)'
[]
[forcing_u]
type = ParsedFunction
expression = 'darcy*mu*sin((1/2)*y*pi)*cos((1/2)*x*pi) + (1/2)*forch*rho*sqrt(sin((1/4)*x*pi)^2*cos((1/2)*y*pi)^2 + sin((1/2)*y*pi)^2*cos((1/2)*x*pi)^2)*sin((1/2)*y*pi)*cos((1/2)*x*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5) - mu*(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5)*(0.1*pi^2*sin((1/4)*x*pi)*sin((1/4)*y*pi)*cos((1/2)*x*pi)*cos((1/2)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 + 0.025*pi^2*sin((1/4)*x*pi)*sin((1/2)*y*pi)*cos((1/2)*x*pi)*cos((1/4)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 + 0.01*pi^2*sin((1/4)*x*pi)^2*sin((1/4)*y*pi)^2*sin((1/2)*y*pi)*cos((1/2)*x*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^3 - 1/4*pi^2*sin((1/2)*y*pi)*cos((1/2)*x*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5)) - mu*(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5)*(0.025*pi^2*sin((1/4)*x*pi)*sin((1/2)*y*pi)*cos((1/2)*x*pi)*cos((1/4)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 + 0.1*pi^2*sin((1/2)*x*pi)*sin((1/2)*y*pi)*cos((1/4)*x*pi)*cos((1/4)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 + 0.01*pi^2*sin((1/2)*y*pi)*cos((1/4)*x*pi)^2*cos((1/2)*x*pi)*cos((1/4)*y*pi)^2/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^3 - 1/4*pi^2*sin((1/2)*y*pi)*cos((1/2)*x*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5)) + 0.025*pi*mu*(0.1*pi*sin((1/4)*x*pi)*sin((1/4)*y*pi)*sin((1/2)*y*pi)*cos((1/2)*x*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 + (1/2)*pi*cos((1/2)*x*pi)*cos((1/2)*y*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5))*sin((1/4)*x*pi)*sin((1/4)*y*pi) - 0.025*pi*mu*(-0.1*pi*sin((1/2)*y*pi)*cos((1/4)*x*pi)*cos((1/2)*x*pi)*cos((1/4)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 - 1/2*pi*sin((1/2)*x*pi)*sin((1/2)*y*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5))*cos((1/4)*x*pi)*cos((1/4)*y*pi) + 0.1*pi*rho*sin((1/4)*x*pi)^2*sin((1/4)*y*pi)*sin((1/2)*y*pi)*cos((1/2)*x*pi)*cos((1/2)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 - 0.1*pi*rho*sin((1/2)*y*pi)^2*cos((1/4)*x*pi)*cos((1/2)*x*pi)^2*cos((1/4)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 - 1/2*pi*rho*sin((1/4)*x*pi)*sin((1/2)*y*pi)^2*cos((1/2)*x*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5) + (1/2)*pi*rho*sin((1/4)*x*pi)*cos((1/2)*x*pi)*cos((1/2)*y*pi)^2/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5) - pi*rho*sin((1/2)*x*pi)*sin((1/2)*y*pi)^2*cos((1/2)*x*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5) - 1/4*pi*(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5)*sin((1/4)*x*pi)*sin((3/2)*y*pi)'
symbol_names = 'mu rho darcy forch'
symbol_values = '${mu} ${rho} ${darcy} ${forch}'
[]
[exact_v]
type = ParsedFunction
expression = 'sin((1/4)*x*pi)*cos((1/2)*y*pi)'
[]
[forcing_v]
type = ParsedFunction
expression = 'darcy*mu*sin((1/4)*x*pi)*cos((1/2)*y*pi) + (1/2)*forch*rho*sqrt(sin((1/4)*x*pi)^2*cos((1/2)*y*pi)^2 + sin((1/2)*y*pi)^2*cos((1/2)*x*pi)^2)*sin((1/4)*x*pi)*cos((1/2)*y*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5) - mu*(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5)*(-0.1*pi^2*sin((1/4)*x*pi)^2*sin((1/4)*y*pi)*sin((1/2)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 + 0.025*pi^2*sin((1/4)*x*pi)^2*cos((1/4)*y*pi)*cos((1/2)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 + 0.01*pi^2*sin((1/4)*x*pi)^3*sin((1/4)*y*pi)^2*cos((1/2)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^3 - 1/4*pi^2*sin((1/4)*x*pi)*cos((1/2)*y*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5)) - mu*(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5)*(0.025*pi^2*sin((1/4)*x*pi)^2*cos((1/4)*y*pi)*cos((1/2)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 - 0.05*pi^2*cos((1/4)*x*pi)^2*cos((1/4)*y*pi)*cos((1/2)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 + 0.01*pi^2*sin((1/4)*x*pi)*cos((1/4)*x*pi)^2*cos((1/4)*y*pi)^2*cos((1/2)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^3 - 1/16*pi^2*sin((1/4)*x*pi)*cos((1/2)*y*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5)) + 0.025*pi*mu*(0.1*pi*sin((1/4)*x*pi)^2*sin((1/4)*y*pi)*cos((1/2)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 - 1/2*pi*sin((1/4)*x*pi)*sin((1/2)*y*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5))*sin((1/4)*x*pi)*sin((1/4)*y*pi) - 0.025*pi*mu*(-0.1*pi*sin((1/4)*x*pi)*cos((1/4)*x*pi)*cos((1/4)*y*pi)*cos((1/2)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 + (1/4)*pi*cos((1/4)*x*pi)*cos((1/2)*y*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5))*cos((1/4)*x*pi)*cos((1/4)*y*pi) + 0.1*pi*rho*sin((1/4)*x*pi)^3*sin((1/4)*y*pi)*cos((1/2)*y*pi)^2/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 - 0.1*pi*rho*sin((1/4)*x*pi)*sin((1/2)*y*pi)*cos((1/4)*x*pi)*cos((1/2)*x*pi)*cos((1/4)*y*pi)*cos((1/2)*y*pi)/(0.2*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 1)^2 - pi*rho*sin((1/4)*x*pi)^2*sin((1/2)*y*pi)*cos((1/2)*y*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5) - 1/2*pi*rho*sin((1/4)*x*pi)*sin((1/2)*x*pi)*sin((1/2)*y*pi)*cos((1/2)*y*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5) + (1/4)*pi*rho*sin((1/2)*y*pi)*cos((1/4)*x*pi)*cos((1/2)*x*pi)*cos((1/2)*y*pi)/(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5) + (3/2)*pi*(0.1*sin((1/4)*x*pi)*cos((1/4)*y*pi) + 0.5)*cos((1/4)*x*pi)*cos((3/2)*y*pi)'
symbol_names = 'mu rho darcy forch'
symbol_values = '${mu} ${rho} ${darcy} ${forch}'
[]
[exact_p]
type = ParsedFunction
expression = 'sin((3/2)*y*pi)*cos((1/4)*x*pi)'
[]
[forcing_p]
type = ParsedFunction
expression = '-1/2*pi*rho*sin((1/4)*x*pi)*sin((1/2)*y*pi) - 1/2*pi*rho*sin((1/2)*x*pi)*sin((1/2)*y*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm 100 lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = false
csv = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2FunctorError
approximate = superficial_vel_x
exact = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2v]
type = ElementL2FunctorError
approximate = superficial_vel_y
exact = exact_v
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
type = ElementL2FunctorError
approximate = pressure
exact = exact_p
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(modules/xfem/test/tests/moving_interface/moving_bimaterial_finite_strain_esm_using_cut_mesh.i)
# This test is for two layer materials with different youngs modulus with AD
# The global stress is determined by switching the stress based on level set values
# The material interface is marked by a level set function
# The two layer materials are glued together
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[XFEM]
output_cut_plane = true
[]
[UserObjects]
[cut]
type = InterfaceMeshCut2DUserObject
mesh_file = line.e
interface_velocity_function = 1
heal_always = true
[]
[esm]
type = CutElementSubdomainModifier
geometric_cut_userobject = cut
apply_initial_conditions = false
[]
[]
[Mesh]
use_displaced_mesh = true
[generated_mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin = 0
xmax = 5
ymin = 0
ymax = 5
elem_type = QUAD4
[]
[bottom]
type = SubdomainBoundingBoxGenerator
input = generated_mesh
block_id = 0
bottom_left = '0 0 0'
top_right = '5 2.5 0'
[]
[top]
type = SubdomainBoundingBoxGenerator
input = bottom
block_id = 1
bottom_left = '0 2.5 0'
top_right = '5 5 0'
[]
[]
[Functions]
[ls_func]
type = ParsedFunction
expression = 'y-2.73+t'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[ls]
[]
[strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[ls_function]
type = FunctionAux
variable = ls
function = ls_func
[]
[strain_xx]
type = RankTwoAux
variable = strain_xx
rank_two_tensor = total_strain
index_i = 0
index_j = 0
[]
[strain_yy]
type = RankTwoAux
variable = strain_yy
rank_two_tensor = total_strain
index_i = 1
index_j = 1
[]
[strain_xy]
type = RankTwoAux
variable = strain_xy
rank_two_tensor = total_strain
index_i = 0
index_j = 1
[]
[stress_xx]
type = RankTwoAux
variable = stress_xx
rank_two_tensor = stress
index_i = 0
index_j = 0
[]
[stress_xy]
type = RankTwoAux
variable = stress_xy
rank_two_tensor = stress
index_i = 0
index_j = 1
[]
[stress_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = stress
index_i = 1
index_j = 1
[]
[]
[Kernels]
[solid_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
use_displaced_mesh = true
[]
[solid_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
use_displaced_mesh = true
[]
[]
[Constraints]
[dispx_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_x
alpha = 1e8
geometric_cut_userobject = 'cut'
[]
[dispy_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_y
alpha = 1e8
geometric_cut_userobject = 'cut'
[]
[]
[BCs]
[bottomx]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[]
[bottomy]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[]
[topx]
type = FunctionDirichletBC
boundary = top
variable = disp_x
function = 0.03*t
[]
[topy]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = '0.03*t'
[]
[]
[Materials]
[elasticity_tensor_A]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1e9
poissons_ratio = 0.3
[]
[strain_A]
type = ComputeFiniteStrain
block = 1
[]
[stress_A]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_B]
type = ComputeIsotropicElasticityTensor
block = 0
youngs_modulus = 1e7
poissons_ratio = 0.3
[]
[strain_B]
type = ComputeFiniteStrain
block = 0
[]
[stress_B]
type = ComputeFiniteStrainElasticStress
block = 0
[]
[]
[Postprocessors]
[disp_x_norm]
type = ElementL2Norm
variable = disp_x
[]
[disp_y_norm]
type = ElementL2Norm
variable = disp_y
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-13
nl_abs_tol = 1e-50
# time control
start_time = 0.0
dt = 0.1
num_steps = 4
max_xfem_update = 1
[]
[Outputs]
print_linear_residuals = false
exodus = true
[]
(test/tests/bcs/penalty_dirichlet_bc/function_penalty_dirichlet_bc_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = -4+x*x+y*y
[../]
[./solution]
type = ParsedGradFunction
value = x*x+y*y
grad_x = 2*x
grad_y = 2*y
[../]
[]
[Variables]
[./u]
order = SECOND
family = HIERARCHIC
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'bc_all'
[./bc_all]
type = FunctionPenaltyDirichletBC
variable = u
function = solution
boundary = 'top left right bottom'
penalty = 1e6
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-14
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/variables/fe_monomial_const/monomial-const-1d.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -1
xmax = 1
nx = 100
elem_type = EDGE3
[]
[Functions]
[./bc_fn]
type=ParsedFunction
expression=0
[../]
[./forcing_fn]
type = MTPiecewiseConst1D
[../]
[./solution]
type = MTPiecewiseConst1D
[../]
[]
[Variables]
[./u]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
# Note: MOOSE's DirichletBCs do not work properly with shape functions that do not
# have DOFs at the element edges. This test works because the solution
# has been designed to be zero at the boundary which is satisfied by the IC
# Ticket #1352
active = ''
[./bc_all]
type=FunctionDirichletBC
variable = u
boundary = 'left right'
function = bc_fn
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1.e-9
[./Adaptivity]
[../]
[]
[Outputs]
execute_on = 'timestep_end'
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[]
(modules/solid_mechanics/test/tests/generalized_plane_strain/generalized_plane_strain_squares.i)
[Mesh]
file = 2squares.e
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./scalar_strain_zz1]
order = FIRST
family = SCALAR
[../]
[./scalar_strain_zz2]
order = FIRST
family = SCALAR
[../]
[]
[AuxVariables]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[./saved_x]
order = FIRST
family = LAGRANGE
[../]
[./saved_y]
order = FIRST
family = LAGRANGE
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./aux_strain_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Postprocessors]
[./react_z1]
type = MaterialTensorIntegral
rank_two_tensor = stress
index_i = 2
index_j = 2
block = 1
[../]
[./react_z2]
type = MaterialTensorIntegral
rank_two_tensor = stress
index_i = 2
index_j = 2
block = 2
[../]
[]
[Physics]
[SolidMechanics]
[./GeneralizedPlaneStrain]
[./gps1]
use_displaced_mesh = true
displacements = 'disp_x disp_y'
scalar_out_of_plane_strain = scalar_strain_zz1
block = '1'
[../]
[./gps2]
use_displaced_mesh = true
displacements = 'disp_x disp_y'
scalar_out_of_plane_strain = scalar_strain_zz2
block = '2'
[../]
[../]
[../]
[]
[Kernels]
[SolidMechanics]
use_displaced_mesh = false
displacements = 'disp_x disp_y'
temperature = temp
save_in = 'saved_x saved_y'
block = '1 2'
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
use_displaced_mesh = false
[../]
[./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_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xx
index_i = 0
index_j = 0
[../]
[./strain_xy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xy
index_i = 0
index_j = 1
[../]
[./strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 1
index_j = 1
[../]
[./aux_strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = aux_strain_zz
index_i = 2
index_j = 2
[../]
[]
[Functions]
[./tempfunc]
type = ParsedFunction
expression = '(1-x)*t'
[../]
[]
[BCs]
[./bottom1x]
type = DirichletBC
boundary = 1
variable = disp_x
value = 0.0
[../]
[./bottom1y]
type = DirichletBC
boundary = 1
variable = disp_y
value = 0.0
[../]
[./bottom2x]
type = DirichletBC
boundary = 2
variable = disp_x
value = 0.0
[../]
[./bottom2y]
type = DirichletBC
boundary = 2
variable = disp_y
value = 0.0
[../]
[]
[Materials]
[./elastic_tensor]
type = ComputeIsotropicElasticityTensor
poissons_ratio = 0.3
youngs_modulus = 1e6
block = '1 2'
[../]
[./strain1]
type = ComputePlaneSmallStrain
displacements = 'disp_x disp_y'
scalar_out_of_plane_strain = scalar_strain_zz1
block = 1
eigenstrain_names = eigenstrain
[../]
[./strain2]
type = ComputePlaneSmallStrain
displacements = 'disp_x disp_y'
scalar_out_of_plane_strain = scalar_strain_zz2
block = 2
eigenstrain_names = eigenstrain
[../]
[./thermal_strain]
type = ComputeThermalExpansionEigenstrain
temperature = temp
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
block = '1 2'
eigenstrain_name = eigenstrain
[../]
[./stress]
type = ComputeLinearElasticStress
block = '1 2'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
# controls for linear iterations
l_max_its = 100
l_tol = 1e-10
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
# time control
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 2.0
num_steps = 5000
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/problems/natural_circulation/natural_circulation.i)
# Natural circulation loop
#
# The setup consists of 4 connected 1-m pipes, forming a square:
#
# top_pipe
# *--------------* (1,1)
# | |
# | <- <- | | g
# heated_pipe | <- <- | cooled_pipe V
# | <- <- |
# | |
# (0,0) *--------------*
# bottom_pipe
#
# Heating and cooling occurs in the range z = (0.2 m, 0.8 m) with uniform heat fluxes.
n_elems = 50
diam = 0.1
length = 1.0
heated_length = 0.6
power = 1e3
p_initial = 100e3
T_ambient = 300
htc = 25.0
area = ${fparse 0.25 * pi * diam^2}
S_heated = ${fparse pi * diam * heated_length}
S_cooled = ${fparse pi * diam * heated_length}
output_variables = 'rho p T vel rhouA'
[GlobalParams]
gravity_vector = '0 0 -9.81'
length = ${length}
n_elems = ${n_elems}
A = ${area}
initial_T = ${T_ambient}
initial_p = ${p_initial}
initial_vel = 0
fp = fp
closures = closures
f = 0
Hw = ${htc}
rdg_slope_reconstruction = full
scaling_factor_1phase = '1 1 1e-5'
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
emit_on_nan = none
[]
[]
[Closures]
[closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[heating_flux_fn]
type = PiecewiseConstant
axis = z
x = '0 0.2 0.8'
y = '0 ${fparse power / (S_heated)} 0'
[]
[cooling_flux_fn]
type = PiecewiseConstant
axis = z
x = '0 0.2 0.8'
y = '0 ${fparse -power / (S_cooled)} 0'
[]
[]
[Components]
[heated_pipe]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
[]
[top_pipe]
type = FlowChannel1Phase
position = '0 0 1'
orientation = '1 0 0'
[]
[cooled_pipe]
type = FlowChannel1Phase
position = '1 0 1'
orientation = '0 0 -1'
[]
[bottom_pipe]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '-1 0 0'
[]
[junction_heated_top]
type = JunctionOneToOne1Phase
connections = 'heated_pipe:out top_pipe:in'
[]
[junction_top_cooled]
type = JunctionOneToOne1Phase
connections = 'top_pipe:out cooled_pipe:in'
[]
[junction_cooled_bottom]
type = JunctionOneToOne1Phase
connections = 'cooled_pipe:out bottom_pipe:in'
[]
[junction_bottom_heated]
type = JunctionOneToOne1Phase
connections = 'bottom_pipe:out heated_pipe:in'
[]
[heating]
type = HeatTransferFromHeatFlux1Phase
flow_channel = 'heated_pipe'
q_wall = heating_flux_fn
[]
[cooling]
type = HeatTransferFromHeatFlux1Phase
flow_channel = 'cooled_pipe'
q_wall = cooling_flux_fn
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Functions]
# Time step size function. NaN gets into residual for debug mode on first step,
# so that step gets cut to 0.5 s, but the rest of the transient can take 1 s time steps.
[dt_fn]
type = ParsedFunction
expression = 'if(t < 1e-10, 0.5, 1.0)'
[]
[]
[Executioner]
type = Transient
scheme = bdf2
start_time = 0
end_time = 50
[TimeStepper]
type = FunctionDT
function = dt_fn
[]
steady_state_detection = true
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu '
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
nl_max_its = 15
l_tol = 1e-4
l_max_its = 10
[]
[VectorPostprocessors]
[heated_pipe_vpp]
type = ElementValueSampler
block = 'heated_pipe'
variable = ${output_variables}
sort_by = z
execute_on = 'FINAL'
[]
[top_pipe_vpp]
type = ElementValueSampler
block = 'top_pipe'
variable = ${output_variables}
sort_by = x
execute_on = 'FINAL'
[]
[cooled_pipe_vpp]
type = ElementValueSampler
block = 'cooled_pipe'
variable = ${output_variables}
sort_by = z
execute_on = 'FINAL'
[]
[bottom_pipe_vpp]
type = ElementValueSampler
block = 'bottom_pipe'
variable = ${output_variables}
sort_by = x
execute_on = 'FINAL'
[]
[]
[Outputs]
xml = true
velocity_as_vector = false
execute_on = 'FINAL'
[]
(tutorials/tutorial03_verification/app/test/tests/step04_mms/2d_mms_spatial.i)
[ICs]
active = 'mms'
[mms]
type = FunctionIC
variable = T
function = mms_exact
[]
[]
[BCs]
active = 'mms'
[mms]
type = FunctionDirichletBC
variable = T
boundary = 'left right top bottom'
function = mms_exact
[]
[]
[Kernels]
[mms]
type = HeatSource
variable = T
function = mms_force
[]
[]
[Functions]
[mms_force]
type = ParsedFunction
expression = 'cp*rho*sin(x*pi)*sin(5*y*pi) + 26*pi^2*k*t*sin(x*pi)*sin(5*y*pi) - shortwave*exp(y*kappa)*sin((1/2)*x*pi)*sin((1/3600)*pi*t/hours)'
symbol_names = 'rho cp k kappa shortwave hours'
symbol_values = '150 2000 0.01 40 650 9'
[]
[mms_exact]
type = ParsedFunction
expression = 't*sin(pi*x)*sin(5*pi*y)'
[]
[]
[Outputs]
csv = true
[]
[Postprocessors]
[error]
type = ElementL2Error
variable = T
function = mms_exact
[]
[h]
type = AverageElementSize
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/bcs/advection_bc/2d_advection_bc.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 10.0
ymax = 10
nx = 10
ny = 10
[]
[Variables]
[./phi]
[../]
[]
[AuxVariables]
[./vx]
[../]
[./force]
[../]
[]
[ICs]
[./vx]
type = FunctionIC
variable = vx
function = vx_function
[../]
[./force]
type = FunctionIC
variable = force
function = forcing
[../]
[]
[Kernels]
[./advection]
type = MassConvectiveFlux
variable = phi
vel_x = vx
[../]
[./rhs]
type = CoupledForce
variable = phi
v = force
[../]
[]
[BCs]
[./inflow_enthalpy]
type = DirichletBC
variable = phi
boundary = 'left'
value = 1
[../]
[./outflow_term]
type = AdvectionBC
variable = phi
velocity_vector = 'vx'
boundary = 'right'
[../]
[]
[Functions]
[./vx_function]
type = ParsedFunction
expression = '1 + x * x'
[../]
[./forcing]
type = ParsedFunction
expression = 'x'
[../]
[./analytical]
type = ParsedFunction
expression = '(1 + 0.5 * x * x) / (1 + x * x)'
[../]
[]
[Postprocessors]
[./error]
type = ElementL2Error
variable = phi
function = analytical
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/velocity_channel/traction-supg.i)
# This input file tests outflow boundary conditions for the incompressible NS equations.
[GlobalParams]
gravity = '0 0 0'
integrate_p_by_parts = true
supg = true
preset = false
laplace = false
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 3.0
ymin = 0
ymax = 1.0
nx = 30
ny = 10
elem_type = QUAD9
[]
[Variables]
[vel_x]
order = SECOND
family = LAGRANGE
[]
[vel_y]
order = SECOND
family = LAGRANGE
[]
[p]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[mass]
type = INSMass
variable = p
u = vel_x
v = vel_y
pressure = p
[]
[x_momentum_space]
type = INSMomentumTractionForm
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[]
[y_momentum_space]
type = INSMomentumTractionForm
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[]
[]
[BCs]
[x_no_slip]
type = DirichletBC
variable = vel_x
boundary = 'top bottom'
value = 0.0
[]
[y_no_slip]
type = DirichletBC
variable = vel_y
boundary = 'left top bottom'
value = 0.0
[]
[x_inlet]
type = FunctionDirichletBC
variable = vel_x
boundary = 'left'
function = 'inlet_func'
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '1 1'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
solve_type = NEWTON
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = none
nl_rel_tol = 1e-12
[]
[Outputs]
[out]
type = Exodus
[]
[]
[Functions]
[inlet_func]
type = ParsedFunction
expression = '-4 * (y - 0.5)^2 + 1'
[]
[]
(test/tests/fvkernels/mms/advective-outflow/kt-limited-advection.i)
a=1.1
c=343
max_abs_eig=${fparse c + a}
[Mesh]
[./gen_mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 0.1
xmax = 1.1
nx = 2
[../]
[]
[Problem]
fv_bcs_integrity_check = false
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = exact
[]
[]
[Variables]
[./u]
two_term_boundary_expansion = true
type = MooseVariableFVReal
[../]
[]
[FVKernels]
[./advection_u]
type = FVKTLimitedAdvection
variable = u
velocity = '${a} 0 0'
limiter = 'vanLeer'
max_abs_eig = ${max_abs_eig}
add_artificial_diff = true
[../]
[body_u]
type = FVBodyForce
variable = u
function = 'forcing'
[]
[]
[FVBCs]
[left_u]
type = FVFunctionNeumannBC
boundary = 'left'
function = 'advection'
variable = u
[]
[diri_left]
type = FVFunctionDirichletBC
boundary = 'left'
function = 'exact'
variable = u
[]
[right]
type = FVConstantScalarOutflowBC
variable = u
velocity = '${a} 0 0'
boundary = 'right'
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = 'cos(x)'
[]
[advection]
type = ParsedFunction
expression = '${a} * cos(x)'
[]
[forcing]
type = ParsedFunction
expression = '-${a} * sin(x)'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-snes_linesearch_minlambda'
petsc_options_value = '1e-3'
nl_abs_tol = 1e-9
[]
[Outputs]
file_base = 'kt-limited-advection_out'
[csv]
type = CSV
execute_on = 'final'
[]
[exo]
type = Exodus
execute_on = 'final'
[]
[]
[Postprocessors]
[./L2u]
type = ElementL2Error
variable = u
function = exact
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(test/tests/multiapps/restart_multilevel/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 1
nx = 10
[]
[Functions]
[u_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[fn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = FunctionDirichletBC
variable = u
boundary = right
function = u_fn
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
app_type = MooseTestApp
type = TransientMultiApp
input_files = 'subsub.i'
execute_on = timestep_end
positions = '0 -1 0'
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[]
[]
(test/tests/fvkernels/mms/mat-advection-diffusion.i)
diff=1.1
a=1.1
[GlobalParams]
advected_interp_method = 'average'
[]
[Mesh]
[./gen_mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = -0.6
xmax = 0.6
nx = 64
[../]
[]
[Variables]
[./v]
family = MONOMIAL
order = CONSTANT
fv = true
[../]
[]
[FVKernels]
[./advection]
type = FVMatAdvection
variable = v
vel = 'fv_velocity'
[../]
[./diffusion]
type = FVDiffusion
variable = v
coeff = coeff
[../]
[body_v]
type = FVBodyForce
variable = v
function = 'forcing'
[]
[]
[FVBCs]
[boundary]
type = FVFunctionDirichletBC
boundary = 'left right'
function = 'exact'
variable = v
[]
[]
[Materials]
[diff]
type = ADGenericFunctorMaterial
prop_names = 'coeff'
prop_values = '${diff}'
[]
[adv_material]
type = ADCoupledVelocityMaterial
vel_x = '${a}'
rho = 'v'
velocity = 'fv_velocity'
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = '3*x^2 + 2*x + 1'
[]
[forcing]
type = ParsedFunction
expression = '-${diff}*6 + ${a} * (6*x + 2)'
# expression = '-${diff}*6'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[./error]
type = ElementL2Error
variable = v
function = exact
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(test/tests/kernels/material_derivatives/material_derivatives_test.i)
###########################################################
# This is a test of the material derivatives test kernel.
###########################################################
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./u_IC_fn]
type = ParsedFunction
expression = 'x'
[../]
[./v_IC_fn]
type = ParsedFunction
expression = 'sin(x)'
[../]
[]
[ICs]
[./u_IC]
type = FunctionIC
variable = u
function = u_IC_fn
[../]
[./v_IC]
type = FunctionIC
variable = v
function = v_IC_fn
[../]
[]
[Kernels]
[./test_kernel]
type = MaterialDerivativeTestKernel
variable = u
coupled_variables = 'u v'
material_property = material_derivative_test_property
[../]
# add a dummy kernel for v to prevent singular Jacobian
[./dummy_kernel]
type = Diffusion
variable = v
[../]
[]
[Materials]
[./material_derivative_test_material]
type = MaterialDerivativeTestMaterial
var1 = u
var2 = v
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
solve_type = newton
petsc_options_iname = '-snes_type -snes_test_err'
petsc_options_value = 'test 1e-10'
[../]
[]
[Executioner]
type = Steady
[]
(modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_heat_flux/main.i)
# Main input file.
#
# Run mesh.i first to produce a mesh file that this input uses:
#
# thermal_hydraulics-opt -i mesh.i --mesh-only mesh.e
length = 5.0
n_elems_axial = 10
rho_name = density
cp_name = specific_heat
k_name = thermal_conductivity
rho = 8000.0
cp = 500.0
k = 15.0
T_initial = 500.0
power = 1000.0
[Mesh]
type = FileMesh
file = mesh.e
[]
[Variables]
[T_solid]
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T_solid
value = ${T_initial}
[]
[]
[Kernels]
[time_derivative]
type = ADHeatConductionTimeDerivative
variable = T_solid
density_name = ${rho_name}
specific_heat = ${cp_name}
[]
[heat_conduction]
type = ADHeatConduction
variable = T_solid
thermal_conductivity = ${k_name}
[]
[]
[BCs]
[bc]
type = FunctorNeumannBC
variable = T_solid
boundary = 'inner'
functor = heat_flux_fn
flux_is_inward = false
[]
[]
[Materials]
[ad_constant_mat]
type = ADGenericConstantMaterial
prop_names = '${rho_name} ${cp_name} ${k_name}'
prop_values = '${rho} ${cp} ${k}'
[]
[]
[Functions]
[heat_flux_fn]
type = ParsedFunction
symbol_names = 'S'
symbol_values = 'inner_surface_area'
expression = '${power} / S'
[]
[]
[Postprocessors]
[inner_surface_area]
type = AreaPostprocessor
boundary = 'inner'
execute_on = 'INITIAL'
[]
[inner_perimeter]
type = ParsedPostprocessor
pp_names = 'inner_surface_area'
expression = 'inner_surface_area / ${length}'
execute_on = 'INITIAL'
[]
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = ThermalHydraulicsApp
input_files = 'sub.i'
positions = '0 0 0'
max_procs_per_app = 1
output_in_position = true
execute_on = 'TIMESTEP_END'
[]
[]
[UserObjects]
[layered_average_heat_flux]
type = NearestPointLayeredSideAverageFunctor
direction = z
points='0 0 0'
num_layers = ${n_elems_axial}
functor = heat_flux_fn
boundary = 'inner'
execute_on = 'TIMESTEP_END'
[]
[]
[Transfers]
[heat_flux_transfer]
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub
source_user_object = layered_average_heat_flux
variable = q_ext
error_on_miss = true
[]
[perimeter_transfer]
type = MultiAppPostprocessorTransfer
to_multi_app = sub
from_postprocessor = inner_perimeter
to_postprocessor = P_ext
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 10.0
num_steps = 1
abort_on_solve_fail = true
solve_type = NEWTON
nl_abs_tol = 1e-10
nl_rel_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 10
[]
(modules/solid_mechanics/test/tests/initial_stress/gravity_with_aux.i)
# Apply an initial stress, using AuxVariables, that should be
# exactly that caused by gravity, and then
# do a transient step to check that nothing
# happens
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 10
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -10
zmax = 0
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[./weight]
type = BodyForce
variable = disp_z
value = -0.5 # this is density*gravity
[../]
[]
[BCs]
# back = zmin
# front = zmax
# bottom = ymin
# top = ymax
# left = xmin
# right = xmax
[./x]
type = DirichletBC
variable = disp_x
boundary = 'left right'
value = 0
[../]
[./y]
type = DirichletBC
variable = disp_y
boundary = 'bottom top'
value = 0
[../]
[./z]
type = DirichletBC
variable = disp_z
boundary = 'back'
value = 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
[../]
[./aux_equals_1]
initial_condition = 1
[../]
[./aux_equals_2]
initial_condition = 2
[../]
[]
[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
[../]
[]
[Functions]
[./half_weight]
type = ParsedFunction
expression = '0.25*z' # half of the initial stress that should result from the weight force
[../]
[./kxx]
type = ParsedFunction
expression = '0.4*z' # some arbitrary xx and yy stress that should not affect the result
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1
poissons_ratio = 0.25
[../]
[./strain]
type = ComputeSmallStrain
eigenstrain_names = ini_stress
[../]
[./strain_from_initial_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = 'kxx 0 0 0 kxx 0 0 0 half_weight'
initial_stress_aux = 'aux_equals_1 aux_equals_1 aux_equals_1 aux_equals_1 aux_equals_1 aux_equals_1 aux_equals_1 aux_equals_1 aux_equals_2'
eigenstrain_name = ini_stress
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
end_time = 1.0
dt = 1.0
solve_type = NEWTON
type = Transient
nl_abs_tol = 1E-8
nl_rel_tol = 1E-12
l_tol = 1E-3
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
file_base = gravity_with_aux
exodus = true
[]
(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'
[]
(test/tests/auxkernels/constant_scalar_aux/constant_scalar_aux.i)
#
# Testing a solution that is second order in space and first order in time
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[AuxVariables]
[./x]
family = SCALAR
order = FIRST
[../]
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[ICs]
[./ic_x]
type = ScalarConstantIC
variable = x
value = 11
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = ((x*x)+(y*y))-(4*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[]
[AuxScalarKernels]
[./const_x]
type = ConstantScalarAux
variable = x
value = 11
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.25
# [./Adaptivity]
# refine_fraction = 0.2
# coarsen_fraction = 0.3
# max_h_level = 4
# [../]
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/rates/jacobian.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 = 4
ny = 4
nz = 4
[]
[]
[ICs]
[disp_x]
type = RandomIC
variable = disp_x
min = -0.02
max = 0.02
[]
[disp_y]
type = RandomIC
variable = disp_y
min = -0.02
max = 0.02
[]
[disp_z]
type = RandomIC
variable = disp_z
min = -0.02
max = 0.02
[]
[]
[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
[]
[]
[Functions]
[pullx]
type = ParsedFunction
expression = '4000 * t'
[]
[pully]
type = ParsedFunction
expression = '-2000 * t'
[]
[pullz]
type = ParsedFunction
expression = '3000 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = left
variable = disp_y
value = 0.0
[]
[leftz]
type = DirichletBC
preset = true
boundary = left
variable = disp_z
value = 0.0
[]
[pull_x]
type = FunctionNeumannBC
boundary = right
variable = disp_x
function = pullx
[]
[pull_y]
type = FunctionNeumannBC
boundary = top
variable = disp_y
function = pully
[]
[pull_z]
type = FunctionNeumannBC
boundary = right
variable = disp_z
function = pullz
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'newton'
line_search = none
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
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
[]
(modules/thermal_hydraulics/test/tests/components/heat_structure_cylindrical/part_base.i)
[Functions]
[power_profile_fn]
type = ParsedFunction
expression = '1.570796326794897 * sin(x / 3.6576 * pi)'
[]
[]
[Components]
[reactor]
type = TotalPower
power = 296153.84615384615385
[]
[hs]
type = HeatStructureCylindrical
position = '0 0 1'
orientation = '1 0 0'
length = 3.6576
n_elems = 20
names = 'FUEL GAP CLAD'
widths = '0.0046955 0.0000955 0.000673'
n_part_elems = '3 1 1'
initial_T = 564.15
[]
[hg]
type = HeatSourceFromTotalPower
hs = hs
regions = 'FUEL'
power_fraction = 3.33672612e-1
power = reactor
power_shape_function = power_profile_fn
[]
[temp_outside]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:outer
T = 600
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 2
num_steps = 10
abort_on_solve_fail = true
solve_type = 'NEWTON'
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
nl_max_its = 30
l_tol = 1e-4
l_max_its = 300
[]
[Outputs]
file_base = transient
exodus = true
[console]
type = Console
execute_scalars_on = none
[]
[]
(modules/thermal_hydraulics/test/tests/postprocessors/heat_structure_energy/heat_structure_energy_plate.i)
# Tests the HeatStructureEnergy post-processor for a plate geometry.
#
# The dimensions of the heat structure are:
# x in (x1, x2) = (0, 2) => length (x-direction) = 2
# y region 1: y in (y1, y2) = (0, 4)
# y region 2: y in (y2, y3) = (4, 7)
# => widths (y-direction) = [4, 3]
# z in (z1, z2) = (0, 4) => depth (z-direction) = 4
#
# The temperature distribution is the following linear function:
# T(x,y) = A * x + B * y + C
# where A = 0.2, B = 0.4, C = 0.5.
# The integral of this function w.r.t. y = (y2, y3) is
# A * x * dy2 + 0.5 * B * (y3^2 - y2^2) + C * dy2
# where dy2 = y3 - y2. The integral of this w.r.t. x = (x1, x2) is
# A * dy2 * 0.5 * (x2^2 - x1^2) + B * dx * 0.5 * (y3^2 - y2^2) + C * dy2 * dx
# where dx = x2 - x1. Substituting values gives int(T) = 17.4
#
# The post-processor computes the integral
# rho2 * cp2 * int_x int_y2 T(x, y) * P(y) * dy * dx
# Here P(y) is equal to the depth: P(y) = depth = 4
#
# The relevant heat structure material properties are
# rho2 = 3
# cp2 = 5
#
# Finally, rho2 * cp2 * int(T) * P = 1044.
#
# For a test variation using a reference temperature of T_ref = 0.5,
# rho2 * cp2 * int(T - T_ref) * P = 864.
[SolidProperties]
[region1-mat]
type = ThermalFunctionSolidProperties
k = 1
cp = 1
rho = 1
[]
[region2-mat]
type = ThermalFunctionSolidProperties
k = 1
cp = 5
rho = 3
[]
[]
[Functions]
[T0_fn]
type = ParsedFunction
expression = '0.2 * x + 0.4 * y + 0.5'
[]
[]
[Components]
[heat_structure]
type = HeatStructurePlate
position = '0 0 0'
orientation = '1 0 0'
length = 2.0
depth = 4.0
n_elems = 5
names = 'region1 region2'
solid_properties = 'region1-mat region2-mat'
solid_properties_T_ref = '300 300'
widths = '4.0 3.0'
n_part_elems = '5 5'
initial_T = T0_fn
[]
[]
[Postprocessors]
[E_tot]
type = ADHeatStructureEnergy
block = 'heat_structure:region2'
plate_depth = 4.0
execute_on = 'initial'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
file_base = 'heat_structure_energy_plate'
csv = true
execute_on = 'initial'
[]
(modules/thermal_hydraulics/test/tests/components/heat_structure_cylindrical/steady.i)
# Tests that cylindrical heat structure geometry can be used with a steady executioner.
[Functions]
[power_profile_fn]
type = ParsedFunction
expression = '1.570796326794897 * sin(x / 3.6576 * pi)'
[]
[]
[SolidProperties]
[fuel_sp]
type = ThermalFunctionSolidProperties
rho = 1.0412e2
cp = 288.734
k = 3.65
[]
[gap_sp]
type = ThermalFunctionSolidProperties
rho = 1.0
cp = 1.0
k = 1.084498
[]
[clad_sp]
type = ThermalFunctionSolidProperties
rho = 6.6e1
cp = 321.384
k = 16.48672
[]
[]
[Components]
[reactor]
type = TotalPower
power = 296153.84615384615385
[]
[hs]
type = HeatStructureCylindrical
position = '0 0 1'
orientation = '1 0 0'
length = 3.6576
n_elems = 20
names = 'FUEL GAP CLAD'
widths = '0.0046955 0.0000955 0.000673'
n_part_elems = '3 1 1'
solid_properties = 'fuel_sp gap_sp clad_sp'
solid_properties_T_ref = '300 300 300'
initial_T = 564.15
[]
[hg]
type = HeatSourceFromTotalPower
hs = hs
regions = 'FUEL'
power_fraction = 3.33672612e-1
power = reactor
power_shape_function = power_profile_fn
[]
[temp_outside]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = hs:outer
T = 600
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
nl_max_its = 30
l_tol = 1e-4
l_max_its = 300
[]
[Outputs]
[out]
type = Exodus
[]
[console]
type = Console
execute_scalars_on = none
[]
[]
(test/tests/kernels/ode/ode_expl_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 5
ny = 5
elem_type = QUAD4
[]
[Functions]
[./f_fn]
type = ParsedFunction
expression = -4
[../]
[./bc_all_fn]
type = ParsedFunction
expression = x*x+y*y
[../]
[]
# NL
[Variables]
[./u]
family = LAGRANGE
order = FIRST
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./uff]
type = BodyForce
variable = u
function = f_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = bc_all_fn
[../]
[]
# Aux
[AuxVariables]
[./y]
family = SCALAR
order = FIRST
initial_condition = 1
[../]
[]
[AuxScalarKernels]
[./ode1]
type = ExplicitODE
variable = y
[../]
[]
[Executioner]
type = Transient
start_time = 0
dt = 0.1
num_steps = 10
[]
[Outputs]
exodus = true
[]
(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/solid_mechanics/test/tests/finite_strain_elastic/finite_strain_fake_plastic.i)
[Mesh]
type = GeneratedMesh
dim = 3
elem_type = HEX8
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Functions]
[./tdisp]
type = ParsedFunction
expression = '0.01 * t'
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
[../]
[]
[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
[../]
[./tdisp]
type = FunctionDirichletBC
variable = disp_z
boundary = front
function = tdisp
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
[../]
[./stress]
# note there are no plastic_models so this is actually elasticity
type = ComputeMultiPlasticityStress
ep_plastic_tolerance = 1E-5
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
dt = 0.05
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = -pc_hypre_type
petsc_options_value = boomeramg
nl_abs_tol = 1e-10
nl_rel_step_tol = 1e-10
dtmax = 10.0
nl_rel_tol = 1e-10
end_time = 1
dtmin = 0.05
num_steps = 10
nl_abs_step_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/pressure/ring.i)
#
#
#
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 1 #10
ny = 1
xmin = 1.0
xmax = 1.1
[]
[move_nodes]
type = MoveNodeGenerator
input = MeshGenerator
node_id = '0 2'
new_position = '0.9 0.1 0 1.125 1.025 0'
[]
[rotate]
type = TransformGenerator
input = move_nodes
transform = rotate
vector_value = '-20 0 0'
[]
[]
[Problem]
coord_type = RZ
[]
[Functions]
[pressure]
type = ParsedFunction
expression = 100*t
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
incremental = false
[]
[]
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[Pressure]
[pressure]
boundary = 'right'
function = pressure
[]
[]
# [pull_x]
# type = DirichletBC
# variable = disp_x
# boundary = left
# value = 1e-5
# preset = false
# []
[]
[Materials]
[Elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric_isotropic
C_ijkl = '0 0.5e6'
[]
# [strain]
# type = ComputeSmallStrain
# []
[stress]
type = ComputeLinearElasticStress
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
petsc_options = '-snes_test_jacobian -snes_test_jacobian_view'
nl_abs_tol = 1e-10
l_max_its = 20
start_time = 0.0
dt = 1.0
num_steps = 10
end_time = 2.0
[]
[Outputs]
[out]
type = Exodus
[]
[]
(modules/xfem/test/tests/pressure_bc/2d_pressure_displaced_mesh.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
volumetric_locking_correction = false
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 5
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
elem_type = QUAD4
[]
[UserObjects]
[./line_seg_cut_uo]
type = LineSegmentCutUserObject
cut_data = '0.0 0.5 1.0 0.5'
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
add_variables = true
planar_formulation = PLANE_STRAIN
generate_output = 'stress_xx stress_yy'
[../]
[]
[Functions]
[./pressure]
type = PiecewiseLinear
x = '0 1.0'
y = '500 500'
[../]
[./bc_func_tx]
type = ParsedFunction
expression = '0.5-(0.5-x)*cos(pi*t/2.0)-x'
[../]
[./bc_func_ty]
type = ParsedFunction
expression = '(0.5-x)*sin(pi*t/2.0)+0.5'
[../]
[]
[BCs]
[./bottom_y]
type = DirichletBC
boundary = 0
preset = false
variable = disp_y
value = 0.0
[../]
[./bottom_x]
type = DirichletBC
boundary = 0
preset = false
variable = disp_x
value = 0.0
[../]
[./top_right_y]
type = FunctionDirichletBC
boundary = 2
preset = false
variable = disp_y
function = bc_func_ty
[../]
[./top_right_x]
type = FunctionDirichletBC
boundary = 2
preset = false
variable = disp_x
function = bc_func_tx
[../]
[]
[DiracKernels]
[./pressure_x]
type = XFEMPressure
variable = disp_x
component = 0
function = pressure
use_displaced_mesh = true
[../]
[./pressure_y]
type = XFEMPressure
variable = disp_y
component = 1
function = pressure
use_displaced_mesh = true
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
line_search = 'none'
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
# controls for linear iterations
l_max_its = 100
l_tol = 1e-2
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-10
nl_abs_tol = 1e-14
# time control
start_time = 0.0
dt = 0.1
end_time = 1.0
[]
[Outputs]
file_base = 2d_pressure_displaced_mesh_out
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(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/combined/test/tests/phase_field_fracture/void2d_iso.i)
[Mesh]
type = FileMesh
file = void2d_mesh.xda
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Modules]
[./TensorMechanics]
[./Master]
[./All]
add_variables = true
strain = SMALL
additional_generate_output = stress_yy
[../]
[../]
[../]
[./PhaseField]
[./Nonconserved]
[./c]
free_energy = F
mobility = L
kappa = kappa_op
[../]
[../]
[../]
[]
[Functions]
[./tfunc]
type = ParsedFunction
expression = t
[../]
[./void_prop_func]
type = ParsedFunction
expression = 'rad:=0.2;m:=50;r:=sqrt(x^2+y^2);1-exp(-(r/rad)^m)+1e-8'
[../]
[./gb_prop_func]
type = ParsedFunction
expression = 'rad:=0.2;thk:=0.05;m:=50;sgnx:=1-exp(-(x/rad)^m);v:=sgnx*exp(-(y/thk)^m);0.005*(1-v)+0.001*v'
[../]
[]
[Kernels]
[./solid_x]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_x
component = 0
c = c
[../]
[./solid_y]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_y
component = 1
c = c
[../]
[]
[BCs]
[./ydisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = tfunc
[../]
[./yfix]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[../]
[./xfix]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[]
[Materials]
[./pfbulkmat]
type = GenericConstantMaterial
prop_names = 'l visco'
prop_values = '0.01 0.1'
[../]
[./pfgc]
type = GenericFunctionMaterial
prop_names = 'gc_prop'
prop_values = 'gb_prop_func'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '120.0 80.0'
fill_method = symmetric_isotropic
elasticity_tensor_prefactor = void_prop_func
[../]
[./define_mobility]
type = ParsedMaterial
material_property_names = 'gc_prop visco'
property_name = L
expression = '1.0/(gc_prop * visco)'
[../]
[./define_kappa]
type = ParsedMaterial
material_property_names = 'gc_prop l'
property_name = kappa_op
expression = 'gc_prop * l'
[../]
[./damage_stress]
type = ComputeLinearElasticPFFractureStress
c = c
E_name = 'elastic_energy'
D_name = 'degradation'
F_name = 'fracture_energy'
decomposition_type = strain_spectral
[../]
[./degradation]
type = DerivativeParsedMaterial
property_name = degradation
coupled_variables = 'c'
expression = '(1.0-c)^2*(1.0 - eta) + eta'
constant_names = 'eta'
constant_expressions = '0.0'
derivative_order = 2
[../]
[./fracture_energy]
type = DerivativeParsedMaterial
property_name = fracture_energy
coupled_variables = 'c'
material_property_names = 'gc_prop l'
expression = 'c^2 * gc_prop / 2 / l'
derivative_order = 2
[../]
[./fracture_driving_energy]
type = DerivativeSumMaterial
coupled_variables = c
sum_materials = 'elastic_energy fracture_energy'
derivative_order = 2
property_name = F
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm lu 1'
nl_rel_tol = 1e-9
nl_max_its = 10
l_tol = 1e-4
l_max_its = 40
dt = 1e-4
num_steps = 2
[]
[Outputs]
exodus = true
[]
(test/tests/bcs/periodic/trapezoid.i)
[Mesh]
file = trapezoid.e
uniform_refine = 1
[]
[Functions]
[./tr_x]
type = ParsedFunction
expression = -x*cos(pi/3)
[../]
[./tr_y]
type = ParsedFunction
expression = x*sin(pi/3)
[../]
[./itr_x]
type = ParsedFunction
expression = -x/cos(pi/3)
[../]
[./itr_y]
type = ParsedFunction
expression = 0
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./forcing]
type = GaussContForcing
variable = u
x_center = 2
y_center = -1
x_spread = 0.25
y_spread = 0.5
[../]
[./dot]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./Periodic]
[./x]
primary = 1
secondary = 4
transform_func = 'tr_x tr_y'
inv_transform_func = 'itr_x itr_y'
[../]
[../]
[]
[Executioner]
type = Transient
dt = 0.5
num_steps = 6
solve_type = NEWTON
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_trapezoid
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/phy.T_wall_transfer_3eqn_z.i)
# Testing that T_solid gets properly projected onto a pipe
# That's why Hw in pipe1 is set to 0, so we do not have any heat exchange
# Note that the pipe and the heat structure have an opposite orientation, which
# is crucial for this test.
[GlobalParams]
initial_p = 1.e5
initial_vel = 0.
initial_T = 300.
closures = simple_closures
[]
[FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[SolidProperties]
[wall-mat]
type = ThermalFunctionSolidProperties
k = 100.0
rho = 100.0
cp = 100.0
[]
[]
[Functions]
[T_init]
type = ParsedFunction
expression = '290 + sin((1 - z) * pi * 1.4)'
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
position = '0.2 0 0'
orientation = '0 0 1'
length = 1
n_elems = 50
A = 9.6858407346e-01
D_h = 6.1661977237e+00
f = 0.01
fp = eos
[]
[hs]
type = HeatStructureCylindrical
position = '0.1 0 1'
orientation = '0 0 -1'
length = 1
n_elems = 50
rotation = 90
solid_properties = 'wall-mat'
solid_properties_T_ref = '300'
n_part_elems = 2
widths = '0.1'
names = 'wall'
initial_T = T_init
[]
[hxconn]
type = HeatTransferFromHeatStructure1Phase
hs = hs
hs_side = outer
flow_channel = pipe1
Hw = 0
P_hf = 6.2831853072e-01
[]
[inlet]
type = SolidWall1Phase
input = 'pipe1:in'
[]
[outlet]
type = SolidWall1Phase
input = 'pipe1:out'
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
dt = 1
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-6
nl_max_its = 20
l_tol = 1e-3
l_max_its = 300
start_time = 0.0
num_steps = 1
[]
[Outputs]
[out]
type = Exodus
show = 'T_wall T_solid'
[]
print_linear_residuals = false
[]
(test/tests/outputs/oversample/adapt.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t*t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1
solve_type = PJFNK
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 2
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[./oversample]
type = Exodus
refinements = 2
file_base = adapt_out_oversample
execute_on = 'initial timestep_end'
[../]
[]
(test/tests/functions/function_ic/function_ic_test.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_cond_func
[../]
[../]
[]
[AuxVariables]
active = 'u_aux'
[./u_aux]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_cond_func
[../]
[../]
[]
[Functions]
[./initial_cond_func]
type = ParsedFunction
expression = x+2
[../]
[]
[Kernels]
active = 'diff'
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-10
[]
[Outputs]
file_base = out
exodus = true
[]
(modules/solid_mechanics/examples/coal_mining/cosserat_mc_only.i)
# Strata deformation and fracturing around a coal mine
#
# A 2D geometry is used that simulates a transverse section of
# the coal mine. The model is actually 3D, but the "x"
# dimension is only 10m long, meshed with 1 element, and
# there is no "x" displacement. The mine is 300m deep
# and just the roof is studied (0<=z<=300). The model sits
# between 0<=y<=450. The excavation sits in 0<=y<=150. This
# is a "half model": the boundary conditions are such that
# the model simulates an excavation sitting in -150<=y<=150
# inside a model of the region -450<=y<=450. The
# excavation height is 3m (ie, the excavation lies within
# 0<=z<=3). Mining is simulated by moving the excavation's
# roof down, until disp_z=-3 at t=1.
# Time is meaningless in this example
# as quasi-static solutions are sought at each timestep, but
# the number of timesteps controls the resolution of the
# process.
#
# The boundary conditions are:
# - disp_x = 0 everywhere
# - disp_y = 0 at y=0 and y=450
# - disp_z = 0 for y>150
# - disp_z = -3 at maximum, for 0<=y<=150. See excav function.
# That is, rollers on the sides, free at top, and prescribed at bottom.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa. The initial stress is consistent with
# the weight force from density 2500 kg/m^3, ie, stress_zz = -0.025*(300-z) MPa
# where gravity = 10 m.s^-2 = 1E-5 MPa m^2/kg. The maximum and minimum
# principal horizontal stresses are assumed to be equal to 0.8*stress_zz.
#
# Below you will see weak-plane parameters and AuxVariables, etc.
# These are not actally used in this example.
#
# Material properties:
# Young's modulus = 8 GPa
# Poisson's ratio = 0.25
# Cosserat layer thickness = 1 m
# Cosserat-joint normal stiffness = large
# Cosserat-joint shear stiffness = 1 GPa
# MC cohesion = 3 MPa
# MC friction angle = 37 deg
# MC dilation angle = 8 deg
# MC tensile strength = 1 MPa
# MC compressive strength = 100 MPa, varying down to 1 MPa when tensile strain = 1
#
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
xmin = -5
xmax = 5
nz = 40
zmin = 0
zmax = 400.0
bias_z = 1.1
ny = 30 # make this a multiple of 3, so y=150 is at a node
ymin = 0
ymax = 450
[]
[left]
type = SideSetsAroundSubdomainGenerator
new_boundary = 11
normal = '0 -1 0'
input = generated_mesh
[]
[right]
type = SideSetsAroundSubdomainGenerator
new_boundary = 12
normal = '0 1 0'
input = left
[]
[front]
type = SideSetsAroundSubdomainGenerator
new_boundary = 13
normal = '-1 0 0'
input = right
[]
[back]
type = SideSetsAroundSubdomainGenerator
new_boundary = 14
normal = '1 0 0'
input = front
[]
[top]
type = SideSetsAroundSubdomainGenerator
new_boundary = 15
normal = '0 0 1'
input = back
[]
[bottom]
type = SideSetsAroundSubdomainGenerator
new_boundary = 16
normal = '0 0 -1'
input = top
[]
[excav]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '-5 0 0'
top_right = '5 150 3'
input = bottom
[]
[roof]
type = SideSetsBetweenSubdomainsGenerator
new_boundary = 21
primary_block = 0
paired_block = 1
input = excav
[]
[hole]
type = BlockDeletionGenerator
block = 1
input = roof
[]
[]
[GlobalParams]
block = 0
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
[]
[Variables]
[./disp_y]
[../]
[./disp_z]
[../]
[./wc_x]
[../]
[]
[Kernels]
[./cy_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_y
component = 1
[../]
[./cz_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_z
component = 2
[../]
[./x_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[../]
[./x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[../]
[./gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./wc_y]
[../]
[./wc_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./mc_shear]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_internal_parameter
variable = mc_shear
[../]
[./mc_tensile]
type = MaterialStdVectorAux
index = 1
property = mc_plastic_internal_parameter
variable = mc_tensile
[../]
[./wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
[../]
[./wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
[../]
[./mc_shear_f]
type = MaterialStdVectorAux
index = 6
property = mc_plastic_yield_function
variable = mc_shear_f
[../]
[./mc_tensile_f]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_yield_function
variable = mc_tensile_f
[../]
[./wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
[../]
[./wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
[../]
[]
[BCs]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '11 12 16 21' # note addition of 16 and 21
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '16'
value = 0.0
[../]
[./no_wc_x]
type = DirichletBC
variable = wc_x
boundary = '11 12'
value = 0.0
[../]
[./roof]
type = FunctionDirichletBC
variable = disp_z
boundary = 21
function = excav_sideways
[../]
[]
[Functions]
[./ini_xx]
type = ParsedFunction
expression = '-0.8*2500*10E-6*(400-z)'
[../]
[./ini_zz]
type = ParsedFunction
expression = '-2500*10E-6*(400-z)'
[../]
[./excav_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax e_h closure_dist'
symbol_values = '1.0 0 150.0 -3.0 15.0'
expression = 'e_h*max(min((t/end_t*(ymax-ymin)+ymin-y)/closure_dist,1),0)'
[../]
[./excav_downwards]
type = ParsedFunction
symbol_names = 'end_t ymin ymax e_h closure_dist'
symbol_values = '1.0 0 150.0 -3.0 15.0'
expression = 'e_h*t/end_t*max(min(((ymax-ymin)+ymin-y)/closure_dist,1),0)'
[../]
[]
[UserObjects]
[./mc_coh_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 2.99 # MPa
value_residual = 3.01 # MPa
rate = 1.0
[../]
[./mc_fric]
type = SolidMechanicsHardeningConstant
value = 0.65 # 37deg
[../]
[./mc_dil]
type = SolidMechanicsHardeningConstant
value = 0.15 # 8deg
[../]
[./mc_tensile_str_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.0 # MPa
rate = 1.0
[../]
[./mc_compressive_str]
type = SolidMechanicsHardeningCubic
value_0 = 100 # Large!
value_residual = 100
internal_limit = 0.1
[../]
[./wp_coh_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_tan_fric]
type = SolidMechanicsHardeningConstant
value = 0.36 # 20deg
[../]
[./wp_tan_dil]
type = SolidMechanicsHardeningConstant
value = 0.18 # 10deg
[../]
[./wp_tensile_str_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_compressive_str_soften]
type = SolidMechanicsHardeningCubic
value_0 = 100
value_residual = 1.0
internal_limit = 1.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeLayeredCosseratElasticityTensor
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3
[../]
[./strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[../]
[./ini_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
eigenstrain_name = ini_stress
[../]
[./stress]
type = ComputeMultipleInelasticCosseratStress
block = 0
inelastic_models = mc
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./mc]
type = CappedMohrCoulombCosseratStressUpdate
block = 0
warn_about_precision_loss = false
host_youngs_modulus = 8E3
host_poissons_ratio = 0.25
base_name = mc
tensile_strength = mc_tensile_str_strong_harden
compressive_strength = mc_compressive_str
cohesion = mc_coh_strong_harden
friction_angle = mc_fric
dilation_angle = mc_dil
max_NR_iterations = 100000
smoothing_tol = 0.1 # MPa # Must be linked to cohesion
yield_function_tol = 1E-9 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[../]
[./wp]
type = CappedWeakPlaneCosseratStressUpdate
block = 0
warn_about_precision_loss = false
base_name = wp
cohesion = wp_coh_harden
tan_friction_angle = wp_tan_fric
tan_dilation_angle = wp_tan_dil
tensile_strength = wp_tensile_str_harden
compressive_strength = wp_compressive_str_soften
max_NR_iterations = 10000
tip_smoother = 0.1
smoothing_tol = 0.1 # MPa # Note, this must be tied to cohesion, otherwise get no possible return at cone apex
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0E-3
[../]
[./density]
type = GenericConstantMaterial
prop_names = density
prop_values = 2500
[../]
[]
[Postprocessors]
[./subsidence]
type = PointValue
point = '0 0 400'
variable = disp_z
use_displaced_mesh = false
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
line_search = bt
nl_abs_tol = 1e-3
nl_rel_tol = 1e-5
l_max_its = 30
nl_max_its = 1000
start_time = 0.0
dt = 0.2
end_time = 0.2
[]
[Outputs]
file_base = cosserat_mc_only
time_step_interval = 1
print_linear_residuals = false
csv = true
exodus = true
[./console]
type = Console
output_linear = false
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/scalar_adr/supg/2d_advection_error_testing.i)
ax=1
ay=1
[GlobalParams]
u = ${ax}
v = ${ay}
pressure = 0
tau_type = mod
transient_term = true
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmax = 1
ymax = 1
elem_type = QUAD9
[]
[Variables]
[./c]
family = LAGRANGE
order = SECOND
[../]
[]
[Kernels]
[./adv]
type = AdvectionSUPG
variable = c
forcing_func = 'ffn'
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = c
boundary = 'left right top bottom'
function = 'c_func'
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'mu rho'
prop_values = '0 1'
[../]
[]
[Functions]
[./ffn]
type = ParsedFunction
expression = '${ax}*(0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x)) + ${ay}*(0.14*pi*x*cos(0.2*pi*x*y) + 0.4*pi*cos(pi*y))'
[../]
[./c_func]
type = ParsedFunction
expression = '0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5'
[../]
[./cx_func]
type = ParsedFunction
expression = '0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x)'
[../]
[]
# [Executioner]
# type = Steady
# petsc_options_iname = '-pc_type -pc_factor_shift_type'
# petsc_options_value = 'lu NONZERO'
# []
[Executioner]
type = Transient
num_steps = 10
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_view'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu NONZERO superlu_dist'
line_search = 'none'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-12
nl_max_its = 10
l_tol = 1e-6
l_max_its = 10
[./TimeStepper]
dt = .05
type = IterationAdaptiveDT
cutback_factor = 0.4
growth_factor = 1.2
optimal_iterations = 20
[../]
[]
[Outputs]
[./exodus]
type = Exodus
[../]
[./csv]
type = CSV
[../]
[]
[Postprocessors]
[./L2c]
type = ElementL2Error
variable = c
function = c_func
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2cx]
type = ElementL2Error
variable = cx
function = cx_func
outputs = 'console' execute_on = 'timestep_end'
[../]
[]
[AuxVariables]
[./cx]
family = MONOMIAL
order = FIRST
[../]
[]
[AuxKernels]
[./cx_aux]
type = VariableGradientComponent
component = x
variable = cx
gradient_variable = c
[../]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/mms/skew-correction/skewed-vortex-action.i)
mu = 1.0
rho = 1.0
[Mesh]
[gen_mesh]
type = FileMeshGenerator
file = skewed.msh
[]
[]
[Modules]
[NavierStokesFV]
compressibility = 'incompressible'
density = 'rho'
dynamic_viscosity = 'mu'
wall_boundaries = 'top left right bottom'
momentum_wall_types = 'noslip noslip noslip noslip'
initial_velocity = '1 1 0'
pin_pressure = true
pinned_pressure_type = average
pinned_pressure_value = 0
momentum_face_interpolation = skewness-corrected
pressure_face_interpolation = skewness-corrected
momentum_advection_interpolation = skewness-corrected
mass_advection_interpolation = skewness-corrected
[]
[]
[FVKernels]
[u_forcing]
type = INSFVBodyForce
variable = vel_x
functor = forcing_u
momentum_component = 'x'
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
[]
[v_forcing]
type = INSFVBodyForce
variable = vel_y
functor = forcing_v
momentum_component = 'y'
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
[]
[]
[FunctorMaterials]
[const]
type = ADGenericFunctorMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'x^2*(1-x)^2*(2*y-6*y^2+4*y^3)'
[]
[exact_v]
type = ParsedFunction
expression = '-y^2*(1-y)^2*(2*x-6*x^2+4*x^3)'
[]
[exact_p]
type = ParsedFunction
expression = 'x*(1-x)-2/12'
[]
[forcing_u]
type = ParsedFunction
expression = '-4*mu/rho*(-1+2*y)*(y^2-6*x*y^2+6*x^2*y^2-y+6*x*y-6*x^2*y+3*x^2-6*x^3+3*x^4)+1-2*x+4*x^3'
'*y^2*(2*y^2-2*y+1)*(y-1)^2*(-1+2*x)*(x-1)^3'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[forcing_v]
type = ParsedFunction
expression = '4*mu/rho*(-1+2*x)*(x^2-6*y*x^2+6*x^2*y^2-x+6*x*y-6*x*y^2+3*y^2-6*y^3+3*y^4)+4*y^3*x^2*(2'
'*x^2-2*x+1)*(x-1)^2*(-1+2*y)*(y-1)^3'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-8
[]
[Outputs]
[out]
type = Exodus
hide = lambda
[]
csv = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2Error
variable = vel_x
function = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2v]
type = ElementL2Error
variable = vel_y
function = exact_v
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
variable = pressure
function = exact_p
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/thermal_expansion/free.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = false
eigenstrain_names = "thermal_contribution"
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[AuxVariables]
[temperature]
[]
[]
[AuxKernels]
[control_temperature]
type = FunctionAux
variable = temperature
function = temperature_control
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = bottom
variable = disp_y
value = 0.0
[]
[leftz]
type = DirichletBC
preset = true
boundary = back
variable = disp_z
value = 0.0
[]
[]
[Functions]
[temperature_control]
type = ParsedFunction
expression = '100*t'
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = SMALL
new_system = true
formulation = UPDATED
volumetric_locking_correction = false
generate_output = 'cauchy_stress_xx cauchy_stress_yy cauchy_stress_zz cauchy_stress_xy '
'cauchy_stress_xz cauchy_stress_yz strain_xx strain_yy strain_zz strain_xy '
'strain_xz strain_yz'
[]
[]
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[thermal_expansion]
type = ComputeThermalExpansionEigenstrain
temperature = temperature
thermal_expansion_coeff = 1.0e-3
eigenstrain_name = thermal_contribution
stress_free_temperature = 0.0
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
end_time = 1
dt = 1
type = Transient
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/GBAnisotropy/testwidth1.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 2
nz = 0
xmin = -500
xmax = 1000
ymin = 0
ymax = 100
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[GlobalParams]
op_num = 3
var_name_base = gr
length_scale = 1.0e-9
time_scale = 1.0e-9
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[Functions]
[./ic_func_eta1]
type = ParsedFunction
expression = '0.5*(1.0-tanh((x)*sqrt(m/kappa/2.0)))'
symbol_names = 'm kappa'
symbol_values = '0.26514 331.414'
[../]
[./ic_func_eta2]
type = ParsedFunction
expression = '0.5*(1.0+tanh((x)*sqrt(m/kappa/2.0)))*0.5*(1.0-tanh((x-500)*sqrt(m/kappa/2.0)))'
symbol_names = 'm kappa'
symbol_values = '0.26514 331.414'
[../]
[./ic_func_eta3]
type = ParsedFunction
expression = '0.5*(1.0+tanh((x-500)*sqrt(m/kappa/2.0)))'
symbol_names = 'm kappa'
symbol_values = '0.26514 331.414'
[../]
[]
[ICs]
[./eta1_ic]
variable = gr0
type = FunctionIC
function = ic_func_eta1
[../]
[./eta2_ic]
variable = gr1
type = FunctionIC
function = ic_func_eta2
[../]
[./eta3_ic]
variable = gr2
type = FunctionIC
function = ic_func_eta3
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[./unique_grains]
order = FIRST
family = LAGRANGE
[../]
[./var_indices]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./bnds_aux]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[]
[Materials]
[./CuGrGranisotropic]
type = GBWidthAnisotropy
kappa = 331.414
mu = 0.26514
T = 600 # K
# molar_volume_value = 7.11e-6 #Units:m^3/mol
Anisotropic_GB_file_name = anisotropy_energy.txt
inclination_anisotropy = false # true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 30
l_tol = 1e-4
nl_max_its = 40
nl_rel_tol = 1e-10
nl_abs_tol = 1e-11
num_steps = 2
dt = 10
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/solid_mechanics/test/tests/recompute_radial_return/uniaxial_viscoplasticity_incrementalstrain.i)
# This is a test of the HyperbolicViscoplasticityStressUpdate model
# using the small strain formulation. The material is a visco-plastic material
# i.e. a time-dependent linear strain hardening plasticity model.
# A similar problem was run in Abaqus with exactly the same result, although the element
# used in the Abaqus simulation was a CAX4 element. Neverthless, due to the boundary conditions
# and load, the MOOSE and Abaqus result are the same.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
file = 1x1x1cube.e
[]
[Functions]
[./top_pull]
type = ParsedFunction
expression = t/100
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = SMALL
incremental = true
add_variables = true
generate_output = 'stress_yy plastic_strain_xx plastic_strain_yy plastic_strain_zz'
[../]
[]
[BCs]
[./y_pull_function]
type = FunctionDirichletBC
variable = disp_y
boundary = 5
function = top_pull
[../]
[./x_bot]
type = DirichletBC
variable = disp_x
boundary = 4
value = 0.0
[../]
[./y_bot]
type = DirichletBC
variable = disp_y
boundary = 3
value = 0.0
[../]
[./z_bot]
type = DirichletBC
variable = disp_z
boundary = 2
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1000.0
poissons_ratio = 0.3
[../]
[./viscoplasticity]
type = HyperbolicViscoplasticityStressUpdate
yield_stress = 10.0
hardening_constant = 100.0
c_alpha = 0.2418e-6
c_beta = 0.1135
[../]
[./radial_return_stress]
type = ComputeMultipleInelasticStress
inelastic_models = 'viscoplasticity'
tangent_operator = elastic
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = none
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
num_steps = 30
dt = 1.0
[]
[Outputs]
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[]
(test/tests/fvkernels/mms/harmonic_interpolation/diffusion.i)
d1 = 1
d2 = 10
[Mesh]
[gen_mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
elem_type = TRI3
[]
[subdomain]
type = ParsedSubdomainMeshGenerator
input = gen_mesh
combinatorial_geometry = 'y > 0.5'
block_id = 1
[]
[]
[Variables]
[v]
type = MooseVariableFVReal
[]
[]
[FVKernels]
[diff]
type = FVDiffusion
variable = v
coeff = 'diff_coeff'
coeff_interp_method = average
[]
[body_v]
type = FVBodyForce
variable = v
function = 'forcing'
[]
[]
[FVBCs]
[exact]
type = FVFunctionDirichletBC
boundary = 'left right top bottom'
function = 'exact'
variable = v
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = 'if (y < 0.5, 1 + x + 3*y*y*y, (11*d2-3*d1)/ (8*d2) + x + 3*d1/d2*y*y*y)'
symbol_names = 'd1 d2'
symbol_values = '${d1} ${d2}'
[]
[forcing]
type = ParsedFunction
expression = '-d1*18*y'
symbol_names = 'd1'
symbol_values = '${d1}'
[]
[]
[Materials]
[diff_coeff]
type = ADPiecewiseByBlockFunctorMaterial
prop_name = 'diff_coeff'
subdomain_to_prop_value = '0 ${d1}
1 ${d2}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
exodus = true
[]
[Postprocessors]
[error]
type = ElementL2Error
variable = v
function = exact
outputs = 'console csv'
[]
[h]
type = AverageElementSize
outputs = 'console csv'
[]
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/convergence-auto/1D/dirichlet.i)
# Simple 1D plane strain test
[GlobalParams]
displacements = 'disp_x'
large_kinematics = true
[]
[Variables]
[disp_x]
[]
[]
[ICs]
[disp_x]
type = RandomIC
variable = disp_x
min = -0.1
max = 0.1
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 1
nx = 10
[]
[]
[Kernels]
[sdx]
type = UpdatedLagrangianStressDivergence
variable = disp_x
component = 0
use_displaced_mesh = true
[]
[]
[Functions]
[pull]
type = ParsedFunction
expression = '0.06 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = right
variable = disp_x
value = 0.0
[]
[pull]
type = FunctionDirichletBC
boundary = left
variable = disp_x
function = pull
preset = true
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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 = 5.0
dtmin = 5.0
end_time = 5.0
[]
(test/tests/functions/parsed/scalar.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./scalar]
family = SCALAR
initial_condition = 0
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[AuxScalarKernels]
[./scalar_aux]
type = FunctionScalarAux
variable = scalar
function = func
[../]
[]
[BCs]
[./left]
type = FunctionDirichletBC
variable = u
boundary = left
function = left_bc
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Functions]
[./left_bc]
type = ParsedFunction
expression = s
symbol_values = scalar
symbol_names = s
[../]
[./func]
type = ParsedFunction
expression = t
[../]
[]
[Executioner]
type = Transient
num_steps = 5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/pps_interval/pps_interval_mismatch.i)
[Mesh]
file = square-2x2-nodeids.e
# This test can only be run with renumering disabled, so the
# NodalVariableValue postprocessor's node id is well-defined.
allow_renumbering = false
[]
[Variables]
active = 'u v'
[./u]
order = SECOND
family = LAGRANGE
[../]
[./v]
order = SECOND
family = LAGRANGE
[../]
[]
[Functions]
active = 'force_fn exact_fn left_bc'
[./force_fn]
type = ParsedFunction
expression = '1-x*x+2*t'
[../]
[./exact_fn]
type = ParsedFunction
expression = '(1-x*x)*t'
[../]
[./left_bc]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
active = '
time_u diff_u ffn_u
time_v diff_v'
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'all_u left_v right_v'
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = exact_fn
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '2'
value = 0
[../]
[]
[Postprocessors]
active = 'l2 node1 node4'
[./l2]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./node1]
type = NodalVariableValue
variable = u
nodeid = 15
[../]
[./node4]
type = NodalVariableValue
variable = v
nodeid = 10
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
end_time = 1
[]
[Outputs]
time_step_interval = 4
exodus = true
[./console]
type = Console
time_step_interval = 3
[../]
[]
(modules/combined/test/tests/optimization/invOpt_nonlinear/simulation.i)
[Executioner]
type = Steady
solve_type = NEWTON
line_search = none
nl_abs_tol = 1e-12
nl_rel_tol = 1e-12
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 2
ymax = 2
[]
[Variables]
[forwardT]
[]
[]
[Kernels]
[heat_conduction]
type = ADHeatConduction
thermal_conductivity = 'conductivity'
variable = forwardT
[]
[heat_source]
type = ADMatHeatSource
material_property = 'volumetric_heat'
variable = forwardT
[]
[]
[Materials]
[NonlinearConductivity]
type = ADParsedMaterial
f_name = 'conductivity'
function = '10+500*forwardT'
args = 'forwardT'
[]
[volumetric_heat]
type = ADGenericFunctionMaterial
prop_names = 'volumetric_heat'
prop_values = 'volumetric_heat_func'
[]
[]
[Functions]
[volumetric_heat_func]
type = ParsedFunction
value = q
vars = 'q'
vals = 'heat_source_pp'
[]
[]
[Postprocessors]
[heat_source_pp]
type = ConstantValuePostprocessor
value = 333
execute_on = 'LINEAR'
[]
[]
[BCs]
[left]
type = NeumannBC
variable = forwardT
boundary = left
value = 0
[]
[right]
type = NeumannBC
variable = forwardT
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = forwardT
boundary = bottom
value = 2
[]
[top]
type = DirichletBC
variable = forwardT
boundary = top
value = 1
[]
[]
[Reporters]
[measurement_locations]
type = OptimizationData
[]
[]
[Controls]
[parameterReceiver]
type = ControlsReceiver
[]
[]
[VectorPostprocessors]
[data_pt]
type = PointValueSampler
variable = forwardT
points = '0.2 0.2 0
0.8 0.6 0
0.2 1.4 0
0.8 1.8 0'
sort_by = id
[]
[]
[Outputs]
csv = true
[]
(test/tests/transfers/general_field/user_object/duplicated_user_object_tests/3d_1d_sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
elem_type = EDGE2
displacements = 'disp_x disp_y disp_z'
[]
[Functions]
[disp_x_fn]
type = ParsedFunction
expression = '-x'
[]
[disp_z_fn]
type = ParsedFunction
expression = 'x'
[]
[]
[AuxVariables]
[sub_app_var]
family = MONOMIAL
order = CONSTANT
[]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[AuxKernels]
[disp_x_ak]
type = FunctionAux
variable = disp_x
function = 'disp_x_fn'
[]
[disp_y_ak]
type = ConstantAux
variable = disp_y
value = 0
[]
[disp_z_ak]
type = FunctionAux
variable = disp_z
function = 'disp_z_fn'
[]
[]
[UserObjects]
[sub_app_uo]
type = LayeredAverage
direction = z
variable = u
num_layers = 10
execute_on = TIMESTEP_END
use_displaced_mesh = true
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[td]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 1
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 2
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(modules/phase_field/examples/kim-kim-suzuki/kks_example_dirichlet.i)
#
# KKS simple example in the split form
#
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
nx = 50
ny = 2
nz = 0
xmin = 0
xmax = 20
ymin = 0
ymax = 0.4
zmin = 0
zmax = 0
[]
[AuxVariables]
[./Fglobal]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Variables]
# order parameter
[./eta]
order = FIRST
family = LAGRANGE
[../]
# hydrogen concentration
[./c]
order = FIRST
family = LAGRANGE
[../]
# chemical potential
[./w]
order = FIRST
family = LAGRANGE
[../]
# Liquid phase solute concentration
[./cl]
order = FIRST
family = LAGRANGE
initial_condition = 0.1
[../]
# Solid phase solute concentration
[./cs]
order = FIRST
family = LAGRANGE
initial_condition = 0.9
[../]
[]
[Functions]
[./ic_func_eta]
type = ParsedFunction
expression = 0.5*(1.0-tanh((x)/sqrt(2.0)))
[../]
[./ic_func_c]
type = ParsedFunction
expression = '0.9*(0.5*(1.0-tanh(x/sqrt(2.0))))^3*(6*(0.5*(1.0-tanh(x/sqrt(2.0))))^2-15*(0.5*(1.0-tanh(x/sqrt(2.0))))+10)+0.1*(1-(0.5*(1.0-tanh(x/sqrt(2.0))))^3*(6*(0.5*(1.0-tanh(x/sqrt(2.0))))^2-15*(0.5*(1.0-tanh(x/sqrt(2.0))))+10))'
[../]
[]
[ICs]
[./eta]
variable = eta
type = FunctionIC
function = ic_func_eta
[../]
[./c]
variable = c
type = FunctionIC
function = ic_func_c
[../]
[]
[BCs]
[./left_c]
type = DirichletBC
variable = 'c'
boundary = 'left'
value = 0.5
[../]
[./left_eta]
type = DirichletBC
variable = 'eta'
boundary = 'left'
value = 0.5
[../]
[]
[Materials]
# Free energy of the liquid
[./fl]
type = DerivativeParsedMaterial
property_name = fl
coupled_variables = 'cl'
expression = '(0.1-cl)^2'
[../]
# Free energy of the solid
[./fs]
type = DerivativeParsedMaterial
property_name = fs
coupled_variables = 'cs'
expression = '(0.9-cs)^2'
[../]
# 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 eps_sq'
prop_values = '0.7 0.7 1.0 '
[../]
[]
[Kernels]
# enforce c = (1-h(eta))*cl + h(eta)*cs
[./PhaseConc]
type = KKSPhaseConcentration
ca = cl
variable = cs
c = c
eta = eta
[../]
# enforce pointwise equality of chemical potentials
[./ChemPotSolute]
type = KKSPhaseChemicalPotential
variable = cl
cb = cs
fa_name = fl
fb_name = fs
[../]
#
# Cahn-Hilliard Equation
#
[./CHBulk]
type = KKSSplitCHCRes
variable = c
ca = cl
fa_name = fl
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 = fl
fb_name = fs
w = 1.0
coupled_variables = 'cl cs'
[../]
[./ACBulkC]
type = KKSACBulkC
variable = eta
ca = cl
cb = cs
fa_name = fl
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = eps_sq
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[AuxKernels]
[./GlobalFreeEnergy]
variable = Fglobal
type = KKSGlobalFreeEnergy
fa_name = fl
fb_name = fs
w = 1.0
[../]
[]
[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 = 100
nl_max_its = 100
nl_abs_tol = 1e-10
end_time = 800
dt = 4.0
[]
#
# Precondition using handcoded off-diagonal terms
#
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./integral]
type = ElementL2Error
variable = eta
function = ic_func_eta
[../]
[]
[Outputs]
exodus = true
console = true
gnuplot = true
[]
(test/tests/time_integrators/bdf2/bdf2_adapt.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 4
ny = 4
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.25
[./Adaptivity]
refine_fraction = 0.2
coarsen_fraction = 0.3
max_h_level = 4
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/mms/channel-flow/plane-poiseuille-flow.i)
mu = 0.5
rho = 1.1
advected_interp_method = 'average'
velocity_interp_method = 'average'
two_term_boundary_expansion = true
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 10
ymin = -1
ymax = 1
nx = 10
ny = 2
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 1
two_term_boundary_expansion = ${two_term_boundary_expansion}
[]
[v]
type = INSFVVelocityVariable
initial_condition = 1
two_term_boundary_expansion = ${two_term_boundary_expansion}
[]
[pressure]
type = INSFVPressureVariable
two_term_boundary_expansion = ${two_term_boundary_expansion}
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[mass_forcing]
type = FVBodyForce
variable = pressure
function = forcing_p
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[u_forcing]
type = INSFVBodyForce
variable = u
functor = forcing_u
momentum_component = 'x'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[v_forcing]
type = INSFVBodyForce
variable = v
functor = forcing_v
momentum_component = 'y'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = 'exact_u'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = v
function = 'exact_v'
[]
[walls-u]
type = INSFVNoSlipWallBC
variable = u
boundary = 'top bottom'
function = 'exact_u'
[]
[walls-v]
type = INSFVNoSlipWallBC
variable = v
boundary = 'top bottom'
function = 'exact_v'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 'exact_p'
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = '0.5*(1.0 - y^2)/mu'
symbol_names = 'mu'
symbol_values = '${mu}'
[]
[exact_rhou]
type = ParsedFunction
expression = '0.5*rho*(1.0 - y^2)/mu'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[forcing_u]
type = ParsedFunction
expression = '0'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_v]
type = ParsedFunction
expression = '0.0'
[]
[exact_rhov]
type = ParsedFunction
expression = '0'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[forcing_v]
type = ParsedFunction
expression = '0'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = '10.0 - x'
[]
[forcing_p]
type = ParsedFunction
expression = '0'
symbol_names = 'rho mu'
symbol_values = '${rho} ${mu}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO superlu_dist'
[]
[Outputs]
csv = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2Error
variable = u
function = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2v]
type = ElementL2Error
variable = v
function = exact_v
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
variable = pressure
function = exact_p
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/mms/channel-flow/cylindrical/2d-average-with-temp.i)
mu=1.1
rho=1.1
k=1.1
cp=1.1
advected_interp_method='average'
velocity_interp_method='average'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
[]
[]
[Problem]
coord_type = 'RZ'
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 1
two_term_boundary_expansion = false
[]
[v]
type = INSFVVelocityVariable
initial_condition = 1
two_term_boundary_expansion = false
[]
[pressure]
type = INSFVPressureVariable
two_term_boundary_expansion = false
[]
[temperature]
type = INSFVEnergyVariable
two_term_boundary_expansion = false
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[mass_forcing]
type = FVBodyForce
variable = pressure
function = forcing_p
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[u_forcing]
type = INSFVBodyForce
variable = u
functor = forcing_u
momentum_component = 'x'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[v_forcing]
type = INSFVBodyForce
variable = v
functor = forcing_v
momentum_component = 'y'
[]
[temp_conduction]
type = FVDiffusion
coeff = 'k'
variable = temperature
[]
[temp_advection]
type = INSFVEnergyAdvection
variable = temperature
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
[]
[temp_forcing]
type = FVBodyForce
variable = temperature
function = forcing_t
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'bottom'
variable = u
function = 'exact_u'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'bottom'
variable = v
function = 'exact_v'
[]
[no-slip-wall-u]
type = INSFVNoSlipWallBC
boundary = 'right'
variable = u
function = 'exact_u'
[]
[no-slip-wall-v]
type = INSFVNoSlipWallBC
boundary = 'right'
variable = v
function = 'exact_v'
[]
[outlet-p]
type = INSFVOutletPressureBC
boundary = 'top'
variable = pressure
function = 'exact_p'
[]
[axis-u]
type = INSFVSymmetryVelocityBC
boundary = 'left'
variable = u
u = u
v = v
mu = ${mu}
momentum_component = x
[]
[axis-v]
type = INSFVSymmetryVelocityBC
boundary = 'left'
variable = v
u = u
v = v
mu = ${mu}
momentum_component = y
[]
[axis-p]
type = INSFVSymmetryPressureBC
boundary = 'left'
variable = pressure
[]
[axis-inlet-wall-t]
type = FVFunctionDirichletBC
boundary = 'left bottom right'
variable = temperature
function = 'exact_t'
[]
[]
[FunctorMaterials]
[const_functor]
type = ADGenericFunctorMaterial
prop_names = 'cp k'
prop_values = '${cp} ${k}'
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = 'temperature'
rho = ${rho}
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'sin(x*pi)^2*sin((1/2)*y*pi)'
[]
[exact_rhou]
type = ParsedFunction
expression = 'rho*sin(x*pi)^2*sin((1/2)*y*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[forcing_u]
type = ParsedFunction
expression = '(1/4)*pi^2*mu*sin(x*pi)^2*sin((1/2)*y*pi) - pi*sin(x*pi)*cos((1/2)*y*pi) + (4*x*pi*rho*sin(x*pi)^3*sin((1/2)*y*pi)^2*cos(x*pi) + rho*sin(x*pi)^4*sin((1/2)*y*pi)^2)/x + (-x*pi*rho*sin(x*pi)^2*sin((1/2)*y*pi)*sin(y*pi)*cos(x*pi) + (1/2)*x*pi*rho*sin(x*pi)^2*cos(x*pi)*cos((1/2)*y*pi)*cos(y*pi))/x - (-2*x*pi^2*mu*sin(x*pi)^2*sin((1/2)*y*pi) + 2*x*pi^2*mu*sin((1/2)*y*pi)*cos(x*pi)^2 + 2*pi*mu*sin(x*pi)*sin((1/2)*y*pi)*cos(x*pi))/x'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_v]
type = ParsedFunction
expression = 'cos(x*pi)*cos(y*pi)'
[]
[exact_rhov]
type = ParsedFunction
expression = 'rho*cos(x*pi)*cos(y*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[forcing_v]
type = ParsedFunction
expression = 'pi^2*mu*cos(x*pi)*cos(y*pi) - 2*pi*rho*sin(y*pi)*cos(x*pi)^2*cos(y*pi) - 1/2*pi*sin((1/2)*y*pi)*cos(x*pi) - (-x*pi^2*mu*cos(x*pi)*cos(y*pi) - pi*mu*sin(x*pi)*cos(y*pi))/x + (-x*pi*rho*sin(x*pi)^3*sin((1/2)*y*pi)*cos(y*pi) + 2*x*pi*rho*sin(x*pi)*sin((1/2)*y*pi)*cos(x*pi)^2*cos(y*pi) + rho*sin(x*pi)^2*sin((1/2)*y*pi)*cos(x*pi)*cos(y*pi))/x'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'cos(x*pi)*cos((1/2)*y*pi)'
[]
[forcing_p]
type = ParsedFunction
expression = '-pi*rho*sin(y*pi)*cos(x*pi) + (2*x*pi*rho*sin(x*pi)*sin((1/2)*y*pi)*cos(x*pi) + rho*sin(x*pi)^2*sin((1/2)*y*pi))/x'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[exact_t]
type = ParsedFunction
expression = 'sin(x*pi)*sin((1/2)*y*pi)'
[]
[forcing_t]
type = ParsedFunction
expression = '(1/4)*pi^2*k*sin(x*pi)*sin((1/2)*y*pi) - (-x*pi^2*k*sin(x*pi)*sin((1/2)*y*pi) + pi*k*sin((1/2)*y*pi)*cos(x*pi))/x + (3*x*pi*cp*rho*sin(x*pi)^2*sin((1/2)*y*pi)^2*cos(x*pi) + cp*rho*sin(x*pi)^3*sin((1/2)*y*pi)^2)/x + (-x*pi*cp*rho*sin(x*pi)*sin((1/2)*y*pi)*sin(y*pi)*cos(x*pi) + (1/2)*x*pi*cp*rho*sin(x*pi)*cos(x*pi)*cos((1/2)*y*pi)*cos(y*pi))/x'
symbol_names = 'k rho cp'
symbol_values = '${k} ${rho} ${cp}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm 100 lu NONZERO'
line_search = 'none'
[]
[Outputs]
csv = true
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[./L2u]
type = ElementL2FunctorError
approximate = u
exact = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[./L2v]
type = ElementL2FunctorError
approximate = v
exact = exact_v
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[./L2p]
approximate = pressure
exact = exact_p
type = ElementL2FunctorError
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[./L2t]
approximate = temperature
exact = exact_t
type = ElementL2FunctorError
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[]
(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/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
[]
(test/tests/linearfvkernels/diffusion/diffusion-1d.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 2
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = coeff_func
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "left right"
functor = analytic_solution
[]
[]
[Functions]
[coeff_func]
type = ParsedFunction
expression = '0.5*x'
[]
[source_func]
type = ParsedFunction
expression = '2*x'
[]
[analytic_solution]
type = ParsedFunction
expression = '1-x*x'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = FINAL
[]
[error]
type = ElementL2FunctorError
approximate = u
exact = analytic_solution
execute_on = FINAL
[]
[]
[Executioner]
type = LinearPicardSteady
linear_systems_to_solve = u_sys
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
[csv]
type = CSV
execute_on = FINAL
[]
[]
(modules/contact/test/tests/mortar_tm/horizontal_blocks_mortar_TM.i)
offset = 0.01
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
[./left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 0.0
ymin = -0.5
ymax = 0.5
nx = 1
ny = 1
elem_type = QUAD4
boundary_name_prefix = lb
[../]
[./left_block_id]
type = SubdomainIDGenerator
input = left_block
subdomain_id = 1
[../]
[./right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.0
xmax = 1.0
ymin = -0.6
ymax = 0.6
nx = 1
ny = 1
elem_type = QUAD4
boundary_name_prefix = rb
boundary_id_offset = 10
[../]
[./right_block_id]
type = SubdomainIDGenerator
input = right_block
subdomain_id = 2
[../]
[./combined]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'left_block right_block'
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
[../]
[]
[Functions]
[./horizontal_movement]
type = ParsedFunction
expression = t/10.0
[../]
[]
[BCs]
[./push_x]
type = FunctionDirichletBC
preset = true
variable = disp_x
boundary = lb_left
function = horizontal_movement
[../]
[./fix_x]
type = DirichletBC
preset = true
variable = disp_x
boundary = rb_right
value = 0.0
[../]
[./fix_y]
type = DirichletBC
preset = true
variable = disp_y
boundary = rb_right
value = 0.0
[../]
[./fix_y_offset]
type = DirichletBC
preset = true
variable = disp_y
boundary = lb_left
value = ${offset}
[../]
[]
[Materials]
[./elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = left_block
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[../]
[./stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[../]
[./elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = right_block
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[../]
[./stress_right]
type = ComputeFiniteStrainElasticStress
block = right_block
[../]
[]
[Contact]
[./leftright]
secondary = lb_right
primary = rb_left
model = frictionless
formulation = mortar
friction_coefficient = 0.0
normal_smoothing_distance = 0.1
penalty = 1e+8
normalize_penalty = true
[../]
[]
[ICs]
[./disp_x]
type = ConstantIC
block = left_block
variable = disp_x
value = -${offset}
[../]
[./disp_y]
block = left_block
variable = disp_y
value = ${offset}
type = ConstantIC
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15 20'
dt = 0.1
dtmin = 0.1
end_time = 0.1
l_tol = 1e-4
l_max_its = 100
nl_rel_tol = 1e-10
nl_abs_tol = 1e-6
nl_max_its = 100
[]
(test/tests/kernels/vector_fe/coupled_scalar_vector_jacobian.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmin = -1.1
ymin = -1.1
xmax = 1.1
ymax = 1.1
elem_type = QUAD9
[]
[Variables]
[./u]
family = NEDELEC_ONE
order = FIRST
[../]
[./v]
[../]
[]
[Kernels]
[./wave]
type = VectorFEWave
variable = u
x_forcing_func = 'x_ffn'
y_forcing_func = 'y_ffn'
[../]
[./diff]
type = Diffusion
variable = v
[../]
[./source]
type = BodyForce
variable = v
[../]
[./advection]
type = EFieldAdvection
variable = v
efield = u
charge = 'positive'
mobility = 100
[../]
[]
[Functions]
[./x_ffn]
type = ParsedFunction
expression = '(2*pi*pi + 1)*cos(pi*x)*sin(pi*y)'
[../]
[./y_ffn]
type = ParsedFunction
expression = '-(2*pi*pi + 1)*sin(pi*x)*cos(pi*y)'
[../]
[]
[Preconditioning]
[./pre]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'asm'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
[]
(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/solid_mechanics/test/tests/lagrangian/cartesian/total/thermal_expansion/constrained.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = false
eigenstrain_names = "thermal_contribution"
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[AuxVariables]
[temperature]
[]
[]
[AuxKernels]
[control_temperature]
type = FunctionAux
variable = temperature
function = temperature_control
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[rightx]
type = DirichletBC
preset = true
boundary = right
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = bottom
variable = disp_y
value = 0.0
[]
[leftz]
type = DirichletBC
preset = true
boundary = back
variable = disp_z
value = 0.0
[]
[]
[Functions]
[temperature_control]
type = ParsedFunction
expression = '100*t'
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = SMALL
new_system = true
formulation = TOTAL
volumetric_locking_correction = false
generate_output = 'cauchy_stress_xx cauchy_stress_yy cauchy_stress_zz cauchy_stress_xy '
'cauchy_stress_xz cauchy_stress_yz strain_xx strain_yy strain_zz strain_xy '
'strain_xz strain_yz'
[]
[]
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[thermal_expansion]
type = ComputeThermalExpansionEigenstrain
temperature = temperature
thermal_expansion_coeff = 1.0e-3
eigenstrain_name = thermal_contribution
stress_free_temperature = 0.0
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
end_time = 1
dt = 1
type = Transient
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/steady_vector_fsp.i)
rho=1
mu=1
U=1
l=1
prefactor=${fparse 1/(l/2)^2}
n=8
[Mesh]
[gen]
type = DistributedRectilinearMeshGenerator
dim = 2
xmin = 0
xmax = ${l}
ymin = 0
ymax = ${l}
nx = ${n}
ny = ${n}
elem_type = QUAD4
[]
second_order = true
parallel_type = distributed
[]
[Variables]
[vel]
order = SECOND
family = LAGRANGE_VEC
[]
[p]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[mass]
type = INSADMass
variable = p
[]
[mass_kernel]
type = MassMatrix
variable = p
matrix_tags = 'mass'
[]
[momentum_convection]
type = INSADMomentumAdvection
variable = vel
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = vel
extra_matrix_tags = 'L'
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = vel
pressure = p
integrate_p_by_parts = true
[]
[]
[BCs]
[no_slip]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'bottom right left'
extra_matrix_tags = 'L'
[]
[lid]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'top'
function_x = 'lid_function'
extra_matrix_tags = 'L'
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[insad]
type = INSADMaterial
velocity = vel
pressure = p
[]
[]
[Functions]
[lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '${prefactor}*${U}*x*(${l}-x)'
[]
[]
[Problem]
type = NavierStokesProblem
mass_matrix = 'mass'
extra_tag_matrices = 'mass L'
L_matrix = 'L'
commute_lsc = true
[]
[Preconditioning]
[FSP]
type = FSP
topsplit = 'up'
[up]
splitting = 'u p'
splitting_type = schur
petsc_options_iname = '-pc_fieldsplit_schur_fact_type -pc_fieldsplit_schur_precondition -ksp_gmres_restart -ksp_type -ksp_pc_side -ksp_rtol'
petsc_options_value = 'full self 300 fgmres right 1e-4'
[]
[u]
vars = 'vel'
# petsc_options = '-ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_type -ksp_rtol -ksp_gmres_restart -ksp_pc_side'
petsc_options_value = 'hypre boomeramg gmres 1e-2 300 right'
[]
[p]
vars = 'p'
petsc_options = '-ksp_converged_reason -pc_lsc_commute'
petsc_options_iname = '-ksp_type -ksp_gmres_restart -ksp_rtol -pc_type -ksp_pc_side -lsc_pc_type -lsc_pc_hypre_type -lsc_ksp_type -lsc_ksp_rtol -lsc_ksp_pc_side -lsc_ksp_gmres_restart -lsc_mass_pc_type -lsc_mass_pc_hypre_type -lsc_mass_ksp_rtol -lsc_mass_ksp_type'
petsc_options_value = 'fgmres 300 1e-2 lsc right hypre boomeramg fgmres 1e-1 right 300 hypre boomeramg 1e-1 gmres'
[]
[]
[]
[Postprocessors]
[pavg]
type = ElementAverageValue
variable = p
[]
[]
[UserObjects]
[set_pressure]
type = NSPressurePin
pin_type = 'average'
variable = p
pressure_average = 'pavg'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
print_linear_residuals = false
[exo]
type = Exodus
execute_on = 'final'
hide = 'pavg'
file_base = 'fsp_steady_low_Re_olshanskii'
[]
[]
(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/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/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_no_parts_steady.i)
[GlobalParams]
integrate_p_by_parts = false
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[AuxVariables]
[vel_x]
order = SECOND
[]
[vel_y]
order = SECOND
[]
[]
[AuxKernels]
[vel_x]
type = VectorVariableComponentAux
variable = vel_x
vector_variable = velocity
component = 'x'
[]
[vel_y]
type = VectorVariableComponentAux
variable = vel_y
vector_variable = velocity
component = 'y'
[]
[]
[Variables]
[./velocity]
order = SECOND
family = LAGRANGE_VEC
[../]
[./p]
[../]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[momentum_advection]
type = INSADMomentumAdvection
variable = velocity
[]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
[../]
[]
[BCs]
[p_corner]
type = DirichletBC
boundary = top_right
value = 0
variable = p
[]
[inlet]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom'
function_x = 0
function_y = 'inlet_func'
[../]
[wall]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'right'
function_x = 0
function_y = 0
[]
[axis]
type = ADVectorFunctionDirichletBC
variable = velocity
boundary = 'left'
set_y_comp = false
function_x = 0
[]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADMaterial
velocity = velocity
pressure = p
[]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
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
(test/tests/adaptivity/initial_adapt/initial_adapt.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1
solve_type = 'PJFNK'
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 2
initial_steps = 2
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Outputs]
exodus = true
[]
(modules/fluid_properties/test/tests/water/water.i)
# Example of using Water97FluidProperties module in Region 1 by recovering the values
# in Table 5 of Revised Release on the IAPWS Industrial Formulation 1997 for the
# Thermodynamic Properties of Water and Steam
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
xmax = 3
# This test uses ElementalVariableValue postprocessors on specific
# elements, so element numbering needs to stay unchanged
allow_renumbering = false
[]
[Variables]
[./dummy]
[../]
[]
[AuxVariables]
[./pressure]
order = CONSTANT
family = MONOMIAL
[../]
[./temperature]
order = CONSTANT
family = MONOMIAL
[../]
[./rho]
family = MONOMIAL
order = CONSTANT
[../]
[./v]
family = MONOMIAL
order = CONSTANT
[../]
[./e]
family = MONOMIAL
order = CONSTANT
[../]
[./h]
family = MONOMIAL
order = CONSTANT
[../]
[./s]
family = MONOMIAL
order = CONSTANT
[../]
[./cp]
family = MONOMIAL
order = CONSTANT
[../]
[./cv]
family = MONOMIAL
order = CONSTANT
[../]
[./c]
family = MONOMIAL
order = CONSTANT
[../]
[./mu]
family = MONOMIAL
order = CONSTANT
[../]
[./k]
family = MONOMIAL
order = CONSTANT
[../]
[]
[Functions]
[./tic]
type = ParsedFunction
expression = 'if(x<2, 300, 500)'
[../]
[./pic]
type = ParsedFunction
expression = 'if(x<1,3e6, if(x<2, 80e6, 3e6))'
[../]
[]
[ICs]
[./p_ic]
type = FunctionIC
function = pic
variable = pressure
[../]
[./t_ic]
type = FunctionIC
function = tic
variable = temperature
[../]
[]
[AuxKernels]
[./rho]
type = MaterialRealAux
variable = rho
property = density
[../]
[./v]
type = ParsedAux
coupled_variables = rho
expression = 1/rho
variable = v
[../]
[./e]
type = MaterialRealAux
variable = e
property = e
[../]
[./h]
type = MaterialRealAux
variable = h
property = h
[../]
[./s]
type = MaterialRealAux
variable = s
property = s
[../]
[./cp]
type = MaterialRealAux
variable = cp
property = cp
[../]
[./cv]
type = MaterialRealAux
variable = cv
property = cv
[../]
[./c]
type = MaterialRealAux
variable = c
property = c
[../]
[./mu]
type = MaterialRealAux
variable = mu
property = viscosity
[../]
[./k]
type = MaterialRealAux
variable = k
property = k
[../]
[]
[FluidProperties]
[./water]
type = Water97FluidProperties
[../]
[]
[Materials]
[./fp_mat]
type = FluidPropertiesMaterialPT
pressure = pressure
temperature = temperature
fp = water
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = dummy
[../]
[]
[Postprocessors]
[./density0]
type = ElementalVariableValue
variable = rho
elementid = 0
[../]
[./density1]
type = ElementalVariableValue
variable = rho
elementid = 1
[../]
[./density2]
type = ElementalVariableValue
variable = rho
elementid = 2
[../]
[./v0]
type = ElementalVariableValue
variable = v
elementid = 0
[../]
[./v1]
type = ElementalVariableValue
variable = v
elementid = 1
[../]
[./v2]
type = ElementalVariableValue
variable = v
elementid = 2
[../]
[./e0]
type = ElementalVariableValue
variable = e
elementid = 0
[../]
[./e1]
type = ElementalVariableValue
variable = e
elementid = 1
[../]
[./e2]
type = ElementalVariableValue
variable = e
elementid = 2
[../]
[./h0]
type = ElementalVariableValue
variable = h
elementid = 0
[../]
[./h1]
type = ElementalVariableValue
variable = h
elementid = 1
[../]
[./h2]
type = ElementalVariableValue
variable = h
elementid = 2
[../]
[./s0]
type = ElementalVariableValue
variable = s
elementid = 0
[../]
[./s1]
type = ElementalVariableValue
variable = s
elementid = 1
[../]
[./s2]
type = ElementalVariableValue
variable = s
elementid = 2
[../]
[./cp0]
type = ElementalVariableValue
variable = cp
elementid = 0
[../]
[./cp1]
type = ElementalVariableValue
variable = cp
elementid = 1
[../]
[./cp2]
type = ElementalVariableValue
variable = cp
elementid = 2
[../]
[./cv0]
type = ElementalVariableValue
variable = cv
elementid = 0
[../]
[./cv1]
type = ElementalVariableValue
variable = cv
elementid = 1
[../]
[./cv2]
type = ElementalVariableValue
variable = cv
elementid = 2
[../]
[./c0]
type = ElementalVariableValue
variable = c
elementid = 0
[../]
[./c1]
type = ElementalVariableValue
variable = c
elementid = 1
[../]
[./c2]
type = ElementalVariableValue
variable = c
elementid = 2
[../]
[./mu0]
type = ElementalVariableValue
variable = mu
elementid = 0
[../]
[./mu1]
type = ElementalVariableValue
variable = mu
elementid = 1
[../]
[./mu2]
type = ElementalVariableValue
variable = mu
elementid = 2
[../]
[./k0]
type = ElementalVariableValue
variable = k
elementid = 0
[../]
[./k1]
type = ElementalVariableValue
variable = k
elementid = 1
[../]
[./k2]
type = ElementalVariableValue
variable = k
elementid = 2
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
csv = true
[]
(modules/combined/test/tests/additive_manufacturing/check_initial_condition.i)
[Problem]
kernel_coverage_check = false
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 10
ymin = 0
ymax = 10
zmin = 0
zmax = 0.5
nx = 20
ny = 20
nz = 1
[]
[left_domain]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '2.5 10 0.5'
block_id = 1
[]
[middle_domain]
input = left_domain
type = SubdomainBoundingBoxGenerator
bottom_left = '2.5 0 0'
top_right = '5 10 0.5'
block_id = 2
[]
[right_domain]
input = middle_domain
type = SubdomainBoundingBoxGenerator
bottom_left = '5 0 0'
top_right = '10 10 0.5'
block_id = 3
[]
[sidesets]
input = right_domain
type = SideSetsAroundSubdomainGenerator
normal = '1 0 0'
block = 2
new_boundary = 'moving_interface'
[]
[]
[Variables]
[temp]
block = '1 2'
[]
[]
[ICs]
[temp_block1]
type = ConstantIC
variable = temp
value = 300
block = 1
[]
[temp_block2]
type = ConstantIC
variable = temp
value = 1000
block = 2
[]
[]
[Functions]
[fx]
type = ParsedFunction
expression = '5.25'
[]
[fy]
type = ParsedFunction
expression = '2.5*t'
[]
[fz]
type = ParsedFunction
expression = '0.25'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
automatic_scaling = true
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_max_its = 10
nl_max_its = 20
nl_rel_tol = 1e-4
start_time = 0.0
end_time = 1.0
dt = 1e-1
dtmin = 1e-4
[]
[UserObjects]
[activated_elem_uo]
type = ActivateElementsByPath
execute_on = timestep_begin
function_x = fx
function_y = fy
function_z = fz
active_subdomain_id = 2
expand_boundary_name = 'moving_interface'
[]
[]
[Outputs]
exodus = true
[]
(test/tests/time_integrators/explicit-euler/ee-2d-linear.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Functions]
[./ic]
type = ParsedFunction
expression = 0
[../]
[./forcing_fn]
type = ParsedFunction
expression = (x+y)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*(x+y)
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic
[../]
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
lumping = true
implicit = true
[../]
[./diff]
type = Diffusion
variable = u
implicit = false
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
implicit = false
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
preset = false
boundary = '0 1 2 3'
function = exact_fn
implicit = true
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'explicit-euler'
solve_type = 'LINEAR'
start_time = 0.0
num_steps = 20
dt = 0.00005
[]
[Outputs]
exodus = true
[./console]
type = Console
max_rows = 10
[../]
[]
(test/tests/fvkernels/mms/skewness-correction/diffusion/skewed.i)
a=1.1
diff=1.1
[Mesh]
[./gen_mesh]
type = FileMeshGenerator
file = skewed.msh
[../]
[]
[Variables]
[./v]
initial_condition = 1
type = MooseVariableFVReal
face_interp_method = 'skewness-corrected'
[../]
[]
[FVKernels]
[diff_v]
type = FVDiffusion
variable = v
coeff = ${diff}
[]
[body_v]
type = FVBodyForce
variable = v
function = 'forcing'
[]
[]
[FVBCs]
[exact]
type = FVFunctionDirichletBC
boundary = 'left right top bottom'
function = 'exact'
variable = v
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = 'sin(x)*cos(y)'
[]
[forcing]
type = ParsedFunction
expression = '2*diff*sin(x)*cos(y)'
symbol_names = 'a diff'
symbol_values = '${a} ${diff}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
[]
[Postprocessors]
[./error]
type = ElementL2Error
variable = v
function = exact
outputs = 'console csv'
[../]
[h]
type = AverageElementSize
outputs = 'console csv'
[]
[]
(test/tests/executioners/executioner/steady_state_check_test.i)
#
# Run transient simulation into steady state
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Variables]
active = 'u'
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
# expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
expression = -4
[../]
[./exact_fn]
type = ParsedFunction
# expression = t*t*t*((x*x)+(y*y))
expression = ((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
solve_type = 'PJFNK'
nl_abs_tol = 1e-14
start_time = 0.0
num_steps = 12
dt = 1
steady_state_detection = true
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_ss_check
exodus = true
[]
(modules/geochemistry/test/tests/kernels/dispersion_1.i)
# Dispersion of a step-function front of concentration
# The initial condition is such that the theoretical result is exactly
# c = erf(x/sqrt(4*t*D)), where D = hydrodynamic_dispersion
#
# The finite mesh resolution and large time-step size means this is only achieved approximately (increasing nx and decreasing results in the error decreasing, but note the series approximation to the error function means that the error should never be exactly zero)
por = 2.0 # this is the porosity. The result should not depend on por in this example since it appears in both terms of the PDE
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = -5
xmax = 5
[]
[Variables]
[conc]
[]
[]
[ICs]
[spike]
type = FunctionIC
variable = conc
function = 'if(x<=0.0, -1.0, 1.0)'
[]
[]
[Kernels]
[dot]
type = GeochemistryTimeDerivative
porosity = ${por}
variable = conc
[]
[disp]
type = GeochemistryDispersion
variable = conc
porosity = ${por}
tensor_coeff = '0.3 0 0 0 0 0 0 0 0'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.5
end_time = 1.0
[]
[AuxVariables]
[expected]
[]
[should_be_zero]
[]
[]
[AuxKernels]
[expected]
type = FunctionAux
variable = expected
function = erf
[]
[should_be_zero]
type = ParsedAux
coupled_variables = 'expected conc'
expression = 'expected - conc'
variable = should_be_zero
[]
[]
[Postprocessors]
[error]
type = ElementL2Norm
variable = should_be_zero
[]
[]
[Functions]
[erf]
type = ParsedFunction
# series expansion for evaluating the error function
expression = 'xi := x / sqrt(4 * t * 0.3); expxi := exp(-xi * xi); if(x < 0.0, -1.0, if(x > 0.0, 1.0, 0.0)) * 2 / sqrt(pi) * sqrt(1 - expxi) * (sqrt(pi) / 2.0 + 31.0 * expxi / 200.0 - 341.0 * expxi * expxi / 8000.0)'
[]
[]
[Outputs]
exodus = true
execute_on = final
[]
(modules/solid_mechanics/test/tests/generalized_plane_strain/generalized_plane_strain_increment.i)
[GlobalParams]
displacements = 'disp_x disp_y'
scalar_out_of_plane_strain = scalar_strain_zz
block = 0
[]
[Mesh]
[square]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[]
[]
[Variables]
[scalar_strain_zz]
order = FIRST
family = SCALAR
[]
[]
[AuxVariables]
[temp]
[]
[saved_x]
[]
[saved_y]
[]
[]
[Postprocessors]
[react_z]
type = MaterialTensorIntegral
rank_two_tensor = stress
index_i = 2
index_j = 2
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = SMALL
incremental = true
add_variables = true
generate_output = 'stress_xx stress_xy stress_yy stress_zz strain_xx strain_xy strain_yy strain_zz'
planar_formulation = GENERALIZED_PLANE_STRAIN
eigenstrain_names = eigenstrain
scalar_out_of_plane_strain = scalar_strain_zz
temperature = temp
save_in = 'saved_x saved_y'
[]
[]
[AuxKernels]
[tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
use_displaced_mesh = false
[]
[]
[Functions]
[tempfunc]
type = ParsedFunction
expression = '(1-x)*t'
[]
[]
[BCs]
[bottomx]
type = DirichletBC
boundary = 0
variable = disp_x
value = 0.0
[]
[bottomy]
type = DirichletBC
boundary = 0
variable = disp_y
value = 0.0
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
poissons_ratio = 0.3
youngs_modulus = 1e6
[]
[thermal_strain]
type = ComputeThermalExpansionEigenstrain
temperature = temp
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
eigenstrain_name = eigenstrain
[]
[stress]
type = ComputeStrainIncrementBasedStress
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -ksp_gmres_restart'
petsc_options_value = 'lu superlu_dist 51'
# controls for linear iterations
l_max_its = 100
l_tol = 1e-4
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-12
nl_abs_tol = 1e-8
# time control
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 2.0
[]
[Outputs]
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
[]
(test/tests/restart/restart_subapp_not_parent/complete_solve_no_subapp.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*t*(x*x+y*y)
[../]
[./forcing_fn]
type = ParsedFunction
expression = 2*t*(x*x+y*y)-4*t*t
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]
[ICs]
[./u_var]
type = FunctionIC
variable = u
function = exact_fn
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[../]
[]
[Postprocessors]
[./average]
type = ElementAverageValue
variable = u
[../]
[]
[Executioner]
type = Transient
start_time = 0.0
end_time = 4.0
dt = 1.0
[]
[Outputs]
file_base = complete_solve_no_subapp
exodus = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/action/action_1D.i)
# Simple 1D plane strain test
[GlobalParams]
displacements = 'disp_x'
large_kinematics = true
[]
[Variables]
[disp_x]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 1
nx = 10
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = FINITE
add_variables = true
new_system = true
formulation = TOTAL
volumetric_locking_correction = false
[]
[]
[]
[]
[Functions]
[pull]
type = ParsedFunction
expression = '0.06 * t'
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = right
variable = disp_x
value = 0.0
[]
[pull]
type = FunctionDirichletBC
boundary = left
variable = disp_x
function = pull
preset = true
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[stress_base]
type = ComputeLagrangianLinearElasticStress
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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 = 5.0
[]
[Outputs]
exodus = true
[]
(test/tests/dgkernels/3d_diffusion_dg/3d_diffusion_dg_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 5
ny = 5
nz = 5
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 1
elem_type = HEX8
[]
[Variables]
active = 'u'
[u]
order = FIRST
family = MONOMIAL
[InitialCondition]
type = ConstantIC
value = 0.5
[]
[]
[]
[Functions]
active = 'forcing_fn exact_fn'
[forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[]
[exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[]
[]
[Kernels]
active = 'diff abs forcing'
[diff]
type = Diffusion
variable = u
[]
[abs] # u * v
type = Reaction
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[DGKernels]
active = 'dg_diff'
[dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[]
[]
[BCs]
active = 'all'
[all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3 4 5'
function = exact_fn
epsilon = -1
sigma = 6
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Postprocessors]
active = 'h dofs l2_err'
[h]
type = AverageElementSize
execute_on = 'initial timestep_end'
[]
[dofs]
type = NumDOFs
execute_on = 'initial timestep_end'
[]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
file_base = out
exodus = true
[]
(test/tests/functors/matching-analytic-solution/test.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 20
[]
[]
[Variables]
[u][]
[]
[AuxVariables]
[nodal][]
[elemental]
type = MooseVariableFVReal
[]
[elemental_grad]
type = MooseVariableFVReal
[]
[elemental_dot]
type = MooseVariableFVReal
[]
[elemental_grad_dot]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[nodal]
type = FunctorAux
functor = u
variable = nodal
[]
[elemental]
type = FunctorAux
functor = u
variable = elemental
[]
[elemental_dot]
type = FunctorAux
functor = dmat_dt
variable = elemental_dot
[]
[elemental_grad]
type = FunctorVectorElementalAux
functor = grad_mat
component = 0
variable = elemental_grad
[]
[elemental_grad_dot]
type = FunctorVectorElementalAux
functor = grad_dmat_dt
component = 0
variable = elemental_grad_dot
[]
[]
[Functions]
[analytic]
type = ParsedFunction
expression = 'x*t'
[]
[grad]
type = ParsedFunction
expression = 't'
[]
[dot]
type = ParsedFunction
expression = 'x'
[]
[grad_dot]
type = ParsedFunction
expression = '1'
[]
[]
[FunctorMaterials]
[val_dot_grad_dot]
type = ADGenericFunctorMaterial
prop_names = 'mat'
prop_values = 'u'
[]
[grad]
type = ADGenericFunctorGradientMaterial
prop_names = 'grad_mat'
prop_values = 'u'
[]
[]
[NodalKernels]
[rxn]
type = ReactionNodalKernel
variable = u
[]
[ffn]
type = UserForcingFunctionNodalKernel
variable = u
function = analytic
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
num_steps = 1
dt = 1
[]
[Postprocessors]
[u_err]
type = ElementL2FunctorError
approximate = u
exact = analytic
[]
[nodal_err]
type = ElementL2FunctorError
approximate = nodal
exact = analytic
[]
[elemental_err]
type = ElementL2FunctorError
approximate = elemental
exact = analytic
[]
[dot_err]
type = ElementL2FunctorError
approximate = elemental_dot
exact = dot
[]
[grad_err]
type = ElementL2FunctorError
approximate = elemental_grad
exact = grad
[]
[grad_dot_err]
type = ElementL2FunctorError
approximate = elemental_grad_dot
exact = grad_dot
[]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/central_difference/lumped/3D/3d_nodalmass_implicit.i)
# Test for the Newmark-Beta time integrator
[Mesh]
[./generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 2
xmin = 0.0
xmax = 1
ymin = 0.0
ymax = 1
zmin = 0.0
zmax = 2
[../]
[./all_nodes]
type = BoundingBoxNodeSetGenerator
new_boundary = 'all'
input = 'generated_mesh'
top_right = '1 1 2'
bottom_left = '0 0 0'
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxVariables]
[./vel_x]
[../]
[./accel_x]
[../]
[./vel_y]
[../]
[./accel_y]
[../]
[./vel_z]
[../]
[./accel_z]
[../]
[]
[Kernels]
[./DynamicSolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[]
[AuxKernels]
[./accel_x]
type = TestNewmarkTI
variable = accel_x
displacement = disp_x
first = false
[../]
[./vel_x]
type = TestNewmarkTI
variable = vel_x
displacement = disp_x
[../]
[./accel_y]
type = TestNewmarkTI
variable = accel_y
displacement = disp_y
first = false
[../]
[./vel_y]
type = TestNewmarkTI
variable = vel_y
displacement = disp_y
[../]
[./accel_z]
type = TestNewmarkTI
variable = accel_z
displacement = disp_z
first = false
[../]
[./vel_z]
type = TestNewmarkTI
variable = vel_z
displacement = disp_z
[../]
[]
[BCs]
[./x_bot]
type = PresetDisplacement
boundary = 'back'
variable = disp_x
beta = 0.25
velocity = vel_x
acceleration = accel_x
function = dispx
[../]
[./y_bot]
type = PresetDisplacement
boundary = 'back'
variable = disp_y
beta = 0.25
velocity = vel_y
acceleration = accel_y
function = dispy
[../]
[./z_bot]
type = PresetDisplacement
boundary = 'back'
variable = disp_z
beta = 0.25
velocity = vel_z
acceleration = accel_z
function = dispz
[../]
[]
[Functions]
[./dispx]
type = PiecewiseLinear
x = '0.0 1.0 2.0 3.0 4.0' # time
y = '0.0 1.0 0.0 -1.0 0.0' # displacement
[../]
[./dispy]
type = ParsedFunction
expression = 0.1*t*t*sin(10*t)
[../]
[./dispz]
type = ParsedFunction
expression = 0.1*t*t*sin(20*t)
[../]
[]
[NodalKernels]
[./nodal_mass_x]
type = NodalTranslationalInertia
boundary = 'all'
nodal_mass_file = 'nodal_mass_file.csv'
variable = 'disp_x'
[../]
[./nodal_mass_y]
type = NodalTranslationalInertia
boundary = 'all'
nodal_mass_file = 'nodal_mass_file.csv'
variable = 'disp_y'
[../]
[./nodal_mass_z]
type = NodalTranslationalInertia
boundary = 'all'
nodal_mass_file = 'nodal_mass_file.csv'
variable = 'disp_z'
[../]
[]
[Materials]
[./elasticity_tensor_block]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.25
block = 0
[../]
[./strain_block]
type = ComputeIncrementalSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./stress_block]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
nl_abs_tol = 1e-08
nl_rel_tol = 1e-08
timestep_tolerance = 1e-6
start_time = -0.01
end_time = 0.1
dt = 0.005
[./TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[../]
[]
[Postprocessors]
[./accel_10x]
type = NodalVariableValue
nodeid = 10
variable = accel_x
[../]
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/restart/restart_transient_from_steady/restart_trans_with_2subs.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = 'replicated'
[]
[Problem]
restart_file_base = steady_with_2subs_out_cp/LATEST
[]
[AuxVariables]
[Tf]
[]
[]
[Variables]
[power_density]
[]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2' # increase this function to drive transient
[]
[]
[Kernels]
[timedt]
type = TimeDerivative
variable = power_density
[]
[diff]
type = Diffusion
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[BCs]
[left]
type = DirichletBC
variable = power_density
boundary = left
value = 50
[]
[right]
type = DirichletBC
variable = power_density
boundary = right
value = 1e3
[]
[]
[Postprocessors]
[pwr_avg]
type = ElementAverageValue
block = '0'
variable = power_density
execute_on = 'initial timestep_end'
[]
[temp_avg]
type = ElementAverageValue
variable = Tf
block = '0'
execute_on = 'initial timestep_end'
[]
[temp_max]
type = ElementExtremeValue
value_type = max
variable = Tf
block = '0'
execute_on = 'initial timestep_end'
[]
[temp_min]
type = ElementExtremeValue
value_type = min
variable = Tf
block = '0'
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 3
dt = 1.0
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-7
fixed_point_rel_tol = 1e-7
fixed_point_abs_tol = 1e-07
fixed_point_max_its = 4
line_search = none
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0
0.5 0 0'
input_files = restart_trans_with_sub_sub.i
execute_on = 'timestep_end'
[../]
[]
[Transfers]
[p_to_sub]
type = MultiAppProjectionTransfer
source_variable = power_density
variable = power_density
to_multi_app = sub
execute_on = 'timestep_end'
[]
[t_from_sub]
type = MultiAppGeometricInterpolationTransfer
source_variable = temp
variable = Tf
from_multi_app = sub
execute_on = 'timestep_end'
[]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/user_object_based/exception.i)
[Mesh]
type = GeneratedMesh
dim = 3
elem_type = HEX8
displacements = 'ux uy uz'
[]
[Variables]
[./ux]
[../]
[./uy]
[../]
[./uz]
[../]
[]
[AuxVariables]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./pk2]
order = CONSTANT
family = MONOMIAL
[../]
[./fp_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./rotout]
order = CONSTANT
family = MONOMIAL
[../]
[./e_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./gss]
order = CONSTANT
family = MONOMIAL
[../]
[./slip_increment]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./tdisp]
type = ParsedFunction
expression = 0.1*t
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'ux uy uz'
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_zz]
type = RankTwoAux
variable = stress_zz
rank_two_tensor = stress
index_j = 2
index_i = 2
execute_on = timestep_end
[../]
[./pk2]
type = RankTwoAux
variable = pk2
rank_two_tensor = pk2
index_j = 2
index_i = 2
execute_on = timestep_end
[../]
[./fp_zz]
type = RankTwoAux
variable = fp_zz
rank_two_tensor = fp
index_j = 2
index_i = 2
execute_on = timestep_end
[../]
[./e_zz]
type = RankTwoAux
variable = e_zz
rank_two_tensor = lage
index_j = 2
index_i = 2
execute_on = timestep_end
[../]
[./gss]
type = MaterialStdVectorAux
variable = gss
property = state_var_gss
index = 0
execute_on = timestep_end
[../]
[./slip_inc]
type = MaterialStdVectorAux
variable = slip_increment
property = slip_rate_gss
index = 0
execute_on = timestep_end
[../]
[]
[BCs]
[./symmy]
type = DirichletBC
variable = uy
boundary = bottom
value = 0
[../]
[./symmx]
type = DirichletBC
variable = ux
boundary = left
value = 0
[../]
[./symmz]
type = DirichletBC
variable = uz
boundary = back
value = 0
[../]
[./tdisp]
type = FunctionDirichletBC
variable = uz
boundary = front
function = tdisp
[../]
[]
[UserObjects]
[./slip_rate_gss]
type = CrystalPlasticitySlipRateGSS
variable_size = 12
slip_sys_file_name = input_slip_sys.txt
num_slip_sys_flowrate_props = 2
flowprops = '1 4 0.001 0.1 5 8 0.001 0.1 9 12 0.001 0.1'
uo_state_var_name = state_var_gss
[../]
[./slip_resistance_gss]
type = CrystalPlasticitySlipResistanceGSS
variable_size = 12
uo_state_var_name = state_var_gss
[../]
[./state_var_gss]
type = CrystalPlasticityStateVariable
variable_size = 12
groups = '0 4 8 12'
group_values = '60.8 60.8 60.8'
uo_state_var_evol_rate_comp_name = state_var_evol_rate_comp_gss
scale_factor = 1.0
[../]
[./state_var_evol_rate_comp_gss]
type = CrystalPlasticityStateVarRateComponentGSS
variable_size = 12
hprops = '1.0 541.5 109.8 2.5'
uo_slip_rate_name = slip_rate_gss
uo_state_var_name = state_var_gss
[../]
[]
[Materials]
[./crysp]
type = FiniteStrainUObasedCP
block = 0
stol = 1e-2
tan_mod_type = exact
uo_slip_rates = 'slip_rate_gss'
uo_slip_resistances = 'slip_resistance_gss'
uo_state_vars = 'state_var_gss'
uo_state_var_evol_rate_comps = 'state_var_evol_rate_comp_gss'
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'ux uy uz'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensorCP
block = 0
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
[../]
[]
[Postprocessors]
[./stress_zz]
type = ElementAverageValue
variable = stress_zz
[../]
[./pk2]
type = ElementAverageValue
variable = pk2
[../]
[./fp_zz]
type = ElementAverageValue
variable = fp_zz
[../]
[./e_zz]
type = ElementAverageValue
variable = e_zz
[../]
[./gss]
type = ElementAverageValue
variable = gss
[../]
[./slip_increment]
type = ElementAverageValue
variable = slip_increment
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
dt = 0.05
solve_type = 'PJFNK'
petsc_options_iname = -pc_hypre_type
petsc_options_value = boomerang
nl_abs_tol = 1e-10
nl_rel_step_tol = 1e-10
dtmax = 10.0
nl_rel_tol = 1e-10
end_time = 1
dtmin = 0.01
num_steps = 10
nl_abs_step_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(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/contact/test/tests/sliding_block/in_and_out/frictionless_penalty.i)
# This is a benchmark test that checks constraint based frictionless
# contact using the penalty method. In this test a sinusoidal
# displacement is applied in the horizontal direction to simulate
# a small block come in and out of contact as it slides down a larger block.
#
# The sinusoid is of the form 0.4sin(4t)+0.2. The gold file is run
# on one processor and the benchmark
# case is run on a minimum of 4 processors to ensure no parallel variability
# in the contact pressure and penetration results. Further documentation can
# found in moose/modules/contact/doc/sliding_block/
#
[Mesh]
file = sliding_elastic_blocks_2d.e
patch_size = 80
[]
[GlobalParams]
volumetric_locking_correction = false
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./penetration]
[../]
[./inc_slip_x]
[../]
[./inc_slip_y]
[../]
[./accum_slip_x]
[../]
[./accum_slip_y]
[../]
[]
[Functions]
[./vertical_movement]
type = ParsedFunction
expression = -t
[../]
[./horizontal_movement]
type = ParsedFunction
expression = -0.04*sin(4*t)+0.02
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
strain = FINITE
[../]
[]
[AuxKernels]
[./zeroslip_x]
type = ConstantAux
variable = inc_slip_x
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./zeroslip_y]
type = ConstantAux
variable = inc_slip_y
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./accum_slip_x]
type = AccumulateAux
variable = accum_slip_x
accumulate_from_variable = inc_slip_x
execute_on = timestep_end
[../]
[./accum_slip_y]
type = AccumulateAux
variable = accum_slip_y
accumulate_from_variable = inc_slip_y
execute_on = timestep_end
[../]
[./penetration]
type = PenetrationAux
variable = penetration
boundary = 3
paired_boundary = 2
[../]
[]
[Postprocessors]
[./nonlinear_its]
type = NumNonlinearIterations
execute_on = timestep_end
[../]
[./penetration]
type = NodalVariableValue
variable = penetration
nodeid = 222
[../]
[./contact_pressure]
type = NodalVariableValue
variable = contact_pressure
nodeid = 222
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./right_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = horizontal_movement
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = vertical_movement
[../]
[]
[Materials]
[./left]
type = ComputeIsotropicElasticityTensor
block = '1 2'
youngs_modulus = 1e6
poissons_ratio = 0.3
constant_on = SUBDOMAIN
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
line_search = 'none'
l_max_its = 100
nl_max_its = 1000
dt = 0.1
end_time = 15
num_steps = 1000
l_tol = 1e-6
nl_rel_tol = 1e-10
nl_abs_tol = 1e-6
dtmin = 0.01
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
[]
[Outputs]
time_step_interval = 10
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[./console]
type = Console
max_rows = 5
[../]
[]
[Contact]
[./leftright]
secondary = 3
primary = 2
model = frictionless
penalty = 1e+7
formulation = penalty
normal_smoothing_distance = 0.1
[../]
[]
(framework/contrib/hit/test/input.i)
# This tests the thermal expansion coefficient function using both
# options to specify that function: mean and instantaneous. There
# two blocks, each containing a single element, and these use the
# two variants of the function.
# In this test, the instantaneous CTE function has a constant value,
# while the mean CTE function is an analytic function designed to
# give the same response. If \bar{alpha}(T) is the mean CTE function,
# and \alpha(T) is the instantaneous CTE function,
# \bar{\alpha}(T) = 1/(T-Tref) \intA^{T}_{Tsf} \alpha(T) dT
# where Tref is the reference temperature used to define the mean CTE
# function, and Tsf is the stress-free temperature.
# The two models produce very similar results. There are slight
# differences due to the large deformation treatment.
[Mesh]
file = 'blocks.e'
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[]
[SolidMechanics]
[./solid]
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
[../]
[]
[BCs]
[./left]
type = FunctionDirichletBC
variable = disp_x
boundary = 3
function = 0.02*t
[../]
[./bottom]
type = DirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[./back]
type = FunctionDirichletBC
variable = disp_z
boundary = 1
function = 0.01*t
[../]
[]
[AuxKernels]
[./temp]
type = FunctionAux
variable = temp
block = '1 2'
function = temp_func
[../]
[]
[Materials]
[./mean_alpha]
type = Elastic
block = 1
youngs_modulus = 1e6
poissons_ratio = .3
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
temp = temp
thermal_expansion_function = cte_func_mean
stress_free_temperature = 0.0
thermal_expansion_reference_temperature = 0.5
thermal_expansion_function_type = mean
[../]
[./inst_alpha]
type = Elastic
block = 2
youngs_modulus = 1e6
poissons_ratio = .3
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
temp = temp
thermal_expansion_function = cte_func_inst
stress_free_temperature = 0.0
thermal_expansion_function_type = instantaneous
[../]
[]
[Functions]
[./cte_func_mean]
type = ParsedFunction
symbol_names = 'tsf tref scale' #stress free temp, reference temp, scale factor
symbol_values = '0.0 0.5 1e-4'
expression = 'scale * (t - tsf) / (t - tref)'
[../]
[./cte_func_inst]
type = PiecewiseLinear
xy_data = '0 1.0
2 1.0'
scale_factor = 1e-4
[../]
[./temp_func]
type = PiecewiseLinear
xy_data = '0 1
1 2'
[../]
[]
[Postprocessors]
[./disp_1]
type = NodalMaxValue
variable = disp_x
boundary = 101
[../]
[./disp_2]
type = NodalMaxValue
variable = disp_x
boundary = 102
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
l_max_its = 100
l_tol = 1e-4
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
start_time = 0.0
end_time = 1.0
dt = 0.1
[]
[Outputs]
file_base = const_alpha_out
exodus = true
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
[]
[]
(test/tests/functions/solution_function/solution_function_grad_p1.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
parallel_type = replicated
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./test_variable]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_cond_func
[../]
[../]
[]
[Functions]
[./initial_cond_func]
type = ParsedFunction
expression = 2*x+4*y
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-10
[]
[Outputs]
file_base = solution_function_grad_p1
exodus = true
[]
(modules/contact/test/tests/frictional/single_point_2d/single_point_2d.i)
[Mesh]
file = single_point_2d.e
[]
[GlobalParams]
volumetric_locking_correction = false
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./penetration]
[../]
[./saved_x]
[../]
[./saved_y]
[../]
[./diag_saved_x]
[../]
[./diag_saved_y]
[../]
[./inc_slip_x]
[../]
[./inc_slip_y]
[../]
[./accum_slip_x]
[../]
[./accum_slip_y]
[../]
[]
[Functions]
[./horizontal_movement]
type = ParsedFunction
expression = t
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
strain = FINITE
save_in = 'saved_x saved_y'
diag_save_in = 'diag_saved_x diag_saved_y'
[../]
[]
[AuxKernels]
[./incslip_x]
type = PenetrationAux
variable = inc_slip_x
quantity = incremental_slip_x
boundary = 3
paired_boundary = 2
[../]
[./incslip_y]
type = PenetrationAux
variable = inc_slip_y
quantity = incremental_slip_y
boundary = 3
paired_boundary = 2
[../]
[./accum_slip_x]
type = AccumulateAux
variable = accum_slip_x
accumulate_from_variable = inc_slip_x
execute_on = timestep_end
[../]
[./accum_slip_y]
type = AccumulateAux
variable = accum_slip_y
accumulate_from_variable = inc_slip_y
execute_on = timestep_end
[../]
[./penetration]
type = PenetrationAux
variable = penetration
boundary = 3
paired_boundary = 2
[../]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./botx2]
type = DirichletBC
variable = disp_x
boundary = 2
value = 0.0
[../]
[./boty2]
type = DirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[./topx]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = horizontal_movement
[../]
[./topy]
type = DirichletBC
variable = disp_y
boundary = 4
value = -0.005
[../]
[]
[Materials]
[./bottom]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1.0e9
poissons_ratio = 0.3
[../]
[./top]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[../]
[]
[Postprocessors]
[./bot_react_x]
type = NodalSum
variable = saved_x
boundary = 1
[../]
[./bot_react_y]
type = NodalSum
variable = saved_y
boundary = 1
[../]
[./top_react_x]
type = NodalSum
variable = saved_x
boundary = 4
[../]
[./top_react_y]
type = NodalSum
variable = saved_y
boundary = 4
[../]
[./ref_resid_x]
type = NodalL2Norm
execute_on = timestep_end
variable = saved_x
[../]
[./ref_resid_y]
type = NodalL2Norm
execute_on = timestep_end
variable = saved_y
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
petsc_options = '-mat_superlu_dist_iterrefine -mat_superlu_dist_replacetinypivot'
line_search = 'none'
l_max_its = 100
nl_max_its = 200
dt = 0.001
end_time = 0.01
num_steps = 1000
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
dtmin = 0.001
l_tol = 1e-3
[]
[Outputs]
exodus = true
print_linear_residuals = true
perf_graph = true
[./console]
type = Console
max_rows = 5
[../]
[]
[Contact]
[./leftright]
primary = 2
secondary = 3
model = coulomb
friction_coefficient = '0.25'
[../]
[]
[Dampers]
[./contact_slip]
type = ContactSlipDamper
primary = '2'
secondary = '3'
[../]
[]
(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'
[../]
[]
(test/tests/restart/restart_steady_from_transient/steady_from_transient_restart.i)
[Mesh]
[fmg]
type = FileMeshGenerator
file = transient_out_cp/LATEST
[]
parallel_type = replicated
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = ((x*x)+(y*y))
[../]
[./forcing_fn]
type = ParsedFunction
expression = -4
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
[Problem]
restart_file_base = transient_out_cp/LATEST
[]
(test/tests/functions/linear_combination_function/lcf_grad.i)
# LinearCombinationFunction function test
# See [Functions] block for a description of the tests
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
nx = 3
ny = 3
[]
[Variables]
[./dummy]
[../]
[]
[Kernels]
[./dummy_u]
type = TimeDerivative
variable = dummy
[../]
[]
[AuxVariables]
[./the_linear_combo_x]
order = CONSTANT
family = MONOMIAL
[../]
[./the_linear_combo_y]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./the_linear_combo_x]
type = FunctionDerivativeAux
component = x
variable = the_linear_combo_x
function = the_linear_combo
[../]
[./the_linear_combo_y]
type = FunctionDerivativeAux
component = y
variable = the_linear_combo_y
function = the_linear_combo
[../]
[]
[Functions]
[./xtimes]
type = ParsedGradFunction
value = '1.1*x+y'
grad_x = '1.1'
grad_y = '1'
[../]
[./twoxplus1]
type = ParsedGradFunction
value = '2*x+1'
grad_x = '2'
[../]
[./tover2]
type = ParsedGradFunction
value = '0.5*t-y*7'
grad_y = '-7'
[../]
[./the_linear_combo]
type = LinearCombinationFunction
functions = 'xtimes twoxplus1 tover2'
w = '3 -1.2 3'
[../]
[./should_be_answer_x]
type = ParsedFunction
expression = '3*1.1-1.2*2'
[../]
[./should_be_answer_y]
type = ParsedFunction
expression = '3*1+3*(-7)'
[../]
[]
[Postprocessors]
[./should_be_zero_x]
type = ElementL2Error
function = should_be_answer_x
variable = the_linear_combo_x
[../]
[./should_be_zero_y]
type = ElementL2Error
function = should_be_answer_y
variable = the_linear_combo_y
[../]
[]
[Executioner]
type = Transient
dt = 0.5
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = lcf_grad
hide = dummy
exodus = false
csv = true
[]
(test/tests/transfers/multiapp_userobject_transfer/sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 8
xmax = 0.1
ymax = 0.5
coord_type = rz
[]
[Variables]
[./u]
initial_condition = 1
[../]
[]
[AuxVariables]
[./layered_average_value]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./axial_force]
type = ParsedFunction
expression = 1000*y
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = axial_force
[../]
[]
[AuxKernels]
[./layered_aux]
type = SpatialUserObjectAux
variable = layered_average_value
execute_on = timestep_end
user_object = layered_average
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[UserObjects]
[./layered_average]
type = LayeredAverage
variable = u
direction = y
num_layers = 4
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.001
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[Problem]
type = FEProblem
[]
(modules/solid_mechanics/test/tests/2D_different_planes/planestrain_yz.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
file = square_yz_plane.e
[]
[Variables]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxVariables]
[./temp]
[../]
[./disp_x]
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./plane_strain]
block = 1
strain = SMALL
out_of_plane_direction = x
planar_formulation = PLANE_STRAIN
eigenstrain_names = 'eigenstrain'
generate_output = 'stress_xx stress_yz stress_yy stress_zz strain_xx strain_yz strain_yy strain_zz'
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
[../]
[]
[Functions]
[./tempfunc]
type = ParsedFunction
expression = '(1-y)*t'
[../]
[]
[BCs]
[./bottomx]
type = DirichletBC
boundary = 4
variable = disp_y
value = 0.0
[../]
[./bottomy]
type = DirichletBC
boundary = 4
variable = disp_z
value = 0.0
[../]
[]
[Materials]
[./elastic_stress]
type = ComputeLinearElasticStress
block = 1
[../]
[./thermal_strain]
type = ComputeThermalExpansionEigenstrain
temperature = temp
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
eigenstrain_name = eigenstrain
[../]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
block = 1
poissons_ratio = 0.3
youngs_modulus = 1e6
[../]
[]
[Postprocessors]
[./react_x]
type = MaterialTensorIntegral
use_displaced_mesh = false
rank_two_tensor = stress
index_i = 0
index_j = 0
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
# controls for linear iterations
l_max_its = 100
l_tol = 1e-10
# controls for nonlinear iterations
nl_max_its = 10
nl_rel_tol = 1e-12
# time control
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 2.0
[]
[Outputs]
file_base = planestrain_yz_small_out
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts.i)
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[AuxVariables]
[vel_x]
order = SECOND
[]
[vel_y]
order = SECOND
[]
[]
[AuxKernels]
[vel_x]
type = VectorVariableComponentAux
variable = vel_x
vector_variable = velocity
component = 'x'
[]
[vel_y]
type = VectorVariableComponentAux
variable = vel_y
vector_variable = velocity
component = 'y'
[]
[]
[Variables]
[./velocity]
order = SECOND
family = LAGRANGE_VEC
[../]
[./p]
[../]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./momentum_time]
type = INSADMomentumTimeDerivative
variable = velocity
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[../]
[]
[BCs]
[inlet]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom'
function_x = 0
function_y = 'inlet_func'
[../]
[wall]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'right'
function_x = 0
function_y = 0
[]
[axis]
type = ADVectorFunctionDirichletBC
variable = velocity
boundary = 'left'
set_y_comp = false
function_x = 0
[]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADMaterial
velocity = velocity
pressure = p
[]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
dt = 0.005
dtmin = 0.005
num_steps = 5
l_max_its = 100
# Note: The Steady executioner can be used for this problem, if you
# drop the INSMomentumTimeDerivative kernels and use the following
# direct solver options.
# petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -ksp_type'
# petsc_options_value = 'lu NONZERO 1.e-10 preonly'
# Block Jacobi works well for this problem, as does "-pc_type asm
# -pc_asm_overlap 2", but an overlap of 1 does not work for some
# reason?
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
outputs = 'console' execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
outputs = 'console' execute_on = 'timestep_end'
[../]
[]
(test/tests/misc/check_error/missing_req_par_mesh_block_test.i)
#
# Tests elemental PPS running on multiple block
#
[Mesh]
type = StripeMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 3
ny = 3
elem_type = QUAD4
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = x
[../]
[]
[Variables]
[./u]
family = MONOMIAL
order = CONSTANT
[../]
[]
[Kernels]
[./uv]
type = Reaction
variable = u
[../]
[./fv]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[Postprocessors]
[./avg_1_2]
type = ElementAverageValue
variable = u
block = '0 1'
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
execute_on = 'timestep_end'
[]
(test/tests/time_integrators/crank-nicolson/cranic_adapt.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 4
ny = 4
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = sin(pi*x)*sin(pi*y)+2*t*pi*pi*sin(pi*x)*sin(pi*y)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*sin(pi*x)*sin(pi*y)
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
# Use the block format instead of the scheme parameter
[./TimeIntegrator]
type = CrankNicolson
[../]
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[./Adaptivity]
refine_fraction = 0.2
coarsen_fraction = 0.3
max_h_level = 4
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = 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
[]
(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/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/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/porous-hllc.i)
eps=0.9
[GlobalParams]
fp = fp
[]
[Mesh]
[cartesian]
type = GeneratedMeshGenerator
dim = 1
xmin = .1
xmax = 1.1
nx = 2
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Variables]
[rho]
type = MooseVariableFVReal
[]
[rho_ud]
type = MooseVariableFVReal
[]
[rho_et]
type = MooseVariableFVReal
[]
[]
[ICs]
[rho]
type = FunctionIC
variable = rho
function = 'exact_rho'
[]
[rho_ud]
type = FunctionIC
variable = rho_ud
function = 'exact_rho_ud'
[]
[rho_et]
type = FunctionIC
variable = rho_et
function = 'exact_rho_et'
[]
[]
[FVKernels]
[mass_advection]
type = PCNSFVMassHLLC
variable = rho
fp = fp
[]
[mass_fn]
type = FVBodyForce
variable = rho
function = 'forcing_rho'
[]
[momentum_x_advection]
type = PCNSFVMomentumHLLC
variable = rho_ud
momentum_component = x
fp = fp
[]
[momentum_fn]
type = FVBodyForce
variable = rho_ud
function = 'forcing_rho_ud'
[]
[fluid_energy_advection]
type = PCNSFVFluidEnergyHLLC
variable = rho_et
fp = fp
[]
[energy_fn]
type = FVBodyForce
variable = rho_et
function = 'forcing_rho_et'
[]
[]
[FVBCs]
[mass_in]
variable = rho
type = PCNSFVHLLCSpecifiedMassFluxAndTemperatureMassBC
boundary = left
temperature = 'exact_T'
superficial_rhou = 'exact_rho_ud'
[]
[momentum_in]
variable = rho_ud
type = PCNSFVHLLCSpecifiedMassFluxAndTemperatureMomentumBC
boundary = left
temperature = 'exact_T'
superficial_rhou = 'exact_rho_ud'
momentum_component = 'x'
[]
[energy_in]
variable = rho_et
type = PCNSFVHLLCSpecifiedMassFluxAndTemperatureFluidEnergyBC
boundary = left
temperature = 'exact_T'
superficial_rhou = 'exact_rho_ud'
[]
[mass_out]
variable = rho
type = PCNSFVHLLCSpecifiedPressureMassBC
boundary = right
pressure = 'exact_p'
[]
[momentum_out]
variable = rho_ud
type = PCNSFVHLLCSpecifiedPressureMomentumBC
boundary = right
pressure = 'exact_p'
momentum_component = 'x'
[]
[energy_out]
variable = rho_et
type = PCNSFVHLLCSpecifiedPressureFluidEnergyBC
boundary = right
pressure = 'exact_p'
[]
[]
[Materials]
[var_mat]
type = PorousConservedVarMaterial
rho = rho
superficial_rhou = rho_ud
rho_et = rho_et
porosity = porosity
[]
[porosity]
type = GenericConstantMaterial
prop_names = 'porosity'
prop_values = '${eps}'
[]
[]
[Functions]
[exact_rho]
type = ParsedFunction
expression = '3.48788261470924*cos(x)'
[]
[forcing_rho]
type = ParsedFunction
expression = '-3.83667087618017*eps*sin(1.1*x)'
symbol_names = 'eps'
symbol_values = '${eps}'
[]
[exact_rho_ud]
type = ParsedFunction
expression = '3.48788261470924*eps*cos(1.1*x)'
symbol_names = 'eps'
symbol_values = '${eps}'
[]
[forcing_rho_ud]
type = ParsedFunction
expression = 'eps*(-(10.6975765229419*cos(1.2*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + (10.6975765229419*sin(x)*cos(1.2*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 12.8370918275302*sin(1.2*x)/cos(x))*cos(x)) + 3.48788261470924*eps*sin(x)*cos(1.1*x)^2/cos(x)^2 - 7.67334175236034*eps*sin(1.1*x)*cos(1.1*x)/cos(x)'
symbol_names = 'eps'
symbol_values = '${eps}'
[]
[exact_rho_et]
type = ParsedFunction
expression = '26.7439413073546*cos(1.2*x)'
[]
[forcing_rho_et]
type = ParsedFunction
expression = '1.0*eps*(3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.2*x))*sin(x)*cos(1.1*x)/cos(x)^2 - 1.1*eps*(3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.2*x))*sin(1.1*x)/cos(x) + 1.0*eps*(-(10.6975765229419*cos(1.2*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + (10.6975765229419*sin(x)*cos(1.2*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 12.8370918275302*sin(1.2*x)/cos(x))*cos(x) - 32.0927295688256*sin(1.2*x))*cos(1.1*x)/cos(x)'
symbol_names = 'eps'
symbol_values = '${eps}'
[]
[exact_T]
type = ParsedFunction
expression = '0.0106975765229418*cos(1.2*x)/cos(x) - 0.000697576522941848*cos(1.1*x)^2/cos(x)^2'
symbol_names = 'eps'
symbol_values = '${eps}'
[]
[exact_p]
type = ParsedFunction
expression = '3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x)'
symbol_names = 'eps'
symbol_values = '${eps}'
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_max_its = 50
line_search = none
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
[]
[Outputs]
exodus = true
csv = true
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2rho]
type = ElementL2Error
variable = rho
function = exact_rho
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2rho_ud]
variable = rho_ud
function = exact_rho_ud
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2rho_et]
variable = rho_et
function = exact_rho_et
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(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/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
[]
(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
[]
(test/tests/auxkernels/forcing_function_aux/forcing_function_aux.i)
# This is a test of the ForcingFunctionAux AuxKernel.
# The diffusion equation for u is solved with boundary conditions to force a gradient
# du/dx = 2, which is constant in time.
# du/dx is integrated over the unit square domain using a postprocessor, resulting in 2.
# The value of this postprocessor is supplied to the forcing function f used by
# the ForcingFunctionAux AuxKernel, which increments the AuxVariable T.
# Since the time step is 1, the value of T increases by 2 for each time step.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./grad_u_x]
order = CONSTANT
family = MONOMIAL
initial_condition = 2
[../]
[./T]
order = CONSTANT
family = MONOMIAL
initial_condition = 100
[../]
[]
[Functions]
[./u_ic_func]
type = ParsedFunction
expression = '2*x'
[../]
[./f]
type = ParsedFunction
symbol_names = f
symbol_values = grad_int
expression = f
[../]
[]
[ICs]
[./u_ic]
type = FunctionIC
variable = u
function = u_ic_func
[../]
[]
[Kernels]
[./dudt]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./grad_u_x_aux]
type = VariableGradientComponent
variable = grad_u_x
component = x
gradient_variable = u
[../]
[./T_increment]
type = ForcingFunctionAux
variable = T
function = f
[../]
[]
[Postprocessors]
[./grad_int]
type = ElementIntegralVariablePostprocessor
variable = grad_u_x
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 2
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-10
num_steps = 2
dt = 1
[]
[Outputs]
exodus = true
[]
(test/tests/problems/reference_residual_problem/abs_ref_acceptable.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
[]
[GlobalParams]
absolute_value_vector_tags = 'absref'
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'absref'
extra_tag_vectors = 'absref'
acceptable_iterations = 1
acceptable_multiplier = 1e6
[]
[Variables]
[u][]
[v]
scaling = 1e-6
[]
[]
[Functions]
[ramp]
type = ParsedFunction
expression = 'if(t < 5, t - 5, 0) * x'
[]
[]
[Kernels]
[u_dt]
type = TimeDerivative
variable = u
[]
[u_coupled_rx]
type = CoupledForce
variable = u
v = v
coef = 1
[]
[v_dt]
type = TimeDerivative
variable = v
[]
[v_neg_force]
type = BodyForce
variable = v
value = ${fparse -1 / 2}
function = ramp
[]
[v_force]
type = BodyForce
variable = v
value = 1
function = ramp
[]
[]
[Postprocessors]
[u_avg]
type = ElementAverageValue
variable = u
execute_on = 'TIMESTEP_END INITIAL'
[]
[v_avg]
type = ElementAverageValue
variable = v
execute_on = 'TIMESTEP_END INITIAL'
[]
[timestep]
type = TimePostprocessor
outputs = 'none'
[]
[v_old]
type = ElementAverageValue
variable = v
execute_on = TIMESTEP_BEGIN
outputs = none
[]
[u_old]
type = ElementAverageValue
variable = u
execute_on = TIMESTEP_BEGIN
outputs = none
[]
[v_exact]
type = ParsedPostprocessor
pp_names = 'timestep v_old'
expression = 't := if(timestep > 5, 5, timestep); (t^2 - 9 * t) / 8'
[]
[u_exact]
type = ParsedPostprocessor
pp_names = 'u_old v_exact'
expression = 'u_old + v_exact'
[]
[]
[Executioner]
type = Transient
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = none
num_steps = 3
nl_rel_tol = 1e-06
verbose = true
[]
[Outputs]
csv = true
perf_graph = true
[]
(test/tests/auxkernels/function_scalar_aux/function_scalar_aux.i)
#
# Testing a solution that is second order in space and first order in time
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[AuxVariables]
[./x]
family = SCALAR
order = FIRST
[../]
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = ((x*x)+(y*y))-(4*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[./x_fn]
type = ParsedFunction
expression = t
[../]
[]
[AuxScalarKernels]
[./x_saux]
type = FunctionScalarAux
variable = x
function = x_fn
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.25
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_by_parts_steady_stabilized.i)
# This input file tests several different things:
# .) The axisymmetric (RZ) form of the governing equations.
# .) An open boundary.
# .) Not integrating the pressure by parts, thereby requiring a pressure pin.
# .) Natural boundary condition at the outlet.
[GlobalParams]
integrate_p_by_parts = true
laplace = true
gravity = '0 0 0'
supg = true
pspg = true
order = FIRST
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = Newton
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Variables]
[./vel_x]
# Velocity in radial (r) direction
[../]
[./vel_y]
# Velocity in axial (z) direction
[../]
[./p]
[../]
[]
[BCs]
[./u_in]
type = DirichletBC
boundary = bottom
variable = vel_x
value = 0
[../]
[./v_in]
type = FunctionDirichletBC
boundary = bottom
variable = vel_y
function = 'inlet_func'
[../]
[./u_axis_and_walls]
type = DirichletBC
boundary = 'left right'
variable = vel_x
value = 0
[../]
[./v_no_slip]
type = DirichletBC
boundary = 'right'
variable = vel_y
value = 0
[../]
[]
[Kernels]
[./mass]
type = INSMassRZ
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 'volume'
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(test/tests/preconditioners/smp/smp_single_adapt_test.i)
#
# This is not very strong test since the problem being solved is linear, so the difference between
# full Jacobian and block diagonal preconditioner is not that big
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 5
ny = 5
elem_type = QUAD4
[]
[Functions]
[./exact_v]
type = ParsedFunction
expression = sin(pi*x)*sin(pi*y)
[../]
[./force_fn_v]
type = ParsedFunction
expression = 2*pi*pi*sin(pi*x)*sin(pi*y)
[../]
[]
[Variables]
active = 'u v'
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
off_diag_row = 'u'
off_diag_column = 'v'
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./conv_u]
type = CoupledForce
variable = u
v = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[./ffn_v]
type = BodyForce
variable = v
function = force_fn_v
[../]
[]
[BCs]
[./left_u]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 3
value = 1
[../]
[./all_v]
type = FunctionDirichletBC
variable = v
boundary = '0 1 2 3'
function = exact_v
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[./Adaptivity]
steps = 3
coarsen_fraction = 0.1
refine_fraction = 0.2
max_h_level = 5
[../]
[]
[Outputs]
exodus = true
print_mesh_changed_info = true
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/jac.1phase.i)
[Materials]
[mat]
type = ADGenericConstantMaterial
block = 'blk:0'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1000 100 30'
[]
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[T_init]
type = ParsedFunction
expression = '1000*y+300+30*z'
[]
[]
[GlobalParams]
scaling_factor_1phase = '1 1 1e-3'
gravity_vector = '0 0 0'
[]
[Components]
[fch]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
fp = fp
n_elems = 6
length = 1
initial_T = T_init
initial_p = 1.01e5
initial_vel = 0
closures = simple_closures
A = 0.00314159
D_h = 0.2
f = 0.01
[]
[in]
type = InletVelocityTemperature1Phase
input = 'fch:in'
vel = 1
T = 300
[]
[out]
type = Outlet1Phase
input = 'fch:out'
p = 1.01e5
[]
[blk]
type = HeatStructureFromFile3D
file = mesh.e
position = '0 0 0'
initial_T = T_init
[]
[ht]
type = HeatTransferFromHeatStructure3D1Phase
flow_channels = 'fch'
hs = blk
boundary = blk:rmin
Hw = 10000
P_hf = 0.1564344650402309
[]
[]
[Postprocessors]
[energy_hs]
type = ADHeatStructureEnergy3D
block = blk:0
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_fch]
type = ElementIntegralVariablePostprocessor
block = fch
variable = rhoEA
execute_on = 'INITIAL TIMESTEP_END'
[]
[total_energy]
type = SumPostprocessor
values = 'energy_fch energy_hs'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = total_energy
compute_relative_change = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
petsc_options_iname = '-snes_test_err'
petsc_options_value = ' 1e-9'
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 0.1
num_steps = 1
solve_type = PJFNK
line_search = basic
abort_on_solve_fail = true
nl_abs_tol = 1e-8
[]
[Outputs]
file_base = 'phy.conservation'
csv = true
show = 'energy_change'
execute_on = 'final'
[]
(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
[]
(examples/ex14_pps/ex14.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 32
ny = 32
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
[]
[Variables]
[forced]
order = FIRST
family = LAGRANGE
[]
[]
[Functions]
# A ParsedFunction allows us to supply analytic expressions directly in the input file
[exact]
type = ParsedFunction
expression = sin(alpha*pi*x)
symbol_names = alpha
symbol_values = 16
[]
# This function is an actual compiled function
[force]
type = ExampleFunction
alpha = 16
[]
[]
[Kernels]
[diff]
type = ADDiffusion
variable = forced
[]
# This Kernel can take a function name to use
[forcing]
type = ADBodyForce
variable = forced
function = force
[]
[]
[BCs]
# The BC can take a function name to use
[all]
type = FunctionDirichletBC
variable = forced
boundary = 'bottom right top left'
function = exact
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[h]
type = AverageElementSize
[]
[error]
type = ElementL2Error
variable = forced
function = exact
[]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
csv = true
[]
(test/tests/postprocessors/nodal_var_value/nodal_var_value.i)
[Mesh]
file = square-2x2-nodeids.e
# NodalVariableValue is not safe on renumbered meshes
allow_renumbering = false
[]
[Variables]
active = 'u v'
[./u]
order = SECOND
family = LAGRANGE
[../]
[./v]
order = SECOND
family = LAGRANGE
[../]
[]
[Functions]
active = 'force_fn exact_fn left_bc'
[./force_fn]
type = ParsedFunction
expression = '1-x*x+2*t'
[../]
[./exact_fn]
type = ParsedFunction
expression = '(1-x*x)*t'
[../]
[./left_bc]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
active = '
time_u diff_u ffn_u
time_v diff_v'
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'all_u left_v right_v'
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = exact_fn
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '2'
value = 0
[../]
[]
[Postprocessors]
active = 'l2 scalednode1 node1 node4'
[./l2]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./node1]
type = NodalVariableValue
variable = u
nodeid = 15
[../]
[./scalednode1]
type = NodalVariableValue
variable = u
nodeid = 15
scale_factor = 2
[../]
[./node4]
type = NodalVariableValue
variable = v
nodeid = 10
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_nodal_var_value
exodus = true
[]
(modules/solid_mechanics/test/tests/umat/plane_strain/plane_strain.i)
# Testing the UMAT Interface - creep linear strain hardening model using the finite strain formulation - visco-plastic material.
# Uses 2D plane strain
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
[]
[]
[Functions]
[top_pull]
type = ParsedFunction
expression = t/100
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
generate_output = 'strain_yy stress_yy stress_zz'
planar_formulation = PLANE_STRAIN
[]
[]
[BCs]
[y_pull_function]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = top_pull
[]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[]
[Materials]
[constant]
type = AbaqusUMATStress
# Young's modulus, Poisson's Ratio, Yield, Hardening
constant_properties = '1000 0.3 10 100'
plugin = ../../../plugins/linear_strain_hardening
num_state_vars = 3
use_one_based_indexing = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
num_steps = 30
dt = 1.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[average_strain_yy]
type = ElementAverageValue
variable = 'strain_yy'
[]
[average_stress_yy]
type = ElementAverageValue
variable = 'stress_yy'
[]
[average_stress_zz]
type = ElementAverageValue
variable = 'stress_zz'
[]
[]
[Outputs]
[out]
type = Exodus
elemental_as_nodal = true
[]
[]
(modules/thermal_hydraulics/test/tests/utils/smooth_transition/smooth_transition.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = -2
xmax = 2
[]
[Variables]
[u]
[]
[]
[ICs]
[u_ic]
type = FunctionIC
variable = u
function = u_ic_fn
[]
[]
[Functions]
[u_ic_fn]
type = ParsedFunction
expression = 'x'
[]
[]
[Materials]
[test_mat]
type = SmoothTransitionTestMaterial
transition_type = cubic
var = u
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[VectorPostprocessors]
[test_vpp]
type = Sampler1DReal
block = 0
property = mymatprop
sort_by = x
execute_on = 'INITIAL'
[]
[]
[Outputs]
csv = true
file_base = 'cubic_nonad'
execute_on = 'INITIAL'
[]
(modules/xfem/test/tests/diffusion_xfem/levelsetcut2d_aux.i)
# 2D: Mesh is cut by level set based cutter
# The level set is a MOOSE auxvariable
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 3
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Functions]
[./u_left]
type = PiecewiseLinear
x = '0 2'
y = '3 5'
[../]
[./ls_func]
type = ParsedFunction
expression = 'x-0.5'
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
# Define boundary conditions
[./left_u]
type = DirichletBC
variable = u
boundary = 3
value = 3
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
line_search = 'none'
l_tol = 1e-3
nl_max_its = 15
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
start_time = 0.0
dt = 1
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = timestep_end
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/chemical_reactions/test/tests/desorption/mollified_langmuir_desorption.i)
# testing the entire desorption DEs with mollification
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
xmin = 0
xmax = 1
[]
[Variables]
[./pressure]
[../]
[./conc]
family = MONOMIAL
order = CONSTANT
[../]
[]
[ICs]
[./p_ic]
type = ConstantIC
variable = pressure
value = 1.0
[../]
[./conc_ic]
type = ConstantIC
variable = conc
value = 1.0
[../]
[]
[Kernels]
[./c_dot]
type = TimeDerivative
variable = conc
[../]
[./flow_from_matrix]
type = DesorptionFromMatrix
variable = conc
pressure_var = pressure
[../]
[./rho_dot]
type = TimeDerivative
variable = pressure
[../]
[./flux_to_porespace]
type = DesorptionToPorespace
variable = pressure
conc_var = conc
[../]
[]
[Postprocessors]
[./mass_rho]
type = ElementIntegralVariablePostprocessor
block = 0
variable = pressure
execute_on = 'initial timestep_end'
[../]
[./mass_conc]
type = ElementIntegralVariablePostprocessor
block = 0
variable = conc
execute_on = 'initial timestep_end'
[../]
[./mass_tot]
type = FunctionValuePostprocessor
function = mass_fcn
execute_on = 'initial timestep_end'
[../]
[./p0]
type = PointValue
variable = pressure
point = '0 0 0'
execute_on = 'initial timestep_end'
[../]
[./c0]
type = PointValue
variable = conc
point = '0 0 0'
execute_on = 'initial timestep_end'
[../]
[]
[Functions]
[./mass_fcn]
type = ParsedFunction
expression = a+b
symbol_names = 'a b'
symbol_values = 'mass_rho mass_conc'
[../]
[]
[Materials]
[./lang_stuff]
type = MollifiedLangmuirMaterial
block = 0
one_over_desorption_time_const = 0.90909091
one_over_adsorption_time_const = 0.90909091
langmuir_density = 0.88
langmuir_pressure = 1.23
pressure_var = pressure
conc_var = conc
mollifier = 1E-4
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
#petsc_options = '-snes_test_display'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.01
end_time = 2
[]
[Outputs]
file_base = mollified_langmuir_desorption
time_step_interval = 10
csv = 10
[] # Outputs
(modules/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/rot-eg1.i)
#
# Rotation Test
#
# This test is designed to compute a uniaxial stress and then follow that
# stress as the mesh is rotated 90 degrees.
#
# The mesh is composed of one block with a single element. The nodal
# displacements in the x and y directions are prescribed. Poisson's
# ratio is zero.
#
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
elem_type = HEX8
displacements = 'ux uy uz'
[]
[./side1n1]
input = gen
type = ExtraNodesetGenerator
coord = '0.0 0.0 0.0'
boundary = 6
[../]
[./side1n2]
input = side1n1
type = ExtraNodesetGenerator
coord = '1.0 0.0 0.0'
boundary = 7
[../]
[./side2n1]
input = side1n2
type = ExtraNodesetGenerator
coord = '0.0 1.0 0.0'
boundary = 8
[../]
[./side2n2]
input = side2n1
type = ExtraNodesetGenerator
coord = '1.0 1.0 0.0'
boundary = 9
[../]
[./side3n1]
input = side2n2
type = ExtraNodesetGenerator
coord = '0.0 1.0 1.0'
boundary = 10
[../]
[./side3n2]
input = side3n1
type = ExtraNodesetGenerator
coord = '1.0 1.0 1.0'
boundary = 11
[../]
[./side4n1]
input = side3n2
type = ExtraNodesetGenerator
coord = '0.0 0.0 1.0'
boundary = 12
[../]
[./side4n2]
input = side4n1
type = ExtraNodesetGenerator
coord = '1.0 0.0 1.0'
boundary = 13
[../]
[]
[Variables]
[./ux]
block = 0
[../]
[./uy]
block = 0
[../]
[./uz]
block = 0
[../]
[]
[Functions]
[./side2uxfunc]
type = ParsedFunction
expression = cos(pi/2*t)-1
[../]
[./side2uyfunc]
type = ParsedFunction
expression = sin(pi/2*t)
[../]
[./side3uxfunc]
type = ParsedFunction
expression = cos(pi/2*t)-sin(pi/2*t)-1
[../]
[./side3uyfunc]
type = ParsedFunction
expression = cos(pi/2*t)+sin(pi/2*t)-1
[../]
[./side4uxfunc]
type = ParsedFunction
expression = -sin(pi/2*t)
[../]
[./side4uyfunc]
type = ParsedFunction
expression = cos(pi/2*t)-1
[../]
[]
[BCs]
active = 'bcside1 bcside2ux bcside2uy bcside4ux bcside4uy bcside3uy bcside3ux bcx'
[./bcside1]
type = DirichletBC
variable = 'uy uz'
boundary = '6 7'
value = 0
[../]
[./bcside2ux]
type = FunctionDirichletBC
variable = uy
boundary = '8 9'
function = side2uxfunc
[../]
[./bcside2uy]
type = FunctionDirichletBC
variable = uz
boundary = '8 9'
function = side2uyfunc
[../]
[./bcside3ux]
type = FunctionDirichletBC
variable = uy
boundary = '10 11'
function = side3uxfunc
[../]
[./bcside3uy]
type = FunctionDirichletBC
variable = uz
boundary = '10 11'
function = side3uyfunc
[../]
[./bcside4ux]
type = FunctionDirichletBC
variable = uy
boundary = '12 13'
function = side4uxfunc
[../]
[./bcside4uy]
type = FunctionDirichletBC
variable = uz
boundary = '12 13'
function = side4uyfunc
[../]
[./bot]
type = DirichletBC
variable = 'ux uy uz'
boundary = back
value = 0
[../]
[./topxz]
type = DirichletBC
variable = 'ux uz'
boundary = front
value = 0
[../]
[./topy]
type = DirichletBC
variable = uy
boundary = front
value = 1
[../]
[./bcx]
type = DirichletBC
variable = ux
boundary = '6 7 8 9 10 11 12 13'
value = 0
[../]
[]
[Materials]
[./crysp]
type = FiniteStrainCrystalPlasticity
block = 0
disp_y = uy
disp_x = ux
slip_sys_file_name = input_slip_sys.txt
disp_z = uz
flowprops = ' 1 12 0.001 0.1'
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 .754e5 .754e5 .754e5'
nss = 12
hprops = '1 541.5 60.8 109.8'
gprops = '1 12 60.8'
fill_method = symmetric9
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
dt = 0.01
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = -pc_hypre_type
petsc_options_value = boomerang
dtmax = 0.01
end_time = 1
dtmin = 0.01
[]
[Outputs]
file_base = rot_eg1
solution_history = true
[./exodus]
type = Exodus
use_displaced = true
[../]
[]
[SolidMechanics]
[./tensormech]
disp_z = uz
disp_y = uy
disp_x = ux
[../]
[]
(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/contact/test/tests/fieldsplit/frictionless_mortar_FS.i)
offset = 0.021
vy = 0.15
vx = 0.04
refine = 1
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
[original_file_mesh]
type = FileMeshGenerator
file = long_short_blocks.e
[]
uniform_refine = ${refine}
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
use_automatic_differentiation = true
[]
[]
[Functions]
[horizontal_movement]
type = ParsedFunction
value = 'if(t<0.5,${vx}*t-${offset},${vx}-${offset})'
[]
[vertical_movement]
type = ParsedFunction
value = 'if(t<0.5,${offset},${vy}*(t-0.5)+${offset})'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 30
function = horizontal_movement
preset = false
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = '40'
value = 0.0
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = '30'
function = vertical_movement
preset = false
[]
[]
[Materials]
[elasticity_tensor_left]
type = ADComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_left]
type = ADComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ADComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_right]
type = ADComputeFiniteStrainElasticStress
block = 2
[]
[]
[Contact]
[leftright]
secondary = 10
primary = 20
model = frictionless
formulation = mortar
c_normal = 1e6
[]
[]
[ICs]
[disp_y]
block = 1
variable = disp_y
value = ${offset}
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = -${offset}
type = ConstantIC
[]
[]
[Preconditioning]
[FSP]
type = FSP
topsplit = 'contact_interior'
[contact_interior]
splitting = 'interior contact'
splitting_type = schur
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart -pc_fieldsplit_schur_fact_type -mat_mffd_err'
petsc_options_value = '200 full 1e-5'
schur_pre = 'S'
[]
[interior]
vars = 'disp_x disp_y'
petsc_options_iname = '-ksp_type -pc_type -pc_hypre_type '
petsc_options_value = 'gmres hypre boomeramg'
[]
[contact]
vars = 'leftright_normal_lm'
[]
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
end_time = 1
abort_on_solve_fail = true
l_max_its = 200
nl_abs_tol = 1e-8
line_search = 'none'
nl_max_its = 20
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[lin]
type = NumLinearIterations
outputs = 'console'
[]
[cum]
type = CumulativeValuePostprocessor
postprocessor = 'lin'
outputs = 'console'
[]
[]
(modules/optimization/test/tests/reporter/TransientSyntheticDataCreator/transient_synthetic_data.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
dim = 2
nx = 16
ny = 16
xmin = 0
xmax = 1
ymin = 0
ymax = 1
[]
[]
[Variables/u]
[]
[Functions]
[rxn_func]
type = ParsedFunction
expression = 'exp(x * y) - 1'
[]
[]
[Materials]
[ad_dc_prop]
type = ADParsedMaterial
expression = '1 + u'
coupled_variables = 'u'
property_name = dc_prop
[]
[ad_rxn_prop]
type = ADGenericFunctionMaterial
prop_values = 'rxn_func'
prop_names = rxn_prop
[]
[ad_neg_rxn_prop]
type = ADParsedMaterial
expression = '-rxn_prop'
material_property_names = 'rxn_prop'
property_name = 'neg_rxn_prop'
[]
[]
[Kernels]
[udot]
type = ADTimeDerivative
variable = u
[]
[diff]
type = ADMatDiffusion
variable = u
diffusivity = dc_prop
[]
[reaction]
type = ADMatReaction
variable = u
reaction_rate = neg_rxn_prop
[]
[src]
type = ADBodyForce
variable = u
value = 1
[]
[]
[BCs]
[dirichlet]
type = DirichletBC
variable = u
boundary = 'left bottom'
value = 0
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 0.1
end_time = 1
[]
[Reporters]
[sample]
type = TransientSyntheticDataCreator
variable = u
single_set_of_measurement_points = '
0.75 0.75 0
0.9375 0.9375 0
1 0.9375 0
1 1 0'
measurement_times_for_all_points = '0.1 0.2 0.3'
[]
[]
[AuxVariables]
[reaction_rate]
[]
[]
[AuxKernels]
[reaction_rate_aux]
type = FunctionAux
variable = reaction_rate
function = rxn_func
execute_on = TIMESTEP_END
[]
[]
[Outputs]
[csv]
type = CSV
execute_on = 'FINAL'
[]
[]
(modules/porous_flow/test/tests/dispersion/disp01_fv.i)
# Test dispersive part of FVPorousFlowDispersiveFlux kernel by setting diffusion
# coefficients to zero. A pressure gradient is applied over the mesh to give a
# uniform velocity. Gravity is set to zero.
# Mass fraction is set to 1 on the left hand side and 0 on the right hand side.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
xmax = 10
bias_x = 1.1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[pp]
type = MooseVariableFVReal
[]
[massfrac0]
type = MooseVariableFVReal
[]
[]
[AuxVariables]
[velocity]
family = MONOMIAL
order = FIRST
[]
[]
[AuxKernels]
[velocity]
type = ADPorousFlowDarcyVelocityComponent
variable = velocity
component = x
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = pic
[]
[massfrac0]
type = ConstantIC
variable = massfrac0
value = 0
[]
[]
[Functions]
[pic]
type = ParsedFunction
expression = '1.1e5-x*1e3'
[]
[]
[FVBCs]
[xleft]
type = FVDirichletBC
value = 1
variable = massfrac0
boundary = left
[]
[xright]
type = FVDirichletBC
value = 0
variable = massfrac0
boundary = right
[]
[pright]
type = FVDirichletBC
variable = pp
boundary = right
value = 1e5
[]
[pleft]
type = FVDirichletBC
variable = pp
boundary = left
value = 1.1e5
[]
[]
[FVKernels]
[mass0]
type = FVPorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[adv0]
type = FVPorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
[]
[diff0]
type = FVPorousFlowDispersiveFlux
variable = pp
disp_trans = 0
disp_long = 0.2
[]
[mass1]
type = FVPorousFlowMassTimeDerivative
fluid_component = 1
variable = massfrac0
[]
[adv1]
type = FVPorousFlowAdvectiveFlux
fluid_component = 1
variable = massfrac0
[]
[diff1]
type = FVPorousFlowDispersiveFlux
fluid_component = 1
variable = massfrac0
disp_trans = 0
disp_long = 0.2
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1e9
density0 = 1000
viscosity = 0.001
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = ADPorousFlowTemperature
[]
[ppss]
type = ADPorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = ADPorousFlowMassFraction
mass_fraction_vars = massfrac0
[]
[simple_fluid]
type = ADPorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[poro]
type = ADPorousFlowPorosityConst
porosity = 0.3
[]
[diff]
type = ADPorousFlowDiffusivityConst
diffusion_coeff = '0 0'
tortuosity = 0.1
[]
[relp]
type = ADPorousFlowRelativePermeabilityConst
phase = 0
[]
[permeability]
type = ADPorousFlowPermeabilityConst
permeability = '1e-9 0 0 0 1e-9 0 0 0 1e-9'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'gmres asm lu NONZERO'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 3e2
dtmax = 100
nl_abs_tol = 1e-12
[TimeStepper]
type = IterationAdaptiveDT
growth_factor = 2
cutback_factor = 0.5
dt = 10
[]
[]
[VectorPostprocessors]
[xmass]
type = ElementValueSampler
sort_by = id
variable = 'massfrac0 velocity'
[]
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(modules/contact/test/tests/mechanical_constraint/frictionless_kinematic.i)
[Mesh]
file = blocks_2d.e
[]
[GlobalParams]
volumetric_locking_correction = false
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./penetration]
[../]
[./inc_slip_x]
[../]
[./inc_slip_y]
[../]
[./accum_slip_x]
[../]
[./accum_slip_y]
[../]
[]
[Functions]
[./vertical_movement]
type = ParsedFunction
expression = -t
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
strain = FINITE
[../]
[]
[AuxKernels]
[./zeroslip_x]
type = ConstantAux
variable = inc_slip_x
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./zeroslip_y]
type = ConstantAux
variable = inc_slip_y
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./accum_slip_x]
type = AccumulateAux
variable = accum_slip_x
accumulate_from_variable = inc_slip_x
execute_on = timestep_end
[../]
[./accum_slip_y]
type = AccumulateAux
variable = accum_slip_y
accumulate_from_variable = inc_slip_y
execute_on = timestep_end
[../]
[./penetration]
type = PenetrationAux
variable = penetration
boundary = 3
paired_boundary = 2
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = 4
#Initial gap is 0.01
value = -0.02
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = vertical_movement
[../]
[]
[Materials]
[./left]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e7
poissons_ratio = 0.3
[../]
[./right]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_max_its = 100
nl_max_its = 1000
dt = 0.01
end_time = 0.10
num_steps = 1000
l_tol = 1e-6
nl_rel_tol = 1e-10
nl_abs_tol = 1e-8
dtmin = 0.01
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
[]
[Outputs]
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[./console]
type = Console
max_rows = 5
[../]
[]
[Contact]
[./leftright]
primary = 2
secondary = 3
model = frictionless
penalty = 1e+6
[../]
[]
(test/tests/userobjects/layered_average/layered_average_1d_displaced.i)
# This tests that Layered user objects work with displaced meshes. Originally,
# the mesh is aligned with x-axis. Then we displace the mesh to be aligned with
# z-axis and sample along the z-direction.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 5
elem_type = EDGE2
displacements = 'disp_x disp_y disp_z'
[]
[Functions]
[./left_fn]
type = ParsedFunction
expression = 't + 1'
[../]
[./disp_x_fn]
type = ParsedFunction
expression = '-x'
[../]
[./disp_z_fn]
type = ParsedFunction
expression = 'x'
[../]
[]
[AuxVariables]
[./la]
family = MONOMIAL
order = CONSTANT
[../]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxKernels]
[./la_ak]
type = SpatialUserObjectAux
variable = la
user_object = la_uo
execute_on = TIMESTEP_END
use_displaced_mesh = true
[../]
[./disp_x_ak]
type = FunctionAux
variable = disp_x
function = 'disp_x_fn'
[../]
[./disp_y_ak]
type = ConstantAux
variable = disp_y
value = 0
[../]
[./disp_z_ak]
type = FunctionAux
variable = disp_z
function = 'disp_z_fn'
[../]
[]
[UserObjects]
[./la_uo]
type = LayeredAverage
direction = z
variable = u
num_layers = 5
execute_on = TIMESTEP_END
use_displaced_mesh = true
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = FunctionDirichletBC
variable = u
boundary = left
function = left_fn
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 0
[../]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 2
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/element_extreme_functor_value/extreme_proxy_value.i)
[Problem]
type = FEProblem
solve = false
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
[]
[AuxVariables]
[u]
type = MooseVariableFVReal
[]
[w]
type = MooseVariableFVReal
[]
[v_x]
type = MooseVariableFVReal
[]
[v_y]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[u]
type = FunctionAux
variable = u
function = u_f
[]
[w]
type = FunctionAux
variable = w
function = w_f
[]
[v_x]
type = FunctionAux
variable = v_x
function = v_x_f
[]
[v_y]
type = FunctionAux
variable = v_y
function = v_y_f
[]
[]
[Functions]
[u_f] # reaches a maximum value at (0.5, 0.6)
type = ParsedFunction
expression = 'sin(pi*x)*sin(pi*y/1.2)'
[]
[w_f] # reaches a minium expression at (0.7, 0.8)
type = ParsedFunction
expression = '-sin(pi*x/1.4)*sin(pi*y/1.6)'
[]
[v_x_f]
type = ParsedFunction
expression = 'x'
[]
[v_y_f]
type = ParsedFunction
expression = 'y'
[]
[]
[Postprocessors]
[max_u]
type = ADElementExtremeFunctorValue
functor = 'u'
[]
[min_w_f]
type = ElementExtremeFunctorValue
functor = 'w_f'
value_type = min
[]
[max_v_x]
type = ADElementExtremeFunctorValue
functor = 'v_x'
[]
[min_v_y]
type = ADElementExtremeFunctorValue
functor = 'v_y'
value_type = min
[]
# because we set v_x and v_y equal to the x and y coordinates, these two postprocessors
# should just return the point at which u reaches a maximum value
[max_v_from_proxy_x]
type = ADElementExtremeFunctorValue
functor = v_x
proxy_functor = u
value_type = max
[]
[max_v_from_proxy_y]
type = ADElementExtremeFunctorValue
functor = v_y
proxy_functor = u
value_type = max
[]
# because we set v_x and v_y equal to the x and y coordinates, these two postprocessors
# should just return the point at which w reaches a minimum value
[min_v_from_proxy_x]
type = ADElementExtremeFunctorValue
functor = v_x
proxy_functor = w
value_type = min
[]
[min_v_from_proxy_y]
type = ADElementExtremeFunctorValue
functor = v_y
proxy_functor = w
value_type = min
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/kernels/material_coupled_force/material_coupled_force.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
nx = 10
ymin = 0
ymax = 2
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./v1]
initial_condition = 3
[../]
[./v2]
[../]
[]
[ICs]
[./v2_ic]
type = FunctionIC
variable = v2
function = v2_func
[../]
[]
[Functions]
[./v2_func]
type = ParsedFunction
expression = 'x + 2 * y'
[../]
[./reference]
type = ParsedFunction
expression = '3 * (-1) * 3.5 + (x + 2 * y) * 15 * 1.2'
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'm1 m2'
prop_values = '-1 15'
[../]
[]
[Kernels]
[./reaction]
type = Reaction
variable = u
[../]
[./coupled]
type = MatCoupledForce
variable = u
v = 'v1 v2'
coef = '3.5 1.2'
material_properties = 'm1 m2'
[../]
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = reference
variable = u
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = 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
[]
(modules/xfem/test/tests/bimaterials/glued_bimaterials_2d.i)
# This test is for two layer materials with different youngs modulus
# The global stress is determined by switching the stress based on level set values
# The material interface is marked by a level set function
# The two layer materials are glued together
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
[../]
[]
[Mesh]
displacements = 'disp_x disp_y'
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmin = 0.0
xmax = 5.
ymin = 0.0
ymax = 5.
elem_type = QUAD4
[]
[./left_bottom]
type = ExtraNodesetGenerator
new_boundary = 'left_bottom'
coord = '0.0 0.0'
input = gen
[../]
[./left_top]
type = ExtraNodesetGenerator
new_boundary = 'left_top'
coord = '0.0 5.'
input = left_bottom
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[Functions]
[./ls_func]
type = ParsedFunction
expression = 'y-2.5'
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./TensorMechanics]
[../]
[]
[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_xy]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 1
variable = stress_xy
[../]
[./a_strain_xx]
type = RankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 0
variable = a_strain_xx
[../]
[./a_strain_yy]
type = RankTwoAux
rank_two_tensor = A_total_strain
index_i = 1
index_j = 1
variable = a_strain_yy
[../]
[./a_strain_xy]
type = RankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 1
variable = a_strain_xy
[../]
[./b_strain_xx]
type = RankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 0
variable = b_strain_xx
[../]
[./b_strain_yy]
type = RankTwoAux
rank_two_tensor = B_total_strain
index_i = 1
index_j = 1
variable = b_strain_yy
[../]
[./b_strain_xy]
type = RankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 1
variable = b_strain_xy
[../]
[]
[Constraints]
[./dispx_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_x
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[./dispy_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_y
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[]
[BCs]
[./bottomx]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[./topx]
type = FunctionDirichletBC
boundary = top
variable = disp_x
function = 0.03*t
[../]
[./topy]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = '0.03*t'
[../]
[]
[Materials]
[./elasticity_tensor_A]
type = ComputeIsotropicElasticityTensor
base_name = A
youngs_modulus = 1e9
poissons_ratio = 0.3
[../]
[./strain_A]
type = ComputeSmallStrain
base_name = A
[../]
[./stress_A]
type = ComputeLinearElasticStress
base_name = A
[../]
[./elasticity_tensor_B]
type = ComputeIsotropicElasticityTensor
base_name = B
youngs_modulus = 1e5
poissons_ratio = 0.3
[../]
[./strain_B]
type = ComputeSmallStrain
base_name = B
[../]
[./stress_B]
type = ComputeLinearElasticStress
base_name = B
[../]
[./combined_stress]
type = LevelSetBiMaterialRankTwo
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = stress
[../]
[./combined_dstressdstrain]
type = LevelSetBiMaterialRankFour
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = Jacobian_mult
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
line_search = 'bt'
# controls for linear iterations
l_max_its = 20
l_tol = 1e-3
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-7
# time control
start_time = 0.0
dt = 0.1
num_steps = 2
max_xfem_update = 1
[]
[Outputs]
exodus = true
execute_on = timestep_end
[./console]
type = Console
output_linear = true
[../]
[]
(modules/solid_mechanics/test/tests/ad_thermal_expansion_function/mean_complex.i)
# This test checks the thermal expansion calculated via a mean thermal expansion coefficient.
# The coefficient is selected so as to result in a 1e-4 strain in the x-axis, and to cross over
# from positive to negative strain.
[Mesh]
[./gen]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 4
nz = 4
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./temp]
[../]
[]
[Kernels]
[./temp_diff]
type = ADDiffusion
variable = temp
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = SMALL
add_variables = true
eigenstrain_names = eigenstrain
generate_output = 'strain_xx strain_yy strain_zz'
use_automatic_differentiation = true
[../]
[]
[BCs]
[./left]
type = ADDirichletBC
variable = disp_x
boundary = 'left'
value = 0.0
[../]
[./bottom]
type = ADDirichletBC
variable = disp_y
boundary = 'bottom'
value = 0.0
[../]
[./back]
type = ADDirichletBC
variable = disp_z
boundary = 'back'
value = 0.0
[../]
[./temp]
type = ADFunctionDirichletBC
variable = temp
boundary = 'front back top bottom left right'
function = '1 + t'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1
poissons_ratio = 0.3
[../]
[./stress]
type = ADComputeLinearElasticStress
[../]
[./thermal_expansion_strain]
type = ADComputeMeanThermalExpansionFunctionEigenstrain
thermal_expansion_function = cte_func_mean
thermal_expansion_function_reference_temperature = 1
stress_free_temperature = 1
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Functions]
[./cte_func_mean]
type = ParsedFunction
expression = '1e-6 + 1e-8 * t + 1e-8 * t^2 + exp(t) * 1e-2'
[../]
[]
[Postprocessors]
[./disp_x_max]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./temp_avg]
type = ElementAverageValue
variable = temp
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
num_steps = 1
[]
[Outputs]
csv = true
[]
(test/tests/preconditioners/pbp/pbp_adapt_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[]
[Variables]
active = 'u v'
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = -4
[../]
[./exact_fn]
type = ParsedFunction
expression = ((x*x)+(y*y))
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[./conv_v]
type = CoupledForce
variable = v
v = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left_v]
type = DirichletBC
variable = v
boundary = 1
value = 0
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = 2
value = 0
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Preconditioning]
[./PBP]
type = PBP
solve_order = 'u v'
preconditioner = 'AMG ASM'
off_diag_row = 'v'
off_diag_column = 'u'
[../]
[]
[Executioner]
type = Steady
solve_type = JFNK
[./Adaptivity]
steps = 3
coarsen_fraction = 0.1
refine_fraction = 0.2
max_h_level = 5
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_pbp_adapt
print_mesh_changed_info = true
exodus = true
[]
(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
[]
(test/tests/fvkernels/mms/advective-outflow/limited-advection.i)
a=1.1
[Mesh]
[./gen_mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 0.1
xmax = 1.1
nx = 2
[../]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = exact
[]
[]
[Variables]
[./u]
two_term_boundary_expansion = true
type = MooseVariableFVReal
[../]
[]
[FVKernels]
[./advection_u]
type = FVLimitedAdvection
variable = u
velocity = '${a} 0 0'
boundaries_to_force = 'right'
limiter = 'vanLeer'
[../]
[body_u]
type = FVBodyForce
variable = u
function = 'forcing'
[]
[]
[FVBCs]
[left_u]
type = FVFunctionNeumannBC
boundary = 'left'
function = 'advection'
variable = u
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = 'cos(x)'
[]
[advection]
type = ParsedFunction
expression = '${a} * cos(x)'
[]
[forcing]
type = ParsedFunction
expression = '-${a} * sin(x)'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_abs_tol = 1e-13
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[./L2u]
type = ElementL2Error
variable = u
function = exact
outputs = 'console csv'
execute_on = 'timestep_end'
[../]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(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/optimization/test/tests/functions/parameter_mesh/create_mesh_second.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[]
second_order = true
parallel_type = REPLICATED
[]
[AuxVariables/params]
family = LAGRANGE
order = SECOND
[]
[ICs/params_ic]
type = FunctionIC
function = params_fun
variable = params
[]
[Functions]
[params_fun]
type = ParsedFunction
value = 'x*(x-1)*y*(y-1)'
[]
[]
[VectorPostprocessors]
[param_vec]
type = NodalValueSampler
sort_by = id
variable = params
[]
[]
[Outputs]
csv = true
exodus = true
execute_on = timestep_end
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
(modules/solid_mechanics/test/tests/j2_plasticity/solid_mechanics_j2plasticity.i)
[Mesh]
displacements = 'x_disp y_disp z_disp'
[generated_mesh]
type = GeneratedMeshGenerator
elem_type = HEX8
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
zmin = 0.0
zmax = 1.0
[]
[cnode]
type = ExtraNodesetGenerator
coord = '0.0 0.0 0.0'
new_boundary = 6
input = generated_mesh
[]
[snode]
type = ExtraNodesetGenerator
coord = '1.0 0.0 0.0'
new_boundary = 7
input = cnode
[]
[]
[Variables]
[./x_disp]
order = FIRST
family = LAGRANGE
[../]
[./y_disp]
order = FIRST
family = LAGRANGE
[../]
[./z_disp]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'x_disp y_disp z_disp'
use_displaced_mesh = true
[../]
[]
[Materials]
[./fplastic]
type = FiniteStrainPlasticMaterial
block=0
yield_stress='0. 445. 0.05 610. 0.1 680. 0.38 810. 0.95 920. 2. 950.'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
C_ijkl = '2.827e5 1.21e5 1.21e5 2.827e5 1.21e5 2.827e5 0.808e5 0.808e5 0.808e5'
fill_method = symmetric9
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'x_disp y_disp z_disp'
[../]
[]
[Functions]
[./topfunc]
type = ParsedFunction
expression = 't'
[../]
[]
[BCs]
[./bottom3]
type = DirichletBC
variable = z_disp
boundary = 0
value = 0.0
[../]
[./top]
type = FunctionDirichletBC
variable = z_disp
boundary = 5
function = topfunc
[../]
[./corner1]
type = DirichletBC
variable = x_disp
boundary = 6
value = 0.0
[../]
[./corner2]
type = DirichletBC
variable = y_disp
boundary = 6
value = 0.0
[../]
[./corner3]
type = DirichletBC
variable = z_disp
boundary = 6
value = 0.0
[../]
[./side1]
type = DirichletBC
variable = y_disp
boundary = 7
value = 0.0
[../]
[./side2]
type = DirichletBC
variable = z_disp
boundary = 7
value = 0.0
[../]
[]
[AuxVariables]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./peeq]
order = CONSTANT
family = MONOMIAL
[../]
[./pe11]
order = CONSTANT
family = MONOMIAL
[../]
[./pe22]
order = CONSTANT
family = MONOMIAL
[../]
[./pe33]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./pe11]
type = RankTwoAux
rank_two_tensor = plastic_strain
variable = pe11
index_i = 0
index_j = 0
[../]
[./pe22]
type = RankTwoAux
rank_two_tensor = plastic_strain
variable = pe22
index_i = 1
index_j = 1
[../]
[./pe33]
type = RankTwoAux
rank_two_tensor = plastic_strain
variable = pe33
index_i = 2
index_j = 2
[../]
[./eqv_plastic_strain]
type = MaterialRealAux
property = eqv_plastic_strain
variable = peeq
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full=true
[../]
[]
[Executioner]
type = Transient
dt=0.1
dtmax=1
dtmin=0.1
end_time=1.0
nl_abs_tol = 1e-10
[]
[Outputs]
file_base = out
exodus = true
[]
(test/tests/postprocessors/element_average_value/elem_pps_multi_block_test.i)
#
# Tests elemental PPS running on multiple block
#
[Mesh]
type = StripeMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 3
ny = 3
elem_type = QUAD4
stripes = 3
# StripeMesh currently only works correctly with ReplicatedMesh.
parallel_type = replicated
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = x
[../]
[]
[Variables]
[./u]
family = MONOMIAL
order = CONSTANT
[../]
[]
[Kernels]
[./uv]
type = Reaction
variable = u
[../]
[./fv]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[Postprocessors]
[./avg_1_2]
type = ElementAverageValue
variable = u
block = '0 1'
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
execute_on = 'timestep_end'
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[]
(modules/stochastic_tools/test/tests/reporters/parallel_storage/sub.i)
S = 10
D = 10
[Mesh]
type = GeneratedMesh
dim = 1
nx = 6
xmax = 6
[]
[Variables]
[u]
[]
[v]
[]
[]
[AuxVariables]
[u_aux]
[]
[]
[Kernels]
[diffusion_u]
type = MatDiffusion
variable = u
diffusivity = D_u
[]
[source_u]
type = BodyForce
variable = u
value = 1.0
[]
[diffusion_v]
type = MatDiffusion
variable = v
diffusivity = D_v
[]
[source_v]
type = BodyForce
variable = v
value = 1.0
[]
[]
[AuxKernels]
[func_aux]
type = FunctionAux
variable = u_aux
function = u_aux_func
[]
[]
[Functions]
[u_aux_func]
type = ParsedFunction
expression = 'S * pow(x, D/10)'
symbol_names = 'S D'
symbol_values = '${S} ${D}'
[]
[]
[Materials]
[diffusivity_u]
type = GenericConstantMaterial
prop_names = D_u
prop_values = 2.0
[]
[diffusivity_v]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 4.0
[]
[]
[BCs]
[left_u]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right_u]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Reporters]
[solution_storage]
type = SolutionContainer
execute_on = 'FINAL'
[]
[solution_storage_aux]
type = SolutionContainer
execute_on = 'FINAL'
system = aux
[]
[]
(modules/richards/test/tests/theis/th21.i)
# two-phase, fully-saturated
# production
[Mesh]
type = FileMesh
file = th01_input.e
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '0.5 1 2 10'
x = '0 1 10 100'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 2E6
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1E-5
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1E-5
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.0
n = 3
[../]
[./SatWater]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SatGas]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGwater]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[./SUPGgas]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[./total_outflow_mass]
type = RichardsSumQuantity
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./water_ic]
type = FunctionIC
variable = pwater
function = initial_pressure
[../]
[./gas_ic]
type = FunctionIC
variable = pgas
function = initial_pressure
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[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
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = SeffWater
pressure_vars = 'pwater pgas'
[../]
[]
[DiracKernels]
[./bh]
type = RichardsPolyLineSink
pressures = '-1E9 1E9'
fluxes = '200 200'
point_file = th01.points
SumQuantityUO = total_outflow_mass
variable = pwater
[../]
[]
[Postprocessors]
[./flow_report]
type = RichardsPlotQuantity
uo = total_outflow_mass
[../]
[./p50]
type = PointValue
variable = pwater
point = '50 0 0'
execute_on = timestep_end
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 1E5
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = 1
mat_porosity = 0.1
mat_permeability = '1E-10 0 0 0 1E-10 0 0 0 1E-10'
density_UO = 'DensityWater DensityGas'
relperm_UO = 'RelPermWater RelPermGas'
SUPG_UO = 'SUPGwater SUPGgas'
sat_UO = 'SatWater SatGas'
seff_UO = 'SeffWater SeffGas'
viscosity = '1E-3 1E-5'
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./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-6 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 100
solve_type = NEWTON
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = th21
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/mms/supg/supg_pspg_adv_dominated_mms.i)
mu=1.5e-4
rho=2.5
[GlobalParams]
gravity = '0 0 0'
supg = true
pspg = true
convective_term = true
integrate_p_by_parts = false
transient_term = true
laplace = true
u = vel_x
v = vel_y
pressure = p
alpha = 1e0
order = FIRST
family = LAGRANGE
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
elem_type = QUAD9
nx = 4
ny = 4
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./vel_x]
[../]
[./vel_y]
[../]
[./p]
order = FIRST
[../]
[]
[Kernels]
# mass
[./mass]
type = INSMass
variable = p
x_vel_forcing_func = vel_x_source_func
y_vel_forcing_func = vel_y_source_func
[../]
[./x_time]
type = INSMomentumTimeDerivative
variable = vel_x
[../]
[./y_time]
type = INSMomentumTimeDerivative
variable = vel_y
[../]
# x-momentum, space
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
component = 0
forcing_func = vel_x_source_func
[../]
# y-momentum, space
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
component = 1
forcing_func = vel_y_source_func
[../]
[./p_source]
type = BodyForce
function = p_source_func
variable = p
[../]
[]
[BCs]
[./vel_x]
type = FunctionDirichletBC
boundary = 'left right top bottom'
function = vel_x_func
variable = vel_x
[../]
[./vel_y]
type = FunctionDirichletBC
boundary = 'left right top bottom'
function = vel_y_func
variable = vel_y
[../]
[./p]
type = FunctionDirichletBC
boundary = 'left right top bottom'
function = p_func
variable = p
[../]
[]
[Functions]
[./vel_x_source_func]
type = ParsedFunction
expression = '-${mu}*(-0.028*pi^2*x^2*sin(0.2*pi*x*y) - 0.028*pi^2*y^2*sin(0.2*pi*x*y) - 0.1*pi^2*sin(0.5*pi*x) - 0.4*pi^2*sin(pi*y)) + ${rho}*(0.14*pi*x*cos(0.2*pi*x*y) + 0.4*pi*cos(pi*y))*(0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3) + ${rho}*(0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x))*(0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5) + 0.1*pi*y*cos(0.2*pi*x*y) + 0.25*pi*cos(0.5*pi*x)'
[../]
[./vel_y_source_func]
type = ParsedFunction
expression = '-${mu}*(-0.018*pi^2*x^2*sin(0.3*pi*x*y) - 0.018*pi^2*y^2*sin(0.3*pi*x*y) - 0.384*pi^2*sin(0.8*pi*x) - 0.027*pi^2*sin(0.3*pi*y)) + ${rho}*(0.06*pi*x*cos(0.3*pi*x*y) + 0.09*pi*cos(0.3*pi*y))*(0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3) + ${rho}*(0.06*pi*y*cos(0.3*pi*x*y) + 0.48*pi*cos(0.8*pi*x))*(0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5) + 0.1*pi*x*cos(0.2*pi*x*y) + 0.3*pi*cos(0.3*pi*y)'
[../]
[./p_source_func]
type = ParsedFunction
expression = '-0.06*pi*x*cos(0.3*pi*x*y) - 0.14*pi*y*cos(0.2*pi*x*y) - 0.2*pi*cos(0.5*pi*x) - 0.09*pi*cos(0.3*pi*y)'
[../]
[./vel_x_func]
type = ParsedFunction
expression = '0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5'
[../]
[./vel_y_func]
type = ParsedFunction
expression = '0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3'
[../]
[./p_func]
type = ParsedFunction
expression = '0.5*sin(0.5*pi*x) + 1.0*sin(0.3*pi*y) + 0.5*sin(0.2*pi*x*y) + 0.5'
[../]
[./vxx_func]
type = ParsedFunction
expression = '0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x)'
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_view'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu NONZERO superlu_dist'
line_search = 'none'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-12
nl_max_its = 10
l_tol = 1e-6
l_max_its = 10
# To run to steady-state, set num-steps to some large number (1000000 for example)
type = Transient
num_steps = 10
steady_state_detection = true
steady_state_tolerance = 1e-10
[./TimeStepper]
dt = .1
type = IterationAdaptiveDT
cutback_factor = 0.4
growth_factor = 1.2
optimal_iterations = 20
[../]
[]
[Outputs]
execute_on = 'final'
[./exodus]
type = Exodus
[../]
[./csv]
type = CSV
[../]
[]
[Postprocessors]
[./L2vel_x]
type = ElementL2Error
variable = vel_x
function = vel_x_func
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2vel_y]
variable = vel_y
function = vel_y_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2p]
variable = p
function = p_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2vxx]
variable = vxx
function = vxx_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[]
[AuxVariables]
[./vxx]
family = MONOMIAL
order = FIRST
[../]
[]
[AuxKernels]
[./vxx]
type = VariableGradientComponent
component = x
variable = vxx
gradient_variable = vel_x
[../]
[]
(test/tests/preconditioners/pbp/pbp_dg_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[../]
[./v]
order = FIRST
family = MONOMIAL
[../]
[]
[Preconditioning]
[./PBP]
type = PBP
solve_order = 'u v'
preconditioner = 'AMG AMG'
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./abs_u]
type = Reaction
variable = u
[../]
[./forcing_u]
type = BodyForce
variable = u
function = forcing_fn
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[./abs_v]
type = Reaction
variable = v
[../]
[./forcing_v]
type = BodyForce
variable = v
function = forcing_fn
[../]
[./conv_v]
type = CoupledForce
variable = v
v = u
[../]
[]
[DGKernels]
[./dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[../]
[./dg_diff_2]
type = DGDiffusion
variable = v
epsilon = -1
sigma = 6
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[../]
[./exact_fn]
type = ParsedGradFunction
value = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[../]
[]
[BCs]
[./all_u]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[./all_v]
type = DGFunctionDiffusionDirichletBC
variable = v
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[]
[Problem]
type = FEProblem
error_on_jacobian_nonzero_reallocation = true
[]
[Executioner]
type = Steady
l_max_its = 10
nl_max_its = 10
solve_type = JFNK
[]
[Outputs]
exodus = 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/solid_mechanics/test/tests/umat/elastic_hardening/linear_strain_hardening.i)
# Testing the UMAT Interface - creep linear strain hardening model using the finite strain formulation - visco-plastic material.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[]
[Functions]
[top_pull]
type = ParsedFunction
expression = t/100
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
[]
[]
[BCs]
[y_pull_function]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = top_pull
[]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[z_bot]
type = DirichletBC
variable = disp_z
boundary = front
value = 0.0
[]
[]
[Materials]
[constant]
type = AbaqusUMATStress
# Young's modulus, Poisson's Ratio, Yield, Hardening
constant_properties = '1000 0.3 10 100'
plugin = ../../../plugins/linear_strain_hardening
num_state_vars = 3
use_one_based_indexing = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
num_steps = 30
dt = 1.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
[out]
type = Exodus
elemental_as_nodal = 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/combined/examples/publications/rapid_dev/fig7a.i)
#
# Fig. 7 input for 10.1016/j.commatsci.2017.02.017
# D. Schwen et al./Computational Materials Science 132 (2017) 36-45
# Solid gray curve (1)
# Eigenstrain and elastic energies ar computed per phase and then interpolated.
# Supply the RADIUS parameter (10-35) on the command line to generate data
# for all curves in the plot.
#
[Mesh]
type = GeneratedMesh
dim = 1
nx = 32
xmin = 0
xmax = 100
second_order = true
[]
[Problem]
coord_type = RSPHERICAL
[]
[GlobalParams]
displacements = 'disp_r'
[]
[Functions]
[./diff]
type = ParsedFunction
expression = '${RADIUS}-pos_c'
symbol_names = pos_c
symbol_values = pos_c
[../]
[]
# AuxVars to compute the free energy density for outputting
[AuxVariables]
[./local_energy]
order = CONSTANT
family = MONOMIAL
[../]
[./cross_energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./local_free_energy]
type = TotalFreeEnergy
variable = local_energy
interfacial_vars = 'c'
kappa_names = 'kappa_c'
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
[Variables]
# Solute concentration variable
[./c]
[./InitialCondition]
type = SmoothCircleIC
invalue = 1
outvalue = 0
x1 = 0
y1 = 0
radius = ${RADIUS}
int_width = 3
[../]
[../]
[./w]
[../]
# Phase order parameter
[./eta]
[./InitialCondition]
type = SmoothCircleIC
invalue = 1
outvalue = 0
x1 = 0
y1 = 0
radius = ${RADIUS}
int_width = 3
[../]
[../]
# Mesh displacement
[./disp_r]
order = SECOND
[../]
[./Fe_fit]
order = SECOND
[../]
[]
[Kernels]
# Set up stress divergence kernels
[./TensorMechanics]
[../]
# Split Cahn-Hilliard kernels
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
args = 'eta'
kappa_name = kappa_c
w = w
[../]
[./wres]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
# Allen-Cahn and Lagrange-multiplier constraint kernels for order parameter 1
[./detadt]
type = TimeDerivative
variable = eta
[../]
[./ACBulk1]
type = AllenCahn
variable = eta
args = 'c'
mob_name = L
f_name = F
[../]
[./ACInterface]
type = ACInterface
variable = eta
mob_name = L
kappa_name = kappa_eta
[../]
[./Fe]
type = MaterialPropertyValue
prop_name = Fe
variable = Fe_fit
[../]
[./autoadjust]
type = MaskedBodyForce
variable = w
function = diff
mask = mask
[../]
[]
[Materials]
# declare a few constants, such as mobilities (L,M) and interface gradient prefactors (kappa*)
[./consts]
type = GenericConstantMaterial
prop_names = 'M L kappa_c kappa_eta'
prop_values = '1.0 1.0 0.5 1'
[../]
# forcing function mask
[./mask]
type = ParsedMaterial
property_name = mask
expression = grad/dt
material_property_names = 'grad dt'
[../]
[./grad]
type = VariableGradientMaterial
variable = c
prop = grad
[../]
[./time]
type = TimeStepMaterial
[../]
# global mechanical properties
[./elasticity_tensor_1]
type = ComputeElasticityTensor
C_ijkl = '1 1'
base_name = phase1
fill_method = symmetric_isotropic
[../]
[./elasticity_tensor_2]
type = ComputeElasticityTensor
C_ijkl = '1 1'
base_name = phase2
fill_method = symmetric_isotropic
[../]
[./strain_1]
type = ComputeRSphericalSmallStrain
base_name = phase1
[../]
[./strain_2]
type = ComputeRSphericalSmallStrain
base_name = phase2
eigenstrain_names = eigenstrain
[../]
[./stress_1]
type = ComputeLinearElasticStress
base_name = phase1
[../]
[./stress_2]
type = ComputeLinearElasticStress
base_name = phase2
[../]
# eigenstrain per phase
[./eigenstrain2]
type = ComputeEigenstrain
eigen_base = '0.05 0.05 0.05 0 0 0'
base_name = phase2
eigenstrain_name = eigenstrain
[../]
# switching functions
[./switching]
type = SwitchingFunctionMaterial
function_name = h
eta = eta
h_order = SIMPLE
[../]
[./barrier]
type = BarrierFunctionMaterial
eta = eta
[../]
# chemical free energies
[./chemical_free_energy_1]
type = DerivativeParsedMaterial
property_name = Fc1
expression = 'c^2'
coupled_variables = 'c'
derivative_order = 2
[../]
[./chemical_free_energy_2]
type = DerivativeParsedMaterial
property_name = Fc2
expression = '(1-c)^2'
coupled_variables = 'c'
derivative_order = 2
[../]
# elastic free energies
[./elastic_free_energy_1]
type = ElasticEnergyMaterial
f_name = Fe1
args = ''
base_name = phase1
derivative_order = 2
[../]
[./elastic_free_energy_2]
type = ElasticEnergyMaterial
f_name = Fe2
args = ''
base_name = phase2
derivative_order = 2
[../]
# per phase free energies
[./free_energy_1]
type = DerivativeSumMaterial
property_name = F1
sum_materials = 'Fc1 Fe1'
coupled_variables = 'c'
derivative_order = 2
[../]
[./free_energy_2]
type = DerivativeSumMaterial
property_name = F2
sum_materials = 'Fc2 Fe2'
coupled_variables = 'c'
derivative_order = 2
[../]
# global chemical free energy
[./global_free_energy]
type = DerivativeTwoPhaseMaterial
f_name = F
fa_name = F1
fb_name = F2
eta = eta
args = 'c'
W = 4
[../]
# global stress
[./global_stress]
type = TwoPhaseStressMaterial
base_A = phase1
base_B = phase2
[../]
[./elastic_free_energy]
type = DerivativeTwoPhaseMaterial
f_name = Fe
fa_name = Fe1
fb_name = Fe2
eta = eta
args = 'c'
W = 0
[../]
[]
[BCs]
[./left_r]
type = DirichletBC
variable = disp_r
boundary = 'left'
value = 0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
# We monitor the total free energy and the total solute concentration (should be constant)
[Postprocessors]
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
variable = local_energy
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[./total_solute]
type = ElementIntegralVariablePostprocessor
variable = c
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[./pos_c]
type = FindValueOnLine
start_point = '0 0 0'
end_point = '100 0 0'
v = c
target = 0.582
tol = 1e-8
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[./pos_eta]
type = FindValueOnLine
start_point = '0 0 0'
end_point = '100 0 0'
v = eta
target = 0.5
tol = 1e-8
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[./c_min]
type = ElementExtremeValue
value_type = min
variable = c
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[]
[VectorPostprocessors]
[./line]
type = LineValueSampler
variable = 'Fe_fit c w'
start_point = '0 0 0'
end_point = '100 0 0'
num_points = 5000
sort_by = x
outputs = vpp
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
l_max_its = 30
nl_max_its = 15
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 2.0e-9
start_time = 0.0
end_time = 100000.0
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 7
iteration_window = 1
dt = 1
[../]
[./Adaptivity]
initial_adaptivity = 5
interval = 10
max_h_level = 5
refine_fraction = 0.9
coarsen_fraction = 0.1
[../]
[]
[Outputs]
print_linear_residuals = false
perf_graph = true
execute_on = 'INITIAL TIMESTEP_END'
[./table]
type = CSV
delimiter = ' '
file_base = radius_${RADIUS}/energy_pp
[../]
[./vpp]
type = CSV
delimiter = ' '
sync_times = '10 50 100 500 1000 5000 10000 50000 100000'
sync_only = true
time_data = true
file_base = radius_${RADIUS}/energy_vpp
[../]
[]
(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
[]
(test/tests/controls/libtorch_nn_control/read_control.i)
pi = 3.14159265359
period = 0.25
diff_coeff = 0.5
cp = 1.0
[Functions]
[src_func]
type = ParsedFunction
value = "sin(${pi}/${period}*t)"
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 2
nx = 20
xmin = -0.5
xmax = 0.5
ny = 20
ymin = -0.5
ymax = 0.5
[]
[source_domain]
type = ParsedSubdomainMeshGenerator
input = msh
combinatorial_geometry = '(x<0.2 & x>-0.2) & (y<0.2 & y>-0.2)'
block_id = 1
[]
[]
[Variables]
[T]
initial_condition = 1
[]
[]
[Kernels]
[diffusion]
type = CoefDiffusion
variable = T
coef = ${diff_coeff}
[]
[source]
type = BodyForce
variable = T
function = src_func
block = 1
[]
[anti_source]
type = BodyForce
variable = T
value = 0
block = 1
[]
[time_deriv]
type = CoefTimeDerivative
Coefficient = ${cp}
variable = T
[]
[]
[BCs]
[neumann_rest]
type = NeumannBC
variable = T
boundary = 'left right top bottom'
value = 0
[]
[]
[Executioner]
type = Transient
num_steps = 25
dt = 0.1
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_abs_tol = 1e-12
line_search = 'none'
[]
[Postprocessors]
[T_max]
type = NodalExtremeValue
variable = T
execute_on = 'INITIAL TIMESTEP_END'
[]
[control_value]
type = LibtorchControlValuePostprocessor
control_name = src_control
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Controls]
[src_control]
type = LibtorchNeuralNetControl
parameters = "Kernels/anti_source/value"
responses = 'T_max'
[]
[]
[Reporters]
inactive = 'nn_parameters'
[T_reporter]
type = AccumulateReporter
reporters = 'T_max/value control_value/value'
outputs = csv_out
[]
[nn_parameters]
type = LibtorchArtificialNeuralNetParameters
control_name = src_control
execute_on = FINAL
outputs = json_out
[]
[]
[Outputs]
[csv_out]
type = CSV
execute_on = FINAL
[]
[json_out]
type = JSON
execute_on = FINAL
execute_system_information_on = NONE
[]
[]
(modules/combined/test/tests/heat_convection/heat_convection_function.i)
[Mesh] # Mesh Start
file = patch_3d.e
#
[] # Mesh END
[Functions]
[./t_infinity]
type = ParsedFunction
expression = '300'
[../]
[./htc]
type = ParsedFunction
expression = 10.0*5.7 # convective heat transfer coefficient (w/m^2-K)[50 BTU/hr-ft^2-F]
[../]
[]
[Variables] # Variables Start
[./temp]
order = FIRST
family = LAGRANGE
initial_condition = 294.26
[../]
[] # Variables END
[Kernels] # Kernels Start
[./heat]
type = HeatConduction
variable = temp
[../]
[] # Kernels END
[BCs] # Boundary Conditions Start
# Heat transfer coefficient on outer parallelpiped radius and ends
[./convective_clad_surface] # Convective Start
type = ConvectiveFluxFunction # Convective flux, e.g. q'' = h*(Tw - Tf)
boundary = 12
variable = temp
coefficient = htc
T_infinity = t_infinity
[../] # Convective End
[./fixed]
type = DirichletBC
variable = temp
boundary = 10
value = 100
[../]
[] # BCs END
[Materials] # Materials Start
[./thermal]
type = HeatConductionMaterial
block = '1 2 3 4 5 6 7'
specific_heat = 826.4
thermal_conductivity = 57
[../]
[./density]
type = Density
block = '1 2 3 4 5 6 7'
density = 2405.28
[../]
[] # Materials END
[Executioner] # Executioner Start
type = Transient
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew '
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type'
petsc_options_value = '70 hypre boomeramg'
l_max_its = 60
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
l_tol = 1e-5
start_time = 0.0
dt = 1
num_steps = 1
[] # Executioner END
[Outputs] # Output Start
# Output Start
exodus = true
[] # Output END
# # Input file END
(modules/solid_mechanics/test/tests/umat/print_c/print_compare_c.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[]
[Functions]
[top_pull]
type = ParsedFunction
expression = -t/1000
[]
[]
[AuxVariables]
[strain_xy]
family = MONOMIAL
order = FIRST
[]
[strain_yy]
family = MONOMIAL
order = FIRST
[]
[]
[AuxKernels]
[strain_xy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xy
index_i = 1
index_j = 0
[]
[strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 1
index_j = 1
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
[]
[]
[BCs]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = bottom
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[z_bot]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0.0
[]
[]
[NodalKernels]
[force_x]
type = ConstantRate
variable = disp_x
boundary = top
rate = 1.0e0
[]
[]
[Materials]
# 1. Active for UMAT verification
[umat_c]
type = AbaqusUMATStress
constant_properties = '1000 0.3'
plugin = '../../../plugins/elastic_print_c'
num_state_vars = 0
use_one_based_indexing = true
[]
[umat_f]
type = AbaqusUMATStress
constant_properties = '1000 0.3'
plugin = '../../../plugins/elastic'
num_state_vars = 0
use_one_based_indexing = true
[]
[umat_eigen]
type = AbaqusUMATStress
constant_properties = '1000 0.3'
plugin = '../../../plugins/elastic_print_eigen'
num_state_vars = 0
use_one_based_indexing = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
end_time = 10
dt = 10.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/relperm/corey3.i)
# Test Corey relative permeability curve by varying saturation over the mesh
# Residual saturation of phase 0: s0r = 0.2
# Residual saturation of phase 1: s1r = 0.3
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[p0]
initial_condition = 1e6
[]
[s1]
family = LAGRANGE
order = FIRST
[]
[]
[AuxVariables]
[s0aux]
family = MONOMIAL
order = CONSTANT
[]
[s1aux]
family = MONOMIAL
order = CONSTANT
[]
[kr0aux]
family = MONOMIAL
order = CONSTANT
[]
[kr1aux]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[s0]
type = PorousFlowPropertyAux
property = saturation
phase = 0
variable = s0aux
[]
[s1]
type = PorousFlowPropertyAux
property = saturation
phase = 1
variable = s1aux
[]
[kr0]
type = PorousFlowPropertyAux
property = relperm
phase = 0
variable = kr0aux
[]
[kr1]
type = PorousFlowPropertyAux
property = relperm
phase = 1
variable = kr1aux
[]
[]
[Functions]
[s1]
type = ParsedFunction
expression = x
[]
[]
[ICs]
[s1]
type = FunctionIC
variable = s1
function = s1
[]
[]
[Kernels]
[p0]
type = Diffusion
variable = p0
[]
[s1]
type = Diffusion
variable = s1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'p0 s1'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = p0
phase1_saturation = s1
capillary_pressure = pc
[]
[kr0]
type = PorousFlowRelativePermeabilityCorey
phase = 0
n = 2
s_res = 0.2
sum_s_res = 0.5
[]
[kr1]
type = PorousFlowRelativePermeabilityCorey
phase = 1
n = 2
s_res = 0.3
sum_s_res = 0.5
[]
[]
[VectorPostprocessors]
[vpp]
type = LineValueSampler
warn_discontinuous_face_values = false
variable = 's0aux s1aux kr0aux kr1aux'
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 20
sort_by = id
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-8
[]
[BCs]
[sleft]
type = DirichletBC
variable = s1
value = 0
boundary = left
[]
[sright]
type = DirichletBC
variable = s1
value = 1
boundary = right
[]
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(test/tests/multiapps/picard_multilevel/multilevel_dt_rejection/picard_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[v2]
[]
[v3]
[]
[w]
[]
[]
[AuxKernels]
[set_w]
type = NormalizationAux
variable = w
source_variable = v
normal_factor = 0.1
[]
[]
[Kernels]
[diff_v]
type = Diffusion
variable = v
[]
[coupled_force]
type = CoupledForce
variable = v
v = v2
[]
[coupled_force2]
type = CoupledForce
variable = v
v = v3
[]
[td_v]
type = TimeDerivative
variable = v
[]
[]
[BCs]
[left_v]
type = FunctionDirichletBC
variable = v
boundary = left
function = func
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Functions]
[func]
type = ParsedFunction
expression = 'if(t < 2.5, 1, 1 / t)'
[]
[]
[Postprocessors]
[picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[parent_time]
type = Receiver
execute_on = 'timestep_end'
[]
[parent_dt]
type = Receiver
execute_on = 'timestep_end'
[]
[time]
type = TimePostprocessor
execute_on = 'timestep_end'
[]
[dt]
type = TimestepSize
execute_on = 'timestep_end'
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 2 # deliberately make it fail at 2 to test the time step rejection behavior
nl_rel_tol = 1e-5 # loose enough to force multiple Picard iterations on this example
l_tol = 1e-5 # loose enough to force multiple Picard iterations on this example
fixed_point_rel_tol = 1e-8
num_steps = 2
[]
[MultiApps]
[sub2]
type = TransientMultiApp
positions = '0 0 0'
input_files = picard_sub2.i
execute_on = timestep_end
[]
[]
[Transfers]
[v_to_v3]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub2
source_variable = v
variable = v3
[]
[w]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub2
source_variable = w
variable = w
[]
[time_to_sub]
type = MultiAppPostprocessorTransfer
from_postprocessor = time
to_postprocessor = sub_time
to_multi_app = sub2
[]
[dt_to_sub]
type = MultiAppPostprocessorTransfer
from_postprocessor = dt
to_postprocessor = sub_dt
to_multi_app = sub2
[]
[matser_time_to_sub]
type = MultiAppPostprocessorTransfer
from_postprocessor = time
to_postprocessor = parent_time
to_multi_app = sub2
[]
[parent_dt_to_sub]
type = MultiAppPostprocessorTransfer
from_postprocessor = dt
to_postprocessor = parent_dt
to_multi_app = sub2
[]
[]
(modules/solid_mechanics/test/tests/interface_stress/test.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 10
nz = 10
xmax = 1
ymax = 1
zmax = 1
xmin = -1
ymin = -1
zmin = -1
[]
[GlobalParams]
order = CONSTANT
family = MONOMIAL
rank_two_tensor = extra_stress
[]
[Functions]
[./sphere]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2+z^2); if(r>1,0,1-3*r^2+2*r^3)'
[../]
[]
[Variables]
[./dummy]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = dummy
[../]
[]
[AuxVariables]
[./eta]
[./InitialCondition]
type = FunctionIC
function = sphere
[../]
order = FIRST
family = LAGRANGE
[../]
[./s00]
[../]
[./s01]
[../]
[./s02]
[../]
[./s10]
[../]
[./s11]
[../]
[./s12]
[../]
[./s20]
[../]
[./s21]
[../]
[./s22]
[../]
[]
[AuxKernels]
[./s00]
type = RankTwoAux
variable = s00
index_i = 0
index_j = 0
[../]
[./s01]
type = RankTwoAux
variable = s01
index_i = 0
index_j = 1
[../]
[./s02]
type = RankTwoAux
variable = s02
index_i = 0
index_j = 2
[../]
[./s10]
type = RankTwoAux
variable = s10
index_i = 1
index_j = 0
[../]
[./s11]
type = RankTwoAux
variable = s11
index_i = 1
index_j = 1
[../]
[./s12]
type = RankTwoAux
variable = s12
index_i = 1
index_j = 2
[../]
[./s20]
type = RankTwoAux
variable = s20
index_i = 2
index_j = 0
[../]
[./s21]
type = RankTwoAux
variable = s21
index_i = 2
index_j = 1
[../]
[./s22]
type = RankTwoAux
variable = s22
index_i = 2
index_j = 2
[../]
[]
[Materials]
[./interface]
type = ComputeInterfaceStress
v = eta
stress = 3.0
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
execute_on = timestep_end
hide = 'dummy eta'
[]
(modules/fluid_properties/test/tests/calorically_imperfect_gas/test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
elem_type = QUAD4
[]
[Functions]
[f_fn]
type = ParsedFunction
expression = -4
[]
[bc_fn]
type = ParsedFunction
expression = 'x*x+y*y'
[]
[e_fn]
type = PiecewiseLinear
x = '100 280 300 350 400 450 500 550 600 700 800 900 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 5000'
y = '783.9 2742.3 2958.6 3489.2 4012.7 4533.3 5053.8 5574 6095.1 7140.2 8192.9 9256.3 10333.6 12543.9 14836.6 17216.3 19688.4 22273.7 25018.3 28042.3 31544.2 35818.1 41256.5 100756.5'
scale_factor = 1e3
[]
[mu_fn]
type = PiecewiseLinear
x = '100 280 300 350 400 450 500 550 600 700 800 900 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 5000'
y = '85.42 85.42 89.53 99.44 108.9 117.98 126.73 135.2 143.43 159.25 174.36 188.9 202.96 229.88 255.5 280.05 303.67 326.45 344.97 366.49 387.87 409.48 431.86 431.86'
scale_factor = 1e-7
[]
[k_fn]
type = PiecewiseLinear
x = '100 280 300 350 400 450 500 550 600 700 800 900 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 5000'
y = '186.82 186.82 194.11 212.69 231.55 250.38 268.95 287.19 305.11 340.24 374.92 409.66 444.75 511.13 583.42 656.44 733.32 826.53 961.15 1180.38 1546.31 2135.49 3028.08 3028.08'
scale_factor = 1e-3
[]
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[e]
initial_condition = 4012.7e3
[]
[v]
initial_condition = 0.0007354064593540647
[]
[p]
family = MONOMIAL
order = CONSTANT
[]
[T]
family = MONOMIAL
order = CONSTANT
[]
[cp]
family = MONOMIAL
order = CONSTANT
[]
[cv]
family = MONOMIAL
order = CONSTANT
[]
[c]
family = MONOMIAL
order = CONSTANT
[]
[mu]
family = MONOMIAL
order = CONSTANT
[]
[k]
family = MONOMIAL
order = CONSTANT
[]
[g]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[p]
type = MaterialRealAux
variable = p
property = pressure
[]
[T]
type = MaterialRealAux
variable = T
property = temperature
[]
[cp]
type = MaterialRealAux
variable = cp
property = cp
[]
[cv]
type = MaterialRealAux
variable = cv
property = cv
[]
[c]
type = MaterialRealAux
variable = c
property = c
[]
[mu]
type = MaterialRealAux
variable = mu
property = mu
[]
[k]
type = MaterialRealAux
variable = k
property = k
[]
[g]
type = MaterialRealAux
variable = g
property = g
[]
[]
[FluidProperties]
[h2]
type = CaloricallyImperfectGas
molar_mass = 0.002
e = e_fn
k = k_fn
mu = mu_fn
min_temperature = 100
max_temperature = 5000
[]
[]
[Materials]
[fp_mat]
type = FluidPropertiesMaterialVE
e = e
v = v
fp = h2
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = f_fn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = bc_fn
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(test/tests/executioners/transient_sync_time/transient_sync_time_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./bc_func]
type = ParsedFunction
expression = sin(pi*0.1*x*t)
[../]
# Laplacian of the function above
[./interior_func]
type = ParsedFunction
expression = 0.01*pi*pi*t*t*sin(0.1*pi*x*t)
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = interior_func
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
preset = false
boundary = '0 1 2 3'
function = bc_func
[../]
[]
[Executioner]
type = Transient
dt = 1
start_time = 0
end_time = 40
num_steps = 1000
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out
exodus = true
sync_times = '10.5 20 30.5'
[]
(test/tests/time_integrators/actually_explicit_euler_verification/ee-1d-linear.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -1
xmax = 1
nx = 200
elem_type = EDGE2
[]
[Functions]
[./ic]
type = ParsedFunction
expression = 0
[../]
[./forcing_fn]
type = ParsedFunction
expression = x
[../]
[./exact_fn]
type = ParsedFunction
expression = t*x
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic
[../]
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
lumping = true
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
preset = false
boundary = '0 1'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
start_time = 0.0
num_steps = 20
dt = 0.00005
[./TimeIntegrator]
type = ActuallyExplicitEuler
[../]
[]
[Outputs]
exodus = true
[./console]
type = Console
max_rows = 10
[../]
[]
(modules/solid_mechanics/test/tests/2D_geometries/finite_planestrain.i)
# This test uses the strain calculator ComputePlaneFiniteStrain,
# which is generated through the use of the SolidMechanics QuasiStatic Physics.
[Mesh]
type = GeneratedMesh
nx = 2
ny = 2
dim = 2
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
planar_formulation = PLANE_STRAIN
add_variables = true
generate_output = 'stress_xx stress_xy stress_yy stress_zz strain_xx strain_xy strain_yy strain_zz'
[../]
[]
[Functions]
[./pull]
type = ParsedFunction
expression ='0.005 * t'
[../]
[]
[BCs]
[./leftx]
type = DirichletBC
boundary = left
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[./pull]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = pull
[../]
[]
[Materials]
[./elastic_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
poissons_ratio = 0.3
youngs_modulus = 1e6
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
l_max_its = 100
l_tol = 1e-10
nl_max_its = 10
nl_rel_tol = 1e-12
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 2.0
[]
[Outputs]
exodus = true
[]
(test/tests/functions/generic_function_material/generic_function_material_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./diff_func]
type = ParsedFunction
expression = 1/t
[../]
[]
[Kernels]
[./diff]
type = GenericDiffusion
variable = u
property = diffusion
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[./conv]
type = Convection
variable = u
velocity = '1 0 0'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Materials]
[./gfm]
type = GenericFunctionMaterial
block = 0
prop_names = diffusion
prop_values = diff_func
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/elem_prop_read_user_object/prop_elem_read.i)
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
displacements = 'disp_x disp_y'
nx = 2
ny = 2
[]
[Variables]
[./disp_x]
block = 0
[../]
[./disp_y]
block = 0
[../]
[]
[GlobalParams]
volumetric_locking_correction=true
[]
[AuxVariables]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./e_yy]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[]
[Functions]
[./tdisp]
type = ParsedFunction
expression = 0.05*t
[../]
[]
[UserObjects]
[./prop_read]
type = PropertyReadFile
prop_file_name = 'input_file.txt'
# Enter file data as prop#1, prop#2, .., prop#nprop
nprop = 4
read_type = element
[../]
[]
[AuxKernels]
[./stress_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = stress
index_j = 1
index_i = 1
execute_on = timestep_end
block = 0
[../]
[./e_yy]
type = RankTwoAux
variable = e_yy
rank_two_tensor = elastic_strain
index_j = 1
index_i = 1
execute_on = timestep_end
block = 0
[../]
[]
[BCs]
[./fix_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0
[../]
[./fix_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./tdisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = tdisp
[../]
[]
[Materials]
[./elasticity_tensor_with_Euler]
type = ComputeElasticityTensorCP
block = 0
C_ijkl = '1.684e5 0.176e5 0.176e5 1.684e5 0.176e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
read_prop_user_object = prop_read
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'disp_x disp_y'
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[]
[Postprocessors]
[./stress_yy]
type = ElementAverageValue
variable = stress_yy
block = 'ANY_BLOCK_ID 0'
[../]
[./e_yy]
type = ElementAverageValue
variable = e_yy
block = 'ANY_BLOCK_ID 0'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
dt = 0.05
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = -pc_hypre_type
petsc_options_value = boomerang
nl_abs_tol = 1e-10
nl_rel_step_tol = 1e-10
dtmax = 10.0
nl_rel_tol = 1e-10
end_time = 1
dtmin = 0.05
num_steps = 1
nl_abs_step_tol = 1e-10
[]
[Outputs]
file_base = prop_elem_read_out
exodus = true
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y'
use_displaced_mesh = true
[../]
[]
(modules/optimization/test/tests/vectorpostprocessors/element_reaction_inner_product/element_reaction_inner_product.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 10
[]
[]
[AuxVariables]
[u]
[]
[v]
initial_condition = 1
[]
[dp1]
[]
[dp2]
[]
[]
p1 = 3.14
p2 = 2.72
[Reporters]
[params]
type = ConstantReporter
real_vector_names = 'p'
real_vector_values = '${p1} ${p2}'
[]
[]
[Functions]
[p_fun]
type = ParsedOptimizationFunction
expression = 'p_1*x + p_2*p_2'
param_symbol_names = 'p_1 p_2'
param_vector_name = params/p
[]
[u_fun]
type = ParsedFunction
expression = 'x'
[]
[dp1_fun]
type = ParsedFunction
expression = 'x'
symbol_names = 'p_1 p_2'
symbol_values = '${p1} ${p2}'
[]
[dp2_fun]
type = ParsedFunction
expression = '2*p_2'
symbol_names = 'p_1 p_2'
symbol_values = '${p1} ${p2}'
[]
[]
[ICs]
[u_ic]
type = FunctionIC
variable = u
function = u_fun
[]
[dp1_ic]
type = FunctionIC
variable = dp1
function = dp1_fun
[]
[dp2_ic]
type = FunctionIC
variable = dp2
function = dp2_fun
[]
[]
[VectorPostprocessors]
[inner_product]
type = ElementOptimizationReactionFunctionInnerProduct
forward_variable = u
variable = v
function = p_fun
execute_on = initial
[]
[]
[Postprocessors]
[udp1v]
type = VectorPostprocessorComponent
vectorpostprocessor = inner_product
vector_name = inner_product
index = 0
[]
[udp2v]
type = VectorPostprocessorComponent
vectorpostprocessor = inner_product
vector_name = inner_product
index = 1
[]
[udp1v_exact]
type = VariableInnerProduct
variable = u
second_variable = dp1
[]
[udp2v_exact]
type = VariableInnerProduct
variable = u
second_variable = dp2
[]
[compare]
type = ParsedPostprocessor
expression = 'abs(udp1v + udp1v_exact) + abs(udp2v + udp2v_exact)'
pp_names = 'udp1v udp2v udp1v_exact udp2v_exact'
[]
[]
[UserObjects]
[terminate]
type = Terminator
expression = 'compare > 1e-8'
error_level = ERROR
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/steady_vector_fsp_stokes.i)
rho=1
mu=1
U=1
l=1
prefactor=${fparse 1/(l/2)^2}
n=8
[Mesh]
[gen]
type = DistributedRectilinearMeshGenerator
dim = 2
xmin = 0
xmax = ${l}
ymin = 0
ymax = ${l}
nx = ${n}
ny = ${n}
elem_type = QUAD4
[]
second_order = true
parallel_type = distributed
[]
[Variables]
[vel]
order = SECOND
family = LAGRANGE_VEC
[]
[p]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[mass]
type = INSADMass
variable = p
[]
[mass_kernel]
type = MassMatrix
variable = p
matrix_tags = 'mass'
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = vel
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = vel
pressure = p
integrate_p_by_parts = true
[]
[]
[BCs]
[no_slip]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'bottom right left'
[]
[lid]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'top'
function_x = 'lid_function'
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[insad]
type = INSADMaterial
velocity = vel
pressure = p
[]
[]
[Functions]
[lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '${prefactor}*${U}*x*(${l}-x)'
[]
[]
[Problem]
type = NavierStokesProblem
mass_matrix = 'mass'
extra_tag_matrices = 'mass'
use_pressure_mass_matrix = true
[]
[Preconditioning]
[FSP]
type = FSP
topsplit = 'up'
[up]
splitting = 'u p'
splitting_type = schur
petsc_options_iname = '-pc_fieldsplit_schur_fact_type -pc_fieldsplit_schur_precondition -ksp_gmres_restart -ksp_type -ksp_pc_side -ksp_rtol'
petsc_options_value = 'full self 300 fgmres right 1e-4'
[]
[u]
vars = 'vel'
# petsc_options = '-ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_type -ksp_rtol -ksp_gmres_restart -ksp_pc_side'
petsc_options_value = 'hypre boomeramg gmres 1e-2 300 right'
[]
[p]
vars = 'p'
petsc_options = '-ksp_converged_reason'
petsc_options_iname = '-ksp_type -ksp_gmres_restart -ksp_rtol -pc_type -ksp_pc_side -pc_hypre_type'
petsc_options_value = 'fgmres 300 1e-2 hypre right boomeramg'
[]
[]
[]
[Postprocessors]
[pavg]
type = ElementAverageValue
variable = p
[]
[]
[UserObjects]
[set_pressure]
type = NSPressurePin
pin_type = 'average'
variable = p
pressure_average = 'pavg'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_rel_tol = 1e-12
[]
[Outputs]
print_linear_residuals = false
[exo]
type = Exodus
execute_on = 'final'
hide = 'pavg'
[]
[]
(test/tests/restart/restart_add_variable/transient_with_stateful.i)
# We run a simple problem (5 time steps and save off the solution)
# In part2, we load the solution and solve a steady problem. The test check, that the initial state in part 2 is the same as the last state from part1
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[./forcing_fn]
type = ParsedFunction
expression = -4+(x*x+y*y)
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./diffusivity]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./out_diffusivity]
type = MaterialRealAux
variable = diffusivity
property = diffusivity
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = MatDiffusionTest
variable = u
prop_name = diffusivity
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Materials]
[./mat]
type = StatefulMaterial
block = 0
initial_diffusivity = 0.5
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.2
start_time = 0
num_steps = 5
[]
[Outputs]
checkpoint = true
[./out]
type = Exodus
elemental_as_nodal = true
execute_elemental_on = none
[../]
[]
(test/tests/postprocessors/function_side_average/function_side_average.i)
A = 2
B = 5
x2 = 4
y2 = 3
integral_exact = ${fparse A * x2 * y2 + 0.5 * B * y2^2}
avg_exact = ${fparse integral_exact / y2}
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmax = ${x2}
ymax = ${y2}
[]
[Functions]
[test_fn]
type = ParsedFunction
expression = '${A}*x + ${B}*y'
[]
[]
[Postprocessors]
[avg]
type = FunctionSideAverage
boundary = 'right'
function = test_fn
execute_on = 'INITIAL'
[]
[avg_err]
type = RelativeDifferencePostprocessor
value1 = avg
value2 = ${avg_exact}
execute_on = 'INITIAL'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
show = 'avg_err'
[]
(test/tests/outputs/debug/show_execution_auxkernels.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Debug]
show_execution_order = 'ALWAYS'
[]
[AuxVariables]
[a]
initial_condition = 1
[]
[b]
initial_condition = 2
[]
[c]
initial_condition = 3
[]
[a_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = 1
[]
[b_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = 2
[]
[c_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = 3
[]
[d_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = 3
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Functions]
[exact_fn]
type = ParsedFunction
expression = t
[]
[a_fn]
type = ParsedFunction
expression = t
[]
[b_fn]
type = ParsedFunction
expression = (4-t)/2
[]
[]
[AuxKernels]
# Nodal
# this one needs a and b set, should run last
[c_saux]
type = QuotientAux
variable = c
numerator = a
denominator = b
execute_on = 'initial timestep_end'
[]
# setting b requires a
[b_saux]
type = ProjectionAux
variable = b
v = a
execute_on = 'linear timestep_end'
[]
# Elements
# this one needs a and b set, should run last
[c_saux_elem]
type = QuotientAux
variable = c_elem
numerator = a_elem
denominator = b_elem
execute_on = 'initial timestep_end'
[]
# setting b requires a
[b_saux_elem]
type = ProjectionAux
variable = b_elem
v = a_elem
execute_on = 'linear timestep_end'
[]
# boundary auxkernel
[real_property]
type = MaterialRealAux
variable = d_elem
property = 3
boundary = 'top bottom'
[]
[]
[Kernels]
[ie]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 1
dt = 1
[]
(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/solid_mechanics/test/tests/crystal_plasticity/user_object_based/fileread.i)
[Mesh]
type = GeneratedMesh
dim = 3
elem_type = HEX8
displacements = 'ux uy uz'
[]
[Variables]
[./ux]
[../]
[./uy]
[../]
[./uz]
[../]
[]
[AuxVariables]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./fp_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./rotout]
order = CONSTANT
family = MONOMIAL
[../]
[./e_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./gss]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./tdisp]
type = ParsedFunction
expression = 0.01*t
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'ux uy uz'
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_zz]
type = RankTwoAux
variable = stress_zz
rank_two_tensor = stress
index_j = 2
index_i = 2
execute_on = timestep_end
[../]
[./fp_zz]
type = RankTwoAux
variable = fp_zz
rank_two_tensor = fp
index_j = 2
index_i = 2
execute_on = timestep_end
[../]
[./e_zz]
type = RankTwoAux
variable = e_zz
rank_two_tensor = lage
index_j = 2
index_i = 2
execute_on = timestep_end
[../]
[./gss]
type = MaterialStdVectorAux
variable = gss
property = state_var_gss
index = 0
execute_on = timestep_end
[../]
[]
[BCs]
[./symmy]
type = DirichletBC
variable = uy
boundary = bottom
value = 0
[../]
[./symmx]
type = DirichletBC
variable = ux
boundary = left
value = 0
[../]
[./symmz]
type = DirichletBC
variable = uz
boundary = back
value = 0
[../]
[./tdisp]
type = FunctionDirichletBC
variable = uz
boundary = front
function = tdisp
[../]
[]
[UserObjects]
[./slip_rate_gss]
type = CrystalPlasticitySlipRateGSS
variable_size = 12
slip_sys_file_name = input_slip_sys.txt
num_slip_sys_flowrate_props = 2
flowprops = '1 4 0.001 0.1 5 8 0.001 0.1 9 12 0.001 0.1'
uo_state_var_name = state_var_gss
[../]
[./slip_resistance_gss]
type = CrystalPlasticitySlipResistanceGSS
variable_size = 12
uo_state_var_name = state_var_gss
[../]
[./state_var_gss]
type = CrystalPlasticityStateVariable
variable_size = 12
intvar_read_type = file_input
state_variable_file_name = input_state_variable.txt
uo_state_var_evol_rate_comp_name = state_var_evol_rate_comp_gss
scale_factor = 1.0
[../]
[./state_var_evol_rate_comp_gss]
type = CrystalPlasticityStateVarRateComponentGSS
variable_size = 12
hprops = '1.0 541.5 109.8 2.5'
uo_slip_rate_name = slip_rate_gss
uo_state_var_name = state_var_gss
[../]
[]
[Materials]
[./crysp]
type = FiniteStrainUObasedCP
stol = 1e-2
tan_mod_type = exact
uo_slip_rates = 'slip_rate_gss'
uo_slip_resistances = 'slip_resistance_gss'
uo_state_vars = 'state_var_gss'
uo_state_var_evol_rate_comps = 'state_var_evol_rate_comp_gss'
[../]
[./strain]
type = ComputeFiniteStrain
displacements = 'ux uy uz'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensorCP
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
[../]
[]
[Postprocessors]
[./stress_zz]
type = ElementAverageValue
variable = stress_zz
[../]
[./fp_zz]
type = ElementAverageValue
variable = fp_zz
[../]
[./e_zz]
type = ElementAverageValue
variable = e_zz
[../]
[./gss]
type = ElementAverageValue
variable = gss
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
dt = 0.05
solve_type = 'PJFNK'
petsc_options_iname = -pc_hypre_type
petsc_options_value = boomerang
nl_abs_tol = 1e-10
nl_rel_step_tol = 1e-10
dtmax = 10.0
nl_rel_tol = 1e-10
end_time = 1
dtmin = 0.05
num_steps = 10
nl_abs_step_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/interface_value/interface_fe_variable_value_postprocessor.i)
postprocessor_type = InterfaceAverageVariableValuePostprocessor
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 6
xmax = 3
ny = 9
ymax = 3
elem_type = QUAD4
[]
[./subdomain_id]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '2 1 0'
block_id = 1
[../]
[./interface]
input = subdomain_id
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'interface'
[../]
[]
[Functions]
[./fn_exact]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[./ffn]
type = ParsedFunction
expression = -4
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = FIRST
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = ffn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = fn_exact
[../]
[]
[Materials]
[./stateful1]
type = StatefulMaterial
block = 0
initial_diffusivity = 5
[../]
[./stateful2]
type = StatefulMaterial
block = 1
initial_diffusivity = 2
[../]
[]
[AuxKernels]
[./diffusivity_1]
type = MaterialRealAux
property = diffusivity
variable = diffusivity_1
[]
[./diffusivity_2]
type = MaterialRealAux
property = diffusivity
variable = diffusivity_2
[]
[]
[AuxVariables]
[./diffusivity_1]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_2]
family = MONOMIAL
order = CONSTANT
[]
[]
[Postprocessors]
[./diffusivity_average]
type = ${postprocessor_type}
interface_value_type = average
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_jump_primary_secondary]
type = ${postprocessor_type}
interface_value_type = jump_primary_minus_secondary
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_jump_secondary_primary]
type = ${postprocessor_type}
interface_value_type = jump_secondary_minus_primary
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_jump_abs]
type = ${postprocessor_type}
interface_value_type = jump_abs
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_primary]
type = ${postprocessor_type}
interface_value_type = primary
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_secondary]
type = ${postprocessor_type}
interface_value_type = secondary
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_single_variable]
type = ${postprocessor_type}
interface_value_type = primary
variable = diffusivity_1
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
file_base = ${raw ${postprocessor_type} _fe}
exodus = true
[]
(test/tests/ics/function_ic/parsed_function.i)
#
# Test the automatically generated gradients in ParsedFunction and the gradient pass-through in FunctionIC
# OLD MOOSE behavior was for parsed_function to behave the same as parsed_zerograd_function
# NEW MOOSE behavior is for parsed_function to behave the same as parsed_grad_function
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 3.141
ymin = 0
ymax = 3.141
nx = 10
ny = 10
[]
[Variables]
[u]
order = THIRD
family = HERMITE
[]
[]
[Functions]
[parsed_function]
type = ParsedFunction
expression = 'sin(x)-cos(y/2)'
[]
[parsed_grad_function]
type = ParsedGradFunction
expression = 'sin(x)-cos(y/2)'
grad_x = 'cos(x)'
grad_y = 'sin(y/2)/2'
[]
[parsed_zerograd_function]
type = ParsedGradFunction
expression = 'sin(x)-cos(y/2)'
grad_x = '0'
grad_y = '0'
[]
[]
[ICs]
[u_ic]
type = FunctionIC
variable = 'u'
function = parsed_function
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
file_base = parsed
[OverSampling]
type = Exodus
refinements = 3
[]
[]
(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/navier_stokes/test/tests/finite_element/ins/lid_driven/steady_vector_fsp_al.i)
rho=1
mu=1e-3
U=1
l=1
prefactor=${fparse 1/(l/2)^2}
n=8
gamma=${U}
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${l}
ymin = 0
ymax = ${l}
nx = ${n}
ny = ${n}
elem_type = QUAD4
[]
second_order = true
[]
[Variables]
[vel]
order = SECOND
family = LAGRANGE_VEC
[]
[p]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[mass]
type = INSADMass
variable = p
[]
[mass_kernel]
type = MassMatrix
variable = p
matrix_tags = 'mass'
density = ${fparse -gamma - mu}
[]
[momentum_advection]
type = INSADMomentumAdvection
variable = vel
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = vel
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = vel
pressure = p
integrate_p_by_parts = true
[]
[momentum_graddiv]
type = INSADMomentumGradDiv
variable = vel
gamma = ${gamma}
[]
[]
[BCs]
[no_slip]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'bottom right left'
[]
[lid]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'top'
function_x = 'lid_function'
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[insad]
type = INSADTauMaterial
velocity = vel
pressure = p
[]
[]
[Functions]
[lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '${prefactor}*${U}*x*(${l}-x)'
[]
[]
[Problem]
type = NavierStokesProblem
mass_matrix = 'mass'
extra_tag_matrices = 'mass'
use_pressure_mass_matrix = true
[]
[Preconditioning]
[FSP]
type = FSP
topsplit = 'up'
[up]
splitting = 'u p'
splitting_type = schur
petsc_options_iname = '-pc_fieldsplit_schur_fact_type -pc_fieldsplit_schur_precondition -ksp_gmres_restart -ksp_type -ksp_pc_side -ksp_rtol'
petsc_options_value = 'full self 300 fgmres right 1e-4'
[]
[u]
vars = 'vel'
# petsc_options = '-ksp_converged_reason'
petsc_options_iname = '-pc_type -ksp_type -ksp_rtol -ksp_gmres_restart -ksp_pc_side'
petsc_options_value = 'lu gmres 1e-2 300 right'
[]
[p]
vars = 'p'
petsc_options = '-ksp_converged_reason'
petsc_options_iname = '-ksp_type -ksp_gmres_restart -ksp_rtol -pc_type -ksp_pc_side'
petsc_options_value = 'gmres 300 1e-2 lu right'
[]
[]
[]
[Postprocessors]
[pavg]
type = ElementAverageValue
variable = p
[]
[]
[UserObjects]
[set_pressure]
type = NSPressurePin
pin_type = 'average'
variable = p
pressure_average = 'pavg'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_rel_tol = 1e-12
[]
[Outputs]
print_linear_residuals = false
[exo]
type = Exodus
execute_on = 'final'
hide = 'pavg'
[]
[]
(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/solid_mechanics/test/tests/eigenstrain/reducedOrderRZQuadratic.i)
#
# This test checks whether the ComputeReducedOrderEigenstrain is functioning properly.
#
# If instead of 'reduced_order_eigenstrain', 'thermal_eigenstrain' is given to
# eigenstrain_names in the Physics/SolidMechanics/QuasiStatic/all block, the output will be
# quite different.
#
# Open the reducedOrderRZQuadratic_out_hydro_0001.csv file and plot the hydro variables as
# a function of x.
#
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = false
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 1
xmax = 3
xmin = 1
ymax = 1
ymin = 0
second_order = true
[]
[Functions]
[./tempLinear]
type = ParsedFunction
expression = '715-5*x'
[../]
[./tempQuadratic]
type = ParsedFunction
symbol_names = 'Tc Te'
symbol_values = '701 700'
expression = '(Te-Tc)/4.0*x*x+(Tc-Te)/2.0*x+Te+3.0*(Tc-Te)/4.0'
[../]
[./tempCubic]
type = ParsedFunction
expression = '-1.25*x*x*x+11.25*x*x-33.75*x+733.75'
[../]
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
initial_condition = 295.0
[../]
[]
[AuxVariables]
[./hydro_constant]
order = CONSTANT
family = MONOMIAL
[../]
[./hydro_first]
order = FIRST
family = MONOMIAL
[../]
[./hydro_second]
order = SECOND
family = MONOMIAL
[../]
[./sxx_constant]
order = CONSTANT
family = MONOMIAL
[../]
[./sxx_first]
order = FIRST
family = MONOMIAL
[../]
[./sxx_second]
order = SECOND
family = MONOMIAL
[../]
[./szz_constant]
order = CONSTANT
family = MONOMIAL
[../]
[./szz_first]
order = FIRST
family = MONOMIAL
[../]
[./szz_second]
order = SECOND
family = MONOMIAL
[../]
[./thermal_constant]
order = CONSTANT
family = MONOMIAL
[../]
[./thermal_first]
order = FIRST
family = MONOMIAL
[../]
[./thermal_second]
order = SECOND
family = MONOMIAL
[../]
[./reduced_constant]
order = CONSTANT
family = MONOMIAL
[../]
[./reduced_first]
order = FIRST
family = MONOMIAL
[../]
[./reduced_second]
order = SECOND
family = MONOMIAL
[../]
[./temp2]
order = SECOND
family = LAGRANGE
initial_condition = 700
[../]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[./all]
add_variables = true
strain = SMALL
incremental = true
temperature = temp2
#eigenstrain_names = thermal_eigenstrain
eigenstrain_names = reduced_order_eigenstrain
[../]
[../]
[../]
[]
[Kernels]
[./heat]
type = Diffusion
variable = temp
[../]
[]
[AuxKernels]
[./hydro_constant_aux]
type = RankTwoScalarAux
variable = hydro_constant
rank_two_tensor = stress
scalar_type = Hydrostatic
execute_on = timestep_end
[../]
[./hydro_first_aux]
type = RankTwoScalarAux
variable = hydro_first
rank_two_tensor = stress
scalar_type = Hydrostatic
execute_on = timestep_end
[../]
[./hydro_second_aux]
type = RankTwoScalarAux
variable = hydro_second
rank_two_tensor = stress
scalar_type = Hydrostatic
execute_on = timestep_end
[../]
[./sxx_constant_aux]
type = RankTwoAux
variable = sxx_constant
rank_two_tensor = stress
index_i = 0
index_j = 0
execute_on = timestep_end
[../]
[./sxx_first_aux]
type = RankTwoAux
variable = sxx_first
rank_two_tensor = stress
index_i = 0
index_j = 0
execute_on = timestep_end
[../]
[./sxx_second_aux]
type = RankTwoAux
variable = sxx_second
rank_two_tensor = stress
index_i = 0
index_j = 0
execute_on = timestep_end
[../]
[./szz_constant_aux]
type = RankTwoAux
variable = szz_constant
rank_two_tensor = stress
index_i = 2
index_j = 2
execute_on = timestep_end
[../]
[./szz_first_aux]
type = RankTwoAux
variable = szz_first
rank_two_tensor = stress
index_i = 2
index_j = 2
execute_on = timestep_end
[../]
[./szz_second_aux]
type = RankTwoAux
variable = szz_second
rank_two_tensor = stress
index_i = 2
index_j = 2
execute_on = timestep_end
[../]
[./thermal_constant_aux]
type = RankTwoAux
variable = thermal_constant
rank_two_tensor = thermal_eigenstrain
index_i = 0
index_j = 0
execute_on = timestep_end
[../]
[./thermal_first_aux]
type = RankTwoAux
variable = thermal_first
rank_two_tensor = thermal_eigenstrain
index_i = 0
index_j = 0
execute_on = timestep_end
[../]
[./thermal_second_aux]
type = RankTwoAux
variable = thermal_second
rank_two_tensor = thermal_eigenstrain
index_i = 0
index_j = 0
execute_on = timestep_end
[../]
[./reduced_constant_aux]
type = RankTwoAux
variable = reduced_constant
rank_two_tensor = reduced_order_eigenstrain
index_i = 0
index_j = 0
execute_on = timestep_end
[../]
[./reduced_first_aux]
type = RankTwoAux
variable = reduced_first
rank_two_tensor = reduced_order_eigenstrain
index_i = 0
index_j = 0
execute_on = timestep_end
[../]
[./reduced_second_aux]
type = RankTwoAux
variable = reduced_second
rank_two_tensor = reduced_order_eigenstrain
index_i = 0
index_j = 0
execute_on = timestep_end
[../]
[./temp2]
type = FunctionAux
variable = temp2
function = tempQuadratic
execute_on = timestep_begin
[../]
[]
[BCs]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = bottom #'bottom top'
value = 0.0
[../]
[./temp_right]
type = DirichletBC
variable = temp
boundary = right
value = 700
[../]
[./temp_left]
type = DirichletBC
variable = temp
boundary = left
value = 710
[../]
[]
[Materials]
[./fuel_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e8
poissons_ratio = 0
[../]
[./fuel_thermal_expansion]
type = ComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 1e-6
temperature = temp2
stress_free_temperature = 295.0
eigenstrain_name = 'thermal_eigenstrain'
[../]
[./reduced_order_eigenstrain]
type = ComputeReducedOrderEigenstrain
input_eigenstrain_names = 'thermal_eigenstrain'
eigenstrain_name = 'reduced_order_eigenstrain'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew '
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type'
petsc_options_value = '70 hypre boomeramg'
num_steps = 1
nl_rel_tol = 1e-8
[]
[Postprocessors]
[./_dt]
type = TimestepSize
[../]
[]
[VectorPostprocessors]
[./hydro]
type = LineValueSampler
warn_discontinuous_face_values = false
num_points = 50
start_point = '1 0.07e-3 0'
end_point = '3 0.07e-3 0'
sort_by = x
variable = 'temp2 disp_x disp_y hydro_constant hydro_first hydro_second sxx_constant sxx_first sxx_second szz_constant szz_first szz_second thermal_constant thermal_first thermal_second reduced_constant reduced_first reduced_second'
[../]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/porous_flow/examples/tidal/atm_tides.i)
# A 10m x 10m "column" of height 100m is subjected to cyclic pressure at its top
# Assumptions:
# the boundaries are impermeable, except the top boundary
# only vertical displacement is allowed
# the atmospheric pressure sets the total stress at the top of the model
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 10
xmin = 0
xmax = 10
ymin = 0
ymax = 10
zmin = -100
zmax = 0
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
biot_coefficient = 0.6
multiply_by_density = false
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
scaling = 1E11
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = '-10000*z' # approximately correct
[]
[]
[Functions]
[ini_stress_zz]
type = ParsedFunction
expression = '(25000 - 0.6*10000)*z' # remember this is effective stress
[]
[cyclic_porepressure]
type = ParsedFunction
expression = 'if(t>0,5000 * sin(2 * pi * t / 3600.0 / 24.0),0)'
[]
[neg_cyclic_porepressure]
type = ParsedFunction
expression = '-if(t>0,5000 * sin(2 * pi * t / 3600.0 / 24.0),0)'
[]
[]
[BCs]
# zmin is called 'back'
# zmax is called 'front'
# ymin is called 'bottom'
# ymax is called 'top'
# xmin is called 'left'
# xmax is called 'right'
[no_x_disp]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'bottom top' # because of 1-element meshing, this fixes u_x=0 everywhere
[]
[no_y_disp]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top' # because of 1-element meshing, this fixes u_y=0 everywhere
[]
[no_z_disp_at_bottom]
type = DirichletBC
variable = disp_z
value = 0
boundary = back
[]
[pp]
type = FunctionDirichletBC
variable = porepressure
function = cyclic_porepressure
boundary = front
[]
[total_stress_at_top]
type = FunctionNeumannBC
variable = disp_z
function = neg_cyclic_porepressure
boundary = front
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.0
bulk_modulus = 2E9
viscosity = 1E-3
density0 = 1000.0
[]
[]
[PorousFlowBasicTHM]
coupling_type = HydroMechanical
displacements = 'disp_x disp_y disp_z'
porepressure = porepressure
gravity = '0 0 -10'
fp = the_simple_fluid
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
bulk_modulus = 10.0E9 # drained bulk modulus
poissons_ratio = 0.25
[]
[strain]
type = ComputeSmallStrain
eigenstrain_names = ini_stress
[]
[stress]
type = ComputeLinearElasticStress
[]
[ini_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = '0 0 0 0 0 0 0 0 ini_stress_zz'
eigenstrain_name = ini_stress
[]
[porosity]
type = PorousFlowPorosityConst # only the initial value of this is ever used
porosity = 0.1
[]
[biot_modulus]
type = PorousFlowConstantBiotModulus
solid_bulk_compliance = 1E-10
fluid_bulk_modulus = 2E9
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-14'
[]
[density]
type = GenericConstantMaterial
prop_names = density
prop_values = 2500.0
[]
[]
[Postprocessors]
[p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
[]
[uz0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = disp_z
[]
[p100]
type = PointValue
outputs = csv
point = '0 0 -100'
variable = porepressure
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = -3600 # so postprocessors get recorded correctly at t=0
dt = 3600
end_time = 360000
nl_abs_tol = 5E-7
nl_rel_tol = 1E-10
[]
[Outputs]
csv = true
[]
(modules/phase_field/test/tests/GrandPotentialPFM/SinteringDilute.i)
#input file to test the GrandPotentialSinteringMaterial using the dilute energy profile
[Mesh]
type = GeneratedMesh
dim = 2
nx = 17
ny = 10
xmin = 0
xmax = 660
ymin = 0
ymax = 380
[]
[GlobalParams]
op_num = 2
var_name_base = gr
int_width = 40
[]
[Variables]
[./w]
[./InitialCondition]
type = FunctionIC
variable = w
function = f_w
[../]
[../]
[./phi]
[../]
[./PolycrystalVariables]
[../]
[]
[AuxVariables]
[./T]
order = CONSTANT
family = MONOMIAL
[./InitialCondition]
type = FunctionIC
variable = T
function = f_T
[../]
[../]
[]
[ICs]
[./phi_IC]
type = SpecifiedSmoothCircleIC
variable = phi
x_positions = '190 470'
y_positions = '190 190'
z_positions = ' 0 0'
radii = '150 150'
invalue = 0
outvalue = 1
[../]
[./gr0_IC]
type = SmoothCircleIC
variable = gr0
x1 = 190
y1 = 190
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[./gr1_IC]
type = SmoothCircleIC
variable = gr1
x1 = 470
y1 = 190
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[]
[Functions]
[./f_T]
type = ConstantFunction
value = 1600
[../]
[./f_w]
type = ParsedFunction
expression = '1.515e-7 * x'
[../]
[]
[Materials]
# Free energy coefficients for parabolic curve
[./kv]
type = ParsedMaterial
property_name = kv
coupled_variables = 'T'
constant_names = 'a b'
constant_expressions = '-0.025 1571.6'
expression = 'a*T + b'
[../]
# Diffusivity and mobilities
[./chiD]
type = GrandPotentialTensorMaterial
f_name = chiD
solid_mobility = L
void_mobility = Lv
chi = chi
surface_energy = 19.7
c = phi
T = T
D0 = 2.0e11
GBmob0 = 1.4759e9
Q = 2.77
Em = 2.40
bulkindex = 1
gbindex = 20
surfindex = 100
[../]
# Equilibrium vacancy concentration
[./cs_eq]
type = DerivativeParsedMaterial
property_name = cs_eq
coupled_variables = 'gr0 gr1 T'
constant_names = 'Ef Egb kB'
constant_expressions = '2.69 2.1 8.617343e-5'
expression = 'bnds:=gr0^2 + gr1^2; cb:=exp(-Ef/kB/T); cgb:=exp(-(Ef-Egb)/kB/T);
cb + 4.0*(cgb-cb)*(1.0 - bnds)^2'
[../]
# Everything else
[./sintering]
type = GrandPotentialSinteringMaterial
chemical_potential = w
void_op = phi
Temperature = T
surface_energy = 19.7
grainboundary_energy = 9.86
void_energy_coefficient = kv
equilibrium_vacancy_concentration = cs_eq
solid_energy_model = DILUTE
outputs = exodus
[../]
# Concentration is only meant for output
[./c]
type = ParsedMaterial
property_name = c
material_property_names = 'hs rhos hv rhov'
constant_names = 'Va'
constant_expressions = '0.04092'
expression = 'Va*(hs*rhos + hv*rhov)'
outputs = exodus
[../]
[]
[Kernels]
[./dt_gr0]
type = TimeDerivative
variable = gr0
[../]
[./dt_gr1]
type = TimeDerivative
variable = gr1
[../]
[./dt_phi]
type = TimeDerivative
variable = phi
[../]
[./dt_w]
type = TimeDerivative
variable = w
[../]
[]
[AuxKernels]
[./T_aux]
type = FunctionAux
variable = T
function = f_T
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = JFNK
dt = 1
num_steps = 2
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/mechanical_constraint/glued_penalty.i)
[Mesh]
file = blocks_2d_nogap.e
[]
[GlobalParams]
volumetric_locking_correction = false
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./penetration]
[../]
[./inc_slip_x]
[../]
[./inc_slip_y]
[../]
[./accum_slip_x]
[../]
[./accum_slip_y]
[../]
[]
[Functions]
[./vertical_movement]
type = ParsedFunction
expression = -t
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
strain = FINITE
[../]
[]
[AuxKernels]
[./zeroslip_x]
type = ConstantAux
variable = inc_slip_x
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./zeroslip_y]
type = ConstantAux
variable = inc_slip_y
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./accum_slip_x]
type = AccumulateAux
variable = accum_slip_x
accumulate_from_variable = inc_slip_x
execute_on = timestep_end
[../]
[./accum_slip_y]
type = AccumulateAux
variable = accum_slip_y
accumulate_from_variable = inc_slip_y
execute_on = timestep_end
[../]
[./penetration]
type = PenetrationAux
variable = penetration
boundary = 3
paired_boundary = 2
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = 4
#Initial gap is 0.01
value = -0.01
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = vertical_movement
[../]
[]
[Materials]
[./left]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e7
poissons_ratio = 0.3
[../]
[./right]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_max_its = 100
nl_max_its = 1000
dt = 0.01
end_time = 0.10
num_steps = 1000
l_tol = 1e-6
nl_rel_tol = 1e-10
nl_abs_tol = 1e-8
dtmin = 0.01
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
[]
[Outputs]
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[./console]
type = Console
max_rows = 5
[../]
[]
[Contact]
[./leftright]
primary = 2
secondary = 3
model = glued
formulation = penalty
penalty = 1e+7
[../]
[]
(test/tests/postprocessors/relative_solution_difference_norm/test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
elem_type = QUAD4
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./ffn]
type = ParsedFunction
expression = '2 - t'
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = ffn
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 0
[../]
[]
[Postprocessors]
[./rsn]
type = RelativeSolutionDifferenceNorm
execute_on = TIMESTEP_END
[../]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 2
[]
[Outputs]
exodus = 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
[]
[]
(test/tests/problems/eigen_problem/eigensolvers/ipm.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 100
ymin = 0
ymax = 100
elem_type = QUAD4
nx = 8
ny = 8
uniform_refine = 0
displacements = 'x_disp y_disp'
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./x_disp]
[../]
[./y_disp]
[../]
[]
[AuxKernels]
[./x_disp]
type = FunctionAux
variable = x_disp
function = x_disp_func
[../]
[./y_disp]
type = FunctionAux
variable = y_disp
function = y_disp_func
[../]
[]
[Functions]
[./x_disp_func]
type = ParsedFunction
expression = 0
[../]
[./y_disp_func]
type = ParsedFunction
expression = 0
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
use_displaced_mesh = true
[../]
[./rea]
type = CoefReaction
variable = u
coefficient = 2.0
use_displaced_mesh = true
[../]
[]
[BCs]
[./homogeneous]
type = DirichletBC
variable = u
boundary = '0 1 2 3'
value = 0
use_displaced_mesh = true
[../]
[]
[Executioner]
type = Eigenvalue
which_eigen_pairs = largest_magnitude
eigen_problem_type = NON_HERMITIAN
n_eigen_pairs = 5
n_basis_vectors = 15
solve_type = krylovschur
petsc_options = '-eps_view'
[]
[VectorPostprocessors]
[./eigenvalues]
type = Eigenvalues
execute_on = 'timestep_end'
[../]
[]
[Outputs]
csv = true
execute_on = 'timestep_end'
[./console]
type = Console
outlier_variable_norms = false
[../]
[]
(test/tests/indicators/laplacian_jump_indicator/biharmonic_transient.i)
[GlobalParams]
# Parameters used by Functions.
vars = 'c'
vals = '50'
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
nx = 10
ny = 10
[]
[Variables]
[./u]
order = THIRD
family = HERMITE
[../]
[]
[Kernels]
[./biharmonic]
type = Biharmonic
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
function = forcing_func
[../]
[]
[BCs]
[./all_value]
type = FunctionPenaltyDirichletBC
variable = u
boundary = 'left right top bottom'
function = u_func
penalty = 1e10
[../]
[./all_flux]
type = FunctionPenaltyFluxBC
variable = u
boundary = 'left right top bottom'
function = u_func
penalty = 1e10
[../]
[]
[Adaptivity]
[./Indicators]
[./error]
type = LaplacianJumpIndicator
variable = u
scale_by_flux_faces = true
[../]
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 0.1
# Note: the unusually tight tolerances here are due to the penalty
# BCs (currently the only way of accurately Dirichlet boundary
# conditions on Hermite elements in MOOSE).
nl_rel_tol = 1.e-15
l_tol = 1.e-15
# We have exact Jacobians
solve_type = 'NEWTON'
# Use 6x6 quadrature to ensure the forcing function is integrated
# accurately.
[./Quadrature]
type = GAUSS
order = ELEVENTH
[../]
[]
[Functions]
[./u_func]
type = ParsedGradFunction
value = 'exp(-c*(x^2+y^2))*exp(-t)'
grad_x = '-2*c*exp(-c*(x^2+y^2))*x*exp(-t)'
grad_y = '-2*c*exp(-c*(x^2+y^2))*y*exp(-t)'
[../]
[./forcing_func]
type = ParsedFunction
expression = '16*c^2*(c^2*(x^2+y^2)^2 - 4*c*(x^2+y^2) + 2)*exp(-c*(x^2+y^2))*exp(-t)'
[../]
[]
[ICs]
[./u_ic]
type = FunctionIC
function = u_func
variable = u
[../]
[]
[Postprocessors]
[./l2_error]
type = ElementL2Error
variable = u
function = u_func
[../]
[./h1_error]
type = ElementH1Error
variable = u
function = u_func
[../]
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/central_difference/consistent/3D/3d_consistent_explicit.i)
# One element test to test the central difference time integrator in 3D.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 2
xmin = 0.0
xmax = 1
ymin = 0.0
ymax = 1
zmin = 0.0
zmax = 2
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxVariables]
[./vel_x]
[../]
[./accel_x]
[../]
[./vel_y]
[../]
[./accel_y]
[../]
[./vel_z]
[../]
[./accel_z]
[../]
[]
[AuxKernels]
[./accel_x]
type = TestNewmarkTI
variable = accel_x
displacement = disp_x
first = false
[../]
[./vel_x]
type = TestNewmarkTI
variable = vel_x
displacement = disp_x
[../]
[./accel_y]
type = TestNewmarkTI
variable = accel_y
displacement = disp_y
first = false
[../]
[./vel_y]
type = TestNewmarkTI
variable = vel_y
displacement = disp_x
[../]
[./accel_z]
type = TestNewmarkTI
variable = accel_z
displacement = disp_z
first = false
[../]
[./vel_z]
type = TestNewmarkTI
variable = vel_z
displacement = disp_z
[../]
[]
[Kernels]
[./DynamicSolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[./inertia_x]
type = InertialForce
variable = disp_x
[../]
[./inertia_y]
type = InertialForce
variable = disp_y
[../]
[./inertia_z]
type = InertialForce
variable = disp_z
[../]
[]
[BCs]
[./x_bot]
type = FunctionDirichletBC
variable = disp_x
boundary = 'back'
function = dispx
preset = false
[../]
[./y_bot]
type = FunctionDirichletBC
variable = disp_y
boundary = 'back'
function = dispy
preset = false
[../]
[./z_bot]
type = FunctionDirichletBC
variable = disp_z
boundary = 'back'
function = dispz
preset = false
[../]
[./Periodic]
[./x_dir]
variable = 'disp_x disp_y disp_z'
primary = 'left'
secondary = 'right'
translation = '1.0 0.0 0.0'
[../]
[./y_dir]
variable = 'disp_x disp_y disp_z'
primary = 'bottom'
secondary = 'top'
translation = '0.0 1.0 0.0'
[../]
[../]
[]
[Functions]
[./dispx]
type = PiecewiseLinear
x = '0.0 1.0 2.0 3.0 4.0' # time
y = '0.0 1.0 0.0 -1.0 0.0' # displacement
[../]
[./dispy]
type = ParsedFunction
expression = 0.1*t*t*sin(10*t)
[../]
[./dispz]
type = ParsedFunction
expression = 0.1*t*t*sin(20*t)
[../]
[]
[Materials]
[./elasticity_tensor_block]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.25
block = 0
[../]
[./strain_block]
type = ComputeIncrementalSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
implicit = false
[../]
[./stress_block]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = density
prop_values = 1e4
[../]
[]
[Executioner]
type = Transient
start_time = -0.01
end_time = 0.1
dt = 0.005
timestep_tolerance = 1e-6
[./TimeIntegrator]
type = CentralDifference
[../]
[]
[Postprocessors]
[./accel_6x]
type = NodalVariableValue
nodeid = 6
variable = accel_x
[../]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/solid_mechanics/test/tests/recompute_radial_return/isotropic_plasticity_errors.i)
# This simulation uses the piece-wise linear strain hardening model
# with the incremental small strain formulation; incremental small strain
# is required to produce the strain_increment for the DiscreteRadialReturnStressIncrement
# class, which handles the calculation of the stress increment to return
# to the yield surface in a J2 (isotropic) plasticity problem.
#
# This test is used to check the error messages in the discrete radial return
# model DiscreteRRIsotropicPlasticity; cli_args are used to check all of the
# error messages in the DiscreteRRIsotropicPlasticity model.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Functions]
[./top_pull]
type = ParsedFunction
expression = t*(0.0625)
[../]
[./harden_func]
type = PiecewiseLinear
x = '0 0.0003 0.0007 0.0009'
y = '50 52 54 56'
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = SMALL
incremental = true
add_variables = true
generate_output = 'stress_yy plastic_strain_xx plastic_strain_yy plastic_strain_zz'
[../]
[]
[BCs]
[./y_pull_function]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = top_pull
[../]
[./x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./z_bot]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
[../]
[./isotropic_plasticity]
type = IsotropicPlasticityStressUpdate
relative_tolerance = 1e-25
absolute_tolerance = 1e-5
[../]
[./radial_return_stress]
type = ComputeMultipleInelasticStress
tangent_operator = elastic
inelastic_models = 'isotropic_plasticity'
[../]
[]
[Executioner]
type = Transient
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-18
nl_abs_tol = 1e-10
l_tol = 1e-12
start_time = 0.0
end_time = 0.025
dt = 0.00125
dtmin = 0.0001
[]
[Outputs]
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[]
(test/tests/executioners/executioner/steady.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 5
ny = 5
elem_type = QUAD9
[]
[Variables]
active = 'u'
[./u]
order = SECOND
family = LAGRANGE
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = -4
[../]
[./exact_fn]
type = ParsedFunction
expression = ((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ffn'
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_steady
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_action.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
elem_type = QUAD9
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = transient
velocity_boundary = 'bottom right top left'
velocity_function = '0 0 0 0 lid_function 0 0 0'
pressure_pinned_node = 0
density_name = rho
dynamic_viscosity_name = mu
use_ad = true
laplace = true
family = LAGRANGE
order = SECOND
temperature_variable = 'T'
add_temperature_equation = true
initial_temperature = 1
fixed_temperature_boundary = 'bottom top'
temperature_function = '1 0'
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[]
[]
[Functions]
[lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'asm 2 ilu 4'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
file_base = lid_driven_out
[exodus]
type = Exodus
hide = 'velocity'
[]
perf_graph = true
[]
(modules/stochastic_tools/test/tests/userobjects/inverse_mapping/sub.i)
S = 10
D = 10
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmax = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[v_aux]
[]
[]
[Kernels]
[diffusion_v]
type = MatDiffusion
variable = v
diffusivity = D_v
[]
[source_v]
type = BodyForce
variable = v
value = 1.0
[]
[]
[AuxKernels]
[func_aux]
type = FunctionAux
variable = v_aux
function = v_aux_func
[]
[]
[Functions]
[v_aux_func]
type = ParsedFunction
expression = 'S * x + D'
symbol_names = 'S D'
symbol_values = '${S} ${D}'
[]
[]
[Materials]
[diffusivity_v]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 4.0
[]
[]
[BCs]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Reporters]
[solution_storage]
type = SolutionContainer
execute_on = 'FINAL'
[]
[solution_storage_aux]
type = SolutionContainer
execute_on = 'FINAL'
system = aux
[]
[]
(modules/xfem/test/tests/moving_interface/verification/2D_rz_lsdep1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: 2D
# Coordinate System: rz
# Material Numbers/Types: level set dep 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# Transient 2D heat transfer problem in cylindrical coordinates designed with
# the Method of Manufactured Solutions. This problem was developed to verify
# XFEM performance on linear elements in the presence of a moving interface
# sweeping across the x-y coordinates of a system with thermal conductivity
# dependent upon the transient level set function. This problem can be
# exactly evaluated by FEM/Moose without the moving interface. Both the
# temperature and level set function are designed to be linear to attempt to
# minimize the error between the Moose/exact solution and XFEM results.
# Results:
# The temperature at the bottom left boundary (x=1, y=1) exhibits the largest
# difference between the FEM/Moose solution and XFEM results. We present the
# XFEM results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 479.9998717
# 0.6 520 519.9994963
# 0.8 560 559.9989217
# 1.0 600 599.9986735
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 1.0
xmax = 2.0
ymin = 1.0
ymax = 2.0
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-100*x-100*y+400) + t*(-2.5*y/(2.04*x) + 155/x - t/(2.04*x)
- 7.5/2.04)'
[../]
[./neumann_func]
type = ParsedFunction
expression = '((0.01/2.04)*(-2.5*x-2.5*y-t)+1.55)*100*t'
[../]
[./dirichlet_right_func]
type = ParsedFunction
expression = '(-100*y+200)*t+400'
[../]
[./dirichlet_top_func]
type = ParsedFunction
expression = '(-100*x+200)*t+400'
[../]
[./k_func]
type = ParsedFunction
expression = '(0.01/2.04)*(-2.5*x-2.5*y-t) + 1.55'
[../]
[./ls_func]
type = ParsedFunction
expression = '-0.5*(x+y) + 2.04 -0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericFunctionMaterial
prop_names = 'diffusion_coefficient'
prop_values = 'k_func'
[../]
[]
[BCs]
[./left_du]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = FunctionDirichletBC
variable = u
boundary = 'right'
function = dirichlet_right_func
[../]
[./bottom_du]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = neumann_func
[../]
[./top_u]
type = FunctionDirichletBC
variable = u
boundary = 'top'
function = dirichlet_top_func
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/varying-eps-basic-kt-mixed.i)
[GlobalParams]
fp = fp
limiter = 'central_difference'
two_term_boundary_expansion = true
[]
[Mesh]
[cartesian]
type = GeneratedMeshGenerator
dim = 1
xmin = .1
xmax = .6
nx = 2
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Problem]
fv_bcs_integrity_check = false
[]
[Variables]
[pressure]
type = MooseVariableFVReal
[]
[sup_mom_x]
type = MooseVariableFVReal
[]
[T_fluid]
type = MooseVariableFVReal
[]
[]
[ICs]
[pressure]
type = FunctionIC
variable = pressure
function = 'exact_p'
[]
[sup_mom_x]
type = FunctionIC
variable = sup_mom_x
function = 'exact_rho_ud'
[]
[T_fluid]
type = FunctionIC
variable = T_fluid
function = 'exact_T'
[]
[]
[FVKernels]
[mass_advection]
type = PCNSFVKT
variable = pressure
eqn = "mass"
[]
[mass_fn]
type = FVBodyForce
variable = pressure
function = 'forcing_rho'
[]
[momentum_x_advection]
type = PCNSFVKT
variable = sup_mom_x
momentum_component = x
eqn = "momentum"
[]
[eps_grad]
type = PNSFVPGradEpsilon
variable = sup_mom_x
momentum_component = 'x'
epsilon_function = 'eps'
[]
[momentum_fn]
type = FVBodyForce
variable = sup_mom_x
function = 'forcing_rho_ud'
[]
[fluid_energy_advection]
type = PCNSFVKT
variable = T_fluid
eqn = "energy"
[]
[energy_fn]
type = FVBodyForce
variable = T_fluid
function = 'forcing_rho_et'
[]
[]
[FVBCs]
[mass_left]
variable = pressure
type = PCNSFVStrongBC
boundary = left
T_fluid = 'exact_T'
superficial_velocity = 'exact_superficial_velocity'
eqn = 'mass'
[]
[momentum_left]
variable = sup_mom_x
type = PCNSFVStrongBC
boundary = left
T_fluid = 'exact_T'
superficial_velocity = 'exact_superficial_velocity'
eqn = 'momentum'
momentum_component = 'x'
[]
[energy_left]
variable = T_fluid
type = PCNSFVStrongBC
boundary = left
T_fluid = 'exact_T'
superficial_velocity = 'exact_superficial_velocity'
eqn = 'energy'
[]
[mass_right]
variable = pressure
type = PCNSFVStrongBC
boundary = right
eqn = 'mass'
pressure = 'exact_p'
[]
[momentum_right]
variable = sup_mom_x
type = PCNSFVStrongBC
boundary = right
eqn = 'momentum'
momentum_component = 'x'
pressure = 'exact_p'
[]
[energy_right]
variable = T_fluid
type = PCNSFVStrongBC
boundary = right
eqn = 'energy'
pressure = 'exact_p'
[]
# help gradient reconstruction
[pressure_right]
type = FVFunctionDirichletBC
variable = pressure
function = exact_p
boundary = 'right'
[]
[sup_mom_x_left]
type = FVFunctionDirichletBC
variable = sup_mom_x
function = exact_rho_ud
boundary = 'left'
[]
[T_fluid_left]
type = FVFunctionDirichletBC
variable = T_fluid
function = exact_T
boundary = 'left'
[]
[]
[Materials]
[var_mat]
type = PorousMixedVarMaterial
pressure = pressure
superficial_rhou = sup_mom_x
T_fluid = T_fluid
porosity = porosity
[]
[porosity]
type = GenericFunctionMaterial
prop_names = 'porosity'
prop_values = 'eps'
[]
[]
[Functions]
[exact_rho]
type = ParsedFunction
expression = '3.48788261470924*cos(x)'
[]
[forcing_rho]
type = ParsedFunction
expression = '-3.83667087618017*sin(1.1*x)*cos(1.3*x) - 4.53424739912202*sin(1.3*x)*cos(1.1*x)'
[]
[exact_rho_ud]
type = ParsedFunction
expression = '3.48788261470924*cos(1.1*x)*cos(1.3*x)'
[]
[forcing_rho_ud]
type = ParsedFunction
expression = '(-(10.6975765229419*cos(1.5*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + (10.6975765229419*sin(x)*cos(1.5*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 16.0463647844128*sin(1.5*x)/cos(x))*cos(x))*cos(1.3*x) + 3.48788261470924*sin(x)*cos(1.1*x)^2*cos(1.3*x)/cos(x)^2 - 7.67334175236034*sin(1.1*x)*cos(1.1*x)*cos(1.3*x)/cos(x) - 4.53424739912202*sin(1.3*x)*cos(1.1*x)^2/cos(x)'
[]
[exact_rho_et]
type = ParsedFunction
expression = '26.7439413073546*cos(1.5*x)'
[]
[forcing_rho_et]
type = ParsedFunction
expression = '1.0*(3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.5*x))*sin(x)*cos(1.1*x)*cos(1.3*x)/cos(x)^2 - 1.1*(3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.5*x))*sin(1.1*x)*cos(1.3*x)/cos(x) - 1.3*(3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.5*x))*sin(1.3*x)*cos(1.1*x)/cos(x) + 1.0*(-(10.6975765229419*cos(1.5*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + (10.6975765229419*sin(x)*cos(1.5*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 16.0463647844128*sin(1.5*x)/cos(x))*cos(x) - 40.1159119610319*sin(1.5*x))*cos(1.1*x)*cos(1.3*x)/cos(x)'
[]
[exact_T]
type = ParsedFunction
expression = '0.0106975765229418*cos(1.5*x)/cos(x) - 0.000697576522941848*cos(1.1*x)^2/cos(x)^2'
[]
[exact_eps_p]
type = ParsedFunction
expression = '3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x)*cos(1.3*x)'
[]
[exact_p]
type = ParsedFunction
expression = '3.48788261470924*(3.06706896551724*cos(1.5*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x)'
[]
[exact_sup_vel_x]
type = ParsedFunction
expression = '1.0*cos(1.1*x)*cos(1.3*x)/cos(x)'
[]
[eps]
type = ParsedFunction
expression = 'cos(1.3*x)'
[]
[exact_superficial_velocity]
type = ParsedVectorFunction
expression_x = '1.0*cos(1.1*x)*cos(1.3*x)/cos(x)'
[]
[]
[Executioner]
solve_type = NEWTON
type = Transient
num_steps = 1
dtmin = 1
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_max_its = 50
line_search = bt
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
[]
[Outputs]
exodus = true
csv = true
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2pressure]
type = ElementL2Error
variable = pressure
function = exact_p
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2sup_mom_x]
variable = sup_mom_x
function = exact_rho_ud
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2T_fluid]
variable = T_fluid
function = exact_T
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(test/tests/time_steppers/dt2/dt2.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 20
ny = 20
elem_type = QUAD4
[]
[GlobalParams]
slope = 1
t_jump = 2
[]
[Functions]
active = 'u_func'
[./u_func]
type = ParsedFunction
expression = 'atan((t-2)*pi)' # atan((t-t_jump)*pi*slope) - has to match global params above
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = TEIC
[../]
[../]
[]
[Kernels]
active = 'td diff ffn'
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = TEJumpFFN
variable = u
[../]
[]
[BCs]
active = 'all'
[./all]
type = TEJumpBC
variable = u
boundary = '0 1 2 3'
[../]
[]
[Postprocessors]
active = 'dt l2'
[./dt]
type = TimestepSize
[../]
[./l2]
type = ElementL2Error
variable = u
function = u_func
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
nl_rel_tol = 1e-7
# l_tol = 1e-5
start_time = 0.0
end_time = 5
num_steps = 500000
dtmax = 0.25
[./TimeStepper]
type = DT2
dt = 0.1
e_max = 3e-1
e_tol = 1e-1
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/misc/check_error/missing_required_coupled.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = 0
ymax = 1
nx = 20
ny = 10
elem_type = QUAD9
[]
[Functions]
[./bc_fn_v]
type = ParsedFunction
expression = (x*x+y*y)
[../]
[]
[Variables]
[./v]
family = LAGRANGE
order = SECOND
[../]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]
[Kernels]
# V equation
[./td_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = CoefDiffusion
variable = v
coef = 0.5
[../]
[./conv_v]
type = CoupledConvection
variable = v
# Coupled parameter is missing for CoupledConvection
[../]
[]
[BCs]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = 'top'
function = bc_fn_v
[../]
[]
[Executioner]
type = Transient
start_time = 0
dt = 0.05
num_steps = 10
[]
[Outputs]
execute_on = 'timestep_end'
[]
(test/tests/mortar/continuity-3d-non-conforming/continuity_penalty_tet.i)
[Mesh]
second_order = false
[left_block]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 2
nz = 2
xmin = 0
xmax = 0.3
ymin = 0
ymax = .5
zmin = 0
zmax = .5
elem_type = TET4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'lb_bottom lb_back lb_right lb_front lb_left lb_top'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 2
nz = 2
xmin = 0.3
xmax = 0.6
ymin = 0
ymax = .5
zmin = 0
zmax = .5
elem_type = TET4
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block
subdomain_id = 2
[]
[right_block_change_boundary_id]
type = RenameBoundaryGenerator
input = right_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'left_block right_block'
[]
[right_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = rb_right
block = right_block
normal = '1 0 0'
[]
[right_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_right_sideset
new_boundary = rb_left
block = right_block
normal = '-1 0 0'
[]
[right_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_left_sideset
new_boundary = rb_top
block = right_block
normal = '0 0 1'
[]
[right_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_top_sideset
new_boundary = rb_bottom
block = right_block
normal = '0 0 -1'
[]
[right_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_bottom_sideset
new_boundary = rb_front
block = right_block
normal = '0 1 0'
[]
[right_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_front_sideset
new_boundary = rb_back
block = right_block
normal = '0 -1 0'
[]
[secondary]
input = right_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'lb_right'
new_block_id = '12'
new_block_name = 'secondary'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'rb_left'
new_block_id = '11'
new_block_name = 'primary'
[]
[]
[Variables]
[T]
block = '1 2'
order = FIRST
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln_primal
variable = T
boundary = 'lb_back lb_front lb_left lb_top lb_bottom rb_right rb_top rb_bottom rb_front rb_back'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi) + 3*pi^2*sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_primal]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_lambda]
type = ParsedFunction
expression = 'pi*sin(pi*y)*sin(pi*z)*cos(pi*x)'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = PenaltyEqualValueConstraint
primary_boundary = 'rb_left'
secondary_boundary = 'lb_right'
primary_subdomain = '11'
secondary_subdomain = '12'
secondary_variable = T
penalty_value = 1.0e5
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = 'left_block right_block'
[]
[h]
type = AverageElementSize
block = 'left_block right_block'
[]
[]
(test/tests/transfers/multiapp_userobject_transfer/3d_1d_sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
elem_type = EDGE2
displacements = 'disp_x disp_y disp_z'
[]
[Functions]
[./disp_x_fn]
type = ParsedFunction
expression = '-x'
[../]
[./disp_z_fn]
type = ParsedFunction
expression = 'x'
[../]
[]
[AuxVariables]
[./sub_app_var]
family = MONOMIAL
order = CONSTANT
[../]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxKernels]
[./disp_x_ak]
type = FunctionAux
variable = disp_x
function = 'disp_x_fn'
[../]
[./disp_y_ak]
type = ConstantAux
variable = disp_y
value = 0
[../]
[./disp_z_ak]
type = FunctionAux
variable = disp_z
function = 'disp_z_fn'
[../]
[]
[UserObjects]
[./sub_app_uo]
type = LayeredAverage
direction = z
variable = u
num_layers = 10
execute_on = TIMESTEP_END
use_displaced_mesh = true
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 2
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(test/tests/outputs/variables/nemesis_hide.i)
# Solving for 2 variables, putting one into hide list and the other one into show list
# We should only see the variable that is in show list in the output.
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[]
# This should be the same as passing --distributed-mesh on the
# command line. You can verify this by looking at what MOOSE prints
# out for the "Mesh" information.
parallel_type = distributed
[./Partitioner]
type = LibmeshPartitioner
partitioner = linear
[../]
[]
[Functions]
[./fn_x]
type = ParsedFunction
expression = x
[../]
[./fn_y]
type = ParsedFunction
expression = y
[../]
[]
[Variables]
[./u]
[../]
[./v]
[../]
[]
[AuxVariables]
[./aux_u]
[../]
[./aux_v]
[../]
[./proc_id]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[AuxKernels]
[./auxk_u]
type = FunctionAux
variable = aux_u
function = 'x*x+y*y'
[../]
[./auxk_v]
type = FunctionAux
variable = aux_v
function = '-(x*x+y*y)'
[../]
[./auxk_proc_id]
variable = proc_id
type = ProcessorIDAux
[../]
[]
[BCs]
[./u_bc]
type = FunctionDirichletBC
variable = u
boundary = '1 3'
function = fn_x
[../]
[./v_bc]
type = FunctionDirichletBC
variable = v
boundary = '0 2'
function = fn_y
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
console = true
[./out]
type = Nemesis
hide = 'u aux_v'
[../]
[]
(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
[../]
[]
(test/tests/postprocessors/mms_slope/mms_slope_test.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[]
# do not use uniform refine, we are using adaptive refining
# uniform_refine = 6
[]
[Variables]
active = 'u'
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Functions]
active = 'forcing_func u_func'
[forcing_func]
type = ParsedFunction
expression = alpha*alpha*pi*pi*sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '4'
[]
[u_func]
type = ParsedGradFunction
expression = sin(alpha*pi*x)
grad_x = alpha*pi*sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '4'
[]
[]
[Kernels]
active = 'diff forcing'
[diff]
type = Diffusion
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = forcing_func
[]
[]
[BCs]
active = 'left right'
[left]
type = DirichletBC
variable = u
boundary = '3'
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = '1'
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-14
[Adaptivity]
# if the refine fraction is 1 it will refine every element
# remember < 1 means only refine that percentage of elements
refine_fraction = 1
steps = 6
# do not coarsen at all
coarsen_fraction = 0
# maximum level of refinement steps, make sure this is > max_r_steps
max_h_level = 10
# leave this as is
error_estimator = KellyErrorEstimator
[]
[]
# print l2 and h1 errors from the Postprocessors too so I can compare
[Postprocessors]
active = 'l2_error h1_error dofs'
# active = ' '
[l2_error]
type = ElementL2Error
variable = u
function = u_func
[]
[h1_error]
type = ElementH1Error
variable = u
function = u_func
[]
[dofs]
type = NumDOFs
[]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out
exodus = true
[]
(test/tests/auxkernels/element_var/element_var_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
# This test uses ElementalVariableValue postprocessors on specific
# elements, so element numbering needs to stay unchanged
allow_renumbering = false
[]
[Functions]
[./ffn]
type = ParsedFunction
expression = -4
[../]
[./exactfn]
type = ParsedFunction
expression = x*x+y*y
[../]
[./aux_exact_fn]
type = ParsedFunction
expression = t*(x*x+y*y)
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
#Coupling of nonlinear to Aux
[./force]
type = BodyForce
variable = u
function = ffn
[../]
[]
[AuxVariables]
[./aux_u]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./a]
type = FunctionAux
variable = aux_u
function = aux_exact_fn
[../]
[]
[BCs]
[./left]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exactfn
[../]
[]
[Postprocessors]
[./elem_56]
type = ElementalVariableValue
variable = u
elementid = 56
[../]
[./aux_elem_99]
type = ElementalVariableValue
variable = aux_u
elementid = 99
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.01
start_time = 0
num_steps = 10
[]
[Outputs]
exodus = true
file_base = out
[]
(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/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/material_limit_time_step/damage/elements_changed_timestep_limit.i)
# This is a basic test of the system for continuum damage mechanics
# materials. It uses ScalarMaterialDamage for the damage model,
# which simply gets its damage index from another material. In this
# case, we prescribe the evolution of the damage index using a
# function. A single element has a fixed prescribed displacement
# on one side that puts the element in tension, and then the
# damage index evolves from 0 to 1 over time, and this verifies
# that the stress correspondingly drops to 0.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 1
nz = 1
elem_type = HEX8
[]
[AuxVariables]
[damage_index]
order = CONSTANT
family = MONOMIAL
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = SMALL
incremental = true
add_variables = true
generate_output = 'stress_xx strain_xx'
[]
[]
[AuxKernels]
[damage_index]
type = MaterialRealAux
variable = damage_index
property = damage_index_prop
execute_on = timestep_end
[]
[]
[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
[]
[axial_load]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.01
[]
[]
[Functions]
[damage_evolution]
type = ParsedFunction
expression = 'min(1.0, max(0.0, t - x * 3.0))'
[]
[]
[Materials]
[damage_index]
type = GenericFunctionMaterial
prop_names = damage_index_prop
prop_values = damage_evolution
[]
[damage]
type = ScalarMaterialDamage
damage_index = damage_index_prop
use_old_damage = true
maximum_damage_increment = 0.5
[]
[stress]
type = ComputeDamageStress
damage_model = damage
[]
[elasticity]
type = ComputeIsotropicElasticityTensor
poissons_ratio = 0.2
youngs_modulus = 10e9
[]
[]
[Postprocessors]
[stress_xx]
type = ElementAverageValue
variable = stress_xx
[]
[strain_xx]
type = ElementAverageValue
variable = strain_xx
[]
[damage_index]
type = ElementAverageValue
variable = damage_index
[]
[time_step_limit]
type = MaterialTimeStepPostprocessor
use_material_timestep_limit = false
elements_changed_property = damage_index_prop
elements_changed = 4
[]
[]
[Executioner]
type = Transient
l_max_its = 50
l_tol = 1e-8
nl_max_its = 20
nl_rel_tol = 1e-12
nl_abs_tol = 1e-6
dtmin = 0.001
end_time = 4.0
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.2
growth_factor = 2.0
cutback_factor = 0.5
timestep_limiting_postprocessor = time_step_limit
[]
[]
[Outputs]
exodus = true
csv=true
[]
(modules/navier_stokes/test/tests/finite_element/ins/velocity_channel/velocity_inletBC_no_parts.i)
# This input file tests outflow boundary conditions for the incompressible NS equations.
[GlobalParams]
gravity = '0 0 0'
integrate_p_by_parts = false
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 3.0
ymin = 0
ymax = 1.0
nx = 30
ny = 10
elem_type = QUAD9
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = top_right
coord = '3 1'
input = gen
[../]
[]
[Variables]
[./vel_x]
order = SECOND
family = LAGRANGE
[../]
[./vel_y]
order = SECOND
family = LAGRANGE
[../]
[./p]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./mass]
type = INSMass
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[BCs]
[./x_no_slip]
type = DirichletBC
variable = vel_x
boundary = 'top bottom'
value = 0.0
[../]
[./y_no_slip]
type = DirichletBC
variable = vel_y
boundary = 'left top bottom'
value = 0.0
[../]
[./x_inlet]
type = FunctionDirichletBC
variable = vel_x
boundary = 'left'
function = 'inlet_func'
[../]
[./p_corner]
# Since the pressure is not integrated by parts in this example,
# it is only specified up to a constant by the natural outflow BC.
# Therefore, we need to pin its value at a single location.
type = DirichletBC
boundary = top_right
value = 0
variable = p
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = NEWTON
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-ksp_gmres_restart -pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = '300 bjacobi ilu 4'
line_search = none
nl_rel_tol = 1e-12
nl_max_its = 6
l_tol = 1e-6
l_max_its = 300
[]
[Outputs]
[./out]
type = Exodus
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * (y - 0.5)^2 + 1'
[../]
[]
(modules/combined/test/tests/generalized_plane_strain_tm_contact/generalized_plane_strain_tm_contact.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
scalar_out_of_plane_strain = scalar_strain_zz
temperature = temp
[]
[Mesh]
file = 2squares.e
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./temp]
[../]
[./scalar_strain_zz]
order = FIRST
family = SCALAR
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Postprocessors]
[./react_z]
type = MaterialTensorIntegral
rank_two_tensor = stress
index_i = 2
index_j = 2
[../]
[]
[Kernels]
[./TensorMechanics]
use_displaced_mesh = true
[../]
[./heat]
type = HeatConduction
variable = temp
[../]
[]
[Modules]
[./TensorMechanics]
[./GeneralizedPlaneStrain]
[./gps]
use_displaced_mesh = true
[../]
[../]
[../]
[]
[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_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xx
index_i = 0
index_j = 0
[../]
[./strain_xy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xy
index_i = 0
index_j = 1
[../]
[./strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 1
index_j = 1
[../]
[./strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_zz
index_i = 2
index_j = 2
[../]
[]
[Functions]
[./tempramp]
type = ParsedFunction
expression = 't'
[../]
[]
[BCs]
[./x]
type = DirichletBC
boundary = '4 6'
variable = disp_x
value = 0.0
[../]
[./y]
type = DirichletBC
boundary = '4 6'
variable = disp_y
value = 0.0
[../]
[./t]
type = DirichletBC
boundary = '4'
variable = temp
value = 0.0
[../]
[./tramp]
type = FunctionDirichletBC
variable = temp
boundary = '6'
function = tempramp
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
off_diag_row = 'disp_x disp_y'
off_diag_column = 'disp_y disp_x'
[../]
[]
[Contact]
[./mech]
primary = 8
secondary = 2
penalty = 1e+10
normalize_penalty = true
tangential_tolerance = .1
normal_smoothing_distance = .1
model = frictionless
formulation = kinematic
[../]
[]
[ThermalContact]
[./thermal]
type = GapHeatTransfer
primary = 8
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
variable = temp
tangential_tolerance = .1
normal_smoothing_distance = .1
gap_conductivity = 0.01
min_gap = 0.001
quadrature = true
[../]
[]
[Materials]
[./elastic_tensor]
type = ComputeIsotropicElasticityTensor
poissons_ratio = 0.3
youngs_modulus = 1e6
block = '1 2'
[../]
[./strain]
type = ComputePlaneSmallStrain
eigenstrain_names = eigenstrain
block = '1 2'
[../]
[./thermal_strain]
type = ComputeThermalExpansionEigenstrain
temperature = temp
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.0
eigenstrain_name = eigenstrain
block = '1 2'
[../]
[./stress]
type = ComputeLinearElasticStress
block = '1 2'
[../]
[./heatcond]
type = HeatConductionMaterial
thermal_conductivity = 3.0
specific_heat = 300.0
block = '1 2'
[../]
[./density]
type = GenericConstantMaterial
prop_names = 'density'
prop_values = '1'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
petsc_options_iname = '-pc_type -ps_sub_type -pc_factor_mat_solver_package'
petsc_options_value = 'asm lu superlu_dist'
# controls for linear iterations
l_max_its = 100
l_tol = 1e-4
# controls for nonlinear iterations
nl_max_its = 20
nl_rel_tol = 1e-9
nl_abs_tol = 1e-10
# time control
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 2.0
[]
[Outputs]
exodus = true
[]
(test/tests/bcs/ad_function_dirichlet_bc/test.i)
###########################################################
# This is a test of Boundary Condition System. The
# FunctionDirichletBC is used to contribute the residuals
# to the boundary term operators in the weak form.
#
# @Requirement F3.40
###########################################################
[Mesh]
[./square]
type = GeneratedMeshGenerator
dim = 2
nx = 32
ny = 32
[../]
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./ff_1]
type = ParsedFunction
expression = alpha*alpha*pi
symbol_names = 'alpha'
symbol_values = '16'
[../]
[./ff_2]
type = ParsedFunction
expression = pi*sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '16'
[../]
[./forcing_func]
type = CompositeFunction
functions = 'ff_1 ff_2'
[../]
[./bc_func]
type = ParsedFunction
expression = sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '16'
[../]
[]
[Kernels]
[./diff]
type = ADDiffusion
variable = u
[../]
[./forcing]
type = ADBodyForce
variable = u
function = forcing_func
[../]
[]
[BCs]
[./all]
type = ADFunctionDirichletBC
variable = u
boundary = 'left right'
function = bc_func
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/solid_mechanics/test/tests/plane_stress/ad_weak_plane_stress_small.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
temperature = temp
out_of_plane_strain = strain_zz
[]
[Mesh]
[./square]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./strain_zz]
[../]
[]
[AuxVariables]
[./temp]
[../]
[./nl_strain_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Postprocessors]
[./react_z]
type = ADMaterialTensorIntegral
rank_two_tensor = stress
index_i = 2
index_j = 2
[../]
[./min_strain_zz]
type = NodalExtremeValue
variable = strain_zz
value_type = min
[../]
[./max_strain_zz]
type = NodalExtremeValue
variable = strain_zz
value_type = max
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./plane_stress]
planar_formulation = WEAK_PLANE_STRESS
strain = SMALL
generate_output = 'stress_xx stress_xy stress_yy stress_zz strain_xx strain_xy strain_yy'
eigenstrain_names = eigenstrain
use_automatic_differentiation = true
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
use_displaced_mesh = false
[../]
[./strain_zz]
type = ADRankTwoAux
rank_two_tensor = total_strain
variable = nl_strain_zz
index_i = 2
index_j = 2
[../]
[]
[Functions]
[./pull]
type = PiecewiseLinear
x='0 1 100'
y='0 0.00 0.00'
[../]
[./tempfunc]
type = ParsedFunction
expression = '(1 - x) * t'
[../]
[]
[BCs]
[./bottomx]
type = DirichletBC
boundary = 0
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = DirichletBC
boundary = 0
variable = disp_y
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
poissons_ratio = 0.3
youngs_modulus = 1e6
[../]
[./thermal_strain]
type = ADComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
eigenstrain_name = eigenstrain
[../]
[./stress]
type = ADComputeLinearElasticStress
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-12
# time control
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 2.0
[]
[Outputs]
file_base = 'weak_plane_stress_small_out'
exodus = true
[]
(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
[]
(modules/xfem/test/tests/solid_mechanics_basic/edge_crack_3d_fatigue.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[XFEM]
geometric_cut_userobjects = 'cut_mesh'
qrule = volfrac
output_cut_plane = true
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 5
ny = 5
nz = 2
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
zmin = 0.0
zmax = 0.2
elem_type = HEX8
[]
[UserObjects]
[./cut_mesh]
type = CrackMeshCut3DUserObject
mesh_file = mesh_edge_crack.xda
growth_dir_method = FUNCTION
size_control = 1
n_step_growth = 1
growth_rate_method = FATIGUE
growth_direction_x = growth_func_x
growth_direction_y = growth_func_y
growth_direction_z = growth_func_z
growth_rate = growth_func_v
crack_front_nodes = '7 6 5 4'
[../]
[]
[Functions]
[./growth_func_x]
type = ParsedFunction
expression = 1
[../]
[./growth_func_y]
type = ParsedFunction
expression = 0
[../]
[./growth_func_z]
type = ParsedFunction
expression = 0
[../]
[./growth_func_v]
type = ParsedFunction
symbol_names = 'dN'
symbol_values = 'fatigue'
expression = dN
[../]
[]
[Postprocessors]
[./fatigue]
type = ParisLaw
max_growth_size = 0.1
paris_law_c = 1e-13
paris_law_m = 2.5
[../]
[]
[DomainIntegral]
integrals = 'Jintegral InteractionIntegralKI InteractionIntegralKII'
displacements = 'disp_x disp_y disp_z'
crack_front_points_provider = cut_mesh
number_points_from_provider = 4
crack_direction_method = CurvedCrackFront
radius_inner = '0.15'
radius_outer = '0.45'
poissons_ratio = 0.3
youngs_modulus = 207000
block = 0
incremental = true
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress'
[../]
[]
[Functions]
[./top_trac_y]
type = ConstantFunction
value = 10
[../]
[]
[BCs]
[./top_y]
type = FunctionNeumannBC
boundary = top
variable = disp_y
function = top_trac_y
[../]
[./bottom_x]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[../]
[./bottom_y]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[./bottom_z]
type = DirichletBC
boundary = bottom
variable = disp_z
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
block = 0
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
line_search = 'none'
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
# controls for linear iterations
l_max_its = 100
l_tol = 1e-2
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
# time control
start_time = 0.0
dt = 1.0
end_time = 4.0
max_xfem_update = 1
[]
[Outputs]
file_base = edge_crack_3d_fatigue_out
execute_on = 'timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/solid_mechanics/test/tests/2D_different_planes/gps_xz.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
file = square_xz_plane.e
[]
[Variables]
[./disp_x]
[../]
[./disp_z]
[../]
[./scalar_strain_yy]
order = FIRST
family = SCALAR
[../]
[]
[AuxVariables]
[./temp]
[../]
[./disp_y]
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./generalized_plane_strain]
block = 1
strain = SMALL
scalar_out_of_plane_strain = scalar_strain_yy
out_of_plane_direction = y
planar_formulation = GENERALIZED_PLANE_STRAIN
eigenstrain_names = 'eigenstrain'
generate_output = 'stress_xx stress_xz stress_yy stress_zz strain_xx strain_xz strain_yy strain_zz'
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = tempfunc
[../]
[]
[Functions]
[./tempfunc]
type = ParsedFunction
expression = '(1-x)*t'
[../]
[]
[BCs]
[./bottomx]
type = DirichletBC
boundary = 3
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = DirichletBC
boundary = 3
variable = disp_z
value = 0.0
[../]
[]
[Materials]
[./elastic_stress]
type = ComputeLinearElasticStress
block = 1
[../]
[./thermal_strain]
type = ComputeThermalExpansionEigenstrain
temperature = temp
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.5
eigenstrain_name = eigenstrain
[../]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
block = 1
poissons_ratio = 0.3
youngs_modulus = 1e6
[../]
[]
[Postprocessors]
[./react_y]
type = MaterialTensorIntegral
use_displaced_mesh = false
rank_two_tensor = stress
index_i = 1
index_j = 1
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
# controls for linear iterations
l_max_its = 100
l_tol = 1e-10
# controls for nonlinear iterations
nl_max_its = 10
nl_rel_tol = 1e-12
# time control
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 2.0
[]
[Outputs]
file_base = gps_xz_small_out
exodus = true
[]
(test/tests/variables/fe_monomial_const/monomial-const-2d.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 100
ny = 100
elem_type = QUAD4
[]
[Functions]
[./bc_fn]
type=ParsedFunction
expression=0
[../]
[./bc_fnt]
type = ParsedFunction
expression = 0
[../]
[./bc_fnb]
type = ParsedFunction
expression = 0
[../]
[./bc_fnl]
type = ParsedFunction
expression = 0
[../]
[./bc_fnr]
type = ParsedFunction
expression = 0
[../]
[./forcing_fn]
# type = ParsedFunction
# expression = 0
type = MTPiecewiseConst2D
[../]
[./solution]
type = MTPiecewiseConst2D
[../]
[]
[Variables]
[./u]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
# Note: MOOSE's DirichletBCs do not work properly with shape functions that do not
# have DOFs at the element edges. This test works because the solution
# has been designed to be zero at the boundary which is satisfied by the IC
# Ticket #1352
active = ''
[./bc_all]
type=FunctionDirichletBC
variable = u
boundary = 'top bottom left right'
function = bc_fn
[../]
[./bc_top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = bc_fnt
[../]
[./bc_bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bc_fnb
[../]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1.e-10
[./Adaptivity]
[../]
[]
[Outputs]
execute_on = 'timestep_end'
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[]
(modules/contact/test/tests/sliding_block/sliding/frictionless_kinematic.i)
# This is a benchmark test that checks constraint based frictionless
# contact using the kinematic method. In this test a constant
# displacement is applied in the horizontal direction to simulate
# a small block come sliding down a larger block.
#
# The gold file is run on one processor
# and the benchmark case is run on a minimum of 4 processors to ensure no
# parallel variability in the contact pressure and penetration results.
#
[Mesh]
file = sliding_elastic_blocks_2d.e
patch_size = 80
[]
[GlobalParams]
volumetric_locking_correction = false
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./penetration]
[../]
[./inc_slip_x]
[../]
[./inc_slip_y]
[../]
[./accum_slip_x]
[../]
[./accum_slip_y]
[../]
[]
[Functions]
[./vertical_movement]
type = ParsedFunction
expression = -t
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
strain = FINITE
[../]
[]
[AuxKernels]
[./zeroslip_x]
type = ConstantAux
variable = inc_slip_x
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./zeroslip_y]
type = ConstantAux
variable = inc_slip_y
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./accum_slip_x]
type = AccumulateAux
variable = accum_slip_x
accumulate_from_variable = inc_slip_x
execute_on = timestep_end
[../]
[./accum_slip_y]
type = AccumulateAux
variable = accum_slip_y
accumulate_from_variable = inc_slip_y
execute_on = timestep_end
[../]
[./penetration]
type = PenetrationAux
variable = penetration
boundary = 3
paired_boundary = 2
[../]
[]
[Postprocessors]
[./nonlinear_its]
type = NumNonlinearIterations
execute_on = timestep_end
[../]
[./penetration]
type = NodalVariableValue
variable = penetration
nodeid = 222
[../]
[./contact_pressure]
type = NodalVariableValue
variable = contact_pressure
nodeid = 222
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = 4
value = -0.02
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = vertical_movement
[../]
[]
[Materials]
[./left]
type = ComputeIsotropicElasticityTensor
block = '1 2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./left_stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -sub_pc_type -pc_asm_overlap -ksp_gmres_restart'
petsc_options_value = 'asm lu 20 101'
line_search = 'none'
l_max_its = 100
nl_max_its = 1000
dt = 0.1
end_time = 15
num_steps = 1000
l_tol = 1e-6
nl_rel_tol = 1e-10
nl_abs_tol = 1e-6
dtmin = 0.01
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
[]
[Outputs]
time_step_interval = 10
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[./console]
type = Console
max_rows = 5
[../]
[]
[Contact]
[./leftright]
secondary = 3
primary = 2
model = frictionless
penalty = 1e+6
normal_smoothing_distance = 0.1
[../]
[]
(modules/phase_field/test/tests/electrochem_sintering/ElectrochemicalSintering_test.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 800
xmin = 0
xmax = 80
[]
[GlobalParams]
op_num = 2
var_name_base = gr
int_width = 4
[]
[Variables]
[wvy]
[]
[wvo]
[]
[phi]
[]
[PolycrystalVariables]
[]
[V]
[]
[]
[AuxVariables]
[bnds]
[]
[negative_V]
[]
[E_x]
order = CONSTANT
family = MONOMIAL
[]
[E_y]
order = CONSTANT
family = MONOMIAL
[]
[ns_cat_aux]
order = CONSTANT
family = MONOMIAL
[]
[ns_an_aux]
order = CONSTANT
family = MONOMIAL
[]
[T]
[]
[]
[Functions]
[ic_func_gr0]
type = ParsedFunction
expression = '0.5*(1.0-tanh((x)/sqrt(2.0*2.0)))'
[]
[ic_func_gr1]
type = ParsedFunction
expression = '0.5*(1.0+tanh((x)/sqrt(2.0*2.0)))'
[]
[]
[ICs]
[gr0_IC]
type = FunctionIC
variable = gr0
function = ic_func_gr0
[]
[gr1_IC]
type = FunctionIC
variable = gr1
function = ic_func_gr1
[]
[wvy_IC]
type = ConstantIC
variable = wvy
value = 2.7827
[]
[wvo_IC]
type = ConstantIC
variable = wvo
value = 2.7827
[]
[T_IC]
type = ConstantIC
variable = T
value = 1600
[]
[]
[BCs]
[v_left]
type = DirichletBC
preset = true
variable = V
boundary = left
value = 1e-2
[]
[v_right]
type = DirichletBC
preset = true
variable = V
boundary = right
value = 0
[]
[gr0_left]
type = DirichletBC
preset = true
variable = gr0
boundary = left
value = 0.5 #Grain boundary at left hand side of domain
[]
[gr1_left]
type = DirichletBC
preset = true
variable = gr1
boundary = left
value = 0.5 #Grain boundary at left hand side of domain
[]
[wvo_right]
type = DirichletBC
preset = true
variable = wvo
boundary = right
value = 2.7827
[]
[wvy_right]
type = DirichletBC
preset = true
variable = wvy
boundary = right
value = 2.7827
[]
[]
[Materials]
# Free energy coefficients for parabolic curves
[ks_cat]
type = ParsedMaterial
property_name = ks_cat
coupled_variables = 'T'
constant_names = 'a b Va'
constant_expressions = '-0.0017 140.44 0.03726'
expression = '(a*T + b) * Va^2'
[]
[ks_an]
type = ParsedMaterial
property_name = ks_an
coupled_variables = 'T'
constant_names = 'a b Va'
constant_expressions = '-0.0017 140.44 0.03726'
expression = '(a*T + b) * Va^2'
[]
[kv_cat]
type = ParsedMaterial
property_name = kv_cat
material_property_names = 'ks_cat'
expression = '10*ks_cat'
[]
[kv_an]
type = ParsedMaterial
property_name = kv_an
material_property_names = 'ks_cat'
expression = '10*ks_cat'
[]
# Diffusivity and mobilities
[chiDy]
type = GrandPotentialTensorMaterial
f_name = chiDy
diffusivity_name = Dvy
solid_mobility = L
void_mobility = Lv
chi = chi_cat
surface_energy = 6.24
c = phi
T = T
D0 = 5.9e11
GBmob0 = 1.60e12
Q = 4.14
Em = 4.25
bulkindex = 1
gbindex = 1
surfindex = 1
[]
[chiDo]
type = GrandPotentialTensorMaterial
f_name = chiDo
diffusivity_name = Dvo
solid_mobility = Lo
void_mobility = Lvo
chi = chi_an
surface_energy = 6.24
c = phi
T = T
D0 = 5.9e11
GBmob0 = 1.60e12
Q = 4.14
Em = 4.25
bulkindex = 1
gbindex = 1
surfindex = 1
[]
# Everything else
[ns_y_min]
type = DerivativeParsedMaterial
property_name = ns_y_min
coupled_variables = 'gr0 gr1 T'
constant_names = 'Ef_B Ef_GB kB Va_Y'
constant_expressions = '4.37 4.37 8.617343e-5 0.03726'
derivative_order = 2
expression = 'bnds:=gr0^2 + gr1^2; Ef:=Ef_B + 4.0 * (Ef_GB - Ef_B) * (1.0 - bnds)^2;
'
' exp(-Ef/kB/T) / Va_Y'
[]
[ns_o_min]
type = DerivativeParsedMaterial
property_name = ns_o_min
coupled_variables = 'gr0 gr1 T'
constant_names = 'Ef_B Ef_GB kB Va_O'
constant_expressions = '4.37 4.37 8.617343e-5 0.02484'
derivative_order = 2
expression = 'bnds:=gr0^2 + gr1^2; Ef:=Ef_B + 4.0 * (Ef_GB - Ef_B) * (1.0 - bnds)^2;
'
' exp(-Ef/kB/T) / Va_O'
[]
[sintering]
type = ElectrochemicalSinteringMaterial
chemical_potentials = 'wvy wvo'
electric_potential = V
void_op = phi
Temperature = T
surface_energy = 6.24
grainboundary_energy = 5.18
solid_energy_coefficients = 'kv_cat kv_cat'
void_energy_coefficients = 'kv_cat kv_an'
min_vacancy_concentrations_solid = 'ns_y_min ns_o_min'
min_vacancy_concentrations_void = '26.837 40.256'
defect_charges = '-3 2'
solid_relative_permittivity = 30
solid_energy_model = DILUTE
[]
[density_chi_y]
type = ElectrochemicalDefectMaterial
chemical_potential = wvy
void_op = phi
Temperature = T
electric_potential = V
void_density_name = nv_cat
solid_density_name = ns_cat
chi_name = chi_cat
void_energy_coefficient = kv_cat
min_vacancy_concentration_solid = ns_y_min
min_vacancy_concentration_void = 26.837
solid_energy_model = DILUTE
defect_charge = -3
solid_relative_permittivity = 30
[]
[density_chi_o]
type = ElectrochemicalDefectMaterial
chemical_potential = wvo
void_op = phi
Temperature = T
electric_potential = V
void_density_name = nv_an
solid_density_name = ns_an
chi_name = chi_an
void_energy_coefficient = kv_an
min_vacancy_concentration_solid = ns_o_min
min_vacancy_concentration_void = 40.256
solid_energy_model = DILUTE
defect_charge = 2
solid_relative_permittivity = 30
[]
[permittivity]
type = DerivativeParsedMaterial
property_name = permittivity
coupled_variables = 'phi'
material_property_names = 'hs hv'
constant_names = 'eps_rel_solid eps_void_over_e'
constant_expressions = '30 5.52e-2' #eps_void_over_e in 1/V/nm
derivative_order = 2
expression = '-hs * eps_rel_solid * eps_void_over_e - hv * eps_void_over_e'
[]
[void_pre]
type = DerivativeParsedMaterial
property_name = void_pre
material_property_names = 'hv'
constant_names = 'Z_cat Z_an nv_y_min nv_o_min'
constant_expressions = '-3 2 26.837 40.256'
derivative_order = 2
expression = '-hv * (Z_cat * nv_y_min + Z_an * nv_o_min)'
[]
[cat_mu_pre]
type = DerivativeParsedMaterial
property_name = cat_mu_pre
material_property_names = 'hv kv_cat'
constant_names = 'Z_cat'
constant_expressions = '-3'
derivative_order = 2
expression = '-hv * Z_cat / kv_cat'
[]
[an_mu_pre]
type = DerivativeParsedMaterial
property_name = an_mu_pre
material_property_names = 'hv kv_an'
constant_names = 'Z_an'
constant_expressions = '2'
derivative_order = 2
expression = '-hv * Z_an / kv_an'
[]
[cat_V_pre]
type = DerivativeParsedMaterial
property_name = cat_V_pre
material_property_names = 'hv kv_cat'
constant_names = 'Z_cat v_scale e '
constant_expressions = '-3 1 1'
derivative_order = 2
expression = 'hv * Z_cat^2 * e * v_scale / kv_cat'
[]
[an_V_pre]
type = DerivativeParsedMaterial
property_name = an_V_pre
material_property_names = 'hv kv_an'
constant_names = 'Z_an v_scale e '
constant_expressions = '2 1 1'
derivative_order = 2
expression = 'hv * Z_an^2 * e * v_scale / kv_an'
[]
[]
#This action adds most kernels needed for grand potential model
[Modules]
[PhaseField]
[GrandPotential]
switching_function_names = 'hv hs'
anisotropic = 'true true'
chemical_potentials = 'wvy wvo'
mobilities = 'chiDy chiDo'
susceptibilities = 'chi_cat chi_an'
free_energies_w = 'nv_cat ns_cat nv_an ns_an'
gamma_gr = gamma
mobility_name_gr = L
kappa_gr = kappa
free_energies_gr = 'omegav omegas'
additional_ops = 'phi'
gamma_grxop = gamma
mobility_name_op = Lv
kappa_op = kappa
free_energies_op = 'omegav omegas'
[]
[]
[]
[Kernels]
[barrier_phi]
type = ACBarrierFunction
variable = phi
v = 'gr0 gr1'
gamma = gamma
mob_name = Lv
[]
[kappa_phi]
type = ACKappaFunction
variable = phi
mob_name = Lv
kappa_name = kappa
[]
[Laplace]
type = MatDiffusion
variable = V
diffusivity = permittivity
args = 'phi'
[]
[potential_void_constants]
type = MaskedBodyForce
variable = V
coupled_variables = 'phi'
mask = void_pre
[]
[potential_cat_mu]
type = MatReaction
variable = V
v = wvy
mob_name = cat_mu_pre
[]
[potential_an_mu]
type = MatReaction
variable = V
v = wvo
mob_name = an_mu_pre
[]
[potential_cat_V]
type = MatReaction
variable = V
mob_name = cat_V_pre
[]
[potential_an_V]
type = MatReaction
variable = V
mob_name = an_V_pre
[]
[potential_solid_cat]
type = MaskedExponential
variable = V
w = wvy
T = T
coupled_variables = 'phi gr0 gr1'
mask = hs
species_charge = -3
n_eq = ns_y_min
[]
[potential_solid_an]
type = MaskedExponential
variable = V
w = wvo
T = T
coupled_variables = 'phi gr0 gr1'
mask = hs
species_charge = 2
n_eq = ns_o_min
[]
[]
[AuxKernels]
[bnds_aux]
type = BndsCalcAux
variable = bnds
execute_on = 'initial timestep_end'
[]
[negative_V]
type = ParsedAux
variable = negative_V
coupled_variables = V
expression = '-V'
[]
[E_x]
type = VariableGradientComponent
variable = E_x
gradient_variable = negative_V
component = x
[]
[E_y]
type = VariableGradientComponent
variable = E_y
gradient_variable = negative_V
component = y
[]
[ns_cat_aux]
type = MaterialRealAux
variable = ns_cat_aux
property = ns_cat
[]
[ns_an_aux]
type = MaterialRealAux
variable = ns_an_aux
property = ns_an
[]
[]
[Postprocessors]
[ns_cat_total]
type = ElementIntegralMaterialProperty
mat_prop = ns_cat
[]
[ns_an_total]
type = ElementIntegralMaterialProperty
mat_prop = ns_an
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -sub_pc_type -pc_asm_overlap -ksp_gmres_restart -sub_ksp_type'
petsc_options_value = ' asm lu 1 31 preonly'
nl_max_its = 40
l_max_its = 30
l_tol = 1e-4
nl_rel_tol = 1e-8
nl_abs_tol = 1e-13
start_time = 0
num_steps = 2
automatic_scaling = true
[TimeStepper]
type = IterationAdaptiveDT
dt = 1
optimal_iterations = 8
iteration_window = 2
[]
[]
[Outputs]
exodus = true
[]
(modules/richards/test/tests/buckley_leverett/bl01.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 150
xmin = 0
xmax = 15
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2.0E6
[../]
[./SeffVG]
type = RichardsSeff1VG
m = 0.8
al = 1E-4
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[AuxKernels]
active = 'calculate_seff'
[./calculate_seff]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = SeffVG
pressure_vars = pressure
[../]
[]
[Variables]
[./pressure]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_pressure
[../]
[../]
[]
[BCs]
active = 'left'
[./left]
type = DirichletBC
variable = pressure
boundary = left
value = 980000
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
variable = pressure
[../]
[]
[Functions]
active = 'initial_pressure'
[./initial_pressure]
type = ParsedFunction
expression = max((1000000-x/5*1000000)-20000,-20000)
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.15
mat_permeability = '1E-10 0 0 0 1E-10 0 0 0 1E-10'
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]
active = 'andy'
[./andy]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 20'
[../]
[]
[Executioner]
type = Transient
end_time = 50
dt = 2
snesmf_reuse_base = false
[]
[Outputs]
file_base = bl01
execute_on = 'initial timestep_end final'
time_step_interval = 10000
exodus = true
[]
(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/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
[]
(test/tests/outputs/variables/show_single_vars.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
# This test uses ElementalVariableValue postprocessors on specific
# elements, so element numbering needs to stay unchanged
allow_renumbering = false
[]
[Functions]
[./ffn]
type = ParsedFunction
expression = -4
[../]
[./exactfn]
type = ParsedFunction
expression = x*x+y*y
[../]
[./aux_exact_fn]
type = ParsedFunction
expression = t*(x*x+y*y)
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = ffn
[../]
[]
[AuxVariables]
[./aux_u]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./a]
type = FunctionAux
variable = aux_u
function = aux_exact_fn
[../]
[]
[BCs]
[./left]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exactfn
[../]
[]
[Postprocessors]
[./elem_56]
type = ElementalVariableValue
variable = u
elementid = 56
[../]
[./aux_elem_99]
type = ElementalVariableValue
variable = aux_u
elementid = 99
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.01
start_time = 0
num_steps = 1
[]
[Outputs]
exodus = true
show = 'aux_u'
[]
(modules/navier_stokes/test/tests/finite_volume/pins/mms/2d-rc.i)
mu = 1.1
rho = 1.1
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = -1
ymax = 1
nx = 8
ny = 8
[]
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[v]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 0.8
[]
[]
[GlobalParams]
porosity = porosity
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
porosity = porosity
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[mass_forcing]
type = FVBodyForce
variable = pressure
function = forcing_p
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = u
mu = ${mu}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[u_forcing]
type = INSFVBodyForce
variable = u
functor = forcing_u
momentum_component = 'x'
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = v
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = PINSFVMomentumDiffusion
variable = v
mu = ${mu}
porosity = porosity
momentum_component = 'y'
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[v_forcing]
type = INSFVBodyForce
variable = v
functor = forcing_v
momentum_component = 'y'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
functor = 'exact_u'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = v
functor = 'exact_v'
[]
[walls-u]
type = INSFVNoSlipWallBC
boundary = 'top bottom'
variable = u
function = 'exact_u'
[]
[walls-v]
type = INSFVNoSlipWallBC
boundary = 'top bottom'
variable = v
function = 'exact_v'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 'exact_p'
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'sin((1/2)*y*pi)*cos((1/2)*x*pi)'
[]
[forcing_u]
type = ParsedFunction
expression = '0.5*pi^2*mu*sin((1/2)*y*pi)*cos((1/2)*x*pi) - 0.625*pi*rho*sin((1/4)*x*pi)*sin((1/2)*y*pi)^2*cos((1/2)*x*pi) + 0.625*pi*rho*sin((1/4)*x*pi)*cos((1/2)*x*pi)*cos((1/2)*y*pi)^2 - 1.25*pi*rho*sin((1/2)*x*pi)*sin((1/2)*y*pi)^2*cos((1/2)*x*pi) - 0.2*pi*sin((1/4)*x*pi)*sin((3/2)*y*pi)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_v]
type = ParsedFunction
expression = 'sin((1/4)*x*pi)*cos((1/2)*y*pi)'
[]
[forcing_v]
type = ParsedFunction
expression = '0.3125*pi^2*mu*sin((1/4)*x*pi)*cos((1/2)*y*pi) - 1.25*pi*rho*sin((1/4)*x*pi)^2*sin((1/2)*y*pi)*cos((1/2)*y*pi) - 0.625*pi*rho*sin((1/4)*x*pi)*sin((1/2)*x*pi)*sin((1/2)*y*pi)*cos((1/2)*y*pi) + 0.3125*pi*rho*sin((1/2)*y*pi)*cos((1/4)*x*pi)*cos((1/2)*x*pi)*cos((1/2)*y*pi) + 1.2*pi*cos((1/4)*x*pi)*cos((3/2)*y*pi)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'sin((3/2)*y*pi)*cos((1/4)*x*pi)'
[]
[forcing_p]
type = ParsedFunction
expression = '-1/2*pi*rho*sin((1/4)*x*pi)*sin((1/2)*y*pi) - 1/2*pi*rho*sin((1/2)*x*pi)*sin((1/2)*y*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm 100 lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
[]
[Outputs]
csv = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2FunctorError
approximate = u
exact = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2v]
type = ElementL2FunctorError
approximate = v
exact = exact_v
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
type = ElementL2FunctorError
approximate = pressure
exact = exact_p
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(modules/stochastic_tools/examples/surrogates/combined/trans_diff_2d/trans_diff_sub.i)
[Functions]
[src_func]
type = ParsedFunction
expression = "1000*sin(f*t)"
symbol_names = 'f'
symbol_values = '20'
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 2
nx = 100
xmin = -0.5
xmax = 0.5
ny = 100
ymin = -0.5
ymax = 0.5
[]
[source_domain]
type = ParsedSubdomainMeshGenerator
input = msh
combinatorial_geometry = '(x<0.1 & x>-0.1) & (y<0.1 & y>-0.1)'
block_id=1
[]
[]
[Variables]
[T]
initial_condition = 300
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = T
diffusivity = diff_coeff
[]
[source]
type = BodyForce
variable = T
function = src_func
block = 1
[]
[time_deriv]
type = TimeDerivative
variable = T
[]
[]
[Materials]
[diff_coeff]
type = ParsedMaterial
property_name = diff_coeff
coupled_variables = 'T'
constant_names = 'C'
constant_expressions = 0.02
expression = 'C * pow(300/T, 2)'
[]
[]
[BCs]
[neumann_all]
type = NeumannBC
variable = T
boundary = 'left right top bottom'
value = 0
[]
[]
[Executioner]
type = Transient
num_steps = 100
dt = 0.01
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_rel_tol = 1e-6
l_abs_tol = 1e-6
timestep_tolerance = 1e-6
[]
[Postprocessors]
[max]
type = NodalExtremeValue
variable = T
[]
[min]
type = NodalExtremeValue
variable = T
value_type = min
[]
[time_max]
type = TimeExtremeValue
postprocessor = max
[]
[time_min]
type = TimeExtremeValue
postprocessor = min
value_type = min
[]
[]
(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/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts_traction_steady_stabilized.i)
[GlobalParams]
order = FIRST
integrate_p_by_parts = true
viscous_form = 'traction'
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[AuxVariables]
[vel_x]
[]
[vel_y]
[]
[]
[AuxKernels]
[vel_x]
type = VectorVariableComponentAux
variable = vel_x
vector_variable = velocity
component = 'x'
[]
[vel_y]
type = VectorVariableComponentAux
variable = vel_y
vector_variable = velocity
component = 'y'
[]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[]
# Need to set a non-zero initial condition because we have a velocity norm in
# the denominator for the tau coefficient of the stabilization term
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[mass_pspg]
type = INSADMassPSPG
variable = p
[]
[momentum_advection]
type = INSADMomentumAdvection
variable = velocity
[]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
[../]
[momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[]
[]
[BCs]
[inlet]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom'
function_x = 0
function_y = 'inlet_func'
[../]
[wall]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'right'
function_x = 0
function_y = 0
[]
[axis]
type = ADVectorFunctionDirichletBC
variable = velocity
boundary = 'left'
set_y_comp = false
function_x = 0
[]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADTauMaterial
velocity = velocity
pressure = p
[]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(tutorials/tutorial03_verification/app/test/tests/step04_mms/2d_mms_temporal.i)
[ICs]
active = 'mms'
[mms]
type = FunctionIC
variable = T
function = mms_exact
[]
[]
[BCs]
active = 'mms'
[mms]
type = FunctionDirichletBC
variable = T
boundary = 'left right top bottom'
function = mms_exact
[]
[]
[Kernels]
[mms]
type = HeatSource
variable = T
function = mms_force
[]
[]
[Functions]
[mms_force]
type = ParsedFunction
expression = '-3.08641975308642e-5*x*y*cp*rho*exp(-3.08641975308642e-5*t) - shortwave*exp(y*kappa)*sin((1/2)*x*pi)*sin((1/3600)*pi*t/hours)'
symbol_names = 'rho cp k kappa shortwave hours'
symbol_values = '150 2000 0.01 40 650 9'
[]
[mms_exact]
type = ParsedFunction
expression = 'x*y*exp(-3.08641975308642e-5*t)'
[]
[]
[Outputs]
csv = true
[]
[Postprocessors]
[error]
type = ElementL2Error
variable = T
function = mms_exact
[]
[delta_t]
type = TimestepSize
[]
[]
(modules/solid_mechanics/test/tests/umat/temperature/elastic_temperature.i)
# Testing the UMAT Interface - linear elastic model using the large strain formulation.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[]
[Functions]
[top_pull]
type = ParsedFunction
expression = t/100
[]
# Forced evolution of temperature
[temperature_load]
type = ParsedFunction
expression = '273 + 10*t'
[]
# Factor to multiply the elasticity tensor in MOOSE
[elasticity_prefactor]
type = ParsedFunction
expression = '273/(273 + 10*t)'
[]
[]
[AuxVariables]
[temperature]
[]
[]
[AuxKernels]
[temperature_function]
type = FunctionAux
variable = temperature
function = temperature_load
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
generate_output = 'stress_yy'
[]
[]
[BCs]
[y_pull_function]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = top_pull
[]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[z_bot]
type = DirichletBC
variable = disp_z
boundary = front
value = 0.0
[]
[]
[Materials]
# This input file is used to compare the MOOSE and UMAT models, activating
# specific ones with cli variable_names.
# 1. Active for umat calculation
[umat]
type = AbaqusUMATStress
constant_properties = '1000 0.3'
plugin = '../../../plugins/elastic_temperature'
num_state_vars = 0
temperature = temperature
use_one_based_indexing = true
[]
# 2. Active for reference MOOSE computations
[elastic]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1000
poissons_ratio = 0.3
elasticity_tensor_prefactor = 'elasticity_prefactor'
[]
[stress]
type = ComputeFiniteStrainElasticStress
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
num_steps = 30
dt = 1.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(modules/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/stochastic_tools/test/tests/userobjects/inverse_mapping/inverse_map.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmax = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[v_pod]
[]
[v_aux]
[]
[v_aux_pod]
[]
[]
[Kernels]
[diffusion_v]
type = MatDiffusion
variable = v
diffusivity = D_v
[]
[source_v]
type = BodyForce
variable = v
value = 1.0
[]
[]
[AuxKernels]
[func_aux]
type = FunctionAux
variable = v_aux
function = v_aux_func
[]
[]
[Functions]
[v_aux_func]
type = ParsedFunction
expression = 'S * x + D'
symbol_names = 'S D'
symbol_values = '2 5'
[]
[]
[Materials]
[diffusivity_v]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 2.0
[]
[]
[BCs]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 5
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[UserObjects]
[im]
type = InverseMapping
mapping = pod
surrogate = "polyreg_v polyreg_v_aux"
variable_to_fill = "v_pod v_aux_pod"
variable_to_reconstruct = "v v_aux"
parameters = '2 5'
execute_on = TIMESTEP_END
[]
[]
[Surrogates]
[polyreg_v]
type = PolynomialRegressionSurrogate
filename = "create_mapping_main_rom_polyreg_v.rd"
[]
[polyreg_v_aux]
type = PolynomialRegressionSurrogate
filename = "create_mapping_main_rom_polyreg_v_aux.rd"
[]
[]
[VariableMappings]
[pod]
type = PODMapping
filename = "create_mapping_main_mapping_pod_mapping.rd"
num_modes_to_compute = 2
[]
[]
[Postprocessors]
[error_v]
type = ElementL2Difference
variable = v
other_variable = v_pod
execute_on = FINAL
outputs = csv_errors
[]
[error_v_aux]
type = ElementL2Difference
variable = v_aux
other_variable = v_aux_pod
execute_on = FINAL
outputs = csv_errors
[]
[]
[Outputs]
exodus = true
execute_on = 'FINAL'
[csv_errors]
type = CSV
[]
[]
(modules/solid_mechanics/test/tests/ad_thermal_expansion_function/instantaneous_complex.i)
# This test checks the thermal expansion calculated via a mean thermal expansion coefficient.
# The coefficient is selected so as to result in a 1e-4 strain in the x-axis, and to cross over
# from positive to negative strain.
[Mesh]
[./gen]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 4
nz = 4
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./temp]
[../]
[]
[Kernels]
[./temp_diff]
type = ADDiffusion
variable = temp
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = SMALL
add_variables = true
eigenstrain_names = eigenstrain
generate_output = 'strain_xx strain_yy strain_zz'
use_automatic_differentiation = true
[../]
[]
[BCs]
[./left]
type = ADDirichletBC
variable = disp_x
boundary = 'left'
value = 0.0
[../]
[./bottom]
type = ADDirichletBC
variable = disp_y
boundary = 'bottom'
value = 0.0
[../]
[./back]
type = ADDirichletBC
variable = disp_z
boundary = 'back'
value = 0.0
[../]
[./temp]
type = ADFunctionDirichletBC
variable = temp
boundary = 'front back top bottom left right'
function = '1 + t'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1
poissons_ratio = 0.3
[../]
[./stress]
type = ADComputeLinearElasticStress
[../]
[./thermal_expansion_strain]
type = ADComputeInstantaneousThermalExpansionFunctionEigenstrain
thermal_expansion_function = cte_func_mean
stress_free_temperature = 1
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Functions]
[./cte_func_mean]
type = ParsedFunction
expression = '1e-6 + 1e-8 * t + 1e-8 * t^2 + exp(t) * 1e-2'
[../]
[]
[Postprocessors]
[./disp_x_max]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./temp_avg]
type = ElementAverageValue
variable = temp
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
num_steps = 1
[]
[Outputs]
csv = true
[]
(modules/heat_transfer/test/tests/code_verification/cartesian_test_no2.i)
# Problem I.2
#
# An infinite plate with a thermal conductivity that varies linearly with
# temperature. Each boundary is exposed to a constant temperature.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
nx = 1
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Functions]
[./exact]
type = ParsedFunction
symbol_names = 'L beta ki ko ui uo'
symbol_values = '1 1e-3 5.3 5 300 0'
expression = 'uo+(ko/beta)* ( (1 + L*beta*(ki+ko)*(ui-uo)*((L-x)/(ko*L)^2) )^0.5 - 1)'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[]
[BCs]
[./ui]
type = DirichletBC
boundary = left
variable = u
value = 300
[../]
[./uo]
type = DirichletBC
boundary = right
variable = u
value = 0
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat'
prop_values = '1.0 1.0'
[../]
[./thermal_conductivity]
type = ParsedMaterial
property_name = 'thermal_conductivity'
coupled_variables = u
expression = '5 + 1e-3 * (u-0)'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = true
[]
(modules/xfem/test/tests/moving_interface/moving_bimaterial_finite_strain.i)
# This test is for two layer materials with different youngs modulus with AD
# The global stress is determined by switching the stress based on level set values
# The material interface is marked by a level set function
# The two layer materials are glued together
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[XFEM]
output_cut_plane = true
[]
[UserObjects]
[level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[]
[]
[Mesh]
use_displaced_mesh = true
[generated_mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin = 0
xmax = 5
ymin = 0
ymax = 5
elem_type = QUAD4
[]
[left_bottom]
type = ExtraNodesetGenerator
new_boundary = 'left_bottom'
coord = '0 0'
input = generated_mesh
[]
[left_top]
type = ExtraNodesetGenerator
new_boundary = 'left_top'
coord = '0 5'
input = left_bottom
[]
[]
[Functions]
[ls_func]
type = ParsedFunction
expression = 'y-2.73+t'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[ls]
[]
[a_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[a_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[a_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[b_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[b_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[b_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[ls_function]
type = FunctionAux
variable = ls
function = ls_func
[]
[a_strain_xx]
type = RankTwoAux
variable = a_strain_xx
rank_two_tensor = A_total_strain
index_i = 0
index_j = 0
[]
[a_strain_yy]
type = RankTwoAux
variable = a_strain_yy
rank_two_tensor = A_total_strain
index_i = 1
index_j = 1
[]
[a_strain_xy]
type = RankTwoAux
variable = a_strain_xy
rank_two_tensor = A_total_strain
index_i = 0
index_j = 1
[]
[b_strain_xx]
type = RankTwoAux
variable = b_strain_xx
rank_two_tensor = B_total_strain
index_i = 0
index_j = 0
[]
[b_strain_yy]
type = RankTwoAux
variable = b_strain_yy
rank_two_tensor = B_total_strain
index_i = 1
index_j = 1
[]
[b_strain_xy]
type = RankTwoAux
variable = b_strain_xy
rank_two_tensor = B_total_strain
index_i = 0
index_j = 1
[]
[stress_xx]
type = RankTwoAux
variable = stress_xx
rank_two_tensor = stress
index_i = 0
index_j = 0
[]
[stress_xy]
type = RankTwoAux
variable = stress_xy
rank_two_tensor = stress
index_i = 0
index_j = 1
[]
[stress_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = stress
index_i = 1
index_j = 1
[]
[]
[Kernels]
[solid_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
use_displaced_mesh = true
[]
[solid_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
use_displaced_mesh = true
[]
[]
[Constraints]
[dispx_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_x
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[]
[dispy_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_y
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[]
[]
[BCs]
[bottomx]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[]
[bottomy]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[]
[topx]
type = FunctionDirichletBC
boundary = top
variable = disp_x
function = 0.03*t
[]
[topy]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = '0.03*t'
[]
[]
[Materials]
[elasticity_tensor_A]
type = ComputeIsotropicElasticityTensor
base_name = A
youngs_modulus = 1e9
poissons_ratio = 0.3
[]
[strain_A]
type = ComputeFiniteStrain
base_name = A
[]
[stress_A]
type = ComputeFiniteStrainElasticStress
base_name = A
[]
[elasticity_tensor_B]
type = ComputeIsotropicElasticityTensor
base_name = B
youngs_modulus = 1e7
poissons_ratio = 0.3
[]
[strain_B]
type = ComputeFiniteStrain
base_name = B
[]
[stress_B]
type = ComputeFiniteStrainElasticStress
base_name = B
[]
[combined_stress]
type = LevelSetBiMaterialRankTwo
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = stress
[]
[combined_jacob_mult]
type = LevelSetBiMaterialRankFour
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = Jacobian_mult
[]
[]
[Postprocessors]
[disp_x_norm]
type = ElementL2Norm
variable = disp_x
[]
[disp_y_norm]
type = ElementL2Norm
variable = disp_y
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-13
nl_abs_tol = 1e-50
# time control
start_time = 0.0
dt = 0.1
num_steps = 4
max_xfem_update = 1
[]
[Outputs]
print_linear_residuals = false
exodus = true
[]
(test/tests/mesh/adapt/displaced_adapt_test.i)
# Adaptivity on displaced problem
# - testing initial_refinement and adaptivity as well
#
# variables:
# - u and v_aux are used for displacing the problem
# - v is used to get some refinements
#
[Mesh]
type = GeneratedMesh
nx = 2
ny = 2
dim = 2
uniform_refine = 3
displacements = 'u aux_v'
[]
[Functions]
[./aux_v_fn]
type = ParsedFunction
expression = x*(y-0.5)/5
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'udiff uie vdiff vconv vie'
[./udiff]
type = Diffusion
variable = u
[../]
[./uie]
type = TimeDerivative
variable = u
[../]
[./vdiff]
type = Diffusion
variable = v
[../]
[./vconv]
type = Convection
variable = v
velocity = '-10 1 0'
[../]
[./vie]
type = TimeDerivative
variable = v
[../]
[]
[BCs]
active = 'uleft uright vleft vright'
[./uleft]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./uright]
type = DirichletBC
variable = u
boundary = 1
value = 0.1
[../]
[./vleft]
type = DirichletBC
variable = v
boundary = 3
value = 1
[../]
[./vright]
type = DirichletBC
variable = v
boundary = 1
value = 0
[../]
[]
[AuxVariables]
[./aux_v]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./aux_k_1]
type = FunctionAux
variable = aux_v
function = aux_v_fn
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 2
dt = .1
[./Adaptivity]
refine_fraction = 0.2
coarsen_fraction = 0.3
max_h_level = 4
[../]
[]
[Outputs]
exodus = true
[./displaced]
type = Exodus
use_displaced = 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'
expression = '(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'
expression = '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'
expression = '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'
expression = '(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'
expression = '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'
expression = '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/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/optimization/examples/simpleTransient/forward.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin = -1
xmax = 1
ymin = -1
ymax = 1
[]
[]
[Variables]
[u]
[]
[]
[VectorPostprocessors]
[src_values]
type = CSVReader
csv_file = source_params.csv
header = true
outputs = none
[]
[]
[ICs]
[initial]
type = FunctionIC
variable = u
function = exact
[]
[]
[Kernels]
[dt]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[src]
type = BodyForce
variable = u
function = source
[]
[]
[BCs]
[dirichlet]
type = DirichletBC
variable = u
boundary = 'left right top bottom'
value = 0
[]
[]
[Functions]
[exact]
type = ParsedFunction
value = '2*exp(-2.0*(x - sin(2*pi*t))^2)*exp(-2.0*(y - cos(2*pi*t))^2)*cos((1/2)*x*pi)*cos((1/2)*y*pi)/pi'
[]
[source]
type = NearestReporterCoordinatesFunction
x_coord_name = src_values/coordx
y_coord_name = src_values/coordy
time_name = src_values/time
value_name = src_values/values
[]
[]
[Executioner]
type = Transient
num_steps = 100
end_time = 1
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
reuse_preconditioner=true
reuse_preconditioner_max_linear_its=50
[]
[Reporters]
[measured_data]
type = OptimizationData
measurement_file = mms_data.csv
file_xcoord = x
file_ycoord = y
file_zcoord = z
file_time = t
file_value = u
variable = u
execute_on = timestep_end
outputs = none
[]
[]
[Postprocessors]
[topRight_pp]
type = PointValue
point = '0.5 0.5 0'
variable = u
execute_on = TIMESTEP_END
[]
[bottomRight_pp]
type = PointValue
point = '-0.5 0.5 0'
variable = u
execute_on = TIMESTEP_END
[]
[bottomLeft_pp]
type = PointValue
point = '-0.5 -0.5 0'
variable = u
execute_on = TIMESTEP_END
[]
[topLeft_pp]
type = PointValue
point = '0.5 -0.5 0'
variable = u
execute_on = TIMESTEP_END
[]
[]
[Outputs]
csv=true
console = false
[]
(test/tests/time_steppers/postprocessor_dt/postprocessor_dt.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*t*(x*x+y*y)
[../]
[./forcing_fn]
type = ParsedFunction
expression = 2*t*(x*x+y*y)-4*t*t
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]
[ICs]
[./u_var]
type = FunctionIC
variable = u
function = exact_fn
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_error]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[../]
# Just use some postprocessor that gives values good enough for time stepping ;-)
[./dt]
type = ElementAverageValue
variable = u
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
scheme = 'crank-nicolson'
start_time = 1.0
num_steps = 2
[./TimeStepper]
type = PostprocessorDT
postprocessor = dt
[../]
[]
[Outputs]
exodus = true
[]
(modules/richards/test/tests/buckley_leverett/bl22_lumped.i)
# two-phase version
# super-sharp front version
[Mesh]
type = GeneratedMesh
dim = 1
nx = 150
xmin = 0
xmax = 15
[]
[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-4 1E-3 1E-2 2E-2 5E-2 6E-2 0.1 0.2'
x = '0 1E-2 1E-1 1 5 20 40 41'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E6
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 2E6
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1E-4
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1E-4
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./SatWater]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SatGas]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGwater]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[./SUPGgas]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[./bounds_dummy]
[../]
[]
[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
[../]
[./richardsppenalty]
type = RichardsPPenalty
variable = pgas
a = 1E-18
lower_var = pwater
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = SeffWater
pressure_vars = 'pwater pgas'
[../]
[]
[ICs]
[./water_ic]
type = FunctionIC
variable = pwater
function = initial_water
[../]
[./gas_ic]
type = FunctionIC
variable = pgas
function = initial_gas
[../]
[]
[BCs]
[./left_w]
type = DirichletBC
variable = pwater
boundary = left
value = 1E6
[../]
[./left_g]
type = DirichletBC
variable = pgas
boundary = left
value = 1000
[../]
[./right_w]
type = DirichletBC
variable = pwater
boundary = right
value = -100000
[../]
[./right_g]
type = DirichletBC
variable = pgas
boundary = right
value = 0
[../]
[]
[Functions]
[./initial_water]
type = ParsedFunction
expression = 1000000*(1-min(x/5,1))-if(x<5,0,100000)
[../]
[./initial_gas]
type = ParsedFunction
expression = 1000
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.15
mat_permeability = '1E-10 0 0 0 1E-10 0 0 0 1E-10'
viscosity = '1E-3 1E-6'
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./standard]
type = SMP
full = true
petsc_options = '-snes_converged_reason -ksp_diagonal_scale -ksp_diagonal_scale_fix -ksp_gmres_modifiedgramschmidt'
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap -snes_atol -snes_rtol -snes_max_it -ksp_rtol -ksp_atol'
petsc_options_value = 'gmres asm lu NONZERO 2 1E-10 1E-10 20 1E-10 1E-100'
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 50
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = bl22_lumped
[./exodus]
type = Exodus
time_step_interval = 100000
hide = 'pgas bounds_dummy'
execute_on = 'initial final timestep_end'
[../]
[]
(test/tests/userobjects/internal_side_user_object/internal_side_user_object.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
ymin = -1
xmax = 1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[]
[Functions]
[./fn_exact]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[./ffn]
type = ParsedFunction
expression = -4
[../]
[]
[UserObjects]
[./isuo]
type = InsideUserObject
variable = u
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = FIRST
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = ffn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = fn_exact
[../]
[]
[Postprocessors]
[./value]
type = InsideValuePPS
user_object = isuo
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/nonzero-malloc/test.i)
[GlobalParams]
gravity = '0 0 0'
pspg = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 5
ny = 5
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./vel_x]
[../]
[./vel_y]
[../]
[./T]
[./InitialCondition]
type = ConstantIC
value = 1.0
[../]
[../]
[./p]
[../]
[]
[Kernels]
# mass
[./mass]
type = INSMass
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
# x-momentum, time
[./x_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_x
[../]
# x-momentum, space
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
# y-momentum, time
[./y_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_y
[../]
# y-momentum, space
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
# temperature
[./temperature_time]
type = INSTemperatureTimeDerivative
variable = T
[../]
[./temperature_space]
type = INSTemperature
variable = T
u = vel_x
v = vel_y
[../]
[malloc]
type = MallocKernel
# Variable choice doesn't matter
variable = vel_x
[]
[]
[BCs]
[./x_no_slip]
type = DirichletBC
variable = vel_x
boundary = 'bottom right left'
value = 0.0
[../]
[./lid]
type = FunctionDirichletBC
variable = vel_x
boundary = 'top'
function = 'lid_function'
[../]
[./y_no_slip]
type = DirichletBC
variable = vel_y
boundary = 'bottom right top left'
value = 0.0
[../]
[./T_hot]
type = DirichletBC
variable = T
boundary = 'bottom'
value = 1
[../]
[./T_cold]
type = DirichletBC
variable = T
boundary = 'top'
value = 0
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'asm 2 ilu 4'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
file_base = lid_driven_out
perf_graph = true
[]
(test/tests/transfers/multiapp_variable_value_sample_transfer/parent_array_sample.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u_parent]
components = 2
[]
[]
[AuxVariables]
[u_sub]
family = MONOMIAL
order = CONSTANT
components = 2
[]
[]
[Functions]
[u0_fun]
type = ParsedFunction
expression = 'x'
[]
[u1_fun]
type = ParsedFunction
expression = 'y'
[]
[]
[ICs]
[uic]
type = ArrayFunctionIC
variable = u_parent
function = 'u0_fun u1_fun'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
input_files = sub_array_sample.i
execute_on = timestep_end
positions = '0.25 0.25 0 0.75 0.25 0 0.25 0.75 0 0.75 0.75 0
0.25 0.25 0 0.75 0.25 0 0.25 0.75 0 0.75 0.75 0'
[]
[]
[Transfers]
[to_transfer]
type = MultiAppVariableValueSamplePostprocessorTransfer
to_multi_app = sub
postprocessor = from_parent
source_variable = u_parent
map_array_variable_components_to_child_apps = true
[]
[from_transfer]
type = MultiAppVariableValueSamplePostprocessorTransfer
from_multi_app = sub
postprocessor = to_parent
source_variable = u_sub
map_array_variable_components_to_child_apps = 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/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/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
[]
[]
(test/tests/mesh/custom_partitioner/custom_linear_partitioner_test_displacement.i)
[Mesh]
[gen]
dim = 2
type = GeneratedMeshGenerator
nx = 3
ny = 3
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 10.0
[]
uniform_refine = 2
displacements = 'u aux_v'
[./Partitioner]
type = LibmeshPartitioner
partitioner = linear
[../]
parallel_type = replicated
[]
[Functions]
[./aux_v_fn]
type = ParsedFunction
expression = x*(y-0.5)/5
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./udiff]
type = Diffusion
variable = u
[../]
[./uie]
type = TimeDerivative
variable = u
[../]
[./vdiff]
type = Diffusion
variable = v
[../]
[./vie]
type = TimeDerivative
variable = v
[../]
[]
[BCs]
[./uleft]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./uright]
type = DirichletBC
variable = u
boundary = 2
value = 0.1
[../]
[./vleft]
type = DirichletBC
variable = v
boundary = 1
value = 1
[../]
[./vright]
type = DirichletBC
variable = v
boundary = 2
value = 0
[../]
[]
[AuxVariables]
[./aux_v]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./aux_k_1]
type = FunctionAux
variable = aux_v
function = aux_v_fn
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 2
dt = .1
[./Adaptivity]
refine_fraction = 0.2
coarsen_fraction = 0.3
max_h_level = 4
[../]
[]
[Outputs]
file_base = custom_linear_partitioner_test_displacement
[./out]
type = Exodus
use_displaced = true
[../]
[]
(modules/porous_flow/test/tests/heterogeneous_materials/constant_poroperm.i)
# Assign porosity and permeability variables from constant AuxVariables to create
# a heterogeneous model
[Mesh]
type = GeneratedMesh
dim = 3
nx = 3
ny = 3
nz = 3
xmax = 3
ymax = 3
zmax = 3
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 -10'
[]
[Variables]
[ppwater]
initial_condition = 1.5e6
[]
[]
[AuxVariables]
[poro]
family = MONOMIAL
order = CONSTANT
[]
[permxx]
family = MONOMIAL
order = CONSTANT
[]
[permxy]
family = MONOMIAL
order = CONSTANT
[]
[permxz]
family = MONOMIAL
order = CONSTANT
[]
[permyx]
family = MONOMIAL
order = CONSTANT
[]
[permyy]
family = MONOMIAL
order = CONSTANT
[]
[permyz]
family = MONOMIAL
order = CONSTANT
[]
[permzx]
family = MONOMIAL
order = CONSTANT
[]
[permzy]
family = MONOMIAL
order = CONSTANT
[]
[permzz]
family = MONOMIAL
order = CONSTANT
[]
[poromat]
family = MONOMIAL
order = CONSTANT
[]
[permxxmat]
family = MONOMIAL
order = CONSTANT
[]
[permxymat]
family = MONOMIAL
order = CONSTANT
[]
[permxzmat]
family = MONOMIAL
order = CONSTANT
[]
[permyxmat]
family = MONOMIAL
order = CONSTANT
[]
[permyymat]
family = MONOMIAL
order = CONSTANT
[]
[permyzmat]
family = MONOMIAL
order = CONSTANT
[]
[permzxmat]
family = MONOMIAL
order = CONSTANT
[]
[permzymat]
family = MONOMIAL
order = CONSTANT
[]
[permzzmat]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[poromat]
type = PorousFlowPropertyAux
property = porosity
variable = poromat
[]
[permxxmat]
type = PorousFlowPropertyAux
property = permeability
variable = permxxmat
column = 0
row = 0
[]
[permxymat]
type = PorousFlowPropertyAux
property = permeability
variable = permxymat
column = 1
row = 0
[]
[permxzmat]
type = PorousFlowPropertyAux
property = permeability
variable = permxzmat
column = 2
row = 0
[]
[permyxmat]
type = PorousFlowPropertyAux
property = permeability
variable = permyxmat
column = 0
row = 1
[]
[permyymat]
type = PorousFlowPropertyAux
property = permeability
variable = permyymat
column = 1
row = 1
[]
[permyzmat]
type = PorousFlowPropertyAux
property = permeability
variable = permyzmat
column = 2
row = 1
[]
[permzxmat]
type = PorousFlowPropertyAux
property = permeability
variable = permzxmat
column = 0
row = 2
[]
[permzymat]
type = PorousFlowPropertyAux
property = permeability
variable = permzymat
column = 1
row = 2
[]
[permzzmat]
type = PorousFlowPropertyAux
property = permeability
variable = permzzmat
column = 2
row = 2
[]
[]
[ICs]
[poro]
type = RandomIC
seed = 0
variable = poro
max = 0.5
min = 0.1
[]
[permx]
type = FunctionIC
function = permx
variable = permxx
[]
[permy]
type = FunctionIC
function = permy
variable = permyy
[]
[permz]
type = FunctionIC
function = permz
variable = permzz
[]
[]
[Functions]
[permx]
type = ParsedFunction
expression = '(1+x)*1e-11'
[]
[permy]
type = ParsedFunction
expression = '(1+y)*1e-11'
[]
[permz]
type = ParsedFunction
expression = '(1+z)*1e-11'
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
variable = ppwater
[]
[flux0]
type = PorousFlowAdvectiveFlux
variable = ppwater
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 1000
viscosity = 1e-3
thermal_expansion = 0
cv = 2
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = ppwater
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = poro
[]
[permeability]
type = PorousFlowPermeabilityConstFromVar
perm_xx = permxx
perm_yy = permyy
perm_zz = permzz
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[Postprocessors]
[mass_ph0]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol'
petsc_options_value = 'bcgs bjacobi 1E-12 1E-10'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 100
dt = 100
[]
[Outputs]
execute_on = 'initial timestep_end'
exodus = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/action/noaction_3d.i)
# 3D test with just mixed stress strain control
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = true
constraint_types = 'stress strain strain strain stress strain strain strain strain'
macro_gradient = hvar
homogenization_constraint = homogenization
[]
[Mesh]
[base]
type = FileMeshGenerator
file = '3d.exo'
[]
[sidesets]
type = SideSetsFromNormalsGenerator
input = base
normals = '-1 0 0
1 0 0
0 -1 0
0 1 0
'
' 0 0 -1
0 0 1'
fixed_normal = true
new_boundary = 'left right bottom top back front'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[hvar]
family = SCALAR
order = NINTH
[]
[]
[AuxVariables]
[pk1_stress_xx]
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_yx]
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_zx]
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_xy]
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_yy]
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_zy]
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_xz]
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_yz]
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_zz]
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_xx]
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_yx]
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_zx]
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_xy]
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_yy]
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_zy]
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_xz]
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_yz]
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_zz]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[pk1_stress_xx]
type = RankTwoAux
variable = pk1_stress_xx
rank_two_tensor = pk1_stress
index_i = 0
index_j = 0
[]
[pk1_stress_yx]
type = RankTwoAux
variable = pk1_stress_yx
rank_two_tensor = pk1_stress
index_i = 1
index_j = 0
[]
[pk1_stress_zx]
type = RankTwoAux
variable = pk1_stress_zx
rank_two_tensor = pk1_stress
index_i = 2
index_j = 0
[]
[pk1_stress_xy]
type = RankTwoAux
variable = pk1_stress_xy
rank_two_tensor = pk1_stress
index_i = 0
index_j = 1
[]
[pk1_stress_yy]
type = RankTwoAux
variable = pk1_stress_yy
rank_two_tensor = pk1_stress
index_i = 1
index_j = 1
[]
[pk1_stress_zy]
type = RankTwoAux
variable = pk1_stress_zy
rank_two_tensor = pk1_stress
index_i = 2
index_j = 1
[]
[pk1_stress_xz]
type = RankTwoAux
variable = pk1_stress_xz
rank_two_tensor = pk1_stress
index_i = 0
index_j = 2
[]
[pk1_stress_yz]
type = RankTwoAux
variable = pk1_stress_yz
rank_two_tensor = pk1_stress
index_i = 1
index_j = 2
[]
[pk1_stress_zz]
type = RankTwoAux
variable = pk1_stress_zz
rank_two_tensor = pk1_stress
index_i = 2
index_j = 2
[]
[deformation_gradient_xx]
type = RankTwoAux
variable = deformation_gradient_xx
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 0
[]
[deformation_gradient_yx]
type = RankTwoAux
variable = deformation_gradient_yx
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 0
[]
[deformation_gradient_zx]
type = RankTwoAux
variable = deformation_gradient_zx
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 0
[]
[deformation_gradient_xy]
type = RankTwoAux
variable = deformation_gradient_xy
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 1
[]
[deformation_gradient_yy]
type = RankTwoAux
variable = deformation_gradient_yy
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 1
[]
[deformation_gradient_zy]
type = RankTwoAux
variable = deformation_gradient_zy
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 1
[]
[deformation_gradient_xz]
type = RankTwoAux
variable = deformation_gradient_xz
rank_two_tensor = deformation_gradient
index_i = 0
index_j = 2
[]
[deformation_gradient_yz]
type = RankTwoAux
variable = deformation_gradient_yz
rank_two_tensor = deformation_gradient
index_i = 1
index_j = 2
[]
[deformation_gradient_zz]
type = RankTwoAux
variable = deformation_gradient_zz
rank_two_tensor = deformation_gradient
index_i = 2
index_j = 2
[]
[]
[UserObjects]
[homogenization]
type = HomogenizationConstraint
targets = 'stress11 strain21 strain31 strain12 stress22 strain32 strain13 strain23 strain33'
execute_on = 'INITIAL LINEAR NONLINEAR'
[]
[]
[Kernels]
[sdx]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[sdy]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_y
component = 1
[]
[sdz]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_z
component = 2
[]
[]
[ScalarKernels]
[enforce]
type = HomogenizationConstraintScalarKernel
variable = hvar
[]
[]
[Functions]
[stress11]
type = ParsedFunction
expression = '120.0*t'
[]
[stress22]
type = ParsedFunction
expression = '65*t'
[]
[strain33]
type = ParsedFunction
expression = '8.0e-2*t'
[]
[strain23]
type = ParsedFunction
expression = '2.0e-2*t'
[]
[strain13]
type = ParsedFunction
expression = '-7.0e-2*t'
[]
[strain12]
type = ParsedFunction
expression = '1.0e-2*t'
[]
[strain32]
type = ParsedFunction
expression = '1.0e-2*t'
[]
[strain31]
type = ParsedFunction
expression = '2.0e-2*t'
[]
[strain21]
type = ParsedFunction
expression = '-1.5e-2*t'
[]
[zero]
type = ConstantFunction
expression = 0
[]
[]
[BCs]
[Periodic]
[x]
variable = disp_x
auto_direction = 'x y z'
[]
[y]
variable = disp_y
auto_direction = 'x y z'
[]
[z]
variable = disp_z
auto_direction = 'x y z'
[]
[]
[fix1_x]
type = DirichletBC
boundary = "fix_all"
variable = disp_x
value = 0
[]
[fix1_y]
type = DirichletBC
boundary = "fix_all"
variable = disp_y
value = 0
[]
[fix1_z]
type = DirichletBC
boundary = "fix_all"
variable = disp_z
value = 0
[]
[fix2_x]
type = DirichletBC
boundary = "fix_xy"
variable = disp_x
value = 0
[]
[fix2_y]
type = DirichletBC
boundary = "fix_xy"
variable = disp_y
value = 0
[]
[fix3_z]
type = DirichletBC
boundary = "fix_z"
variable = disp_z
value = 0
[]
[]
[Materials]
[elastic_tensor_1]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
block = '1'
[]
[elastic_tensor_2]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 120000.0
poissons_ratio = 0.21
block = '2'
[]
[elastic_tensor_3]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 80000.0
poissons_ratio = 0.4
block = '3'
[]
[elastic_tensor_4]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 76000.0
poissons_ratio = 0.11
block = '4'
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
homogenization_gradient_names = 'homogenization_gradient'
[]
[compute_homogenization_gradient]
type = ComputeHomogenizedLagrangianStrain
[]
[]
[Preconditioning]
[smp]
type = SMP
full = 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 = 20
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 1.0
[]
[Outputs]
file_base = 3d
exodus = true
[]
(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/multiapps/restart_subapp_ic/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
ymin = 0
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[Functions]
[v_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[]
[AuxVariables]
[v]
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[ufn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = v_fn
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
checkpoint = true
[]
[MultiApps]
[sub_app]
app_type = MooseTestApp
type = TransientMultiApp
input_files = 'sub.i'
execute_on = timestep_end
positions = '0 -1 0'
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[]
[]
(modules/fsi/test/tests/fsi_acoustics/1D_fluid_only/1D_fluid_only.i)
# Test for `AcousticInertia` and `Diffusion` kernels with only the fluid domain. The
# domain is 1D with length 1m and is subjected to an initial condition composed of
# a combination of sine waves. Fluid pressure is recorded at the midpoint of the
# domain. The recorded fluid pressure should match with analytical results. Because
# this implementation is equivalent to solving a 1D wave equation, analytical results
# exist.
#
# Input parameters:
# Dimensions = 1
# Length = 1 meter
# Fluid speed of sound = 1 m/s
# Initial condition = sin(pi*x) + sin(3*pi*x) + sin(5*3.141*x) + sin(7*pi*x) + sin(9*pi*x)
# Fluid domain = true
# Fluid BCs = pressures are zero on both the boundaries
# Structural domain = false
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 500
xmax = 1
[]
[]
[GlobalParams]
[]
[Variables]
[./p]
[../]
[]
[Kernels]
[./diffusion]
type = Diffusion
variable = 'p'
[../]
[./inertia]
type = AcousticInertia
variable = p
[../]
[]
[BCs]
[./leftright_pressure]
type = DirichletBC
variable = p
boundary = 'left right'
value = 0
[../]
[]
[ICs]
[./u_ic]
type = FunctionIC
variable = 'p'
function = initial_cond
[../]
[]
[Functions]
[./initial_cond]
type = ParsedFunction
expression = 'sin(pi*x) + sin(3*pi*x) + sin(5*3.141*x) + sin(7*pi*x) + sin(9*pi*x)'
[../]
[]
[Materials]
[./co_sq]
type = GenericConstantMaterial
prop_names = inv_co_sq
prop_values = 1
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
start_time = 0.0
end_time = 1.0
dt = 0.005
dtmin = 0.00001
nl_abs_tol = 1e-12
nl_rel_tol = 1e-12
l_tol = 1e-12
l_max_its = 25
timestep_tolerance = 1e-8
automatic_scaling = true
[TimeIntegrator]
type = NewmarkBeta
[]
[]
[Postprocessors]
[./p1]
type = PointValue
point = '0.5 0.0 0.0'
variable = p
[../]
[]
[Outputs]
csv = true
perf_graph = true
print_linear_residuals = true
[]
(test/tests/outputs/console/console_final.i)
###########################################################
# This test exercises console Output control. The console
# output is only output every third step. Additionally it
# is forced to be output after the final timestep as well.
#
# @Requirement U1.40
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
# This test uses ElementalVariableValue postprocessors on specific
# elements, so element numbering needs to stay unchanged
allow_renumbering = false
[]
[Functions]
[./ffn]
type = ParsedFunction
expression = -4
[../]
[./exactfn]
type = ParsedFunction
expression = x*x+y*y
[../]
[./aux_exact_fn]
type = ParsedFunction
expression = t*(x*x+y*y)
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = ffn
[../]
[]
[AuxVariables]
[./aux_u]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./a]
type = FunctionAux
variable = aux_u
function = aux_exact_fn
[../]
[]
[BCs]
[./left]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exactfn
[../]
[]
[Postprocessors]
[./elem_56]
type = ElementalVariableValue
variable = u
elementid = 56
[../]
[./aux_elem_99]
type = ElementalVariableValue
variable = aux_u
elementid = 99
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.01
start_time = 0
num_steps = 10
[]
[Outputs]
time_step_interval = 3
execute_on = 'initial timestep_end final'
[]
(modules/solid_mechanics/test/tests/eigenstrain/reducedOrderRZLinear.i)
#
# This test checks whether the ComputeReducedOrderEigenstrain is functioning properly.
#
# If instead of 'reduced_eigenstrain', 'thermal_eigenstrain' is given to
# eigenstrain_names in the Physics/SolidMechanics/QuasiStatic/all block, the output will be
# quite different.
#
# Open the reducedOrderRZLinear_out_hydro_0001.csv file and plot the hydro variables as
# a function of x. For the reduced order case, the values are smooth across each of the
# two elements with a jump upward from the left element to the right element. However,
# when not using 'reduced_order_eigenstrain', a jump downward appears from the left
# element to the right element.
#
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = false
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 1
xmax = 3
xmin = 1
ymax = 1
ymin = 0
#second_order = true
[]
[Functions]
[./tempLinear]
type = ParsedFunction
expression = '715-5*x'
[../]
[./tempQuadratic]
type = ParsedFunction
expression = '2.5*x*x-15*x+722.5'
[../]
[./tempCubic]
type = ParsedFunction
expression = '-1.25*x*x*x+11.25*x*x-33.75*x+733.75'
[../]
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
initial_condition = 700
[../]
[]
[AuxVariables]
[./hydro_constant]
order = CONSTANT
family = MONOMIAL
[../]
[./hydro_first]
order = FIRST
family = MONOMIAL
[../]
[./hydro_second]
order = SECOND
family = MONOMIAL
[../]
[./sxx_constant]
order = CONSTANT
family = MONOMIAL
[../]
[./sxx_first]
order = FIRST
family = MONOMIAL
[../]
[./sxx_second]
order = SECOND
family = MONOMIAL
[../]
[./szz_constant]
order = CONSTANT
family = MONOMIAL
[../]
[./szz_first]
order = FIRST
family = MONOMIAL
[../]
[./szz_second]
order = SECOND
family = MONOMIAL
[../]
[./temp2]
order = FIRST
family = LAGRANGE
initial_condition = 700
[../]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[./all]
add_variables = true
strain = SMALL
incremental = true
temperature = temp2
eigenstrain_names = 'reduced_eigenstrain' #'thermal_eigenstrain'
[../]
[../]
[../]
[]
[Kernels]
[./heat]
type = Diffusion
variable = temp
[../]
[]
[AuxKernels]
[./hydro_constant_aux]
type = RankTwoScalarAux
variable = hydro_constant
rank_two_tensor = stress
scalar_type = Hydrostatic
[../]
[./hydro_first_aux]
type = RankTwoScalarAux
variable = hydro_first
rank_two_tensor = stress
scalar_type = Hydrostatic
[../]
[./hydro_second_aux]
type = RankTwoScalarAux
variable = hydro_second
rank_two_tensor = stress
scalar_type = Hydrostatic
[../]
[./sxx_constant_aux]
type = RankTwoAux
variable = sxx_constant
rank_two_tensor = stress
index_i = 0
index_j = 0
[../]
[./sxx_first_aux]
type = RankTwoAux
variable = sxx_first
rank_two_tensor = stress
index_i = 0
index_j = 0
[../]
[./sxx_second_aux]
type = RankTwoAux
variable = sxx_second
rank_two_tensor = stress
index_i = 0
index_j = 0
[../]
[./szz_constant_aux]
type = RankTwoAux
variable = szz_constant
rank_two_tensor = stress
index_i = 2
index_j = 2
[../]
[./szz_first_aux]
type = RankTwoAux
variable = szz_first
rank_two_tensor = stress
index_i = 2
index_j = 2
[../]
[./szz_second_aux]
type = RankTwoAux
variable = szz_second
rank_two_tensor = stress
index_i = 2
index_j = 2
[../]
[./temp2]
type = FunctionAux
variable = temp2
function = tempLinear
execute_on = timestep_begin
[../]
[]
[BCs]
[./no_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom top'
value = 0.0
[../]
[./temp_right]
type = DirichletBC
variable = temp
boundary = right
value = 700
[../]
[./temp_left]
type = DirichletBC
variable = temp
boundary = left
value = 710
[../]
[]
[Materials]
[./fuel_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1
poissons_ratio = 0
[../]
[./fuel_thermal_expansion]
type = ComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 1
temperature = temp2
stress_free_temperature = 700.0
eigenstrain_name = 'thermal_eigenstrain'
[../]
[./reduced_order_eigenstrain]
type = ComputeReducedOrderEigenstrain
input_eigenstrain_names = 'thermal_eigenstrain'
eigenstrain_name = 'reduced_eigenstrain'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew '
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type'
petsc_options_value = '70 hypre boomeramg'
num_steps = 1
nl_rel_tol = 1e-8 #1e-12
[]
[Postprocessors]
[./_dt]
type = TimestepSize
[../]
[]
[VectorPostprocessors]
[./hydro]
type = LineValueSampler
warn_discontinuous_face_values = false
num_points = 100
start_point = '1 0.07e-3 0'
end_point = '3 0.07e-3 0'
sort_by = x
variable = 'hydro_constant hydro_first hydro_second temp2 disp_x disp_y'
[../]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/xfem/test/tests/solid_mechanics_basic/edge_crack_3d_mhs.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[XFEM]
geometric_cut_userobjects = 'cut_mesh'
qrule = volfrac
output_cut_plane = true
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 5
ny = 5
nz = 2
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
zmin = 0.0
zmax = 0.2
elem_type = HEX8
[]
[UserObjects]
[./cut_mesh]
type = CrackMeshCut3DUserObject
mesh_file = mesh_edge_crack.xda
growth_dir_method = MAX_HOOP_STRESS
size_control = 1
n_step_growth = 1
growth_rate = growth_func_v
crack_front_nodes = '7 6 5 4'
[../]
[]
[Functions]
[./growth_func_v]
type = ParsedFunction
expression = 0.15
[../]
[]
[DomainIntegral]
integrals = 'Jintegral InteractionIntegralKI InteractionIntegralKII'
displacements = 'disp_x disp_y disp_z'
crack_front_points_provider = cut_mesh
number_points_from_provider = 4
crack_direction_method = CurvedCrackFront
radius_inner = '0.15'
radius_outer = '0.45'
poissons_ratio = 0.3
youngs_modulus = 207000
block = 0
incremental = true
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress'
[../]
[]
[Functions]
[./top_trac_x]
type = ConstantFunction
value = 100
[../]
[./top_trac_y]
type = ConstantFunction
value = 0
[../]
[]
[BCs]
[./top_x]
type = FunctionNeumannBC
boundary = top
variable = disp_x
function = top_trac_x
[../]
[./top_y]
type = FunctionNeumannBC
boundary = top
variable = disp_y
function = top_trac_y
[../]
[./bottom_x]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[../]
[./bottom_y]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[./bottom_z]
type = DirichletBC
boundary = bottom
variable = disp_z
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
block = 0
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
line_search = 'none'
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
# controls for linear iterations
l_max_its = 100
l_tol = 1e-2
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
# time control
start_time = 0.0
dt = 1.0
end_time = 4.0
max_xfem_update = 1
[]
[Outputs]
file_base = edge_crack_3d_mhs_out
execute_on = 'timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/contact/test/tests/sliding_block/sliding/frictional_02_penalty.i)
# This is a benchmark test that checks constraint based frictional
# contact using the penalty method. In this test a constant
# displacement is applied in the horizontal direction to simulate
# a small block come sliding down a larger block.
#
# A friction coefficient of 0.2 is used. The gold file is run on one processor
# and the benchmark case is run on a minimum of 4 processors to ensure no
# parallel variability in the contact pressure and penetration results.
#
[Mesh]
file = sliding_elastic_blocks_2d.e
patch_size = 80
[]
[GlobalParams]
volumetric_locking_correction = false
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[penetration]
[]
[inc_slip_x]
[]
[inc_slip_y]
[]
[accum_slip_x]
[]
[accum_slip_y]
[]
[]
[Functions]
[vertical_movement]
type = ParsedFunction
expression = -t
[]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = true
strain = FINITE
[]
[]
[AuxKernels]
[zeroslip_x]
type = ConstantAux
variable = inc_slip_x
boundary = 3
execute_on = timestep_begin
value = 0.0
[]
[zeroslip_y]
type = ConstantAux
variable = inc_slip_y
boundary = 3
execute_on = timestep_begin
value = 0.0
[]
[accum_slip_x]
type = AccumulateAux
variable = accum_slip_x
accumulate_from_variable = inc_slip_x
execute_on = timestep_end
[]
[accum_slip_y]
type = AccumulateAux
variable = accum_slip_y
accumulate_from_variable = inc_slip_y
execute_on = timestep_end
[]
[penetration]
type = PenetrationAux
variable = penetration
boundary = 3
paired_boundary = 2
[]
[]
[Postprocessors]
[nonlinear_its]
type = NumNonlinearIterations
execute_on = timestep_end
[]
[penetration]
type = NodalVariableValue
variable = penetration
nodeid = 222
[]
[contact_pressure]
type = NodalVariableValue
variable = contact_pressure
nodeid = 222
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[]
[right_x]
type = DirichletBC
variable = disp_x
boundary = 4
value = -0.02
[]
[right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = vertical_movement
[]
[]
[Materials]
[left]
type = ComputeIsotropicElasticityTensor
block = '1 2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
line_search = 'none'
l_max_its = 100
nl_max_its = 1000
dt = 0.1
end_time = 15
num_steps = 1000
l_tol = 1e-6
nl_rel_tol = 1e-10
nl_abs_tol = 1e-6
dtmin = 0.01
[Predictor]
type = SimplePredictor
scale = 1.0
[]
[]
[Outputs]
time_step_interval = 10
[out]
type = Exodus
elemental_as_nodal = true
[]
[console]
type = Console
max_rows = 5
[]
[]
[Contact]
[leftright]
secondary = 3
primary = 2
model = coulomb
penalty = 4e+6
friction_coefficient = 0.2
formulation = penalty
normal_smoothing_distance = 0.1
[]
[]
(modules/combined/examples/publications/rapid_dev/fig6.i)
#
# Fig. 6 input for 10.1016/j.commatsci.2017.02.017
# D. Schwen et al./Computational Materials Science 132 (2017) 36-45
# Three phase interface simulation demonstrating the interfacial stability
# w.r.t. formation of a tspurious third phase
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 120
ny = 120
nz = 0
xmin = 0
xmax = 40
ymin = 0
ymax = 40
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
# concentration
[./c]
[../]
# order parameter 1
[./eta1]
[../]
# order parameter 2
[./eta2]
[../]
# order parameter 3
[./eta3]
[../]
# phase concentration 1
[./c1]
initial_condition = 0.4
[../]
# phase concentration 2
[./c2]
initial_condition = 0.5
[../]
# phase concentration 3
[./c3]
initial_condition = 0.8
[../]
# Lagrange multiplier
[./lambda]
initial_condition = 0.0
[../]
[]
[AuxVariables]
[./T]
[./InitialCondition]
type = FunctionIC
function = 'x-10'
[../]
[../]
[]
[Functions]
[./ic_func_eta1]
type = ParsedFunction
expression = '0.5*(1.0+tanh((x-10)/sqrt(2.0))) * 0.5*(1.0+tanh((y-10)/sqrt(2.0)))'
[../]
[./ic_func_eta2]
type = ParsedFunction
expression = '0.5*(1.0-tanh((x-10)/sqrt(2.0)))'
[../]
[./ic_func_eta3]
type = ParsedFunction
expression = '1 - 0.5*(1.0-tanh((x-10)/sqrt(2.0)))
- 0.5*(1.0+tanh((x-10)/sqrt(2.0))) * 0.5*(1.0+tanh((y-10)/sqrt(2.0)))'
[../]
[./ic_func_c]
type = ParsedFunction
expression = '0.5 * 0.5*(1.0-tanh((x-10)/sqrt(2.0)))
+ 0.4 * 0.5*(1.0+tanh((x-10)/sqrt(2.0))) * 0.5*(1.0+tanh((y-10)/sqrt(2.0)))
+ 0.8 * (1 - 0.5*(1.0-tanh((x-10)/sqrt(2.0)))
- 0.5*(1.0+tanh((x-10)/sqrt(2.0))) * 0.5*(1.0+tanh((y-10)/sqrt(2.0))))'
[../]
[]
[ICs]
[./eta1]
variable = eta1
type = FunctionIC
function = ic_func_eta1
[../]
[./eta2]
variable = eta2
type = FunctionIC
function = ic_func_eta2
[../]
[./eta3]
variable = eta3
type = FunctionIC
function = ic_func_eta3
[../]
[./c]
variable = c
type = FunctionIC
function = ic_func_c
[../]
[]
[Materials]
# simple toy free energies
[./f1]
type = DerivativeParsedMaterial
property_name = F1
coupled_variables = 'c1'
expression = '20*(c1-0.4)^2'
[../]
[./f2]
type = DerivativeParsedMaterial
property_name = F2
coupled_variables = 'c2 T'
expression = '20*(c2-0.5)^2 + 0.01*T'
[../]
[./f3]
type = DerivativeParsedMaterial
property_name = F3
coupled_variables = 'c3'
expression = '20*(c3-0.8)^2'
[../]
# Switching functions for each phase
# h1(eta1, eta2, eta3)
[./h1]
type = SwitchingFunction3PhaseMaterial
eta_i = eta1
eta_j = eta2
eta_k = eta3
f_name = h1
[../]
# h2(eta1, eta2, eta3)
[./h2]
type = SwitchingFunction3PhaseMaterial
eta_i = eta2
eta_j = eta3
eta_k = eta1
f_name = h2
[../]
# h3(eta1, eta2, eta3)
[./h3]
type = SwitchingFunction3PhaseMaterial
eta_i = eta3
eta_j = eta1
eta_k = eta2
f_name = h3
[../]
# Coefficients for diffusion equation
[./Dh1]
type = DerivativeParsedMaterial
material_property_names = 'D h1'
expression = D*h1
property_name = Dh1
[../]
[./Dh2]
type = DerivativeParsedMaterial
material_property_names = 'D h2'
expression = D*h2
property_name = Dh2
[../]
[./Dh3]
type = DerivativeParsedMaterial
material_property_names = 'D h3'
expression = D*h3
property_name = Dh3
[../]
# Barrier functions for each phase
[./g1]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta1
function_name = g1
[../]
[./g2]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta2
function_name = g2
[../]
[./g3]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta3
function_name = g3
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'L kappa D'
prop_values = '1.0 1.0 1'
[../]
[]
[Kernels]
#Kernels for diffusion equation
[./diff_time]
type = TimeDerivative
variable = c
[../]
[./diff_c1]
type = MatDiffusion
variable = c
diffusivity = Dh1
v = c1
[../]
[./diff_c2]
type = MatDiffusion
variable = c
diffusivity = Dh2
v = c2
[../]
[./diff_c3]
type = MatDiffusion
variable = c
diffusivity = Dh3
v = c3
[../]
# Kernels for Allen-Cahn equation for eta1
[./deta1dt]
type = TimeDerivative
variable = eta1
[../]
[./ACBulkF1]
type = KKSMultiACBulkF
variable = eta1
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g1
eta_i = eta1
wi = 1.0
args = 'c1 c2 c3 eta2 eta3'
[../]
[./ACBulkC1]
type = KKSMultiACBulkC
variable = eta1
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta1
args = 'eta2 eta3'
[../]
[./ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa
[../]
[./multipler1]
type = MatReaction
variable = eta1
v = lambda
mob_name = L
[../]
# Kernels for Allen-Cahn equation for eta2
[./deta2dt]
type = TimeDerivative
variable = eta2
[../]
[./ACBulkF2]
type = KKSMultiACBulkF
variable = eta2
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g2
eta_i = eta2
wi = 1.0
args = 'c1 c2 c3 eta1 eta3'
[../]
[./ACBulkC2]
type = KKSMultiACBulkC
variable = eta2
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta2
args = 'eta1 eta3'
[../]
[./ACInterface2]
type = ACInterface
variable = eta2
kappa_name = kappa
[../]
[./multipler2]
type = MatReaction
variable = eta2
v = lambda
mob_name = L
[../]
# Kernels for the Lagrange multiplier equation
[./mult_lambda]
type = MatReaction
variable = lambda
mob_name = 3
[../]
[./mult_ACBulkF_1]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g1
eta_i = eta1
wi = 1.0
mob_name = 1
args = 'c1 c2 c3 eta2 eta3'
[../]
[./mult_ACBulkC_1]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta1
args = 'eta2 eta3'
mob_name = 1
[../]
[./mult_CoupledACint_1]
type = SimpleCoupledACInterface
variable = lambda
v = eta1
kappa_name = kappa
mob_name = 1
[../]
[./mult_ACBulkF_2]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g2
eta_i = eta2
wi = 1.0
mob_name = 1
args = 'c1 c2 c3 eta1 eta3'
[../]
[./mult_ACBulkC_2]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta2
args = 'eta1 eta3'
mob_name = 1
[../]
[./mult_CoupledACint_2]
type = SimpleCoupledACInterface
variable = lambda
v = eta2
kappa_name = kappa
mob_name = 1
[../]
[./mult_ACBulkF_3]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g3
eta_i = eta3
wi = 1.0
mob_name = 1
args = 'c1 c2 c3 eta1 eta2'
[../]
[./mult_ACBulkC_3]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta3
args = 'eta1 eta2'
mob_name = 1
[../]
[./mult_CoupledACint_3]
type = SimpleCoupledACInterface
variable = lambda
v = eta3
kappa_name = kappa
mob_name = 1
[../]
# Kernels for constraint equation eta1 + eta2 + eta3 = 1
# eta3 is the nonlinear variable for the constraint equation
[./eta3reaction]
type = MatReaction
variable = eta3
mob_name = 1
[../]
[./eta1reaction]
type = MatReaction
variable = eta3
v = eta1
mob_name = 1
[../]
[./eta2reaction]
type = MatReaction
variable = eta3
v = eta2
mob_name = 1
[../]
[./one]
type = BodyForce
variable = eta3
value = -1.0
[../]
# Phase concentration constraints
[./chempot12]
type = KKSPhaseChemicalPotential
variable = c1
cb = c2
fa_name = F1
fb_name = F2
[../]
[./chempot23]
type = KKSPhaseChemicalPotential
variable = c2
cb = c3
fa_name = F2
fb_name = F3
[../]
[./phaseconcentration]
type = KKSMultiPhaseConcentration
variable = c3
cj = 'c1 c2 c3'
hj_names = 'h1 h2 h3'
etas = 'eta1 eta2 eta3'
c = c
[../]
[]
[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-10
nl_abs_tol = 1.0e-11
num_steps = 1000
[./TimeStepper]
type = IterationAdaptiveDT
dt = 0.2
optimal_iterations = 10
iteration_window = 2
[../]
[]
[Preconditioning]
active = 'full'
[./full]
type = SMP
full = true
[../]
[./mydebug]
type = FDP
full = true
[../]
[]
[Outputs]
exodus = true
checkpoint = true
print_linear_residuals = false
[./csv]
type = CSV
execute_on = 'final'
[../]
[]
#[VectorPostprocessors]
# [./c]
# type = LineValueSampler
# start_point = '-25 0 0'
# end_point = '25 0 0'
# variable = c
# num_points = 151
# sort_by = id
# execute_on = timestep_end
# [../]
# [./eta1]
# type = LineValueSampler
# start_point = '-25 0 0'
# end_point = '25 0 0'
# variable = eta1
# num_points = 151
# sort_by = id
# execute_on = timestep_end
# [../]
# [./eta2]
# type = LineValueSampler
# start_point = '-25 0 0'
# end_point = '25 0 0'
# variable = eta2
# num_points = 151
# sort_by = id
# execute_on = timestep_end
# [../]
# [./eta3]
# type = LineValueSampler
# start_point = '-25 0 0'
# end_point = '25 0 0'
# variable = eta3
# num_points = 151
# sort_by = id
# execute_on = timestep_end
# [../]
#[]
(modules/optimization/examples/simpleTransient/nonlinear_forward_and_adjoint.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin = -1
xmax = 1
ymin = -1
ymax = 1
[]
[]
[Variables]
[u]
[]
[]
[VectorPostprocessors]
[src_values]
type = CSVReader
csv_file = source_params.csv
header = true
outputs = none
[]
[]
[ICs]
[initial]
type = FunctionIC
variable = u
function = exact
[]
[]
[Kernels]
[dt]
type = ADTimeDerivative
variable = u
[]
[diff]
type = ADMatDiffusion
variable = u
diffusivity = D
[]
[src]
type = ADBodyForce
variable = u
function = source
[]
[]
[BCs]
[dirichlet]
type = DirichletBC
variable = u
boundary = 'left right top bottom'
value = 0
[]
[]
[Materials]
[diffc]
type = ADParsedMaterial
property_name = D
expression = '1 + u'
coupled_variables = u
[]
[]
[Functions]
[exact]
type = ParsedFunction
value = '2*exp(-2.0*(x - sin(2*pi*t))^2)*exp(-2.0*(y - cos(2*pi*t))^2)*cos((1/2)*x*pi)*cos((1/2)*y*pi)/pi'
[]
[source]
type = NearestReporterCoordinatesFunction
x_coord_name = src_values/coordx
y_coord_name = src_values/coordy
time_name = src_values/time
value_name = src_values/values
[]
[]
[Executioner]
type = TransientAndAdjoint
forward_system = nl0
adjoint_system = adjoint
num_steps = 100
end_time = 1
nl_rel_tol = 1e-12
l_tol = 1e-12
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Reporters]
[measured_data]
type = OptimizationData
measurement_file = mms_data.csv
file_xcoord = x
file_ycoord = y
file_zcoord = z
file_time = t
file_value = u
variable = u
execute_on = timestep_end
outputs = none
[]
[]
[Postprocessors]
[topRight_pp]
type = PointValue
point = '0.5 0.5 0'
variable = u
execute_on = TIMESTEP_END
[]
[bottomRight_pp]
type = PointValue
point = '-0.5 0.5 0'
variable = u
execute_on = TIMESTEP_END
[]
[bottomLeft_pp]
type = PointValue
point = '-0.5 -0.5 0'
variable = u
execute_on = TIMESTEP_END
[]
[topLeft_pp]
type = PointValue
point = '0.5 -0.5 0'
variable = u
execute_on = TIMESTEP_END
[]
[]
[Outputs]
csv = true
console = false
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
kernel_coverage_check = false
[]
[Variables]
[u_adjoint]
solver_sys = adjoint
outputs = none
[]
[]
[DiracKernels]
[misfit]
type = ReporterTimePointSource
variable = u_adjoint
value_name = measured_data/misfit_values
x_coord_name = measured_data/measurement_xcoord
y_coord_name = measured_data/measurement_ycoord
z_coord_name = measured_data/measurement_zcoord
time_name = measured_data/measurement_time
[]
[]
[VectorPostprocessors]
[adjoint]
type = ElementOptimizationSourceFunctionInnerProduct
variable = u_adjoint
function = source
execute_on = ADJOINT_TIMESTEP_END
outputs = none
[]
[]
(modules/richards/test/tests/buckley_leverett/bl20_lumped.i)
# two-phase version
[Mesh]
type = GeneratedMesh
dim = 1
nx = 30
xmin = 0
xmax = 15
[]
[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 = '0.1 0.5 0.5 1 2 4'
x = '0 0.1 1 5 40 42'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E6
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 2E6
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1E-5
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1E-5
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./SatWater]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SatGas]
type = RichardsSat
s_res = 0.0
sum_s_res = 0.0
[../]
[./SUPGwater]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[./SUPGgas]
type = RichardsSUPGstandard
p_SUPG = 1E-5
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./w_aux_seff]
[../]
[]
[Kernels]
[./richardstwater]
type = RichardsLumpedMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFlux
variable = pwater
[../]
[./richardstgas]
type = RichardsLumpedMassChange
variable = pgas
[../]
[./richardsfgas]
type = RichardsFlux
variable = pgas
[../]
[]
[AuxKernels]
[./w_aux_seff_auxk]
type = RichardsSeffAux
seff_UO = SeffWater
pressure_vars = 'pwater pgas'
variable = w_aux_seff
[../]
[]
[ICs]
[./water_ic]
type = FunctionIC
variable = pwater
function = initial_water
[../]
[./gas_ic]
type = FunctionIC
variable = pgas
function = initial_gas
[../]
[]
[BCs]
[./left_w]
type = DirichletBC
variable = pwater
boundary = left
value = 1E6
[../]
[./left_g]
type = DirichletBC
variable = pgas
boundary = left
value = 1000
[../]
[./right_w]
type = DirichletBC
variable = pwater
boundary = right
value = -300000
[../]
[./right_g]
type = DirichletBC
variable = pgas
boundary = right
value = 0
[../]
[]
[Functions]
[./initial_water]
type = ParsedFunction
expression = 1000000*(1-min(x/5,1))-if(x<5,0,300000)
[../]
[./initial_gas]
type = ParsedFunction
expression = 1000
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.15
mat_permeability = '1E-10 0 0 0 1E-10 0 0 0 1E-10'
viscosity = '1E-3 1E-6'
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
active = 'standard'
[./bounded]
# must use --use-petsc-dm command line argument
type = SMP
full = true
petsc_options_iname = '-snes_type -pc_factor_shift_type'
petsc_options_value = 'vinewtonssls nonzero'
[../]
[./standard]
type = SMP
full = true
petsc_options_iname = '-pc_factor_shift_type'
petsc_options_value = 'nonzero'
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 50
nl_rel_tol = 1.e-9
nl_max_its = 10
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = bl20_lumped
execute_on = 'initial timestep_end final'
time_step_interval = 100000
exodus = true
hide = pgas
[./console_out]
type = Console
time_step_interval = 1
[../]
[]
(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/heat_transfer/test/tests/code_verification/cylindrical_test_no1.i)
# Problem II.1
#
# An infinitely long hollow cylinder has an inner radius ri and
# outer radius ro. It has a constant thermal conductivity k and
# internal heat generation q. It is allowed to reach thermal
# equilibrium while being exposed to constant temperatures on its
# inside and outside boundaries: u(ri) = ui and u(ro) = uo.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
xmin = 0.2
nx = 4
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Problem]
coord_type = RZ
[]
[Functions]
[./exact]
type = ParsedFunction
symbol_names = 'ri ro ui uo'
symbol_values = '0.2 1.0 300 0'
expression = '( uo * log(ri) - ui * log(ro) + (ui-uo) * log(x) ) / log(ri/ro)'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[]
[BCs]
[./ui]
type = DirichletBC
boundary = left
variable = u
value = 300
[../]
[./uo]
type = DirichletBC
boundary = right
variable = u
value = 0
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1.0 1.0 5.0'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = true
[]
(test/tests/mortar/continuity-3d-non-conforming/continuity_sphere_hex.i)
[Mesh]
second_order = false
[file]
type = FileMeshGenerator
file = spheres_hex8.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
new_block_id = 11
new_block_name = "secondary"
sidesets = '101'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
new_block_id = 12
new_block_name = "primary"
sidesets = '102'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[T]
block = '1 2'
[]
[lambda]
block = 'secondary'
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln_primal
variable = T
boundary = '1 2'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = 'x^2 + y^2 + z^2 - 6'
[]
[exact_soln_primal]
type = ParsedFunction
expression = 'x^2 + y^2 + z^2'
[]
[exact_soln_lambda]
type = ParsedFunction
expression = '4'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = '12'
secondary_subdomain = '11'
variable = lambda
secondary_variable = T
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[L2lambda]
type = ElementL2Error
variable = lambda
function = exact_soln_lambda
execute_on = 'timestep_end'
block = 'secondary'
[]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = '1 2'
[]
[h]
type = AverageElementSize
block = '1 2'
[]
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/small-tests/1d.i)
# 1D strain controlled test
[GlobalParams]
displacements = 'disp_x'
large_kinematics = false
macro_gradient = hvar
homogenization_constraint = homogenization
[]
[Mesh]
[base]
type = FileMeshGenerator
file = '1d.exo'
[]
[ss]
type = SideSetsFromPointsGenerator
input = base
points = '-1 0 0
7 0 0'
new_boundary = 'left right'
[]
[]
[Variables]
[disp_x]
[]
[hvar]
family = SCALAR
order = FIRST
[]
[]
[AuxVariables]
[sxx]
family = MONOMIAL
order = CONSTANT
[]
[exx]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[sxx]
type = RankTwoAux
variable = sxx
rank_two_tensor = pk1_stress
index_i = 0
index_j = 0
[]
[exx]
type = RankTwoAux
variable = exx
rank_two_tensor = mechanical_strain
index_i = 0
index_j = 0
[]
[]
[UserObjects]
[homogenization]
type = HomogenizationConstraint
constraint_types = ${constraint_types}
targets = ${targets}
execute_on = 'INITIAL LINEAR NONLINEAR'
[]
[]
[Kernels]
[sdx]
type = HomogenizedTotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[]
[ScalarKernels]
[enforce]
type = HomogenizationConstraintScalarKernel
variable = hvar
[]
[]
[Functions]
[func_stress]
type = ParsedFunction
expression = '1800*t'
[]
[func_strain]
type = ParsedFunction
expression = '1.0e-2*t'
[]
[]
[BCs]
[Periodic]
[all]
variable = disp_x
auto_direction = 'x'
[]
[]
[centerfix_x]
type = DirichletBC
boundary = "fixme"
variable = disp_x
value = 0
[]
[]
[Materials]
[elastic_tensor_1]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
block = '1'
[]
[elastic_tensor_2]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 120000.0
poissons_ratio = 0.21
block = '2'
[]
[elastic_tensor_3]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 80000.0
poissons_ratio = 0.4
block = '3'
[]
[elastic_tensor_4]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 76000.0
poissons_ratio = 0.11
block = '4'
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[compute_strain]
type = ComputeLagrangianStrain
homogenization_gradient_names = 'homogenization_gradient'
[]
[compute_homogenization_gradient]
type = ComputeHomogenizedLagrangianStrain
[]
[]
[Postprocessors]
[sxx]
type = ElementAverageValue
variable = sxx
execute_on = 'initial timestep_end'
[]
[exx]
type = ElementAverageValue
variable = exx
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
solve_type = 'newton'
line_search = default
automatic_scaling = true
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-6
nl_abs_tol = 1e-8
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 1.0
[]
[Outputs]
exodus = false
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/controls/switch-pressure-bc/switch_vel_pres_bc.i)
rho = 'rho'
l = 10
inlet_area = 1
velocity_interp_method = 'rc'
advected_interp_method = 'average'
# Artificial fluid properties
# For a real case, use a GeneralFluidFunctorProperties and a viscosity rampdown
# or initialize very well!
k = 1
cp = 1000
mu = 1e2
# Operating conditions
inlet_temp = 300
outlet_pressure = 1e5
inlet_velocity = 0.001
end_time = 3.0
switch_time = 1.0
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${l}
ymin = 0
ymax = 1
nx = 10
ny = 5
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = ${inlet_velocity}
[]
[v]
type = INSFVVelocityVariable
[]
[pressure]
type = INSFVPressureVariable
initial_condition = ${outlet_pressure}
[]
[T]
type = INSFVEnergyVariable
initial_condition = ${inlet_temp}
[]
[]
[AuxVariables]
[power_density]
type = MooseVariableFVReal
initial_condition = 1e4
[]
[]
[FVKernels]
[mass_time]
type = WCNSFVMassTimeDerivative
variable = pressure
drho_dt = drho_dt
[]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_time]
type = WCNSFVMomentumTimeDerivative
variable = u
drho_dt = drho_dt
rho = rho
momentum_component = 'x'
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[v_time]
type = WCNSFVMomentumTimeDerivative
variable = v
drho_dt = drho_dt
rho = rho
momentum_component = 'y'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[temp_time]
type = WCNSFVEnergyTimeDerivative
variable = T
rho = rho
drho_dt = drho_dt
[]
[temp_conduction]
type = FVDiffusion
coeff = 'k'
variable = T
[]
[temp_advection]
type = INSFVEnergyAdvection
variable = T
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
[]
[heat_source]
type = FVCoupledForce
variable = T
v = power_density
[]
[]
[FVBCs]
# Inlet
[inlet_u]
type = WCNSFVSwitchableInletVelocityBC
variable = u
boundary = 'left'
mdot_pp = 'inlet_mdot'
area_pp = 'surface_inlet'
rho = 'rho'
switch_bc = true
face_limiter = 1.0
[]
[outlet_u]
type = WCNSFVSwitchableInletVelocityBC
variable = u
boundary = 'right'
mdot_pp = 'inlet_mdot'
area_pp = 'surface_inlet'
rho = 'rho'
switch_bc = false
scaling_factor = -1.0
face_limiter = 1.0
[]
[inlet_v]
type = WCNSFVInletVelocityBC
variable = v
boundary = 'left'
mdot_pp = 0
area_pp = 'surface_inlet'
rho = 'rho'
[]
[inlet_T]
type = WCNSFVInletTemperatureBC
variable = T
boundary = 'left'
temperature_pp = 'inlet_T'
[]
[outlet_T]
type = NSFVOutflowTemperatureBC
variable = T
boundary = 'right'
u = u
v = v
rho = 'rho'
cp = 'cp'
backflow_T = ${inlet_temp}
[]
[outlet_p]
type = INSFVSwitchableOutletPressureBC
variable = pressure
boundary = 'right'
function = ${outlet_pressure}
switch_bc = true
face_limiter = 1.0
[]
[inlet_p]
type = INSFVSwitchableOutletPressureBC
variable = pressure
boundary = 'left'
function = ${outlet_pressure}
switch_bc = false
face_limiter = 1.0
[]
# Walls
[no_slip_x]
type = INSFVNoSlipWallBC
variable = u
boundary = 'top bottom'
function = 0
[]
[no_slip_y]
type = INSFVNoSlipWallBC
variable = v
boundary = 'top bottom'
function = 0
[]
[]
[Functions]
[func_coef]
type = ParsedFunction
expression = 'if(t<${switch_time} | t>2.0*${switch_time}, 1, 0)'
[]
[func_coef_comp]
type = ParsedFunction
expression = 'if(t<${switch_time} | t>2.0*${switch_time}, 0, 1)'
[]
[mass_flux_and_pressure_test_scaling]
type = ParsedFunction
expression = 'if(t<${switch_time} | t>2.0*${switch_time}, 0.1, 0.2)'
[]
[]
[Controls]
[func_control_u_inlet]
type = BoolFunctionControl
parameter = 'FVBCs/inlet_u/switch_bc'
function = 'func_coef'
execute_on = 'initial timestep_begin'
[]
[func_control_u_outlet]
type = BoolFunctionControl
parameter = 'FVBCs/outlet_u/switch_bc'
function = 'func_coef_comp'
execute_on = 'initial timestep_begin'
[]
[func_control_p_outlet]
type = BoolFunctionControl
parameter = 'FVBCs/outlet_p/switch_bc'
function = 'func_coef'
execute_on = 'initial timestep_begin'
[]
[func_control_p_inlet]
type = BoolFunctionControl
parameter = 'FVBCs/inlet_p/switch_bc'
function = 'func_coef_comp'
execute_on = 'initial timestep_begin'
[]
[func_control_limiter_u_inlet]
type = RealFunctionControl
parameter = 'FVBCs/inlet_u/face_limiter'
function = 'mass_flux_and_pressure_test_scaling'
execute_on = 'initial timestep_begin'
[]
[func_control_limiter_u_outlet]
type = RealFunctionControl
parameter = 'FVBCs/outlet_u/face_limiter'
function = 'mass_flux_and_pressure_test_scaling'
execute_on = 'initial timestep_begin'
[]
[func_control_limiter_p_outlet]
type = RealFunctionControl
parameter = 'FVBCs/outlet_p/face_limiter'
function = 'mass_flux_and_pressure_test_scaling'
execute_on = 'initial timestep_begin'
[]
[func_control_limiter_p_inlet]
type = RealFunctionControl
parameter = 'FVBCs/inlet_p/face_limiter'
function = 'mass_flux_and_pressure_test_scaling'
execute_on = 'initial timestep_begin'
[]
[]
# used for the boundary conditions in this example
[Postprocessors]
[inlet_mdot]
type = Receiver
default = '${fparse 1980 * inlet_velocity * inlet_area}'
[]
[surface_inlet]
type = AreaPostprocessor
boundary = 'left'
execute_on = 'INITIAL'
[]
[inlet_T]
type = Receiver
default = ${inlet_temp}
[]
[outlet_mfr]
type = VolumetricFlowRate
boundary = 'right'
advected_quantity = 1.0
vel_x = u
vel_y = v
[]
[]
[FluidProperties]
[fp]
type = FlibeFluidProperties
[]
[]
[FunctorMaterials]
[const_functor]
type = ADGenericFunctorMaterial
prop_names = 'cp k'
prop_values = '${cp} ${k}'
[]
[rho]
type = RhoFromPTFunctorMaterial
fp = fp
temperature = T
pressure = pressure
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = 'T'
rho = ${rho}
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
dt = 0.1
end_time = ${end_time}
nl_abs_tol = 1e-12
nl_max_its = 50
line_search = 'none'
automatic_scaling = true
[]
[Outputs]
csv = true
execute_on = 'TIMESTEP_END'
[]
(modules/contact/test/tests/frictional/single_point_2d/single_point_2d_predictor.i)
[Mesh]
file = single_point_2d.e
[]
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = false
[]
[AuxVariables]
[./penetration]
[../]
[./saved_x]
[../]
[./saved_y]
[../]
[./diag_saved_x]
[../]
[./diag_saved_y]
[../]
[./inc_slip_x]
[../]
[./inc_slip_y]
[../]
[./accum_slip_x]
[../]
[./accum_slip_y]
[../]
[]
[Functions]
[./horizontal_movement]
type = ParsedFunction
expression = t
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
strain = FINITE
save_in = 'saved_x saved_y'
diag_save_in = 'diag_saved_x diag_saved_y'
[../]
[]
[AuxKernels]
[./incslip_x]
type = PenetrationAux
variable = inc_slip_x
quantity = incremental_slip_x
boundary = 3
paired_boundary = 2
[../]
[./incslip_y]
type = PenetrationAux
variable = inc_slip_y
quantity = incremental_slip_y
boundary = 3
paired_boundary = 2
[../]
[./accum_slip_x]
type = AccumulateAux
variable = accum_slip_x
accumulate_from_variable = inc_slip_x
execute_on = timestep_end
[../]
[./accum_slip_y]
type = AccumulateAux
variable = accum_slip_y
accumulate_from_variable = inc_slip_y
execute_on = timestep_end
[../]
[./penetration]
type = PenetrationAux
variable = penetration
boundary = 3
paired_boundary = 2
[../]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./botx2]
type = DirichletBC
variable = disp_x
boundary = 2
value = 0.0
[../]
[./boty2]
type = DirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[./topx]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = horizontal_movement
[../]
[./topy]
type = DirichletBC
variable = disp_y
boundary = 4
value = -0.005
[../]
[]
[Materials]
[./bottom]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1.0e9
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[../]
[./top]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[../]
[]
[Postprocessors]
[./bot_react_x]
type = NodalSum
variable = saved_x
boundary = 1
[../]
[./bot_react_y]
type = NodalSum
variable = saved_y
boundary = 1
[../]
[./top_react_x]
type = NodalSum
variable = saved_x
boundary = 4
[../]
[./top_react_y]
type = NodalSum
variable = saved_y
boundary = 4
[../]
[./ref_resid_x]
type = NodalL2Norm
execute_on = timestep_end
variable = saved_x
[../]
[./ref_resid_y]
type = NodalL2Norm
execute_on = timestep_end
variable = saved_y
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
line_search = 'none'
l_max_its = 100
nl_max_its = 200
dt = 0.001
end_time = 0.01
num_steps = 1000
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
dtmin = 0.001
l_tol = 1e-3
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
[]
[Outputs]
exodus = true
print_linear_residuals = true
perf_graph = true
[./console]
type = Console
max_rows = 5
[../]
[]
[Contact]
[./leftright]
primary = 2
secondary = 3
model = coulomb
friction_coefficient = '0.25'
[../]
[]
[Dampers]
[./contact_slip]
type = ContactSlipDamper
primary = '2'
secondary = '3'
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/transient_fsp.i)
n=64
mu=2e-3
[GlobalParams]
gravity = '0 0 0'
preset = true
supg = false
[]
[Problem]
extra_tag_matrices = 'mass'
previous_nl_solution_required = true
type = NavierStokesProblem
mass_matrix = 'mass'
schur_fs_index = '1'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = ${n}
ny = ${n}
elem_type = QUAD9
[]
[]
[Variables]
[vel_x]
order = SECOND
family = LAGRANGE
[]
[vel_y]
order = SECOND
family = LAGRANGE
[]
[p]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
# mass
[mass]
type = INSMass
variable = p
u = vel_x
v = vel_y
pressure = p
[]
[x_time]
type = INSMomentumTimeDerivative
variable = vel_x
[]
[x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[]
[x_mass]
type = MassMatrix
variable = vel_x
matrix_tags = 'mass'
[]
[y_time]
type = INSMomentumTimeDerivative
variable = vel_y
[]
[y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[]
[y_mass]
type = MassMatrix
variable = vel_y
matrix_tags = 'mass'
[]
[]
[BCs]
[x_no_slip]
type = DirichletBC
variable = vel_x
boundary = 'bottom right left'
value = 0.0
[]
[lid]
type = FunctionDirichletBC
variable = vel_x
boundary = 'top'
function = 'lid_function'
[]
[y_no_slip]
type = DirichletBC
variable = vel_y
boundary = 'bottom right top left'
value = 0.0
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '1 ${mu}'
[]
[]
[Functions]
[lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Preconditioning]
[FSP]
type = FSP
topsplit = 'by_diri_others'
[by_diri_others]
splitting = 'diri others'
splitting_type = additive
petsc_options_iname = '-ksp_type'
petsc_options_value = 'preonly'
[]
[diri]
sides = 'left right top bottom'
vars = 'vel_x vel_y'
petsc_options_iname = '-pc_type'
petsc_options_value = 'jacobi'
[]
[others]
splitting = 'u p'
splitting_type = schur
petsc_options_iname = '-pc_fieldsplit_schur_fact_type -pc_fieldsplit_schur_precondition -ksp_gmres_restart -ksp_rtol -ksp_type -ksp_atol'
petsc_options_value = 'full self 300 1e-5 fgmres 1e-9'
unside_by_var_boundary_name = 'left top right bottom left top right bottom'
unside_by_var_var_name = 'vel_x vel_x vel_x vel_x vel_y vel_y vel_y vel_y'
[]
[u]
vars = 'vel_x vel_y'
unside_by_var_boundary_name = 'left top right bottom left top right bottom'
unside_by_var_var_name = 'vel_x vel_x vel_x vel_x vel_y vel_y vel_y vel_y'
# petsc_options = '-ksp_converged_reason'
petsc_options_iname = '-pc_type -ksp_pc_side -ksp_type -ksp_rtol -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre right gmres 1e-2 boomeramg 300'
[]
[p]
vars = 'p'
petsc_options = '-pc_lsc_scale_diag -ksp_converged_reason'# -lsc_ksp_converged_reason -lsc_ksp_monitor_true_residual
petsc_options_iname = '-ksp_type -ksp_gmres_restart -ksp_rtol -pc_type -ksp_pc_side -lsc_pc_type -lsc_pc_hypre_type -lsc_ksp_type -lsc_ksp_rtol -lsc_ksp_pc_side -lsc_ksp_gmres_restart'
petsc_options_value = 'fgmres 300 1e-2 lsc right hypre boomeramg gmres 1e-1 right 300'
[]
[]
[]
[Postprocessors]
[pavg]
type = ElementAverageValue
variable = p
[]
[]
[UserObjects]
[set_pressure]
type = NSPressurePin
pin_type = 'average'
variable = p
pressure_average = 'pavg'
[]
[]
[Executioner]
solve_type = NEWTON
type = Transient
petsc_options_iname = '-snes_max_it'
petsc_options_value = '100'
line_search = 'none'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
abort_on_solve_fail = true
normalize_solution_diff_norm_by_dt = false
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 6
dt = 1e-2
[]
steady_state_detection = true
[]
[Outputs]
[exo]
type = Exodus
execute_on = 'final'
hide = 'pavg'
[]
[]
(modules/xfem/test/tests/moving_interface/moving_ad_bimaterial.i)
# This test is for two layer materials with different youngs modulus with AD
# The global stress is determined by switching the stress based on level set values
# The material interface is marked by a level set function
# The two layer materials are glued together
# This case is also meant to test for a bug in moving interfaces on displaced meshes
# It should fail during the healing step of the 2nd timestep if the bug is present.
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Mesh]
displacements = 'disp_x disp_y'
[generated_mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmin = 0.0
xmax = 5.
ymin = 0.0
ymax = 5.
elem_type = QUAD4
[]
[./left_bottom]
type = ExtraNodesetGenerator
new_boundary = 'left_bottom'
coord = '0.0 0.0'
input = generated_mesh
[../]
[./left_top]
type = ExtraNodesetGenerator
new_boundary = 'left_top'
coord = '0.0 5.'
input = left_bottom
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Functions]
[./ls_func]
type = ParsedFunction
expression = 'y-3.153 + t'
[../]
[]
[AuxVariables]
[./a_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
strain = SMALL
use_automatic_differentiation = true
add_variables = true
generate_output = 'stress_xx stress_yy stress_xy'
[../]
[]
[AuxKernels]
[./a_strain_xx]
type = ADRankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 0
variable = a_strain_xx
[../]
[./a_strain_yy]
type = ADRankTwoAux
rank_two_tensor = A_total_strain
index_i = 1
index_j = 1
variable = a_strain_yy
[../]
[./a_strain_xy]
type = ADRankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 1
variable = a_strain_xy
[../]
[./b_strain_xx]
type = ADRankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 0
variable = b_strain_xx
[../]
[./b_strain_yy]
type = ADRankTwoAux
rank_two_tensor = B_total_strain
index_i = 1
index_j = 1
variable = b_strain_yy
[../]
[./b_strain_xy]
type = ADRankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 1
variable = b_strain_xy
[../]
[]
[Constraints]
[./dispx_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_x
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[./dispy_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_y
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[]
[BCs]
[./bottomx]
type = ADDirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = ADDirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[./topx]
type = ADFunctionDirichletBC
boundary = top
variable = disp_x
function = 0.03*t
[../]
[./topy]
type = ADFunctionDirichletBC
boundary = top
variable = disp_y
function = '0.03*t'
[../]
[]
[Materials]
[./elasticity_tensor_A]
type = ADComputeIsotropicElasticityTensor
base_name = A
youngs_modulus = 1e9
poissons_ratio = 0.3
[../]
[./strain_A]
type = ADComputeSmallStrain
base_name = A
displacements = 'disp_x disp_y'
[../]
[./stress_A]
type = ADComputeLinearElasticStress
base_name = A
[../]
[./elasticity_tensor_B]
type = ADComputeIsotropicElasticityTensor
base_name = B
youngs_modulus = 1e7
poissons_ratio = 0.3
[../]
[./strain_B]
type = ADComputeSmallStrain
base_name = B
displacements = 'disp_x disp_y'
[../]
[./stress_B]
type = ADComputeLinearElasticStress
base_name = B
[../]
[./combined_stress]
type = ADLevelSetBiMaterialRankTwo
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = stress
[../]
[./combined_elasticity_tensor]
type = ADLevelSetBiMaterialRankFour
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = elasticity_tensor
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
line_search = 'bt'
# controls for linear iterations
l_max_its = 20
l_tol = 1e-8
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-50
# time control
start_time = 0.0
dt = 0.15
num_steps = 3
max_xfem_update = 1
[]
[Outputs]
exodus = true
execute_on = timestep_end
file_base = moving_bimaterial_out
perf_graph = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/linearfvkernels/reaction/reaction-1d.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 10
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[LinearFVKernels]
[reaction]
type = LinearFVReaction
variable = u
coeff = coeff_func
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[Functions]
[coeff_func]
type = ParsedFunction
expression = '1+sin(x)'
[]
[source_func]
type = ParsedFunction
expression = '(1+sin(x))*(1+cos(x))'
[]
[analytic_solution]
type = ParsedFunction
expression = '1+cos(x)'
[]
[]
[Postprocessors]
[l2error]
type = ElementL2FunctorError
approximate = u
exact = analytic_solution
execute_on = FINAL
[]
[]
[Executioner]
type = LinearPicardSteady
linear_systems_to_solve = u_sys
[]
[Outputs]
[exodus]
type = Exodus
execute_on = FINAL
[]
[]
(modules/solid_mechanics/test/tests/smeared_cracking/cracking_xyz.i)
#
[Mesh]
file = cracking_test.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Functions]
[./displx]
type = PiecewiseLinear
x = '0 1'
y = '0 0.00175'
[../]
[./velocity_y]
type = ParsedFunction
expression = 'if(t < 2, 0.00175, 0)'
[../]
[./velocity_z]
type = ParsedFunction
expression = 0.00175
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_zx'
[../]
[]
[BCs]
[./fix_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./move_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = displx
[../]
[./fix_y]
type = DirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[./move_y]
type = PresetVelocity
variable = disp_y
boundary = 5
function = velocity_y
# time_periods = 'p2 p3'
[../]
[./fix_z]
type = DirichletBC
variable = disp_z
boundary = 3
value = 0.0
[../]
[./move_z]
type = PresetVelocity
variable = disp_z
boundary = 6
function = velocity_z
# time_periods = 'p3'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 186.5e9
poissons_ratio = .316
[../]
[./elastic_stress]
type = ComputeSmearedCrackingStress
cracking_stress = 119.3e6
cracked_elasticity_type = FULL
softening_models = exponential_softening
[../]
[./exponential_softening]
type = ExponentialSoftening
[../]
[]
[Executioner]
type = Transient
petsc_options_iname = '-ksp_gmres_restart -pc_type'
petsc_options_value = '101 lu'
line_search = 'none'
l_max_its = 100
l_tol = 1e-5
nl_max_its = 100
nl_abs_tol = 1e-6
#nl_rel_tol = 1e-4
nl_rel_tol = 1e-8
start_time = 0.0
end_time = 3.0
dt = 0.01
[]
[Controls]
[./p1]
type = TimePeriod
start_time = 0.0
end_time = 1.0
disable_objects = 'BCs/move_y BCs/move_z'
reverse_on_false = false
execute_on = 'initial timestep_begin'
[../]
[./p2]
type = TimePeriod
start_time = 1.0
end_time = 2.0
disable_objects = 'BCs/move_z'
enable_objects = 'BCs/move_y'
reverse_on_false = false
execute_on = 'initial timestep_begin'
[../]
[./p3]
type = TimePeriod
start_time = 2.0
end_time = 3.0
enable_objects = 'BCs/move_y BCs/move_z'
reverse_on_false = false
execute_on = 'initial timestep_begin'
set_sync_times = true
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/dgkernels/2d_diffusion_dg/no_functor_additions.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[AuxVariables]
[v]
order = FIRST
family = MONOMIAL
[]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[../]
[./exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./abs] # u * v
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGKernels]
[regular_dg_diffusion]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[]
[]
[DGDiffusionAction]
variable = u
kernels_to_add = 'COUPLED'
coupled_var = v
[]
[BCs]
[./all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[console]
type = Console
system_info = 'framework mesh aux nonlinear relationship execution'
[]
[]
[Problem]
error_on_jacobian_nonzero_reallocation = true
[]
[Postprocessors]
[num_rm]
type = NumRelationshipManagers
[]
[]
(test/tests/bcs/ad_penalty_dirichlet_bc/penalty_dirichlet_bc_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = -2*(x*x+y*y-2)+(1-x*x)*(1-y*y)
[../]
[./solution]
type = ParsedGradFunction
value = (1-x*x)*(1-y*y)
grad_x = 2*(x*y*y-x)
grad_y = 2*(x*x*y-y)
[../]
[]
[Variables]
[./u]
order = SECOND
family = HIERARCHIC
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = ADDiffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = ADBodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'bc_all'
[./bc_all]
type = ADPenaltyDirichletBC
variable = u
value = 0
boundary = 'top left right bottom'
penalty = 1e5
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_rel_tol = 1e-14
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/solid_mechanics/test/tests/rom_stress_update/creep_ramp_sub_false_more_steps.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[temperature]
initial_condition = 889
[]
[effective_inelastic_strain]
order = FIRST
family = MONOMIAL
[]
[cell_dislocations]
order = FIRST
family = MONOMIAL
[]
[wall_dislocations]
order = FIRST
family = MONOMIAL
[]
[number_of_substeps]
order = FIRST
family = MONOMIAL
[]
[]
[AuxKernels]
[effective_inelastic_strain]
type = MaterialRealAux
variable = effective_inelastic_strain
property = effective_creep_strain
[]
[cell_dislocations]
type = MaterialRealAux
variable = cell_dislocations
property = cell_dislocations
[]
[wall_dislocations]
type = MaterialRealAux
variable = wall_dislocations
property = wall_dislocations
[]
[number_of_substeps]
type = MaterialRealAux
variable = number_of_substeps
property = number_of_substeps
[]
[]
[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 = -0.5
function = shear_function
[]
[pressure_y]
type = Pressure
variable = disp_y
boundary = top
factor = -0.5
function = shear_function
[]
[pressure_z]
type = Pressure
variable = disp_z
boundary = front
factor = 0.5
function = shear_function
[]
[]
[Functions]
[shear_function]
type = ParsedFunction
expression = 'timeToDoubleInHours := 10;
if(t<=28*60*60, 15.0e6, 15.0e6*(t-28*3600)/3600/timeToDoubleInHours+15.0e6)'
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1.68e11
poissons_ratio = 0.31
[]
[stress]
type = ComputeMultipleInelasticStress
inelastic_models = rom_stress_prediction
[]
[mx_phase_fraction]
type = GenericConstantMaterial
prop_names = mx_phase_fraction
prop_values = 5.13e-2 #precipitation bounds: 6e-3, 1e-1
outputs = all
[]
[rom_stress_prediction]
type = SS316HLAROMANCEStressUpdateTest
temperature = temperature
initial_cell_dislocation_density = 6.0e12
initial_wall_dislocation_density = 4.4e11
use_substepping = NONE
max_inelastic_increment = 0.0001
stress_input_window_low_failure = WARN
stress_input_window_high_failure = ERROR
cell_input_window_high_failure = ERROR
cell_input_window_low_failure = ERROR
wall_input_window_low_failure = ERROR
wall_input_window_high_failure = ERROR
temperature_input_window_high_failure = ERROR
temperature_input_window_low_failure = ERROR
environment_input_window_high_failure = ERROR
environment_input_window_low_failure = ERROR
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
nl_abs_tol = 1e-12
nl_rel_tol = 1e-4
automatic_scaling = true
compute_scaling_once = false
dtmin = 0.1
dtmax = 1e3
end_time = 136800
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.1 ## This model requires a tiny timestep at the onset for the first 10s
iteration_window = 4
optimal_iterations = 12
time_t = '100800'
time_dt = '1e3'
[]
[]
[Postprocessors]
[effective_strain_avg]
type = ElementAverageValue
variable = effective_inelastic_strain
[]
[temperature]
type = ElementAverageValue
variable = temperature
[]
[cell_dislocations]
type = ElementAverageValue
variable = cell_dislocations
[]
[wall_disloactions]
type = ElementAverageValue
variable = wall_dislocations
[]
[max_vonmises_stress]
type = ElementExtremeValue
variable = vonmises_stress
value_type = max
[]
[number_of_substeps]
type = ElementAverageValue
variable = number_of_substeps
[]
[]
[Outputs]
csv = true
[]
(test/tests/dgkernels/adaptivity/adaptivity.i)
# This input file is used for two tests:
# 1) Check that DGKernels work with mesh adaptivity
# 2) Error out when DGKernels are used with adaptivity
# and stateful material prpoerties
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
parallel_type = 'replicated'
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = (x*x*x)-6.0*x
[../]
[./bc_fn]
type = ParsedFunction
expression = (x*x*x)
[../]
[]
[Kernels]
[./diff]
type = MatDiffusionTest
variable = u
prop_name = diffusivity
[../]
[./abs]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGKernels]
[./dgdiff]
type = DGDiffusion
variable = u
sigma = 6
epsilon = -1.0
diff = diffusivity
[../]
[]
[BCs]
active = 'all'
[./all]
type = DGMDDBC
variable = u
boundary = '1 2 3 4'
function = bc_fn
prop_name = diffusivity
sigma = 6
epsilon = -1.0
[../]
[]
[Materials]
active = 'constant'
[./stateful]
type = StatefulTest
prop_names = 'diffusivity'
prop_values = '1'
[../]
[./constant]
type = GenericConstantMaterial
prop_names = 'diffusivity'
prop_values = '1'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Adaptivity]
marker = 'marker'
steps = 1
[./Indicators]
[./error]
type = GradientJumpIndicator
variable = u
[../]
[../]
[./Markers]
[./marker]
type = ErrorFractionMarker
coarsen = 0.5
indicator = error
refine = 0.5
[../]
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/restart/restart_steady_from_transient/transient.i)
# We run a simple problem (5 time steps and save off the solution)
# In part2, we load the solution and solve a steady problem. The test check, that the initial state in part 2 is the same as the last state from part1
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 20
ny = 20
parallel_type = replicated
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[./forcing_fn]
type = ParsedFunction
expression = -4+(x*x+y*y)
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'ie diff ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.2
start_time = 0
num_steps = 5
[]
[Outputs]
exodus = true
checkpoint = true
[]
(modules/navier_stokes/test/tests/finite_volume/pins/mms/1d-rc-no-diffusion.i)
mu = 1e-15
rho = 1.1
advected_interp_method = 'upwind'
velocity_interp_method = 'rc'
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
nx = 2
xmax = 0.5
[]
[]
[GlobalParams]
two_term_boundary_expansion = true
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
pressure = pressure
porosity = porosity
[]
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = .1
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 0.8
[]
[]
[Problem]
error_on_jacobian_nonzero_reallocation = true
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'cos((1/2)*x*pi)'
[]
[forcing_u]
type = ParsedFunction
expression = '-1.25*pi*rho*sin((1/2)*x*pi)*cos((1/2)*x*pi) + 0.8*cos(x)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'sin(x)'
[]
[forcing_p]
type = ParsedFunction
expression = '-1/2*pi*rho*sin((1/2)*x*pi)'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[mass_forcing]
type = FVBodyForce
variable = pressure
function = forcing_p
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressureFlux
variable = u
pressure = pressure
porosity = porosity
momentum_component = 'x'
[]
[u_forcing]
type = INSFVBodyForce
variable = u
functor = forcing_u
momentum_component = 'x'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
functor = 'exact_u'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 'exact_p'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm 100 lu NONZERO'
line_search = 'bt'
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2FunctorError
approximate = u
exact = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
approximate = pressure
exact = exact_p
type = ElementL2FunctorError
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
[Outputs]
csv = true
[]
(test/tests/postprocessors/mms_sine/2_d_mms_sine_postprocessor_test.i)
#2_d_mms_sine_postprocessor_test.i
#This is for u = sin(a*x*y*z*t)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 8
ny = 8
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions] #Added so that we can use the Postprocessor
active = 'solution'
[./solution]
type = ParsedFunction
expression = sin(a*x*y*z*t)
symbol_names = 'a'
symbol_values = '3.141592653589793'
[../]
[]
[AuxVariables] #We added nodal AuxVariables
active = 'nodal_aux'
[./nodal_aux]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff implicit conv forcing reaction'
[./diff]
type = MMSDiffusion
variable = u
[../]
[./implicit] #We got from MOOSE kernels
type = MMSImplicitEuler
variable = u
[../]
[./conv] #We created our own convection kernel
type = MMSConvection
variable = u
x = -1
y = 2
[../]
[./forcing] #We created our own forcing kernel
type = MMSForcing
variable = u
[../]
[./reaction] #We got from MOOSE kernels
type = MMSReaction
variable = u
[../]
[]
[AuxKernels] #We created our own AuxKernel
active = 'ConstantAux'
[./ConstantAux]
type = MMSConstantAux
variable = nodal_aux
[../]
[]
[BCs]
active = 'all_u'
[./all_u]
type = MMSCoupledDirichletBC
variable = u
boundary = '0 1 2 3'
# value = sin(a*x*y*z*t)
[../]
[]
[Executioner]
type = Transient
dt = .1
num_steps = 5
solve_type = 'PJFNK'
[]
[Postprocessors]
active = 'l2_error dofs'
[./l2_error]
type = ElementL2Error
variable = u
function = solution
execute_on = 'initial timestep_end'
[../]
[./dofs]
type = NumDOFs
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
file_base = 2_d_postprocessor_out
csv = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/updated/thermal_expansion/constrained.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
large_kinematics = false
eigenstrain_names = "thermal_contribution"
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[AuxVariables]
[temperature]
[]
[]
[AuxKernels]
[control_temperature]
type = FunctionAux
variable = temperature
function = temperature_control
[]
[]
[BCs]
[leftx]
type = DirichletBC
preset = true
boundary = left
variable = disp_x
value = 0.0
[]
[rightx]
type = DirichletBC
preset = true
boundary = right
variable = disp_x
value = 0.0
[]
[lefty]
type = DirichletBC
preset = true
boundary = bottom
variable = disp_y
value = 0.0
[]
[leftz]
type = DirichletBC
preset = true
boundary = back
variable = disp_z
value = 0.0
[]
[]
[Functions]
[temperature_control]
type = ParsedFunction
expression = '100*t'
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = SMALL
new_system = true
formulation = UPDATED
volumetric_locking_correction = false
generate_output = 'cauchy_stress_xx cauchy_stress_yy cauchy_stress_zz cauchy_stress_xy '
'cauchy_stress_xz cauchy_stress_yz strain_xx strain_yy strain_zz strain_xy '
'strain_xz strain_yz'
[]
[]
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100000.0
poissons_ratio = 0.3
[]
[compute_stress]
type = ComputeLagrangianLinearElasticStress
[]
[thermal_expansion]
type = ComputeThermalExpansionEigenstrain
temperature = temperature
thermal_expansion_coeff = 1.0e-3
eigenstrain_name = thermal_contribution
stress_free_temperature = 0.0
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
end_time = 1
dt = 1
type = Transient
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
exodus = true
[]
(test/tests/linearfvkernels/advection/advection-2d.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny= 1
ymax = 0.5
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[LinearFVKernels]
[advection]
type = LinearFVAdvection
variable = u
velocity = "0.5 0 0"
advected_interp_method = upwind
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
[inflow]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "left top bottom"
functor = analytic_solution
[]
[outflow]
type = LinearFVAdvectionDiffusionOutflowBC
variable = u
boundary = "right"
use_two_term_expansion = false
[]
[]
[Functions]
[source_func]
type = ParsedFunction
expression = '0.5*pi*sin(2*y*pi)*cos(x*pi)'
[]
[analytic_solution]
type = ParsedFunction
expression = 'sin(x*pi)*sin(2*y*pi) + 1.5'
[]
[]
[Postprocessors]
[error]
type = ElementL2FunctorError
approximate = u
exact = analytic_solution
execute_on = FINAL
[]
[h]
type = AverageElementSize
execute_on = FINAL
[]
[]
[Executioner]
type = LinearPicardSteady
linear_systems_to_solve = u_sys
number_of_iterations = 1
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-10'
[]
[Outputs]
[csv]
type = CSV
execute_on = FINAL
[]
[]
(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/umat/print/print_shear_defgrad.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Functions]
[tdisp]
type = ParsedFunction
expression = '0.025 * t'
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 1
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
[]
[]
[BCs]
[bottom_x]
type = DirichletBC
variable = disp_x
boundary = bottom
value = 0
[]
[bottom_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[bottom_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0
[]
[top_y]
type = DirichletBC
variable = disp_y
boundary = top
value = 0
[]
[top_z]
type = DirichletBC
variable = disp_z
boundary = top
value = 0
[]
[tdisp]
type = FunctionDirichletBC
variable = disp_x
boundary = top
function = tdisp
[]
[]
[Materials]
[umat]
type = AbaqusUMATStress
constant_properties = '1000 0.3'
plugin = '../../../plugins/elastic_print'
num_state_vars = 0
use_one_based_indexing = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
end_time = 20
dt = 10.0
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]