- functionThe initial condition function.
C++ Type:FunctionName
Controllable:No
Description:The initial condition function.
- variableThe variable this initial condition is supposed to provide values for.
C++ Type:VariableName
Controllable:No
Description:The variable this initial condition is supposed to provide values for.
FunctionIC
An initial condition that uses a normal function of x, y, z to produce values (and optionally gradients) for a field variable.
Sets an initial condition via a Function described by parameter "function". It can be restricted to particular blocks and boundaries using the "block" and "boundary" parameters, respectively.
To set a function initial condition that preserves an integral of that function, such as for setting a volumetric quantity (units/m) while satisfying a total volume-integral, see the IntegralPreservingFunctionIC.
Example input syntax
In this example, we set the initial value of variable u
using a ParsedFunction. This particular example shows that information about the gradient of the parsed function is kept in initial condition, using further mesh refinement.
[ICs]
[u_ic]
type = FunctionIC
variable = 'u'
function = parsed_function
[]
[]
[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'
[]
[]
(test/tests/ics/function_ic/parsed_function.i)Input Parameters
- blockThe list of blocks (ids or names) that this object will be applied
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:The list of blocks (ids or names) that this object will be applied
- boundaryThe list of boundaries (ids or names) from the mesh where this object applies
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The list of boundaries (ids or names) from the mesh where this object applies
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
- scaling_factor1Scaling factor to apply on the function
Default:1
C++ Type:double
Controllable:No
Description:Scaling factor to apply on the function
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Default:False
C++ Type:bool
Controllable:No
Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Optional Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:No
Description:Set the enabled status of the MooseObject.
- ignore_uo_dependencyFalseWhen set to true, a UserObject retrieved by this IC will not be executed before the this IC
Default:False
C++ Type:bool
Controllable:No
Description:When set to true, a UserObject retrieved by this IC will not be executed before the this IC
Advanced Parameters
Input Files
- (modules/level_set/examples/vortex/vortex_reinit.i)
- (modules/porous_flow/test/tests/sinks/s08.i)
- (modules/porous_flow/test/tests/heterogeneous_materials/constant_poroperm2.i)
- (modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_1D.i)
- (modules/porous_flow/test/tests/relperm/unity.i)
- (modules/richards/test/tests/dirac/bh10.i)
- (test/tests/postprocessors/variable_inner_product/variable_inner_product.i)
- (modules/porous_flow/test/tests/newton_cooling/nc02.i)
- (modules/porous_flow/examples/restart/gravityeq.i)
- (modules/richards/test/tests/gravity_head_2/gh04.i)
- (test/tests/functions/solution_function/solution_function_test.i)
- (modules/richards/test/tests/sinks/s03.i)
- (modules/solid_mechanics/test/tests/elasticitytensor/composite.i)
- (modules/porous_flow/test/tests/sinks/s04.i)
- (modules/combined/examples/periodic_strain/global_strain_pfm_3D.i)
- (modules/richards/test/tests/theis/th_lumped_01.i)
- (test/tests/userobjects/shape_element_user_object/shape_side_uo_physics_test.i)
- (modules/porous_flow/test/tests/capillary_pressure/vangenuchten1.i)
- (test/tests/postprocessors/element_integral/functors/element_integral_test.i)
- (modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_1D_adaptivity.i)
- (test/tests/nodalkernels/constraint_enforcement/upper-and-lower-bound.i)
- (modules/porous_flow/test/tests/hysteresis/hys_pc_3.i)
- (modules/porous_flow/test/tests/mass_conservation/mass06.i)
- (test/tests/functions/solution_function/solution_function_scale_mult.i)
- (modules/xfem/test/tests/moving_interface/phase_transition_3d.i)
- (modules/porous_flow/test/tests/energy_conservation/heat02.i)
- (test/tests/misc/check_error/missing_function_file_test.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/1d-rc-epsjump.i)
- (modules/phase_field/test/tests/functions/fourier_noise.i)
- (modules/optimization/examples/simpleTransient/forward_and_adjoint.i)
- (modules/fsi/test/tests/fsi_acoustics/wave_height_bc/wave_height_bc.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/varying-eps-basic-kt-primitive.i)
- (test/tests/meshgenerators/file_mesh_generator/2d_discontinuous_iga_l2.i)
- (test/tests/transfers/general_field/nearest_node/mesh_division/sub.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/implicit_bcs/hllc_sod_shocktube.i)
- (modules/porous_flow/test/tests/sinks/s09.i)
- (modules/porous_flow/test/tests/poroperm/linear_test_vals.i)
- (modules/phase_field/test/tests/misc/coupled_value_function_ic.i)
- (test/tests/userobjects/shape_element_user_object/simple_shape_element_uo_test.i)
- (modules/porous_flow/test/tests/heat_advection/heat_advection_1d_KT.i)
- (test/tests/transfers/general_field/nearest_node/nearest_position/sub.i)
- (modules/porous_flow/test/tests/jacobian/basic_advection1.i)
- (test/tests/transfers/general_field/nearest_node/subdomain/sub.i)
- (modules/ray_tracing/test/tests/raykernels/variable_integral_ray_kernel/variable_integral_ray_kernel.i)
- (test/tests/transfers/general_field/shape_evaluation/mesh_division/main.i)
- (modules/richards/test/tests/jacobian_2/jn_lumped_17.i)
- (modules/richards/test/tests/theis/th_lumped_02.i)
- (modules/richards/test/tests/mass/m_fu_01.i)
- (modules/porous_flow/examples/multiapp_fracture_flow/diffusion_multiapp/two_vars.i)
- (test/tests/userobjects/toggle_mesh_adaptivity/toggle_mesh_adaptivity_gaussian_ic.i)
- (modules/optimization/test/tests/functions/parameter_mesh/create_mesh_dg.i)
- (modules/phase_field/test/tests/slkks/weighted_average.i)
- (test/tests/time_integrators/actually_explicit_euler_verification/ee-1d-quadratic-neumann.i)
- (test/tests/postprocessors/displaced_mesh/side.i)
- (modules/porous_flow/test/tests/dirackernels/pls03_action.i)
- (modules/richards/test/tests/uo_egs/relperm.i)
- (test/tests/variables/side_hierarchic/side_hierarchic.i)
- (test/tests/ics/function_ic/spline_function.i)
- (modules/porous_flow/test/tests/energy_conservation/heat01.i)
- (test/tests/transfers/general_field/user_object/subdomain/main.i)
- (modules/porous_flow/test/tests/numerical_diffusion/framework.i)
- (modules/fluid_properties/test/tests/co2/co2.i)
- (modules/richards/test/tests/dirac/st01.i)
- (modules/porous_flow/test/tests/aux_kernels/darcy_velocity_lower_2D.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/userobject/HLLC/hllc_uo_1D.i)
- (modules/richards/test/tests/buckley_leverett/bl20.i)
- (test/tests/auxkernels/projection_aux/2d.i)
- (modules/phase_field/test/tests/misc/equal_gradient_lagrange.i)
- (test/tests/kernels/conservative_advection/full_upwinding_2D.i)
- (modules/richards/test/tests/gravity_head_2/gh02.i)
- (modules/porous_flow/test/tests/capillary_pressure/vangenuchten3.i)
- (modules/porous_flow/test/tests/sinks/s01.i)
- (modules/geochemistry/test/tests/kernels/advection_1.i)
- (test/tests/misc/check_error/function_conflict.i)
- (test/tests/transfers/general_field/user_object/subdomain/sub.i)
- (test/tests/postprocessors/element_l1_error/element_l1_error.i)
- (modules/richards/test/tests/user_objects/uo4.i)
- (test/tests/transfers/general_field/shape_evaluation/boundary/main.i)
- (test/tests/time_integrators/explicit-euler/ee-2d-linear-adapt.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/shock_tube_2D_cavity/hllc_sod_shocktube_2D.i)
- (modules/porous_flow/test/tests/numerical_diffusion/fltvd_no_antidiffusion.i)
- (test/tests/functions/image_function/image_2d.i)
- (modules/richards/test/tests/dirac/bh_fu_07.i)
- (modules/richards/test/tests/dirac/bh27.i)
- (modules/porous_flow/test/tests/dispersion/disp01_heavy.i)
- (modules/richards/test/tests/theis/th01.i)
- (modules/richards/test/tests/theis/th_lumped_22.i)
- (modules/thermal_hydraulics/test/tests/userobjects/layered_flow_area_change/layered_flow_area_2D.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mms/channel-flow/cylindrical/cartesian-version/2d-rc-rz-symmetry.i)
- (modules/richards/test/tests/excav/ex01.i)
- (modules/porous_flow/test/tests/flux_limited_TVD_advection/fltvd_2D_angle.i)
- (test/tests/transfers/general_field/nearest_node/nearest_position/sub_between_diffusion.i)
- (test/tests/transfers/general_field/shape_evaluation/subdomain/main.i)
- (modules/porous_flow/test/tests/numerical_diffusion/fltvd.i)
- (modules/rdg/test/tests/advection_1d/1d_aefv_square_wave.i)
- (modules/level_set/examples/circle/circle_16.i)
- (test/tests/transfers/multiapp_conservative_transfer/primary_skipped_adjuster.i)
- (test/tests/misc/check_error/function_file_test8.i)
- (modules/chemical_reactions/test/tests/thermochimica/MoRuPd.i)
- (test/tests/functions/constant_function/constant_function_test.i)
- (modules/porous_flow/examples/fluidflower/fluidflower.i)
- (modules/phase_field/test/tests/free_energy_material/VanDerWaalsFreeEnergy.i)
- (modules/porous_flow/test/tests/sinks/s06.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/mms/porosity_change/1d-rc-continuous.i)
- (test/tests/userobjects/nearest_point_average/nearest_point_average.i)
- (modules/porous_flow/test/tests/sinks/s07.i)
- (modules/porous_flow/examples/restart/gas_injection_new_mesh.i)
- (test/tests/time_integrators/explicit-euler/ee-1d-quadratic-neumann.i)
- (test/tests/ics/array_function_ic/array_function_ic_test.i)
- (modules/porous_flow/test/tests/dirackernels/injection_with_plasticity.i)
- (modules/porous_flow/test/tests/numerical_diffusion/no_action.i)
- (modules/porous_flow/test/tests/hysteresis/hys_sat_03.i)
- (test/tests/functions/image_function/threshold_adapt.i)
- (test/tests/misc/check_error/function_file_test2.i)
- (modules/porous_flow/test/tests/flux_limited_TVD_advection/fltvd_2D_trimesh.i)
- (modules/level_set/test/tests/kernels/olsson_reinitialization/olsson_1d.i)
- (modules/richards/test/tests/newton_cooling/nc02.i)
- (test/tests/functions/image_function/image_mesh_3d.i)
- (modules/combined/test/tests/multiphase_mechanics/nonsplit_gradderiv_action.i)
- (modules/porous_flow/test/tests/hysteresis/hys_pc_01.i)
- (test/tests/restart/restart_subapp_not_parent/two_step_solve_parent.i)
- (test/tests/time_steppers/timesequence_stepper/timesequence_restart_failure.i)
- (test/tests/time_integrators/explicit-euler/ee-1d-linear.i)
- (test/tests/misc/check_error/function_file_test13.i)
- (test/tests/functions/image_function/subset.i)
- (test/tests/transfers/multiapp_conservative_transfer/primary_negative_adjuster.i)
- (modules/fluid_properties/test/tests/brine/brine_tabulated.i)
- (test/tests/materials/functor_properties/gradients/functor-gradients.i)
- (modules/phase_field/test/tests/MultiPhase/switchingfunction3phasematerial.i)
- (test/tests/functions/solution_function/solution_function_rot4.i)
- (test/tests/time_steppers/timesequence_stepper/timesequence.i)
- (modules/level_set/test/tests/reinitialization/parent.i)
- (test/tests/userobjects/element_subdomain_modifier/reversible.i)
- (test/tests/functions/image_function/threshold_adapt_parallel.i)
- (modules/ray_tracing/test/tests/outputs/ray_tracing_mesh_output/ray_mesh_output_data.i)
- (modules/fluid_properties/test/tests/materials/fluid_properties_material/test_pt.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mms/channel-flow/cylindrical/cartesian-version/2d-rc-no-slip-walls.i)
- (modules/porous_flow/test/tests/hysteresis/hys_pc_2.i)
- (modules/combined/examples/publications/rapid_dev/fig3.i)
- (modules/richards/test/tests/dirac/bh09.i)
- (test/tests/auxkernels/copy_value_aux/copy_aux.i)
- (modules/chemical_reactions/test/tests/parser/equilibrium_action.i)
- (modules/porous_flow/test/tests/heat_advection/heat_advection_1d_fully_saturated.i)
- (test/tests/userobjects/shape_element_user_object/shape_element_user_object.i)
- (test/tests/transfers/general_field/nearest_node/mesh_division/main.i)
- (modules/phase_field/test/tests/free_energy_material/RegularSolutionFreeEnergy_plog.i)
- (test/tests/time_integrators/tvdrk2/1d-linear.i)
- (modules/richards/test/tests/uo_egs/seff1.i)
- (test/tests/executioners/nullspace/singular_contaminated.i)
- (test/tests/misc/check_error/function_file_test5.i)
- (modules/richards/test/tests/buckley_leverett/bl01_lumped.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mms/channel-flow/cylindrical/cartesian-version/2d-rc-symmetry.i)
- (test/tests/functions/image_function/image_2d_elemental.i)
- (test/tests/functions/parsed/mms_transient_coupled.i)
- (test/tests/multiapps/centroid_multiapp/centroid_multiapp.i)
- (modules/richards/test/tests/buckley_leverett/bl21.i)
- (modules/combined/examples/phase_field-mechanics/interface_stress.i)
- (test/tests/kernels/ad_coupled_value/ad_aux_coupled_value.i)
- (test/tests/misc/check_error/wrong_displacement_order.i)
- (test/tests/misc/check_error/function_file_test10.i)
- (modules/porous_flow/test/tests/hysteresis/hys_pc_02.i)
- (modules/combined/test/tests/multiphase_mechanics/nonsplit_gradderiv.i)
- (modules/porous_flow/test/tests/chemistry/2species_equilibrium.i)
- (modules/combined/examples/periodic_strain/global_strain_pfm.i)
- (test/tests/transfers/general_field/user_object/between_siblings/sub_between_diffusion1.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/SinteringIdeal.i)
- (modules/solid_mechanics/test/tests/interface_stress/multi.i)
- (modules/richards/test/tests/dirac/bh_fu_02.i)
- (modules/porous_flow/test/tests/aux_kernels/darcy_velocity.i)
- (modules/porous_flow/test/tests/jacobian/fflux10.i)
- (modules/porous_flow/test/tests/jacobian/linear_por.i)
- (test/tests/transfers/general_field/nearest_node/subdomain/main.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/2species_without_action.i)
- (modules/richards/test/tests/dirac/bh_fu_04.i)
- (modules/porous_flow/test/tests/sinks/s09_fully_saturated.i)
- (modules/porous_flow/test/tests/aux_kernels/darcy_velocity_fv.i)
- (test/tests/kernels/conservative_advection/no_upwinding_2D.i)
- (test/tests/fvbcs/fv_functor_neumannbc/fv_functor_neumann.i)
- (modules/porous_flow/examples/lava_lamp/1phase_convection.i)
- (modules/porous_flow/test/tests/sinks/s03.i)
- (modules/richards/test/tests/mass/m01.i)
- (test/tests/time_integrators/actually_explicit_euler_verification/ee-2d-linear-adapt.i)
- (test/tests/transfers/coord_transform/both-transformed/mesh-function/main-app.i)
- (test/tests/materials/derivative_material_interface/ad_derivative_parsed_material.i)
- (modules/porous_flow/test/tests/dispersion/disp01.i)
- (test/tests/time_steppers/timesequence_stepper/timesequence_failed_solve.i)
- (modules/fluid_properties/test/tests/materials/fluid_properties_material/test_ve.i)
- (modules/combined/test/tests/eigenstrain/composite.i)
- (test/tests/time_integrators/dirk/dirk-2d-heat.i)
- (modules/combined/test/tests/DiffuseCreep/stress_flux_n_gb_relax.i)
- (test/tests/time_steppers/timesequence_stepper/timesequence_restart1.i)
- (modules/porous_flow/test/tests/hysteresis/hys_pc_03.i)
- (test/tests/adaptivity/scalar/scalar_adaptivity.i)
- (modules/richards/test/tests/buckley_leverett/bl01_adapt.i)
- (modules/combined/examples/phase_field-mechanics/kks_mechanics_VTS.i)
- (test/tests/transfers/general_field/user_object/nearest_position/sub.i)
- (modules/porous_flow/test/tests/mass_conservation/mass09.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/benchmark_shock_tube_1D/hllc_sod_shocktube.i)
- (test/tests/transfers/general_field/user_object/nearest_position/main.i)
- (modules/fluid_properties/test/tests/materials/fluid_properties_material/test_ph.i)
- (modules/porous_flow/examples/tutorial/06.i)
- (test/tests/transfers/coord_transform/both-transformed/interpolation/main-app.i)
- (test/tests/materials/coupled_value_function/order.i)
- (test/tests/userobjects/toggle_mesh_adaptivity/toggle_mesh_adaptivity_gaussian_ic_stop_time.i)
- (modules/phase_field/test/tests/slkks/sublattice_concentrations.i)
- (modules/richards/test/tests/dirac/bh07.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)
- (test/tests/fvkernels/fv_constant_scalar_advection/2D_constant_scalar_advection.i)
- (test/tests/functions/image_function/threshold.i)
- (test/tests/meshgenerators/file_mesh_generator/2d_diffusion_iga.i)
- (modules/phase_field/examples/multiphase/GrandPotential3Phase_AD.i)
- (test/tests/functions/piecewise_constant_from_csv/piecewise_constant.i)
- (modules/solid_mechanics/test/tests/postprocessors/normal_boundary_displacement.i)
- (test/tests/fvkernels/mms/advective-outflow/kt-limited-advection.i)
- (modules/phase_field/test/tests/KKS_system/auxkernel.i)
- (modules/level_set/examples/rotating_circle/circle_rotate.i)
- (modules/combined/examples/phase_field-mechanics/kks_mechanics_KHS.i)
- (test/tests/kernels/material_derivatives/material_derivatives_test.i)
- (test/tests/materials/derivative_material_interface/parsed_material.i)
- (modules/porous_flow/test/tests/buckley_leverett/bl01.i)
- (test/tests/transfers/general_field/user_object/duplicated_user_object_tests/two_pipe_sub.i)
- (test/tests/materials/derivative_material_interface/construction_order.i)
- (modules/heat_transfer/test/tests/verify_against_analytical/ad_1D_transient.i)
- (test/tests/transfers/coord_transform/both-transformed/pp_interpolation/main-app.i)
- (modules/phase_field/test/tests/phase_field_kernels/AllenCahnVariableL.i)
- (modules/porous_flow/examples/tutorial/13.i)
- (modules/porous_flow/examples/groundwater/ex01.i)
- (modules/porous_flow/test/tests/numerical_diffusion/pffltvd_action.i)
- (modules/phase_field/test/tests/KKS_system/two_phase.i)
- (modules/scalar_transport/test/tests/ncp-lms/diagonal-ncp-lm-nodal-enforcement-nodal-forces.i)
- (modules/porous_flow/examples/ates/ates.i)
- (test/tests/userobjects/postprocessor_spatial_user_object/parent.i)
- (test/tests/vectorpostprocessors/variable_value_volume_histogram/volume_histogram.i)
- (test/tests/ics/hermite_ic/hermite_ic.i)
- (modules/porous_flow/test/tests/poroperm/poro_tm.i)
- (test/tests/transfers/general_field/user_object/nearest_position/sub_between_diffusion.i)
- (test/tests/bcs/functor_neumann_bc/functor_neumann_bc.i)
- (test/tests/controls/control_piecewise/controlled_piecewise.i)
- (modules/porous_flow/test/tests/relperm/brooks_corey1.i)
- (modules/richards/test/tests/dirac/bh02.i)
- (test/tests/transfers/coord_transform/both-transformed/projection/main-app.i)
- (test/tests/bcs/mat_neumann_bc/mat_neumann.i)
- (modules/porous_flow/test/tests/mass_conservation/mass05.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/basic-primitive-pcnsfv-kt.i)
- (modules/stochastic_tools/test/tests/auxkernels/surrogate_aux/surrogate_aux.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/SinteringParabolic.i)
- (modules/porous_flow/examples/tutorial/06_KT.i)
- (modules/porous_flow/test/tests/flux_limited_TVD_advection/fltvd_2D.i)
- (modules/porous_flow/test/tests/poroperm/poro_thm.i)
- (test/tests/functions/function_ic/function_ic_test.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/2d-rc-epsjump.i)
- (modules/navier_stokes/examples/laser-welding/2d.i)
- (modules/porous_flow/test/tests/sinks/s02.i)
- (modules/porous_flow/test/tests/capillary_pressure/brooks_corey2.i)
- (test/tests/userobjects/shape_element_user_object/jacobian.i)
- (test/tests/misc/check_error/function_file_test12.i)
- (modules/porous_flow/test/tests/relperm/corey1.i)
- (modules/solid_mechanics/test/tests/CylindricalRankTwoAux/test.i)
- (test/tests/time_integrators/tvdrk2/2d-quadratic.i)
- (modules/combined/examples/mortar/mortar_gradient.i)
- (test/tests/functions/solution_function/solution_function_rot2.i)
- (modules/phase_field/test/tests/GBAnisotropy/testwidth1.i)
- (test/tests/functions/solution_function/solution_function_rot3.i)
- (test/tests/bcs/coupled_var_neumann/on_off.i)
- (test/tests/postprocessors/side_advection_flux_integral/side_advection_flux_integral.i)
- (modules/navier_stokes/test/tests/auxkernels/liquid-fraction-aux/liquid-fraction-fv-aux.i)
- (test/tests/userobjects/solution_user_object/discontinuous_value_solution_uo_p1.i)
- (test/tests/userobjects/pointwise_renormalize_vector/test.i)
- (test/tests/kernels/mass_lumping/mass_lumping_jacobian.i)
- (modules/richards/test/tests/buckley_leverett/bl22.i)
- (modules/porous_flow/test/tests/energy_conservation/except02.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/mms/porosity_change/2d-rc-continuous.i)
- (modules/phase_field/examples/kim-kim-suzuki/kks_example_dirichlet.i)
- (modules/geochemistry/test/tests/kernels/time_deriv_2.i)
- (modules/phase_field/test/tests/grain_boundary_area/diagonal.i)
- (modules/richards/test/tests/sinks/s05.i)
- (modules/richards/test/tests/dirac/bh05.i)
- (modules/navier_stokes/examples/laser-welding/2d-fv.i)
- (test/tests/auxkernels/solution_aux/aux_nonlinear_solution_adapt_xda.i)
- (test/tests/scaling/residual-based/residual-based-two-var.i)
- (modules/porous_flow/test/tests/numerical_diffusion/fltvd_none.i)
- (modules/phase_field/test/tests/boundary_intersecting_features/boundary_intersecting_features.i)
- (modules/phase_field/test/tests/free_energy_material/IdealGasFreeEnergy.i)
- (test/tests/functions/image_function/flip_quad.i)
- (test/tests/scaling/residual-based/residual-based.i)
- (modules/phase_field/examples/multiphase/DerivativeMultiPhaseMaterial.i)
- (modules/phase_field/examples/fourier_noise.i)
- (test/tests/vectorpostprocessors/spherical_average/spherical_average.i)
- (test/tests/multiapps/grid-sequencing/vi-fine-alone.i)
- (test/tests/misc/check_error/function_file_test1.i)
- (modules/chemical_reactions/test/tests/parser/equilibrium_without_action.i)
- (modules/fluid_properties/test/tests/water/water.i)
- (modules/porous_flow/test/tests/newton_cooling/nc04.i)
- (test/tests/time_integrators/explicit-euler/ee-2d-linear.i)
- (modules/porous_flow/test/tests/jacobian/fflux02_fully_saturated.i)
- (modules/porous_flow/test/tests/flux_limited_TVD_advection/fltvd_2D_blocks.i)
- (modules/porous_flow/examples/coal_mining/coarse_with_fluid.i)
- (modules/geochemistry/test/tests/kernels/dispersion_1.i)
- (test/tests/postprocessors/pseudotimestep/fv_burgers_pseudo.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialMultiphase_AD.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)
- (test/tests/restart/restart_subapp_not_parent/complete_solve_no_subapp.i)
- (modules/chemical_reactions/examples/calcium_bicarbonate/calcium_bicarbonate.i)
- (test/tests/time_steppers/timesequence_stepper/timesequence_restart3.i)
- (test/tests/nodalkernels/constraint_enforcement/upper-bound.i)
- (modules/thermal_hydraulics/test/tests/utils/smooth_transition/ad_smooth_transition.i)
- (test/tests/misc/check_error/function_file_test7.i)
- (test/tests/time_integrators/rk-2/1d-linear.i)
- (modules/richards/test/tests/dirac/bh_fu_03.i)
- (modules/navier_stokes/test/tests/finite_volume/materials/mixture_material/mixture.i)
- (modules/optimization/examples/simpleTransient/forward_mesh.i)
- (modules/porous_flow/test/tests/mass_conservation/mass07.i)
- (test/tests/functions/solution_function/solution_function_grad_p1.i)
- (test/tests/outputs/debug/show_execution_fv_flux_objects.i)
- (modules/phase_field/examples/multiphase/GrandPotential3Phase_masscons.i)
- (modules/combined/test/tests/phase_field_fracture/crack2d_vi_solver.i)
- (test/tests/time_steppers/function_dt/function_dt_no_interpolation.i)
- (modules/scalar_transport/test/tests/ncp-lms/interpolated-ncp-lm-nodal-enforcement.i)
- (modules/richards/test/tests/buckley_leverett/bl22_lumped_fu.i)
- (test/tests/auxkernels/advection_flux/normal_advection_flux_fe.i)
- (modules/phase_field/test/tests/MultiPhase/crosstermbarrierfunction.i)
- (modules/porous_flow/test/tests/capillary_pressure/brooks_corey1.i)
- (modules/xfem/test/tests/nucleation_uo/nucleate_edge_crack_2d.i)
- (test/tests/transfers/general_field/nearest_node/regular/main.i)
- (modules/richards/test/tests/dirac/bh08.i)
- (modules/combined/test/tests/multiphase_mechanics/multiphasestress.i)
- (modules/porous_flow/test/tests/newton_cooling/nc06.i)
- (test/tests/transfers/general_field/nearest_node/boundary/sub.i)
- (test/tests/fvkernels/vector-interpolation/test.i)
- (modules/richards/test/tests/dirac/bh_fu_08.i)
- (modules/porous_flow/examples/multiapp_fracture_flow/3dFracture/matrix_app.i)
- (test/tests/misc/check_error/function_file_test9.i)
- (modules/richards/test/tests/sinks/s02.i)
- (modules/phase_field/test/tests/feature_flood_test/parallel_feature_count.i)
- (modules/level_set/test/tests/verification/1d_level_set_supg_mms/1d_level_set_supg_mms.i)
- (modules/geochemistry/test/tests/nodal_void_volume/nodal_void_volume_adaptive.i)
- (test/tests/auxkernels/diffusion_flux/normal_diffusion_flux.i)
- (modules/porous_flow/test/tests/basic_advection/except1.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/porous-hllc.i)
- (modules/richards/test/tests/sinks/s_fu_01.i)
- (test/tests/auxkernels/functor_elemental_gradient/functor_gradient.i)
- (modules/richards/test/tests/user_objects/uo1.i)
- (test/tests/time_integrators/actually_explicit_euler_verification/ee-2d-linear.i)
- (test/tests/auxkernels/linear_combination/test.i)
- (modules/combined/test/tests/CHSplitFlux/flux_gb.i)
- (test/tests/transfers/general_field/user_object/regular/main.i)
- (test/tests/nodalkernels/constraint_enforcement/lower-bound.i)
- (test/tests/auxkernels/forcing_function_aux/forcing_function_aux.i)
- (test/tests/transfers/general_field/shape_evaluation/regular/sub.i)
- (modules/phase_field/test/tests/MultiPhase/thirdphasesuppressionmaterial.i)
- (test/tests/functions/image_function/image.i)
- (test/tests/time_integrators/explicit-euler/ee-2d-quadratic.i)
- (modules/richards/test/tests/theis/th02.i)
- (modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_2D_trimesh.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/1species.i)
- (test/tests/functions/image_function/error/check_error.i)
- (modules/level_set/test/tests/verification/1d_level_set_mms/level_set_mms.i)
- (modules/thermal_hydraulics/test/tests/utils/smooth_transition/smooth_transition.i)
- (test/tests/transfers/general_field/shape_evaluation/boundary/sub.i)
- (modules/combined/test/tests/DiffuseCreep/stress_based_chem_pot.i)
- (test/tests/transfers/general_field/user_object/boundary/main.i)
- (test/tests/misc/check_error/function_file_test6.i)
- (test/tests/multiapps/grid-sequencing/vi-coarser.i)
- (test/tests/bcs/periodic/no_add_scalar.i)
- (modules/porous_flow/test/tests/dispersion/disp01_fv.i)
- (modules/heat_transfer/test/tests/verify_against_analytical/1D_transient.i)
- (test/tests/kernels/resid_jac_together/diffusion_reaction.i)
- (modules/combined/test/tests/surface_tension_KKS/surface_tension_KKS.i)
- (test/tests/kernels/material_coupled_force/material_coupled_force.i)
- (modules/richards/test/tests/jacobian_2/jn_fu_17.i)
- (test/tests/fvkernels/fv_burgers/fv_burgers.i)
- (test/tests/functions/solution_function/solution_function_scale_transl.i)
- (test/tests/misc/initial_solution_copy/solutions_equal.i)
- (test/tests/transfers/multiapp_projection_transfer/high_order_parent.i)
- (modules/richards/test/tests/dirac/bh03.i)
- (modules/porous_flow/examples/groundwater/ex02_steady_state.i)
- (test/tests/materials/derivative_material_interface/ad_parsed_material.i)
- (test/tests/transfers/general_field/nearest_node/nearest_position/main.i)
- (test/tests/time_steppers/timesequence_stepper/timesequence_restart2.i)
- (test/tests/fvkernels/mms/advective-outflow/limited-advection.i)
- (test/tests/multiapps/quadrature_point_multiapp/quadrature_point_multiapp.i)
- (modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_3D.i)
- (test/tests/functions/image_function/moose_logo_test_2D.i)
- (modules/combined/test/tests/DiffuseCreep/variable_base_eigen_strain.i)
- (test/tests/transfers/multiapp_projection_transfer/high_order_sub.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/2species_eqaux.i)
- (modules/optimization/test/tests/functions/parameter_mesh/create_mesh_second.i)
- (modules/porous_flow/test/tests/relperm/corey4.i)
- (modules/richards/test/tests/theis/th21.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/symmetry_test/2D_symmetry.i)
- (modules/porous_flow/examples/multiapp_fracture_flow/diffusion_multiapp/single_var.i)
- (test/tests/transfers/general_field/nearest_node/mesh_division/main_match_subapps.i)
- (test/tests/misc/check_error/function_file_test17.i)
- (test/tests/functions/image_function/image_3d_subset.i)
- (modules/richards/test/tests/sinks/s01.i)
- (modules/porous_flow/test/tests/sinks/s05.i)
- (modules/phase_field/examples/interfacekernels/interface_fluxbc.i)
- (modules/phase_field/examples/slkks/CrFe_sigma.i)
- (test/tests/postprocessors/find_value_on_line/findvalueonline.i)
- (modules/porous_flow/test/tests/mass_conservation/mass10.i)
- (test/tests/transfers/general_field/user_object/regular/sub.i)
- (test/tests/coord_type/coord_type_rz_general.i)
- (modules/porous_flow/test/tests/relperm/corey3.i)
- (test/tests/time_steppers/timesequence_stepper/csvtimesequence.i)
- (modules/solid_mechanics/test/tests/interface_stress/test.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/SinteringBase.i)
- (test/tests/transfers/general_field/shape_evaluation/mesh_division/sub.i)
- (python/chigger/tests/input/block_vars.i)
- (test/tests/time_integrators/rk-2/2d-quadratic.i)
- (modules/porous_flow/test/tests/poroperm/except2.i)
- (test/tests/time_integrators/actually_explicit_euler_verification/ee-1d-linear.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mms/lid-mesh-velocity/1d-simplified.i)
- (test/tests/misc/check_error/function_file_test4.i)
- (test/tests/time_integrators/actually_explicit_euler_verification/ee-2d-quadratic.i)
- (modules/optimization/test/tests/vectorpostprocessors/element_reaction_inner_product/element_reaction_inner_product.i)
- (test/tests/transfers/coord_transform/both-transformed/copy/main-app.i)
- (test/tests/misc/check_error/function_file_test16.i)
- (test/tests/materials/compile_time_derivative/test.i)
- (test/tests/transfers/general_field/nearest_node/between_siblings/sub_between_diffusion1.i)
- (test/tests/markers/two_circle_marker/two_circle_marker_gaussian_ic.i)
- (modules/porous_flow/test/tests/poroperm/except1.i)
- (test/tests/nodalkernels/constraint_enforcement/vi-bounding.i)
- (modules/scalar_transport/test/tests/ncp-lms/interpolated-ncp-lm-nodal-enforcement-nodal-forces.i)
- (test/tests/ics/lagrange_ic/3d_second_order.i)
- (modules/porous_flow/test/tests/aux_kernels/darcy_velocity_lower.i)
- (modules/porous_flow/test/tests/flux_limited_TVD_pflow/jacobian_05.i)
- (test/tests/transfers/general_field/shape_evaluation/subdomain/sub.i)
- (test/tests/transfers/general_field/user_object/boundary/sub.i)
- (modules/stochastic_tools/test/tests/auxkernels/surrogate_aux/surrogate_array_aux.i)
- (modules/scalar_transport/test/tests/ncp-lms/ncp-lm.i)
- (modules/richards/test/tests/dirac/bh_fu_05.i)
- (modules/xfem/test/tests/nucleation_uo/nucleate_2edge_cracks_2d.i)
- (test/tests/ics/function_ic/parsed_function.i)
- (modules/porous_flow/test/tests/chemistry/2species_equilibrium_2phase.i)
- (modules/richards/test/tests/excav/ex02.i)
- (test/tests/misc/check_error/function_file_test15.i)
- (modules/richards/test/tests/sinks/s_fu_03.i)
- (test/tests/meshgenerators/file_mesh_generator/2d_diffusion_iga_nosplines.i)
- (modules/phase_field/test/tests/phase_field_kernels/ADAllenCahnVariableL.i)
- (modules/porous_flow/test/tests/mass_conservation/mass08.i)
- (test/tests/transfers/general_field/nearest_node/nearest_position/main_single_sub.i)
- (modules/xfem/test/tests/switching_material/one_cut_stationary.i)
- (test/tests/bcs/coupled_var_neumann/coupled_var_neumann.i)
- (test/tests/transfers/general_field/nearest_node/between_siblings/sub_between_diffusion2.i)
- (modules/porous_flow/test/tests/jacobian/fflux02.i)
- (modules/porous_flow/examples/tidal/atm_tides.i)
- (modules/porous_flow/examples/coal_mining/fine_with_fluid.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/SinteringDilute.i)
- (modules/porous_flow/test/tests/heat_advection/heat_advection_1d_fullsat.i)
- (modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/linear_friction.i)
- (test/tests/indicators/laplacian_jump_indicator/biharmonic_transient.i)
- (modules/phase_field/examples/multiphase/GrandPotential3Phase.i)
- (test/tests/transfers/general_field/shape_evaluation/between_siblings/sub_between_diffusion1.i)
- (modules/porous_flow/test/tests/basic_advection/2phase.i)
- (test/tests/auxkernels/grad_component/grad_component_monomial.i)
- (test/tests/misc/check_error/function_file_test11.i)
- (test/tests/functions/image_function/shift_and_scale.i)
- (test/tests/functions/piecewise_constant_from_csv/piecewise_constant_elem_multiple.i)
- (test/tests/meshgenerators/file_mesh_generator/1d_discontinuous_iga.i)
- (modules/porous_flow/test/tests/mass_conservation/mass02.i)
- (test/tests/time_integrators/multi_stage_time_integrator/unconverged_1st_stage.i)
- (modules/xfem/test/tests/moving_interface/ad_phase_transition_2d.i)
- (test/tests/auxkernels/solution_aux/aux_nonlinear_solution_xdr.i)
- (modules/porous_flow/test/tests/relperm/vangenuchten2.i)
- (modules/porous_flow/test/tests/hysteresis/hys_sat_02.i)
- (python/peacock/tests/common/spherical_average.i)
- (modules/richards/test/tests/buckley_leverett/bl02.i)
- (modules/porous_flow/test/tests/basic_advection/except2.i)
- (modules/phase_field/test/tests/slkks/full_solve.i)
- (modules/porous_flow/test/tests/energy_conservation/except01.i)
- (test/tests/transfers/general_field/shape_evaluation/regular/main.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/varying-eps-basic-kt-mixed.i)
- (test/tests/dgkernels/1d_advection_dg/1d_advection_dg.i)
- (modules/combined/test/tests/GBDependentTensors/gb_property.i)
- (test/tests/time_integrators/explicit-euler/ee-1d-quadratic.i)
- (modules/richards/test/tests/uo_egs/seff2.i)
- (modules/level_set/examples/rotating_circle/circle_rotate_parent.i)
- (modules/phase_field/examples/kim-kim-suzuki/kks_example_noflux.i)
- (test/tests/restart/restart_subapp_not_parent/two_step_solve_sub.i)
- (modules/phase_field/test/tests/misc/interface_flux.i)
- (modules/richards/test/tests/user_objects/uo2.i)
- (modules/porous_flow/test/tests/hysteresis/hys_sat_01.i)
- (modules/phase_field/test/tests/ExpressionBuilderCoupledVectorTest/testCoupledVector.i)
- (test/tests/auxkernels/time_derivative/time_derivative_nl.i)
- (test/tests/kernels/ad_mat_diffusion/1D_transient.i)
- (test/tests/materials/derivative_material_interface/ad_construction_order.i)
- (modules/xfem/test/tests/moving_interface/phase_transition_2d.i)
- (test/tests/time_steppers/timesequence_stepper/exodustimesequence.i)
- (modules/porous_flow/test/tests/jacobian/fflux01.i)
- (modules/richards/test/tests/buckley_leverett/bl01_lumped_fu.i)
- (test/tests/vectorpostprocessors/mesh_division_functor_reduction/reduction.i)
- (modules/porous_flow/test/tests/flux_limited_TVD_advection/jacobian_03.i)
- (test/tests/bcs/sin_bc/sin_dirichlet_test.i)
- (modules/porous_flow/test/tests/relperm/vangenuchten1.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/free-flow-hllc.i)
- (modules/porous_flow/test/tests/heat_advection/heat_advection_1d.i)
- (test/tests/auxkernels/projection_aux/1d.i)
- (modules/level_set/examples/vortex/vortex_supg.i)
- (modules/porous_flow/test/tests/heterogeneous_materials/constant_poroperm_fv.i)
- (modules/porous_flow/test/tests/heat_advection/heat_advection_1d_fully_saturated_action.i)
- (modules/porous_flow/examples/lava_lamp/2phase_convection.i)
- (test/tests/transfers/general_field/nearest_node/regular/sub.i)
- (test/tests/misc/check_error/missing_function_test.i)
- (modules/richards/test/tests/jacobian_2/jn17.i)
- (modules/porous_flow/test/tests/sinks/s13.i)
- (modules/solid_mechanics/test/tests/auxkernels/tensorelasticenergyaux.i)
- (modules/porous_flow/test/tests/recover/pffltvd.i)
- (modules/phase_field/examples/slkks/CrFe.i)
- (modules/scalar_transport/test/tests/ncp-lms/diagonal-ncp-lm-nodal-enforcement.i)
- (modules/richards/test/tests/buckley_leverett/bl20_lumped_fu.i)
- (modules/porous_flow/test/tests/hysteresis/hys_pc_1.i)
- (modules/porous_flow/test/tests/basic_advection/1phase.i)
- (test/tests/functions/image_function/image_mesh_2d.i)
- (test/tests/dgkernels/dg_displacement/dg_displacement.i)
- (modules/phase_field/examples/interfacekernels/interface_gradient.i)
- (modules/phase_field/test/tests/electrochem_sintering/ElectrochemicalSintering_test.i)
- (modules/rdg/test/tests/advection_1d/rdgP0.i)
- (test/tests/misc/check_error/function_file_test3.i)
- (modules/rdg/test/tests/advection_1d/block_restrictable.i)
- (modules/porous_flow/test/tests/numerical_diffusion/fully_saturated_action.i)
- (test/tests/misc/jacobian/offdiag.i)
- (modules/richards/test/tests/buckley_leverett/bl01.i)
- (test/tests/functions/image_function/component.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/phase_field/test/tests/free_energy_material/RegularSolutionFreeEnergy.i)
- (modules/porous_flow/test/tests/radioactive_decay/radioactive_decay01.i)
- (test/tests/auxkernels/advection_flux/advection_flux_fe.i)
- (modules/level_set/test/tests/functions/olsson_plane/olsson_plane.i)
- (test/tests/vectorpostprocessors/element_value_sampler/element_value_sampler.i)
- (modules/fsi/test/tests/2d-finite-strain-steady/thermal-me.i)
- (test/tests/userobjects/shape_element_user_object/jacobian_test.i)
- (test/tests/transfers/general_field/user_object/between_siblings/sub_between_diffusion2.i)
- (test/tests/misc/check_error/function_file_test14.i)
- (modules/porous_flow/test/tests/jacobian/fflux01_fully_saturated.i)
- (test/tests/bcs/sin_bc/sin_neumann_test.i)
- (modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_2D_angle.i)
- (test/tests/executioners/nullspace/singular.i)
- (modules/porous_flow/test/tests/flux_limited_TVD_advection/fltvd_3D.i)
- (modules/porous_flow/examples/natural_convection/natural_convection.i)
- (test/tests/postprocessors/side_advection_flux_integral/side_advection_flux_integral_fv.i)
- (modules/richards/test/tests/uo_egs/density.i)
- (test/tests/materials/functor_properties/ad_conversion/1d_dirichlet.i)
- (test/tests/meshgenerators/file_mesh_generator/exact_discontinuous_iga.i)
- (modules/porous_flow/test/tests/newton_cooling/nc08.i)
- (modules/porous_flow/test/tests/flux_limited_TVD_advection/fltvd_1D_adaptivity.i)
- (modules/porous_flow/test/tests/poroperm/poro_hm.i)
- (test/tests/functions/image_function/image_3d.i)
- (tutorials/tutorial03_verification/app/test/tests/step04_mms/2d_mms_temporal.i)
- (test/tests/bcs/mat_neumann_bc/ad_mat_neumann.i)
- (modules/phase_field/test/tests/MultiPhase/asymmetriccrosstermbarrierfunction.i)
- (test/tests/kernels/ad_mat_diffusion/ad_1D_transient.i)
- (modules/geochemistry/test/tests/kernels/time_deriv_1.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/2species.i)
- (modules/porous_flow/test/tests/flux_limited_TVD_advection/fltvd_1D.i)
- (test/tests/multiapps/grid-sequencing/vi-fine.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialMultiphase.i)
- (test/tests/postprocessors/displaced_mesh/elemental.i)
- (modules/porous_flow/examples/multiapp_fracture_flow/diffusion_multiapp/fracture_app_heat.i)
- (test/tests/multiapps/grid-sequencing/vi-coarse.i)
- (modules/porous_flow/test/tests/relperm/brooks_corey2.i)
- (test/tests/transfers/coord_transform/both-transformed/nearest-node/main-app.i)
- (modules/fluid_properties/test/tests/brine/brine.i)
- (test/tests/nodalkernels/constraint_enforcement/ad-upper-and-lower-bound.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/1species_without_action.i)
- (modules/phase_field/test/tests/KKS_system/nonlinear.i)
- (modules/optimization/examples/simpleTransient/forward.i)
- (test/tests/time_steppers/postprocessor_dt/postprocessor_dt.i)
- (modules/chemical_reactions/test/tests/thermochimica/FeTiVO.i)
- (modules/phase_field/test/tests/misc/interface_grad.i)
- (modules/richards/test/tests/buckley_leverett/bl22_lumped.i)
- (test/tests/functions/image_function/error/threshold_values.i)
- (modules/combined/test/tests/DiffuseCreep/stress.i)
- (test/tests/meshgenerators/file_mesh_generator/2d_discontinuous_iga.i)
- (test/tests/transfers/general_field/nearest_node/boundary/main.i)
- (modules/porous_flow/examples/groundwater/ex02_abstraction.i)
- (test/tests/functions/image_function/crop.i)
- (test/tests/functions/image_function/flip.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/varying-eps-hllc.i)
- (modules/porous_flow/test/tests/heterogeneous_materials/constant_poroperm.i)
- (modules/chemical_reactions/test/tests/thermochimica/MoRu.i)
- (test/tests/multiapps/quadrature_point_multiapp/sub_app.i)
- (test/tests/materials/functor_properties/1d_dirichlet.i)
- (modules/richards/test/tests/user_objects/uo3.i)
- (modules/phase_field/test/tests/phase_field_kernels/SplitCHWRes.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/pwcnsfv.i)
- (modules/richards/test/tests/dirac/bh_lumped_07.i)
- (modules/porous_flow/test/tests/numerical_diffusion/pffltvd.i)
- (modules/fsi/test/tests/fsi_acoustics/1D_fluid_only/1D_fluid_only.i)
- (modules/level_set/examples/rotating_circle/circle_rotate_supg.i)
- (modules/porous_flow/examples/co2_intercomparison/1Dradial/properties.i)
- (modules/porous_flow/test/tests/mass_conservation/mass01.i)
- (test/tests/time_steppers/function_dt/function_dt_min.i)
- (modules/porous_flow/test/tests/dirackernels/pls03.i)
- (test/tests/kernels/conservative_advection/none_in_none_out.i)
- (modules/porous_flow/test/tests/relperm/corey2.i)
- (test/tests/transfers/multiapp_copy_transfer/vector-variable-transfer/sub_L2_LagrangeVec.i)
- (test/tests/kernels/conservative_advection/none_in_all_out.i)
- (modules/richards/test/tests/theis/th22.i)
- (test/tests/kernels/mass_lumping/mass_lumping.i)
- (modules/ray_tracing/test/tests/userobjects/ray_tracing_study/kernel_change_ray/kernel_change_ray.i)
- (tutorials/darcy_thermo_mech/step04_velocity_aux/tests/auxkernels/velocity_aux/velocity_aux.i)
- (test/tests/transfers/general_field/nearest_node/mesh_division/main_match_division.i)
- (modules/porous_flow/examples/tidal/atm_tides_open_hole.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/xfem/test/tests/switching_material/two_cuts_stationary.i)
- (modules/porous_flow/test/tests/flux_limited_TVD_advection/jacobian_02.i)
- (modules/level_set/examples/vortex/vortex.i)
- (modules/navier_stokes/examples/laser-welding/3d.i)
- (test/tests/time_integrators/actually_explicit_euler_verification/ee-1d-quadratic.i)
- (test/tests/functions/solution_function/solution_function_rot1.i)
- (modules/phase_field/test/tests/free_energy_material/RegularSolutionFreeEnergy_const_T.i)
- (modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_2D.i)
- (modules/combined/test/tests/multiphase_mechanics/twophasestress.i)
- (test/tests/mortar/continuity-2d-conforming/equalgradient.i)
- (modules/level_set/test/tests/transfers/copy_solution/parent.i)
- (modules/porous_flow/test/tests/mass_conservation/mass14.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/userobject/HLLC/hllc_uo_2D_tri.i)
- (test/tests/vectorpostprocessors/element_value_sampler/fv_element_value_sampler.i)
- (modules/combined/test/tests/surface_tension_KKS/surface_tension_VDWgas.i)
- (test/tests/bcs/misc_bcs/weak_gradient_bc_test.i)
- (test/tests/transfers/multiapp_userobject_transfer/two_pipe_sub.i)
- (modules/porous_flow/examples/multiapp_fracture_flow/diffusion_multiapp/fracture_app.i)
- (test/tests/auxkernels/solution_aux/aux_nonlinear_solution_xda.i)
- (test/tests/transfers/general_field/shape_evaluation/mesh_division/main_match_subapps.i)
- (test/tests/transfers/multiapp_vector_pp_transfer/parent.i)
- (modules/combined/test/tests/DiffuseCreep/strain_gb_relax.i)
- (modules/combined/test/tests/DiffuseCreep/strain.i)
- (test/tests/auxkernels/advection_flux/advection_flux_fv.i)
- (modules/richards/test/tests/dirac/bh04.i)
- (test/tests/interfacekernels/ik_displaced/displaced.i)
- (modules/porous_flow/test/tests/capillary_pressure/vangenuchten2.i)
- (modules/phase_field/test/tests/KKS_system/lagrange_multiplier.i)
- (modules/richards/test/tests/sinks/q2p01.i)
- (modules/optimization/test/tests/functions/parameter_mesh/create_mesh.i)
- (test/tests/transfers/general_field/shape_evaluation/between_siblings/sub_between_diffusion2.i)
- (test/tests/functions/image_function/flip_dual.i)
- (modules/chemical_reactions/test/tests/thermochimica/MoRu_subblock.i)
Child Objects
function
C++ Type:FunctionName
Controllable:No
Description:The initial condition function.
block
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:The list of blocks (ids or names) that this object will be applied
boundary
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The list of boundaries (ids or names) from the mesh where this object applies
(test/tests/ics/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/level_set/examples/vortex/vortex_reinit.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmax = 1
ymax = 1
nx = 16
ny = 16
uniform_refine = 2
elem_type = QUAD9
second_order = true
[]
[AuxVariables]
[./velocity]
family = LAGRANGE_VEC
[../]
[]
[AuxKernels]
[./vec]
type = VectorFunctionAux
variable = velocity
function = velocity_func
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
[Variables]
[phi]
family = LAGRANGE
[]
[]
[Functions]
[phi_exact]
type = LevelSetOlssonBubble
epsilon = 0.03
center = '0.5 0.75 0'
radius = 0.15
[]
[./velocity_func]
type = LevelSetOlssonVortex
reverse_time = 2
[../]
[]
[ICs]
[phi_ic]
type = FunctionIC
function = phi_exact
variable = phi
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = phi
[]
[advection]
type = LevelSetAdvection
velocity = velocity
variable = phi
[]
[advection_supg]
type = LevelSetAdvectionSUPG
velocity = velocity
variable = phi
[]
[time_supg]
type = LevelSetTimeDerivativeSUPG
velocity = velocity
variable = phi
[]
[]
[Postprocessors]
[area]
type = LevelSetVolume
threshold = 0.5
variable = phi
location = outside
execute_on = 'initial timestep_end'
[]
[cfl]
type = LevelSetCFLCondition
velocity = velocity
execute_on = 'initial timestep_end'
[]
[]
[Problem]
type = LevelSetProblem
[]
[Preconditioning/smp]
type = SMP
full = true
[]
[Executioner]
type = Transient
solve_type = NEWTON
start_time = 0
end_time = 2
scheme = crank-nicolson
[TimeStepper]
type = PostprocessorDT
postprocessor = cfl
scale = 0.8
[]
[]
[MultiApps]
[reinit]
type = LevelSetReinitializationMultiApp
input_files = 'vortex_reinit_sub.i'
execute_on = TIMESTEP_END
[]
[]
[Transfers]
[to_sub]
type = MultiAppCopyTransfer
source_variable = phi
variable = phi
to_multi_app = reinit
execute_on = 'timestep_end'
[]
[to_sub_init]
type = MultiAppCopyTransfer
source_variable = phi
variable = phi_0
to_multi_app = reinit
execute_on = 'timestep_end'
[]
[from_sub]
type = MultiAppCopyTransfer
source_variable = phi
variable = phi
from_multi_app = reinit
execute_on = 'timestep_end'
[]
[]
[Outputs]
csv = true
exodus = true
[]
(modules/porous_flow/test/tests/sinks/s08.i)
# apply a sink flux on just one component of a 3-component, 2-phase system and observe the correct behavior
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 2
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pwater frac_ph0_c0 pgas'
number_fluid_phases = 2
number_fluid_components = 3
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1.1
[]
[]
[Variables]
[pwater]
[]
[frac_ph0_c0]
initial_condition = 0.3
[]
[pgas]
[]
[]
[ICs]
[pwater]
type = FunctionIC
variable = pwater
function = y
[]
[pgas]
type = FunctionIC
variable = pgas
function = y+3
[]
[]
[Kernels]
[mass_c0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = frac_ph0_c0
[]
[mass_c1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = pwater
[]
[mass_c2]
type = PorousFlowMassTimeDerivative
fluid_component = 2
variable = pgas
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 2.3
density0 = 1.5
thermal_expansion = 0
viscosity = 2.1
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1.3
density0 = 1.1
thermal_expansion = 0
viscosity = 1.1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = pwater
phase1_porepressure = pgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'frac_ph0_c0 frac_ph0_c1 frac_ph1_c0 frac_ph1_c1'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0.2 0 0 0 0.1 0 0 0 0.1'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 1
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 1
[]
[]
[AuxVariables]
[flux_out]
[]
[frac_ph0_c1]
initial_condition = 0.35
[]
[frac_ph1_c0]
initial_condition = 0.1
[]
[frac_ph1_c1]
initial_condition = 0.8
[]
[]
[Functions]
[mass1_00]
type = ParsedFunction
expression = 'fgas*vol*por*dens0gas*exp(pgas/bulkgas)*(1-pow(1+pow(al*(pgas-pwater),1.0/(1-m)),-m))+fwater*vol*por*dens0water*exp(pwater/bulkwater)*(pow(1+pow(al*(pgas-pwater),1.0/(1-m)),-m))'
symbol_names = 'vol por dens0gas pgas pwater bulkgas al m dens0water bulkwater fgas fwater'
symbol_values = '0.25 0.1 1.1 pgas_00 pwater_00 1.3 1.1 0.5 1.5 2.3 frac_ph1_c1_00 frac_ph0_c1_00'
[]
[expected_mass_change1_00]
type = ParsedFunction
expression = 'frac*fcn*area*dt*pow(1-pow(1+pow(al*(pgas-pwater),1.0/(1-m)),-m), 2)'
symbol_names = 'frac fcn area dt pgas pwater al m'
symbol_values = 'frac_ph1_c1_00 100 0.5 1E-3 pgas_00 pwater_00 1.1 0.5'
[]
[mass1_00_expect]
type = ParsedFunction
expression = 'mass_prev-mass_change'
symbol_names = 'mass_prev mass_change'
symbol_values = 'm1_00_prev del_m1_00'
[]
[]
[Postprocessors]
[total_mass_comp0]
type = PorousFlowFluidMass
fluid_component = 0
[]
[total_mass_comp1]
type = PorousFlowFluidMass
fluid_component = 1
[]
[total_mass_comp2]
type = PorousFlowFluidMass
fluid_component = 2
[]
[frac_ph1_c1_00]
type = PointValue
point = '0 0 0'
variable = frac_ph1_c1
execute_on = 'initial timestep_end'
[]
[frac_ph0_c1_00]
type = PointValue
point = '0 0 0'
variable = frac_ph0_c1
execute_on = 'initial timestep_end'
[]
[flux_00]
type = PointValue
point = '0 0 0'
variable = flux_out
execute_on = 'initial timestep_end'
[]
[pgas_00]
type = PointValue
point = '0 0 0'
variable = pgas
execute_on = 'initial timestep_end'
[]
[pwater_00]
type = PointValue
point = '0 0 0'
variable = pwater
execute_on = 'initial timestep_end'
[]
[m1_00]
type = FunctionValuePostprocessor
function = mass1_00
execute_on = 'initial timestep_end'
[]
[m1_00_prev]
type = FunctionValuePostprocessor
function = mass1_00
execute_on = 'timestep_begin'
outputs = 'console'
[]
[del_m1_00]
type = FunctionValuePostprocessor
function = expected_mass_change1_00
execute_on = 'timestep_end'
outputs = 'console'
[]
[m1_00_expect]
type = FunctionValuePostprocessor
function = mass1_00_expect
execute_on = 'timestep_end'
[]
[]
[BCs]
[flux_ph1_c1]
type = PorousFlowSink
boundary = 'left'
variable = pwater # sink applied to the mass_c1 Kernel
use_mobility = false
use_relperm = true
mass_fraction_component = 1
fluid_phase = 1
flux_function = 100
save_in = flux_out
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -snes_max_it -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu 100 NONZERO 2'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E-3
end_time = 0.01
nl_rel_tol = 1E-12
nl_abs_tol = 1E-12
[]
[Outputs]
file_base = s08
exodus = true
[console]
type = Console
execute_on = 'nonlinear linear'
[]
[csv]
type = CSV
execute_on = 'timestep_end'
[]
[]
(modules/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/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_1D.i)
# Using flux-limited TVD advection ala Kuzmin and Turek, mploying PorousFlow Kernels and UserObjects, with superbee flux-limiter
# 1D version
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[porepressure]
[]
[tracer]
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x'
[]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = tracer
[]
[flux0]
type = PorousFlowFluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = advective_flux_calculator_0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[]
[flux1]
type = PorousFlowFluxLimitedTVDAdvection
variable = porepressure
advective_flux_calculator = advective_flux_calculator_1
[]
[]
[BCs]
[constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1
boundary = left
[]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[]
[remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure tracer'
number_fluid_phases = 1
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[advective_flux_calculator_0]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 0
[]
[advective_flux_calculator_1]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = tracer
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[]
[]
[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'
[]
[]
[VectorPostprocessors]
[tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 11
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-2
nl_abs_tol = 1E-8
timestep_tolerance = 1E-3
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(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
[]
(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
[]
(modules/porous_flow/test/tests/newton_cooling/nc02.i)
# Newton cooling from a bar. 1-phase steady
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1000
ny = 1
xmin = 0
xmax = 100
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pressure'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.8
alpha = 1e-5
[]
[]
[Variables]
[pressure]
[]
[]
[ICs]
[pressure]
type = FunctionIC
variable = pressure
function = '(2-x/100)*1E6'
[]
[]
[Kernels]
[flux]
type = PorousFlowAdvectiveFlux
fluid_component = 0
gravity = '0 0 0'
variable = pressure
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1e6
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pressure
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-15 0 0 0 1E-15 0 0 0 1E-15'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey # irrelevant in this fully-saturated situation
n = 2
phase = 0
[]
[]
[BCs]
[left]
type = DirichletBC
variable = pressure
boundary = left
value = 2E6
[]
[newton]
type = PorousFlowPiecewiseLinearSink
variable = pressure
boundary = right
pt_vals = '0 100000 200000 300000 400000 500000 600000 700000 800000 900000 1000000 1100000 1200000 1300000 1400000 1500000 1600000 1700000 1800000 1900000 2000000'
multipliers = '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
fluid_phase = 0
flux_function = 1
[]
[]
[VectorPostprocessors]
[porepressure]
type = LineValueSampler
variable = pressure
start_point = '0 0.5 0'
end_point = '100 0.5 0'
sort_by = x
num_points = 20
execute_on = timestep_end
[]
[]
[Preconditioning]
active = 'andy'
[andy]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -snes_max_it -sub_pc_factor_shift_type -pc_asm_overlap -snes_atol -snes_rtol '
petsc_options_value = 'gmres asm lu 100 NONZERO 2 1E-12 1E-15'
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
file_base = nc02
execute_on = timestep_end
exodus = false
[along_line]
type = CSV
execute_vector_postprocessors_on = timestep_end
[]
[]
(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
[]
(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
[]
(test/tests/functions/solution_function/solution_function_test.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
# This test uses SolutionUserObject which doesn't work with DistributedMesh.
parallel_type = replicated
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_cond_func
[../]
[../]
[]
[AuxVariables]
[./u_aux]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_cond_func
[../]
[../]
[]
[Functions]
[./initial_cond_func]
type = SolutionFunction
solution = ex_soln
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[UserObjects]
[./ex_soln]
type = SolutionUserObject
system_variables = u
mesh = build_out_0001_mesh.xda
es = build_out_0001.xda
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-10
[]
[Outputs]
file_base = out
exodus = true
[]
(modules/richards/test/tests/sinks/s03.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 1
[../]
[./SeffVG]
type = RichardsSeff1VG
m = 0.5
al = 1
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0.1
sum_s_res = 0.2
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 0.1
[../]
[]
[Variables]
[./pressure]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = initial_pressure
[../]
[../]
[]
[AuxVariables]
[./seff]
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 2
[../]
[./mass_bal_fcn]
type = ParsedFunction
expression = abs((mi-lfout-rfout-mf)/2/(mi+mf))
symbol_names = 'mi mf lfout rfout'
symbol_values = 'mass_init mass_fin left_flux_out right_flux_out'
[../]
[]
[Postprocessors]
[./mass_init]
type = RichardsMass
variable = pressure
execute_on = timestep_begin
[../]
[./mass_fin]
type = RichardsMass
variable = pressure
execute_on = timestep_end
[../]
[./left_flux_out]
type = RichardsPiecewiseLinearSinkFlux
boundary = left
variable = pressure
pressures = '-1 1'
bare_fluxes = '1E2 2E2'
use_mobility = true
use_relperm = true
[../]
[./right_flux_out]
type = RichardsPiecewiseLinearSinkFlux
boundary = right
variable = pressure
pressures = '-1 1'
bare_fluxes = '1E2 2E2'
use_mobility = true
use_relperm = true
[../]
[./p0]
type = PointValue
point = '0 0 0'
variable = pressure
[../]
[./s0]
type = PointValue
point = '0 0 0'
variable = seff
[../]
[./mass_bal]
type = FunctionValuePostprocessor
function = mass_bal_fcn
[../]
[]
[BCs]
[./left_flux]
type = RichardsPiecewiseLinearSink
boundary = left
pressures = '-1 1'
bare_fluxes = '1E2 2E2'
variable = pressure
use_mobility = true
use_relperm = true
[../]
[./right_flux]
type = RichardsPiecewiseLinearSink
boundary = right
pressures = '-1 1'
bare_fluxes = '1E2 2E2'
variable = pressure
use_mobility = true
use_relperm = true
[../]
[]
[Kernels]
active = 'richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[]
[AuxKernels]
[./seff_auxk]
type = RichardsSeffAux
variable = seff
seff_UO = SeffVG
pressure_vars = 'pressure'
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-5 2.1E-5 2.2E-5 2.1E-5 0.1E-5 3.3E-5 2.2E-5 3.3E-5 2E-5'
density_UO = DensityConstBulk
relperm_UO = RelPermPower
SUPG_UO = SUPGstandard
sat_UO = Saturation
seff_UO = SeffVG
viscosity = 1E-3
gravity = '-1 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-12 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 2E-3
end_time = 0.2
[]
[Outputs]
file_base = s03
csv = true
execute_on = timestep_end
[]
(modules/solid_mechanics/test/tests/elasticitytensor/composite.i)
# This input file is designed to test the RankTwoAux and RankFourAux
# auxkernels, which report values out of the Tensors used in materials
# properties.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmax = 1
[]
[AuxVariables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = x
[../]
[../]
[./C1111_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./C1122_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./C1133_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./C3313_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./dC1111_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./dC1122_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./dC1133_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./dC3313_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./d2C1111_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./d2C1122_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./d2C1133_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./d2C3313_aux]
order = CONSTANT
family = MONOMIAL
[../]
[]
#[Kernels]
# [./diff]
# type = Diffusion
# variable = diffused
# [../]
#[]
[AuxKernels]
[./matl_C1111]
type = RankFourAux
rank_four_tensor = elasticity_tensor
index_i = 0
index_j = 0
index_k = 0
index_l = 0
variable = C1111_aux
execute_on = initial
[../]
[./matl_C1122]
type = RankFourAux
rank_four_tensor = elasticity_tensor
index_i = 0
index_j = 0
index_k = 1
index_l = 1
variable = C1122_aux
execute_on = initial
[../]
[./matl_C1133]
type = RankFourAux
rank_four_tensor = elasticity_tensor
index_i = 0
index_j = 0
index_k = 2
index_l = 2
variable = C1133_aux
execute_on = initial
[../]
[./matl_C3313]
type = RankFourAux
rank_four_tensor = elasticity_tensor
index_i = 2
index_j = 2
index_k = 0
index_l = 2
variable = C3313_aux
execute_on = initial
[../]
[./matl_dC1111]
type = RankFourAux
rank_four_tensor = delasticity_tensor/dc
index_i = 0
index_j = 0
index_k = 0
index_l = 0
variable = dC1111_aux
execute_on = initial
[../]
[./matl_dC1122]
type = RankFourAux
rank_four_tensor = delasticity_tensor/dc
index_i = 0
index_j = 0
index_k = 1
index_l = 1
variable = dC1122_aux
execute_on = initial
[../]
[./matl_dC1133]
type = RankFourAux
rank_four_tensor = delasticity_tensor/dc
index_i = 0
index_j = 0
index_k = 2
index_l = 2
variable = dC1133_aux
execute_on = initial
[../]
[./matl_dC3313]
type = RankFourAux
rank_four_tensor = delasticity_tensor/dc
index_i = 2
index_j = 2
index_k = 0
index_l = 2
variable = dC3313_aux
execute_on = initial
[../]
[./matl_d2C1111]
type = RankFourAux
rank_four_tensor = d^2elasticity_tensor/dc^2
index_i = 0
index_j = 0
index_k = 0
index_l = 0
variable = d2C1111_aux
execute_on = initial
[../]
[./matl_d2C1122]
type = RankFourAux
rank_four_tensor = d^2elasticity_tensor/dc^2
index_i = 0
index_j = 0
index_k = 1
index_l = 1
variable = d2C1122_aux
execute_on = initial
[../]
[./matl_d2C1133]
type = RankFourAux
rank_four_tensor = d^2elasticity_tensor/dc^2
index_i = 0
index_j = 0
index_k = 2
index_l = 2
variable = d2C1133_aux
execute_on = initial
[../]
[./matl_d2C3313]
type = RankFourAux
rank_four_tensor = d^2elasticity_tensor/dc^2
index_i = 2
index_j = 2
index_k = 0
index_l = 2
variable = d2C3313_aux
execute_on = initial
[../]
[]
[Materials]
[./Ca]
type = ComputeElasticityTensor
base_name = Ca
block = 0
fill_method = symmetric21
C_ijkl ='1111 .1122 1133 1123 1113 1112 2222 2233 2223 2213 2212 3333 3323 3313 3312 2323 2313 2312 1313 1312 1212'
[../]
[./Cb]
type = ComputeElasticityTensor
base_name = Cb
block = 0
fill_method = symmetric21
C_ijkl ='.1111 1122 .1133 .1123 .1113 .1112 .2222 .2233 .2223 .2213 .2212 .3333 .3323 .3313 .3312 .2323 .2313 .2312 .1313 .1312 .1212'
[../]
[./Fa]
type = DerivativeParsedMaterial
block = 0
property_name = Fa
expression = c^2
coupled_variables = c
[../]
[./Fb]
type = DerivativeParsedMaterial
block = 0
property_name = Fb
expression = (1-c)^3
coupled_variables = c
[../]
[./C]
type = CompositeElasticityTensor
block = 0
args = c
tensors = 'Ca Cb'
weights = 'Fa Fb'
[../]
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/sinks/s04.i)
# apply a piecewise-linear sink flux and observe the correct behavior
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 2
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[Variables]
[pp]
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = y+1
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.3
density0 = 1.1
thermal_expansion = 0
viscosity = 1.1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[AuxVariables]
[flux_out]
[]
[xval]
[]
[yval]
[]
[pt_shift]
initial_condition = 0.3
[]
[]
[ICs]
[xval]
type = FunctionIC
variable = xval
function = x
[]
[yval]
type = FunctionIC
variable = yval
function = y
[]
[]
[Functions]
[mass10]
type = ParsedFunction
expression = 'vol*por*dens0*exp(pp/bulk)'
symbol_names = 'vol por dens0 pp bulk'
symbol_values = '0.25 0.1 1.1 p10 1.3'
[]
[rate10]
type = ParsedFunction
expression = 'fcn*if(pp>0.8,1,if(pp<0.3,0.5,0.2+pp))'
symbol_names = 'fcn pp'
symbol_values = '8 p10'
[]
[mass10_expect]
type = ParsedFunction
expression = 'mass_prev-rate*area*dt'
symbol_names = 'mass_prev rate area dt'
symbol_values = 'm10_prev m10_rate 0.5 1E-3'
[]
[mass11]
type = ParsedFunction
expression = 'vol*por*dens0*exp(pp/bulk)'
symbol_names = 'vol por dens0 pp bulk'
symbol_values = '0.25 0.1 1.1 p11 1.3'
[]
[rate11]
type = ParsedFunction
expression = 'fcn*if(pp>0.8,1,if(pp<0.3,0.5,0.2+pp))'
symbol_names = 'fcn pp'
symbol_values = '8 p11'
[]
[mass11_expect]
type = ParsedFunction
expression = 'mass_prev-rate*area*dt'
symbol_names = 'mass_prev rate area dt'
symbol_values = 'm11_prev m11_rate 0.5 1E-3'
[]
[]
[Postprocessors]
[p00]
type = PointValue
point = '0 0 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[p10]
type = PointValue
point = '1 0 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[m10]
type = FunctionValuePostprocessor
function = mass10
execute_on = 'initial timestep_end'
[]
[m10_prev]
type = FunctionValuePostprocessor
function = mass10
execute_on = 'timestep_begin'
outputs = 'console'
[]
[m10_rate]
type = FunctionValuePostprocessor
function = rate10
execute_on = 'timestep_end'
[]
[m10_expect]
type = FunctionValuePostprocessor
function = mass10_expect
execute_on = 'timestep_end'
[]
[p01]
type = PointValue
point = '0 1 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[p11]
type = PointValue
point = '1 1 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[m11]
type = FunctionValuePostprocessor
function = mass11
execute_on = 'initial timestep_end'
[]
[m11_prev]
type = FunctionValuePostprocessor
function = mass11
execute_on = 'timestep_begin'
outputs = 'console'
[]
[m11_rate]
type = FunctionValuePostprocessor
function = rate11
execute_on = 'timestep_end'
[]
[m11_expect]
type = FunctionValuePostprocessor
function = mass11_expect
execute_on = 'timestep_end'
[]
[]
[BCs]
[flux]
type = PorousFlowPiecewiseLinearSink
boundary = 'right'
PT_shift = pt_shift
pt_vals = '0.0 0.5'
multipliers = '0.5 1'
variable = pp
use_mobility = false
use_relperm = false
fluid_phase = 0
flux_function = 8
save_in = flux_out
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -snes_max_it -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu 10000 NONZERO 2'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1E-3
end_time = 1E-2
nl_rel_tol = 1E-12
nl_abs_tol = 1E-12
[]
[Outputs]
file_base = s04
[console]
type = Console
execute_on = 'nonlinear linear'
[]
[csv]
type = CSV
execute_on = 'timestep_end'
[]
[]
(modules/combined/examples/periodic_strain/global_strain_pfm_3D.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 20
ny = 20
nz = 20
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[./cnode]
input = gen
type = ExtraNodesetGenerator
coord = '0.0 0.0 0.0'
new_boundary = 100
[../]
[]
[Variables]
[./u_x]
[../]
[./u_y]
[../]
[./u_z]
[../]
[./global_strain]
order = SIXTH
family = SCALAR
[../]
[./c]
[./InitialCondition]
type = FunctionIC
function = 'sin(2*x*pi)*sin(2*y*pi)*sin(2*z*pi)*0.05+0.6'
[../]
[../]
[./w]
[../]
[]
[AuxVariables]
[./local_energy]
order = CONSTANT
family = MONOMIAL
[../]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./s00]
order = CONSTANT
family = MONOMIAL
[../]
[./s01]
order = CONSTANT
family = MONOMIAL
[../]
[./s10]
order = CONSTANT
family = MONOMIAL
[../]
[./s11]
order = CONSTANT
family = MONOMIAL
[../]
[./e00]
order = CONSTANT
family = MONOMIAL
[../]
[./e01]
order = CONSTANT
family = MONOMIAL
[../]
[./e10]
order = CONSTANT
family = MONOMIAL
[../]
[./e11]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./disp_x]
type = GlobalDisplacementAux
variable = disp_x
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 0
[../]
[./disp_y]
type = GlobalDisplacementAux
variable = disp_y
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 1
[../]
[./disp_z]
type = GlobalDisplacementAux
variable = disp_z
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 2
[../]
[./local_free_energy]
type = TotalFreeEnergy
execute_on = 'initial LINEAR'
variable = local_energy
interfacial_vars = 'c'
kappa_names = 'kappa_c'
[../]
[./s00]
type = RankTwoAux
variable = s00
rank_two_tensor = stress
index_i = 0
index_j = 0
[../]
[./s01]
type = RankTwoAux
variable = s01
rank_two_tensor = stress
index_i = 0
index_j = 1
[../]
[./s10]
type = RankTwoAux
variable = s10
rank_two_tensor = stress
index_i = 1
index_j = 0
[../]
[./s11]
type = RankTwoAux
variable = s11
rank_two_tensor = stress
index_i = 1
index_j = 1
[../]
[./e00]
type = RankTwoAux
variable = e00
rank_two_tensor = total_strain
index_i = 0
index_j = 0
[../]
[./e01]
type = RankTwoAux
variable = e01
rank_two_tensor = total_strain
index_i = 0
index_j = 1
[../]
[./e10]
type = RankTwoAux
variable = e10
rank_two_tensor = total_strain
index_i = 1
index_j = 0
[../]
[./e11]
type = RankTwoAux
variable = e11
rank_two_tensor = total_strain
index_i = 1
index_j = 1
[../]
[]
[GlobalParams]
derivative_order = 2
enable_jit = true
displacements = 'u_x u_y u_z'
block = 0
[]
[Kernels]
[./TensorMechanics]
[../]
# Cahn-Hilliard kernels
[./c_dot]
type = CoupledTimeDerivative
variable = w
v = c
block = 0
[../]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
block = 0
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
block = 0
[../]
[]
[ScalarKernels]
[./global_strain]
type = GlobalStrain
variable = global_strain
global_strain_uo = global_strain_uo
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y z'
variable = 'c w u_x u_y u_z'
[../]
[../]
# fix center point location
[./centerfix_x]
type = DirichletBC
boundary = 100
variable = u_x
value = 0
[../]
[./centerfix_y]
type = DirichletBC
boundary = 100
variable = u_y
value = 0
[../]
[./centerfix_z]
type = DirichletBC
boundary = 100
variable = u_z
value = 0
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '0.2 0.01 '
[../]
[./shear1]
type = GenericConstantRankTwoTensor
tensor_values = '0 0 0 0.5 0.5 0.5'
tensor_name = shear1
[../]
[./shear2]
type = GenericConstantRankTwoTensor
tensor_values = '0 0 0 -0.5 -0.5 -0.5'
tensor_name = shear2
[../]
[./expand3]
type = GenericConstantRankTwoTensor
tensor_values = '1 1 1 0 0 0'
tensor_name = expand3
[../]
[./weight1]
type = DerivativeParsedMaterial
expression = '0.3*c^2'
property_name = weight1
coupled_variables = c
[../]
[./weight2]
type = DerivativeParsedMaterial
expression = '0.3*(1-c)^2'
property_name = weight2
coupled_variables = c
[../]
[./weight3]
type = DerivativeParsedMaterial
expression = '4*(0.5-c)^2'
property_name = weight3
coupled_variables = c
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1'
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
global_strain = global_strain
eigenstrain_names = eigenstrain
[../]
[./eigenstrain]
type = CompositeEigenstrain
tensors = 'shear1 shear2 expand3'
weights = 'weight1 weight2 weight3'
args = c
eigenstrain_name = eigenstrain
[../]
[./global_strain]
type = ComputeGlobalStrain
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
# chemical free energies
[./chemical_free_energy]
type = DerivativeParsedMaterial
property_name = Fc
expression = '4*c^2*(1-c)^2'
coupled_variables = 'c'
outputs = exodus
output_properties = Fc
[../]
# elastic free energies
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = Fe
args = 'c'
outputs = exodus
output_properties = Fe
[../]
# free energy (chemical + elastic)
[./free_energy]
type = DerivativeSumMaterial
block = 0
property_name = F
sum_materials = 'Fc Fe'
coupled_variables = 'c'
[../]
[]
[UserObjects]
[./global_strain_uo]
type = GlobalStrainUserObject
execute_on = 'Initial Linear Nonlinear'
[../]
[]
[Postprocessors]
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
execute_on = 'initial TIMESTEP_END'
variable = local_energy
[../]
[./total_solute]
type = ElementIntegralVariablePostprocessor
execute_on = 'initial TIMESTEP_END'
variable = c
[../]
[./min]
type = ElementExtremeValue
execute_on = 'initial TIMESTEP_END'
value_type = min
variable = c
[../]
[./max]
type = ElementExtremeValue
execute_on = 'initial TIMESTEP_END'
value_type = max
variable = c
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
line_search = basic
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
nl_max_its = 12
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-10
start_time = 0.0
end_time = 2.0
[./TimeStepper]
type = IterationAdaptiveDT
dt = 0.01
growth_factor = 1.5
cutback_factor = 0.8
optimal_iterations = 9
iteration_window = 2
[../]
[]
[Outputs]
execute_on = 'timestep_end'
print_linear_residuals = false
exodus = true
[./table]
type = CSV
delimiter = ' '
[../]
[]
(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/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'
[../]
[]
(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
[]
(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/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_1D_adaptivity.i)
# Using flux-limited TVD advection ala Kuzmin and Turek, mploying PorousFlow Kernels and UserObjects, with superbee flux-limiter
# 1D version with adaptivity
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 1
[]
[Adaptivity]
initial_steps = 1
initial_marker = tracer_marker
marker = tracer_marker
max_h_level = 1
[Markers]
[tracer_marker]
type = ValueRangeMarker
variable = tracer
lower_bound = 0.02
upper_bound = 0.98
[]
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[porepressure]
[]
[tracer]
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x'
[]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = tracer
[]
[flux0]
type = PorousFlowFluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = advective_flux_calculator_0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[]
[flux1]
type = PorousFlowFluxLimitedTVDAdvection
variable = porepressure
advective_flux_calculator = advective_flux_calculator_1
[]
[]
[BCs]
[constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1
boundary = left
[]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[]
[remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure tracer'
number_fluid_phases = 1
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[advective_flux_calculator_0]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 0
[]
[advective_flux_calculator_1]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = tracer
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[]
[]
[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'
[]
[]
[VectorPostprocessors]
[tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 11
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-2
nl_abs_tol = 1E-8
timestep_tolerance = 1E-3
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(test/tests/nodalkernels/constraint_enforcement/upper-and-lower-bound.i)
l=10
nx=100
num_steps=10
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
[]
[Variables]
[u]
[]
[lm_upper]
[]
[lm_lower]
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'x'
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = 'if(x<5,-1,1)'
[]
[]
[NodalKernels]
[upper_bound]
type = UpperBoundNodalKernel
variable = lm_upper
v = u
exclude_boundaries = 'left right'
upper_bound = 10
[]
[forces_from_upper]
type = CoupledForceNodalKernel
variable = u
v = lm_upper
coef = -1
[]
[lower_bound]
type = LowerBoundNodalKernel
variable = lm_lower
v = u
exclude_boundaries = 'left right'
lower_bound = 0
[]
[forces_from_lower]
type = CoupledForceNodalKernel
variable = u
v = lm_lower
coef = 1
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = 0
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = ${l}
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
solve_type = NEWTON
dtmin = 1
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_type -sub_pc_factor_levels -snes_linesearch_type'
petsc_options_value = '0 30 asm 16 basic'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = 'nonlinear timestep_end'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[active_upper_lm]
type = GreaterThanLessThanPostprocessor
variable = lm_upper
execute_on = 'nonlinear timestep_end'
value = 1e-8
comparator = 'greater'
[]
[upper_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = ${fparse 10+1e-8}
comparator = 'greater'
[]
[active_lower_lm]
type = GreaterThanLessThanPostprocessor
variable = lm_lower
execute_on = 'nonlinear timestep_end'
value = 1e-8
comparator = 'greater'
[]
[lower_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-8
comparator = 'less'
[]
[nls]
type = NumNonlinearIterations
[]
[cum_nls]
type = CumulativeValuePostprocessor
postprocessor = nls
[]
[]
(modules/porous_flow/test/tests/hysteresis/hys_pc_3.i)
# Capillary-pressure calculation. Third-order curve
# When comparing the results with a by-hand computation, remember the MOOSE results are averaged over an element
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 0.4
xmax = 0.9
nx = 50
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
number_fluid_phases = 1
number_fluid_components = 1
porous_flow_vars = ''
[]
[]
[Variables]
[sat]
[]
[]
[ICs]
[sat]
type = FunctionIC
variable = sat
function = 'x'
[]
[]
[BCs]
[sat]
type = FunctionDirichletBC
variable = sat
function = 'x'
boundary = 'left right'
[]
[]
[Kernels]
[dummy]
type = Diffusion
variable = sat
[]
[]
[Materials]
[hys_order]
type = PorousFlowHysteresisOrder
initial_order = 3
previous_turning_points = '0.1 0.9 0.4'
[]
[pc_calculator]
type = PorousFlowHystereticInfo
alpha_d = 10.0
alpha_w = 7.0
n_d = 1.5
n_w = 1.9
S_l_min = 0.1
S_lr = 0.2
S_gr_max = 0.3
Pc_max = 12.0
high_ratio = 0.9
low_extension_type = none
high_extension_type = none
sat_var = sat
[]
[]
[AuxVariables]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[pc]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[pc]
type = PorousFlowPropertyAux
variable = pc
property = hysteretic_info
[]
[]
[VectorPostprocessors]
[pc]
type = LineValueSampler
warn_discontinuous_face_values = false
start_point = '0.4 0 0'
end_point = '0.9 0 0'
num_points = 8
sort_by = x
variable = 'sat pc'
[]
[]
[Executioner]
type = Transient
solve_type = Linear
dt = 1
end_time = 1
[]
[Outputs]
csv = true
[]
(modules/porous_flow/test/tests/mass_conservation/mass06.i)
# Checking that the mass postprocessor correctly calculates the mass
# of each component in each phase, as well as the total mass of each
# component in all phases. Also tests that optional saturation threshold
# gives the correct mass
# 2phase, 2component, constant porosity
# saturation_threshold set to 0.6 for phase 1
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[sat]
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[]
[ICs]
[pinit]
type = ConstantIC
value = 1
variable = pp
[]
[satinit]
type = FunctionIC
function = 1-x
variable = sat
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = sat
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp sat'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 1
thermal_expansion = 0
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 0.1
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = pp
phase1_saturation = sat
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[]
[Postprocessors]
[comp0_phase0_mass]
type = PorousFlowFluidMass
fluid_component = 0
phase = 0
[]
[comp0_phase1_mass]
type = PorousFlowFluidMass
fluid_component = 0
phase = 1
[]
[comp0_total_mass]
type = PorousFlowFluidMass
fluid_component = 0
[]
[comp1_phase0_mass]
type = PorousFlowFluidMass
fluid_component = 1
phase = 0
[]
[comp1_phase1_mass]
type = PorousFlowFluidMass
fluid_component = 1
phase = 1
[]
[comp1_total_mass]
type = PorousFlowFluidMass
fluid_component = 1
[]
[comp1_phase1_threshold_mass]
type = PorousFlowFluidMass
fluid_component = 1
phase = 1
saturation_threshold = 0.6
[]
[]
[Executioner]
type = Transient
solve_type = Newton
nl_abs_tol = 1e-16
dt = 1
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = mass06
csv = true
[]
(test/tests/functions/solution_function/solution_function_scale_mult.i)
# checking scale_multiplier
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
nx = 3
ymin = -1
ymax = 1
ny = 3
[]
[UserObjects]
[./solution_uo]
type = SolutionUserObject
mesh = square_with_u_equals_x.e
timestep = 1
system_variables = u
scale_multiplier = '2 2 0'
transformation_order = scale_multiplier
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./u_init]
type = FunctionIC
variable = u
function = solution_fcn
[../]
[]
[Functions]
[./solution_fcn]
type = SolutionFunction
from_variable = u
solution = solution_uo
[../]
[]
[Kernels]
[./diff]
type = TimeDerivative
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
l_max_its = 800
nl_rel_tol = 1e-10
num_steps = 1
end_time = 1
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = solution_function_scale_mult
exodus = true
[]
(modules/xfem/test/tests/moving_interface/phase_transition_3d.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 11
ny = 1
nz = 1
xmin = 0.0
xmax = 20.0
ymin = 0.0
ymax = 5.0
zmin = 0.0
zmax = 5.0
elem_type = HEX8
[]
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[velocity]
type = XFEMPhaseTransitionMovingInterfaceVelocity
diffusivity_at_positive_level_set = 5
diffusivity_at_negative_level_set = 1
equilibrium_concentration_jump = 1
value_at_interface_uo = value_uo
[]
[value_uo]
type = NodeValueAtXFEMInterface
variable = 'u'
interface_mesh_cut_userobject = 'cut_mesh'
execute_on = TIMESTEP_END
level_set_var = ls
[]
[cut_mesh]
type = InterfaceMeshCut3DUserObject
mesh_file = flat_interface_2d.e
interface_velocity_uo = velocity
heal_always = true
[]
[]
[Variables]
[u]
[]
[]
[ICs]
[ic_u]
type = FunctionIC
variable = u
function = 'if(x<5.01, 2, 1)'
[]
[]
[AuxVariables]
[ls]
order = FIRST
family = LAGRANGE
[]
[]
[Constraints]
[u_constraint]
type = XFEMEqualValueAtInterface
geometric_cut_userobject = 'cut_mesh'
use_displaced_mesh = false
variable = u
value = 2
alpha = 1e6
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[]
[time]
type = TimeDerivative
variable = u
[]
[]
[AuxKernels]
[ls]
type = MeshCutLevelSetAux
mesh_cut_user_object = cut_mesh
variable = ls
execute_on = 'TIMESTEP_BEGIN'
[]
[]
[Materials]
[diffusivity_A]
type = GenericConstantMaterial
prop_names = A_diffusion_coefficient
prop_values = 5
[]
[diffusivity_B]
type = GenericConstantMaterial
prop_names = B_diffusion_coefficient
prop_values = 1
[]
[diff_combined]
type = LevelSetBiMaterialReal
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = diffusion_coefficient
[]
[]
[BCs]
# Define boundary conditions
[left_u]
type = DirichletBC
variable = u
value = 2
boundary = left
[]
[right_u]
type = NeumannBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_tol = 1e-3
nl_max_its = 15
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
start_time = 0.0
dt = 1
num_steps = 5
max_xfem_update = 1
[]
[Outputs]
execute_on = timestep_end
exodus = true
perf_graph = true
[]
(modules/porous_flow/test/tests/energy_conservation/heat02.i)
# checking that the heat-energy postprocessor correctly calculates the energy
# 1phase, constant porosity
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[temp]
[]
[pp]
[]
[]
[ICs]
[tinit]
type = FunctionIC
function = '100*x'
variable = temp
[]
[pinit]
type = FunctionIC
function = 'x'
variable = pp
[]
[]
[Kernels]
[dummyt]
type = TimeDerivative
variable = temp
[]
[dummyp]
type = TimeDerivative
variable = pp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp 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
viscosity = 0.001
thermal_expansion = 0
cv = 1.3
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 2.2
density = 0.5
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[]
[Postprocessors]
[total_heat]
type = PorousFlowHeatEnergy
phase = 0
[]
[rock_heat]
type = PorousFlowHeatEnergy
[]
[fluid_heat]
type = PorousFlowHeatEnergy
include_porous_skeleton = false
phase = 0
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1 1 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = heat02
csv = true
[]
(test/tests/misc/check_error/missing_function_file_test.i)
# Test for usage of missing function
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic_function
[../]
[../]
[]
[Functions]
[./ic_function]
type = PiecewiseLinear
data_file = nonexistent_file #should generate error
scale_factor = 1.0
[../]
[]
[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'
[]
[Outputs]
file_base = out
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/1d-rc-epsjump.i)
mu = 1.1
rho = 1.1
advected_interp_method = 'upwind'
velocity_interp_method = 'rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 1
dx = '1 1'
ix = '30 30'
subdomain_id = '1 2'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
pressure = pressure
porosity = porosity
[]
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[]
[ICs]
inactive = 'porosity_continuous'
[porosity_1]
type = ConstantIC
variable = porosity
block = 1
value = 1
[]
[porosity_2]
type = ConstantIC
variable = porosity
block = 2
value = 0.5
[]
[porosity_continuous]
type = FunctionIC
variable = porosity
block = '1 2'
function = smooth_jump
[]
[]
[Functions]
[smooth_jump]
type = ParsedFunction
expression = '1 - 0.5 * 1 / (1 + exp(-30*(x-1)))'
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
porosity = porosity
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = u
mu = ${mu}
porosity = porosity
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = u
pressure = pressure
porosity = porosity
momentum_component = 'x'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = '1'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
[]
[Postprocessors]
[inlet_p]
type = SideAverageValue
variable = 'pressure'
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 'right'
[]
[]
[Outputs]
exodus = true
csv = false
[]
(modules/phase_field/test/tests/functions/fourier_noise.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Variables]
[./c]
[../]
[]
[Functions]
[./fn]
type = FourierNoise
lambda = 0.2
[../]
[]
[ICs]
[./c]
type = FunctionIC
variable = c
function = fn
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = 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/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
[]
(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'
[]
[]
(test/tests/meshgenerators/file_mesh_generator/2d_discontinuous_iga_l2.i)
[Mesh]
[cyl2d_iga]
type = FileMeshGenerator
file = PressurizedCyl_Patch6_4Elem.e
discontinuous_spline_extraction = true
[]
[]
[Variables]
[u]
order = SECOND # Must match mesh order
family = RATIONAL_BERNSTEIN
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
block = 0 # Avoid direct calculations on spline nodes
[]
[rxn]
type = Reaction
variable = u
rate = -0.1
block = 0 # Avoid direct calculations on spline nodes
[]
[null]
type = NullKernel
variable = u
block = 1 # Keep kernel coverage check happy
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = '1.0'
[]
[]
[Executioner]
type = Transient
num_steps = 2
solve_type = NEWTON
dtmin = 1
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/general_field/nearest_node/mesh_division/sub.i)
base_value = 3
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
xmin = -0.1
ymin = -0.1
xmax = 0.1
ymax = 0.1
[]
[MeshDivisions]
[middle_sub]
type = CartesianGridDivision
# this division excludes the boundary nodes. The
# peaks in to_main on the boundaries should not be transferred
bottom_left = '-0.021 -0.021 0'
top_right = '0.081 0.081 0'
nx = 2
ny = 2
nz = 1
[]
[]
[AuxVariables]
[from_main]
initial_condition = -1
[]
[from_main_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_main]
[InitialCondition]
type = FunctionIC
function = '${base_value} + 20*x + 300*y*y*y'
[]
[]
[to_main_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '${base_value} + 1 + 20*x + 300*y*y*y'
[]
[]
[]
[UserObjects]
[to_main]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_main
[]
[to_main_elem]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_main_elem
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
hide = 'to_main to_main_elem div'
overwrite = true
[]
[]
# For debugging purposes
[AuxVariables]
[div]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[mesh_div]
type = MeshDivisionAux
variable = div
mesh_division = 'middle_sub'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/cns/implicit_bcs/hllc_sod_shocktube.i)
rho_left = 1
E_left = 2.501505578
u_left = 1e-15
rho_right = 0.125
E_right = 1.999770935
u_right = 1e-15
middle = 0.5
[GlobalParams]
fp = fp
[]
[Mesh]
[cartesian]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${fparse 2 * middle}
nx = 5
ymin = 0
ymax = 1
ny = 2
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
allow_imperfect_jacobians = true
[]
[]
[Variables]
[rho]
order = CONSTANT
family = MONOMIAL
fv = true
[]
[rho_u]
order = CONSTANT
family = MONOMIAL
fv = true
[]
[rho_v]
order = CONSTANT
family = MONOMIAL
fv = true
initial_condition = 1e-10
[]
[rho_E]
order = CONSTANT
family = MONOMIAL
fv = true
[]
[]
[FVKernels]
[mass_time]
type = FVTimeKernel
variable = rho
[]
[mass_advection]
type = CNSFVMassHLLC
variable = rho
[]
[momentum_x_time]
type = FVTimeKernel
variable = rho_u
[]
[momentum_x_advection]
type = CNSFVMomentumHLLC
variable = rho_u
momentum_component = x
[]
[momentum_y_time]
type = FVTimeKernel
variable = rho_v
[]
[momentum_y_advection]
type = CNSFVMomentumHLLC
variable = rho_v
momentum_component = y
[]
[fluid_energy_time]
type = FVTimeKernel
variable = rho_E
[]
[fluid_energy_advection]
type = CNSFVFluidEnergyHLLC
variable = rho_E
[]
[]
[FVBCs]
[mass_implicit]
type = CNSFVHLLCMassImplicitBC
variable = rho
fp = fp
boundary = 'left right'
[]
[mom_x_implicit]
type = CNSFVHLLCMomentumImplicitBC
variable = rho_u
momentum_component = x
fp = fp
boundary = 'left right'
[]
[wall]
type = CNSFVMomImplicitPressureBC
variable = rho_v
momentum_component = y
boundary = 'top bottom'
[]
[fluid_energy_implicit]
type = CNSFVHLLCFluidEnergyImplicitBC
variable = rho_E
fp = fp
boundary = 'left right'
[]
[]
[ICs]
[rho_ic]
type = FunctionIC
variable = rho
function = 'if (x < ${middle}, ${rho_left}, ${rho_right})'
[]
[rho_u_ic]
type = FunctionIC
variable = rho_u
function = 'if (x < ${middle}, ${fparse rho_left * u_left}, ${fparse rho_right * u_right})'
[]
[rho_E_ic]
type = FunctionIC
variable = rho_E
function = 'if (x < ${middle}, ${fparse E_left * rho_left}, ${fparse E_right * rho_right})'
[]
[]
[Materials]
[var_mat]
type = ConservedVarValuesMaterial
rho = rho
rhou = rho_u
rhov = rho_v
rho_et = rho_E
fp = fp
[]
[]
[Executioner]
type = Transient
[TimeIntegrator]
type = ExplicitSSPRungeKutta
order = 2
[]
l_tol = 1e-8
# run to t = 0.15
start_time = 0.0
dt = 1e-1
end_time = 10
abort_on_solve_fail = true
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/sinks/s09.i)
# Apply a piecewise-linear sink flux to the right-hand side and watch fluid flow to it
#
# This test has a single phase with two components. The test initialises with
# the porous material fully filled with component=1. The left-hand side is fixed
# at porepressure=1 and mass-fraction of the zeroth component being unity.
# The right-hand side has a very strong piecewise-linear flux that keeps the
# porepressure~0 at that side. Fluid mass is extracted by this flux in proportion
# to the fluid component mass fraction.
#
# Therefore, the zeroth fluid component will flow from left to right (down the
# pressure gradient).
#
# The important DE is
# porosity * dc/dt = (perm / visc) * grad(P) * grad(c)
# which is true for c = mass-fraction, and very large bulk modulus of the fluid.
# For grad(P) constant in time and space (as in this example) this is just the
# advection equation for c, with velocity = perm / visc / porosity. The parameters
# are chosen to velocity = 1 m/s.
# In the numerical world, and especially with full upwinding, the advection equation
# suffers from diffusion. In this example, the diffusion is obvious when plotting
# the mass-fraction along the line, but the average velocity of the front is still
# correct at 1 m/s.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp frac'
number_fluid_phases = 1
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[Variables]
[pp]
[]
[frac]
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = 1-x
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = frac
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = pp
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
gravity = '0 0 0'
variable = frac
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
gravity = '0 0 0'
variable = pp
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1e10 # need large in order for constant-velocity advection
density0 = 1 # almost irrelevant, except that the ability of the right BC to keep P fixed at zero is related to density_P0
thermal_expansion = 0
viscosity = 11
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = frac
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1.1 0 0 0 1.1 0 0 0 1.1'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2 # irrelevant in this fully-saturated situation
phase = 0
[]
[]
[BCs]
[lhs_fixed_a]
type = DirichletBC
boundary = 'left'
variable = frac
value = 1
[]
[lhs_fixed_b]
type = DirichletBC
boundary = 'left'
variable = pp
value = 1
[]
[flux0]
type = PorousFlowPiecewiseLinearSink
boundary = 'right'
pt_vals = '-100 100'
multipliers = '-1 1'
variable = frac # the zeroth comonent
mass_fraction_component = 0
use_mobility = false
use_relperm = false
fluid_phase = 0
flux_function = 1E4
[]
[flux1]
type = PorousFlowPiecewiseLinearSink
boundary = 'right'
pt_vals = '-100 100'
multipliers = '-1 1'
variable = pp # comonent 1
mass_fraction_component = 1
use_mobility = false
use_relperm = false
fluid_phase = 0
flux_function = 1E4
[]
[]
[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-2
end_time = 1
nl_rel_tol = 1E-12
nl_abs_tol = 1E-12
[]
[VectorPostprocessors]
[mf]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 100
sort_by = x
variable = frac
[]
[]
[Outputs]
file_base = s09
[console]
type = Console
execute_on = 'nonlinear linear'
[]
[csv]
type = CSV
sync_times = '0.1 0.5 1'
sync_only = true
[]
time_step_interval = 10
[]
(modules/porous_flow/test/tests/poroperm/linear_test_vals.i)
# Testing PorousFlowPorosityLinear produces correct values:
# porosity = porosity_ref + P_coeff * (P - P_ref) + T_coeff * (T - T_ref) + epv_coeff * (epv - epv_coeff)
# = 0.5 + 2 * (1 - 0.5) + 0.5 * (2 - -3) + 4 * (3 - 2.5)
# = 6
[GlobalParams]
PorousFlowDictator = dictator
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
number_fluid_phases = 1
number_fluid_components = 1
porous_flow_vars = pp
[]
[]
[Variables]
[pp]
initial_condition = 1
[]
[T]
initial_condition = 2
[]
[disp]
[]
[]
[ICs]
[disp]
type = FunctionIC
variable = disp
function = '3 * x'
[]
[]
[Kernels]
[pp]
type = TimeDerivative
variable = pp
[]
[T]
type = TimeDerivative
variable = T
[]
[disp]
type = TimeDerivative
variable = disp
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[porosity]
type = PorousFlowPropertyAux
variable = porosity
property = porosity
[]
[]
[Postprocessors]
[porosity]
type = PointValue
point = '0 0 0'
variable = porosity
[]
[]
[Materials]
[ps]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[temperature]
type = PorousFlowTemperature
temperature = T
[]
[pf]
type = PorousFlowEffectiveFluidPressure
[]
[total_strain]
type = ComputeSmallStrain
displacements = disp
[]
[volstrain]
type = PorousFlowVolumetricStrain
displacements = disp
[]
[porosity]
type = PorousFlowPorosityLinear
porosity_ref = 0.5
P_ref = 0.5
P_coeff = 2.0
T_ref = -3.0
T_coeff = 0.5
epv_ref = 2.5
epv_coeff = 4.0
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 1
[]
[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
[]
(test/tests/userobjects/shape_element_user_object/simple_shape_element_uo_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
parallel_type = replicated
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = (x-0.5)^2
[../]
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./time_u]
type = TimeDerivative
variable = u
[../]
[./shape_u]
type = SimpleTestShapeElementKernel
user_object = example_uo
variable = u
[../]
[]
[UserObjects]
[./example_uo]
type = SimpleTestShapeElementUserObject
u = u
# as this userobject computes quantities for both the residual AND the jacobian
# it needs to have these execute_on flags set.
execute_on = 'linear nonlinear'
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options = '-snes_test_display'
petsc_options_iname = '-snes_type'
petsc_options_value = 'test'
dt = 0.1
num_steps = 2
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/porous_flow/test/tests/heat_advection/heat_advection_1d_KT.i)
# 1phase, heat advecting with a moving fluid
# Using the Kuzmin-Turek stabilization scheme
[Mesh]
type = GeneratedMesh
dim = 1
nx = 50
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[temp]
initial_condition = 200
[]
[pp]
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = '1-x'
[]
[]
[BCs]
[pp0]
type = DirichletBC
variable = pp
boundary = left
value = 1
[]
[pp1]
type = DirichletBC
variable = pp
boundary = right
value = 0
[]
[spit_heat]
type = DirichletBC
variable = temp
boundary = left
value = 300
[]
[suck_heat]
type = DirichletBC
variable = temp
boundary = right
value = 200
[]
[]
[Kernels]
[mass_dot]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[fluid_advection]
type = PorousFlowFluxLimitedTVDAdvection
variable = pp
advective_flux_calculator = fluid_advective_flux
[]
[energy_dot]
type = PorousFlowEnergyTimeDerivative
variable = temp
[]
[heat_advection]
type = PorousFlowFluxLimitedTVDAdvection
variable = temp
advective_flux_calculator = heat_advective_flux
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.6
alpha = 1.3
[]
[fluid_advective_flux]
type = PorousFlowAdvectiveFluxCalculatorSaturated
flux_limiter_type = superbee
[]
[heat_advective_flux]
type = PorousFlowAdvectiveFluxCalculatorSaturatedHeat
flux_limiter_type = superbee
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 100
density0 = 1000
viscosity = 4.4
thermal_expansion = 0
cv = 2
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.2
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 1.0
density = 125
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1.1 0 0 0 2 0 0 0 3'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[massfrac]
type = PorousFlowMassFraction
[]
[PS]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'gmres bjacobi 1E-15 1E-10 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.01
end_time = 0.6
[]
[VectorPostprocessors]
[T]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 51
sort_by = x
variable = temp
[]
[]
[Outputs]
file_base = heat_advection_1d_KT
[csv]
type = CSV
sync_times = '0.1 0.6'
sync_only = true
[]
[]
(test/tests/transfers/general_field/nearest_node/nearest_position/sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 0.2
ymax = 0.2
[]
[AuxVariables]
[from_main]
initial_condition = -1
[]
[from_main_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_main]
[InitialCondition]
type = FunctionIC
function = '3 + 2*x*x + 3*y*y*y'
[]
[]
[to_main_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '4 + 2*x*x + 3*y*y*y'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
hide = 'to_main to_main_elem'
overwrite = true
[]
[]
(modules/porous_flow/test/tests/jacobian/basic_advection1.i)
# Basic advection with no PorousFlow variables
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[P]
[]
[]
[ICs]
[P]
type = FunctionIC
variable = P
function = '2*(1-x)'
[]
[u]
type = RandomIC
variable = u
[]
[]
[Kernels]
[u_advection]
type = PorousFlowBasicAdvection
variable = u
phase = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = ''
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 4
thermal_expansion = 0
viscosity = 150.0
[]
[]
[Materials]
[temperature_qp]
type = PorousFlowTemperature
[]
[ppss_qp]
type = PorousFlow1PhaseP
porepressure = P
capillary_pressure = pc
[]
[simple_fluid_qp]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '5 0 0 0 5 0 0 0 5'
[]
[relperm_qp]
type = PorousFlowRelativePermeabilityCorey
n = 0
phase = 0
[]
[darcy_velocity_qp]
type = PorousFlowDarcyVelocityMaterial
gravity = '0.25 0 0'
[]
[]
[Preconditioning]
[check]
type = SMP
full = true
#petsc_options = '-snes_test_display'
petsc_options_iname = '-snes_type'
petsc_options_value = ' test'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1
[]
(test/tests/transfers/general_field/nearest_node/subdomain/sub.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmax = 0.2
ymax = 0.2
[]
[add_block]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x > 0.05 & y < 0.1'
block_id = 1
[]
[]
[AuxVariables]
[from_main]
initial_condition = -1
[]
[from_main_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_main]
[InitialCondition]
type = FunctionIC
function = '3 + 2*x*x + 3*y*y*y'
[]
[]
[to_main_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '4 + 2*x*x + 3*y*y*y'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
exodus = true
hide = 'to_main to_main_elem'
execute_on = 'TIMESTEP_END'
[]
(modules/ray_tracing/test/tests/raykernels/variable_integral_ray_kernel/variable_integral_ray_kernel.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmax = 5
ymax = 5
[]
[]
[Variables/u]
[InitialCondition]
type = FunctionIC
variable = u
function = '(x < 2) * (x + 2 * y) + (x >= 2) * (2 * x + 2 * y - 2)'
[]
[]
[AuxVariables/aux]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
variable = u_ag
function = 'x + y + cos(x)'
[]
[]
[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]
[variable_integral]
type = VariableIntegralRayKernel
study = study
variable = u
[]
[aux_variable_integral]
type = VariableIntegralRayKernel
study = study
variable = aux
[]
[]
[Postprocessors]
[diag_value]
type = RayIntegralValue
ray_kernel = variable_integral
ray = diag
[]
[top_across_value]
type = RayIntegralValue
ray_kernel = variable_integral
ray = top_across
[]
[bottom_across_value]
type = RayIntegralValue
ray_kernel = variable_integral
ray = bottom_across
[]
[partial_value]
type = RayIntegralValue
ray_kernel = variable_integral
ray = partial
[]
[aux_diag_value]
type = RayIntegralValue
ray_kernel = aux_variable_integral
ray = diag
[]
[aux_top_across_value]
type = RayIntegralValue
ray_kernel = aux_variable_integral
ray = top_across
[]
[aux_bottom_across_value]
type = RayIntegralValue
ray_kernel = aux_variable_integral
ray = bottom_across
[]
[aux_partial_value]
type = RayIntegralValue
ray_kernel = aux_variable_integral
ray = partial
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/transfers/general_field/shape_evaluation/mesh_division/main.i)
# Base input for testing transfers. It has the following complexities:
# - transfers both from and to the subapps
# - both nodal and elemental variables
# Tests derived from this input may add complexities through command line arguments
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[MeshDivisions]
[middle]
type = CartesianGridDivision
bottom_left = '0.01 0.01 0'
top_right = '0.81 0.81 0'
nx = 4
ny = 4
nz = 1
[]
[]
[AuxVariables]
[from_sub]
initial_condition = -1
[]
[from_sub_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_sub]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[to_sub_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
hide = 'to_sub to_sub_elem div'
overwrite = true
[]
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
input_files = sub.i
output_in_position = true
# we want to avoid sampling on a boundary
positions = '0.00001 0.0001 0'
cli_args = 'base_value=1'
[]
[]
[Transfers]
[to_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
source_variable = to_sub
variable = from_main
[]
[to_sub_elem]
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
source_variable = to_sub_elem
variable = from_main_elem
[]
[from_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
source_variable = to_main
variable = from_sub
[]
[from_sub_elem]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
source_variable = to_main_elem
variable = from_sub_elem
[]
[]
# For debugging purposes
[AuxVariables]
[div]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[mesh_div]
type = MeshDivisionAux
variable = div
mesh_division = 'middle'
[]
[]
(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/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
[]
(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
[]
(modules/porous_flow/examples/multiapp_fracture_flow/diffusion_multiapp/two_vars.i)
# Heat transfer between matrix and fracture, with the matrix and fracture being identical spatial domains, but a multiapp approach is not used
[Mesh]
[generate]
type = GeneratedMeshGenerator
dim = 1
nx = 100
xmin = 0
xmax = 50.0
[]
[]
[Variables]
[frac_T]
[]
[matrix_T]
[]
[]
[ICs]
[frac_T]
type = FunctionIC
variable = frac_T
function = 'if(x<0.5, 2, 0)' # delta function
[]
[]
[Kernels]
[dot_frac]
type = TimeDerivative
variable = frac_T
[]
[frac_diffusion]
type = Diffusion
variable = frac_T
[]
[toMatrix]
type = PorousFlowHeatMassTransfer
variable = frac_T
v = matrix_T
transfer_coefficient = 0.004
[]
[dot_matrix]
type = TimeDerivative
variable = matrix_T
[]
[matrix_diffusion]
type = Diffusion
variable = matrix_T
[]
[toFrac]
type = PorousFlowHeatMassTransfer
variable = matrix_T
v = frac_T
transfer_coefficient = 0.004
[]
[]
[Preconditioning]
[entire_jacobian]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 100
end_time = 100
[]
[VectorPostprocessors]
[final_results]
type = LineValueSampler
start_point = '0 0 0'
end_point = '50 0 0'
num_points = 11
sort_by = x
variable = 'frac_T matrix_T'
outputs = final_csv
[]
[]
[Outputs]
print_linear_residuals = false
[final_csv]
type = CSV
sync_times = 100
sync_only = true
[]
[]
(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/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/phase_field/test/tests/slkks/weighted_average.i)
#
# This tests the WeightedVariableAverage postprocessor, which averages a variable field
# with weights applied from a material property. This can be used to obtain average
# concentrations in different phases (based on the total physical concentration variable).
#
#
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
[]
[]
[Variables]
[c]
[./InitialCondition]
type = FunctionIC
function = x*0.5
[]
[]
[eta]
[./InitialCondition]
type = FunctionIC
function = x
[]
[]
[]
[Materials]
[h]
type = ParsedMaterial
coupled_variables = eta
property_name = h
expression = 'if(eta>0.5,1,0)'
[]
[]
[Postprocessors]
[c1]
type = WeightedVariableAverage
v = c
weight = h
execute_on = INITIAL
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(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/postprocessors/displaced_mesh/side.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
displacements = 'ux uy'
[]
[AuxVariables]
[./ux]
[./InitialCondition]
type = FunctionIC
function = x
[../]
[../]
[./uy]
[./InitialCondition]
type = FunctionIC
function = y
[../]
[../]
[./c]
initial_condition = 1
[../]
[]
[Variables]
[./a]
[../]
[]
[Kernels]
[./a]
type = Diffusion
variable = a
[../]
[]
[Postprocessors]
[./without]
type = SideIntegralVariablePostprocessor
variable = c
execute_on = initial
boundary = left
[../]
[./with]
type = SideIntegralVariablePostprocessor
variable = c
use_displaced_mesh = true
execute_on = initial
boundary = left
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
[./out]
type = Exodus
[../]
[]
(modules/porous_flow/test/tests/dirackernels/pls03_action.i)
# Test that the upwinding works correctly.
#
# A poly-line sink sits at the centre of the element.
# It has length=4 and weight=0.5, and extracts fluid
# at a constant rate of
# (1 * relative_permeability) kg.m^-1.s^-1
# Since it sits at the centre of the element, it extracts
# equally from each node, so the rate of extraction from
# each node is
# (0.5 * relative_permeability) kg.s^-1
# including the length and weight effects.
#
# There is no fluid flow.
#
# The initial conditions are such that all nodes have
# relative_permeability=0, except for one which has
# relative_permeaility = 1. Therefore, all nodes should
# remain at their initial porepressure, except the one.
#
# The porosity is 0.1, and the elemental volume is 2,
# so the fluid mass at the node in question = 0.2 * density / 4,
# where the 4 is the number of nodes in the element.
# In this simulation density = dens0 * exp(P / bulk), with
# dens0 = 100, and bulk = 20 MPa.
# The initial porepressure P0 = 10 MPa, so the final (after
# 1 second of simulation) is
# P(t=1) = 8.748592 MPa
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmin = 0
xmax = 2
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.0
bulk_modulus = 2.0E7
viscosity = 1.0
density0 = 100.0
[]
[]
[PorousFlowUnsaturated]
porepressure = pp
gravity = '0 0 0'
fp = the_simple_fluid
van_genuchten_alpha = 1.0E-7
van_genuchten_m = 0.5
relative_permeability_exponent = 2
residual_saturation = 0.99
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
#function = if((x<1)&(y<0.5),1E7,-1E7)
function = if((x<1)&(y>0.5),1E7,-1E7)
#function = if((x>1)&(y<0.5),1E7,-1E7)
#function = if((x>1)&(y>0.5),1E7,-1E7)
[]
[]
[UserObjects]
[pls_total_outflow_mass]
type = PorousFlowSumQuantity
[]
[]
[Materials]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0 0 0 0 0 0 0 0 0'
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[]
[DiracKernels]
[pls]
type = PorousFlowPolyLineSink
fluid_phase = 0
point_file = pls03.bh
use_relative_permeability = true
line_length = 4
SumQuantityUO = pls_total_outflow_mass
variable = pp
p_or_t_vals = '0 1E7'
fluxes = '1 1'
[]
[]
[Postprocessors]
[pls_report]
type = PorousFlowPlotQuantity
uo = pls_total_outflow_mass
[]
[fluid_mass0]
type = PorousFlowFluidMass
execute_on = timestep_begin
[]
[fluid_mass1]
type = PorousFlowFluidMass
execute_on = timestep_end
[]
[zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
indirect_dependencies = 'fluid_mass1 fluid_mass0 pls_report'
[]
[p00]
type = PointValue
variable = pp
point = '0 0 0'
execute_on = timestep_end
[]
[p01]
type = PointValue
variable = pp
point = '0 1 0'
execute_on = timestep_end
[]
[p20]
type = PointValue
variable = pp
point = '2 0 0'
execute_on = timestep_end
[]
[p21]
type = PointValue
variable = pp
point = '2 1 0'
execute_on = timestep_end
[]
[]
[Functions]
[mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 pls_report'
[]
[]
[Preconditioning]
[usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000 30'
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = 1
solve_type = NEWTON
[]
[Outputs]
file_base = pls03_action
exodus = false
csv = true
execute_on = timestep_end
[]
(modules/richards/test/tests/uo_egs/relperm.i)
# Outputs a relative permeability curve into an exodus file
# and into a CSV file.
# In the exodus file, the relperm will be a function of "x", and
# this "x" is actually effective saturation.
# In the CSV file you will find the relperm at the "x" point
# specified by you below.
#
# You may specify:
# - the "type" of relative permeability in the UserObjects block
# - the parameters of this relative permeability curve in the UserObjects block
# - the "x" point (which is effective saturation) that you want to extract
# the relative permeability at, if you want a value at a particular point
[UserObjects]
[./relperm]
type = RichardsRelPermPower
simm = 0.1
n = 3
[../]
[]
[Postprocessors]
[./point_val]
type = PointValue
execute_on = timestep_begin
point = '0.5 0 0'
variable = relperm
[../]
[]
############################
# You should not need to change any of the stuff below
############################
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = 0
xmax = 1
[]
[Variables]
[./u]
[../]
[]
[ICs]
[./u_init]
type = FunctionIC
variable = u
function = x
[../]
[]
[AuxVariables]
[./relperm]
[../]
[]
[AuxKernels]
[./relperm_AuxK]
type = RichardsRelPermAux
variable = relperm
relperm_UO = relperm
execute_on = timestep_begin
seff_var = u
[../]
[]
[Kernels]
[./dummy]
type = Diffusion
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
num_steps = 0
[]
[Outputs]
file_base = relperm
[./csv]
type = CSV
[../]
[./exodus]
type = Exodus
hide = u
[../]
[]
(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
[]
(test/tests/ics/function_ic/spline_function.i)
#
# Test the gradient calculation in spline function and the gradient pass-through in FunctionIC
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 3
ymin = 0
ymax = 1
nx = 10
ny = 2
[]
[Variables]
[./u]
order = THIRD
family = HERMITE
[../]
[]
[Functions]
[./spline_function]
type = SplineFunction
x = '0 1 2 3'
y = '0 1 0 1'
[../]
[]
[ICs]
[./u_ic]
type = FunctionIC
variable = 'u'
function = spline_function
[../]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
file_base = spline
[./OverSampling]
type = Exodus
refinements = 3
[../]
[]
(modules/porous_flow/test/tests/energy_conservation/heat01.i)
# checking that the heat-energy postprocessor correctly calculates the energy
# 0phase, constant porosity
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[temp]
[]
[]
[ICs]
[tinit]
type = FunctionIC
function = '100*x'
variable = temp
[]
[]
[Kernels]
[dummy]
type = TimeDerivative
variable = temp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp'
number_fluid_phases = 0
number_fluid_components = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 2.2
density = 0.5
[]
[]
[Postprocessors]
[total_heat]
type = PorousFlowHeatEnergy
[]
[]
[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 = 1
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = heat01
csv = true
[]
(test/tests/transfers/general_field/user_object/subdomain/main.i)
# Base input for testing transfers. It has the following complexities:
# - more than one subapp
# - transfers both from and to the subapps
# - both nodal and elemental variables
# - subapp meshes are not aligned with the main app
# Tests derived from this input may add complexities through command line arguments
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
[]
[add_block]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x < 0.6 & y < 0.5'
block_id = 1
[]
[]
[AuxVariables]
[from_sub]
initial_condition = -1
[]
[from_sub_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_sub]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[to_sub_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[]
[UserObjects]
[to_sub]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_sub
[]
[to_sub_elem]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_sub_elem
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
hide = 'to_sub to_sub_elem'
[]
execute_on = 'TIMESTEP_END'
[]
[MultiApps]
[sub]
# 1 on corner, one in the center and one close to a corner
# Offsets are added to make sure there are no equidistant nodes / transfer indetermination
positions = '0 0 0 0.41111 0.28111 0 0.7232323 0.12323 0'
type = TransientMultiApp
app_type = MooseTestApp
input_files = sub.i
execute_on = timestep_end
output_in_position = true
[]
[]
[Transfers]
[to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub
source_user_object = to_sub
variable = from_main
from_blocks = 1
to_blocks = 1
extrapolation_constant = -1
[]
[to_sub_elem]
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub
source_user_object = to_sub_elem
variable = from_main_elem
from_blocks = 1
to_blocks = 1
extrapolation_constant = -1
[]
[from_sub]
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = sub
source_user_object = to_main
variable = from_sub
from_blocks = 1
to_blocks = 1
extrapolation_constant = -1
[]
[from_sub_elem]
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = sub
source_user_object = to_main_elem
variable = from_sub_elem
from_blocks = 1
to_blocks = 1
extrapolation_constant = -1
[]
[]
(modules/porous_flow/test/tests/numerical_diffusion/framework.i)
# Using framework objects: no mass lumping or upwinding
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = 0
xmax = 1
[]
[Variables]
[tracer]
[]
[]
[ICs]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[]
[]
[Kernels]
[mass_dot]
type = TimeDerivative
variable = tracer
[]
[flux]
type = ConservativeAdvection
velocity = '0.1 0 0'
variable = tracer
[]
[]
[BCs]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_tracer]
# Ideally, an OutflowBC would be used, but that does not exist in the framework
# In 1D VacuumBC is the same as OutflowBC, with the alpha parameter being twice the velocity
type = VacuumBC
boundary = right
alpha = 0.2 # 2 * velocity
variable = tracer
[]
[]
[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'
[]
[]
[VectorPostprocessors]
[tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 101
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-1
nl_abs_tol = 1E-8
timestep_tolerance = 1E-3
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(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/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/porous_flow/test/tests/aux_kernels/darcy_velocity_lower_2D.i)
# checking that the PorousFlowDarcyVelocityComponentLowerDimensional AuxKernel works as expected in 1D+2D situation
# for the fully-saturated case (relative-permeability = 1)
# The 1_frac_in_2D_example.e has size 0.3x0.2x0, and a fracture running through its
# centre, with normal = (0, 1, 0)
# Porepressure is initialised to grad(P) = (1, 2, 0)
# Fluid_density = 2
# viscosity = 10
# relative_permeability = 1
# permeability = (5, 5, 5) (in the bulk, measured in m^2)
# permeability = (10, 10, 10) (in the fracture, measured in m^3)
# aperture = 0.01
# gravity = (1, 0.5, 0)
# So Darcy velocity in the bulk = (0.5, -0.5, 0)
# in the fracture grad(P) = (1, 0, 0)
# In the fracture the projected gravity vector is
# tangential_gravity = (1, 0, 0)
# So the Darcy velocity in the fracture = (100, 0, 0)
[Mesh]
type = FileMesh
file = 1_frac_in_2D_example.e
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '1 0.5 0'
[]
[Variables]
[pp]
[]
[]
[ICs]
[pinit]
type = FunctionIC
function = 'x+2*y'
variable = pp
[]
[]
[Kernels]
[dummy]
type = TimeDerivative
variable = pp
[]
[]
[AuxVariables]
[bulk_vel_x]
order = CONSTANT
family = MONOMIAL
block = '2 3'
[]
[bulk_vel_y]
order = CONSTANT
family = MONOMIAL
block = '2 3'
[]
[bulk_vel_z]
order = CONSTANT
family = MONOMIAL
block = '2 3'
[]
[fracture_vel_x]
order = CONSTANT
family = MONOMIAL
block = 1
[]
[fracture_vel_y]
order = CONSTANT
family = MONOMIAL
block = 1
[]
[fracture_vel_z]
order = CONSTANT
family = MONOMIAL
block = 1
[]
[]
[AuxKernels]
[bulk_vel_x]
type = PorousFlowDarcyVelocityComponent
variable = bulk_vel_x
component = x
fluid_phase = 0
[]
[bulk_vel_y]
type = PorousFlowDarcyVelocityComponent
variable = bulk_vel_y
component = y
fluid_phase = 0
[]
[bulk_vel_z]
type = PorousFlowDarcyVelocityComponent
variable = bulk_vel_z
component = z
fluid_phase = 0
[]
[fracture_vel_x]
type = PorousFlowDarcyVelocityComponentLowerDimensional
variable = fracture_vel_x
component = x
fluid_phase = 0
aperture = 0.01
[]
[fracture_vel_y]
type = PorousFlowDarcyVelocityComponentLowerDimensional
variable = fracture_vel_y
component = y
fluid_phase = 0
aperture = 0.01
[]
[fracture_vel_z]
type = PorousFlowDarcyVelocityComponentLowerDimensional
variable = fracture_vel_z
component = z
fluid_phase = 0
aperture = 0.01
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1E16
viscosity = 10
density0 = 2
thermal_expansion = 0
[]
[]
[Postprocessors]
[bulk_vel_x]
type = PointValue
variable = bulk_vel_x
point = '0 -0.05 0'
[]
[bulk_vel_y]
type = PointValue
variable = bulk_vel_y
point = '0 -0.05 0'
[]
[bulk_vel_z]
type = PointValue
variable = bulk_vel_z
point = '0 -0.05 0'
[]
[fracture_vel_x]
type = PointValue
point = '0 0 0'
variable = fracture_vel_x
[]
[fracture_vel_y]
type = PointValue
point = '0 0 0'
variable = fracture_vel_y
[]
[fracture_vel_z]
type = PointValue
point = '0 0 0'
variable = fracture_vel_z
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '5 0 0 0 5 0 0 0 5'
block = '2 3'
[]
[permeability_fracture]
type = PorousFlowPermeabilityConst
permeability = '10 0 0 0 10 0 0 0 10'
block = 1
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[Executioner]
type = Transient
dt = 1
end_time = 1
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/cns/userobject/HLLC/hllc_uo_1D.i)
rho_left = 1.162633159
E_left = 2.1502913276e+05
u_left = 100
rho_right = 1.116127833
E_right = 1.7919094397e+05
u_right = 90
[Mesh]
allow_renumbering = false
[./cartesian]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = 1
nx = 2
[../]
[]
[FluidProperties]
[./fp]
type = IdealGasFluidProperties
allow_imperfect_jacobians = true
[../]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./rho]
order = CONSTANT
family = MONOMIAL
[../]
[./rho_u]
order = CONSTANT
family = MONOMIAL
[../]
[./rho_E]
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./rho_ic]
type = FunctionIC
variable = rho
function = 'if (x < 0.5, ${rho_left}, ${rho_right})'
[../]
[./rho_u_ic]
type = FunctionIC
variable = rho_u
function = 'if (x < 0.5, ${fparse rho_left * u_left}, ${fparse rho_right * u_right})'
[../]
[./rho_E_ic]
type = FunctionIC
variable = rho_E
function = 'if (x < 0.5, ${fparse E_left * rho_left}, ${fparse E_right * rho_right})'
[../]
[]
[Materials]
[./var_mat]
type = ConservedVarValuesMaterial
rho = rho
rhou = rho_u
rho_et = rho_E
fp = fp
[../]
[]
[UserObjects]
[./hllc]
type = HLLCUserObject
fp = fp
[../]
[]
[VectorPostprocessors]
[./wave_speeds]
type = WaveSpeedVPP
hllc_uo = hllc
elem_id = 0
side_id = 1
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(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
[]
(test/tests/auxkernels/projection_aux/2d.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 20
elem_type = QUAD9
[]
[ICs]
active = 'constant_elem constant_nodal'
[constant_elem]
type = ConstantIC
variable = base_elem
value = 4
[]
[constant_nodal]
type = ConstantIC
variable = base_nodal
value = 3.5
[]
[linear_elem]
type = FunctionIC
variable = base_elem
function = 2+2*x-y
[]
[linear_nodal]
type = FunctionIC
variable = base_nodal
function = 3+3*x-y
[]
[cubic_elem]
type = FunctionIC
variable = base_elem
function = 2+2*x*x-3*y*y*y
[]
[cubic_nodal]
type = FunctionIC
variable = base_nodal
function = 3+3*x*x-4*y*y*y
[]
[]
[AuxVariables]
# Families:
# LAGRANGE, MONOMIAL, HERMITE, SCALAR, HIERARCHIC, CLOUGH, XYZ, SZABAB, BERNSTEIN,
# L2_LAGRANGE, L2_HIERARCHIC, RATIONAL_BERNSTEIN, SIDE_HIERARCHIC
# Notes:
# - 'elemental': MONOMIAL, XYZ, L2_LAGRANGE, L2_HIERARCHIC
# - 'nodal': LAGRANGE, HERMITE, HIERARCHIC, CLOUGH, SZABAB, BERNSTEIN, RATIONAL_BERNSTEIN
# - Clough, rational Berstein cannot be created in 2D QUAD9
# - Hermite cannot be created on 2D Tri6
# - Clough, Szabab, Hermite, hierarchic, L2_lagrange, L2_hierarchic, Bernstein cannot be created as constant
[base_elem]
family = MONOMIAL
order = CONSTANT
[]
[base_nodal]
[]
[test_elem_lagrange]
[]
[test_elem_lagrange_high]
order = SECOND
[]
[test_elem_mono]
family = MONOMIAL
order = CONSTANT
[]
[test_elem_mono_high]
family = MONOMIAL
order = SECOND
[]
[test_elem_fv]
type = MooseVariableFVReal
[]
[test_elem_hierarchic]
family = HIERARCHIC
order = FIRST
[]
[test_elem_xyz]
family = XYZ
order = CONSTANT
[]
[test_elem_xyz_high]
family = XYZ
order = SECOND
[]
[test_elem_szabab]
family = SZABAB
order = FIRST
[]
[test_elem_bernstein]
family = BERNSTEIN
order = FIRST
[]
[test_elem_l2_lagrange]
family = L2_LAGRANGE
order = FIRST
[]
[test_elem_l2_lagrange_high]
family = L2_LAGRANGE
order = SECOND
[]
[test_elem_l2_hierarchic]
family = L2_HIERARCHIC
order = FIRST
[]
[test_elem_l2_hierarchic_high]
family = L2_HIERARCHIC
order = SECOND
[]
[test_nodal_lagrange]
[]
[test_nodal_lagrange_high]
order = SECOND
[]
[test_nodal_mono]
family = MONOMIAL
order = CONSTANT
[]
[test_nodal_mono_high]
family = MONOMIAL
order = SECOND
[]
[test_nodal_fv]
type = MooseVariableFVReal
[]
[test_nodal_hierarchic]
family = HIERARCHIC
order = FIRST
[]
[test_nodal_xyz]
family = XYZ
order = CONSTANT
[]
[test_nodal_xyz_high]
family = XYZ
order = SECOND
[]
[test_nodal_szabab]
family = SZABAB
order = FIRST
[]
[test_nodal_bernstein]
family = BERNSTEIN
order = FIRST
[]
[test_nodal_l2_lagrange]
family = L2_LAGRANGE
order = FIRST
[]
[test_nodal_l2_lagrange_high]
family = L2_LAGRANGE
order = SECOND
[]
[test_nodal_l2_hierarchic]
family = L2_HIERARCHIC
order = FIRST
[]
[test_nodal_l2_hierarchic_high]
family = L2_HIERARCHIC
order = SECOND
[]
[]
[AuxKernels]
# Project from constant monomial
[base_elem_proj_lagrange]
type = ProjectionAux
variable = test_elem_lagrange
v = base_elem
[]
[base_elem_proj_lagrange_high]
type = ProjectionAux
variable = test_elem_lagrange_high
v = base_elem
[]
[base_elem_proj_mono]
type = ProjectionAux
variable = test_elem_mono
v = base_elem
[]
[base_elem_proj_mono_high]
type = ProjectionAux
variable = test_elem_mono_high
v = base_elem
[]
[base_elem_proj_fv]
type = ProjectionAux
variable = test_elem_fv
v = base_elem
[]
[base_elem_proj_hierarchic]
type = ProjectionAux
variable = test_elem_hierarchic
v = base_elem
[]
[base_elem_proj_xyz]
type = ProjectionAux
variable = test_elem_xyz
v = base_elem
[]
[base_elem_proj_xyz_high]
type = ProjectionAux
variable = test_elem_xyz_high
v = base_elem
[]
[base_elem_proj_szabab]
type = ProjectionAux
variable = test_elem_szabab
v = base_elem
[]
[base_elem_proj_bernstein]
type = ProjectionAux
variable = test_elem_bernstein
v = base_elem
[]
[base_elem_proj_l2_lagrange]
type = ProjectionAux
variable = test_elem_l2_lagrange
v = base_elem
[]
[base_elem_proj_l2_lagrange_high]
type = ProjectionAux
variable = test_elem_l2_lagrange_high
v = base_elem
[]
[base_elem_proj_l2_hierarchic]
type = ProjectionAux
variable = test_elem_l2_hierarchic
v = base_elem
[]
[base_elem_proj_l2_hierarchic_high]
type = ProjectionAux
variable = test_elem_l2_hierarchic_high
v = base_elem
[]
# Project from constant nodal
[base_nodal_proj_lagrange]
type = ProjectionAux
variable = test_nodal_lagrange
v = base_nodal
[]
[base_nodal_proj_lagrange_high]
type = ProjectionAux
variable = test_nodal_lagrange_high
v = base_nodal
[]
[base_nodal_proj_mono]
type = ProjectionAux
variable = test_nodal_mono
v = base_nodal
[]
[base_nodal_proj_mono_high]
type = ProjectionAux
variable = test_nodal_mono_high
v = base_nodal
[]
[base_nodal_proj_fv]
type = ProjectionAux
variable = test_nodal_fv
v = base_nodal
[]
[base_nodal_proj_hierarchic]
type = ProjectionAux
variable = test_nodal_hierarchic
v = base_nodal
[]
[base_nodal_proj_xyz]
type = ProjectionAux
variable = test_nodal_xyz
v = base_nodal
[]
[base_nodal_proj_xyz_high]
type = ProjectionAux
variable = test_nodal_xyz_high
v = base_nodal
[]
[base_nodal_proj_szabab]
type = ProjectionAux
variable = test_nodal_szabab
v = base_nodal
[]
[base_nodal_proj_bernstein]
type = ProjectionAux
variable = test_nodal_bernstein
v = base_nodal
[]
[base_nodal_proj_l2_lagrange]
type = ProjectionAux
variable = test_nodal_l2_lagrange
v = base_nodal
[]
[base_nodal_proj_l2_lagrange_high]
type = ProjectionAux
variable = test_nodal_l2_lagrange_high
v = base_nodal
[]
[base_nodal_proj_l2_hierarchic]
type = ProjectionAux
variable = test_nodal_l2_hierarchic
v = base_nodal
[]
[base_nodal_proj_l2_hierarchic_high]
type = ProjectionAux
variable = test_nodal_l2_hierarchic_high
v = base_nodal
[]
[]
[Postprocessors]
[base_elem_proj_lagrange]
type = ElementL2Difference
variable = test_elem_lagrange
other_variable = base_elem
[]
[base_elem_proj_lagrange_high]
type = ElementL2Difference
variable = test_elem_lagrange_high
other_variable = base_elem
[]
[base_elem_proj_mono]
type = ElementL2Difference
variable = test_elem_mono
other_variable = base_elem
[]
[base_elem_proj_mono_high]
type = ElementL2Difference
variable = test_elem_mono_high
other_variable = base_elem
[]
[base_elem_proj_fv]
type = ElementL2Difference
variable = test_elem_fv
other_variable = base_elem
[]
[base_elem_proj_hierarchic]
type = ElementL2Difference
variable = test_elem_hierarchic
other_variable = base_elem
[]
[base_elem_proj_xyz]
type = ElementL2Difference
variable = test_elem_xyz
other_variable = base_elem
[]
[base_elem_proj_xyz_high]
type = ElementL2Difference
variable = test_elem_xyz_high
other_variable = base_elem
[]
[base_elem_proj_szabab]
type = ElementL2Difference
variable = test_elem_szabab
other_variable = base_elem
[]
[base_elem_proj_bernstein]
type = ElementL2Difference
variable = test_elem_bernstein
other_variable = base_elem
[]
[base_elem_proj_l2_lagrange]
type = ElementL2Difference
variable = test_elem_l2_lagrange
other_variable = base_elem
[]
[base_elem_proj_l2_lagrange_high]
type = ElementL2Difference
variable = test_elem_l2_lagrange_high
other_variable = base_elem
[]
[base_elem_proj_l2_hierarchic]
type = ElementL2Difference
variable = test_elem_l2_hierarchic
other_variable = base_elem
[]
[base_elem_proj_l2_hierarchic_high]
type = ElementL2Difference
variable = test_elem_l2_hierarchic_high
other_variable = base_elem
[]
[base_nodal_proj_lagrange]
type = ElementL2Difference
variable = test_nodal_lagrange
other_variable = base_nodal
[]
[base_nodal_proj_lagrange_high]
type = ElementL2Difference
variable = test_nodal_lagrange_high
other_variable = base_nodal
[]
[base_nodal_proj_mono]
type = ElementL2Difference
variable = test_nodal_mono
other_variable = base_nodal
[]
[base_nodal_proj_mono_high]
type = ElementL2Difference
variable = test_nodal_mono_high
other_variable = base_nodal
[]
[base_nodal_proj_fv]
type = ElementL2Difference
variable = test_nodal_fv
other_variable = base_nodal
[]
[base_nodal_proj_hierarchic]
type = ElementL2Difference
variable = test_nodal_hierarchic
other_variable = base_nodal
[]
[base_nodal_proj_xyz]
type = ElementL2Difference
variable = test_nodal_xyz
other_variable = base_nodal
[]
[base_nodal_proj_xyz_high]
type = ElementL2Difference
variable = test_nodal_xyz_high
other_variable = base_nodal
[]
[base_nodal_proj_szabab]
type = ElementL2Difference
variable = test_nodal_szabab
other_variable = base_nodal
[]
[base_nodal_proj_bernstein]
type = ElementL2Difference
variable = test_nodal_bernstein
other_variable = base_nodal
[]
[base_nodal_proj_l2_lagrange]
type = ElementL2Difference
variable = test_nodal_l2_lagrange
other_variable = base_nodal
[]
[base_nodal_proj_l2_lagrange_high]
type = ElementL2Difference
variable = test_nodal_l2_lagrange_high
other_variable = base_nodal
[]
[base_nodal_proj_l2_hierarchic]
type = ElementL2Difference
variable = test_nodal_l2_hierarchic
other_variable = base_nodal
[]
[base_nodal_proj_l2_hierarchic_high]
type = ElementL2Difference
variable = test_nodal_l2_hierarchic_high
other_variable = base_nodal
[]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
csv = true
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
(modules/phase_field/test/tests/misc/equal_gradient_lagrange.i)
#
# This test demonstrates an InterfaceKernel set that can enforce the componentwise
# continuity of the gradient of a variable using the Lagrange multiplier method.
#
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
ymax = 0.5
[]
[./box1]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '0.51 1 0'
input = gen
[../]
[./box2]
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '0.49 0 0'
top_right = '1 1 0'
input = box1
[../]
[./iface_u]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = 10
input = box2
[../]
[]
[Variables]
[./u2]
block = 1
[./InitialCondition]
type = FunctionIC
function = 'r:=sqrt((x-0.4)^2+(y-0.5)^2);if(r<0.05,5,1)'
[../]
[../]
[./v2]
block = 2
initial_condition = 0.8
[../]
[./lambda]
[../]
[]
[Kernels]
[./u2_diff]
type = Diffusion
variable = u2
block = 1
[../]
[./u2_dt]
type = TimeDerivative
variable = u2
block = 1
[../]
[./v2_diff]
type = Diffusion
variable = v2
block = 2
[../]
[./v2_dt]
type = TimeDerivative
variable = v2
block = 2
[../]
[./lambda]
type = NullKernel
variable = lambda
[../]
[]
[InterfaceKernels]
[./iface]
type = InterfaceDiffusionBoundaryTerm
boundary = 10
variable = u2
neighbor_var = v2
[../]
[./lambda]
type = EqualGradientLagrangeMultiplier
variable = lambda
boundary = 10
element_var = u2
neighbor_var = v2
component = 0
[../]
[./constraint]
type = EqualGradientLagrangeInterface
boundary = 10
lambda = lambda
variable = u2
neighbor_var = v2
component = 0
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[VectorPostprocessors]
[./uv]
type = LineValueSampler
variable = 'u2 v2'
start_point = '0 0.5 0'
end_point = '1 0.5 0'
sort_by = x
num_points = 100
[../]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pctype -sub_pc_type -sub_pc_factor_shift_type -pc_factor_shift_type'
petsc_options_value = ' asm lu nonzero nonzero'
dt = 0.002
num_steps = 10
[]
[Outputs]
exodus = true
csv = true
hide = lambda
print_linear_residuals = false
[]
(test/tests/kernels/conservative_advection/full_upwinding_2D.i)
# 2D test of advection with full upwinding
# Note there are no overshoots or undershoots
# but there is numerical diffusion.
# The center of the blob advects with the correct velocity
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
[]
[Variables]
[./u]
[../]
[]
[ICs]
[./u_blob]
type = FunctionIC
variable = u
function = 'if(x<0.2,if(y<0.2,1,0),0)'
[../]
[]
[Kernels]
[./udot]
type = MassLumpedTimeDerivative
variable = u
[../]
[./advection]
type = ConservativeAdvection
variable = u
upwinding_type = full
velocity = '2 1 0'
[../]
[]
[Executioner]
type = Transient
solve_type = LINEAR
dt = 0.01
end_time = 0.1
l_tol = 1E-14
[]
[Outputs]
exodus = true
[]
(modules/richards/test/tests/gravity_head_2/gh02.i)
# unsaturated = true
# gravity = true
# supg = false
# transient = false
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmin = 0
xmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = 'pwater pgas'
[../]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 1.0E2
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 0.5
bulk_mod = 0.5E2
[../]
[./SeffWater]
type = RichardsSeff2waterVG
m = 0.8
al = 1
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.8
al = 1
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = RichardsRelPermPower
simm = 0.0
n = 3
[../]
[./SatWater]
type = RichardsSat
s_res = 0.1
sum_s_res = 0.15
[../]
[./SatGas]
type = RichardsSat
s_res = 0.05
sum_s_res = 0.15
[../]
[./SUPGwater]
type = RichardsSUPGnone
[../]
[./SUPGgas]
type = RichardsSUPGnone
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
# get nonconvergence if initial condition is too crazy
[./water_ic]
type = FunctionIC
function = pwater_initial
variable = pwater
[../]
[./gas_ic]
type = FunctionIC
function = pgas_initial
variable = pgas
[../]
[]
[Kernels]
active = 'richardsfwater richardsfgas'
[./richardstwater]
type = RichardsMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFlux
variable = pwater
[../]
[./richardstgas]
type = RichardsMassChange
variable = pgas
[../]
[./richardsfgas]
type = RichardsFlux
variable = pgas
[../]
[]
[AuxVariables]
[./seffgas]
[../]
[./seffwater]
[../]
[]
[AuxKernels]
[./seffgas_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffGas
variable = seffgas
[../]
[./seffwater_kernel]
type = RichardsSeffAux
pressure_vars = 'pwater pgas'
seff_UO = SeffWater
variable = seffwater
[../]
[]
[Postprocessors]
[./mwater_init]
type = RichardsMass
variable = pwater
execute_on = timestep_begin
outputs = none
[../]
[./mgas_init]
type = RichardsMass
variable = pgas
execute_on = timestep_begin
outputs = none
[../]
[./mwater_fin]
type = RichardsMass
variable = pwater
execute_on = timestep_end
outputs = none
[../]
[./mgas_fin]
type = RichardsMass
variable = pgas
execute_on = timestep_end
outputs = none
[../]
[./mass_error_water]
type = FunctionValuePostprocessor
function = fcn_mass_error_w
outputs = none # no reason why mass should be conserved
[../]
[./mass_error_gas]
type = FunctionValuePostprocessor
function = fcn_mass_error_g
outputs = none # no reason why mass should be conserved
[../]
[./pw_left]
type = PointValue
point = '0 0 0'
variable = pwater
outputs = none
[../]
[./pw_right]
type = PointValue
point = '1 0 0'
variable = pwater
outputs = none
[../]
[./error_water]
type = FunctionValuePostprocessor
function = fcn_error_water
[../]
[./pg_left]
type = PointValue
point = '0 0 0'
variable = pgas
outputs = none
[../]
[./pg_right]
type = PointValue
point = '1 0 0'
variable = pgas
outputs = none
[../]
[./error_gas]
type = FunctionValuePostprocessor
function = fcn_error_gas
[../]
[]
[Functions]
[./pwater_initial]
type = ParsedFunction
expression = 1-x/2
[../]
[./pgas_initial]
type = ParsedFunction
expression = 2-x/5
[../]
[./fcn_mass_error_w]
type = ParsedFunction
expression = 'abs(0.5*(mi-mf)/(mi+mf))'
symbol_names = 'mi mf'
symbol_values = 'mwater_init mwater_fin'
[../]
[./fcn_mass_error_g]
type = ParsedFunction
expression = 'abs(0.5*(mi-mf)/(mi+mf))'
symbol_names = 'mi mf'
symbol_values = 'mgas_init mgas_fin'
[../]
[./fcn_error_water]
type = ParsedFunction
expression = 'abs((-b*log(-(gdens0*xval+(-b*exp(-p0/b)))/b)-p1)/p1)'
symbol_names = 'b gdens0 p0 xval p1'
symbol_values = '1E2 -1 pw_left 1 pw_right'
[../]
[./fcn_error_gas]
type = ParsedFunction
expression = 'abs((-b*log(-(gdens0*xval+(-b*exp(-p0/b)))/b)-p1)/p1)'
symbol_names = 'b gdens0 p0 xval p1'
symbol_values = '0.5E2 -0.5 pg_left 1 pg_right'
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
density_UO = 'DensityWater DensityGas'
relperm_UO = 'RelPermWater RelPermGas'
SUPG_UO = 'SUPGwater SUPGgas'
sat_UO = 'SatWater SatGas'
seff_UO = 'SeffWater SeffGas'
viscosity = '1E-3 0.5E-3'
gravity = '-1 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'gmres asm lu NONZERO 1E-10 1E-10 10000'
[../]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Outputs]
execute_on = 'timestep_end'
file_base = gh02
csv = true
[]
(modules/porous_flow/test/tests/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
[]
(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'
[]
[]
(modules/geochemistry/test/tests/kernels/advection_1.i)
# A step-like initial concentration is advected to the right using a constant velocity.
# Because of the Dirichlet BC on the left, the step-like concentration profile is maintained (up to the usual numerical diffusion)
# Because upwinding_type=full in the ConservativeAdvection Kernel, there are no overshoots and undershoots
# The total amount of "conc" should increase by dt * velocity every timestep, as recorded by the front_position Postprocessor
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
[]
[Variables]
[conc]
[]
[]
[ICs]
[conc]
type = FunctionIC
function = 'if(x<=0.25, 1, 0)'
variable = conc
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = 1.0
variable = conc
[]
[]
[Kernels]
[dot]
type = GeochemistryTimeDerivative
variable = conc
[]
[adv]
type = ConservativeAdvection
velocity = velocity
upwinding_type = full
variable = conc
[]
[]
[AuxVariables]
[velocity]
family = MONOMIAL_VEC
order = CONSTANT
[]
[]
[AuxKernels]
[velocity]
type = VectorFunctionAux
function = vel_fcn
variable = velocity
[]
[]
[Functions]
[vel_fcn]
type = ParsedVectorFunction
expression_x = 1
expression_y = 0
expression_z = 0
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.01
end_time = 0.1
[]
[Postprocessors]
[front_position]
type = ElementIntegralVariablePostprocessor
variable = conc
[]
[]
[Outputs]
csv = true
[]
(test/tests/misc/check_error/function_conflict.i)
# A function name that could be interpreted as a ParsedFunction
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Functions]
[./x]
type = ConstantFunction
[../]
[]
[Variables]
[./var]
[../]
[]
[ICs]
[./dummy]
type = FunctionIC
variable = var
function = x
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = var
[../]
[]
[Executioner]
type = Steady
[]
(test/tests/transfers/general_field/user_object/subdomain/sub.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmax = 0.2
ymax = 0.2
[]
[add_block]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x > 0.05 & y < 0.1'
block_id = 1
[]
[]
[AuxVariables]
[from_main]
initial_condition = -1
[]
[from_main_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_main]
[InitialCondition]
type = FunctionIC
function = '3 + 2*x*x + 3*y*y*y'
[]
[]
[to_main_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '4 + 2*x*x + 3*y*y*y'
[]
[]
[]
[UserObjects]
[to_main]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_main
[]
[to_main_elem]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_main_elem
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
exodus = true
hide = 'to_main to_main_elem'
execute_on = 'TIMESTEP_END'
[]
(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/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/transfers/general_field/shape_evaluation/boundary/main.i)
# Base input for testing transfers. It has the following complexities:
# - more than one subapp
# - transfers both from and to the subapps
# - both nodal and elemental variables
# - subapp meshes are not aligned with the main app
# Tests derived from this input may add complexities through command line arguments
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 5
ny = 5
nz = 5
[]
[add_block]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x < 0.5 & y < 0.5'
block_id = 1
[]
[add_internal_sideset]
type = SideSetsBetweenSubdomainsGenerator
input = add_block
primary_block = 0
paired_block = 1
new_boundary = internal
[]
[]
[AuxVariables]
[from_sub]
initial_condition = -1
[]
[from_sub_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_sub]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[to_sub_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
verbose_multiapps = true
[]
[Outputs]
[out]
type = Exodus
hide = 'to_sub to_sub_elem'
overwrite = true
[]
[]
[MultiApps]
[sub]
# 1 on corner, one in the center and one close to a corner
# The subapp mesh is a 0.3-sized cube, no overlap
positions = '0.2222 0 0 0.61111 0.311111 0.31111 0.76666 0.111111 0.81111'
type = TransientMultiApp
app_type = MooseTestApp
input_files = sub.i
execute_on = timestep_end
# Facilitates debugging
output_in_position = true
[]
[]
[Transfers]
# Boundary restrictions are added in the tests specification
[to_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
source_variable = to_sub
variable = from_main
extrapolation_constant = -1
[]
[to_sub_elem]
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
source_variable = to_sub_elem
variable = from_main_elem
extrapolation_constant = -1
[]
[from_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
source_variable = to_main
variable = from_sub
extrapolation_constant = -1
[]
[from_sub_elem]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
source_variable = to_main_elem
variable = from_sub_elem
extrapolation_constant = -1
[]
[]
(test/tests/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/navier_stokes/test/tests/finite_volume/cns/shock_tube_2D_cavity/hllc_sod_shocktube_2D.i)
rho_left = 1
E_left = 2.501505578
u_left = 1e-15
rho_right = 0.125
E_right = 1.999770935
u_right = 1e-15
x_sep = 35
[GlobalParams]
fp = fp
[]
[Mesh]
[./cartesian]
type = CartesianMeshGenerator
dim = 2
dx = '40 20'
ix = '200 100'
dy = '1 20 2 20 1'
iy = '4 100 10 100 4'
subdomain_id = '0 0
0 1
1 1
0 1
0 0'
[../]
[./wall]
type = SideSetsBetweenSubdomainsGenerator
input = cartesian
primary_block = 1
paired_block = 0
new_boundary = 'wall'
[../]
[./delete]
type = BlockDeletionGenerator
input = wall
block = 0
[../]
[]
[FluidProperties]
[./fp]
type = IdealGasFluidProperties
allow_imperfect_jacobians = true
[../]
[]
[Variables]
[./rho]
order = CONSTANT
family = MONOMIAL
fv = true
[../]
[./rho_u]
order = CONSTANT
family = MONOMIAL
fv = true
[../]
[./rho_v]
order = CONSTANT
family = MONOMIAL
fv = true
[../]
[./rho_E]
order = CONSTANT
family = MONOMIAL
fv = true
[../]
[]
[AuxVariables]
[./Ma]
order = CONSTANT
family = MONOMIAL
[../]
[./p]
order = CONSTANT
family = MONOMIAL
[../]
[./v_norm]
order = CONSTANT
family = MONOMIAL
[../]
[./temperature]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./Ma_aux]
type = NSMachAux
variable = Ma
fluid_properties = fp
use_material_properties = true
[../]
[./p_aux]
type = ADMaterialRealAux
variable = p
property = pressure
[../]
[./v_norm_aux]
type = ADMaterialRealAux
variable = v_norm
property = speed
[../]
[./temperature_aux]
type = ADMaterialRealAux
variable = temperature
property = T_fluid
[../]
[]
[FVKernels]
[./mass_time]
type = FVTimeKernel
variable = rho
[../]
[./mass_advection]
type = CNSFVMassHLLC
variable = rho
[../]
[./momentum_x_time]
type = FVTimeKernel
variable = rho_u
[../]
[./momentum_x_advection]
type = CNSFVMomentumHLLC
variable = rho_u
momentum_component = x
[../]
[./momentum_y_time]
type = FVTimeKernel
variable = rho_v
[../]
[./momentum_y_advection]
type = CNSFVMomentumHLLC
variable = rho_v
momentum_component = y
[../]
[./fluid_energy_time]
type = FVTimeKernel
variable = rho_E
[../]
[./fluid_energy_advection]
type = CNSFVFluidEnergyHLLC
variable = rho_E
[../]
[]
[FVBCs]
[./mom_x_pressure]
type = CNSFVMomImplicitPressureBC
variable = rho_u
momentum_component = x
boundary = 'left right wall'
[../]
[./mom_y_pressure]
type = CNSFVMomImplicitPressureBC
variable = rho_v
momentum_component = y
boundary = 'wall'
[../]
[]
[ICs]
[./rho_ic]
type = FunctionIC
variable = rho
function = 'if (x < ${x_sep}, ${rho_left}, ${rho_right})'
[../]
[./rho_u_ic]
type = FunctionIC
variable = rho_u
function = 'if (x < ${x_sep}, ${fparse rho_left * u_left}, ${fparse rho_right * u_right})'
[../]
[./rho_E_ic]
type = FunctionIC
variable = rho_E
function = 'if (x < ${x_sep}, ${fparse E_left * rho_left}, ${fparse E_right * rho_right})'
[../]
[]
[Materials]
[./var_mat]
type = ConservedVarValuesMaterial
rho = rho
rhou = rho_u
rhov = rho_v
rho_et = rho_E
fp = fp
[../]
[./sound_speed]
type = SoundspeedMat
fp = fp
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[../]
[]
[Postprocessors]
[./cfl_dt]
type = ADCFLTimeStepSize
c_names = 'sound_speed'
vel_names = 'speed'
[../]
[]
[Executioner]
type = Transient
end_time = 100
[TimeIntegrator]
type = ExplicitSSPRungeKutta
order = 2
[]
l_tol = 1e-8
[./TimeStepper]
type = PostprocessorDT
postprocessor = cfl_dt
[../]
[]
(modules/porous_flow/test/tests/numerical_diffusion/fltvd_no_antidiffusion.i)
# Using Flux-Limited TVD Advection ala Kuzmin and Turek, but without any antidiffusion
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = 0
xmax = 1
[]
[Variables]
[tracer]
[]
[]
[ICs]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[]
[]
[Kernels]
[mass_dot]
type = MassLumpedTimeDerivative
variable = tracer
[]
[flux]
type = FluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = fluo
[]
[]
[UserObjects]
[fluo]
type = AdvectiveFluxCalculatorConstantVelocity
flux_limiter_type = none
u = tracer
velocity = '0.1 0 0'
[]
[]
[BCs]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_tracer]
# Ideally, an OutflowBC would be used, but that does not exist in the framework
# In 1D VacuumBC is the same as OutflowBC, with the alpha parameter being twice the velocity
type = VacuumBC
boundary = right
alpha = 0.2 # 2 * velocity
variable = tracer
[]
[]
[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'
[]
[]
[VectorPostprocessors]
[tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 101
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-1
nl_abs_tol = 1E-8
nl_max_its = 500
timestep_tolerance = 1E-3
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(test/tests/functions/image_function/image_2d.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Variables]
[u]
[]
[]
[Functions]
[image_func]
type = ImageFunction
file_base = stack/test
file_suffix = png
file_range = '0' # file_range is a vector input, a single entry means "read only 1 file"
[]
[]
[ICs]
[u_ic]
type = FunctionIC
function = image_func
variable = u
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.1
[]
[Outputs]
exodus = true
[]
(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/richards/test/tests/dirac/bh27.i)
#2-phase version of bh07 (go to steadystate with borehole)
[Mesh]
type = FileMesh
file = bh07_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'
viscosity = '1E-3 1E-5'
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1000 10000'
x = '100 1000'
[../]
[]
[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.6
al = 1E-5
[../]
[./SeffGas]
type = RichardsSeff2gasVG
m = 0.6
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 = RichardsSUPGnone
[../]
[./SUPGgas]
type = RichardsSUPGnone
[../]
[./borehole_total_outflow_mass]
type = RichardsSumQuantity
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./water_ic]
type = FunctionIC
variable = pwater
function = 1E7
[../]
[./gas_ic]
type = FunctionIC
variable = pgas
function = 1E7
[../]
[]
[BCs]
[./fix_outer_w]
type = DirichletBC
boundary = perimeter
variable = pwater
value = 1E7
[../]
[./fix_outer_g]
type = DirichletBC
boundary = perimeter
variable = pgas
value = 1E7
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[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
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = SeffWater
pressure_vars = 'pwater pgas'
[../]
[]
[DiracKernels]
[./bh]
type = RichardsBorehole
bottom_pressure = 0
point_file = bh07.bh
SumQuantityUO = borehole_total_outflow_mass
fully_upwind = true
variable = pwater
unit_weight = '0 0 0'
re_constant = 0.1594
character = 2 # this is to make the length 1m borehole fill the entire 2m height
[../]
[./bh_gas_dummy]
type = RichardsBorehole
bottom_pressure = 0
point_file = bh07.bh
SumQuantityUO = borehole_total_outflow_mass
fully_upwind = true
variable = pgas
unit_weight = '0 0 0'
re_constant = 0.1594
character = 2 # this is to make the length 1m borehole fill the entire 2m height
[../]
[]
[Postprocessors]
[./bh_report]
type = RichardsPlotQuantity
uo = borehole_total_outflow_mass
execute_on = 'initial timestep_end'
[../]
[./water_mass]
type = RichardsMass
variable = pwater
execute_on = 'initial timestep_end'
[../]
[./gas_mass]
type = RichardsMass
variable = pgas
execute_on = 'initial timestep_end'
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = 1
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
[../]
[]
[Preconditioning]
[./usual]
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
end_time = 1000
solve_type = NEWTON
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = bh27
execute_on = 'initial timestep_end final'
time_step_interval = 1000000
exodus = 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/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/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/thermal_hydraulics/test/tests/userobjects/layered_flow_area_change/layered_flow_area_2D.i)
[Mesh]
[generated]
type = CartesianMeshGenerator
dim = 2
dx = '1 1 1'
dy = '4'
ix = '1 1 1'
iy = '40'
subdomain_id = '1 2 1'
[]
[interior_walls]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = interior
input = generated
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[disp_x]
[]
[disp_y]
[]
[channel_dA]
[]
[]
[ICs]
[disp_x_ic]
type = FunctionIC
variable = disp_x
function = 'if (x < 1.5, 0.5 * (y - 2) * 0.1, 0)'
[]
[]
[AuxKernels]
[channel_dA_aux]
type = SpatialUserObjectAux
variable = channel_dA
user_object = layered_area_change
[]
[]
[UserObjects]
[layered_area_change]
type = LayeredFlowAreaChange
direction = y
displacements = 'disp_x disp_y'
boundary = interior
num_layers = 40
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(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/richards/test/tests/excav/ex01.i)
###########################################
# #
# THIS EXAMPLE CONTAINS AN EXCAVATION #
# #
###########################################
# Easiest way of figuring out what's happening:
# Run this example, load into paraview, take
# a slice through (0,0,0) with normal (0,0,1),
# colour by pressure and play the animation.
# This mesh has an interior sideset called excav_bdy
[Mesh]
type = FileMesh
file = ex01_input.e
[]
# This is a boundary condition acting on excav_bdy
# All it does is to set the pressure to p_excav=0
# at places on excav_bdy wherever excav_fcn tells it to.
[BCs]
[./excav_bdy]
type = RichardsExcav
boundary = excav_bdy
p_excav = 0.0
variable = pressure
excav_geom_function = excav_fcn
[../]
[]
[Functions]
# excav_fcn controls where to set pressure=p_excav
# You supply start and end positions and times and
# by a linear interpolation these define the position
# of the coal face at all times
[./excav_fcn]
type = RichardsExcavGeom
start_posn = '0 -500 0'
start_time = 0
end_posn = '0 -300 0'
end_time = 6E6
active_length = 1E4
[../]
# mass_bal_fcn calculates the mass balance
[./mass_bal_fcn]
type = ParsedFunction
expression = abs((mi-fout-mf)/2/(mi+mf))
symbol_names = 'mi mf fout'
symbol_values = 'mass_init mass_final flux_out'
[../]
# initial pressure - unimportant in this example
[./initial_pressure]
type = ParsedFunction
expression = -10000*(z-100)
[../]
[]
# following is needed by postprocessors, kernels, etc
# unimportant in this example
[GlobalParams]
richardsVarNames_UO = PPNames
[]
# following does the calculation of relevant
# masses and mass-flux to the excavation
[Postprocessors]
# note that this is calculated at beginning of timestep
[./mass_init]
type = RichardsMass
variable = pressure
execute_on = 'initial timestep_begin'
[../]
# note this is calculated at end of timestep
[./mass_final]
type = RichardsMass
variable = pressure
execute_on = timestep_end
[../]
# this is what calculates the mass flux to the excavation
# it is calculating it for boundary=excav_bdy, and the
# excavation time-dependence is set through the excav_fcn
[./flux_out]
type = RichardsExcavFlow
boundary = excav_bdy
variable = pressure
excav_geom_function = excav_fcn
[../]
# mass_bal just outputs the result to screen
[./mass_bal]
type = FunctionValuePostprocessor
function = mass_bal_fcn
[../]
[]
######################################
# #
# THE FOLLOWING STUFF IS STANDARD #
# #
######################################
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./Seff1VG]
type = RichardsSeff1VG
m = 0.8
al = 1E-5
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0
sum_s_res = 0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E+2
[../]
[]
[Variables]
active = 'pressure'
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./p_ic]
type = FunctionIC
variable = pressure
function = initial_pressure
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
variable = pressure
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = '1 2 3 4'
viscosity = 1E-3
mat_porosity = 0.1
mat_permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-15'
density_UO = DensityConstBulk
relperm_UO = RelPermPower
sat_UO = Saturation
seff_UO = Seff1VG
SUPG_UO = SUPGstandard
gravity = '0 0 -10'
linear_shape_fcns = true
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = Seff1VG
pressure_vars = pressure
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-13 1E-14 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 6E6
dt = 3E6
solve_type = NEWTON
[]
[Outputs]
file_base = ex01
exodus = true
[]
(modules/porous_flow/test/tests/flux_limited_TVD_advection/fltvd_2D_angle.i)
# Using Flux-Limited TVD Advection ala Kuzmin and Turek, with antidiffusion from superbee flux limiting
# 2D version with velocity = (0.1, 0.2, 0)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
xmin = 0
xmax = 1
ny = 10
ymin = 0
ymax = 1
[]
[Variables]
[tracer]
[]
[]
[ICs]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1 | x > 0.3 | y < 0.1 | y > 0.3, 0, 1)'
[]
[]
[Kernels]
[mass_dot]
type = MassLumpedTimeDerivative
variable = tracer
[]
[flux]
type = FluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = fluo
[]
[]
[UserObjects]
[fluo]
type = AdvectiveFluxCalculatorConstantVelocity
flux_limiter_type = superbee
u = tracer
velocity = '0.1 0.2 0'
[]
[]
[BCs]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_tracer]
# Ideally, an OutflowBC would be used, but that does not exist in the framework
# In 1D VacuumBC is the same as OutflowBC, with the alpha parameter being twice the velocity
type = VacuumBC
boundary = right
alpha = 0.2 # 2 * velocity
variable = tracer
[]
[]
[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 = 2
dt = 0.1
[]
[Outputs]
print_linear_residuals = false
[out]
type = Exodus
execute_on = 'initial final'
[]
[]
(test/tests/transfers/general_field/nearest_node/nearest_position/sub_between_diffusion.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
[]
[block1]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '0.5 0.5 0'
[]
[]
[AuxVariables]
[sent_nodal]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[received_nodal]
initial_condition = -1
[]
[sent_elem]
family = MONOMIAL
order = CONSTANT
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[received_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
exodus = true
hide = 'sent_nodal sent_elem'
execute_on = 'TIMESTEP_END'
[]
(test/tests/transfers/general_field/shape_evaluation/subdomain/main.i)
# Base input for testing transfers. It has the following complexities:
# - more than one subapp
# - transfers both from and to the subapps
# - both nodal and elemental variables
# - subapp meshes are not aligned with the main app
# Tests derived from this input may add complexities through command line arguments
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
[]
[add_block]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x < 0.6 & y < 0.5'
block_id = 1
[]
[]
[AuxVariables]
[from_sub]
initial_condition = -1
[]
[from_sub_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_sub]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[to_sub_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
hide = 'to_sub to_sub_elem'
[]
execute_on = 'TIMESTEP_END'
[]
[MultiApps]
[sub]
# 1 on corner, one in the center and one close to a corner
# Offsets are added to make sure there are no equidistant nodes / transfer indetermination
positions = '0 0 0 0.41111 0.28111 0 0.7232323 0.12323 0'
type = TransientMultiApp
app_type = MooseTestApp
input_files = sub.i
execute_on = timestep_end
output_in_position = true
[]
[]
[Transfers]
[to_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
source_variable = to_sub
variable = from_main
from_blocks = 1
to_blocks = 1
extrapolation_constant = -1
[]
[to_sub_elem]
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
source_variable = to_sub_elem
variable = from_main_elem
from_blocks = 1
to_blocks = 1
extrapolation_constant = -1
[]
[from_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
source_variable = to_main
variable = from_sub
from_blocks = 1
to_blocks = 1
extrapolation_constant = -1
[]
[from_sub_elem]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
source_variable = to_main_elem
variable = from_sub_elem
from_blocks = 1
to_blocks = 1
extrapolation_constant = -1
[]
[]
(modules/porous_flow/test/tests/numerical_diffusion/fltvd.i)
# Using Flux-Limited TVD Advection ala Kuzmin and Turek, with antidiffusion from superbee flux limiting
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = 0
xmax = 1
[]
[Variables]
[tracer]
[]
[]
[ICs]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[]
[]
[Kernels]
[mass_dot]
type = MassLumpedTimeDerivative
variable = tracer
[]
[flux]
type = FluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = fluo
[]
[]
[UserObjects]
[fluo]
type = AdvectiveFluxCalculatorConstantVelocity
flux_limiter_type = superbee
u = tracer
velocity = '0.1 0 0'
[]
[]
[BCs]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_tracer]
# Ideally, an OutflowBC would be used, but that does not exist in the framework
# In 1D VacuumBC is the same as OutflowBC, with the alpha parameter being twice the velocity
type = VacuumBC
boundary = right
alpha = 0.2 # 2 * velocity
variable = tracer
[]
[]
[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'
[]
[]
[VectorPostprocessors]
[tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 101
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-2
nl_abs_tol = 1E-8
nl_max_its = 500
timestep_tolerance = 1E-3
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(modules/rdg/test/tests/advection_1d/1d_aefv_square_wave.i)
############################################################
[GlobalParams]
order = CONSTANT
family = MONOMIAL
u = u
slope_limiting = lslope
implicit = false
[]
############################################################
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 1
nx = 100
[]
############################################################
[Functions]
[./ic_u]
type = PiecewiseConstant
axis = x
direction = right
xy_data = '0.1 0.5
0.6 1.0
1.0 0.5'
[../]
[]
############################################################
[UserObjects]
[./lslope]
type = AEFVSlopeLimitingOneD
execute_on = 'linear'
scheme = 'none' #none | minmod | mc | superbee
[../]
[./internal_side_flux]
type = AEFVUpwindInternalSideFlux
execute_on = 'linear'
[../]
[./free_outflow_bc]
type = AEFVFreeOutflowBoundaryFlux
execute_on = 'linear'
[../]
[]
############################################################
[Variables]
[./u]
[../]
[]
############################################################
[ICs]
[./u_ic]
type = FunctionIC
variable = 'u'
function = ic_u
[../]
[]
############################################################
[Kernels]
[./time_u]
implicit = true
type = TimeDerivative
variable = u
[../]
[]
############################################################
[DGKernels]
[./concentration]
type = AEFVKernel
variable = u
component = 'concentration'
flux = internal_side_flux
[../]
[]
############################################################
[BCs]
[./concentration]
type = AEFVBC
boundary = 'left right'
variable = u
component = 'concentration'
flux = free_outflow_bc
[../]
[]
############################################################
[Materials]
[./aefv]
type = AEFVMaterial
block = 0
[../]
[]
############################################################
[Executioner]
type = Transient
[./TimeIntegrator]
type = ExplicitMidpoint
[../]
solve_type = 'LINEAR'
l_tol = 1e-4
nl_rel_tol = 1e-20
nl_abs_tol = 1e-8
nl_max_its = 60
start_time = 0.0
num_steps = 4 # 4 | 400 for complete run
dt = 5e-4
dtmin = 1e-6
[]
[Outputs]
[./Exodus]
type = Exodus
file_base = 1d_aefv_square_wave_none_out
time_step_interval = 2
[../]
perf_graph = true
[]
(modules/level_set/examples/circle/circle_16.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 16
ny = 16
[]
[Variables]
[./phi]
[../]
[]
[AuxVariables]
[./velocity]
family = LAGRANGE_VEC
[../]
[]
[ICs]
[./phi_ic]
type = FunctionIC
function = phi_exact
variable = phi
[../]
[./vel_ic]
type = VectorFunctionIC
variable = velocity
function = velocity_func
[]
[]
[Functions]
[./phi_exact]
type = LevelSetOlssonBubble
epsilon = 0.05
center = '0.5 0.5 0'
radius = 0.15
[../]
[./velocity_func]
type = ParsedVectorFunction
expression_x = '3'
expression_y = '3'
[../]
[]
[BCs]
[./Periodic]
[./all]
variable = phi
auto_direction = 'x y'
[../]
[../]
[]
[Kernels]
[./time]
type = TimeDerivative
variable = phi
[../]
[./advection]
type = LevelSetAdvection
velocity = velocity
variable = phi
[../]
[]
[Postprocessors]
[./cfl]
type = LevelSetCFLCondition
velocity = velocity
execute_on = 'initial'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
start_time = 0
end_time = 1
scheme = crank-nicolson
petsc_options_iname = '-pc_type -pc_sub_type'
petsc_options_value = 'asm ilu'
[./TimeStepper]
type = PostprocessorDT
postprocessor = cfl
scale = 0.8
[../]
[]
[Outputs]
csv = true
exodus = true
[]
(test/tests/transfers/multiapp_conservative_transfer/primary_skipped_adjuster.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
[]
[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
[]
[]
[AuxVariables]
[var]
family = MONOMIAL
order = THIRD
[]
[]
[ICs]
[var_ic]
type = FunctionIC
variable = var
function = '-exp(x * y)'
[]
[]
[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 = secondary_negative_adjuster.i
execute_on = timestep_begin
[]
[]
[Postprocessors]
[from_postprocessor]
type = ElementIntegralVariablePostprocessor
variable = var
[]
[]
[Transfers]
[to_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = var
variable = var
to_multi_app = sub
from_postprocessors_to_be_preserved = 'from_postprocessor'
to_postprocessors_to_be_preserved = 'to_postprocessor'
allow_skipped_adjustment = true
[]
[]
[Outputs]
exodus = true
[]
(test/tests/misc/check_error/function_file_test8.i)
# Test for usage of missing function
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic_function
[../]
[../]
[]
[Functions]
[./ic_function]
type = PiecewiseLinear
xy_data = '1 2 3'
scale_factor = 1.0
[../]
[]
[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'
[]
[Outputs]
file_base = out
[]
(modules/chemical_reactions/test/tests/thermochimica/MoRuPd.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 1
ny = 1
[]
[]
[GlobalParams]
elements = 'Mo Ru Pd'
output_phases = 'BCCN HCPN'
output_species = 'HCPN:Pd'
output_element_potentials = 'mu:Pd'
output_vapor_pressures = 'vp:gas_ideal:Pd'
output_element_phases = 'ep:BCCN:Pd'
[]
[ChemicalComposition]
[thermo]
thermofile = Kaye_NobleMetals.dat
tunit = K
punit = atm
munit = moles
temperature = 2250
output_species_unit = mole_fraction
[]
[]
[ICs]
[Mo]
type = FunctionIC
variable = Mo
function = '800*(1-x)+4.3*x'
[]
[Ru]
type = FunctionIC
variable = Ru
function = '200*(1-x)+4.5*x'
[]
[Pd]
type = ConstantIC
variable = Pd
value = 1.0e-8
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(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/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/phase_field/test/tests/free_energy_material/VanDerWaalsFreeEnergy.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
elem_type = QUAD4
[]
[Variables]
[./c]
[./InitialCondition]
type = FunctionIC
function = x*0.4+0.001
[../]
[../]
[./T]
[./InitialCondition]
type = FunctionIC
function = y*1999+1
[../]
[../]
[]
[Materials]
[./free_energy]
type = VanDerWaalsFreeEnergy
property_name = Fgas
m = 134 # Xenon
a = 7.3138
b = 84.77
omega = 41
c = c
T = T
outputs = exodus
[../]
[]
[Problem]
solve = false
kernel_coverage_check = false
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
exodus = 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/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
[]
(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/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/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
[]
(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/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
[]
(modules/porous_flow/test/tests/numerical_diffusion/no_action.i)
# Using upwinded and mass-lumped PorousFlow Kernels: this is equivalent of fully_saturated_action.i with stabilization = Full
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[porepressure]
[]
[tracer]
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x'
[]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = tracer
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = tracer
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = porepressure
[]
[]
[BCs]
[constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1
boundary = left
[]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[]
[remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure tracer'
number_fluid_phases = 1
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = tracer
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[]
[]
[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'
[]
[]
[VectorPostprocessors]
[tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 101
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-1
nl_abs_tol = 1E-8
timestep_tolerance = 1E-3
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(modules/porous_flow/test/tests/hysteresis/hys_sat_03.i)
# 1-phase hysteresis. Saturation calculation. Primary drying curve with low_extension_type = exponential
# When comparing the results with a by-hand computation, remember the MOOSE results are averaged over an element
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = 10
nx = 100
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
number_fluid_phases = 1
number_fluid_components = 1
porous_flow_vars = pp
[]
[]
[Variables]
[pp]
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = '1 - 2 * x'
[]
[]
[BCs]
[pp]
type = FunctionDirichletBC
variable = pp
function = '1 - 2 * x'
boundary = 'left right'
[]
[]
[Kernels]
[dummy]
type = Diffusion
variable = pp
[]
[]
[Materials]
[hys_order]
type = PorousFlowHysteresisOrder
[]
[saturation_calculator]
type = PorousFlow1PhaseHysP
alpha_d = 10.0
alpha_w = 10.0
n_d = 1.1
n_w = 1.9
S_l_min = 0.1
S_lr = 0.2
S_gr_max = 0.3
Pc_max = 7.0
low_extension_type = exponential
porepressure = pp
[]
[]
[AuxVariables]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[saturation]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[saturation]
type = PorousFlowPropertyAux
variable = saturation
property = saturation
phase = 0
[]
[]
[VectorPostprocessors]
[sat]
type = LineValueSampler
warn_discontinuous_face_values = false
start_point = '0.5 0 0'
end_point = '9.5 0 0'
num_points = 10
sort_by = x
variable = 'saturation pp'
[]
[]
[Executioner]
type = Transient
solve_type = Linear
dt = 1
end_time = 1
[]
[Outputs]
csv = true
[]
(test/tests/functions/image_function/threshold_adapt.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]
[Variables]
[u]
[]
[]
[Functions]
[image_func]
type = ImageFunction
file_base = stack/test
file_suffix = png
file_range = '0' # file_range is a vector input, a single entry means "read only 1 file"
threshold = 2.7e4
upper_value = 1
lower_value = -1
[]
[]
[ICs]
[u_ic]
type = FunctionIC
function = image_func
variable = u
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.1
[]
[Adaptivity]
max_h_level = 5
initial_steps = 5
initial_marker = marker
[Indicators]
[indicator]
type = GradientJumpIndicator
variable = u
[]
[]
[Markers]
[marker]
type = ErrorFractionMarker
indicator = indicator
refine = 0.9
[]
[]
[]
[Outputs]
exodus = true
[]
(test/tests/misc/check_error/function_file_test2.i)
# Test for usage of missing function
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic_function
[../]
[../]
[]
[Functions]
[./ic_function]
type = PiecewiseLinear
data_file = piecewise_linear_rows.csv #Will generate error because data is expected in columns
format = columns
scale_factor = 1.0
[../]
[]
[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'
[]
[Outputs]
file_base = out
[]
(modules/porous_flow/test/tests/flux_limited_TVD_advection/fltvd_2D_trimesh.i)
# Using Flux-Limited TVD Advection ala Kuzmin and Turek, with antidiffusion from superbee flux limiting
# 2D version
[Mesh]
type = FileMesh
file = trimesh.msh
[]
[GlobalParams]
block = '50'
[]
[Variables]
[tracer]
[]
[]
[ICs]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.305,0,1))'
[]
[]
[Kernels]
[mass_dot]
type = MassLumpedTimeDerivative
variable = tracer
[]
[flux]
type = FluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = fluo
[]
[]
[UserObjects]
[fluo]
type = AdvectiveFluxCalculatorConstantVelocity
flux_limiter_type = superbee
u = tracer
velocity = '0.1 0 0'
[]
[]
[BCs]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_tracer]
# Ideally, an OutflowBC would be used, but that does not exist in the framework
# In 1D VacuumBC is the same as OutflowBC, with the alpha parameter being twice the velocity
type = VacuumBC
boundary = right
alpha = 0.2 # 2 * velocity
variable = tracer
[]
[]
[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'
[]
[]
[VectorPostprocessors]
[tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0.04 0'
num_points = 101
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-2
timestep_tolerance = 1E-3
[]
[Outputs]
print_linear_residuals = false
[out]
type = CSV
execute_on = final
[]
[]
(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
[../]
[]
(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/functions/image_function/image_mesh_3d.i)
[Mesh]
type = ImageMesh
dim = 3
file_base = stack/test
file_suffix = png
[]
[Variables]
[u]
[]
[]
[Functions]
[image_func]
# ImageFunction gets its file range parameters from ImageMesh,
# when it is present. This prevents duplicating information in
# input files.
type = ImageFunction
[]
[]
[ICs]
[u_ic]
type = FunctionIC
function = image_func
variable = u
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.1
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/multiphase_mechanics/nonsplit_gradderiv_action.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 5
xmax = 10
ymax = 10
[]
[GlobalParams]
displacements = 'disp_x disp_y'
displacement_gradients = 'gxx gxy gyx gyy'
[]
[Modules]
[./PhaseField]
[./DisplacementGradients]
[../]
[../]
[]
[AuxVariables]
[./disp_x]
[./InitialCondition]
type = FunctionIC
function = '0.1*sin(2*x/10*3.14159265359)'
[../]
[../]
[./disp_y]
[./InitialCondition]
type = FunctionIC
function = '0.1*sin(1*y/10*3.14159265359)'
[../]
[../]
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
initial_condition = 0
[../]
[]
[Kernels]
[./dt]
type = TimeDerivative
variable = c
[../]
[./bulk]
type = CahnHilliard
variable = c
mob_name = M
f_name = F
[../]
[./int]
type = CHInterface
variable = c
mob_name = M
kappa_name = kappa_c
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1 0.1'
[../]
[./elasticity_tensor]
type = ComputeConcentrationDependentElasticityTensor
c = c
C0_ijkl = '1.0 1.0'
C1_ijkl = '3.0 3.0'
fill_method0 = symmetric_isotropic
fill_method1 = symmetric_isotropic
[../]
[./smallstrain]
type = ComputeSmallStrain
[../]
[./linearelastic_a]
type = ComputeLinearElasticStress
[../]
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = F
args = 'c'
derivative_order = 3
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = NEWTON
l_max_its = 30
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-7
nl_abs_tol = 1.0e-10
num_steps = 2
dt = 1
[]
[Outputs]
perf_graph = true
file_base = nonsplit_gradderiv_out
exodus = true
[]
(modules/porous_flow/test/tests/hysteresis/hys_pc_01.i)
# Capillary-pressure calculation. Primary drying curve with low_extension_type = none
# When comparing the results with a by-hand computation, remember the MOOSE results are averaged over an element
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = 1
nx = 100
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
number_fluid_phases = 1
number_fluid_components = 1
porous_flow_vars = ''
[]
[]
[Variables]
[sat]
[]
[]
[ICs]
[sat]
type = FunctionIC
variable = sat
function = 'x'
[]
[]
[BCs]
[sat]
type = FunctionDirichletBC
variable = sat
function = 'x'
boundary = 'left right'
[]
[]
[Kernels]
[dummy]
type = Diffusion
variable = sat
[]
[]
[Materials]
[hys_order]
type = PorousFlowHysteresisOrder
[]
[pc_calculator]
type = PorousFlowHystereticInfo
alpha_d = 10.0
alpha_w = 10.0
n_d = 1.5
n_w = 1.9
S_l_min = 0.1
S_lr = 0.2
S_gr_max = 0.3
Pc_max = 12.0
low_extension_type = none
sat_var = sat
[]
[]
[AuxVariables]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[pc]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[pc]
type = PorousFlowPropertyAux
variable = pc
property = hysteretic_info
[]
[]
[VectorPostprocessors]
[pc]
type = LineValueSampler
warn_discontinuous_face_values = false
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 10
sort_by = x
variable = 'sat pc'
[]
[]
[Executioner]
type = Transient
solve_type = Linear
dt = 1
end_time = 1
[]
[Outputs]
csv = 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/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
[]
(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
[../]
[]
(test/tests/misc/check_error/function_file_test13.i)
# Test for usage of missing function
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic_function
[../]
[../]
[]
[Functions]
[./ic_function]
type = PiecewiseLinear
data_file = piecewise_linear_columns_more_data.csv
format = columns
xy_in_file_only = false
x_index_in_file = 3 #Will generate error because data does not contain 4 columns
scale_factor = 1.0
[../]
[]
[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'
[]
[Outputs]
file_base = out
[]
(test/tests/functions/image_function/subset.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
uniform_refine = 2
[]
[Variables]
[u]
[]
[]
[Functions]
[image_func]
type = ImageFunction
file_base = stack/test
file_suffix = png
file_range = '0' # file_range is a vector input, a single entry means "read only 1 file"
origin = '0.25 0.25 0'
dimensions = '0.5 0.5 0'
[]
[]
[ICs]
[u_ic]
type = FunctionIC
function = image_func
variable = u
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.1
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/multiapp_conservative_transfer/primary_negative_adjuster.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
[]
[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
[]
[]
[AuxVariables]
[var]
family = MONOMIAL
order = THIRD
[]
[]
[ICs]
[var_ic]
type = FunctionIC
variable = var
function = '-exp(x * y)'
[]
[]
[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 = secondary_negative_adjuster.i
execute_on = timestep_end
[]
[]
[Postprocessors]
[from_postprocessor]
type = ElementIntegralVariablePostprocessor
variable = var
[]
[]
[Transfers]
[to_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = var
variable = var
to_multi_app = sub
from_postprocessors_to_be_preserved = 'from_postprocessor'
to_postprocessors_to_be_preserved = 'to_postprocessor'
[]
[]
[Outputs]
exodus = true
[]
(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/materials/functor_properties/gradients/functor-gradients.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 4
xmax = 2
[]
[Variables]
[u]
type = MooseVariableFVReal
[]
[]
[AuxVariables]
[sink]
type = MooseVariableFVReal
[]
[diffusive_flux_x]
type = MooseVariableFVReal
[]
[diffusive_flux_y]
type = MooseVariableFVReal
[]
[diffusive_flux_magnitude]
type = MooseVariableFVReal
[]
[]
[ICs]
[sink]
type = FunctionIC
variable = sink
function = 'x^3'
[]
[]
[FVKernels]
[diff]
type = FVDiffusion
variable = u
coeff = 1.1
[]
[sink]
type = FVFunctorElementalKernel
variable = u
functor_name = 'sink_mat'
[]
[]
[FVBCs]
[bounds]
type = FVDirichletBC
variable = u
boundary = 'left right top bottom'
value = 0
[]
[]
[Materials]
[functor_properties]
type = ADGenericFunctorMaterial
prop_names = 'sink_mat diffusive_coef'
prop_values = 'sink 4.5'
[]
[gradient_of_u]
type = ADGenericFunctorGradientMaterial
prop_names = 'grad_u'
prop_values = 'u'
[]
[]
# Compute the diffusive flux magnitude
[AuxKernels]
[diffusive_flux_x]
type = ADFunctorVectorElementalAux
variable = 'diffusive_flux_x'
functor = 'grad_u'
factor = 'diffusive_coef'
component = 0
[]
[diffusive_flux_y]
type = ADFunctorVectorElementalAux
variable = 'diffusive_flux_y'
functor = 'grad_u'
factor = 'diffusive_coef'
component = 1
[]
[diffusive_flux_magnitude]
type = VectorMagnitudeAux
variable = 'diffusive_flux_magnitude'
x = 'diffusive_flux_x'
y = 'diffusive_flux_y'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/MultiPhase/switchingfunction3phasematerial.i)
# This is a test of the SwitchingFunction3PhaseMaterial, a switching function
# used in a 3-phase phase-field model to prevent formation of the third phase
# at the interface between the two other phases
# See Folch and Plapp, Phys. Rev. E, v 72, 011602 (2005) for details
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 0.1
nx = 20
ny = 2
elem_type = QUAD4
[]
[GlobalParams]
derivative_order = 0
outputs = exodus
[]
[AuxVariables]
[./eta1]
[./InitialCondition]
type = FunctionIC
function = x
[../]
[../]
[./eta2]
[./InitialCondition]
type = FunctionIC
function = 1.0-x
[../]
[../]
[./eta3]
[./InitialCondition]
type = ConstantIC
value = 0.0
[../]
[../]
[]
[Materials]
[./h_material_1]
type = SwitchingFunction3PhaseMaterial
property_name = h_i1
eta_i = eta1
eta_j = eta2
eta_k = eta3
outputs = exodus
[../]
# Next we reverse eta2 and eta3 to make sure the switching function is symmetric
# with respect to interchanging these two, as it is designed to be
[./h_material_2]
type = SwitchingFunction3PhaseMaterial
property_name = h_i2
eta_i = eta1
eta_j = eta3
eta_k = eta2
outputs = exodus
[../]
[]
[Problem]
solve = false
kernel_coverage_check = false
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
execute_on = 'TIMESTEP_END'
exodus = true
[]
(test/tests/functions/solution_function/solution_function_rot4.i)
# checking rotation of points by 45 deg about z axis in a SolutionUserObject for a 2D situation
[Mesh]
# this is chosen so when i rotate through 45deg i get a length of "1" along the x or y direction
type = GeneratedMesh
dim = 2
xmin = -0.70710678
xmax = 0.70710678
nx = 3
ymin = -0.70710678
ymax = 0.70710678
ny = 3
[]
[UserObjects]
[./solution_uo]
type = SolutionUserObject
mesh = square_with_u_equals_x.e
timestep = 1
system_variables = u
rotation0_vector = '0 0 1'
rotation0_angle = 45
transformation_order = rotation0
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./u_init]
type = FunctionIC
variable = u
function = solution_fcn
[../]
[]
[Functions]
[./solution_fcn]
type = SolutionFunction
from_variable = u
solution = solution_uo
[../]
[]
[Kernels]
[./diff]
type = TimeDerivative
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
l_max_its = 800
nl_rel_tol = 1e-10
num_steps = 1
end_time = 1
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = solution_function_rot4
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/level_set/test/tests/reinitialization/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 8
ny = 8
uniform_refine = 3 #1/64
[]
[AuxVariables]
[./velocity]
family = LAGRANGE_VEC
[../]
[]
[Variables]
[./phi]
[../]
[]
[Functions]
[./phi_exact]
type = LevelSetOlssonBubble
epsilon = 0.05
center = '0.5 0.5 0'
radius = 0.15
[../]
[./velocity_func]
type = ParsedVectorFunction
expression_x = '1'
expression_y = '1'
[../]
[]
[BCs]
[./Periodic]
[./all]
variable = phi
auto_direction = 'x y'
[../]
[../]
[]
[ICs]
[./phi_ic]
type = FunctionIC
function = phi_exact
variable = phi
[../]
[./vel_ic]
type = VectorFunctionIC
variable = velocity
function = velocity_func
[]
[]
[Kernels]
[./time]
type = TimeDerivative
variable = phi
[../]
[./advection]
type = LevelSetAdvection
velocity = velocity
variable = phi
[../]
[]
[Postprocessors]
[./area]
type = LevelSetVolume
threshold = 0.5
variable = phi
location = outside
execute_on = 'initial timestep_end'
[../]
[./cfl]
type = LevelSetCFLCondition
velocity = velocity
execute_on = 'initial'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
start_time = 0
end_time = 1
nl_rel_tol = 1e-12
scheme = crank-nicolson
petsc_options_iname = '-pc_type -pc_sub_type'
petsc_options_value = 'asm ilu'
[./TimeStepper]
type = PostprocessorDT
postprocessor = cfl
scale = 1
[../]
[]
[MultiApps]
[./reinit]
type = LevelSetReinitializationMultiApp
input_files = 'reinit.i'
execute_on = 'timestep_end'
[../]
[]
[Transfers]
[./to_sub]
type = MultiAppCopyTransfer
variable = phi
source_variable = phi
to_multi_app = reinit
execute_on = 'timestep_end'
[../]
[./to_sub_init]
type = MultiAppCopyTransfer
variable = phi_0
source_variable = phi
to_multi_app = reinit
execute_on = 'timestep_end'
[../]
[./from_sub]
type = MultiAppCopyTransfer
variable = phi
source_variable = phi
from_multi_app = reinit
execute_on = timestep_end
[../]
[]
[Outputs]
exodus = 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
[]
(test/tests/functions/image_function/threshold_adapt_parallel.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
parallel_type = distributed
[]
[Variables]
[u]
[]
[]
[Functions]
[image_func]
type = ImageFunction
file_base = stack/test
file_suffix = png
file_range = '0' # file_range is a vector input, a single entry means "read only 1 file"
threshold = 2.7e4
upper_value = 1
lower_value = -1
[]
[]
[ICs]
[u_ic]
type = FunctionIC
function = image_func
variable = u
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.1
[]
[Adaptivity]
max_h_level = 5
initial_steps = 5
initial_marker = marker
[Indicators]
[indicator]
type = GradientJumpIndicator
variable = u
[]
[]
[Markers]
[marker]
type = ErrorFractionMarker
indicator = indicator
refine = 0.9
[]
[]
[]
(modules/ray_tracing/test/tests/outputs/ray_tracing_mesh_output/ray_mesh_output_data.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmax = 5
ymax = 5
[]
[]
[Variables/u]
[InitialCondition]
type = FunctionIC
variable = u
function = '(x < 2) * (x + 2 * y) + (x >= 2) * (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'
always_cache_traces = true
data_on_cache_traces = true
aux_data_on_cache_traces = true
ray_aux_data_names = 'test_aux'
initial_ray_aux_data = '1; 2; 3; 4'
[]
[]
[RayKernels]
[variable_integral]
type = VariableIntegralRayKernel
study = study
variable = u
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
[rays]
type = RayTracingExodus
study = study
output_data = true
output_aux_data = true
execute_on = final
[]
[rays_nodal]
type = RayTracingExodus
study = study
output_data = true
output_data_nodal = true
execute_on = final
[]
[]
(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
[]
(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/porous_flow/test/tests/hysteresis/hys_pc_2.i)
# Capillary-pressure calculation. Second-order drying curve
# When comparing the results with a by-hand computation, remember the MOOSE results are averaged over an element
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 0.1
xmax = 0.9
nx = 80
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
number_fluid_phases = 1
number_fluid_components = 1
porous_flow_vars = ''
[]
[]
[Variables]
[sat]
[]
[]
[ICs]
[sat]
type = FunctionIC
variable = sat
function = 'x'
[]
[]
[BCs]
[sat]
type = FunctionDirichletBC
variable = sat
function = 'x'
boundary = 'left right'
[]
[]
[Kernels]
[dummy]
type = Diffusion
variable = sat
[]
[]
[Materials]
[hys_order]
type = PorousFlowHysteresisOrder
initial_order = 2
previous_turning_points = '0.1 0.9'
[]
[pc_calculator]
type = PorousFlowHystereticInfo
alpha_d = 10.0
alpha_w = 7.0
n_d = 1.5
n_w = 1.9
S_l_min = 0.1
S_lr = 0.2
S_gr_max = 0.3
Pc_max = 12.0
high_ratio = 0.9
low_extension_type = none
high_extension_type = none
sat_var = sat
[]
[]
[AuxVariables]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[pc]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[pc]
type = PorousFlowPropertyAux
variable = pc
property = hysteretic_info
[]
[]
[VectorPostprocessors]
[pc]
type = LineValueSampler
warn_discontinuous_face_values = false
start_point = '0.1 0 0'
end_point = '0.9 0 0'
num_points = 8
sort_by = x
variable = 'sat pc'
[]
[]
[Executioner]
type = Transient
solve_type = Linear
dt = 1
end_time = 1
[]
[Outputs]
csv = 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
[]
(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
[]
(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
[]
(modules/chemical_reactions/test/tests/parser/equilibrium_action.i)
# Test AqueousEquilibriumReactions parser
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./a]
[../]
[./b]
[../]
[]
[AuxVariables]
[./pressure]
[../]
[]
[ICs]
[./a]
type = BoundingBoxIC
variable = a
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[./b]
type = BoundingBoxIC
variable = b
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[./pressure]
type = FunctionIC
variable = pressure
function = 2-x
[../]
[]
[ReactionNetwork]
[./AqueousEquilibriumReactions]
primary_species = 'a b'
reactions = '2a = pa2 2,
(1.0)a + (1.0)b = pab -2'
secondary_species = 'pa2 pab'
pressure = pressure
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[./a_conv]
type = PrimaryConvection
variable = a
p = pressure
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[./b_diff]
type = PrimaryDiffusion
variable = b
[../]
[./b_conv]
type = PrimaryConvection
variable = b
p = pressure
[../]
[]
[BCs]
[./a_left]
type = DirichletBC
variable = a
boundary = left
value = 1.0e-2
[../]
[./a_right]
type = ChemicalOutFlowBC
variable = a
boundary = right
[../]
[./b_left]
type = DirichletBC
variable = b
boundary = left
value = 1.0e-2
[../]
[./b_right]
type = ChemicalOutFlowBC
variable = b
boundary = right
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
nl_abs_tol = 1e-12
end_time = 10
dt = 10
[]
[Outputs]
file_base = equilibrium_out
exodus = true
perf_graph = true
print_linear_residuals = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(modules/porous_flow/test/tests/heat_advection/heat_advection_1d_fully_saturated.i)
# 1phase, heat advecting with a moving fluid
# Using the FullySaturated Kernel
[Mesh]
type = GeneratedMesh
dim = 1
nx = 50
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[temp]
initial_condition = 200
[]
[pp]
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = '1-x'
[]
[]
[BCs]
[pp0]
type = DirichletBC
variable = pp
boundary = left
value = 1
[]
[pp1]
type = DirichletBC
variable = pp
boundary = right
value = 0
[]
[spit_heat]
type = DirichletBC
variable = temp
boundary = left
value = 300
[]
[suck_heat]
type = DirichletBC
variable = temp
boundary = right
value = 200
[]
[]
[Kernels]
[mass_dot]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[advection]
type = PorousFlowFullySaturatedDarcyBase
variable = pp
[]
[energy_dot]
type = PorousFlowEnergyTimeDerivative
variable = temp
[]
[convection]
type = PorousFlowFullySaturatedHeatAdvection
variable = temp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 100
density0 = 1000
viscosity = 4.4
thermal_expansion = 0
cv = 2
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.2
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 1.0
density = 125
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1.1 0 0 0 2 0 0 0 3'
[]
[massfrac]
type = PorousFlowMassFraction
[]
[PS]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'gmres bjacobi 1E-15 1E-10 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.01
end_time = 0.6
[]
[VectorPostprocessors]
[T]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 51
sort_by = x
variable = temp
[]
[]
[Outputs]
file_base = heat_advection_1d_fully_saturated
[csv]
type = CSV
sync_times = '0.1 0.6'
sync_only = true
[]
[]
(test/tests/userobjects/shape_element_user_object/shape_element_user_object.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = (x-0.5)^2
[../]
[../]
[./v]
order = THIRD
family = HERMITE
[./InitialCondition]
type = FunctionIC
function = (y-0.5)^2
[../]
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[./time_u]
type = TimeDerivative
variable = u
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[]
[UserObjects]
[./test]
type = TestShapeElementUserObject
u = u
# first order lagrange variables have 4 DOFs per element
u_dofs = 4
v = v
# third order hermite variables have 16 DOFs per element
v_dofs = 16
# as this userobject computes quantities for both the residual AND the jacobian
# it needs to have these execute_on flags set.
execute_on = 'linear nonlinear'
[../]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 2
[]
(test/tests/transfers/general_field/nearest_node/mesh_division/main.i)
# Base input for testing transfers. It has the following complexities:
# - transfers both from and to the subapps
# - both nodal and elemental variables
# Tests derived from this input may add complexities through command line arguments
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[MeshDivisions]
[middle]
type = CartesianGridDivision
bottom_left = '0.21 0.21 0'
top_right = '0.81 0.81 0'
nx = 2
ny = 2
nz = 1
[]
[]
[AuxVariables]
[from_sub]
initial_condition = -1
[]
[from_sub_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_sub]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[to_sub_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
hide = 'to_sub to_sub_elem div'
overwrite = true
[]
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
input_files = sub.i
output_in_position = true
# The positions are randomly offset to prevent equi-distant nearest-locations
positions = '0.1001 0.0000013 0
0.30054 0.600001985 0
0.70021 0.0000022 0
0.800212 0.5500022 0'
cli_args = 'base_value=1 base_value=2 base_value=3 base_value=4'
[]
[]
[Transfers]
[to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = to_sub
variable = from_main
[]
[to_sub_elem]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = to_sub_elem
variable = from_main_elem
[]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = to_main
variable = from_sub
[]
[from_sub_elem]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = to_main_elem
variable = from_sub_elem
[]
[]
# For debugging purposes
[AuxVariables]
[div]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[mesh_div]
type = MeshDivisionAux
variable = div
mesh_division = 'middle'
[]
[]
(modules/phase_field/test/tests/free_energy_material/RegularSolutionFreeEnergy_plog.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 50
xmax = 1
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = x
[../]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = c
[../]
[]
[BCs]
[./left]
type = FunctionDirichletBC
variable = c
boundary = left
function = x
[../]
[./right]
type = FunctionDirichletBC
variable = c
boundary = right
function = x
[../]
[]
[Materials]
[./free_energy]
type = RegularSolutionFreeEnergy
property_name = F
c = c
outputs = out
log_tol = 0.2
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
l_max_its = 1
nl_max_its = 1
nl_abs_tol = 1
[]
[Outputs]
execute_on = 'timestep_end'
[./out]
type = Exodus
execute_on = timestep_end
[../]
[]
(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
[]
(modules/richards/test/tests/uo_egs/seff1.i)
# Outputs a effective saturation relationship into an exodus file
# and into a CSV file.
# In the exodus file, the Seff will be a function of "x", and
# this "x" is actually porepressure
# In the CSV file you will find the Seff at the "x" point
# specified by you below.
#
# You may specify:
# - the "type" of Seff in the UserObjects block
# - the parameters of this Seff function in the UserObjects block
# - the "x" point (which is porepressure) that you want to extract
# the Seff at, if you want a value at a particular point
# - the range of "x" values (which is porepressure values) may be
# changed in the Mesh block, below
[UserObjects]
[./seff]
type = RichardsSeff1VG
al = 1E-6
m = 0.8
[../]
[]
[Postprocessors]
[./point_val]
type = PointValue
execute_on = timestep_begin
# note this point must lie inside the mesh below
point = '-1 0 0'
variable = seff
[../]
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
# the following specify the range of porepressure
xmin = -3E6
xmax = 1E5
[]
############################
# You should not need to change any of the stuff below
############################
[Variables]
[./u]
[../]
[]
[ICs]
[./u_init]
type = FunctionIC
variable = u
function = x
[../]
[]
[AuxVariables]
[./seff]
[../]
[]
[AuxKernels]
[./seff_AuxK]
type = RichardsSeffAux
variable = seff
seff_UO = seff
execute_on = timestep_begin
pressure_vars = u
[../]
[]
[Kernels]
[./dummy]
type = Diffusion
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
num_steps = 0
[]
[Outputs]
file_base = seff1
[./csv]
type = CSV
[../]
[./exodus]
type = Exodus
hide = u
[../]
[]
(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
[]
(test/tests/misc/check_error/function_file_test5.i)
# Test for usage of missing function
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic_function
[../]
[../]
[]
[Functions]
[./ic_function]
type = PiecewiseLinear
data_file = dummy
xy_data = '1 2'
scale_factor = 1.0
[../]
[]
[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'
[]
[Outputs]
file_base = out
[]
(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/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'
[../]
[]
(test/tests/functions/image_function/image_2d_elemental.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Variables]
[u]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[image_func]
type = ImageFunction
file_base = stack/test
file_suffix = png
# file range is parsed as a vector of unsigned. If it only has 1
# entry, only a single file is read.
file_range = '0'
[]
[]
[ICs]
[u_ic]
type = FunctionIC
function = image_func
variable = u
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = 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/multiapps/centroid_multiapp/centroid_multiapp.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 3
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./x]
family = MONOMIAL
order = CONSTANT
[../]
[./y]
family = MONOMIAL
order = CONSTANT
[../]
[]
[ICs]
[./x]
type = FunctionIC
function = x
variable = x
[../]
[./y]
type = FunctionIC
function = y
variable = y
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left'
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 'right'
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
solve_type = PJFNK
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = CentroidMultiApp
input_files = 'sub_app.i'
output_in_position = true
[]
[]
[Transfers]
[./incoming_x]
type = MultiAppVariableValueSamplePostprocessorTransfer
source_variable = x
to_multi_app = sub
postprocessor = incoming_x
[../]
[./incoming_y]
type = MultiAppVariableValueSamplePostprocessorTransfer
source_variable = y
to_multi_app = sub
postprocessor = incoming_y
[../]
[]
(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/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
[]
(test/tests/kernels/ad_coupled_value/ad_aux_coupled_value.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[v]
initial_condition = 2
[]
[exact]
[]
[]
[ICs]
[exact]
type = FunctionIC
function = 'x*(2-x)'
variable = exact
[]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ad_coupled_value]
type = ADCoupledValueTest
variable = u
v = v
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'Newton'
[]
[Outputs]
exodus = true
[]
(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/misc/check_error/function_file_test10.i)
# Test for usage of missing function
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic_function
[../]
[../]
[]
[Functions]
[./ic_function]
type = PiecewiseLinear
xy_data = '1 2'
scale_factor = 1.0
axis = 3
[../]
[]
[Kernels]
active = 'diff'
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out
[]
(modules/porous_flow/test/tests/hysteresis/hys_pc_02.i)
# Capillary-pressure calculation. Primary drying curve with low_extension_type = quadratic
# When comparing the results with a by-hand computation, remember the MOOSE results are averaged over an element
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = 1
nx = 100
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
number_fluid_phases = 1
number_fluid_components = 1
porous_flow_vars = ''
[]
[]
[Variables]
[sat]
[]
[]
[ICs]
[sat]
type = FunctionIC
variable = sat
function = 'x'
[]
[]
[BCs]
[sat]
type = FunctionDirichletBC
variable = sat
function = 'x'
boundary = 'left right'
[]
[]
[Kernels]
[dummy]
type = Diffusion
variable = sat
[]
[]
[Materials]
[hys_order]
type = PorousFlowHysteresisOrder
[]
[pc_calculator]
type = PorousFlowHystereticInfo
alpha_d = 10.0
alpha_w = 10.0
n_d = 1.5
n_w = 1.9
S_l_min = 0.1
S_lr = 0.2
S_gr_max = 0.3
Pc_max = 12.0
low_extension_type = quadratic
sat_var = sat
[]
[]
[AuxVariables]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[pc]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[pc]
type = PorousFlowPropertyAux
variable = pc
property = hysteretic_info
[]
[]
[VectorPostprocessors]
[pc]
type = LineValueSampler
warn_discontinuous_face_values = false
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 10
sort_by = x
variable = 'sat pc'
[]
[]
[Executioner]
type = Transient
solve_type = Linear
dt = 1
end_time = 1
[]
[Outputs]
csv = true
[]
(modules/combined/test/tests/multiphase_mechanics/nonsplit_gradderiv.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 5
xmax = 10
ymax = 10
[]
[GlobalParams]
displacements = 'disp_x disp_y'
displacement_gradients = 'gxx gxy gyx gyy'
[]
[AuxVariables]
[./disp_x]
[./InitialCondition]
type = FunctionIC
function = '0.1*sin(2*x/10*3.14159265359)'
[../]
[../]
[./disp_y]
[./InitialCondition]
type = FunctionIC
function = '0.1*sin(1*y/10*3.14159265359)'
[../]
[../]
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
initial_condition = 0
[../]
[./gxx]
[../]
[./gxy]
[../]
[./gyx]
[../]
[./gyy]
[../]
[]
[Kernels]
[./dt]
type = TimeDerivative
variable = c
[../]
[./bulk]
type = CahnHilliard
variable = c
mob_name = M
f_name = F
[../]
[./int]
type = CHInterface
variable = c
mob_name = M
kappa_name = kappa_c
[../]
[./gxx]
type = GradientComponent
variable = gxx
v = disp_x
component = 0
[../]
[./gxy]
type = GradientComponent
variable = gxy
v = disp_x
component = 1
[../]
[./gyx]
type = GradientComponent
variable = gyx
v = disp_y
component = 0
[../]
[./gyy]
type = GradientComponent
variable = gyy
v = disp_y
component = 1
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1 0.1'
[../]
[./straingradderiv]
type = StrainGradDispDerivatives
[../]
[./elasticity_tensor]
type = ComputeConcentrationDependentElasticityTensor
c = c
C0_ijkl = '1.0 1.0'
C1_ijkl = '3.0 3.0'
fill_method0 = symmetric_isotropic
fill_method1 = symmetric_isotropic
[../]
[./smallstrain]
type = ComputeSmallStrain
[../]
[./linearelastic_a]
type = ComputeLinearElasticStress
[../]
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = F
args = 'c'
derivative_order = 3
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = NEWTON
l_max_its = 30
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-7
nl_abs_tol = 1.0e-10
num_steps = 2
dt = 1
[]
[Outputs]
perf_graph = true
exodus = true
[]
(modules/porous_flow/test/tests/chemistry/2species_equilibrium.i)
# PorousFlow analogy of chemical_reactions/test/tests/aqueous_equilibrium/2species.i
#
# Simple equilibrium reaction example to illustrate the use of PorousFlowMassFractionAqueousEquilibriumChemistry
#
# In this example, two primary species a and b are transported by diffusion and convection
# from the left of the porous medium, reacting to form two equilibrium species pa2 and pab
# according to the equilibrium reaction:
#
# reactions = '2a = pa2 rate = 10^2
# a + b = pab rate = 10^-2'
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
[]
[Variables]
[a]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[]
[]
[b]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[]
[]
[]
[AuxVariables]
[eqm_k0]
initial_condition = 1E2
[]
[eqm_k1]
initial_condition = 1E-2
[]
[pressure]
[]
[pa2]
family = MONOMIAL
order = CONSTANT
[]
[pab]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[pa2]
type = PorousFlowPropertyAux
property = secondary_concentration
secondary_species = 0
variable = pa2
[]
[pab]
type = PorousFlowPropertyAux
property = secondary_concentration
secondary_species = 1
variable = pab
[]
[]
[ICs]
[pressure]
type = FunctionIC
variable = pressure
function = 2-x
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Kernels]
[mass_a]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = a
[]
[flux_a]
type = PorousFlowFullySaturatedDarcyFlow
variable = a
fluid_component = 0
[]
[diff_a]
type = PorousFlowDispersiveFlux
variable = a
fluid_component = 0
disp_trans = 0
disp_long = 0
[]
[mass_b]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = b
[]
[flux_b]
type = PorousFlowFullySaturatedDarcyFlow
variable = b
fluid_component = 1
[]
[diff_b]
type = PorousFlowDispersiveFlux
variable = b
fluid_component = 1
disp_trans = 0
disp_long = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b'
number_fluid_phases = 1
number_fluid_components = 3
number_aqueous_equilibrium = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9 # huge, so mimic chemical_reactions
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[]
[massfrac]
type = PorousFlowMassFractionAqueousEquilibriumChemistry
mass_fraction_vars = 'a b'
num_reactions = 2
equilibrium_constants = 'eqm_k0 eqm_k1'
primary_activity_coefficients = '1 1'
secondary_activity_coefficients = '1 1'
reactions = '2 0
1 1'
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.2
[]
[permeability]
type = PorousFlowPermeabilityConst
# porous_flow permeability / porous_flow viscosity = chemical_reactions conductivity = 1E-4
permeability = '1E-7 0 0 0 1E-7 0 0 0 1E-7'
[]
[relp]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[diff]
type = PorousFlowDiffusivityConst
# porous_flow diffusion_coeff * tortuousity * porosity = chemical_reactions diffusivity = 1E-4
diffusion_coeff = '5E-4 5E-4 5E-4'
tortuosity = 1.0
[]
[]
[BCs]
[a_left]
type = DirichletBC
variable = a
boundary = left
value = 1.0e-2
[]
[b_left]
type = DirichletBC
variable = b
boundary = left
value = 1.0e-2
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 10
end_time = 100
[]
[Outputs]
print_linear_residuals = true
exodus = true
perf_graph = true
hide = eqm_k0
[]
(modules/combined/examples/periodic_strain/global_strain_pfm.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 50
ny = 50
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
[]
[./cnode]
input = gen
type = ExtraNodesetGenerator
coord = '0.0 0.0'
new_boundary = 100
[../]
[]
[Variables]
[./u_x]
[../]
[./u_y]
[../]
[./global_strain]
order = THIRD
family = SCALAR
[../]
[./c]
[./InitialCondition]
type = FunctionIC
function = 'sin(2*x*pi)*sin(2*y*pi)*0.05+0.6'
[../]
[../]
[./w]
[../]
[]
[AuxVariables]
[./local_energy]
order = CONSTANT
family = MONOMIAL
[../]
[./disp_x]
[../]
[./disp_y]
[../]
[./s00]
order = CONSTANT
family = MONOMIAL
[../]
[./s01]
order = CONSTANT
family = MONOMIAL
[../]
[./s10]
order = CONSTANT
family = MONOMIAL
[../]
[./s11]
order = CONSTANT
family = MONOMIAL
[../]
[./e00]
order = CONSTANT
family = MONOMIAL
[../]
[./e01]
order = CONSTANT
family = MONOMIAL
[../]
[./e10]
order = CONSTANT
family = MONOMIAL
[../]
[./e11]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./disp_x]
type = GlobalDisplacementAux
variable = disp_x
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 0
[../]
[./disp_y]
type = GlobalDisplacementAux
variable = disp_y
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 1
[../]
[./local_free_energy]
type = TotalFreeEnergy
execute_on = 'initial LINEAR'
variable = local_energy
interfacial_vars = 'c'
kappa_names = 'kappa_c'
[../]
[./s00]
type = RankTwoAux
variable = s00
rank_two_tensor = stress
index_i = 0
index_j = 0
[../]
[./s01]
type = RankTwoAux
variable = s01
rank_two_tensor = stress
index_i = 0
index_j = 1
[../]
[./s10]
type = RankTwoAux
variable = s10
rank_two_tensor = stress
index_i = 1
index_j = 0
[../]
[./s11]
type = RankTwoAux
variable = s11
rank_two_tensor = stress
index_i = 1
index_j = 1
[../]
[./e00]
type = RankTwoAux
variable = e00
rank_two_tensor = total_strain
index_i = 0
index_j = 0
[../]
[./e01]
type = RankTwoAux
variable = e01
rank_two_tensor = total_strain
index_i = 0
index_j = 1
[../]
[./e10]
type = RankTwoAux
variable = e10
rank_two_tensor = total_strain
index_i = 1
index_j = 0
[../]
[./e11]
type = RankTwoAux
variable = e11
rank_two_tensor = total_strain
index_i = 1
index_j = 1
[../]
[]
[GlobalParams]
derivative_order = 2
enable_jit = true
displacements = 'u_x u_y'
block = 0
[]
[Kernels]
[./TensorMechanics]
[../]
# Cahn-Hilliard kernels
[./c_dot]
type = CoupledTimeDerivative
variable = w
v = c
block = 0
[../]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
block = 0
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
block = 0
[../]
[]
[ScalarKernels]
[./global_strain]
type = GlobalStrain
variable = global_strain
global_strain_uo = global_strain_uo
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
variable = 'c w u_x u_y'
[../]
[../]
# fix center point location
[./centerfix_x]
type = DirichletBC
boundary = 100
variable = u_x
value = 0
[../]
[./centerfix_y]
type = DirichletBC
boundary = 100
variable = u_y
value = 0
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '0.2 0.01 '
[../]
[./shear1]
type = GenericConstantRankTwoTensor
tensor_values = '0 0 0 0 0 0.5'
tensor_name = shear1
[../]
[./shear2]
type = GenericConstantRankTwoTensor
tensor_values = '0 0 0 0 0 -0.5'
tensor_name = shear2
[../]
[./expand3]
type = GenericConstantRankTwoTensor
tensor_values = '1 1 0 0 0 0'
tensor_name = expand3
[../]
[./weight1]
type = DerivativeParsedMaterial
expression = '0.3*c^2'
property_name = weight1
coupled_variables = c
[../]
[./weight2]
type = DerivativeParsedMaterial
expression = '0.3*(1-c)^2'
property_name = weight2
coupled_variables = c
[../]
[./weight3]
type = DerivativeParsedMaterial
expression = '4*(0.5-c)^2'
property_name = weight3
coupled_variables = c
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1'
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
global_strain = global_strain
eigenstrain_names = eigenstrain
[../]
[./eigenstrain]
type = CompositeEigenstrain
tensors = 'shear1 shear2 expand3'
weights = 'weight1 weight2 weight3'
args = c
eigenstrain_name = eigenstrain
[../]
[./global_strain]
type = ComputeGlobalStrain
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
# chemical free energies
[./chemical_free_energy]
type = DerivativeParsedMaterial
property_name = Fc
expression = '4*c^2*(1-c)^2'
coupled_variables = 'c'
outputs = exodus
output_properties = Fc
[../]
# elastic free energies
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = Fe
args = 'c'
outputs = exodus
output_properties = Fe
[../]
# free energy (chemical + elastic)
[./free_energy]
type = DerivativeSumMaterial
block = 0
property_name = F
sum_materials = 'Fc Fe'
coupled_variables = 'c'
[../]
[]
[UserObjects]
[./global_strain_uo]
type = GlobalStrainUserObject
execute_on = 'Initial Linear Nonlinear'
[../]
[]
[Postprocessors]
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
execute_on = 'initial TIMESTEP_END'
variable = local_energy
[../]
[./total_solute]
type = ElementIntegralVariablePostprocessor
execute_on = 'initial TIMESTEP_END'
variable = c
[../]
[./min]
type = ElementExtremeValue
execute_on = 'initial TIMESTEP_END'
value_type = min
variable = c
[../]
[./max]
type = ElementExtremeValue
execute_on = 'initial TIMESTEP_END'
value_type = max
variable = c
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
line_search = basic
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
nl_max_its = 12
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-10
start_time = 0.0
end_time = 2.0
[./TimeStepper]
type = IterationAdaptiveDT
dt = 0.01
growth_factor = 1.5
cutback_factor = 0.8
optimal_iterations = 9
iteration_window = 2
[../]
[]
[Outputs]
execute_on = 'timestep_end'
print_linear_residuals = false
exodus = true
[./table]
type = CSV
delimiter = ' '
[../]
[]
(test/tests/transfers/general_field/user_object/between_siblings/sub_between_diffusion1.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
[]
[block1]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '0.5 0.5 0'
[]
[]
[AuxVariables]
[sent_nodal]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[received_nodal]
initial_condition = -1
[]
[sent_elem]
family = MONOMIAL
order = CONSTANT
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[received_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1
[]
[]
[UserObjects]
[sent_nodal]
type = LayeredAverage
direction = x
num_layers = 10
variable = sent_nodal
[]
[sent_elem]
type = LayeredAverage
direction = x
num_layers = 10
variable = sent_elem
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
exodus = true
hide = 'sent_nodal sent_elem'
execute_on = 'TIMESTEP_END'
[]
(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/richards/test/tests/dirac/bh_fu_02.i)
# fully-saturated
# production
# fullyupwind
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = DensityConstBulk
relperm_UO = RelPermPower
sat_UO = Saturation
seff_UO = Seff1VG
SUPG_UO = SUPGstandard
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./Seff1VG]
type = RichardsSeff1VG
m = 0.8
al = 1E-5
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0
sum_s_res = 0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E8
[../]
[./borehole_total_outflow_mass]
type = RichardsSumQuantity
[../]
[]
[Variables]
active = 'pressure'
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./p_ic]
type = FunctionIC
variable = pressure
function = initial_pressure
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
variable = pressure
[../]
[]
[DiracKernels]
[./bh]
type = RichardsBorehole
bottom_pressure = 0
point_file = bh02.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pressure
unit_weight = '0 0 0'
character = 1
fully_upwind = true
[../]
[]
[Postprocessors]
[./bh_report]
type = RichardsPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = RichardsMass
variable = pressure
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = RichardsMass
variable = pressure
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
indirect_dependencies = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[./p0]
type = PointValue
variable = pressure
point = '1 1 1'
execute_on = timestep_end
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 1E7
[../]
[./mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = 0
viscosity = 1E-3
mat_porosity = 0.1
mat_permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = Seff1VG
pressure_vars = pressure
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 1E-2
solve_type = NEWTON
[]
[Outputs]
file_base = bh_fu_02
exodus = false
csv = true
execute_on = timestep_end
[]
(modules/porous_flow/test/tests/aux_kernels/darcy_velocity.i)
# checking that the PorousFlowDarcyVelocityComponent AuxKernel works as expected
# for the fully-saturated case (relative-permeability = 1)
# There is one element, of unit size. The pressures and fluid densities at the qps are:
# (x,y,z)=( 0.211325 , 0.211325 , 0.211325 ). p = 1.479 rho = 3.217
# (x,y,z)=( 0.788675 , 0.211325 , 0.211325 ). p = 2.057 rho = 4.728
# (x,y,z)=( 0.211325 , 0.788675 , 0.211325 ). p = 2.634 rho = 6.947
# (x,y,z)=( 0.788675 , 0.788675 , 0.211325 ). p = 3.211 rho = 10.208
# (x,y,z)=( 0.211325 , 0.211325 , 0.788675 ). p = 3.789 rho = 15.001
# (x,y,z)=( 0.788675 , 0.211325 , 0.788675 ). p = 4.367 rho = 22.043
# (x,y,z)=( 0.211325 , 0.788675 , 0.788675 ). p = 4.943 rho = 32.392
# (x,y,z)=( 0.788675 , 0.788675 , 0.788675 ). p = 5.521 rho = 47.599
# Average density = 17.7668
# grad(P) = (1, 2, 4)
# with permeability = diag(1, 2, 3) and gravity = (1, -2, 3) and viscosity = 3.2
# So Darcy velocity = (5.23963, -23.4585, 46.2192)
[Mesh]
type = GeneratedMesh
dim = 3
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '1 -2 3'
[]
[Variables]
[pp]
[]
[]
[ICs]
[pinit]
type = FunctionIC
function = x+2*y+4*z
variable = pp
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[]
[AuxVariables]
[vel_x]
order = CONSTANT
family = MONOMIAL
[]
[vel_y]
order = CONSTANT
family = MONOMIAL
[]
[vel_z]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[vel_x]
type = PorousFlowDarcyVelocityComponent
variable = vel_x
component = x
fluid_phase = 0
[]
[vel_y]
type = PorousFlowDarcyVelocityComponent
variable = vel_y
component = y
fluid_phase = 0
[]
[vel_z]
type = PorousFlowDarcyVelocityComponent
variable = vel_z
component = z
fluid_phase = 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.5
viscosity = 3.2
density0 = 1.2
thermal_expansion = 0
[]
[]
[Postprocessors]
[vel_x]
type = PointValue
variable = vel_x
point = '0.5 0.5 0.5'
[]
[vel_y]
type = PointValue
variable = vel_y
point = '0.5 0.5 0.5'
[]
[vel_z]
type = PointValue
variable = vel_z
point = '0.5 0.5 0.5'
[]
[]
[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 = 2
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[]
[Executioner]
type = Transient
solve_type = Newton
nl_abs_tol = 1e-16
dt = 1
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = darcy_velocity
csv = true
[]
(modules/porous_flow/test/tests/jacobian/fflux10.i)
# 1phase, 3components, constant viscosity, constant insitu permeability
# density with constant bulk, BW relative perm, nonzero gravity, unsaturated with BW
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
xmin = 0
xmax = 1
ny = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[massfrac0]
[]
[massfrac1]
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = -0.7+x+y
[]
[massfrac0]
type = RandomIC
variable = massfrac0
min = 0
max = 0.3
[]
[massfrac1]
type = RandomIC
variable = massfrac1
min = 0
max = 0.4
[]
[]
[Kernels]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
gravity = '-1 -0.1 0'
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = massfrac0
gravity = '-1 -0.1 0'
[]
[flux2]
type = PorousFlowAdvectiveFlux
fluid_component = 2
variable = massfrac1
gravity = '-1 -0.1 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0 massfrac1'
number_fluid_phases = 1
number_fluid_components = 3
[]
[pc]
type = PorousFlowCapillaryPressureBW
Sn = 0.05
Ss = 0.9
las = 2.2
C = 1.5
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
viscosity = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac0 massfrac1'
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm]
type = PorousFlowRelativePermeabilityBW
Sn = 0.05
Ss = 0.9
Kn = 0.02
Ks = 0.95
C = 1.5
phase = 0
[]
[]
[Preconditioning]
active = check
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000'
[]
[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-15 1E-10 10000 test'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
exodus = false
[]
(modules/porous_flow/test/tests/jacobian/linear_por.i)
# Testing Jacobian resulting from PorousFlowPorosityLinear in a THM situation
[GlobalParams]
PorousFlowDictator = dictator
strain_at_nearest_qp = true
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
[]
[]
[Variables]
[pp]
initial_condition = 1
[]
[T]
initial_condition = 2
[]
[disp]
[]
[]
[ICs]
[disp]
type = FunctionIC
variable = disp
function = '3 * x'
[]
[]
[BCs]
[disp]
type = FunctionDirichletBC
boundary = 'left right top bottom front back'
variable = disp
function = '3 * x'
[]
[]
[PorousFlowFullySaturated]
coupling_type = ThermoHydroMechanical
fp = simple_fluid
porepressure = pp
temperature = T
displacements = 'disp disp disp'
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityLinear
porosity_ref = 0.5
P_ref = 0.5
P_coeff = 1.0
T_ref = -3.0
T_coeff = 1.0
epv_ref = 2.5
epv_coeff = 1.0
[]
[perm]
type = PorousFlowPermeabilityConst
permeability = '0 0 0 0 0 0 0 0 0'
[]
[matrix_energy]
type = PorousFlowMatrixInternalEnergy
density = 0.0
specific_heat_capacity = 0.0
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0 0 0 0 0 0 0 0 0'
[]
[density]
type = GenericConstantMaterial
prop_names = density
prop_values = 0.0
[]
[elasticity]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1E-99
poissons_ratio = 0
[]
[strain]
type = ComputeSmallStrain
displacements = 'disp disp disp'
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
num_steps = 1
# petsc_options = '-snes_test_jacobian -snes_force_iteration'
# petsc_options_iname = '-snes_type --ksp_type -pc_type -snes_convergence_test'
# petsc_options_value = ' ksponly preonly none skip'
[]
(test/tests/transfers/general_field/nearest_node/subdomain/main.i)
# Base input for testing transfers. It has the following complexities:
# - more than one subapp
# - transfers both from and to the subapps
# - both nodal and elemental variables
# - subapp meshes are not aligned with the main app
# Tests derived from this input may add complexities through command line arguments
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
[]
[add_block]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x < 0.6 & y < 0.5'
block_id = 1
[]
[]
[AuxVariables]
[from_sub]
initial_condition = -1
[]
[from_sub_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_sub]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[to_sub_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
hide = 'to_sub to_sub_elem'
[]
execute_on = 'TIMESTEP_END'
[]
[MultiApps]
[sub]
# 1 on corner, one in the center and one close to a corner
# Offsets are added to make sure there are no equidistant nodes / transfer indetermination
positions = '0.00001 0 0 0.4022222 0.281111 0 0.7232323 0.12323 0'
type = TransientMultiApp
app_type = MooseTestApp
input_files = sub.i
execute_on = timestep_end
output_in_position = true
[]
[]
[Transfers]
[to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = to_sub
variable = from_main
from_blocks = 1
to_blocks = 1
[]
[to_sub_elem]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = to_sub_elem
variable = from_main_elem
from_blocks = 1
to_blocks = 1
[]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = to_main
variable = from_sub
from_blocks = 1
to_blocks = 1
[]
[from_sub_elem]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = to_main_elem
variable = from_sub_elem
from_blocks = 1
to_blocks = 1
[]
[]
(modules/chemical_reactions/test/tests/aqueous_equilibrium/2species_without_action.i)
# Simple equilibrium reaction example to illustrate the use of the AqueousEquilibriumReactions
# action.
# In this example, two primary species a and b are transported by diffusion and convection
# from the left of the porous medium, reacting to form two equilibrium species pa2 and pab
# according to the equilibrium reaction specified in the AqueousEquilibriumReactions block as:
#
# reactions = '2a = pa2 2
# a + b = pab -2'
#
# where the 2 is the weight of the equilibrium species, the 2 on the RHS of the first reaction
# refers to the equilibrium constant (log10(Keq) = 2), and the -2 on the RHS of the second
# reaction equates to log10(Keq) = -2.
#
# This example is identical to 2species.i, except that it explicitly includes all AuxKernels
# and Kernels that are set up by the action in 2species.i
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[../]
[./b]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[../]
[]
[AuxVariables]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[./pa2]
[../]
[./pab]
[../]
[]
[AuxKernels]
[./pa2eq]
type = AqueousEquilibriumRxnAux
variable = pa2
v = a
sto_v = 2
log_k = 2
[../]
[./pabeq]
type = AqueousEquilibriumRxnAux
variable = pab
v = 'a b'
sto_v = '1 1'
log_k = -2
[../]
[]
[ICs]
[./pressure]
type = FunctionIC
variable = pressure
function = 2-x
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[./a_conv]
type = PrimaryConvection
variable = a
p = pressure
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[./b_diff]
type = PrimaryDiffusion
variable = b
[../]
[./b_conv]
type = PrimaryConvection
variable = b
p = pressure
[../]
[./a1eq]
type = CoupledBEEquilibriumSub
variable = a
log_k = 2
weight = 2
sto_u = 2
[../]
[./a1diff]
type = CoupledDiffusionReactionSub
variable = a
log_k = 2
weight = 2
sto_u = 2
[../]
[./a1conv]
type = CoupledConvectionReactionSub
variable = a
log_k = 2
weight = 2
sto_u = 2
p = pressure
[../]
[./a2eq]
type = CoupledBEEquilibriumSub
variable = a
v = b
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
[../]
[./a2diff]
type = CoupledDiffusionReactionSub
variable = a
v = b
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
[../]
[./a2conv]
type = CoupledConvectionReactionSub
variable = a
v = b
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
p = pressure
[../]
[./b2eq]
type = CoupledBEEquilibriumSub
variable = b
v = a
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
[../]
[./b2diff]
type = CoupledDiffusionReactionSub
variable = b
v = a
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
[../]
[./b2conv]
type = CoupledConvectionReactionSub
variable = b
v = a
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
p = pressure
[../]
[]
[BCs]
[./a_left]
type = DirichletBC
variable = a
boundary = left
value = 1.0e-2
[../]
[./a_right]
type = ChemicalOutFlowBC
variable = a
boundary = right
[../]
[./b_left]
type = DirichletBC
variable = b
boundary = left
value = 1.0e-2
[../]
[./b_right]
type = ChemicalOutFlowBC
variable = b
boundary = right
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-12
start_time = 0.0
end_time = 100
dt = 10.0
[]
[Outputs]
file_base = 2species_out
exodus = true
perf_graph = true
print_linear_residuals = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(modules/richards/test/tests/dirac/bh_fu_04.i)
# unsaturated
# production
# fullyupwind
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
density_UO = DensityConstBulk
relperm_UO = RelPermPower
sat_UO = Saturation
seff_UO = Seff1VG
SUPG_UO = SUPGstandard
[]
[Functions]
[./dts]
type = PiecewiseLinear
y = '1E-2 1E-1 1 1E1 1E2 1E3'
x = '0 1E-1 1 1E1 1E2 1E3'
[../]
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./Seff1VG]
type = RichardsSeff1VG
m = 0.8
al = 1E-5
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0
sum_s_res = 0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E8
[../]
[./borehole_total_outflow_mass]
type = RichardsSumQuantity
[../]
[]
[Variables]
active = 'pressure'
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./p_ic]
type = FunctionIC
variable = pressure
function = initial_pressure
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
variable = pressure
[../]
[]
[DiracKernels]
[./bh]
type = RichardsBorehole
bottom_pressure = -1E6
point_file = bh02.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pressure
unit_weight = '0 0 0'
character = 1
fully_upwind = true
[../]
[]
[Postprocessors]
[./bh_report]
type = RichardsPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = RichardsMass
variable = pressure
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = RichardsMass
variable = pressure
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
indirect_dependencies = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[./p0]
type = PointValue
variable = pressure
point = '1 1 1'
execute_on = timestep_end
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 0
[../]
[./mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = 0
viscosity = 1E-3
mat_porosity = 0.1
mat_permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = Seff1VG
pressure_vars = pressure
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 1E3
solve_type = NEWTON
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
file_base = bh_fu_04
exodus = false
execute_on = timestep_end
csv = true
[]
(modules/porous_flow/test/tests/sinks/s09_fully_saturated.i)
# Apply a piecewise-linear sink flux to the right-hand side and watch fluid flow to it
#
# This test has a single phase with two components. The test initialises with
# the porous material fully filled with component=1. The left-hand side is fixed
# at porepressure=1 and mass-fraction of the zeroth component being unity.
# The right-hand side has a very strong piecewise-linear flux that keeps the
# porepressure~0 at that side. Fluid mass is extracted by this flux in proportion
# to the fluid component mass fraction.
#
# Therefore, the zeroth fluid component will flow from left to right (down the
# pressure gradient).
#
# The important DE is
# porosity * dc/dt = (perm / visc) * grad(P) * grad(c)
# which is true for c = mass-fraction, and very large bulk modulus of the fluid.
# For grad(P) constant in time and space (as in this example) this is just the
# advection equation for c, with velocity = perm / visc / porosity. The parameters
# are chosen to velocity = 1 m/s.
# In the numerical world, and especially with full upwinding, the advection equation
# suffers from diffusion. In this example, the diffusion is obvious when plotting
# the mass-fraction along the line, but the average velocity of the front is still
# correct at 1 m/s.
# This test uses the FullySaturated version of the flow Kernel. This does not
# suffer from as much numerical diffusion as the standard PorousFlow Kernel since
# it does not employ any upwinding.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp frac'
number_fluid_phases = 1
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[Variables]
[pp]
[]
[frac]
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = 1-x
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = frac
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = pp
[]
[flux0]
type = PorousFlowFullySaturatedDarcyFlow
fluid_component = 0
gravity = '0 0 0'
variable = frac
[]
[flux1]
type = PorousFlowFullySaturatedDarcyFlow
fluid_component = 1
gravity = '0 0 0'
variable = pp
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1e10 # need large in order for constant-velocity advection
density0 = 1 # almost irrelevant, except that the ability of the right BC to keep P fixed at zero is related to density_P0
thermal_expansion = 0
viscosity = 11
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = frac
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1.1 0 0 0 1.1 0 0 0 1.1'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2 # irrelevant in this fully-saturated situation
phase = 0
[]
[]
[BCs]
[lhs_fixed_a]
type = DirichletBC
boundary = 'left'
variable = frac
value = 1
[]
[lhs_fixed_b]
type = DirichletBC
boundary = 'left'
variable = pp
value = 1
[]
[flux0]
type = PorousFlowPiecewiseLinearSink
boundary = 'right'
pt_vals = '-100 100'
multipliers = '-1 1'
variable = frac # the zeroth comonent
mass_fraction_component = 0
use_mobility = false
use_relperm = false
fluid_phase = 0
flux_function = 1E4
[]
[flux1]
type = PorousFlowPiecewiseLinearSink
boundary = 'right'
pt_vals = '-100 100'
multipliers = '-1 1'
variable = pp # comonent 1
mass_fraction_component = 1
use_mobility = false
use_relperm = false
fluid_phase = 0
flux_function = 1E4
[]
[]
[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-2
end_time = 1
nl_rel_tol = 1E-11
nl_abs_tol = 1E-11
[]
[VectorPostprocessors]
[mf]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 100
sort_by = x
variable = frac
[]
[]
[Outputs]
file_base = s09_fully_saturated
[console]
type = Console
execute_on = 'nonlinear linear'
[]
[csv]
type = CSV
sync_times = '0.1 0.5 1'
sync_only = true
[]
time_step_interval = 10
[]
(modules/porous_flow/test/tests/aux_kernels/darcy_velocity_fv.i)
# checking that the PorousFlowDarcyVelocityComponent AuxKernel works as expected
# for the fully-saturated case (relative-permeability = 1) using finite volumes
[Mesh]
type = GeneratedMesh
dim = 3
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '1 -2 3'
[]
[Variables]
[pp]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[]
[ICs]
[pinit]
type = FunctionIC
function = x
variable = pp
[]
[]
[FVKernels]
[mass0]
type = FVPorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[]
[AuxVariables]
[vel_x]
order = CONSTANT
family = MONOMIAL
[]
[vel_y]
order = CONSTANT
family = MONOMIAL
[]
[vel_z]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[vel_x]
type = ADPorousFlowDarcyVelocityComponent
variable = vel_x
component = x
fluid_phase = 0
[]
[vel_y]
type = ADPorousFlowDarcyVelocityComponent
variable = vel_y
component = y
fluid_phase = 0
[]
[vel_z]
type = ADPorousFlowDarcyVelocityComponent
variable = vel_z
component = z
fluid_phase = 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 = 1e6
viscosity = 3.2
density0 = 1
thermal_expansion = 0
[]
[]
[Postprocessors]
[vel_x]
type = PointValue
variable = vel_x
point = '0.5 0.5 0.5'
[]
[vel_y]
type = PointValue
variable = vel_y
point = '0.5 0.5 0.5'
[]
[vel_z]
type = PointValue
variable = vel_z
point = '0.5 0.5 0.5'
[]
[]
[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 = ADPorousFlowRelativePermeabilityConst
phase = 0
kr = 1
[]
[porosity]
type = ADPorousFlowPorosityConst
porosity = 0.1
[]
[]
[Executioner]
type = Transient
solve_type = Newton
nl_abs_tol = 1e-16
dt = 1
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
[]
(test/tests/kernels/conservative_advection/no_upwinding_2D.i)
# 2D test of advection with no upwinding
# Note there are overshoots or undershoots
# but numerical diffusion is minimized.
# The center of the blob advects with the correct velocity
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
[]
[Variables]
[./u]
[../]
[]
[ICs]
[./u_blob]
type = FunctionIC
variable = u
function = 'if(x<0.2,if(y<0.2,1,0),0)'
[../]
[]
[Kernels]
[./udot]
type = TimeDerivative
variable = u
[../]
[./advection]
type = ConservativeAdvection
variable = u
velocity = '2 1 0'
[../]
[]
[Executioner]
type = Transient
solve_type = LINEAR
dt = 0.01
end_time = 0.1
l_tol = 1E-14
[]
[Outputs]
exodus = true
[]
(test/tests/fvbcs/fv_functor_neumannbc/fv_functor_neumann.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmax = 2
[]
[]
[Variables]
[u]
type = MooseVariableFVReal
initial_condition = 0.5
[]
[]
[FVKernels]
[diff_left]
type = FVDiffusion
variable = u
coeff = 4
[]
[]
[AuxVariables]
[qdot]
type = MooseVariableFVReal
[]
[]
[ICs]
[set_qdot]
type = FunctionIC
variable = qdot
function = 'y'
[]
[]
[FVBCs]
[left]
type = FVFunctorNeumannBC
variable = u
functor = qdot
boundary = left
[]
[right]
type = FVDirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/examples/lava_lamp/1phase_convection.i)
# Two phase density-driven convection of dissolved CO2 in brine
#
# The model starts with CO2 in the liquid phase only. The CO2 diffuses into the brine.
# As the density of the CO2-saturated brine is greater
# than the unsaturated brine, a gravitational instability arises and density-driven
# convection of CO2-rich fingers descend into the unsaturated brine.
#
# The instability is seeded by a random perturbation to the porosity field.
# Mesh adaptivity is used to refine the mesh as the fingers form.
#
# Note: this model is computationally expensive, so should be run with multiple cores.
[GlobalParams]
PorousFlowDictator = 'dictator'
gravity = '0 -9.81 0'
[]
[Adaptivity]
max_h_level = 2
marker = marker
initial_marker = initial
initial_steps = 2
[Indicators]
[indicator]
type = GradientJumpIndicator
variable = zi
[]
[]
[Markers]
[marker]
type = ErrorFractionMarker
indicator = indicator
refine = 0.8
[]
[initial]
type = BoxMarker
bottom_left = '0 1.95 0'
top_right = '2 2 0'
inside = REFINE
outside = DO_NOTHING
[]
[]
[]
[Mesh]
type = GeneratedMesh
dim = 2
ymin = 1.5
ymax = 2
xmax = 2
ny = 20
nx = 40
bias_y = 0.95
[]
[AuxVariables]
[xnacl]
initial_condition = 0.01
[]
[saturation_gas]
order = FIRST
family = MONOMIAL
[]
[xco2l]
order = FIRST
family = MONOMIAL
[]
[density_liquid]
order = FIRST
family = MONOMIAL
[]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[saturation_gas]
type = PorousFlowPropertyAux
variable = saturation_gas
property = saturation
phase = 1
execute_on = 'timestep_end'
[]
[xco2l]
type = PorousFlowPropertyAux
variable = xco2l
property = mass_fraction
phase = 0
fluid_component = 1
execute_on = 'timestep_end'
[]
[density_liquid]
type = PorousFlowPropertyAux
variable = density_liquid
property = density
phase = 0
execute_on = 'timestep_end'
[]
[]
[Variables]
[pgas]
[]
[zi]
scaling = 1e4
[]
[]
[ICs]
[pressure]
type = FunctionIC
function = 10e6-9.81*1000*y
variable = pgas
[]
[zi]
type = ConstantIC
value = 0
variable = zi
[]
[porosity]
type = RandomIC
variable = porosity
min = 0.25
max = 0.275
seed = 0
[]
[]
[BCs]
[top]
type = DirichletBC
value = 0.04
variable = zi
boundary = top
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pgas
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pgas
[]
[diff0]
type = PorousFlowDispersiveFlux
fluid_component = 0
variable = pgas
disp_long = '0 0'
disp_trans = '0 0'
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = zi
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = zi
[]
[diff1]
type = PorousFlowDispersiveFlux
fluid_component = 1
variable = zi
disp_long = '0 0'
disp_trans = '0 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pgas zi'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[fs]
type = PorousFlowBrineCO2
brine_fp = brine
co2_fp = co2
capillary_pressure = pc
[]
[]
[FluidProperties]
[co2sw]
type = CO2FluidProperties
[]
[co2]
type = TabulatedBicubicFluidProperties
fp = co2sw
[]
[brine]
type = BrineFluidProperties
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = '45'
[]
[brineco2]
type = PorousFlowFluidState
gas_porepressure = 'pgas'
z = 'zi'
temperature_unit = Celsius
xnacl = 'xnacl'
capillary_pressure = pc
fluid_state = fs
[]
[porosity]
type = PorousFlowPorosityConst
porosity = porosity
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-11 0 0 0 1e-11 0 0 0 1e-11'
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
phase = 0
n = 2
s_res = 0.1
sum_s_res = 0.2
[]
[relperm_gas]
type = PorousFlowRelativePermeabilityCorey
phase = 1
n = 2
s_res = 0.1
sum_s_res = 0.2
[]
[diffusivity]
type = PorousFlowDiffusivityConst
diffusion_coeff = '2e-9 2e-9 2e-9 2e-9'
tortuosity = '1 1'
[]
[]
[Preconditioning]
active = basic
[mumps_is_best_for_parallel_jobs]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[basic]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = 'gmres asm lu NONZERO 2 '
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 1e6
nl_max_its = 25
l_max_its = 100
dtmax = 1e4
nl_abs_tol = 1e-6
[TimeStepper]
type = IterationAdaptiveDT
dt = 100
growth_factor = 2
cutback_factor = 0.5
[]
[]
[Functions]
[flux]
type = ParsedFunction
symbol_values = 'delta_xco2 dt'
symbol_names = 'dx dt'
expression = 'dx/dt'
[]
[]
[Postprocessors]
[total_co2_in_gas]
type = PorousFlowFluidMass
phase = 1
fluid_component = 1
[]
[total_co2_in_liquid]
type = PorousFlowFluidMass
phase = 0
fluid_component = 1
[]
[numdofs]
type = NumDOFs
[]
[delta_xco2]
type = ChangeOverTimePostprocessor
postprocessor = total_co2_in_liquid
[]
[dt]
type = TimestepSize
[]
[flux]
type = FunctionValuePostprocessor
function = flux
[]
[]
[Outputs]
print_linear_residuals = false
perf_graph = true
exodus = true
csv = true
[]
(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/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
[]
(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/transfers/coord_transform/both-transformed/mesh-function/main-app.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = -1
ymax = 0
nx = 10
ny = 10
alpha_rotation = 90
[]
[Variables]
[u][]
[]
[AuxVariables]
[v][]
[v_elem]
order = CONSTANT
family = MONOMIAL
[]
[w][]
[w_elem]
order = CONSTANT
family = MONOMIAL
[]
[]
[ICs]
[w]
type = FunctionIC
function = 'cos(x)*sin(y)'
variable = w
[]
[w_elem]
type = FunctionIC
function = 'cos(x)*sin(y)'
variable = w_elem
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
verbose = true
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = 'sub-app.i'
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[from_sub]
type = MultiAppShapeEvaluationTransfer
from_multi_app = sub
source_variable = v
variable = v
execute_on = 'timestep_begin'
error_on_miss = true
# extend the bounding box slightly since a transformed node
# may miss the bounding box by machine precision
bbox_factor = 1.1
[]
[from_sub_elem]
type = MultiAppShapeEvaluationTransfer
from_multi_app = sub
source_variable = v_elem
variable = v_elem
execute_on = 'timestep_begin'
error_on_miss = true
[]
[to_sub]
type = MultiAppShapeEvaluationTransfer
to_multi_app = sub
source_variable = w
variable = w
execute_on = 'timestep_begin'
error_on_miss = true
# extend the bounding box slightly since a transformed node
# may miss the bounding box by machine precision
bbox_factor = 1.1
[]
[to_sub_elem]
type = MultiAppShapeEvaluationTransfer
to_multi_app = sub
source_variable = w_elem
variable = w_elem
execute_on = 'timestep_begin'
error_on_miss = true
[]
[]
(test/tests/materials/derivative_material_interface/ad_derivative_parsed_material.i)
#
# Test the AD version of derivative parsed material
#
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./eta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = x
[../]
[../]
[]
[Kernels]
[./diff]
type = ADMatDiffusion
variable = eta
diffusivity = F
[]
[./dt]
type = TimeDerivative
variable = eta
[]
[]
[Materials]
[./Fbar]
type = ADDerivativeParsedMaterial
coupled_variables = 'eta'
property_name = Fbar
expression ='1/3*(eta-0.5)^3'
[]
[./F]
type = ADParsedMaterial
coupled_variables = 'eta'
material_property_names = 'F:=D[Fbar,eta]'
expression ='F'
outputs = exodus
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
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/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
[]
(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
[]
(modules/combined/test/tests/eigenstrain/composite.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./TensorMechanics]
[../]
[]
[AuxVariables]
[./c]
[./InitialCondition]
type = FunctionIC
function = x
[../]
[../]
[./s11]
family = MONOMIAL
order = CONSTANT
[../]
[./s22]
family = MONOMIAL
order = CONSTANT
[../]
[./ds11]
family = MONOMIAL
order = CONSTANT
[../]
[./ds22]
family = MONOMIAL
order = CONSTANT
[../]
[]
[AuxKernels]
[./s11]
type = RankTwoAux
variable = s11
rank_two_tensor = eigenstrain
index_i = 0
index_j = 0
[../]
[./s22]
type = RankTwoAux
variable = s22
rank_two_tensor = eigenstrain
index_i = 1
index_j = 1
[../]
[./ds11]
type = RankTwoAux
variable = ds11
rank_two_tensor = delastic_strain/dc
index_i = 0
index_j = 0
[../]
[./ds22]
type = RankTwoAux
variable = ds22
rank_two_tensor = delastic_strain/dc
index_i = 1
index_j = 1
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1'
fill_method = symmetric_isotropic
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y'
eigenstrain_names = 'eigenstrain'
[../]
[./eigen1]
type = GenericConstantRankTwoTensor
tensor_values = '1 -1 0 0 0 0'
tensor_name = eigen1
[../]
[./eigen2]
type = GenericConstantRankTwoTensor
tensor_values = '-1 1 0 0 0 0'
tensor_name = eigen2
[../]
[./weight1]
type = DerivativeParsedMaterial
expression = 0.02*c^2
property_name = weight1
coupled_variables = c
[../]
[./weight2]
type = DerivativeParsedMaterial
expression = 0.02*(1-c)^2
property_name = weight2
coupled_variables = c
[../]
[./eigenstrain]
type = CompositeEigenstrain
tensors = 'eigen1 eigen2'
weights = 'weight1 weight2'
args = c
eigenstrain_name = eigenstrain
[../]
[]
[BCs]
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
exodus = true
execute_on = final
[]
(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/combined/test/tests/DiffuseCreep/stress_flux_n_gb_relax.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 50
ny = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 2
[]
[Variables]
[./c]
[./InitialCondition]
type = FunctionIC
function = 'x0:=5.0;thk:=0.5;m:=2;r:=abs(x-x0);v:=exp(-(r/thk)^m);0.1+0.1*v'
[../]
[../]
[./mu]
[../]
[./jx]
[../]
[./jy]
[../]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[AuxVariables]
[./gb]
family = LAGRANGE
order = FIRST
[../]
[./creep_strain_xx]
family = MONOMIAL
order = CONSTANT
[../]
[./creep_strain_yy]
family = MONOMIAL
order = CONSTANT
[../]
[./creep_strain_xy]
family = MONOMIAL
order = CONSTANT
[../]
[./stress_xx]
family = MONOMIAL
order = CONSTANT
[../]
[./stress_yy]
family = MONOMIAL
order = CONSTANT
[../]
[./stress_xy]
family = MONOMIAL
order = CONSTANT
[../]
[]
[Kernels]
[./conc]
type = CHSplitConcentration
variable = c
mobility = mobility_prop
chemical_potential_var = mu
[../]
[./chempot]
type = CHSplitChemicalPotential
variable = mu
chemical_potential_prop = mu_prop
c = c
[../]
[./flux_x]
type = CHSplitFlux
variable = jx
component = 0
mobility_name = mobility_prop
mu = mu
c = c
[../]
[./flux_y]
type = CHSplitFlux
variable = jy
component = 1
mobility_name = mobility_prop
mu = mu
c = c
[../]
[./time]
type = TimeDerivative
variable = c
[../]
[./TensorMechanics]
displacements = 'disp_x disp_y'
[../]
[]
[AuxKernels]
[./gb]
type = FunctionAux
variable = gb
function = 'x0:=5.0;thk:=0.5;m:=2;r:=abs(x-x0);v:=exp(-(r/thk)^m);v'
[../]
[./creep_strain_xx]
type = RankTwoAux
variable = creep_strain_xx
rank_two_tensor = creep_strain
index_i = 0
index_j = 0
[../]
[./creep_strain_yy]
type = RankTwoAux
variable = creep_strain_yy
rank_two_tensor = creep_strain
index_i = 1
index_j = 1
[../]
[./creep_strain_xy]
type = RankTwoAux
variable = creep_strain_xy
rank_two_tensor = creep_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_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = stress
index_i = 1
index_j = 1
[../]
[./stress_xy]
type = RankTwoAux
variable = stress_xy
rank_two_tensor = stress
index_i = 0
index_j = 1
[../]
[]
[Materials]
[./chemical_potential]
type = DerivativeParsedMaterial
block = 0
property_name = mu_prop
coupled_variables = c
expression = 'c'
derivative_order = 1
[../]
[./var_dependence]
type = DerivativeParsedMaterial
block = 0
expression = 'c*(1.0-c)'
coupled_variables = c
property_name = var_dep
derivative_order = 1
[../]
[./mobility]
type = CompositeMobilityTensor
block = 0
M_name = mobility_prop
tensors = diffusivity
weights = var_dep
args = c
[../]
[./phase_normal]
type = PhaseNormalTensor
phase = gb
normal_tensor_name = gb_normal
[../]
[./aniso_tensor]
type = GBDependentAnisotropicTensor
gb = gb
bulk_parameter = 0.1
gb_parameter = 1
gb_normal_tensor_name = gb_normal
gb_tensor_prop_name = aniso_tensor
[../]
[./diffusivity]
type = GBDependentDiffusivity
gb = gb
bulk_parameter = 0.1
gb_parameter = 1
gb_normal_tensor_name = gb_normal
gb_tensor_prop_name = diffusivity
[../]
[./diffuse_strain_increment]
type = FluxBasedStrainIncrement
xflux = jx
yflux = jy
gb = gb
property_name = diffuse
[../]
[./gb_relax_prefactor]
type = DerivativeParsedMaterial
block = 0
expression = '0.01*(c-0.15)*gb'
coupled_variables = 'c gb'
property_name = gb_relax_prefactor
derivative_order = 1
[../]
[./gb_relax]
type = GBRelaxationStrainIncrement
property_name = gb_relax
prefactor_name = gb_relax_prefactor
gb_normal_name = gb_normal
[../]
[./creep_strain]
type = SumTensorIncrements
tensor_name = creep_strain
coupled_tensor_increment_names = 'diffuse gb_relax'
[../]
[./strain]
type = ComputeIncrementalSmallStrain
displacements = 'disp_x disp_y'
[../]
[./stress]
type = ComputeStrainIncrementBasedStress
inelastic_strain_names = creep_strain
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '120.0 80.0'
fill_method = symmetric_isotropic
[../]
[]
[BCs]
[./Periodic]
[./cbc]
auto_direction = 'x y'
variable = c
[../]
[../]
[./fix_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./fix_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -ksp_grmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
nl_rel_tol = 1e-10
nl_max_its = 5
l_tol = 1e-4
l_max_its = 20
dt = 1
num_steps = 5
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[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
[../]
[]
(modules/porous_flow/test/tests/hysteresis/hys_pc_03.i)
# Capillary-pressure calculation. Primary drying curve with low_extension_type = exponential
# When comparing the results with a by-hand computation, remember the MOOSE results are averaged over an element
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = 1
nx = 100
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
number_fluid_phases = 1
number_fluid_components = 1
porous_flow_vars = ''
[]
[]
[Variables]
[sat]
[]
[]
[ICs]
[sat]
type = FunctionIC
variable = sat
function = 'x'
[]
[]
[BCs]
[sat]
type = FunctionDirichletBC
variable = sat
function = 'x'
boundary = 'left right'
[]
[]
[Kernels]
[dummy]
type = Diffusion
variable = sat
[]
[]
[Materials]
[hys_order]
type = PorousFlowHysteresisOrder
[]
[pc_calculator]
type = PorousFlowHystereticInfo
alpha_d = 10.0
alpha_w = 10.0
n_d = 1.5
n_w = 1.9
S_l_min = 0.1
S_lr = 0.2
S_gr_max = 0.3
Pc_max = 12.0
low_extension_type = exponential
sat_var = sat
[]
[]
[AuxVariables]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[pc]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[pc]
type = PorousFlowPropertyAux
variable = pc
property = hysteretic_info
[]
[]
[VectorPostprocessors]
[pc]
type = LineValueSampler
warn_discontinuous_face_values = false
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 10
sort_by = x
variable = 'sat pc'
[]
[]
[Executioner]
type = Transient
solve_type = Linear
dt = 1
end_time = 1
[]
[Outputs]
csv = true
[]
(test/tests/adaptivity/scalar/scalar_adaptivity.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
[]
[Variables]
[scalar]
order = THIRD
family = SCALAR
[]
[u]
[InitialCondition]
type = FunctionIC
function = 'x*x+y*y'
[]
[]
[]
[Kernels]
[u_dot]
type = TimeDerivative
variable = u
[]
[c_res]
type = Diffusion
variable = u
[]
[]
[ScalarKernels]
[d1]
type = ODETimeDerivative
variable = scalar
[]
[]
[BCs]
[Periodic]
[all]
auto_direction = 'x y'
variable = 'u'
[]
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu '
num_steps = 2
[]
[Adaptivity]
initial_steps = 2
max_h_level = 2
marker = EFM
[Markers]
[EFM]
type = ErrorFractionMarker
coarsen = 0.2
refine = 0.8
indicator = GJI
[]
[]
[Indicators]
[GJI]
type = GradientJumpIndicator
variable = u
[]
[]
[]
[Outputs]
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/transfers/general_field/user_object/nearest_position/sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 0.2
ymax = 0.2
[]
[AuxVariables]
[from_main]
initial_condition = -1
[]
[from_main_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_main]
[InitialCondition]
type = FunctionIC
function = '3 + 2*x*x + 3*y*y*y'
[]
[]
[to_main_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '4 + 2*x*x + 3*y*y*y'
[]
[]
[]
[UserObjects]
[to_main]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_main
[]
[to_main_elem]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_main_elem
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
hide = 'to_main to_main_elem'
overwrite = true
[]
[]
(modules/porous_flow/test/tests/mass_conservation/mass09.i)
# Checking that the mass postprocessor throws the correct error when more than a single
# phase index is given when using the saturation_threshold parameter
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[sat]
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[]
[ICs]
[pinit]
type = ConstantIC
value = 1
variable = pp
[]
[satinit]
type = FunctionIC
function = 1-x
variable = sat
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = sat
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp sat'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 1
thermal_expansion = 0
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 0.1
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = pp
phase1_saturation = sat
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[]
[Postprocessors]
[comp1_total_mass]
type = PorousFlowFluidMass
fluid_component = 1
saturation_threshold = 0.5
phase = '0 1'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
(modules/navier_stokes/test/tests/finite_volume/cns/benchmark_shock_tube_1D/hllc_sod_shocktube.i)
rho_left = 1
E_left = 2.501505578
u_left = 1e-15
rho_right = 0.125
E_right = 1.999770935
u_right = 1e-15
middle = 50
[GlobalParams]
fp = fp
[]
[Mesh]
[cartesian]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = ${fparse 2 * middle}
nx = 1000
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Variables]
[rho]
order = CONSTANT
family = MONOMIAL
fv = true
[]
[rho_u]
order = CONSTANT
family = MONOMIAL
fv = true
[]
[rho_E]
order = CONSTANT
family = MONOMIAL
fv = true
[]
[]
[AuxVariables]
[rho_a]
order = CONSTANT
family = MONOMIAL
[]
[]
[FVKernels]
[mass_time]
type = FVTimeKernel
variable = rho
[]
[mass_advection]
type = CNSFVMassHLLC
variable = rho
[]
[momentum_time]
type = FVTimeKernel
variable = rho_u
[]
[momentum_advection]
type = CNSFVMomentumHLLC
variable = rho_u
momentum_component = x
[]
[fluid_energy_time]
type = FVTimeKernel
variable = rho_E
[../]
[fluid_energy_advection]
type = CNSFVFluidEnergyHLLC
variable = rho_E
[]
[]
[FVBCs]
[mass_implicit]
type = CNSFVHLLCMassImplicitBC
variable = rho
fp = fp
boundary = 'left right'
[]
[mom_implicit]
type = CNSFVHLLCMomentumImplicitBC
variable = rho_u
momentum_component = x
fp = fp
boundary = 'left right'
[]
[fluid_energy_implicit]
type = CNSFVHLLCFluidEnergyImplicitBC
variable = rho_E
fp = fp
boundary = 'left right'
[]
[]
[ICs]
[rho_ic]
type = FunctionIC
variable = rho
function = 'if (x < ${middle}, ${rho_left}, ${rho_right})'
[]
[rho_u_ic]
type = FunctionIC
variable = rho_u
function = 'if (x < ${middle}, ${fparse rho_left * u_left}, ${fparse rho_right * u_right})'
[]
[rho_E_ic]
type = FunctionIC
variable = rho_E
function = 'if (x < ${middle}, ${fparse E_left * rho_left}, ${fparse E_right * rho_right})'
[]
[]
[Materials]
[var_mat]
type = ConservedVarValuesMaterial
rho = rho
rhou = rho_u
rho_et = rho_E
fp = fp
[]
[]
[Preconditioning]
active = ''
[./smp]
type = SMP
full = true
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[../]
[]
[Executioner]
type = Transient
[TimeIntegrator]
type = ExplicitSSPRungeKutta
order = 2
[]
l_tol = 1e-8
start_time = 0.0
dt = 1e-2
end_time = 20
abort_on_solve_fail = true
[]
[Outputs]
exodus = true
perf_graph = true
[]
(test/tests/transfers/general_field/user_object/nearest_position/main.i)
# Base input for testing transfers. It has the following complexities:
# - more than one subapp
# - transfers both from and to the subapps
# - both nodal and elemental variables
# Tests derived from this input may add complexities through command line arguments
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[AuxVariables]
[from_sub]
initial_condition = -1
[]
[from_sub_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_sub]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[to_sub_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[]
[UserObjects]
[to_sub]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_sub
execute_on = TIMESTEP_BEGIN
[]
[to_sub_elem]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_sub_elem
execute_on = TIMESTEP_BEGIN
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
verbose_multiapps = true
[]
[Outputs]
[out]
type = Exodus
hide = 'to_sub to_sub_elem'
overwrite = true
[]
[]
[Positions]
[input]
type = InputPositions
positions = '1e-6 0 0 0.4 0.4001 0 0.700001 0.1 0'
[]
[]
[MultiApps]
[sub]
# 1 on corner, one in the center and one close to a corner
type = FullSolveMultiApp
positions_objects = input
app_type = MooseTestApp
input_files = sub.i
output_in_position = true
execute_on = TIMESTEP_END
[]
[]
[Transfers]
[to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub
source_user_object = to_sub
variable = from_main
[]
[to_sub_elem]
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub
source_user_object = to_sub_elem
variable = from_main_elem
[]
[from_sub]
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = sub
source_user_object = to_main
variable = from_sub
use_nearest_app = true
bbox_factor = 100
[]
[from_sub_elem]
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = sub
source_user_object = to_main_elem
variable = from_sub_elem
use_nearest_app = true
bbox_factor = 100
[]
[]
(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/porous_flow/examples/tutorial/06.i)
# Darcy flow with a tracer
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[make3D]
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
input = annular
[]
[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'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[porepressure]
[]
[tracer_concentration]
[]
[]
[ICs]
[tracer_concentration]
type = FunctionIC
function = '0.5*if(x*x+y*y<1.01,1,0)'
variable = tracer_concentration
[]
[]
[PorousFlowFullySaturated]
porepressure = porepressure
coupling_type = Hydro
gravity = '0 0 0'
fp = the_simple_fluid
mass_fraction_vars = tracer_concentration
stabilization = none # Note to reader: 06_KT.i uses KT stabilization - compare the results
[]
[BCs]
[constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1E6
boundary = injection_area
[]
[constant_outer_porepressure]
type = DirichletBC
variable = porepressure
value = 0
boundary = rmax
[]
[injected_tracer]
type = DirichletBC
variable = tracer_concentration
value = 0.5
boundary = injection_area
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
viscosity = 1.0E-3
density0 = 1000.0
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[]
[permeability_caps]
type = PorousFlowPermeabilityConst
block = caps
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-16'
[]
[]
[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 = 1E6
dt = 1E5
nl_rel_tol = 1E-14
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/coord_transform/both-transformed/interpolation/main-app.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = -1
ymax = 0
nx = 10
ny = 10
alpha_rotation = 90
[]
[Variables]
[u][]
[]
[AuxVariables]
[v][]
[v_elem]
order = CONSTANT
family = MONOMIAL
[]
[w][]
[w_elem]
order = CONSTANT
family = MONOMIAL
[]
[]
[ICs]
[w]
type = FunctionIC
function = 'cos(x)*sin(y)'
variable = w
[]
[w_elem]
type = FunctionIC
function = 'cos(x)*sin(y)'
variable = w_elem
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
verbose = true
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = 'sub-app.i'
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeometricInterpolationTransfer
from_multi_app = sub
source_variable = v
variable = v
execute_on = 'timestep_begin'
[]
[from_sub_elem]
type = MultiAppGeometricInterpolationTransfer
from_multi_app = sub
source_variable = v_elem
variable = v_elem
execute_on = 'timestep_begin'
[]
[to_sub]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = sub
source_variable = w
variable = w
execute_on = 'timestep_begin'
[]
[to_sub_elem]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = sub
source_variable = w_elem
variable = w_elem
execute_on = 'timestep_begin'
[]
[]
(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
[]
(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/phase_field/test/tests/slkks/sublattice_concentrations.i)
#
# SLKKS two phase example for the BCC and SIGMA phases. The sigma phase contains
# multiple sublattices. Free energy from
# Jacob, Aurelie, Erwin Povoden-Karadeniz, and Ernst Kozeschnik. "Revised thermodynamic
# description of the Fe-Cr system based on an improved sublattice model of the sigma phase."
# Calphad 60 (2018): 16-28.
#
# In this simulation we solve only for the sublattice concentrations of the sigma phase
# (and consequently for the free energy of the sigma phase as function of total concentration.)
# The Cr concentration is prescribed as linear gradient. This permits us to plot
# the free energies of the BCC and sigma phases.
#
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 1
xmin = 0.01
xmax = 0.99
ymax = 0.1
[]
[]
[AuxVariables]
[cCr]
[InitialCondition]
type = FunctionIC
function = x
[]
[]
[]
[Variables]
[SIGMA_0CR]
[InitialCondition]
type = FunctionIC
function = x
[]
[]
[SIGMA_1CR]
[InitialCondition]
type = FunctionIC
function = x
[]
[]
[SIGMA_2CR]
[InitialCondition]
type = FunctionIC
function = x
[]
[]
[]
[Kernels]
[chempot2a2b]
# This kernel ties the first two sublattices in the sigma phase together
type = SLKKSChemicalPotential
variable = SIGMA_0CR
a = 10
cs = SIGMA_1CR
as = 4
F = F_SIGMA
coupled_variables = SIGMA_2CR
[]
[chempot2b2c]
# This kernel ties the remaining two sublattices in the sigma phase together
type = SLKKSChemicalPotential
variable = SIGMA_1CR
a = 4
cs = SIGMA_2CR
as = 16
F = F_SIGMA
coupled_variables = SIGMA_0CR
[]
[sum]
type = SLKKSSum
variable = SIGMA_2CR
a = 16
cs = 'SIGMA_0CR SIGMA_1CR'
as = '10 4'
sum = cCr
[]
[]
[Materials]
# CALPHAD free energy of the FeCr sigma phase
[F_SIGMA]
type = DerivativeParsedMaterial
property_name = F_SIGMA
outputs = exodus
expression = 'SIGMA_0FE := 1-SIGMA_0CR;
SIGMA_1FE := 1-SIGMA_1CR;SIGMA_2FE := '
'1-SIGMA_2CR; 8.3145*T*(10.0*if(SIGMA_0CR > 1.0e-15,SIGMA_0CR*log(SIGMA_0CR),0) + '
'10.0*if(SIGMA_0FE > 1.0e-15,SIGMA_0FE*log(SIGMA_0FE),0) + 4.0*if(SIGMA_1CR > '
'1.0e-15,SIGMA_1CR*log(SIGMA_1CR),0) + 4.0*if(SIGMA_1FE > '
'1.0e-15,SIGMA_1FE*log(SIGMA_1FE),0) + 16.0*if(SIGMA_2CR > '
'1.0e-15,SIGMA_2CR*log(SIGMA_2CR),0) + 16.0*if(SIGMA_2FE > '
'1.0e-15,SIGMA_2FE*log(SIGMA_2FE),0))/(10.0*SIGMA_0CR + 10.0*SIGMA_0FE + '
'4.0*SIGMA_1CR + 4.0*SIGMA_1FE + 16.0*SIGMA_2CR + 16.0*SIGMA_2FE) + '
'(SIGMA_0FE*SIGMA_1CR*SIGMA_2CR*SIGMA_2FE*(-70.0*T - 170400.0) + '
'SIGMA_0FE*SIGMA_1FE*SIGMA_2CR*SIGMA_2FE*(-10.0*T - 330839.0))/(10.0*SIGMA_0CR + '
'10.0*SIGMA_0FE + 4.0*SIGMA_1CR + 4.0*SIGMA_1FE + 16.0*SIGMA_2CR + 16.0*SIGMA_2FE) + '
'(SIGMA_0CR*SIGMA_1CR*SIGMA_2CR*(30.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - '
'26.908*T*log(T) + 157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,0) + '
'132000.0) + SIGMA_0CR*SIGMA_1CR*SIGMA_2FE*(-110.0*T + 16.0*if(T >= 298.15 & T < '
'1811.0,77358.5*1/T - 23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - '
'5.89269e-8*T^3.0 + 1225.7,0) + 14.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - '
'26.908*T*log(T) + 157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,0) + '
'123500.0) + SIGMA_0CR*SIGMA_1FE*SIGMA_2CR*(4.0*if(T >= 298.15 & T < '
'1811.0,77358.5*1/T - 23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - '
'5.89269e-8*T^3.0 + 1225.7,0) + 26.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - '
'26.908*T*log(T) + 157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,0) + '
'140486.0) + SIGMA_0CR*SIGMA_1FE*SIGMA_2FE*(20.0*if(T >= 298.15 & T < '
'1811.0,77358.5*1/T - 23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - '
'5.89269e-8*T^3.0 + 1225.7,0) + 10.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - '
'26.908*T*log(T) + 157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,0) + '
'148800.0) + SIGMA_0FE*SIGMA_1CR*SIGMA_2CR*(10.0*if(T >= 298.15 & T < '
'1811.0,77358.5*1/T - 23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - '
'5.89269e-8*T^3.0 + 1225.7,0) + 20.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - '
'26.908*T*log(T) + 157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,0) + '
'56200.0) + SIGMA_0FE*SIGMA_1CR*SIGMA_2FE*(26.0*if(T >= 298.15 & T < '
'1811.0,77358.5*1/T - 23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - '
'5.89269e-8*T^3.0 + 1225.7,0) + 4.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - '
'26.908*T*log(T) + 157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,0) + '
'152700.0) + SIGMA_0FE*SIGMA_1FE*SIGMA_2CR*(14.0*if(T >= 298.15 & T < '
'1811.0,77358.5*1/T - 23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - '
'5.89269e-8*T^3.0 + 1225.7,0) + 16.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - '
'26.908*T*log(T) + 157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,0) + '
'46200.0) + SIGMA_0FE*SIGMA_1FE*SIGMA_2FE*(30.0*if(T >= 298.15 & T < '
'1811.0,77358.5*1/T - 23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - '
'5.89269e-8*T^3.0 + 1225.7,0) + 173333.0))/(10.0*SIGMA_0CR + 10.0*SIGMA_0FE + '
'4.0*SIGMA_1CR + 4.0*SIGMA_1FE + 16.0*SIGMA_2CR + 16.0*SIGMA_2FE)'
coupled_variables = 'SIGMA_0CR SIGMA_1CR SIGMA_2CR'
constant_names = 'T'
constant_expressions = '1000'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_rel_tol = 1e-12
[]
[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
[]
(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
[]
(test/tests/fvkernels/fv_constant_scalar_advection/2D_constant_scalar_advection.i)
[Mesh]
[gen_mesh]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = 0
ymax = 4
nx = 10
ny = 20
[]
[]
[Variables]
[v]
type = MooseVariableFVReal
two_term_boundary_expansion = false
[]
[]
[ICs]
[v_ic]
type = FunctionIC
variable = v
function = 'r2 := (x - 0.5)*(x - 0.5) + (y - 0.3)*(y - 0.3); exp(-r2 * 20)'
[]
[]
[FVKernels]
[advection]
type = FVAdvection
variable = v
velocity = '1 0.5 0'
[]
[time]
type = FVTimeKernel
variable = v
[]
[]
[FVBCs]
[fv_outflow]
type = FVConstantScalarOutflowBC
velocity = '1 0.5 0'
variable = v
boundary = 'right top'
[]
[]
[Executioner]
type = Transient
petsc_options = '-snes_converged_reason'
num_steps = 10
dt = 0.25
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/functions/image_function/threshold.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Variables]
[u]
[]
[]
[Functions]
[image_func]
type = ImageFunction
file_base = stack/test
file_suffix = png
file_range = '0' # file_range is a vector input, a single entry means "read only 1 file"
threshold = 2.7e4
upper_value = 1
lower_value = -1
[]
[]
[ICs]
[u_ic]
type = FunctionIC
function = image_func
variable = u
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.1
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/file_mesh_generator/2d_diffusion_iga.i)
[Mesh]
[cyl2d_iga]
type = FileMeshGenerator
file = PressurizedCyl_Patch6_4Elem.e
[]
allow_renumbering = false # VTK diffs via XMLDiff are
parallel_type = replicated # really fragile
[]
[Variables]
[u]
order = SECOND # Must match mesh order
family = RATIONAL_BERNSTEIN
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
block = 0 # Avoid direct calculations on spline nodes
[]
[diff]
type = Diffusion
variable = u
block = 0 # Avoid direct calculations on spline nodes
[]
[null]
type = NullKernel
variable = u
block = 1 # Keep kernel coverage check happy
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'sin(x)'
[]
[]
[Executioner]
type = Transient
num_steps = 2
solve_type = NEWTON
dtmin = 1
[]
[Outputs]
vtk = 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
[]
[]
(test/tests/functions/piecewise_constant_from_csv/piecewise_constant.i)
[Mesh]
allow_renumbering = false
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1.5 2.4 0.1'
dy = '1.3 0.9'
ix = '2 1 1'
iy = '1 3'
subdomain_id = '0 1 1
2 2 2'
[]
[]
[Variables]
[u]
[]
[]
[UserObjects]
[reader_element]
type = PropertyReadFile
prop_file_name = 'data_element.csv'
read_type = 'element'
nprop = 3 # number of columns in CSV
[]
[reader_node]
type = PropertyReadFile
prop_file_name = 'data_node.csv'
read_type = 'node'
nprop = 3 # number of columns in CSV
[]
[reader_nearest]
type = PropertyReadFile
prop_file_name = 'data_nearest.csv'
read_type = 'voronoi'
nprop = 4 # number of columns in CSV
nvoronoi = 3 # number of rows that are considered
[]
[reader_block]
type = PropertyReadFile
prop_file_name = 'data_nearest.csv'
read_type = 'block'
nprop = 4 # number of columns in CSV
nblock = 3 # number of rows that are considered
[]
[]
[Functions]
[element]
type = PiecewiseConstantFromCSV
read_prop_user_object = 'reader_element'
read_type = 'element'
# 0-based indexing
column_number = '2'
[]
[node]
type = PiecewiseConstantFromCSV
read_prop_user_object = 'reader_node'
read_type = 'node'
# 0-based indexing
column_number = '2'
[]
[nearest]
type = PiecewiseConstantFromCSV
read_prop_user_object = 'reader_nearest'
read_type = 'voronoi'
# 0-based indexing
column_number = '3'
[]
[block]
type = PiecewiseConstantFromCSV
read_prop_user_object = 'reader_block'
read_type = 'block'
# 0-based indexing
column_number = '3'
[]
[]
[ICs]
active = 'element'
[element]
type = FunctionIC
variable = 'u'
function = 'element'
[]
[node]
type = FunctionIC
variable = 'u'
function = 'node'
[]
[nearest]
type = FunctionIC
variable = 'u'
function = 'nearest'
[]
[block]
type = FunctionIC
variable = 'u'
function = 'block'
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[unity]
type = DirichletBC
variable = u
boundary = 'left bottom'
value = 1
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
end_time = 0.1
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/postprocessors/normal_boundary_displacement.i)
[GlobalParams]
displacements = 'dx dy'
[]
[Problem]
solve = false
[]
[Mesh]
[generated_mesh]
type = FileMeshGenerator
file = inclined_geom.e
[]
[]
[AuxVariables]
[dx]
[]
[dy]
[]
[]
[ICs]
[dx_ic]
type = FunctionIC
variable = dx
function = 'r := sqrt(x*x+y*y); phi := 2 * pi * r; 0.8660254037844408 * cos(phi) - 0.5 * sin(phi)'
[]
[dy_ic]
type = FunctionIC
variable = dy
function = 'r := sqrt(x*x+y*y); phi := 2 * pi * r; 0.8660254037844408 * sin(phi) + 0.5 * cos(phi)'
[]
[]
[Postprocessors]
[top_area]
type = AreaPostprocessor
boundary = top
[]
[top_0]
type = NormalBoundaryDisplacement
value_type = average
boundary = top
[]
[top_1]
type = NormalBoundaryDisplacement
value_type = absolute_average
boundary = top
[]
[top_2]
type = NormalBoundaryDisplacement
value_type = max
boundary = top
[]
[top_3]
type = NormalBoundaryDisplacement
value_type = absolute_max
boundary = top
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(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'
[]
[]
(modules/phase_field/test/tests/KKS_system/auxkernel.i)
#
# This test checks if the two phase and lagrange multiplier solutions can be replicated
# with a two order parameter approach, where the second order parameter eta2 is an
# auxiliary variable that is set as eta2 := 1 - eta1
# The solution is reproduced, but convergence is suboptimal, as important Jacobian
# terms for eta1 (that should come indirectly from eta2) are missing.
#
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmax = 5
[]
[AuxVariables]
[Fglobal]
order = CONSTANT
family = MONOMIAL
[]
# order parameter 2
[eta2]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
[]
#
# With this approach the derivative w.r.t. eta1 is lost in all terms depending on
# eta2 a potential fix would be to make eta2 a material property with derivatives.
# This would require a major rewrite of the phase field kernels, though.
#
[AuxKernels]
[eta2]
type = ParsedAux
variable = eta2
expression = '1-eta1'
coupled_variables = eta1
[]
[]
[Variables]
# concentration
[c]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = x/5
[]
[]
# order parameter 1
[eta1]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
# phase concentration 1
[c1]
order = FIRST
family = LAGRANGE
initial_condition = 0.9
[]
# phase concentration 2
[c2]
order = FIRST
family = LAGRANGE
initial_condition = 0.1
[]
[]
[Materials]
# simple toy free energies
[f1] # = fd
type = DerivativeParsedMaterial
property_name = F1
coupled_variables = 'c1'
expression = '(0.9-c1)^2'
[]
[f2] # = fm
type = DerivativeParsedMaterial
property_name = F2
coupled_variables = 'c2'
expression = '(0.1-c2)^2'
[]
# Switching functions for each phase
[h1_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta1
function_name = h1
[]
[h2_eta]
type = DerivativeParsedMaterial
material_property_names = 'h1(eta1)'
expression = '1-h1'
property_name = h2
coupled_variables = eta1
[]
# Coefficients for diffusion equation
[Dh1]
type = DerivativeParsedMaterial
material_property_names = 'D h1(eta1)'
expression = D*h1
property_name = Dh1
coupled_variables = eta1
[]
[Dh2]
type = DerivativeParsedMaterial
material_property_names = 'D h2(eta1)'
expression = 'D*h2'
property_name = Dh2
coupled_variables = eta1
[]
# 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
[]
# constant properties
[constants]
type = GenericConstantMaterial
prop_names = 'D L kappa'
prop_values = '0.7 0.7 0.2'
[]
[]
[Kernels]
#Kernels for diffusion equation
[diff_time]
type = TimeDerivative
variable = c
[]
[diff_c1]
type = MatDiffusion
variable = c
diffusivity = Dh1
v = c1
args = eta1
[]
[diff_c2]
type = MatDiffusion
variable = c
diffusivity = Dh2
v = c2
args = eta1
[]
# Kernels for Allen-Cahn equation for eta1
[deta1dt]
type = TimeDerivative
variable = eta1
[]
[ACBulkF1]
type = KKSMultiACBulkF
variable = eta1
Fj_names = 'F1 F2'
hj_names = 'h1 h2'
gi_name = g1
eta_i = eta1
wi = 0.2
coupled_variables = 'c1 c2 eta2'
[]
[ACBulkC1]
type = KKSMultiACBulkC
variable = eta1
Fj_names = 'F1 F2'
hj_names = 'h1 h2'
cj_names = 'c1 c2'
eta_i = eta1
coupled_variables = 'eta2'
[]
[ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa
[]
# Phase concentration constraints
[chempot12]
type = KKSPhaseChemicalPotential
variable = c1
cb = c2
fa_name = F1
fb_name = F2
[]
[phaseconcentration]
type = KKSMultiPhaseConcentration
variable = c2
cj = 'c1 c2'
hj_names = 'h1 h2'
etas = 'eta1 eta2'
c = c
[]
[]
[AuxKernels]
[Fglobal_total]
type = KKSMultiFreeEnergy
Fj_names = 'F1 F2 '
hj_names = 'h1 h2 '
gj_names = 'g1 g2 '
variable = Fglobal
w = 0.2
interfacial_vars = 'eta1 eta2 '
kappa_names = 'kappa kappa'
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu '
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
end_time = 350
dt = 10
[]
[Preconditioning]
[full]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[c]
type = LineValueSampler
variable = c
start_point = '0 0 0'
end_point = '5 0 0'
num_points = 21
sort_by = x
[]
[]
[Outputs]
csv = true
execute_on = FINAL
[]
(modules/level_set/examples/rotating_circle/circle_rotate.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 32
ny = 32
uniform_refine = 2
[]
[AuxVariables]
[./velocity]
family = LAGRANGE_VEC
[../]
[]
[Variables]
[./phi]
[../]
[]
[Functions]
[./phi_exact]
type = LevelSetOlssonBubble
epsilon = 0.03
center = '0 0.5 0'
radius = 0.15
[../]
[./velocity_func]
type = ParsedVectorFunction
expression_x = '4*y'
expression_y = '-4*x'
[../]
[]
[ICs]
[./phi_ic]
type = FunctionIC
function = phi_exact
variable = phi
[../]
[./vel_ic]
type = VectorFunctionIC
variable = velocity
function = velocity_func
[]
[]
[Kernels]
[./time]
type = TimeDerivative
variable = phi
[../]
[./advection]
type = LevelSetAdvection
velocity = velocity
variable = phi
[../]
[]
[Postprocessors]
[./area]
type = LevelSetVolume
threshold = 0.5
variable = phi
location = outside
execute_on = 'initial timestep_end'
[../]
[./cfl]
type = LevelSetCFLCondition
velocity = velocity
execute_on = 'initial' #timestep_end'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
start_time = 0
end_time = 1.570796
scheme = crank-nicolson
petsc_options_iname = '-pc_type -pc_sub_type'
petsc_options_value = 'asm ilu'
[./TimeStepper]
type = PostprocessorDT
postprocessor = cfl
scale = 0.8
[../]
[]
[Outputs]
csv = true
exodus = true
[]
(modules/combined/examples/phase_field-mechanics/kks_mechanics_KHS.i)
# KKS phase-field model coupled with elasticity using Khachaturyan's scheme as
# described in L.K. Aagesen et al., Computational Materials Science, 140, 10-21 (2017)
# Original run #170403a
[Mesh]
type = GeneratedMesh
dim = 3
nx = 640
ny = 1
nz = 1
xmin = -10
xmax = 10
ymin = 0
ymax = 0.03125
zmin = 0
zmax = 0.03125
elem_type = HEX8
[]
[Variables]
# order parameter
[./eta]
order = FIRST
family = LAGRANGE
[../]
# solute concentration
[./c]
order = FIRST
family = LAGRANGE
[../]
# chemical potential
[./w]
order = FIRST
family = LAGRANGE
[../]
# solute phase concentration (matrix)
[./cm]
order = FIRST
family = LAGRANGE
[../]
# solute phase concentration (precipitate)
[./cp]
order = FIRST
family = LAGRANGE
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./eta_ic]
variable = eta
type = FunctionIC
function = ic_func_eta
block = 0
[../]
[./c_ic]
variable = c
type = FunctionIC
function = ic_func_c
block = 0
[../]
[./w_ic]
variable = w
type = ConstantIC
value = 0.00991
block = 0
[../]
[./cm_ic]
variable = cm
type = ConstantIC
value = 0.131
block = 0
[../]
[./cp_ic]
variable = cp
type = ConstantIC
value = 0.236
block = 0
[../]
[]
[Functions]
[./ic_func_eta]
type = ParsedFunction
expression = '0.5*(1.0+tanh((x)/delta_eta/sqrt(2.0)))'
symbol_names = 'delta_eta'
symbol_values = '0.8034'
[../]
[./ic_func_c]
type = ParsedFunction
expression = '0.2389*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^3*(6*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^2-15*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))+10)+0.1339*(1-(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^3*(6*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^2-15*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))+10))'
symbol_names = 'delta'
symbol_values = '0.8034'
[../]
[./psi_eq_int]
type = ParsedFunction
expression = 'volume*psi_alpha'
symbol_names = 'volume psi_alpha'
symbol_values = 'volume psi_alpha'
[../]
[./gamma]
type = ParsedFunction
expression = '(psi_int - psi_eq_int) / dy / dz'
symbol_names = 'psi_int psi_eq_int dy dz'
symbol_values = 'psi_int psi_eq_int 0.03125 0.03125'
[../]
[]
[AuxVariables]
[./sigma11]
order = CONSTANT
family = MONOMIAL
[../]
[./sigma22]
order = CONSTANT
family = MONOMIAL
[../]
[./sigma33]
order = CONSTANT
family = MONOMIAL
[../]
[./e11]
order = CONSTANT
family = MONOMIAL
[../]
[./e12]
order = CONSTANT
family = MONOMIAL
[../]
[./e22]
order = CONSTANT
family = MONOMIAL
[../]
[./e33]
order = CONSTANT
family = MONOMIAL
[../]
[./e_el11]
order = CONSTANT
family = MONOMIAL
[../]
[./e_el12]
order = CONSTANT
family = MONOMIAL
[../]
[./e_el22]
order = CONSTANT
family = MONOMIAL
[../]
[./f_el]
order = CONSTANT
family = MONOMIAL
[../]
[./eigen_strain00]
order = CONSTANT
family = MONOMIAL
[../]
[./Fglobal]
order = CONSTANT
family = MONOMIAL
[../]
[./psi]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./matl_sigma11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = sigma11
[../]
[./matl_sigma22]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = sigma22
[../]
[./matl_sigma33]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = sigma33
[../]
[./matl_e11]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 0
index_j = 0
variable = e11
[../]
[./f_el]
type = MaterialRealAux
variable = f_el
property = f_el_mat
execute_on = timestep_end
[../]
[./GlobalFreeEnergy]
variable = Fglobal
type = KKSGlobalFreeEnergy
fa_name = fm
fb_name = fp
w = 0.0264
kappa_names = kappa
interfacial_vars = eta
[../]
[./psi_potential]
variable = psi
type = ParsedAux
coupled_variables = 'Fglobal w c f_el sigma11 e11'
expression = 'Fglobal - w*c + f_el - sigma11*e11'
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = right
value = 0
[../]
[./front_y]
type = DirichletBC
variable = disp_y
boundary = front
value = 0
[../]
[./back_y]
type = DirichletBC
variable = disp_y
boundary = back
value = 0
[../]
[./top_z]
type = DirichletBC
variable = disp_z
boundary = top
value = 0
[../]
[./bottom_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0
[../]
[]
[Materials]
# Chemical free energy of the matrix
[./fm]
type = DerivativeParsedMaterial
property_name = fm
coupled_variables = 'cm'
expression = '6.55*(cm-0.13)^2'
[../]
# Chemical Free energy of the precipitate phase
[./fp]
type = DerivativeParsedMaterial
property_name = fp
coupled_variables = 'cp'
expression = '6.55*(cp-0.235)^2'
[../]
# Elastic energy of the precipitate
[./elastic_free_energy_p]
type = ElasticEnergyMaterial
f_name = f_el_mat
args = 'eta'
outputs = exodus
[../]
# h(eta)
[./h_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta
[../]
# 1- h(eta), putting in function explicitly
[./one_minus_h_eta_explicit]
type = DerivativeParsedMaterial
property_name = one_minus_h_explicit
coupled_variables = eta
expression = 1-eta^3*(6*eta^2-15*eta+10)
outputs = exodus
[../]
# g(eta)
[./g_eta]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'M L kappa misfit'
prop_values = '0.7 0.7 0.01704 0.00377'
[../]
#Mechanical properties
[./Stiffness_matrix]
type = ComputeElasticityTensor
base_name = C_matrix
C_ijkl = '103.3 74.25 74.25 103.3 74.25 103.3 46.75 46.75 46.75'
fill_method = symmetric9
[../]
[./Stiffness_ppt]
type = ComputeElasticityTensor
C_ijkl = '100.7 71.45 71.45 100.7 71.45 100.7 50.10 50.10 50.10'
base_name = C_ppt
fill_method = symmetric9
[../]
[./C]
type = CompositeElasticityTensor
args = eta
tensors = 'C_matrix C_ppt'
weights = 'one_minus_h_explicit h'
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
eigenstrain_names = 'eigenstrain_ppt'
[../]
[./eigen_strain]
type = ComputeVariableEigenstrain
eigen_base = '0.00377 0.00377 0.00377 0 0 0'
prefactor = h
args = eta
eigenstrain_name = 'eigenstrain_ppt'
[../]
[]
[Kernels]
[./TensorMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
# enforce c = (1-h(eta))*cm + h(eta)*cp
[./PhaseConc]
type = KKSPhaseConcentration
ca = cm
variable = cp
c = c
eta = eta
[../]
# enforce pointwise equality of chemical potentials
[./ChemPotVacancies]
type = KKSPhaseChemicalPotential
variable = cm
cb = cp
fa_name = fm
fb_name = fp
[../]
#
# Cahn-Hilliard Equation
#
[./CHBulk]
type = KKSSplitCHCRes
variable = c
ca = cm
fa_name = fm
w = w
[../]
[./dcdt]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./ckernel]
type = SplitCHWRes
mob_name = M
variable = w
[../]
#
# Allen-Cahn Equation
#
[./ACBulkF]
type = KKSACBulkF
variable = eta
fa_name = fm
fb_name = fp
w = 0.0264
args = 'cp cm'
[../]
[./ACBulkC]
type = KKSACBulkC
variable = eta
ca = cm
cb = cp
fa_name = fm
[../]
[./ACBulk_el] #This adds df_el/deta for strain interpolation
type = AllenCahn
variable = eta
f_name = f_el_mat
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = kappa
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm ilu nonzero'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-11
num_steps = 200
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.5
[../]
[]
[Postprocessors]
[./f_el_int]
type = ElementIntegralMaterialProperty
mat_prop = f_el_mat
[../]
[./c_alpha]
type = SideAverageValue
boundary = left
variable = c
[../]
[./c_beta]
type = SideAverageValue
boundary = right
variable = c
[../]
[./e11_alpha]
type = SideAverageValue
boundary = left
variable = e11
[../]
[./e11_beta]
type = SideAverageValue
boundary = right
variable = e11
[../]
[./s11_alpha]
type = SideAverageValue
boundary = left
variable = sigma11
[../]
[./s22_alpha]
type = SideAverageValue
boundary = left
variable = sigma22
[../]
[./s33_alpha]
type = SideAverageValue
boundary = left
variable = sigma33
[../]
[./s11_beta]
type = SideAverageValue
boundary = right
variable = sigma11
[../]
[./s22_beta]
type = SideAverageValue
boundary = right
variable = sigma22
[../]
[./s33_beta]
type = SideAverageValue
boundary = right
variable = sigma33
[../]
[./f_el_alpha]
type = SideAverageValue
boundary = left
variable = f_el
[../]
[./f_el_beta]
type = SideAverageValue
boundary = right
variable = f_el
[../]
[./f_c_alpha]
type = SideAverageValue
boundary = left
variable = Fglobal
[../]
[./f_c_beta]
type = SideAverageValue
boundary = right
variable = Fglobal
[../]
[./chem_pot_alpha]
type = SideAverageValue
boundary = left
variable = w
[../]
[./chem_pot_beta]
type = SideAverageValue
boundary = right
variable = w
[../]
[./psi_alpha]
type = SideAverageValue
boundary = left
variable = psi
[../]
[./psi_beta]
type = SideAverageValue
boundary = right
variable = psi
[../]
[./total_energy]
type = ElementIntegralVariablePostprocessor
variable = Fglobal
[../]
# Get simulation cell size from postprocessor
[./volume]
type = ElementIntegralMaterialProperty
mat_prop = 1
[../]
[./psi_eq_int]
type = FunctionValuePostprocessor
function = psi_eq_int
[../]
[./psi_int]
type = ElementIntegralVariablePostprocessor
variable = psi
[../]
[./gamma]
type = FunctionValuePostprocessor
function = gamma
[../]
[./int_position]
type = FindValueOnLine
start_point = '-10 0 0'
end_point = '10 0 0'
v = eta
target = 0.5
[../]
[]
#
# Precondition using handcoded off-diagonal terms
#
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Outputs]
[./exodus]
type = Exodus
time_step_interval = 20
[../]
checkpoint = true
[./csv]
type = CSV
execute_on = 'final'
[../]
[]
(test/tests/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
[]
(test/tests/materials/derivative_material_interface/parsed_material.i)
#
# Test the parsed function free enery Allen-Cahn Bulk kernel
#
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 1
[]
[AuxVariables]
[./eta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = x
[../]
[../]
[]
[Materials]
[./consts]
type = ParsedMaterial
coupled_variables = 'eta'
expression ='(eta-0.5)^2'
outputs = exodus
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/porous_flow/test/tests/buckley_leverett/bl01.i)
# Buckley-Leverett 1-phase.
# The front starts at (around) x=5, and at t=50 it should
# have moved to x=9.6. The version below has a nonzero
# suction function, and at t=50, the front sits between
# (about) x=9.6 and x=9.9. Changing the van-Genuchten
# al parameter to 1E-4 softens the front so it sits between
# (about) x=9.7 and x=10.4, and the simulation runs much faster.
# With al=1E-2 and nx=600, the front sits between x=9.6 and x=9.8,
# but takes about 100 times longer to run.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 150
xmin = 0
xmax = 15
[]
[GlobalParams]
PorousFlowDictator = dictator
compute_enthalpy = false
compute_internal_energy = false
[]
[Variables]
[pp]
[InitialCondition]
type = FunctionIC
function = 'max((1000000-x/5*1000000)-20000,-20000)'
[]
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
gravity = '0 0 0'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = pp
boundary = left
value = 980000
[]
[]
[AuxVariables]
[sat]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[sat]
type = MaterialStdVectorAux
variable = sat
execute_on = timestep_end
index = 0
property = PorousFlow_saturation_qp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.8
alpha = 1e-3
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e6
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
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-10 0 0 0 1E-10 0 0 0 1E-10'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.15
[]
[]
[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 = 'gmres bjacobi 1E-10 1E-10 20'
[]
[]
[Functions]
[timestepper]
type = PiecewiseLinear
x = '0 0.01 0.1 1 1.5 2 20 30 40 50'
y = '0.01 0.1 0.2 0.3 0.1 0.3 0.3 0.4 0.4 0.5'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 50
[TimeStepper]
type = FunctionDT
function = timestepper
[]
[]
[VectorPostprocessors]
[pp]
type = LineValueSampler
start_point = '0 0 0'
end_point = '15 0 0'
num_points = 150
sort_by = x
variable = pp
[]
[sat]
type = LineValueSampler
warn_discontinuous_face_values = false
start_point = '0 0 0'
end_point = '15 0 0'
num_points = 150
sort_by = x
variable = sat
[]
[]
[Outputs]
file_base = bl01
[csv]
type = CSV
sync_only = true
sync_times = '0.01 50'
[]
[exodus]
type = Exodus
execute_on = 'initial 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/materials/derivative_material_interface/construction_order.i)
#
# Test the the getDefaultMaterialProperty in DerivativeMaterialInterface.
# This test should only pass, if the construction order of the Materials
# using this interface does not influence the outcome.
#
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 0.1
elem_type = QUAD4
[]
[]
[GlobalParams]
derivative_order = 2
[]
[Variables]
[./c]
[./InitialCondition]
type = FunctionIC
function = x
[../]
[../]
[]
[Kernels]
[./dummy1]
type = Diffusion
variable = c
[../]
[./dummy2]
type = TimeDerivative
variable = c
[../]
[]
[Materials]
# derivatives used both before and after being declared
[./sum_a_1]
type = DerivativeSumMaterial
property_name = Fa1
sum_materials = 'Fa'
coupled_variables = 'c'
outputs = exodus
[../]
[./free_energy_a]
type = DerivativeParsedMaterial
property_name = Fa
coupled_variables = 'c'
expression = 'c^4'
[../]
[./sum_a_2]
type = DerivativeSumMaterial
property_name = Fa2
sum_materials = 'Fa'
coupled_variables = 'c'
outputs = exodus
[../]
# derivatives declared after being used
[./sum_b_1]
type = DerivativeSumMaterial
property_name = Fb1
sum_materials = 'Fb'
coupled_variables = 'c'
outputs = exodus
[../]
[./free_energy_b]
type = DerivativeParsedMaterial
property_name = Fb
coupled_variables = 'c'
expression = 'c^4'
[../]
# derivatives declared before being used
[./free_energy_c]
type = DerivativeParsedMaterial
property_name = Fc
coupled_variables = 'c'
expression = 'c^4'
[../]
[./sum_c_2]
type = DerivativeSumMaterial
property_name = Fc2
sum_materials = 'Fc'
coupled_variables = 'c'
outputs = exodus
[../]
# non-existing derivatives
[./free_energy_d]
type = ParsedMaterial
property_name = Fd
coupled_variables = 'c'
expression = 'c^4'
[../]
[./sum_d_1]
type = DerivativeSumMaterial
property_name = Fd1
sum_materials = 'Fd'
coupled_variables = 'c'
outputs = exodus
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'NEWTON'
num_steps = 1
dt = 1e-5
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/heat_transfer/test/tests/verify_against_analytical/ad_1D_transient.i)
# This test solves a 1D transient heat equation
# The error is caclulated by comparing to the analytical solution
# The problem setup and analytical solution are taken from "Advanced Engineering
# Mathematics, 10th edition" by Erwin Kreyszig.
# http://www.amazon.com/Advanced-Engineering-Mathematics-Erwin-Kreyszig/dp/0470458364
# It is Example 1 in section 12.6 on page 561
[Mesh]
type = GeneratedMesh
dim = 1
nx = 160
xmax = 80
[]
[Variables]
[./T]
[../]
[]
[ICs]
[./T_IC]
type = FunctionIC
variable = T
function = '100*sin(pi*x/80)'
[../]
[]
[Kernels]
[./HeatDiff]
type = ADHeatConduction
variable = T
[../]
[./HeatTdot]
type = ADHeatConductionTimeDerivative
variable = T
[../]
[]
[BCs]
[./sides]
type = DirichletBC
variable = T
boundary = 'left right'
value = 0
[../]
[]
[Materials]
[./k]
type = ADGenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '0.95' #copper in cal/(cm sec C)
[../]
[./cp]
type = ADGenericConstantMaterial
prop_names = 'specific_heat'
prop_values = '0.092' #copper in cal/(g C)
[../]
[./rho]
type = ADGenericConstantMaterial
prop_names = 'density'
prop_values = '8.92' #copper in g/(cm^3)
[../]
[]
[Postprocessors]
[./error]
type = NodalL2Error
function = '100*sin(pi*x/80)*exp(-0.95/(0.092*8.92)*pi^2/80^2*t)'
variable = T
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
l_tol = 1e-6
dt = 2
end_time = 100
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/coord_transform/both-transformed/pp_interpolation/main-app.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = -1
ymax = 0
nx = 10
ny = 10
alpha_rotation = 90
[]
[Variables]
[u][]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = CoupledForce
variable = u
v = new_val_x
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
verbose = true
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = CentroidMultiApp
app_type = MooseTestApp
input_files = 'sub-app.i'
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[send]
type = MultiAppVariableValueSamplePostprocessorTransfer
to_multi_app = sub
source_variable = x_nodal
postprocessor = rec_x
[]
[send_elem]
type = MultiAppVariableValueSamplePostprocessorTransfer
to_multi_app = sub
source_variable = y_elem
postprocessor = rec_y
[]
[get_back]
type = MultiAppPostprocessorInterpolationTransfer
from_multi_app = sub
variable = new_val_x
postprocessor = rec_x
[]
[get_back_elem]
type = MultiAppPostprocessorInterpolationTransfer
from_multi_app = sub
variable = new_val_y_elem
postprocessor = rec_y
[]
[]
[AuxVariables]
[x_nodal]
[InitialCondition]
type = FunctionIC
function = 'x'
[]
[]
[y_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = 'y'
[]
[]
[new_val_x]
[]
[new_val_y_elem]
order = CONSTANT
family = MONOMIAL
[]
[]
(modules/phase_field/test/tests/phase_field_kernels/AllenCahnVariableL.i)
#
# Test the parsed function free enery Allen-Cahn Bulk kernel
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 12
ymax = 12
elem_type = QUAD4
[]
[AuxVariables]
[./chi]
[./InitialCondition]
type = FunctionIC
function = 'x/24+0.5'
[../]
[../]
[]
[Variables]
[./eta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 6.0
invalue = 0.9
outvalue = 0.1
int_width = 3.0
[../]
[../]
[]
[Kernels]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[./ACBulk]
type = AllenCahn
variable = eta
f_name = F
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = 1
variable_L = true
coupled_variables = chi
[../]
[]
[Materials]
[./L]
type = DerivativeParsedMaterial
property_name = L
coupled_variables = 'eta chi'
expression = '0.1 * eta^2 + chi^2'
derivative_order = 2
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'eta'
expression = '2 * eta^2 * (1-eta)^2 - 0.2*eta'
derivative_order = 2
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
num_steps = 2
dt = 1
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/examples/tutorial/13.i)
# Example of reactive transport model with dissolution of dolomite
#
# The equilibrium system has 5 primary species (Variables) and
# 5 secondary species (PorousFlowMassFractionAqueousEquilibrium).
# Some of the equilibrium constants have been chosen rather arbitrarily.
#
# Equilibrium reactions
# H+ + HCO3- = CO2(aq)
# -H+ + HCO3- = CO32-
# HCO3- + Ca2+ = CaHCO3+
# HCO3- + Mg2+ = MgHCO3+
# HCO3- + Fe2+ = FeHCO3+
#
# The kinetic reaction that dissolves dolomite involves all 5 primary species.
#
# -2H+ + 2HCO3- + Ca2+ + 0.8Mg2+ + 0.2Fe2+ = CaMg0.8Fe0.2(CO3)2
#
# The initial concentration of precipitated dolomite is high, so it starts
# to dissolve immediately, increasing the concentrations of the primary species.
#
# Only single-phase, fully saturated physics is used.
# The pressure gradient is fixed, so that the Darcy velocity is 0.1m/s.
#
# Primary species are injected from the left side, and they flow to the right.
# Less dolomite dissolution therefore occurs on the left side (where
# the primary species have higher concentration).
#
# This test is more fully documented in tutorial_13
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 1
[]
[Variables]
[h+]
[]
[hco3-]
[]
[ca2+]
[]
[mg2+]
[]
[fe2+]
[]
[]
[AuxVariables]
[eqm_k0]
initial_condition = 2.19E6
[]
[eqm_k1]
initial_condition = 4.73E-11
[]
[eqm_k2]
initial_condition = 0.222
[]
[eqm_k3]
initial_condition = 1E-2
[]
[eqm_k4]
initial_condition = 1E-3
[]
[kinetic_k]
initial_condition = 326.2
[]
[pressure]
[]
[dolomite]
family = MONOMIAL
order = CONSTANT
[]
[dolomite_initial]
initial_condition = 1E-7
[]
[]
[AuxKernels]
[dolomite]
type = PorousFlowPropertyAux
property = mineral_concentration
mineral_species = 0
variable = dolomite
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[ICs]
[pressure_ic]
type = FunctionIC
variable = pressure
function = '(1 - x) * 1E6'
[]
[h+_ic]
type = BoundingBoxIC
variable = h+
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 0.25
inside = 5.0e-2
outside = 1.0e-6
[]
[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 = 5.0e-2
outside = 1.0e-6
[]
[mg2_ic]
type = BoundingBoxIC
variable = mg2+
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 0.25
inside = 5.0e-2
outside = 1.0e-6
[]
[fe2_ic]
type = BoundingBoxIC
variable = fe2+
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 0.25
inside = 5.0e-2
outside = 1.0e-6
[]
[]
[Kernels]
[h+_ie]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = h+
[]
[h+_conv]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = h+
[]
[predis_h+]
type = PorousFlowPreDis
variable = h+
mineral_density = 2875.0
stoichiometry = -2
[]
[hco3-_ie]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = hco3-
[]
[hco3-_conv]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = hco3-
[]
[predis_hco3-]
type = PorousFlowPreDis
variable = hco3-
mineral_density = 2875.0
stoichiometry = 2
[]
[ca2+_ie]
type = PorousFlowMassTimeDerivative
fluid_component = 2
variable = ca2+
[]
[ca2+_conv]
type = PorousFlowAdvectiveFlux
fluid_component = 2
variable = ca2+
[]
[predis_ca2+]
type = PorousFlowPreDis
variable = ca2+
mineral_density = 2875.0
stoichiometry = 1
[]
[mg2+_ie]
type = PorousFlowMassTimeDerivative
fluid_component = 3
variable = mg2+
[]
[mg2+_conv]
type = PorousFlowAdvectiveFlux
fluid_component = 3
variable = mg2+
[]
[predis_mg2+]
type = PorousFlowPreDis
variable = mg2+
mineral_density = 2875.0
stoichiometry = 0.8
[]
[fe2+_ie]
type = PorousFlowMassTimeDerivative
fluid_component = 4
variable = fe2+
[]
[fe2+_conv]
type = PorousFlowAdvectiveFlux
fluid_component = 4
variable = fe2+
[]
[predis_fe2+]
type = PorousFlowPreDis
variable = fe2+
mineral_density = 2875.0
stoichiometry = 0.2
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'h+ hco3- ca2+ mg2+ fe2+'
number_fluid_phases = 1
number_fluid_components = 6
number_aqueous_equilibrium = 5
number_aqueous_kinetic = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
viscosity = 1E-3
[]
[]
[BCs]
[hco3-_left]
type = DirichletBC
variable = hco3-
boundary = left
value = 5E-2
[]
[h+_left]
type = DirichletBC
variable = h+
boundary = left
value = 5E-2
[]
[ca2+_left]
type = DirichletBC
variable = ca2+
boundary = left
value = 5E-2
[]
[mg2+_left]
type = DirichletBC
variable = mg2+
boundary = left
value = 5E-2
[]
[fe2+_left]
type = DirichletBC
variable = fe2+
boundary = left
value = 5E-2
[]
[hco3-_right]
type = DirichletBC
variable = hco3-
boundary = right
value = 1E-6
[]
[h+_right]
type = DirichletBC
variable = h+
boundary = right
value = 1e-6
[]
[ca2+_right]
type = DirichletBC
variable = ca2+
boundary = right
value = 1E-6
[]
[mg2+_right]
type = DirichletBC
variable = mg2+
boundary = right
value = 1E-6
[]
[fe2+_right]
type = DirichletBC
variable = fe2+
boundary = right
value = 1E-6
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = 298.15
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
[]
[equilibrium_massfrac]
type = PorousFlowMassFractionAqueousEquilibriumChemistry
mass_fraction_vars = 'h+ hco3- ca2+ mg2+ fe2+'
num_reactions = 5
equilibrium_constants = 'eqm_k0 eqm_k1 eqm_k2 eqm_k3 eqm_k4'
primary_activity_coefficients = '1 1 1 1 1'
secondary_activity_coefficients = '1 1 1 1 1'
reactions = '1 1 0 0 0
-1 1 0 0 0
0 1 1 0 0
0 1 0 1 0
0 1 0 0 1'
[]
[kinetic]
type = PorousFlowAqueousPreDisChemistry
primary_concentrations = 'h+ hco3- ca2+ mg2+ fe2+'
num_reactions = 1
equilibrium_constants = kinetic_k
primary_activity_coefficients = '1 1 1 1 1'
reactions = '-2 2 1 0.8 0.2'
specific_reactive_surface_area = '1.2E-8'
kinetic_rate_constant = '3E-4'
activation_energy = '1.5e4'
molar_volume = 64365.0
gas_constant = 8.314
reference_temperature = 298.15
[]
[dolomite_conc]
type = PorousFlowAqueousPreDisMineral
initial_concentrations = dolomite_initial
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.2
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-10 0 0 0 1E-10 0 0 0 1E-10'
[]
[relp]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.1
[]
[]
[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'
[]
[]
[Outputs]
print_linear_residuals = false
perf_graph = true
exodus = 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/porous_flow/test/tests/numerical_diffusion/pffltvd_action.i)
# Using flux-limited TVD advection ala Kuzmin and Turek, employing PorousFlow Kernels and UserObjects, with superbee flux-limiter
# Using the PorousFlowFullySaturated Action
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[porepressure]
[]
[tracer]
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x'
[]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[]
[]
[PorousFlowFullySaturated]
porepressure = porepressure
coupling_type = Hydro
fp = the_simple_fluid
mass_fraction_vars = tracer
stabilization = KT
flux_limiter_type = superbee
[]
[BCs]
[constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1
boundary = left
[]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[]
[remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[]
[]
[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'
[]
[]
[VectorPostprocessors]
[tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 101
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-2
nl_abs_tol = 1E-8
timestep_tolerance = 1E-3
[]
[Outputs]
file_base = pffltvd_out
[out]
type = CSV
execute_on = final
[]
[]
(modules/phase_field/test/tests/KKS_system/two_phase.i)
#
# This test ensures that the equilibrium solution using the dedicated two phase
# formulation is identical to the two order parameters with a Lagrange multiplier
# constraint in lagrange_multiplier.i
#
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmax = 5
[]
[AuxVariables]
[Fglobal]
order = CONSTANT
family = MONOMIAL
[]
[]
[Variables]
# order parameter
[eta]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
# hydrogen concentration
[c]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = x/5
[]
[]
# chemical potential
[w]
order = FIRST
family = LAGRANGE
[]
# hydrogen phase concentration (matrix)
[cm]
order = FIRST
family = LAGRANGE
initial_condition = 0.2
[]
# hydrogen phase concentration (delta phase)
[cd]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
[]
[Materials]
# Free energy of the matrix
[fm]
type = DerivativeParsedMaterial
property_name = fm
coupled_variables = 'cm'
expression = '(0.1-cm)^2'
[]
# Free energy of the delta phase
[fd]
type = DerivativeParsedMaterial
property_name = fd
coupled_variables = 'cd'
expression = '(0.9-cd)^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 kappa'
prop_values = '0.7 0.7 0.4 '
[]
[]
[Kernels]
# full transient
active = 'PhaseConc ChemPotVacancies CHBulk ACBulkF ACBulkC ACInterface dcdt detadt ckernel'
# enforce c = (1-h(eta))*cm + h(eta)*cd
[PhaseConc]
type = KKSPhaseConcentration
ca = cm
variable = cd
c = c
eta = eta
[]
# enforce pointwise equality of chemical potentials
[ChemPotVacancies]
type = KKSPhaseChemicalPotential
variable = cm
cb = cd
fa_name = fm
fb_name = fd
[]
#
# 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 = fd
coupled_variables = 'cm cd'
w = 0.4
[]
[ACBulkC]
type = KKSACBulkC
variable = eta
ca = cm
cb = cd
fa_name = fm
mob_name = L
[]
[ACInterface]
type = ACInterface
variable = eta
kappa_name = kappa
mob_name = L
[]
[detadt]
type = TimeDerivative
variable = eta
[]
[]
[AuxKernels]
[GlobalFreeEnergy]
variable = Fglobal
type = KKSGlobalFreeEnergy
fa_name = fm
fb_name = fd
w = 0.4
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pctype -sub_pc_type -sub_pc_factor_shift_type -pc_factor_shift_type'
petsc_options_value = ' asm lu nonzero 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 = 35
dt = 10
[]
#
# Precondition using handcoded off-diagonal terms
#
[Preconditioning]
[full]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[c]
type = LineValueSampler
variable = c
start_point = '0 0 0'
end_point = '5 0 0'
num_points = 21
sort_by = x
[]
[]
[Outputs]
csv = true
execute_on = FINAL
[]
(modules/scalar_transport/test/tests/ncp-lms/diagonal-ncp-lm-nodal-enforcement-nodal-forces.i)
l=10
nx=100
num_steps=${l}
dt=1
[GlobalParams]
lm_sign_positive = false
[]
[Problem]
extra_tag_vectors = 'positive diffusion rest'
[]
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
elem_type = EDGE3
[]
[Variables]
[u]
order = SECOND
[]
[lm]
order = SECOND
[]
[]
[AuxVariables]
[positive]
order = SECOND
[]
[diffusion_lm]
order = SECOND
[]
[rest_lm]
order = SECOND
[]
[diffusion_primal]
order = SECOND
[]
[rest_primal]
order = SECOND
[]
[]
[AuxKernels]
[positive]
type = TagVectorAux
variable = positive
v = lm
vector_tag = positive
execute_on = timestep_end
[]
[diffusion_lm]
type = TagVectorAux
variable = diffusion_lm
v = lm
vector_tag = diffusion
execute_on = timestep_end
[]
[rest_lm]
type = TagVectorAux
variable = rest_lm
v = lm
vector_tag = rest
execute_on = timestep_end
[]
[diffusion_primal]
type = TagVectorAux
variable = diffusion_primal
v = u
vector_tag = diffusion
execute_on = timestep_end
[]
[rest_primal]
type = TagVectorAux
variable = rest_primal
v = u
vector_tag = rest
execute_on = timestep_end
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = '${l} - x'
[]
[]
[Kernels]
[time]
type = TimeDerivativeLM
variable = u
lm_variable = lm
extra_vector_tags = 'rest'
[]
[diff]
type = Diffusion
variable = u
extra_vector_tags = 'diffusion'
[]
[diff_lm]
type = LMDiffusion
variable = lm
primal_variable = u
extra_vector_tags = 'diffusion'
[]
[ffn]
type = BodyForceLM
variable = u
lm_variable = lm
function = '-1'
extra_vector_tags = 'rest'
[]
[]
[NodalKernels]
[forces]
type = CoupledForceNodalKernel
variable = u
v = lm
extra_vector_tags = 'rest'
[]
[corresponding_lm_portion]
type = ReactionNodalKernel
variable = lm
coeff = 1
extra_vector_tags = 'rest'
[]
[positive_constraint]
type = LowerBoundNodalKernel
extra_vector_tags = positive
variable = lm
v = u
# exclude_boundaries = 'left right'
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = ${l}
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = 0
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
dt = ${dt}
dtmin = ${dt}
solve_type = NEWTON
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_factor_levels'
petsc_options_value = '0 30 16'
[]
[Outputs]
exodus = true
csv = true
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Postprocessors]
[active_lm]
type = GreaterThanLessThanPostprocessor
variable = lm
execute_on = 'nonlinear timestep_end'
value = 1e-12
[]
[violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-12
comparator = 'less'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/porous_flow/examples/ates/ates.i)
# Simulation designed to assess the recovery efficiency of a single-well ATES system
# Using KT stabilisation
# Boundary conditions: fixed porepressure and temperature at top, bottom and far end of model.
#####################################
flux_limiter = minmod # minmod, vanleer, mc, superbee, none
# depth of top of aquifer (m)
depth = 400
inject_fluid_mass = 1E8 # kg
produce_fluid_mass = ${inject_fluid_mass} # kg
inject_temp = 90 # degC
inject_time = 91 # days
store_time = 91 # days
produce_time = 91 # days
rest_time = 91 # days
num_cycles = 5 # Currently needs to be <= 10
cycle_length = ${fparse inject_time + store_time + produce_time + rest_time}
end_simulation = ${fparse cycle_length * num_cycles}
# Note: I have setup 10 cycles but you can set num_cycles less than 10.
start_injection1 = 0
start_injection2 = ${cycle_length}
start_injection3 = ${fparse cycle_length * 2}
start_injection4 = ${fparse cycle_length * 3}
start_injection5 = ${fparse cycle_length * 4}
start_injection6 = ${fparse cycle_length * 5}
start_injection7 = ${fparse cycle_length * 6}
start_injection8 = ${fparse cycle_length * 7}
start_injection9 = ${fparse cycle_length * 8}
start_injection10 = ${fparse cycle_length * 9}
end_injection1 = ${fparse start_injection1 + inject_time}
end_injection2 = ${fparse start_injection2 + inject_time}
end_injection3 = ${fparse start_injection3 + inject_time}
end_injection4 = ${fparse start_injection4 + inject_time}
end_injection5 = ${fparse start_injection5 + inject_time}
end_injection6 = ${fparse start_injection6 + inject_time}
end_injection7 = ${fparse start_injection7 + inject_time}
end_injection8 = ${fparse start_injection8 + inject_time}
end_injection9 = ${fparse start_injection9 + inject_time}
end_injection10 = ${fparse start_injection10 + inject_time}
start_production1 = ${fparse end_injection1 + store_time}
start_production2 = ${fparse end_injection2 + store_time}
start_production3 = ${fparse end_injection3 + store_time}
start_production4 = ${fparse end_injection4 + store_time}
start_production5 = ${fparse end_injection5 + store_time}
start_production6 = ${fparse end_injection6 + store_time}
start_production7 = ${fparse end_injection7 + store_time}
start_production8 = ${fparse end_injection8 + store_time}
start_production9 = ${fparse end_injection9 + store_time}
start_production10 = ${fparse end_injection10 + store_time}
end_production1 = ${fparse start_production1 + produce_time}
end_production2 = ${fparse start_production2 + produce_time}
end_production3 = ${fparse start_production3 + produce_time}
end_production4 = ${fparse start_production4 + produce_time}
end_production5 = ${fparse start_production5 + produce_time}
end_production6 = ${fparse start_production6 + produce_time}
end_production7 = ${fparse start_production7 + produce_time}
end_production8 = ${fparse start_production8 + produce_time}
end_production9 = ${fparse start_production9 + produce_time}
end_production10 = ${fparse start_production10 + produce_time}
synctimes = '${start_injection1} ${end_injection1} ${start_production1} ${end_production1}
${start_injection2} ${end_injection2} ${start_production2} ${end_production2}
${start_injection3} ${end_injection3} ${start_production3} ${end_production3}
${start_injection4} ${end_injection4} ${start_production4} ${end_production4}
${start_injection5} ${end_injection5} ${start_production5} ${end_production5}
${start_injection6} ${end_injection6} ${start_production6} ${end_production6}
${start_injection7} ${end_injection7} ${start_production7} ${end_production7}
${start_injection8} ${end_injection8} ${start_production8} ${end_production8}
${start_injection9} ${end_injection9} ${start_production9} ${end_production9}
${start_injection10} ${end_injection10} ${start_production10} ${end_production10}'
#####################################
# Geometry in RZ coordinates
# borehole radius (m)
bh_r = 0.1
# model radius (m)
max_r = 1000
# aquifer thickness (m)
aq_thickness = 20
# cap thickness (m)
cap_thickness = 40
# injection region top and bottom (m). Note, the mesh is created with the aquifer in y = (-0.5 * aq_thickness, 0.5 * aq_thickness), irrespective of depth (depth only sets the insitu porepressure and temperature)
screen_top = ${fparse 0.5 * aq_thickness}
screen_bottom = ${fparse -0.5 * aq_thickness}
# number of elements in radial direction
num_r = 25
# number of elements across half height of aquifer
num_y_aq = 10
# number of elements across height of cap
num_y_cap = 8
# mesh bias in radial direction
bias_r = 1.22
# mesh bias in vertical direction in aquifer top
bias_y_aq_top = 0.9
# mesh bias in vertical direction in cap top
bias_y_cap_top = 1.3
# mesh bias in vertical direction in aquifer bottom
bias_y_aq_bottom = ${fparse 1.0 / bias_y_aq_top}
# mesh bias in vertical direction in cap bottom
bias_y_cap_bottom = ${fparse 1.0 / bias_y_cap_top}
depth_centre = ${fparse depth + aq_thickness/2}
#####################################
# temperature at ground surface (degC)
temp0 = 20
# Vertical geothermal gradient (K/m). A positive number means temperature increases downwards.
geothermal_gradient = 20E-3
#####################################
# Gravity
gravity = -9.81
#####################################
half_aq_thickness = ${fparse aq_thickness * 0.5}
half_height = ${fparse half_aq_thickness + cap_thickness}
approx_screen_length = ${fparse screen_top - screen_bottom}
# Thermal radius (note this is not strictly correct, it should use the bulk specific heat
# capacity as defined below, but it doesn't matter here because this is purely for
# defining the region of refined mesh)
th_r = ${fparse sqrt(inject_fluid_mass / 1000 * 4.12e6 / (approx_screen_length * 3.1416 * aq_specific_heat_cap * aq_density))}
# radius of fine mesh
fine_r = ${fparse th_r * 2}
bias_r_fine = 1
num_r_fine = ${fparse int(fine_r/1)}
######################################
# aquifer properties
aq_porosity = 0.25
aq_hor_perm = 1E-11 # m^2
aq_ver_perm = 2E-12 # m^2
aq_density = 2650 # kg/m^3
aq_specific_heat_cap = 800 # J/Kg/K
aq_hor_thermal_cond = 3 # W/m/K
aq_ver_thermal_cond = 3 # W/m/K
aq_disp_parallel = 0 # m
aq_disp_perp = 0 # m
# Bulk volumetric heat capacity of aquifer:
aq_vol_cp = ${fparse aq_specific_heat_cap * aq_density * (1 - aq_porosity) + 4180 * 1000 * aq_porosity}
# Thermal radius (correct version using bulk cp):
R_th = ${fparse sqrt(inject_fluid_mass * 4180 / (approx_screen_length * 3.1416 * aq_vol_cp))}
aq_lambda_eff_hor = ${fparse aq_hor_thermal_cond + 0.3 * aq_disp_parallel * R_th * aq_vol_cp / (inject_time * 60 * 60 * 24)}
aq_lambda_eff_ver = ${fparse aq_ver_thermal_cond + 0.3 * aq_disp_perp * R_th * aq_vol_cp / (inject_time * 60 * 60 * 24)}
aq_hor_dry_thermal_cond = ${fparse aq_lambda_eff_hor * 60 * 60 * 24} # J/day/m/K
aq_ver_dry_thermal_cond = ${fparse aq_lambda_eff_ver * 60 * 60 * 24} # J/day/m/K
aq_hor_wet_thermal_cond = ${fparse aq_lambda_eff_hor * 60 * 60 * 24} # J/day/m/K
aq_ver_wet_thermal_cond = ${fparse aq_lambda_eff_ver * 60 * 60 * 24} # J/day/m/K
# cap-rock properties
cap_porosity = 0.25
cap_hor_perm = 1E-16 # m^2
cap_ver_perm = 1E-17 # m^2
cap_density = 2650 # kg/m^3
cap_specific_heat_cap = 800 # J/kg/K
cap_hor_thermal_cond = 3 # W/m/K
cap_ver_thermal_cond = 3 # W/m/K
cap_hor_dry_thermal_cond = ${fparse cap_hor_thermal_cond * 60 * 60 * 24} # J/day/m/K
cap_ver_dry_thermal_cond = ${fparse cap_ver_thermal_cond * 60 * 60 * 24} # J/day/m/K
cap_hor_wet_thermal_cond = ${fparse cap_hor_thermal_cond * 60 * 60 * 24} # J/day/m/K
cap_ver_wet_thermal_cond = ${fparse cap_ver_thermal_cond * 60 * 60 * 24} # J/day/m/K
######################################
[Mesh]
coord_type = RZ
[aq_top_fine]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r_fine}
xmin = ${bh_r}
xmax = ${fine_r}
bias_x = ${bias_r_fine}
bias_y = ${bias_y_aq_top}
ny = ${num_y_aq}
ymin = 0
ymax = ${half_aq_thickness}
[]
[cap_top_fine]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r_fine}
xmin = ${bh_r}
xmax = ${fine_r}
bias_x = ${bias_r_fine}
bias_y = ${bias_y_cap_top}
ny = ${num_y_cap}
ymax = ${half_height}
ymin = ${half_aq_thickness}
[]
[aq_and_cap_top_fine]
type = StitchedMeshGenerator
inputs = 'aq_top_fine cap_top_fine'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'top bottom'
[]
[aq_bottom_fine]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r_fine}
xmin = ${bh_r}
xmax = ${fine_r}
bias_x = ${bias_r_fine}
bias_y = ${bias_y_aq_bottom}
ny = ${num_y_aq}
ymax = 0
ymin = -${half_aq_thickness}
[]
[cap_bottom_fine]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r_fine}
xmin = ${bh_r}
xmax = ${fine_r}
bias_x = ${bias_r_fine}
bias_y = ${bias_y_cap_bottom}
ny = ${num_y_cap}
ymin = -${half_height}
ymax = -${half_aq_thickness}
[]
[aq_and_cap_bottom_fine]
type = StitchedMeshGenerator
inputs = 'aq_bottom_fine cap_bottom_fine'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'bottom top'
[]
[aq_and_cap_fine]
type = StitchedMeshGenerator
inputs = 'aq_and_cap_bottom_fine aq_and_cap_top_fine'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'top bottom'
[]
[aq_top]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r}
xmin = ${fine_r}
xmax = ${max_r}
bias_x = ${bias_r}
bias_y = ${bias_y_aq_top}
ny = ${num_y_aq}
ymin = 0
ymax = ${half_aq_thickness}
[]
[cap_top]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r}
xmin = ${fine_r}
xmax = ${max_r}
bias_x = ${bias_r}
bias_y = ${bias_y_cap_top}
ny = ${num_y_cap}
ymax = ${half_height}
ymin = ${half_aq_thickness}
[]
[aq_and_cap_top]
type = StitchedMeshGenerator
inputs = 'aq_top cap_top'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'top bottom'
[]
[aq_bottom]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r}
xmin = ${fine_r}
xmax = ${max_r}
bias_x = ${bias_r}
bias_y = ${bias_y_aq_bottom}
ny = ${num_y_aq}
ymax = 0
ymin = -${half_aq_thickness}
[]
[cap_bottom]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r}
xmin = ${fine_r}
xmax = ${max_r}
bias_x = ${bias_r}
bias_y = ${bias_y_cap_bottom}
ny = ${num_y_cap}
ymin = -${half_height}
ymax = -${half_aq_thickness}
[]
[aq_and_cap_bottom]
type = StitchedMeshGenerator
inputs = 'aq_bottom cap_bottom'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'bottom top'
[]
[aq_and_cap]
type = StitchedMeshGenerator
inputs = 'aq_and_cap_bottom aq_and_cap_top'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'top bottom'
[]
[aq_and_cap_all]
type = StitchedMeshGenerator
inputs = 'aq_and_cap_fine aq_and_cap'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'right left'
[]
[aquifer]
type = ParsedSubdomainMeshGenerator
input = aq_and_cap_all
combinatorial_geometry = 'y >= -${half_aq_thickness} & y <= ${half_aq_thickness}'
block_id = 1
[]
[top_cap]
type = ParsedSubdomainMeshGenerator
input = aquifer
combinatorial_geometry = 'y >= ${half_aq_thickness}'
block_id = 2
[]
[bottom_cap]
type = ParsedSubdomainMeshGenerator
input = top_cap
combinatorial_geometry = 'y <= -${half_aq_thickness}'
block_id = 3
[]
[injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x<=${bh_r}*1.000001 & y >= ${screen_bottom} & y <= ${screen_top}'
included_subdomains = 1
new_sideset_name = 'injection_area'
input = 'bottom_cap'
[]
[rename]
type = RenameBlockGenerator
old_block = '1 2 3'
new_block = 'aquifer caps caps'
input = 'injection_area'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 ${gravity} 0'
[]
[Variables]
[porepressure]
[]
[temperature]
scaling = 1E-5
[]
[]
[PorousFlowFullySaturated]
coupling_type = ThermoHydro
porepressure = porepressure
temperature = temperature
fp = tabulated_water
stabilization = KT
flux_limiter_type = ${flux_limiter}
use_displaced_mesh = false
temperature_unit = Celsius
pressure_unit = Pa
time_unit = days
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = insitu_pressure
[]
[temperature]
type = FunctionIC
variable = temperature
function = insitu_temperature
[]
[]
[BCs]
[outer_boundary_porepressure]
type = FunctionDirichletBC
preset = true
variable = porepressure
function = insitu_pressure
boundary = 'bottom right top'
[]
[outer_boundary_temperature]
type = FunctionDirichletBC
preset = true
variable = temperature
function = insitu_temperature
boundary = 'bottom right top'
[]
[inject_heat]
type = FunctionDirichletBC
variable = temperature
function = ${inject_temp}
boundary = 'injection_area'
[]
[inject_fluid]
type = PorousFlowSink
variable = porepressure
boundary = injection_area
flux_function = injection_rate_value
[]
[produce_heat]
type = PorousFlowSink
variable = temperature
boundary = injection_area
flux_function = production_rate_value
fluid_phase = 0
use_enthalpy = true
save_in = heat_flux_out
[]
[produce_fluid]
type = PorousFlowSink
variable = porepressure
boundary = injection_area
flux_function = production_rate_value
[]
[]
[Controls]
[inject_on]
type = ConditionalFunctionEnableControl
enable_objects = 'BCs::inject_heat BCs::inject_fluid'
conditional_function = inject
implicit = false
execute_on = 'initial timestep_begin'
[]
[produce_on]
type = ConditionalFunctionEnableControl
enable_objects = 'BCs::produce_heat BCs::produce_fluid'
conditional_function = produce
implicit = false
execute_on = 'initial timestep_begin'
[]
[]
[Functions]
[insitu_pressure]
type = ParsedFunction
expression = '(y - ${depth_centre}) * 1000 * ${gravity} + 1E5' # approx insitu pressure in Pa
[]
[insitu_temperature]
type = ParsedFunction
expression = '${temp0} + (${depth_centre} - y) * ${geothermal_gradient}'
[]
[inject]
type = ParsedFunction
expression = 'if(t >= ${start_injection1} & t < ${end_injection1}, 1,
if(t >= ${start_injection2} & t < ${end_injection2}, 1,
if(t >= ${start_injection3} & t < ${end_injection3}, 1,
if(t >= ${start_injection4} & t < ${end_injection4}, 1,
if(t >= ${start_injection5} & t < ${end_injection5}, 1,
if(t >= ${start_injection6} & t < ${end_injection6}, 1,
if(t >= ${start_injection7} & t < ${end_injection7}, 1,
if(t >= ${start_injection8} & t < ${end_injection8}, 1,
if(t >= ${start_injection9} & t < ${end_injection9}, 1,
if(t >= ${start_injection10} & t < ${end_injection10}, 1, 0))))))))))'
[]
[produce]
type = ParsedFunction
expression = 'if(t >= ${start_production1} & t < ${end_production1}, 1,
if(t >= ${start_production2} & t < ${end_production2}, 1,
if(t >= ${start_production3} & t < ${end_production3}, 1,
if(t >= ${start_production4} & t < ${end_production4}, 1,
if(t >= ${start_production5} & t < ${end_production5}, 1,
if(t >= ${start_production6} & t < ${end_production6}, 1,
if(t >= ${start_production7} & t < ${end_production7}, 1,
if(t >= ${start_production8} & t < ${end_production8}, 1,
if(t >= ${start_production9} & t < ${end_production9}, 1,
if(t >= ${start_production10} & t < ${end_production10}, 1, 0))))))))))'
[]
[injection_rate_value]
type = ParsedFunction
symbol_names = true_screen_area
symbol_values = true_screen_area
expression = '-${inject_fluid_mass}/(true_screen_area * ${inject_time})'
[]
[production_rate_value]
type = ParsedFunction
symbol_names = true_screen_area
symbol_values = true_screen_area
expression = '${produce_fluid_mass}/(true_screen_area * ${produce_time})'
[]
[heat_out_in_timestep]
type = ParsedFunction
symbol_names = 'dt heat_out'
symbol_values = 'dt heat_out_fromBC'
expression = 'dt*heat_out'
[]
[produced_T_time_integrated]
type = ParsedFunction
symbol_names = 'dt produced_T'
symbol_values = 'dt produced_T'
expression = 'dt*produced_T / ${produce_time}'
[]
[]
[AuxVariables]
[density]
family = MONOMIAL
order = CONSTANT
[]
[porosity]
family = MONOMIAL
order = CONSTANT
[]
[heat_flux_out]
outputs = none
[]
[]
[AuxKernels]
[density]
type = PorousFlowPropertyAux
variable = density
property = density
[]
[porosity]
type = PorousFlowPropertyAux
variable = porosity
property = porosity
[]
[]
[FluidProperties]
[true_water]
type = Water97FluidProperties
[]
[tabulated_water]
type = TabulatedFluidProperties
fp = true_water
temperature_min = 275 # K
temperature_max = 600
interpolated_properties = 'density viscosity enthalpy internal_energy'
fluid_property_file = water97_tabulated_modified.csv
[]
[]
[Materials]
[porosity_aq]
type = PorousFlowPorosityConst
porosity = ${aq_porosity}
block = aquifer
[]
[porosity_caps]
type = PorousFlowPorosityConst
porosity = ${cap_porosity}
block = caps
[]
[permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '${aq_hor_perm} 0 0 0 ${aq_ver_perm} 0 0 0 0'
[]
[permeability_caps]
type = PorousFlowPermeabilityConst
block = caps
permeability = '${cap_hor_perm} 0 0 0 ${cap_ver_perm} 0 0 0 0'
[]
[aq_internal_energy]
type = PorousFlowMatrixInternalEnergy
block = aquifer
density = ${aq_density}
specific_heat_capacity = ${aq_specific_heat_cap}
[]
[caps_internal_energy]
type = PorousFlowMatrixInternalEnergy
block = caps
density = ${cap_density}
specific_heat_capacity = ${cap_specific_heat_cap}
[]
[aq_thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
block = aquifer
dry_thermal_conductivity = '${aq_hor_dry_thermal_cond} 0 0 0 ${aq_ver_dry_thermal_cond} 0 0 0 0'
wet_thermal_conductivity = '${aq_hor_wet_thermal_cond} 0 0 0 ${aq_ver_wet_thermal_cond} 0 0 0 0'
[]
[caps_thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
block = caps
dry_thermal_conductivity = '${cap_hor_dry_thermal_cond} 0 0 0 ${cap_ver_dry_thermal_cond} 0 0 0 0'
wet_thermal_conductivity = '${cap_hor_wet_thermal_cond} 0 0 0 ${cap_ver_wet_thermal_cond} 0 0 0 0'
[]
[]
[Postprocessors]
[true_screen_area] # this accounts for meshes that do not match screen_top and screen_bottom exactly
type = AreaPostprocessor
boundary = injection_area
execute_on = 'initial'
outputs = 'none'
[]
[dt]
type = TimestepSize
[]
[heat_out_fromBC]
type = NodalSum
variable = heat_flux_out
boundary = injection_area
execute_on = 'initial timestep_end'
outputs = 'none'
[]
[heat_out_per_timestep]
type = FunctionValuePostprocessor
function = heat_out_in_timestep
execute_on = 'timestep_end'
outputs = 'none'
[]
[heat_out_cumulative]
type = CumulativeValuePostprocessor
postprocessor = heat_out_per_timestep
execute_on = 'timestep_end'
outputs = 'csv console'
[]
[produced_T]
type = SideAverageValue
boundary = injection_area
variable = temperature
execute_on = 'initial timestep_end'
outputs = 'csv console'
[]
[produced_T_time_integrated]
type = FunctionValuePostprocessor
function = produced_T_time_integrated
execute_on = 'timestep_end'
outputs = 'none'
[]
[produced_T_cumulative]
type = CumulativeValuePostprocessor
postprocessor = produced_T_time_integrated
execute_on = 'timestep_end'
outputs = 'csv console'
[]
[]
[Preconditioning]
[basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = ${end_simulation}
timestep_tolerance = 1e-5
[TimeStepper]
type = IterationAdaptiveDT
dt = 1e-3
growth_factor = 2
[]
dtmax = 1
dtmin = 1e-5
# rough calc for fluid, |R| ~ V*k*1E6 ~ V*1E-5
# rough calc for heat, |R| ~ V*(lam*1E-3 + h*1E-5) ~ V*(1E3 + 1E-2)
# so scale heat by 1E-7 and go for nl_abs_tol = 1E-4, which should give a max error of
# ~1Pa and ~0.1K in the first metre around the borehole
nl_abs_tol = 1E-4
nl_rel_tol = 1E-5
[]
[Outputs]
sync_times = ${synctimes}
[ex]
type = Exodus
time_step_interval = 20
[]
[csv]
type = CSV
execute_postprocessors_on = 'initial timestep_end'
[]
[]
(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/vectorpostprocessors/variable_value_volume_histogram/volume_histogram.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 200
xmin = -5
xmax = 5
[]
[Variables]
[c]
[InitialCondition]
type = FunctionIC
function = 'x<2&x>-2'
[]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = c
[]
[time]
type = TimeDerivative
variable = c
[]
[]
[BCs]
[all]
type = DirichletBC
variable = c
boundary = 'left right'
value = 0
[]
[]
[VectorPostprocessors]
[histo]
type = VariableValueVolumeHistogram
variable = c
min_value = 0
max_value = 1.1
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 1
solve_type = PJFNK
[]
[Outputs]
execute_on = 'initial timestep_end'
csv = 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/porous_flow/test/tests/poroperm/poro_tm.i)
# Test that porosity is correctly calculated.
# Porosity = 1 + (phi0 - 1) * exp(-vol_strain + thermal_exp_coeff * (temperature - ref_temperature))
# The parameters used are:
# phi0 = 0.5
# vol_strain = 0.5
# thermal_exp_coeff = 0.5
# temperature = 4
# ref_temperature = 3.5
# which yield porosity = 0.610599608464
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
PorousFlowDictator = dictator
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[porepressure]
initial_condition = 2
[]
[temperature]
initial_condition = 4
[]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[ICs]
[disp_x]
type = FunctionIC
function = '0.5 * x'
variable = disp_x
[]
[]
[Kernels]
[dummy_p]
type = TimeDerivative
variable = porepressure
[]
[dummy_t]
type = TimeDerivative
variable = temperature
[]
[dummy_x]
type = TimeDerivative
variable = disp_x
[]
[dummy_y]
type = TimeDerivative
variable = disp_y
[]
[dummy_z]
type = TimeDerivative
variable = disp_z
[]
[]
[AuxVariables]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[]
[]
[Postprocessors]
[porosity]
type = PointValue
variable = porosity
point = '0 0 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure temperature'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temperature
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[total_strain]
type = ComputeSmallStrain
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[porosity]
type = PorousFlowPorosity
mechanical = true
thermal = true
ensure_positive = false
porosity_zero = 0.5
thermal_expansion_coeff = 0.5
reference_temperature = 3.5
[]
[]
[Executioner]
solve_type = Newton
type = Transient
num_steps = 1
[]
[Outputs]
csv = true
[]
(test/tests/transfers/general_field/user_object/nearest_position/sub_between_diffusion.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
[]
[block1]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '0.5 0.5 0'
[]
[]
[AuxVariables]
[sent_nodal]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[received_nodal]
initial_condition = -1
[]
[sent_elem]
family = MONOMIAL
order = CONSTANT
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[received_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1
[]
[]
[UserObjects]
[sent_nodal]
type = LayeredAverage
direction = x
num_layers = 10
variable = sent_nodal
# This must happen before transfers
execute_on = INITIAL
[]
[sent_elem]
type = LayeredAverage
direction = x
num_layers = 10
variable = sent_elem
execute_on = INITIAL
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
exodus = true
hide = 'sent_nodal sent_elem'
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
[]
(test/tests/controls/control_piecewise/controlled_piecewise.i)
[Mesh]
[./generated]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = 1
nx = 10
[../]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./u]
initial_condition = 0.1
[../]
[]
[AuxVariables]
[./v]
[../]
[./x]
[../]
[]
[ICs]
[./x_ic]
type = FunctionIC
variable = x
function = 'x'
[../]
[]
[AuxKernels]
[./v_aux]
type = FunctionAux
variable = v
function = func
[../]
[]
[Controls]
[./func_control]
type = RealFunctionControl
parameter = '*/*/scale_factor'
function = '2'
execute_on = 'initial'
[../]
[]
[Materials]
[./mat]
type = PiecewiseLinearInterpolationMaterial
property = matprop
variable = x
x = '0 1'
y = '0 10'
outputs = all
[../]
[]
[Functions]
[./func]
type = PiecewiseLinear
x = '0 1'
y = '0 10'
axis = x
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(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/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
[]
(test/tests/transfers/coord_transform/both-transformed/projection/main-app.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = -1
ymax = 0
nx = 10
ny = 10
alpha_rotation = 90
[]
[Variables]
[u][]
[]
[AuxVariables]
[v][]
[v_elem]
order = CONSTANT
family = MONOMIAL
[]
[w][]
[w_elem]
order = CONSTANT
family = MONOMIAL
[]
[]
[ICs]
[w]
type = FunctionIC
function = 'cos(x)*sin(y)'
variable = w
[]
[w_elem]
type = FunctionIC
function = 'cos(x)*sin(y)'
variable = w_elem
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
verbose = true
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = 'sub-app.i'
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[from_sub]
type = MultiAppProjectionTransfer
from_multi_app = sub
source_variable = v
variable = v
execute_on = 'timestep_begin'
[]
[from_sub_elem]
type = MultiAppProjectionTransfer
from_multi_app = sub
source_variable = v_elem
variable = v_elem
execute_on = 'timestep_begin'
[]
[to_sub]
type = MultiAppProjectionTransfer
to_multi_app = sub
source_variable = w
variable = w
execute_on = 'timestep_begin'
[]
[to_sub_elem]
type = MultiAppProjectionTransfer
to_multi_app = sub
source_variable = w_elem
variable = w_elem
execute_on = 'timestep_begin'
[]
[]
(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
[]
(modules/porous_flow/test/tests/mass_conservation/mass05.i)
# Checking that the mass postprocessor correctly calculates the mass
# of each component in each phase, as well as the total mass of each
# component in all phases.
# 2phase, 2component, constant porosity
[Mesh]
type = GeneratedMesh
dim = 1
nx = 2
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[sat]
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
initial_condition = 0.3
[]
[massfrac_ph1_sp0]
initial_condition = 0.55
[]
[]
[ICs]
[pinit]
type = ConstantIC
value = 1
variable = pp
[]
[satinit]
type = FunctionIC
function = 1-x
variable = sat
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = sat
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp sat'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 1
thermal_expansion = 0
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 0.1
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = pp
phase1_saturation = sat
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[]
[Postprocessors]
[comp0_phase0_mass]
type = PorousFlowFluidMass
fluid_component = 0
phase = 0
[]
[comp0_phase1_mass]
type = PorousFlowFluidMass
fluid_component = 0
phase = 1
[]
[comp0_total_mass]
type = PorousFlowFluidMass
fluid_component = 0
[]
[comp0_total_mass2]
type = PorousFlowFluidMass
fluid_component = 0
phase = '0 1'
[]
[comp1_phase0_mass]
type = PorousFlowFluidMass
fluid_component = 1
phase = 0
[]
[comp1_phase1_mass]
type = PorousFlowFluidMass
fluid_component = 1
phase = 1
[]
[comp1_total_mass]
type = PorousFlowFluidMass
fluid_component = 1
[]
[comp1_total_mass2]
type = PorousFlowFluidMass
fluid_component = 1
phase = '0 1'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
nl_abs_tol = 1e-16
dt = 1
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = mass05
csv = true
[]
(modules/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/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/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
[]
(modules/porous_flow/examples/tutorial/06_KT.i)
# Darcy flow with a tracer
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[make3D]
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
input = annular
[]
[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'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[porepressure]
[]
[tracer_concentration]
[]
[]
[ICs]
[tracer_concentration]
type = FunctionIC
function = '0.5*if(x*x+y*y<1.01,1,0)'
variable = tracer_concentration
[]
[]
[PorousFlowFullySaturated]
porepressure = porepressure
coupling_type = Hydro
gravity = '0 0 0'
fp = the_simple_fluid
mass_fraction_vars = tracer_concentration
stabilization = KT
flux_limiter_type = superbee
[]
[BCs]
[constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1E6
boundary = injection_area
[]
[constant_outer_porepressure]
type = DirichletBC
variable = porepressure
value = 0
boundary = rmax
[]
[injected_tracer]
type = DirichletBC
variable = tracer_concentration
value = 0.5
boundary = injection_area
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
viscosity = 1.0E-3
density0 = 1000.0
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[]
[permeability_caps]
type = PorousFlowPermeabilityConst
block = caps
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-16'
[]
[]
[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 = 1E6
dt = 1E5
nl_rel_tol = 1E-14
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/flux_limited_TVD_advection/fltvd_2D.i)
# Using Flux-Limited TVD Advection ala Kuzmin and Turek, with antidiffusion from superbee flux limiting
# 2D version
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
xmin = 0
xmax = 1
ny = 4
ymin = 0
ymax = 0.5
[]
[Variables]
[tracer]
[]
[]
[ICs]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[]
[]
[Kernels]
[mass_dot]
type = MassLumpedTimeDerivative
variable = tracer
[]
[flux]
type = FluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = fluo
[]
[]
[UserObjects]
[fluo]
type = AdvectiveFluxCalculatorConstantVelocity
flux_limiter_type = superbee
u = tracer
velocity = '0.1 0 0'
[]
[]
[BCs]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_tracer]
# Ideally, an OutflowBC would be used, but that does not exist in the framework
# In 1D VacuumBC is the same as OutflowBC, with the alpha parameter being twice the velocity
type = VacuumBC
boundary = right
alpha = 0.2 # 2 * velocity
variable = tracer
[]
[]
[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'
[]
[]
[VectorPostprocessors]
[tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0.5 0'
num_points = 11
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-2
nl_abs_tol = 1E-8
nl_max_its = 500
timestep_tolerance = 1E-3
[]
[Outputs]
print_linear_residuals = false
[out]
type = CSV
execute_on = final
[]
[]
(modules/porous_flow/test/tests/poroperm/poro_thm.i)
# Test that porosity is correctly calculated.
# Porosity = biot + (phi0 - biot) * exp(-vol_strain + (biot - 1) / solid_bulk * (porepressure - ref_pressure) + thermal_exp_coeff * (temperature - ref_temperature))
# The parameters used are:
# biot = 0.7
# phi0 = 0.5
# vol_strain = 0.5
# solid_bulk = 0.3
# porepressure = 2
# ref_pressure = 3
# thermal_exp_coeff = 0.5
# temperature = 4
# ref_temperature = 3.5
# which yield porosity = 0.276599996677
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
PorousFlowDictator = dictator
displacements = 'disp_x disp_y disp_z'
biot_coefficient = 0.7
[]
[Variables]
[porepressure]
initial_condition = 2
[]
[temperature]
initial_condition = 4
[]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[ICs]
[disp_x]
type = FunctionIC
function = '0.5 * x'
variable = disp_x
[]
[]
[Kernels]
[dummy_p]
type = TimeDerivative
variable = porepressure
[]
[dummy_t]
type = TimeDerivative
variable = temperature
[]
[dummy_x]
type = TimeDerivative
variable = disp_x
[]
[dummy_y]
type = TimeDerivative
variable = disp_y
[]
[dummy_z]
type = TimeDerivative
variable = disp_z
[]
[]
[AuxVariables]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[]
[]
[Postprocessors]
[porosity]
type = PointValue
variable = porosity
point = '0 0 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure temperature'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temperature
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[total_strain]
type = ComputeSmallStrain
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[porosity]
type = PorousFlowPorosity
mechanical = true
fluid = true
thermal = true
ensure_positive = false
porosity_zero = 0.5
solid_bulk = 0.3
thermal_expansion_coeff = 0.5
reference_porepressure = 3
reference_temperature = 3.5
[]
[]
[Executioner]
solve_type = Newton
type = Transient
num_steps = 1
[]
[Outputs]
csv = true
[]
(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/navier_stokes/test/tests/finite_volume/pins/channel-flow/porosity_jump/2d-rc-epsjump.i)
mu=1.1
rho=1.1
advected_interp_method='upwind'
velocity_interp_method='rc'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '1 1'
dy = '0.5'
ix = '30 30'
iy = '20'
subdomain_id = '1 2'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
porosity = porosity
[]
[UserObjects]
[rc]
type = PINSFVRhieChowInterpolator
u = u
v = v
porosity = porosity
pressure = pressure
[]
[]
[Variables]
[u]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1
[]
[v]
type = PINSFVSuperficialVelocityVariable
initial_condition = 1e-6
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[AuxVariables]
[porosity]
type = MooseVariableFVReal
[]
[]
[ICs]
inactive = 'porosity_continuous'
[porosity_1]
type = ConstantIC
variable = porosity
block = 1
value = 1
[]
[porosity_2]
type = ConstantIC
variable = porosity
block = 2
value = 0.5
[]
[porosity_continuous]
type = FunctionIC
variable = porosity
block = '1 2'
function = smooth_jump
[]
[]
[Functions]
[smooth_jump]
type = ParsedFunction
expression = '1 - 0.5 * 1 / (1 + exp(-30*(x-1)))'
[]
[]
[FVKernels]
[mass]
type = PINSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = PINSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = PINSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = PINSFVMomentumPressure
variable = u
pressure = pressure
momentum_component = 'x'
[]
[v_advection]
type = PINSFVMomentumAdvection
variable = v
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = PINSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = PINSFVMomentumPressure
variable = v
pressure = pressure
momentum_component = 'y'
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = u
function = '1'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = v
function = 0
[]
[walls-u]
type = INSFVNaturalFreeSlipBC
boundary = 'top bottom'
variable = u
momentum_component = 'x'
[]
[walls-v]
type = INSFVNaturalFreeSlipBC
boundary = 'top bottom'
variable = v
momentum_component = 'y'
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = 0.4
[]
[]
[FunctorMaterials]
inactive = 'smooth'
[jump]
type = ADPiecewiseByBlockFunctorMaterial
prop_name = 'porosity'
subdomain_to_prop_value = '1 1
2 0.5'
[]
[smooth]
type = ADGenericFunctionFunctorMaterial
prop_names = 'porosity'
prop_values = 'smooth_jump'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-10
[]
[Postprocessors]
[inlet_p]
type = SideAverageValue
variable = 'pressure'
boundary = 'left'
[]
[outlet-u]
type = SideIntegralVariablePostprocessor
variable = u
boundary = 'right'
[]
[]
[Outputs]
exodus = true
csv = false
[]
(modules/navier_stokes/examples/laser-welding/2d.i)
endtime=5e-4 # s
timestep=${fparse endtime/100} # s
surfacetemp=300 # K
power=190 # W
R=1.8257418583505537e-4 # m
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -.45e-3 # m
xmax = 0.45e-3 # m
ymin = -.9e-4 # m
ymax = 0
nx = 25
ny = 5
displacements = 'disp_x disp_y'
[]
[GlobalParams]
temperature = T
[]
[Variables]
[vel]
family = LAGRANGE_VEC
[]
[T]
[]
[p]
[]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[vel_x_aux]
[InitialCondition]
type = ConstantIC
value = 1e-15
[]
[]
[vel_y_aux]
[InitialCondition]
type = ConstantIC
value = 1e-15
[]
[]
[]
[AuxKernels]
[vel_x_value]
type = VectorVariableComponentAux
variable = vel_x_aux
vector_variable = vel
component = x
[]
[vel_y_value]
type = VectorVariableComponentAux
variable = vel_y_aux
vector_variable = vel
component = y
[]
[]
[ICs]
[T]
type = FunctionIC
variable = T
function = '(${surfacetemp} - 300) / .7e-3 * y + ${surfacetemp}'
[]
[]
[Kernels]
[disp_x]
type = Diffusion
variable = disp_x
[]
[disp_y]
type = Diffusion
variable = disp_y
[]
[mass]
type = INSADMass
variable = p
use_displaced_mesh = true
[]
[mass_pspg]
type = INSADMassPSPG
variable = p
use_displaced_mesh = true
[]
[momentum_time]
type = INSADMomentumTimeDerivative
variable = vel
use_displaced_mesh = true
[]
[momentum_advection]
type = INSADMomentumAdvection
variable = vel
use_displaced_mesh = true
[]
[momentum_mesh_advection]
type = INSADMomentumMeshAdvection
variable = vel
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = vel
use_displaced_mesh = true
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = vel
pressure = p
integrate_p_by_parts = true
use_displaced_mesh = true
[]
[momentum_supg]
type = INSADMomentumSUPG
variable = vel
material_velocity = relative_velocity
use_displaced_mesh = true
[]
[temperature_time]
type = INSADHeatConductionTimeDerivative
variable = T
use_displaced_mesh = true
[]
[temperature_advection]
type = INSADEnergyAdvection
variable = T
use_displaced_mesh = true
[]
[temperature_mesh_advection]
type = INSADEnergyMeshAdvection
variable = T
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
[]
[temperature_conduction]
type = ADHeatConduction
variable = T
thermal_conductivity = 'k'
use_displaced_mesh = true
[]
[temperature_supg]
type = INSADEnergySUPG
variable = T
velocity = vel
use_displaced_mesh = true
[]
[]
[BCs]
[x_no_disp]
type = DirichletBC
variable = disp_x
boundary = 'bottom'
value = 0
[]
[y_no_disp]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[]
[no_slip]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'bottom right left'
[]
[T_cold]
type = DirichletBC
variable = T
boundary = 'bottom'
value = 300
[]
[radiation_flux]
type = FunctionRadiativeBC
variable = T
boundary = 'top'
emissivity_function = '1'
Tinfinity = 300
stefan_boltzmann_constant = 5.67e-8
use_displaced_mesh = true
[]
[weld_flux]
type = GaussianEnergyFluxBC
variable = T
boundary = 'top'
P0 = ${power}
R = ${R}
x_beam_coord = '-0.35e-3 +0.7e-3*t/${endtime}'
y_beam_coord = '0'
use_displaced_mesh = true
[]
[vapor_recoil]
type = INSADVaporRecoilPressureMomentumFluxBC
variable = vel
boundary = 'top'
use_displaced_mesh = true
[]
[displace_x_top]
type = INSADDisplaceBoundaryBC
boundary = 'top'
variable = 'disp_x'
velocity = 'vel'
component = 0
associated_subdomain = 0
[]
[displace_y_top]
type = INSADDisplaceBoundaryBC
boundary = 'top'
variable = 'disp_y'
velocity = 'vel'
component = 1
associated_subdomain = 0
[]
[displace_x_top_dummy]
type = INSADDummyDisplaceBoundaryIntegratedBC
boundary = 'top'
variable = 'disp_x'
velocity = 'vel'
component = 0
[]
[displace_y_top_dummy]
type = INSADDummyDisplaceBoundaryIntegratedBC
boundary = 'top'
variable = 'disp_y'
velocity = 'vel'
component = 1
[]
[]
[Materials]
[ins_mat]
type = INSADStabilized3Eqn
velocity = vel
pressure = p
temperature = T
use_displaced_mesh = true
[]
[steel]
type = AriaLaserWeld304LStainlessSteel
temperature = T
beta = 1e7
use_displaced_mesh = true
[]
[steel_boundary]
type = AriaLaserWeld304LStainlessSteelBoundary
boundary = 'top'
temperature = T
use_displaced_mesh = true
[]
[const]
type = GenericConstantMaterial
prop_names = 'abs sb_constant'
prop_values = '1 5.67e-8'
use_displaced_mesh = true
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO strumpack'
[]
[]
[Executioner]
type = Transient
end_time = ${endtime}
dtmin = 1e-8
dtmax = ${timestep}
petsc_options = '-snes_converged_reason -ksp_converged_reason -options_left'
solve_type = 'NEWTON'
line_search = 'none'
nl_max_its = 12
l_max_its = 100
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 7
dt = ${timestep}
linear_iteration_ratio = 1e6
growth_factor = 1.5
[]
[]
[Outputs]
[exodus]
type = Exodus
output_material_properties = true
show_material_properties = 'mu'
[]
checkpoint = true
perf_graph = true
[]
[Debug]
show_var_residual_norms = true
[]
[Adaptivity]
marker = combo
max_h_level = 4
[Indicators]
[error_T]
type = GradientJumpIndicator
variable = T
[]
[error_dispz]
type = GradientJumpIndicator
variable = disp_y
[]
[]
[Markers]
[errorfrac_T]
type = ErrorFractionMarker
refine = 0.4
coarsen = 0.2
indicator = error_T
[]
[errorfrac_dispz]
type = ErrorFractionMarker
refine = 0.4
coarsen = 0.2
indicator = error_dispz
[]
[combo]
type = ComboMarker
markers = 'errorfrac_T errorfrac_dispz'
[]
[]
[]
[Postprocessors]
[num_dofs]
type = NumDOFs
system = 'NL'
[]
[nl]
type = NumNonlinearIterations
[]
[tot_nl]
type = CumulativeValuePostprocessor
postprocessor = 'nl'
[]
[]
(modules/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/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/userobjects/shape_element_user_object/jacobian.i)
[GlobalParams]
use_displaced_mesh = true
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 2
parallel_type = replicated
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = (x-0.5)^2
[../]
[../]
[./v]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = (x-0.5)^2
[../]
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[./shape_w]
type = ExampleShapeElementKernel
user_object = example_uo
v = v
variable = u
[../]
[./time_u]
type = TimeDerivative
variable = u
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[]
[UserObjects]
[./example_uo]
type = ExampleShapeElementUserObject
u = u
v = v
# as this userobject computes quantities for both the residual AND the jacobian
# it needs to have these execute_on flags set.
execute_on = 'linear nonlinear'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
#full = true
off_diag_row = 'u'
off_diag_column = 'v'
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 0.1
num_steps = 2
[]
[Outputs]
exodus = true
perf_graph = true
[]
(test/tests/misc/check_error/function_file_test12.i)
# Test for usage of missing function
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic_function
[../]
[../]
[]
[Functions]
[./ic_function]
type = PiecewiseLinear
data_file = piecewise_linear_columns_more_data.csv
format = columns
xy_in_file_only = false
y_index_in_file = 3 #Will generate error because data does not contain 4 columns
scale_factor = 1.0
[../]
[]
[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'
[]
[Outputs]
file_base = out
[]
(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
[]
(modules/solid_mechanics/test/tests/CylindricalRankTwoAux/test.i)
[Mesh]
[file_mesh]
type = FileMeshGenerator
file = circle.e
[]
[cnode]
type = ExtraNodesetGenerator
coord = '1000.0 0.0'
new_boundary = 10
input = file_mesh
[]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[AuxVariables]
[./T]
[../]
[./stress_rr]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_tt]
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./T_IC]
type = FunctionIC
variable = T
function = '1000-0.7*sqrt(x^2+y^2)'
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y'
[../]
[]
[AuxKernels]
[./stress_rr]
type = CylindricalRankTwoAux
variable = stress_rr
rank_two_tensor = stress
index_j = 0
index_i = 0
center_point = '0 0 0'
[../]
[./stress_tt]
type = CylindricalRankTwoAux
variable = stress_tt
rank_two_tensor = stress
index_j = 1
index_i = 1
center_point = '0 0 0'
[../]
[]
[BCs]
[./outer_x]
type = DirichletBC
variable = disp_x
boundary = 2
value = 0
[../]
[./outer_y]
type = DirichletBC
variable = disp_y
boundary = '2 10'
value = 0
[../]
[]
[Materials]
[./iso_C]
type = ComputeElasticityTensor
fill_method = symmetric_isotropic
C_ijkl = '2.15e5 0.74e5'
block = 1
[../]
[./strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y'
block = 1
eigenstrain_names = eigenstrain
[../]
[./stress]
type = ComputeLinearElasticStress
block = 1
[../]
[./thermal_strain]
type= ComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 1e-6
temperature = T
stress_free_temperature = 273
block = 1
eigenstrain_name = eigenstrain
[../]
[]
[Executioner]
type = Steady
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 = 10
nl_abs_tol = 1e-9
nl_rel_tol = 1e-14
l_tol = 1e-4
[]
[Outputs]
exodus = true
perf_graph = true
[]
(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
[]
(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
[]
(test/tests/functions/solution_function/solution_function_rot2.i)
# checking rotation of points by 45 deg about y axis in a SolutionUserObject
[Mesh]
# this is chosen so when i rotate through 45deg i get a length of "1" along the x or y or z direction
type = GeneratedMesh
dim = 3
xmin = -0.70710678
xmax = 0.70710678
nx = 3
ymin = -0.70710678
ymax = 0.70710678
ny = 3
zmin = -0.70710678
zmax = 0.70710678
nz = 3
[]
[UserObjects]
[./solution_uo]
type = SolutionUserObject
mesh = cube_with_u_equals_x.e
timestep = 1
system_variables = u
rotation0_vector = '0 1 0'
rotation0_angle = 45
transformation_order = rotation0
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./u_init]
type = FunctionIC
variable = u
function = solution_fcn
[../]
[]
[Functions]
[./solution_fcn]
type = SolutionFunction
from_variable = u
solution = solution_uo
[../]
[]
[Kernels]
[./diff]
type = TimeDerivative
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
l_max_its = 800
nl_rel_tol = 1e-10
num_steps = 1
end_time = 1
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = solution_function_rot2
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
[]
(test/tests/functions/solution_function/solution_function_rot3.i)
# checking rotation of points by 90 deg about z axis, then 45 deg about x axis in a SolutionUserObject
[Mesh]
# this is chosen so when i rotate through 45deg i get a length of "1" along the x or y or z direction
type = GeneratedMesh
dim = 3
xmin = -0.70710678
xmax = 0.70710678
nx = 3
ymin = -0.70710678
ymax = 0.70710678
ny = 3
zmin = -0.70710678
zmax = 0.70710678
nz = 3
[]
[UserObjects]
[./solution_uo]
type = SolutionUserObject
mesh = cube_with_u_equals_x.e
timestep = 1
system_variables = u
# the following takes:
# (0.7, 0.7, +/-0.7) -> (-0.7, 0.7, +/-0.7)
# (-0.7, 0.7, +/-0.7) -> (-0.7, -0.7, +/-0.7)
# (0.7, -0.7, +/-0.7) -> (0.7, 0.7, +/-0.7)
# (-0.7, -0.7, +/-0.7) -> (0.7, -0.7, +/-0.7)
rotation0_vector = '0 0 1'
rotation0_angle = 90
# then the following takes:
# (+/-0.7, 0.7, 0.7) -> (+/-0.7, 0, 1)
# (+/-0.7, 0.7, -0.7) -> (+/-0.7, 1, 0)
# (+/-0.7, -0.7, 0.7) -> (+/-0.7, -1, 0)
# (+/-0.7, -0.7, -0.7) -> (+/-0.7, 0, -1)
rotation1_vector = '1 0 0'
rotation1_angle = 45
# so, in total: a point y = +/-0.7 takes values from x = -/+0.7, so solution_function_rot3 should have u = -y
transformation_order = 'rotation0 rotation1'
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./u_init]
type = FunctionIC
variable = u
function = solution_fcn
[../]
[]
[Functions]
[./solution_fcn]
type = SolutionFunction
from_variable = u
solution = solution_uo
[../]
[]
[Kernels]
[./diff]
type = TimeDerivative
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
l_max_its = 800
nl_rel_tol = 1e-10
num_steps = 1
end_time = 1
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = solution_function_rot3
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
[]
(test/tests/postprocessors/side_advection_flux_integral/side_advection_flux_integral.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '0.75 0.75 0.75'
dy = '0.75 0.75 0.75'
ix = '2 2 2'
iy = '2 2 2'
subdomain_id = '1 1 1
1 2 1
1 1 1'
[]
[add_inner_boundaries_top]
type = SideSetsAroundSubdomainGenerator
input = cmg
new_boundary = 'block_2_top'
block = 2
normal = '0 1 0'
[]
[add_inner_boundaries_bot]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_top
new_boundary = 'block_2_bot'
block = 2
normal = '0 -1 0'
[]
[add_inner_boundaries_right]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_bot
new_boundary = 'block_2_right'
block = 2
normal = '1 0 0'
[]
[add_inner_boundaries_left]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_right
new_boundary = 'block_2_left'
block = 2
normal = '-1 0 0'
[]
[]
[Variables]
[u]
[]
[]
[ICs]
[u_blob]
type = FunctionIC
variable = u
function = 'if(x<0.75,if(y<0.75,1,0),0)'
[]
[]
[Kernels]
[udot]
type = MassLumpedTimeDerivative
variable = u
[]
[u_advec]
type = ConservativeAdvection
variable = u
upwinding_type = full
velocity = '2 1.5 0'
[]
[]
[BCs]
[outflow]
type = OutflowBC
boundary = 'right top'
variable = u
velocity = '2 1.5 0'
[]
[]
[AuxVariables]
[flux_x]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[flux_x]
type = AdvectiveFluxAux
variable = flux_x
vel_x = 2
vel_y = 1.5
component = x
advected_variable = u
boundary = 'block_2_right block_2_left'
[]
[]
[Executioner]
type = Transient
solve_type = LINEAR
dt = 0.01
end_time = 0.02
l_tol = 1E-14
[]
[Postprocessors]
[flux_right]
type = SideIntegralVariablePostprocessor
variable = flux_x
boundary = 'block_2_right'
[]
[flux_right_exact]
type = SideAdvectiveFluxIntegral
boundary = 'block_2_right'
vel_x = 2
vel_y = 1.5
component = x
advected_variable = u
[]
[flux_left]
type = SideIntegralVariablePostprocessor
variable = flux_x
boundary = 'block_2_left'
[]
[flux_left_exact]
type = SideAdvectiveFluxIntegral
boundary = 'block_2_left'
vel_x = 2
vel_y = 1.5
component = x
advected_variable = u
[]
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/auxkernels/liquid-fraction-aux/liquid-fraction-fv-aux.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 5
[]
[]
[AuxVariables]
[fl]
type = MooseVariableFVReal
[]
[T]
type = MooseVariableFVReal
[]
[]
[ICs]
[FunctionIC]
type = FunctionIC
variable = T
function = '10 + x'
[]
[]
[AuxKernels]
[liquid_fraction]
type = NSLiquidFractionAux
variable = fl
temperature = T
T_liquidus = 20
T_solidus = 10
[]
[]
[VectorPostprocessors]
[T]
type = LineValueSampler
start_point = '0.1 0 0'
end_point = '0.9 0 0'
num_points = 5
variable = T
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
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(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/userobjects/pointwise_renormalize_vector/test.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[]
[Variables]
[v_x]
[]
[v_y]
[]
[]
[ICs]
[v_x]
type = FunctionIC
variable = v_x
function = sin(2*y*pi)
[]
[v_y]
type = FunctionIC
variable = v_y
function = cos(2*x*pi)
[]
[]
[Kernels]
[diff_x]
type = Diffusion
variable = v_x
[]
[dt_x]
type = TimeDerivative
variable = v_x
[]
[diff_y]
type = Diffusion
variable = v_y
[]
[dt_y]
type = TimeDerivative
variable = v_y
[]
[]
[UserObjects]
[renormalize]
type = PointwiseRenormalizeVector
v = 'v_x v_y'
execute_on = TIMESTEP_END
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
dt = 0.01
num_steps = 10
[]
[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/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/porous_flow/test/tests/energy_conservation/except02.i)
# checking that the heat-energy postprocessor throws the correct error if the kernel_variable_number is illegal
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[temp]
[]
[]
[ICs]
[tinit]
type = FunctionIC
function = '100*x'
variable = temp
[]
[pinit]
type = FunctionIC
function = x
variable = pp
[]
[]
[Kernels]
[dummyt]
type = TimeDerivative
variable = temp
[]
[dummyp]
type = TimeDerivative
variable = pp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp 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
viscosity = 0.001
thermal_expansion = 0
cv = 1.3
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 2.2
density = 0.5
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[]
[Postprocessors]
[total_heat]
type = PorousFlowHeatEnergy
kernel_variable_number = 2
[]
[rock_heat]
type = PorousFlowHeatEnergy
[]
[fluid_heat]
type = PorousFlowHeatEnergy
include_porous_skeleton = false
phase = 0
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1 1 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = except01
csv = 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/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
[]
(modules/geochemistry/test/tests/kernels/time_deriv_2.i)
# A point-source is added to fluid in a material with spatially-varying porosity
# porosity * d(concentration)/dt = 3.0 * delta(x - 1.0)
# where delta is the Dirac delta function (a ConstantPointSource DiracKernel)
# The solution, at x = 1.0 is
# concentration = concentration_old + 3 * dt / porosity
# while concentration is unchanged elsewhere.
# Note that since GeochemistryTimeDerivative is mass-lumped, it produces this solution.
# If mass lumping had not been used, concentration would have decreased at x != 1.0
[Mesh]
type = GeneratedMesh
dim = 1
nx = 2
xmax = 2
[]
[Variables]
[conc]
[]
[]
[Kernels]
[dot]
type = GeochemistryTimeDerivative
porosity = porosity
variable = conc
[]
[]
[DiracKernels]
[source]
type = ConstantPointSource
point = '1.0 0 0'
variable = conc
value = 12.0
[]
[]
[ICs]
[conc]
type = FunctionIC
function = 'x * x'
variable = conc
[]
[]
[AuxVariables]
[porosity]
[]
[expected]
[]
[should_be_zero]
[]
[]
[AuxKernels]
[porosity]
type = FunctionAux
function = '6.0 + x'
variable = porosity
[]
[expected]
type = FunctionAux
function = 'if(x > 0.5 & x < 1.5, x * x + 2.0 * 12.0 / (6.0 + x), x * x)'
variable = expected
[]
[should_be_zero]
type = ParsedAux
coupled_variables = 'expected conc'
expression = 'expected - conc'
variable = should_be_zero
[]
[]
[Postprocessors]
[error]
type = NodalL2Norm
variable = should_be_zero
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 2
end_time = 2
[]
[Outputs]
csv = true
[]
(modules/phase_field/test/tests/grain_boundary_area/diagonal.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
ny = 100
xmin = 0
xmax = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Variables]
[./gr0]
[./InitialCondition]
type = FunctionIC
function = 'd:=(x-y)*80;if(d<pi&d>-pi,sin(d/2)/2+0.5,if(d<0,0,1))'
[../]
[../]
[./gr1]
[./InitialCondition]
type = FunctionIC
function = 'd:=(x-y)*80;1-if(d<pi&d>-pi,sin(d/2)/2+0.5,if(d<0,0,1))'
[../]
[../]
[]
[Postprocessors]
[./area]
type = GrainBoundaryArea
grains_per_side = 2
[../]
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
csv = true
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/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/navier_stokes/examples/laser-welding/2d-fv.i)
period=.2e-4 # s
endtime=${fparse 3 * period} # s
timestep=${fparse period / 100} # s
surfacetemp=2700 # K
bottomtemp=2700 # K
sb=5.67e-8 # W/(m^2 K^4)
advected_interp_method='upwind'
velocity_interp_method='rc'
rho='rho'
mu='mu'
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -.7e-3 # m
xmax = 0.7e-3 # m
ymin = -.35e-3 # m
ymax = 0
nx = 75
ny = 20
displacements = 'disp_x disp_y'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = vel_x
v = vel_y
pressure = pressure
use_displaced_mesh = true
disp_x = disp_x
disp_y = disp_y
[]
[]
[Problem]
extra_tag_vectors = 'e_time e_advection e_conduction e_laser e_radiation e_mesh_advection'
[]
[AuxVariables]
[mu_out]
type = MooseVariableFVReal
[]
[e_time]
type = MooseVariableFVReal
[]
[e_advection]
type = MooseVariableFVReal
[]
[e_mesh_advection]
type = MooseVariableFVReal
[]
[e_conduction]
type = MooseVariableFVReal
[]
[e_laser]
type = MooseVariableFVReal
[]
[e_radiation]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[mu_out]
type = FunctorAux
functor = mu
variable = mu_out
execute_on = timestep_end
[]
[e_time]
variable = e_time
vector_tag = e_time
v = T
execute_on = 'timestep_end'
type = TagVectorAux
[]
[e_advection]
variable = e_advection
vector_tag = e_advection
v = T
execute_on = 'timestep_end'
type = TagVectorAux
[]
[e_mesh_advection]
variable = e_mesh_advection
vector_tag = e_mesh_advection
v = T
execute_on = 'timestep_end'
type = TagVectorAux
[]
[e_conduction]
variable = e_conduction
vector_tag = e_conduction
v = T
execute_on = 'timestep_end'
type = TagVectorAux
[]
[e_laser]
variable = e_laser
vector_tag = e_laser
v = T
execute_on = 'timestep_end'
type = TagVectorAux
[]
[e_radiation]
variable = e_radiation
vector_tag = e_radiation
v = T
execute_on = 'timestep_end'
type = TagVectorAux
[]
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
[]
[vel_y]
type = INSFVVelocityVariable
[]
[T]
type = INSFVEnergyVariable
[]
[pressure]
type = INSFVPressureVariable
[]
[disp_x]
[]
[disp_y]
[]
[]
[ICs]
[T]
type = FunctionIC
variable = T
function = '${surfacetemp} + ((${surfacetemp} - ${bottomtemp}) / .35e-3) * y'
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
diffusivity = 1e6
[]
[disp_y]
type = MatDiffusion
variable = disp_y
diffusivity = 1e6
[]
[]
[FVKernels]
# pressure equation
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
use_displaced_mesh = true
boundaries_to_force = top
[]
# momentum equations
# u equation
[u_time]
type = INSFVMomentumTimeDerivative
variable = vel_x
rho = ${rho}
momentum_component = 'x'
use_displaced_mesh = true
[]
[u_advection]
type = INSFVMomentumAdvection
variable = vel_x
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
use_displaced_mesh = true
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = vel_x
mu = ${mu}
momentum_component = 'x'
use_displaced_mesh = true
[]
[u_pressure]
type = INSFVMomentumPressureFlux
variable = vel_x
momentum_component = 'x'
pressure = pressure
use_displaced_mesh = true
[]
[u_mesh_advection_volumetric]
type = INSFVMomentumMeshAdvection
variable = vel_x
momentum_component = 'x'
rho = ${rho}
disp_x = disp_x
disp_y = disp_y
add_to_a = false
use_displaced_mesh = true
[]
# v equation
[v_time]
type = INSFVMomentumTimeDerivative
variable = vel_y
rho = ${rho}
momentum_component = 'y'
use_displaced_mesh = true
[]
[v_advection]
type = INSFVMomentumAdvection
variable = vel_y
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
use_displaced_mesh = true
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = vel_y
mu = ${mu}
momentum_component = 'y'
use_displaced_mesh = true
[]
[v_pressure]
type = INSFVMomentumPressureFlux
variable = vel_y
momentum_component = 'y'
pressure = pressure
use_displaced_mesh = true
[]
[v_mesh_advection_volumetric]
type = INSFVMomentumMeshAdvection
variable = vel_y
momentum_component = 'y'
rho = ${rho}
disp_x = disp_x
disp_y = disp_y
add_to_a = false
use_displaced_mesh = true
[]
# energy equation
[temperature_time]
type = INSFVEnergyTimeDerivative
variable = T
rho = ${rho}
dh_dt = dh_dt
use_displaced_mesh = true
extra_vector_tags = 'e_time'
[]
[temperature_advection]
type = INSFVEnergyAdvection
variable = T
use_displaced_mesh = true
extra_vector_tags = 'e_advection'
[]
[temperature_conduction]
type = FVDiffusion
coeff = 'k'
variable = T
use_displaced_mesh = true
extra_vector_tags = 'e_conduction'
[]
[temperature_mesh_advection_volumetric]
type = INSFVMeshAdvection
variable = T
rho = ${rho}
disp_x = disp_x
disp_y = disp_y
advected_quantity = 'h'
use_displaced_mesh = true
extra_vector_tags = 'e_mesh_advection'
[]
[]
[FVBCs]
# momentum boundary conditions
[no_slip_x]
type = INSFVNoSlipWallBC
variable = vel_x
boundary = 'bottom right left'
function = 0
[]
[no_slip_y]
type = INSFVNoSlipWallBC
variable = vel_y
boundary = 'bottom right left'
function = 0
[]
[vapor_recoil_x]
type = INSFVVaporRecoilPressureMomentumFluxBC
variable = vel_x
boundary = 'top'
momentum_component = 'x'
rc_pressure = rc_pressure
use_displaced_mesh = true
[]
[vapor_recoil_y]
type = INSFVVaporRecoilPressureMomentumFluxBC
variable = vel_y
boundary = 'top'
momentum_component = 'y'
rc_pressure = rc_pressure
use_displaced_mesh = true
[]
# energy boundary conditions
[T_cold]
type = FVDirichletBC
variable = T
boundary = 'bottom'
value = '${bottomtemp}'
[]
[radiation_flux]
type = FVFunctorRadiativeBC
variable = T
boundary = 'top'
emissivity = '1'
Tinfinity = 300
stefan_boltzmann_constant = ${sb}
use_displaced_mesh = true
extra_vector_tags = 'e_radiation'
[]
[weld_flux]
type = FVGaussianEnergyFluxBC
variable = T
boundary = 'top'
P0 = 159.96989792079225
R = 1.25e-4
x_beam_coord = '2e-4 * sin(t * 2 * pi / ${period})'
y_beam_coord = 0
z_beam_coord = 0
use_displaced_mesh = true
extra_vector_tags = 'e_laser'
[]
[]
[BCs]
# displacement boundary conditions
[x_no_disp]
type = DirichletBC
variable = disp_x
boundary = 'bottom'
value = 0
[]
[y_no_disp]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[]
[displace_x_top]
type = INSADDisplaceBoundaryBC
boundary = 'top'
variable = 'disp_x'
velocity = 'vel'
component = 0
associated_subdomain = 0
[]
[displace_y_top]
type = INSADDisplaceBoundaryBC
boundary = 'top'
variable = 'disp_y'
velocity = 'vel'
component = 1
associated_subdomain = 0
[]
[displace_x_top_dummy]
type = INSADDummyDisplaceBoundaryIntegratedBC
boundary = 'top'
variable = 'disp_x'
velocity = 'vel'
component = 0
[]
[displace_y_top_dummy]
type = INSADDummyDisplaceBoundaryIntegratedBC
boundary = 'top'
variable = 'disp_y'
velocity = 'vel'
component = 1
[]
[]
[FunctorMaterials]
[steel]
type = AriaLaserWeld304LStainlessSteelFunctorMaterial
temperature = T
beta = 1e7
[]
[disp_vec_value_and_dot]
type = ADGenericVectorFunctorMaterial
prop_names = 'disp_vec'
prop_values = 'disp_x disp_y 0'
[]
[vel]
type = ADGenericVectorFunctorMaterial
prop_names = 'vel'
prop_values = 'vel_x vel_y 0'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type -mat_mffd_err'
petsc_options_value = 'lu NONZERO strumpack 1e-6'
[]
[]
[Executioner]
type = Transient
end_time = ${endtime}
dtmin = 1e-8
dtmax = ${timestep}
petsc_options = '-snes_converged_reason -ksp_converged_reason -options_left'
solve_type = 'PJFNK'
line_search = 'none'
nl_max_its = 12
l_max_its = 100
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 7
dt = ${timestep}
linear_iteration_ratio = 1e6
growth_factor = 1.1
[]
[]
[Outputs]
exodus = true
csv = true
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[laser_flux]
type = TagVectorSum
vector = 'e_laser'
[]
[volume_rho_cp_dT]
type = TagVectorSum
vector = 'e_time'
[]
[conduction]
type = TagVectorSum
vector = 'e_conduction'
[]
[advection]
type = TagVectorSum
vector = 'e_advection'
[]
[mesh_advection]
type = TagVectorSum
vector = 'e_mesh_advection'
[]
[radiation]
type = TagVectorSum
vector = 'e_radiation'
[]
[total_sum]
type = ParsedPostprocessor
expression = 'laser_flux + volume_rho_cp_dT + advection + mesh_advection + conduction + radiation'
pp_names = 'laser_flux volume_rho_cp_dT advection mesh_advection conduction radiation'
[]
[]
(test/tests/auxkernels/solution_aux/aux_nonlinear_solution_adapt_xda.i)
[Mesh]
# This test uses SolutionUserObject which doesn't work with DistributedMesh.
type = FileMesh
file = aux_nonlinear_solution_adapt_out_0004_mesh.xda
parallel_type = replicated
[]
[Adaptivity]
marker = error_frac
steps = 2
[./Indicators]
[./jump_indicator]
type = GradientJumpIndicator
variable = u
[../]
[../]
[./Markers]
[./error_frac]
type = ErrorFractionMarker
indicator = jump_indicator
refine = 0.7
[../]
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./u_aux]
[../]
[]
[Functions]
[./u_xda_func]
type = SolutionFunction
solution = xda_u
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./aux_xda_kernel]
type = SolutionAux
variable = u_aux
solution = xda_u_aux
execute_on = initial
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 2
[../]
[]
[UserObjects]
[./xda_u_aux]
type = SolutionUserObject
system = aux0
mesh = aux_nonlinear_solution_adapt_out_0004_mesh.xda
es = aux_nonlinear_solution_adapt_out_0004.xda
system_variables = u_aux
execute_on = initial
[../]
[./xda_u]
type = SolutionUserObject
system = nl0
mesh = aux_nonlinear_solution_adapt_out_0004_mesh.xda
es = aux_nonlinear_solution_adapt_out_0004.xda
system_variables = u
execute_on = initial
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_rel_tol = 1e-10
[]
[Outputs]
exodus = true
[]
[ICs]
[./u_func_ic]
function = u_xda_func
variable = u
type = FunctionIC
[../]
[]
(test/tests/scaling/residual-based/residual-based-two-var.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = '1000 * (1 - x)'
[]
[v]
type = FunctionIC
variable = v
function = '1e-3 * (1 - x)'
[]
[]
[Variables]
[u][]
[v][]
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
extra_vector_tags = 'ref'
[../]
[rxn]
type = PReaction
power = 2
variable = u
extra_vector_tags = 'ref'
[]
[./diff_v]
type = Diffusion
variable = v
extra_vector_tags = 'ref'
[../]
[rxn_v]
type = PReaction
power = 2
variable = v
extra_vector_tags = 'ref'
[]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 1000
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 0
[../]
[./left_v]
type = DirichletBC
variable = v
boundary = left
value = 1e-3
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
verbose = true
automatic_scaling = true
resid_vs_jac_scaling_param = 1
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/numerical_diffusion/fltvd_none.i)
# Using Flux-Limited TVD Advection ala Kuzmin and Turek
# No antidiffusion, so this is identical to full-upwinding
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = 0
xmax = 1
[]
[Variables]
[tracer]
[]
[]
[ICs]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[]
[]
[Kernels]
[mass_dot]
type = MassLumpedTimeDerivative
variable = tracer
[]
[flux]
type = FluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = fluo
[]
[]
[UserObjects]
[fluo]
type = AdvectiveFluxCalculator
flux_limiter_type = none
u = tracer
velocity = '0.1 0 0'
[]
[]
[BCs]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_tracer]
# Ideally, an OutflowBC would be used, but that does not exist in the framework
# In 1D VacuumBC is the same as OutflowBC, with the alpha parameter being twice the velocity
type = VacuumBC
boundary = right
alpha = 0.2 # 2 * velocity
variable = tracer
[]
[]
[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'
[]
[]
[VectorPostprocessors]
[tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 101
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-1
nl_abs_tol = 1E-8
nl_max_its = 500
timestep_tolerance = 1E-3
[]
[Outputs]
csv = true
execute_on = final
[]
(modules/phase_field/test/tests/boundary_intersecting_features/boundary_intersecting_features.i)
[Mesh]
# ImageMesh ignores nx, xmin, xmax (and similarly for y and z) and
# tries to read them from the image file...
type = ImageMesh
dim = 2
# Be sure to choose a corresponding image name below!
# file = image001_cropped3_closing_298.png # full size, 157 Mb Exodus file!
# file = eighth_image001_cropped3_closing_298.png # 1/8
file = sixteenth_image001_cropped3_closing_298.png # 1/16
# Uncomment to maintain 1:1 ratio between number of pixels and mesh size.
# scale_to_one = false
# Uncomment to set cells_per_pixel to something other than the default value of 1.0.
# Must be <= 1.
# cells_per_pixel = .75
# To crop an image to e.g. 1/8th size, install ImageMagick and run:
# convert image001_cropped3_closing_298.png -crop 230x198+100+100 eighth_image001_cropped3_closing_298.png
# Note: Do not use 'sips' on OSX to crop! It actually interpolates
# the colors in the image instead of just cropping.
[]
[Variables]
[./u]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxVariables]
[./grain_auxvar]
order = CONSTANT
family = MONOMIAL
[../]
[./centroids]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./nodal_flood_aux]
variable = grain_auxvar
type = FeatureFloodCountAux
flood_counter = flood_count_pp
execute_on = 'initial timestep_end'
[../]
[./centroids]
type = FeatureFloodCountAux
variable = centroids
flood_counter = flood_count_pp
field_display = CENTROID
execute_on = 'initial timestep_end'
[../]
[]
[Functions]
[./tif]
# ImageFunction gets its file range parameters from ImageMesh,
# when it is present. This prevents duplicating information in
# input files.
type = ImageFunction
# In these sample images the features we want to analyze are RED (or close to pure red). The
# background is BLUE so we can easily distinguish between the two by selecting only the red channel.
component = 0
[../]
[]
[ICs]
[./u_ic]
type = FunctionIC
function = tif
variable = u
[../]
[]
[Postprocessors]
[./flood_count_pp]
type = FeatureFloodCount
variable = u
threshold = 1.0
compute_var_to_feature_map = true
execute_on = 'initial timestep_end'
[../]
[]
[VectorPostprocessors]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = flood_count_pp
execute_on = 'initial timestep_end'
[../]
[]
[Problem]
type = FEProblem
solve = false
[../]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(modules/phase_field/test/tests/free_energy_material/IdealGasFreeEnergy.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
elem_type = QUAD4
[]
[Variables]
[./c]
[./InitialCondition]
type = FunctionIC
function = x*0.4+0.001
[../]
[../]
[./T]
[./InitialCondition]
type = FunctionIC
function = y*1999+1
[../]
[../]
[]
[Materials]
[./free_energy]
type = IdealGasFreeEnergy
property_name = Fgas
m = 134 # Xenon
omega = 41
c = c
T = T
outputs = exodus
[../]
[]
[Problem]
solve = false
kernel_coverage_check = false
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
exodus = true
[]
(test/tests/functions/image_function/flip_quad.i)
[Mesh]
uniform_refine = 1
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 20
xmax = 2
ymax = 2
[]
# Define block IDs for the four quadrants in CCW order:
# 1=top_right
# 2=top_left
# 3=bottom_left
# 4=bottom_right
[top_right_modifier]
input = gen
type = SubdomainBoundingBoxGenerator
top_right = '2 2 0'
bottom_left = '1 1 0'
block_id = 1
[]
[top_left_modifier]
input = top_right_modifier
type = SubdomainBoundingBoxGenerator
top_right = '1 2 0'
bottom_left = '0 1 0'
block_id = 2
[]
[bottom_left_modifier]
input = top_left_modifier
type = SubdomainBoundingBoxGenerator
top_right = '1 1 0'
bottom_left = '0 0 0'
block_id = 3
[]
[bottom_right_modifier]
input = bottom_left_modifier
type = SubdomainBoundingBoxGenerator
top_right = '2 1 0'
bottom_left = '1 0 0'
block_id = 4
[]
[]
[Variables]
[u]
family = MONOMIAL
order = CONSTANT
[]
[]
[Functions]
[bottom_left_func]
type = ImageFunction
file_base = stack/test
flip_x = true
file_range = '0' # file_range is a vector input, a single entry means "read only 1 file"
file_suffix = png
origin = '0 0 0'
dimensions = '1 1 0'
[]
[top_left_func]
type = ImageFunction
file_base = stack/test
file_range = '0' # file_range is a vector input, a single entry means "read only 1 file"
file_suffix = png
origin = '0 1 0'
dimensions = '1 1 0'
flip_x = true
flip_y = true
[]
[top_right_func]
type = ImageFunction
origin = '1 1 0'
file_base = stack/test
file_suffix = png
flip_y = true
file_range = '0' # file_range is a vector input, a single entry means "read only 1 file"
dimensions = '1 1 0'
[]
[bottom_right_func]
type = ImageFunction
origin = '1 0 0'
file_base = stack/test
file_range = '0' # file_range is a vector input, a single entry means "read only 1 file"
file_suffix = png
dimensions = '1 1 0'
[]
[]
[ICs]
# Defined the same way as the MeshGenerators
[top_right_ic]
function = top_right_func
variable = u
type = FunctionIC
block = 1
[]
[top_left_ic]
function = top_left_func
variable = u
type = FunctionIC
block = 2
[]
[bottom_left_ic]
function = bottom_left_func
variable = u
type = FunctionIC
block = 3
[]
[bottom_right_ic]
function = bottom_right_func
variable = u
type = FunctionIC
block = 4
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.1
[]
[Outputs]
exodus = true
[]
(test/tests/scaling/residual-based/residual-based.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = '1000 * (1 - x)'
[]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[rxn]
type = PReaction
power = 2
variable = u
[]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 1000
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 0
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
verbose = true
automatic_scaling = true
resid_vs_jac_scaling_param = 1
[]
[Outputs]
exodus = true
[]
(modules/phase_field/examples/multiphase/DerivativeMultiPhaseMaterial.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
nz = 0
xmin = -12
xmax = 12
ymin = -12
ymax = 12
elem_type = QUAD4
[]
[GlobalParams]
# let's output all material properties for demonstration purposes
outputs = exodus
# prefactor on the penalty function kernels. The higher this value is, the
# more rigorously the constraint is enforced
penalty = 1e3
[]
#
# These AuxVariables hold the directly calculated free energy density in the
# simulation cell. They are provided for visualization purposes.
#
[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'
additional_free_energy = cross_energy
[../]
#
# Helper kernel to cpompute the gradient contribution from interfaces of order
# parameters evolved using the ACMultiInterface kernel
#
[./cross_terms]
type = CrossTermGradientFreeEnergy
variable = cross_energy
interfacial_vars = 'eta1 eta2 eta3'
#
# The interface coefficient matrix. This should be symmetrical!
#
kappa_names = 'kappa11 kappa12 kappa13
kappa21 kappa22 kappa23
kappa31 kappa32 kappa33'
[../]
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
#
# We set up a smooth cradial concentrtaion gradient
# The concentration will quickly change to adapt to the preset order
# parameters eta1, eta2, and eta3
#
[./InitialCondition]
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 5.0
invalue = 1.0
outvalue = 0.01
int_width = 10.0
[../]
[../]
[./eta1]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
#
# Note: this initial conditions sets up a _sharp_ interface. Ideally
# we should start with a smooth interface with a width consistent
# with the kappa parameter supplied for the given interface.
#
function = 'r:=sqrt(x^2+y^2);if(r<=4,1,0)'
[../]
[../]
[./eta2]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = 'r:=sqrt(x^2+y^2);if(r>4&r<=7,1,0)'
[../]
[../]
[./eta3]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = 'r:=sqrt(x^2+y^2);if(r>7,1,0)'
[../]
[../]
[]
[Kernels]
#
# Cahn-Hilliard kernel for the concentration variable.
# Note that we are not using an interfcae kernel on this variable, but rather
# rely on the interface width enforced on the order parameters. This allows us
# to use a direct solve using the CahnHilliard kernel _despite_ only using first
# order elements.
#
[./c_res]
type = CahnHilliard
variable = c
f_name = F
coupled_variables = 'eta1 eta2 eta3'
[../]
[./time]
type = TimeDerivative
variable = c
[../]
#
# Order parameter eta1
# Each order parameter is acted on by 4 kernels:
# 1. The stock time derivative deta_i/dt kernel
# 2. The Allen-Cahn kernel that takes a Dervative Material for the free energy
# 3. A gradient interface kernel that includes cross terms
# see http://mooseframework.org/wiki/PhysicsModules/PhaseField/DevelopingModels/MultiPhaseModels/ACMultiInterface/
# 4. A penalty contribution that forces the interface contributions h(eta)
# to sum up to unity
#
[./deta1dt]
type = TimeDerivative
variable = eta1
[../]
[./ACBulk1]
type = AllenCahn
variable = eta1
coupled_variables = 'eta2 eta3 c'
mob_name = L1
f_name = F
[../]
[./ACInterface1]
type = ACMultiInterface
variable = eta1
etas = 'eta1 eta2 eta3'
mob_name = L1
kappa_names = 'kappa11 kappa12 kappa13'
[../]
[./penalty1]
type = SwitchingFunctionPenalty
variable = eta1
etas = 'eta1 eta2 eta3'
h_names = 'h1 h2 h3'
[../]
#
# Order parameter eta2
#
[./deta2dt]
type = TimeDerivative
variable = eta2
[../]
[./ACBulk2]
type = AllenCahn
variable = eta2
coupled_variables = 'eta1 eta3 c'
mob_name = L2
f_name = F
[../]
[./ACInterface2]
type = ACMultiInterface
variable = eta2
etas = 'eta1 eta2 eta3'
mob_name = L2
kappa_names = 'kappa21 kappa22 kappa23'
[../]
[./penalty2]
type = SwitchingFunctionPenalty
variable = eta2
etas = 'eta1 eta2 eta3'
h_names = 'h1 h2 h3'
[../]
#
# Order parameter eta3
#
[./deta3dt]
type = TimeDerivative
variable = eta3
[../]
[./ACBulk3]
type = AllenCahn
variable = eta3
coupled_variables = 'eta1 eta2 c'
mob_name = L3
f_name = F
[../]
[./ACInterface3]
type = ACMultiInterface
variable = eta3
etas = 'eta1 eta2 eta3'
mob_name = L3
kappa_names = 'kappa31 kappa32 kappa33'
[../]
[./penalty3]
type = SwitchingFunctionPenalty
variable = eta3
etas = 'eta1 eta2 eta3'
h_names = 'h1 h2 h3'
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
# here we declare some of the model parameters: the mobilities and interface
# gradient prefactors. For this example we use arbitrary numbers. In an actual simulation
# physical mobilities would be used, and the interface gradient prefactors would
# be readjusted to the free energy magnitudes.
[./consts]
type = GenericConstantMaterial
prop_names = 'M kappa_c L1 L2 L3 kappa11 kappa12 kappa13 kappa21 kappa22 kappa23 kappa31 kappa32 kappa33'
prop_values = '0.2 0.75 1 1 1 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 '
[../]
# This material sums up the individual phase contributions. It is written to the output file
# (see GlobalParams section above) and can be used to check the constraint enforcement.
[./etasummat]
type = ParsedMaterial
property_name = etasum
material_property_names = 'h1 h2 h3'
expression = 'h1+h2+h3'
[../]
# The phase contribution factors for each material point are computed using the
# SwitchingFunctionMaterials. Each phase with an order parameter eta contributes h(eta)
# to the global free energy density. h is a function that switches smoothly from 0 to 1
[./switching1]
type = SwitchingFunctionMaterial
function_name = h1
eta = eta1
h_order = SIMPLE
[../]
[./switching2]
type = SwitchingFunctionMaterial
function_name = h2
eta = eta2
h_order = SIMPLE
[../]
[./switching3]
type = SwitchingFunctionMaterial
function_name = h3
eta = eta3
h_order = SIMPLE
[../]
# The barrier function adds a phase transformation energy barrier. It also
# Drives order parameters toward the [0:1] interval to avoid negative or larger than 1
# order parameters (these are set to 0 and 1 contribution by the switching functions
# above)
[./barrier]
type = MultiBarrierFunctionMaterial
etas = 'eta1 eta2 eta3'
[../]
# We use DerivativeParsedMaterials to specify three (very) simple free energy
# expressions for the three phases. All necessary derivatives are built automatically.
# In a real problem these expressions can be arbitrarily complex (or even provided
# by custom kernels).
[./phase_free_energy_1]
type = DerivativeParsedMaterial
property_name = F1
expression = '(c-1)^2'
coupled_variables = 'c'
[../]
[./phase_free_energy_2]
type = DerivativeParsedMaterial
property_name = F2
expression = '(c-0.5)^2'
coupled_variables = 'c'
[../]
[./phase_free_energy_3]
type = DerivativeParsedMaterial
property_name = F3
expression = 'c^2'
coupled_variables = 'c'
[../]
# The DerivativeMultiPhaseMaterial ties the phase free energies together into a global free energy.
# http://mooseframework.org/wiki/PhysicsModules/PhaseField/DevelopingModels/MultiPhaseModels/
[./free_energy]
type = DerivativeMultiPhaseMaterial
property_name = F
# we use a constant free energy (GeneriConstantmaterial property Fx)
fi_names = 'F1 F2 F3'
hi_names = 'h1 h2 h3'
etas = 'eta1 eta2 eta3'
coupled_variables = 'c'
W = 1
[../]
[]
[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.
[./total_solute]
type = ElementIntegralVariablePostprocessor
variable = c
[../]
[]
[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 provedes 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 = 50
nl_rel_tol = 1.0e-6
nl_abs_tol = 1.0e-6
start_time = 0.0
end_time = 150.0
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.1
[../]
[]
[Debug]
# show_var_residual_norms = true
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[./table]
type = CSV
delimiter = ' '
[../]
[]
(modules/phase_field/examples/fourier_noise.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
ny = 100
[]
[Variables]
[./c]
[../]
[]
[Functions]
[./fn]
type = FourierNoise
lambda = 0.1
[../]
[]
[ICs]
[./c]
type = FunctionIC
variable = c
function = fn
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(test/tests/vectorpostprocessors/spherical_average/spherical_average.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 10
nz = 10
xmin = -5
xmax = 5
ymin = -5
ymax = 5
zmin = -5
zmax = 5
[]
[Variables]
[./c]
[./InitialCondition]
type = FunctionIC
function = sin(x*7.4+z*4.1)+cos(y*3.8+x*8.7)+sin(z*9.1+y*2.6)
[../]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = c
[../]
[./time]
type = TimeDerivative
variable = c
[../]
[]
[VectorPostprocessors]
[./average]
type = SphericalAverage
variable = c
radius = 5
bin_number = 10
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = PJFNK
[]
[Outputs]
execute_on = 'initial timestep_end'
csv = true
[]
(test/tests/multiapps/grid-sequencing/vi-fine-alone.i)
l=10
nx=80
num_steps=2
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[bounds][]
[]
[Bounds]
[./u_upper_bounds]
type = ConstantBounds
variable = bounds
bounded_variable = u
bound_type = upper
bound_value = ${l}
[../]
[./u_lower_bounds]
type = ConstantBounds
variable = bounds
bounded_variable = u
bound_type = lower
bound_value = 0
[../]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'x'
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = 'if(x<5,-1,1)'
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = 0
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = ${l}
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
solve_type = NEWTON
dtmin = 1
petsc_options = '-snes_vi_monitor'
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_type -sub_pc_factor_levels -snes_linesearch_type -snes_type'
petsc_options_value = '0 30 asm 16 basic vinewtonrsls'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = 'nonlinear timestep_end'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
active = 'upper_violations lower_violations'
[upper_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = ${fparse 10+1e-8}
comparator = 'greater'
[]
[lower_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-8
comparator = 'less'
[]
[nls]
type = NumNonlinearIterations
[]
[cum_nls]
type = CumulativeValuePostprocessor
postprocessor = nls
[]
[]
(test/tests/misc/check_error/function_file_test1.i)
# Test for usage of missing function
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic_function
[../]
[../]
[]
[Functions]
[./ic_function]
type = PiecewiseLinear
data_file = piecewise_linear_columns.csv #Will generate error because data is expected in rows
scale_factor = 1.0
[../]
[]
[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'
[]
[Outputs]
file_base = out
[]
(modules/chemical_reactions/test/tests/parser/equilibrium_without_action.i)
# Test AqueousEquilibriumReactions parser
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./a]
[../]
[./b]
[../]
[]
[AuxVariables]
[./pressure]
[../]
[./pa2]
[../]
[./pab]
[../]
[]
[AuxKernels]
[./pa2]
type = AqueousEquilibriumRxnAux
variable = pa2
v = a
log_k = 2
sto_v = 2
[../]
[./pab]
type = AqueousEquilibriumRxnAux
variable = pab
v = 'a b'
log_k = -2
sto_v = '1 1'
[../]
[]
[ICs]
[./a]
type = BoundingBoxIC
variable = a
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[./b]
type = BoundingBoxIC
variable = b
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[./pressure]
type = FunctionIC
variable = pressure
function = 2-x
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[./a_conv]
type = PrimaryConvection
variable = a
p = pressure
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[./b_diff]
type = PrimaryDiffusion
variable = b
[../]
[./b_conv]
type = PrimaryConvection
variable = b
p = pressure
[../]
[./a1_eq]
type = CoupledBEEquilibriumSub
variable = a
log_k = 2
weight = 2
sto_u = 2
[../]
[./a1_diff]
type = CoupledDiffusionReactionSub
variable = a
log_k = 2
weight = 2
sto_u = 2
[../]
[./a1_conv]
type = CoupledConvectionReactionSub
variable = a
log_k = 2
weight = 2
sto_u = 2
p = pressure
[../]
[./a2_eq]
type = CoupledBEEquilibriumSub
variable = a
v = b
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
[../]
[./a2_diff]
type = CoupledDiffusionReactionSub
variable = a
v = b
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
[../]
[./a2_conv]
type = CoupledConvectionReactionSub
variable = a
v = b
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
p = pressure
[../]
[./b2_eq]
type = CoupledBEEquilibriumSub
variable = b
v = a
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
[../]
[./b2_diff]
type = CoupledDiffusionReactionSub
variable = b
v = a
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
[../]
[./b2_conv]
type = CoupledConvectionReactionSub
variable = b
v = a
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
p = pressure
[../]
[]
[BCs]
[./a_left]
type = DirichletBC
variable = a
boundary = left
value = 1.0e-2
[../]
[./a_right]
type = ChemicalOutFlowBC
variable = a
boundary = right
[../]
[./b_left]
type = DirichletBC
variable = b
boundary = left
value = 1.0e-2
[../]
[./b_right]
type = ChemicalOutFlowBC
variable = b
boundary = right
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
nl_abs_tol = 1e-12
end_time = 10
dt = 10
[]
[Outputs]
file_base = equilibrium_out
exodus = true
perf_graph = true
print_linear_residuals = true
[]
[Preconditioning]
[./smp]
type = SMP
full = 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/porous_flow/test/tests/newton_cooling/nc04.i)
# Newton cooling from a bar. Heat conduction
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
ny = 1
xmin = 0
xmax = 100
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp'
number_fluid_phases = 0
number_fluid_components = 0
[]
[]
[Variables]
[temp]
[]
[]
[ICs]
[temp]
type = FunctionIC
variable = temp
function = '2-x/100'
[]
[]
[Kernels]
[conduction]
type = PorousFlowHeatConduction
variable = temp
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[thermal_conductivity_irrelevant]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '1E2 0 0 0 1E2 0 0 0 1E2'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temp
boundary = left
value = 2
[]
[newton]
type = PorousFlowPiecewiseLinearSink
variable = temp
boundary = right
pt_vals = '0 1 2'
multipliers = '-1 0 1'
flux_function = 1
[]
[]
[VectorPostprocessors]
[temp]
type = LineValueSampler
variable = temp
start_point = '0 0.5 0'
end_point = '100 0.5 0'
sort_by = x
num_points = 11
execute_on = timestep_end
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -snes_max_it -sub_pc_factor_shift_type -pc_asm_overlap -snes_atol -snes_rtol '
petsc_options_value = 'gmres asm lu 100 NONZERO 2 1E-14 1E-12'
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
file_base = nc04
execute_on = timestep_end
exodus = false
[along_line]
type = CSV
execute_vector_postprocessors_on = timestep_end
[]
[]
(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
[../]
[]
(modules/porous_flow/test/tests/jacobian/fflux02_fully_saturated.i)
# Using PorousFlowFullySaturatedAdvectiveFlux
# 1phase, 3components, constant insitu permeability
# density with constant bulk, constant viscosity, nonzero gravity
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[massfrac0]
[]
[massfrac1]
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = -0.7+x+y
[]
[massfrac0]
type = RandomIC
variable = massfrac0
min = 0
max = 0.3
[]
[massfrac1]
type = RandomIC
variable = massfrac1
min = 0
max = 0.4
[]
[]
[Kernels]
[flux0]
type = PorousFlowFullySaturatedAdvectiveFlux
fluid_component = 0
variable = pp
gravity = '-1 -0.1 0'
[]
[flux1]
type = PorousFlowFullySaturatedAdvectiveFlux
fluid_component = 1
variable = massfrac0
gravity = '-1 -0.1 0'
[]
[flux2]
type = PorousFlowFullySaturatedAdvectiveFlux
fluid_component = 2
variable = massfrac1
gravity = '-1 -0.1 0'
[]
[flux0_nodensity]
type = PorousFlowFullySaturatedAdvectiveFlux
fluid_component = 0
variable = pp
gravity = '-1 -0.1 0'
multiply_by_density = false
[]
[flux1_nodensity]
type = PorousFlowFullySaturatedAdvectiveFlux
fluid_component = 1
variable = massfrac0
gravity = '-1 -0.1 0'
multiply_by_density = false
[]
[flux2_nodensity]
type = PorousFlowFullySaturatedAdvectiveFlux
fluid_component = 2
variable = massfrac1
gravity = '-1 -0.1 0'
multiply_by_density = false
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0 massfrac1'
number_fluid_phases = 1
number_fluid_components = 3
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
viscosity = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac0 massfrac1'
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '2 0 0 0 2 0 0 0 3'
[]
[]
[Preconditioning]
active = check
[check]
type = SMP
full = true
petsc_options_iname = '-snes_type'
petsc_options_value = 'test'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
num_steps = 1
[]
(modules/porous_flow/test/tests/flux_limited_TVD_advection/fltvd_2D_blocks.i)
# Using Flux-Limited TVD Advection ala Kuzmin and Turek
# 2D version with blocks
# Top block: tracer is defined here, with velocity = (0.1, 0, 0)
# Central block: tracer is not defined here
# Bottom block: tracer is defined here, with velocity = (-0.1, 0, 0)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
xmin = 0
xmax = 1
ny = 5
ymin = 0
ymax = 1
[]
[top]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0.6 0'
top_right = '1 1 0'
block_id = 1
[]
[center]
input = bottom
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0.4 0'
top_right = '1 0.6 0'
block_id = 2
[]
[bottom]
input = top
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 0.6 0'
block_id = 3
[]
[split_bdys]
type = BreakBoundaryOnSubdomainGenerator
input = center
boundaries = 'left right'
[]
[]
[GlobalParams]
block = '1 2 3'
[]
[Variables]
[tracer]
block = '1 3'
[]
[dummy]
[]
[]
[ICs]
[tracer_top]
type = FunctionIC
variable = tracer
function = 'if(x<0.1 | x>0.3, 0, 1)'
block = '1'
[]
[tracer_bot]
type = FunctionIC
variable = tracer
function = 'if(x<0.7 | x > 0.9, 0, 1)'
block = '3'
[]
[]
[Kernels]
[mass_dot]
type = MassLumpedTimeDerivative
variable = tracer
block = '1 3'
[]
[flux_top]
type = FluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = fluo_top
block = '1'
[]
[flux_bot]
type = FluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = fluo_bot
block = '3'
[]
[.dummy]
type = TimeDerivative
variable = dummy
[]
[]
[UserObjects]
[fluo_top]
type = AdvectiveFluxCalculatorConstantVelocity
flux_limiter_type = superbee
u = tracer
velocity = '0.1 0 0'
block = '1'
[]
[fluo_bot]
type = AdvectiveFluxCalculatorConstantVelocity
flux_limiter_type = superbee
u = tracer
velocity = '-0.1 0 0'
block = '3'
[]
[]
[BCs]
[no_tracer_on_left_top]
type = DirichletBC
variable = tracer
value = 0
boundary = 'left_to_1'
[]
[remove_tracer_top]
# Ideally, an OutflowBC would be used, but that does not exist in the framework
# In 1D VacuumBC is the same as OutflowBC, with the alpha parameter being twice the velocity
type = VacuumBC
boundary = 'right_to_1'
alpha = 0.2 # 2 * velocity
variable = tracer
[]
[no_tracer_on_left_bot]
# Ideally, an OutflowBC would be used, but that does not exist in the framework
# In 1D VacuumBC is the same as OutflowBC, with the alpha parameter being twice the velocity
type = VacuumBC
boundary = 'left_to_3'
alpha = 0.2 # 2 * velocity
variable = tracer
[]
[remove_tracer_bot]
type = DirichletBC
variable = tracer
value = 0
boundary = 'right_to_3'
[]
[]
[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'
[]
[]
[VectorPostprocessors]
[tracer_bot]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 11
sort_by = x
variable = tracer
[]
[tracer_top]
type = LineValueSampler
start_point = '0 1 0'
end_point = '1 1 0'
num_points = 11
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-2
timestep_tolerance = 1E-3
[]
[Outputs]
print_linear_residuals = false
[out]
type = CSV
execute_on = final
[]
[]
(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/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
[]
(test/tests/postprocessors/pseudotimestep/fv_burgers_pseudo.i)
[Mesh]
[gen_mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = -1
xmax = 1
nx = 500
[]
[]
[Variables]
[v]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[]
[ICs]
[v_ic]
type = FunctionIC
variable = v
function = '-1/(1+exp(-(x-z)/2/0.0005))'
[]
[]
[FVKernels]
[burgers]
type = FVBurgers1D
variable = v
[]
[difussion]
type = FVDiffusion
coeff= 0.0005
variable = v
[]
[time]
type = FVTimeKernel
variable = v
[]
[]
[FVBCs]
[fv_burgers_outflow]
type = FVBurgersOutflowBC
variable = v
boundary = 'left right'
[]
[]
[Postprocessors]
[pseudotimestep]
type = PseudoTimestep
method = 'SER'
initial_dt = 1
alpha = 1.5
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
petsc_options = '-snes_converged_reason'
num_steps = 5
[TimeStepper]
type = PostprocessorDT
postprocessor = pseudotimestep
[]
[]
[Outputs]
print_linear_residuals = false
csv = 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
[]
(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
[]
[]
(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/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
[]
(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
[]
(test/tests/nodalkernels/constraint_enforcement/upper-bound.i)
l=10
nx=100
num_steps=10
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
[]
[Variables]
[u]
[]
[lm]
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = '${l} - x'
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = '1'
[]
[]
[NodalKernels]
[positive_constraint]
type = UpperBoundNodalKernel
variable = lm
v = u
exclude_boundaries = 'left right'
upper_bound = 10
[]
[forces]
type = CoupledForceNodalKernel
variable = u
v = lm
coef = -1
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = ${l}
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = 0
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
solve_type = NEWTON
dtmin = 1
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_type -sub_pc_factor_levels -snes_linesearch_type'
petsc_options_value = '0 30 asm 16 basic'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = 'nonlinear timestep_end'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[active_lm]
type = GreaterThanLessThanPostprocessor
variable = lm
execute_on = 'nonlinear timestep_end'
value = 1e-8
[]
[violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = ${fparse 10+1e-8}
comparator = 'greater'
[]
[]
(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/misc/check_error/function_file_test7.i)
# Test for usage of missing function
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic_function
[../]
[../]
[]
[Functions]
[./ic_function]
type = PiecewiseLinear
x = '1'
scale_factor = 1.0
[../]
[]
[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'
[]
[Outputs]
file_base = out
[]
(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
[]
(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/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/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/porous_flow/test/tests/mass_conservation/mass07.i)
# Checking that the mass postprocessor throws the correct error if
# too many phases are supplied
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[sat]
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[]
[ICs]
[pinit]
type = ConstantIC
value = 1
variable = pp
[]
[satinit]
type = FunctionIC
function = 1-x
variable = sat
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = sat
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp sat'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 1
thermal_expansion = 0
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 0.1
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = pp
phase1_saturation = sat
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[]
[Postprocessors]
[comp1_total_mass]
type = PorousFlowFluidMass
fluid_component = 1
phase = '0 1 2'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
(test/tests/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
[]
(test/tests/outputs/debug/show_execution_fv_flux_objects.i)
[Mesh]
[gen_mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = 10
nx = 50
[]
[left]
type = ParsedSubdomainMeshGenerator
input = 'gen_mesh'
combinatorial_geometry = 'x < 0.5'
block_id = '2'
[]
[middle_boundary]
type = SideSetsBetweenSubdomainsGenerator
input = 'left'
primary_block = '0'
paired_block = '2'
new_boundary = 'middle'
[]
[]
[Variables]
[v]
family = MONOMIAL
order = CONSTANT
fv = true
block = 2
[]
[u]
type = MooseVariableFVReal
[]
[]
[ICs]
[v_ic]
type = FunctionIC
variable = v
function = 'if (x > 2 & x < 3, 0.5, 0)'
[]
[]
[FVKernels]
# Twice the kernel makes it not the Burgers equation, but shows the ordering
[2_burger]
type = FVBurgers1D
variable = v
[]
[1_burgers]
type = FVBurgers1D
variable = v
[]
[time]
type = FVTimeKernel
variable = v
[]
[time_u]
type = FVTimeKernel
variable = u
[]
[]
[FVBCs]
[fv_burgers_right]
type = FVBurgersOutflowBC
variable = v
boundary = 'middle'
[]
[fv_burgers_left]
type = FVBurgersOutflowBC
variable = v
boundary = 'left'
[]
[]
[FVInterfaceKernels]
[diff_ik]
type = FVOnlyAddDiffusionToOneSideOfInterface
variable1 = 'v'
variable2 = 'u'
boundary = 'middle'
coeff2 = '1'
subdomain1 = '2'
subdomain2 = '0'
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
petsc_options = '-snes_converged_reason'
nl_abs_tol = 1e-7
nl_rel_tol = 1e-8
num_steps = 1
dt = 0.05
nl_forced_its = 1
line_search = none
[]
[Debug]
show_execution_order = 'LINEAR'
[]
(modules/phase_field/examples/multiphase/GrandPotential3Phase_masscons.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 is a revised version of the model that eliminates small variations in mass
# that have been observed with the original formulation. In this version, rather
# than evolving the chemical potential as a field variable, we evolve the composition
# field using a normal Cahn-Hilliard equation, then relate chemical potential to
# composition using Eq. (22) from the paper (this relationship is derived from the
# grand potential functional and is valid only for parabolic free energies).
[Mesh]
type = GeneratedMesh
dim = 2
nx = 60
ny = 60
xmin = -15
xmax = 15
ymin = -15
ymax = 15
[]
[Variables]
[w]
[]
[c]
[]
[etaa0]
[]
[etab0]
[]
[etad0]
[]
[]
[ICs]
[IC_etaa0]
type = BoundingBoxIC
variable = etaa0
x1 = -10
y1 = -10
x2 = 10
y2 = 10
inside = 1.0
outside = 0.0
[]
[IC_etad0]
type = BoundingBoxIC
variable = etad0
x1 = -10
y1 = -10
x2 = 10
y2 = 10
inside = 0.0
outside = 1.0
[]
[IC_c]
type = BoundingBoxIC
variable = c
x1 = -10
y1 = -10
x2 = 10
y2 = 10
inside = 0.1
outside = 0.5
[]
[IC_w]
type = FunctionIC
variable = w
function = ic_func_w
[]
[]
[Functions]
[ic_func_w]
type = ConstantFunction
value = 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
[]
#Concentration
[c_dot]
type = TimeDerivative
variable = c
[]
[Diffusion]
type = MatDiffusion
variable = c
v = w
diffusivity = DchiVm
args = ''
[]
#The following relate chemical potential to composition using Eq. (22)
[w_rxn]
type = MatReaction
variable = w
v = c
mob_name = -1
[]
[ca_rxn]
type = MatReaction
variable = w
mob_name = 'hoverk_a'
args = 'etaa0 etab0 etad0'
[]
[ca_bodyforce]
type = MaskedBodyForce
variable = w
mask = ha
coupled_variables = 'etaa0 etab0 etad0'
value = 0.1 #caeq
[]
[cb_rxn]
type = MatReaction
variable = w
mob_name = 'hoverk_b'
args = 'etaa0 etab0 etad0'
[]
[cb_bodyforce]
type = MaskedBodyForce
variable = w
mask = hb
coupled_variables = 'etaa0 etab0 etad0'
value = 0.9 #cbeq
[]
[cd_rxn]
type = MatReaction
variable = w
mob_name = 'hoverk_d'
args = 'etaa0 etab0 etad0'
[]
[cd_bodyforce]
type = MaskedBodyForce
variable = w
mask = hd
coupled_variables = 'etaa0 etab0 etad0'
value = 0.5 #cdeq
[]
[]
[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
[]
[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 = DchiVm
material_property_names = 'D chi Vm' #Factor of Vm is needed to evolve c instead of rho
expression = 'D*chi*Vm'
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
[]
[hoverk_a]
type = DerivativeParsedMaterial
material_property_names = 'ha(etaa0,etab0,etad0) Vm ka'
property_name = hoverk_a
expression = 'ha / Vm / ka'
[]
[hoverk_b]
type = DerivativeParsedMaterial
material_property_names = 'hb(etaa0,etab0,etad0) Vm kb'
property_name = hoverk_b
expression = 'hb / Vm / kb'
[]
[hoverk_d]
type = DerivativeParsedMaterial
material_property_names = 'hd(etaa0,etab0,etad0) Vm kd'
property_name = hoverk_d
expression = 'hd / Vm / kd'
[]
[]
[Postprocessors]
[c_total]
type = ElementIntegralVariablePostprocessor
variable = c
[]
[]
[Executioner]
type = Transient
nl_max_its = 15
scheme = bdf2
solve_type = NEWTON
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]
csv = true
exodus = true
[]
(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
[]
(modules/scalar_transport/test/tests/ncp-lms/interpolated-ncp-lm-nodal-enforcement.i)
l=10
num_steps=10
nx=100
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
elem_type = EDGE3
[]
[Variables]
[u]
order = SECOND
[]
[lm]
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = '${l} - x'
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = '-1'
[]
[lm_coupled_force]
type = CoupledForce
variable = u
v = lm
[]
[]
[NodalKernels]
[positive_constraint]
type = LowerBoundNodalKernel
variable = lm
v = u
exclude_boundaries = 'left right'
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = ${l}
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = 0
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
solve_type = NEWTON
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_factor_levels -snes_linesearch_type'
petsc_options_value = '0 30 16 basic'
[]
[Outputs]
exodus = true
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[active_lm]
type = GreaterThanLessThanPostprocessor
variable = lm
execute_on = 'nonlinear timestep_end'
value = 1e-12
[]
[violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-12
comparator = 'less'
[]
[]
(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'
[../]
[]
(test/tests/auxkernels/advection_flux/normal_advection_flux_fe.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '0.75 0.75 0.75'
dy = '0.75 0.75 0.75'
ix = '2 2 2'
iy = '2 2 2'
subdomain_id = '1 1 1
1 2 1
1 1 1'
[]
[add_inner_boundaries_top]
type = SideSetsAroundSubdomainGenerator
input = cmg
new_boundary = 'block_2_top'
block = 2
normal = '0 1 0'
[]
[add_inner_boundaries_bot]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_top
new_boundary = 'block_2_bot'
block = 2
normal = '0 -1 0'
[]
[add_inner_boundaries_right]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_bot
new_boundary = 'block_2_right'
block = 2
normal = '1 0 0'
[]
[add_inner_boundaries_left]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_right
new_boundary = 'block_2_left'
block = 2
normal = '-1 0 0'
[]
[]
[Variables]
[u]
[]
[v]
[]
[]
[ICs]
[u_blob]
type = FunctionIC
variable = u
function = 'if(x<0.75,if(y<0.75,1,0),0)'
[]
[v_blob]
type = FunctionIC
variable = v
function = 'if(x<0.75,if(y<0.75,1,0),0)'
[]
[]
[Kernels]
[udot]
type = MassLumpedTimeDerivative
variable = u
[]
[u_advec]
type = ConservativeAdvection
variable = u
upwinding_type = full
velocity = '2 0 0'
[]
[vdot]
type = MassLumpedTimeDerivative
variable = v
[]
[v_advec]
type = ConservativeAdvection
variable = v
upwinding_type = full
velocity = '0 2 0'
[]
[]
[Materials]
[rho]
type = GenericConstantMaterial
prop_names = 'rho'
prop_values = '1'
[]
[]
[AuxVariables]
[flux_x]
order = FIRST
family = MONOMIAL
[]
[]
[AuxKernels]
[flux_x]
type = AdvectiveFluxAux
variable = flux_x
vel_x = u
vel_y = v
advected_mat_prop = 'rho'
component = normal
boundary = 'block_2_right block_2_left'
[]
[]
[Executioner]
type = Transient
solve_type = LINEAR
dt = 0.01
end_time = 0.02
l_tol = 1E-14
[]
[Postprocessors]
[flux_right]
type = SideIntegralVariablePostprocessor
variable = flux_x
boundary = 'block_2_right'
[]
[flux_right_exact]
type = SideAdvectiveFluxIntegral
boundary = 'block_2_right'
vel_x = u
vel_y = v
component = normal
advected_mat_prop = 'rho'
[]
[flux_left]
type = SideIntegralVariablePostprocessor
variable = flux_x
boundary = 'block_2_left'
[]
[flux_left_exact]
type = SideAdvectiveFluxIntegral
boundary = 'block_2_left'
vel_x = u
vel_y = v
component = normal
advected_mat_prop = 'rho'
[]
[]
[Outputs]
csv = 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
[]
(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/general_field/nearest_node/regular/main.i)
# Base input for testing transfers. It has the following complexities:
# - more than one subapp
# - transfers both from and to the subapps
# - both nodal and elemental variables
# Tests derived from this input may add complexities through command line arguments
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[AuxVariables]
[from_sub]
initial_condition = -1
[]
[from_sub_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_sub]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[to_sub_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
hide = 'to_sub to_sub_elem'
overwrite = true
[]
[]
[MultiApps]
[sub]
# 1 on corner, one in the center and one close to a corner
# The offsets are to avoid equidistant points
positions = '0.000001 0 0 0.4111 0.4112 0 0.6999 0.099 0'
type = FullSolveMultiApp
app_type = MooseTestApp
input_files = sub.i
output_in_position = true
[]
[]
[Transfers]
[to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = to_sub
variable = from_main
[]
[to_sub_elem]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = to_sub_elem
variable = from_main_elem
[]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = to_main
variable = from_sub
[]
[from_sub_elem]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = to_main_elem
variable = from_sub_elem
[]
[]
(modules/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
[]
(modules/combined/test/tests/multiphase_mechanics/multiphasestress.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = 0
xmax = 2
ymin = 0
ymax = 2
elem_type = QUAD4
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./eta1]
[./InitialCondition]
type = FunctionIC
function = 'x/2'
[../]
[../]
[./eta2]
[./InitialCondition]
type = FunctionIC
function = 'y/2'
[../]
[../]
[./eta3]
[./InitialCondition]
type = FunctionIC
function = '(2^0.5-(y-1)^2=(y-1)^2)/2'
[../]
[../]
[./e11_aux]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./matl_e11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = e11_aux
[../]
[]
[Kernels]
[./TensorMechanics]
[../]
[]
[Materials]
[./elasticity_tensor_A]
type = ComputeElasticityTensor
base_name = A
fill_method = symmetric9
C_ijkl = '1e6 1e5 1e5 1e6 0 1e6 .4e6 .2e6 .5e6'
[../]
[./strain_A]
type = ComputeSmallStrain
base_name = A
eigenstrain_names = eigenstrain
[../]
[./stress_A]
type = ComputeLinearElasticStress
base_name = A
[../]
[./eigenstrain_A]
type = ComputeEigenstrain
base_name = A
eigen_base = '0.1 0.05 0 0 0 0.01'
prefactor = -1
eigenstrain_name = eigenstrain
[../]
[./elasticity_tensor_B]
type = ComputeElasticityTensor
base_name = B
fill_method = symmetric9
C_ijkl = '1e6 0 0 1e6 0 1e6 .5e6 .5e6 .5e6'
[../]
[./strain_B]
type = ComputeSmallStrain
base_name = B
eigenstrain_names = 'B_eigenstrain'
[../]
[./stress_B]
type = ComputeLinearElasticStress
base_name = B
[../]
[./eigenstrain_B]
type = ComputeEigenstrain
base_name = B
eigen_base = '0.1 0.05 0 0 0 0.01'
prefactor = -1
eigenstrain_name = 'B_eigenstrain'
[../]
[./elasticity_tensor_C]
type = ComputeElasticityTensor
base_name = C
fill_method = symmetric9
C_ijkl = '1.1e6 1e5 0 1e6 0 1e6 .5e6 .2e6 .5e6'
[../]
[./strain_C]
type = ComputeSmallStrain
base_name = C
eigenstrain_names = 'C_eigenstrain'
[../]
[./stress_C]
type = ComputeLinearElasticStress
base_name = C
[../]
[./eigenstrain_C]
type = ComputeEigenstrain
base_name = C
eigen_base = '0.1 0.05 0 0 0 0.01'
prefactor = -1
eigenstrain_name = 'C_eigenstrain'
[../]
[./switching_A]
type = SwitchingFunctionMaterial
function_name = h1
eta = eta1
[../]
[./switching_B]
type = SwitchingFunctionMaterial
function_name = h2
eta = eta2
[../]
[./switching_C]
type = SwitchingFunctionMaterial
function_name = h3
eta = eta3
[../]
[./combined]
type = MultiPhaseStressMaterial
phase_base = 'A B C'
h = 'h1 h2 h3'
[../]
[]
[BCs]
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/porous_flow/test/tests/newton_cooling/nc06.i)
# Newton cooling from a bar. 1-phase and heat, steady
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
ny = 1
xmin = 0
xmax = 100
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pressure temp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.8
alpha = 1e-5
[]
[]
[Variables]
[pressure]
[]
[temp]
[]
[]
[ICs]
# have to start these reasonably close to their steady-state values
[pressure]
type = FunctionIC
variable = pressure
function = '(2-x/100)*1E6'
[]
[temperature]
type = FunctionIC
variable = temp
function = 100+0.1*x
[]
[]
[Kernels]
[flux]
type = PorousFlowAdvectiveFlux
fluid_component = 0
gravity = '0 0 0'
variable = pressure
[]
[heat_advection]
type = PorousFlowHeatAdvection
gravity = '0 0 0'
variable = temp
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1e6
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
cv = 1e6
porepressure_coefficient = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-15'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey # irrelevant in this fully-saturated situation
n = 2
phase = 0
[]
[]
[BCs]
[leftp]
type = DirichletBC
variable = pressure
boundary = left
value = 2E6
[]
[leftt]
type = DirichletBC
variable = temp
boundary = left
value = 100
[]
[newtonp]
type = PorousFlowPiecewiseLinearSink
variable = pressure
boundary = right
pt_vals = '0 100000 200000 300000 400000 500000 600000 700000 800000 900000 1000000 1100000 1200000 1300000 1400000 1500000 1600000 1700000 1800000 1900000 2000000'
multipliers = '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
fluid_phase = 0
flux_function = 1
[]
[newton]
type = PorousFlowPiecewiseLinearSink
variable = temp
boundary = right
pt_vals = '0 100000 200000 300000 400000 500000 600000 700000 800000 900000 1000000 1100000 1200000 1300000 1400000 1500000 1600000 1700000 1800000 1900000 2000000'
multipliers = '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
use_internal_energy = true
fluid_phase = 0
flux_function = 1
[]
[]
[VectorPostprocessors]
[porepressure]
type = LineValueSampler
variable = pressure
start_point = '0 0.5 0'
end_point = '100 0.5 0'
sort_by = x
num_points = 11
execute_on = timestep_end
[]
[temperature]
type = LineValueSampler
variable = temp
start_point = '0 0.5 0'
end_point = '100 0.5 0'
sort_by = x
num_points = 11
execute_on = timestep_end
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -snes_max_it -sub_pc_factor_shift_type -pc_asm_overlap -snes_atol -snes_rtol '
petsc_options_value = 'gmres asm lu 100 NONZERO 2 1E-8 1E-15'
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Outputs]
file_base = nc06
execute_on = timestep_end
[along_line]
type = CSV
execute_vector_postprocessors_on = timestep_end
[]
[]
(test/tests/transfers/general_field/nearest_node/boundary/sub.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 5
ny = 5
nz = 5
xmax = 0.3
ymax = 0.3
zmax = 0.3
[]
[add_block]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x > 0.22 & y < 0.23'
block_id = 1
[]
[add_internal_sideset]
type = SideSetsBetweenSubdomainsGenerator
input = add_block
primary_block = 0
paired_block = 1
new_boundary = internal
[]
[]
[AuxVariables]
[from_main]
initial_condition = -1
[]
[from_main_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_main]
[InitialCondition]
type = FunctionIC
function = '3 + 2*x*x + 3*y*y*y'
[]
[]
[to_main_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '4 + 2*x*x + 3*y*y*y'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
hide = 'to_main to_main_elem'
overwrite = true
[]
[]
(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/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/misc/check_error/function_file_test9.i)
# Test for usage of missing function
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic_function
[../]
[../]
[]
[Functions]
[./ic_function]
type = PiecewiseLinear
scale_factor = 1.0
[../]
[]
[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'
[]
[Outputs]
file_base = out
[]
(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/phase_field/test/tests/feature_flood_test/parallel_feature_count.i)
[Mesh]
type = ImageMesh
dim = 2
file = spiral_16x16.png
scale_to_one = false
[]
[Variables]
[./u]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxVariables]
[./feature]
order = CONSTANT
family = MONOMIAL
[../]
[./proc_id]
order = CONSTANT
family = MONOMIAL
[../]
[./feature_ghost]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./nodal_flood_aux]
type = FeatureFloodCountAux
variable = feature
flood_counter = flood_count_pp
execute_on = 'initial timestep_end'
[../]
[./proc_id]
type = ProcessorIDAux
variable = proc_id
execute_on = 'initial timestep_end'
[../]
[./ghost]
type = FeatureFloodCountAux
variable = feature_ghost
field_display = GHOSTED_ENTITIES
flood_counter = flood_count_pp
execute_on = 'initial timestep_end'
[../]
[]
[Functions]
[./tif]
type = ImageFunction
component = 0
[../]
[]
[ICs]
[./u_ic]
type = FunctionIC
function = tif
variable = u
[../]
[]
[Postprocessors]
[./flood_count_pp]
type = FeatureFloodCount
variable = u
threshold = 1.0
execute_on = 'initial timestep_end'
[../]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Steady
[]
[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/geochemistry/test/tests/nodal_void_volume/nodal_void_volume_adaptive.i)
# Computes nodal void volume, when using adaptivity, and compares with the Postprocessor hand-calculated values
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '1 1 2 2'
dy = '1 4'
[]
[]
[Adaptivity]
initial_marker = u_marker
marker = u_marker
max_h_level = 1
[Markers]
[u_marker]
type = ValueRangeMarker
variable = u
invert = true
lower_bound = 0.02
upper_bound = 0.98
[]
[]
[]
[Variables]
[u]
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'if(x<2,0,1)'
[]
[]
[Kernels]
[dot]
type = TimeDerivative
variable = u
[]
[u]
type = Diffusion
variable = u
[]
[]
[Executioner]
type = Transient
dt = 1
end_time = 2
[]
[Outputs]
csv = true
[]
[UserObjects]
[nodal_void_volume]
type = NodalVoidVolume
porosity = porosity
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
[]
[vol]
[]
[]
[AuxKernels]
[porosity]
type = FunctionAux
variable = porosity
function = 'if(x<4, 1, 2)'
[]
[vol]
type = NodalVoidVolumeAux
variable = vol
nodal_void_volume_uo = nodal_void_volume
[]
[]
[Postprocessors]
[quarter]
type = PointValue
point = '0 0 0'
variable = vol
[]
[half]
type = PointValue
point = '1 0 0'
variable = vol
[]
[three_quarters]
type = PointValue
point = '2 0 0'
variable = vol
[]
[one_and_half_to_34s]
type = PointValue
point = '4 0 0'
variable = vol
[]
[one_to_14]
type = PointValue
point = '6 0 0'
variable = vol
[]
[one_and_quarter]
type = PointValue
point = '0 1 0'
variable = vol
[]
[two_and_half]
type = PointValue
point = '1 1 0'
variable = vol
[]
[three_and_three_quarters]
type = PointValue
point = '2 1 0'
variable = vol
[]
[seven_and_half_to_334]
type = PointValue
point = '4 1 0'
variable = vol
[]
[five_to_54]
type = PointValue
point = '6 1 0'
variable = vol
[]
[]
(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/porous_flow/test/tests/basic_advection/except1.i)
# phase number is too high in PorousFlowBasicAdvection
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[P]
[]
[]
[ICs]
[P]
type = FunctionIC
variable = P
function = '2*(1-x)'
[]
[u]
type = FunctionIC
variable = u
function = 'if(x<0.1,1,0)'
[]
[]
[Kernels]
[u_dot]
type = TimeDerivative
variable = u
[]
[u_advection]
type = PorousFlowBasicAdvection
variable = u
phase = 1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = ''
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 4
thermal_expansion = 0
viscosity = 150.0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = P
capillary_pressure = pc
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '5 0 0 0 5 0 0 0 5'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0
phase = 0
[]
[darcy_velocity]
type = PorousFlowDarcyVelocityMaterial
gravity = '0.25 0 0'
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = 1
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = 0
variable = u
[]
[]
[Preconditioning]
[basic]
type = SMP
full = true
petsc_options_iname = '-pc_type -snes_rtol'
petsc_options_value = ' lu 1E-10'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 5
[]
[Outputs]
exodus = true
print_linear_residuals = false
[]
(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/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
[]
(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
[]
(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/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/combined/test/tests/CHSplitFlux/flux_gb.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 50
ny = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 2
[]
[Variables]
[./c]
[./InitialCondition]
type = FunctionIC
function = 'x0:=5.0;thk:=0.5;m:=2;r:=abs(x-x0);v:=exp(-(r/thk)^m);0.1+0.1*v'
[../]
[../]
[./mu]
[../]
[./jx]
[../]
[./jy]
[../]
[]
[AuxVariables]
[./gb]
family = LAGRANGE
order = FIRST
[../]
[./mobility_xx]
family = MONOMIAL
order = CONSTANT
[../]
[./mobility_yy]
family = MONOMIAL
order = CONSTANT
[../]
[./diffusivity_xx]
family = MONOMIAL
order = CONSTANT
[../]
[./diffusivity_yy]
family = MONOMIAL
order = CONSTANT
[../]
[./aniso_tensor_xx]
family = MONOMIAL
order = CONSTANT
[../]
[./aniso_tensor_yy]
family = MONOMIAL
order = CONSTANT
[../]
[]
[Kernels]
[./conc]
type = CHSplitConcentration
variable = c
mobility = mobility_prop
chemical_potential_var = mu
[../]
[./chempot]
type = CHSplitChemicalPotential
variable = mu
chemical_potential_prop = mu_prop
c = c
[../]
[./flux_x]
type = CHSplitFlux
variable = jx
component = 0
mobility_name = mobility_prop
mu = mu
c = c
[../]
[./flux_y]
type = CHSplitFlux
variable = jy
component = 1
mobility_name = mobility_prop
mu = mu
c = c
[../]
[./time]
type = TimeDerivative
variable = c
[../]
[]
[AuxKernels]
[./gb]
type = FunctionAux
variable = gb
function = 'x0:=5.0;thk:=0.5;m:=2;r:=abs(x-x0);v:=exp(-(r/thk)^m);v'
[../]
[./mobility_xx]
type = MaterialRealTensorValueAux
variable = mobility_xx
property = mobility_prop
row = 0
column = 0
[../]
[./mobility_yy]
type = MaterialRealTensorValueAux
variable = mobility_yy
property = mobility_prop
row = 1
column = 1
[../]
[./diffusivity_xx]
type = MaterialRealTensorValueAux
variable = diffusivity_xx
property = diffusivity
row = 0
column = 0
[../]
[./diffusivity_yy]
type = MaterialRealTensorValueAux
variable = diffusivity_yy
property = diffusivity
row = 1
column = 1
[../]
[./aniso_tensor_xx]
type = MaterialRealTensorValueAux
variable = aniso_tensor_xx
property = aniso_tensor
row = 0
column = 0
[../]
[./aniso_tensor_yy]
type = MaterialRealTensorValueAux
variable = aniso_tensor_yy
property = aniso_tensor
row = 1
column = 1
[../]
[]
[Materials]
[./chemical_potential]
type = DerivativeParsedMaterial
block = 0
property_name = mu_prop
coupled_variables = c
expression = 'c'
derivative_order = 1
[../]
[./var_dependence]
type = DerivativeParsedMaterial
block = 0
expression = 'c*(1.0-c)'
coupled_variables = c
property_name = var_dep
derivative_order = 1
[../]
[./mobility]
type = CompositeMobilityTensor
block = 0
M_name = mobility_prop
tensors = diffusivity
weights = var_dep
args = c
[../]
[./phase_normal]
type = PhaseNormalTensor
phase = gb
normal_tensor_name = gb_normal
[../]
[./aniso_tensor]
type = GBDependentAnisotropicTensor
gb = gb
bulk_parameter = 0.1
gb_parameter = 1
gb_normal_tensor_name = gb_normal
gb_tensor_prop_name = aniso_tensor
[../]
[./diffusivity]
type = GBDependentDiffusivity
gb = gb
bulk_parameter = 0.1
gb_parameter = 1
gb_normal_tensor_name = gb_normal
gb_tensor_prop_name = diffusivity
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -ksp_grmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
nl_max_its = 5
dt = 20
num_steps = 5
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/general_field/user_object/regular/main.i)
# Base input for testing transfers. It has the following complexities:
# - more than one subapp
# - transfers both from and to the subapps
# - both nodal and elemental variables
# Tests derived from this input may add complexities through command line arguments
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[AuxVariables]
[from_sub]
initial_condition = -1
[]
[from_sub_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_sub]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[to_sub_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[]
[UserObjects]
[to_sub]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_sub
[]
[to_sub_elem]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_sub_elem
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
hide = 'to_sub to_sub_elem'
overwrite = true
[]
[]
[MultiApps]
[sub]
# 1 on corner, one in the center and one close to a corner
positions = '0 0 0 0.4 0.4 0 0.7 0.1 0'
type = FullSolveMultiApp
app_type = MooseTestApp
input_files = sub.i
output_in_position = true
[]
[]
[Transfers]
[to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub
source_user_object = to_sub
variable = from_main
extrapolation_constant = -1
[]
[to_sub_elem]
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub
source_user_object = to_sub_elem
variable = from_main_elem
extrapolation_constant = -1
[]
[from_sub]
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = sub
source_user_object = to_main
variable = from_sub
extrapolation_constant = -1
[]
[from_sub_elem]
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = sub
source_user_object = to_main_elem
variable = from_sub_elem
extrapolation_constant = -1
[]
[]
(test/tests/nodalkernels/constraint_enforcement/lower-bound.i)
l=10
nx=100
num_steps=10
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
[]
[Variables]
[u]
[]
[lm]
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = '${l} - x'
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = '-1'
[]
[]
[NodalKernels]
[positive_constraint]
type = LowerBoundNodalKernel
variable = lm
v = u
exclude_boundaries = 'left right'
[]
[forces]
type = CoupledForceNodalKernel
variable = u
v = lm
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = ${l}
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = 0
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
solve_type = NEWTON
dtmin = 1
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_type -sub_pc_factor_levels -snes_linesearch_type'
petsc_options_value = '0 30 asm 16 basic'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = 'nonlinear timestep_end'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[active_lm]
type = GreaterThanLessThanPostprocessor
variable = lm
execute_on = 'nonlinear timestep_end'
value = 1e-8
[]
[violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-8
comparator = 'less'
[]
[]
(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/transfers/general_field/shape_evaluation/regular/sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 0.2
ymax = 0.2
[]
[AuxVariables]
[from_main]
initial_condition = -1
[]
[from_main_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_main]
[InitialCondition]
type = FunctionIC
function = '3 + 2*x*x + 3*y*y*y'
[]
[]
[to_main_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '4 + 2*x*x + 3*y*y*y'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
hide = 'to_main to_main_elem'
overwrite = true
[]
[]
(modules/phase_field/test/tests/MultiPhase/thirdphasesuppressionmaterial.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
nz = 0
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[AuxVariables]
[./eta1]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
variable = eta1
function = x
[../]
[../]
[./eta2]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
variable = eta2
function = 1-x
[../]
[../]
[./eta3]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
variable = eta3
function = y
[../]
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./suppressionbarrier]
type = ThirdPhaseSuppressionMaterial
etas = 'eta1 eta2 eta3'
function_name = g
outputs = exodus
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Problem]
solve = false
[]
[Outputs]
exodus = true
[]
(test/tests/functions/image_function/image.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 10
nz = 10
[]
[Adaptivity]
max_h_level = 5
initial_steps = 5
initial_marker = marker
[Indicators]
[indicator]
type = GradientJumpIndicator
variable = u
[]
[]
[Markers]
[marker]
type = ErrorFractionMarker
indicator = indicator
refine = 0.9
[]
[]
[]
[Variables]
[u]
[]
[]
[Functions]
[image_func]
type = ImageFunction
file = stack/test_00.png
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[ICs]
[u_ic]
type = FunctionIC
function = image_func
variable = u
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = 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/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
[]
(modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_2D_trimesh.i)
# Using flux-limited TVD advection ala Kuzmin and Turek, mploying PorousFlow Kernels and UserObjects, with superbee flux-limiter
# 2D version
[Mesh]
type = FileMesh
file = trimesh.msh
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
block = '50'
[]
[Variables]
[porepressure]
[]
[tracer]
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x'
[]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.305,0,1))'
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = tracer
[]
[flux0]
type = PorousFlowFluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = advective_flux_calculator_0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[]
[flux1]
type = PorousFlowFluxLimitedTVDAdvection
variable = porepressure
advective_flux_calculator = advective_flux_calculator_1
[]
[]
[BCs]
[constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1
boundary = left
[]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[]
[remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure tracer'
number_fluid_phases = 1
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[advective_flux_calculator_0]
type = PorousFlowAdvectiveFluxCalculatorUnsaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 0
[]
[advective_flux_calculator_1]
type = PorousFlowAdvectiveFluxCalculatorUnsaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = tracer
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[]
[]
[Preconditioning]
active = basic
[basic]
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'
[]
[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'
[]
[]
[VectorPostprocessors]
[tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0.04 0'
num_points = 101
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-2
nl_abs_tol = 1E-8
timestep_tolerance = 1E-3
[]
[Outputs]
print_linear_residuals = false
[out]
type = CSV
execute_on = final
[]
[]
(modules/chemical_reactions/test/tests/aqueous_equilibrium/1species.i)
# Simple equilibrium reaction example to illustrate the use of the AqueousEquilibriumReactions
# action.
# In this example, a single primary species a is transported by diffusion and convection
# from the left of the porous medium, reacting to form an equilibrium species pa2 according to
# the equilibrium reaction specified in the AqueousEquilibriumReactions block as:
#
# reactions = '2a = pa2 1'
#
# where the 2 is the weight of the equilibrium species, and the 1 refers to the equilibrium
# constant (log10(Keq) = 1).
#
# The AqueousEquilibriumReactions action creates all the required kernels and auxkernels
# to compute the reaction given by the above equilibrium reaction equation.
#
# Specifically, it adds to following:
# * An AuxVariable named 'pa2' (given in the reactions equations)
# * A AqueousEquilibriumRxnAux AuxKernel for this AuxVariable with all parameters
# * A CoupledBEEquilibriumSub Kernel for each primary species with all parameters
# * A CoupledDiffusionReactionSub Kernel for each primary species with all parameters
# * A CoupledConvectionReactionSub Kernel for each primary species with all parameters if
# pressure is a coupled variable
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1e-2
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
variable = a
[../]
[../]
[]
[AuxVariables]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./pressure]
type = FunctionIC
variable = pressure
function = 2-x
[../]
[]
[ReactionNetwork]
[./AqueousEquilibriumReactions]
primary_species = a
reactions = '2a = pa2 1'
secondary_species = pa2
pressure = pressure
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[./a_conv]
type = PrimaryConvection
variable = a
p = pressure
[../]
[]
[BCs]
[./a_right]
type = ChemicalOutFlowBC
variable = a
boundary = right
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-12
start_time = 0.0
end_time = 100
dt = 10.0
[]
[Outputs]
file_base = 1species_out
exodus = true
perf_graph = true
print_linear_residuals = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(test/tests/functions/image_function/error/check_error.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Variables]
[u]
[]
[]
[Functions]
[tif]
type = ImageFunction
file_base = stack/test
file_suffix = png
file_range = '0' # file_range is a vector input, a single entry means "read only 1 file"
[]
[]
[ICs]
[u_ic]
type = FunctionIC
function = tif
variable = u
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.1
[]
(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/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'
[]
(test/tests/transfers/general_field/shape_evaluation/boundary/sub.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 5
ny = 5
nz = 5
xmax = 0.3
ymax = 0.3
zmax = 0.3
[]
[add_block]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x > 0.22 & y < 0.23'
block_id = 1
[]
[add_internal_sideset]
type = SideSetsBetweenSubdomainsGenerator
input = add_block
primary_block = 0
paired_block = 1
new_boundary = internal
[]
[]
[AuxVariables]
[from_main]
initial_condition = -1
[]
[from_main_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_main]
[InitialCondition]
type = FunctionIC
function = '3 + 2*x*x + 3*y*y*y'
[]
[]
[to_main_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '4 + 2*x*x + 3*y*y*y'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
hide = 'to_main to_main_elem'
overwrite = true
[]
[]
(modules/combined/test/tests/DiffuseCreep/stress_based_chem_pot.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 50
ny = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 2
[]
[Variables]
[./c]
[./InitialCondition]
type = FunctionIC
function = 'x0:=5.0;thk:=0.5;m:=2;r:=abs(x-x0);v:=exp(-(r/thk)^m);0.1+0.1*v'
[../]
[../]
[./mu]
[../]
[./jx]
[../]
[./jy]
[../]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[AuxVariables]
[./gb]
family = LAGRANGE
order = FIRST
[../]
[./creep_strain_xx]
family = MONOMIAL
order = CONSTANT
[../]
[./stress_xx]
family = MONOMIAL
order = CONSTANT
[../]
[./stress_yy]
family = MONOMIAL
order = CONSTANT
[../]
[./stress_xy]
family = MONOMIAL
order = CONSTANT
[../]
[./mu_prop]
family = MONOMIAL
order = CONSTANT
[../]
[./mech_prop]
family = MONOMIAL
order = CONSTANT
[../]
[./total_potential]
family = MONOMIAL
order = CONSTANT
[../]
[]
[Kernels]
[./conc]
type = CHSplitConcentration
variable = c
mobility = mobility_prop
chemical_potential_var = mu
[../]
[./chempot]
type = CHSplitChemicalPotential
variable = mu
chemical_potential_prop = total_potential
c = c
[../]
[./flux_x]
type = CHSplitFlux
variable = jx
component = 0
mobility_name = mobility_prop
mu = mu
c = c
[../]
[./flux_y]
type = CHSplitFlux
variable = jy
component = 1
mobility_name = mobility_prop
mu = mu
c = c
[../]
[./time]
type = TimeDerivative
variable = c
[../]
[./TensorMechanics]
displacements = 'disp_x disp_y'
[../]
[]
[AuxKernels]
[./gb]
type = FunctionAux
variable = gb
function = 'x0:=5.0;thk:=0.5;m:=2;r:=abs(x-x0);v:=exp(-(r/thk)^m);v'
[../]
[./creep_strain_xx]
type = RankTwoAux
variable = creep_strain_xx
rank_two_tensor = creep_strain
index_i = 0
index_j = 0
[../]
[./stress_xx]
type = RankTwoAux
variable = stress_xx
rank_two_tensor = stress
index_i = 0
index_j = 0
[../]
[./stress_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = stress
index_i = 1
index_j = 1
[../]
[./stress_xy]
type = RankTwoAux
variable = stress_xy
rank_two_tensor = stress
index_i = 0
index_j = 1
[../]
[./mu_prop]
type = MaterialRealAux
property = mu_prop
variable = mu_prop
[../]
[./mech_prop]
type = MaterialRealAux
property = mech_prop
variable = mech_prop
[../]
[./total_potential]
type = MaterialRealAux
property = total_potential
variable = total_potential
[../]
[]
[Materials]
[./chemical_potential]
type = DerivativeParsedMaterial
block = 0
property_name = mu_prop
coupled_variables = c
expression = 'c'
derivative_order = 1
[../]
[./mechanical_potential]
type = StressBasedChemicalPotential
property_name = mech_prop
stress_name = stress
direction_tensor_name = aniso_tensor
prefactor_name = 1.0
[../]
[./total_potential]
type = DerivativeSumMaterial
block = 0
property_name = total_potential
sum_materials = 'mu_prop mech_prop'
coupled_variables = 'c'
derivative_order = 2
[../]
[./var_dependence]
type = DerivativeParsedMaterial
block = 0
expression = 'c*(1.0-c)'
coupled_variables = c
property_name = var_dep
derivative_order = 1
[../]
[./mobility]
type = CompositeMobilityTensor
block = 0
M_name = mobility_prop
tensors = diffusivity
weights = var_dep
args = c
[../]
[./phase_normal]
type = PhaseNormalTensor
phase = gb
normal_tensor_name = gb_normal
[../]
[./aniso_tensor]
type = GBDependentAnisotropicTensor
gb = gb
bulk_parameter = 0.1
gb_parameter = 1
gb_normal_tensor_name = gb_normal
gb_tensor_prop_name = aniso_tensor
[../]
[./diffusivity]
type = GBDependentDiffusivity
gb = gb
bulk_parameter = 0.1
gb_parameter = 1
gb_normal_tensor_name = gb_normal
gb_tensor_prop_name = diffusivity
[../]
[./diffuse_strain_increment]
type = FluxBasedStrainIncrement
xflux = jx
yflux = jy
gb = gb
property_name = diffuse
[../]
[./diffuse_creep_strain]
type = SumTensorIncrements
tensor_name = creep_strain
coupled_tensor_increment_names = diffuse
[../]
[./strain]
type = ComputeIncrementalSmallStrain
displacements = 'disp_x disp_y'
[../]
[./stress]
type = ComputeStrainIncrementBasedStress
inelastic_strain_names = creep_strain
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '120.0 80.0'
fill_method = symmetric_isotropic
[../]
[]
[BCs]
[./Periodic]
[./cbc]
auto_direction = 'x y'
variable = c
[../]
[../]
[./fix_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./fix_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -ksp_grmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
nl_rel_tol = 1e-10
nl_max_its = 5
l_tol = 1e-4
l_max_its = 20
dt = 1
num_steps = 5
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/general_field/user_object/boundary/main.i)
# Base input for testing transfers. It has the following complexities:
# - more than one subapp
# - transfers both from and to the subapps
# - both nodal and elemental variables
# - subapp meshes are not aligned with the main app
# Tests derived from this input may add complexities through command line arguments
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 5
ny = 5
nz = 5
[]
[add_block]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x < 0.5 & y < 0.5'
block_id = 1
[]
[add_internal_sideset]
type = SideSetsBetweenSubdomainsGenerator
input = add_block
primary_block = 0
paired_block = 1
new_boundary = internal
[]
[]
[AuxVariables]
[from_sub]
initial_condition = -1
[]
[from_sub_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_sub]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[to_sub_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[]
[UserObjects]
[to_sub]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_sub
[]
[to_sub_elem]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_sub_elem
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
verbose_multiapps = true
[]
[Outputs]
[out]
type = Exodus
hide = 'to_sub to_sub_elem'
overwrite = true
[]
[]
[MultiApps]
[sub]
# 1 on corner, one in the center and one close to a corner
# The subapp mesh is a 0.3-sized cube, no overlap
positions = '0.2222 0 0 0.61111 0.311111 0.31111 0.76666 0.111111 0.81111'
type = TransientMultiApp
app_type = MooseTestApp
input_files = sub.i
execute_on = timestep_end
# Facilitates debugging
output_in_position = true
[]
[]
[Transfers]
# Boundary restrictions are added in the tests specification
[to_sub]
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub
source_user_object = to_sub
variable = from_main
extrapolation_constant = -1
[]
[to_sub_elem]
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub
source_user_object = to_sub_elem
variable = from_main_elem
extrapolation_constant = -1
[]
[from_sub]
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = sub
source_user_object = to_main
variable = from_sub
extrapolation_constant = -1
[]
[from_sub_elem]
type = MultiAppGeneralFieldUserObjectTransfer
from_multi_app = sub
source_user_object = to_main_elem
variable = from_sub_elem
extrapolation_constant = -1
[]
[]
(test/tests/misc/check_error/function_file_test6.i)
# Test for usage of missing function
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic_function
[../]
[../]
[]
[Functions]
[./ic_function]
type = PiecewiseLinear
x = '1'
y = '2'
xy_data = '1 2'
scale_factor = 1.0
[../]
[]
[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'
[]
[Outputs]
file_base = out
[]
(test/tests/multiapps/grid-sequencing/vi-coarser.i)
l=10
nx=20
num_steps=2
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[bounds][]
[]
[Bounds]
[./u_upper_bounds]
type = ConstantBounds
variable = bounds
bounded_variable = u
bound_type = upper
bound_value = ${l}
[../]
[./u_lower_bounds]
type = ConstantBounds
variable = bounds
bounded_variable = u
bound_type = lower
bound_value = 0
[../]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'x'
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = 'if(x<5,-1,1)'
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = 0
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = ${l}
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
solve_type = NEWTON
dtmin = 1
petsc_options = '-snes_vi_monitor'
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_type -sub_pc_factor_levels -snes_linesearch_type -snes_type'
petsc_options_value = '0 30 asm 16 basic vinewtonrsls'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = 'nonlinear timestep_end'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
active = 'upper_violations lower_violations'
[upper_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = ${fparse 10+1e-8}
comparator = 'greater'
[]
[lower_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-8
comparator = 'less'
[]
[nls]
type = NumNonlinearIterations
[]
[cum_nls]
type = CumulativeValuePostprocessor
postprocessor = nls
[]
[]
(test/tests/bcs/periodic/no_add_scalar.i)
# Test to make sure that periodic boundaries
# are not applied to scalar variables.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
[]
[Variables]
[./c]
[./InitialCondition]
type = FunctionIC
function = x
[../]
[../]
[./scalar]
family = SCALAR
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = x
[../]
[../]
[]
[Kernels]
[./dt]
type = TimeDerivative
variable = c
[../]
[./diff]
type = Diffusion
variable = c
[../]
[]
[ScalarKernels]
[./scalar]
type = ODETimeDerivative
variable = scalar
[../]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 3
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/dispersion/disp01_fv.i)
# Test dispersive part of FVPorousFlowDispersiveFlux kernel by setting diffusion
# coefficients to zero. A pressure gradient is applied over the mesh to give a
# uniform velocity. Gravity is set to zero.
# Mass fraction is set to 1 on the left hand side and 0 on the right hand side.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
xmax = 10
bias_x = 1.1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[pp]
type = MooseVariableFVReal
[]
[massfrac0]
type = MooseVariableFVReal
[]
[]
[AuxVariables]
[velocity]
family = MONOMIAL
order = FIRST
[]
[]
[AuxKernels]
[velocity]
type = ADPorousFlowDarcyVelocityComponent
variable = velocity
component = x
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = pic
[]
[massfrac0]
type = ConstantIC
variable = massfrac0
value = 0
[]
[]
[Functions]
[pic]
type = ParsedFunction
expression = '1.1e5-x*1e3'
[]
[]
[FVBCs]
[xleft]
type = FVDirichletBC
value = 1
variable = massfrac0
boundary = left
[]
[xright]
type = FVDirichletBC
value = 0
variable = massfrac0
boundary = right
[]
[pright]
type = FVDirichletBC
variable = pp
boundary = right
value = 1e5
[]
[pleft]
type = FVDirichletBC
variable = pp
boundary = left
value = 1.1e5
[]
[]
[FVKernels]
[mass0]
type = FVPorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[adv0]
type = FVPorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
[]
[diff0]
type = FVPorousFlowDispersiveFlux
variable = pp
disp_trans = 0
disp_long = 0.2
[]
[mass1]
type = FVPorousFlowMassTimeDerivative
fluid_component = 1
variable = massfrac0
[]
[adv1]
type = FVPorousFlowAdvectiveFlux
fluid_component = 1
variable = massfrac0
[]
[diff1]
type = FVPorousFlowDispersiveFlux
fluid_component = 1
variable = massfrac0
disp_trans = 0
disp_long = 0.2
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0'
number_fluid_phases = 1
number_fluid_components = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1e9
density0 = 1000
viscosity = 0.001
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = ADPorousFlowTemperature
[]
[ppss]
type = ADPorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = ADPorousFlowMassFraction
mass_fraction_vars = massfrac0
[]
[simple_fluid]
type = ADPorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[poro]
type = ADPorousFlowPorosityConst
porosity = 0.3
[]
[diff]
type = ADPorousFlowDiffusivityConst
diffusion_coeff = '0 0'
tortuosity = 0.1
[]
[relp]
type = ADPorousFlowRelativePermeabilityConst
phase = 0
[]
[permeability]
type = ADPorousFlowPermeabilityConst
permeability = '1e-9 0 0 0 1e-9 0 0 0 1e-9'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'gmres asm lu NONZERO'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 3e2
dtmax = 100
nl_abs_tol = 1e-12
[TimeStepper]
type = IterationAdaptiveDT
growth_factor = 2
cutback_factor = 0.5
dt = 10
[]
[]
[VectorPostprocessors]
[xmass]
type = ElementValueSampler
sort_by = id
variable = 'massfrac0 velocity'
[]
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(modules/heat_transfer/test/tests/verify_against_analytical/1D_transient.i)
# This test solves a 1D transient heat equation
# The error is caclulated by comparing to the analytical solution
# The problem setup and analytical solution are taken from "Advanced Engineering
# Mathematics, 10th edition" by Erwin Kreyszig.
# http://www.amazon.com/Advanced-Engineering-Mathematics-Erwin-Kreyszig/dp/0470458364
# It is Example 1 in section 12.6 on page 561
[Mesh]
type = GeneratedMesh
dim = 1
nx = 160
xmax = 80
[]
[Variables]
[./T]
[../]
[]
[ICs]
[./T_IC]
type = FunctionIC
variable = T
function = '100*sin(pi*x/80)'
[../]
[]
[Kernels]
[./HeatDiff]
type = HeatConduction
variable = T
[../]
[./HeatTdot]
type = HeatConductionTimeDerivative
variable = T
[../]
[]
[BCs]
[./sides]
type = DirichletBC
variable = T
boundary = 'left right'
value = 0
[../]
[]
[Materials]
[./k]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '0.95' #copper in cal/(cm sec C)
[../]
[./cp]
type = GenericConstantMaterial
prop_names = 'specific_heat'
prop_values = '0.092' #copper in cal/(g C)
[../]
[./rho]
type = GenericConstantMaterial
prop_names = 'density'
prop_values = '8.92' #copper in g/(cm^3)
[../]
[]
[Postprocessors]
[./error]
type = NodalL2Error
function = '100*sin(pi*x/80)*exp(-0.95/(0.092*8.92)*pi^2/80^2*t)'
variable = T
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
l_tol = 1e-6
dt = 2
end_time = 100
[]
[Outputs]
exodus = true
[]
(test/tests/kernels/resid_jac_together/diffusion_reaction.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[]
[]
[Variables]
[u]
[InitialCondition]
type = FunctionIC
function = '5*x+y'
[]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[react]
type = Reaction
variable = u
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_abs_tol = 1e-15
nl_rel_tol = 1e-12
residual_and_jacobian_together = true
[]
[Outputs]
exodus = 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'
[../]
[]
(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/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/fvkernels/fv_burgers/fv_burgers.i)
[Mesh]
[./gen_mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = 10
nx = 50
[../]
[]
[Variables]
[./v]
family = MONOMIAL
order = CONSTANT
fv = true
[../]
[]
[ICs]
[./v_ic]
type = FunctionIC
variable = v
function = 'if (x > 2 & x < 3, 0.5, 0)'
[../]
[]
[FVKernels]
[./burgers]
type = FVBurgers1D
variable = v
[../]
[./time]
type = FVTimeKernel
variable = v
[../]
[]
[FVBCs]
[./fv_burgers_outflow]
type = FVBurgersOutflowBC
variable = v
boundary = 'left right'
[../]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
petsc_options = '-snes_converged_reason'
nl_abs_tol = 1e-7
nl_rel_tol = 1e-8
num_steps = 5
dt = 0.05
[]
[Outputs]
exodus = true
[]
(test/tests/functions/solution_function/solution_function_scale_transl.i)
# checking scale and translation, with ordering scale first, then translation second
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -1
xmax = 1
nx = 3
ymin = -1
ymax = 1
ny = 3
zmin = -1
zmax = 1
nz = 3
[]
[UserObjects]
[./solution_uo]
type = SolutionUserObject
mesh = cube_with_u_equals_x.e
timestep = 1
system_variables = u
scale = '0.5 1 1'
translation = '2 0 0'
transformation_order = 'scale translation'
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./u_init]
type = FunctionIC
variable = u
function = solution_fcn
[../]
[]
[Functions]
[./solution_fcn]
type = SolutionFunction
from_variable = u
solution = solution_uo
[../]
[]
[Kernels]
[./diff]
type = TimeDerivative
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
l_max_its = 800
nl_rel_tol = 1e-10
num_steps = 1
end_time = 1
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = solution_function_scale_transl
exodus = true
[]
(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/richards/test/tests/dirac/bh03.i)
# fully-saturated
# injection
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[GlobalParams]
richardsVarNames_UO = PPNames
[]
[UserObjects]
[./PPNames]
type = RichardsVarNames
richards_vars = pressure
[../]
[./DensityConstBulk]
type = RichardsDensityConstBulk
dens0 = 1000
bulk_mod = 2E9
[../]
[./Seff1VG]
type = RichardsSeff1VG
m = 0.8
al = 1E-5
[../]
[./RelPermPower]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./Saturation]
type = RichardsSat
s_res = 0
sum_s_res = 0
[../]
[./SUPGstandard]
type = RichardsSUPGstandard
p_SUPG = 1E8
[../]
[./borehole_total_outflow_mass]
type = RichardsSumQuantity
[../]
[]
[Variables]
active = 'pressure'
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./p_ic]
type = FunctionIC
variable = pressure
function = initial_pressure
[../]
[]
[AuxVariables]
[./Seff1VG_Aux]
[../]
[]
[Kernels]
active = 'richardsf richardst'
[./richardst]
type = RichardsMassChange
variable = pressure
[../]
[./richardsf]
type = RichardsFlux
variable = pressure
[../]
[]
[DiracKernels]
[./bh]
type = RichardsBorehole
bottom_pressure = 1E7
point_file = bh03.bh
SumQuantityUO = borehole_total_outflow_mass
variable = pressure
unit_weight = '0 0 0'
character = -1
[../]
[]
[Postprocessors]
[./bh_report]
type = RichardsPlotQuantity
uo = borehole_total_outflow_mass
[../]
[./fluid_mass0]
type = RichardsMass
variable = pressure
execute_on = timestep_begin
[../]
[./fluid_mass1]
type = RichardsMass
variable = pressure
execute_on = timestep_end
[../]
[./zmass_error]
type = FunctionValuePostprocessor
function = mass_bal_fcn
execute_on = timestep_end
indirect_dependencies = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[./p0]
type = PointValue
variable = pressure
point = '1 1 1'
execute_on = timestep_end
[../]
[]
[Functions]
[./initial_pressure]
type = ParsedFunction
expression = 0
[../]
[./mass_bal_fcn]
type = ParsedFunction
expression = abs((a-c+d)/2/(a+c))
symbol_names = 'a c d'
symbol_values = 'fluid_mass1 fluid_mass0 bh_report'
[../]
[]
[Materials]
[./all]
type = RichardsMaterial
block = 0
viscosity = 1E-3
mat_porosity = 0.1
mat_permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
density_UO = DensityConstBulk
relperm_UO = RelPermPower
sat_UO = Saturation
seff_UO = Seff1VG
SUPG_UO = SUPGstandard
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[AuxKernels]
[./Seff1VG_AuxK]
type = RichardsSeffAux
variable = Seff1VG_Aux
seff_UO = Seff1VG
pressure_vars = pressure
[../]
[]
[Preconditioning]
[./usual]
type = SMP
full = true
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_max_it'
petsc_options_value = 'bcgs bjacobi 1E-10 1E-10 10000 30'
[../]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 1E-2
solve_type = NEWTON
[]
[Outputs]
file_base = bh03
exodus = false
csv = true
execute_on = timestep_end
[]
(modules/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/materials/derivative_material_interface/ad_parsed_material.i)
#
# Test the parsed function free enery Allen-Cahn Bulk kernel
#
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./eta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = x
[../]
[../]
[]
[Kernels]
[./diff]
type = ADMatDiffusion
variable = eta
diffusivity = F
[../]
[./dt]
type = TimeDerivative
variable = eta
[../]
[]
[Materials]
[./consts]
type = ADParsedMaterial
coupled_variables = 'eta'
expression ='(eta-0.5)^2'
outputs = exodus
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/transfers/general_field/nearest_node/nearest_position/main.i)
# Base input for testing transfers. It has the following complexities:
# - more than one subapp
# - transfers both from and to the subapps
# - both nodal and elemental variables
# Tests derived from this input may add complexities through command line arguments
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[AuxVariables]
[to_sub]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[to_sub_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[from_sub]
initial_condition = -1
[]
[from_sub_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
verbose_multiapps = true
[]
[Outputs]
[out]
type = Exodus
overwrite = true
hide = 'to_sub to_sub_elem'
[]
[]
[Positions]
[input]
type = InputPositions
positions = '1e-6 0 0 0.4 0.6001 0'
[]
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
positions_objects = input
app_type = MooseTestApp
input_files = sub.i
output_in_position = true
execute_on = TIMESTEP_END
[]
[]
[Transfers]
[to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = to_sub
variable = from_main
# Transfer relies on two nodes that are equidistant to the target point
search_value_conflicts = false
[]
[to_sub_elem]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = to_sub_elem
variable = from_main_elem
[]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = to_main
variable = from_sub
use_nearest_position = input
bbox_factor = 100
# Transfer relies on two nodes that are equidistant to the target point
search_value_conflicts = false
[]
[from_sub_elem]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = to_main_elem
variable = from_sub_elem
use_nearest_position = input
bbox_factor = 100
[]
[]
(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
[]
(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'
[]
[]
(test/tests/multiapps/quadrature_point_multiapp/quadrature_point_multiapp.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 3
[]
[AuxVariables]
[x]
[]
[y]
family = MONOMIAL
order = CONSTANT
[]
[x_apps]
family = MONOMIAL
order = CONSTANT
[]
[y_apps]
[]
[]
[ICs]
[x]
type = FunctionIC
function = x
variable = x
[]
[y]
type = FunctionIC
function = y
variable = y
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = QuadraturePointMultiApp
input_files = 'sub_app.i'
run_in_position = true
cli_args = 'Postprocessors/average_x/type=ElementAverageValue;Postprocessors/average_x/variable=x;Postprocessors/average_y/type=ElementAverageValue;Postprocessors/average_y/variable=y'
[]
[]
[Transfers]
# Check that sending data to the child app works
[sending_x]
type = MultiAppVariableValueSamplePostprocessorTransfer
source_variable = x
to_multi_app = sub
postprocessor = incoming_x
[]
[sending_y]
type = MultiAppVariableValueSamplePostprocessorTransfer
source_variable = y
to_multi_app = sub
postprocessor = incoming_y
[]
# And receiving from the child apps
[receiving_x]
type = MultiAppPostprocessorInterpolationTransfer
postprocessor = average_x
from_multi_app = sub
variable = x_apps
num_points = 4
[]
[receving_y]
type = MultiAppPostprocessorInterpolationTransfer
postprocessor = average_y
from_multi_app = sub
variable = y_apps
num_points = 4
[]
[]
(modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_3D.i)
# Using flux-limited TVD advection ala Kuzmin and Turek, employing PorousFlow Kernels and UserObjects, with superbee flux-limiter
# 3D version
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
xmin = 0
xmax = 1
ny = 4
ymin = 0
ymax = 0.5
nz = 3
zmin = 0
zmax = 2
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[porepressure]
[]
[tracer]
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x'
[]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = tracer
[]
[flux0]
type = PorousFlowFluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = advective_flux_calculator_0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[]
[flux1]
type = PorousFlowFluxLimitedTVDAdvection
variable = porepressure
advective_flux_calculator = advective_flux_calculator_1
[]
[]
[BCs]
[constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1
boundary = left
[]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[]
[remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure tracer'
number_fluid_phases = 1
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[advective_flux_calculator_0]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 0
[]
[advective_flux_calculator_1]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = tracer
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[]
[]
[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'
[]
[]
[VectorPostprocessors]
[tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0.5 2'
num_points = 11
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 0.3
dt = 6E-2
nl_abs_tol = 1E-8
timestep_tolerance = 1E-3
[]
[Outputs]
print_linear_residuals = false
[out]
type = CSV
execute_on = final
[]
[]
(test/tests/functions/image_function/moose_logo_test_2D.i)
[Problem]
solve = false
[]
[Mesh]
type = ImageMesh
cells_per_pixel = 1
dim = 2
file = moose_logo_small.png
[]
[Variables]
[original]
family = MONOMIAL
order = CONSTANT
[]
[scaled]
family = MONOMIAL
order = CONSTANT
[]
[shifted]
family = MONOMIAL
order = CONSTANT
[]
[]
[Functions]
[image]
type = ImageFunction
file = moose_logo_small.png
[]
[image_scale]
type = ImageFunction
file = moose_logo_small.png
scale = 0.00392156862
[]
[image_shift]
type = ImageFunction
file = moose_logo_small.png
shift = -127.5
[]
[]
[ICs]
[original_IC]
type = FunctionIC
function = image
variable = original
[]
[scaled_IC]
type = FunctionIC
function = image_scale
variable = scaled
[]
[shifted_IC]
type = FunctionIC
function = image_shift
variable = shifted
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/DiffuseCreep/variable_base_eigen_strain.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 50
ny = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 2
[]
[Variables]
[./c]
[./InitialCondition]
type = FunctionIC
function = 'x0:=5.0;thk:=0.5;m:=2;r:=abs(x-x0);v:=exp(-(r/thk)^m);0.1+0.01*v'
[../]
[../]
[./mu]
[../]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[AuxVariables]
[./gb]
family = LAGRANGE
order = FIRST
[../]
[./eigen_strain_xx]
family = MONOMIAL
order = CONSTANT
[../]
[./eigen_strain_yy]
family = MONOMIAL
order = CONSTANT
[../]
[./stress_xx]
family = MONOMIAL
order = CONSTANT
[../]
[./stress_yy]
family = MONOMIAL
order = CONSTANT
[../]
[]
[Kernels]
[./conc]
type = CHSplitConcentration
variable = c
mobility = mobility_prop
chemical_potential_var = mu
[../]
[./chempot]
type = CHSplitChemicalPotential
variable = mu
chemical_potential_prop = mu_prop
c = c
[../]
[./time]
type = TimeDerivative
variable = c
[../]
[./TensorMechanics]
displacements = 'disp_x disp_y'
[../]
[]
[AuxKernels]
[./gb]
type = FunctionAux
variable = gb
function = 'x0:=5.0;thk:=0.5;m:=2;r:=abs(x-x0);v:=exp(-(r/thk)^m);v'
[../]
[./eigenstrain_xx]
type = RankTwoAux
variable = eigen_strain_xx
rank_two_tensor = eigenstrain
index_i = 0
index_j = 0
[../]
[./eigenstrain_yy]
type = RankTwoAux
variable = eigen_strain_yy
rank_two_tensor = eigenstrain
index_i = 1
index_j = 1
[../]
[./stress_xx]
type = RankTwoAux
variable = stress_xx
rank_two_tensor = stress
index_i = 0
index_j = 0
[../]
[./stress_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = stress
index_i = 1
index_j = 1
[../]
[]
[Materials]
[./chemical_potential]
type = DerivativeParsedMaterial
block = 0
property_name = mu_prop
coupled_variables = c
expression = 'c'
derivative_order = 1
[../]
[./var_dependence]
type = DerivativeParsedMaterial
block = 0
expression = 'c*(1.0-c)'
coupled_variables = c
property_name = var_dep
derivative_order = 1
[../]
[./mobility]
type = CompositeMobilityTensor
block = 0
M_name = mobility_prop
tensors = diffusivity
weights = var_dep
args = c
[../]
[./phase_normal]
type = PhaseNormalTensor
phase = gb
normal_tensor_name = gb_normal
[../]
[./aniso_tensor]
type = GBDependentAnisotropicTensor
gb = gb
bulk_parameter = 0.1
gb_parameter = 1
gb_normal_tensor_name = gb_normal
gb_tensor_prop_name = aniso_tensor
[../]
[./diffusivity]
type = GBDependentDiffusivity
gb = gb
bulk_parameter = 0.1
gb_parameter = 1
gb_normal_tensor_name = gb_normal
gb_tensor_prop_name = diffusivity
[../]
[./eigenstrain_prefactor]
type = DerivativeParsedMaterial
block = 0
expression = 'c-0.1'
coupled_variables = c
property_name = eigenstrain_prefactor
derivative_order = 1
[../]
[./eigenstrain]
type = ComputeVariableBaseEigenStrain
base_tensor_property_name = aniso_tensor
prefactor = eigenstrain_prefactor
eigenstrain_name = eigenstrain
[../]
[./strain]
type = ComputeIncrementalSmallStrain
displacements = 'disp_x disp_y'
eigenstrain_names = eigenstrain
[../]
[./stress]
type = ComputeStrainIncrementBasedStress
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '120.0 80.0'
fill_method = symmetric_isotropic
[../]
[]
[BCs]
[./Periodic]
[./cbc]
auto_direction = 'x y'
variable = c
[../]
[../]
[./fix_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./fix_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -ksp_grmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
nl_rel_tol = 1e-10
nl_max_its = 5
l_tol = 1e-4
l_max_its = 20
dt = 1
num_steps = 5
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Outputs]
exodus = 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/chemical_reactions/test/tests/aqueous_equilibrium/2species_eqaux.i)
# In this example, two primary species a and b are transported by diffusion and convection
# from the left of the porous medium, reacting to form two equilibrium species pa2 and pab
# according to the equilibrium reaction specified in the AqueousEquilibriumReactions block as:
#
# reactions = '2a = pa2 2
# a + b = pab -2'
#
# where the 2 is the weight of the equilibrium species, the 2 on the RHS of the first reaction
# refers to the equilibrium constant (log10(Keq) = 2), and the -2 on the RHS of the second
# reaction equates to log10(Keq) = -2.
#
# This example is identical to 2species.i, except that it explicitly includes all AuxKernels
# and Kernels that are set up by the action in 2species.i, and that the equilbrium constants
# are provided by AuxVariables
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[../]
[./b]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[../]
[]
[AuxVariables]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[./pa2]
[../]
[./pab]
[../]
[./pa2_logk]
initial_condition = 2
[../]
[./pab_logk]
initial_condition = -2
[../]
[]
[AuxKernels]
[./pa2eq]
type = AqueousEquilibriumRxnAux
variable = pa2
v = a
sto_v = 2
log_k = pa2_logk
[../]
[./pabeq]
type = AqueousEquilibriumRxnAux
variable = pab
v = 'a b'
sto_v = '1 1'
log_k = pab_logk
[../]
[]
[ICs]
[./pressure]
type = FunctionIC
variable = pressure
function = 2-x
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[./a_conv]
type = PrimaryConvection
variable = a
p = pressure
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[./b_diff]
type = PrimaryDiffusion
variable = b
[../]
[./b_conv]
type = PrimaryConvection
variable = b
p = pressure
[../]
[./a1eq]
type = CoupledBEEquilibriumSub
variable = a
log_k = pa2_logk
weight = 2
sto_u = 2
[../]
[./a1diff]
type = CoupledDiffusionReactionSub
variable = a
log_k = pa2_logk
weight = 2
sto_u = 2
[../]
[./a1conv]
type = CoupledConvectionReactionSub
variable = a
log_k = pa2_logk
weight = 2
sto_u = 2
p = pressure
[../]
[./a2eq]
type = CoupledBEEquilibriumSub
variable = a
v = b
log_k = pab_logk
weight = 1
sto_v = 1
sto_u = 1
[../]
[./a2diff]
type = CoupledDiffusionReactionSub
variable = a
v = b
log_k = pab_logk
weight = 1
sto_v = 1
sto_u = 1
[../]
[./a2conv]
type = CoupledConvectionReactionSub
variable = a
v = b
log_k = pab_logk
weight = 1
sto_v = 1
sto_u = 1
p = pressure
[../]
[./b2eq]
type = CoupledBEEquilibriumSub
variable = b
v = a
log_k = pab_logk
weight = 1
sto_v = 1
sto_u = 1
[../]
[./b2diff]
type = CoupledDiffusionReactionSub
variable = b
v = a
log_k = pab_logk
weight = 1
sto_v = 1
sto_u = 1
[../]
[./b2conv]
type = CoupledConvectionReactionSub
variable = b
v = a
log_k = pab_logk
weight = 1
sto_v = 1
sto_u = 1
p = pressure
[../]
[]
[BCs]
[./a_left]
type = DirichletBC
variable = a
boundary = left
value = 1.0e-2
[../]
[./a_right]
type = ChemicalOutFlowBC
variable = a
boundary = right
[../]
[./b_left]
type = DirichletBC
variable = b
boundary = left
value = 1.0e-2
[../]
[./b_right]
type = ChemicalOutFlowBC
variable = b
boundary = right
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-12
start_time = 0.0
end_time = 100
dt = 10.0
[]
[Outputs]
file_base = 2species_out
exodus = true
perf_graph = true
print_linear_residuals = true
hide = 'pa2_logk pab_logk'
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(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/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/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_volume/cns/symmetry_test/2D_symmetry.i)
rho_inside = 1
E_inside = 2.501505578
rho_outside = 0.125
E_outside = 1.999770935
radius = 0.1
angle = 45
[GlobalParams]
fp = fp
[]
[Debug]
show_material_props = true
[]
[Mesh]
[file]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.5
xmax = 0.5
nx = 10
ymin = -0.5
ymax = 0.5
ny = 10
[../]
[rotate]
type = TransformGenerator
vector_value = '${angle} 0 0'
transform = ROTATE
input = file
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
allow_imperfect_jacobians = true
[]
[]
[Variables]
[rho]
family = MONOMIAL
order = CONSTANT
fv = true
[../]
[rho_u]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 1e-15
outputs = none
[]
[rho_v]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 1e-15
outputs = none
[]
[rho_E]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[]
[ICs]
[rho_ic]
type = FunctionIC
variable = rho
function = 'if (abs(x) < ${radius} & abs(y) < ${radius}, ${rho_inside}, ${rho_outside})'
[]
[rho_E_ic]
type = FunctionIC
variable = rho_E
function = 'if (abs(x) < ${radius} & abs(y) < ${radius}, ${fparse E_inside * rho_inside}, ${fparse E_outside * rho_outside})'
[]
[]
[FVKernels]
# Mass conservation
[mass_time]
type = FVTimeKernel
variable = rho
[]
[mass_advection]
type = CNSFVMassHLLC
variable = rho
fp = fp
[]
# Momentum x conservation
[momentum_x_time]
type = FVTimeKernel
variable = rho_u
[]
[momentum_x_advection]
type = CNSFVMomentumHLLC
variable = rho_u
momentum_component = x
fp = fp
[]
# Momentum y conservation
[momentum_y_time]
type = FVTimeKernel
variable = rho_v
[]
[./momentum_y_advection]
type = CNSFVMomentumHLLC
variable = rho_v
momentum_component = y
[]
# Fluid energy conservation
[./fluid_energy_time]
type = FVTimeKernel
variable = rho_E
[]
[./fluid_energy_advection]
type = CNSFVFluidEnergyHLLC
variable = rho_E
fp = fp
[]
[]
[FVBCs]
## outflow implicit conditions
[mass_outflow]
type = CNSFVHLLCMassImplicitBC
variable = rho
fp = fp
boundary = 'left right top bottom'
[]
[./momentum_x_outflow]
type = CNSFVHLLCMomentumImplicitBC
variable = rho_u
momentum_component = x
fp = fp
boundary = 'left right top bottom'
[]
[momentum_y_outflow]
type = CNSFVHLLCMomentumImplicitBC
variable = rho_v
momentum_component = y
fp = fp
boundary = 'left right top bottom'
[]
[fluid_energy_outflow]
type = CNSFVHLLCFluidEnergyImplicitBC
variable = rho_E
fp = fp
boundary = 'left right top bottom'
[]
[]
[AuxVariables]
[Ma]
family = MONOMIAL
order = CONSTANT
[]
[p]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[Ma_aux]
type = NSMachAux
variable = Ma
fluid_properties = fp
use_material_properties = true
[]
[p_aux]
type = ADMaterialRealAux
variable = p
property = pressure
[]
[]
[Materials]
[var_mat]
type = ConservedVarValuesMaterial
rho = rho
rhou = rho_u
rhov = rho_v
rho_et = rho_E
[]
[sound_speed]
type = SoundspeedMat
fp = fp
[]
[]
[Postprocessors]
[cfl_dt]
type = ADCFLTimeStepSize
c_names = 'sound_speed'
vel_names = 'speed'
CFL = 0.5
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[]
[Executioner]
type = Transient
end_time = 0.2
[TimeIntegrator]
type = ExplicitSSPRungeKutta
order = 2
[]
l_tol = 1e-8
[TimeStepper]
type = PostprocessorDT
postprocessor = cfl_dt
[]
[]
(modules/porous_flow/examples/multiapp_fracture_flow/diffusion_multiapp/single_var.i)
# No heat transfer between matrix and fracture, with the matrix and fracture being identical spatial domains
[Mesh]
[generate]
type = GeneratedMeshGenerator
dim = 1
nx = 100
xmin = 0
xmax = 50.0
[]
[]
[Variables]
[T]
[]
[]
[ICs]
[T]
type = FunctionIC
variable = T
function = 'if(x<0.5, 2, 0)' # delta function
[]
[]
[Kernels]
[dot]
type = TimeDerivative
variable = T
[]
[fracture_diffusion]
type = Diffusion
variable = T
[]
[]
[Preconditioning]
[entire_jacobian]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 100
end_time = 100
[]
[VectorPostprocessors]
[final_results]
type = LineValueSampler
start_point = '0 0 0'
end_point = '50 0 0'
num_points = 11
sort_by = x
variable = T
outputs = final_csv
[]
[]
[Outputs]
print_linear_residuals = false
[final_csv]
type = CSV
sync_times = 100
sync_only = true
[]
[]
(test/tests/transfers/general_field/nearest_node/mesh_division/main_match_subapps.i)
# Base input for testing transfers with mesh divisions restrictions. The mesh divisions
# in the parent app will be matched with a subapp index.
# In the to_multiapp direction, the main app data at the mesh division bins of index 1-4 will
# be transferred to subapps of index 1-4 respectively
# In the from_multiapp direction, the main app fields at the mesh divisions bins of index 1-4
# will receive data (be transferred) from subapps of index 1-4 respectively
# It has the following complexities:
# - several sub-applications
# - transfers both from and to the subapps
# - both nodal and elemental variables
# Tests derived from this input may add complexities through command line arguments
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
[]
[MeshDivisions]
[middle]
type = CartesianGridDivision
bottom_left = '0.21 0.21 0'
# cover more and sample more bins
top_right = '1.001 1.001 0'
nx = 2
ny = 2
nz = 1
[]
[]
[AuxVariables]
[from_sub]
initial_condition = -1
[]
[from_sub_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_sub]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[to_sub_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
hide = 'to_sub to_sub_elem div'
overwrite = true
[]
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
input_files = sub.i
output_in_position = true
# The positions are randomly offset to prevent equi-distant nearest-locations
positions = '0.1001 0.0000013 0
0.30054 0.600001985 0
0.70021 0.4000022 0
0.800212 0.8500022 0'
# To differentiate the values received from each subapp
cli_args = 'base_value=1 base_value=2 base_value=3 base_value=4'
[]
[]
[Transfers]
[to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = to_sub
variable = from_main
from_mesh_division = middle
from_mesh_division_usage = 'matching_subapp_index'
[]
[to_sub_elem]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = to_sub_elem
variable = from_main_elem
from_mesh_division = middle
from_mesh_division_usage = 'matching_subapp_index'
[]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = to_main
variable = from_sub
to_mesh_division = middle
to_mesh_division_usage = 'matching_subapp_index'
[]
[from_sub_elem]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = to_main_elem
variable = from_sub_elem
to_mesh_division = middle
to_mesh_division_usage = 'matching_subapp_index'
[]
[]
# For debugging purposes
[AuxVariables]
[div]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[mesh_div]
type = MeshDivisionAux
variable = div
mesh_division = 'middle'
[]
[]
(test/tests/misc/check_error/function_file_test17.i)
# Test for usage of missing function
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic_function
[../]
[../]
[]
[Functions]
[./ic_function]
type = PiecewiseLinear
data_file = piecewise_linear_rows_more_data.csv
xy_in_file_only = false
x_index_in_file = 0
y_index_in_file = 0 # will generate an error because x and y index are equal
scale_factor = 1.0
[../]
[]
[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'
[]
[Outputs]
file_base = out
[]
(test/tests/functions/image_function/image_3d_subset.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 20
ny = 20
nz = 6
zmax = 0.3
[]
[Variables]
[u]
[]
[]
[Functions]
[image_func]
type = ImageFunction
file_base = stack/test
file_suffix = png
file_range = '0 5'
[]
[]
[ICs]
[u_ic]
type = FunctionIC
function = image_func
variable = u
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.1
[]
[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/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/phase_field/examples/interfacekernels/interface_fluxbc.i)
#
# This test demonstrates an InterfaceKernel (InterfaceDiffusionFlux) that can
# replace a pair of integrated DiffusionFluxBC boundary conditions.
#
# The AuxVariable 'diff' shows the difference between the BC and the InterfaceKernel
# approach.
#
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 50
ny = 50
[]
[./box1]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '0.51 1 0'
[../]
[./box2]
input = box1
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '0.49 0 0'
top_right = '1 1 0'
[../]
[./iface_u]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = 10
input = box2
[../]
[./iface_v]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 2
paired_block = 1
new_boundary = 11
input = iface_u
[../]
[]
[Variables]
[./u1]
block = 1
[./InitialCondition]
type = FunctionIC
function = 'r:=sqrt((x-0.4)^2+(y-0.5)^2);if(r<0.05,5,1)'
[../]
[../]
[./v1]
block = 2
[./InitialCondition]
type = FunctionIC
function = 'r:=sqrt((x-0.7)^2+(y-0.5)^2);if(r<0.05,5,1)'
[../]
[../]
[./u2]
block = 1
[./InitialCondition]
type = FunctionIC
function = 'r:=sqrt((x-0.4)^2+(y-0.5)^2);if(r<0.05,5,1)'
[../]
[../]
[./v2]
block = 2
[./InitialCondition]
type = FunctionIC
function = 'r:=sqrt((x-0.7)^2+(y-0.5)^2);if(r<0.05,5,1)'
[../]
[../]
[]
[Kernels]
[./u1_diff]
type = Diffusion
variable = u1
block = 1
[../]
[./u1_dt]
type = TimeDerivative
variable = u1
block = 1
[../]
[./v1_diff]
type = Diffusion
variable = v1
block = 2
[../]
[./v1_dt]
type = TimeDerivative
variable = v1
block = 2
[../]
[./u2_diff]
type = Diffusion
variable = u2
block = 1
[../]
[./u2_dt]
type = TimeDerivative
variable = u2
block = 1
[../]
[./v2_diff]
type = Diffusion
variable = v2
block = 2
[../]
[./v2_dt]
type = TimeDerivative
variable = v2
block = 2
[../]
[]
[AuxVariables]
[./diff]
[../]
[]
[AuxKernels]
[./u_side]
type = ParsedAux
variable = diff
block = 1
coupled_variables = 'u1 u2'
expression = 'u1 - u2'
[../]
[./v_side]
type = ParsedAux
variable = diff
block = 2
coupled_variables = 'v1 v2'
expression = 'v1 - v2'
[../]
[]
[InterfaceKernels]
[./iface]
type = InterfaceDiffusionBoundaryTerm
boundary = 10
variable = u2
neighbor_var = v2
[../]
[]
[BCs]
[./u_boundary_term]
type = DiffusionFluxBC
variable = u1
boundary = 10
[../]
[./v_boundary_term]
type = DiffusionFluxBC
variable = v1
boundary = 11
[../]
[]
[Executioner]
type = Transient
dt = 0.001
num_steps = 20
[]
[Outputs]
exodus = true
print_linear_residuals = false
[]
(modules/phase_field/examples/slkks/CrFe_sigma.i)
#
# SLKKS two phase example for the BCC and SIGMA phases. The sigma phase contains
# multiple sublattices. Free energy from
# Jacob, Aurelie, Erwin Povoden-Karadeniz, and Ernst Kozeschnik. "Revised thermodynamic
# description of the Fe-Cr system based on an improved sublattice model of the sigma phase."
# Calphad 60 (2018): 16-28.
#
# In this simulation we solve only for the sublattice concentrations of the sigma phase
# (and consequently for the free energy of the sigma phase as function of total concentration.)
# The Cr concentration is prescribed as a linear gradient. This permits us to plot
# the free energies of the BCC and sigma phases.
#
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 1000
ny = 1
xmin = 0.01
xmax = 0.99
ymax = 0.1
[]
[]
[AuxVariables]
[cCr]
[InitialCondition]
type = FunctionIC
function = x
[]
[]
[Fb]
order = FIRST
family = MONOMIAL
[]
[Fs]
order = FIRST
family = MONOMIAL
[]
[dFs]
order = CONSTANT
family = MONOMIAL
[]
[dFs0]
order = CONSTANT
family = MONOMIAL
[]
[dFs1]
order = CONSTANT
family = MONOMIAL
[]
[dFs2]
order = CONSTANT
family = MONOMIAL
[]
[]
[Variables]
[SIGMA_0CR]
[InitialCondition]
type = FunctionIC
function = x
[]
[]
[SIGMA_1CR]
[InitialCondition]
type = FunctionIC
function = x
[]
[]
[SIGMA_2CR]
[InitialCondition]
type = FunctionIC
function = x
[]
[]
[]
[AuxKernels]
[Fb]
type = MaterialRealAux
variable = Fb
property = F_BCC_A2
[]
[Fs]
type = MaterialRealAux
variable = Fs
property = F_SIGMA
[]
[dFs0]
type = MaterialRealAux
variable = dFs0
property = dF_SIGMA/dSIGMA_0CR
[]
[dFs1]
type = MaterialRealAux
variable = dFs1
property = dF_SIGMA/dSIGMA_1CR
[]
[dFs2]
type = MaterialRealAux
variable = dFs1
property = dF_SIGMA/dSIGMA_2CR
[]
[dFs]
type = VariableGradientComponent
variable = dFs
gradient_variable = Fs
component = x
[]
[]
[Kernels]
[chempot2a2b]
# This kernel ties the first two sublattices in the sigma phase together
type = SLKKSChemicalPotential
variable = SIGMA_0CR
a = 10
cs = SIGMA_1CR
as = 4
F = F_SIGMA
[]
[chempot2b2c]
# This kernel ties the remaining two sublattices in the sigma phase together
type = SLKKSChemicalPotential
variable = SIGMA_1CR
a = 4
cs = SIGMA_2CR
as = 16
F = F_SIGMA
[]
[sum]
type = SLKKSSum
variable = SIGMA_2CR
a = 16
cs = 'SIGMA_0CR SIGMA_1CR'
as = '10 4'
sum = cCr
[]
[]
[Materials]
# CALPHAD free energy of the FeCr sigma phase
[F_SIGMA]
type = DerivativeParsedMaterial
property_name = F_SIGMA
expression = 'SIGMA_0FE := 1-SIGMA_0CR;
SIGMA_1FE := 1-SIGMA_1CR;
'
'SIGMA_2FE := 1-SIGMA_2CR; 8.3145*T*(10.0*if(SIGMA_0CR > '
'1.0e-15,SIGMA_0CR*log(SIGMA_0CR),0) + 10.0*if(SIGMA_0FE > '
'1.0e-15,SIGMA_0FE*log(SIGMA_0FE),0) + 4.0*if(SIGMA_1CR > '
'1.0e-15,SIGMA_1CR*log(SIGMA_1CR),0) + 4.0*if(SIGMA_1FE > '
'1.0e-15,SIGMA_1FE*log(SIGMA_1FE),0) + 16.0*if(SIGMA_2CR > '
'1.0e-15,SIGMA_2CR*log(SIGMA_2CR),0) + 16.0*if(SIGMA_2FE > '
'1.0e-15,SIGMA_2FE*log(SIGMA_2FE),0))/(10.0*SIGMA_0CR + 10.0*SIGMA_0FE + '
'4.0*SIGMA_1CR + 4.0*SIGMA_1FE + 16.0*SIGMA_2CR + 16.0*SIGMA_2FE) + '
'(SIGMA_0FE*SIGMA_1CR*SIGMA_2CR*SIGMA_2FE*(-70.0*T - 170400.0) + '
'SIGMA_0FE*SIGMA_1FE*SIGMA_2CR*SIGMA_2FE*(-10.0*T - 330839.0))/(10.0*SIGMA_0CR + '
'10.0*SIGMA_0FE + 4.0*SIGMA_1CR + 4.0*SIGMA_1FE + 16.0*SIGMA_2CR + 16.0*SIGMA_2FE) + '
'(SIGMA_0CR*SIGMA_1CR*SIGMA_2CR*(30.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - '
'26.908*T*log(T) + 157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= '
'2180.0 & T < 6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) '
'+ 132000.0) + SIGMA_0CR*SIGMA_1CR*SIGMA_2FE*(-110.0*T + 16.0*if(T >= 298.15 & T < '
'1811.0,77358.5*1/T - 23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - '
'5.89269e-8*T^3.0 + 1225.7,if(T >= 1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - '
'46.0*T*log(T) + 299.31255*T - 25383.581,0)) + 14.0*if(T >= 298.15 & T < '
'2180.0,139250.0*1/T - 26.908*T*log(T) + 157.48*T + 0.00189435*T^2.0 - '
'1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < 6000.0,-2.88526e+32*T^(-9.0) - '
'50.0*T*log(T) + 344.18*T - 34869.344,0)) + 123500.0) + '
'SIGMA_0CR*SIGMA_1FE*SIGMA_2CR*(4.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 26.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 140486.0) '
'+ SIGMA_0CR*SIGMA_1FE*SIGMA_2FE*(20.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 10.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 148800.0) '
'+ SIGMA_0FE*SIGMA_1CR*SIGMA_2CR*(10.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 20.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 56200.0) + '
'SIGMA_0FE*SIGMA_1CR*SIGMA_2FE*(26.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 4.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 152700.0) '
'+ SIGMA_0FE*SIGMA_1FE*SIGMA_2CR*(14.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 16.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 46200.0) + '
'SIGMA_0FE*SIGMA_1FE*SIGMA_2FE*(30.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 173333.0))/(10.0*SIGMA_0CR + 10.0*SIGMA_0FE + 4.0*SIGMA_1CR + '
'4.0*SIGMA_1FE + 16.0*SIGMA_2CR + 16.0*SIGMA_2FE)'
coupled_variables = 'SIGMA_0CR SIGMA_1CR SIGMA_2CR'
constant_names = 'T'
constant_expressions = '1000'
[]
# single sublattice BCC phase (no sublattice concentration solve necessary)
[F_BCC_A2]
type = DerivativeParsedMaterial
property_name = F_BCC_A2
expression = 'BCC_CR:=cCr; BCC_FE:=1-BCC_CR; 8.3145*T*(1.0*if(BCC_CR > '
'1.0e-15,BCC_CR*log(BCC_CR),0) + 1.0*if(BCC_FE > 1.0e-15,BCC_FE*log(BCC_FE),0) + '
'3.0*if(BCC_VA > 1.0e-15,BCC_VA*log(BCC_VA),0))/(BCC_CR + BCC_FE) + 8.3145*T*if(T < '
'548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + '
'311.5*BCC_CR*BCC_VA - '
'1043.0*BCC_FE*BCC_VA,-8.13674105561218e-49*T^15/(0.525599232981783*BCC_CR*BCC_FE*BCC_'
'VA*(BCC_CR - BCC_FE) - 0.894055608820709*BCC_CR*BCC_FE*BCC_VA + '
'0.298657718120805*BCC_CR*BCC_VA - BCC_FE*BCC_VA + 9.58772770853308e-13)^15 - '
'4.65558036243985e-30*T^9/(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^9 - '
'1.3485349181899e-10*T^3/(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^3 + 1 - '
'0.905299382744392*(548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'932.5*BCC_CR*BCC_FE*BCC_VA + 311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA + '
'1.0e-9)/T,if(T < -548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'932.5*BCC_CR*BCC_FE*BCC_VA - 311.5*BCC_CR*BCC_VA + '
'1043.0*BCC_FE*BCC_VA,-8.13674105561218e-49*T^15/(-0.525599232981783*BCC_CR*BCC_FE*BCC'
'_VA*(BCC_CR - BCC_FE) + 0.894055608820709*BCC_CR*BCC_FE*BCC_VA - '
'0.298657718120805*BCC_CR*BCC_VA + BCC_FE*BCC_VA + 9.58772770853308e-13)^15 - '
'4.65558036243985e-30*T^9/(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) '
'+ 0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^9 - '
'1.3485349181899e-10*T^3/(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^3 + 1 - '
'0.905299382744392*(-548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'932.5*BCC_CR*BCC_FE*BCC_VA - 311.5*BCC_CR*BCC_VA + 1043.0*BCC_FE*BCC_VA + '
'1.0e-9)/T,if(T > -548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'932.5*BCC_CR*BCC_FE*BCC_VA - 311.5*BCC_CR*BCC_VA + 1043.0*BCC_FE*BCC_VA & '
'548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + '
'311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA < '
'0,-79209031311018.7*(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^5/T^5 - '
'3.83095660520737e+42*(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^15/T^15 - '
'1.22565886734485e+72*(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^25/T^25,if(T > '
'548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + '
'311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA & 548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - '
'BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + 311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA > '
'0,-79209031311018.7*(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^5/T^5 - '
'3.83095660520737e+42*(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^15/T^15 - '
'1.22565886734485e+72*(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^25/T^25,0))))*log((2.15*BCC_CR*BCC_FE*BCC_VA - '
'0.008*BCC_CR*BCC_VA + 2.22*BCC_FE*BCC_VA)*if(2.15*BCC_CR*BCC_FE*BCC_VA - '
'0.008*BCC_CR*BCC_VA + 2.22*BCC_FE*BCC_VA <= 0,-1.0,1.0) + 1)/(BCC_CR + BCC_FE) + '
'1.0*(BCC_CR*BCC_VA*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + '
'BCC_FE*BCC_VA*if(T >= 298.15 & T < 1811.0,77358.5*1/T - 23.5143*T*log(T) + 124.134*T '
'- 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= 1811.0 & T < '
'6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - 25383.581,0)))/(BCC_CR '
'+ BCC_FE) + 1.0*(BCC_CR*BCC_FE*BCC_VA*(500.0 - 1.5*T)*(BCC_CR - BCC_FE) + '
'BCC_CR*BCC_FE*BCC_VA*(24600.0 - 14.98*T) + BCC_CR*BCC_FE*BCC_VA*(9.15*T - '
'14000.0)*(BCC_CR - BCC_FE)^2)/(BCC_CR + BCC_FE)'
coupled_variables = 'cCr'
constant_names = 'BCC_VA T'
constant_expressions = '1 1000'
[]
[]
[VectorPostprocessors]
[var]
type = LineValueSampler
variable = 'SIGMA_0CR SIGMA_1CR SIGMA_2CR cCr Fb Fs dFs dFs0 dFs1 dFs2'
start_point = '0.01 0 0'
end_point = '0.99 0 0'
sort_by = x
num_points = 1000
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/postprocessors/find_value_on_line/findvalueonline.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmin = 0
xmax = 10
[]
[Variables]
[./phi]
[./InitialCondition]
type = FunctionIC
function = if(x<1,1-x,0)
[../]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = phi
[../]
[./dt]
type = TimeDerivative
variable = phi
[../]
[]
[BCs]
[./influx]
type = NeumannBC
boundary = left
variable = phi
value = 1
[../]
[./fix]
type = DirichletBC
boundary = right
variable = phi
value = 0
[../]
[]
[Postprocessors]
[./pos]
type = FindValueOnLine
target = 0.5
v = phi
start_point = '0 0 0'
end_point = '10 0 0'
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 2.5
[]
[Outputs]
csv = true
[]
(modules/porous_flow/test/tests/mass_conservation/mass10.i)
# Checking that the mass postprocessor throws the correct error when kernel_variable_numer is illegal
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[sat]
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[]
[ICs]
[pinit]
type = ConstantIC
value = 1
variable = pp
[]
[satinit]
type = FunctionIC
function = 1-x
variable = sat
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = sat
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp sat'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 1
thermal_expansion = 0
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 0.1
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = pp
phase1_saturation = sat
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[]
[Postprocessors]
[comp1_total_mass]
type = PorousFlowFluidMass
fluid_component = 1
kernel_variable_number = 2
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
(test/tests/transfers/general_field/user_object/regular/sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 0.2
ymax = 0.2
[]
[AuxVariables]
[from_main]
initial_condition = -1
[]
[from_main_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_main]
[InitialCondition]
type = FunctionIC
function = '3 + 2*x*x + 3*y*y*y'
[]
[]
[to_main_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '4 + 2*x*x + 3*y*y*y'
[]
[]
[]
[UserObjects]
[to_main]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_main
[]
[to_main_elem]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_main_elem
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
hide = 'to_main to_main_elem'
overwrite = true
[]
[]
(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'
[]
[]
(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/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/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/phase_field/test/tests/GrandPotentialPFM/SinteringBase.i)
#input file to test the materials GrandPotentialTensorMaterial and GrandPotentialSinteringMaterial
[Mesh]
type = GeneratedMesh
dim = 2
nx = 17
ny = 17
xmin = 0
xmax = 680
ymin = 0
ymax = 680
[]
[GlobalParams]
op_num = 4
var_name_base = gr
int_width = 40
[]
[Variables]
[./w]
[../]
[./phi]
[../]
[./PolycrystalVariables]
[../]
[]
[AuxVariables]
[./bnds]
[../]
[./T]
order = CONSTANT
family = MONOMIAL
[./InitialCondition]
type = FunctionIC
variable = T
function = f_T
[../]
[../]
[]
[ICs]
[./phi_IC]
type = SpecifiedSmoothCircleIC
variable = phi
x_positions = '190 490 190 490'
y_positions = '190 190 490 490'
z_positions = ' 0 0 0 0'
radii = '150 150 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 = 490
y1 = 190
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[./gr2_IC]
type = SmoothCircleIC
variable = gr2
x1 = 190
y1 = 490
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[./gr3_IC]
type = SmoothCircleIC
variable = gr3
x1 = 490
y1 = 490
z1 = 0
radius = 150
invalue = 1
outvalue = 0
[../]
[]
[Functions]
[./f_T]
type = ConstantFunction
value = 1600
[../]
[]
[Materials]
# Free energy coefficients for parabolic curves
[./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
outputs = exodus
[../]
# Equilibrium vacancy concentration
[./cs_eq]
type = DerivativeParsedMaterial
property_name = cs_eq
coupled_variables = 'gr0 gr1 gr2 gr3 T'
constant_names = 'Ef c_GB kB'
constant_expressions = '2.69 0.189 8.617343e-5'
expression = 'bnds:=gr0^2 + gr1^2 + gr2^2 + gr3^2; exp(-Ef/kB/T) + 4.0 * c_GB * (1 - 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
solid_energy_coefficient = ks
equilibrium_vacancy_concentration = cs_eq
solid_energy_model = PARABOLIC
[../]
[]
[Kernels]
[./dt_gr0]
type = TimeDerivative
variable = gr0
[../]
[./dt_gr1]
type = TimeDerivative
variable = gr1
[../]
[./dt_gr2]
type = TimeDerivative
variable = gr2
[../]
[./dt_gr3]
type = TimeDerivative
variable = gr3
[../]
[./dt_phi]
type = TimeDerivative
variable = phi
[../]
[./dt_w]
type = TimeDerivative
variable = w
[../]
[]
[AuxKernels]
[./bnds_aux]
type = BndsCalcAux
variable = bnds
execute_on = 'initial timestep_end'
[../]
[./T_aux]
type = FunctionAux
variable = T
function = f_T
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = JFNK
dt = 1
num_steps = 1
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/general_field/shape_evaluation/mesh_division/sub.i)
base_value = 3
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
[]
[MeshDivisions]
[middle_sub]
type = CartesianGridDivision
# excludes the nodes on the left boundary
bottom_left = '0.0008 0.20001 0'
top_right = '0.6001 1 0'
nx = 4
ny = 4
nz = 1
[]
[]
[AuxVariables]
[from_main]
initial_condition = -1
[]
[from_main_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_main]
[InitialCondition]
type = FunctionIC
function = '${base_value} + 2*x*x + 3*y*y*y'
[]
[]
[to_main_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '${base_value} + 1 + 2*x*x + 3*y*y*y'
[]
[]
[]
[UserObjects]
[to_main]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_main
[]
[to_main_elem]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_main_elem
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
hide = 'to_main to_main_elem div'
overwrite = true
[]
[]
# For debugging purposes
[AuxVariables]
[div]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[mesh_div]
type = MeshDivisionAux
variable = div
mesh_division = 'middle_sub'
[]
[]
(python/chigger/tests/input/block_vars.i)
[Mesh]
[generator]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[subdomain1]
type = SubdomainBoundingBoxGenerator
input = generator
bottom_left = '0.5 0 0'
top_right = '1 1 0'
block_id = 1
[]
[]
[Variables]
[right_elemental]
block = 1
family = MONOMIAL
order = CONSTANT
[]
[right_nodal]
block = 1
[]
[]
[ICs]
[right_elemental]
type = FunctionIC
variable = right_elemental
function = 2*y
[]
[right_nodal]
type = FunctionIC
variable = right_nodal
function = 3*y
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[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/porous_flow/test/tests/poroperm/except2.i)
# Exception test: fluid=true but no solid_bulk is provided
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
PorousFlowDictator = dictator
displacements = 'disp_x disp_y disp_z'
biot_coefficient = 0.7
[]
[Variables]
[porepressure]
initial_condition = 2
[]
[temperature]
initial_condition = 4
[]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[ICs]
[disp_x]
type = FunctionIC
function = '0.5 * x'
variable = disp_x
[]
[]
[Kernels]
[dummy_p]
type = TimeDerivative
variable = porepressure
[]
[dummy_t]
type = TimeDerivative
variable = temperature
[]
[dummy_x]
type = TimeDerivative
variable = disp_x
[]
[dummy_y]
type = TimeDerivative
variable = disp_y
[]
[dummy_z]
type = TimeDerivative
variable = disp_z
[]
[]
[AuxVariables]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[]
[]
[Postprocessors]
[porosity]
type = PointValue
variable = porosity
point = '0 0 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure temperature'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temperature
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[porosity]
type = PorousFlowPorosity
mechanical = true
fluid = true
thermal = true
ensure_positive = false
porosity_zero = 0.5
thermal_expansion_coeff = 0.5
reference_porepressure = 3
reference_temperature = 3.5
[]
[]
[Executioner]
solve_type = Newton
type = Transient
num_steps = 1
[]
[Outputs]
csv = true
[]
(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/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
[]
[]
(test/tests/misc/check_error/function_file_test4.i)
# Test for usage of missing function
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic_function
[../]
[../]
[]
[Functions]
[./ic_function]
type = PiecewiseLinear
data_file = dummy #we don't get that far
format = rowls
scale_factor = 1.0
[../]
[]
[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'
[]
[Outputs]
file_base = out
[]
(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/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
[]
(test/tests/transfers/coord_transform/both-transformed/copy/main-app.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = -1
ymax = 0
nx = 10
ny = 10
alpha_rotation = 90
[]
[Variables]
[u][]
[]
[AuxVariables]
[v][]
[v_elem]
order = CONSTANT
family = MONOMIAL
[]
[w][]
[w_elem]
order = CONSTANT
family = MONOMIAL
[]
[]
[ICs]
[w]
type = FunctionIC
function = 'cos(x)*sin(y)'
variable = w
[]
[w_elem]
type = FunctionIC
function = 'cos(x)*sin(y)'
variable = w_elem
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
verbose = true
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = 'sub-app.i'
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[from_sub]
type = MultiAppCopyTransfer
from_multi_app = sub
source_variable = v
variable = v
execute_on = 'timestep_begin'
[]
[from_sub_elem]
type = MultiAppCopyTransfer
from_multi_app = sub
source_variable = v_elem
variable = v_elem
execute_on = 'timestep_begin'
[]
[to_sub]
type = MultiAppCopyTransfer
to_multi_app = sub
source_variable = w
variable = w
execute_on = 'timestep_begin'
[]
[to_sub_elem]
type = MultiAppCopyTransfer
to_multi_app = sub
source_variable = w_elem
variable = w_elem
execute_on = 'timestep_begin'
[]
[]
(test/tests/misc/check_error/function_file_test16.i)
# Test for usage of missing function
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic_function
[../]
[../]
[]
[Functions]
[./ic_function]
type = PiecewiseLinear
data_file = piecewise_linear_rows_more_data.csv
xy_in_file_only = false
y_index_in_file = 3 # will generate an error because no forth row of data
scale_factor = 1.0
[../]
[]
[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'
[]
[Outputs]
file_base = out
[]
(test/tests/materials/compile_time_derivative/test.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
[]
[]
[Problem]
solve = false
[]
[Variables]
[a]
[InitialCondition]
type = FunctionIC
function = x
[]
[]
[b]
[InitialCondition]
type = FunctionIC
function = y
[]
[]
[c]
[InitialCondition]
type = FunctionIC
function = z
[]
[]
[]
[Materials]
[ctd]
type = CTDCoupledVarTest
x = a
y = b
z = c
property_name = F
[]
[parsed]
type = DerivativeParsedMaterial
coupled_variables = 'a b c'
expression = 'a^3*b^4*c^5 + sin(a)*cos(b)/(c+0.1) + log(a+0.1)*sin(b)*cos(c)'
property_name = G
[]
[L2_difference]
type = ParsedMaterial
expression = '(f0-g0)^2+(f1-g1)^2+(f2-g2)^2+(f3-g3)^2+(f4-g4)^2+(f5-g5)^2+(f6-g6)^2+(f7-g7)^2+(f8-g8)^2+(f9-g9)^2+(f10-g10)^2+(f11-g11)^2+(f12-g12)^2+(f13-g13)^2+(f14-g14)^2+(f15-g15)^2+(f16-g16)^2+(f17-g17)^2+(f18-g18)^2+(f19-g19)^2'
material_property_names = 'f0:=F g0:=G f1:=dF/da g1:=dG/da f2:=dF/db g2:=dG/db f3:=dF/dc g3:=dG/dc f4:=d^2F/da^2 g4:=d^2G/da^2 f5:=d^2F/dadb g5:=d^2G/dadb f6:=d^2F/dadc g6:=d^2G/dadc f7:=d^2F/db^2 g7:=d^2G/db^2 f8:=d^2F/dbdc g8:=d^2G/dbdc f9:=d^2F/dc^2 g9:=d^2G/dc^2 f10:=d^3F/da^2db g10:=d^3G/da^2db f11:=d^3F/da^2dc g11:=d^3G/da^2dc f12:=d^3F/da^3 g12:=d^3G/da^3 f13:=d^3F/dadb^2 g13:=d^3G/dadb^2 f14:=d^3F/dadbdc g14:=d^3G/dadbdc f15:=d^3F/dadc^2 g15:=d^3G/dadc^2 f16:=d^3F/db^2dc g16:=d^3G/db^2dc f17:=d^3F/db^3 g17:=d^3G/db^3 f18:=d^3F/dbdc^2 g18:=d^3G/dbdc^2 f19:=d^3F/dc^3 g19:=d^3G/dc^3'
property_name = L2
[]
[]
[Postprocessors]
[L2_int]
type = ElementIntegralMaterialProperty
mat_prop = L2
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/transfers/general_field/nearest_node/between_siblings/sub_between_diffusion1.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
[]
[block1]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '0.5 0.5 0'
[]
[]
[AuxVariables]
[sent_nodal]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[received_nodal]
initial_condition = -1
[]
[sent_elem]
family = MONOMIAL
order = CONSTANT
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[received_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
exodus = true
hide = 'sent_nodal sent_elem'
execute_on = 'TIMESTEP_END'
[]
(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/porous_flow/test/tests/poroperm/except1.i)
# Exception test: thermal=true but no thermal_expansion_coeff provided
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
PorousFlowDictator = dictator
displacements = 'disp_x disp_y disp_z'
biot_coefficient = 0.7
[]
[Variables]
[porepressure]
initial_condition = 2
[]
[temperature]
initial_condition = 4
[]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[ICs]
[disp_x]
type = FunctionIC
function = '0.5 * x'
variable = disp_x
[]
[]
[Kernels]
[dummy_p]
type = TimeDerivative
variable = porepressure
[]
[dummy_t]
type = TimeDerivative
variable = temperature
[]
[dummy_x]
type = TimeDerivative
variable = disp_x
[]
[dummy_y]
type = TimeDerivative
variable = disp_y
[]
[dummy_z]
type = TimeDerivative
variable = disp_z
[]
[]
[AuxVariables]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[]
[]
[Postprocessors]
[porosity]
type = PointValue
variable = porosity
point = '0 0 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure temperature'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temperature
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[porosity]
type = PorousFlowPorosity
mechanical = true
fluid = true
thermal = true
ensure_positive = false
porosity_zero = 0.5
solid_bulk = 0.3
reference_porepressure = 3
reference_temperature = 3.5
[]
[]
[Executioner]
solve_type = Newton
type = Transient
num_steps = 1
[]
[Outputs]
csv = true
[]
(test/tests/nodalkernels/constraint_enforcement/vi-bounding.i)
l=10
nx=100
num_steps=10
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[bounds][]
[]
[Bounds]
[./u_upper_bounds]
type = ConstantBounds
variable = bounds
bounded_variable = u
bound_type = upper
bound_value = ${l}
[../]
[./u_lower_bounds]
type = ConstantBounds
variable = bounds
bounded_variable = u
bound_type = lower
bound_value = 0
[../]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'x'
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = 'if(x<5,-1,1)'
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = 0
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = ${l}
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
solve_type = NEWTON
dtmin = 1
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_type -sub_pc_factor_levels -snes_linesearch_type -snes_type'
petsc_options_value = '0 30 asm 16 basic vinewtonrsls'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = 'nonlinear timestep_end'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[upper_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = ${fparse 10+1e-8}
comparator = 'greater'
[]
[lower_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-8
comparator = 'less'
[]
[nls]
type = NumNonlinearIterations
[]
[cum_nls]
type = CumulativeValuePostprocessor
postprocessor = nls
[]
[]
(modules/scalar_transport/test/tests/ncp-lms/interpolated-ncp-lm-nodal-enforcement-nodal-forces.i)
l=10
nx=100
num_steps=10
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
[]
[Variables]
[u]
[]
[lm]
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = '${l} - x'
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = '-1'
[]
[]
[NodalKernels]
[positive_constraint]
type = LowerBoundNodalKernel
variable = lm
v = u
exclude_boundaries = 'left right'
[]
[forces]
type = CoupledForceNodalKernel
variable = u
v = lm
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = ${l}
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = 0
variable = u
[]
[]
[NodalKernels]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
solve_type = NEWTON
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_factor_levels -snes_linesearch_type'
petsc_options_value = '0 30 16 basic'
[]
[Outputs]
exodus = true
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[active_lm]
type = GreaterThanLessThanPostprocessor
variable = lm
execute_on = 'nonlinear timestep_end'
value = 1e-12
[]
[violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-8
comparator = 'less'
[]
[]
(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
[../]
[]
(modules/porous_flow/test/tests/aux_kernels/darcy_velocity_lower.i)
# checking that the PorousFlowDarcyVelocityComponentLowerDimensional AuxKernel works as expected
# for the fully-saturated case (relative-permeability = 1)
# The fractured_block.e has size = 10x10x10, and a fracture running through its
# centre, with normal = (0, -sin(20deg), cos(20deg))
# Porepressure is initialised to grad(P) = (0, 0, 1)
# Fluid_density = 2
# viscosity = 10
# relative_permeability = 1
# permeability = (5, 5, 5) (in the bulk)
# permeability = (10, 10, 10) (in the fracture)
# aperture = 1
# gravity = (1, 0.5, 0.2)
# So Darcy velocity in the bulk = (1, 0.5, -0.3)
# in the fracture grad(P) = (0, 0.3213938, 0.11697778)
# In the fracture the projected gravity vector is
# tangential_gravity = (1, 0.5057899, 0.18409245)
# So the Darcy velocity in the fracture = (2, 0.690186, 0.251207)
[Mesh]
type = FileMesh
file = fractured_block.e
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '1 0.5 0.2'
[]
[Variables]
[pp]
[]
[]
[ICs]
[pinit]
type = FunctionIC
function = z
variable = pp
[]
[]
[Kernels]
[dummy]
type = TimeDerivative
variable = pp
[]
[]
[AuxVariables]
[bulk_vel_x]
order = CONSTANT
family = MONOMIAL
[]
[bulk_vel_y]
order = CONSTANT
family = MONOMIAL
[]
[bulk_vel_z]
order = CONSTANT
family = MONOMIAL
[]
[fracture_vel_x]
order = CONSTANT
family = MONOMIAL
block = 3
[]
[fracture_vel_y]
order = CONSTANT
family = MONOMIAL
block = 3
[]
[fracture_vel_z]
order = CONSTANT
family = MONOMIAL
block = 3
[]
[]
[AuxKernels]
[bulk_vel_x]
type = PorousFlowDarcyVelocityComponent
variable = bulk_vel_x
component = x
fluid_phase = 0
[]
[bulk_vel_y]
type = PorousFlowDarcyVelocityComponent
variable = bulk_vel_y
component = y
fluid_phase = 0
[]
[bulk_vel_z]
type = PorousFlowDarcyVelocityComponent
variable = bulk_vel_z
component = z
fluid_phase = 0
[]
[fracture_vel_x]
type = PorousFlowDarcyVelocityComponentLowerDimensional
variable = fracture_vel_x
component = x
fluid_phase = 0
[]
[fracture_vel_y]
type = PorousFlowDarcyVelocityComponentLowerDimensional
variable = fracture_vel_y
component = y
fluid_phase = 0
[]
[fracture_vel_z]
type = PorousFlowDarcyVelocityComponentLowerDimensional
variable = fracture_vel_z
component = z
fluid_phase = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1E16
viscosity = 10
density0 = 2
thermal_expansion = 0
[]
[]
[Postprocessors]
[bulk_vel_x]
type = ElementAverageValue
block = 1
variable = bulk_vel_x
[]
[bulk_vel_y]
type = ElementAverageValue
block = 1
variable = bulk_vel_y
[]
[bulk_vel_z]
type = ElementAverageValue
block = 1
variable = bulk_vel_z
[]
[fracture_vel_x]
type = ElementAverageValue
block = 3
variable = fracture_vel_x
[]
[fracture_vel_y]
type = ElementAverageValue
block = 3
variable = fracture_vel_y
[]
[fracture_vel_z]
type = ElementAverageValue
block = 3
variable = fracture_vel_z
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '5 0 0 0 5 0 0 0 5'
block = '1 2'
[]
[permeability_fracture]
type = PorousFlowPermeabilityConst
permeability = '10 0 0 0 10 0 0 0 10'
block = 3
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[Executioner]
type = Transient
dt = 1
end_time = 1
[]
[Outputs]
csv = true
[]
(modules/porous_flow/test/tests/flux_limited_TVD_pflow/jacobian_05.i)
# Checking the Jacobian of Flux-Limited TVD Advection, 2 phases, 2 components, using flux_limiter_type != None
#
# Here we use snes_check_jacobian instead of snes_type=test. The former just checks the Jacobian for the
# random initial conditions, while the latter checks for u=1 and u=-1
#
# The Jacobian is correct for u=1 and u=-1, but the finite-difference scheme used by snes_type=test gives the
# wrong answer.
# For u=constant, the Kuzmin-Turek scheme adds as much antidiffusion as possible, resulting in a central-difference
# version of advection (flux_limiter = 1). This is correct, and the Jacobian is calculated correctly.
# However, when computing the Jacobian using finite differences, u is increased or decreased at a node.
# This results in that node being at a maximum or minimum, which means no antidiffusion should be added
# (flux_limiter = 0). This corresponds to a full-upwind scheme. So the finite-difference computes the
# Jacobian in the full-upwind scenario, which is incorrect (the original residual = 0, after finite-differencing
# the residual comes from the full-upwind scenario).
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 5
[]
[GlobalParams]
gravity = '1.1 2 -0.5'
PorousFlowDictator = dictator
[]
[Variables]
[ppwater]
[]
[ppgas]
[]
[massfrac_ph0_sp0]
[]
[massfrac_ph1_sp0]
[]
[]
[ICs]
[ppwater]
type = FunctionIC
variable = ppwater
function = 'if(x<1,0,if(x<4,sin(x-1),1))'
[]
[ppgas]
type = FunctionIC
variable = ppgas
function = 'x*(6-x)/6'
[]
[massfrac_ph0_sp0]
type = FunctionIC
variable = massfrac_ph0_sp0
function = 'x/6'
[]
[massfrac_ph1_sp0]
type = FunctionIC
variable = massfrac_ph1_sp0
function = '1-x/7'
[]
[]
[Kernels]
[flux_ph0_sp0]
type = PorousFlowFluxLimitedTVDAdvection
variable = ppwater
advective_flux_calculator = advective_flux_calculator_ph0_sp0
[]
[flux_ph0_sp1]
type = PorousFlowFluxLimitedTVDAdvection
variable = ppgas
advective_flux_calculator = advective_flux_calculator_ph0_sp1
[]
[flux_ph1_sp0]
type = PorousFlowFluxLimitedTVDAdvection
variable = massfrac_ph0_sp0
advective_flux_calculator = advective_flux_calculator_ph1_sp0
[]
[flux_ph1_sp1]
type = PorousFlowFluxLimitedTVDAdvection
variable = massfrac_ph1_sp0
advective_flux_calculator = advective_flux_calculator_ph1_sp1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
viscosity = 1
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 0.5
density0 = 0.5
thermal_expansion = 0
viscosity = 1.4
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'ppwater ppgas massfrac_ph0_sp0 massfrac_ph1_sp0'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
alpha = 1
m = 0.5
[]
[advective_flux_calculator_ph0_sp0]
type = PorousFlowAdvectiveFluxCalculatorUnsaturatedMultiComponent
flux_limiter_type = minmod
phase = 0
fluid_component = 0
[]
[advective_flux_calculator_ph0_sp1]
type = PorousFlowAdvectiveFluxCalculatorUnsaturatedMultiComponent
flux_limiter_type = vanleer
phase = 0
fluid_component = 1
[]
[advective_flux_calculator_ph1_sp0]
type = PorousFlowAdvectiveFluxCalculatorUnsaturatedMultiComponent
flux_limiter_type = mc
phase = 1
fluid_component = 0
[]
[advective_flux_calculator_ph1_sp1]
type = PorousFlowAdvectiveFluxCalculatorUnsaturatedMultiComponent
flux_limiter_type = superbee
phase = 1
fluid_component = 1
[]
[]
[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
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1.21 0 0 0 1.5 0 0 0 0.8'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options = '-snes_check_jacobian'
[]
[]
[Executioner]
type = Transient
solve_type = Linear # this is to force convergence even though the nonlinear residual is high: we just care about the Jacobian in this test
end_time = 1
num_steps = 1
dt = 1
[]
(test/tests/transfers/general_field/shape_evaluation/subdomain/sub.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmax = 0.2
ymax = 0.2
[]
[add_block]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x > 0.05 & y < 0.1'
block_id = 1
[]
[]
[AuxVariables]
[from_main]
initial_condition = -1
[]
[from_main_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_main]
[InitialCondition]
type = FunctionIC
function = '3 + 2*x*x + 3*y*y*y'
[]
[]
[to_main_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '4 + 2*x*x + 3*y*y*y'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
exodus = true
hide = 'to_main to_main_elem'
execute_on = 'TIMESTEP_END'
[]
(test/tests/transfers/general_field/user_object/boundary/sub.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 5
ny = 5
nz = 5
xmax = 0.3
ymax = 0.3
zmax = 0.3
[]
[add_block]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x > 0.22 & y < 0.23'
block_id = 1
[]
[add_internal_sideset]
type = SideSetsBetweenSubdomainsGenerator
input = add_block
primary_block = 0
paired_block = 1
new_boundary = internal
[]
[]
[AuxVariables]
[from_main]
initial_condition = -1
[]
[from_main_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_main]
[InitialCondition]
type = FunctionIC
function = '3 + 2*x*x + 3*y*y*y'
[]
[]
[to_main_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '4 + 2*x*x + 3*y*y*y'
[]
[]
[]
[UserObjects]
[to_main]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_main
[]
[to_main_elem]
type = LayeredAverage
direction = x
num_layers = 10
variable = to_main_elem
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
hide = 'to_main to_main_elem'
overwrite = true
[]
[]
(modules/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/scalar_transport/test/tests/ncp-lms/ncp-lm.i)
l=10
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${l}
[]
[Variables]
[u][]
[lm][]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = '${l} - x'
[]
[]
[NodalKernels]
[time]
type = TimeDerivativeNodalKernel
variable = u
[]
[ffn]
type = UserForcingFunctionNodalKernel
variable = u
function = '-1'
[]
[lm_coupled_force]
type = CoupledForceNodalKernel
variable = u
v = lm
[]
[positive_constraint]
type = LowerBoundNodalKernel
variable = lm
v = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${l}
solve_type = NEWTON
petsc_options = '-pc_svd_monitor'
petsc_options_iname = '-pc_type'
petsc_options_value = 'svd'
[]
[Outputs]
exodus = true
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[active_lm]
type = GreaterThanLessThanPostprocessor
variable = lm
execute_on = 'nonlinear timestep_end'
value = 1e-12
[]
[violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-12
comparator = 'less'
[]
[]
(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/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
[../]
[]
(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/porous_flow/test/tests/chemistry/2species_equilibrium_2phase.i)
# Using a two-phase system (see 2species_equilibrium for the single-phase)
# The saturations, porosity, mass fractions, tortuosity and diffusion coefficients are chosen so that the results are identical to 2species_equilibrium
#
# PorousFlow analogy of chemical_reactions/test/tests/aqueous_equilibrium/2species.i
#
# Simple equilibrium reaction example to illustrate the use of PorousFlowMassFractionAqueousEquilibriumChemistry
#
# In this example, two primary species a and b are transported by diffusion and convection
# from the left of the porous medium, reacting to form two equilibrium species pa2 and pab
# according to the equilibrium reaction:
#
# reactions = '2a = pa2 rate = 10^2
# a + b = pab rate = 10^-2'
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
[]
[Variables]
[a]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[]
[]
[b]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[]
[]
[]
[AuxVariables]
[eqm_k0]
initial_condition = 1E2
[]
[eqm_k1]
initial_condition = 1E-2
[]
[pressure0]
[]
[saturation1]
initial_condition = 0.25
[]
[a_in_phase0]
initial_condition = 0.0
[]
[b_in_phase0]
initial_condition = 0.0
[]
[pa2]
family = MONOMIAL
order = CONSTANT
[]
[pab]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[pa2]
type = PorousFlowPropertyAux
property = secondary_concentration
secondary_species = 0
variable = pa2
[]
[pab]
type = PorousFlowPropertyAux
property = secondary_concentration
secondary_species = 1
variable = pab
[]
[]
[ICs]
[pressure0]
type = FunctionIC
variable = pressure0
function = 2-x
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Kernels]
[mass_a]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = a
[]
[flux_a]
type = PorousFlowAdvectiveFlux
variable = a
fluid_component = 0
[]
[diff_a]
type = PorousFlowDispersiveFlux
variable = a
fluid_component = 0
disp_trans = '0 0'
disp_long = '0 0'
[]
[mass_b]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = b
[]
[flux_b]
type = PorousFlowAdvectiveFlux
variable = b
fluid_component = 1
[]
[diff_b]
type = PorousFlowDispersiveFlux
variable = b
fluid_component = 1
disp_trans = '0 0'
disp_long = '0 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'a b'
number_fluid_phases = 2
number_fluid_components = 3
number_aqueous_equilibrium = 2
aqueous_phase_number = 1
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9 # huge, so mimic chemical_reactions
density0 = 1000
thermal_expansion = 0
viscosity = 1e-3
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
capillary_pressure = pc
phase0_porepressure = pressure0
phase1_saturation = saturation1
[]
[massfrac]
type = PorousFlowMassFractionAqueousEquilibriumChemistry
mass_fraction_vars = 'a_in_phase0 b_in_phase0 a b'
num_reactions = 2
equilibrium_constants = 'eqm_k0 eqm_k1'
primary_activity_coefficients = '1 1'
secondary_activity_coefficients = '1 1'
reactions = '2 0
1 1'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.8
[]
[permeability]
type = PorousFlowPermeabilityConst
# porous_flow permeability / porous_flow viscosity = chemical_reactions conductivity = 1E-4
permeability = '1E-7 0 0 0 1E-7 0 0 0 1E-7'
[]
[relp0]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[relp1]
type = PorousFlowRelativePermeabilityConst
phase = 1
[]
[diff]
type = PorousFlowDiffusivityConst
# porous_flow diffusion_coeff * tortuousity * porosity = chemical_reactions diffusivity = 1E-4
diffusion_coeff = '5E-4 5E-4 5E-4
5E-4 5E-4 5E-4'
tortuosity = '0.25 0.25'
[]
[]
[BCs]
[a_left]
type = DirichletBC
variable = a
boundary = left
value = 1.0e-2
[]
[b_left]
type = DirichletBC
variable = b
boundary = left
value = 1.0e-2
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 10
end_time = 100
[]
[Outputs]
print_linear_residuals = true
exodus = true
perf_graph = true
[]
(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
[]
(test/tests/misc/check_error/function_file_test15.i)
# Test for usage of missing function
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic_function
[../]
[../]
[]
[Functions]
[./ic_function]
type = PiecewiseLinear
data_file = piecewise_linear_rows_more_data.csv
xy_in_file_only = false
x_index_in_file = 3 # will generate an error because no forth row of data
scale_factor = 1.0
[../]
[]
[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'
[]
[Outputs]
file_base = out
[]
(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
[]
(test/tests/meshgenerators/file_mesh_generator/2d_diffusion_iga_nosplines.i)
[Mesh]
[cyl2d_iga]
type = FileMeshGenerator
file = PressurizedCyl_Patch6_4Elem.e
clear_spline_nodes = true
[]
allow_renumbering = false # VTK diffs via XMLDiff are
parallel_type = replicated # really fragile
[]
[Variables]
[u]
order = SECOND # Must match mesh order
family = RATIONAL_BERNSTEIN
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'sin(x)'
[]
[]
[Executioner]
type = Transient
num_steps = 2
solve_type = NEWTON
dtmin = 1
[]
[Outputs]
vtk = true
[]
(modules/phase_field/test/tests/phase_field_kernels/ADAllenCahnVariableL.i)
#
# Test the forward automatic differentiation Allen-Cahn Bulk kernel with a
# spatially varying mobility
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 12
ymax = 12
elem_type = QUAD4
[]
[AuxVariables]
[./chi]
[./InitialCondition]
type = FunctionIC
function = 'x/24+0.5'
[../]
[../]
[]
[Variables]
[./eta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 6.0
invalue = 0.9
outvalue = 0.1
int_width = 3.0
[../]
[../]
[]
[Kernels]
[./detadt]
type = ADTimeDerivative
variable = eta
[../]
[./ACBulk]
type = ADAllenCahn
variable = eta
f_name = F
[../]
[./ACInterface]
type = ADACInterface
variable = eta
kappa_name = 1
variable_L = true
coupled_variables = chi
[../]
[]
[Materials]
[./L]
type = ADTestDerivativeFunction
function = F2
f_name = L
op = 'eta chi'
[../]
[./free_energy]
type = ADTestDerivativeFunction
function = F1
f_name = F
op = 'eta'
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
num_steps = 2
dt = 1
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/mass_conservation/mass08.i)
# Checking that the mass postprocessor throws the correct error when a given phase index
# is too large
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[sat]
[]
[]
[AuxVariables]
[massfrac_ph0_sp0]
initial_condition = 1
[]
[massfrac_ph1_sp0]
initial_condition = 0
[]
[]
[ICs]
[pinit]
type = ConstantIC
value = 1
variable = pp
[]
[satinit]
type = FunctionIC
function = 1-x
variable = sat
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = sat
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp sat'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 1
thermal_expansion = 0
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 0.1
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = pp
phase1_saturation = sat
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac_ph0_sp0 massfrac_ph1_sp0'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[]
[Postprocessors]
[comp1_total_mass]
type = PorousFlowFluidMass
fluid_component = 1
phase = 2
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
(test/tests/transfers/general_field/nearest_node/nearest_position/main_single_sub.i)
# Base input for testing transfers. It has the following complexities:
# - more than one subapp
# - transfers both from and to the subapps
# - both nodal and elemental variables
# Tests derived from this input may add complexities through command line arguments
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[AuxVariables]
[to_sub]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[to_sub_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[from_sub]
initial_condition = -1
[]
[from_sub_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
verbose_multiapps = true
[]
[Outputs]
[out]
type = Exodus
overwrite = true
hide = 'to_sub to_sub_elem'
[]
[]
[Positions]
[single]
type = InputPositions
# Tiny offset to steer clear of equidistance
positions = '0.000001 0.0000000001 0'
[]
[partition_app_domain]
type = InputPositions
# Tiny offsets to steer clear of equi-distance
# The top left and bottom right are closer to top right than to the bottom left corner
# This makes it so that the bottom left "nearest-area" is larger
# and the top-right "nearest" area is smaller
positions = '0.1 0.12 0
0.900008 0.130000000001 0
0.85000007 0.8500001 0
0.10001 0.75003 0'
[]
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
positions_objects = single
app_type = MooseTestApp
input_files = sub_holes.i
output_in_position = true
execute_on = TIMESTEP_END
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = to_main
variable = from_sub
use_nearest_position = partition_app_domain
search_value_conflicts = true
bbox_factor = 10
group_subapps = true
[]
[from_sub_elem]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = to_main_elem
variable = from_sub_elem
use_nearest_position = partition_app_domain
search_value_conflicts = true
bbox_factor = 10
group_subapps = true
[]
[]
(modules/xfem/test/tests/switching_material/one_cut_stationary.i)
[Problem]
solve = false
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[levelset_cut]
type = LevelSetCutUserObject
level_set_var = phi
negative_id = 1
positive_id = 33
[]
[]
[Mesh]
[square]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[]
[]
[AuxVariables]
[phi]
[InitialCondition]
type = FunctionIC
function = 'x-0.213'
[]
[]
[]
[Materials]
[diffusivity_A]
type = GenericConstantMaterial
prop_names = 'A_D'
prop_values = '5'
[]
[diffusivity_B]
type = GenericConstantMaterial
prop_names = 'B_D'
prop_values = '0.5'
[]
[diff_combined]
type = XFEMCutSwitchingMaterialReal
cut_subdomain_ids = '1 33'
base_names = 'A B'
prop_name = D
geometric_cut_userobject = levelset_cut
outputs = 'exodus'
output_properties = 'D'
[]
[]
[Executioner]
type = Transient
num_steps = 1
max_xfem_update = 1
[]
[Outputs]
exodus = true
[]
(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
[]
(test/tests/transfers/general_field/nearest_node/between_siblings/sub_between_diffusion2.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 3
ny = 3
# partial overlap but also, no equidistant points
xmin = 0.1111
ymin = 0.3333
xmax = 1.211111
ymax = 1.222222
[]
[block1]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0.4 0.6 0'
# extends beyond to grab the boundary
top_right = '2 2 0'
[]
[]
[AuxVariables]
[sent_nodal]
[InitialCondition]
type = FunctionIC
function = '3 + 2*x*x + 3*y*y*y'
[]
[]
[received_nodal]
initial_condition = -1
[]
[sent_elem]
family = MONOMIAL
order = CONSTANT
[InitialCondition]
type = FunctionIC
function = '4 + 2*x*x + 3*y*y*y'
[]
[]
[received_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
exodus = true
hide = 'sent_nodal sent_elem'
execute_on = 'TIMESTEP_END'
[]
(modules/porous_flow/test/tests/jacobian/fflux02.i)
# 1phase, 3components, constant viscosity, constant insitu permeability
# density with constant bulk, Corey relative perm, nonzero gravity, unsaturated with vanGenuchten
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
xmin = 0
xmax = 1
ny = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[massfrac0]
[]
[massfrac1]
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = -0.7+x+y
[]
[massfrac0]
type = RandomIC
variable = massfrac0
min = 0
max = 0.3
[]
[massfrac1]
type = RandomIC
variable = massfrac1
min = 0
max = 0.4
[]
[]
[Kernels]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
gravity = '-1 -0.1 0'
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = massfrac0
gravity = '-1 -0.1 0'
[]
[flux2]
type = PorousFlowAdvectiveFlux
fluid_component = 2
variable = massfrac1
gravity = '-1 -0.1 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0 massfrac1'
number_fluid_phases = 1
number_fluid_components = 3
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
viscosity = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac0 massfrac1'
[]
[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 = 2
phase = 0
[]
[]
[Preconditioning]
active = check
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000'
[]
[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-15 1E-10 10000 test'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
exodus = false
[]
(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/porous_flow/examples/coal_mining/fine_with_fluid.i)
#################################################################
#
# NOTE:
# The mesh for this model is too large for the MOOSE repository
# so is kept in the the large_media submodule
#
#################################################################
#
# Strata deformation and fluid flow aaround a coal mine - 3D model
#
# A "half model" is used. The mine is 400m deep and
# just the roof is studied (-400<=z<=0). The mining panel
# sits between 0<=x<=150, and 0<=y<=1000, so this simulates
# a coal panel that is 300m wide and 1000m long. The outer boundaries
# are 1km from the excavation boundaries.
#
# The excavation takes 0.5 years.
#
# The boundary conditions for this simulation are:
# - disp_x = 0 at x=0 and x=1150
# - disp_y = 0 at y=-1000 and y=1000
# - disp_z = 0 at z=-400, but there is a time-dependent
# Young modulus that simulates excavation
# - wc_x = 0 at y=-1000 and y=1000
# - wc_y = 0 at x=0 and x=1150
# - no flow at x=0, z=-400 and z=0
# - fixed porepressure at y=-1000, y=1000 and x=1150
# That is, rollers on the sides, free at top,
# and prescribed at bottom in the unexcavated portion.
#
# A single-phase unsaturated fluid is used.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa, and time units are measured in years.
#
# The initial porepressure is hydrostatic with P=0 at z=0, so
# Porepressure ~ - 0.01*z MPa, where the fluid has density 1E3 kg/m^3 and
# gravity = = 10 m.s^-2 = 1E-5 MPa m^2/kg.
# To be more accurate, i use
# Porepressure = -bulk * log(1 + g*rho0*z/bulk)
# where bulk=2E3 MPa and rho0=1Ee kg/m^3.
# The initial stress is consistent with the weight force from undrained
# density 2500 kg/m^3, and fluid porepressure, and a Biot coefficient of 0.7, ie,
# stress_zz^effective = 0.025*z + 0.7 * initial_porepressure
# The maximum and minimum principal horizontal effective stresses are
# assumed to be equal to 0.8*stress_zz.
#
# Material properties:
# Young's modulus = 8 GPa
# Poisson's ratio = 0.25
# Cosserat layer thickness = 1 m
# Cosserat-joint normal stiffness = large
# Cosserat-joint shear stiffness = 1 GPa
# MC cohesion = 2 MPa
# MC friction angle = 35 deg
# MC dilation angle = 8 deg
# MC tensile strength = 1 MPa
# MC compressive strength = 100 MPa
# WeakPlane cohesion = 0.1 MPa
# WeakPlane friction angle = 30 deg
# WeakPlane dilation angle = 10 deg
# WeakPlane tensile strength = 0.1 MPa
# WeakPlane compressive strength = 100 MPa softening to 1 MPa at strain = 1
# Fluid density at zero porepressure = 1E3 kg/m^3
# Fluid bulk modulus = 2E3 MPa
# Fluid viscosity = 1.1E-3 Pa.s = 1.1E-9 MPa.s = 3.5E-17 MPa.year
#
[GlobalParams]
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
PorousFlowDictator = dictator
biot_coefficient = 0.7
[]
[Mesh]
[file]
type = FileMeshGenerator
file = fine.e
[]
[xmin]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = xmin
normal = '-1 0 0'
input = file
[]
[xmax]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = xmax
normal = '1 0 0'
input = xmin
[]
[ymin]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = ymin
normal = '0 -1 0'
input = xmax
[]
[ymax]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = ymax
normal = '0 1 0'
input = ymin
[]
[zmax]
type = SideSetsAroundSubdomainGenerator
block = 30
new_boundary = zmax
normal = '0 0 1'
input = ymax
[]
[zmin]
type = SideSetsAroundSubdomainGenerator
block = 2
new_boundary = zmin
normal = '0 0 -1'
input = zmax
[]
[excav]
type = SubdomainBoundingBoxGenerator
input = zmin
block_id = 1
bottom_left = '0 0 -400'
top_right = '150 1000 -397'
[]
[roof]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 3
paired_block = 1
input = excav
new_boundary = roof
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[wc_x]
[]
[wc_y]
[]
[porepressure]
scaling = 1E-5
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = ini_pp
[]
[]
[Kernels]
[cx_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_x
component = 0
[]
[cy_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_y
component = 1
[]
[cz_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_z
component = 2
[]
[x_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[]
[y_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_y
displacements = 'wc_x wc_y wc_z'
component = 1
base_name = couple
[]
[x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[]
[y_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_y
component = 1
[]
[gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6 # remember this is in MPa
[]
[poro_x]
type = PorousFlowEffectiveStressCoupling
use_displaced_mesh = false
variable = disp_x
component = 0
[]
[poro_y]
type = PorousFlowEffectiveStressCoupling
use_displaced_mesh = false
variable = disp_y
component = 1
[]
[poro_z]
type = PorousFlowEffectiveStressCoupling
use_displaced_mesh = false
component = 2
variable = disp_z
[]
[poro_vol_exp]
type = PorousFlowMassVolumetricExpansion
use_displaced_mesh = false
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
variable = porepressure
fluid_component = 0
[]
[mass0]
type = PorousFlowMassTimeDerivative
use_displaced_mesh = false
fluid_component = 0
variable = porepressure
[]
[flux]
type = PorousFlowAdvectiveFlux
use_displaced_mesh = false
variable = porepressure
gravity = '0 0 -10E-6'
fluid_component = 0
[]
[]
[AuxVariables]
[saturation]
order = CONSTANT
family = MONOMIAL
[]
[darcy_x]
order = CONSTANT
family = MONOMIAL
[]
[darcy_y]
order = CONSTANT
family = MONOMIAL
[]
[darcy_z]
order = CONSTANT
family = MONOMIAL
[]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[wc_z]
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xz]
order = CONSTANT
family = MONOMIAL
[]
[stress_yx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_yz]
order = CONSTANT
family = MONOMIAL
[]
[stress_zx]
order = CONSTANT
family = MONOMIAL
[]
[stress_zy]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_xz]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_yx]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_yz]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_zx]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_zy]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[perm_xx]
order = CONSTANT
family = MONOMIAL
[]
[perm_yy]
order = CONSTANT
family = MONOMIAL
[]
[perm_zz]
order = CONSTANT
family = MONOMIAL
[]
[mc_shear]
order = CONSTANT
family = MONOMIAL
[]
[mc_tensile]
order = CONSTANT
family = MONOMIAL
[]
[wp_shear]
order = CONSTANT
family = MONOMIAL
[]
[wp_tensile]
order = CONSTANT
family = MONOMIAL
[]
[wp_shear_f]
order = CONSTANT
family = MONOMIAL
[]
[wp_tensile_f]
order = CONSTANT
family = MONOMIAL
[]
[mc_shear_f]
order = CONSTANT
family = MONOMIAL
[]
[mc_tensile_f]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[saturation_water]
type = PorousFlowPropertyAux
variable = saturation
property = saturation
phase = 0
execute_on = timestep_end
[]
[darcy_x]
type = PorousFlowDarcyVelocityComponent
variable = darcy_x
gravity = '0 0 -10E-6'
component = x
[]
[darcy_y]
type = PorousFlowDarcyVelocityComponent
variable = darcy_y
gravity = '0 0 -10E-6'
component = y
[]
[darcy_z]
type = PorousFlowDarcyVelocityComponent
variable = darcy_z
gravity = '0 0 -10E-6'
component = z
[]
[porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
execute_on = timestep_end
[]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
execute_on = timestep_end
[]
[stress_yx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yx
index_i = 1
index_j = 0
execute_on = timestep_end
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[stress_zx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zx
index_i = 2
index_j = 0
execute_on = timestep_end
[]
[stress_zy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zy
index_i = 2
index_j = 1
execute_on = timestep_end
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[total_strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[total_strain_xy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[total_strain_xz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xz
index_i = 0
index_j = 2
execute_on = timestep_end
[]
[total_strain_yx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yx
index_i = 1
index_j = 0
execute_on = timestep_end
[]
[total_strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[total_strain_yz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[total_strain_zx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zx
index_i = 2
index_j = 0
execute_on = timestep_end
[]
[total_strain_zy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zy
index_i = 2
index_j = 1
execute_on = timestep_end
[]
[total_strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[perm_xx]
type = PorousFlowPropertyAux
property = permeability
variable = perm_xx
row = 0
column = 0
execute_on = timestep_end
[]
[perm_yy]
type = PorousFlowPropertyAux
property = permeability
variable = perm_yy
row = 1
column = 1
execute_on = timestep_end
[]
[perm_zz]
type = PorousFlowPropertyAux
property = permeability
variable = perm_zz
row = 2
column = 2
execute_on = timestep_end
[]
[mc_shear]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_internal_parameter
variable = mc_shear
execute_on = timestep_end
[]
[mc_tensile]
type = MaterialStdVectorAux
index = 1
property = mc_plastic_internal_parameter
variable = mc_tensile
execute_on = timestep_end
[]
[wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
execute_on = timestep_end
[]
[wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
execute_on = timestep_end
[]
[mc_shear_f]
type = MaterialStdVectorAux
index = 6
property = mc_plastic_yield_function
variable = mc_shear_f
execute_on = timestep_end
[]
[mc_tensile_f]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_yield_function
variable = mc_tensile_f
execute_on = timestep_end
[]
[wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
execute_on = timestep_end
[]
[wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
execute_on = timestep_end
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_x
boundary = 'xmin xmax'
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_y
boundary = 'ymin ymax'
value = 0.0
[]
[no_z]
type = DirichletBC
variable = disp_z
boundary = zmin
value = 0.0
[]
[no_wc_x]
type = DirichletBC
variable = wc_x
boundary = 'ymin ymax'
value = 0.0
[]
[no_wc_y]
type = DirichletBC
variable = wc_y
boundary = 'xmin xmax'
value = 0.0
[]
[fix_porepressure]
type = FunctionDirichletBC
variable = porepressure
boundary = 'ymin ymax xmax'
function = ini_pp
[]
[roof_porepressure]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
pt_vals = '-1E3 1E3'
multipliers = '-1 1'
fluid_phase = 0
flux_function = roof_conductance
boundary = roof
[]
[roof]
type = StickyBC
variable = disp_z
min_value = -3.0
boundary = roof
[]
[]
[Functions]
[ini_pp]
type = ParsedFunction
symbol_names = 'bulk p0 g rho0'
symbol_values = '2E3 0.0 1E-5 1E3'
expression = '-bulk*log(exp(-p0/bulk)+g*rho0*z/bulk)'
[]
[ini_xx]
type = ParsedFunction
symbol_names = 'bulk p0 g rho0 biot'
symbol_values = '2E3 0.0 1E-5 1E3 0.7'
expression = '0.8*(2500*10E-6*z+biot*(-bulk*log(exp(-p0/bulk)+g*rho0*z/bulk)))'
[]
[ini_zz]
type = ParsedFunction
symbol_names = 'bulk p0 g rho0 biot'
symbol_values = '2E3 0.0 1E-5 1E3 0.7'
expression = '2500*10E-6*z+biot*(-bulk*log(exp(-p0/bulk)+g*rho0*z/bulk))'
[]
[excav_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval slope'
symbol_values = '0.5 0 1000.0 1E-9 1 10'
# excavation face at ymin+(ymax-ymin)*min(t/end_t,1)
# slope is the distance over which the modulus reduces from maxval to minval
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,if(y<ymin+(ymax-ymin)*min(t/end_t,1)+slope,minval+(maxval-minval)*(y-(ymin+(ymax-ymin)*min(t/end_t,1)))/slope,maxval))'
[]
[density_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval'
symbol_values = '0.5 0 1000.0 0 2500'
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,maxval)'
[]
[roof_conductance]
type = ParsedFunction
symbol_names = 'end_t ymin ymax maxval minval'
symbol_values = '0.5 0 1000.0 1E7 0'
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),maxval,minval)'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1 # MPa^-1
[]
[mc_coh_strong_harden]
type = TensorMechanicsHardeningExponential
value_0 = 1.99 # MPa
value_residual = 2.01 # MPa
rate = 1.0
[]
[mc_fric]
type = TensorMechanicsHardeningConstant
value = 0.61 # 35deg
[]
[mc_dil]
type = TensorMechanicsHardeningConstant
value = 0.15 # 8deg
[]
[mc_tensile_str_strong_harden]
type = TensorMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.0 # MPa
rate = 1.0
[]
[mc_compressive_str]
type = TensorMechanicsHardeningCubic
value_0 = 100 # Large!
value_residual = 100
internal_limit = 0.1
[]
[wp_coh_harden]
type = TensorMechanicsHardeningCubic
value_0 = 0.05
value_residual = 0.05
internal_limit = 10
[]
[wp_tan_fric]
type = TensorMechanicsHardeningConstant
value = 0.26 # 15deg
[]
[wp_tan_dil]
type = TensorMechanicsHardeningConstant
value = 0.18 # 10deg
[]
[wp_tensile_str_harden]
type = TensorMechanicsHardeningCubic
value_0 = 0.05
value_residual = 0.05
internal_limit = 10
[]
[wp_compressive_str_soften]
type = TensorMechanicsHardeningCubic
value_0 = 100
value_residual = 1
internal_limit = 1.0
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E3
density0 = 1000
thermal_expansion = 0
viscosity = 3.5E-17
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity_for_aux]
type = PorousFlowPorosity
at_nodes = false
fluid = true
mechanical = true
ensure_positive = true
porosity_zero = 0.02
solid_bulk = 5.3333E3
[]
[porosity_bulk]
type = PorousFlowPorosity
fluid = true
mechanical = true
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
ensure_positive = true
porosity_zero = 0.02
solid_bulk = 5.3333E3
[]
[porosity_excav]
type = PorousFlowPorosityConst
block = 1
porosity = 1.0
[]
[permeability_bulk]
type = PorousFlowPermeabilityKozenyCarman
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
poroperm_function = kozeny_carman_phi0
k0 = 1E-15
phi0 = 0.02
n = 2
m = 2
[]
[permeability_excav]
type = PorousFlowPermeabilityConst
block = 1
permeability = '0 0 0 0 0 0 0 0 0'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 4
s_res = 0.4
sum_s_res = 0.4
phase = 0
[]
[elasticity_tensor_0]
type = ComputeLayeredCosseratElasticityTensor
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
[]
[elasticity_tensor_1]
type = ComputeLayeredCosseratElasticityTensor
block = 1
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
elasticity_tensor_prefactor = excav_sideways
[]
[strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[]
[ini_stress]
type = ComputeEigenstrainFromInitialStress
eigenstrain_name = ini_stress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
[]
[stress_0]
type = ComputeMultipleInelasticCosseratStress
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
inelastic_models = 'mc wp'
cycle_models = true
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[]
[stress_1]
type = ComputeMultipleInelasticCosseratStress
block = 1
inelastic_models = ''
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[]
[mc]
type = CappedMohrCoulombCosseratStressUpdate
warn_about_precision_loss = false
host_youngs_modulus = 8E3
host_poissons_ratio = 0.25
base_name = mc
tensile_strength = mc_tensile_str_strong_harden
compressive_strength = mc_compressive_str
cohesion = mc_coh_strong_harden
friction_angle = mc_fric
dilation_angle = mc_dil
max_NR_iterations = 100000
smoothing_tol = 0.1 # MPa # Must be linked to cohesion
yield_function_tol = 1E-9 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[]
[wp]
type = CappedWeakPlaneCosseratStressUpdate
warn_about_precision_loss = false
base_name = wp
cohesion = wp_coh_harden
tan_friction_angle = wp_tan_fric
tan_dilation_angle = wp_tan_dil
tensile_strength = wp_tensile_str_harden
compressive_strength = wp_compressive_str_soften
max_NR_iterations = 10000
tip_smoother = 0.05
smoothing_tol = 0.05 # MPa # Note, this must be tied to cohesion, otherwise get no possible return at cone apex
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0E-3
[]
[undrained_density_0]
type = GenericConstantMaterial
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
prop_names = density
prop_values = 2500
[]
[undrained_density_1]
type = GenericFunctionMaterial
block = 1
prop_names = density
prop_values = density_sideways
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Postprocessors]
[min_roof_disp]
type = NodalExtremeValue
boundary = roof
value_type = min
variable = disp_z
[]
[min_roof_pp]
type = NodalExtremeValue
boundary = roof
value_type = min
variable = porepressure
[]
[min_surface_disp]
type = NodalExtremeValue
boundary = zmax
value_type = min
variable = disp_z
[]
[min_surface_pp]
type = NodalExtremeValue
boundary = zmax
value_type = min
variable = porepressure
[]
[max_perm_zz]
type = ElementExtremeValue
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
variable = perm_zz
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
# best overall
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
# best if you don't have mumps:
#petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
#petsc_options_value = ' asm 2 lu gmres 200'
# very basic:
#petsc_options_iname = '-pc_type -ksp_type -ksp_gmres_restart'
#petsc_options_value = ' bjacobi gmres 200'
line_search = bt
nl_abs_tol = 1e-3
nl_rel_tol = 1e-5
l_max_its = 200
nl_max_its = 30
start_time = 0.0
dt = 0.0025
end_time = 0.5
[]
[Outputs]
time_step_interval = 1
print_linear_residuals = true
exodus = true
csv = true
console = true
[]
(modules/phase_field/test/tests/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/porous_flow/test/tests/heat_advection/heat_advection_1d_fullsat.i)
# 1phase, heat advecting with a moving fluid
# Full upwinding is used, as implemented by the PorousFlowFullySaturatedUpwindHeatAdvection added
# In this case, the results should be identical to the case when the PorousFlowHeatAdvection Kernel is used.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 50
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[temp]
initial_condition = 200
[]
[pp]
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = '1-x'
[]
[]
[BCs]
[pp0]
type = DirichletBC
variable = pp
boundary = left
value = 1
[]
[pp1]
type = DirichletBC
variable = pp
boundary = right
value = 0
[]
[spit_heat]
type = DirichletBC
variable = temp
boundary = left
value = 300
[]
[suck_heat]
type = DirichletBC
variable = temp
boundary = right
value = 200
[]
[]
[Kernels]
[mass_dot]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[advection]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
[]
[energy_dot]
type = PorousFlowEnergyTimeDerivative
variable = temp
[]
[heat_advection]
type = PorousFlowFullySaturatedUpwindHeatAdvection
variable = temp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.6
alpha = 1.3
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 100
density0 = 1000
viscosity = 4.4
thermal_expansion = 0
cv = 2
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.2
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 1.0
density = 125
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1.1 0 0 0 2 0 0 0 3'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[massfrac]
type = PorousFlowMassFraction
[]
[PS]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'gmres bjacobi 1E-15 1E-10 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.01
end_time = 0.6
[]
[VectorPostprocessors]
[T]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 51
sort_by = x
variable = temp
[]
[]
[Outputs]
[csv]
type = CSV
sync_times = '0.1 0.6'
sync_only = true
[]
[]
(modules/navier_stokes/test/tests/finite_volume/pins/channel-flow/linear_friction.i)
mu = 1.1
rho = 1
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '20'
dy = '1.0'
ix = '10'
iy = '4'
[]
[]
[Modules]
[NavierStokesFV]
compressibility = 'incompressible'
porous_medium_treatment = true
density = 'rho'
dynamic_viscosity = 'mu'
porosity = 'porosity'
initial_velocity = '1 0 0'
initial_pressure = 0.0
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_function = '1 0'
wall_boundaries = 'top bottom'
momentum_wall_types = 'slip slip'
outlet_boundaries = 'right'
momentum_outlet_types = 'fixed-pressure'
pressure_function = '0'
friction_types = 'darcy'
friction_coeffs = 'friction_W'
mass_advection_interpolation = 'average'
momentum_advection_interpolation = 'average'
[]
[]
[FunctorMaterials]
[const]
type = ADGenericFunctorMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[friction]
type = LinearFrictionFactorFunctorMaterial
porosity = porosity
functor_name = friction_W
superficial_vel_x = superficial_vel_x
superficial_vel_y = superficial_vel_y
f = '0'
g = '11'
A = '1 1 1'
B = '1 1 1'
[]
[]
[AuxVariables]
[porosity]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[]
[ICs]
[porosity_ic]
type = FunctionIC
variable = porosity
function = '1 - x / 40'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-11
nl_abs_tol = 1e-14
[]
[Postprocessors]
# solution is dp/dx = -11 / (1 - x/40)^3
# dp = -11 * integral_{0}^{20} (1 - x/40)^3 dx = 660
#
[inlet-p]
type = SideAverageValue
variable = pressure
boundary = 'left'
[]
[]
[Outputs]
exodus = true
[]
(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/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/transfers/general_field/shape_evaluation/between_siblings/sub_between_diffusion1.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
[]
[block1]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '0.5 0.5 0'
[]
[]
[AuxVariables]
[sent_nodal]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[received_nodal]
initial_condition = -1
[]
[sent_elem]
family = MONOMIAL
order = CONSTANT
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[received_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
exodus = true
hide = 'sent_nodal sent_elem'
execute_on = 'TIMESTEP_END'
[]
(modules/porous_flow/test/tests/basic_advection/2phase.i)
# Basic advection of u in a 2-phase situation
#
# grad(P) = -2
# density * gravity = 4 * 0.25
# grad(P) - density * gravity = -3
# permeability = 10
# relative permeability = 0.5
# viscosity = 150
# so Darcy velocity = 0.1
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[P0]
[]
[P1]
[]
[]
[ICs]
[P0]
type = FunctionIC
variable = P0
function = '0'
[]
[P1]
type = FunctionIC
variable = P1
function = '2*(1-x)'
[]
[u]
type = FunctionIC
variable = u
function = 'if(x<0.1,1,0)'
[]
[]
[Kernels]
[u_dot]
type = TimeDerivative
variable = u
[]
[u_advection]
type = PorousFlowBasicAdvection
variable = u
phase = 1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = ''
number_fluid_phases = 2
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
density0 = 32
viscosity = 123
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 4
thermal_expansion = 0
viscosity = 150.0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow2PhasePP
phase0_porepressure = P0
phase1_porepressure = P1
capillary_pressure = pc
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '10 0 0 0 10 0 0 0 10'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityConst
kr = 0.5
phase = 1
[]
[darcy_velocity]
type = PorousFlowDarcyVelocityMaterial
gravity = '0.25 0 0'
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = 1
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = 0
variable = u
[]
[]
[Preconditioning]
[basic]
type = SMP
full = true
petsc_options_iname = '-pc_type -snes_rtol'
petsc_options_value = ' lu 1E-10'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 5
[]
[Outputs]
exodus = true
print_linear_residuals = false
[]
(test/tests/auxkernels/grad_component/grad_component_monomial.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmax = 2
nx = 20
ny = 10
[]
[Variables]
[./not_u]
[../]
[]
[AuxVariables]
[./u]
family = MONOMIAL
order = FIRST
[../]
[./grad_u_x]
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./u]
type = FunctionIC
variable = u
function = 'if(x>0.5,if(x<1.5,2*x,3),0)'
[../]
[]
[AuxKernels]
[./grad_u_x_aux]
type = VariableGradientComponent
variable = grad_u_x
component = x
gradient_variable = u
execute_on = initial
[../]
[]
[Problem]
type = FEProblem
solve = false
kernel_coverage_check = false
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(test/tests/misc/check_error/function_file_test11.i)
# Test for usage of missing function
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic_function
[../]
[../]
[]
[Functions]
[./ic_function]
type = PiecewiseLinear
data_file = piecewise_linear_columns_more_data.csv #Will generate error because data has more than two columns
format = columns
scale_factor = 1.0
[../]
[]
[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'
[]
[Outputs]
file_base = out
[]
(test/tests/functions/image_function/shift_and_scale.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Variables]
[u]
[]
[]
[Functions]
[image_func]
type = ImageFunction
file_base = stack/test
file_suffix = png
file_range = '0' # file_range is a vector input, a single entry means "read only 1 file"
shift = -62735.0
scale = 0.0001
[]
[]
[ICs]
[u_ic]
type = FunctionIC
function = image_func
variable = u
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.1
[]
[Outputs]
exodus = true
[]
(test/tests/functions/piecewise_constant_from_csv/piecewise_constant_elem_multiple.i)
[Mesh]
allow_renumbering = false
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1.5 2.4 0.1'
dy = '1.3 0.9'
ix = '2 1 1'
iy = '1 3'
subdomain_id = '0 1 1
2 2 2'
[]
[]
[AuxVariables]
[u]
family = MONOMIAL
order = CONSTANT
[]
[]
[UserObjects]
[reader_element]
type = PropertyReadFile
prop_file_name = 'data_element.csv data_element_t2.csv'
read_type = 'element'
nprop = 3 # number of columns in CSV
execute_on = TIMESTEP_END
[]
[]
[Functions]
[element]
type = PiecewiseConstantFromCSV
read_prop_user_object = 'reader_element'
read_type = 'element'
column_number = '2'
[]
[]
[ICs]
[element]
type = FunctionIC
variable = 'u'
function = 'element'
[]
[]
[AuxKernels]
[set_elem]
type = FunctionAux
variable = 'u'
function = 'element'
[]
[]
[Problem]
solve = false
kernel_coverage_check = false
[]
[Executioner]
type = Transient
num_steps = 2
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/file_mesh_generator/1d_discontinuous_iga.i)
[Mesh]
[cyl2d_iga]
type = FileMeshGenerator
file = test_2edge.e
discontinuous_spline_extraction = true
[]
[]
[Variables]
[u]
order = SECOND # Must match mesh order
family = RATIONAL_BERNSTEIN
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
block = 0 # Avoid direct calculations on spline nodes
[]
[diff]
type = Diffusion
variable = u
block = 0 # Avoid direct calculations on spline nodes
[]
[null]
type = NullKernel
variable = u
block = 1 # Keep kernel coverage check happy
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'sin(x)'
[]
[]
[Executioner]
type = Transient
num_steps = 2
solve_type = NEWTON
dtmin = 1
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/mass_conservation/mass02.i)
# checking that the mass postprocessor correctly calculates the mass
# 1phase, 2component, constant porosity
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = -1
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[mass_frac_comp0]
[]
[]
[ICs]
[pinit]
type = FunctionIC
function = x
variable = pp
[]
[minit]
type = FunctionIC
function = 'x*x'
variable = mass_frac_comp0
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = mass_frac_comp0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp mass_frac_comp0'
number_fluid_phases = 1
number_fluid_components = 2
[]
[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
mass_fraction_vars = 'mass_frac_comp0'
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[]
[Postprocessors]
[total_mass_0]
type = PorousFlowFluidMass
[]
[total_mass_1]
type = PorousFlowFluidMass
fluid_component = 1
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1 1 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = mass02
csv = true
[]
(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/xfem/test/tests/moving_interface/ad_phase_transition_2d.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 11
ny = 1
xmin = 0.0
xmax = 20.0
ymin = 0.0
ymax = 5.0
elem_type = QUAD4
[]
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[velocity]
type = XFEMPhaseTransitionMovingInterfaceVelocity
diffusivity_at_positive_level_set = 5
diffusivity_at_negative_level_set = 1
equilibrium_concentration_jump = 1
value_at_interface_uo = value_uo
[]
[value_uo]
type = NodeValueAtXFEMInterface
variable = 'u'
interface_mesh_cut_userobject = 'cut_mesh'
execute_on = TIMESTEP_END
level_set_var = ls
[]
[cut_mesh]
type = InterfaceMeshCut2DUserObject
mesh_file = flat_interface_1d.e
interface_velocity_uo = velocity
heal_always = true
[]
[]
[Variables]
[u]
[]
[]
[ICs]
[ic_u]
type = FunctionIC
variable = u
function = 'if(x<5.01, 2, 1)'
[]
[]
[AuxVariables]
[ls]
order = FIRST
family = LAGRANGE
[]
[]
[Constraints]
[u_constraint]
type = XFEMEqualValueAtInterface
geometric_cut_userobject = 'cut_mesh'
use_displaced_mesh = false
variable = u
value = 2
alpha = 1e6
[]
[]
[Kernels]
[diff]
type = ADMatDiffusion
variable = u
diffusivity = diffusion_coefficient
[]
[time]
type = ADTimeDerivative
variable = u
[]
[]
[AuxKernels]
[ls]
type = MeshCutLevelSetAux
mesh_cut_user_object = cut_mesh
variable = ls
execute_on = 'TIMESTEP_BEGIN'
[]
[]
[Materials]
[diffusivity_A]
type = ADGenericConstantMaterial
prop_names = A_diffusion_coefficient
prop_values = 5
[]
[diffusivity_B]
type = ADGenericConstantMaterial
prop_names = B_diffusion_coefficient
prop_values = 1
[]
[diff_combined]
type = ADLevelSetBiMaterialReal
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = diffusion_coefficient
[]
[]
[BCs]
# Define boundary conditions
[left_u]
type = ADDirichletBC
variable = u
value = 2
boundary = left
[]
[right_u]
type = ADNeumannBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_tol = 1e-3
nl_max_its = 15
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
start_time = 0.0
dt = 1
num_steps = 5
max_xfem_update = 1
[]
[Outputs]
file_base = phase_transition_2d_out
execute_on = timestep_end
exodus = true
perf_graph = true
[]
(test/tests/auxkernels/solution_aux/aux_nonlinear_solution_xdr.i)
[Mesh]
# This test uses SolutionUserObject which doesn't work with DistributedMesh.
type = GeneratedMesh
parallel_type = replicated
dim = 2
nx = 2
ny = 2
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./u_aux]
[../]
[]
[Functions]
[./u_xdr_func]
type = SolutionFunction
solution = xdr_u
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./aux_xdr_kernel]
type = SolutionAux
variable = u_aux
solution = xdr_u_aux
execute_on = initial
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 2
[../]
[]
[UserObjects]
[./xdr_u_aux]
type = SolutionUserObject
system = aux0
mesh = aux_nonlinear_solution_xdr_0001_mesh.xdr
es = aux_nonlinear_solution_xdr_0001.xdr
execute_on = initial
[../]
[./xdr_u]
type = SolutionUserObject
system = nl0
mesh = aux_nonlinear_solution_xdr_0001_mesh.xdr
es = aux_nonlinear_solution_xdr_0001.xdr
execute_on = initial
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_rel_tol = 1e-10
[]
[Outputs]
exodus = true
[]
[ICs]
[./u_func_ic]
function = u_xdr_func
variable = u
type = FunctionIC
[../]
[]
(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/porous_flow/test/tests/hysteresis/hys_sat_02.i)
# 1-phase hysteresis. Saturation calculation. Primary drying curve with low_extension_type = quadratic
# When comparing the results with a by-hand computation, remember the MOOSE results are averaged over an element
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = 10
nx = 100
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
number_fluid_phases = 1
number_fluid_components = 1
porous_flow_vars = pp
[]
[]
[Variables]
[pp]
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = '1 - x'
[]
[]
[BCs]
[pp]
type = FunctionDirichletBC
variable = pp
function = '1 - x'
boundary = 'left right'
[]
[]
[Kernels]
[dummy]
type = Diffusion
variable = pp
[]
[]
[Materials]
[hys_order]
type = PorousFlowHysteresisOrder
[]
[saturation_calculator]
type = PorousFlow1PhaseHysP
alpha_d = 10.0
alpha_w = 10.0
n_d = 1.1
n_w = 1.9
S_l_min = 0.1
S_lr = 0.2
S_gr_max = 0.3
Pc_max = 7.0
low_extension_type = quadratic
porepressure = pp
[]
[]
[AuxVariables]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[saturation]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[saturation]
type = PorousFlowPropertyAux
variable = saturation
property = saturation
phase = 0
[]
[]
[VectorPostprocessors]
[sat]
type = LineValueSampler
warn_discontinuous_face_values = false
start_point = '0.5 0 0'
end_point = '9.5 0 0'
num_points = 10
sort_by = x
variable = 'saturation pp'
[]
[]
[Executioner]
type = Transient
solve_type = Linear
dt = 1
end_time = 1
[]
[Outputs]
csv = true
[]
(python/peacock/tests/common/spherical_average.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 10
nz = 10
xmin = -5
xmax = 5
ymin = -5
ymax = 5
zmin = -5
zmax = 5
[]
[Variables]
[./c]
[./InitialCondition]
type = FunctionIC
function = sin(x*7.4+z*4.1)+cos(y*3.8+x*8.7)+sin(z*9.1+y*2.6)
[../]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = c
[../]
[./time]
type = TimeDerivative
variable = c
[../]
[]
[VectorPostprocessors]
[./average]
type = SphericalAverage
variable = c
radius = 5
bin_number = 10
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = PJFNK
[]
[Outputs]
execute_on = 'initial timestep_end'
exodus = true
csv = 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
[]
(modules/porous_flow/test/tests/basic_advection/except2.i)
# PorousFlowDarcyVelocityMaterial attempts to have at_nodes = true
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[P]
[]
[]
[ICs]
[P]
type = FunctionIC
variable = P
function = '2*(1-x)'
[]
[u]
type = FunctionIC
variable = u
function = 'if(x<0.1,1,0)'
[]
[]
[Kernels]
[u_dot]
type = TimeDerivative
variable = u
[]
[u_advection]
type = PorousFlowBasicAdvection
variable = u
phase = 1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = ''
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 4
thermal_expansion = 0
viscosity = 150.0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = P
capillary_pressure = pc
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '5 0 0 0 5 0 0 0 5'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0
phase = 0
[]
[darcy_velocity]
type = PorousFlowDarcyVelocityMaterial
gravity = '0.25 0 0'
at_nodes = true
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = 1
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = 0
variable = u
[]
[]
[Preconditioning]
[basic]
type = SMP
full = true
petsc_options_iname = '-pc_type -snes_rtol'
petsc_options_value = ' lu 1E-10'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 5
[]
[Outputs]
exodus = true
print_linear_residuals = false
[]
(modules/phase_field/test/tests/slkks/full_solve.i)
#
# SLKKS two phase example for the BCC and SIGMA phases. The sigma phase contains
# multiple sublattices. Free energy from
# Jacob, Aurelie, Erwin Povoden-Karadeniz, and Ernst Kozeschnik. "Revised thermodynamic
# description of the Fe-Cr system based on an improved sublattice model of the sigma phase."
# Calphad 60 (2018): 16-28.
#
# In this simulation we consider diffusion (Cahn-Hilliard) and phase transformation.
#
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 30
ny = 1
xmin = -25
xmax = 25
[]
[]
[AuxVariables]
[Fglobal]
order = CONSTANT
family = MONOMIAL
[]
[]
[Variables]
# order parameters
[eta1]
initial_condition = 0.5
[]
[eta2]
initial_condition = 0.5
[]
# solute concentration
[cCr]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = '(x+25)/50*0.5+0.1'
[]
[]
# sublattice concentrations (good guesses are needed here! - they can be obtained
# form a static solve like in sublattice_concentrations.i)
[BCC_CR]
[InitialCondition]
type = FunctionIC
function = '(x+25)/50*0.5+0.1'
[]
[]
[SIGMA_0CR]
[InitialCondition]
type = FunctionIC
function = '(x+25)/50*0.17+0.01'
[]
[]
[SIGMA_1CR]
[InitialCondition]
type = FunctionIC
function = '(x+25)/50*0.36+0.02'
[]
[]
[SIGMA_2CR]
[InitialCondition]
type = FunctionIC
function = '(x+25)/50*0.33+0.20'
[]
[]
# Lagrange multiplier
[lambda]
[]
[]
[Materials]
# CALPHAD free energies
[F_BCC_A2]
type = DerivativeParsedMaterial
property_name = F_BCC_A2
outputs = exodus
output_properties = F_BCC_A2
expression = 'BCC_FE:=1-BCC_CR; G := 8.3145*T*(1.0*if(BCC_CR > 1.0e-15,BCC_CR*log(BCC_CR),0) + '
'1.0*if(BCC_FE > 1.0e-15,BCC_FE*plog(BCC_FE,eps),0) + 3.0*if(BCC_VA > '
'1.0e-15,BCC_VA*log(BCC_VA),0))/(BCC_CR + BCC_FE) + 8.3145*T*if(T < '
'548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + '
'311.5*BCC_CR*BCC_VA - '
'1043.0*BCC_FE*BCC_VA,-8.13674105561218e-49*T^15/(0.525599232981783*BCC_CR*BCC_FE*BCC_'
'VA*(BCC_CR - BCC_FE) - 0.894055608820709*BCC_CR*BCC_FE*BCC_VA + '
'0.298657718120805*BCC_CR*BCC_VA - BCC_FE*BCC_VA + 9.58772770853308e-13)^15 - '
'4.65558036243985e-30*T^9/(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^9 - '
'1.3485349181899e-10*T^3/(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^3 + 1 - '
'0.905299382744392*(548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'932.5*BCC_CR*BCC_FE*BCC_VA + 311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA + '
'1.0e-9)/T,if(T < -548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'932.5*BCC_CR*BCC_FE*BCC_VA - 311.5*BCC_CR*BCC_VA + '
'1043.0*BCC_FE*BCC_VA,-8.13674105561218e-49*T^15/(-0.525599232981783*BCC_CR*BCC_FE*BCC'
'_VA*(BCC_CR - BCC_FE) + 0.894055608820709*BCC_CR*BCC_FE*BCC_VA - '
'0.298657718120805*BCC_CR*BCC_VA + BCC_FE*BCC_VA + 9.58772770853308e-13)^15 - '
'4.65558036243985e-30*T^9/(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) '
'+ 0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^9 - '
'1.3485349181899e-10*T^3/(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^3 + 1 - '
'0.905299382744392*(-548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'932.5*BCC_CR*BCC_FE*BCC_VA - 311.5*BCC_CR*BCC_VA + 1043.0*BCC_FE*BCC_VA + '
'1.0e-9)/T,if(T > -548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'932.5*BCC_CR*BCC_FE*BCC_VA - 311.5*BCC_CR*BCC_VA + 1043.0*BCC_FE*BCC_VA & '
'548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + '
'311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA < '
'0,-79209031311018.7*(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^5/T^5 - '
'3.83095660520737e+42*(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^15/T^15 - '
'1.22565886734485e+72*(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^25/T^25,if(T > '
'548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + '
'311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA & 548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - '
'BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + 311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA > '
'0,-79209031311018.7*(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^5/T^5 - '
'3.83095660520737e+42*(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^15/T^15 - '
'1.22565886734485e+72*(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^25/T^25,0))))*log((2.15*BCC_CR*BCC_FE*BCC_VA - '
'0.008*BCC_CR*BCC_VA + 2.22*BCC_FE*BCC_VA)*if(2.15*BCC_CR*BCC_FE*BCC_VA - '
'0.008*BCC_CR*BCC_VA + 2.22*BCC_FE*BCC_VA <= 0,-1.0,1.0) + 1)/(BCC_CR + BCC_FE) + '
'1.0*(BCC_CR*BCC_VA*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + '
'BCC_FE*BCC_VA*if(T >= 298.15 & T < 1811.0,77358.5*1/T - 23.5143*T*log(T) + 124.134*T '
'- 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= 1811.0 & T < '
'6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - 25383.581,0)))/(BCC_CR '
'+ BCC_FE) + 1.0*(BCC_CR*BCC_FE*BCC_VA*(500.0 - 1.5*T)*(BCC_CR - BCC_FE) + '
'BCC_CR*BCC_FE*BCC_VA*(24600.0 - 14.98*T) + BCC_CR*BCC_FE*BCC_VA*(9.15*T - '
'14000.0)*(BCC_CR - BCC_FE)^2)/(BCC_CR + BCC_FE); G/100000'
coupled_variables = 'BCC_CR'
constant_names = 'BCC_VA T eps'
constant_expressions = '1 1000 0.01'
[]
[F_SIGMA]
type = DerivativeParsedMaterial
property_name = F_SIGMA
outputs = exodus
output_properties = F_SIGMA
expression = 'SIGMA_0FE := 1-SIGMA_0CR; SIGMA_1FE := 1-SIGMA_1CR; SIGMA_2FE := 1-SIGMA_2CR; G := '
'8.3145*T*(10.0*if(SIGMA_0CR > 1.0e-15,SIGMA_0CR*plog(SIGMA_0CR,eps),0) + '
'10.0*if(SIGMA_0FE > 1.0e-15,SIGMA_0FE*plog(SIGMA_0FE,eps),0) + 4.0*if(SIGMA_1CR > '
'1.0e-15,SIGMA_1CR*plog(SIGMA_1CR,eps),0) + 4.0*if(SIGMA_1FE > '
'1.0e-15,SIGMA_1FE*plog(SIGMA_1FE,eps),0) + 16.0*if(SIGMA_2CR > '
'1.0e-15,SIGMA_2CR*plog(SIGMA_2CR,eps),0) + 16.0*if(SIGMA_2FE > '
'1.0e-15,SIGMA_2FE*plog(SIGMA_2FE,eps),0))/(10.0*SIGMA_0CR + 10.0*SIGMA_0FE + '
'4.0*SIGMA_1CR + 4.0*SIGMA_1FE + 16.0*SIGMA_2CR + 16.0*SIGMA_2FE) + '
'(SIGMA_0FE*SIGMA_1CR*SIGMA_2CR*SIGMA_2FE*(-70.0*T - 170400.0) + '
'SIGMA_0FE*SIGMA_1FE*SIGMA_2CR*SIGMA_2FE*(-10.0*T - 330839.0))/(10.0*SIGMA_0CR + '
'10.0*SIGMA_0FE + 4.0*SIGMA_1CR + 4.0*SIGMA_1FE + 16.0*SIGMA_2CR + 16.0*SIGMA_2FE) + '
'(SIGMA_0CR*SIGMA_1CR*SIGMA_2CR*(30.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - '
'26.908*T*log(T) + 157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= '
'2180.0 & T < 6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) '
'+ 132000.0) + SIGMA_0CR*SIGMA_1CR*SIGMA_2FE*(-110.0*T + 16.0*if(T >= 298.15 & T < '
'1811.0,77358.5*1/T - 23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - '
'5.89269e-8*T^3.0 + 1225.7,if(T >= 1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - '
'46.0*T*log(T) + 299.31255*T - 25383.581,0)) + 14.0*if(T >= 298.15 & T < '
'2180.0,139250.0*1/T - 26.908*T*log(T) + 157.48*T + 0.00189435*T^2.0 - '
'1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < 6000.0,-2.88526e+32*T^(-9.0) - '
'50.0*T*log(T) + 344.18*T - 34869.344,0)) + 123500.0) + '
'SIGMA_0CR*SIGMA_1FE*SIGMA_2CR*(4.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 26.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 140486.0) '
'+ SIGMA_0CR*SIGMA_1FE*SIGMA_2FE*(20.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 10.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 148800.0) '
'+ SIGMA_0FE*SIGMA_1CR*SIGMA_2CR*(10.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 20.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 56200.0) + '
'SIGMA_0FE*SIGMA_1CR*SIGMA_2FE*(26.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 4.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 152700.0) '
'+ SIGMA_0FE*SIGMA_1FE*SIGMA_2CR*(14.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 16.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 46200.0) + '
'SIGMA_0FE*SIGMA_1FE*SIGMA_2FE*(30.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 173333.0))/(10.0*SIGMA_0CR + 10.0*SIGMA_0FE + 4.0*SIGMA_1CR + '
'4.0*SIGMA_1FE + 16.0*SIGMA_2CR + 16.0*SIGMA_2FE); G/100000'
coupled_variables = 'SIGMA_0CR SIGMA_1CR SIGMA_2CR'
constant_names = 'T eps'
constant_expressions = '1000 0.01'
[]
# h(eta)
[h1]
type = SwitchingFunctionMaterial
function_name = h1
h_order = HIGH
eta = eta1
[]
[h2]
type = SwitchingFunctionMaterial
function_name = h2
h_order = HIGH
eta = eta2
[]
# g(eta)
[g1]
type = BarrierFunctionMaterial
function_name = g1
g_order = SIMPLE
eta = eta1
[]
[g2]
type = BarrierFunctionMaterial
function_name = g2
g_order = SIMPLE
eta = eta2
[]
# constant properties
[constants]
type = GenericConstantMaterial
prop_names = 'D L kappa'
prop_values = '10 1 0.1 '
[]
# Coefficients for diffusion equation
[Dh1]
type = DerivativeParsedMaterial
material_property_names = 'D h1(eta1)'
expression = D*h1
property_name = Dh1
coupled_variables = eta1
derivative_order = 1
[]
[Dh2a]
type = DerivativeParsedMaterial
material_property_names = 'D h2(eta2)'
expression = D*h2*10/30
property_name = Dh2a
coupled_variables = eta2
derivative_order = 1
[]
[Dh2b]
type = DerivativeParsedMaterial
material_property_names = 'D h2(eta2)'
expression = D*h2*4/30
property_name = Dh2b
coupled_variables = eta2
derivative_order = 1
[]
[Dh2c]
type = DerivativeParsedMaterial
material_property_names = 'D h2(eta2)'
expression = D*h2*16/30
property_name = Dh2c
coupled_variables = eta2
derivative_order = 1
[]
[]
[Kernels]
#Kernels for diffusion equation
[diff_time]
type = TimeDerivative
variable = cCr
[]
[diff_c1]
type = MatDiffusion
variable = cCr
diffusivity = Dh1
v = BCC_CR
args = eta1
[]
[diff_c2a]
type = MatDiffusion
variable = cCr
diffusivity = Dh2a
v = SIGMA_0CR
args = eta2
[]
[diff_c2b]
type = MatDiffusion
variable = cCr
diffusivity = Dh2b
v = SIGMA_1CR
args = eta2
[]
[diff_c2c]
type = MatDiffusion
variable = cCr
diffusivity = Dh2c
v = SIGMA_2CR
args = eta2
[]
# enforce pointwise equality of chemical potentials
[chempot1a2a]
# The BCC phase has only one sublattice
# we tie it to the first sublattice with site fraction 10/(10+4+16) in the sigma phase
type = KKSPhaseChemicalPotential
variable = BCC_CR
cb = SIGMA_0CR
kb = '${fparse 10/30}'
fa_name = F_BCC_A2
fb_name = F_SIGMA
args_b = 'SIGMA_1CR SIGMA_2CR'
[]
[chempot2a2b]
# This kernel ties the first two sublattices in the sigma phase together
type = SLKKSChemicalPotential
variable = SIGMA_0CR
a = 10
cs = SIGMA_1CR
as = 4
F = F_SIGMA
coupled_variables = 'SIGMA_2CR'
[]
[chempot2b2c]
# This kernel ties the remaining two sublattices in the sigma phase together
type = SLKKSChemicalPotential
variable = SIGMA_1CR
a = 4
cs = SIGMA_2CR
as = 16
F = F_SIGMA
coupled_variables = 'SIGMA_0CR'
[]
[phaseconcentration]
# This kernel ties the sum of the sublattice concentrations to the global concentration cCr
type = SLKKSMultiPhaseConcentration
variable = SIGMA_2CR
c = cCr
ns = '1 3'
as = '1 10 4 16'
cs = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR'
h_names = 'h1 h2'
eta = 'eta1 eta2'
[]
# Kernels for Allen-Cahn equation for eta1
[deta1dt]
type = TimeDerivative
variable = eta1
[]
[ACBulkF1]
type = KKSMultiACBulkF
variable = eta1
Fj_names = 'F_BCC_A2 F_SIGMA'
hj_names = 'h1 h2'
gi_name = g1
eta_i = eta1
wi = 0.1
coupled_variables = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR eta2'
[]
[ACBulkC1]
type = SLKKSMultiACBulkC
variable = eta1
F = F_BCC_A2
c = BCC_CR
ns = '1 3'
as = '1 10 4 16'
cs = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR'
h_names = 'h1 h2'
eta = 'eta1 eta2'
[]
[ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa
[]
[lagrange1]
type = SwitchingFunctionConstraintEta
variable = eta1
h_name = h1
lambda = lambda
coupled_variables = 'eta2'
[]
# Kernels for Allen-Cahn equation for eta1
[deta2dt]
type = TimeDerivative
variable = eta2
[]
[ACBulkF2]
type = KKSMultiACBulkF
variable = eta2
Fj_names = 'F_BCC_A2 F_SIGMA'
hj_names = 'h1 h2'
gi_name = g2
eta_i = eta2
wi = 0.1
coupled_variables = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR eta1'
[]
[ACBulkC2]
type = SLKKSMultiACBulkC
variable = eta2
F = F_BCC_A2
c = BCC_CR
ns = '1 3'
as = '1 10 4 16'
cs = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR'
h_names = 'h1 h2'
eta = 'eta1 eta2'
[]
[ACInterface2]
type = ACInterface
variable = eta2
kappa_name = kappa
[]
[lagrange2]
type = SwitchingFunctionConstraintEta
variable = eta2
h_name = h2
lambda = lambda
coupled_variables = 'eta1'
[]
# Lagrange-multiplier constraint kernel for lambda
[lagrange]
type = SwitchingFunctionConstraintLagrange
variable = lambda
h_names = 'h1 h2'
etas = 'eta1 eta2'
epsilon = 1e-6
[]
[]
[AuxKernels]
[GlobalFreeEnergy]
type = KKSMultiFreeEnergy
variable = Fglobal
Fj_names = 'F_BCC_A2 F_SIGMA'
hj_names = 'h1 h2'
gj_names = 'g1 g2'
interfacial_vars = 'eta1 eta2'
kappa_names = 'kappa kappa'
w = 0.1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
line_search = none
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -ksp_gmres_restart'
petsc_options_value = 'asm lu nonzero 30'
l_max_its = 100
nl_max_its = 20
nl_abs_tol = 1e-10
end_time = 1000
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 12
iteration_window = 2
growth_factor = 2
cutback_factor = 0.5
dt = 0.1
[]
[]
[Postprocessors]
[F]
type = ElementIntegralVariablePostprocessor
variable = Fglobal
[]
[cmin]
type = NodalExtremeValue
value_type = min
variable = cCr
[]
[cmax]
type = NodalExtremeValue
value_type = max
variable = cCr
[]
[]
[Outputs]
exodus = true
print_linear_residuals = false
# exclude lagrange multiplier from output, it can diff more easily
hide = lambda
[]
(modules/porous_flow/test/tests/energy_conservation/except01.i)
# checking that the heat-energy postprocessor throws the correct error if the phase number is entered incorrectly
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[temp]
[]
[]
[ICs]
[tinit]
type = FunctionIC
function = '100*x'
variable = temp
[]
[pinit]
type = FunctionIC
function = x
variable = pp
[]
[]
[Kernels]
[dummyt]
type = TimeDerivative
variable = temp
[]
[dummyp]
type = TimeDerivative
variable = pp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp 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
viscosity = 0.001
thermal_expansion = 0
cv = 1.3
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 2.2
density = 0.5
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[]
[Postprocessors]
[total_heat]
type = PorousFlowHeatEnergy
phase = 1
[]
[rock_heat]
type = PorousFlowHeatEnergy
[]
[fluid_heat]
type = PorousFlowHeatEnergy
include_porous_skeleton = false
phase = 0
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1 1 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = except01
csv = true
[]
(test/tests/transfers/general_field/shape_evaluation/regular/main.i)
# Base input for testing transfers. It has the following complexities:
# - more than one subapp
# - transfers both from and to the subapps
# - both nodal and elemental variables
# Tests derived from this input may add complexities through command line arguments
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[AuxVariables]
[from_sub]
initial_condition = -1
[]
[from_sub_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_sub]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[to_sub_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
hide = 'to_sub to_sub_elem'
overwrite = true
[]
[]
[MultiApps]
[sub]
# 1 on corner, one in the center and one close to a corner
positions = '0 0 0 0.4 0.4 0 0.7 0.1 0'
type = FullSolveMultiApp
app_type = MooseTestApp
input_files = sub.i
output_in_position = true
[]
[]
[Transfers]
[to_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
source_variable = to_sub
variable = from_main
extrapolation_constant = -1
[]
[to_sub_elem]
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
source_variable = to_sub_elem
variable = from_main_elem
extrapolation_constant = -1
[]
[from_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
source_variable = to_main
variable = from_sub
extrapolation_constant = -1
[]
[from_sub_elem]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
source_variable = to_main_elem
variable = from_sub_elem
extrapolation_constant = -1
[]
[]
(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/dgkernels/1d_advection_dg/1d_advection_dg.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = 0
xmax = 1
[]
[Functions]
[ic_u]
type = PiecewiseConstant
axis = x
direction = right
xy_data = '0.1 0.0
0.6 1.0
1.0 0.0'
[]
[]
[Variables]
[u]
order = FIRST
family = MONOMIAL
[]
[]
[Kernels]
[time_u]
type = TimeDerivative
variable = u
[]
[adv_u]
implicit = false
type = ConservativeAdvection
variable = u
velocity = '1 0 0'
[]
[]
[DGKernels]
[dg_advection_u]
implicit = false
type = DGConvection
variable = u
velocity = '1 0 0'
[]
[]
[ICs]
[u_ic]
type = FunctionIC
variable = u
function = ic_u
[]
[]
[Executioner]
type = Transient
[TimeIntegrator]
type = ExplicitMidpoint
[]
solve_type = 'LINEAR'
num_steps = 4
dt = 2e-4
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/GBDependentTensors/gb_property.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 50
ny = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 2
[]
[Variables]
[./c]
[./InitialCondition]
type = FunctionIC
function = 'x0:=5.0;thk:=0.5;m:=2;r:=abs(x-x0);v:=exp(-(r/thk)^m);0.1+0.1*v'
[../]
[../]
[./mu]
[../]
[]
[AuxVariables]
[./gb]
family = LAGRANGE
order = FIRST
[../]
[./mobility_xx]
family = MONOMIAL
order = CONSTANT
[../]
[./mobility_yy]
family = MONOMIAL
order = CONSTANT
[../]
[./diffusivity_xx]
family = MONOMIAL
order = CONSTANT
[../]
[./diffusivity_yy]
family = MONOMIAL
order = CONSTANT
[../]
[./aniso_tensor_xx]
family = MONOMIAL
order = CONSTANT
[../]
[./aniso_tensor_yy]
family = MONOMIAL
order = CONSTANT
[../]
[]
[Kernels]
[./conc]
type = CHSplitConcentration
variable = c
mobility = mobility_prop
chemical_potential_var = mu
[../]
[./chempot]
type = CHSplitChemicalPotential
variable = mu
chemical_potential_prop = mu_prop
c = c
[../]
[./time]
type = TimeDerivative
variable = c
[../]
[]
[AuxKernels]
[./gb]
type = FunctionAux
variable = gb
function = 'x0:=5.0;thk:=0.5;m:=2;r:=abs(x-x0);v:=exp(-(r/thk)^m);v'
[../]
[./mobility_xx]
type = MaterialRealTensorValueAux
variable = mobility_xx
property = mobility_prop
row = 0
column = 0
[../]
[./mobility_yy]
type = MaterialRealTensorValueAux
variable = mobility_yy
property = mobility_prop
row = 1
column = 1
[../]
[./diffusivity_xx]
type = MaterialRealTensorValueAux
variable = diffusivity_xx
property = diffusivity
row = 0
column = 0
[../]
[./diffusivity_yy]
type = MaterialRealTensorValueAux
variable = diffusivity_yy
property = diffusivity
row = 1
column = 1
[../]
[./aniso_tensor_xx]
type = MaterialRealTensorValueAux
variable = aniso_tensor_xx
property = aniso_tensor
row = 0
column = 0
[../]
[./aniso_tensor_yy]
type = MaterialRealTensorValueAux
variable = aniso_tensor_yy
property = aniso_tensor
row = 1
column = 1
[../]
[]
[Materials]
[./chemical_potential]
type = DerivativeParsedMaterial
block = 0
property_name = mu_prop
coupled_variables = c
expression = 'c'
derivative_order = 1
[../]
[./var_dependence]
type = DerivativeParsedMaterial
block = 0
expression = 'c*(1.0-c)'
coupled_variables = c
property_name = var_dep
derivative_order = 1
[../]
[./mobility]
type = CompositeMobilityTensor
block = 0
M_name = mobility_prop
tensors = diffusivity
weights = var_dep
args = c
[../]
[./phase_normal]
type = PhaseNormalTensor
phase = gb
normal_tensor_name = gb_normal
[../]
[./aniso_tensor]
type = GBDependentAnisotropicTensor
gb = gb
bulk_parameter = 0.1
gb_parameter = 1
gb_normal_tensor_name = gb_normal
gb_tensor_prop_name = aniso_tensor
[../]
[./diffusivity]
type = GBDependentDiffusivity
gb = gb
bulk_parameter = 0.1
gb_parameter = 1
gb_normal_tensor_name = gb_normal
gb_tensor_prop_name = diffusivity
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 20
solve_type = PJFNK
petsc_options_iname = '-pc_type -ksp_grmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
l_tol = 1e-3
l_max_its = 20
nl_max_its = 5
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Outputs]
exodus = 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
[../]
[]
(modules/richards/test/tests/uo_egs/seff2.i)
# Outputs a 2phase effective saturation relationship into an exodus file
# and into a CSV file.
# In the exodus file, the Seff will be a function of "x", and
# this "x" is actually the difference in porepressures,
# say P_gas - P_water (so "x" should be positive).
# In the CSV file you will find the Seff at the "x" point
# specified by you below.
#
# You may specify:
# - the "type" of Seff in the UserObjects block
# - the parameters of this Seff function in the UserObjects block
# - the "x" point (which is del_porepressure) that you want to extract
# the Seff at, if you want a value at a particular point
# - the range of "x" values (which is porepressure values) may be
# changed in the Mesh block, below
[UserObjects]
[./seff]
type = RichardsSeff2waterVG
al = 1E-6
m = 0.8
[../]
[]
[Postprocessors]
[./point_val]
type = PointValue
execute_on = timestep_begin
# note this point must lie inside the mesh below
point = '1 0 0'
variable = seff
[../]
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
# the following specify the range of porepressure
xmin = 0
xmax = 3E6
[]
############################
# You should not need to change any of the stuff below
############################
[Variables]
[./u]
[../]
[./v]
[../]
[]
[ICs]
[./u_init]
type = FunctionIC
variable = u
function = x
[../]
[./v_init]
type = ConstantIC
variable = v
value = 0
[../]
[]
[AuxVariables]
[./seff]
[../]
[]
[AuxKernels]
[./seff_AuxK]
type = RichardsSeffAux
variable = seff
seff_UO = seff
execute_on = timestep_begin
pressure_vars = 'v u'
[../]
[]
[Kernels]
[./dummy_u]
type = Diffusion
variable = u
[../]
[./dummy_v]
type = Diffusion
variable = v
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
num_steps = 0
[]
[Outputs]
file_base = seff2
[./csv]
type = CSV
[../]
[./exodus]
type = Exodus
hide = 'u v'
[../]
[]
(modules/level_set/examples/rotating_circle/circle_rotate_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 32
ny = 32
uniform_refine = 2
[]
[AuxVariables]
[./velocity]
family = LAGRANGE_VEC
[../]
[]
[Variables]
[./phi]
[../]
[]
[BCs]
[./all]
type = DirichletBC
variable = phi
boundary = 'top bottom left right'
value = 0
[../]
[]
[Functions]
[./phi_exact]
type = LevelSetOlssonBubble
epsilon = 0.03
center = '0 0.5 0'
radius = 0.15
[../]
[./velocity_func]
type = ParsedVectorFunction
expression_x = '4*y'
expression_y = '-4*x'
[../]
[]
[ICs]
[./phi_ic]
type = FunctionIC
function = phi_exact
variable = phi
[../]
[./vel_ic]
type = VectorFunctionIC
variable = velocity
function = velocity_func
[]
[]
[Kernels]
[./time]
type = TimeDerivative
variable = phi
[../]
[./advection]
type = LevelSetAdvection
velocity = velocity
variable = phi
[../]
[]
[Postprocessors]
[./area]
type = LevelSetVolume
threshold = 0.5
variable = phi
location = outside
execute_on = 'initial timestep_end'
[../]
[./cfl]
type = LevelSetCFLCondition
velocity = velocity
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
start_time = 0
end_time = 1.570796
scheme = crank-nicolson
petsc_options_iname = '-pc_type -pc_sub_type'
petsc_options_value = 'asm ilu'
[./TimeStepper]
type = PostprocessorDT
postprocessor = cfl
scale = 0.8
[../]
[]
[MultiApps]
[./reinit]
type = LevelSetReinitializationMultiApp
input_files = 'circle_rotate_sub.i'
execute_on = 'timestep_end'
[../]
[]
[Transfers]
[./to_sub]
type = MultiAppCopyTransfer
source_variable = phi
variable = phi
to_multi_app = reinit
execute_on = 'timestep_end'
[../]
[./to_sub_init]
type = MultiAppCopyTransfer
source_variable = phi
variable = phi_0
to_multi_app = reinit
execute_on = 'timestep_end'
[../]
[./from_sub]
type = MultiAppCopyTransfer
source_variable = phi
variable = phi
from_multi_app = reinit
execute_on = 'timestep_end'
[../]
[]
[Outputs]
csv = true
exodus = true
[]
(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
[../]
[]
(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/phase_field/test/tests/misc/interface_flux.i)
#
# This test demonstrates an InterfaceKernel (InterfaceDiffusionFlux) that can
# replace a pair of integrated DiffusionFluxBC boundary conditions.
#
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
ymax = 0.5
[]
[./box1]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '0.51 1 0'
input = gen
[../]
[./box2]
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '0.49 0 0'
top_right = '1 1 0'
input = box1
[../]
[./iface_u]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = 10
input = box2
[../]
[]
[Variables]
[./u2]
block = 1
[./InitialCondition]
type = FunctionIC
function = 'r:=sqrt((x-0.4)^2+(y-0.5)^2);if(r<0.05,5,1)'
[../]
[../]
[./v2]
block = 2
[./InitialCondition]
type = FunctionIC
function = 'r:=sqrt((x-0.7)^2+(y-0.5)^2);if(r<0.05,5,1)'
[../]
[../]
[]
[Kernels]
[./u2_diff]
type = Diffusion
variable = u2
block = 1
[../]
[./u2_dt]
type = TimeDerivative
variable = u2
block = 1
[../]
[./v2_diff]
type = Diffusion
variable = v2
block = 2
[../]
[./v2_dt]
type = TimeDerivative
variable = v2
block = 2
[../]
[]
[InterfaceKernels]
[./iface]
type = InterfaceDiffusionBoundaryTerm
boundary = 10
variable = u2
neighbor_var = v2
[../]
[]
[Executioner]
type = Transient
dt = 0.002
num_steps = 6
[]
[Outputs]
exodus = true
print_linear_residuals = false
[]
(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
[../]
[]
(modules/porous_flow/test/tests/hysteresis/hys_sat_01.i)
# 1-phase hysteresis. Saturation calculation. Primary drying curve with low_extension_type = none
# When comparing the results with a by-hand computation, remember the MOOSE results are averaged over an element
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = 10
nx = 100
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
number_fluid_phases = 1
number_fluid_components = 1
porous_flow_vars = pp
[]
[]
[Variables]
[pp]
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = '1 - x'
[]
[]
[BCs]
[pp]
type = FunctionDirichletBC
variable = pp
function = '1 - x'
boundary = 'left right'
[]
[]
[Kernels]
[dummy]
type = Diffusion
variable = pp
[]
[]
[Materials]
[hys_order]
type = PorousFlowHysteresisOrder
[]
[saturation_calculator]
type = PorousFlow1PhaseHysP
alpha_d = 10.0
alpha_w = 10.0
n_d = 1.1
n_w = 1.9
S_l_min = 0.1
S_lr = 0.2
S_gr_max = 0.3
Pc_max = 7.0
low_extension_type = none
porepressure = pp
[]
[]
[AuxVariables]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[saturation]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[saturation]
type = PorousFlowPropertyAux
variable = saturation
property = saturation
phase = 0
[]
[]
[VectorPostprocessors]
[sat]
type = LineValueSampler
warn_discontinuous_face_values = false
start_point = '0.5 0 0'
end_point = '9.5 0 0'
num_points = 10
sort_by = x
variable = 'saturation pp'
[]
[]
[Executioner]
type = Transient
solve_type = Linear
dt = 1
end_time = 1
[]
[Outputs]
csv = true
[]
(modules/phase_field/test/tests/ExpressionBuilderCoupledVectorTest/testCoupledVector.i)
[Mesh]
type = GeneratedMesh
dim = 2 # Problem dimension
nx = 10
ny = 10
[]
[GlobalParams]
op_num = 2 # Number of grains
var_name_base = gr # Base name of grains
[]
[AuxVariables]
[./gr0]
[./InitialCondition]
type = FunctionIC
function = x
[../]
[../]
[./gr1]
[./InitialCondition]
type = FunctionIC
function = y
[../]
[../]
[]
[Materials]
[./Tester]
type = EBCoupledVarTest
outputs = exodus
[../]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[../]
[Outputs]
exodus = true
execute_on = 'INITIAL 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
#
[]
(test/tests/kernels/ad_mat_diffusion/1D_transient.i)
# This test solves a 1D transient heat equation
# The error is calculated by comparing to the analytical solution
# The problem setup and analytical solution are taken from "Advanced Engineering
# Mathematics, 10th edition" by Erwin Kreyszig.
# http://www.amazon.com/Advanced-Engineering-Mathematics-Erwin-Kreyszig/dp/0470458364
# It is Example 1 in section 12.6 on page 561
[Mesh]
type = GeneratedMesh
dim = 1
nx = 160
xmax = 80
[]
[Variables]
[./T]
[../]
[]
[ICs]
[./T_IC]
type = FunctionIC
variable = T
function = '100*sin(pi*x/80)'
[../]
[]
[Kernels]
[./diff]
type = MatDiffusion
variable = T
diffusivity = 0.95
[../]
[./dt]
type = CoefTimeDerivative
variable = T
Coefficient = 0.82064
[../]
[]
[BCs]
[./sides]
type = DirichletBC
variable = T
boundary = 'left right'
value = 0
[../]
[]
[Executioner]
type = Transient
dt = 1e-2
end_time = 1
[]
[Postprocessors]
[./error]
type = NodalL2Error
function = '100*sin(pi*x/80)*exp(-0.95/(0.092*8.92)*pi^2/80^2*t)'
variable = T
outputs = console
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/materials/derivative_material_interface/ad_construction_order.i)
#
# Test the the getDefaultMaterialProperty in DerivativeMaterialInterface.
# This test should only pass, if the construction order of the Materials
# using this interface does not influence the outcome.
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 0.1
elem_type = QUAD4
[]
[GlobalParams]
derivative_order = 2
[]
[Variables]
[./c]
[./InitialCondition]
type = FunctionIC
function = x
[../]
[../]
[]
[Kernels]
[./dummy1]
type = ADDiffusion
variable = c
[../]
[./dummy2]
type = ADTimeDerivative
variable = c
[../]
[]
[Materials]
# derivatives used both before and after being declared
[./sum_a_1]
type = ADDerivativeSumMaterial
property_name = Fa1
sum_materials = 'Fa'
coupled_variables = 'c'
outputs = exodus
[../]
[./free_energy_a]
type = ADDerivativeParsedMaterial
property_name = Fa
coupled_variables = 'c'
expression = 'c^4'
[../]
[./sum_a_2]
type = ADDerivativeSumMaterial
property_name = Fa2
sum_materials = 'Fa'
coupled_variables = 'c'
outputs = exodus
[../]
# derivatives declared after being used
[./sum_b_1]
type = ADDerivativeSumMaterial
property_name = Fb1
sum_materials = 'Fb'
coupled_variables = 'c'
outputs = exodus
[../]
[./free_energy_b]
type = ADDerivativeParsedMaterial
property_name = Fb
coupled_variables = 'c'
expression = 'c^4'
[../]
# derivatives declared before being used
[./free_energy_c]
type = ADDerivativeParsedMaterial
property_name = Fc
coupled_variables = 'c'
expression = 'c^4'
[../]
[./sum_c_2]
type = ADDerivativeSumMaterial
property_name = Fc2
sum_materials = 'Fc'
coupled_variables = 'c'
outputs = exodus
[../]
# non-existing derivatives
[./free_energy_d]
type = ADParsedMaterial
property_name = Fd
coupled_variables = 'c'
expression = 'c^4'
[../]
[./sum_d_1]
type = ADDerivativeSumMaterial
property_name = Fd1
sum_materials = 'Fd'
coupled_variables = 'c'
outputs = exodus
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'NEWTON'
num_steps = 1
dt = 1e-5
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/xfem/test/tests/moving_interface/phase_transition_2d.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 11
ny = 1
xmin = 0.0
xmax = 20.0
ymin = 0.0
ymax = 5.0
elem_type = QUAD4
[]
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[velocity]
type = XFEMPhaseTransitionMovingInterfaceVelocity
diffusivity_at_positive_level_set = 5
diffusivity_at_negative_level_set = 1
equilibrium_concentration_jump = 1
value_at_interface_uo = value_uo
[]
[value_uo]
type = NodeValueAtXFEMInterface
variable = 'u'
interface_mesh_cut_userobject = 'cut_mesh'
execute_on = TIMESTEP_END
level_set_var = ls
[]
[cut_mesh]
type = InterfaceMeshCut2DUserObject
mesh_file = flat_interface_1d.e
interface_velocity_uo = velocity
heal_always = true
[]
[]
[Variables]
[u]
[]
[]
[ICs]
[ic_u]
type = FunctionIC
variable = u
function = 'if(x<5.01, 2, 1)'
[]
[]
[AuxVariables]
[ls]
order = FIRST
family = LAGRANGE
[]
[]
[Constraints]
[u_constraint]
type = XFEMEqualValueAtInterface
geometric_cut_userobject = 'cut_mesh'
use_displaced_mesh = false
variable = u
value = 2
alpha = 1e6
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[]
[time]
type = TimeDerivative
variable = u
[]
[]
[AuxKernels]
[ls]
type = MeshCutLevelSetAux
mesh_cut_user_object = cut_mesh
variable = ls
execute_on = 'TIMESTEP_BEGIN'
[]
[]
[Materials]
[diffusivity_A]
type = GenericConstantMaterial
prop_names = A_diffusion_coefficient
prop_values = 5
[]
[diffusivity_B]
type = GenericConstantMaterial
prop_names = B_diffusion_coefficient
prop_values = 1
[]
[diff_combined]
type = LevelSetBiMaterialReal
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = diffusion_coefficient
[]
[]
[BCs]
# Define boundary conditions
[left_u]
type = DirichletBC
variable = u
value = 2
boundary = left
[]
[right_u]
type = NeumannBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_tol = 1e-3
nl_max_its = 15
nl_rel_tol = 1e-9
nl_abs_tol = 1e-9
start_time = 0.0
dt = 1
num_steps = 5
max_xfem_update = 1
[]
[Outputs]
execute_on = timestep_end
exodus = true
perf_graph = 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/porous_flow/test/tests/jacobian/fflux01.i)
# 1phase, 1component, constant viscosity, constant insitu permeability
# density with constant bulk, Corey relative perm, nonzero gravity, unsaturated with vanGenuchten
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
xmin = 0
xmax = 1
ny = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = -0.7+x+y
[]
[]
[Kernels]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
gravity = '-1 -0.1 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.5
density0 = 1
thermal_expansion = 0
viscosity = 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
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[]
[Preconditioning]
active = check
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000'
[]
[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-15 1E-10 10000 test'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
exodus = false
[]
(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
[]
(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/porous_flow/test/tests/flux_limited_TVD_advection/jacobian_03.i)
# Checking the Jacobian of Flux-Limited TVD Advection, using flux_limiter_type = vanleer
#
# The initial conditions are u=x. This means that the argument of the flux limiter is 1, so that
# the flux_limiter=1 everywhere, irrespective of flux_limiter_type (except for 'none'). However
# superbee and minmod are nondifferentiable at this point, so using those flux_limiter_type will
# result in a poor Jacobian
#
# Here we use snes_check_jacobian instead of snes_type=test. The former just checks the Jacobian for the
# random initial conditions, while the latter checks for u=1 and u=-1
#
# The Jacobian is correct for u=1 and u=-1, but the finite-difference scheme used by snes_type=test gives the
# wrong answer.
# For u=1, the Kuzmin-Turek scheme adds as much antidiffusion as possible, resulting in a central-difference
# version of advection (flux_limiter = 1). This is correct, and the Jacobian is calculated correctly.
# However, when computing the Jacobian using finite differences, u is increased or decreased at a node.
# This results in that node being at a maximum or minimum, which means no antidiffusion should be added
# (flux_limiter = 0). This corresponds to a full-upwind scheme. So the finite-difference computes the
# Jacobian in the full-upwind scenario, which is incorrect (the original residual = 0, after finite-differencing
# the residual comes from the full-upwind scenario).
[Mesh]
type = GeneratedMesh
dim = 1
nx = 6
[]
[Variables]
[u]
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'x'
[]
[]
[Kernels]
[flux]
type = FluxLimitedTVDAdvection
variable = u
advective_flux_calculator = fluo
[]
[]
[UserObjects]
[fluo]
type = AdvectiveFluxCalculatorConstantVelocity
flux_limiter_type = vanleer
u = u
velocity = '1 -2 1.5'
[]
[]
[Preconditioning]
active = smp
[smp]
type = SMP
full = true
petsc_options = '-snes_check_jacobian'
[]
[]
[Executioner]
type = Transient
solve_type = Linear # this is to force convergence even though the nonlinear residual is high: we just care about the Jacobian in this test
end_time = 1
num_steps = 1
dt = 1
[]
(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
[]
(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
[]
(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/porous_flow/test/tests/heat_advection/heat_advection_1d.i)
# 1phase, heat advecting with a moving fluid
# Full upwinding is used
[Mesh]
type = GeneratedMesh
dim = 1
nx = 50
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[temp]
initial_condition = 200
[]
[pp]
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = '1-x'
[]
[]
[BCs]
[pp0]
type = DirichletBC
variable = pp
boundary = left
value = 1
[]
[pp1]
type = DirichletBC
variable = pp
boundary = right
value = 0
[]
[spit_heat]
type = DirichletBC
variable = temp
boundary = left
value = 300
[]
[suck_heat]
type = DirichletBC
variable = temp
boundary = right
value = 200
[]
[]
[Kernels]
[mass_dot]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[advection]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pp
[]
[energy_dot]
type = PorousFlowEnergyTimeDerivative
variable = temp
[]
[heat_advection]
type = PorousFlowHeatAdvection
variable = temp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.6
alpha = 1.3
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 100
density0 = 1000
viscosity = 4.4
thermal_expansion = 0
cv = 2
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.2
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 1.0
density = 125
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1.1 0 0 0 2 0 0 0 3'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[massfrac]
type = PorousFlowMassFraction
[]
[PS]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'gmres bjacobi 1E-15 1E-10 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.01
end_time = 0.6
[]
[VectorPostprocessors]
[T]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 51
sort_by = x
variable = temp
[]
[]
[Outputs]
[csv]
type = CSV
sync_times = '0.1 0.6'
sync_only = true
[]
[]
(test/tests/auxkernels/projection_aux/1d.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 1
nx = 10
elem_type = EDGE3
[]
[ICs]
active = 'constant_elem constant_nodal'
[constant_elem]
type = ConstantIC
variable = base_elem
value = 4
[]
[constant_nodal]
type = ConstantIC
variable = base_nodal
value = 3.5
[]
[linear_elem]
type = FunctionIC
variable = base_elem
function = 2+2*x
[]
[linear_nodal]
type = FunctionIC
variable = base_nodal
function = 3+3*x
[]
[quadratic_elem]
type = FunctionIC
variable = base_elem
function = 2+2*x*x
[]
[quadratic_nodal]
type = FunctionIC
variable = base_nodal
function = 3+3*x*x
[]
[]
[AuxVariables]
# Families:
# LAGRANGE, MONOMIAL, HERMITE, SCALAR, HIERARCHIC, CLOUGH, XYZ, SZABAB, BERNSTEIN,
# L2_LAGRANGE, L2_HIERARCHIC, RATIONAL_BERNSTEIN, SIDE_HIERARCHIC
# Notes:
# - 'elemental': MONOMIAL, XYZ, L2_LAGRANGE, L2_HIERARCHIC
# - 'nodal': LAGRANGE, HERMITE, HIERARCHIC, CLOUGH, SZABAB, BERNSTEIN, RATIONAL_BERNSTEIN
# - Hermite, Hierachic, Clough, Bernstein, rational Bernstein cannot be created on 1D EDGE3 elements
# - Hermite, Hierarchic, Clough, Bernstein, rational Bernstein, Szabab, L2_lagrange, L2_hierarchic
# cannot be created with a constant order
[base_elem]
family = MONOMIAL
order = CONSTANT
[]
[base_nodal]
[]
[test_elem_lagrange]
[]
[test_elem_lagrange_high]
order = SECOND
[]
[test_elem_mono]
family = MONOMIAL
order = CONSTANT
[]
[test_elem_mono_high]
family = MONOMIAL
order = SECOND
[]
[test_elem_fv]
type = MooseVariableFVReal
[]
[test_elem_xyz]
family = XYZ
order = CONSTANT
[]
[test_elem_xyz_high]
family = XYZ
order = SECOND
[]
[test_elem_szabab]
family = SZABAB
order = FIRST
[]
[test_elem_l2_lagrange]
family = L2_LAGRANGE
order = FIRST
[]
[test_elem_l2_lagrange_high]
family = L2_LAGRANGE
order = SECOND
[]
[test_elem_l2_hierarchic]
family = L2_HIERARCHIC
order = FIRST
[]
[test_elem_l2_hierarchic_high]
family = L2_HIERARCHIC
order = SECOND
[]
[test_nodal_lagrange]
[]
[test_nodal_lagrange_high]
order = SECOND
[]
[test_nodal_mono]
family = MONOMIAL
order = CONSTANT
[]
[test_nodal_mono_high]
family = MONOMIAL
order = SECOND
[]
[test_nodal_fv]
type = MooseVariableFVReal
[]
[test_nodal_xyz]
family = XYZ
order = CONSTANT
[]
[test_nodal_xyz_high]
family = XYZ
order = SECOND
[]
[test_nodal_szabab]
family = SZABAB
order = FIRST
[]
[test_nodal_l2_lagrange]
family = L2_LAGRANGE
order = FIRST
[]
[test_nodal_l2_lagrange_high]
family = L2_LAGRANGE
order = SECOND
[]
[test_nodal_l2_hierarchic]
family = L2_HIERARCHIC
order = FIRST
[]
[test_nodal_l2_hierarchic_high]
family = L2_HIERARCHIC
order = SECOND
[]
[]
[AuxKernels]
# Project from constant monomial
[base_elem_proj_lagrange]
type = ProjectionAux
variable = test_elem_lagrange
v = base_elem
[]
[base_elem_proj_lagrange_high]
type = ProjectionAux
variable = test_elem_lagrange_high
v = base_elem
[]
[base_elem_proj_mono]
type = ProjectionAux
variable = test_elem_mono
v = base_elem
[]
[base_elem_proj_mono_high]
type = ProjectionAux
variable = test_elem_mono_high
v = base_elem
[]
[base_elem_proj_fv]
type = ProjectionAux
variable = test_elem_fv
v = base_elem
[]
[base_elem_proj_xyz]
type = ProjectionAux
variable = test_elem_xyz
v = base_elem
[]
[base_elem_proj_xyz_high]
type = ProjectionAux
variable = test_elem_xyz_high
v = base_elem
[]
[base_elem_proj_szabab]
type = ProjectionAux
variable = test_elem_szabab
v = base_elem
[]
[base_elem_proj_l2_lagrange]
type = ProjectionAux
variable = test_elem_l2_lagrange
v = base_elem
[]
[base_elem_proj_l2_lagrange_high]
type = ProjectionAux
variable = test_elem_l2_lagrange_high
v = base_elem
[]
[base_elem_proj_l2_hierarchic]
type = ProjectionAux
variable = test_elem_l2_hierarchic
v = base_elem
[]
[base_elem_proj_l2_hierarchic_high]
type = ProjectionAux
variable = test_elem_l2_hierarchic_high
v = base_elem
[]
# Project from constant nodal
[base_nodal_proj_lagrange]
type = ProjectionAux
variable = test_nodal_lagrange
v = base_nodal
[]
[base_nodal_proj_lagrange_high]
type = ProjectionAux
variable = test_nodal_lagrange_high
v = base_nodal
[]
[base_nodal_proj_mono]
type = ProjectionAux
variable = test_nodal_mono
v = base_nodal
[]
[base_nodal_proj_mono_high]
type = ProjectionAux
variable = test_nodal_mono_high
v = base_nodal
[]
[base_nodal_proj_fv]
type = ProjectionAux
variable = test_nodal_fv
v = base_nodal
[]
[base_nodal_proj_xyz]
type = ProjectionAux
variable = test_nodal_xyz
v = base_nodal
[]
[base_nodal_proj_xyz_high]
type = ProjectionAux
variable = test_nodal_xyz_high
v = base_nodal
[]
[base_nodal_proj_szabab]
type = ProjectionAux
variable = test_nodal_szabab
v = base_nodal
[]
[base_nodal_proj_l2_lagrange]
type = ProjectionAux
variable = test_nodal_l2_lagrange
v = base_nodal
[]
[base_nodal_proj_l2_lagrange_high]
type = ProjectionAux
variable = test_nodal_l2_lagrange_high
v = base_nodal
[]
[base_nodal_proj_l2_hierarchic]
type = ProjectionAux
variable = test_nodal_l2_hierarchic
v = base_nodal
[]
[base_nodal_proj_l2_hierarchic_high]
type = ProjectionAux
variable = test_nodal_l2_hierarchic_high
v = base_nodal
[]
[]
[Postprocessors]
[base_elem_proj_lagrange]
type = ElementL2Difference
variable = test_elem_lagrange
other_variable = base_elem
[]
[base_elem_proj_lagrange_high]
type = ElementL2Difference
variable = test_elem_lagrange_high
other_variable = base_elem
[]
[base_elem_proj_mono]
type = ElementL2Difference
variable = test_elem_mono
other_variable = base_elem
[]
[base_elem_proj_mono_high]
type = ElementL2Difference
variable = test_elem_mono_high
other_variable = base_elem
[]
[base_elem_proj_fv]
type = ElementL2Difference
variable = test_elem_fv
other_variable = base_elem
[]
[base_elem_proj_xyz]
type = ElementL2Difference
variable = test_elem_xyz
other_variable = base_elem
[]
[base_elem_proj_xyz_high]
type = ElementL2Difference
variable = test_elem_xyz_high
other_variable = base_elem
[]
[base_elem_proj_szabab]
type = ElementL2Difference
variable = test_elem_szabab
other_variable = base_elem
[]
[base_elem_proj_l2_lagrange]
type = ElementL2Difference
variable = test_elem_l2_lagrange
other_variable = base_elem
[]
[base_elem_proj_l2_lagrange_high]
type = ElementL2Difference
variable = test_elem_l2_lagrange_high
other_variable = base_elem
[]
[base_elem_proj_l2_hierarchic]
type = ElementL2Difference
variable = test_elem_l2_hierarchic
other_variable = base_elem
[]
[base_elem_proj_l2_hierarchic_high]
type = ElementL2Difference
variable = test_elem_l2_hierarchic_high
other_variable = base_elem
[]
# Project from constant nodal
[base_nodal_proj_lagrange]
type = ElementL2Difference
variable = test_nodal_lagrange
other_variable = base_nodal
[]
[base_nodal_proj_lagrange_high]
type = ElementL2Difference
variable = test_nodal_lagrange_high
other_variable = base_nodal
[]
[base_nodal_proj_mono]
type = ElementL2Difference
variable = test_nodal_mono
other_variable = base_nodal
[]
[base_nodal_proj_mono_high]
type = ElementL2Difference
variable = test_nodal_mono_high
other_variable = base_nodal
[]
[base_nodal_proj_fv]
type = ElementL2Difference
variable = test_nodal_fv
other_variable = base_nodal
[]
[base_nodal_proj_xyz]
type = ElementL2Difference
variable = test_nodal_xyz
other_variable = base_nodal
[]
[base_nodal_proj_xyz_high]
type = ElementL2Difference
variable = test_nodal_xyz_high
other_variable = base_nodal
[]
[base_nodal_proj_szabab]
type = ElementL2Difference
variable = test_nodal_szabab
other_variable = base_nodal
[]
[base_nodal_proj_l2_lagrange]
type = ElementL2Difference
variable = test_nodal_l2_lagrange
other_variable = base_nodal
[]
[base_nodal_proj_l2_lagrange_high]
type = ElementL2Difference
variable = test_nodal_l2_lagrange_high
other_variable = base_nodal
[]
[base_nodal_proj_l2_hierarchic]
type = ElementL2Difference
variable = test_nodal_l2_hierarchic
other_variable = base_nodal
[]
[base_nodal_proj_l2_hierarchic_high]
type = ElementL2Difference
variable = test_nodal_l2_hierarchic_high
other_variable = base_nodal
[]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
csv = true
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
(modules/level_set/examples/vortex/vortex_supg.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmax = 1
ymax = 1
nx = 16
ny = 16
uniform_refine = 2
elem_type = QUAD9
[]
[AuxVariables]
[./velocity]
family = LAGRANGE_VEC
[../]
[]
[AuxKernels]
[./vec]
type = VectorFunctionAux
variable = velocity
function = velocity_func
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
[Variables]
[./phi]
family = LAGRANGE
order = FIRST
[../]
[]
[Functions]
[./phi_exact]
type = LevelSetOlssonBubble
epsilon = 0.01184
center = '0.5 0.75 0'
radius = 0.15
[../]
[./velocity_func]
type = LevelSetOlssonVortex
reverse_time = 2
[../]
[]
[ICs]
[./phi_ic]
type = FunctionIC
function = phi_exact
variable = phi
[../]
[]
[Kernels]
[./time]
type = TimeDerivative
variable = phi
[../]
[./advection]
type = LevelSetAdvection
velocity = velocity
variable = phi
[../]
[./advection_supg]
type = LevelSetAdvectionSUPG
velocity = velocity
variable = phi
[../]
[./time_supg]
type = LevelSetTimeDerivativeSUPG
velocity = velocity
variable = phi
[../]
[]
[Postprocessors]
[./area]
type = LevelSetVolume
threshold = 0.5
variable = phi
location = outside
execute_on = 'initial timestep_end'
[../]
[./cfl]
type = LevelSetCFLCondition
velocity = velocity
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
start_time = 0
end_time = 2
scheme = crank-nicolson
petsc_options_iname = '-pc_type -pc_sub_type'
petsc_options_value = 'asm ilu'
[./TimeStepper]
type = PostprocessorDT
postprocessor = cfl
scale = 0.8
[../]
[]
[Outputs]
csv = true
exodus = true
[]
(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/porous_flow/test/tests/heat_advection/heat_advection_1d_fully_saturated_action.i)
# 1phase, heat advecting with a moving fluid
# Using the PorousFlowFullySaturated Action with various stabilization options
# With stabilization=none, this should produce an identical result to heat_advection_1d_fully_saturated.i
# With stabilization=Full, this should produce an identical result to heat_advection_1d.i and heat_advection_1d_fullsat.i
# With stabilization=KT, this should produce an identical result to heat_advection_1D_KT.i
[Mesh]
type = GeneratedMesh
dim = 1
nx = 50
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[temp]
initial_condition = 200
[]
[pp]
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = '1-x'
[]
[]
[BCs]
[pp0]
type = DirichletBC
variable = pp
boundary = left
value = 1
[]
[pp1]
type = DirichletBC
variable = pp
boundary = right
value = 0
[]
[spit_heat]
type = DirichletBC
variable = temp
boundary = left
value = 300
[]
[suck_heat]
type = DirichletBC
variable = temp
boundary = right
value = 200
[]
[]
[PorousFlowFullySaturated]
porepressure = pp
temperature = temp
coupling_type = ThermoHydro
fp = simple_fluid
add_darcy_aux = false
stabilization = none
flux_limiter_type = superbee
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 100
density0 = 1000
viscosity = 4.4
thermal_expansion = 0
cv = 2
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.2
[]
[zero_thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0 0 0 0 0 0 0 0 0'
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 1.0
density = 125
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1.1 0 0 0 2 0 0 0 3'
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.01
end_time = 0.6
[]
[VectorPostprocessors]
[T]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 51
sort_by = x
variable = temp
[]
[]
[Outputs]
file_base = heat_advection_1d_fully_saturation_action
[csv]
type = CSV
sync_times = '0.1 0.6'
sync_only = 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/transfers/general_field/nearest_node/regular/sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 0.2
ymax = 0.2
[]
[AuxVariables]
[from_main]
initial_condition = -1
[]
[from_main_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_main]
[InitialCondition]
type = FunctionIC
function = '3 + 2*x*x + 3*y*y*y'
[]
[]
[to_main_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '4 + 2*x*x + 3*y*y*y'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
hide = 'to_main to_main_elem'
overwrite = true
[]
[]
(test/tests/misc/check_error/missing_function_test.i)
# Test for usage of missing function
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = missing_function #should generate error
[../]
[../]
[]
[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'
[]
[Outputs]
file_base = out
[]
(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
[]
(modules/porous_flow/test/tests/sinks/s13.i)
# Apply a PorousFlowOutflowBC to the right-hand side and watch fluid flow to it
#
# This test has a single phase with two components. The test initialises with
# the porous material fully filled with component=1. The left-hand side is fixed
# at porepressure=1 and mass-fraction of the zeroth component being unity.
# The right-hand side has
# - porepressure fixed at zero via a DirichletBC: physically this removes component=1
# to ensure that porepressure remains fixed
# - a PorousFlowOutflowBC for the component=0 to allow that component to exit the boundary freely
#
# Therefore, the zeroth fluid component will flow from left to right (down the
# pressure gradient).
#
# The important DE is
# porosity * dc/dt = (perm / visc) * grad(P) * grad(c)
# which is true for c = mass-fraction, and very large bulk modulus of the fluid.
# For grad(P) constant in time and space (as in this example) this is just the
# advection equation for c, with velocity = perm / visc / porosity. The parameters
# are chosen to velocity = 1 m/s.
# In the numerical world, and especially with full upwinding, the advection equation
# suffers from diffusion. In this example, the diffusion is obvious when plotting
# the mass-fraction along the line, but the average velocity of the front is still
# correct at 1 m/s.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[pp]
[]
[frac]
[]
[]
[PorousFlowFullySaturated]
fp = simple_fluid
porepressure = pp
mass_fraction_vars = frac
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = 1-x
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1e10 # need large in order for constant-velocity advection
density0 = 1 # irrelevant
thermal_expansion = 0
viscosity = 11
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1.1 0 0 0 1.1 0 0 0 1.1'
[]
[]
[BCs]
[lhs_fixed_b]
type = DirichletBC
boundary = left
variable = pp
value = 1
[]
[rhs_fixed_b]
type = DirichletBC
boundary = right
variable = pp
value = 0
[]
[lhs_fixed_a]
type = DirichletBC
boundary = left
variable = frac
value = 1
[]
[outflow_a]
type = PorousFlowOutflowBC
boundary = right
include_relperm = false # no need for relperm in this fully-saturated simulation
mass_fraction_component = 0
variable = frac
[]
[]
[Preconditioning]
[andy]
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
dt = 1E-2
end_time = 1
nl_rel_tol = 1E-12
nl_abs_tol = 1E-12
[]
[VectorPostprocessors]
[mf]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 100
sort_by = x
variable = frac
[]
[]
[Outputs]
[console]
type = Console
execute_on = 'nonlinear linear'
[]
[csv]
type = CSV
sync_times = '0.1 0.5 1'
sync_only = true
[]
time_step_interval = 10
[]
(modules/solid_mechanics/test/tests/auxkernels/tensorelasticenergyaux.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
nz = 0
xmax = 3
ymax = 2
zmax = 0
elem_type = QUAD4
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./dummy]
[../]
[]
[AuxVariables]
[./disp_x]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = sin(x)*0.1
[../]
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = cos(y)*0.05
[../]
[../]
[./E]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./elastic_energy]
type = ElasticEnergyAux
variable = E
[../]
[]
[Materials]
[./elasticity]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '1 2 4 3 2 5 1 3 1'
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
kernel_coverage_check = false
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/recover/pffltvd.i)
# Tests that PorousFlow can successfully recover using a checkpoint file.
# This test contains stateful material properties, adaptivity, integrated
# boundary conditions with nodal-sized materials, and TVD flux limiting.
#
# This test file is run three times:
# 1) The full input file is run to completion
# 2) The input file is run for half the time and checkpointing is included
# 3) The input file is run in recovery using the checkpoint data
#
# The final output of test 3 is compared to the final output of test 1 to verify
# that recovery was successful.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 1
[]
[Adaptivity]
initial_steps = 1
initial_marker = tracer_marker
marker = tracer_marker
max_h_level = 1
[Markers]
[tracer_marker]
type = ValueRangeMarker
variable = tracer
lower_bound = 0.02
upper_bound = 0.98
[]
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[porepressure]
[]
[tracer]
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = '2 - x'
[]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = tracer
[]
[flux0]
type = PorousFlowFluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = advective_flux_calculator_0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[]
[flux1]
type = PorousFlowFluxLimitedTVDAdvection
variable = porepressure
advective_flux_calculator = advective_flux_calculator_1
[]
[]
[BCs]
[constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 2
boundary = left
[]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[]
[remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure tracer'
number_fluid_phases = 1
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[advective_flux_calculator_0]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 0
[]
[advective_flux_calculator_1]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = tracer
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[]
[]
[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'
[]
[]
[VectorPostprocessors]
[tracer]
type = NodalValueSampler
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 0.2
dt = 0.05
[]
[Outputs]
csv = true
[]
(modules/phase_field/examples/slkks/CrFe.i)
#
# SLKKS two phase example for the BCC and SIGMA phases. The sigma phase contains
# multiple sublattices. Free energy from
# Jacob, Aurelie, Erwin Povoden-Karadeniz, and Ernst Kozeschnik. "Revised thermodynamic
# description of the Fe-Cr system based on an improved sublattice model of the sigma phase."
# Calphad 60 (2018): 16-28.
#
# In this simulation we consider diffusion (Cahn-Hilliard) and phase transformation.
#
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 160
ny = 1
nz = 0
xmin = -25
xmax = 25
ymin = -2.5
ymax = 2.5
elem_type = QUAD4
[]
[]
[AuxVariables]
[Fglobal]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[sigma_cr0]
type = PiecewiseLinear
data_file = CrFe_sigma_out_var_0001.csv
format = columns
x_index_in_file = 5
y_index_in_file = 2
xy_in_file_only = false
[]
[sigma_cr1]
type = PiecewiseLinear
data_file = CrFe_sigma_out_var_0001.csv
format = columns
x_index_in_file = 5
y_index_in_file = 3
xy_in_file_only = false
[]
[sigma_cr2]
type = PiecewiseLinear
data_file = CrFe_sigma_out_var_0001.csv
format = columns
x_index_in_file = 5
y_index_in_file = 4
xy_in_file_only = false
[]
[]
[Variables]
# order parameters
[eta1]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
[eta2]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
# solute concentration
[cCr]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = '(x+25)/50*0.5+0.1'
[]
[]
# sublattice concentrations
[BCC_CR]
initial_condition = 0.45
[]
[SIGMA_0CR]
[InitialCondition]
type = CoupledValueFunctionIC
function = sigma_cr0
v = cCr
variable = SIGMA_0CR
[]
[]
[SIGMA_1CR]
[InitialCondition]
type = CoupledValueFunctionIC
function = sigma_cr1
v = cCr
variable = SIGMA_1CR
[]
[]
[SIGMA_2CR]
[InitialCondition]
type = CoupledValueFunctionIC
function = sigma_cr2
v = cCr
variable = SIGMA_2CR
[]
[]
# Lagrange multiplier
[lambda]
[]
[]
[Materials]
# CALPHAD free energies
[F_BCC_A2]
type = DerivativeParsedMaterial
property_name = F_BCC_A2
outputs = exodus
output_properties = F_BCC_A2
expression = 'BCC_FE:=1-BCC_CR; G := 8.3145*T*(1.0*if(BCC_CR > 1.0e-15,BCC_CR*log(BCC_CR),0) + '
'1.0*if(BCC_FE > 1.0e-15,BCC_FE*plog(BCC_FE,eps),0) + 3.0*if(BCC_VA > '
'1.0e-15,BCC_VA*log(BCC_VA),0))/(BCC_CR + BCC_FE) + 8.3145*T*if(T < '
'548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + '
'311.5*BCC_CR*BCC_VA - '
'1043.0*BCC_FE*BCC_VA,-8.13674105561218e-49*T^15/(0.525599232981783*BCC_CR*BCC_FE*BCC_'
'VA*(BCC_CR - BCC_FE) - 0.894055608820709*BCC_CR*BCC_FE*BCC_VA + '
'0.298657718120805*BCC_CR*BCC_VA - BCC_FE*BCC_VA + 9.58772770853308e-13)^15 - '
'4.65558036243985e-30*T^9/(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^9 - '
'1.3485349181899e-10*T^3/(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^3 + 1 - '
'0.905299382744392*(548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'932.5*BCC_CR*BCC_FE*BCC_VA + 311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA + '
'1.0e-9)/T,if(T < -548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'932.5*BCC_CR*BCC_FE*BCC_VA - 311.5*BCC_CR*BCC_VA + '
'1043.0*BCC_FE*BCC_VA,-8.13674105561218e-49*T^15/(-0.525599232981783*BCC_CR*BCC_FE*BCC'
'_VA*(BCC_CR - BCC_FE) + 0.894055608820709*BCC_CR*BCC_FE*BCC_VA - '
'0.298657718120805*BCC_CR*BCC_VA + BCC_FE*BCC_VA + 9.58772770853308e-13)^15 - '
'4.65558036243985e-30*T^9/(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) '
'+ 0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^9 - '
'1.3485349181899e-10*T^3/(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^3 + 1 - '
'0.905299382744392*(-548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'932.5*BCC_CR*BCC_FE*BCC_VA - 311.5*BCC_CR*BCC_VA + 1043.0*BCC_FE*BCC_VA + '
'1.0e-9)/T,if(T > -548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'932.5*BCC_CR*BCC_FE*BCC_VA - 311.5*BCC_CR*BCC_VA + 1043.0*BCC_FE*BCC_VA & '
'548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + '
'311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA < '
'0,-79209031311018.7*(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^5/T^5 - '
'3.83095660520737e+42*(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^15/T^15 - '
'1.22565886734485e+72*(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^25/T^25,if(T > '
'548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + '
'311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA & 548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - '
'BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + 311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA > '
'0,-79209031311018.7*(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^5/T^5 - '
'3.83095660520737e+42*(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^15/T^15 - '
'1.22565886734485e+72*(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^25/T^25,0))))*log((2.15*BCC_CR*BCC_FE*BCC_VA - '
'0.008*BCC_CR*BCC_VA + 2.22*BCC_FE*BCC_VA)*if(2.15*BCC_CR*BCC_FE*BCC_VA - '
'0.008*BCC_CR*BCC_VA + 2.22*BCC_FE*BCC_VA <= 0,-1.0,1.0) + 1)/(BCC_CR + BCC_FE) + '
'1.0*(BCC_CR*BCC_VA*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + '
'BCC_FE*BCC_VA*if(T >= 298.15 & T < 1811.0,77358.5*1/T - 23.5143*T*log(T) + 124.134*T '
'- 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= 1811.0 & T < '
'6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - 25383.581,0)))/(BCC_CR '
'+ BCC_FE) + 1.0*(BCC_CR*BCC_FE*BCC_VA*(500.0 - 1.5*T)*(BCC_CR - BCC_FE) + '
'BCC_CR*BCC_FE*BCC_VA*(24600.0 - 14.98*T) + BCC_CR*BCC_FE*BCC_VA*(9.15*T - '
'14000.0)*(BCC_CR - BCC_FE)^2)/(BCC_CR + BCC_FE); G/100000'
coupled_variables = 'BCC_CR'
constant_names = 'BCC_VA T eps'
constant_expressions = '1 1000 0.01'
[]
[F_SIGMA]
type = DerivativeParsedMaterial
property_name = F_SIGMA
outputs = exodus
output_properties = F_SIGMA
expression = 'SIGMA_0FE := 1-SIGMA_0CR; SIGMA_1FE := 1-SIGMA_1CR; SIGMA_2FE := 1-SIGMA_2CR; G := '
'8.3145*T*(10.0*if(SIGMA_0CR > 1.0e-15,SIGMA_0CR*plog(SIGMA_0CR,eps),0) + '
'10.0*if(SIGMA_0FE > 1.0e-15,SIGMA_0FE*plog(SIGMA_0FE,eps),0) + 4.0*if(SIGMA_1CR > '
'1.0e-15,SIGMA_1CR*plog(SIGMA_1CR,eps),0) + 4.0*if(SIGMA_1FE > '
'1.0e-15,SIGMA_1FE*plog(SIGMA_1FE,eps),0) + 16.0*if(SIGMA_2CR > '
'1.0e-15,SIGMA_2CR*plog(SIGMA_2CR,eps),0) + 16.0*if(SIGMA_2FE > '
'1.0e-15,SIGMA_2FE*plog(SIGMA_2FE,eps),0))/(10.0*SIGMA_0CR + 10.0*SIGMA_0FE + '
'4.0*SIGMA_1CR + 4.0*SIGMA_1FE + 16.0*SIGMA_2CR + 16.0*SIGMA_2FE) + '
'(SIGMA_0FE*SIGMA_1CR*SIGMA_2CR*SIGMA_2FE*(-70.0*T - 170400.0) + '
'SIGMA_0FE*SIGMA_1FE*SIGMA_2CR*SIGMA_2FE*(-10.0*T - 330839.0))/(10.0*SIGMA_0CR + '
'10.0*SIGMA_0FE + 4.0*SIGMA_1CR + 4.0*SIGMA_1FE + 16.0*SIGMA_2CR + 16.0*SIGMA_2FE) + '
'(SIGMA_0CR*SIGMA_1CR*SIGMA_2CR*(30.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - '
'26.908*T*log(T) + 157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= '
'2180.0 & T < 6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) '
'+ 132000.0) + SIGMA_0CR*SIGMA_1CR*SIGMA_2FE*(-110.0*T + 16.0*if(T >= 298.15 & T < '
'1811.0,77358.5*1/T - 23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - '
'5.89269e-8*T^3.0 + 1225.7,if(T >= 1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - '
'46.0*T*log(T) + 299.31255*T - 25383.581,0)) + 14.0*if(T >= 298.15 & T < '
'2180.0,139250.0*1/T - 26.908*T*log(T) + 157.48*T + 0.00189435*T^2.0 - '
'1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < 6000.0,-2.88526e+32*T^(-9.0) - '
'50.0*T*log(T) + 344.18*T - 34869.344,0)) + 123500.0) + '
'SIGMA_0CR*SIGMA_1FE*SIGMA_2CR*(4.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 26.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 140486.0) '
'+ SIGMA_0CR*SIGMA_1FE*SIGMA_2FE*(20.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 10.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 148800.0) '
'+ SIGMA_0FE*SIGMA_1CR*SIGMA_2CR*(10.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 20.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 56200.0) + '
'SIGMA_0FE*SIGMA_1CR*SIGMA_2FE*(26.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 4.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 152700.0) '
'+ SIGMA_0FE*SIGMA_1FE*SIGMA_2CR*(14.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 16.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 46200.0) + '
'SIGMA_0FE*SIGMA_1FE*SIGMA_2FE*(30.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 173333.0))/(10.0*SIGMA_0CR + 10.0*SIGMA_0FE + 4.0*SIGMA_1CR + '
'4.0*SIGMA_1FE + 16.0*SIGMA_2CR + 16.0*SIGMA_2FE); G/100000'
coupled_variables = 'SIGMA_0CR SIGMA_1CR SIGMA_2CR'
constant_names = 'T eps'
constant_expressions = '1000 0.01'
[]
# h(eta)
[h1]
type = SwitchingFunctionMaterial
function_name = h1
h_order = HIGH
eta = eta1
[]
[h2]
type = SwitchingFunctionMaterial
function_name = h2
h_order = HIGH
eta = eta2
[]
# g(eta)
[g1]
type = BarrierFunctionMaterial
function_name = g1
g_order = SIMPLE
eta = eta1
[]
[g2]
type = BarrierFunctionMaterial
function_name = g2
g_order = SIMPLE
eta = eta2
[]
# constant properties
[constants]
type = GenericConstantMaterial
prop_names = 'D L kappa'
prop_values = '10 1 0.1 '
[]
# Coefficients for diffusion equation
[Dh1]
type = DerivativeParsedMaterial
material_property_names = 'D h1(eta1)'
expression = D*h1
property_name = Dh1
coupled_variables = eta1
derivative_order = 1
[]
[Dh2a]
type = DerivativeParsedMaterial
material_property_names = 'D h2(eta2)'
expression = D*h2*10/30
property_name = Dh2a
coupled_variables = eta2
derivative_order = 1
[]
[Dh2b]
type = DerivativeParsedMaterial
material_property_names = 'D h2(eta2)'
expression = D*h2*4/30
property_name = Dh2b
coupled_variables = eta2
derivative_order = 1
[]
[Dh2c]
type = DerivativeParsedMaterial
material_property_names = 'D h2(eta2)'
expression = D*h2*16/30
property_name = Dh2c
coupled_variables = eta2
derivative_order = 1
[]
[]
[Kernels]
#Kernels for diffusion equation
[diff_time]
type = TimeDerivative
variable = cCr
[]
[diff_c1]
type = MatDiffusion
variable = cCr
diffusivity = Dh1
v = BCC_CR
coupled_variables = eta1
[]
[diff_c2a]
type = MatDiffusion
variable = cCr
diffusivity = Dh2a
v = SIGMA_0CR
coupled_variables = eta2
[]
[diff_c2b]
type = MatDiffusion
variable = cCr
diffusivity = Dh2b
v = SIGMA_1CR
coupled_variables = eta2
[]
[diff_c2c]
type = MatDiffusion
variable = cCr
diffusivity = Dh2c
v = SIGMA_2CR
coupled_variables = eta2
[]
# enforce pointwise equality of chemical potentials
[chempot1a2a]
# The BCC phase has only one sublattice
# we tie it to the first sublattice with site fraction 10/(10+4+16) in the sigma phase
type = KKSPhaseChemicalPotential
variable = BCC_CR
cb = SIGMA_0CR
kb = '${fparse 10/30}'
fa_name = F_BCC_A2
fb_name = F_SIGMA
args_b = 'SIGMA_1CR SIGMA_2CR'
[]
[chempot2a2b]
# This kernel ties the first two sublattices in the sigma phase together
type = SLKKSChemicalPotential
variable = SIGMA_0CR
a = 10
cs = SIGMA_1CR
as = 4
F = F_SIGMA
coupled_variables = 'SIGMA_2CR'
[]
[chempot2b2c]
# This kernel ties the remaining two sublattices in the sigma phase together
type = SLKKSChemicalPotential
variable = SIGMA_1CR
a = 4
cs = SIGMA_2CR
as = 16
F = F_SIGMA
coupled_variables = 'SIGMA_0CR'
[]
[phaseconcentration]
# This kernel ties the sum of the sublattice concentrations to the global concentration cCr
type = SLKKSMultiPhaseConcentration
variable = SIGMA_2CR
c = cCr
ns = '1 3'
as = '1 10 4 16'
cs = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR'
h_names = 'h1 h2'
eta = 'eta1 eta2'
[]
# Kernels for Allen-Cahn equation for eta1
[deta1dt]
type = TimeDerivative
variable = eta1
[]
[ACBulkF1]
type = KKSMultiACBulkF
variable = eta1
Fj_names = 'F_BCC_A2 F_SIGMA'
hj_names = 'h1 h2'
gi_name = g1
eta_i = eta1
wi = 0.1
coupled_variables = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR eta2'
[]
[ACBulkC1]
type = SLKKSMultiACBulkC
variable = eta1
F = F_BCC_A2
c = BCC_CR
ns = '1 3'
as = '1 10 4 16'
cs = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR'
h_names = 'h1 h2'
eta = 'eta1 eta2'
[]
[ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa
[]
[lagrange1]
type = SwitchingFunctionConstraintEta
variable = eta1
h_name = h1
lambda = lambda
coupled_variables = 'eta2'
[]
# Kernels for Allen-Cahn equation for eta1
[deta2dt]
type = TimeDerivative
variable = eta2
[]
[ACBulkF2]
type = KKSMultiACBulkF
variable = eta2
Fj_names = 'F_BCC_A2 F_SIGMA'
hj_names = 'h1 h2'
gi_name = g2
eta_i = eta2
wi = 0.1
coupled_variables = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR eta1'
[]
[ACBulkC2]
type = SLKKSMultiACBulkC
variable = eta2
F = F_BCC_A2
c = BCC_CR
ns = '1 3'
as = '1 10 4 16'
cs = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR'
h_names = 'h1 h2'
eta = 'eta1 eta2'
[]
[ACInterface2]
type = ACInterface
variable = eta2
kappa_name = kappa
[]
[lagrange2]
type = SwitchingFunctionConstraintEta
variable = eta2
h_name = h2
lambda = lambda
coupled_variables = 'eta1'
[]
# Lagrange-multiplier constraint kernel for lambda
[lagrange]
type = SwitchingFunctionConstraintLagrange
variable = lambda
h_names = 'h1 h2'
etas = 'eta1 eta2'
epsilon = 1e-6
[]
[]
[AuxKernels]
[GlobalFreeEnergy]
type = KKSMultiFreeEnergy
variable = Fglobal
Fj_names = 'F_BCC_A2 F_SIGMA'
hj_names = 'h1 h2'
gj_names = 'g1 g2'
interfacial_vars = 'eta1 eta2'
kappa_names = 'kappa kappa'
w = 0.1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
line_search = none
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -ksp_gmres_restart'
petsc_options_value = 'asm lu nonzero 30'
l_max_its = 100
nl_max_its = 20
nl_abs_tol = 1e-10
end_time = 10000
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 12
iteration_window = 2
growth_factor = 1.5
cutback_factor = 0.7
dt = 0.1
[]
[]
[VectorPostprocessors]
[var]
type = LineValueSampler
start_point = '-25 0 0'
end_point = '25 0 0'
variable = 'cCr eta1 eta2 SIGMA_0CR SIGMA_1CR SIGMA_2CR'
num_points = 151
sort_by = id
execute_on = 'initial timestep_end'
[]
[mat]
type = LineMaterialRealSampler
start = '-25 0 0'
end = '25 0 0'
property = 'F_BCC_A2 F_SIGMA'
sort_by = id
execute_on = 'initial timestep_end'
[]
[]
[Postprocessors]
[F]
type = ElementIntegralVariablePostprocessor
variable = Fglobal
execute_on = 'initial timestep_end'
[]
[cmin]
type = NodalExtremeValue
value_type = min
variable = cCr
execute_on = 'initial timestep_end'
[]
[cmax]
type = NodalExtremeValue
value_type = max
variable = cCr
execute_on = 'initial timestep_end'
[]
[ctotal]
type = ElementIntegralVariablePostprocessor
variable = cCr
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
exodus = true
print_linear_residuals = false
csv = true
perf_graph = true
[]
(modules/scalar_transport/test/tests/ncp-lms/diagonal-ncp-lm-nodal-enforcement.i)
l=10
nx=100
num_steps=${l}
dt=1
[GlobalParams]
lm_sign_positive = false
[]
[Problem]
extra_tag_vectors = 'positive diffusion rest'
[]
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
elem_type = EDGE3
[]
[Variables]
[u]
order = SECOND
[]
[lm]
[]
[]
[AuxVariables]
[positive][]
[diffusion_lm][]
[rest_lm][]
[diffusion_primal]
order = SECOND
[]
[rest_primal]
order = SECOND
[]
[]
[AuxKernels]
[positive]
type = TagVectorAux
variable = positive
v = lm
vector_tag = positive
execute_on = timestep_end
[]
[diffusion_lm]
type = TagVectorAux
variable = diffusion_lm
v = lm
vector_tag = diffusion
execute_on = timestep_end
[]
[rest_lm]
type = TagVectorAux
variable = rest_lm
v = lm
vector_tag = rest
execute_on = timestep_end
[]
[diffusion_primal]
type = TagVectorAux
variable = diffusion_primal
v = u
vector_tag = diffusion
execute_on = timestep_end
[]
[rest_primal]
type = TagVectorAux
variable = rest_primal
v = u
vector_tag = rest
execute_on = timestep_end
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = '${l} - x'
[]
[]
[Kernels]
[time]
type = TimeDerivativeLM
variable = u
lm_variable = lm
extra_vector_tags = 'rest'
[]
[diff]
type = Diffusion
variable = u
extra_vector_tags = 'diffusion'
[]
[diff_lm]
type = LMDiffusion
variable = lm
primal_variable = u
extra_vector_tags = 'diffusion'
[]
[ffn]
type = BodyForceLM
variable = u
lm_variable = lm
function = '-1'
extra_vector_tags = 'rest'
[]
[lm_coupled_force]
type = CoupledForceLM
variable = u
v = lm
lm_variable = lm
extra_vector_tags = 'rest'
[]
[]
[NodalKernels]
[positive_constraint]
type = LowerBoundNodalKernel
extra_vector_tags = positive
variable = lm
v = u
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = ${l}
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = 0
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
dt = ${dt}
dtmin = ${dt}
solve_type = NEWTON
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_factor_levels -ksp_gmres_restart'
petsc_options_value = '0 99 16 99'
[]
[Outputs]
exodus = true
csv = true
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Postprocessors]
[active_lm]
type = GreaterThanLessThanPostprocessor
variable = lm
execute_on = 'nonlinear timestep_end'
value = 1e-12
[]
[violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-12
comparator = 'less'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(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/porous_flow/test/tests/hysteresis/hys_pc_1.i)
# Capillary-pressure calculation. First-order wetting curve
# When comparing the results with a by-hand computation, remember the MOOSE results are averaged over an element
# Also, when using info_required=sat, remember that: (1) the hysteretic capillary pressure is not invertible if no high extension is used; (2) if saturation exceeds the turning point (eg sat <= 0.1) then the drying curve will be used
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = 1
nx = 100
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
number_fluid_phases = 1
number_fluid_components = 1
porous_flow_vars = ''
[]
[]
[Variables]
[sat]
[]
[]
[ICs]
[sat]
type = FunctionIC
variable = sat
function = 'x'
[]
[]
[BCs]
[sat]
type = FunctionDirichletBC
variable = sat
function = 'x'
boundary = 'left right'
[]
[]
[Kernels]
[dummy]
type = Diffusion
variable = sat
[]
[]
[Materials]
[hys_order]
type = PorousFlowHysteresisOrder
initial_order = 1
previous_turning_points = 0.1
[]
[pc_calculator]
type = PorousFlowHystereticInfo
alpha_d = 10.0
alpha_w = 7.0
n_d = 1.5
n_w = 1.9
S_l_min = 0.1
S_lr = 0.2
S_gr_max = 0.3
Pc_max = 12.0
high_ratio = 0.9
low_extension_type = none
high_extension_type = none
sat_var = sat
[]
[]
[AuxVariables]
[hys_order]
family = MONOMIAL
order = CONSTANT
[]
[pc]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[hys_order]
type = PorousFlowPropertyAux
variable = hys_order
property = hysteresis_order
[]
[pc]
type = PorousFlowPropertyAux
variable = pc
property = hysteretic_info
[]
[]
[VectorPostprocessors]
[pc]
type = LineValueSampler
warn_discontinuous_face_values = false
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 10
sort_by = x
variable = 'sat pc'
[]
[]
[Executioner]
type = Transient
solve_type = Linear
dt = 1
end_time = 1
[]
[Outputs]
csv = true
[]
(modules/porous_flow/test/tests/basic_advection/1phase.i)
# Basic advection of u in a 1-phase situation
#
# grad(P) = -2
# density * gravity = 4 * 0.25
# grad(P) - density * gravity = -3
# permeability = 5
# viscosity = 150
# so Darcy velocity = 0.1
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[P]
[]
[]
[ICs]
[P]
type = FunctionIC
variable = P
function = '2*(1-x)'
[]
[u]
type = FunctionIC
variable = u
function = 'if(x<0.1,1,0)'
[]
[]
[Kernels]
[u_dot]
type = TimeDerivative
variable = u
[]
[u_advection]
type = PorousFlowBasicAdvection
variable = u
phase = 0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = ''
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2e9
density0 = 4
thermal_expansion = 0
viscosity = 150.0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = P
capillary_pressure = pc
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '5 0 0 0 5 0 0 0 5'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0
phase = 0
[]
[darcy_velocity]
type = PorousFlowDarcyVelocityMaterial
gravity = '0.25 0 0'
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = 1
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = 0
variable = u
[]
[]
[Preconditioning]
[basic]
type = SMP
full = true
petsc_options_iname = '-pc_type -snes_rtol'
petsc_options_value = ' lu 1E-10'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 5
[]
[Outputs]
exodus = true
print_linear_residuals = false
[]
(test/tests/functions/image_function/image_mesh_2d.i)
[Mesh]
type = ImageMesh
dim = 2
file = stack/test_00.png
[]
[Variables]
[u]
[]
[]
[Functions]
[image_func]
# ImageFunction gets its file range parameters from ImageMesh,
# when it is present. This prevents duplicating information in
# input files.
type = ImageFunction
[]
[]
[ICs]
[u_ic]
type = FunctionIC
function = image_func
variable = u
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.1
[]
[Outputs]
exodus = 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/phase_field/examples/interfacekernels/interface_gradient.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 50
ny = 50
[]
[./box1]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '0.51 1 0'
[../]
[./box2]
input = box1
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '0.49 0 0'
top_right = '1 1 0'
[../]
[./iface]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = 10
input = box2
[../]
[./rotate]
type = TransformGenerator
transform = ROTATE
vector_value = '5 0 0'
input = iface
[../]
[]
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Variables]
[./u]
block = 1
[./InitialCondition]
type = FunctionIC
function = 'r:=sqrt((x-0.4)^2+(y-0.5)^2);if(r<0.05,5,1)'
[../]
[../]
[./v]
block = 2
initial_condition = 0.8
[../]
[]
[Kernels]
[./u_diff]
type = Diffusion
variable = u
block = 1
[../]
[./u_dt]
type = TimeDerivative
variable = u
block = 1
[../]
[./v_diff]
type = Diffusion
variable = v
block = 2
[../]
[./v_dt]
type = TimeDerivative
variable = v
block = 2
[../]
[]
[InterfaceKernels]
[./flux_continuity]
type = InterfaceDiffusionFluxMatch
variable = u
boundary = 10
neighbor_var = v
[../]
[./diffusion_surface_term]
type = InterfaceDiffusionBoundaryTerm
boundary = 10
variable = u
neighbor_var = v
[../]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 0.001
num_steps = 20
[]
[Outputs]
[./out]
type = Exodus
use_problem_dimension = false
[../]
print_linear_residuals = false
[]
(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/rdg/test/tests/advection_1d/rdgP0.i)
# This test demonstrates the advection of a tracer in 1D using the RDG module.
# There is no slope limiting. Changing the SlopeLimiting scheme to minmod, mc,
# or superbee means that a linear reconstruction is performed, and the slope
# limited according to the scheme chosen. Doing this produces RDG(P0P1) and
# substantially reduces numerical diffusion
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = 0
xmax = 1
[]
[Variables]
[./tracer]
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[../]
[]
[UserObjects]
[./lslope]
type = AEFVSlopeLimitingOneD
execute_on = 'linear'
scheme = 'none' #none | minmod | mc | superbee
u = tracer
[../]
[./internal_side_flux]
type = AEFVUpwindInternalSideFlux
execute_on = 'linear'
velocity = 0.1
[../]
[./free_outflow_bc]
type = AEFVFreeOutflowBoundaryFlux
execute_on = 'linear'
velocity = 0.1
[../]
[]
[Kernels]
[./dot]
type = TimeDerivative
variable = tracer
[../]
[]
[DGKernels]
[./concentration]
type = AEFVKernel
variable = tracer
component = 'concentration'
flux = internal_side_flux
u = tracer
[../]
[]
[BCs]
[./concentration]
type = AEFVBC
boundary = 'left right'
variable = tracer
component = 'concentration'
flux = free_outflow_bc
u = tracer
[../]
[]
[Materials]
[./aefv]
type = AEFVMaterial
slope_limiting = lslope
u = tracer
[../]
[]
[VectorPostprocessors]
[./tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 100
sort_by = x
variable = tracer
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
end_time = 6
dt = 6E-1
nl_abs_tol = 1E-8
timestep_tolerance = 1E-3
[]
[Outputs]
#exodus = true
csv = true
execute_on = final
[]
(test/tests/misc/check_error/function_file_test3.i)
# Test for usage of missing function
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic_function
[../]
[../]
[]
[Functions]
[./ic_function]
type = PiecewiseLinear
data_file = piecewise_linear_mixed_lengths.csv #Will generate error because length of data doesn't match on all rows
format = rows
scale_factor = 1.0
[../]
[]
[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'
[]
[Outputs]
file_base = out
[]
(modules/rdg/test/tests/advection_1d/block_restrictable.i)
############################################################
[GlobalParams]
order = CONSTANT
family = MONOMIAL
u = u
slope_limiting = lslope
implicit = false
[]
############################################################
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = 1
nx = 100
[]
[./subdomain1]
type = SubdomainBoundingBoxGenerator
bottom_left = '0.5 0 0'
block_id = 1
top_right = '1.0 1.0 0'
input = gen
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
input = subdomain1
[../]
[./interface_again]
type = SideSetsBetweenSubdomainsGenerator
primary_block = '1'
paired_block = '0'
new_boundary = 'primary1_interface'
input = interface
[../]
[]
############################################################
[Functions]
[./ic_u]
type = PiecewiseConstant
axis = x
direction = right
xy_data = '0.1 0.5
0.4 1.0
0.5 0.5'
[../]
[]
############################################################
[UserObjects]
[./lslope]
type = AEFVSlopeLimitingOneD
execute_on = 'linear'
scheme = 'superbee' #none | minmod | mc | superbee
block = 0
[../]
[./internal_side_flux]
type = AEFVUpwindInternalSideFlux
execute_on = 'linear'
[../]
[./free_outflow_bc]
type = AEFVFreeOutflowBoundaryFlux
execute_on = 'linear'
[../]
[]
############################################################
[Variables]
[./u]
block = 0
[../]
[./v]
block = 1
family = LAGRANGE
order = FIRST
[../]
[]
############################################################
[ICs]
[./u_ic]
type = FunctionIC
variable = 'u'
function = ic_u
[../]
[]
############################################################
[Kernels]
[./time_u]
implicit = true
type = TimeDerivative
variable = u
block = 0
[../]
[./diff_v]
implicit = true
type = Diffusion
variable = v
block = 1
[../]
[./time_v]
implicit = true
type = TimeDerivative
variable = v
block = 1
[../]
[]
############################################################
[DGKernels]
[./concentration]
type = AEFVKernel
variable = u
component = 'concentration'
flux = internal_side_flux
block = 0
[../]
[]
############################################################
[BCs]
[./concentration]
type = AEFVBC
boundary = 'left primary0_interface'
variable = u
component = 'concentration'
flux = free_outflow_bc
[../]
[./v_left]
type = DirichletBC
boundary = 'primary1_interface'
variable = v
value = 1
[../]
[./v_right]
type = DirichletBC
boundary = 'right'
variable = v
value = 0
[../]
[]
############################################################
[Materials]
[./aefv]
type = AEFVMaterial
block = 0
[../]
[./dummy_1]
type = GenericConstantMaterial
block = 1
prop_names = ''
prop_values = ''
[../]
[]
############################################################
[Executioner]
type = Transient
[./TimeIntegrator]
type = ExplicitMidpoint
[../]
solve_type = 'LINEAR'
l_tol = 1e-4
nl_rel_tol = 1e-20
nl_abs_tol = 1e-8
nl_max_its = 60
start_time = 0.0
num_steps = 4 # 4 | 400 for complete run
dt = 5e-4
dtmin = 1e-6
[]
[Outputs]
[./out]
type = Exodus
time_step_interval = 2
[../]
perf_graph = true
[]
(modules/porous_flow/test/tests/numerical_diffusion/fully_saturated_action.i)
# Using the fully-saturated action, which does mass lumping but no upwinding
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[porepressure]
[]
[tracer]
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x'
[]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[]
[]
[PorousFlowFullySaturated]
porepressure = porepressure
coupling_type = Hydro
gravity = '0 0 0'
fp = the_simple_fluid
mass_fraction_vars = tracer
stabilization = none
[]
[BCs]
[constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1
boundary = left
[]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[]
[remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[]
[]
[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'
[]
[]
[VectorPostprocessors]
[tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 101
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-1
nl_abs_tol = 1E-8
timestep_tolerance = 1E-3
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(test/tests/misc/jacobian/offdiag.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./s]
[./InitialCondition]
type = FunctionIC
function = sin(10*x+y)
[../]
[../]
[./t]
[./InitialCondition]
type = FunctionIC
function = sin(13*y+x)
[../]
[../]
[]
[Kernels]
[./diffs]
type = WrongJacobianDiffusion
variable = s
coupled = t
[../]
[./difft]
type = WrongJacobianDiffusion
variable = t
coupled = s
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
(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
[]
(test/tests/functions/image_function/component.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Variables]
[u]
[]
[]
[Functions]
[image_func]
type = ImageFunction
file_base = stack/test
file_suffix = png
file_range = '0' # file_range is a vector input, a single entry means "read only 1 file"
component = 0
[]
[]
[ICs]
[u_ic]
type = FunctionIC
function = image_func
variable = u
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.1
[]
[Outputs]
exodus = 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/phase_field/test/tests/free_energy_material/RegularSolutionFreeEnergy.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 500
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = x
[../]
[../]
[./myT]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = y
[../]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = c
[../]
[./diff2]
type = Diffusion
variable = myT
[../]
[]
[BCs]
[./left]
type = FunctionDirichletBC
variable = c
boundary = left
function = x
[../]
[./bottom]
type = FunctionDirichletBC
variable = myT
boundary = bottom
function = y
[../]
[./right]
type = FunctionDirichletBC
variable = c
boundary = right
function = x
[../]
[./top]
type = FunctionDirichletBC
variable = myT
boundary = top
function = y
[../]
[]
[Materials]
[./free_energy]
type = RegularSolutionFreeEnergy
property_name = F
c = c
T = myT
outputs = out
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
l_max_its = 1
nl_max_its = 1
nl_abs_tol = 1
[]
[Outputs]
execute_on = 'timestep_end'
[./out]
type = Exodus
execute_on = timestep_end
[../]
[]
(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
[]
(test/tests/auxkernels/advection_flux/advection_flux_fe.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '0.75 0.75 0.75'
dy = '0.75 0.75 0.75'
ix = '2 2 2'
iy = '2 2 2'
subdomain_id = '1 1 1
1 2 1
1 1 1'
[]
[add_inner_boundaries_top]
type = SideSetsAroundSubdomainGenerator
input = cmg
new_boundary = 'block_2_top'
block = 2
normal = '0 1 0'
[]
[add_inner_boundaries_bot]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_top
new_boundary = 'block_2_bot'
block = 2
normal = '0 -1 0'
[]
[add_inner_boundaries_right]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_bot
new_boundary = 'block_2_right'
block = 2
normal = '1 0 0'
[]
[add_inner_boundaries_left]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_right
new_boundary = 'block_2_left'
block = 2
normal = '-1 0 0'
[]
[]
[Variables]
[u]
[]
[v]
[]
[]
[ICs]
[u_blob]
type = FunctionIC
variable = u
function = 'if(x<0.75,if(y<0.75,1,0),0)'
[]
[v_blob]
type = FunctionIC
variable = v
function = 'if(x<0.75,if(y<0.75,1,0),0)'
[]
[]
[Kernels]
[udot]
type = MassLumpedTimeDerivative
variable = u
[]
[u_advec]
type = ConservativeAdvection
variable = u
upwinding_type = full
velocity = '2 0 0'
[]
[vdot]
type = MassLumpedTimeDerivative
variable = v
[]
[v_advec]
type = ConservativeAdvection
variable = v
upwinding_type = full
velocity = '0 2 0'
[]
[]
[Materials]
[rho]
type = GenericConstantMaterial
prop_names = 'rho'
prop_values = '1'
[]
[]
[AuxVariables]
[flux_x]
order = FIRST
family = MONOMIAL
[]
[]
[AuxKernels]
[flux_x]
type = AdvectiveFluxAux
variable = flux_x
vel_x = u
vel_y = v
advected_mat_prop = 'rho'
component = x
boundary = 'block_2_right block_2_left'
[]
[]
[Executioner]
type = Transient
solve_type = LINEAR
dt = 0.01
end_time = 0.02
l_tol = 1E-14
[]
[Postprocessors]
[flux_right]
type = SideIntegralVariablePostprocessor
variable = flux_x
boundary = 'block_2_right'
[]
[flux_right_exact]
type = SideAdvectiveFluxIntegral
boundary = 'block_2_right'
vel_x = u
vel_y = v
component = x
advected_mat_prop = 'rho'
[]
[flux_left]
type = SideIntegralVariablePostprocessor
variable = flux_x
boundary = 'block_2_left'
[]
[flux_left_exact]
type = SideAdvectiveFluxIntegral
boundary = 'block_2_left'
vel_x = u
vel_y = v
component = x
advected_mat_prop = 'rho'
[]
[]
[Outputs]
csv = true
[]
(modules/level_set/test/tests/functions/olsson_plane/olsson_plane.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmax = 1
ymax = 1
nx = 100
ny = 100
elem_type = QUAD9
[]
[AuxVariables/phi]
family = LAGRANGE
order = FIRST
[]
[Functions/phi_exact]
type = LevelSetOlssonPlane
epsilon = 0.04
point = '0.5 0.5 0'
normal = '0 1 0'
[]
[ICs/phi_ic]
type = FunctionIC
function = phi_exact
variable = phi
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = 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/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
[]
(test/tests/userobjects/shape_element_user_object/jacobian_test.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 2
parallel_type = replicated
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = (x-0.5)^2
[../]
[../]
[./v]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = (x-0.5)^2
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = (x-0.5)^2
[../]
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[./shape_w]
type = ExampleShapeElementKernel2
user_object = example_uo
v = v
u = u
variable = w
[../]
[./time_w]
type = TimeDerivative
variable = w
[../]
[./time_u]
type = TimeDerivative
variable = u
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[]
[UserObjects]
[./example_uo]
type = ExampleShapeElementUserObject
u = u
v = v
# as this userobject computes quantities for both the residual AND the jacobian
# it needs to have these execute_on flags set.
execute_on = 'linear nonlinear'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
#off_diag_row = 'w w'
#off_diag_column = 'v u'
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options = '-snes_test_display'
petsc_options_iname = '-snes_type'
petsc_options_value = 'test'
dt = 0.1
num_steps = 2
[]
[Outputs]
exodus = true
perf_graph = true
[]
(test/tests/transfers/general_field/user_object/between_siblings/sub_between_diffusion2.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 3
ny = 3
# partial overlap but also, no equidistant points
xmin = 0.1111
ymin = 0.3333
xmax = 1.211111
ymax = 1.222222
[]
[block1]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0.4 0.6 0'
# extends beyond to grab the boundary
top_right = '2 2 0'
[]
[]
[AuxVariables]
[sent_nodal]
[InitialCondition]
type = FunctionIC
function = '3 + 2*x*x + 3*y*y*y'
[]
[]
[received_nodal]
initial_condition = -1
[]
[sent_elem]
family = MONOMIAL
order = CONSTANT
[InitialCondition]
type = FunctionIC
function = '4 + 2*x*x + 3*y*y*y'
[]
[]
[received_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1
[]
[]
[UserObjects]
[sent_nodal]
type = LayeredAverage
direction = x
num_layers = 10
variable = sent_nodal
[]
[sent_elem]
type = LayeredAverage
direction = x
num_layers = 10
variable = sent_elem
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
exodus = true
hide = 'sent_nodal sent_elem'
execute_on = 'TIMESTEP_END'
[]
(test/tests/misc/check_error/function_file_test14.i)
# Test for usage of missing function
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic_function
[../]
[../]
[]
[Functions]
[./ic_function]
type = PiecewiseLinear
data_file = piecewise_linear_rows_more_data.csv # will generate an error because of more data lines than 2
scale_factor = 1.0
[../]
[]
[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'
[]
[Outputs]
file_base = out
[]
(modules/porous_flow/test/tests/jacobian/fflux01_fully_saturated.i)
# 1phase, 3components, constant viscosity, constant insitu permeability
# density with constant bulk, nonzero gravity
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
xmin = 0
xmax = 1
ny = 1
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[massfrac0]
[]
[massfrac1]
[]
[]
[ICs]
[pp]
type = FunctionIC
variable = pp
function = -0.7+x+y
[]
[massfrac0]
type = RandomIC
variable = massfrac0
min = 0
max = 0.3
[]
[massfrac1]
type = RandomIC
variable = massfrac1
min = 0
max = 0.4
[]
[]
[Kernels]
[flux0]
type = PorousFlowFullySaturatedDarcyFlow
fluid_component = 0
variable = pp
gravity = '-1 -0.1 0'
[]
[flux1]
type = PorousFlowFullySaturatedDarcyFlow
fluid_component = 1
variable = massfrac0
gravity = '-1 -0.1 0'
[]
[flux2]
type = PorousFlowFullySaturatedDarcyFlow
fluid_component = 2
variable = massfrac1
gravity = '-1 -0.1 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp massfrac0 massfrac1'
number_fluid_phases = 1
number_fluid_components = 3
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1.5
density0 = 1
thermal_expansion = 0
viscosity = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'massfrac0 massfrac1'
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 2 0 0 0 3'
[]
[]
[Preconditioning]
active = check
[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-15 1E-10 10000 test'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
exodus = false
[]
(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/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_2D_angle.i)
# Using flux-limited TVD advection ala Kuzmin and Turek, mploying PorousFlow Kernels and UserObjects, with superbee flux-limiter
# 2D version with velocity = (0.1, 0.2, 0)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
xmin = 0
xmax = 1
ny = 10
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[porepressure]
[]
[tracer]
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x - 2 * y'
[]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1 | x > 0.3 | y < 0.1 | y > 0.3, 0, 1)'
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = tracer
[]
[flux0]
type = PorousFlowFluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = advective_flux_calculator_0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[]
[flux1]
type = PorousFlowFluxLimitedTVDAdvection
variable = porepressure
advective_flux_calculator = advective_flux_calculator_1
[]
[]
[BCs]
[constant_boundary_porepressure]
type = FunctionDirichletBC
variable = porepressure
function = '1 - x - 2 * y'
boundary = 'left right top bottom'
[]
[no_tracer_at_boundary]
type = DirichletBC
variable = tracer
value = 0
boundary = 'left right top bottom'
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure tracer'
number_fluid_phases = 1
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[advective_flux_calculator_0]
type = PorousFlowAdvectiveFluxCalculatorUnsaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 0
[]
[advective_flux_calculator_1]
type = PorousFlowAdvectiveFluxCalculatorUnsaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = tracer
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[]
[]
[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 = 0.3
dt = 0.1
[]
[Outputs]
[out]
type = Exodus
execute_on = 'initial final'
[]
[]
(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
[]
(modules/porous_flow/test/tests/flux_limited_TVD_advection/fltvd_3D.i)
# Using Flux-Limited TVD Advection ala Kuzmin and Turek, with antidiffusion from superbee flux limiting
# 3D version
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
xmin = 0
xmax = 1
ny = 4
ymin = 0
ymax = 0.5
nz = 3
zmin = 0
zmax = 2
[]
[Variables]
[tracer]
[]
[]
[Problem]
error_on_jacobian_nonzero_reallocation=true
[]
[ICs]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[]
[]
[Kernels]
[mass_dot]
type = MassLumpedTimeDerivative
variable = tracer
[]
[flux]
type = FluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = fluo
[]
[]
[UserObjects]
[fluo]
type = AdvectiveFluxCalculatorConstantVelocity
flux_limiter_type = superbee
u = tracer
velocity = '0.1 0 0'
[]
[]
[BCs]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_tracer]
# Ideally, an OutflowBC would be used, but that does not exist in the framework
# In 1D VacuumBC is the same as OutflowBC, with the alpha parameter being twice the velocity
type = VacuumBC
boundary = right
alpha = 0.2 # 2 * velocity
variable = tracer
[]
[]
[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'
[]
[]
[VectorPostprocessors]
[tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0.5 2'
num_points = 11
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-2
nl_abs_tol = 1E-8
nl_max_its = 500
timestep_tolerance = 1E-3
[]
[Outputs]
print_linear_residuals = false
[out]
type = CSV
execute_on = final
[]
[]
(modules/porous_flow/examples/natural_convection/natural_convection.i)
# Example problem: Elder, Transient convection in a porous mediu, 1967
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 64
ny = 32
xmin = 0
xmax = 300
ymax = 0
ymin = -150
[]
[heater]
type = ParsedGenerateSideset
input = gen
combinatorial_geometry = 'x <= 150 & y = -150'
new_sideset_name = heater
[]
uniform_refine = 1
[]
[Variables]
[porepressure]
[]
[T]
initial_condition = 285
[]
[]
[AuxVariables]
[density]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[density]
type = PorousFlowPropertyAux
variable = density
property = density
execute_on = TIMESTEP_END
[]
[]
[ICs]
[hydrostatic]
type = FunctionIC
variable = porepressure
function = '1e5 - 9.81 * 1000 * y'
[]
[]
[GlobalParams]
PorousFlowDictator = 'dictator'
gravity = '0 -9.81 0'
[]
[FluidProperties]
[water]
type = Water97FluidProperties
[]
[]
[PorousFlowFullySaturated]
coupling_type = ThermoHydro
porepressure = porepressure
temperature = T
fp = water
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1.21E-10 0 0 0 1.21E-10 0 0 0 1.21E-10'
[]
[Matrix_internal_energy]
type = PorousFlowMatrixInternalEnergy
density = 2500
specific_heat_capacity = 0
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '1.5 0 0 0 1.5 0 0 0 0'
[]
[]
[BCs]
[t_bot]
type = DirichletBC
variable = T
value = 293
boundary = 'heater'
[]
[t_top]
type = DirichletBC
variable = T
value = 285
boundary = 'top'
[]
[p_top]
type = DirichletBC
variable = porepressure
value = 1e5
boundary = top
[]
[]
[Preconditioning]
[basic]
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
end_time = 63072000
dtmax = 1e6
nl_rel_tol = 1e-6
[TimeStepper]
type = IterationAdaptiveDT
dt = 1000
[]
[Adaptivity]
interval = 1
refine_fraction = 0.2
coarsen_fraction = 0.3
max_h_level = 4
[]
[]
[Outputs]
exodus = true
[]
# If you uncomment this it will print out all the kernels and materials that the PorousFlowFullySaturated action generates
#[Problem]
# type = DumpObjectsProblem
# dump_path = PorousFlowFullySaturated
#[]
(test/tests/postprocessors/side_advection_flux_integral/side_advection_flux_integral_fv.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '0.75 0.75 0.75'
dy = '0.75 0.75 0.75'
ix = '2 2 2'
iy = '2 2 2'
subdomain_id = '1 1 1
1 2 1
1 1 1'
[]
[add_inner_boundaries_top]
type = SideSetsAroundSubdomainGenerator
input = cmg
new_boundary = 'block_2_top'
block = 2
normal = '0 1 0'
[]
[add_inner_boundaries_bot]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_top
new_boundary = 'block_2_bot'
block = 2
normal = '0 -1 0'
[]
[add_inner_boundaries_right]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_bot
new_boundary = 'block_2_right'
block = 2
normal = '1 0 0'
[]
[add_inner_boundaries_left]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_right
new_boundary = 'block_2_left'
block = 2
normal = '-1 0 0'
[]
[]
[Variables]
[u]
type = MooseVariableFVReal
two_term_boundary_expansion = false
[]
[]
[ICs]
[u_blob]
type = FunctionIC
variable = u
function = 'if(x<0.75,if(y<0.75,1,0),0)'
[]
[]
[FVKernels]
[advection]
type = FVAdvection
variable = u
velocity = '2 1.5 0'
[]
[time]
type = FVTimeKernel
variable = u
[]
[]
[FVBCs]
[fv_outflow]
type = FVConstantScalarOutflowBC
velocity = '2 1.5 0'
variable = u
boundary = 'right top'
[]
[]
[Executioner]
type = Transient
solve_type = LINEAR
dt = 0.01
end_time = 0.02
l_tol = 1E-14
[]
[Postprocessors]
[flux_right]
type = SideAdvectiveFluxIntegral
boundary = 'block_2_right'
vel_x = 2
vel_y = 1.5
component = x
advected_quantity = u
[]
[flux_left_exact]
type = SideAdvectiveFluxIntegral
boundary = 'block_2_left'
vel_x = 2
vel_y = 1.5
component = x
advected_quantity = u
[]
[]
[Outputs]
csv = true
[]
(modules/richards/test/tests/uo_egs/density.i)
# Outputs a density relationship into an exodus file
# and into a CSV file.
# In the exodus file, the density will be a function of "x", and
# this "x" is actually porepressure
# In the CSV file you will find the density at the "x" point
# specified by you below.
#
# You may specify:
# - the "type" of density in the UserObjects block
# - the parameters of this density function in the UserObjects block
# - the "x" point (which is porepressure) that you want to extract
# the density at, if you want a value at a particular point
# - the range of "x" values (which is porepressure values) may be
# changed in the Mesh block, below
[UserObjects]
[./density]
type = RichardsDensityVDW
a = 0.2303
b = 4.31E-5
molar_mass = 16.04246E-3
temperature = 293
[../]
[]
[Postprocessors]
[./point_val]
type = PointValue
execute_on = timestep_begin
# note this point must lie inside the mesh below
point = '1 0 0'
variable = density
[../]
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
# the following specify the range of porepressure
xmin = -1E6
xmax = 1E7
[]
############################
# You should not need to change any of the stuff below
############################
[Variables]
[./u]
[../]
[]
[ICs]
[./u_init]
type = FunctionIC
variable = u
function = x
[../]
[]
[AuxVariables]
[./density]
[../]
[]
[AuxKernels]
[./density_AuxK]
type = RichardsDensityAux
variable = density
density_UO = density
execute_on = timestep_begin
pressure_var = u
[../]
[]
[Kernels]
[./dummy]
type = Diffusion
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
num_steps = 0
[]
[Outputs]
file_base = density
[./csv]
type = CSV
[../]
[./exodus]
type = Exodus
hide = u
[../]
[]
(test/tests/materials/functor_properties/ad_conversion/1d_dirichlet.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmax = 2
[]
[Variables]
[v]
type = MooseVariableFVReal
[]
[]
[AuxVariables]
[sink]
type = MooseVariableFVReal
[]
[]
[ICs]
[sink]
type = FunctionIC
variable = sink
function = 'x^3'
[]
[]
[FVKernels]
[diff]
type = FVDiffusion
variable = v
coeff = 1
[]
[sink]
type = FVFunctorElementalKernel
variable = v
functor_name = 'ad_sink'
[]
[]
[FVBCs]
[bounds]
type = FVDirichletBC
variable = v
boundary = 'left right'
value = 0
[]
[]
[Materials]
[converter_to_regular]
type = FunctorADConverter
ad_props_in = 'sink'
reg_props_out = 'regular_sink_0'
[]
# Just to change the name
[functor]
type = GenericFunctorMaterial
prop_names = 'regular_sink_1'
prop_values = 'regular_sink_0'
[]
[converter_to_ad]
type = FunctorADConverter
reg_props_in = 'regular_sink_1'
ad_props_out = 'ad_sink'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/file_mesh_generator/exact_discontinuous_iga.i)
[Mesh]
[cyl2d_iga]
type = FileMeshGenerator
file = test_quadratic.e
discontinuous_spline_extraction = true
[]
[]
[Variables]
[u]
order = SECOND # Must match mesh order
family = RATIONAL_BERNSTEIN
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'x'
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
block = 0 # Avoid direct calculations on spline nodes
[]
[./time]
type = TimeDerivative
variable = u
block = 0
[../]
[null]
type = NullKernel
variable = u
block = 1 # Keep kernel coverage check happy
[]
[]
[Executioner]
type = Transient
num_steps = 1
solve_type = NEWTON
dt = 1
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/newton_cooling/nc08.i)
# Newton cooling from a bar. 1-phase ideal fluid and heat, steady
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
ny = 1
xmin = 0
xmax = 100
ymin = 0
ymax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pressure temp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.8
alpha = 1e-5
[]
[]
[Variables]
[pressure]
[]
[temp]
[]
[]
[ICs]
# have to start these reasonably close to their steady-state values
[pressure]
type = FunctionIC
variable = pressure
function = '200-0.5*x'
[]
[temperature]
type = FunctionIC
variable = temp
function = 180+0.1*x
[]
[]
[Kernels]
[flux]
type = PorousFlowAdvectiveFlux
fluid_component = 0
gravity = '0 0 0'
variable = pressure
[]
[heat_advection]
type = PorousFlowHeatAdvection
gravity = '0 0 0'
variable = temp
[]
[]
[FluidProperties]
[idealgas]
type = IdealGasFluidProperties
molar_mass = 1.4
gamma = 1.2
mu = 1.2
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = pressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[dens0]
type = PorousFlowSingleComponentFluid
fp = idealgas
phase = 0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1.1 0 0 0 1.1 0 0 0 1.1'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey # irrelevant in this fully-saturated situation
n = 2
phase = 0
[]
[]
[BCs]
[leftp]
type = DirichletBC
variable = pressure
boundary = left
value = 200
[]
[leftt]
type = DirichletBC
variable = temp
boundary = left
value = 180
[]
[newtonp]
type = PorousFlowPiecewiseLinearSink
variable = pressure
boundary = right
pt_vals = '-200 0 200'
multipliers = '-200 0 200'
use_mobility = true
use_relperm = true
fluid_phase = 0
flux_function = 0.005 # 1/2/L
[]
[newtont]
type = PorousFlowPiecewiseLinearSink
variable = temp
boundary = right
pt_vals = '-200 0 200'
multipliers = '-200 0 200'
use_mobility = true
use_relperm = true
use_enthalpy = true
fluid_phase = 0
flux_function = 0.005 # 1/2/L
[]
[]
[VectorPostprocessors]
[porepressure]
type = LineValueSampler
variable = pressure
start_point = '0 0.5 0'
end_point = '100 0.5 0'
sort_by = x
num_points = 11
execute_on = timestep_end
[]
[temperature]
type = LineValueSampler
variable = temp
start_point = '0 0.5 0'
end_point = '100 0.5 0'
sort_by = x
num_points = 11
execute_on = timestep_end
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = Newton
nl_rel_tol = 1E-10
nl_abs_tol = 1E-15
[]
[Outputs]
file_base = nc08
execute_on = timestep_end
[along_line]
type = CSV
execute_vector_postprocessors_on = timestep_end
[]
[]
(modules/porous_flow/test/tests/flux_limited_TVD_advection/fltvd_1D_adaptivity.i)
# Using Flux-Limited TVD Advection ala Kuzmin and Turek, with antidiffusion from superbee flux limiting
# 1D version with mesh adaptivity
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 1
[]
[Adaptivity]
initial_steps = 1
initial_marker = tracer_marker
marker = tracer_marker
max_h_level = 1
[Markers]
[tracer_marker]
type = ValueRangeMarker
variable = tracer
lower_bound = 0.02
upper_bound = 0.98
[]
[]
[]
[Variables]
[tracer]
[]
[]
[ICs]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[]
[]
[Kernels]
[mass_dot]
type = MassLumpedTimeDerivative
variable = tracer
[]
[flux]
type = FluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = fluo
[]
[]
[UserObjects]
[fluo]
type = AdvectiveFluxCalculatorConstantVelocity
flux_limiter_type = superbee
u = tracer
velocity = '0.1 0 0'
[]
[]
[BCs]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_tracer]
# Ideally, an OutflowBC would be used, but that does not exist in the framework
# In 1D VacuumBC is the same as OutflowBC, with the alpha parameter being twice the velocity
type = VacuumBC
boundary = right
alpha = 0.2 # 2 * velocity
variable = tracer
[]
[]
[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'
[]
[]
[VectorPostprocessors]
[tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 11
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-2
nl_abs_tol = 1E-8
nl_max_its = 500
timestep_tolerance = 1E-3
[]
[Outputs]
print_linear_residuals = false
[out]
type = CSV
execute_on = final
[]
[]
(modules/porous_flow/test/tests/poroperm/poro_hm.i)
# Test that porosity is correctly calculated.
# Porosity = biot + (phi0 - biot) * exp(-vol_strain + (biot_prime - 1) / solid_bulk * (porepressure - ref_pressure))
# The parameters used are:
# biot = 0.7
# biot_prime = 0.75
# phi0 = 0.5
# vol_strain = 0.5
# solid_bulk = 0.3
# porepressure = 2
# ref_pressure = 3
# which yield porosity = 0.420877515
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
PorousFlowDictator = dictator
displacements = 'disp_x disp_y disp_z'
biot_coefficient = 0.7
[]
[Variables]
[porepressure]
initial_condition = 2
[]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[ICs]
[disp_x]
type = FunctionIC
function = '0.5 * x'
variable = disp_x
[]
[]
[Kernels]
[dummy_p]
type = TimeDerivative
variable = porepressure
[]
[dummy_x]
type = TimeDerivative
variable = disp_x
[]
[dummy_y]
type = TimeDerivative
variable = disp_y
[]
[dummy_z]
type = TimeDerivative
variable = disp_z
[]
[]
[AuxVariables]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[]
[]
[Postprocessors]
[porosity]
type = PointValue
variable = porosity
point = '0 0 0'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = 3
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[total_strain]
type = ComputeSmallStrain
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
ensure_positive = false
porosity_zero = 0.5
solid_bulk = 0.3
reference_porepressure = 3
biot_coefficient_prime = 0.75
[]
[]
[Executioner]
solve_type = Newton
type = Transient
num_steps = 1
[]
[Outputs]
csv = true
[]
(test/tests/functions/image_function/image_3d.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 20
ny = 20
nz = 20
[]
[Variables]
[u]
[]
[]
[Functions]
[image_func]
type = ImageFunction
file_base = stack/test
file_suffix = png
[]
[]
[ICs]
[u_ic]
type = FunctionIC
function = image_func
variable = u
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.1
[]
[Outputs]
exodus = true
[]
(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
[]
[]
(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
[]
(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
[]
(test/tests/kernels/ad_mat_diffusion/ad_1D_transient.i)
# This test solves a 1D transient heat equation
# The error is caclulated by comparing to the analytical solution
# The problem setup and analytical solution are taken from "Advanced Engineering
# Mathematics, 10th edition" by Erwin Kreyszig.
# http://www.amazon.com/Advanced-Engineering-Mathematics-Erwin-Kreyszig/dp/0470458364
# It is Example 1 in section 12.6 on page 561
[Mesh]
type = GeneratedMesh
dim = 1
nx = 160
xmax = 80
[]
[Variables]
[./T]
[../]
[]
[ICs]
[./T_IC]
type = FunctionIC
variable = T
function = '100*sin(pi*x/80)'
[../]
[]
[Kernels]
[./diff]
type = ADMatDiffusion
variable = T
diffusivity = diffusivity
[../]
[./dt]
type = CoefTimeDerivative
variable = T
Coefficient = 0.82064
[../]
[]
[BCs]
[./sides]
type = DirichletBC
variable = T
boundary = 'left right'
value = 0
[../]
[]
[Materials]
[./k]
type = ADGenericConstantMaterial
prop_names = 'diffusivity'
prop_values = '0.95'
[../]
[]
[Executioner]
type = Transient
dt = 1e-2
end_time = 1
[]
[Postprocessors]
[./error]
type = NodalL2Error
function = '100*sin(pi*x/80)*exp(-0.95/(0.092*8.92)*pi^2/80^2*t)'
variable = T
outputs = console
[../]
[]
[Outputs]
exodus = true
[]
(modules/geochemistry/test/tests/kernels/time_deriv_1.i)
# An initial concentration field in a material with constant porosity is subjected to a constant source
# porosity * d(concentration)/dt = source
# The result is checked vs the expected solution, which is conc = conc_old + dt * source / porosity
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 4
nz = 2
[]
[Variables]
[conc]
[]
[]
[Kernels]
[dot]
type = GeochemistryTimeDerivative
porosity = porosity
variable = conc
[]
[source]
type = BodyForce
function = 3.0
variable = conc
[]
[]
[ICs]
[conc]
type = FunctionIC
function = 'z * z + 4 * x * x * x + y'
variable = conc
[]
[]
[AuxVariables]
[porosity]
[]
[expected]
[]
[should_be_zero]
[]
[]
[AuxKernels]
[porosity]
type = FunctionAux
function = '6.0'
variable = porosity
[]
[expected]
type = FunctionAux
function = 'z * z + 4 * x * x * x + y + 2.0 * 3.0 / 6.0'
variable = expected
[]
[should_be_zero]
type = ParsedAux
coupled_variables = 'expected conc'
expression = 'expected - conc'
variable = should_be_zero
[]
[]
[Postprocessors]
[error]
type = NodalL2Norm
variable = should_be_zero
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 2
end_time = 2
[]
[Outputs]
csv = true
[]
(modules/chemical_reactions/test/tests/aqueous_equilibrium/2species.i)
# Simple equilibrium reaction example to illustrate the use of the AqueousEquilibriumReactions
# action.
# In this example, two primary species a and b are transported by diffusion and convection
# from the left of the porous medium, reacting to form two equilibrium species pa2 and pab
# according to the equilibrium reaction specified in the AqueousEquilibriumReactions block as:
#
# reactions = '2a = pa2 2
# a + b = pab -2'
#
# where the 2 is the weight of the equilibrium species, the 2 on the RHS of the first reaction
# refers to the equilibrium constant (log10(Keq) = 2), and the -2 on the RHS of the second
# reaction equates to log10(Keq) = -2.
#
# The AqueousEquilibriumReactions action creates all the required kernels and auxkernels
# to compute the reaction given by the above equilibrium reaction equation.
#
# Specifically, it adds to following:
# * An AuxVariable named 'pa2' (given in the reactions equations)
# * An AuxVariable named 'pab' (given in the reactions equations)
# * A AqueousEquilibriumRxnAux AuxKernel for each AuxVariable with all parameters
# * A CoupledBEEquilibriumSub Kernel for each primary species with all parameters
# * A CoupledDiffusionReactionSub Kernel for each primary species with all parameters
# * A CoupledConvectionReactionSub Kernel for each primary species with all parameters if
# pressure is a coupled variable
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[../]
[./b]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[../]
[]
[AuxVariables]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./pressure]
type = FunctionIC
variable = pressure
function = 2-x
[../]
[]
[ReactionNetwork]
[./AqueousEquilibriumReactions]
primary_species = 'a b'
reactions = '2a = pa2 2,
a + b = pab -2'
secondary_species = 'pa2 pab'
pressure = pressure
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[./a_conv]
type = PrimaryConvection
variable = a
p = pressure
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[./b_diff]
type = PrimaryDiffusion
variable = b
[../]
[./b_conv]
type = PrimaryConvection
variable = b
p = pressure
[../]
[]
[BCs]
[./a_left]
type = DirichletBC
variable = a
boundary = left
value = 1.0e-2
[../]
[./a_right]
type = ChemicalOutFlowBC
variable = a
boundary = right
[../]
[./b_left]
type = DirichletBC
variable = b
boundary = left
value = 1.0e-2
[../]
[./b_right]
type = ChemicalOutFlowBC
variable = b
boundary = right
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-12
start_time = 0.0
end_time = 100
dt = 10.0
[]
[Outputs]
file_base = 2species_out
exodus = true
perf_graph = true
print_linear_residuals = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(modules/porous_flow/test/tests/flux_limited_TVD_advection/fltvd_1D.i)
# Using Flux-Limited TVD Advection ala Kuzmin and Turek, with antidiffusion from superbee flux limiting
# 1D version
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0
xmax = 1
[]
[Variables]
[tracer]
[]
[]
[ICs]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[]
[]
[Kernels]
[mass_dot]
type = MassLumpedTimeDerivative
variable = tracer
[]
[flux]
type = FluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = fluo
[]
[]
[UserObjects]
[fluo]
type = AdvectiveFluxCalculatorConstantVelocity
flux_limiter_type = superbee
u = tracer
velocity = '0.1 0 0'
[]
[]
[BCs]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_tracer]
# Ideally, an OutflowBC would be used, but that does not exist in the framework
# In 1D VacuumBC is the same as OutflowBC, with the alpha parameter being twice the velocity
type = VacuumBC
boundary = right
alpha = 0.2 # 2 * velocity
variable = tracer
[]
[]
[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'
[]
[]
[VectorPostprocessors]
[tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 11
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-2
nl_abs_tol = 1E-8
nl_max_its = 500
timestep_tolerance = 1E-3
[]
[Outputs]
print_linear_residuals = false
[out]
type = CSV
execute_on = final
[]
[]
(test/tests/multiapps/grid-sequencing/vi-fine.i)
l = 10
nx = 80
num_steps = 2
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[bounds]
[]
[]
[Bounds]
[u_upper_bounds]
type = ConstantBounds
variable = bounds
bounded_variable = u
bound_type = upper
bound_value = ${l}
[]
[u_lower_bounds]
type = ConstantBounds
variable = bounds
bounded_variable = u
bound_type = lower
bound_value = 0
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'x'
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = 'if(x<5,-1,1)'
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = 0
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = ${l}
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
solve_type = NEWTON
dtmin = 1
petsc_options = '-snes_vi_monitor'
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_type -sub_pc_factor_levels -snes_linesearch_type -snes_type'
petsc_options_value = '0 30 asm 16 basic vinewtonrsls'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = 'nonlinear timestep_end'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
active = 'upper_violations lower_violations'
[upper_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = '${fparse 10+1e-8}'
comparator = 'greater'
[]
[lower_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-8
comparator = 'less'
[]
[nls]
type = NumNonlinearIterations
[]
[cum_nls]
type = CumulativeValuePostprocessor
postprocessor = nls
[]
[]
[MultiApps]
[coarse]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_begin
positions = '0 0 0'
input_files = vi-coarse.i
[]
[]
[Transfers]
[mesh_function_begin]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = coarse
source_variable = u
variable = u
execute_on = timestep_begin
[]
[]
(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
[]
(test/tests/postprocessors/displaced_mesh/elemental.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
displacements = 'ux uy'
[]
[AuxVariables]
[./ux]
[./InitialCondition]
type = FunctionIC
function = x
[../]
[../]
[./uy]
[./InitialCondition]
type = FunctionIC
function = y
[../]
[../]
[./c]
initial_condition = 1
[../]
[]
[Variables]
[./a]
[../]
[]
[Kernels]
[./a]
type = Diffusion
variable = a
[../]
[]
[Postprocessors]
[./without]
type = ElementIntegralVariablePostprocessor
variable = c
execute_on = initial
[../]
[./with]
type = ElementIntegralVariablePostprocessor
variable = c
use_displaced_mesh = true
execute_on = initial
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
[./out]
type = Exodus
[../]
[]
(modules/porous_flow/examples/multiapp_fracture_flow/diffusion_multiapp/fracture_app_heat.i)
# Heat energy from this fracture app is transferred to the matrix app
[Mesh]
[generate]
type = GeneratedMeshGenerator
dim = 1
nx = 100
xmin = 0
xmax = 50.0
[]
[]
[Variables]
[frac_T]
[]
[]
[ICs]
[frac_T]
type = FunctionIC
variable = frac_T
function = 'if(x<1E-6, 2, 0)' # delta function
[]
[]
[AuxVariables]
[transferred_matrix_T]
[]
[heat_to_matrix]
[]
[]
[Kernels]
[dot]
type = TimeDerivative
variable = frac_T
[]
[fracture_diffusion]
type = Diffusion
variable = frac_T
[]
[toMatrix]
type = PorousFlowHeatMassTransfer
variable = frac_T
v = transferred_matrix_T
transfer_coefficient = 0.004
[]
[]
[AuxKernels]
[heat_to_matrix]
type = ParsedAux
variable = heat_to_matrix
coupled_variables = 'frac_T transferred_matrix_T'
expression = '0.004 * (frac_T - transferred_matrix_T)'
[]
[]
[Preconditioning]
[entire_jacobian]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 100
end_time = 100
[]
[VectorPostprocessors]
[final_results]
type = LineValueSampler
start_point = '0 0 0'
end_point = '50 0 0'
num_points = 11
sort_by = x
variable = frac_T
outputs = final_csv
[]
[]
[Outputs]
print_linear_residuals = false
[final_csv]
type = CSV
sync_times = 100
sync_only = true
[]
[]
[MultiApps]
[matrix_app]
type = TransientMultiApp
input_files = matrix_app_heat.i
execute_on = TIMESTEP_END
[]
[]
[Transfers]
[heat_to_matrix]
type = MultiAppCopyTransfer
to_multi_app = matrix_app
source_variable = heat_to_matrix
variable = heat_from_frac
[]
[T_from_matrix]
type = MultiAppCopyTransfer
from_multi_app = matrix_app
source_variable = matrix_T
variable = transferred_matrix_T
[]
[]
(test/tests/multiapps/grid-sequencing/vi-coarse.i)
l = 10
nx = 40
num_steps = 2
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[bounds]
[]
[]
[Bounds]
[u_upper_bound]
type = ConstantBounds
variable = bounds
bounded_variable = u
bound_type = upper
bound_value = ${l}
[]
[u_lower_bound]
type = ConstantBounds
variable = bounds
bounded_variable = u
bound_type = lower
bound_value = 0
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'x'
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = 'if(x<5,-1,1)'
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = 0
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = ${l}
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
solve_type = NEWTON
dtmin = 1
petsc_options = '-snes_vi_monitor'
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_type -sub_pc_factor_levels -snes_linesearch_type -snes_type'
petsc_options_value = '0 30 asm 16 basic vinewtonrsls'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = 'nonlinear timestep_end'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
active = 'upper_violations lower_violations'
[upper_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = '${fparse 10+1e-8}'
comparator = 'greater'
[]
[lower_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-8
comparator = 'less'
[]
[nls]
type = NumNonlinearIterations
[]
[cum_nls]
type = CumulativeValuePostprocessor
postprocessor = nls
[]
[]
[MultiApps]
[coarser]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_begin
positions = '0 0 0'
input_files = vi-coarser.i
[]
[]
[Transfers]
[mesh_function_begin]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = coarser
source_variable = u
variable = u
execute_on = timestep_begin
[]
[]
(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
[]
(test/tests/transfers/coord_transform/both-transformed/nearest-node/main-app.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = -1
ymax = 0
nx = 10
ny = 10
alpha_rotation = 90
[]
[Variables]
[u][]
[]
[AuxVariables]
[v][]
[v_elem]
order = CONSTANT
family = MONOMIAL
[]
[w][]
[w_elem]
order = CONSTANT
family = MONOMIAL
[]
[]
[ICs]
[w]
type = FunctionIC
function = 'cos(x)*sin(y)'
variable = w
[]
[w_elem]
type = FunctionIC
function = 'cos(x)*sin(y)'
variable = w_elem
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
verbose = true
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = 'sub-app.i'
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[from_sub]
type = MultiAppNearestNodeTransfer
from_multi_app = sub
source_variable = v
variable = v
execute_on = 'timestep_begin'
[]
[from_sub_elem]
type = MultiAppNearestNodeTransfer
from_multi_app = sub
source_variable = v_elem
variable = v_elem
execute_on = 'timestep_begin'
[]
[to_sub]
type = MultiAppNearestNodeTransfer
to_multi_app = sub
source_variable = w
variable = w
execute_on = 'timestep_begin'
[]
[to_sub_elem]
type = MultiAppNearestNodeTransfer
to_multi_app = sub
source_variable = w_elem
variable = w_elem
execute_on = 'timestep_begin'
[]
[]
(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
[]
(test/tests/nodalkernels/constraint_enforcement/ad-upper-and-lower-bound.i)
l=10
nx=100
num_steps=10
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
[]
[Variables]
[u]
[]
[lm_upper]
[]
[lm_lower]
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'x'
[]
[]
[Kernels]
[time]
type = ADTimeDerivative
variable = u
[]
[diff]
type = ADDiffusion
variable = u
[]
[ffn]
type = ADBodyForce
variable = u
function = 'if(x<5,-1,1)'
[]
[]
[NodalKernels]
[upper_bound]
type = ADUpperBoundNodalKernel
variable = lm_upper
v = u
exclude_boundaries = 'left right'
upper_bound = 10
[]
[forces_from_upper]
type = ADCoupledForceNodalKernel
variable = u
v = lm_upper
coef = -1
[]
[lower_bound]
type = ADLowerBoundNodalKernel
variable = lm_lower
v = u
exclude_boundaries = 'left right'
lower_bound = 0
[]
[forces_from_lower]
type = ADCoupledForceNodalKernel
variable = u
v = lm_lower
coef = 1
[]
[]
[BCs]
[left]
type = ADDirichletBC
boundary = left
value = 0
variable = u
[]
[right]
type = ADDirichletBC
boundary = right
value = ${l}
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
solve_type = NEWTON
dtmin = 1
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_type -sub_pc_factor_levels -snes_linesearch_type'
petsc_options_value = '0 30 asm 16 basic'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = 'nonlinear timestep_end'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[active_upper_lm]
type = GreaterThanLessThanPostprocessor
variable = lm_upper
execute_on = 'nonlinear timestep_end'
value = 1e-8
comparator = 'greater'
[]
[upper_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = ${fparse 10+1e-8}
comparator = 'greater'
[]
[active_lower_lm]
type = GreaterThanLessThanPostprocessor
variable = lm_lower
execute_on = 'nonlinear timestep_end'
value = 1e-8
comparator = 'greater'
[]
[lower_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-8
comparator = 'less'
[]
[nls]
type = NumNonlinearIterations
[]
[cum_nls]
type = CumulativeValuePostprocessor
postprocessor = nls
[]
[]
(modules/chemical_reactions/test/tests/aqueous_equilibrium/1species_without_action.i)
# Simple equilibrium reaction example.
# This simulation is identical to 1species.i, but explicitly includes the AuxVariables,
# AuxKernels, and Kernels that the action in 1species.i adds
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1e-2
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
variable = a
[../]
[../]
[]
[AuxVariables]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[./pa2]
[../]
[]
[AuxKernels]
[./pa2eq]
type = AqueousEquilibriumRxnAux
variable = pa2
v = a
sto_v = 2
log_k = 1
[../]
[]
[ICs]
[./pressure]
type = FunctionIC
variable = pressure
function = 2-x
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[./a_conv]
type = PrimaryConvection
variable = a
p = pressure
[../]
[./aeq]
type = CoupledBEEquilibriumSub
variable = a
log_k = 1
weight = 2
sto_u = 2
[../]
[./adiff]
type = CoupledDiffusionReactionSub
variable = a
log_k = 1
weight = 2
sto_u = 2
[../]
[./aconv]
type = CoupledConvectionReactionSub
variable = a
log_k = 1
weight = 2
sto_u = 2
p = pressure
[../]
[]
[BCs]
[./a_right]
type = ChemicalOutFlowBC
variable = a
boundary = right
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-12
start_time = 0.0
end_time = 100
dt = 10.0
[]
[Outputs]
file_base = 1species_out
exodus = true
perf_graph = true
print_linear_residuals = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(modules/phase_field/test/tests/KKS_system/nonlinear.i)
#
# This test checks if the thwo phase and lagrange multiplier solutions can be replicated
# with a two order parameter approach, where the second order parameter eta2 is a
# nonlinear variable that is set as eta2 := 1 - eta1 (using Reaction, CoupledForce, and BodyForce)
# The solution is reproduced.
#
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmax = 5
[]
[AuxVariables]
[Fglobal]
order = CONSTANT
family = MONOMIAL
[]
[]
[Variables]
# concentration
[c]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = x/5
[]
[]
# order parameter 1
[eta1]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
# order parameter 2
[eta2]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
# phase concentration 1
[c1]
order = FIRST
family = LAGRANGE
initial_condition = 0.9
[]
# phase concentration 2
[c2]
order = FIRST
family = LAGRANGE
initial_condition = 0.1
[]
[]
[Materials]
# simple toy free energies
[f1] # = fd
type = DerivativeParsedMaterial
property_name = F1
coupled_variables = 'c1'
expression = '(0.9-c1)^2'
[]
[f2] # = fm
type = DerivativeParsedMaterial
property_name = F2
coupled_variables = 'c2'
expression = '(0.1-c2)^2'
[]
# Switching functions for each phase
[h1_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta1
function_name = h1
[]
[h2_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta2
function_name = h2
[]
# Coefficients for diffusion equation
[Dh1]
type = DerivativeParsedMaterial
material_property_names = 'D h1(eta1)'
expression = D*h1
property_name = Dh1
coupled_variables = eta1
[]
[Dh2]
type = DerivativeParsedMaterial
material_property_names = 'D h2(eta2)'
expression = D*h2
property_name = Dh2
coupled_variables = eta2
[]
# 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
[]
# constant properties
[constants]
type = GenericConstantMaterial
prop_names = 'D L kappa'
prop_values = '0.7 0.7 0.2'
[]
[]
[Kernels]
#Kernels for diffusion equation
[diff_time]
type = TimeDerivative
variable = c
[]
[diff_c1]
type = MatDiffusion
variable = c
diffusivity = Dh1
v = c1
args = 'eta1'
[]
[diff_c2]
type = MatDiffusion
variable = c
diffusivity = Dh2
v = c2
args = 'eta2'
[]
# Kernels for Allen-Cahn equation for eta1
[deta1dt]
type = TimeDerivative
variable = eta1
[]
[ACBulkF1]
type = KKSMultiACBulkF
variable = eta1
Fj_names = 'F1 F2 '
hj_names = 'h1 h2 '
gi_name = g1
eta_i = eta1
wi = 0.2
coupled_variables = 'c1 c2 eta2'
[]
[ACBulkC1]
type = KKSMultiACBulkC
variable = eta1
Fj_names = 'F1 F2'
hj_names = 'h1 h2'
cj_names = 'c1 c2'
eta_i = eta1
coupled_variables = 'eta2'
[]
[ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa
[]
# Phase concentration constraints
[chempot12]
type = KKSPhaseChemicalPotential
variable = c1
cb = c2
fa_name = F1
fb_name = F2
[]
[phaseconcentration]
type = KKSMultiPhaseConcentration
variable = c2
cj = 'c1 c2'
hj_names = 'h1 h2'
etas = 'eta1 eta2'
c = c
[]
# equation for eta2 = 1 - eta1
# 0 = eta2 + eta1 -1
[constraint_eta1] # eta2
type = Reaction
variable = eta2
[]
[constraint_eta2] # + eta1
type = CoupledForce
variable = eta2
coef = -1
v = eta1
[]
[constraint_one] # - 1
type = BodyForce
variable = eta2
[]
[]
[AuxKernels]
[Fglobal_total]
type = KKSMultiFreeEnergy
Fj_names = 'F1 F2 '
hj_names = 'h1 h2 '
gj_names = 'g1 g2 '
variable = Fglobal
w = 0.2
interfacial_vars = 'eta1 eta2 '
kappa_names = 'kappa kappa'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'lu 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
end_time = 350
dt = 10
[]
[VectorPostprocessors]
[c]
type = LineValueSampler
variable = c
start_point = '0 0 0'
end_point = '5 0 0'
num_points = 21
sort_by = x
[]
[]
[Outputs]
csv = true
execute_on = FINAL
[]
(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/chemical_reactions/test/tests/thermochimica/FeTiVO.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
[]
[]
[GlobalParams]
elements = 'O Ti V Fe'
output_phases = 'gas_ideal SlagBsoln Hemasoln'
output_species = 'gas_ideal:O2 SlagBsoln:Fe2O3'
output_element_potentials = 'mu:O mu:Ti mu:Fe'
output_vapor_pressures = 'vp:gas_ideal:O2'
[]
[ChemicalComposition]
[thermo]
thermofile = FeTiVO.dat
tunit = K
punit = atm
munit = moles
temperature = T
uo_name = Thermochimica
output_species_unit = mole_fraction
reinitialization_type = none
[]
[]
[Variables]
[T]
type = MooseVariable
initial_condition = 2000
[]
[]
[ICs]
[O]
type = FunctionIC
variable = O
function = '2.0*(1-x)+1.6*x'
[]
[Ti]
type = FunctionIC
variable = Ti
function = '0.5*(1-x)+0.55*x'
[]
[V]
type = FunctionIC
variable = V
function = '0.5*(1-x)+0.75*x'
[]
[Fe]
type = FunctionIC
variable = Fe
function = '0.5*(1-x)+0.25*x'
[]
[]
[Problem]
solve = false
[]
[VectorPostprocessors]
[Fe2O3]
type = NodalValueSampler
variable = SlagBsoln:Fe2O3
sort_by = x
[]
[]
[Executioner]
type = Steady
[]
(modules/phase_field/test/tests/misc/interface_grad.i)
#
# Test a gradient continuity interfacekernel
#
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
ymax = 0.5
[]
[./box1]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '0.51 1 0'
input = gen
[../]
[./box2]
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '0.49 0 0'
top_right = '1 1 0'
input = box1
[../]
[./iface_u]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = 10
input = box2
[../]
[./iface_v]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 2
paired_block = 1
new_boundary = 11
input = iface_u
[../]
[]
[Variables]
[./u]
block = 1
[./InitialCondition]
type = FunctionIC
function = 'r:=sqrt((x-0.4)^2+(y-0.5)^2);if(r<0.05,5,1)'
[../]
[../]
[./v]
block = 2
initial_condition = 0.8
[../]
[]
[Kernels]
[./u_diff]
type = Diffusion
variable = u
block = 1
[../]
[./u_dt]
type = TimeDerivative
variable = u
block = 1
[../]
[./v_diff]
type = Diffusion
variable = v
block = 2
[../]
[./v_dt]
type = TimeDerivative
variable = v
block = 2
[../]
[]
[InterfaceKernels]
[./iface]
type = InterfaceDiffusionFluxMatch
variable = u
boundary = 10
neighbor_var = v
[../]
[]
[BCs]
[./u_boundary_term]
type = DiffusionFluxBC
variable = u
boundary = 10
[../]
[./v_boundary_term]
type = DiffusionFluxBC
variable = v
boundary = 11
[../]
[]
[Executioner]
type = Transient
dt = 0.002
num_steps = 10
[]
[Outputs]
exodus = true
print_linear_residuals = false
[]
(modules/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/functions/image_function/error/threshold_values.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Variables]
[u]
[]
[]
[Functions]
[tif]
type = ImageFunction
file_base = ../stack/test
file_suffix = png
file_range = '0' # file_range is a vector input, a single entry means "read only 1 file"
threshold = 30000
upper_value = 1
[]
[]
[ICs]
[u_ic]
type = FunctionIC
function = tif
variable = u
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.1
[]
(modules/combined/test/tests/DiffuseCreep/stress.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 50
ny = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 2
[]
[Variables]
[./c]
[./InitialCondition]
type = FunctionIC
function = 'x0:=5.0;thk:=0.5;m:=2;r:=abs(x-x0);v:=exp(-(r/thk)^m);0.1+0.1*v'
[../]
[../]
[./mu]
[../]
[./jx]
[../]
[./jy]
[../]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[AuxVariables]
[./gb]
family = LAGRANGE
order = FIRST
[../]
[./creep_strain_xx]
family = MONOMIAL
order = CONSTANT
[../]
[./creep_strain_yy]
family = MONOMIAL
order = CONSTANT
[../]
[./creep_strain_xy]
family = MONOMIAL
order = CONSTANT
[../]
[./stress_xx]
family = MONOMIAL
order = CONSTANT
[../]
[./stress_yy]
family = MONOMIAL
order = CONSTANT
[../]
[./stress_xy]
family = MONOMIAL
order = CONSTANT
[../]
[]
[Kernels]
[./conc]
type = CHSplitConcentration
variable = c
mobility = mobility_prop
chemical_potential_var = mu
[../]
[./chempot]
type = CHSplitChemicalPotential
variable = mu
chemical_potential_prop = mu_prop
c = c
[../]
[./flux_x]
type = CHSplitFlux
variable = jx
component = 0
mobility_name = mobility_prop
mu = mu
c = c
[../]
[./flux_y]
type = CHSplitFlux
variable = jy
component = 1
mobility_name = mobility_prop
mu = mu
c = c
[../]
[./time]
type = TimeDerivative
variable = c
[../]
[./TensorMechanics]
displacements = 'disp_x disp_y'
[../]
[]
[AuxKernels]
[./gb]
type = FunctionAux
variable = gb
function = 'x0:=5.0;thk:=0.5;m:=2;r:=abs(x-x0);v:=exp(-(r/thk)^m);v'
[../]
[./creep_strain_xx]
type = RankTwoAux
variable = creep_strain_xx
rank_two_tensor = creep_strain
index_i = 0
index_j = 0
[../]
[./creep_strain_yy]
type = RankTwoAux
variable = creep_strain_yy
rank_two_tensor = creep_strain
index_i = 1
index_j = 1
[../]
[./creep_strain_xy]
type = RankTwoAux
variable = creep_strain_xy
rank_two_tensor = creep_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_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = stress
index_i = 1
index_j = 1
[../]
[./stress_xy]
type = RankTwoAux
variable = stress_xy
rank_two_tensor = stress
index_i = 0
index_j = 1
[../]
[]
[Materials]
[./chemical_potential]
type = DerivativeParsedMaterial
block = 0
property_name = mu_prop
coupled_variables = c
expression = 'c'
derivative_order = 1
[../]
[./var_dependence]
type = DerivativeParsedMaterial
block = 0
expression = 'c*(1.0-c)'
coupled_variables = c
property_name = var_dep
derivative_order = 1
[../]
[./mobility]
type = CompositeMobilityTensor
block = 0
M_name = mobility_prop
tensors = diffusivity
weights = var_dep
args = c
[../]
[./phase_normal]
type = PhaseNormalTensor
phase = gb
normal_tensor_name = gb_normal
[../]
[./aniso_tensor]
type = GBDependentAnisotropicTensor
gb = gb
bulk_parameter = 0.1
gb_parameter = 1
gb_normal_tensor_name = gb_normal
gb_tensor_prop_name = aniso_tensor
[../]
[./diffusivity]
type = GBDependentDiffusivity
gb = gb
bulk_parameter = 0.1
gb_parameter = 1
gb_normal_tensor_name = gb_normal
gb_tensor_prop_name = diffusivity
[../]
[./diffuse_strain_increment]
type = FluxBasedStrainIncrement
xflux = jx
yflux = jy
gb = gb
property_name = diffuse
[../]
[./diffuse_creep_strain]
type = SumTensorIncrements
tensor_name = creep_strain
coupled_tensor_increment_names = diffuse
[../]
[./strain]
type = ComputeIncrementalSmallStrain
displacements = 'disp_x disp_y'
[../]
[./stress]
type = ComputeStrainIncrementBasedStress
inelastic_strain_names = creep_strain
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '120.0 80.0'
fill_method = symmetric_isotropic
[../]
[]
[BCs]
[./Periodic]
[./cbc]
auto_direction = 'x y'
variable = c
[../]
[../]
[./fix_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./fix_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -ksp_grmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
nl_rel_tol = 1e-10
nl_max_its = 5
l_tol = 1e-4
l_max_its = 20
dt = 1
num_steps = 5
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/file_mesh_generator/2d_discontinuous_iga.i)
[Mesh]
[cyl2d_iga]
type = FileMeshGenerator
file = PressurizedCyl_Patch6_4Elem.e
discontinuous_spline_extraction = true
[]
[]
[Variables]
[u]
order = SECOND # Must match mesh order
family = RATIONAL_BERNSTEIN
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
block = 0 # Avoid direct calculations on spline nodes
[]
[diff]
type = Diffusion
variable = u
block = 0 # Avoid direct calculations on spline nodes
[]
[null]
type = NullKernel
variable = u
block = 1 # Keep kernel coverage check happy
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'sin(x)'
[]
[]
[Executioner]
type = Transient
num_steps = 2
solve_type = NEWTON
dtmin = 1
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/general_field/nearest_node/boundary/main.i)
# Base input for testing transfers. It has the following complexities:
# - more than one subapp
# - transfers both from and to the subapps
# - both nodal and elemental variables
# - subapp meshes are not aligned with the main app
# Tests derived from this input may add complexities through command line arguments
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 5
ny = 5
nz = 5
[]
[add_block]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x < 0.5 & y < 0.5'
block_id = 1
[]
[add_internal_sideset]
type = SideSetsBetweenSubdomainsGenerator
input = add_block
primary_block = 0
paired_block = 1
new_boundary = internal
[]
[]
[AuxVariables]
[from_sub]
initial_condition = -1
[]
[from_sub_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_sub]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[to_sub_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
verbose_multiapps = true
[]
[Outputs]
[out]
type = Exodus
hide = 'to_sub to_sub_elem'
overwrite = true
[]
[]
[MultiApps]
[sub]
# 1 on corner, one in the center and one close to a corner
# The subapp mesh is a 0.3-sized cube, no overlap
positions = '0.2222 0.00002 0.0001 0.61111 0.311111 0.31211 0.76666 0.111114 0.81111'
type = TransientMultiApp
app_type = MooseTestApp
input_files = sub.i
execute_on = timestep_end
# Facilitates debugging
output_in_position = true
[]
[]
[Transfers]
# Boundary restrictions are added in the tests specification
[to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = to_sub
variable = from_main
[]
[to_sub_elem]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = to_sub_elem
variable = from_main_elem
[]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = to_main
variable = from_sub
[]
[from_sub_elem]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = to_main_elem
variable = from_sub_elem
[]
[]
(modules/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/functions/image_function/crop.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
uniform_refine = 2
xmin = 0.5
ymin = 0.5
[]
[Variables]
[u]
[]
[]
[Functions]
[image_func]
type = ImageFunction
file_base = stack/test
file_range = '0' # file_range is a vector input, a single entry means "read only 1 file"
file_suffix = png
origin = '0 0 0'
dimensions = '1 1 0'
[]
[]
[ICs]
[u_ic]
type = FunctionIC
function = image_func
variable = u
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.1
[]
[Outputs]
exodus = true
[]
(test/tests/functions/image_function/flip.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Variables]
[u]
[]
[]
[Functions]
[image_func]
type = ImageFunction
file_base = stack/test
file_suffix = png
file_range = '0' # file_range is a vector input, a single entry means "read only 1 file"
flip_x = true
[]
[]
[ICs]
[u_ic]
type = FunctionIC
function = image_func
variable = u
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.1
[]
[Outputs]
exodus = true
[]
(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/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/chemical_reactions/test/tests/thermochimica/MoRu.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 1
[]
[]
[GlobalParams]
elements = 'Mo Ru'
output_phases = 'BCCN HCPN'
output_species = 'BCCN:Mo HCPN:Mo BCCN:Ru HCPN:Ru'
output_element_potentials = 'mu:Mo mu:Ru'
output_vapor_pressures = 'vp:gas_ideal:Mo'
output_element_phases = 'ep:BCCN:Mo'
[]
[ChemicalComposition]
[thermo]
thermofile = Kaye_NobleMetals.dat
tunit = K
punit = atm
munit = moles
temperature = 2250
output_species_unit = mole_fraction
[]
[]
[ICs]
[Mo]
type = FunctionIC
variable = Mo
function = '0.8*(1-x)+4.3*x'
[]
[Ru]
type = FunctionIC
variable = Ru
function = '0.2*(1-x)+4.5*x'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/quadrature_point_multiapp/sub_app.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 3
ymax = 0.1
xmax = 0.1
[]
[AuxVariables]
[x]
[]
[y]
[]
[]
[ICs]
[x]
type = FunctionIC
function = x
variable = x
[]
[y]
type = FunctionIC
function = y
variable = y
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[incoming_x]
type = Receiver
execute_on = 'TIMESTEP_BEGIN'
[]
[incoming_y]
type = Receiver
execute_on = 'TIMESTEP_BEGIN'
[]
[]
(test/tests/materials/functor_properties/1d_dirichlet.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmax = 2
[]
[Variables]
[v]
type = MooseVariableFVReal
[]
[]
[AuxVariables]
[sink]
type = MooseVariableFVReal
[]
[]
[ICs]
[sink]
type = FunctionIC
variable = sink
function = 'x^3'
[]
[]
[FVKernels]
[diff]
type = FVDiffusion
variable = v
coeff = 1
[]
[sink]
type = FVFunctorElementalKernel
variable = v
functor_name = 'sink_mat'
[]
[]
[FVBCs]
[bounds]
type = FVDirichletBC
variable = v
boundary = 'left right'
value = 0
[]
[]
[Materials]
active = 'functor'
[functor]
type = ADGenericFunctorMaterial
prop_names = sink_mat
prop_values = sink
[]
[overlapping_functor]
type = ADGenericFunctorMaterial
prop_names = 'sink_mat'
prop_values = v
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
exodus = 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/phase_field/test/tests/phase_field_kernels/SplitCHWRes.i)
#
# Test the split parsed function free enery Cahn-Hilliard Bulk kernel
# with two concentration variables and coupling through off-diagonal Onsager
# matrix coefficients
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = 0
xmax = 60
ymin = 0
ymax = 60
elem_type = QUAD4
[]
[Variables]
[./c1]
[./InitialCondition]
type = FunctionIC
function = 'cos(x/60*pi)'
[../]
[../]
[./c2]
[./InitialCondition]
type = FunctionIC
function = 'cos(y/60*pi)'
[../]
[../]
[./w1]
[../]
[./w2]
[../]
[]
[Kernels]
[./c1_res]
type = SplitCHParsed
variable = c1
f_name = F
kappa_name = kappa_c
w = w1
[../]
[./w11_res]
type = SplitCHWRes
variable = w1
mob_name = M11
[../]
[./w12_res]
type = SplitCHWRes
variable = w1
w = w2
mob_name = M12
[../]
[./c2_res]
type = SplitCHParsed
variable = c2
f_name = F
kappa_name = kappa_c
w = w2
[../]
[./w22_res]
type = SplitCHWRes
variable = w2
mob_name = M22
[../]
[./w21_res]
type = SplitCHWRes
variable = w2
w = w1
mob_name = M21
[../]
[./time1]
type = CoupledTimeDerivative
variable = w1
v = c1
[../]
[./time2]
type = CoupledTimeDerivative
variable = w2
v = c2
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M11 M12 M21 M22 kappa_c'
prop_values = '10 2.5 20 5 40'
[../]
[./free_energy]
# equivalent to `MathFreeEnergy`
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'c1 c2'
expression = '0.25*(1+c1)^2*(1-c1)^2 + 0.25*(1+c2)^2*(1-c2)^2'
derivative_order = 2
[../]
[]
[Preconditioning]
# active = ' '
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'NEWTON'
petsc_options_iname = -pc_type
petsc_options_value = lu
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 2
dt = 10
[]
[Outputs]
exodus = true
[]
(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/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/numerical_diffusion/pffltvd.i)
# Using flux-limited TVD advection ala Kuzmin and Turek, employing PorousFlow Kernels and UserObjects, with superbee flux-limiter
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = 0
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[porepressure]
[]
[tracer]
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x'
[]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = tracer
[]
[flux0]
type = PorousFlowFluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = advective_flux_calculator_0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[]
[flux1]
type = PorousFlowFluxLimitedTVDAdvection
variable = porepressure
advective_flux_calculator = advective_flux_calculator_1
[]
[]
[BCs]
[constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1
boundary = left
[]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[]
[remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure tracer'
number_fluid_phases = 1
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[advective_flux_calculator_0]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 0
[]
[advective_flux_calculator_1]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = tracer
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[]
[]
[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'
[]
[]
[VectorPostprocessors]
[tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 101
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-2
nl_abs_tol = 1E-8
timestep_tolerance = 1E-3
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(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
[]
(modules/level_set/examples/rotating_circle/circle_rotate_supg.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 32
ny = 32
uniform_refine = 2
[]
[AuxVariables]
[./velocity]
family = LAGRANGE_VEC
[../]
[]
[Variables]
[./phi]
[../]
[]
[Functions]
[./phi_exact]
type = LevelSetOlssonBubble
epsilon = 0.03
center = '0 0.5 0'
radius = 0.15
[../]
[./velocity_func]
type = ParsedVectorFunction
expression_x = '4*y'
expression_y = '-4*x'
[../]
[]
[ICs]
[./phi_ic]
type = FunctionIC
function = phi_exact
variable = phi
[../]
[./vel_ic]
type = VectorFunctionIC
variable = velocity
function = velocity_func
[]
[]
[Kernels]
[./time]
type = TimeDerivative
variable = phi
[../]
[./advection]
type = LevelSetAdvection
velocity = velocity
variable = phi
[../]
[./advection_supg]
type = LevelSetAdvectionSUPG
velocity = velocity
variable = phi
[../]
[./time_supg]
type = LevelSetTimeDerivativeSUPG
velocity = velocity
variable = phi
[../]
[]
[Postprocessors]
[./area]
type = LevelSetVolume
threshold = 0.5
variable = phi
location = outside
execute_on = 'initial timestep_end'
[../]
[./cfl]
type = LevelSetCFLCondition
velocity = velocity
execute_on = 'initial'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
start_time = 0
end_time = 1.570796
scheme = crank-nicolson
petsc_options_iname = '-pc_type -pc_sub_type'
petsc_options_value = 'asm ilu'
[./TimeStepper]
type = PostprocessorDT
postprocessor = cfl
scale = 0.8
[../]
[]
[Outputs]
csv = true
exodus = true
[]
(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
[]
[]
(modules/porous_flow/test/tests/mass_conservation/mass01.i)
# checking that the mass postprocessor correctly calculates the mass
# 1phase, 1component, constant porosity
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
xmin = -1
xmax = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[]
[ICs]
[pinit]
type = FunctionIC
function = x
variable = pp
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 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
[]
[]
[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 = 1
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = mass01
csv = 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/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
[]
(test/tests/kernels/conservative_advection/none_in_none_out.i)
# Using ConservativeAdvection with full upwinding
# This demonstrates BCs (no BCs) that allow no mass to
# enter or exit the domain.
# Total mass remains constant and the pulse advects
# with the correct velocity
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 10
nx = 10
[]
[Variables]
[./u]
[../]
[]
[ICs]
[./u]
type = FunctionIC
variable = u
function = 'if(x<5,x,10-x)'
[../]
[]
[Kernels]
[./dot]
type = MassLumpedTimeDerivative
variable = u
[../]
[./advection]
type = ConservativeAdvection
variable = u
upwinding_type = full
velocity = '1 0 0'
[../]
[]
[Postprocessors]
[./total_mass]
type = VariableInnerProduct
variable = u
second_variable = 1
[../]
[]
[Executioner]
type = Transient
solve_type = Linear
dt = 1
end_time = 10
l_tol = 1E-14
[]
[Outputs]
csv = true
[]
(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
[]
(test/tests/transfers/multiapp_copy_transfer/vector-variable-transfer/sub_L2_LagrangeVec.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 5
ny = 5
nz = 5
[]
[AuxVariables]
[received_vector]
family = LAGRANGE_VEC
order = FIRST
[]
[expected_vector_x]
family = LAGRANGE
order = FIRST
[]
[expected_vector_y]
family = LAGRANGE
order = FIRST
[]
[expected_vector_z]
family = LAGRANGE
order = FIRST
[]
[received_vector_x]
family = LAGRANGE
order = FIRST
[]
[received_vector_y]
family = LAGRANGE
order = FIRST
[]
[received_vector_z]
family = LAGRANGE
order = FIRST
[]
[]
[ICs]
# Set the expected components. If everything works, the received vector components should match.
[set_expected_vector_x]
type = FunctionIC
variable = expected_vector_x
function = "100*x*x"
[]
[set_expected_vector_y]
type = FunctionIC
variable = expected_vector_y
function = "100*y*y"
[]
[set_expected_vector_z]
type = FunctionIC
variable = expected_vector_z
function = "100*z*z"
[]
[]
[AuxKernels]
# Set the components from the received vector.
[set_received_vector_x]
type = VectorVariableComponentAux
vector_variable = received_vector
variable = received_vector_x
component = 'x'
execute_on = timestep_begin
[]
[set_received_vector_y]
type = VectorVariableComponentAux
vector_variable = received_vector
variable = received_vector_y
component = 'y'
execute_on = timestep_begin
[]
[set_received_vector_z]
type = VectorVariableComponentAux
vector_variable = received_vector
variable = received_vector_z
component = 'z'
execute_on = timestep_begin
[]
[]
[Postprocessors]
[ensure_something_happened]
type = ElementAverageValue
variable = received_vector_x
[]
# Compare the received vector against the expected components.
[l2_difference_x]
type = ElementL2Difference
variable = received_vector_x
other_variable = expected_vector_x
[]
[l2_difference_y]
type = ElementL2Difference
variable = received_vector_y
other_variable = expected_vector_y
[]
[l2_difference_z]
type = ElementL2Difference
variable = received_vector_z
other_variable = expected_vector_z
[]
[]
[Executioner]
type = Transient
dt = 1.0
start_time = 0.0
end_time = 1.0
[]
[Outputs]
csv = true
[]
[Problem]
solve = false
[]
(test/tests/kernels/conservative_advection/none_in_all_out.i)
# Using ConservativeAdvection with full upwinding
# This demonstrates BCs that introduce no mass into
# the domain but allow it to exit freely.
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 10
nx = 100
[]
[Variables]
[./u]
[../]
[]
[ICs]
[./u]
type = FunctionIC
variable = u
function = 'if(x<5,x,10-x)'
[../]
[]
[Kernels]
[./dot]
type = MassLumpedTimeDerivative
variable = u
[../]
[./advection]
type = ConservativeAdvection
variable = u
upwinding_type = full
velocity = '1 0 0'
[../]
[]
[BCs]
[./allow_mass_out]
type = OutflowBC
boundary = right
variable = u
velocity = '1 0 0'
[../]
[]
[Executioner]
type = Transient
solve_type = Linear
dt = 1
end_time = 10
l_tol = 1E-14
[]
[Outputs]
exodus = true
[]
(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
[]
(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/ray_tracing/test/tests/userobjects/ray_tracing_study/kernel_change_ray/kernel_change_ray.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmax = 5
ymax = 5
[]
[]
[Variables/phase]
[InitialCondition]
type = FunctionIC
variable = field
function = '(x > 2.99) * 1.0'
[]
[]
[RayBCs/kill]
type = KillRayBC
boundary = 'top right bottom left'
[]
[RayKernels/test]
type = RefractionRayKernelTest
field = phase
[]
[UserObjects/lots]
type = LotsOfRaysRayStudy
vertex_to_vertex = true
centroid_to_vertex = true
centroid_to_centroid = false
execute_on = initial
[]
[Postprocessors/total_distance]
type = RayTracingStudyResult
study = lots
result = total_distance
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
exodus = false
csv = 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
[]
(test/tests/transfers/general_field/nearest_node/mesh_division/main_match_division.i)
# Base input for testing transfers with mesh divisions restrictions with a mapping from
# source mesh divisions to target mesh divisions. It has the following complexities:
# - multiple sub-applications
# - transfers both from and to the subapps
# - both nodal and elemental variables
# Tests derived from this input may add complexities through command line arguments
# Explaining results on the main app:
# Each value on the main app comes from a region with the same division index on a subapp
# Because the subapp is not very discretized in Y, some source mesh division indices
# are not represented in the subapps. Therefore these mesh divisions are not present in the
# main app.
# Explaining results on the sub apps:
# Each subapp receives results for all its target mesh divisions. They are naturally all the
# same because they are all matched with the same source app (parent app) source division
# and the division on the parent app is too small to have more than 1 valid point + value
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[MeshDivisions]
[middle]
type = CartesianGridDivision
bottom_left = '0.21 0.21 0'
# cover more and sample more bins
top_right = '1.001 1.001 0'
nx = 5
ny = 5
nz = 1
[]
[]
[AuxVariables]
[from_sub]
initial_condition = -1
[]
[from_sub_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_sub]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[to_sub_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
hide = 'to_sub to_sub_elem div'
overwrite = true
[]
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
input_files = sub.i
output_in_position = true
# The positions are randomly offset to prevent equi-distant nearest-locations
positions = '0.1001 0.0000013 0
0.30054 0.600001985 0
0.70021 0.0000022 0
0.800212 0.5500022 0'
cli_args = "base_value=1;MeshDivisions/middle_sub/nx=5;MeshDivisions/middle_sub/ny=5;Mesh/nx=10 "
"base_value=2;MeshDivisions/middle_sub/nx=5;MeshDivisions/middle_sub/ny=5;Mesh/nx=10 "
"base_value=3;MeshDivisions/middle_sub/nx=5;MeshDivisions/middle_sub/ny=5;Mesh/nx=10 "
"base_value=4;MeshDivisions/middle_sub/nx=5;MeshDivisions/middle_sub/ny=5;Mesh/nx=10"
[]
[]
[Transfers]
[to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = to_sub
variable = from_main
from_mesh_division = middle
from_mesh_division_usage = 'matching_division'
to_mesh_division = middle_sub
to_mesh_division_usage = 'matching_division'
# we avoid bounding boxes because the parent and children apps do
# not overlap so unless we grow the boxes to cover the entire source,
# the transfer will not pick up all the source mesh divisions
greedy_search = true
use_bounding_boxes = false
[]
[to_sub_elem]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = to_sub_elem
variable = from_main_elem
from_mesh_division = middle
from_mesh_division_usage = 'matching_division'
to_mesh_division = middle_sub
to_mesh_division_usage = 'matching_division'
greedy_search = true
use_bounding_boxes = false
[]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = to_main
variable = from_sub
from_mesh_division = middle_sub
from_mesh_division_usage = 'matching_division'
to_mesh_division = middle
to_mesh_division_usage = 'matching_division'
greedy_search = true
use_bounding_boxes = false
[]
[from_sub_elem]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = to_main_elem
variable = from_sub_elem
from_mesh_division = middle_sub
from_mesh_division_usage = 'matching_division'
to_mesh_division = middle
to_mesh_division_usage = 'matching_division'
greedy_search = true
use_bounding_boxes = false
[]
[]
# For debugging purposes
[AuxVariables]
[div]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[mesh_div]
type = MeshDivisionAux
variable = div
mesh_division = 'middle'
[]
[]
(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
[]
(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/xfem/test/tests/switching_material/two_cuts_stationary.i)
[Problem]
solve = false
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[cut1]
type = LevelSetCutUserObject
level_set_var = phi1
negative_id = 1
positive_id = 33
execute_on = NONE
[]
[cut2]
type = LevelSetCutUserObject
level_set_var = phi2
negative_id = 5
positive_id = 16
execute_on = NONE
[]
[combo]
type = ComboCutUserObject
geometric_cut_userobjects = 'cut1 cut2'
cut_subdomain_combinations = '1 5;
1 16;
33 5;
33 16'
cut_subdomains = '1 3 5 7'
[]
[]
[Mesh]
[square]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
[]
[]
[AuxVariables]
[phi1]
[InitialCondition]
type = FunctionIC
function = 'x-0.213'
[]
[]
[phi2]
[InitialCondition]
type = FunctionIC
function = 'x-0.728'
[]
[]
[cut1_id]
order = CONSTANT
family = MONOMIAL
[]
[cut2_id]
order = CONSTANT
family = MONOMIAL
[]
[combo_id]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[cut1_id]
type = CutSubdomainIDAux
variable = cut1_id
cut = cut1
[]
[cut2_id]
type = CutSubdomainIDAux
variable = cut2_id
cut = cut2
[]
[combo_id]
type = CutSubdomainIDAux
variable = combo_id
cut = combo
[]
[]
[Materials]
[diffusivity_A]
type = GenericConstantMaterial
prop_names = 'A_D'
prop_values = '5'
[]
[diffusivity_B]
type = GenericConstantMaterial
prop_names = 'B_D'
prop_values = '0.5'
[]
[diffusivity_C]
type = GenericConstantMaterial
prop_names = 'C_D'
prop_values = '12'
[]
[diffusivity_D]
type = GenericConstantMaterial
prop_names = 'D_D'
prop_values = '9'
[]
[diff_combined]
type = XFEMCutSwitchingMaterialReal
cut_subdomain_ids = '1 3 5 7'
base_names = 'A B C D'
prop_name = D
geometric_cut_userobject = combo
outputs = 'exodus'
output_properties = 'D'
[]
[]
[Executioner]
type = Transient
num_steps = 1
max_xfem_update = 1
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/flux_limited_TVD_advection/jacobian_02.i)
# Checking the Jacobian of Flux-Limited TVD Advection, using flux_limiter_type = superbee
# Here we use snes_check_jacobian instead of snes_type=test. The former just checks the Jacobian for the
# random initial conditions, while the latter checks for u=1 and u=-1
#
# The Jacobian is correct for u=1 and u=-1, but the finite-difference scheme used by snes_type=test gives the
# wrong answer.
# For u=1, the Kuzmin-Turek scheme adds as much antidiffusion as possible, resulting in a central-difference
# version of advection (flux_limiter = 1). This is correct, and the Jacobian is calculated correctly.
# However, when computing the Jacobian using finite differences, u is increased or decreased at a node.
# This results in that node being at a maximum or minimum, which means no antidiffusion should be added
# (flux_limiter = 0). This corresponds to a full-upwind scheme. So the finite-difference computes the
# Jacobian in the full-upwind scenario, which is incorrect (the original residual = 0, after finite-differencing
# the residual comes from the full-upwind scenario).
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
xmin = 0
xmax = 1
ny = 2
ymin = -1
ymax = 2
bias_y = 1.5
nz = 2
zmin = 1
zmax = 2
bias_z = 0.8
[]
[Variables]
[u]
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'x + 0.5 * y - 0.4 * z - 0.1 * sin(x) - 0.1 * cos(y) + 0.2 * exp(-z)'
[]
[]
[Kernels]
[flux]
type = FluxLimitedTVDAdvection
variable = u
advective_flux_calculator = fluo
[]
[]
[UserObjects]
[fluo]
type = AdvectiveFluxCalculatorConstantVelocity
flux_limiter_type = superbee
u = u
velocity = '1 -2 1.5'
[]
[]
[Preconditioning]
active = smp
[smp]
type = SMP
full = true
petsc_options = '-snes_check_jacobian'
[]
[]
[Executioner]
type = Transient
solve_type = Linear # this is to force convergence even though the nonlinear residual is high: we just care about the Jacobian in this test
end_time = 1
num_steps = 1
dt = 1
[]
(modules/level_set/examples/vortex/vortex.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmax = 1
ymax = 1
nx = 16
ny = 16
uniform_refine = 2
elem_type = QUAD9
[]
[AuxVariables]
[./velocity]
family = LAGRANGE_VEC
[../]
[]
[AuxKernels]
[./vec]
type = VectorFunctionAux
variable = velocity
function = velocity_func
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
[Variables]
[./phi]
family = LAGRANGE
order = FIRST
[../]
[]
[Functions]
[./phi_exact]
type = LevelSetOlssonBubble
epsilon = 0.01184
center = '0.5 0.75 0'
radius = 0.15
[../]
[./velocity_func]
type = LevelSetOlssonVortex
reverse_time = 2
[../]
[]
[ICs]
[./phi_ic]
type = FunctionIC
function = phi_exact
variable = phi
[../]
[]
[Kernels]
[./time]
type = TimeDerivative
variable = phi
[../]
[./advection]
type = LevelSetAdvection
velocity = velocity
variable = phi
[../]
[]
[Postprocessors]
[./area]
type = LevelSetVolume
threshold = 0.5
variable = phi
location = outside
execute_on = 'initial timestep_end'
[../]
[./cfl]
type = LevelSetCFLCondition
velocity = velocity
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
start_time = 0
end_time = 2
scheme = crank-nicolson
petsc_options_iname = '-pc_type -pc_sub_type'
petsc_options_value = 'asm ilu'
[./TimeStepper]
type = PostprocessorDT
postprocessor = cfl
scale = 0.8
[../]
[]
[Outputs]
csv = true
exodus = true
[]
(modules/navier_stokes/examples/laser-welding/3d.i)
period=1.25e-3
endtime=${period}
timestep=1.25e-5
surfacetemp=300
sb=5.67e-8
[GlobalParams]
temperature = T
[]
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -.35e-3
xmax = 0.35e-3
ymin = -.35e-3
ymax = .35e-3
zmin = -.7e-3
zmax = 0
nx = 2
ny = 2
nz = 2
displacements = 'disp_x disp_y disp_z'
uniform_refine = 2
[]
[Variables]
[vel]
family = LAGRANGE_VEC
[]
[T]
[]
[p]
[]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[ICs]
[T]
type = FunctionIC
variable = T
function = '(${surfacetemp} - 300) / .7e-3 * z + ${surfacetemp}'
[]
[]
[Kernels]
[disp_x]
type = Diffusion
variable = disp_x
[]
[disp_y]
type = Diffusion
variable = disp_y
[]
[disp_z]
type = Diffusion
variable = disp_z
[]
[mass]
type = INSADMass
variable = p
use_displaced_mesh = true
[]
[mass_pspg]
type = INSADMassPSPG
variable = p
use_displaced_mesh = true
[]
[momentum_time]
type = INSADMomentumTimeDerivative
variable = vel
use_displaced_mesh = true
[]
[momentum_advection]
type = INSADMomentumAdvection
variable = vel
use_displaced_mesh = true
[]
[momentum_mesh_advection]
type = INSADMomentumMeshAdvection
variable = vel
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = vel
use_displaced_mesh = true
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = vel
pressure = p
integrate_p_by_parts = true
use_displaced_mesh = true
[]
[momentum_supg]
type = INSADMomentumSUPG
variable = vel
material_velocity = relative_velocity
use_displaced_mesh = true
[]
[temperature_time]
type = INSADHeatConductionTimeDerivative
variable = T
use_displaced_mesh = true
[]
[temperature_advection]
type = INSADEnergyAdvection
variable = T
use_displaced_mesh = true
[]
[temperature_mesh_advection]
type = INSADEnergyMeshAdvection
variable = T
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
[]
[temperature_conduction]
type = ADHeatConduction
variable = T
thermal_conductivity = 'k'
use_displaced_mesh = true
[]
[temperature_supg]
type = INSADEnergySUPG
variable = T
velocity = vel
use_displaced_mesh = true
[]
[]
[BCs]
[x_no_disp]
type = DirichletBC
variable = disp_x
boundary = 'back'
value = 0
[]
[y_no_disp]
type = DirichletBC
variable = disp_y
boundary = 'back'
value = 0
[]
[z_no_disp]
type = DirichletBC
variable = disp_z
boundary = 'back'
value = 0
[]
[no_slip]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'bottom right left top back'
[]
[T_cold]
type = DirichletBC
variable = T
boundary = 'back'
value = 300
[]
[radiation_flux]
type = FunctionRadiativeBC
variable = T
boundary = 'front'
emissivity_function = '1'
Tinfinity = 300
stefan_boltzmann_constant = ${sb}
use_displaced_mesh = true
[]
[weld_flux]
type = GaussianEnergyFluxBC
variable = T
boundary = 'front'
P0 = 159.96989792079225
R = 1.8257418583505537e-4
x_beam_coord = '2e-4 * cos(t * 2 * pi / ${period})'
y_beam_coord = '2e-4 * sin(t * 2 * pi / ${period})'
z_beam_coord = 0
use_displaced_mesh = true
[]
[vapor_recoil]
type = INSADVaporRecoilPressureMomentumFluxBC
variable = vel
boundary = 'front'
use_displaced_mesh = true
[]
[displace_x_top]
type = INSADDisplaceBoundaryBC
boundary = 'front'
variable = 'disp_x'
velocity = 'vel'
component = 0
associated_subdomain = 0
[]
[displace_y_top]
type = INSADDisplaceBoundaryBC
boundary = 'front'
variable = 'disp_y'
velocity = 'vel'
component = 1
associated_subdomain = 0
[]
[displace_z_top]
type = INSADDisplaceBoundaryBC
boundary = 'front'
variable = 'disp_z'
velocity = 'vel'
component = 2
associated_subdomain = 0
[]
[displace_x_top_dummy]
type = INSADDummyDisplaceBoundaryIntegratedBC
boundary = 'front'
variable = 'disp_x'
velocity = 'vel'
component = 0
[]
[displace_y_top_dummy]
type = INSADDummyDisplaceBoundaryIntegratedBC
boundary = 'front'
variable = 'disp_y'
velocity = 'vel'
component = 1
[]
[displace_z_top_dummy]
type = INSADDummyDisplaceBoundaryIntegratedBC
boundary = 'front'
variable = 'disp_z'
velocity = 'vel'
component = 2
[]
[]
[Materials]
[ins_mat]
type = INSADStabilized3Eqn
velocity = vel
pressure = p
temperature = T
use_displaced_mesh = true
[]
[steel]
type = AriaLaserWeld304LStainlessSteel
temperature = T
beta = 1e7
use_displaced_mesh = true
[]
[steel_boundary]
type = AriaLaserWeld304LStainlessSteelBoundary
boundary = 'front'
temperature = T
use_displaced_mesh = true
[]
[const]
type = GenericConstantMaterial
prop_names = 'abs sb_constant'
prop_values = '1 ${sb}'
use_displaced_mesh = true
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO strumpack'
[]
[]
[Executioner]
type = Transient
end_time = ${endtime}
dtmin = 1e-8
dtmax = ${timestep}
petsc_options = '-snes_converged_reason -ksp_converged_reason -options_left'
solve_type = 'NEWTON'
line_search = 'none'
nl_max_its = 12
l_max_its = 100
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 7
dt = ${timestep}
linear_iteration_ratio = 1e6
growth_factor = 1.5
[]
[]
[Outputs]
[exodus]
type = Exodus
output_material_properties = true
show_material_properties = 'mu'
[]
checkpoint = true
perf_graph = true
[]
[Debug]
show_var_residual_norms = true
[]
[Adaptivity]
marker = combo
max_h_level = 4
[Indicators]
[error_T]
type = GradientJumpIndicator
variable = T
[]
[error_dispz]
type = GradientJumpIndicator
variable = disp_z
[]
[]
[Markers]
[errorfrac_T]
type = ErrorFractionMarker
refine = 0.4
coarsen = 0.2
indicator = error_T
[]
[errorfrac_dispz]
type = ErrorFractionMarker
refine = 0.4
coarsen = 0.2
indicator = error_dispz
[]
[combo]
type = ComboMarker
markers = 'errorfrac_T errorfrac_dispz'
[]
[]
[]
[Postprocessors]
[num_dofs]
type = NumDOFs
system = 'NL'
[]
[nl]
type = NumNonlinearIterations
[]
[tot_nl]
type = CumulativeValuePostprocessor
postprocessor = 'nl'
[]
[]
(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
[../]
[]
(test/tests/functions/solution_function/solution_function_rot1.i)
# checking rotation of points by 45 deg about z axis in a SolutionUserObject
[Mesh]
# this is chosen so when i rotate through 45deg i get a length of "1" along the x or y or z direction
type = GeneratedMesh
dim = 3
xmin = -0.70710678
xmax = 0.70710678
nx = 3
ymin = -0.70710678
ymax = 0.70710678
ny = 3
zmin = -0.70710678
zmax = 0.70710678
nz = 3
[]
[UserObjects]
[./solution_uo]
type = SolutionUserObject
mesh = cube_with_u_equals_x.e
timestep = LATEST
system_variables = u
rotation0_vector = '0 0 1'
rotation0_angle = 45
transformation_order = rotation0
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./u_init]
type = FunctionIC
variable = u
function = solution_fcn
[../]
[]
[Functions]
[./solution_fcn]
type = SolutionFunction
from_variable = u
solution = solution_uo
[../]
[]
[Kernels]
[./diff]
type = TimeDerivative
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
l_max_its = 800
nl_rel_tol = 1e-10
num_steps = 1
end_time = 1
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = solution_function_rot1
exodus = true
[]
(modules/phase_field/test/tests/free_energy_material/RegularSolutionFreeEnergy_const_T.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmax = 1
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = x
[../]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = c
[../]
[]
[BCs]
[./left]
type = FunctionDirichletBC
variable = c
boundary = left
function = x
[../]
[./right]
type = FunctionDirichletBC
variable = c
boundary = right
function = x
[../]
[]
[Materials]
[./free_energy]
type = RegularSolutionFreeEnergy
property_name = F
c = c
outputs = out
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
l_max_its = 1
nl_max_its = 1
nl_abs_tol = 1
[]
[Outputs]
execute_on = 'timestep_end'
[./out]
type = Exodus
execute_on = timestep_end
[../]
[]
(modules/porous_flow/test/tests/flux_limited_TVD_pflow/pffltvd_2D.i)
# Using flux-limited TVD advection ala Kuzmin and Turek, employing PorousFlow Kernels and UserObjects, with superbee flux-limiter
# 3D version
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
xmin = 0
xmax = 1
ny = 4
ymin = 0
ymax = 0.5
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[porepressure]
[]
[tracer]
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = '1 - x'
[]
[tracer]
type = FunctionIC
variable = tracer
function = 'if(x<0.1,0,if(x>0.3,0,1))'
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = tracer
[]
[flux0]
type = PorousFlowFluxLimitedTVDAdvection
variable = tracer
advective_flux_calculator = advective_flux_calculator_0
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = porepressure
[]
[flux1]
type = PorousFlowFluxLimitedTVDAdvection
variable = porepressure
advective_flux_calculator = advective_flux_calculator_1
[]
[]
[BCs]
[constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1
boundary = left
[]
[no_tracer_on_left]
type = DirichletBC
variable = tracer
value = 0
boundary = left
[]
[remove_component_1]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 1
use_mobility = true
flux_function = 1E3
[]
[remove_component_0]
type = PorousFlowPiecewiseLinearSink
variable = tracer
boundary = right
fluid_phase = 0
pt_vals = '0 1E3'
multipliers = '0 1E3'
mass_fraction_component = 0
use_mobility = true
flux_function = 1E3
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
thermal_expansion = 0
viscosity = 1.0
density0 = 1000.0
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure tracer'
number_fluid_phases = 1
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
[]
[advective_flux_calculator_0]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 0
[]
[advective_flux_calculator_1]
type = PorousFlowAdvectiveFluxCalculatorSaturatedMultiComponent
flux_limiter_type = superbee
fluid_component = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = tracer
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
[]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
[]
[]
[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'
[]
[]
[VectorPostprocessors]
[tracer]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0.5 0'
num_points = 11
sort_by = x
variable = tracer
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 6
dt = 6E-2
nl_abs_tol = 1E-8
timestep_tolerance = 1E-3
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]
(modules/combined/test/tests/multiphase_mechanics/twophasestress.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = 0
xmax = 2
ymin = 0
ymax = 2
elem_type = QUAD4
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[AuxVariables]
[./eta]
[./InitialCondition]
type = FunctionIC
function = 'x/2'
[../]
[../]
[./e11_aux]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./matl_e11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = e11_aux
[../]
[]
[Kernels]
[./TensorMechanics]
[../]
[]
[Materials]
[./elasticity_tensor_A]
type = ComputeElasticityTensor
base_name = A
fill_method = symmetric9
C_ijkl = '1e6 1e5 1e5 1e6 0 1e6 .4e6 .2e6 .5e6'
[../]
[./strain_A]
type = ComputeSmallStrain
base_name = A
eigenstrain_names = eigenstrain
[../]
[./stress_A]
type = ComputeLinearElasticStress
base_name = A
[../]
[./eigenstrain_A]
type = ComputeEigenstrain
base_name = A
eigen_base = '0.1 0.05 0 0 0 0.01'
prefactor = -1
eigenstrain_name = eigenstrain
[../]
[./elasticity_tensor_B]
type = ComputeElasticityTensor
base_name = B
fill_method = symmetric9
C_ijkl = '1e6 0 0 1e6 0 1e6 .5e6 .5e6 .5e6'
[../]
[./strain_B]
type = ComputeSmallStrain
base_name = B
eigenstrain_names = 'B_eigenstrain'
[../]
[./stress_B]
type = ComputeLinearElasticStress
base_name = B
[../]
[./eigenstrain_B]
type = ComputeEigenstrain
base_name = B
eigen_base = '0.1 0.05 0 0 0 0.01'
prefactor = -1
eigenstrain_name = 'B_eigenstrain'
[../]
[./switching]
type = SwitchingFunctionMaterial
eta = eta
[../]
[./combined]
type = TwoPhaseStressMaterial
base_A = A
base_B = B
[../]
[]
[BCs]
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/mortar/continuity-2d-conforming/equalgradient.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'
[]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./lmx]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[../]
[./lmy]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[../]
[]
[ICs]
[./block1]
type = FunctionIC
variable = u
block = 1
function = y
[../]
[./block2]
type = FunctionIC
variable = u
block = 2
function = y-0.5
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./dt]
type = TimeDerivative
variable = u
[../]
[]
[Constraints]
[./cedx]
type = EqualGradientConstraint
secondary_variable = u
variable = lmx
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
component = 0
[../]
[./cedy]
type = EqualGradientConstraint
secondary_variable = u
variable = lmy
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
component = 1
[../]
[]
[BCs]
[./all]
type = DiffusionFluxBC
variable = u
boundary = '2 4 100 101'
[../]
[./boundary]
type = DirichletBC
boundary = 1
variable = u
value = 0.0
[../]
[./top]
type = FunctionDirichletBC
boundary = 3
variable = u
function = 0.5-t
[../]
[]
[Preconditioning]
[./fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
nl_rel_tol = 1e-11
l_tol = 1e-10
l_max_its = 10
dt = 0.05
num_steps = 3
[]
[Outputs]
exodus = true
print_linear_residuals = false
[]
(modules/level_set/test/tests/transfers/copy_solution/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[ICs]
[./u_ic]
type = FunctionIC
function = 'x*x*y'
variable = u
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
[]
[MultiApps]
[./sub]
type = FullSolveMultiApp
input_files = 'sub.i'
execute_on = timestep_end
[../]
[]
[Transfers]
[./to_sub]
type = MultiAppCopyTransfer
variable = u
source_variable = u
to_multi_app = sub
execute_on = timestep_end
check_multiapp_execute_on = false
[../]
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/mass_conservation/mass14.i)
# checking that the mass postprocessor correctly calculates the mass
# 1phase, 1component, constant porosity
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
nx = 3
xmin = -1
xmax = 1
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
type = MooseVariableFVReal
[]
[]
[ICs]
[pinit]
type = FunctionIC
function = x
variable = pp
[]
[]
[FVKernels]
[mass0]
type = FVPorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 1
density0 = 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
[]
[porosity]
type = ADPorousFlowPorosityConst
porosity = 0.1
[]
[]
[Postprocessors]
[total_mass]
type = FVPorousFlowFluidMass
base_name = incorrect_base_name
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
[]
(modules/navier_stokes/test/tests/finite_volume/cns/userobject/HLLC/hllc_uo_2D_tri.i)
rho_left = 1.162633159
E_left = 2.1502913276e+05
v_left = 40
rho_right = 1.116127833
E_right = 1.7919094397e+05
v_right = 50
[Mesh]
[./cartesian]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 2
nx = 1
ny = 1
elem_type = 'TRI3'
[../]
[]
[FluidProperties]
[./fp]
type = IdealGasFluidProperties
allow_imperfect_jacobians = true
[../]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./rho]
order = CONSTANT
family = MONOMIAL
[../]
[./rho_v]
order = CONSTANT
family = MONOMIAL
[../]
[./rho_E]
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./rho_ic]
type = FunctionIC
variable = rho
function = 'if (y / (2 * x) < 0.5, ${rho_left}, ${rho_right})'
[../]
[./rho_v_ic]
type = FunctionIC
variable = rho_v
function = 'if (y / (2 * x) < 0.5, ${fparse rho_left * v_left}, ${fparse rho_right * v_right})'
[../]
[./rho_E_ic]
type = FunctionIC
variable = rho_E
function = 'if (y / (2 * x) < 0.5, ${fparse E_left * rho_left}, ${fparse E_right * rho_right})'
[../]
[]
[Materials]
[./var_mat]
type = ConservedVarValuesMaterial
rho = rho
rhou = 0
rhov = rho_v
rho_et = rho_E
fp = fp
[../]
[]
[UserObjects]
[./hllc]
type = HLLCUserObject
fp = fp
[../]
[]
[VectorPostprocessors]
[./wave_speeds]
type = WaveSpeedVPP
hllc_uo = hllc
elem_id = 0
side_id = 2
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(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/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/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
[]
(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/porous_flow/examples/multiapp_fracture_flow/diffusion_multiapp/fracture_app.i)
# Temperature is transferred between the fracture and matrix apps
[Mesh]
[generate]
type = GeneratedMeshGenerator
dim = 1
nx = 100
xmin = 0
xmax = 50.0
[]
[]
[Variables]
[frac_T]
[]
[]
[ICs]
[frac_T]
type = FunctionIC
variable = frac_T
function = 'if(x<1E-6, 2, 0)' # delta function
[]
[]
[AuxVariables]
[transferred_matrix_T]
[]
[]
[Kernels]
[dot]
type = TimeDerivative
variable = frac_T
[]
[fracture_diffusion]
type = Diffusion
variable = frac_T
[]
[toMatrix]
type = PorousFlowHeatMassTransfer
variable = frac_T
v = transferred_matrix_T
transfer_coefficient = 0.004
[]
[]
[Preconditioning]
[entire_jacobian]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 100
end_time = 100
[]
[VectorPostprocessors]
[final_results]
type = LineValueSampler
start_point = '0 0 0'
end_point = '50 0 0'
num_points = 11
sort_by = x
variable = frac_T
outputs = final_csv
[]
[]
[Outputs]
print_linear_residuals = false
[final_csv]
type = CSV
sync_times = 100
sync_only = true
[]
[]
[MultiApps]
[matrix_app]
type = TransientMultiApp
input_files = matrix_app.i
execute_on = TIMESTEP_END
[]
[]
[Transfers]
[T_to_matrix]
type = MultiAppCopyTransfer
to_multi_app = matrix_app
source_variable = frac_T
variable = transferred_frac_T
[]
[T_from_matrix]
type = MultiAppCopyTransfer
from_multi_app = matrix_app
source_variable = matrix_T
variable = transferred_matrix_T
[]
[]
(test/tests/auxkernels/solution_aux/aux_nonlinear_solution_xda.i)
[Mesh]
# This test uses SolutionUserObject which doesn't work with DistributedMesh.
type = GeneratedMesh
parallel_type = replicated
dim = 2
nx = 2
ny = 2
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./u_aux]
[../]
[]
[Functions]
[./u_xda_func]
type = SolutionFunction
solution = xda_u
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./aux_xda_kernel]
type = SolutionAux
variable = u_aux
solution = xda_u_aux
execute_on = initial
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 2
[../]
[]
[UserObjects]
[./xda_u_aux]
type = SolutionUserObject
system = aux0
mesh = aux_nonlinear_solution_out_0001_mesh.xda
es = aux_nonlinear_solution_out_0001.xda
system_variables = u_aux
execute_on = initial
[../]
[./xda_u]
type = SolutionUserObject
system = nl0
mesh = aux_nonlinear_solution_out_0001_mesh.xda
es = aux_nonlinear_solution_out_0001.xda
system_variables = u
execute_on = initial
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_rel_tol = 1e-10
[]
[Outputs]
exodus = true
[]
[ICs]
[./u_func_ic]
function = u_xda_func
variable = u
type = FunctionIC
[../]
[]
(test/tests/transfers/general_field/shape_evaluation/mesh_division/main_match_subapps.i)
# Base input for testing transfers with mesh divisions restrictions. The mesh divisions
# in the parent app will be matched with a subapp index.
# In the to_multiapp direction, the main app data at the mesh division bins of index 1-4 will
# be transferred to subapps of index 1-4 respectively
# In the from_multiapp direction, the main app fields at the mesh divisions bins of index 1-4
# will receive data (be transferred) from subapps of index 1-4 respectively
# It has the following complexities:
# - several sub-applications
# - transfers both from and to the subapps
# - both nodal and elemental variables
# Tests derived from this input may add complexities through command line arguments
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
[]
[MeshDivisions]
[middle]
type = CartesianGridDivision
bottom_left = '0.21 0.21 0'
# cover more and sample more bins
top_right = '1.001 1.001 0'
nx = 2
ny = 2
nz = 1
[]
[]
[AuxVariables]
[from_sub]
initial_condition = -1
[]
[from_sub_elem]
order = CONSTANT
family = MONOMIAL
initial_condition = -1
[]
[to_sub]
[InitialCondition]
type = FunctionIC
function = '1 + 2*x*x + 3*y*y*y'
[]
[]
[to_sub_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = '2 + 2*x*x + 3*y*y*y'
[]
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
[out]
type = Exodus
hide = 'to_sub to_sub_elem div'
overwrite = true
[]
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
input_files = sub.i
output_in_position = true
# The positions are randomly offset to prevent equi-distant nearest-locations
# They are offset so they overlap with the division they are being matched to
positions = '-0.5001 -0.3000013 0
0.30054 -0.300001985 0
-0.30021 0.2000022 0
0.200212 0.4100022 0'
# To differentiate the values received from each subapp
cli_args = 'base_value=10 base_value=20 base_value=30 base_value=40'
[]
[]
[Transfers]
[to_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
source_variable = to_sub
variable = from_main
from_mesh_division = middle
from_mesh_division_usage = 'matching_subapp_index'
[]
[to_sub_elem]
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = sub
source_variable = to_sub_elem
variable = from_main_elem
from_mesh_division = middle
from_mesh_division_usage = 'matching_subapp_index'
[]
[from_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
source_variable = to_main
variable = from_sub
to_mesh_division = middle
to_mesh_division_usage = 'matching_subapp_index'
[]
[from_sub_elem]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = sub
source_variable = to_main_elem
variable = from_sub_elem
to_mesh_division = middle
to_mesh_division_usage = 'matching_subapp_index'
[]
[]
# For debugging purposes
[AuxVariables]
[div]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[mesh_div]
type = MeshDivisionAux
variable = div
mesh_division = 'middle'
[]
[]
(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/combined/test/tests/DiffuseCreep/strain_gb_relax.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 50
ny = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 2
[]
[Variables]
[./c]
[./InitialCondition]
type = FunctionIC
function = 'x0:=5.0;thk:=0.5;m:=2;r:=abs(x-x0);v:=exp(-(r/thk)^m);0.1+0.1*v'
[../]
[../]
[./mu]
[../]
[./jx]
[../]
[./jy]
[../]
[]
[AuxVariables]
[./gb]
family = LAGRANGE
order = FIRST
[../]
[./strain_xx]
family = MONOMIAL
order = CONSTANT
[../]
[./strain_yy]
family = MONOMIAL
order = CONSTANT
[../]
[./strain_xy]
family = MONOMIAL
order = CONSTANT
[../]
[]
[Kernels]
[./conc]
type = CHSplitConcentration
variable = c
mobility = mobility_prop
chemical_potential_var = mu
[../]
[./chempot]
type = CHSplitChemicalPotential
variable = mu
chemical_potential_prop = mu_prop
c = c
[../]
[./flux_x]
type = CHSplitFlux
variable = jx
component = 0
mobility_name = mobility_prop
mu = mu
c = c
[../]
[./flux_y]
type = CHSplitFlux
variable = jy
component = 1
mobility_name = mobility_prop
mu = mu
c = c
[../]
[./time]
type = TimeDerivative
variable = c
[../]
[]
[AuxKernels]
[./gb]
type = FunctionAux
variable = gb
function = 'x0:=5.0;thk:=0.5;m:=2;r:=abs(x-x0);v:=exp(-(r/thk)^m);v'
[../]
[./strain_xx]
type = RankTwoAux
variable = strain_xx
rank_two_tensor = strain
index_i = 0
index_j = 0
[../]
[./strain_yy]
type = RankTwoAux
variable = strain_yy
rank_two_tensor = strain
index_i = 1
index_j = 1
[../]
[./strain_xy]
type = RankTwoAux
variable = strain_xy
rank_two_tensor = strain
index_i = 0
index_j = 1
[../]
[]
[Materials]
[./chemical_potential]
type = DerivativeParsedMaterial
block = 0
property_name = mu_prop
coupled_variables = c
expression = 'c'
derivative_order = 1
[../]
[./var_dependence]
type = DerivativeParsedMaterial
block = 0
expression = 'c*(1.0-c)'
coupled_variables = c
property_name = var_dep
derivative_order = 1
[../]
[./mobility]
type = CompositeMobilityTensor
block = 0
M_name = mobility_prop
tensors = diffusivity
weights = var_dep
args = c
[../]
[./phase_normal]
type = PhaseNormalTensor
phase = gb
normal_tensor_name = gb_normal
[../]
[./aniso_tensor]
type = GBDependentAnisotropicTensor
gb = gb
bulk_parameter = 0.1
gb_parameter = 1
gb_normal_tensor_name = gb_normal
gb_tensor_prop_name = aniso_tensor
[../]
[./diffusivity]
type = GBDependentDiffusivity
gb = gb
bulk_parameter = 0.1
gb_parameter = 1
gb_normal_tensor_name = gb_normal
gb_tensor_prop_name = diffusivity
[../]
[./gb_relax_prefactor]
type = DerivativeParsedMaterial
block = 0
expression = '0.01*(c-0.15)*gb'
coupled_variables = 'c gb'
property_name = gb_relax_prefactor
derivative_order = 1
[../]
[./gb_relax]
type = GBRelaxationStrainIncrement
property_name = gb_relax
prefactor_name = gb_relax_prefactor
gb_normal_name = gb_normal
[../]
[./strain]
type = SumTensorIncrements
tensor_name = strain
coupled_tensor_increment_names = gb_relax
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -ksp_grmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
nl_max_its = 5
dt = 20
num_steps = 5
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/DiffuseCreep/strain.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 50
ny = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 2
[]
[Variables]
[./c]
[./InitialCondition]
type = FunctionIC
function = 'x0:=5.0;thk:=0.5;m:=2;r:=abs(x-x0);v:=exp(-(r/thk)^m);0.1+0.1*v'
[../]
[../]
[./mu]
[../]
[./jx]
[../]
[./jy]
[../]
[]
[AuxVariables]
[./gb]
family = LAGRANGE
order = FIRST
[../]
[./creep_strain_xx]
family = MONOMIAL
order = CONSTANT
[../]
[./creep_strain_yy]
family = MONOMIAL
order = CONSTANT
[../]
[./creep_strain_xy]
family = MONOMIAL
order = CONSTANT
[../]
[]
[Kernels]
[./conc]
type = CHSplitConcentration
variable = c
mobility = mobility_prop
chemical_potential_var = mu
[../]
[./chempot]
type = CHSplitChemicalPotential
variable = mu
chemical_potential_prop = mu_prop
c = c
[../]
[./flux_x]
type = CHSplitFlux
variable = jx
component = 0
mobility_name = mobility_prop
mu = mu
c = c
[../]
[./flux_y]
type = CHSplitFlux
variable = jy
component = 1
mobility_name = mobility_prop
mu = mu
c = c
[../]
[./time]
type = TimeDerivative
variable = c
[../]
[]
[AuxKernels]
[./gb]
type = FunctionAux
variable = gb
function = 'x0:=5.0;thk:=0.5;m:=2;r:=abs(x-x0);v:=exp(-(r/thk)^m);v'
[../]
[./creep_strain_xx]
type = RankTwoAux
variable = creep_strain_xx
rank_two_tensor = creep_strain
index_i = 0
index_j = 0
[../]
[./creep_strain_yy]
type = RankTwoAux
variable = creep_strain_yy
rank_two_tensor = creep_strain
index_i = 1
index_j = 1
[../]
[./creep_strain_xy]
type = RankTwoAux
variable = creep_strain_xy
rank_two_tensor = creep_strain
index_i = 0
index_j = 1
[../]
[]
[Materials]
[./chemical_potential]
type = DerivativeParsedMaterial
block = 0
property_name = mu_prop
coupled_variables = c
expression = 'c'
derivative_order = 1
[../]
[./var_dependence]
type = DerivativeParsedMaterial
block = 0
expression = 'c*(1.0-c)'
coupled_variables = c
property_name = var_dep
derivative_order = 1
[../]
[./mobility]
type = CompositeMobilityTensor
block = 0
M_name = mobility_prop
tensors = diffusivity
weights = var_dep
args = c
[../]
[./phase_normal]
type = PhaseNormalTensor
phase = gb
normal_tensor_name = gb_normal
[../]
[./aniso_tensor]
type = GBDependentAnisotropicTensor
gb = gb
bulk_parameter = 0.1
gb_parameter = 1
gb_normal_tensor_name = gb_normal
gb_tensor_prop_name = aniso_tensor
[../]
[./diffusivity]
type = GBDependentDiffusivity
gb = gb
bulk_parameter = 0.1
gb_parameter = 1
gb_normal_tensor_name = gb_normal
gb_tensor_prop_name = diffusivity
[../]
[./diffuse_strain_increment]
type = FluxBasedStrainIncrement
xflux = jx
yflux = jy
gb = gb
property_name = diffuse
[../]
[./diffuse_creep_strain]
type = SumTensorIncrements
tensor_name = creep_strain
coupled_tensor_increment_names = diffuse
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -ksp_grmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
nl_max_its = 5
dt = 20
num_steps = 5
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/auxkernels/advection_flux/advection_flux_fv.i)
[Mesh]
type = GeneratedMesh # Can generate simple lines, rectangles and rectangular prisms
dim = 2 # Dimension of the mesh
nx = 10 # Number of elements in the x direction
ny = 10 # Number of elements in the y direction
xmax = 1.0
ymax = 1.0
[]
[Variables]
[u]
type = MooseVariableFVReal
two_term_boundary_expansion = false
[]
[]
[AuxVariables]
[flux_x]
type = MooseVariableFVReal
order = CONSTANT
family = MONOMIAL
[]
[]
[ICs]
[u_ic]
type = FunctionIC
variable = u
function = 'r2 := (x - 0.5)*(x - 0.5) + (y - 0.3)*(y - 0.3); exp(-r2 * 20)'
[]
[]
[FVKernels]
[advection]
type = FVAdvection
variable = u
velocity = '1 0.5 0'
[]
[time]
type = FVTimeKernel
variable = u
[]
[]
[FVBCs]
[fv_outflow]
type = FVConstantScalarOutflowBC
velocity = '1 0.5 0'
variable = u
boundary = 'right top'
[]
[]
[AuxKernels]
[flux_x]
type = AdvectiveFluxAux
variable = flux_x
vel_x = 1
vel_y = 0.5
advected_variable = u
component = normal
boundary = 'left right'
check_boundary_restricted = false
[]
[]
[Postprocessors]
[flux_right]
type = SideIntegralVariablePostprocessor
variable = flux_x
boundary = 'right'
[]
[flux_right_exact]
type = SideAdvectiveFluxIntegral
vel_x = 1
vel_y = 0.5
component = normal
advected_quantity = u
boundary = 'right'
[]
[flux_left]
type = SideIntegralVariablePostprocessor
variable = flux_x
boundary = 'left'
[]
[flux_left_exact]
type = SideAdvectiveFluxIntegral
vel_x = 1
vel_y = 0.5
component = normal
advected_quantity = u
boundary = 'left'
[]
[]
[Executioner]
type = Transient
petsc_options = '-snes_converged_reason'
num_steps = 10
dt = 0.25
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = 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
[]
(test/tests/interfacekernels/ik_displaced/displaced.i)
[Mesh]
displacements = 'disp_x disp_y'
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./break_boundary]
input = interface
type = BreakBoundaryOnSubdomainGenerator
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./v]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[../]
[./source_u]
type = BodyForce
variable = u
value = 1
[../]
[]
[InterfaceKernels]
[./interface]
type = InterfacialSource
variable = u
neighbor_var = v
boundary = primary0_interface
use_displaced_mesh = true
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 right top'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1'
[../]
[]
[Postprocessors]
[./u_int]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[../]
[./v_int]
type = ElementIntegralVariablePostprocessor
variable = v
block = 1
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
file_base = displaced
exodus = true
[]
[Functions]
[./disp_x_func]
type = ParsedFunction
expression = x
[../]
[./disp_y_func]
type = ParsedFunction
expression = y
[../]
[]
[ICs]
[./disp_x_ic]
function = disp_x_func
variable = disp_x
type = FunctionIC
[../]
[./disp_y_ic]
function = disp_y_func
variable = disp_y
type = FunctionIC
[../]
[]
(modules/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
[]
(modules/phase_field/test/tests/KKS_system/lagrange_multiplier.i)
#
# This test ensures that the equilibrium solution using two order parameters with a
# Lagrange multiplier constraint is identical to the dedicated two phase formulation
# in two_phase.i
#
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmax = 5
[]
[AuxVariables]
[Fglobal]
order = CONSTANT
family = MONOMIAL
[]
[]
[Variables]
# concentration
[c]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = x/5
[]
[]
# order parameter 1
[eta1]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
# order parameter 2
[eta2]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
# phase concentration 1
[c1]
order = FIRST
family = LAGRANGE
initial_condition = 0.2
[]
# phase concentration 2
[c2]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
# Lagrange multiplier
[lambda]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[]
[]
[Materials]
# simple toy free energies
[f1] # = fd
type = DerivativeParsedMaterial
property_name = F1
coupled_variables = 'c1'
expression = '(0.9-c1)^2'
[]
[f2] # = fm
type = DerivativeParsedMaterial
property_name = F2
coupled_variables = 'c2'
expression = '(0.1-c2)^2'
[]
# Switching functions for each phase
[h1_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta1
function_name = h1
[]
[h2_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta2
function_name = h2
[]
# 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
[]
# 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
[]
# constant properties
[constants]
type = GenericConstantMaterial
prop_names = 'D L kappa'
prop_values = '0.7 0.7 0.2'
[]
[]
[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
[]
# Kernels for Allen-Cahn equation for eta1
[deta1dt]
type = TimeDerivative
variable = eta1
[]
[ACBulkF1]
type = KKSMultiACBulkF
variable = eta1
Fj_names = 'F1 F2 '
hj_names = 'h1 h2 '
gi_name = g1
eta_i = eta1
wi = 0.2
coupled_variables = 'c1 c2 eta2'
[]
[ACBulkC1]
type = KKSMultiACBulkC
variable = eta1
Fj_names = 'F1 F2'
hj_names = 'h1 h2'
cj_names = 'c1 c2'
eta_i = eta1
coupled_variables = 'eta2'
[]
[ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa
[]
[multipler1]
type = MatReaction
variable = eta1
v = lambda
mob_name = L
[]
# Kernels for the Lagrange multiplier equation
[mult_lambda]
type = MatReaction
variable = lambda
mob_name = 2
[]
[mult_ACBulkF_1]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 '
hj_names = 'h1 h2 '
gi_name = g1
eta_i = eta1
wi = 0.2
mob_name = 1
coupled_variables = 'c1 c2 eta2 '
[]
[mult_ACBulkC_1]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2'
hj_names = 'h1 h2'
cj_names = 'c1 c2'
eta_i = eta1
coupled_variables = 'eta2 '
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 '
hj_names = 'h1 h2 '
gi_name = g2
eta_i = eta2
wi = 0.2
mob_name = 1
coupled_variables = 'c1 c2 eta1 '
[]
[mult_ACBulkC_2]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2'
hj_names = 'h1 h2'
cj_names = 'c1 c2'
eta_i = eta2
coupled_variables = 'eta1 '
mob_name = 1
[]
[mult_CoupledACint_2]
type = SimpleCoupledACInterface
variable = lambda
v = eta2
kappa_name = kappa
mob_name = 1
[]
# Kernels for constraint equation eta1 + eta2 = 1
# eta2 is the nonlinear variable for the constraint equation
[eta2reaction]
type = MatReaction
variable = eta2
mob_name = 1
[]
[eta1reaction]
type = MatReaction
variable = eta2
v = eta1
mob_name = 1
[]
[one]
type = BodyForce
variable = eta2
value = -1.0
[]
# Phase concentration constraints
[chempot12]
type = KKSPhaseChemicalPotential
variable = c1
cb = c2
fa_name = F1
fb_name = F2
[]
[phaseconcentration]
type = KKSMultiPhaseConcentration
variable = c2
cj = 'c1 c2'
hj_names = 'h1 h2'
etas = 'eta1 eta2'
c = c
[]
[]
[AuxKernels]
[Fglobal_total]
type = KKSMultiFreeEnergy
Fj_names = 'F1 F2 '
hj_names = 'h1 h2 '
gj_names = 'g1 g2 '
variable = Fglobal
w = 0.2
interfacial_vars = 'eta1 eta2 '
kappa_names = 'kappa kappa'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'lu 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 = 35
dt = 10
[]
[VectorPostprocessors]
[c]
type = LineValueSampler
variable = c
start_point = '0 0 0'
end_point = '5 0 0'
num_points = 21
sort_by = x
[]
[]
[Outputs]
csv = true
execute_on = FINAL
[]
(modules/richards/test/tests/sinks/q2p01.i)
# Q2PPiecewiseLinearSink (and the Flux Postprocessor)
# There are three sinks: water with no relperm and density;
# water with relperm and density; gas with relperm and density.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
[]
[UserObjects]
[./DensityWater]
type = RichardsDensityConstBulk
dens0 = 1
bulk_mod = 1
[../]
[./DensityGas]
type = RichardsDensityConstBulk
dens0 = 0.5
bulk_mod = 0.5
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.0
n = 2
[../]
[./RelPermGas]
type = Q2PRelPermPowerGas
simm = 0.0
n = 3
[../]
[]
[Variables]
[./pp]
[./InitialCondition]
type = FunctionIC
function = 1
[../]
[../]
[./sat]
[./InitialCondition]
type = FunctionIC
function = 0.5
[../]
[../]
[]
[Q2P]
porepressure = pp
saturation = sat
water_density = DensityWater
water_relperm = RelPermWater
water_viscosity = 0.8
gas_density = DensityGas
gas_relperm = RelPermGas
gas_viscosity = 0.5
diffusivity = 0.0
output_total_masses_to = 'CSV'
save_gas_flux_in_Q2PGasFluxResidual = true
save_water_flux_in_Q2PWaterFluxResidual = true
save_gas_Jacobian_in_Q2PGasJacobian = true
save_water_Jacobian_in_Q2PWaterJacobian = true
[]
[Postprocessors]
[./left_water_out]
type = Q2PPiecewiseLinearSinkFlux
boundary = left
porepressure = pp
pressures = '0 1'
bare_fluxes = '0 1.5'
multiplying_fcn = 0.1
execute_on = 'initial timestep_end'
[../]
[./right_water_out]
type = Q2PPiecewiseLinearSinkFlux
boundary = right
porepressure = pp
pressures = '0 1'
bare_fluxes = '1 2'
fluid_density = DensityWater
fluid_viscosity = 0.8
fluid_relperm = RelPermWater
saturation = sat
execute_on = 'initial timestep_end'
[../]
[./right_gas_out]
type = Q2PPiecewiseLinearSinkFlux
boundary = right
porepressure = pp
pressures = '0 1'
bare_fluxes = '1 1'
fluid_density = DensityGas
fluid_viscosity = 0.5
fluid_relperm = RelPermGas
saturation = sat
execute_on = 'initial timestep_end'
[../]
[./p_left]
type = PointValue
point = '0 0 0'
variable = pp
execute_on = 'initial timestep_end'
[../]
[./sat_left]
type = PointValue
point = '0 0 0'
variable = sat
execute_on = 'initial timestep_end'
[../]
[./p_right]
type = PointValue
point = '1 0 0'
variable = pp
execute_on = 'initial timestep_end'
[../]
[./sat_right]
type = PointValue
point = '1 0 0'
variable = sat
execute_on = 'initial timestep_end'
[../]
[]
[BCs]
[./left_water]
type = Q2PPiecewiseLinearSink
boundary = left
pressures = '0 1'
bare_fluxes = '0 1.5'
multiplying_fcn = 0.1
variable = sat
other_var = pp
var_is_porepressure = false
use_mobility = false
use_relperm = false
fluid_density = DensityWater
fluid_viscosity = 0.8
fluid_relperm = RelPermWater
[../]
[./right_water]
type = Q2PPiecewiseLinearSink
boundary = right
pressures = '0 1'
bare_fluxes = '1 2'
variable = sat
other_var = pp
var_is_porepressure = false
use_mobility = true
use_relperm = true
fluid_density = DensityWater
fluid_viscosity = 0.8
fluid_relperm = RelPermWater
[../]
[./right_gas]
type = Q2PPiecewiseLinearSink
boundary = right
pressures = '0 1'
bare_fluxes = '1 1'
variable = pp
other_var = sat
var_is_porepressure = true
use_mobility = true
use_relperm = true
fluid_density = DensityGas
fluid_viscosity = 0.5
fluid_relperm = RelPermGas
[../]
[]
[AuxVariables]
[./one]
initial_condition = 1
[../]
[]
[Materials]
[./rock]
type = Q2PMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-2 0 0 0 1E-2 0 0 0 1E-2'
gravity = '0 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'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.1
end_time = 0.5
[]
[Outputs]
file_base = q2p01
[./CSV]
type = CSV
[../]
[]
(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/transfers/general_field/shape_evaluation/between_siblings/sub_between_diffusion2.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 3
ny = 3
# partial overlap but also, no equidistant points
xmin = 0.1111
ymin = 0.3333
xmax = 1.211111
ymax = 1.222222
[]
[block1]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0.4 0.6 0'
# extends beyond to grab the boundary
top_right = '2 2 0'
[]
[]
[AuxVariables]
[sent_nodal]
[InitialCondition]
type = FunctionIC
function = '3 + 2*x*x + 3*y*y*y'
[]
[]
[received_nodal]
initial_condition = -1
[]
[sent_elem]
family = MONOMIAL
order = CONSTANT
[InitialCondition]
type = FunctionIC
function = '4 + 2*x*x + 3*y*y*y'
[]
[]
[received_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
[]
[Outputs]
exodus = true
hide = 'sent_nodal sent_elem'
execute_on = 'TIMESTEP_END'
[]
(test/tests/functions/image_function/flip_dual.i)
[Mesh]
uniform_refine = 1
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 40
ymax = 2
[]
[top]
type = SubdomainBoundingBoxGenerator
input = gen
top_right = '1 2 0'
bottom_left = '0 1 0'
block_id = 1
[]
[]
[Variables]
[u]
[]
[]
[Functions]
[top]
type = ImageFunction
origin = '0 1 0'
file_base = stack/test
file_suffix = png
flip_y = true
file_range = '0' # file_range is a vector input, a single entry means "read only 1 file"
dimensions = '1 1 0'
[]
[bottom]
type = ImageFunction
origin = '0 0 0'
file_base = stack/test
file_suffix = png
file_range = '0' # file_range is a vector input, a single entry means "read only 1 file"
dimensions = '1 1 0'
[]
[]
[ICs]
[top_ic]
function = top
variable = u
type = FunctionIC
block = 1
[]
[bottom_ic]
function = bottom
variable = u
type = FunctionIC
block = 0
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.1
[]
[Outputs]
exodus = true
[]
(modules/chemical_reactions/test/tests/thermochimica/MoRu_subblock.i)
[Mesh]
[two_blocks]
type = CartesianMeshGenerator
dim = 2
dx = '0.5 1.0'
dy = '1.0'
ix = '5 5'
iy = '5'
subdomain_id = '0 1'
[]
[]
[ChemicalComposition]
tunit = K
punit = atm
munit = moles
is_fv = true
temperature = T
[block_0]
block = '0'
elements = 'Mo Ru'
thermofile = Kaye_NobleMetals.dat
output_phases = 'BCCN HCPN'
output_species = 'BCCN:Mo'
is_fv = false
output_species_unit = mole_fraction
[]
[block_1]
block = '1'
elements = 'Fe O'
thermofile = FeTiVO.dat
output_phases = 'gas_ideal'
output_species = 'SlagBsoln:Fe2O3'
output_species_unit = moles
[]
[]
[ICs]
[Mo]
type = FunctionIC
variable = Mo
function = '0.8*(1-x)+4.3*x'
block = '0'
[]
[Ru]
type = FunctionIC
variable = Ru
function = '0.2*(1-x)+4.5*x'
block = '0'
[]
[O]
type = FunctionIC
variable = O
function = '2.0*(1-x)+1.6*x'
block = '1'
[]
[Fe]
type = FunctionIC
variable = Fe
function = '0.5*(1-x)+0.25*x'
block = '1'
[]
[]
[AuxVariables]
[T]
type = MooseVariable
[]
[]
[AuxKernels]
[T]
type = ParsedAux
variable = T
use_xyzt = true
expression = '1250.0+1000.0*(x/1.5)'
execute_on = 'INITIAL'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(framework/include/ics/IntegralPreservingFunctionIC.h)
// This file is part of the MOOSE framework
// https://www.mooseframework.org
//
// All rights reserved, see COPYRIGHT for full restrictions
// https://github.com/idaholab/moose/blob/master/COPYRIGHT
//
// Licensed under LGPL 2.1, please see LICENSE for details
// https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
#include "FunctionIC.h"
/**
* Initial conditions specifying an initial condition as a general function
* while preserving a total integral magnitude.
*/
class IntegralPreservingFunctionIC : public FunctionIC
{
public:
static InputParameters validParams();
IntegralPreservingFunctionIC(const InputParameters & parameters);
virtual void initialSetup() override;
/**
* @returns The magnitude of the function
*/
Real magnitude() const { return _magnitude; }
protected:
virtual Real value(const Point & p) override;
/// Name of postprocessor providing the integral of the function
const PostprocessorName & _pp_name;
/// Integral of the function
const PostprocessorValue & _integral;
/// Magnitude of the initial condition upon integration
const Real & _magnitude;
};