- variableThe name of the variable that this residual object operates on
C++ Type:NonlinearVariableName
Controllable:No
Description:The name of the variable that this residual object operates on
BodyForce
Description
BodyForce
implements a force term in momentum transport or structural mechanics or a source term in species/mass transport. The strong form, given a domain is defined as
where is the source term (negative if a sink) and the second term on the left hand side represents the strong forms of other kernels. The BodyForce
weak form, in inner-product notation, is defined as
where the are the test functions, and are the trial solutions in the finite dimensional space for the unknown ().
The Jacobian term for this kernel is zero: , since it is assumed that is not a function of the unknown .
The force is constructed through a user supplied constant , function value evaluated at the current time and quadrature point , and/or postprocessor value . The constant , supplied through the parameter value
, may also be controlled over the course of a transient simulation with a Controls
block. , , are supplied through the input parameters value
, function
, and postprocessor
respectively. Not supplying , , or through its corresponding parameter is equivalent to setting its value to unity.
Example Syntax
The case below demonstrates the use of BodyForce
where the force term is supplied based upon a function form:
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
block = 1
value = 10
function = 'x+y'
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
(test/tests/kernels/block_kernel/block_kernel_test.i)Input Parameters
- blockThe list of blocks (ids or names) that this object will be applied
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:The list of blocks (ids or names) that this object will be applied
- displacementsThe displacements
C++ Type:std::vector<VariableName>
Controllable:No
Description:The displacements
- function1A function that describes the body force
Default:1
C++ Type:FunctionName
Controllable:No
Description:A function that describes the body force
- postprocessor1A postprocessor whose value is multiplied by the body force
Default:1
C++ Type:PostprocessorName
Controllable:No
Description:A postprocessor whose value is multiplied by the body force
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Default:False
C++ Type:bool
Controllable:No
Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
- value1Coefficient to multiply by the body force term
Default:1
C++ Type:double
Controllable:Yes
Description:Coefficient to multiply by the body force term
Optional Parameters
- absolute_value_vector_tagsThe tags for the vectors this residual object should fill with the absolute value of the residual contribution
C++ Type:std::vector<TagName>
Controllable:No
Description:The tags for the vectors this residual object should fill with the absolute value of the residual contribution
- extra_matrix_tagsThe extra tags for the matrices this Kernel should fill
C++ Type:std::vector<TagName>
Controllable:No
Description:The extra tags for the matrices this Kernel should fill
- extra_vector_tagsThe extra tags for the vectors this Kernel should fill
C++ Type:std::vector<TagName>
Controllable:No
Description:The extra tags for the vectors this Kernel should fill
- matrix_tagssystemThe tag for the matrices this Kernel should fill
Default:system
C++ Type:MultiMooseEnum
Options:nontime, system
Controllable:No
Description:The tag for the matrices this Kernel should fill
- vector_tagsnontimeThe tag for the vectors this Kernel should fill
Default:nontime
C++ Type:MultiMooseEnum
Options:nontime, time
Controllable:No
Description:The tag for the vectors this Kernel should fill
Tagging 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.
- diag_save_inThe name of auxiliary variables to save this Kernel's diagonal Jacobian contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
C++ Type:std::vector<AuxVariableName>
Controllable:No
Description:The name of auxiliary variables to save this Kernel's diagonal Jacobian contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- implicitTrueDetermines whether this object is calculated using an implicit or explicit form
Default:True
C++ Type:bool
Controllable:No
Description:Determines whether this object is calculated using an implicit or explicit form
- save_inThe name of auxiliary variables to save this Kernel's residual contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
C++ Type:std::vector<AuxVariableName>
Controllable:No
Description:The name of auxiliary variables to save this Kernel's residual contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
- seed0The seed for the master random number generator
Default:0
C++ Type:unsigned int
Controllable:No
Description:The seed for the master random number generator
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Advanced Parameters
Input Files
- (modules/xfem/test/tests/moving_interface/verification/2D_xy_lsdep1mat.i)
- (test/tests/kernels/2d_diffusion/2d_diffusion_bodyforce_test.i)
- (modules/solid_mechanics/test/tests/initial_stress/gravity.i)
- (test/tests/multiapps/picard_postprocessor/transient_main.i)
- (test/tests/interfacekernels/2d_interface/coupled_value_coupled_flux.i)
- (test/tests/multiapps/secant_postprocessor/transient_sub.i)
- (test/tests/postprocessors/num_adaptivity_cycles/num_adaptivity_cycles.i)
- (test/tests/time_steppers/timesequence_stepper/timesequence.i)
- (modules/solid_mechanics/test/tests/inertial_torque/simple.i)
- (test/tests/materials/ad_material/ad_stateful_material.i)
- (modules/optimization/examples/simpleTransient/forward_and_adjoint.i)
- (modules/optimization/examples/simpleTransient/forward.i)
- (test/tests/variables/get_elemental_value/get_elemental_value.i)
- (test/tests/postprocessors/element_integral_var_pps/initial_pps.i)
- (test/tests/postprocessors/avg_nodal_var_value/avg_nodal_var_value.i)
- (modules/stochastic_tools/test/tests/surrogates/polynomial_regression/sub_vector.i)
- (modules/heat_transfer/test/tests/sideset_heat_transfer/cfem_gap.i)
- (python/peacock/tests/common/transient_big.i)
- (test/tests/ics/from_exodus_solution/nodal_part1.i)
- (test/tests/variables/mixed_order_variables/mixed_order_variables_test.i)
- (python/mms/test/mms_temporal.i)
- (modules/level_set/test/tests/kernels/advection/advection_mms.i)
- (modules/optimization/test/tests/optimizationreporter/bimaterial/model.i)
- (test/tests/variables/fe_hier/hier-1-3d.i)
- (test/tests/multiapps/restart_multilevel/sub.i)
- (tutorials/tutorial02_multiapps/step01_multiapps/01_parent.i)
- (test/tests/kernels/vector_fe/coupled_electrostatics.i)
- (test/tests/kernels/ode/parsedode_sys_impl_test.i)
- (test/tests/multiapps/restart_multilevel/parent2.i)
- (test/tests/outputs/residual/output_residual_elem.i)
- (test/tests/meshgenerators/lower_d_block_generator/names.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_Cartesian_direct/main.i)
- (test/tests/time_steppers/timesequence_stepper/csvtimesequence.i)
- (test/tests/mortar/continuity-2d-non-conforming/soln-continuity.i)
- (test/tests/outputs/debug/show_var_residual_norms_debug.i)
- (test/tests/tag/2d_diffusion_dg_tag.i)
- (modules/stochastic_tools/examples/surrogates/sub.i)
- (test/tests/outputs/exodus/exodus_side_discontinuous.i)
- (test/tests/kernels/hfem/neumann.i)
- (test/tests/userobjects/interface_user_object/interface_value_rate_increment_user_object_QP.i)
- (modules/stochastic_tools/examples/surrogates/cross_validation/all_sub.i)
- (modules/stochastic_tools/test/tests/reporters/ActiveLearningGP/sub.i)
- (modules/ray_tracing/test/tests/coord_type/rspherical_line_integral.i)
- (test/tests/problems/reference_residual_problem/abs_ref.i)
- (test/tests/time_integrators/implicit-euler/ie-monomials.i)
- (test/tests/userobjects/postprocessor_spatial_user_object/parent.i)
- (test/tests/time_integrators/aee/aee.i)
- (test/tests/interfacekernels/resid_jac_together/jump.i)
- (test/tests/time_integrators/explicit-euler/ee-2d-linear.i)
- (modules/optimization/test/tests/optimizationreporter/nonlinear_material/forward_and_adjoint.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/sub.i)
- (modules/thermal_hydraulics/test/tests/jacobians/materials/ad_solid_material.i)
- (modules/optimization/test/tests/executioners/steady_and_adjoint/nonhomogeneous_bc.i)
- (test/tests/interfacekernels/2d_interface/coupled_value_coupled_flux_with_jump_material.i)
- (test/tests/misc/check_error/missing_req_par_mesh_block_test.i)
- (test/tests/variables/fe_hier/hier-3-1d.i)
- (test/tests/dgkernels/2d_diffusion_dg/no_mallocs_with_action.i)
- (modules/navier_stokes/test/tests/finite_element/ins/mms/supg/supg_adv_dominated_mms.i)
- (test/tests/misc/check_error/missing_material_prop_test.i)
- (modules/stochastic_tools/examples/surrogates/gaussian_process/sub.i)
- (test/tests/multiapps/restart_subapp_ic/parent2.i)
- (test/tests/kernels/ad_jacobians/test.i)
- (test/tests/time_integrators/rk-2/2d-quadratic.i)
- (tutorials/tutorial02_multiapps/step03_coupling/02_parent_picard.i)
- (modules/heat_transfer/test/tests/heat_conduction/coupled_convective_heat_flux/coupled_convective_heat_flux.i)
- (test/tests/bcs/ad_function_neumann_bc/test.i)
- (modules/combined/examples/thermomechanics/circle_thermal_expansion_stress.i)
- (test/tests/time_integrators/explicit-euler/ee-1d-quadratic-neumann.i)
- (modules/xfem/test/tests/moving_interface/verification/2D_rz_homog1mat.i)
- (test/tests/time_integrators/crank-nicolson/cranic.i)
- (modules/heat_transfer/test/tests/radiation_transfer_symmetry/cavity_with_pillars.i)
- (modules/navier_stokes/test/tests/finite_element/ins/energy-conservation/q2q1.i)
- (modules/thermal_hydraulics/test/tests/problems/mms/mms_1phase.i)
- (test/tests/time_integrators/bdf2/bdf2.i)
- (examples/ex13_functions/ex13.i)
- (tutorials/tutorial02_multiapps/step01_multiapps/04_parent_multiple.i)
- (test/tests/time_steppers/postprocessor_dt/postprocessor_dt.i)
- (test/tests/outputs/console/console_final.i)
- (modules/optimization/test/tests/executioners/steady_and_adjoint/self_adjoint.i)
- (test/tests/multiapps/picard_postprocessor/steady_main.i)
- (test/tests/time_integrators/abort/abort.i)
- (modules/optimization/test/tests/executioners/constrained/shape_optimization/forward.i)
- (tutorials/tutorial02_multiapps/step01_multiapps/02_parent_sublimit.i)
- (test/tests/variables/fe_hermite_convergence/hermite_converge_dirichlet.i)
- (test/tests/time_integrators/explicit-euler/ee-2d-quadratic.i)
- (test/tests/preconditioners/reuse/convergence.i)
- (test/tests/time_integrators/convergence/implicit_convergence.i)
- (test/tests/time_integrators/actually_explicit_euler_verification/ee-2d-linear-adapt.i)
- (modules/heat_transfer/test/tests/heat_conduction/coupled_convective_heat_flux/const_hw.i)
- (test/tests/userobjects/interface_user_object/interface_mp_real_user_object_QP.i)
- (test/tests/materials/material/material_test_dg.i)
- (test/tests/postprocessors/pps_interval/pps_bad_interval2.i)
- (test/tests/kernels/ad_scalar_kernel_constraint/diffusion_override_scalar.i)
- (modules/xfem/test/tests/moving_interface/verification/1D_xy_homog1mat.i)
- (test/tests/mesh/named_entities/named_entities_test_xda.i)
- (test/tests/postprocessors/nodal_var_value/nodal_var_value.i)
- (test/tests/dgkernels/3d_diffusion_dg/3d_diffusion_dg_test.i)
- (test/tests/controls/time_periods/dgkernels/dgkernels.i)
- (test/tests/postprocessors/pps_interval/pps_bad_interval3.i)
- (test/tests/transfers/general_field/user_object/duplicated_user_object_tests/sub.i)
- (test/tests/problems/reference_residual_problem/no_ref.i)
- (test/tests/outputs/oversample/over_sampling_second_file.i)
- (test/tests/mortar/continuity-3d-non-conforming/continuity_non_conforming_tet.i)
- (test/tests/userobjects/interface_user_object/interface_value_user_object_QP.i)
- (modules/heat_transfer/test/tests/heat_conduction/coupled_convective_heat_flux/coupled_convective_heat_flux_two_phase.i)
- (tutorials/tutorial02_multiapps/step03_coupling/01_parent.i)
- (modules/stochastic_tools/test/tests/userobjects/inverse_mapping/inverse_map.i)
- (modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined_constM.i)
- (test/tests/mortar/aux-gap/gap.i)
- (test/tests/preconditioners/pbp/pbp_adapt_test.i)
- (test/tests/time_steppers/timesequence_stepper/timesequence_restart3.i)
- (test/tests/bcs/penalty_dirichlet_bc/function_penalty_dirichlet_bc_test.i)
- (test/tests/time_integrators/crank-nicolson/cranic_adapt.i)
- (test/tests/mortar/gap-conductance-2d-non-conforming/gap-conductance.i)
- (test/tests/outputs/exodus/exodus_side_discontinuous_edge2.i)
- (test/tests/kernels/ode/ode_expl_test.i)
- (test/tests/transfers/multiapp_high_order_variable_transfer/parent_L2_Lagrange_userobject.i)
- (test/tests/variables/fe_hermite_convergence/hermite_converge_periodic.i)
- (test/tests/dgkernels/advection_diffusion_mixed_bcs_test_resid_jac/dg_advection_diffusion_test.i)
- (test/tests/auxkernels/element_var/element_var_test.i)
- (test/tests/outputs/exodus/exodus_discontinuous.i)
- (test/tests/auxkernels/element_aux_var/block_global_depend_elem_aux.i)
- (test/tests/time_steppers/timesequence_stepper/exodustimesequence.i)
- (test/tests/mortar/continuity-3d-non-conforming/continuity_tet.i)
- (modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined_basicthm.i)
- (test/tests/nodalkernels/constraint_enforcement/lower-bound.i)
- (test/tests/transfers/multiapp_conservative_transfer/sub_nearest_point.i)
- (test/tests/quadrature/order/material_with_order.i)
- (modules/stochastic_tools/test/tests/reporters/BFActiveLearning/sub_lf.i)
- (modules/stochastic_tools/test/tests/transfers/serialized_solution_transfer/sub.i)
- (test/tests/postprocessors/num_elems/num_elems.i)
- (test/tests/interfacekernels/gmsh_sidesets/coupled_value_coupled_flux.i)
- (test/tests/nodalkernels/constraint_enforcement/ad-upper-and-lower-bound.i)
- (test/tests/restart/start_time_override/start_time_override.i)
- (test/tests/bcs/ad_penalty_dirichlet_bc/function_penalty_dirichlet_bc_test.i)
- (test/tests/misc/line_source/line_source.i)
- (test/tests/mortar/continuity-2d-non-conforming/dual-soln-continuity-vcp.i)
- (test/tests/kernels/coupled_time_derivative/coupled_time_derivative_test.i)
- (test/tests/mortar/continuity-2d-non-conforming/dual-soln-continuity.i)
- (test/tests/transfers/multiapp_userobject_transfer/sub.i)
- (test/tests/materials/stateful_internal_side_uo/internal_side_uo_stateful.i)
- (test/tests/multiapps/clone_parent_mesh/sub.i)
- (test/tests/multiapps/clone_parent_mesh/main.i)
- (modules/ray_tracing/test/tests/coord_type/rz_line_integral.i)
- (test/tests/functions/parsed/mms_transient_coupled.i)
- (test/tests/transfers/coord_transform/rz-xyz/3d-xyz.i)
- (test/tests/problems/reference_residual_problem/abs_ref_acceptable.i)
- (test/tests/mortar/continuity-2d-non-conforming/sequencing-stateful-soln-continuity.i)
- (test/tests/time_integrators/tvdrk2/1d-linear.i)
- (test/tests/time_integrators/dirk/dirk-2d-heat.i)
- (test/tests/interfacekernels/1d_interface/reaction_1D_transient.i)
- (test/tests/kernels/ad_scalar_kernel_constraint/diffusion_bipass_scalar.i)
- (test/tests/postprocessors/interface_diffusive_flux/interface_diffusive_flux.i)
- (test/tests/bcs/vectorpostprocessor/vectorpostprocessor.i)
- (test/tests/time_steppers/timesequence_stepper/timesequence_restart2.i)
- (test/tests/kernels/ad_jacobians/adfunction.i)
- (modules/optimization/test/tests/executioners/steady_and_adjoint/multi_variable.i)
- (test/tests/postprocessors/element_time_derivative/el_time_deriv_1d_test.i)
- (test/tests/kernels/scalar_kernel_constraint/scalar_constraint_kernel.i)
- (test/tests/transfers/multiapp_userobject_transfer/tosub_displaced_sub.i)
- (test/tests/transfers/multiapp_high_order_variable_transfer/parent_L2_Lagrange_conservative.i)
- (test/tests/time_integrators/rk-2/1d-linear.i)
- (modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/mms/lid-driven-skewed/hybrid-skewed-vortex.i)
- (test/tests/mortar/continuity-2d-conforming/conforming-2nd-order.i)
- (test/tests/time_integrators/actually_explicit_euler_verification/ee-2d-quadratic.i)
- (test/tests/mortar/convergence-studies/continuity-3d/continuity.i)
- (test/tests/kernels/vector_fe/coupled_scalar_vector_jacobian.i)
- (test/tests/misc/check_error/missing_material_prop_test2.i)
- (modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined.i)
- (test/tests/userobjects/internal_side_user_object/internal_side_user_object_two_materials.i)
- (test/tests/executioners/executioner/steady.i)
- (test/tests/bcs/function_dirichlet_bc/test.i)
- (modules/xfem/test/tests/moving_interface/verification/1D_xy_lsdep1mat.i)
- (test/tests/variables/fe_hier/hier-2-3d.i)
- (test/tests/bcs/nodal_normals/cylinder_hexes_1st_2nd.i)
- (test/tests/adaptivity/interval/adapt_interval.i)
- (test/tests/problems/no_kernel_coverage_check/no_coverage_check.i)
- (modules/level_set/test/tests/functions/olsson_bubble/olsson_bubble_adjac.i)
- (test/tests/kernels/vector_fe/electromagnetic_coulomb_gauge.i)
- (modules/stochastic_tools/test/tests/surrogates/pod_rb/internal/sub.i)
- (modules/navier_stokes/test/tests/finite_element/ins/energy-conservation/q1q1.i)
- (test/tests/mortar/3d-periodic/periodic.i)
- (test/tests/postprocessors/nodal_var_value/screen_output_test.i)
- (test/tests/variables/fe_hier/hier-1-2d.i)
- (modules/porous_flow/test/tests/energy_conservation/heat04.i)
- (test/tests/vectorpostprocessors/dynamic_point_sampler/dynamic_point_sampler.i)
- (test/tests/bcs/second_deriv/test_lap_bc.i)
- (test/tests/time_integrators/actually_explicit_euler_verification/ee-2d-linear.i)
- (modules/richards/test/tests/jacobian_2/jnQ2P.i)
- (modules/heat_transfer/test/tests/ad_convective_heat_flux/coupled.i)
- (test/tests/adaptivity/initial_marker/initial_marker.i)
- (test/tests/bcs/nodal_normals/circle_quads.i)
- (test/tests/misc/save_in/block-restricted-save-in.i)
- (test/tests/materials/boundary_material/bnd_coupling_vol.i)
- (test/tests/kernels/block_kernel/block_kernel_test.i)
- (test/tests/restart/restart_diffusion/restart_diffusion_test_transient.i)
- (test/tests/time_integrators/dirk/dirk-2d-heat-adap.i)
- (test/tests/mesh/adapt/initial_adaptivity_test.i)
- (test/tests/kernels/hfem/robin.i)
- (test/tests/ics/from_exodus_solution/elem_part1.i)
- (test/tests/variables/fe_hier/hier-1-1d.i)
- (test/tests/restart/restart_steady_from_transient/steady_from_transient_restart.i)
- (test/tests/time_steppers/time_stepper_system/AB2PredictorCorrector.i)
- (test/tests/time_integrators/actually_explicit_euler_verification/ee-1d-quadratic.i)
- (test/tests/variables/fe_hier/hier-2-2d.i)
- (test/tests/dgkernels/3d_diffusion_dg/3d_diffusion_p_refinement.i)
- (test/tests/executioners/executioner/sln-time-adapt.i)
- (test/tests/adaptivity/max_h_level/max_h_level.i)
- (modules/scalar_transport/test/tests/ncp-lms/interpolated-ncp-lm-nodal-enforcement-nodal-forces.i)
- (test/tests/transfers/multiapp_userobject_transfer/tosub_sub.i)
- (test/tests/multiapps/steffensen_postprocessor/transient_main.i)
- (modules/combined/test/tests/poro_mechanics/pp_generation_unconfined_action.i)
- (modules/stochastic_tools/examples/parameter_study/diffusion.i)
- (test/tests/problems/no_material_dependency_check/no_material_coverage_check.i)
- (tutorials/tutorial02_multiapps/step02_transfers/01_parent_meshfunction.i)
- (test/tests/multiapps/grid-sequencing/vi-coarse.i)
- (test/tests/time_integrators/actually_explicit_euler_verification/ee-1d-linear.i)
- (test/tests/postprocessors/nodal_extreme_value/nodal_max_value_test.i)
- (test/tests/outputs/oversample/adapt.i)
- (test/tests/nodalkernels/constraint_enforcement/upper-and-lower-bound.i)
- (test/tests/preconditioners/vcp/vcp_test.i)
- (test/tests/bcs/function_neumann_bc/test.i)
- (tutorials/tutorial02_multiapps/step02_transfers/02_parent_nearestnode.i)
- (test/tests/variables/fe_hermite/hermite-3-2d.i)
- (modules/xfem/test/tests/moving_interface/verification/1D_xy_discrete2mat.i)
- (test/tests/executioners/executioner/transient.i)
- (test/tests/adaptivity/dont-p-refine/test.i)
- (tutorials/tutorial02_multiapps/step02_transfers/03_parent_uot.i)
- (modules/stochastic_tools/test/tests/surrogates/pod_rb/boundary/sub.i)
- (test/tests/postprocessors/mms_slope/mms_slope_test.i)
- (test/tests/nodalkernels/constraint_enforcement/upper-bound.i)
- (test/tests/multiapps/restart/parent2.i)
- (test/tests/outputs/debug/show_execution_kernels_bcs.i)
- (test/tests/transfers/multiapp_high_order_variable_transfer/parent_L2_Lagrange.i)
- (test/tests/multiapps/grid-sequencing/vi-fine.i)
- (test/tests/variables/fe_monomial_const/monomial-const-2d.i)
- (test/tests/auxkernels/mesh_integer/dg_mesh_integer.i)
- (test/tests/postprocessors/num_adaptivity_cycles/num_adaptivity_cycles_toggle_adaptivity.i)
- (modules/functional_expansion_tools/examples/2D_interface_no_material/main.i)
- (test/tests/time_integrators/multi_stage_time_integrator/unconverged_1st_stage.i)
- (test/tests/multiapps/restart_multilevel/subsub.i)
- (modules/xfem/test/tests/moving_interface/verification/1D_rz_lsdep1mat.i)
- (test/tests/time_steppers/timesequence_stepper/timesequence_restart1.i)
- (modules/stochastic_tools/test/tests/surrogates/cross_validation/sub_vector.i)
- (test/tests/mortar/continuity-2d-non-conforming/soln-continuity-pg.i)
- (test/tests/outputs/variables/show_single_vars.i)
- (test/tests/variables/fe_monomial_const/monomial-const-3d.i)
- (modules/stochastic_tools/test/tests/reporters/mapping/map_sub.i)
- (test/tests/variables/fe_hier/hier-3-2d.i)
- (test/tests/mesh/named_entities/named_entities_test.i)
- (test/tests/bcs/nodal_normals/cylinder_hexes.i)
- (modules/heat_transfer/test/tests/recover/recover.i)
- (modules/stochastic_tools/test/tests/surrogates/poly_chaos/sub.i)
- (test/tests/dampers/min_damping/min_elem_damping.i)
- (modules/navier_stokes/test/tests/finite_element/ins/mms/pspg/pspg_mms_test.i)
- (test/tests/auxkernels/function_scalar_aux/function_scalar_aux.i)
- (test/tests/dgkernels/dg_displacement/dg_displacement.i)
- (modules/navier_stokes/test/tests/finite_element/ins/mms/supg/supg_mms_test.i)
- (test/tests/postprocessors/element_h1_error_pps/element_h1_error_pp_test.i)
- (test/tests/outputs/oversample/over_sampling_test_file.i)
- (modules/optimization/test/tests/optimizationreporter/constant_heat_source/forward_nonLinear.i)
- (test/tests/dgkernels/hfem/hfem_jacobian.i)
- (test/tests/interfacekernels/2d_interface/coupled_value_coupled_flux_dot.i)
- (modules/porous_flow/test/tests/mass_conservation/mass03.i)
- (modules/geochemistry/test/tests/kernels/time_deriv_1.i)
- (modules/porous_flow/test/tests/energy_conservation/heat04_fullysat_action.i)
- (test/tests/kernels/diffusion_with_hanging_node/ad_simple_diffusion.i)
- (python/peacock/tests/common/transient.i)
- (test/tests/actions/meta_action_multiple_tasks/circle_quads.i)
- (test/tests/nodalkernels/constraint_enforcement/vi-bounding.i)
- (test/tests/executioners/executioner/steady_state_check_test.i)
- (test/tests/materials/functor_properties/bc/bc.i)
- (tutorials/tutorial02_multiapps/step01_multiapps/05_parent_parallel.i)
- (tutorials/tutorial02_multiapps/step01_multiapps/06_parent_twoapps.i)
- (modules/stochastic_tools/test/tests/variablemappings/pod_mapping/sub.i)
- (test/tests/kernels/ode/ode_sys_impl_test.i)
- (modules/combined/test/tests/elastic_patch/ad_elastic_patch_rz.i)
- (test/tests/multiapps/secant_postprocessor/transient_main.i)
- (test/tests/misc/check_error/missing_coupled_mat_prop_test.i)
- (test/tests/mortar/aux-gap/mismatch.i)
- (test/tests/functions/pps_function/pp_function.i)
- (examples/ex14_pps/ex14_compare_solutions_1.i)
- (test/tests/materials/material/exception_material.i)
- (modules/navier_stokes/test/tests/finite_element/ins/mms/supg/supg_pspg_adv_dominated_mms.i)
- (modules/optimization/test/tests/optimizationreporter/material/forward.i)
- (test/tests/kernels/ad_scalar_kernel_constraint/scalar_constraint_together.i)
- (test/tests/multiapps/steffensen_postprocessor/steady_main.i)
- (test/tests/multiapps/steffensen_postprocessor/steady_sub.i)
- (modules/stochastic_tools/test/tests/reporters/BFActiveLearning/sub.i)
- (test/tests/restart/restart_subapp_not_parent/complete_solve_no_subapp.i)
- (test/tests/materials/ad_material/conversion/1d_dirichlet.i)
- (test/tests/outputs/debug/show_var_residual_norms.i)
- (test/tests/time_integrators/explicit-euler/ee-2d-linear-adapt.i)
- (test/tests/vectorpostprocessors/element_variables_difference_max/element_variables_difference_max.i)
- (modules/optimization/examples/materialTransient/forward_and_adjoint.i)
- (modules/fluid_properties/test/tests/stiffened_gas/test.i)
- (test/tests/interfacekernels/adaptivity/adaptivity.i)
- (test/tests/time_integrators/implicit-euler/ie_adapt.i)
- (test/tests/interfacekernels/ik_displaced/displaced.i)
- (test/tests/bcs/ad_function_dirichlet_bc/test.i)
- (test/tests/dgkernels/adaptivity/adaptivity.i)
- (test/tests/time_steppers/function_dt/function_dt_no_interpolation.i)
- (test/tests/restart/restart_transient_from_transient/pseudo_trans_with_2subs.i)
- (test/tests/dampers/bounding_value_nodal_damper/bounding_value_max_test.i)
- (test/tests/postprocessors/interface_value/interface_fe_variable_value_postprocessor.i)
- (test/tests/restart/restart_subapp_not_parent/two_step_solve_parent.i)
- (modules/xfem/test/tests/moving_interface/verification/2D_rz_lsdep1mat.i)
- (modules/combined/test/tests/poro_mechanics/pp_generation.i)
- (test/tests/postprocessors/side_pps/side_pps_multi_bnd_test.i)
- (test/tests/kernels/scalar_kernel_constraint/diffusion_bipass_scalar.i)
- (test/tests/transfers/multiapp_conservative_transfer/sub_power_density.i)
- (test/tests/restart/restart_transient_from_steady/restart_trans_with_2subs.i)
- (test/tests/transfers/multiapp_conservative_transfer/parent_nearest_point.i)
- (modules/phase_field/test/tests/KKS_system/lagrange_multiplier.i)
- (modules/porous_flow/test/tests/poro_elasticity/pp_generation_action.i)
- (test/tests/dampers/min_damping/min_nodal_damping.i)
- (test/tests/bcs/nodal_normals/cylinder_hexes_2nd.i)
- (modules/porous_flow/test/tests/energy_conservation/heat04_action_KT.i)
- (test/tests/userobjects/nearest_point_layered_average/nearest_radius_layered_average.i)
- (tutorials/tutorial02_multiapps/step02_transfers/04_parent_multiscale.i)
- (modules/porous_flow/test/tests/poro_elasticity/pp_generation.i)
- (modules/stochastic_tools/examples/sobol/diffusion.i)
- (test/tests/dampers/interactions/interacting_node_elem_dampers.i)
- (test/tests/problems/reference_residual_problem/reference_residual.i)
- (tutorials/tutorial02_multiapps/step01_multiapps/03_parent_subcycle.i)
- (test/tests/restart/restart_transient_from_steady/restart_trans_with_sub.i)
- (modules/scalar_transport/test/tests/ncp-lms/interpolated-ncp-lm-nodal-enforcement.i)
- (modules/combined/examples/publications/rapid_dev/fig6.i)
- (test/tests/auxkernels/mesh_integer/mesh_integer.i)
- (test/tests/restart/restart_subapp_not_parent/two_step_solve_sub.i)
- (modules/stochastic_tools/examples/surrogates/combined/trans_diff_2d/trans_diff_sub.i)
- (test/tests/dgkernels/dg_block_restrict/2d_dg_diffusion_block_restrict.i)
- (test/tests/controls/libtorch_nn_control/read_control.i)
- (test/tests/constraints/overwrite_variables/test_balance.i)
- (test/tests/dgkernels/2d_diffusion_dg/dg_stateful.i)
- (tutorials/tutorial02_multiapps/step03_coupling/03_parent_subcycling_picard.i)
- (test/tests/misc/check_error/coupled_grad_without_declare.i)
- (test/tests/restart/restart_add_variable/transient_with_stateful.i)
- (test/tests/kernels/ad_2d_diffusion/2d_diffusion_bodyforce_test.i)
- (test/tests/userobjects/nearest_point_layered_average/radius_points_from_uo.i)
- (test/tests/restart/restart_add_variable/add_variable_restart.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_convection/plate.parent.i)
- (modules/functional_expansion_tools/examples/2D_interface_different_submesh/main.i)
- (test/tests/transfers/general_field/user_object/duplicated_user_object_tests/tosub_sub.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_temperature/phy.parent.i)
- (python/peacock/tests/common/transient_with_date.i)
- (test/tests/postprocessors/num_nodes/num_nodes.i)
- (test/tests/multiapps/secant_postprocessor/steady_main.i)
- (test/tests/meshgenerators/lower_d_block_generator/ids.i)
- (test/tests/userobjects/domain-user-object/measure-conservation-interface.i)
- (test/tests/restart/restart_steady_from_transient/transient.i)
- (test/tests/indicators/laplacian_jump_indicator/biharmonic_transient.i)
- (test/tests/kernels/vector_fe/coupled_scalar_vector.i)
- (modules/stochastic_tools/test/tests/surrogates/nearest_point/sub_vector.i)
- (modules/optimization/test/tests/optimizationreporter/mesh_source/forward.i)
- (test/tests/restart/restart_subapp_not_parent/two_step_solve_sub_restart.i)
- (test/tests/restart/restart_transient_from_steady/steady_with_sub.i)
- (modules/solid_mechanics/test/tests/initial_stress/gravity_with_aux.i)
- (modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined_fully_saturated_volume.i)
- (test/tests/misc/check_error/incomplete_kernel_variable_coverage_test.i)
- (modules/combined/test/tests/poro_mechanics/pp_generation_unconfined.i)
- (test/tests/restart/restart_diffusion/exodus_refined_refined_restart_2_test.i)
- (test/tests/time_integrators/convergence/explicit_convergence.i)
- (test/tests/problems/no_material_coverage_check/no_material_coverage_check.i)
- (modules/stochastic_tools/examples/surrogates/pod_rb/2d_multireg/sub.i)
- (test/tests/postprocessors/pps_interval/pps_interval_mismatch.i)
- (test/tests/postprocessors/element_l2_difference/element_l2_difference.i)
- (modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined_fully_saturated.i)
- (test/tests/bcs/nodal_normals/circle_tris.i)
- (test/tests/ics/from_exodus_solution/nodal_part2.i)
- (test/tests/preconditioners/vcp/no_condense_test.i)
- (test/tests/time_integrators/implicit-euler/ie.i)
- (modules/optimization/test/tests/misc/scaling_test/scaling_test.i)
- (test/tests/utils/spline_interpolation/bicubic_spline_interpolation_y_normal.i)
- (modules/fluid_properties/test/tests/ideal_gas/test.i)
- (tutorials/tutorial02_multiapps/step01_multiapps/07_parent_multilevel.i)
- (test/tests/variables/fe_hermite/hermite-3-3d.i)
- (test/tests/multiapps/picard/function_dt_parent.i)
- (examples/ex14_pps/ex14_compare_solutions_2.i)
- (test/tests/time_steppers/timesequence_stepper/timesequence_restart_failure.i)
- (test/tests/kernels/ad_reaction/ad_reaction.i)
- (test/tests/kernels/scalar_constraint/scalar_constraint_kernel.i)
- (modules/phase_field/test/tests/KKS_system/nonlinear.i)
- (test/tests/multiapps/picard/function_dt_sub.i)
- (examples/ex14_pps/ex14.i)
- (test/tests/time_integrators/tvdrk2/2d-quadratic.i)
- (test/tests/variables/fe_hier/hier-3-3d.i)
- (modules/stochastic_tools/test/tests/surrogates/pod_rb/errors/sub.i)
- (test/tests/bcs/functor_dirichlet_bc/test.i)
- (test/tests/mortar/convergence-studies/solution-continuity/continuity.i)
- (test/tests/mortar/continuity-3d-non-conforming/continuity_penalty_sphere_hex.i)
- (test/tests/postprocessors/element_l2_error_pps/element_l2_error_pp_test.i)
- (modules/stochastic_tools/test/tests/userobjects/inverse_mapping/sub.i)
- (test/tests/time_integrators/bdf2/bdf2_adapt.i)
- (test/tests/restart/restart_transient_from_transient/restart_trans_with_2subs.i)
- (test/tests/misc/check_error/subdomain_restricted_auxkernel_mismatch.i)
- (test/tests/time_integrators/explicit-euler/ee-1d-quadratic.i)
- (test/tests/mortar/continuity-3d-non-conforming/continuity_mixed.i)
- (modules/stochastic_tools/examples/parameter_study/diffusion_vector.i)
- (test/tests/outputs/residual/output_residual_test.i)
- (test/tests/postprocessors/nodal_var_value/pps_output_test.i)
- (test/tests/executioners/steady_time/steady_time.i)
- (test/tests/misc/save_in/dg_save_in_test.i)
- (test/tests/dampers/bounding_value_element_damper/bounding_value_max_test.i)
- (test/tests/outputs/oversample/over_sampling_test_gen.i)
- (test/tests/postprocessors/num_vars/num_vars.i)
- (test/tests/dampers/min_damping/min_general_damping.i)
- (modules/optimization/test/tests/optimizationreporter/mesh_source/forward_and_adjoint.i)
- (test/tests/mesh/custom_partitioner/custom_linear_partitioner_restart_test.i)
- (test/tests/postprocessors/element_time_derivative/element_time_derivative_test.i)
- (test/tests/mortar/periodic-value/periodic.i)
- (modules/optimization/test/tests/optimizationreporter/bimaterial/model_and_adjoint.i)
- (test/tests/multiapps/restart_multilevel/parent.i)
- (test/tests/variables/fe_hier/hier-2-1d.i)
- (test/tests/auxkernels/constant_scalar_aux/constant_scalar_aux.i)
- (test/tests/userobjects/postprocessor_spatial_user_object/sub.i)
- (test/tests/restart/restart_diffusion/restart_diffusion_test_transient_new_name.i)
- (modules/optimization/test/tests/executioners/transient_and_adjoint/nonuniform_tstep.i)
- (test/tests/userobjects/interface_user_object/interface_userobject_material_value.i)
- (modules/stochastic_tools/test/tests/reporters/parallel_storage/sub.i)
- (test/tests/executioners/time_period/time_period_test.i)
- (modules/optimization/test/tests/outputs/exodus_optimization_steady/forward.i)
- (test/tests/executioners/transient_sync_time/transient_time_interval_output_test.i)
- (test/tests/time_integrators/actually_explicit_euler_verification/ee-1d-quadratic-neumann.i)
- (test/tests/problems/reference_residual_problem/ad_abs_ref.i)
- (modules/solid_mechanics/test/tests/initial_stress/gravity_cosserat.i)
- (test/tests/postprocessors/element_average_value/elem_pps_multi_block_test.i)
- (modules/fluid_properties/test/tests/calorically_imperfect_gas/test.i)
- (modules/combined/test/tests/elastic_patch/elastic_patch_rz.i)
- (modules/heat_transfer/test/tests/radiation_transfer_symmetry/cavity_with_pillars_symmetry_bc.i)
- (test/tests/adaptivity/initial_adapt/initial_adapt.i)
- (test/tests/materials/material/adv_mat_couple_test2.i)
- (modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/mms/lid-driven/hybrid-cg-dg-mms.i)
- (test/tests/executioners/solve_type_linear/linear_with_full_smp.i)
- (test/tests/multiapps/picard_postprocessor/transient_sub.i)
- (test/tests/auxkernels/time_integration/time_integration.i)
- (modules/optimization/examples/simpleTransient/nonlinear_forward_and_adjoint.i)
- (test/tests/mortar/continuity-2d-conforming/conforming.i)
- (test/tests/interfacekernels/1d_interface/mixed_shapes.i)
- (test/tests/userobjects/internal_side_user_object/internal_side_user_object.i)
- (python/mms/test/mms_spatial.i)
- (test/tests/kernels/vector_fe/coupled_scalar_default_vector_value.i)
- (modules/porous_flow/test/tests/poro_elasticity/pp_generation_fullysat_action.i)
- (modules/xfem/test/tests/moving_interface/verification/2D_xy_homog1mat.i)
- (test/tests/transfers/multiapp_conservative_transfer/parent_power_density.i)
- (test/tests/transfers/multiapp_conservative_transfer/sub_userobject.i)
- (modules/stochastic_tools/examples/parameter_study/nonlin_diff_react/nonlin_diff_react_sub.i)
- (test/tests/controls/bool_function_control/bool_function_control.i)
- (test/tests/multiapps/picard_postprocessor/steady_sub.i)
- (modules/optimization/examples/materialTransient/forward.i)
- (test/tests/misc/check_error/incomplete_kernel_block_coverage_test.i)
- (test/tests/mortar/continuity-2d-conforming/conforming_two_var.i)
- (modules/functional_expansion_tools/examples/2D_interface/main.i)
- (test/tests/mortar/continuity-3d-non-conforming/continuity_penalty_tet.i)
- (test/tests/auxkernels/error_function_aux/error_function_aux.i)
- (test/tests/postprocessors/relative_solution_difference_norm/test.i)
- (modules/xfem/test/tests/moving_interface/verification/1D_rz_homog1mat.i)
- (test/tests/utils/spline_interpolation/bicubic_spline_interpolation.i)
- (test/tests/bcs/dmg_periodic/dmg_simple_periodic_bc.i)
- (test/tests/materials/material/adv_mat_couple_test.i)
- (test/tests/kernels/scalar_kernel_constraint/diffusion_override_scalar.i)
- (test/tests/executioners/transient_sync_time/transient_sync_time_test.i)
- (test/tests/preconditioners/smp/smp_single_adapt_test.i)
- (modules/heat_transfer/test/tests/heat_conduction/coupled_convective_heat_flux/on_off.i)
- (test/tests/dgkernels/ad_dg_diffusion/2d_diffusion_ad_dg_test.i)
- (test/tests/dgkernels/2d_diffusion_dg/2d_diffusion_dg_test.i)
- (test/tests/postprocessors/num_dofs/num_dofs.i)
- (test/tests/multiapps/restart/parent.i)
- (modules/level_set/test/tests/verification/1d_level_set_mms/level_set_mms.i)
- (test/tests/bcs/penalty_dirichlet_bc/penalty_dirichlet_bc_test.i)
- (modules/functional_expansion_tools/test/tests/standard_use/interface_coupled.i)
- (modules/optimization/test/tests/executioners/transient_and_adjoint/multi_variable.i)
- (modules/porous_flow/test/tests/energy_conservation/heat04_action.i)
- (test/tests/multiapps/secant_postprocessor/steady_sub.i)
- (modules/optimization/examples/simpleTransient/forward_mesh.i)
- (test/tests/multiapps/restart_subapp_ic/parent.i)
- (test/tests/executioners/executioner/steady-adapt.i)
- (modules/optimization/test/tests/executioners/transient_and_adjoint/self_adjoint.i)
- (test/tests/multiapps/grid-sequencing/vi-fine-alone.i)
- (test/tests/kernels/forcing_function/forcing_function_test.i)
- (test/tests/postprocessors/pps_interval/pps_out_interval.i)
- (modules/heat_transfer/test/tests/convective_heat_flux/coupled.i)
- (test/tests/tag/tag_interface_kernels.i)
- (modules/optimization/test/tests/optimizationreporter/constant_heat_source/forward.i)
- (python/peacock/tests/common/oversample.i)
- (test/tests/transfers/general_field/user_object/duplicated_user_object_tests/tosub_displaced_sub.i)
- (test/tests/functions/constant_function/constant_function_test.i)
- (test/tests/interfacekernels/hybrid/interface.i)
- (modules/optimization/test/tests/executioners/steady_and_adjoint/nonlinear_diffusion.i)
- (modules/phase_field/test/tests/KKS_system/kks_multiphase.i)
- (test/tests/nodalkernels/penalty_dirichlet/nodal_penalty_dirichlet.i)
- (test/tests/dgkernels/2d_diffusion_dg/no_functor_additions.i)
- (test/tests/time_integrators/explicit-euler/ee-1d-linear.i)
- (python/peacock/tests/input_tab/InputTree/gold/transient.i)
- (test/tests/multiapps/restart/sub.i)
- (test/tests/bcs/ad_penalty_dirichlet_bc/penalty_dirichlet_bc_test.i)
- (test/tests/fvkernels/fv_adapt/transient-adapt.i)
- (test/tests/outputs/debug/show_execution_userobjects.i)
- (test/tests/utils/spline_interpolation/bicubic_spline_interpolation_x_normal.i)
- (test/tests/multiapps/steffensen_postprocessor/transient_sub.i)
- (test/tests/postprocessors/element_integral_var_pps/pps_old_value.i)
- (test/tests/multiapps/restart_subapp_ic/sub.i)
- (test/tests/interfacekernels/3d_interface/coupled_value_coupled_flux.i)
- (test/tests/restart/restart_transient_from_steady/steady_with_2subs.i)
- (test/tests/time_steppers/timesequence_stepper/timesequence_failed_solve.i)
- (test/tests/variables/fe_monomial_const/monomial-const-1d.i)
- (test/tests/kernels/coupled_time_derivative/ad_coupled_time_derivative_test.i)
- (modules/stochastic_tools/test/tests/surrogates/load_store/sub.i)
- (test/tests/postprocessors/num_adaptivity_cycles/num_adaptivity_cycles_toggle_adaptivity_wait.i)
- (modules/combined/test/tests/elastic_thermal_patch/elastic_thermal_patch_rz.i)
- (test/tests/postprocessors/element_vec_l2_error_pps/element_vec_l2_error.i)
- (test/tests/postprocessors/postprocessor_dependency/element_side_pp.i)
- (test/tests/userobjects/side_uo_with_lowerd_use/side-uo-with-lower-d-use.i)
- (test/tests/time_steppers/function_dt/function_dt_min.i)
- (modules/stochastic_tools/examples/surrogates/polynomial_regression/sub.i)
- (modules/optimization/test/tests/executioners/transient_and_adjoint/nonlinear_diffusivity.i)
- (test/tests/multiapps/restart_subapp_ic/sub2.i)
- (modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_1D.i)
- (test/tests/kernels/scalar_constraint/scalar_constraint_kernel_disp.i)
- (test/tests/misc/initial_solution_copy/solutions_equal.i)
- (test/tests/mortar/convergence-studies/gap-conductance/gap-conductance.i)
- (test/tests/preconditioners/pbp/pbp_dg_test.i)
- (modules/richards/test/tests/jacobian_2/jn_fu_01.i)
- (test/tests/multiapps/restart/sub2.i)
- (test/tests/interfacekernels/3d_interface/coupled_value_coupled_flux_with_jump_material.i)
- (test/tests/variables/fe_hermite/hermite-3-1d.i)
- (test/tests/ics/from_exodus_solution/elem_part2.i)
- (test/tests/multiapps/grid-sequencing/vi-coarser.i)
- (test/tests/postprocessors/avg_nodal_var_value/avg_nodal_var_value_ts_begin.i)
- (modules/level_set/test/tests/verification/1d_level_set_supg_mms/1d_level_set_supg_mms.i)
- (modules/heat_transfer/test/tests/convective_heat_flux/t_inf.i)
- (test/tests/kernels/forcing_function/forcing_function_error_check.i)
- (modules/electromagnetics/test/tests/kernels/scalar_complex_helmholtz/scalar_complex_helmholtz.i)
- (test/tests/mortar/continuity-3d-non-conforming/continuity_sphere_hex.i)
- (test/tests/outputs/exodus/variable_output_test.i)
- (modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_ktemp_1D.i)
- (modules/stochastic_tools/examples/parameter_study/diffusion_time.i)
- (test/tests/restart/restart_diffusion/exodus_refined_restart_2_test.i)
- (test/tests/misc/check_error/subdomain_restricted_kernel_mismatch.i)
- (test/tests/indicators/laplacian_jump_indicator/biharmonic.i)
- (modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined_constM_action.i)
Child Objects
(test/tests/kernels/block_kernel/block_kernel_test.i)
[Mesh]
file = rectangle.e
uniform_refine = 1
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
initial_condition = 1.0
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
block = 1
value = 10
function = 'x+y'
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
num_steps = 10
[]
[Outputs]
file_base = out
exodus = true
[]
(modules/xfem/test/tests/moving_interface/verification/2D_xy_lsdep1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: 2D
# Coordinate System: xy
# Material Numbers/Types: level set dep 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# Transient 2D heat transfer problem in Cartesian coordinates designed with
# the Method of Manufactured Solutions. This problem was developed to verify
# XFEM performance on linear elements in the presence of a moving interface
# sweeping across the x-y coordinates of a system with thermal conductivity
# dependent upon the transient level set function. This problem can be
# exactly evaluated by FEM/Moose without the moving interface. Both the
# temperature and level set function are designed to be linear to attempt to
# minimize the error between the Moose/exact solution and XFEM results.
# Results:
# The temperature at the bottom left boundary (x=0, y=0) exhibits the largest
# difference between the FEM/Moose solution and XFEM results. We present the
# XFEM results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 479.9998738
# 0.6 520 519.9995114
# 0.8 560 559.9989360
# 1.0 600 599.9983833
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraints]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-100*x-100*y+200)-(5*t/1.04)'
[../]
[./neumann_func]
type = ParsedFunction
expression = '((0.01/1.04)*(-2.5*x-2.5*y-t)+1.55)*100*t'
[../]
[./dirichlet_right_func]
type = ParsedFunction
expression = '(-100*y+100)*t+400'
[../]
[./dirichlet_top_func]
type = ParsedFunction
expression = '(-100*x+100)*t+400'
[../]
[./k_func]
type = ParsedFunction
expression = '(0.01/1.04)*(-2.5*x-2.5*y-t)+1.55'
[../]
[./ls_func]
type = ParsedFunction
expression = '-0.5*(x+y) + 1.04 -0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericFunctionMaterial
prop_names = 'diffusion_coefficient'
prop_values = 'k_func'
[../]
[]
[BCs]
[./left_du]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = FunctionDirichletBC
variable = u
boundary = 'right'
function = dirichlet_right_func
[../]
[./bottom_du]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = neumann_func
[../]
[./top_u]
type = FunctionDirichletBC
variable = u
boundary = 'top'
function = dirichlet_top_func
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/kernels/2d_diffusion/2d_diffusion_bodyforce_test.i)
###########################################################
# This is a simple test of the Kernel System.
# It solves the Laplacian equation on a small 2x2 grid.
# The "Diffusion" kernel is used to calculate the
# residuals of the weak form of this operator. The
# "BodyForce" kernel is used to apply a time-dependent
# volumetric source.
###########################################################
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./bf]
type = BodyForce
variable = u
postprocessor = ramp
[../]
[]
[Functions]
[./ramp]
type = ParsedFunction
expression = 't'
[../]
[]
[Postprocessors]
[./ramp]
type = FunctionValuePostprocessor
function = ramp
execute_on = linear
[../]
[]
[BCs]
active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[]
[Executioner]
type = Transient
dt = 1.0
end_time = 1.0
solve_type = 'NEWTON'
[]
[Outputs]
file_base = bodyforce_out
exodus = true
[]
(modules/solid_mechanics/test/tests/initial_stress/gravity.i)
# Apply an initial stress that should be
# exactly that caused by gravity, and then
# do a transient step to check that nothing
# happens
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 10
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -10
zmax = 0
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[./weight]
type = BodyForce
variable = disp_z
value = -0.5 # this is density*gravity
[../]
[]
[BCs]
# back = zmin
# front = zmax
# bottom = ymin
# top = ymax
# left = xmin
# right = xmax
[./x]
type = DirichletBC
variable = disp_x
boundary = 'left right'
value = 0
[../]
[./y]
type = DirichletBC
variable = disp_y
boundary = 'bottom top'
value = 0
[../]
[./z]
type = DirichletBC
variable = disp_z
boundary = 'back'
value = 0
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[]
[Functions]
[./weight]
type = ParsedFunction
expression = '0.5*z' # initial stress that should result from the weight force
[../]
[./kxx]
type = ParsedFunction
expression = '0.4*z' # some arbitrary xx and yy stress that should not affect the result
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1
poissons_ratio = 0.25
[../]
[./strain]
type = ComputeSmallStrain
eigenstrain_names = ini_stress
[../]
[./strain_from_initial_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = 'kxx 0 0 0 kxx 0 0 0 weight'
eigenstrain_name = ini_stress
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
end_time = 1.0
dt = 1.0
solve_type = NEWTON
type = Transient
nl_abs_tol = 1E-8
nl_rel_tol = 1E-12
l_tol = 1E-3
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
file_base = gravity
exodus = true
[]
(test/tests/multiapps/picard_postprocessor/transient_main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[time]
type = TimeDerivative
variable = u
[]
[source]
type = BodyForce
variable = u
value = 1
[]
[]
[BCs]
[left]
type = PostprocessorDirichletBC
variable = u
boundary = left
postprocessor = 'from_sub'
[]
[]
[Postprocessors]
[coupling_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[from_sub]
type = Receiver
default = 0
[]
[to_sub]
type = SideAverageValue
variable = u
boundary = right
[]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
# App coupling parameters
fixed_point_max_its = 30
relaxation_factor = 0.8
transformed_postprocessors = 'from_sub'
[]
[Outputs]
csv = true
exodus = false
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = 'transient_sub.i'
clone_parent_mesh = true
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[left_from_sub]
type = MultiAppPostprocessorTransfer
from_multi_app = sub
from_postprocessor = 'to_main'
to_postprocessor = 'from_sub'
reduction_type = 'average'
[]
[right_to_sub]
type = MultiAppPostprocessorTransfer
to_multi_app = sub
from_postprocessor = 'to_sub'
to_postprocessor = 'from_main'
[]
[]
(test/tests/interfacekernels/2d_interface/coupled_value_coupled_flux.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./break_boundary]
input = interface
type = BreakBoundaryOnSubdomainGenerator
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./v]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[../]
[./source_u]
type = BodyForce
variable = u
value = 1
[../]
[]
[InterfaceKernels]
[./interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 right top'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1'
[../]
[]
[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]
exodus = true
print_linear_residuals = true
[]
(test/tests/multiapps/secant_postprocessor/transient_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[time]
type = TimeDerivative
variable = u
[]
[sink]
type = BodyForce
variable = u
value = -1
[]
[]
[BCs]
[right]
type = PostprocessorDirichletBC
variable = u
boundary = right
postprocessor = 'from_main'
[]
[]
[Postprocessors]
[from_main]
type = Receiver
default = 0
[]
[to_main]
type = SideAverageValue
variable = u
boundary = left
[]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
fixed_point_algorithm = 'secant'
[]
[Outputs]
[csv]
type = CSV
start_step = 6
[]
exodus = false
[]
(test/tests/postprocessors/num_adaptivity_cycles/num_adaptivity_cycles.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1
solve_type = 'PJFNK'
[]
[Adaptivity]
cycles_per_step = 1
marker = box
max_h_level = 2
initial_steps = 4
initial_marker = initial_box
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = dont_mark
type = BoxMarker
[../]
[./initial_box]
type = BoxMarker
bottom_left = '0.8 0.1 0'
top_right = '0.9 0.2 0'
inside = refine
outside = dont_mark
[../]
[../]
[]
[Postprocessors]
[./adaptivity_cycles]
type = NumAdaptivityCycles
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
csv = true
[]
(test/tests/time_steppers/timesequence_stepper/timesequence.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*t*(x*x+y*y)
[../]
[./forcing_fn]
type = ParsedFunction
expression = 2*t*(x*x+y*y)-4*t*t
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]
[ICs]
[./u_var]
type = FunctionIC
variable = u
function = exact_fn
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[../]
[]
[Executioner]
type = Transient
end_time = 4.0
[./TimeStepper]
type = TimeSequenceStepper
time_sequence = '0 0.85 1.3 2 4'
[../]
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/inertial_torque/simple.i)
# A single element is stretched.
#
# For all time:
# disp_x = 0
# disp_z = 3
#
# The velocities are initialised to zero
# The accelerations are initialised to
# accel_x = 0
# accel_y = 2
# accel_z = 0
#
# The only degree of freedom is disp_y.
# It is initialised to zero.
# The DE is the ZEROTH component of
# density * disp x accel = BodyForce
# (Choosing the zeroth component is unusual: this
# is to illustrate correct behaviour of the
# InertialTorque Kernel, rather than being
# relevant to any particular solid-mechanics problem.)
# The LHS = - density * disp_z * accel_y
# With density = 0.5 and BodyForce = -3 the solution is
# accel_y = 2, vel_y = 2 * t, and disp_y = t^2
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
gamma = 0.5
beta = 0.25
alpha = 0.0
eta = 0.0
[]
[Variables]
[./disp_y]
[../]
[]
[Kernels]
[./icm_x]
type = InertialTorque
component = 0
variable = disp_y
[../]
[./source_x]
type = BodyForce
variable = disp_y
function = -3
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./disp_z]
initial_condition = 3
[../]
[./vel_x]
[../]
[./vel_y]
[../]
[./vel_z]
[../]
[./accel_x]
[../]
[./accel_y]
initial_condition = 2
[../]
[./accel_z]
[../]
[]
[AuxKernels]
[./vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
execute_on = timestep_end
[../]
[./vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
execute_on = timestep_end
[../]
[./vel_z]
type = NewmarkVelAux
variable = vel_z
acceleration = accel_z
execute_on = timestep_end
[../]
[./accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
execute_on = timestep_end
[../]
[./accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
execute_on = timestep_end
[../]
[./accel_z]
type = NewmarkAccelAux
variable = accel_z
displacement = disp_z
velocity = vel_z
execute_on = timestep_end
[../]
[]
[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
[]
[Materials]
[./density]
type = GenericConstantMaterial
prop_names = density
prop_values = 0.5
[../]
[]
[Postprocessors]
[./y_disp]
type = PointValue
point = '0 0 0'
use_displaced_mesh = false
variable = disp_y
[../]
[]
[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 = 1
num_steps = 10
[]
[Outputs]
csv = true
[]
(test/tests/materials/ad_material/ad_stateful_material.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 2
[]
[Variables]
[./u]
initial_condition = 1
[../]
[]
[Kernels]
[./diff]
type = ADMatDiffusionTest
variable = u
prop_to_use = 'AdAd'
ad_mat_prop = 'diffusivity'
regular_mat_prop = 'unused_diffusivity'
[../]
[]
[Kernels]
[./force]
type = BodyForce
variable = u
value = 1
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Materials]
[./constant_material]
type = GenericConstantMaterial
prop_names = 'unused_diffusivity'
prop_values = '0'
[../]
[./ad_stateful]
type = ADStatefulMaterial
u = u
[../]
[]
[Executioner]
type = Transient
num_steps = 5
line_search = 'none'
solve_type = 'Newton'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
l_tol = 1e-10
nl_rel_tol = 1e-9
[]
[Outputs]
[./exodus]
type = Exodus
show_material_properties = 'diffusivity'
[../]
[]
(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/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/variables/get_elemental_value/get_elemental_value.i)
# Tests the getElementalValue function of MooseVariableFE.
#
# The tested aux copies the first elemental value of another variable. The
# setup is the following IVP:
# du/dt = 1
# u(0) = 0
# Therefore the solution is u(t) = t. Five time steps of dt = 1 are taken.
# The expected output for each time level is thus the following:
# current: [0,1,2,3,4,5]
# old: [0,0,1,2,3,4]
# older: [0,0,0,1,2,3]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 2
[]
[Variables]
[./copied_var]
[../]
[]
[AuxVariables]
[./test_var]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./test_var_aux]
type = GetElementalValueAux
variable = test_var
copied_variable = copied_var
# The parameter "time_level" is provided by tests file
[../]
[]
[ICs]
[./copied_var_ic]
type = ConstantIC
variable = copied_var
value = 0
[../]
[]
[Kernels]
[./time_der]
type = TimeDerivative
variable = copied_var
[../]
[./src]
type = BodyForce
variable = copied_var
function = 1
[../]
[]
[Executioner]
type = Transient
scheme = implicit-euler
dt = 1
num_steps = 5
abort_on_solve_fail = true
solve_type = NEWTON
[]
[Postprocessors]
[./test_pp]
type = ElementAverageValue
variable = test_var
[../]
[]
[Outputs]
csv = true
[]
(test/tests/postprocessors/element_integral_var_pps/initial_pps.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 3
ny = 3
elem_type = QUAD9
[]
[Variables]
active = 'u v'
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 2.8
[../]
[../]
[./v]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 5.4
[../]
[../]
[]
[Functions]
active = 'force_fn exact_fn left_bc'
[./force_fn]
type = ParsedFunction
expression = '1-x*x+2*t'
[../]
[./exact_fn]
type = ParsedFunction
expression = '(1-x*x)*t'
[../]
[./left_bc]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
active = '
time_u diff_u ffn_u
time_v diff_v'
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'all_u left_v right_v'
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '1'
value = 0
[../]
[]
[Postprocessors]
[./initial_u]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = initial
[../]
[./initial_v]
type = ElementIntegralVariablePostprocessor
variable = v
execute_on = initial
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
end_time = 0.3
[]
[Outputs]
file_base = out_initial_pps
exodus = true
[]
(test/tests/postprocessors/avg_nodal_var_value/avg_nodal_var_value.i)
[Mesh]
file = square-2x2-nodeids.e
[]
[Variables]
active = 'u v'
[./u]
order = SECOND
family = LAGRANGE
[../]
[./v]
order = SECOND
family = LAGRANGE
[../]
[]
[Functions]
active = 'force_fn exact_fn left_bc'
[./force_fn]
type = ParsedFunction
expression = '1-x*x+2*t'
[../]
[./exact_fn]
type = ParsedFunction
expression = '(1-x*x)*t'
[../]
[./left_bc]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
active = '
time_u diff_u ffn_u
time_v diff_v'
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'all_u left_v right_v'
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = exact_fn
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '2'
value = 0
[../]
[]
[Postprocessors]
[./l2]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./node1]
type = AverageNodalVariableValue
variable = u
boundary = 10
[../]
[./node4]
type = AverageNodalVariableValue
variable = v
boundary = 13
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_avg_nodal_var_value
exodus = true
[]
(modules/stochastic_tools/test/tests/surrogates/polynomial_regression/sub_vector.i)
L = 1
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 100
xmax = ${L}
elem_type = EDGE3
[]
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 10000
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 2.0
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 300
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[VectorPostprocessors]
[T_vec]
type = LineValueSampler
variable = T
start_point = '0 0 0'
end_point = '${L} 0 0'
num_points = 10
sort_by = x
[]
[]
(modules/heat_transfer/test/tests/sideset_heat_transfer/cfem_gap.i)
[Mesh]
# Build 2-by-2 mesh
[mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
# Create blocs 0, 1, 2, 3
[block_1]
type = SubdomainBoundingBoxGenerator
input = mesh
block_id = 1
bottom_left = '1 0 0'
top_right = '2 1 0'
[]
[block_2]
type = SubdomainBoundingBoxGenerator
input = block_1
block_id = 2
bottom_left = '0 1 0'
top_right = '1 2 0'
[]
[block_3]
type = SubdomainBoundingBoxGenerator
input = block_2
block_id = 3
bottom_left = '1 1 0'
top_right = '2 2 0'
[]
# Create inner sidesets
[interface_01]
type = SideSetsBetweenSubdomainsGenerator
input = block_3
primary_block = 0
paired_block = 1
new_boundary = 'interface_01'
[]
[interface_13]
type = SideSetsBetweenSubdomainsGenerator
input = interface_01
primary_block = 1
paired_block = 3
new_boundary = 'interface_13'
[]
[interface_32]
type = SideSetsBetweenSubdomainsGenerator
input = interface_13
primary_block = 3
paired_block = 2
new_boundary = 'interface_32'
[]
[interface_20]
type = SideSetsBetweenSubdomainsGenerator
input = interface_32
primary_block = 2
paired_block = 0
new_boundary = 'interface_20'
[]
# Create outer boundaries
[boundary_left_0]
type = SideSetsAroundSubdomainGenerator
input = interface_20
block = 0
normal = '-1 0 0'
new_boundary = 'left_0'
[]
[boundary_bot_0]
type = SideSetsAroundSubdomainGenerator
input = boundary_left_0
block = 0
normal = '0 -1 0'
new_boundary = 'bot_0'
[]
[boundary_bot_1]
type = SideSetsAroundSubdomainGenerator
input = boundary_bot_0
block = 1
normal = '0 -1 0'
new_boundary = 'bot_1'
[]
[boundary_right_1]
type = SideSetsAroundSubdomainGenerator
input = boundary_bot_1
block = 1
normal = '1 0 0'
new_boundary = 'right_1'
[]
[boundary_right_3]
type = SideSetsAroundSubdomainGenerator
input = boundary_right_1
block = 3
normal = '1 0 0'
new_boundary = 'right_3'
[]
[boundary_top_3]
type = SideSetsAroundSubdomainGenerator
input = boundary_right_3
block = 3
normal = '0 1 0'
new_boundary = 'top_3'
[]
[boundary_top_2]
type = SideSetsAroundSubdomainGenerator
input = boundary_top_3
block = 2
normal = '0 1 0'
new_boundary = 'top_2'
[]
[boundary_left_2]
type = SideSetsAroundSubdomainGenerator
input = boundary_top_2
block = 2
normal = '-1 0 0'
new_boundary = 'left_2'
[]
uniform_refine = 4
[]
[Variables]
# Need to have variable for each block to allow discontinuity
[T0]
block = 0
[]
[T1]
block = 1
[]
[T2]
block = 2
[]
[T3]
block = 3
[]
[]
[Kernels]
# Diffusion kernel for each block's variable
[diff_0]
type = MatDiffusion
variable = T0
diffusivity = conductivity
block = 0
[]
[diff_1]
type = MatDiffusion
variable = T1
diffusivity = conductivity
block = 1
[]
[diff_2]
type = MatDiffusion
variable = T2
diffusivity = conductivity
block = 2
[]
[diff_3]
type = MatDiffusion
variable = T3
diffusivity = conductivity
block = 3
[]
# Source for two of the blocks
[source_0]
type = BodyForce
variable = T0
value = 5e5
block = '0'
[]
[source_3]
type = BodyForce
variable = T3
value = 5e5
block = '3'
[]
[]
[InterfaceKernels]
# Side set kernel to represent heat transfer across blocks
# Automatically uses the materials defined in SideSetHeatTransferMaterial
[gap_01]
type = SideSetHeatTransferKernel
# This variable defined on a given block must match the primary_block given when the side set was generated
variable = T0
# This variable defined on a given block must match the paired_block given when the side set was generated
neighbor_var = T1
boundary = 'interface_01'
[]
[gap_13]
type = SideSetHeatTransferKernel
variable = T1
neighbor_var = T3
boundary = 'interface_13'
[]
[gap_32]
type = SideSetHeatTransferKernel
variable = T3
neighbor_var = T2
boundary = 'interface_32'
[]
[gap_20]
type = SideSetHeatTransferKernel
variable = T2
neighbor_var = T0
boundary = 'interface_20'
[]
[]
# Creating auxiliary variable to combine block restricted solutions
# Ignores discontinuity though
[AuxVariables]
[T]
[]
[]
[AuxKernels]
[temp_0]
type = NormalizationAux
variable = T
source_variable = T0
block = 0
[]
[temp_1]
type = NormalizationAux
variable = T
source_variable = T1
block = 1
[]
[temp_2]
type = NormalizationAux
variable = T
source_variable = T2
block = 2
[]
[temp_3]
type = NormalizationAux
variable = T
source_variable = T3
block = 3
[]
[]
[BCs]
# Boundary condition for each block's outer surface
[bc_left_2]
type = DirichletBC
boundary = 'left_2'
variable = T2
value = 300.0
[]
[bc_left_0]
type = DirichletBC
boundary = 'left_0'
variable = T0
value = 300.0
[]
[bc_bot_0]
type = DirichletBC
boundary = 'bot_0'
variable = T0
value = 300.0
[]
[bc_bot_1]
type = DirichletBC
boundary = 'bot_1'
variable = T1
value = 300.0
[]
[./bc_top_2]
type = ConvectiveFluxFunction # (Robin BC)
variable = T2
boundary = 'top_2'
coefficient = 1e3 # W/K/m^2
T_infinity = 600.0
[../]
[./bc_top_3]
type = ConvectiveFluxFunction # (Robin BC)
variable = T3
boundary = 'top_3'
coefficient = 1e3 # W/K/m^2
T_infinity = 600.0
[../]
[./bc_right_3]
type = ConvectiveFluxFunction # (Robin BC)
variable = T3
boundary = 'right_3'
coefficient = 1e3 # W/K/m^2
T_infinity = 600.0
[../]
[./bc_right_1]
type = ConvectiveFluxFunction # (Robin BC)
variable = T1
boundary = 'right_1'
coefficient = 1e3 # W/K/m^2
T_infinity = 600.0
[../]
[]
[Materials]
[fuel]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 75
block = '0 3'
[]
[mod]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 7.5
block = '1 2'
[]
# Interface material used for SideSetHeatTransferKernel
# Heat transfer meachnisms ignored if certain properties are not supplied
[gap_mat]
type = SideSetHeatTransferMaterial
boundary = 'interface_01 interface_13 interface_32 interface_20'
conductivity = 0.41
gap_length = 0.002
Tbulk = 750
h_primary = 3000
h_neighbor = 3000
emissivity_primary = 0.85
emissivity_neighbor = 0.85
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
l_tol = 1e-8
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -ksp_gmres_restart'
petsc_options_value = 'lu superlu_dist 50'
[]
[Outputs]
exodus = true
[]
(python/peacock/tests/common/transient_big.i)
###########################################################
# This is a simple test with a time-dependent problem
# demonstrating the use of a "Transient" Executioner.
#
# @Requirement F1.10
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
uniform_refine = 2
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./dt]
type = TimestepSize
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
# Preconditioned JFNK (default)
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
file_base = out_transient
exodus = true
[]
(test/tests/ics/from_exodus_solution/nodal_part1.i)
# We run a simple problem (5 time steps and save off the solution)
# In part2, we load the solution and solve a steady problem. The test check, that the initial state in part 2 is the same as the last state from part1
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 20
ny = 20
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[./forcing_fn]
type = ParsedFunction
expression = -4+(x*x+y*y)
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'ie diff ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.2
start_time = 0
num_steps = 5
[]
[Outputs]
file_base = out_nodal_part1
exodus = true
xda = true
[]
(test/tests/variables/mixed_order_variables/mixed_order_variables_test.i)
# FIRST order nodal variables on SECOND order grid
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Functions]
[./force_fn]
type = ParsedFunction
expression = -4
[../]
[./exact_fn]
type = ParsedFunction
expression = (x*x)+(y*y)
[../]
[./aux_fn]
type = ParsedFunction
expression = (1-x*x)*(1-y*y)
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = force_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
preset = false
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[AuxVariables]
[./aux1]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./ak1]
type = FunctionAux
variable = aux1
function = aux_fn
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out
exodus = true
[]
(python/mms/test/mms_temporal.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 8
ny = 8
[]
[Variables]
[u][]
[]
[Kernels]
[time]
type = ADTimeDerivative
variable = u
[]
[diff]
type = ADDiffusion
variable = u
[]
[force]
type = BodyForce
variable = u
function = force
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = 't^3*x*y'
[]
[force]
type = ParsedFunction
expression = '3*x*y*t^2'
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
function = exact
boundary = 'left right top bottom'
[]
[]
[Postprocessors]
[error]
type = ElementL2Error
function = exact
variable = u
[]
[h]
type = AverageElementSize
[]
[]
[Executioner]
type = Transient
dt = 1
end_time = 3
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
csv = true
[]
(modules/level_set/test/tests/kernels/advection/advection_mms.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 12
nx = 48
[]
[Adaptivity]
steps = 5
marker = marker
[./Markers]
[./marker]
type = UniformMarker
mark = REFINE
[../]
[../]
[]
[Variables]
[./phi]
[../]
[]
[AuxVariables]
[./velocity]
family = LAGRANGE_VEC
[../]
[]
[ICs]
[./vel_ic]
type = VectorFunctionIC
variable = velocity
function = velocity_func
[]
[]
[BCs]
[./left]
type = FunctionDirichletBC
boundary = 'left'
function = phi_exact
variable = phi
[../]
[]
[Functions]
[./phi_exact]
type = ParsedFunction
expression = 'a*sin(pi*x/b)*cos(pi*x)'
symbol_names = 'a b'
symbol_values = '2 12'
[../]
[./phi_mms]
type = ParsedFunction
expression = '-2*pi*a*sin(pi*x)*sin(pi*x/b) + 2*pi*a*cos(pi*x)*cos(pi*x/b)/b'
symbol_names = 'a b'
symbol_values = '2 12'
[../]
[./velocity_func]
type = ParsedVectorFunction
expression_x = '2'
expression_y = '2'
[../]
[]
[Kernels]
[./phi_advection]
type = LevelSetAdvection
variable = phi
velocity = velocity
[../]
[./phi_forcing]
type = BodyForce
variable = phi
function = phi_mms
[../]
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = phi_exact
variable = phi
[../]
[./h]
type = AverageElementSize
[../]
[]
[VectorPostprocessors]
active = ''
[./results]
type = LineValueSampler
variable = phi
start_point = '0 0 0'
end_point = '12 0 0'
num_points = 500
sort_by = x
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-10
solve_type = NEWTON
# A steady-state pure advection problem is numerically challenging,
# it has a zero diagonal in the Jabocian matrix. The following solver
# settings seem to reliably solve this problem.
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
[]
[Outputs]
execute_on = 'TIMESTEP_END'
csv = true
[]
(modules/optimization/test/tests/optimizationreporter/bimaterial/model.i)
# Steady state Heat conduction in a 2D domain with two diffusivities
# The domain is -4 <= x <= 4 and -4 <= y <= 4
# The top-half of the domain (y > 0) has high diffusivity
# The bottom-half of the domain (y < 0) has low diffusivity
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 16
ny = 16
xmin = -4
xmax = 4
ymin = -4
ymax = 4
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = diffusivity
[]
[heat_source]
type = BodyForce
value = 100
variable = temperature
[]
[]
[AuxVariables]
[grad_Tx]
order = CONSTANT
family = MONOMIAL
[]
[grad_Ty]
order = CONSTANT
family = MONOMIAL
[]
[grad_Tz]
order = CONSTANT
family = MONOMIAL
[]
[]
[BCs]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 0
[]
[]
[Functions]
[diffusivity_function]
type = NearestReporterCoordinatesFunction
x_coord_name = data/coordx
y_coord_name = data/coordy
value_name = data/diffusivity
[]
[]
[Materials]
[mat]
type = GenericFunctionMaterial
prop_names = diffusivity
prop_values = diffusivity_function
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
[]
[data]
type = ConstantReporter
real_vector_names = 'coordx coordy diffusivity'
real_vector_values = '0 0; -2 2; 5 10'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_forced_its = 1
line_search = none
nl_abs_tol = 1e-8
[]
[Outputs]
file_base = 'forward'
console = false
[]
(test/tests/variables/fe_hier/hier-1-3d.i)
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
nx = 5
ny = 5
elem_type = HEX8
[]
[Functions]
[./bc_fnt]
type = ParsedFunction
expression = 1
[../]
[./bc_fnb]
type = ParsedFunction
expression = -1
[../]
[./bc_fnl]
type = ParsedFunction
expression = -1
[../]
[./bc_fnr]
type = ParsedFunction
expression = 1
[../]
[./bc_fnf]
type = ParsedFunction
expression = 1
[../]
[./bc_fnk]
type = ParsedFunction
expression = -1
[../]
[./forcing_fn]
type = ParsedFunction
expression = x+y+z
[../]
[./solution]
type = ParsedGradFunction
expression = x+y+z
grad_x = 1
grad_y = 1
grad_z = 1
[../]
[]
[Variables]
[./u]
order = FIRST
family = HIERARCHIC
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./bc_top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = bc_fnt
[../]
[./bc_bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bc_fnb
[../]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[./bc_front]
type = FunctionNeumannBC
variable = u
boundary = 'front'
function = bc_fnf
[../]
[./bc_back]
type = FunctionNeumannBC
variable = u
boundary = 'back'
function = bc_fnk
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/multiapps/restart_multilevel/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 1
nx = 10
[]
[Functions]
[u_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[fn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = FunctionDirichletBC
variable = u
boundary = right
function = u_fn
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
app_type = MooseTestApp
type = TransientMultiApp
input_files = 'subsub.i'
execute_on = timestep_end
positions = '0 -1 0'
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[]
[]
(tutorials/tutorial02_multiapps/step01_multiapps/01_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 1.
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
type = TransientMultiApp
positions = '0 0 0'
input_files = '01_sub.i'
[]
[]
(test/tests/kernels/vector_fe/coupled_electrostatics.i)
# Test for DivField and GradField kernels and VectorDivPenaltyDirichletBC bcs.
# This test uses Raviart-Thomas elements to solve a model div-grad problem
# in H(div). The problem is simply a div-grad formulation, u = -grad(p), and
# div(u) = f, of the standard Poisson problem div(grad(p)) = -f.
# Manufactured solution: p = cos(k*x)*sin(k*y)*cos(k*z).
k = asin(1)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 6
ny = 6
nz = 6
xmax = 1
ymax = 1
zmax = 1
xmin = -1
ymin = -1
zmin = -1
elem_type = HEX27
[]
[]
[Variables]
[u]
family = RAVIART_THOMAS
order = FIRST
[]
[p]
family = MONOMIAL
order = CONSTANT
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[Functions]
[f]
type = ParsedVectorFunction
expression_x = ${k}*sin(${k}*x)*sin(${k}*y)*cos(${k}*z)
expression_y = -${k}*cos(${k}*x)*cos(${k}*y)*cos(${k}*z)
expression_z = ${k}*cos(${k}*x)*sin(${k}*y)*sin(${k}*z)
div = ${Mesh/gmg/dim}*${k}^2*cos(${k}*x)*sin(${k}*y)*cos(${k}*z)
[]
[]
[Kernels]
[coefficient]
type = VectorFunctionReaction
variable = u
sign = negative
[]
[gradient]
type = GradField
variable = u
coupled_scalar_variable = p
[]
[divergence]
type = DivField
variable = p
coupled_vector_variable = u
[]
[forcing]
type = BodyForce
variable = p
function = ${Functions/f/div}
[]
[mean_zero_p]
type = ScalarLagrangeMultiplier
variable = p
lambda = lambda
[]
[]
[ScalarKernels]
[constraint]
type = AverageValueConstraint
variable = lambda
pp_name = PP
value = 0.0
[]
[]
[BCs]
[sides]
type = VectorDivPenaltyDirichletBC
variable = u
function = f
penalty = 1e8
boundary = 'top bottom left right front back'
[]
[]
[Postprocessors]
active = PP
[PP]
type = ElementIntegralVariablePostprocessor
variable = p
execute_on = linear
[]
[L2Error]
type = ElementVectorL2Error
variable = u
function = f
[]
[HDivSemiError]
type = ElementHDivSemiError
variable = u
function = f
[]
[HDivError]
type = ElementHDivError
variable = u
function = f
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = LINEAR
petsc_options_iname = '-pc_type -ksp_rtol -ksp_norm_type'
petsc_options_value = ' jacobi 1e-12 preconditioned'
[]
[Outputs]
exodus = true
[]
(test/tests/kernels/ode/parsedode_sys_impl_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[]
[Functions]
[./f_fn]
type = ParsedFunction
expression = -4
[../]
[./bc_all_fn]
type = ParsedFunction
expression = x*x+y*y
[../]
# ODEs
[./exact_x_fn]
type = ParsedFunction
expression = (-1/3)*exp(-t)+(4/3)*exp(5*t)
[../]
[]
# NL
[Variables]
[./u]
family = LAGRANGE
order = FIRST
[../]
# ODE variables
[./x]
family = SCALAR
order = FIRST
initial_condition = 1
[../]
[./y]
family = SCALAR
order = FIRST
initial_condition = 2
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./uff]
type = BodyForce
variable = u
function = f_fn
[../]
[]
[ScalarKernels]
[./td1]
type = ODETimeDerivative
variable = x
[../]
[./ode1]
type = ParsedODEKernel
expression = '-3*x - 2*y'
variable = x
coupled_variables = y
[../]
[./td2]
type = ODETimeDerivative
variable = y
[../]
[./ode2]
type = ParsedODEKernel
expression = '-4*x - y'
variable = y
coupled_variables = x
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = bc_all_fn
[../]
[]
[Postprocessors]
active = 'exact_x l2err_x'
[./exact_x]
type = FunctionValuePostprocessor
function = exact_x_fn
execute_on = 'initial timestep_end'
point = '0 0 0'
[../]
[./l2err_x]
type = ScalarL2Error
variable = x
function = exact_x_fn
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
start_time = 0
dt = 0.01
num_steps = 100
solve_type = 'PJFNK'
[]
[Outputs]
file_base = ode_sys_impl_test_out
exodus = true
[]
(test/tests/multiapps/restart_multilevel/parent2.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
ymin = 0
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[Functions]
[v_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[]
[AuxVariables]
[v]
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[ufn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = v_fn
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
app_type = MooseTestApp
type = TransientMultiApp
input_files = 'sub.i'
execute_on = timestep_end
positions = '0 -1 0'
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[]
[]
[Problem]
restart_file_base = parent_out_cp/0005
[]
(test/tests/outputs/residual/output_residual_elem.i)
[Mesh]
file = sq-2blk.e
uniform_refine = 3
[]
[Variables]
# variable in the whole domain
[./u]
order = CONSTANT
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
# subdomain restricted variable
[./v]
order = CONSTANT
family = MONOMIAL
block = '1'
[../]
[]
[Functions]
[./forcing_fn_u]
type = ParsedFunction
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./forcing_fn_v]
type = ParsedFunction
expression = t
[../]
# [./exact_fn]
# type = ParsedFunction
# expression = t*t*t*((x*x)+(y*y))
# [../]
# [./exact_fn_v]
# type = ParsedFunction
# expression = t+1
# [../]
[]
[Kernels]
[./ie_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = forcing_fn_u
[../]
[./ie_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[./ffn_v]
type = BodyForce
variable = v
function = forcing_fn_v
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_elem
exodus = true
[]
[Debug]
show_var_residual = 'u v'
show_var_residual_norms = true
[]
(test/tests/meshgenerators/lower_d_block_generator/names.i)
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[./lower_d_block]
type = LowerDBlockFromSidesetGenerator
input = gmg
new_block_id = 10
sidesets = 'bottom bottom right top left'
[]
[]
[Variables]
[./u]
block = 0
[../]
[./v]
block = 10
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
block = 0
[../]
[./srcv]
type = BodyForce
block = 10
variable = v
function = 1
[../]
[./time_v]
type = TimeDerivative
block = 10
variable = v
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/functional_expansion_tools/examples/3D_volumetric_Cartesian_direct/main.i)
# Derived from the example '3D_volumetric_Cartesian' with the following differences:
#
# 1) The coupling is performed via BodyForce instead of the
# FunctionSeriesToAux+CoupledForce approach
[Mesh]
type = GeneratedMesh
dim = 3
xmin = 0.0
xmax = 10.0
nx = 15
ymin = 1.0
ymax = 11.0
ny = 25
zmin = 2.0
zmax = 12.0
nz = 35
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = BodyForce
variable = m
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'top bottom left right front back'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3 4 5'
physical_bounds = '0.0 10.0 1.0 11.0 2.0 12.0'
x = Legendre
y = Legendre
z = Legendre
enable_cache = true
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(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
[]
(test/tests/mortar/continuity-2d-non-conforming/soln-continuity.i)
[Mesh]
second_order = true
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[./primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[../]
[./secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[../]
[]
[Variables]
[./T]
block = '1 2'
order = SECOND
[../]
[./lambda]
block = '10'
[../]
[]
[BCs]
[./neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln
variable = T
boundary = '3 4 5 6 7 8'
[../]
[]
[Kernels]
[./conduction]
type = Diffusion
variable = T
block = '1 2'
[../]
[./sink]
type = Reaction
variable = T
block = '1 2'
[../]
[./forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[../]
[]
[Functions]
[./forcing_function]
type = ParsedFunction
expression= '-4 + x^2 + y^2'
[../]
[./exact_soln]
type = ParsedFunction
expression= 'x^2 + y^2'
[../]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[./mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
exodus = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
(test/tests/outputs/debug/show_var_residual_norms_debug.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Functions]
[forcing_fnu]
type = ParsedFunction
expression = -5.8*(x+y)+x*x*x-x+y*y*y-y
[]
[forcing_fnv]
type = ParsedFunction
expression = -4
[]
[slnu]
type = ParsedGradFunction
expression = x*x*x-x+y*y*y-y
grad_x = 3*x*x-1
grad_y = 3*y*y-1
[]
[slnv]
type = ParsedGradFunction
expression = x*x+y*y
grad_x = 2*x
grad_y = 2*y
[]
#NeumannBC functions
[bc_fnut]
type = ParsedFunction
expression = 3*y*y-1
[]
[bc_fnub]
type = ParsedFunction
expression = -3*y*y+1
[]
[bc_fnul]
type = ParsedFunction
expression = -3*x*x+1
[]
[bc_fnur]
type = ParsedFunction
expression = 3*x*x-1
[]
[]
[Variables]
[u]
order = THIRD
family = HIERARCHIC
[]
[v]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
active = 'diff1 diff2 test1 forceu forcev react'
[diff1]
type = Diffusion
variable = u
[]
[test1]
type = CoupledConvection
variable = u
velocity_vector = v
[]
[diff2]
type = Diffusion
variable = v
[]
[react]
type = Reaction
variable = u
[]
[forceu]
type = BodyForce
variable = u
function = forcing_fnu
[]
[forcev]
type = BodyForce
variable = v
function = forcing_fnv
[]
[]
[BCs]
active = 'bc_u_tb bc_v bc_ul bc_ur bc_ut bc_ub'
[bc_u]
type = FunctionPenaltyDirichletBC
variable = u
function = slnu
boundary = 'left right top bottom'
penalty = 1e6
[]
[bc_v]
type = FunctionDirichletBC
variable = v
function = slnv
boundary = 'left right top bottom'
[]
[bc_u_lr]
type = FunctionPenaltyDirichletBC
variable = u
function = slnu
boundary = 'left right top bottom'
penalty = 1e6
[]
[bc_u_tb]
type = CoupledKernelGradBC
variable = u
var2 = v
vel = '0.1 0.1'
boundary = 'top bottom left right'
[]
[bc_ul]
type = FunctionNeumannBC
variable = u
function = bc_fnul
boundary = 'left'
[]
[bc_ur]
type = FunctionNeumannBC
variable = u
function = bc_fnur
boundary = 'right'
[]
[bc_ut]
type = FunctionNeumannBC
variable = u
function = bc_fnut
boundary = 'top'
[]
[bc_ub]
type = FunctionNeumannBC
variable = u
function = bc_fnub
boundary = 'bottom'
[]
[]
[Preconditioning]
active = ' '
[prec]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'L2u L2v'
[dofs]
type = NumDOFs
[]
[h]
type = AverageElementSize
[]
[L2u]
type = ElementL2Error
variable = u
function = slnu
[]
[L2v]
type = ElementL2Error
variable = v
function = slnv
[]
[H1error]
type = ElementH1Error
variable = u
function = solution
[]
[H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-15
nl_abs_tol = 1e-13
[]
[Outputs]
execute_on = 'timestep_end'
[]
[Debug]
show_var_residual_norms = true
[]
(test/tests/tag/2d_diffusion_dg_tag.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[AuxVariables]
[./tag_variable1]
order = FIRST
family = MONOMIAL
[../]
[./tag_variable2]
order = FIRST
family = MONOMIAL
[../]
[]
[AuxKernels]
[./TagVectorAux1]
type = TagVectorAux
variable = tag_variable1
v = u
vector_tag = vec_tag2
execute_on = timestep_end
[../]
[./TagVectorAux2]
type = TagMatrixAux
variable = tag_variable2
v = u
matrix_tag = mat_tag2
execute_on = timestep_end
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[../]
[./exact_fn]
type = ParsedGradFunction
value = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1 vec_tag2'
[../]
[./abs]
type = Reaction
variable = u
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1 vec_tag2'
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1'
[../]
[]
[DGKernels]
[./dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1 vec_tag2'
[../]
[]
[BCs]
[./all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1 vec_tag2'
[../]
[]
[Problem]
type = TagTestProblem
test_tag_vectors = 'nontime residual vec_tag1 vec_tag2'
test_tag_matrices = 'mat_tag1 mat_tag2'
extra_tag_matrices = 'mat_tag1 mat_tag2'
extra_tag_vectors = 'vec_tag1 vec_tag2'
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_rel_tol = 1e-10
[]
[Postprocessors]
[./h]
type = AverageElementSize
[../]
[./dofs]
type = NumDOFs
[../]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Outputs]
exodus = true
[]
(modules/stochastic_tools/examples/surrogates/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 1
elem_type = EDGE3
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 1.0
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 2.0
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 300
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[avg]
type = AverageNodalVariableValue
variable = T
[]
[max]
type = NodalExtremeValue
variable = T
value_type = max
[]
[]
[Outputs]
[]
(test/tests/outputs/exodus/exodus_side_discontinuous.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
elem_type = QUAD9 # SIDE_HIERARCHIC needs side nodes
nx = 3
ny = 3
dim = 2
[]
[]
[Variables]
[u]
order = THIRD
family = MONOMIAL
[]
[lambda]
family = SIDE_HIERARCHIC
order = CONSTANT
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
[]
[source]
type = BodyForce
variable = u
value = '1'
[]
[]
[DGKernels]
[testjumps]
type = HFEMTestJump
variable = u
side_variable = lambda
[]
[trialjumps]
type = HFEMTrialJump
variable = lambda
interior_variable = u
[]
[]
[BCs]
[u_robin]
type = VacuumBC
boundary = 'left right top bottom'
variable = u
[]
[lambda_D_unused]
type = PenaltyDirichletBC
boundary = 'left right top bottom'
variable = lambda
penalty = 1
[]
[]
[Postprocessors]
[intu]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[]
[lambdanorm]
type = ElementSidesL2Norm
variable = lambda
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
[Outputs]
[out]
type = Exodus
discontinuous = true
side_discontinuous = true
file_base = 'exodus_side_discontinuous_out'
[]
[]
(test/tests/kernels/hfem/neumann.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 3
ny = 3
dim = 2
[]
build_all_side_lowerd_mesh = true
[]
[Variables]
[u]
order = THIRD
family = MONOMIAL
block = 0
[]
[lambda]
order = CONSTANT
family = MONOMIAL
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
block = 0
[]
[reaction]
type = Reaction
variable = u
rate = '1'
block = 0
[]
[source]
type = BodyForce
variable = u
value = '1'
block = 0
[]
[]
[DGKernels]
[surface]
type = HFEMDiffusion
variable = u
lowerd_variable = lambda
[]
[]
[BCs]
[all]
type = NeumannBC
boundary = 'left right top bottom'
variable = u
[]
[]
[Postprocessors]
[intu]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[]
[lambdanorm]
type = ElementL2Norm
variable = lambda
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
[Outputs]
[out]
# we hide lambda because it may flip sign due to element
# renumbering with distributed mesh
type = Exodus
hide = lambda
[]
[]
(test/tests/userobjects/interface_user_object/interface_value_rate_increment_user_object_QP.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
[../]
[./primary0_interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./break_boundary]
input = primary0_interface
type = BreakBoundaryOnSubdomainGenerator
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./v]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 2
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 4
block = 1
[../]
[./source_u]
type = BodyForce
variable = u
function = 0.1*t
[../]
[]
[InterfaceKernels]
[./primary0_interface]
type = PenaltyInterfaceDiffusionDot
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 right top'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = TRUE
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
dt = 0.1
num_steps = 3
dtmin = 0.1
line_search = none
[]
[Outputs]
exodus = true
[]
[UserObjects]
[./interface_avg_value_uo]
type = InterfaceQpValueUserObject
var = v1
var_neighbor = v2
boundary = 'primary0_interface'
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
interface_value_type = average
[../]
[./interface_avg_value_rate_uo]
type = InterfaceQpValueUserObject
var = v1
var_neighbor = v2
boundary = 'primary0_interface'
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
interface_value_type = average
value_type = rate
[../]
[./interface_avg_value_increment_uo]
type = InterfaceQpValueUserObject
var = v1
var_neighbor = v2
boundary = 'primary0_interface'
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
interface_value_type = average
value_type = increment
[../]
[]
[AuxKernels]
[./v1_saux]
type = StatefulAux
coupled = v1
variable = v1
[../]
[./v2_saux]
type = StatefulAux
coupled = v2
variable = v2
[../]
[./interface_avg_value_aux]
type = InterfaceValueUserObjectAux
variable = avg_qp
boundary = 'primary0_interface'
interface_uo_name = interface_avg_value_uo
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
[]
[./interface_avg_value_rate_aux]
type = InterfaceValueUserObjectAux
variable = avg_rate_qp
boundary = 'primary0_interface'
interface_uo_name = interface_avg_value_rate_uo
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
[]
[./interface_avg_value_increment_aux]
type = InterfaceValueUserObjectAux
variable = avg_increment_qp
boundary = 'primary0_interface'
interface_uo_name = interface_avg_value_increment_uo
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
[]
[]
[AuxVariables]
[./v1]
family = MONOMIAL
order = FIRST
initial_condition = 5
[../]
[./v2]
family = MONOMIAL
order = FIRST
initial_condition = 2
[../]
[./avg_qp]
family = MONOMIAL
order = CONSTANT
[]
[./avg_rate_qp]
family = MONOMIAL
order = CONSTANT
[]
[./avg_increment_qp]
family = MONOMIAL
order = CONSTANT
[]
[]
(modules/stochastic_tools/examples/surrogates/cross_validation/all_sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 0.03
elem_type = EDGE3
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 10000
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 2.0
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 300
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[max]
type = NodalExtremeValue
variable = T
value_type = max
[]
[]
[Outputs]
[]
(modules/stochastic_tools/test/tests/reporters/ActiveLearningGP/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 0.13061533868990033
elem_type = EDGE3
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 10951.864006672608
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 10.320058433901163
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 279.8173854189593
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[avg]
type = AverageNodalVariableValue
variable = T
[]
[max]
type = NodalExtremeValue
variable = T
value_type = max
[]
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Outputs]
[]
(modules/ray_tracing/test/tests/coord_type/rspherical_line_integral.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 5
[]
[]
[Variables/u]
[]
[BCs]
[fixed]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Kernels]
[diffusion]
type = Diffusion
variable = u
[]
[source]
type = BodyForce
variable = u
value = 10
[]
[]
[UserObjects]
[study]
type = RepeatableRayStudy
names = 'ray0'
start_points = '0 0 0'
end_points = '1 0 0'
[]
[]
[RayKernels]
[variable_integral]
type = VariableIntegralRayKernel
study = study
variable = u
[]
[]
[Postprocessors]
[value]
type = RayIntegralValue
ray_kernel = variable_integral
ray = ray0
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Problem]
coord_type = RSPHERICAL
[]
[Outputs]
csv = true
[]
(test/tests/problems/reference_residual_problem/abs_ref.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
[]
[GlobalParams]
absolute_value_vector_tags = 'absref'
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'absref'
extra_tag_vectors = 'absref'
[]
[Variables]
[u][]
[v]
scaling = 1e-6
[]
[]
[Functions]
[ramp]
type = ParsedFunction
expression = 'if(t < 5, t - 5, 0) * x'
[]
[]
[Kernels]
[u_dt]
type = TimeDerivative
variable = u
[]
[u_coupled_rx]
type = CoupledForce
variable = u
v = v
coef = 1
[]
[v_dt]
type = TimeDerivative
variable = v
[]
[v_neg_force]
type = BodyForce
variable = v
value = ${fparse -1 / 2}
function = ramp
[]
[v_force]
type = BodyForce
variable = v
value = 1
function = ramp
[]
[]
[Postprocessors]
[u_avg]
type = ElementAverageValue
variable = u
execute_on = 'TIMESTEP_END INITIAL'
[]
[v_avg]
type = ElementAverageValue
variable = v
execute_on = 'TIMESTEP_END INITIAL'
[]
[timestep]
type = TimePostprocessor
outputs = 'none'
[]
[v_old]
type = ElementAverageValue
variable = v
execute_on = TIMESTEP_BEGIN
outputs = none
[]
[u_old]
type = ElementAverageValue
variable = u
execute_on = TIMESTEP_BEGIN
outputs = none
[]
[v_exact]
type = ParsedPostprocessor
pp_names = 'timestep v_old'
function = 't := if(timestep > 5, 5, timestep); (t^2 - 9 * t) / 8'
[]
[u_exact]
type = ParsedPostprocessor
pp_names = 'u_old v_exact'
function = 'u_old + v_exact'
[]
[]
[Executioner]
type = Transient
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = none
num_steps = 10
nl_rel_tol = 1e-06
verbose = true
[]
[Outputs]
csv = true
[]
(test/tests/time_integrators/implicit-euler/ie-monomials.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
variable = u
value = 1
[../]
[]
[Functions]
active = 'forcing_fn exact_fn'
[./forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[../]
[./exact_fn]
type = ParsedGradFunction
value = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[../]
[]
[Kernels]
[./time]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./abs] # u * v
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGKernels]
[./dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[../]
[]
[BCs]
[./all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
nl_rel_tol = 1e-10
num_steps = 1
[]
[Outputs]
execute_on = 'timestep_end'
console = true
[]
(test/tests/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/time_integrators/aee/aee.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0.0
xmax = 1.0
[]
#still need BC for Energy, IC's for both.
[Variables]
active = 'Time'
[./Time]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[../]
[]
[Functions]
active = 'func'
[./func]
type = ParsedFunction
expression = 2.0*t
[../]
[]
[Kernels]
active = 't_time func_time'
[./t_time]
type = TimeDerivative
variable = Time
[../]
[./func_time]
type = BodyForce
variable = Time
function = func
[../]
[]
[BCs]
active = 'Top_Temperature'
[./Top_Temperature]
type = NeumannBC
variable = Time
boundary = 'left right'
[../]
[]
[Executioner]
type = Transient
scheme = 'BDF2'
#scheme = 'crank-nicolson'
start_time = 0
num_steps = 4
nl_abs_tol = 1e-15
petsc_options = '-snes_converged_reason'
abort_on_solve_fail = true
[./TimeStepper]
type = AB2PredictorCorrector
dt = .01
e_max = 10
e_tol = 1
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/interfacekernels/resid_jac_together/jump.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[break_boundary]
input = interface
type = BreakBoundaryOnSubdomainGenerator
[]
[]
[Variables]
[u]
block = 0
[]
[v]
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 = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[]
[]
[BCs]
[u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 right top'
[]
[v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
residual_and_jacobian_together = true
[]
[Outputs]
exodus = true
[]
(test/tests/time_integrators/explicit-euler/ee-2d-linear.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Functions]
[./ic]
type = ParsedFunction
expression = 0
[../]
[./forcing_fn]
type = ParsedFunction
expression = (x+y)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*(x+y)
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic
[../]
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
lumping = true
implicit = true
[../]
[./diff]
type = Diffusion
variable = u
implicit = false
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
implicit = false
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
preset = false
boundary = '0 1 2 3'
function = exact_fn
implicit = true
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'explicit-euler'
solve_type = 'LINEAR'
start_time = 0.0
num_steps = 20
dt = 0.00005
[]
[Outputs]
exodus = true
[./console]
type = Console
max_rows = 10
[../]
[]
(modules/optimization/test/tests/optimizationreporter/nonlinear_material/forward_and_adjoint.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmax = 2
ymax = 2
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
kernel_coverage_check = false
[]
[Variables]
[forwardT]
[]
[adjointT]
solver_sys = adjoint
[]
[]
[Kernels]
[heat_conduction]
type = ADMatDiffusion
variable = forwardT
diffusivity = 'conductivity'
[]
[heat_source]
type = ADBodyForce
function = volumetric_heat_func
variable = forwardT
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = adjointT
x_coord_name = measurement_locations/measurement_xcoord
y_coord_name = measurement_locations/measurement_ycoord
z_coord_name = measurement_locations/measurement_zcoord
value_name = measurement_locations/misfit_values
[]
[]
[Materials]
[NonlinearConductivity]
type = ADParsedMaterial
property_name = conductivity
expression = '10+500*forwardT'
coupled_variables = 'forwardT'
[]
[]
[Functions]
[volumetric_heat_func]
type = ParsedOptimizationFunction
expression = q
param_symbol_names = 'q'
param_vector_name = 'params/heat_source'
[]
[]
[BCs]
[left]
type = NeumannBC
variable = forwardT
boundary = left
value = 0
[]
[right]
type = NeumannBC
variable = forwardT
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = forwardT
boundary = bottom
value = 2
[]
[top]
type = DirichletBC
variable = forwardT
boundary = top
value = 1
[]
[]
[Reporters]
[measurement_locations]
type = OptimizationData
variable = forwardT
[]
[params]
type = ConstantReporter
real_vector_names = 'heat_source'
real_vector_values = '0' # Dummy
[]
[]
[VectorPostprocessors]
[gradient_vpp]
type = ElementOptimizationSourceFunctionInnerProduct
function = volumetric_heat_func
variable = adjointT
execute_on = ADJOINT_TIMESTEP_END
[]
[]
[Executioner]
type = SteadyAndAdjoint
forward_system = nl0
adjoint_system = adjoint
line_search = none
nl_abs_tol = 1e-12
nl_rel_tol = 1e-12
l_tol = 1e-12
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
console = false
[]
(modules/stochastic_tools/test/tests/surrogates/gaussian_process/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 1
elem_type = EDGE3
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 1.0
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 2.0
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 300
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[avg]
type = AverageNodalVariableValue
variable = T
[]
[]
(modules/thermal_hydraulics/test/tests/jacobians/materials/ad_solid_material.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
allow_renumbering = false
[]
[Variables]
[T]
[]
[]
[Functions]
[k_fn]
type = ParsedFunction
expression = 't*t + 2*t'
[]
[cp_fn]
type = ParsedFunction
expression = 't*t*t + 3*t'
[]
[rho_fn]
type = ParsedFunction
expression = 't*t*t*t + 4*t'
[]
[]
[HeatStructureMaterials]
[prop_uo]
type = SolidMaterialProperties
k = k_fn
cp = cp_fn
rho = rho_fn
[]
[]
[Components]
[]
[Materials]
[solid_mat]
type = ADSolidMaterial
T = T
properties = prop_uo
[]
[]
[Kernels]
[td]
type = ADHeatConductionTimeDerivative
variable = T
specific_heat = specific_heat
density_name = density
[]
[diff]
type = ADHeatConduction
variable = T
thermal_conductivity = thermal_conductivity
[]
[forcing_fn]
type = BodyForce
variable = T
value = -4
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
variable = T
value = 0
[]
[right]
type = DirichletBC
boundary = right
variable = T
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
[]
(modules/optimization/test/tests/executioners/steady_and_adjoint/nonhomogeneous_bc.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
[]
[Variables]
[u]
[]
[u_adjoint]
solver_sys = adjoint
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[src]
type = BodyForce
variable = u
value = 1
[]
[src_adjoint]
type = BodyForce
variable = u_adjoint
value = 10
[]
[]
[BCs]
[dirichlet]
type = DirichletBC
variable = u
boundary = 'top right'
value = 1
[]
[neumann]
type = NeumannBC
variable = u
boundary = 'left bottom'
value = 1
[]
[]
[Executioner]
type = SteadyAndAdjoint
forward_system = nl0
adjoint_system = adjoint
nl_rel_tol = 1e-12
l_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/interfacekernels/2d_interface/coupled_value_coupled_flux_with_jump_material.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
[./subdomain1]
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
input = gen
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./break_boundary]
input = interface
type = BreakBoundaryOnSubdomainGenerator
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./v]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[../]
[./source_u]
type = BodyForce
variable = u
value = 1
[../]
[]
[InterfaceKernels]
[./interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
jump_prop_name = jump
[../]
[]
[Materials]
[./jump]
type = JumpInterfaceMaterial
var = u
neighbor_var = v
boundary = primary0_interface
[../]
[]
[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]
exodus = true
print_linear_residuals = true
[]
(test/tests/misc/check_error/missing_req_par_mesh_block_test.i)
#
# Tests elemental PPS running on multiple block
#
[Mesh]
type = StripeMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 3
ny = 3
elem_type = QUAD4
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = x
[../]
[]
[Variables]
[./u]
family = MONOMIAL
order = CONSTANT
[../]
[]
[Kernels]
[./uv]
type = Reaction
variable = u
[../]
[./fv]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[Postprocessors]
[./avg_1_2]
type = ElementAverageValue
variable = u
block = '0 1'
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
execute_on = 'timestep_end'
[]
(test/tests/variables/fe_hier/hier-3-1d.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -1
xmax = 1
nx = 5
elem_type = EDGE3
[]
[Functions]
[./bc_fnl]
type = ParsedFunction
expression = -3*x*x
[../]
[./bc_fnr]
type = ParsedFunction
expression = 3*x*x
[../]
[./forcing_fn]
type = ParsedFunction
expression = -6*x+(x*x*x)
[../]
[./solution]
type = ParsedGradFunction
expression = x*x*x
grad_x = 3*x*x
[../]
[]
[Variables]
[./u]
order = THIRD
family = HIERARCHIC
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/dgkernels/2d_diffusion_dg/no_mallocs_with_action.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[AuxVariables]
[v]
order = FIRST
family = MONOMIAL
[]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[../]
[./exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./abs] # u * v
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGDiffusionAction]
variable = u
epsilon = -1
sigma = 6
# We couple in an auxiliary variable in order to ensure that we've properly
# ghosted both non-linear and auxiliary solution vectors
coupled_var = v
[]
[BCs]
[./all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[console]
type = Console
system_info = 'framework mesh aux nonlinear relationship execution'
[]
[]
[Problem]
error_on_jacobian_nonzero_reallocation = true
[]
[Postprocessors]
active = 'num_rm'
[num_rm]
type = NumRelationshipManagers
[]
[num_internal_sides]
type = NumInternalSides
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/mms/supg/supg_adv_dominated_mms.i)
mu=1.5e-2
rho=2.5
[GlobalParams]
gravity = '0 0 0'
supg = true
convective_term = true
integrate_p_by_parts = false
transient_term = true
laplace = true
u = vel_x
v = vel_y
pressure = p
alpha = 1e0
order = SECOND
family = LAGRANGE
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
elem_type = QUAD9
nx = 4
ny = 4
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./vel_x]
[../]
[./vel_y]
[../]
[./p]
order = FIRST
[../]
[]
[Kernels]
# mass
[./mass]
type = INSMass
variable = p
[../]
[./x_time]
type = INSMomentumTimeDerivative
variable = vel_x
[../]
[./y_time]
type = INSMomentumTimeDerivative
variable = vel_y
[../]
# x-momentum, space
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
component = 0
forcing_func = vel_x_source_func
[../]
# y-momentum, space
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
component = 1
forcing_func = vel_y_source_func
[../]
[./p_source]
type = BodyForce
function = p_source_func
variable = p
[../]
[]
[BCs]
[./vel_x]
type = FunctionDirichletBC
boundary = 'left right top bottom'
function = vel_x_func
variable = vel_x
[../]
[./vel_y]
type = FunctionDirichletBC
boundary = 'left right top bottom'
function = vel_y_func
variable = vel_y
[../]
[./p]
type = FunctionDirichletBC
boundary = 'left right top bottom'
function = p_func
variable = p
[../]
[]
[Functions]
[./vel_x_source_func]
type = ParsedFunction
expression = '-${mu}*(-0.028*pi^2*x^2*sin(0.2*pi*x*y) - 0.028*pi^2*y^2*sin(0.2*pi*x*y) - 0.1*pi^2*sin(0.5*pi*x) - 0.4*pi^2*sin(pi*y)) + ${rho}*(0.14*pi*x*cos(0.2*pi*x*y) + 0.4*pi*cos(pi*y))*(0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3) + ${rho}*(0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x))*(0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5) + 0.1*pi*y*cos(0.2*pi*x*y) + 0.25*pi*cos(0.5*pi*x)'
[../]
[./vel_y_source_func]
type = ParsedFunction
expression = '-${mu}*(-0.018*pi^2*x^2*sin(0.3*pi*x*y) - 0.018*pi^2*y^2*sin(0.3*pi*x*y) - 0.384*pi^2*sin(0.8*pi*x) - 0.027*pi^2*sin(0.3*pi*y)) + ${rho}*(0.06*pi*x*cos(0.3*pi*x*y) + 0.09*pi*cos(0.3*pi*y))*(0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3) + ${rho}*(0.06*pi*y*cos(0.3*pi*x*y) + 0.48*pi*cos(0.8*pi*x))*(0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5) + 0.1*pi*x*cos(0.2*pi*x*y) + 0.3*pi*cos(0.3*pi*y)'
[../]
[./p_source_func]
type = ParsedFunction
expression = '-0.06*pi*x*cos(0.3*pi*x*y) - 0.14*pi*y*cos(0.2*pi*x*y) - 0.2*pi*cos(0.5*pi*x) - 0.09*pi*cos(0.3*pi*y)'
[../]
[./vel_x_func]
type = ParsedFunction
expression = '0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5'
[../]
[./vel_y_func]
type = ParsedFunction
expression = '0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3'
[../]
[./p_func]
type = ParsedFunction
expression = '0.5*sin(0.5*pi*x) + 1.0*sin(0.3*pi*y) + 0.5*sin(0.2*pi*x*y) + 0.5'
[../]
[./vxx_func]
type = ParsedFunction
expression = '0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x)'
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
num_steps = 10
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-14
nl_max_its = 10
l_tol = 1e-6
l_max_its = 10
[./TimeStepper]
dt = .05
type = IterationAdaptiveDT
cutback_factor = 0.4
growth_factor = 1.2
optimal_iterations = 20
[../]
[]
[Outputs]
execute_on = 'final'
[./exodus]
type = Exodus
[../]
[./csv]
type = CSV
[../]
[]
[Postprocessors]
[./L2vel_x]
type = ElementL2Error
variable = vel_x
function = vel_x_func
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2vel_y]
variable = vel_y
function = vel_y_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2p]
variable = p
function = p_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2vxx]
variable = vxx
function = vxx_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[]
[AuxVariables]
[./vxx]
family = MONOMIAL
order = FIRST
[../]
[]
[AuxKernels]
[./vxx]
type = VariableGradientComponent
component = x
variable = vxx
gradient_variable = vel_x
[../]
[]
(test/tests/misc/check_error/missing_material_prop_test.i)
[Mesh]
file = rectangle.e
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff body_force'
[./diff]
type = DiffMKernel
variable = u
mat_prop = diff1
[../]
[./body_force]
type = BodyForce
variable = u
block = 1
value = 10
[../]
[]
[BCs]
active = 'right'
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Materials]
[./mat1]
type = GenericConstantMaterial
block = 1
prop_names = 'diff1'
prop_values = '1'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out
[]
(modules/stochastic_tools/examples/surrogates/gaussian_process/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 0.03
elem_type = EDGE3
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 10000
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 5.0
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 300
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[avg]
type = AverageNodalVariableValue
variable = T
[]
[max]
type = NodalExtremeValue
variable = T
value_type = max
[]
[]
[Outputs]
[]
(test/tests/multiapps/restart_subapp_ic/parent2.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
ymin = 0
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[Functions]
[v_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[]
[AuxVariables]
[v]
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[ufn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = v_fn
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
app_type = MooseTestApp
type = TransientMultiApp
input_files = 'sub2.i'
execute_on = timestep_end
positions = '0 -1 0'
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[]
[]
[Problem]
restart_file_base = parent_out_cp/0005
[]
(test/tests/kernels/ad_jacobians/test.i)
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./damage_dt]
type = ADTimeDerivative
variable = u
[../]
[./damage]
type = ADBodyForce
value = 1
variable = u
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
num_steps = 1
[]
(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
[]
(tutorials/tutorial02_multiapps/step03_coupling/02_parent_picard.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[vt]
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Materials]
[diff]
type = ParsedMaterial
property_name = D
coupled_variables = 'vt'
expression = 'vt'
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 0.2
fixed_point_max_its = 10
nl_abs_tol = 1e-10
fixed_point_rel_tol = 1e-6
fixed_point_abs_tol = 1e-10
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[micro]
type = TransientMultiApp
positions = '0.15 0.15 0 0.45 0.45 0 0.75 0.75 0'
input_files = '02_sub_picard.i'
execute_on = timestep_end
output_in_position = true
[]
[]
[Transfers]
[push_u]
type = MultiAppVariableValueSampleTransfer
to_multi_app = micro
source_variable = u
variable = ut
[]
[pull_v]
type = MultiAppPostprocessorInterpolationTransfer
from_multi_app = micro
variable = vt
postprocessor = average_v
[]
[]
(modules/heat_transfer/test/tests/heat_conduction/coupled_convective_heat_flux/coupled_convective_heat_flux.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Functions]
[./T_infinity_fn]
type = ParsedFunction
expression = (x*x+y*y)+500
[../]
[./Hw_fn]
type = ParsedFunction
expression = ((1-x)*(1-x)+(1-y)*(1-y))+1000
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./T_infinity]
[../]
[./Hw]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
value = 1000
[../]
[]
[AuxKernels]
[./T_infinity_ak]
type = FunctionAux
variable = T_infinity
function = T_infinity_fn
execute_on = initial
[../]
[./Hw_ak]
type = FunctionAux
variable = Hw
function = Hw_fn
execute_on = initial
[../]
[]
[BCs]
[./right]
type = CoupledConvectiveHeatFluxBC
variable = u
boundary = right
htc = Hw
T_infinity = T_infinity
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/bcs/ad_function_neumann_bc/test.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
dim = 2
nx = 32
ny = 32
[../]
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./exact_func]
type = ParsedFunction
expression = x*x
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = 2
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = FunctionNeumannBC
function = x
variable = u
boundary = right
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
execute_on = 'timestep_end'
file_base = neumannbc_out
exodus = true
[]
(modules/combined/examples/thermomechanics/circle_thermal_expansion_stress.i)
# This example problem demonstrates coupling heat conduction with mechanics.
# A circular domain has as uniform heat source that increases with time
# and a fixed temperature on the outer boundary, resulting in a temperature gradient.
# This results in heterogeneous thermal expansion, where it is pinned in the center.
# Looking at the hoop stress demonstrates why fuel pellets have radial cracks
# that extend from the outer boundary to about halfway through the radius.
# The problem is run with length units of microns.
[Mesh]
#Circle mesh has a radius of 1000 units
type = FileMesh
file = circle.e
uniform_refine = 1
[]
[Variables]
# We solve for the temperature and the displacements
[./T]
initial_condition = 800
scaling = 1e7
[../]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[AuxVariables]
[./radial_stress]
order = CONSTANT
family = MONOMIAL
[../]
[./hoop_stress]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
active = 'TensorMechanics htcond Q_function'
[./htcond] #Heat conduction equation
type = HeatConduction
variable = T
[../]
[./TensorMechanics] #Action that creates equations for disp_x and disp_y
displacements = 'disp_x disp_y'
[../]
[./Q_function] #Heat generation term
type = BodyForce
variable = T
value = 1
function = 0.8e-9*t
[../]
[]
[AuxKernels]
[./radial_stress] #Calculates radial stress from cartesian
type = CylindricalRankTwoAux
variable = radial_stress
rank_two_tensor = stress
index_j = 0
index_i = 0
center_point = '0 0 0'
[../]
[./hoop_stress] #Calculates hoop stress from cartesian
type = CylindricalRankTwoAux
variable = hoop_stress
rank_two_tensor = stress
index_j = 1
index_i = 1
center_point = '0 0 0'
[../]
[]
[BCs]
[./outer_T] #Temperature on outer edge is fixed at 800K
type = DirichletBC
variable = T
boundary = 1
value = 800
[../]
[./outer_x] #Displacements in the x-direction are fixed in the center
type = DirichletBC
variable = disp_x
boundary = 2
value = 0
[../]
[./outer_y] #Displacements in the y-direction are fixed in the center
type = DirichletBC
variable = disp_y
boundary = 2
value = 0
[../]
[]
[Materials]
[./thcond] #Thermal conductivity is set to 5 W/mK
type = GenericConstantMaterial
block = 1
prop_names = 'thermal_conductivity'
prop_values = '5e-6'
[../]
[./iso_C] #Sets isotropic elastic constants
type = ComputeElasticityTensor
fill_method = symmetric_isotropic
C_ijkl = '2.15e5 0.74e5'
block = 1
[../]
[./strain] #We use small deformation mechanics
type = ComputeSmallStrain
displacements = 'disp_x disp_y'
block = 1
eigenstrain_names = eigenstrain
[../]
[./stress] #We use linear elasticity
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 = Transient
scheme = bdf2
num_steps = 10
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
l_tol = 1e-04
[]
[Outputs]
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
[../]
[]
(modules/xfem/test/tests/moving_interface/verification/2D_rz_homog1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: 2D
# Coordinate System: rz
# Material Numbers/Types: homogeneous 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# Transient 2D heat transfer problem in cylindrical coordinates designed with
# the Method of Manufactured Solutions. This problem was developed to verify
# XFEM performance on linear elements in the presence of a moving interface
# sweeping across the x-y coordinates of a system with homogeneous material
# properties. This problem can be exactly evaluated by FEM/Moose without the
# moving interface. Both the temperature and level set function are designed
# to be linear to attempt to minimize error between the Moose/exact solution
# and XFEM results.
# Results:
# The temperature at the bottom left boundary (x=1, y=1) exhibits the largest
# difference between the FEM/Moose solution and XFEM results. We present the
# XFEM results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 479.9998745
# 0.6 520 519.9995067
# 0.8 560 559.9989409
# 1.0 600 599.9987054
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 1.0
xmax = 2.0
ymin = 1.0
ymax = 2.0
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraints]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-100*x-100*y+400) + 100*1.5*t/x'
[../]
[./neumann_func]
type = ParsedFunction
expression = '1.5*100*t'
[../]
[./dirichlet_right_func]
type = ParsedFunction
expression = '(-100*y+200)*t+400'
[../]
[./dirichlet_top_func]
type = ParsedFunction
expression = '(-100*x+200)*t+400'
[../]
[./ls_func]
type = ParsedFunction
expression = '-0.5*(x+y) + 2.04 - 0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericConstantMaterial
prop_names = 'diffusion_coefficient'
prop_values = 1.5
[../]
[]
[BCs]
[./left_du]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = FunctionDirichletBC
variable = u
boundary = 'right'
function = dirichlet_right_func
[../]
[./bottom_du]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = neumann_func
[../]
[./top_u]
type = FunctionDirichletBC
variable = u
boundary = 'top'
function = dirichlet_top_func
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/time_integrators/crank-nicolson/cranic.i)
#
# Testing a solution that is second order in space and second order in time
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 2*t*((x*x)+(y*y))-(4*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'crank-nicolson'
start_time = 0.0
num_steps = 5
dt = 0.25
# [./Adaptivity]
# refine_fraction = 0.2
# coarsen_fraction = 0.3
# max_h_level = 4
# [../]
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/radiation_transfer_symmetry/cavity_with_pillars.i)
#
# inner_left: 8
# inner_right: 9
# inner_top: 12
# inner_bottom: 11
# inner_front: 10
# back_2: 7
# obstruction: 6
#
[Mesh]
[cartesian]
type = CartesianMeshGenerator
dim = 3
dx = '0.4 0.5 0.5 0.5 0.5 0.5 0.5 0.4'
dy = '0.5 0.75 0.5'
dz = '1.5 0.5'
subdomain_id = '
3 1 1 1 1 1 1 4
3 1 2 1 1 2 1 4
3 1 1 1 1 1 1 4
3 1 1 1 1 1 1 4
3 1 1 1 1 1 1 4
3 1 1 1 1 1 1 4
'
[]
[add_obstruction]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 2
paired_block = 1
new_boundary = obstruction
input = cartesian
[]
[add_new_back]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(z) < 1e-10'
included_subdomains = '1'
normal = '0 0 -1'
new_sideset_name = back_2
input = add_obstruction
[]
[add_inner_left]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 3
paired_block = 1
new_boundary = inner_left
input = add_new_back
[]
[add_inner_right]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 4
paired_block = 1
new_boundary = inner_right
input = add_inner_left
[]
[add_inner_front]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(z - 2) < 1e-10'
included_subdomains = '1'
normal = '0 0 1'
new_sideset_name = inner_front
input = add_inner_right
[]
[add_inner_bottom]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(y) < 1e-10'
included_subdomains = '1'
normal = '0 -1 0'
new_sideset_name = inner_bottom
input = add_inner_front
[]
[add_inner_top]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(y - 1.75) < 1e-10'
included_subdomains = '1'
normal = '0 1 0'
new_sideset_name = inner_top
input = add_inner_bottom
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[temperature]
block = '2 3 4'
initial_condition = 300
[]
[]
[Kernels]
[conduction]
type = HeatConduction
variable = temperature
block = '2 3 4'
diffusion_coefficient = 1
[]
[source]
type = BodyForce
variable = temperature
value = 1000
block = '2'
[]
[]
[BCs]
[convective]
type = CoupledConvectiveHeatFluxBC
variable = temperature
T_infinity = 300
htc = 50
boundary = 'left right'
[]
[]
[GrayDiffuseRadiation]
[cavity]
boundary = '6 7 8 9 10 11 12'
emissivity = '1 1 1 1 1 1 1'
n_patches = '1 1 1 1 1 1 1'
adiabatic_boundary = '7 10 11 12'
partitioners = 'metis metis metis metis metis metis metis'
temperature = temperature
ray_tracing_face_order = SECOND
normalize_view_factor = false
[]
[]
[Postprocessors]
[Tpv]
type = PointValue
variable = temperature
point = '0.3 0.5 0.5'
[]
[volume]
type = VolumePostprocessor
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/energy-conservation/q2q1.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
nx = 10
ny = 10
dim = 2
[]
[subdomain]
type = SubdomainBoundingBoxGenerator
bottom_left = '0.5 0 0'
top_right = '1 1 0'
block_id = 1
input = gen
[]
[break_boundary]
input = subdomain
type = BreakBoundaryOnSubdomainGenerator
boundaries = 'bottom top'
[]
[sideset]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '1'
paired_block = '0'
new_boundary = 'fluid_left'
[]
coord_type = RZ
second_order = true
[]
[Variables]
[T]
order = SECOND
[]
[velocity]
family = LAGRANGE_VEC
order = SECOND
block = 1
[]
[pressure]
block = 1
[]
[]
[Kernels]
[mass]
type = INSADMass
variable = pressure
block = 1
[]
[momentum_convection]
type = INSADMomentumAdvection
variable = velocity
block = 1
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = velocity
block = 1
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = pressure
integrate_p_by_parts = true
block = 1
[]
[momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
block = 1
[]
[temperature_advection]
type = INSADEnergyAdvection
variable = T
block = 1
[]
[temperature_supg]
type = INSADEnergySUPG
variable = T
velocity = velocity
block = 1
[]
[temperature_conduction]
type = ADHeatConduction
variable = T
thermal_conductivity = 'k'
[]
[heat_source]
type = BodyForce
variable = T
block = 0
function = 'x + y'
[]
[]
[BCs]
[velocity_inlet]
type = VectorFunctionDirichletBC
variable = velocity
function_y = 1
boundary = 'bottom_to_1'
[]
[wall]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'fluid_left right'
[]
[convective_heat_transfer]
type = ConvectiveHeatFluxBC
variable = T
T_infinity = 0
heat_transfer_coefficient = 1
boundary = 'right'
[]
[]
[Materials]
[constant]
type = ADGenericConstantMaterial
prop_names = 'cp rho k mu'
prop_values = '1 1 1 1'
[]
[ins]
type = INSADStabilized3Eqn
pressure = pressure
velocity = velocity
temperature = T
block = 1
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[Outputs]
csv = true
[]
[Postprocessors]
[convective_heat_transfer]
type = ConvectiveHeatTransferSideIntegral
T_solid = T
T_fluid = 0
htc = 1
boundary = 'right'
[]
[advection]
type = INSADElementIntegralEnergyAdvection
temperature = T
velocity = velocity
cp = cp
rho = rho
block = 1
[]
[source]
type = FunctionElementIntegral
function = 'x + y'
block = 0
[]
[energy_balance]
type = ParsedPostprocessor
function = 'convective_heat_transfer + advection - source'
pp_names = 'convective_heat_transfer advection source'
[]
[]
(modules/thermal_hydraulics/test/tests/problems/mms/mms_1phase.i)
# Method of manufactured solutions (MMS) problem for 1-phase flow model.
#
# The python script mms_derivation.py derives the MMS sources used in this
# input file.
#
# To perform a convergence study, run this input file with different values of
# 'refinement_level', starting with 0. Manually create a CSV file (call it the
# "convergence CSV file") to store the error vs. mesh size data. It should have
# the columns specified in the plot script plot_convergence_1phase.py. Copy the
# CSV output from each run into the convergence CSV file. After all of the runs,
# run the plot script using python.
refinement_level = 0 # 0 is initial
n_elems_coarse = 10
n_elems = ${fparse int(n_elems_coarse * 2^refinement_level)}
dt = 1e-6
t_end = ${fparse dt * 10}
area = 1.0
gamma = 2.0
M = 0.05
A = 1
B = 1
C = 1
aA = ${fparse area}
R_univ = 8.3144598
R = ${fparse R_univ / M}
cp = ${fparse gamma * R / (gamma - 1.0)}
cv = ${fparse cp / gamma}
[GlobalParams]
gravity_vector = '0 0 0'
closures = simple_closures
[]
[Functions]
# solutions
[rho_fn]
type = ParsedFunction
expression = 'A * (sin(B*x + C*t) + 2)'
symbol_names = 'A B C'
symbol_values = '${A} ${B} ${C}'
[]
[vel_fn]
type = ParsedFunction
expression = 'A * t * sin(pi * x)'
symbol_names = 'A'
symbol_values = '${A}'
[]
[p_fn]
type = ParsedFunction
expression = 'A * (cos(B*x + C*t) + 2)'
symbol_names = 'A B C'
symbol_values = '${A} ${B} ${C}'
[]
[T_fn]
type = ParsedFunction
expression = '(cos(B*x + C*t) + 2)/(cv*(gamma - 1)*(sin(B*x + C*t) + 2))'
symbol_names = 'B C gamma cv'
symbol_values = '${B} ${C} ${gamma} ${cv}'
[]
# MMS sources
[rho_src_fn]
type = ParsedFunction
expression = 'A^2*B*t*sin(pi*x)*cos(B*x + C*t) + pi*A^2*t*(sin(B*x + C*t) + 2)*cos(pi*x) + A*C*cos(B*x + C*t)'
symbol_names = 'A B C'
symbol_values = '${A} ${B} ${C}'
[]
[rhou_src_fn]
type = ParsedFunction
expression = 'A^3*B*t^2*sin(pi*x)^2*cos(B*x + C*t) + 2*pi*A^3*t^2*(sin(B*x + C*t) + 2)*sin(pi*x)*cos(pi*x) + A^2*C*t*sin(pi*x)*cos(B*x + C*t) + A^2*(sin(B*x + C*t) + 2)*sin(pi*x) - A*B*sin(B*x + C*t)'
symbol_names = 'A B C'
symbol_values = '${A} ${B} ${C}'
[]
[rhoE_src_fn]
type = ParsedFunction
expression = 'A*C*(A^2*t^2*sin(pi*x)^2/2 + (cos(B*x + C*t) + 2)/((gamma - 1)*(sin(B*x + C*t) + 2)))*cos(B*x + C*t) + pi*A*t*(A*(A^2*t^2*sin(pi*x)^2/2 + (cos(B*x + C*t) + 2)/((gamma - 1)*(sin(B*x + C*t) + 2)))*(sin(B*x + C*t) + 2) + A*(cos(B*x + C*t) + 2))*cos(pi*x) + A*t*(A*B*(A^2*t^2*sin(pi*x)^2/2 + (cos(B*x + C*t) + 2)/((gamma - 1)*(sin(B*x + C*t) + 2)))*cos(B*x + C*t) - A*B*sin(B*x + C*t) + A*(sin(B*x + C*t) + 2)*(pi*A^2*t^2*sin(pi*x)*cos(pi*x) - B*sin(B*x + C*t)/((gamma - 1)*(sin(B*x + C*t) + 2)) - B*(cos(B*x + C*t) + 2)*cos(B*x + C*t)/((gamma - 1)*(sin(B*x + C*t) + 2)^2)))*sin(pi*x) + A*(sin(B*x + C*t) + 2)*(A^2*t*sin(pi*x)^2 - C*sin(B*x + C*t)/((gamma - 1)*(sin(B*x + C*t) + 2)) - C*(cos(B*x + C*t) + 2)*cos(B*x + C*t)/((gamma - 1)*(sin(B*x + C*t) + 2)^2))'
symbol_names = 'A B C gamma'
symbol_values = '${A} ${B} ${C} ${gamma}'
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
gamma = ${gamma}
molar_mass = ${M}
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = fp
# geometry
position = '0 0 0'
orientation = '1 0 0'
length = 1.0
n_elems = ${n_elems}
A = ${area}
# IC
initial_p = p_fn
initial_T = T_fn
initial_vel = 0
f = 0
[]
[left_boundary]
type = InletFunction1Phase
input = 'pipe:in'
p = p_fn
rho = rho_fn
vel = vel_fn
[]
[right_boundary]
type = InletFunction1Phase
input = 'pipe:out'
p = p_fn
rho = rho_fn
vel = vel_fn
[]
[]
[Kernels]
[rho_src]
type = BodyForce
variable = rhoA
function = rho_src_fn
value = ${aA}
[]
[rhou_src]
type = BodyForce
variable = rhouA
function = rhou_src_fn
value = ${aA}
[]
[rhoE_src]
type = BodyForce
variable = rhoEA
function = rhoE_src_fn
value = ${aA}
[]
[]
[Postprocessors]
[rho_err]
type = ElementL1Error
variable = rho
function = rho_fn
execute_on = 'INITIAL TIMESTEP_END'
[]
[vel_err]
type = ElementL1Error
variable = vel
function = vel_fn
execute_on = 'INITIAL TIMESTEP_END'
[]
[p_err]
type = ElementL1Error
variable = p
function = p_fn
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
[TimeIntegrator]
type = ExplicitSSPRungeKutta
order = 3
[]
start_time = 0
dt = ${dt}
end_time = ${t_end}
abort_on_solve_fail = true
[Quadrature]
type = GAUSS
order = FIRST
[]
[]
[Outputs]
csv = true
execute_on = 'FINAL'
velocity_as_vector = false
[]
(test/tests/time_integrators/bdf2/bdf2.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 20
ny = 20
elem_type = QUAD9
[]
[Variables]
active = 'u'
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0.0
num_steps = 5
dt = 0.25
# [./Adaptivity]
# refine_fraction = 0.2
# coarsen_fraction = 0.3
# max_h_level = 4
# [../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(examples/ex13_functions/ex13.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
ny = 100
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
[]
[Variables]
[./forced]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
# A ParsedFunction allows us to supply analytic expressions
# directly in the input file
[./bc_func]
type = ParsedFunction
expression = sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '16'
[../]
# This function is an actual compiled function
# We could have used ParsedFunction for this as well
[./forcing_func]
type = ExampleFunction
alpha = 16
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = forced
[../]
# This Kernel can take a function name to use
[./forcing]
type = BodyForce
variable = forced
function = forcing_func
[../]
[]
[BCs]
# The BC can take a function name to use
[./all]
type = FunctionDirichletBC
variable = forced
boundary = 'bottom right top left'
function = bc_func
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(tutorials/tutorial02_multiapps/step01_multiapps/04_parent_multiple.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 1.
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
type = TransientMultiApp
positions = '0 0 0 1 0 0 2 0 0'
# positions_file = 04_positions.txt
input_files = '04_sub1_multiple.i'
# input_files = '04_sub1_multiple.i 04_sub2_multiple.i 04_sub3_multiple.i'
# output_in_position = true
[]
[]
(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
[]
(test/tests/outputs/console/console_final.i)
###########################################################
# This test exercises console Output control. The console
# output is only output every third step. Additionally it
# is forced to be output after the final timestep as well.
#
# @Requirement U1.40
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
# This test uses ElementalVariableValue postprocessors on specific
# elements, so element numbering needs to stay unchanged
allow_renumbering = false
[]
[Functions]
[./ffn]
type = ParsedFunction
expression = -4
[../]
[./exactfn]
type = ParsedFunction
expression = x*x+y*y
[../]
[./aux_exact_fn]
type = ParsedFunction
expression = t*(x*x+y*y)
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = ffn
[../]
[]
[AuxVariables]
[./aux_u]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./a]
type = FunctionAux
variable = aux_u
function = aux_exact_fn
[../]
[]
[BCs]
[./left]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exactfn
[../]
[]
[Postprocessors]
[./elem_56]
type = ElementalVariableValue
variable = u
elementid = 56
[../]
[./aux_elem_99]
type = ElementalVariableValue
variable = aux_u
elementid = 99
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.01
start_time = 0
num_steps = 10
[]
[Outputs]
time_step_interval = 3
execute_on = 'initial timestep_end final'
[]
(modules/optimization/test/tests/executioners/steady_and_adjoint/self_adjoint.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
[]
[Variables]
[u]
[]
[u_adjoint]
solver_sys = adjoint
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[src]
type = BodyForce
variable = u
value = 1
[]
[src_adjoint]
type = BodyForce
variable = u_adjoint
value = 10
[]
[]
[BCs]
[dirichlet]
type = DirichletBC
variable = u
boundary = 'top right'
value = 0
[]
[]
[Executioner]
type = SteadyAndAdjoint
forward_system = nl0
adjoint_system = adjoint
nl_rel_tol = 1e-12
l_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/picard_postprocessor/steady_main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[source]
type = BodyForce
variable = u
value = 1
[]
[]
[BCs]
[left]
type = PostprocessorDirichletBC
variable = u
boundary = left
postprocessor = 'from_sub'
[]
[]
[Postprocessors]
[from_sub]
type = Receiver
default = 0
[]
[to_sub]
type = SideAverageValue
variable = u
boundary = right
[]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Steady
# Solve parameters
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
# App coupling parameters
fixed_point_max_its = 100
fixed_point_rel_tol = 0.5 # pseudo transient is slow to converge
relaxation_factor = 0.8
transformed_postprocessors = 'from_sub'
[]
[Outputs]
csv = true
exodus = false
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = steady_sub.i
clone_parent_mesh = true
execute_on = 'timestep_begin'
# we keep the full postprocessor output history of the subapp
keep_full_output_history = true
relaxation_factor = 0.8
transformed_postprocessors = 'from_main'
[]
[]
[Transfers]
[left_from_sub]
type = MultiAppPostprocessorTransfer
from_multi_app = sub
from_postprocessor = 'to_main'
to_postprocessor = 'from_sub'
reduction_type = 'average'
[]
[right_to_sub]
type = MultiAppPostprocessorTransfer
to_multi_app = sub
from_postprocessor = 'to_sub'
to_postprocessor = 'from_main'
[]
[]
(test/tests/time_integrators/abort/abort.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0.0
xmax = 1.0
[]
#still need BC for Energy, IC's for both.
[Variables]
active = 'Time'
[./Time]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[../]
[]
[Functions]
active = 'func'
[./func]
type = ParsedFunction
expression = 2.0*t
[../]
[]
[Kernels]
active = 't_time func_time'
[./t_time]
type = TimeDerivative
variable = Time
[../]
[./func_time]
type = BodyForce
variable = Time
function = func
[../]
[]
[BCs]
active = 'Top_Temperature'
[./Top_Temperature]
type = NeumannBC
variable = Time
boundary = 'left right'
[../]
[]
[Executioner]
type = Transient
#scheme = 'BDF2'
#scheme = 'crank-nicolson'
start_time = 0
num_steps = 4
dt = 1000000000
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
steady_state_tolerance = .00000000000000001
steady_state_detection = true
nl_abs_tol = 1e-15
petsc_options = '-snes_converged_reason'
abort_on_solve_fail = true
[]
[Outputs]
file_base = out
exodus = true
[]
(modules/optimization/test/tests/executioners/constrained/shape_optimization/forward.i)
# This test is documented as an example for ConstrainedShapeOptimization. This
# test should not be changed without updating the documentation.
inner_radius = 6
outer_radius = 10
volume_constraint = 200
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[mesh]
type = ConcentricCircleMeshGenerator
has_outer_square = no
num_sectors = 16
radii = '${inner_radius} ${outer_radius}'
rings = '16 16'
preserve_volumes = false
[]
[inner_radius]
type = SideSetsBetweenSubdomainsGenerator
input = mesh
new_boundary = inner
primary_block = 2
paired_block = 1
[]
[delete]
type = BlockDeletionGenerator
input = inner_radius
block = 1
[]
[gather_all]
type = BoundingBoxNodeSetGenerator
input = delete
bottom_left = '-100 -100 -100'
top_right = '100 100 100'
new_boundary = total
[]
[combine]
type = SideSetsFromBoundingBoxGenerator
input = gather_all
bottom_left = '-100 -100 -100'
top_right = '100 100 100'
boundaries_old = 'inner outer'
boundary_new = moving
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[T]
[]
[]
[AuxVariables]
[dist_between]
[AuxKernel]
type = NearestNodeDistanceAux
variable = dist_between
paired_boundary = moving
boundary = total
block = 2
use_displaced_mesh = false
execute_on = "INITIAL"
[]
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
use_displaced_mesh = false
diffusivity = diff_coef
[]
[disp_y]
type = MatDiffusion
variable = disp_y
use_displaced_mesh = false
diffusivity = diff_coef
[]
# run physics of interest on deformed mesh
[Diffusion]
type = FunctionDiffusion
variable = T
use_displaced_mesh = true
[]
[Source]
type = BodyForce
variable = T
value = 1
use_displaced_mesh = true
[]
[]
[Materials]
# perserve elements near the boundary
[diff_coef]
type = ParsedMaterial
coupled_variables = 'dist_between'
expression = '1/(dist_between+0.5)'
property_name = 'diff_coef'
[]
[h]
type = ADGenericFunctionMaterial
prop_names = h
prop_values = h
[]
# convection type boundary condition
[convection_bc]
type = ADParsedMaterial
coupled_variables = "T"
expression = "h*(100-T)"
material_property_names = "h"
property_name = convection
[]
[]
[Functions]
[r1_x]
type = ParsedOptimizationFunction
expression = 'r1 * cos((atan(y/x)))'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[r1_y]
type = ParsedOptimizationFunction
expression = 'r1 * sin((atan(y/x)))'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[r0_x]
type = ParsedOptimizationFunction
expression = 'r0 * cos((atan(y/x)))'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[r0_y]
type = ParsedOptimizationFunction
expression = 'r0 * sin((atan(y/x)))'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[h]
type = ParsedOptimizationFunction
# r0+${inner_radius} is the true current inner radius
expression = '10 /(pi * (r0+${inner_radius})^3)'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[eq_grad_r0]
type = ParsedOptimizationFunction
expression = '-2 * pi * (r0 + ${inner_radius})'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[eq_grad_r1]
type = ParsedOptimizationFunction
# r1+${outer_radius} is the true current outer radius
expression = '2 * pi * (r1+${outer_radius})'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[]
[BCs]
[diffuse_r1_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 'outer'
function = r1_x
preset = false
[]
[diffuse_r1_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = 'outer'
function = r1_y
preset = false
[]
[diffuse_r0_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 'inner'
function = r0_x
preset = false
[]
[diffuse_r0_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = 'inner'
function = r0_y
preset = false
[]
# run physics on deformed mesh
[convection]
type = ADMatNeumannBC
variable = T
boundary = inner
boundary_material = convection
use_displaced_mesh = true
value = 1
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Reporters]
[params]
type = ConstantReporter
real_vector_names = 'radii'
real_vector_values = '0 0'
dof_id_type_vector_names = 'num_params'
dof_id_type_vector_values = '2'
[]
[]
[Postprocessors]
[current_volume]
type = VolumePostprocessor
use_displaced_mesh = true
[]
# objective function
[objective]
type = NodalExtremeValue
variable = T
[]
[eq_constraint]
type = ParsedPostprocessor
pp_names = current_volume
function = 'current_volume - ${volume_constraint}'
[]
[func_r0]
type = FunctionValuePostprocessor
function = eq_grad_r0
[]
[func_r1]
type = FunctionValuePostprocessor
function = eq_grad_r1
[]
[]
[VectorPostprocessors]
# convert "Real" postprocessors to vectors
[vol_constraint]
type = VectorOfPostprocessors
postprocessors = 'eq_constraint'
force_postaux = true
[]
[eq_grad]
type = VectorOfPostprocessors
postprocessors = 'func_r0 func_r1'
force_postaux = true
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = none
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
[]
[Outputs]
console = false
[]
(tutorials/tutorial02_multiapps/step01_multiapps/02_parent_sublimit.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 1.
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
type = TransientMultiApp
positions = '0 0 0'
input_files = '02_sub_sublimit.i'
[]
[]
(test/tests/variables/fe_hermite_convergence/hermite_converge_dirichlet.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 4
ny = 4
elem_type = QUAD4
# This test will not work in parallel with DistributedMesh enabled
# due to a bug in PeriodicBCs.
parallel_type = replicated
[]
[Functions]
[./bc_fn]
type = ParsedGradFunction
value = -sin(pi*x)*sin(pi*y)
grad_x = -pi*cos(pi*x)*sin(pi*y)
grad_y = -pi*sin(pi*x)*cos(pi*y)
[../]
[./forcing_fn]
type = ParsedFunction
expression = -2*pi*pi*sin(pi*x)*sin(pi*y)-sin(pi*x)*sin(pi*y)
[../]
[]
[Variables]
[./u]
order = THIRD
family = HERMITE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionPenaltyDirichletBC
variable = u
boundary = 'bottom right top left'
function = bc_fn
penalty = 1e10
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = bc_fn
[../]
[./H1error]
type = ElementH1Error
variable = u
function = bc_fn
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = bc_fn
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
# We use higher-order quadrature to ensure that the forcing function
# is integrated accurately.
[./Quadrature]
order=ELEVENTH
[../]
[]
[Adaptivity]
steps = 2
marker = uniform
[./Markers]
[./uniform]
type = UniformMarker
mark = refine
[../]
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
print_mesh_changed_info = true
[]
(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
[../]
[]
(test/tests/preconditioners/reuse/convergence.i)
# Simple 3D test with diffusion, setup to make sure
# there is a sensible difference in the linear iteration
# counts with re-use versus without re-use
[Variables]
[u]
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 4
nz = 4
[]
[]
[Kernels]
[diffusion]
type = FunctionDiffusion
variable = u
function = 'arg'
[]
[time]
type = TimeDerivative
variable = u
[]
[body_force]
type = BodyForce
variable = u
function = body
[]
[]
[Functions]
[body]
type = ParsedFunction
expression = 100*sin(t)
[]
[arg]
type = ParsedFunction
expression = 'x*y*z*cos(t)+1'
[]
[]
[BCs]
[fix_concentration]
type = DirichletBC
preset = true
boundary = left
variable = u
value = 0.0
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'newton'
line_search = none
petsc_options = ''
petsc_options_iname = '-pc_type -ksp_type'
petsc_options_value = 'lu gmres'
l_tol = 1e-8
l_max_its = 100
reuse_preconditioner = false
reuse_preconditioner_max_linear_its = 10
nl_max_its = 10
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 10.0
[./Adaptivity]
interval = 5
max_h_level = 1
start_time = 11.0
stop_time = 6.0
[../]
[]
[Reporters/iteration_info]
type = IterationInfo
[]
[Outputs]
exodus = false
[./csv]
type = CSV
file_base = base_case
[../]
[]
(test/tests/time_integrators/convergence/implicit_convergence.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 4
ny = 4
elem_type = QUAD9
[]
[Variables]
active = 'u'
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[./forcing_fn]
type = ParsedFunction
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
preset = false
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
start_time = 0.0
end_time = 1.0
dt = 0.0625
[./TimeIntegrator]
type = ImplicitMidpoint
[../]
[]
[Outputs]
execute_on = 'initial timestep_end'
exodus = true
[]
(test/tests/time_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
[../]
[]
(modules/heat_transfer/test/tests/heat_conduction/coupled_convective_heat_flux/const_hw.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./t_infinity]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
value = 1000
[../]
[]
[AuxKernels]
[./t_infinity]
type = ConstantAux
variable = t_infinity
value = 500
execute_on = initial
[../]
[]
[BCs]
[./right]
type = CoupledConvectiveHeatFluxBC
variable = u
boundary = right
htc = 10
T_infinity = t_infinity
[../]
[]
[Executioner]
type = Steady
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/interface_user_object/interface_mp_real_user_object_QP.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
[../]
[./primary0_interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./break_boundary]
input = primary0_interface
type = BreakBoundaryOnSubdomainGenerator
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./v]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 2
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 4
block = 1
[../]
[./source_u]
type = BodyForce
variable = u
function = 0.1*t
[../]
[]
[InterfaceKernels]
[./primary0_interface]
type = PenaltyInterfaceDiffusionDot
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 right top'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = TRUE
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
dt = 0.1
num_steps = 3
dtmin = 0.1
line_search = none
[]
[Outputs]
[./out]
type = Exodus
sync_only = true
sync_times = '0.1 0.2 0.3'
execute_on = 'TIMESTEP_END'
[]
[]
[UserObjects]
[./interface_value_uo]
type = InterfaceQpMaterialPropertyRealUO
property = diffusivity
property_neighbor = diffusivity
boundary = 'primary0_interface'
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
interface_value_type = average
[../]
[./interface_value_rate_uo]
type = InterfaceQpMaterialPropertyRealUO
property = diffusivity
property_neighbor = diffusivity
boundary = 'primary0_interface'
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
interface_value_type = average
value_type = rate
[../]
[./interface_value_increment_uo]
type = InterfaceQpMaterialPropertyRealUO
property = diffusivity
property_neighbor = diffusivity
boundary = 'primary0_interface'
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
interface_value_type = average
value_type = increment
[../]
[]
[Materials]
[./stateful1]
type = StatefulMaterial
block = 0
initial_diffusivity = 5
[../]
[./stateful2]
type = StatefulMaterial
block = 1
initial_diffusivity = 2
[../]
[]
[AuxKernels]
[./interface_avg_value_aux]
type = InterfaceValueUserObjectAux
variable = avg
boundary = 'primary0_interface'
interface_uo_name = interface_value_uo
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
[]
[./interface_avg_value_rate_aux]
type = InterfaceValueUserObjectAux
variable = avg_rate
boundary = 'primary0_interface'
interface_uo_name = interface_value_rate_uo
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
[]
[./interface_avg_value_increment_aux]
type = InterfaceValueUserObjectAux
variable = avg_increment
boundary = 'primary0_interface'
interface_uo_name = interface_value_increment_uo
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
[]
[]
[AuxVariables]
[./avg]
family = MONOMIAL
order = CONSTANT
[]
[./avg_rate]
family = MONOMIAL
order = CONSTANT
[]
[./avg_increment]
family = MONOMIAL
order = CONSTANT
[]
[]
(test/tests/materials/material/material_test_dg.i)
[Mesh]
file = sq-2blk.e
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[Functions]
active = 'forcing_fn exact_fn'
[./forcing_fn]
type = ParsedFunction
expression = (x*x*x)-6.0*x
[../]
[./exact_fn]
type = ParsedGradFunction
value = (x*x*x)
grad_x = 3*x*x
grad_y = 0
[../]
[]
[Kernels]
active = 'diff abs forcing'
[./diff]
type = MatDiffusionTest
variable = u
prop_name = matp
[../]
[./abs]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGKernels]
active = 'dgdiff'
[./dgdiff]
type = DGDiffusion
variable = u
sigma = 6
epsilon = -1.0
diff = matp
[../]
[]
[BCs]
active = 'all'
[./all]
type = DGMDDBC
variable = u
boundary = '1 2 3 4'
function = exact_fn
prop_name = matp
sigma = 6
epsilon = -1.0
[../]
[]
[Materials]
active = 'mat_1 mat_2'
[./mat_1]
type = MTMaterial
block = 1
value = 1
[../]
[./mat_2]
type = MTMaterial
block = 2
value = 2
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out_dg
exodus = true
[]
(test/tests/postprocessors/pps_interval/pps_bad_interval2.i)
[Mesh]
file = square-2x2-nodeids.e
# This test can only be run with renumering disabled, so the
# NodalVariableValue postprocessor's node id is well-defined.
allow_renumbering = false
[]
[Variables]
active = 'u v'
[./u]
order = SECOND
family = LAGRANGE
[../]
[./v]
order = SECOND
family = LAGRANGE
[../]
[]
[Functions]
active = 'force_fn exact_fn left_bc'
[./force_fn]
type = ParsedFunction
expression = '1-x*x+2*t'
[../]
[./exact_fn]
type = ParsedFunction
expression = '(1-x*x)*t'
[../]
[./left_bc]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
active = '
time_u diff_u ffn_u
time_v diff_v'
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'all_u left_v right_v'
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = exact_fn
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '2'
value = 0
[../]
[]
[Postprocessors]
active = 'l2 node1 node4'
[./l2]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./node1]
type = NodalVariableValue
variable = u
nodeid = 15
[../]
[./node4]
type = NodalVariableValue
variable = v
nodeid = 10
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
end_time = 1
[]
[Outputs]
file_base = ignore_bad
exodus = true
[./console]
type = Console
time_step_interval = 2
[../]
[]
(test/tests/kernels/ad_scalar_kernel_constraint/diffusion_override_scalar.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[exact_fn]
type = ParsedFunction
value = 'x*x+y*y'
[]
[ffn]
type = ParsedFunction
value = -4
[]
[bottom_bc_fn]
type = ParsedFunction
value = -2*y
[]
[right_bc_fn]
type = ParsedFunction
value = 2*x
[]
[top_bc_fn]
type = ParsedFunction
value = 2*y
[]
[left_bc_fn]
type = ParsedFunction
value = -2*x
[]
[]
[Variables]
[u]
family = LAGRANGE
order = SECOND
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[Kernels]
# Make sure that we can derive from the scalar base class
# but actually not assign a scalar variable
[diff]
type = ADDiffusionNoScalar
variable = u
scalar_variable = lambda
[]
[ffnk]
type = ADBodyForce
variable = u
function = ffn
[]
[sk_lm]
type = ADScalarLMKernel
variable = u
kappa = lambda
pp_name = pp
value = 2.666666666666666
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bottom_bc_fn
[]
[right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = right_bc_fn
[]
[top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = top_bc_fn
[]
[left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = left_bc_fn
[]
[]
[Postprocessors]
# integrate the volume of domain since original objects set
# int(phi)=V0, rather than int(phi-V0)=0
[pp]
type = FunctionElementIntegral
function = 1
execute_on = initial
[]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-9
l_tol = 1.e-10
nl_max_its = 10
# This example builds an indefinite matrix, so "-pc_type hypre -pc_hypre_type boomeramg" cannot
# be used reliably on this problem. ILU(0) seems to do OK in both serial and parallel in my testing,
# I have not seen any zero pivot issues.
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'bjacobi ilu'
# This is a linear problem, so we don't need to recompute the
# Jacobian. This isn't a big deal for a Steady problems, however, as
# there is only one solve.
solve_type = 'LINEAR'
[]
[Outputs]
# exodus = true
csv = true
hide = lambda
[]
(modules/xfem/test/tests/moving_interface/verification/1D_xy_homog1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: quasi-1D
# Coordinate System: xy
# Material Numbers/Types: homogeneous 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed linear level set function
# Description:
# A simple transient heat transfer problem in Cartesian coordinates designed
# with the Method of Manufactured Solutions. This problem was developed to
# verify XFEM performance in the presence of a moving interface for linear
# element models that can be exactly evaluated by FEM/Moose. Both the
# temperature solution and level set function are designed to be linear to
# attempt to minimize error between the Moose/exact solution and XFEM results.
# Thermal conductivity is a single, constant value at all points in the system.
# Results:
# The temperature at the left boundary (x=0) exhibits the largest difference
# between the FEM/Moose solution and XFEM results. We present the XFEM results
# at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 480.0000064
# 0.6 520 520.0000323
# 0.8 560 560.0000896
# 1.0 600 600.0001870
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 1
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 0.5
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-200*x+200)'
[../]
[./ls_func]
type = ParsedFunction
expression = '1-(x-0.04)-0.2*t'
[../]
[./neumann_func]
type = ParsedFunction
expression = '1.5*200*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericConstantMaterial
prop_names = 'diffusion_coefficient'
prop_values = 1.5
[../]
[]
[BCs]
[./left_du]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 'right'
value = 400
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/mesh/named_entities/named_entities_test_xda.i)
[Mesh]
file = named_entities.xda
uniform_refine = 1
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
block = '1 center_block 3'
[./InitialCondition]
type = ConstantIC
value = 20
block = 'center_block 3'
[../]
[../]
[]
[AuxVariables]
[./reporter]
order = CONSTANT
family = MONOMIAL
block = 'left_block 3'
[../]
[]
[ICs]
[./reporter_ic]
type = ConstantIC
variable = reporter
value = 10
[../]
[]
[Kernels]
active = 'diff body_force'
[./diff]
type = Diffusion
variable = u
# Note we are using both names and numbers here
block = 'left_block 2 right_block'
[../]
[./body_force]
type = BodyForce
variable = u
block = 'center_block'
value = 10
[../]
[]
[AuxKernels]
[./hardness]
type = MaterialRealAux
variable = reporter
property = 'hardness'
block = 'left_block 3'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left_side'
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 'right_side'
value = 1
[../]
[]
[Postprocessors]
[./elem_average]
type = ElementAverageValue
variable = u
block = 'center_block'
execute_on = 'initial timestep_end'
[../]
[./side_average]
type = SideAverageValue
variable = u
boundary = 'right_side'
execute_on = 'initial timestep_end'
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'hardness'
prop_values = 10
block = '1 right_block'
[../]
[./empty]
type = MTMaterial
block = 'center_block'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/nodal_var_value/nodal_var_value.i)
[Mesh]
file = square-2x2-nodeids.e
# NodalVariableValue is not safe on renumbered meshes
allow_renumbering = false
[]
[Variables]
active = 'u v'
[./u]
order = SECOND
family = LAGRANGE
[../]
[./v]
order = SECOND
family = LAGRANGE
[../]
[]
[Functions]
active = 'force_fn exact_fn left_bc'
[./force_fn]
type = ParsedFunction
expression = '1-x*x+2*t'
[../]
[./exact_fn]
type = ParsedFunction
expression = '(1-x*x)*t'
[../]
[./left_bc]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
active = '
time_u diff_u ffn_u
time_v diff_v'
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'all_u left_v right_v'
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = exact_fn
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '2'
value = 0
[../]
[]
[Postprocessors]
active = 'l2 scalednode1 node1 node4'
[./l2]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./node1]
type = NodalVariableValue
variable = u
nodeid = 15
[../]
[./scalednode1]
type = NodalVariableValue
variable = u
nodeid = 15
scale_factor = 2
[../]
[./node4]
type = NodalVariableValue
variable = v
nodeid = 10
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_nodal_var_value
exodus = true
[]
(test/tests/dgkernels/3d_diffusion_dg/3d_diffusion_dg_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 5
ny = 5
nz = 5
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 1
elem_type = HEX8
[]
[Variables]
active = 'u'
[u]
order = FIRST
family = MONOMIAL
[InitialCondition]
type = ConstantIC
value = 0.5
[]
[]
[]
[Functions]
active = 'forcing_fn exact_fn'
[forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[]
[exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[]
[]
[Kernels]
active = 'diff abs forcing'
[diff]
type = Diffusion
variable = u
[]
[abs] # u * v
type = Reaction
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[DGKernels]
active = 'dg_diff'
[dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[]
[]
[BCs]
active = 'all'
[all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3 4 5'
function = exact_fn
epsilon = -1
sigma = 6
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Postprocessors]
active = 'h dofs l2_err'
[h]
type = AverageElementSize
execute_on = 'initial timestep_end'
[]
[dofs]
type = NumDOFs
execute_on = 'initial timestep_end'
[]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
file_base = out
exodus = true
[]
(test/tests/controls/time_periods/dgkernels/dgkernels.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]
[Adaptivity]
marker = uniform_marker
[Markers]
[uniform_marker]
type = UniformMarker
mark = REFINE
[]
[]
[]
[Variables]
[u]
order = FIRST
family = MONOMIAL
initial_condition = 1
[]
[]
[Functions]
[forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[]
[exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[abs] # u * v
type = Reaction
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[DGKernels]
[dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[]
[dg_diff2]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 4
[]
[]
[BCs]
[all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
num_steps = 4
dt = 1
nl_rel_tol = 1e-10
[]
[Outputs]
exodus = true
[]
[Controls]
[dg_problem]
type = TimePeriod
enable_objects = 'DGKernels/dg_diff2'
disable_objects = 'DGKernel::dg_diff'
start_time = '2'
execute_on = 'initial timestep_begin'
[]
[]
(test/tests/postprocessors/pps_interval/pps_bad_interval3.i)
[Mesh]
file = square-2x2-nodeids.e
# This test can only be run with renumering disabled, so the
# NodalVariableValue postprocessor's node id is well-defined.
allow_renumbering = false
[]
[Variables]
active = 'u v'
[./u]
order = SECOND
family = LAGRANGE
[../]
[./v]
order = SECOND
family = LAGRANGE
[../]
[]
[Functions]
active = 'force_fn exact_fn left_bc'
[./force_fn]
type = ParsedFunction
expression = '1-x*x+2*t'
[../]
[./exact_fn]
type = ParsedFunction
expression = '(1-x*x)*t'
[../]
[./left_bc]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
active = '
time_u diff_u ffn_u
time_v diff_v'
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'all_u left_v right_v'
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = exact_fn
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '2'
value = 0
[../]
[]
[Postprocessors]
active = 'l2 node1 node4'
[./l2]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./node1]
type = NodalVariableValue
variable = u
nodeid = 15
[../]
[./node4]
type = NodalVariableValue
variable = v
nodeid = 10
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = ignore_bad
time_step_interval = 2
exodus = true
[]
(test/tests/transfers/general_field/user_object/duplicated_user_object_tests/sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 8
xmax = 0.1
ymax = 0.5
coord_type = rz
[]
[Variables]
[u]
initial_condition = 1
[]
[]
[AuxVariables]
[layered_average_value]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[axial_force]
type = ParsedFunction
expression = 1000*y
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[force]
type = BodyForce
variable = u
function = axial_force
[]
[]
[AuxKernels]
[layered_aux]
type = SpatialUserObjectAux
variable = layered_average_value
execute_on = timestep_end
user_object = layered_average
[]
[]
[BCs]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[UserObjects]
[layered_average]
type = LayeredAverage
variable = u
direction = y
num_layers = 4
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.001
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/problems/reference_residual_problem/no_ref.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
[]
[Problem]
type = ReferenceResidualProblem
# reference_vector = 'absref'
# extra_tag_vectors = 'absref'
[]
[Variables]
[u][]
[v]
scaling = 1e-6
[]
[]
[Functions]
[ramp]
type = ParsedFunction
expression = 'if(t < 5, t - 5, 0) * x'
[]
[]
[Kernels]
[u_dt]
type = TimeDerivative
variable = u
[]
[u_coupled_rx]
type = CoupledForce
variable = u
v = v
coef = 1
[]
[v_dt]
type = TimeDerivative
variable = v
[]
[v_neg_force]
type = BodyForce
variable = v
value = ${fparse -1 / 2}
function = ramp
[]
[v_force]
type = BodyForce
variable = v
value = 1
function = ramp
[]
[]
[Postprocessors]
[u_avg]
type = ElementAverageValue
variable = u
execute_on = 'TIMESTEP_END INITIAL'
[]
[v_avg]
type = ElementAverageValue
variable = v
execute_on = 'TIMESTEP_END INITIAL'
[]
[timestep]
type = TimePostprocessor
outputs = 'none'
[]
[v_old]
type = ElementAverageValue
variable = v
execute_on = TIMESTEP_BEGIN
outputs = none
[]
[u_old]
type = ElementAverageValue
variable = u
execute_on = TIMESTEP_BEGIN
outputs = none
[]
[v_exact]
type = ParsedPostprocessor
pp_names = 'timestep v_old'
function = 't := if(timestep > 5, 5, timestep); (t^2 - 9 * t) / 8'
[]
[u_exact]
type = ParsedPostprocessor
pp_names = 'u_old v_exact'
function = 'u_old + v_exact'
[]
[]
[Executioner]
type = Transient
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = none
num_steps = 10
nl_rel_tol = 1e-06
verbose = true
[]
[Outputs]
csv = true
perf_graph = true
[]
(test/tests/outputs/oversample/over_sampling_second_file.i)
[Mesh]
type = FileMesh
# Read in and work with a second order mesh
file = wedge18_mesh.e
# If we have an oversample mesh file, we haven not yet implemented
# synchronization of its partitioning with the problem mesh, so we
# need to keep the problem mesh replicated.
parallel_type = replicated
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[./forcing_fn]
type = ParsedFunction
expression = -4+(x*x+y*y)
[../]
[]
[Variables]
active = 'u'
[./u]
[../]
[]
[Kernels]
active = 'ie diff ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '1 2 4'
function = exact_fn
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.2
start_time = 0
num_steps = 3
[]
[Outputs]
file_base = out_wedge
[./oversample]
type = Exodus
file_base = out_wedge_oversample
file = wedge6_mesh.e
[../]
[]
(test/tests/mortar/continuity-3d-non-conforming/continuity_non_conforming_tet.i)
[Mesh]
second_order = false
[file]
type = FileMeshGenerator
file = tet_non_mesh.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
new_block_id = 11
new_block_name = "secondary"
sidesets = '101'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
new_block_id = 12
new_block_name = "primary"
sidesets = '102'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[T]
block = '1 2'
[]
[lambda]
block = 'secondary'
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln_primal
variable = T
boundary = '1 2'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi) + 3*pi^2*sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_primal]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_lambda]
type = ParsedFunction
expression = 'pi*sin(pi*y)*sin(pi*z)*cos(pi*x)'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = '12'
secondary_subdomain = '11'
variable = lambda
secondary_variable = T
delta = 0.1
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[L2lambda]
type = ElementL2Error
variable = lambda
function = exact_soln_lambda
execute_on = 'timestep_end'
block = 'secondary'
[]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = '1 2'
[]
[h]
type = AverageElementSize
block = '1 2'
[]
[]
(test/tests/userobjects/interface_user_object/interface_value_user_object_QP.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
[../]
[./primary0_interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./break_boundary]
input = primary0_interface
type = BreakBoundaryOnSubdomainGenerator
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./v]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 2
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 4
block = 1
[../]
[./source_u]
type = BodyForce
variable = u
function = 0.1*t
[../]
[]
[InterfaceKernels]
[./primary0_interface]
type = PenaltyInterfaceDiffusionDot
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 right top'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = TRUE
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
dt = 0.1
num_steps = 3
dtmin = 0.1
line_search = none
[]
[Outputs]
[./out]
type = Exodus
sync_only = true
sync_times = '0.1 0.2 0.3'
execute_on = 'TIMESTEP_END'
[]
[]
[UserObjects]
[./interface_value_uo]
type = InterfaceQpValueUserObject
var = diffusivity_1
var_neighbor = diffusivity_2
boundary = 'primary0_interface'
execute_on = 'initial timestep_end'
interface_value_type = average
[../]
[./interface_primary_minus_secondary_uo]
type = InterfaceQpValueUserObject
var = diffusivity_1
var_neighbor = diffusivity_2
boundary = 'primary0_interface'
execute_on = 'initial timestep_end'
interface_value_type = jump_primary_minus_secondary
[../]
[./interface_secondary_minus_primary_uo]
type = InterfaceQpValueUserObject
var = diffusivity_1
var_neighbor = diffusivity_2
boundary = 'primary0_interface'
execute_on = 'initial timestep_end'
interface_value_type = jump_secondary_minus_primary
[../]
[./interface_absolute_jump_uo]
type = InterfaceQpValueUserObject
var = diffusivity_1
var_neighbor = diffusivity_2
boundary = 'primary0_interface'
execute_on = 'initial timestep_end'
interface_value_type = jump_abs
[../]
[./interface_primary_uo]
type = InterfaceQpValueUserObject
var = diffusivity_1
var_neighbor = diffusivity_2
boundary = 'primary0_interface'
execute_on = 'initial timestep_end'
interface_value_type = primary
[../]
[./interface_secondary_uo]
type = InterfaceQpValueUserObject
var = diffusivity_1
var_neighbor = diffusivity_2
boundary = 'primary0_interface'
execute_on = 'initial timestep_end'
interface_value_type = secondary
[../]
[]
[Materials]
[./stateful1]
type = StatefulMaterial
block = 0
initial_diffusivity = 5
[../]
[./stateful2]
type = StatefulMaterial
block = 1
initial_diffusivity = 2
[../]
[]
[AuxKernels]
[./diffusivity_1]
type = MaterialRealAux
property = diffusivity
variable = diffusivity_1
execute_on = 'INITIAL NONLINEAR'
[]
[./diffusivity_2]
type = MaterialRealAux
property = diffusivity
variable = diffusivity_2
execute_on = 'INITIAL NONLINEAR'
[]
[./interface_avg_qp_aux]
type = InterfaceValueUserObjectAux
variable = avg_qp
boundary = 'primary0_interface'
interface_uo_name = interface_value_uo
execute_on = 'INITIAL TIMESTEP_END'
[]
[./interface_primary_minus_secondary_qp_aux]
type = InterfaceValueUserObjectAux
variable = primary_minus_secondary_qp
boundary = 'primary0_interface'
interface_uo_name = interface_primary_minus_secondary_uo
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./interface_secondary_minus_primary_qp_aux]
type = InterfaceValueUserObjectAux
variable = secondary_minus_primary_qp
boundary = 'primary0_interface'
interface_uo_name = interface_secondary_minus_primary_uo
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./interface_absolute_jump_qp_aux]
type = InterfaceValueUserObjectAux
variable = abs_jump_qp
boundary = 'primary0_interface'
interface_uo_name = interface_absolute_jump_uo
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./interface_primary_qp_aux]
type = InterfaceValueUserObjectAux
variable = primary_qp
boundary = 'primary0_interface'
interface_uo_name = interface_primary_uo
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./interface_secondary_qp_aux]
type = InterfaceValueUserObjectAux
variable = secondary_qp
boundary = 'primary0_interface'
interface_uo_name = interface_secondary_uo
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
[AuxVariables]
[./diffusivity_1]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_2]
family = MONOMIAL
order = CONSTANT
[]
[./avg_qp]
family = MONOMIAL
order = CONSTANT
[]
[./primary_minus_secondary_qp]
family = MONOMIAL
order = CONSTANT
[]
[./secondary_minus_primary_qp]
family = MONOMIAL
order = CONSTANT
[]
[./abs_jump_qp]
family = MONOMIAL
order = CONSTANT
[]
[./primary_qp]
family = MONOMIAL
order = CONSTANT
[]
[./secondary_qp]
family = MONOMIAL
order = CONSTANT
[]
[]
[Postprocessors]
[./interface_average_PP]
type = SideAverageValue
boundary = 'primary0_interface'
variable = avg_qp
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./primary_minus_secondary_qp_PP]
type = SideAverageValue
boundary = 'primary0_interface'
variable = primary_minus_secondary_qp
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./secondary_minus_primary_qp_PP]
type = SideAverageValue
boundary = 'primary0_interface'
variable = secondary_minus_primary_qp
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./abs_jump_qp_PP]
type = SideAverageValue
boundary = 'primary0_interface'
variable = abs_jump_qp
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./primary_qp_PP]
type = SideAverageValue
boundary = 'primary0_interface'
variable = primary_qp
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./secondary_qp_PP]
type = SideAverageValue
boundary = 'primary0_interface'
variable = secondary_qp
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
(modules/heat_transfer/test/tests/heat_conduction/coupled_convective_heat_flux/coupled_convective_heat_flux_two_phase.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Functions]
[./alpha_liquid_fn]
type = ParsedFunction
expression = 'sin(pi*y)'
[../]
[./T_infinity_liquid_fn]
type = ParsedFunction
expression = '(x*x+y*y)+500'
[../]
[./Hw_liquid_fn]
type = ParsedFunction
expression = '((1-x)*(1-x)+(1-y)*(1-y))+1000'
[../]
[./alpha_vapor_fn]
type = ParsedFunction
expression = '1-sin(pi*y)'
[../]
[./T_infinity_vapor_fn]
type = ParsedFunction
expression = '(x*x+y*y)+5'
[../]
[./Hw_vapor_fn]
type = ParsedFunction
expression = '((1-x)*(1-x)+(1-y)*(1-y))+10'
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./T_infinity_liquid]
[../]
[./Hw_liquid]
[../]
[./alpha_liquid]
[../]
[./T_infinity_vapor]
[../]
[./Hw_vapor]
[../]
[./alpha_vapor]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
value = 1000
[../]
[]
[AuxKernels]
[./alpha_liquid_ak]
type = FunctionAux
variable = alpha_liquid
function = alpha_liquid_fn
execute_on = initial
[../]
[./T_infinity_liquid_ak]
type = FunctionAux
variable = T_infinity_liquid
function = T_infinity_liquid_fn
execute_on = initial
[../]
[./Hw_liquid_ak]
type = FunctionAux
variable = Hw_liquid
function = Hw_liquid_fn
execute_on = initial
[../]
[./alpha_vapor_ak]
type = FunctionAux
variable = alpha_vapor
function = alpha_vapor_fn
execute_on = initial
[../]
[./T_infinity_vapor_ak]
type = FunctionAux
variable = T_infinity_vapor
function = T_infinity_vapor_fn
execute_on = initial
[../]
[./Hw_vapor_ak]
type = FunctionAux
variable = Hw_vapor
function = Hw_vapor_fn
execute_on = initial
[../]
[]
[BCs]
[./right]
type = CoupledConvectiveHeatFluxBC
variable = u
boundary = right
alpha = 'alpha_liquid alpha_vapor'
htc = 'Hw_liquid Hw_vapor'
T_infinity = 'T_infinity_liquid T_infinity_vapor'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(tutorials/tutorial02_multiapps/step03_coupling/01_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[vt]
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Materials]
[diff]
type = ParsedMaterial
property_name = D
coupled_variables = 'vt'
expression = 'vt'
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 0.2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[micro]
type = TransientMultiApp
positions = '0.15 0.15 0 0.45 0.45 0 0.75 0.75 0'
input_files = '01_sub.i'
execute_on = timestep_end
output_in_position = true
[]
[]
[Transfers]
[push_u]
type = MultiAppVariableValueSampleTransfer
to_multi_app = micro
source_variable = u
variable = ut
[]
[pull_v]
type = MultiAppPostprocessorInterpolationTransfer
from_multi_app = micro
variable = vt
postprocessor = average_v
[]
[]
(modules/stochastic_tools/test/tests/userobjects/inverse_mapping/inverse_map.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmax = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[v_pod]
[]
[v_aux]
[]
[v_aux_pod]
[]
[]
[Kernels]
[diffusion_v]
type = MatDiffusion
variable = v
diffusivity = D_v
[]
[source_v]
type = BodyForce
variable = v
value = 1.0
[]
[]
[AuxKernels]
[func_aux]
type = FunctionAux
variable = v_aux
function = v_aux_func
[]
[]
[Functions]
[v_aux_func]
type = ParsedFunction
expression = 'S * x + D'
symbol_names = 'S D'
symbol_values = '2 5'
[]
[]
[Materials]
[diffusivity_v]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 2.0
[]
[]
[BCs]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 5
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[UserObjects]
[im]
type = InverseMapping
mapping = pod
surrogate = "polyreg_v polyreg_v_aux"
variable_to_fill = "v_pod v_aux_pod"
variable_to_reconstruct = "v v_aux"
parameters = '2 5'
execute_on = TIMESTEP_END
[]
[]
[Surrogates]
[polyreg_v]
type = PolynomialRegressionSurrogate
filename = "create_mapping_main_rom_polyreg_v.rd"
[]
[polyreg_v_aux]
type = PolynomialRegressionSurrogate
filename = "create_mapping_main_rom_polyreg_v_aux.rd"
[]
[]
[VariableMappings]
[pod]
type = PODMapping
filename = "create_mapping_main_mapping_pod_mapping.rd"
num_modes_to_compute = 2
[]
[]
[Postprocessors]
[error_v]
type = ElementL2Difference
variable = v
other_variable = v_pod
execute_on = FINAL
outputs = csv_errors
[]
[error_v_aux]
type = ElementL2Difference
variable = v_aux
other_variable = v_aux_pod
execute_on = FINAL
outputs = csv_errors
[]
[]
[Outputs]
exodus = true
execute_on = 'FINAL'
[csv_errors]
type = CSV
[]
[]
(modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined_constM.i)
# A sample is constrained on all sides, except its top
# and its boundaries are
# also impermeable. Fluid is pumped into the sample via a
# volumetric source (ie kg/second per cubic meter), and the
# rise in the top surface, porepressure, and stress are observed.
#
# In the standard poromechanics scenario, the Biot Modulus is held
# fixed and the source, s, has units m^3/second/m^3. Then the expected result
# is
# strain_zz = disp_z = BiotCoefficient*BiotModulus*s*t/((bulk + 4*shear/3) + BiotCoefficient^2*BiotModulus)
# porepressure = BiotModulus*(s*t - BiotCoefficient*strain_zz)
# stress_xx = (bulk - 2*shear/3)*strain_zz (remember this is effective stress)
# stress_zz = (bulk + 4*shear/3)*strain_zz (remember this is effective stress)
#
# In porous_flow, however, the source has units kg/second/m^3. The ratios remain
# fixed:
# stress_xx/strain_zz = (bulk - 2*shear/3) = 1 (for the parameters used here)
# stress_zz/strain_zz = (bulk + 4*shear/3) = 4 (for the parameters used here)
# porepressure/strain_zz = 13.3333333 (for the parameters used here)
#
# Expect
# disp_z = 0.3*10*s*t/((2 + 4*1.5/3) + 0.3^2*10) = 0.612245*s*t
# porepressure = 10*(s*t - 0.3*0.612245*s*t) = 8.163265*s*t
# stress_xx = (2 - 2*1.5/3)*0.612245*s*t = 0.612245*s*t
# stress_zz = (2 + 4*shear/3)*0.612245*s*t = 2.44898*s*t
# The relationship between the constant poroelastic source
# s (m^3/second/m^3) and the PorousFlow source, S (kg/second/m^3) is
# S = fluid_density * s = s * exp(porepressure/fluid_bulk)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.8
alpha = 1e-5
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back'
[]
[]
[Kernels]
[grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
[]
[grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
[]
[grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
component = 2
[]
[poro_x]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
variable = disp_x
component = 0
[]
[poro_y]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
variable = disp_y
component = 1
[]
[poro_z]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
component = 2
variable = disp_z
[]
[poro_vol_exp]
type = PorousFlowMassVolumetricExpansion
variable = porepressure
fluid_component = 0
[]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = porepressure
[]
[flux]
type = PorousFlowAdvectiveFlux
variable = porepressure
gravity = '0 0 0'
fluid_component = 0
[]
[source]
type = BodyForce
function = '0.1*exp(8.163265306*0.1*t/3.3333333333)'
variable = porepressure
[]
[]
[AuxVariables]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xz]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_yz]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 3.3333333333
density0 = 1
thermal_expansion = 0
viscosity = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
[]
[stress]
type = ComputeLinearElasticStress
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityHMBiotModulus
porosity_zero = 0.1
biot_coefficient = 0.3
solid_bulk = 2
constant_fluid_bulk_modulus = 3.3333333333
constant_biot_modulus = 10.0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 1 0 0 0 1' # unimportant
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[]
[]
[Postprocessors]
[p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
[]
[zdisp]
type = PointValue
outputs = csv
point = '0 0 0.5'
variable = disp_z
[]
[stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[]
[stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[]
[stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[]
[]
[Functions]
[stress_xx_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'stress_xx zdisp'
[]
[stress_zz_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'stress_zz zdisp'
[]
[p_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'p0 zdisp'
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-14 1E-10 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = pp_generation_unconfined_constM
[csv]
type = CSV
[]
[]
(test/tests/mortar/aux-gap/gap.i)
[Mesh]
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[]
[secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[]
[]
[Variables]
[T]
block = '1 2'
[]
[lambda]
block = '10'
use_dual = true
[]
[]
[AuxVariables]
[gap]
block = '10'
[]
[]
[AuxKernels]
[gap]
type = WeightedGapAux
variable = gap
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln
variable = T
boundary = '3 4 5 6 7 8'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = '-4 + x^2 + y^2'
[]
[exact_soln]
type = ParsedFunction
expression = 'x^2 + y^2'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
exodus = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
(test/tests/preconditioners/pbp/pbp_adapt_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[]
[Variables]
active = 'u v'
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = -4
[../]
[./exact_fn]
type = ParsedFunction
expression = ((x*x)+(y*y))
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[./conv_v]
type = CoupledForce
variable = v
v = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left_v]
type = DirichletBC
variable = v
boundary = 1
value = 0
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = 2
value = 0
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Preconditioning]
[./PBP]
type = PBP
solve_order = 'u v'
preconditioner = 'AMG ASM'
off_diag_row = 'v'
off_diag_column = 'u'
[../]
[]
[Executioner]
type = Steady
solve_type = JFNK
[./Adaptivity]
steps = 3
coarsen_fraction = 0.1
refine_fraction = 0.2
max_h_level = 5
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_pbp_adapt
print_mesh_changed_info = true
exodus = true
[]
(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/bcs/penalty_dirichlet_bc/function_penalty_dirichlet_bc_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = -4+x*x+y*y
[../]
[./solution]
type = ParsedGradFunction
value = x*x+y*y
grad_x = 2*x
grad_y = 2*y
[../]
[]
[Variables]
[./u]
order = SECOND
family = HIERARCHIC
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'bc_all'
[./bc_all]
type = FunctionPenaltyDirichletBC
variable = u
function = solution
boundary = 'top left right bottom'
penalty = 1e6
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-14
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/time_integrators/crank-nicolson/cranic_adapt.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 4
ny = 4
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = sin(pi*x)*sin(pi*y)+2*t*pi*pi*sin(pi*x)*sin(pi*y)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*sin(pi*x)*sin(pi*y)
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
# Use the block format instead of the scheme parameter
[./TimeIntegrator]
type = CrankNicolson
[../]
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[./Adaptivity]
refine_fraction = 0.2
coarsen_fraction = 0.3
max_h_level = 4
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/mortar/gap-conductance-2d-non-conforming/gap-conductance.i)
[Mesh]
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[./primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[../]
[./secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[../]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./T]
block = '1 2'
[../]
[./lambda]
block = '10'
[../]
[]
[BCs]
[./neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln
variable = T
boundary = '3 4 5 6 7 8'
[../]
[]
[Kernels]
[./conduction]
type = Diffusion
variable = T
block = '1 2'
[../]
[./sink]
type = Reaction
variable = T
block = '1 2'
[../]
[./forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[../]
[]
[Functions]
[./forcing_function]
type = ParsedFunction
expression = '-4 + x^2 + y^2'
[../]
[./exact_soln]
type = ParsedFunction
expression = 'x^2 + y^2'
[../]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[./mortar]
type = GapHeatConductanceTest
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
[../]
[]
[Materials]
[constant]
type = ADGenericConstantMaterial
prop_names = 'gap_conductance'
prop_values = '.03'
block = '1 2'
[]
[./ssm]
type = SpatialStatefulMaterial
block = '1 2'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type'
petsc_options_value = 'lu basic'
[]
[Outputs]
exodus = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
(test/tests/outputs/exodus/exodus_side_discontinuous_edge2.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 16
dim = 1
[]
[]
[Variables]
[u]
order = THIRD
family = MONOMIAL
[]
[lambda]
family = SIDE_HIERARCHIC
order = CONSTANT
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
[]
[source]
type = BodyForce
variable = u
value = '1'
[]
[]
[DGKernels]
[testjumps]
type = HFEMTestJump
variable = u
side_variable = lambda
[]
[trialjumps]
type = HFEMTrialJump
variable = lambda
interior_variable = u
[]
[]
[BCs]
[u_robin]
type = VacuumBC
boundary = 'left right'
variable = u
[]
[lambda_D_unused]
type = PenaltyDirichletBC
boundary = 'left right'
variable = lambda
penalty = 1
[]
[]
[Postprocessors]
[intu]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[]
[lambdanorm]
type = ElementSidesL2Norm
variable = lambda
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
[Outputs]
[out]
type = Exodus
discontinuous = true
side_discontinuous = true
file_base = 'exodus_side_discontinuous_edge2_out'
[]
[]
(test/tests/kernels/ode/ode_expl_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 5
ny = 5
elem_type = QUAD4
[]
[Functions]
[./f_fn]
type = ParsedFunction
expression = -4
[../]
[./bc_all_fn]
type = ParsedFunction
expression = x*x+y*y
[../]
[]
# NL
[Variables]
[./u]
family = LAGRANGE
order = FIRST
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./uff]
type = BodyForce
variable = u
function = f_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = bc_all_fn
[../]
[]
# Aux
[AuxVariables]
[./y]
family = SCALAR
order = FIRST
initial_condition = 1
[../]
[]
[AuxScalarKernels]
[./ode1]
type = ExplicitODE
variable = y
[../]
[]
[Executioner]
type = Transient
start_time = 0
dt = 0.1
num_steps = 10
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/multiapp_high_order_variable_transfer/parent_L2_Lagrange_userobject.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
parallel_type = replicated
[]
[Variables]
[power_density]
family = L2_LAGRANGE
order = FIRST
[]
[]
[AuxVariables]
[./multi_layered_average]
family = LAGRANGE
order = FIRST
[../]
[]
[UserObjects]
[./multi_layered_average]
type = LayeredAverage
variable = power_density
direction = y
num_layers = 4
[../]
[]
[AuxKernels]
[./layered_aux]
type = SpatialUserObjectAux
variable = multi_layered_average
execute_on = 'nonlinear TIMESTEP_END'
user_object = multi_layered_average
[../]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2'
[]
[]
[Kernels]
[diff]
type = Reaction
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[Postprocessors]
[layered_avg]
type = ElementAverageValue
block = '0'
variable = multi_layered_average
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = sub_L2_Lagrange.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[p_to_sub]
type = MultiAppUserObjectTransfer
user_object = multi_layered_average
variable = power_density
to_multi_app = sub
execute_on = 'timestep_end'
[]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(test/tests/variables/fe_hermite_convergence/hermite_converge_periodic.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 4
ny = 4
elem_type = QUAD4
# This test will not work in parallel with DistributedMesh enabled
# due to a bug in PeriodicBCs.
parallel_type = replicated
[]
[Functions]
[./bc_fn]
type = ParsedGradFunction
value = -sin(pi*x)*sin(pi*y)
grad_x = -pi*cos(pi*x)*sin(pi*y)
grad_y = -pi*sin(pi*x)*cos(pi*y)
[../]
[./bc_fnt]
type = ParsedFunction
expression = -pi*sin(pi*x)*cos(pi*y)
[../]
[./bc_fnb]
type = ParsedFunction
expression = pi*sin(pi*x)*cos(pi*y)
[../]
[./forcing_fn]
type = ParsedFunction
expression = -2*pi*pi*sin(pi*x)*sin(pi*y)-sin(pi*x)*sin(pi*y)
[../]
[]
[Variables]
[./u]
order = THIRD
family = HERMITE
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./Periodic]
[./all]
variable = u
auto_direction= 'x y'
[../]
[../]
[./bc_top]
type=FunctionNeumannBC
variable = u
boundary = 'top'
function = bc_fnt
[../]
[./bc_bottom]
type=FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bc_fnb
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = bc_fn
[../]
[./H1error]
type = ElementH1Error
variable = u
function = bc_fn
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = bc_fn
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
# We use higher-order quadrature to ensure that the forcing function
# is integrated accurately.
[./Quadrature]
order=ELEVENTH
[../]
[]
[Adaptivity]
steps = 2
marker = uniform
[./Markers]
[./uniform]
type = UniformMarker
mark = refine
[../]
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
print_mesh_changed_info = true
[]
(test/tests/dgkernels/advection_diffusion_mixed_bcs_test_resid_jac/dg_advection_diffusion_test.i)
[Mesh]
type = GeneratedMesh
nx = 2
dim = 1
[]
[Kernels]
[./source]
type = BodyForce
variable = u
function = 'forcing_func'
[../]
[./convection]
type = ConservativeAdvection
variable = u
velocity = '1 0 0'
[../]
[./diffusion]
type = MatDiffusionTest
variable = u
prop_name = 'k'
[../]
[]
[DGKernels]
[./convection]
type = DGConvection
variable = u
velocity = '1 0 0'
[../]
[./diffusion]
type = DGDiffusion
variable = u
diff = 'k'
sigma = 6
epsilon = -1
[../]
[]
[BCs]
[./advection]
type = OutflowBC
boundary = 'right'
variable = u
velocity = '1 0 0'
[../]
[./diffusion_left]
type = DGFunctionDiffusionDirichletBC
boundary = 'left'
variable = u
sigma = 6
epsilon = -1
function = 'boundary_left_func'
diff = 'k'
[../]
[]
[Variables]
[./u]
family = MONOMIAL
order = THIRD
[../]
[]
[Materials]
[./test]
block = 0
type = GenericFunctionMaterial
prop_names = 'k'
prop_values = 'k_func'
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Functions]
[./forcing_func]
type = ParsedFunction
expression = '1'
[../]
[./boundary_left_func]
type = ParsedFunction
expression = '0'
[../]
[./k_func]
type = ParsedFunction
expression = '1 + x'
[../]
[]
[Outputs]
exodus = true
execute_on = 'timestep_end'
[]
(test/tests/auxkernels/element_var/element_var_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
# This test uses ElementalVariableValue postprocessors on specific
# elements, so element numbering needs to stay unchanged
allow_renumbering = false
[]
[Functions]
[./ffn]
type = ParsedFunction
expression = -4
[../]
[./exactfn]
type = ParsedFunction
expression = x*x+y*y
[../]
[./aux_exact_fn]
type = ParsedFunction
expression = t*(x*x+y*y)
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
#Coupling of nonlinear to Aux
[./force]
type = BodyForce
variable = u
function = ffn
[../]
[]
[AuxVariables]
[./aux_u]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./a]
type = FunctionAux
variable = aux_u
function = aux_exact_fn
[../]
[]
[BCs]
[./left]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exactfn
[../]
[]
[Postprocessors]
[./elem_56]
type = ElementalVariableValue
variable = u
elementid = 56
[../]
[./aux_elem_99]
type = ElementalVariableValue
variable = aux_u
elementid = 99
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.01
start_time = 0
num_steps = 10
[]
[Outputs]
exodus = true
file_base = out
[]
(test/tests/outputs/exodus/exodus_discontinuous.i)
##
# \file exodus/exodus_discontinuous.i
# \example exodus/exodus_discontinuous.i
# Input file for testing discontinuous data output
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./disc_u]
family = monomial
order = first
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = disc_u
[../]
[./forcing]
type = BodyForce
variable = disc_u
value = 7
[../]
[]
[DGKernels]
[./diff_dg]
type = DGDiffusion
variable = disc_u
sigma = 1
epsilon = 1
[../]
[]
[Functions]
[./zero_fn]
type = ParsedFunction
expression = 0.0
[../]
[]
[BCs]
[./all]
type = DGFunctionDiffusionDirichletBC
variable = disc_u
boundary = 'left right top bottom'
function = zero_fn
sigma = 1
epsilon = 1
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
execute_on = 'timestep_end'
[./exo_out]
type = Exodus
discontinuous = true
file_base = 'exodus_discontinuous_out'
[../]
[]
(test/tests/auxkernels/element_aux_var/block_global_depend_elem_aux.i)
[Mesh]
file = rectangle.e
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./coupled_left]
order = CONSTANT
family = MONOMIAL
block = 1
[../]
[./coupled_right]
order = CONSTANT
family = MONOMIAL
block = 2
[../]
[./two]
order = CONSTANT
family = MONOMIAL
initial_condition = 0
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
block = 1
value = 10
[../]
[]
[AuxKernels]
[./coupled_left]
variable = coupled_left
type = CoupledAux
value = 8
operator = /
coupled = two
[../]
[./coupled_right]
variable = coupled_right
type = CoupledAux
value = 8
operator = /
coupled = two
[../]
[./two]
type = ConstantAux
variable = two
value = 2
[../]
[]
[BCs]
active = 'right'
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(test/tests/time_steppers/timesequence_stepper/exodustimesequence.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*t*(x*x+y*y)
[../]
[./forcing_fn]
type = ParsedFunction
expression = 2*t*(x*x+y*y)-4*t*t
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]
[ICs]
[./u_var]
type = FunctionIC
variable = u
function = exact_fn
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[../]
[]
[Executioner]
type = Transient
end_time = 4.0
[./TimeStepper]
type = ExodusTimeSequenceStepper
mesh = timesequence_no_start_time.e
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/mortar/continuity-3d-non-conforming/continuity_tet.i)
[Mesh]
second_order = false
[left_block]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 2
nz = 2
xmin = 0
xmax = 0.3
ymin = 0
ymax = .5
zmin = 0
zmax = .5
elem_type = TET4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'lb_bottom lb_back lb_right lb_front lb_left lb_top'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 2
nz = 2
xmin = 0.3
xmax = 0.6
ymin = 0
ymax = .5
zmin = 0
zmax = .5
elem_type = TET4
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block
subdomain_id = 2
[]
[right_block_change_boundary_id]
type = RenameBoundaryGenerator
input = right_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'left_block right_block'
[]
[right_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = rb_right
block = right_block
normal = '1 0 0'
[]
[right_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_right_sideset
new_boundary = rb_left
block = right_block
normal = '-1 0 0'
[]
[right_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_left_sideset
new_boundary = rb_top
block = right_block
normal = '0 0 1'
[]
[right_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_top_sideset
new_boundary = rb_bottom
block = right_block
normal = '0 0 -1'
[]
[right_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_bottom_sideset
new_boundary = rb_front
block = right_block
normal = '0 1 0'
[]
[right_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_front_sideset
new_boundary = rb_back
block = right_block
normal = '0 -1 0'
[]
[secondary]
input = right_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'lb_right'
new_block_id = '12'
new_block_name = 'secondary'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'rb_left'
new_block_id = '11'
new_block_name = 'primary'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[T]
block = '1 2'
order = FIRST
[]
[lambda]
block = 'secondary'
family = MONOMIAL
order = CONSTANT
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln_primal
variable = T
boundary = 'lb_back lb_front lb_left lb_top lb_bottom rb_right rb_top rb_bottom rb_front rb_back'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi) + 3*pi^2*sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_primal]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_lambda]
type = ParsedFunction
expression = 'pi*sin(pi*y)*sin(pi*z)*cos(pi*x)'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = EqualValueConstraint
primary_boundary = 'rb_left'
secondary_boundary = 'lb_right'
primary_subdomain = '11'
secondary_subdomain = '12'
variable = lambda
secondary_variable = T
delta = .1
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[L2lambda]
type = ElementL2Error
variable = lambda
function = exact_soln_lambda
execute_on = 'timestep_end'
block = 'secondary'
[]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = 'left_block right_block'
[]
[h]
type = AverageElementSize
block = 'left_block right_block'
[]
[]
(modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined_basicthm.i)
# Identical to pp_generation_unconfined_fullysat_volume.i but using an Action
#
# A sample is constrained on all sides, except its top
# and its boundaries are
# also impermeable. Fluid is pumped into the sample via a
# volumetric source (ie m^3/second per cubic meter), and the
# rise in the top surface, porepressure, and stress are observed.
#
# In the standard poromechanics scenario, the Biot Modulus is held
# fixed and the source has units 1/s. Then the expected result
# is
# strain_zz = disp_z = BiotCoefficient*BiotModulus*s*t/((bulk + 4*shear/3) + BiotCoefficient^2*BiotModulus)
# porepressure = BiotModulus*(s*t - BiotCoefficient*strain_zz)
# stress_xx = (bulk - 2*shear/3)*strain_zz (remember this is effective stress)
# stress_zz = (bulk + 4*shear/3)*strain_zz (remember this is effective stress)
#
# In standard porous_flow, everything is based on mass, eg the source has
# units kg/s/m^3. This is discussed in the other pp_generation_unconfined
# models. In this test, we use the FullySaturated Kernel and set
# multiply_by_density = false
# meaning the fluid Kernel has units of volume, and the source, s, has units 1/time
#
# The ratios are:
# stress_xx/strain_zz = (bulk - 2*shear/3) = 1 (for the parameters used here)
# stress_zz/strain_zz = (bulk + 4*shear/3) = 4 (for the parameters used here)
# porepressure/strain_zz = 13.3333333 (for the parameters used here)
#
# Expect
# disp_z = 0.3*10*s*t/((2 + 4*1.5/3) + 0.3^2*10) = 0.612245*s*t
# porepressure = 10*(s*t - 0.3*0.612245*s*t) = 8.163265*s*t
# stress_xx = (2 - 2*1.5/3)*0.612245*s*t = 0.612245*s*t
# stress_zz = (2 + 4*shear/3)*0.612245*s*t = 2.44898*s*t
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back'
[]
[]
[Kernels]
[source]
type = BodyForce
function = 0.1
variable = porepressure
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.0
bulk_modulus = 3.3333333333
viscosity = 1.0
density0 = 1.0
[]
[]
[PorousFlowBasicTHM]
coupling_type = HydroMechanical
displacements = 'disp_x disp_y disp_z'
multiply_by_density = false
porepressure = porepressure
biot_coefficient = 0.3
gravity = '0 0 0'
fp = the_simple_fluid
save_component_rate_in = nodal_m3_per_s
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
[]
[stress]
type = ComputeLinearElasticStress
[]
[porosity]
type = PorousFlowPorosityConst # the "const" is irrelevant here: all that uses Porosity is the BiotModulus, which just uses the initial value of porosity
porosity = 0.1
PorousFlowDictator = dictator
[]
[biot_modulus]
type = PorousFlowConstantBiotModulus
PorousFlowDictator = dictator
biot_coefficient = 0.3
fluid_bulk_modulus = 3.3333333333
solid_bulk_compliance = 0.5
[]
[permeability_irrelevant]
type = PorousFlowPermeabilityConst
PorousFlowDictator = dictator
permeability = '1.5 0 0 0 1.5 0 0 0 1.5'
[]
[]
[AuxVariables]
[nodal_m3_per_s]
[]
[]
[Postprocessors]
[nodal_m3_per_s]
type = PointValue
outputs = csv
point = '0 0 0'
variable = nodal_m3_per_s
[]
[p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
[]
[zdisp]
type = PointValue
outputs = csv
point = '0 0 0.5'
variable = disp_z
[]
[stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[]
[stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[]
[stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[]
[stress_xx_over_strain]
type = FunctionValuePostprocessor
function = stress_xx_over_strain_fcn
outputs = csv
[]
[stress_zz_over_strain]
type = FunctionValuePostprocessor
function = stress_zz_over_strain_fcn
outputs = csv
[]
[p_over_strain]
type = FunctionValuePostprocessor
function = p_over_strain_fcn
outputs = csv
[]
[]
[Functions]
[stress_xx_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'stress_xx zdisp'
[]
[stress_zz_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'stress_zz zdisp'
[]
[p_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'p0 zdisp'
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-14 1E-10 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = pp_generation_unconfined_basicthm
[csv]
type = CSV
[]
[]
(test/tests/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/transfers/multiapp_conservative_transfer/sub_nearest_point.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.01 # to make sure the meshes don't align
xmax = 0.49 # to make sure the meshes don't align
ymax = 1
nx = 10
ny = 10
[]
[block1]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0.2 0.2 0'
top_right = '0.3 0.8 0'
[]
[]
[Variables]
[sink]
family = MONOMIAL
order = CONSTANT
[]
[]
[Functions]
[sink_func]
type = ParsedFunction
expression = '5e2*x*(0.5-x)+5e1'
[]
[]
[Kernels]
[reaction]
type = Reaction
variable = sink
[]
[coupledforce]
type = BodyForce
variable = sink
function = sink_func
[]
[]
[AuxVariables]
[from_parent]
block = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[sink]
type = ElementIntegralVariablePostprocessor
block = 1
variable = sink
[]
[from_parent_pp]
type = ElementIntegralVariablePostprocessor
block = 1
variable = from_parent
execute_on = 'transfer'
[]
[]
[Outputs]
exodus = true
[console]
type = Console
execute_on = 'timestep_end timestep_begin'
[]
[]
(test/tests/quadrature/order/material_with_order.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1 1 1'
dy = ' 1 1 1'
subdomain_id = '1 2 3
4 5 6
7 8 9'
[]
[]
[Variables]
[u]
order = FIRST
family = L2_LAGRANGE
initial_condition = 1
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[forcing]
type = BodyForce
variable = u
[]
[]
[DGKernels]
[dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[]
[test]
type = MatDGKernel
variable = u
mat_prop = dummy
[]
[]
[BCs]
[bc]
type = PenaltyDirichletBC
variable = u
boundary = '0 1 2 3'
penalty = 1e4
value = 0
[]
[]
[Postprocessors]
[block1_qps]
type = NumElemQPs
block = 1
[]
[block5_qps]
type = NumElemQPs
block = 5
[]
[block6_qps]
type = NumElemQPs
block = 6
[]
[]
[Materials]
[dummy]
type = GenericConstantMaterial
block = '1 2 3 4 6 7 8 9'
prop_names = dummy
prop_values = 1
[]
[qordermaterial]
type = QuadratureMaterial
block = 5
property_name = dummy
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
[]
(modules/stochastic_tools/test/tests/reporters/BFActiveLearning/sub_lf.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 5
xmax = 0.09
elem_type = EDGE3
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 10951.864006672608
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 10.320058433901163
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 279.8173854189593
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[avg]
type = AverageNodalVariableValue
variable = T
[]
[max]
type = NodalExtremeValue
variable = T
value_type = max
[]
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Outputs]
[]
(modules/stochastic_tools/test/tests/transfers/serialized_solution_transfer/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 6
xmax = 6
[]
[Variables]
[u]
[]
[v]
[]
[]
[Kernels]
[diffusion_u]
type = MatDiffusion
variable = u
diffusivity = D_u
[]
[source_u]
type = BodyForce
variable = u
value = 1.0
[]
[diffusion_v]
type = MatDiffusion
variable = v
diffusivity = D_v
[]
[source_v]
type = BodyForce
variable = v
value = 1.0
[]
[]
[Materials]
[diffusivity_u]
type = GenericConstantMaterial
prop_names = D_u
prop_values = 2.0
[]
[diffusivity_v]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 4.0
[]
[]
[BCs]
[left_u]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right_u]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Reporters]
[solution_storage]
type = SolutionContainer
execute_on = 'FINAL'
[]
[]
(test/tests/postprocessors/num_elems/num_elems.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
nz = 0
zmax = 0
elem_type = QUAD4
uniform_refine = 1
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./u_aux]
order = FIRST
family = LAGRANGE
[../]
[./v_aux]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 3
dt = 1
solve_type = PJFNK
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 3
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Postprocessors]
[./num_elems_active]
type = NumElems
elem_filter = 'ACTIVE'
execute_on = 'initial timestep_end'
[../]
[./num_elems_total]
type = NumElems
elem_filter = 'TOTAL'
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
csv = true
[]
(test/tests/interfacekernels/gmsh_sidesets/coupled_value_coupled_flux.i)
[Mesh]
file = gmsh_mesh.msh
[]
[Variables]
[./u]
block = 6
[../]
[./v]
block = 5
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 6
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 5
[../]
[./source_u]
type = BodyForce
variable = u
value = 1
[../]
[]
[InterfaceKernels]
[./interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = '1 2'
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 4
[../]
[./v]
type = VacuumBC
variable = v
boundary = 3
[../]
[]
[Postprocessors]
[./u_int]
type = ElementIntegralVariablePostprocessor
variable = u
block = 6
[../]
[./v_int]
type = ElementIntegralVariablePostprocessor
variable = v
block = 5
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = 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
[]
[]
(test/tests/restart/start_time_override/start_time_override.i)
[Mesh]
type = GeneratedMesh
nx = 5
ny = 5
dim = 2
[]
[Problem]
restart_file_base = transient_out_cp/LATEST
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[bodyforce]
type = BodyForce
variable = u
value = 10.0
[]
[ie]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = 2
value = 10
[]
[]
[Postprocessors]
[u_norm]
type = ElementL2Norm
variable = u
[]
[]
[Executioner]
type = Transient
# Start time can be set explicitly here or be picked up from the restart file
num_steps = 5
dt = 0.1
[]
[Outputs]
csv = true
[]
(test/tests/bcs/ad_penalty_dirichlet_bc/function_penalty_dirichlet_bc_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = -4+x*x+y*y
[../]
[./solution]
type = ParsedGradFunction
value = x*x+y*y
grad_x = 2*x
grad_y = 2*y
[../]
[]
[Variables]
[./u]
order = SECOND
family = HIERARCHIC
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = ADDiffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = ADBodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'bc_all'
[./bc_all]
type = ADFunctionPenaltyDirichletBC
variable = u
function = solution
boundary = 'top left right bottom'
penalty = 1e6
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_rel_tol = 1e-14
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/misc/line_source/line_source.i)
[Mesh]
type = FileMesh
file = line_source_cube.e
dim = 2
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
block = bulk
[../]
[./heating]
type = BodyForce
variable = u
function = 1
block = heater
[../]
[]
[BCs]
[./outside]
type = DirichletBC
variable = u
boundary = outside
value = 0
[../]
[]
[Materials]
[./diffusivity]
type = GenericConstantMaterial
block = 'bulk heater'
prop_names = diffusivity
prop_values = 1
[../]
[]
[Postprocessors]
[./total_flux]
type = SideDiffusiveFluxIntegral
variable = u
boundary = outside
diffusivity = diffusivity
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/mortar/continuity-2d-non-conforming/dual-soln-continuity-vcp.i)
[Mesh]
second_order = false
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[]
[secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[]
[]
[Variables]
[T]
block = '1 2'
order = FIRST
[]
[lambda]
block = '10'
order = FIRST
use_dual = true
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln
variable = T
boundary = '3 4 5 6 7 8'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression= '-4 + x^2 + y^2'
[]
[exact_soln]
type = ParsedFunction
expression= 'x^2 + y^2'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
[]
[]
[Preconditioning]
[vcp]
type = VCP
full = true
lm_variable = 'lambda'
primary_variable = 'T'
preconditioner = 'AMG'
is_lm_coupling_diagonal = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = ' -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' NONZERO 1e-15'
[]
[Outputs]
file_base = 'dual-soln-continuity_out'
exodus = true
[]
(test/tests/kernels/coupled_time_derivative/coupled_time_derivative_test.i)
###########################################################
# This is a simple test of the CoupledTimeDerivative kernel.
# The expected solution for the variable v is
# v(x) = 1/2 * (x^2 + x)
###########################################################
[Mesh]
type = GeneratedMesh
nx = 5
ny = 5
dim = 2
[]
[Variables]
[./u]
[../]
[./v]
[../]
[]
[Kernels]
[./time_u]
type = TimeDerivative
variable = u
[../]
[./fn_u]
type = BodyForce
variable = u
function = 1
[../]
[./time_v]
type = CoupledTimeDerivative
variable = v
v = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = v
boundary = 'left'
value = 0
[../]
[./right]
type = DirichletBC
variable = v
boundary = 'right'
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
[]
(test/tests/mortar/continuity-2d-non-conforming/dual-soln-continuity.i)
[Mesh]
second_order = false
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[./primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[../]
[./secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[../]
[]
[Variables]
[./T]
block = '1 2'
order = FIRST
[../]
[./lambda]
block = '10'
order = FIRST
use_dual = true
[../]
[]
[BCs]
[./neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln
variable = T
boundary = '3 4 5 6 7 8'
[../]
[]
[Kernels]
[./conduction]
type = Diffusion
variable = T
block = '1 2'
[../]
[./sink]
type = Reaction
variable = T
block = '1 2'
[../]
[./forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[../]
[]
[Functions]
[./forcing_function]
type = ParsedFunction
expression= '-4 + x^2 + y^2'
[../]
[./exact_soln]
type = ParsedFunction
expression= 'x^2 + y^2'
[../]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[./mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/multiapp_userobject_transfer/sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 8
xmax = 0.1
ymax = 0.5
coord_type = rz
[]
[Variables]
[./u]
initial_condition = 1
[../]
[]
[AuxVariables]
[./layered_average_value]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./axial_force]
type = ParsedFunction
expression = 1000*y
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = axial_force
[../]
[]
[AuxKernels]
[./layered_aux]
type = SpatialUserObjectAux
variable = layered_average_value
execute_on = timestep_end
user_object = layered_average
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[UserObjects]
[./layered_average]
type = LayeredAverage
variable = u
direction = y
num_layers = 4
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.001
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[Problem]
type = FEProblem
[]
(test/tests/materials/stateful_internal_side_uo/internal_side_uo_stateful.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
ymin = -1
xmax = 1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[]
[Functions]
[./fn_exact]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[./ffn]
type = ParsedFunction
expression = -4
[../]
[]
[UserObjects]
[./isuo]
type = InsideUserObject
variable = u
diffusivity = diffusivity
execute_on = 'initial timestep_end'
# use_old_prop = true # Access a stateful material on an internal side
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = FIRST
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = ffn
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = fn_exact
[../]
[]
[Postprocessors]
[./value]
type = InsideValuePPS
user_object = isuo
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 5
[]
[Materials]
[./stateful]
type = StatefulMaterial
block = 0
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/clone_parent_mesh/sub.i)
[Mesh]
[]
[Variables/u]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[src]
type = BodyForce
variable = u
[]
[]
[BCs]
[dirichlet]
type = DirichletBC
variable = u
boundary = 'top right'
value = 0
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
(test/tests/multiapps/clone_parent_mesh/main.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[]
[Variables/u]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[src]
type = BodyForce
variable = u
[]
[]
[BCs]
[dirichlet]
type = DirichletBC
variable = u
boundary = 'top right'
value = 0
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[AuxVariables]
[u_sub]
[]
[diff]
[]
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
input_files = sub.i
clone_parent_mesh = true
[]
[]
[Transfers]
[transfer]
type = MultiAppCopyTransfer
from_multi_app = sub
variable = u_sub
source_variable = u
[]
[]
[AuxKernels]
[diff_aux]
type = ParsedAux
variable = diff
expression = 'abs(u - u_sub)'
coupled_variables = 'u u_sub'
[]
[]
[Postprocessors]
[diff_max]
type = ElementExtremeValue
variable = diff
[]
[]
[UserObjects]
[terminator]
type = Terminator
expression = 'diff_max > 1e-8'
fail_mode = HARD
error_level = ERROR
[]
[]
[Outputs]
exodus = true
[]
(modules/ray_tracing/test/tests/coord_type/rz_line_integral.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 2
xmin = 0
xmax = 2
ymin = 0
ymax = 1
[]
[]
[Variables/u]
[]
[BCs]
[fixed]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Kernels]
[diffusion]
type = Diffusion
variable = u
[]
[source]
type = BodyForce
variable = u
value = 10
[]
[]
[UserObjects]
[study]
type = RepeatableRayStudy
names = 'ray0 ray1'
start_points = '0 0.5 0
0 0.1 0'
end_points = '2.0 0.5 0
2.0 0.9 0'
[]
[]
[RayKernels]
[variable_integral]
type = VariableIntegralRayKernel
study = study
variable = u
[]
[]
[Postprocessors]
[ray0_value]
type = RayIntegralValue
ray_kernel = variable_integral
ray = ray0
[]
[ray1_value]
type = RayIntegralValue
ray_kernel = variable_integral
ray = ray1
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Problem]
coord_type = RZ
[]
[Outputs]
csv = true
[]
(test/tests/functions/parsed/mms_transient_coupled.i)
###########################################################
# This is a simple test of the Function System. This
# test uses forcing terms produced from analytical
# functions of space and time to verify a solution
# using MMS.
#
# @Requirement F6.20
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0.0
xmax = 1.0
nx = 10
ymin = 0.0
ymax = 1.0
ny = 10
uniform_refine = 2
elem_type = QUAD4
[]
[Variables]
[./u]
[../]
[./v]
[../]
[]
[Functions]
[./v_left_bc]
# Left-side boundary condition for v equation, v(0,y,t) = u(0.5,y,t). This is accomplished using a PointValue postprocessor, which is what this input file was designed to test.
type = ParsedFunction
expression = a
symbol_values = u_midpoint
symbol_names = a
[../]
[./u_mms_func]
# MMS Forcing function for the u equation.
type = ParsedFunction
expression = ' 20*exp(20*t)*x*x*x-6*exp(20*t)*x-(2-0.125*exp(20*t))*sin(5/2*x*pi)-0.125*exp(20*t)-1
'
[../]
[./v_mms_func]
# MMS forcing function for the v equation.
type = ParsedFunction
expression = -2.5*exp(20*t)*sin(5/2*x*pi)+2.5*exp(20*t)+25/4*(2-0.125*exp(20*t))*sin(5/2*x*pi)*pi*pi
[../]
[./u_right_bc]
type = ParsedFunction
expression = 3*exp(20*t) # \nabla{u}|_{x=1} = 3\exp(20*t)
[../]
[./u_exact]
# Exact solution for the MMS function for the u variable.
type = ParsedFunction
expression = exp(20*t)*pow(x,3)+1
[../]
[./v_exact]
# Exact MMS solution for v.
type = ParsedFunction
expression = (2-0.125*exp(20*t))*sin(5/2*pi*x)+0.125*exp(20*t)+1
[../]
[]
[Kernels]
# Strong Form:
# \frac{\partial u}{\partial t} - \nabla \cdot 0.5 \nabla u - v = 0
# \frac{\partial u}{\partial t} - \nabla \cdot \nabla v = 0
#
# BCs:
# u(0,y,t) = 1
# \nabla u |_{x=1} = 3\exp(20*t)
# v(0,y,t) = u(0.5,y,t)
# v(1,y,t) = 3
# \nabla u |_{y=0,1} = 0
# \nabla v |_{y=0,1} = 0
#
[./u_time]
type = TimeDerivative
variable = u
[../]
[./u_diff]
type = Diffusion
variable = u
[../]
[./u_source]
type = CoupledForce
variable = u
v = v
[../]
[./v_diff]
type = Diffusion
variable = v
[../]
[./u_mms]
type = BodyForce
variable = u
function = u_mms_func
[../]
[./v_mms]
type = BodyForce
variable = v
function = v_mms_func
[../]
[./v_time]
type = TimeDerivative
variable = v
[../]
[]
[BCs]
[./u_left]
type = DirichletBC
variable = u
boundary = left # x=0
value = 1 # u(0,y,t)=1
[../]
[./u_right]
type = FunctionNeumannBC
variable = u
boundary = right # x=1
function = u_right_bc # \nabla{u}|_{x=1}=3\exp(20t)
[../]
[./v_left]
type = FunctionDirichletBC
variable = v
boundary = left # x=0
function = v_left_bc # v(0,y,t) = u(0.5,y,t)
[../]
[./v_right]
type = DirichletBC
variable = v
boundary = right # x=1
value = 3 # v(1,y,t) = 3
[../]
[]
[Postprocessors]
[./u_midpoint]
type = PointValue
variable = u
point = '0.5 0.5 0'
execute_on = 'initial timestep_end'
[../]
[./u_midpoint_exact]
type = FunctionValuePostprocessor
function = u_exact
point = '0.5 0.5 0.0'
execute_on = 'initial timestep_end'
[../]
[./u_error]
type = ElementL2Error
variable = u
function = u_exact
execute_on = 'initial timestep_end'
[../]
[./v_error]
type = ElementL2Error
variable = v
function = v_exact
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
dt = 0.01
solve_type = NEWTON
end_time = 0.1
scheme = crank-nicolson
[]
[Outputs]
exodus = true
[]
[ICs]
[./u_initial]
# Use the MMS exact solution to compute the initial conditions.
function = u_exact
variable = u
type = FunctionIC
[../]
[./v_exact]
# Use the MMS exact solution to compute the initial condition.
function = v_exact
variable = v
type = FunctionIC
[../]
[]
(test/tests/transfers/coord_transform/rz-xyz/3d-xyz.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 6
ny = 6
nz = 3
xmin = -1
ymin = -1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = BodyForce
function = 'x^2 + y^2 + z'
variable = u
[]
[]
[AuxVariables]
[v][]
[]
[BCs]
[square]
type = DirichletBC
variable = u
boundary = 'left right top bottom'
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = '2d-rz.i'
execute_on = 'timestep_end'
[]
[]
[Transfers]
[to_sub]
type = MultiAppNearestNodeTransfer
to_multi_app = sub
source_variable = u
variable = v
execute_on = 'timestep_end'
skip_coordinate_collapsing = false
[]
[from_sub]
type = MultiAppNearestNodeTransfer
from_multi_app = sub
source_variable = u
variable = v
execute_on = 'timestep_end'
skip_coordinate_collapsing = false
[]
[]
(test/tests/problems/reference_residual_problem/abs_ref_acceptable.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
[]
[GlobalParams]
absolute_value_vector_tags = 'absref'
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'absref'
extra_tag_vectors = 'absref'
acceptable_iterations = 1
acceptable_multiplier = 1e6
[]
[Variables]
[u][]
[v]
scaling = 1e-6
[]
[]
[Functions]
[ramp]
type = ParsedFunction
expression = 'if(t < 5, t - 5, 0) * x'
[]
[]
[Kernels]
[u_dt]
type = TimeDerivative
variable = u
[]
[u_coupled_rx]
type = CoupledForce
variable = u
v = v
coef = 1
[]
[v_dt]
type = TimeDerivative
variable = v
[]
[v_neg_force]
type = BodyForce
variable = v
value = ${fparse -1 / 2}
function = ramp
[]
[v_force]
type = BodyForce
variable = v
value = 1
function = ramp
[]
[]
[Postprocessors]
[u_avg]
type = ElementAverageValue
variable = u
execute_on = 'TIMESTEP_END INITIAL'
[]
[v_avg]
type = ElementAverageValue
variable = v
execute_on = 'TIMESTEP_END INITIAL'
[]
[timestep]
type = TimePostprocessor
outputs = 'none'
[]
[v_old]
type = ElementAverageValue
variable = v
execute_on = TIMESTEP_BEGIN
outputs = none
[]
[u_old]
type = ElementAverageValue
variable = u
execute_on = TIMESTEP_BEGIN
outputs = none
[]
[v_exact]
type = ParsedPostprocessor
pp_names = 'timestep v_old'
function = 't := if(timestep > 5, 5, timestep); (t^2 - 9 * t) / 8'
[]
[u_exact]
type = ParsedPostprocessor
pp_names = 'u_old v_exact'
function = 'u_old + v_exact'
[]
[]
[Executioner]
type = Transient
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = none
num_steps = 3
nl_rel_tol = 1e-06
verbose = true
[]
[Outputs]
csv = true
perf_graph = true
[]
(test/tests/mortar/continuity-2d-non-conforming/sequencing-stateful-soln-continuity.i)
[Mesh]
second_order = true
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[./primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[../]
[./secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[../]
[]
[Variables]
[./T]
block = '1 2'
order = SECOND
[../]
[./lambda]
block = '10'
[../]
[]
[AuxVariables]
[ssm]
order = CONSTANT
family = MONOMIAL
block = '1 2'
[]
[]
[BCs]
[./neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln
variable = T
boundary = '3 4 5 6 7 8'
[../]
[]
[Kernels]
[./conduction]
type = Diffusion
variable = T
block = '1 2'
[../]
[./sink]
type = Reaction
variable = T
block = '1 2'
[../]
[./forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[../]
[]
[AuxKernels]
[ssm]
type = MaterialRealAux
variable = ssm
property = diffusivity
block = '1 2'
[]
[]
[Materials]
[./ssm]
type = SpatialStatefulMaterial
block = '1 2'
[../]
[]
[Functions]
[./forcing_function]
type = ParsedFunction
expression= '-4 + x^2 + y^2'
[../]
[./exact_soln]
type = ParsedFunction
expression= 'x^2 + y^2'
[../]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[./mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Steady
nl_abs_tol = 1e-12
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
num_grids = 2
[]
[Outputs]
exodus = true
[]
[Adaptivity]
steps = 1
marker = uniform
[Markers]
[uniform]
type = UniformMarker
mark = refine
[]
[]
[]
(test/tests/time_integrators/tvdrk2/1d-linear.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -1
xmax = 1
nx = 20
elem_type = EDGE2
[]
[Functions]
[./ic]
type = ParsedFunction
expression = 0
[../]
[./forcing_fn]
type = ParsedFunction
expression = x
[../]
[./exact_fn]
type = ParsedFunction
expression = t*x
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
implicit = true
[../]
[./diff]
type = Diffusion
variable = u
implicit = false
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
implicit = false
[../]
[]
[ICs]
[./u_ic]
type = FunctionIC
variable = u
function = ic
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
[./TimeIntegrator]
type = ExplicitTVDRK2
[../]
solve_type = 'LINEAR'
start_time = 0.0
num_steps = 10
dt = 0.001
l_tol = 1e-15
[]
[Outputs]
exodus = true
perf_graph = true
[]
(test/tests/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
[]
(test/tests/interfacekernels/1d_interface/reaction_1D_transient.i)
# Transient-state test for the InterfaceReaction kernel.
#
# Same to steady-state, except the following
#
# Natural BCs are applied (i.e. NewmannBC h=0 at left and right)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'subdomain1'
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = '0'
[../]
[./v]
order = FIRST
family = LAGRANGE
block = '1'
[../]
[]
[Kernels]
[./diff_u]
type = MatDiffusion
diffusivity = D
variable = u
block = '0'
[../]
[./diff_v]
type = MatDiffusion
diffusivity = D
variable = v
block = '1'
[../]
[./diff_u_dt]
type = TimeDerivative
variable = u
block = '0'
[../]
[./diff_v_dt]
type = TimeDerivative
variable = v
block = '1'
[../]
[./source_u]
type = BodyForce
variable = u
block = '0'
[../]
[]
[InterfaceKernels]
[./interface]
type = InterfaceDiffusion
variable = u
neighbor_var = 'v'
boundary = 'primary0_interface'
D = D
D_neighbor = D
[../]
[./interface_reaction]
type = InterfaceReaction
variable = u
neighbor_var = 'v'
boundary = 'primary0_interface'
kf = 1 # Forward reaction rate coefficient
kb = 2 # Backward reaction rate coefficient
[../]
[]
[Materials]
[./block0]
type = GenericConstantMaterial
block = '0'
prop_names = 'D'
prop_values = '4'
[../]
[./block1]
type = GenericConstantMaterial
block = '1'
prop_names = 'D'
prop_values = '2'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
[Debug]
show_var_residual_norms = true
[]
(test/tests/kernels/ad_scalar_kernel_constraint/diffusion_bipass_scalar.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[exact_fn]
type = ParsedFunction
value = 'x*x+y*y'
[]
[ffn]
type = ParsedFunction
value = -4
[]
[bottom_bc_fn]
type = ParsedFunction
value = -2*y
[]
[right_bc_fn]
type = ParsedFunction
value = 2*x
[]
[top_bc_fn]
type = ParsedFunction
value = 2*y
[]
[left_bc_fn]
type = ParsedFunction
value = -2*x
[]
[]
[Variables]
[u]
family = LAGRANGE
order = SECOND
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[Kernels]
# Make sure that we can derive from the scalar base class
# but actually not assign a scalar variable
[diff]
type = ADDiffusionNoScalar
variable = u
[]
[ffnk]
type = ADBodyForce
variable = u
function = ffn
[]
[sk_lm]
type = ADScalarLMKernel
variable = u
kappa = lambda
pp_name = pp
value = 2.666666666666666
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[bottom]
type = ADFunctionNeumannBC
variable = u
boundary = 'bottom'
function = bottom_bc_fn
[]
[right]
type = ADFunctionNeumannBC
variable = u
boundary = 'right'
function = right_bc_fn
[]
[top]
type = ADFunctionNeumannBC
variable = u
boundary = 'top'
function = top_bc_fn
[]
[left]
type = ADFunctionNeumannBC
variable = u
boundary = 'left'
function = left_bc_fn
[]
[]
[Postprocessors]
# integrate the volume of domain since original objects set
# int(phi)=V0, rather than int(phi-V0)=0
[pp]
type = FunctionElementIntegral
function = 1
execute_on = initial
[]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
residual_and_jacobian_together = true
nl_rel_tol = 1e-9
l_tol = 1.e-10
nl_max_its = 10
# This example builds an indefinite matrix, so "-pc_type hypre -pc_hypre_type boomeramg" cannot
# be used reliably on this problem
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
# This is a linear problem, so we don't need to recompute the
# Jacobian. This isn't a big deal for a Steady problems, however, as
# there is only one solve.
solve_type = 'LINEAR'
[]
[Outputs]
# exodus = true
csv = true
hide = lambda
[]
(test/tests/postprocessors/interface_diffusive_flux/interface_diffusive_flux.i)
postprocessor_type = InterfaceDiffusiveFluxAverage
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 6
xmax = 3
ny = 9
ymax = 3
elem_type = QUAD4
[]
[subdomain_id]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '2 1 0'
block_id = 1
[]
[interface]
input = subdomain_id
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'interface'
[]
[]
[Functions]
[fn_exact]
type = ParsedFunction
expression = 'x*x+y*y'
[]
[]
[Variables]
[u]
block = 0
[]
[v]
block = 1
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
[]
[body_u]
type = BodyForce
variable = u
function = 1
[]
[diff_v]
type = Diffusion
variable = v
[]
[body_v]
type = BodyForce
variable = v
function = -1
[]
[]
# Not a diffusion interface but can test the postprocessor anyway
[InterfaceKernels]
[reaction]
type = InterfaceReaction
kb = 1
kf = 2
variable = u
neighbor_var = v
boundary = 'interface'
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = fn_exact
[]
[]
[Postprocessors]
[diffusive_flux]
type = ${postprocessor_type}
variable = u
neighbor_variable = v
diffusivity = 1
execute_on = TIMESTEP_END
boundary = 'interface'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
file_base = ${raw ${postprocessor_type} _fe}
exodus = true
[]
(test/tests/bcs/vectorpostprocessor/vectorpostprocessor.i)
[Mesh]
type = GeneratedMesh
nx = 10
ny = 10
xmax = 1
ymax = 1
dim = 2
[]
[Variables]
[./u]
[../]
[./v]
[../]
[]
[Kernels]
[./conv]
type = ConservativeAdvection
variable = u
velocity = '0 1 0'
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./src]
type = BodyForce
variable = u
function = ffn
[../]
[./diffv]
type = Diffusion
variable = v
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = bottom
value = 2
[../]
[./right]
type = ChannelGradientBC
variable = u
boundary = right
channel_gradient_pps = channel_gradient
axis = y
h_name = h
[../]
[./top]
type = OutflowBC
variable = u
boundary = top
velocity = '0 1 0'
[../]
[./leftv]
type = DirichletBC
variable = v
boundary = left
value = 0
[../]
[./rightv]
type = DirichletBC
variable = v
boundary = right
value = 1
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'h'
#Nu = 4
#k = 1
#half_channel_length = 0.5
#h=Nu*k/half_channel_length
prop_values = '8'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
[VectorPostprocessors]
[./lv1]
num_points = 30
start_point = '0 0 0'
end_point = '0 1 0'
sort_by = 'y'
variable = u
type = LineValueSampler
execute_on = 'timestep_begin nonlinear timestep_end linear'
[../]
[./lv2]
num_points = 30
start_point = '1 0 0'
end_point = '1 1 0'
sort_by = 'y'
variable = v
type = LineValueSampler
execute_on = 'timestep_begin nonlinear timestep_end linear'
[../]
[./channel_gradient]
lv1 = lv1
lv2 = lv2
var1 = u
var2 = v
axis = y
type = ChannelGradientVectorPostprocessor
execute_on = 'timestep_begin nonlinear timestep_end linear'
[../]
[]
[Functions]
[./ffn]
type = ParsedFunction
expression = '1'
[../]
[]
(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/kernels/ad_jacobians/adfunction.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
displacements = 'disp_x disp_y'
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[c]
[]
[disp_x]
[]
[disp_y]
[]
[]
[Kernels]
[source]
type = ADBodyForce
variable = c
function = source_func
use_displaced_mesh = true
displacements = ''
#displacements = 'disp_x disp_y'
[]
[dt]
type = ADTimeDerivative
variable = c
[]
[]
[Functions]
[source_func]
type = ParsedFunction
expression = 'x + y^2'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
num_steps = 1
[]
(modules/optimization/test/tests/executioners/steady_and_adjoint/multi_variable.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
[]
[Variables]
[u]
[]
[v]
[]
[u_adjoint]
solver_sys = adjoint
[]
[v_adjoint]
solver_sys = adjoint
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
[]
[diff_v]
type = Diffusion
variable = v
[]
[uv]
type = CoupledForce
variable = u
v = v
coef = 10
[]
[vu]
type = CoupledForce
variable = v
v = u
coef = 1
[]
[src_u]
type = BodyForce
variable = u
value = 1
[]
[src_u_adjoint]
type = BodyForce
variable = u_adjoint
value = 0
[]
[src_v_adjoint]
type = BodyForce
variable = v_adjoint
value = 1
[]
[]
[BCs]
[dirichlet_u]
type = DirichletBC
variable = u
boundary = 'top right'
value = 0
[]
[dirichlet_v]
type = DirichletBC
variable = v
boundary = 'top right'
value = 0
[]
[]
[Executioner]
type = SteadyAndAdjoint
forward_system = nl0
adjoint_system = adjoint
nl_rel_tol = 1e-12
l_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/element_time_derivative/el_time_deriv_1d_test.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -5
xmax = 5
ymin = -1
nx = 5
elem_type = EDGE
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = t*x+1
[../]
[]
[Kernels]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[./diffusion]
type = Diffusion
variable = u
[../]
[./timeDer]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./all]
type = DirichletBC
variable = u
boundary = '0 1'
value = 0
[../]
[]
[Postprocessors]
[./elementAvgTimeDerivative]
type = ElementAverageTimeDerivative
variable = u
[../]
[./elementAvgValue]
type = ElementAverageValue
variable = u
[../]
[]
[Executioner]
type = Transient
scheme = implicit-euler
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_el_time_deriv_1d
csv = true
[]
(test/tests/kernels/scalar_kernel_constraint/scalar_constraint_kernel.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[exact_fn]
type = ParsedFunction
value = 'x*x+y*y'
[]
[ffn]
type = ParsedFunction
value = -4
[]
[bottom_bc_fn]
type = ParsedFunction
value = -2*y
[]
[right_bc_fn]
type = ParsedFunction
value = 2*x
[]
[top_bc_fn]
type = ParsedFunction
value = 2*y
[]
[left_bc_fn]
type = ParsedFunction
value = -2*x
[]
[]
[Variables]
[u]
family = LAGRANGE
order = SECOND
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[ffnk]
type = BodyForce
variable = u
function = ffn
[]
[sk_lm]
type = ScalarLMKernel
variable = u
kappa = lambda
pp_name = pp
value = 2.666666666666666
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bottom_bc_fn
[]
[right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = right_bc_fn
[]
[top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = top_bc_fn
[]
[left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = left_bc_fn
[]
[]
[Postprocessors]
# integrate the volume of domain since original objects set
# int(phi)=V0, rather than int(phi-V0)=0
[pp]
type = FunctionElementIntegral
function = 1
execute_on = initial
[]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-9
l_tol = 1.e-10
nl_max_its = 10
# This example builds an indefinite matrix, so "-pc_type hypre -pc_hypre_type boomeramg" cannot
# be used reliably on this problem
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
# This is a linear problem, so we don't need to recompute the
# Jacobian. This isn't a big deal for a Steady problems, however, as
# there is only one solve.
solve_type = 'LINEAR'
[]
[Outputs]
exodus = true
hide = lambda
[]
(test/tests/transfers/multiapp_userobject_transfer/tosub_displaced_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 8
xmax = 0.1
ymax = 0.5
displacements = 'disp_x disp_y'
[]
[Variables]
[./u]
initial_condition = 1
[../]
[]
[AuxVariables]
[./multi_layered_average]
[../]
[./element_multi_layered_average]
order = CONSTANT
family = MONOMIAL
[../]
[./disp_x]
initial_condition = 0.0
[../]
[./disp_y]
initial_condition = 0.5
[../]
[]
[Functions]
[./axial_force]
type = ParsedFunction
expression = 1000*y
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = axial_force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.001
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[Problem]
coord_type = rz
type = FEProblem
[]
(test/tests/transfers/multiapp_high_order_variable_transfer/parent_L2_Lagrange_conservative.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Variables]
[power_density]
family = L2_LAGRANGE
order = FIRST
[]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2'
[]
[]
[Kernels]
[diff]
type = Reaction
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[Postprocessors]
[pwr_avg]
type = ElementAverageValue
block = '0'
variable = power_density
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
[]
[Postprocessors]
[./from_postprocessor]
type = ElementIntegralVariablePostprocessor
variable = power_density
[../]
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = sub_L2_Lagrange_conservative.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[p_to_sub]
type = MultiAppShapeEvaluationTransfer
source_variable = power_density
variable = power_density
to_multi_app = sub
execute_on = 'timestep_end'
from_postprocessors_to_be_preserved = 'from_postprocessor'
to_postprocessors_to_be_preserved = 'pwr_density'
[]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(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/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/mms/lid-driven-skewed/hybrid-skewed-vortex.i)
rho=1
mu=1
[Mesh]
[gen_mesh]
type = FileMeshGenerator
file = skewed.msh
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen_mesh
[]
[]
[Variables]
[u]
family = MONOMIAL
order = SECOND
[]
[v]
family = MONOMIAL
order = SECOND
[]
[pressure][]
[]
[Kernels]
[momentum_x_convection]
type = ADConservativeAdvection
variable = u
velocity = 'velocity'
[]
[momentum_x_diffusion]
type = Diffusion
variable = u
[]
[momentum_x_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = u
pressure = pressure
component = 0
[]
[u_forcing]
type = BodyForce
variable = u
function = forcing_u
[]
[momentum_y_convection]
type = ADConservativeAdvection
variable = v
velocity = 'velocity'
[]
[momentum_y_diffusion]
type = Diffusion
variable = v
[]
[momentum_y_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = v
pressure = pressure
component = 1
[]
[v_forcing]
type = BodyForce
variable = v
function = forcing_v
[]
[mass]
type = ADConservativeAdvection
variable = pressure
velocity = velocity
advected_quantity = -1
[]
[]
[DGKernels]
[momentum_x_convection]
type = ADDGAdvection
variable = u
velocity = 'velocity'
[]
[momentum_x_diffusion]
type = DGDiffusion
variable = u
sigma = 6
epsilon = -1
[]
[momentum_y_convection]
type = ADDGAdvection
variable = v
velocity = 'velocity'
[]
[momentum_y_diffusion]
type = DGDiffusion
variable = v
sigma = 6
epsilon = -1
[]
[]
[BCs]
[u_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right top'
variable = u
sigma = 6
epsilon = -1
function = exact_u
[]
[v_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right top'
variable = v
sigma = 6
epsilon = -1
function = exact_v
[]
[pressure_pin]
type = FunctionDirichletBC
variable = pressure
boundary = 'pinned_node'
function = 'exact_p'
[]
[]
[Materials]
[rho]
type = ADGenericConstantMaterial
prop_names = 'rho'
prop_values = '${rho}'
[]
[vel]
type = ADVectorFromComponentVariablesMaterial
vector_prop_name = 'velocity'
u = u
v = v
[]
[rhou]
type = ADParsedMaterial
property_name = 'rhou'
coupled_variables = 'u'
material_property_names = 'rho'
expression = 'rho*u'
[]
[rhov]
type = ADParsedMaterial
property_name = 'rhov'
coupled_variables = 'v'
material_property_names = 'rho'
expression = 'rho*v'
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'x^2*(1-x)^2*(2*y-6*y^2+4*y^3)'
[]
[exact_v]
type = ParsedFunction
expression = '-y^2*(1-y)^2*(2*x-6*x^2+4*x^3)'
[]
[exact_p]
type = ParsedFunction
expression = 'x*(1-x)-2/12'
[]
[forcing_u]
type = ParsedFunction
expression = '-4*mu/rho*(-1+2*y)*(y^2-6*x*y^2+6*x^2*y^2-y+6*x*y-6*x^2*y+3*x^2-6*x^3+3*x^4)+1-2*x+4*x^3'
'*y^2*(2*y^2-2*y+1)*(y-1)^2*(-1+2*x)*(x-1)^3'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[forcing_v]
type = ParsedFunction
expression = '4*mu/rho*(-1+2*x)*(x^2-6*y*x^2+6*x^2*y^2-x+6*x*y-6*x*y^2+3*y^2-6*y^3+3*y^4)+4*y^3*x^2*(2'
'*x^2-2*x+1)*(x-1)^2*(-1+2*y)*(y-1)^3'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO mumps'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2Error
variable = u
function = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2v]
variable = v
function = exact_v
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
variable = pressure
function = exact_p
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(test/tests/mortar/continuity-2d-conforming/conforming-2nd-order.i)
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-conf-2nd.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Functions]
[./exact_sln]
type = ParsedFunction
expression= x*x+y*y
[../]
[./ffn]
type = ParsedFunction
expression= -4
[../]
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
block = '1 2'
[../]
[./lm]
order = SECOND
family = LAGRANGE
block = secondary_lower
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = ffn
[../]
[]
[Constraints]
[./ced]
type = EqualValueConstraint
variable = lm
secondary_variable = u
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '1 2 3 4'
function = exact_sln
[../]
[]
[Postprocessors]
[./l2_error]
type = ElementL2Error
variable = u
function = exact_sln
block = '1 2'
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
[./fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-14
l_tol = 1e-14
[]
[Outputs]
exodus = true
[]
(test/tests/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
[../]
[]
(test/tests/mortar/convergence-studies/continuity-3d/continuity.i)
[Mesh]
second_order = true
[file]
type = FileMeshGenerator
file = hex_mesh.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
new_block_id = 11
new_block_name = "secondary"
sidesets = '101'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
new_block_id = 12
new_block_name = "primary"
sidesets = '102'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[T]
block = '1 2'
order = SECOND
[]
[lambda]
block = 'secondary'
# family = MONOMIAL
# order = CONSTANT
family = LAGRANGE
order = SECOND
use_dual = true
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln_primal
variable = T
boundary = '1 2'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi) + 3*pi^2*sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_primal]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_lambda]
type = ParsedFunction
expression = 'pi*sin(pi*y)*sin(pi*z)*cos(pi*x)'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = '12'
secondary_subdomain = '11'
variable = lambda
secondary_variable = T
# delta = 0.1
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
csv = true
[]
[Postprocessors]
[L2lambda]
type = ElementL2Error
variable = lambda
function = exact_soln_lambda
execute_on = 'timestep_end'
block = 'secondary'
[]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = '1 2'
[]
[h]
type = AverageElementSize
block = '1 2'
[]
[]
(test/tests/kernels/vector_fe/coupled_scalar_vector_jacobian.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmin = -1.1
ymin = -1.1
xmax = 1.1
ymax = 1.1
elem_type = QUAD9
[]
[Variables]
[./u]
family = NEDELEC_ONE
order = FIRST
[../]
[./v]
[../]
[]
[Kernels]
[./wave]
type = VectorFEWave
variable = u
x_forcing_func = 'x_ffn'
y_forcing_func = 'y_ffn'
[../]
[./diff]
type = Diffusion
variable = v
[../]
[./source]
type = BodyForce
variable = v
[../]
[./advection]
type = EFieldAdvection
variable = v
efield = u
charge = 'positive'
mobility = 100
[../]
[]
[Functions]
[./x_ffn]
type = ParsedFunction
expression = '(2*pi*pi + 1)*cos(pi*x)*sin(pi*y)'
[../]
[./y_ffn]
type = ParsedFunction
expression = '-(2*pi*pi + 1)*sin(pi*x)*cos(pi*y)'
[../]
[]
[Preconditioning]
[./pre]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'asm'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
[]
(test/tests/misc/check_error/missing_material_prop_test2.i)
[Mesh]
file = rectangle.e
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_km_kernel]
type = DiffMKernel
variable = u
mat_prop = diff1
[../]
[./body_force]
type = BodyForce
variable = u
block = 1
value = 10
[../]
[]
[BCs]
active = 'right'
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Materials]
[./mat11]
type = GenericConstantMaterial
block = 1
prop_names = 'diff1'
prop_values = '1'
[../]
[./mat12]
type = GenericConstantMaterial
block = 1
prop_names = 'diff2'
prop_values = '1'
[../]
[./mat22]
type = GenericConstantMaterial
block = 2
prop_names = 'diff2'
prop_values = '1'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out
[]
[Debug]
show_material_props = true
[]
(modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined.i)
# A sample is constrained on all sides, except its top
# and its boundaries are
# also impermeable. Fluid is pumped into the sample via a
# volumetric source (ie kg/second per cubic meter), and the
# rise in the top surface, porepressure, and stress are observed.
#
# In the standard poromechanics scenario, the Biot Modulus is held
# fixed and the source has units 1/time. Then the expected result
# is
# strain_zz = disp_z = BiotCoefficient*BiotModulus*s*t/((bulk + 4*shear/3) + BiotCoefficient^2*BiotModulus)
# porepressure = BiotModulus*(s*t - BiotCoefficient*strain_zz)
# stress_xx = (bulk - 2*shear/3)*strain_zz (remember this is effective stress)
# stress_zz = (bulk + 4*shear/3)*strain_zz (remember this is effective stress)
#
# In porous_flow, however, the source has units kg/s/m^3 and the
# Biot Modulus is not held fixed. This means that disp_z, porepressure,
# etc are not linear functions of t. Nevertheless, the ratios remain
# fixed:
# stress_xx/strain_zz = (bulk - 2*shear/3) = 1 (for the parameters used here)
# stress_zz/strain_zz = (bulk + 4*shear/3) = 4 (for the parameters used here)
# porepressure/strain_zz = 13.3333333 (for the parameters used here)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.8
alpha = 1e-5
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back'
[]
[]
[Kernels]
[grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
[]
[grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
[]
[grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
component = 2
[]
[poro_x]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
variable = disp_x
component = 0
[]
[poro_y]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
variable = disp_y
component = 1
[]
[poro_z]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
component = 2
variable = disp_z
[]
[poro_vol_exp]
type = PorousFlowMassVolumetricExpansion
variable = porepressure
fluid_component = 0
[]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = porepressure
[]
[flux]
type = PorousFlowAdvectiveFlux
variable = porepressure
gravity = '0 0 0'
fluid_component = 0
[]
[source]
type = BodyForce
function = 0.1
variable = porepressure
[]
[]
[AuxVariables]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xz]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_yz]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 3.3333333333
density0 = 1
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
[]
[stress]
type = ComputeLinearElasticStress
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
porosity_zero = 0.1
biot_coefficient = 0.3
solid_bulk = 2
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 1 0 0 0 1' # unimportant
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[]
[]
[Postprocessors]
[p0]
type = PointValue
outputs = none
point = '0 0 0'
variable = porepressure
[]
[zdisp]
type = PointValue
outputs = none
point = '0 0 0.5'
variable = disp_z
[]
[stress_xx]
type = PointValue
outputs = none
point = '0 0 0'
variable = stress_xx
[]
[stress_yy]
type = PointValue
outputs = none
point = '0 0 0'
variable = stress_yy
[]
[stress_zz]
type = PointValue
outputs = none
point = '0 0 0'
variable = stress_zz
[]
[stress_xx_over_strain]
type = FunctionValuePostprocessor
function = stress_xx_over_strain_fcn
outputs = csv
[]
[stress_zz_over_strain]
type = FunctionValuePostprocessor
function = stress_zz_over_strain_fcn
outputs = csv
[]
[p_over_strain]
type = FunctionValuePostprocessor
function = p_over_strain_fcn
outputs = csv
[]
[]
[Functions]
[stress_xx_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'stress_xx zdisp'
[]
[stress_zz_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'stress_zz zdisp'
[]
[p_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'p0 zdisp'
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-14 1E-10 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = pp_generation_unconfined
[csv]
type = CSV
[]
[]
(test/tests/userobjects/internal_side_user_object/internal_side_user_object_two_materials.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = -1
ymin = -1
xmax = 1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[]
[./subdomain_id]
input = gen
type = SubdomainPerElementGenerator
subdomain_ids = '0 1
1 1'
[../]
[]
[Functions]
[./fn_exact]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[./ffn]
type = ParsedFunction
expression = -4
[../]
[]
[UserObjects]
[./isuo]
type = InsideUserObject
variable = u
diffusivity = diffusivity
execute_on = 'initial timestep_end'
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = FIRST
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = ffn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = fn_exact
[../]
[]
[Materials]
[./stateful1]
type = StatefulMaterial
block = 0
initial_diffusivity = 1
[../]
[./stateful2]
type = StatefulMaterial
block = 1
initial_diffusivity = 2
[../]
[]
[Postprocessors]
[./value]
type = InsideValuePPS
user_object = isuo
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(test/tests/executioners/executioner/steady.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 5
ny = 5
elem_type = QUAD9
[]
[Variables]
active = 'u'
[./u]
order = SECOND
family = LAGRANGE
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = -4
[../]
[./exact_fn]
type = ParsedFunction
expression = ((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ffn'
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_steady
exodus = true
[]
(test/tests/bcs/function_dirichlet_bc/test.i)
###########################################################
# This is a test of Boundary Condition System. The
# FunctionDirichletBC is used to contribute the residuals
# to the boundary term operators in the weak form.
#
# @Requirement F3.40
###########################################################
[Mesh]
[./square]
type = GeneratedMeshGenerator
dim = 2
nx = 32
ny = 32
[../]
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./ff_1]
type = ParsedFunction
expression = alpha*alpha*pi
symbol_names = 'alpha'
symbol_values = '16'
[../]
[./ff_2]
type = ParsedFunction
expression = pi*sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '16'
[../]
[./forcing_func]
type = CompositeFunction
functions = 'ff_1 ff_2'
[../]
[./bc_func]
type = ParsedFunction
expression = sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '16'
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_func
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right'
function = bc_func
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/xfem/test/tests/moving_interface/verification/1D_xy_lsdep1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: quasi-1D
# Coordinate System: xy
# Material Numbers/Types: level set dep 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# A simple transient heat transfer problem in Cartesian coordinates designed
# with the Method of Manufactured Solutions. This problem was developed to
# verify XFEM performance in the presence of a moving interface for linear
# element models that can be exactly evaluated by FEM/Moose. Both the
# temperature solution and level set function are designed to be linear to
# attempt to minimize error between the Moose/exact solution and XFEM results.
# Thermal conductivity is dependent upon the value of the level set function
# at each timestep.
# Results:
# The temperature at the left boundary (x=0) exhibits the largest difference
# between the FEM/Moose solution and XFEM results. We present the XFEM
# results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 479.9999722
# 0.6 520 519.9998726
# 0.8 560 559.9997314
# 1.0 600 599.9996885
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 1
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 0.5
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = 'rhoCp*(-200*x+200)-(0.05*200*t/1.04)'
symbol_names = 'rhoCp'
symbol_values = 10
[../]
[./neumann_func]
type = ParsedFunction
expression = '((0.05/1.04)*(1-(x-0.04)-0.2*t) + 1.5)*200*t'
[../]
[./k_func]
type = ParsedFunction
expression = '(0.05/1.04)*(1-(x-0.04)-0.2*t) + 1.5'
[../]
[./ls_func]
type = ParsedFunction
expression = '1.04 - x - 0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericFunctionMaterial
prop_names = 'diffusion_coefficient'
prop_values = 'k_func'
[../]
[]
[BCs]
[./left_u]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 'right'
value = 400
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/variables/fe_hier/hier-2-3d.i)
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
nx = 1
ny = 1
nz = 1
elem_type = HEX27
# This problem only has 1 element, so using DistributedMesh in parallel
# isn't really an option, and we don't care that much about DistributedMesh
# in serial.
parallel_type = replicated
[]
[Functions]
[./bc_fnt]
type = ParsedFunction
expression = 2*y
[../]
[./bc_fnb]
type = ParsedFunction
expression = -2*y
[../]
[./bc_fnl]
type = ParsedFunction
expression = -2*x
[../]
[./bc_fnr]
type = ParsedFunction
expression = 2*x
[../]
[./bc_fnf]
type = ParsedFunction
expression = 2*z
[../]
[./bc_fnk]
type = ParsedFunction
expression = -2*z
[../]
[./forcing_fn]
type = ParsedFunction
expression = -6+x*x+y*y+z*z
[../]
[./solution]
type = ParsedGradFunction
expression = x*x+y*y+z*z
grad_x = 2*x
grad_y = 2*y
grad_z = 2*z
[../]
[]
[Variables]
[./u]
order = SECOND
family = HIERARCHIC
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./bc_top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = bc_fnt
[../]
[./bc_bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bc_fnb
[../]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[./bc_front]
type = FunctionNeumannBC
variable = u
boundary = 'front'
function = bc_fnf
[../]
[./bc_back]
type = FunctionNeumannBC
variable = u
boundary = 'back'
function = bc_fnk
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/bcs/nodal_normals/cylinder_hexes_1st_2nd.i)
# First order normals on second order mesh
[Mesh]
file = cylinder-hexes-2nd.e
[]
[Functions]
[./all_bc_fn]
type = ParsedFunction
expression = x*x+y*y
[../]
[./f_fn]
type = ParsedFunction
expression = -4
[../]
[]
[NodalNormals]
boundary = '1'
corner_boundary = 100
order = FIRST
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = f_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = 'all_bc_fn'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-13
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/adaptivity/interval/adapt_interval.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 6
dt = 1
solve_type = 'PJFNK'
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 2
interval = 2
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/problems/no_kernel_coverage_check/no_coverage_check.i)
[Mesh]
file = rectangle.e
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[Kernels]
active = 'diff body_force'
[./diff]
type = Diffusion
variable = u
block = 1
[../]
[./body_force]
type = BodyForce
variable = u
block = 1
value = 10
[../]
[]
[BCs]
active = 'left'
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(modules/level_set/test/tests/functions/olsson_bubble/olsson_bubble_adjac.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
displacements = 'disp_x disp_y'
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[bubble]
[]
[disp_x]
[]
[disp_y]
[]
[]
[Kernels]
[bubble]
type = ADBodyForce
variable = bubble
function = bubble_func
use_displaced_mesh = true
[]
[dt]
type = ADTimeDerivative
variable = bubble
[]
[]
[Functions]
[bubble_func]
type = LevelSetOlssonBubble
center = '0.5 0.5 0'
radius = 0.4
epsilon = 0.05
[]
[]
[Executioner]
solve_type = NEWTON
type = Transient
num_steps = 1
[]
[Outputs]
exodus = true
[]
(test/tests/kernels/vector_fe/electromagnetic_coulomb_gauge.i)
# This is an MMS problem that demonstrates solution of Maxwell's equations in the
# Coulomb gauge potential form. The equations solved are:
# -\nabla^2 V = f_{V,mms}
# -\nabla^2 A - \omega^2 A + \nabla \frac{\partial V}{\partial t} = f_{A,mms}
# This tests the value and gradient of a VectorMooseVariable as well as the time
# derivative of the gradient of a standard MooseVariable
#
# This input file is subject to two tests:
# 1) An exodiff test of the physics
# 2) A Jacobian test to verify accuracy of hand-coded Jacobian routines
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
xmin = -1
ymin = -1
[]
[Variables]
[./V]
[../]
[./A]
family = LAGRANGE_VEC
order = FIRST
scaling = 1e-10
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = V
coef = 5
[../]
[./V_frc]
type = BodyForce
function = 'V_forcing_function'
variable = V
[../]
[./A_diff]
type = VectorCoefDiffusion
variable = A
coef = 5
[../]
[./A_coeff_reaction]
type = VectorCoeffReaction
variable = A
coefficient = -.09
[../]
[./A_coupled_grad_td]
type = VectorCoupledGradientTimeDerivative
variable = A
v = V
[../]
[./A_frc]
type = VectorBodyForce
variable = A
function_x = 'Ax_forcing_function'
function_y = 'Ay_forcing_function'
function_z = '0'
[../]
[]
[BCs]
[./bnd_V]
type = FunctionDirichletBC
variable = V
boundary = 'left right top bottom'
function = 'V_exact_sln'
[../]
[./bnd_A]
type = VectorPenaltyDirichletBC
variable = A
x_exact_sln = 'Ax_exact_sln'
y_exact_sln = 'Ay_exact_sln'
z_exact_sln = '0'
penalty = 1e10
boundary = 'left right top bottom'
[../]
[]
[Functions]
[./V_exact_sln]
type = ParsedFunction
expression = 'cos(0.3*t)*cos(1.1*x)*cos(1.2*y)'
[../]
[./Ax_exact_sln]
type = ParsedFunction
expression = 'cos(0.3*t)*cos(0.4*x)*cos(0.5*y)'
[../]
[./Ay_exact_sln]
type = ParsedFunction
expression = 'cos(0.3*t)*cos(0.6*x)*cos(0.7*y)'
[../]
[./V_forcing_function]
type = ParsedFunction
expression = '0.33*sin(0.3*t)*sin(1.1*x)*cos(1.2*y) + 13.25*cos(0.3*t)*cos(1.1*x)*cos(1.2*y)'
[../]
[./Ax_forcing_function]
type = ParsedFunction
expression = '0.33*sin(0.3*t)*sin(1.1*x)*cos(1.2*y) + 1.96*cos(0.3*t)*cos(0.4*x)*cos(0.5*y)'
[../]
[./Ay_forcing_function]
type = ParsedFunction
expression = '0.36*sin(0.3*t)*sin(1.2*y)*cos(1.1*x) + 4.16*cos(0.3*t)*cos(0.6*x)*cos(0.7*y)'
[../]
[]
[Preconditioning]
[./pre]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
num_steps = 10
end_time = 3
l_max_its = 100
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart'
petsc_options_value = 'asm 100'
petsc_options = '-ksp_converged_reason -ksp_monitor_true_residual -ksp_monitor_singular_value -snes_linesearch_monitor'
line_search = 'bt'
[]
[Outputs]
exodus = true
print_linear_residuals = false
[]
[Debug]
show_var_residual_norms = true
[]
(modules/stochastic_tools/test/tests/surrogates/pod_rb/internal/sub.i)
[Problem]
type = FEProblem
extra_tag_vectors = 'diff react bodyf'
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 15
xmax = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = u
diffusivity = k
extra_vector_tags = 'diff'
[]
[reaction]
type = MaterialReaction
variable = u
coefficient = alpha
extra_vector_tags = 'react'
[]
[source]
type = BodyForce
variable = u
value = 1.0
extra_vector_tags = 'bodyf'
[]
[]
[Materials]
[k]
type = GenericConstantMaterial
prop_names = k
prop_values = 1.0
[]
[alpha]
type = GenericConstantMaterial
prop_names = alpha
prop_values = 1.0
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/energy-conservation/q1q1.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
nx = 10
ny = 10
dim = 2
[]
[subdomain]
type = SubdomainBoundingBoxGenerator
bottom_left = '0.5 0 0'
top_right = '1 1 0'
block_id = 1
input = gen
[]
[break_boundary]
input = subdomain
type = BreakBoundaryOnSubdomainGenerator
boundaries = 'bottom top'
[]
[sideset]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '1'
paired_block = '0'
new_boundary = 'fluid_left'
[]
coord_type = RZ
[]
[Variables]
[T][]
[velocity]
family = LAGRANGE_VEC
block = 1
[]
[pressure]
block = 1
[]
[]
[Kernels]
[mass]
type = INSADMass
variable = pressure
block = 1
[]
[pspg]
type = INSADMassPSPG
variable = pressure
block = 1
[]
[momentum_convection]
type = INSADMomentumAdvection
variable = velocity
block = 1
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = velocity
block = 1
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = pressure
integrate_p_by_parts = true
block = 1
[]
[momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
block = 1
[]
[temperature_advection]
type = INSADEnergyAdvection
variable = T
block = 1
[]
[temperature_supg]
type = INSADEnergySUPG
variable = T
velocity = velocity
block = 1
[]
[temperature_conduction]
type = ADHeatConduction
variable = T
thermal_conductivity = 'k'
[]
[heat_source]
type = BodyForce
variable = T
block = 0
function = 'x + y'
[]
[]
[BCs]
[velocity_inlet]
type = VectorFunctionDirichletBC
variable = velocity
function_y = 1
boundary = 'bottom_to_1'
[]
[wall]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'fluid_left right'
[]
[convective_heat_transfer]
type = ConvectiveHeatFluxBC
variable = T
T_infinity = 0
heat_transfer_coefficient = 1
boundary = 'right'
[]
[]
[Materials]
[constant]
type = ADGenericConstantMaterial
prop_names = 'cp rho k mu'
prop_values = '1 1 1 1'
[]
[ins]
type = INSADStabilized3Eqn
pressure = pressure
velocity = velocity
temperature = T
block = 1
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[Outputs]
csv = true
[]
[Postprocessors]
[convective_heat_transfer]
type = ConvectiveHeatTransferSideIntegral
T_solid = T
T_fluid = 0
htc = 1
boundary = 'right'
[]
[advection]
type = INSADElementIntegralEnergyAdvection
temperature = T
velocity = velocity
cp = cp
rho = rho
block = 1
[]
[source]
type = FunctionElementIntegral
function = 'x + y'
block = 0
[]
[energy_balance]
type = ParsedPostprocessor
function = 'convective_heat_transfer + advection - source'
pp_names = 'convective_heat_transfer advection source'
[]
[]
(test/tests/mortar/3d-periodic/periodic.i)
[Mesh]
[file]
type = FileMeshGenerator
file = flow_test.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
new_block_id = 11
new_block_name = "secondary"
sidesets = '1'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
new_block_id = 12
new_block_name = "primary"
sidesets = '2'
[]
[]
[Variables]
[u]
block = 'bottom middle top'
[]
[lm]
block = 'secondary'
use_dual = true
[]
[]
[Kernels]
[diffusion]
type = Diffusion
variable = u
block = 'bottom middle top'
[]
[force]
type = BodyForce
variable = u
block = 'bottom middle'
function = 'x - y'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
value = 1
boundary = 'around'
[]
[]
[Constraints]
[ev]
type = EqualValueConstraint
variable = lm
secondary_variable = u
primary_boundary = top
secondary_boundary = bottom
primary_subdomain = 12
secondary_subdomain = 11
delta = 0.1
periodic = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/nodal_var_value/screen_output_test.i)
[Mesh]
file = square-2x2-nodeids.e
# This test can only be run with renumering disabled, so the
# NodalVariableValue postprocessor's node id is well-defined.
allow_renumbering = false
[]
[Variables]
active = 'u v'
[./u]
order = SECOND
family = LAGRANGE
[../]
[./v]
order = SECOND
family = LAGRANGE
[../]
[]
[Functions]
active = 'force_fn exact_fn left_bc'
[./force_fn]
type = ParsedFunction
expression = '1-x*x+2*t'
[../]
[./exact_fn]
type = ParsedFunction
expression = '(1-x*x)*t'
[../]
[./left_bc]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
active = '
time_u diff_u ffn_u
time_v diff_v'
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'all_u left_v right_v'
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = exact_fn
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '2'
value = 0
[../]
[]
[Postprocessors]
active = 'l2 node1 node4'
[./l2]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./node1]
type = NodalVariableValue
variable = u
nodeid = 15
[../]
[./node4]
type = NodalVariableValue
variable = v
nodeid = 10
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[./console]
type = Console
max_rows = 2
[../]
[]
(test/tests/variables/fe_hier/hier-1-2d.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 5
ny = 5
elem_type = QUAD9
[]
[Functions]
[./bc_fnt]
type = ParsedFunction
expression = 1
[../]
[./bc_fnb]
type = ParsedFunction
expression = -1
[../]
[./bc_fnl]
type = ParsedFunction
expression = -1
[../]
[./bc_fnr]
type = ParsedFunction
expression = 1
[../]
[./forcing_fn]
type = ParsedFunction
expression = x+y
[../]
[./solution]
type = ParsedGradFunction
expression = x+y
grad_x = 1
grad_y = 1
[../]
[]
[Variables]
[./u]
order = FIRST
family = HIERARCHIC
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./bc_top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = bc_fnt
[../]
[./bc_bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bc_fnb
[../]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/porous_flow/test/tests/energy_conservation/heat04.i)
# The sample is a single unit element, with fixed displacements on
# all sides. A heat source of strength S (J/m^3/s) is applied into
# the element. There is no fluid flow or heat flow. The rise
# in temperature, porepressure and stress, and the change in porosity is
# matched with theory.
#
# In this case, fluid mass must be conserved, and there is no
# volumetric strain, so
# porosity * fluid_density = constant
# Also, the energy-density in the rock-fluid system increases with S:
# d/dt [(1 - porosity) * rock_density * rock_heat_cap * T + porosity * fluid_density * fluid_heat_cap * T] = S
# Also, the porosity evolves according to THM as
# porosity = biot + (porosity0 - biot) * exp( (biot - 1) * P / fluid_bulk + rock_thermal_exp * T)
# Finally, the effective stress must be exactly zero (as there is
# no strain).
#
# Let us assume that
# fluid_density = dens0 * exp(P / fluid_bulk - fluid_thermal_exp * T)
# Then the conservation of fluid mass means
# porosity = por0 * exp(- P / fluid_bulk + fluid_thermal_exp * T)
# where dens0 * por0 = the initial fluid mass.
# The last expression for porosity, combined with the THM one,
# and assuming that biot = 1 for simplicity, gives
# porosity = 1 + (porosity0 - 1) * exp(rock_thermal_exp * T) = por0 * exp(- P / fluid_bulk + fluid_thermal_exp * T) .... (A)
#
# This stuff may be substituted into the heat energy-density equation:
# S = d/dt [(1 - porosity0) * exp(rock_thermal_exp * T) * rock_density * rock_heat_cap * T + porosity * fluid_density * fluid_heat_cap * T]
#
# If S is constant then
# S * t = (1 - porosity0) * exp(rock_thermal_exp * T) * rock_density * rock_heat_cap * T + porosity * fluid_density * fluid_heat_cap * T
# with T(t=0) = 0 then Eqn(A) implies that por0 = porosity0 and
# P / fluid_bulk = fluid_thermal_exp * T - log(1 + (por0 - 1) * exp(rock_thermal_exp * T)) + log(por0)
#
# Parameters:
# A = 2
# fluid_bulk = 2.0
# dens0 = 3.0
# fluid_thermal_exp = 0.5
# fluid_heat_cap = 2
# por0 = 0.5
# rock_thermal_exp = 0.25
# rock_density = 5
# rock_heat_capacity = 0.2
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.5
cv = 2
cp = 2
bulk_modulus = 2.0
density0 = 3.0
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[pp]
[]
[temp]
[]
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[]
[]
[Kernels]
[grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
[]
[grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
[]
[grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
component = 2
[]
[poro_x]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 1.0
variable = disp_x
component = 0
[]
[poro_y]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 1.0
variable = disp_y
component = 1
[]
[poro_z]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 1.0
component = 2
variable = disp_z
[]
[poro_vol_exp]
type = PorousFlowMassVolumetricExpansion
variable = pp
fluid_component = 0
[]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[temp]
type = PorousFlowEnergyTimeDerivative
variable = temp
[]
[poro_vol_exp_temp]
type = PorousFlowHeatVolumetricExpansion
variable = temp
[]
[heat_source]
type = BodyForce
function = 1
variable = temp
[]
[]
[Functions]
[err_T_fcn]
type = ParsedFunction
symbol_names = 'por0 rte temp rd rhc m0 fhc source'
symbol_values = '0.5 0.25 t0 5 0.2 1.5 2 1'
expression = '((1-por0)*exp(rte*temp)*rd*rhc*temp+m0*fhc*temp-source*t)/(source*t)'
[]
[err_pp_fcn]
type = ParsedFunction
symbol_names = 'por0 rte temp rd rhc m0 fhc source bulk pp fte'
symbol_values = '0.5 0.25 t0 5 0.2 1.5 2 1 2 p0 0.5'
expression = '(bulk*(fte*temp-log(1+(por0-1)*exp(rte*temp))+log(por0))-pp)/pp'
[]
[]
[AuxVariables]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xz]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_yz]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[]
[porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'temp pp disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = ComputeLinearElasticStress
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[porosity]
type = PorousFlowPorosity
thermal = true
fluid = true
mechanical = true
ensure_positive = false
biot_coefficient = 1.0
porosity_zero = 0.5
thermal_expansion_coeff = 0.25
solid_bulk = 2
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 0.2
density = 5.0
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
temperature_unit = Kelvin
fp = the_simple_fluid
phase = 0
[]
[]
[Postprocessors]
[p0]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = pp
[]
[t0]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = temp
[]
[porosity]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = porosity
[]
[stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[]
[stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[]
[stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[]
[fluid_mass]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'timestep_end'
outputs = 'console csv'
[]
[total_heat]
type = PorousFlowHeatEnergy
phase = 0
execute_on = 'timestep_end'
outputs = 'console csv'
[]
[err_T]
type = FunctionValuePostprocessor
function = err_T_fcn
[]
[err_P]
type = FunctionValuePostprocessor
function = err_pp_fcn
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-12 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 5
[]
[Outputs]
execute_on = 'initial timestep_end'
file_base = heat04
[csv]
type = CSV
[]
[]
(test/tests/vectorpostprocessors/dynamic_point_sampler/dynamic_point_sampler.i)
[Mesh]
type = GeneratedMesh
nx = 5
ny = 5
dim = 2
[]
[Variables]
[u]
[]
[]
[Functions]
[forcing_func]
type = ParsedFunction
expression = alpha*alpha*pi*pi*sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '4'
[]
[u_func]
type = ParsedGradFunction
value = sin(alpha*pi*x)
grad_x = alpha*pi*sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '4'
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[forcing]
type = BodyForce
variable = u
function = forcing_func
[]
[time]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = 'u'
boundary = 'left'
value = 0
[]
[right]
type = DirichletBC
variable = 'u'
boundary = 'right'
value = 0
[]
[]
[Executioner]
type = Transient
num_steps = 7
dt = 0.1
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[l2_error]
type = ElementL2Error
variable = u
function = u_func
[]
[dofs]
type = NumDOFs
[]
[]
[Adaptivity]
max_h_level = 3
marker = error
[Indicators]
[jump]
type = GradientJumpIndicator
variable = u
[]
[]
[Markers]
[error]
type = ErrorFractionMarker
indicator = jump
coarsen = 0.1
refine = 0.3
[]
[]
[]
[VectorPostprocessors]
[dynamic_line_sampler]
type = DynamicPointValueSampler
variable = u
start_point = '0 0.5 0'
end_point = '1 0.5 0'
num_points = 6
sort_by = x
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
csv = true
[]
(test/tests/bcs/second_deriv/test_lap_bc.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
elem_type = QUAD9
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = force_fn
[../]
[]
[Functions]
[./left_bc_func]
type = ParsedFunction
expression = '1+y*y'
[../]
[./top_bc_func]
type = ParsedFunction
expression = '1+x*x'
[../]
[./bottom_bc_func]
type = ParsedFunction
expression = '1+x*x'
[../]
[./force_fn]
type = ParsedFunction
expression = -4
[../]
[]
[BCs]
[./left]
type = FunctionDirichletBC
variable = u
boundary = left
function = left_bc_func
[../]
[./bottom]
type = FunctionDirichletBC
variable = u
boundary = bottom
function = bottom_bc_func
[../]
[./top]
type = FunctionDirichletBC
variable = u
boundary = top
function = top_bc_func
[../]
[./right_test]
type = TestLapBC
variable = u
boundary = right
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
file_base = out
exodus = true
[]
(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
[../]
[]
(modules/richards/test/tests/jacobian_2/jnQ2P.i)
# quick two phase
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
[]
[UserObjects]
[./DensityWater]
type = RichardsDensityConstBulkCut
dens0 = 1
cut_limit = 1.1
zero_point = -1.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
[../]
[./RelPermWater]
type = RichardsRelPermPower
simm = 0.2
n = 2
[../]
[./RelPermWaterCubic]
type = RichardsRelPermMonomial
simm = 0.05
n = 3
[../]
[./RelPermGas]
type = Q2PRelPermPowerGas
simm = 0.1
n = 3
[../]
[]
[Variables]
[./pp]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
block = 0
min = 0
max = 1
[../]
[../]
[./sat]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
block = 0
min = 0
max = 1
[../]
[../]
[./nonQ2P_var]
[]
[]
[Q2P]
porepressure = pp
saturation = sat
water_density = DensityWater
water_relperm = RelPermWater
water_relperm_for_diffusion = RelPermWaterCubic
water_viscosity = 1
gas_density = DensityGas
gas_relperm = RelPermGas
gas_viscosity = 1
diffusivity = 1E-2
[]
[Kernels]
[./nonQ2P_variable_check]
type = BodyForce
variable = nonQ2P_var
function = 0
[../]
[]
[Materials]
[./rock]
type = Q2PMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1.1 0 0 0 2.2 0 0 0 3.3'
gravity = '1 2 3'
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
#petsc_options = '-snes_test_display'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = jnQ2P
exodus = false
[]
(modules/heat_transfer/test/tests/ad_convective_heat_flux/coupled.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
[]
[Variables]
[./temp]
initial_condition = 200.0
[../]
[]
[Kernels]
[./heat_dt]
type = ADTimeDerivative
variable = temp
[../]
[./heat_conduction]
type = Diffusion
variable = temp
[../]
[./heat]
type = ADBodyForce
variable = temp
value = 0
[../]
[]
[BCs]
[./right]
type = ADConvectiveHeatFluxBC
variable = temp
boundary = 'right'
T_infinity = T_inf
heat_transfer_coefficient = htc
[../]
[]
[Materials]
[chf_mat]
type = ADConvectiveHeatFluxTest
temperature = temp
boundary = 'right'
[]
[]
[Postprocessors]
[./left_temp]
type = SideAverageValue
variable = temp
boundary = left
execute_on = 'TIMESTEP_END initial'
[../]
[./right_temp]
type = SideAverageValue
variable = temp
boundary = right
[../]
[./right_flux]
type = SideDiffusiveFluxAverage
variable = temp
boundary = right
diffusivity = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1
nl_abs_tol = 1e-12
[]
[Outputs]
[./out]
type = CSV
time_step_interval = 10
[../]
[]
(test/tests/adaptivity/initial_marker/initial_marker.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1
solve_type = 'PJFNK'
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 2
initial_steps = 4
initial_marker = initial_box
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = dont_mark
type = BoxMarker
[../]
[./initial_box]
type = BoxMarker
bottom_left = '0.8 0.1 0'
top_right = '0.9 0.2 0'
inside = refine
outside = dont_mark
[../]
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/bcs/nodal_normals/circle_quads.i)
[Mesh]
file = circle-quads.e
[]
[Functions]
[./all_bc_fn]
type = ParsedFunction
expression = x*x+y*y
[../]
[./f_fn]
type = ParsedFunction
expression = -4
[../]
[./analytical_normal_x]
type = ParsedFunction
expression = x
[../]
[./analytical_normal_y]
type = ParsedFunction
expression = y
[../]
[]
[NodalNormals]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = f_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = 'all_bc_fn'
[../]
[]
[Postprocessors]
[./nx_pps]
type = NodalL2Error
variable = nodal_normal_x
boundary = '1'
function = analytical_normal_x
[../]
[./ny_pps]
type = NodalL2Error
variable = nodal_normal_y
boundary = '1'
function = analytical_normal_y
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-13
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/misc/save_in/block-restricted-save-in.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./break_boundary]
input = interface
type = BreakBoundaryOnSubdomainGenerator
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./v]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[AuxVariables]
[./vres]
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 = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 right top'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1'
save_in = 'vres'
[../]
[]
[Postprocessors]
[./u_int]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[../]
[./v_int]
type = ElementIntegralVariablePostprocessor
variable = v
block = 1
[../]
[./vres_int]
type = ElementIntegralVariablePostprocessor
variable = vres
block = 1
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
(test/tests/materials/boundary_material/bnd_coupling_vol.i)
#
# Coupling volumetric material property inside boundary restricted material
# Also bringing boundary restricted material inside another boundary restricted
# material
#
# Solving: k \Laplace u + u - f = 0
#
# u = x^2 + y^2
# k = 3, but is decomposed as k3vol = k1vol + k2vol, where k1vol = 1 and k2vol = 2
#
# Boundary material property is computed as k3bnd = k1vol + k2bnd
#
# The material properties with suffix `vol` are volumetric, the ones with suffix `bnd`
# are boundary restricted
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 4
ny = 4
elem_type = QUAD9
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = x*x+y*y
[../]
[./f_fn]
type = ParsedFunction
expression = -4*3+x*x+y*y
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]
[Kernels]
[./diff]
type = DiffMKernel
variable = u
offset = 0
mat_prop = k3vol
[../]
[./r]
type = Reaction
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = f_fn
[../]
[]
[BCs]
[./all]
type = MatDivergenceBC
variable = u
prop_name = k3bnd
boundary = 'left right top bottom'
[../]
[]
[Materials]
[./k1vol]
type = GenericConstantMaterial
prop_names = 'k1vol'
prop_values = 1
block = 0
[../]
[./k2vol]
type = GenericConstantMaterial
prop_names = 'k2vol'
prop_values = 2
block = 0
[../]
[./k2bnd]
type = GenericConstantMaterial
prop_names = 'k2bnd'
prop_values = 2
boundary = 'left right top bottom'
[../]
[./k3vol]
type = SumMaterial
sum_prop_name = k3vol
mp1 = k1vol
mp2 = k2vol
block = 0
val1 = 1
val2 = 2
[../]
[./k3bnd]
type = SumMaterial
sum_prop_name = 'k3bnd'
mp1 = k1vol
mp2 = k2bnd
boundary = 'left right top bottom'
val1 = 1
val2 = 2
[../]
[]
[Postprocessors]
[./l2err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/kernels/block_kernel/block_kernel_test.i)
[Mesh]
file = rectangle.e
uniform_refine = 1
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
initial_condition = 1.0
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
block = 1
value = 10
function = 'x+y'
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
num_steps = 10
[]
[Outputs]
file_base = out
exodus = true
[]
(test/tests/restart/restart_diffusion/restart_diffusion_test_transient.i)
[Mesh]
file = steady_out.e
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
initial_from_file_var = u
initial_from_file_timestep = 2
[../]
[]
[Kernels]
active = 'bodyforce ie'
[./bodyforce]
type = BodyForce
variable = u
value = 10.0
[../]
[./ie]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 10
dt = .1
[]
[Outputs]
file_base = out
exodus = true
[]
(test/tests/time_integrators/dirk/dirk-2d-heat-adap.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 4
ny = 4
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
start_time = 0.0
num_steps = 5
dt = 0.25
[./TimeIntegrator]
type = LStableDirk2
[../]
[./Adaptivity]
refine_fraction = 0.07
coarsen_fraction = 0.
max_h_level = 4
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/mesh/adapt/initial_adaptivity_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = x*x+y*y
[../]
[./ffn]
type = ParsedFunction
expression = -4
[../]
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = -2
y1 = -2
x2 = 0
y2 = 2
inside = 1
outside = 0
[../]
[../]
[]
[Kernels]
[./udiff]
type = Diffusion
variable = u
[../]
[./forcing_fn]
type = BodyForce
variable = u
function = ffn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[./Adaptivity]
initial_adaptivity = 5
refine_fraction = 0.2
coarsen_fraction = 0.3
max_h_level = 4
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/kernels/hfem/robin.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 3
ny = 3
dim = 2
[]
build_all_side_lowerd_mesh = true
[]
[Variables]
[u]
order = THIRD
family = MONOMIAL
block = 0
[]
[lambda]
order = CONSTANT
family = MONOMIAL
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
block = 0
[]
[source]
type = BodyForce
variable = u
value = '1'
block = 0
[]
[]
[DGKernels]
[surface]
type = HFEMDiffusion
variable = u
lowerd_variable = lambda
[]
[]
[BCs]
[all]
type = VacuumBC
boundary = 'left right top bottom'
variable = u
[]
[]
[Postprocessors]
[intu]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[]
[lambdanorm]
type = ElementL2Norm
variable = lambda
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
[Outputs]
[out]
# we hide lambda because it may flip sign due to element
# renumbering with distributed mesh
type = Exodus
hide = lambda
[]
[]
(test/tests/ics/from_exodus_solution/elem_part1.i)
# We run a simple problem (5 time steps and save off the solution)
# In part2, we load the solution and solve a steady problem. The test check, that the initial state in part 2 is the same as the last state from part1
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 20
ny = 20
[]
[Functions]
[exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[]
[forcing_fn]
type = ParsedFunction
expression = -4+(x*x+y*y)
[]
[]
[AuxVariables]
[e]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[ak]
type = FunctionAux
variable = e
function = exact_fn
[]
[]
[Variables]
active = 'u'
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
active = 'ie diff ffn'
[ie]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.2
start_time = 0
num_steps = 5
[]
[Outputs]
exodus = true
checkpoint = true
[]
(test/tests/variables/fe_hier/hier-1-1d.i)
###########################################################
# This is a simple test demonstrating the use of the
# Hierarchic variable type.
#
# @Requirement F3.10
###########################################################
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -1
xmax = 1
nx = 5
elem_type = EDGE3
[]
[Functions]
[./bc_fnl]
type = ParsedFunction
expression = -1
[../]
[./bc_fnr]
type = ParsedFunction
expression = 1
[../]
[./forcing_fn]
type = ParsedFunction
expression = x
[../]
[./solution]
type = ParsedGradFunction
expression = x
grad_x = 1
[../]
[]
# Hierarchic Variable type
[Variables]
[./u]
order = FIRST
family = HIERARCHIC
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/restart/restart_steady_from_transient/steady_from_transient_restart.i)
[Mesh]
[fmg]
type = FileMeshGenerator
file = transient_out_cp/LATEST
[]
parallel_type = replicated
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = ((x*x)+(y*y))
[../]
[./forcing_fn]
type = ParsedFunction
expression = -4
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
[Problem]
restart_file_base = transient_out_cp/LATEST
[]
(test/tests/time_steppers/time_stepper_system/AB2PredictorCorrector.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0.0
xmax = 1.0
[]
#still need BC for Energy, IC's for both.
[Variables]
active = 'Time'
[./Time]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[../]
[]
[Functions]
active = 'func'
[./func]
type = ParsedFunction
expression = 2.0*t
[../]
[]
[Kernels]
active = 't_time func_time'
[./t_time]
type = TimeDerivative
variable = Time
[../]
[./func_time]
type = BodyForce
variable = Time
function = func
[../]
[]
[BCs]
active = 'Top_Temperature'
[./Top_Temperature]
type = NeumannBC
variable = Time
boundary = 'left right'
[../]
[]
[Executioner]
type = Transient
scheme = 'BDF2'
start_time = 0
num_steps = 4
nl_abs_tol = 1e-15
petsc_options = '-snes_converged_reason'
abort_on_solve_fail = true
# Use the same test case as AB2PredictorCorrector test, add one more time stepper
# to test if AB2PredictorCorrector works correctly with time stepper composition
[TimeSteppers]
[AB2]
type = AB2PredictorCorrector
dt = .01
e_max = 10
e_tol = 1
[]
[IterationAdapDT]
type = IterationAdaptiveDT
dt = 100
[]
[]
[]
[Outputs]
exodus = true
file_base='aee_out'
[]
(test/tests/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/variables/fe_hier/hier-2-2d.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 5
ny = 5
elem_type = QUAD9
[]
[Functions]
[./bc_fnt]
type = ParsedFunction
expression = 2*y
[../]
[./bc_fnb]
type = ParsedFunction
expression = -2*y
[../]
[./bc_fnl]
type = ParsedFunction
expression = -2*x
[../]
[./bc_fnr]
type = ParsedFunction
expression = 2*x
[../]
[./forcing_fn]
type = ParsedFunction
expression = -4+x*x+y*y
[../]
[./solution]
type = ParsedGradFunction
expression = x*x+y*y
grad_x = 2*x
grad_y = 2*y
[../]
[]
[Variables]
[./u]
order = SECOND
family = HIERARCHIC
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./bc_top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = bc_fnt
[../]
[./bc_bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bc_fnb
[../]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/dgkernels/3d_diffusion_dg/3d_diffusion_p_refinement.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 1
elem_type = HEX8
[]
[Variables]
[u]
order = FIRST
family = MONOMIAL
[InitialCondition]
type = ConstantIC
value = 0.5
[]
[]
[]
[Functions]
[forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[]
[exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[abs]
type = Reaction
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[DGKernels]
[dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[]
[]
[BCs]
[all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3 4 5'
function = exact_fn
epsilon = -1
sigma = 6
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[Adaptivity]
switch_h_to_p_refinement = true
steps = 2
refine_fraction = 1.0
coarsen_fraction = 0
max_h_level = 8
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = 'initial timestep_end'
[]
[dofs]
type = NumDOFs
execute_on = 'initial timestep_end'
[]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
exodus = true
[]
(test/tests/executioners/executioner/sln-time-adapt.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./dt]
type = TimestepSize
[../]
[]
[Executioner]
type = Transient
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.1
[../]
scheme = 'implicit-euler'
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_sta
exodus = true
[]
(test/tests/adaptivity/max_h_level/max_h_level.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1
solve_type = PJFNK
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 2
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Outputs]
execute_on = 'timestep_end'
[./out]
type = Exodus
execute_scalars_on = none
[../]
[]
(modules/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/transfers/multiapp_userobject_transfer/tosub_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 8
xmax = 0.1
ymax = 0.5
[]
[Variables]
[./u]
initial_condition = 1
[../]
[]
[AuxVariables]
[./multi_layered_average]
[../]
[./element_multi_layered_average]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./axial_force]
type = ParsedFunction
expression = 1000*y
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = axial_force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.001
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[Problem]
coord_type = rz
type = FEProblem
[]
(test/tests/multiapps/steffensen_postprocessor/transient_main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[time]
type = TimeDerivative
variable = u
[]
[source]
type = BodyForce
variable = u
value = 1
[]
[]
[BCs]
[left]
type = PostprocessorDirichletBC
variable = u
boundary = left
postprocessor = 'from_sub'
[]
[]
[Postprocessors]
[coupling_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[from_sub]
type = Receiver
default = 0
[]
[to_sub]
type = SideAverageValue
variable = u
boundary = right
[]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
# App coupling parameters
fixed_point_algorithm = 'steffensen'
fixed_point_max_its = 30
transformed_postprocessors = 'from_sub'
[]
[Outputs]
csv = true
exodus = false
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = 'transient_sub.i'
clone_parent_mesh = true
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[left_from_sub]
type = MultiAppPostprocessorTransfer
from_multi_app = sub
from_postprocessor = 'to_main'
to_postprocessor = 'from_sub'
reduction_type = 'average'
[]
[right_to_sub]
type = MultiAppPostprocessorTransfer
to_multi_app = sub
from_postprocessor = 'to_sub'
to_postprocessor = 'from_main'
[]
[]
(modules/combined/test/tests/poro_mechanics/pp_generation_unconfined_action.i)
# This is identical to pp_generation_unconfined.i but it uses
# and action instead of explicitly writing all the Kernels out
#
# A sample is constrained on all sides, except its top
# and its boundaries are
# also impermeable. Fluid is pumped into the sample via a
# volumetric source (ie m^3/second per cubic meter), and the
# rise in the top surface, porepressure, and stress are observed.
#
# Source = s (units = 1/second)
#
# Expect:
# strain_zz = disp_z = BiotCoefficient*BiotModulus*s*t/((bulk + 4*shear/3) + BiotCoefficient^2*BiotModulus)
# porepressure = BiotModulus*(s*t - BiotCoefficient*strain_zz)
# stress_xx = (bulk - 2*shear/3)*strain_zz (remember this is effective stress)
# stress_xx = (bulk + 4*shear/3)*strain_zz (remember this is effective stress)
#
# Parameters:
# Biot coefficient = 0.3
# Porosity = 0.1
# Bulk modulus = 2
# Shear modulus = 1.5
# fluid bulk modulus = 1/0.3 = 3.333333
# 1/Biot modulus = (1 - 0.3)*(0.3 - 0.1)/2 + 0.1*0.3 = 0.1. BiotModulus = 10
#
# s = 0.1
#
# Expect
# disp_z = 0.3*10*s*t/((2 + 4*1.5/3) + 0.3^2*10) = 0.612245*s*t
# porepressure = 10*(s*t - 0.3*0.612245*s*t) = 8.163265*s*t
# stress_xx = (2 - 2*1.5/3)*0.612245*s*t = 0.612245*s*t
# stress_zz = (2 + 4*shear/3)*0.612245*s*t = 2.44898*s*t
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
porepressure = porepressure
block = 0
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./porepressure]
[../]
[]
[BCs]
[./confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[../]
[./confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[../]
[./confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back'
[../]
[]
[Kernels]
[./PoroMechanics]
[../]
[./poro_timederiv]
type = PoroFullSatTimeDerivative
variable = porepressure
[../]
[./source]
type = BodyForce
function = 0.1
variable = porepressure
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./poro_material]
type = PoroFullSatMaterial
porosity0 = 0.1
biot_coefficient = 0.3
solid_bulk_compliance = 0.5
fluid_bulk_compliance = 0.3
constant_porosity = true
[../]
[]
[Postprocessors]
[./p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
[../]
[./zdisp]
type = PointValue
outputs = csv
point = '0 0 0.5'
variable = disp_z
[../]
[./stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[../]
[./stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[../]
[./stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-14 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = pp_generation_unconfined_action
[./csv]
type = CSV
[../]
[]
(modules/stochastic_tools/examples/parameter_study/diffusion.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables/T]
initial_condition = 300
[]
[Kernels]
[time]
type = ADTimeDerivative
variable = T
[]
[diff]
type = ADMatDiffusion
variable = T
diffusivity = diffusivity
[]
[source]
type = ADBodyForce
variable = T
value = 100
function = 1
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = T
boundary = left
value = 300
[]
[right]
type = ADNeumannBC
variable = T
boundary = right
value = -100
[]
[]
[Materials/constant]
type = ADGenericConstantMaterial
prop_names = 'diffusivity'
prop_values = 1
[]
[Executioner]
type = Transient
num_steps = 4
dt = 0.25
[]
[Postprocessors]
[T_avg]
type = ElementAverageValue
variable = T
execute_on = 'initial timestep_end'
[]
[q_left]
type = ADSideDiffusiveFluxAverage
variable = T
boundary = left
diffusivity = diffusivity
execute_on = 'initial timestep_end'
[]
[]
[Controls/stochastic]
type = SamplerReceiver
[]
[Outputs]
[]
(test/tests/problems/no_material_dependency_check/no_material_coverage_check.i)
[Mesh]
[./gen]
type = GeneratedMeshGenerator
dim = 3
[../]
[]
[Problem]
material_dependency_check = false
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
value = 10
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Materials]
[./mat1]
type = GenericConstantMaterial
prop_names = 'diff1'
prop_values = '1'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(tutorials/tutorial02_multiapps/step02_transfers/01_parent_meshfunction.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[tv]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 0.2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
type = TransientMultiApp
positions = '0 0 0'
input_files = '01_sub_meshfunction.i'
[]
[]
[Transfers]
[pull_v]
type = MultiAppShapeEvaluationTransfer
# Transfer from the sub-app to this app
from_multi_app = sub_app
# The name of the variable in the sub-app
source_variable = v
# The name of the auxiliary variable in this app
variable = tv
[]
[push_u]
type = MultiAppShapeEvaluationTransfer
# Transfer to the sub-app from this app
to_multi_app = sub_app
# The name of the variable in this app
source_variable = u
# The name of the auxiliary variable in the sub-app
variable = tu
[]
[]
(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
[]
[]
(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
[../]
[]
(test/tests/postprocessors/nodal_extreme_value/nodal_max_value_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 20
ny = 20
[]
[Functions]
[exact_fn]
type = ParsedFunction
expression = (sin(pi*t))
[]
[forcing_fn]
type = ParsedFunction
expression = sin(pi*t)
[]
[]
[Variables]
active = 'u'
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
active = 'diff' #ffn'
[ie]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
num_steps = 20
[]
[Postprocessors]
[max_nodal_val]
type = NodalExtremeValue
variable = u
[]
[]
[Outputs]
file_base = out_nodal_max
exodus = true
[]
(test/tests/outputs/oversample/adapt.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t*t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1
solve_type = PJFNK
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 2
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[./oversample]
type = Exodus
refinements = 2
file_base = adapt_out_oversample
execute_on = 'initial timestep_end'
[../]
[]
(test/tests/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
[]
[]
(test/tests/preconditioners/vcp/vcp_test.i)
[Mesh]
[original_file_mesh]
type = FileMeshGenerator
file = non_conform_2blocks.e
[]
[secondary_side]
input = original_file_mesh
type = LowerDBlockFromSidesetGenerator
sidesets = '10'
new_block_id = '100'
new_block_name = 'secondary_side'
[]
[primary_side]
input = secondary_side
type = LowerDBlockFromSidesetGenerator
sidesets = '20'
new_block_id = '200'
new_block_name = 'primary_side'
[]
[]
[Functions]
[exact_sln]
type = ParsedFunction
expression = sin(2*pi*x)*sin(2*pi*y)
[]
[ffn]
type = ParsedFunction
expression = 8*pi*pi*sin(2*pi*x)*sin(2*pi*y)
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[lm]
order = FIRST
family = LAGRANGE
block = secondary_side
use_dual = true
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = ffn
[]
[]
[Constraints]
[ced]
type = EqualValueConstraint
variable = lm
secondary_variable = u
primary_boundary = 20
primary_subdomain = 200
secondary_boundary = 10
secondary_subdomain = 100
[]
[]
[BCs]
[all]
type = DirichletBC
variable = u
boundary = '30 40'
value = 0.0
[]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_sln
variable = u
boundary = '50 60'
[]
[]
[Postprocessors]
[l2_error]
type = ElementL2Error
variable = u
function = exact_sln
block = '1 2'
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[vcp]
type = VCP
full = true
lm_variable = 'lm'
primary_variable = 'u'
preconditioner = 'AMG'
is_lm_coupling_diagonal = true
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_view'
l_max_its = 100
nl_rel_tol = 1e-6
[]
[Outputs]
csv = true
[]
(test/tests/bcs/function_neumann_bc/test.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
dim = 2
nx = 32
ny = 32
[../]
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./exact_func]
type = ParsedFunction
expression = x*x
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
value = 2
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = FunctionNeumannBC
function = exact_func
variable = u
boundary = right
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
execute_on = 'timestep_end'
file_base = neumannbc_out
exodus = true
[]
(tutorials/tutorial02_multiapps/step02_transfers/02_parent_nearestnode.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[tv]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 0.2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
type = TransientMultiApp
positions = '0.1 0.1 0 0.4 0.4 0 0.7 0.7 0'
input_files = '02_sub_nearestnode.i'
execute_on = timestep_end
output_in_position = true
[]
[]
[Transfers]
[push_u]
type = MultiAppNearestNodeTransfer
# Transfer to the sub-app from this app
to_multi_app = sub_app
# The name of the variable in this app
source_variable = u
# The name of the auxiliary variable in the sub-app
variable = tu
[]
[]
(test/tests/variables/fe_hermite/hermite-3-2d.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 5
ny = 5
elem_type = QUAD9
[]
[Functions]
[./bc_fnt]
type = ParsedFunction
expression = 3*y*y
[../]
[./bc_fnb]
type = ParsedFunction
expression = -3*y*y
[../]
[./bc_fnl]
type = ParsedFunction
expression = -3*x*x
[../]
[./bc_fnr]
type = ParsedFunction
expression = 3*x*x
[../]
[./forcing_fn]
type = ParsedFunction
expression = -6*x-6*y+(x*x*x)+(y*y*y)
[../]
[./solution]
type = ParsedGradFunction
value = (x*x*x)+(y*y*y)
grad_x = 3*x*x
grad_y = 3*y*y
[../]
[]
[Variables]
[./u]
order = THIRD
family = HERMITE
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./bc_top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = bc_fnt
[../]
[./bc_bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bc_fnb
[../]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/xfem/test/tests/moving_interface/verification/1D_xy_discrete2mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: quasi-1D
# Coordinate System: xy
# Material Numbers/Types:discrete homog 2 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description
# A transient heat transfer problem in Cartesian coordinates designed with
# the Method of Manufactured Solutions. This problem was developed to verify
# XFEM performance in the presence of a moving interface separating two
# discrete material regions for linear element models. Both the temperature
# solution and level set function are designed to be linear to attempt to
# minimize error between the exact solution and XFEM results. Thermal
# conductivity, density, and heat capacity are homogeneous in each material
# region with a discontinuous jump in thermal flux between the two material
# regions.
# Results:
# The temperature at the left boundary is determined by the analytical
# solution, so temperature at the right boundary (x=1) should exhibit the
# largest difference between the analytical solution and XFEM results. We
# present the analytical and XFEM results at the material interface position
# and right side boundary at various times.
# Interface:
# Time Expected Temperature XFEM Calculated Temperature
# 20 746.75 746.7235521
# 40 893.05 893.0379081
# 60 1040.15 1040.1527530
#
# Right Boundary (x=1):
# Time Expected Temperature XFEM Calculated Temperature
# 20 720 719.9708681
# 40 840 839.9913293
# 60 960 960.0100886
#
# IMPORTANT NOTE:
# When running this input file, add the --allow-test-objects tag!!!
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 1
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 0.5
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = phi
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./phi]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = 'diffusion_coefficient'
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = phi
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
jump_flux = jump_flux_func
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = 'phi:=(0.75-x-0.001*t);
i:=(0.75-0.001*t);
if (phi>=0,
10*(8-x),
(7/(1-i))*((i-2)*x + (8-7*i)) )'
[../]
[./right_du_func]
type = ParsedFunction
expression = 'i:=(0.75-0.001*t);
(2.0/(1-i))*(-5+5*i+i*t-2*t)'
[../]
[./exact_u_func]
type = ParsedFunction
expression = 'phi:=(0.75-x-0.001*t);
i:=(0.75-0.001*t);
if (phi>=0,
605 - 5*x + t*(8-x),
(1/(1-i))*((-5+5*i+i*t-2*t)*x + (605-605*i+8*t-7*t*i)) )'
[../]
[./jump_flux_func]
type = ParsedFunction
expression = 'i:=(0.75-0.001*t);
k_1:=(20.0);
k_2:=(2.0);
k_1*(5+t) + (k_2/(1-i))*(-5+5*i+i*t-2*t)'
[../]
[./ls_func]
type = ParsedFunction
expression = '0.75 - x - 0.001*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'A_rhoCp B_rhoCp'
prop_values = '10 7'
[../]
[./therm_cond_prop]
type = GenericConstantMaterial
prop_names = 'A_diffusion_coefficient B_diffusion_coefficient'
prop_values = '20.0 2.0'
[../]
[./combined_rhoCp]
type = LevelSetBiMaterialReal
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = phi
prop_name = rhoCp
[../]
[./combined_diffusion_coefficient]
type = LevelSetBiMaterialReal
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = phi
prop_name = diffusion_coefficient
[../]
[]
[BCs]
[./left_u]
type = FunctionDirichletBC
variable = u
boundary = 'left'
function = exact_u_func
[../]
[./right_du]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = right_du_func
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 600
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
# petsc_options_iname = '-pc_type -pc_hypre_type'
# petsc_options_value = 'hypre boomeramg'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 20
end_time = 60.0
max_xfem_update = 2
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/executioners/executioner/transient.i)
###########################################################
# This is a simple test with a time-dependent problem
# demonstrating the use of a "Transient" Executioner.
#
# @Requirement F1.10
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./dt]
type = TimestepSize
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_transient
exodus = true
[]
(test/tests/adaptivity/dont-p-refine/test.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1 1'
dy = '1 1'
ix = '2 2'
iy = '2 2'
subdomain_id = '0 0
0 1'
[]
[]
[Adaptivity]
switch_h_to_p_refinement = true
initial_marker = uniform
initial_steps = 1
disable_p_refinement_for_families = 'lagrange'
[Markers/uniform]
type = UniformMarker
mark = REFINE
block = 1
[]
[]
[Variables]
[u]
family = MONOMIAL
order = FIRST
[]
[]
[AuxVariables]
[test][]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[src]
type = BodyForce
variable = u
value = 1
[]
[]
[DGKernels]
[dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[]
[]
[BCs]
[left_u]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = 0
epsilon = -1
sigma = 6
[]
[]
[Postprocessors]
[avg]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(tutorials/tutorial02_multiapps/step02_transfers/03_parent_uot.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 10
nz = 10
zmax = 3
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v_average]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[front]
type = DirichletBC
variable = u
boundary = front
value = 0
[]
[back]
type = DirichletBC
variable = u
boundary = back
value = 1
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 0.2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[UserObjects]
[layered_integral]
type = NearestPointLayeredIntegral
points = '0.15 0.15 0 0.45 0.45 0 0.75 0.75 0'
direction = z
num_layers = 4
variable = u
[]
[]
[MultiApps]
[sub_app]
type = TransientMultiApp
positions = '0.15 0.15 0 0.45 0.45 0 0.75 0.75 0'
input_files = '03_sub_uot.i'
execute_on = timestep_end
output_in_position = true
[]
[]
[Transfers]
[push_u]
type = MultiAppUserObjectTransfer
to_multi_app = sub_app
variable = u_integral
user_object = layered_integral
[]
[pull_v]
type = MultiAppUserObjectTransfer
from_multi_app = sub_app
variable = v_average
user_object = layered_average
[]
[]
(modules/stochastic_tools/test/tests/surrogates/pod_rb/boundary/sub.i)
[Problem]
type = FEProblem
extra_tag_vectors = 'diff react bodyf dir_src dir_imp'
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 15
xmax = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = u
diffusivity = k
extra_vector_tags = 'diff'
[]
[reaction]
type = MaterialReaction
variable = u
coefficient = alpha
extra_vector_tags = 'react'
[]
[source]
type = BodyForce
variable = u
value = 1.0
extra_vector_tags = 'bodyf'
[]
[]
[Materials]
[k]
type = GenericConstantMaterial
prop_names = k
prop_values = 1.0
[]
[alpha]
type = GenericConstantMaterial
prop_names = alpha
prop_values = 1.0
[]
[]
[BCs]
[dummy_1]
type = DirichletBC
variable = u
boundary = left
value = 0
extra_vector_tags = 'dir_imp'
[]
[dummy_2]
type = DirichletBCModifier
variable = u
boundary = left
value = 1
extra_vector_tags = 'dir_src'
[]
[left]
type = DirichletBC
variable = u
boundary = left
value = 1
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
(test/tests/postprocessors/mms_slope/mms_slope_test.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[]
# do not use uniform refine, we are using adaptive refining
# uniform_refine = 6
[]
[Variables]
active = 'u'
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Functions]
active = 'forcing_func u_func'
[forcing_func]
type = ParsedFunction
expression = alpha*alpha*pi*pi*sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '4'
[]
[u_func]
type = ParsedGradFunction
expression = sin(alpha*pi*x)
grad_x = alpha*pi*sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '4'
[]
[]
[Kernels]
active = 'diff forcing'
[diff]
type = Diffusion
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = forcing_func
[]
[]
[BCs]
active = 'left right'
[left]
type = DirichletBC
variable = u
boundary = '3'
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = '1'
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-14
[Adaptivity]
# if the refine fraction is 1 it will refine every element
# remember < 1 means only refine that percentage of elements
refine_fraction = 1
steps = 6
# do not coarsen at all
coarsen_fraction = 0
# maximum level of refinement steps, make sure this is > max_r_steps
max_h_level = 10
# leave this as is
error_estimator = KellyErrorEstimator
[]
[]
# print l2 and h1 errors from the Postprocessors too so I can compare
[Postprocessors]
active = 'l2_error h1_error dofs'
# active = ' '
[l2_error]
type = ElementL2Error
variable = u
function = u_func
[]
[h1_error]
type = ElementH1Error
variable = u
function = u_func
[]
[dofs]
type = NumDOFs
[]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out
exodus = true
[]
(test/tests/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'
[]
[]
(test/tests/multiapps/restart/parent2.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
ymin = 0
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[Functions]
[v_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[]
[AuxVariables]
[v]
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[ufn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = v_fn
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
app_type = MooseTestApp
type = TransientMultiApp
input_files = 'sub2.i'
execute_on = timestep_end
positions = '0 -1 0'
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[]
[]
[Problem]
restart_file_base = parent_out_cp/0005
[]
(test/tests/outputs/debug/show_execution_kernels_bcs.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[left]
type = ParsedSubdomainMeshGenerator
input = 'gmg'
combinatorial_geometry = 'x < 0.5'
block_id = '2'
[]
[middle_boundary]
type = SideSetsBetweenSubdomainsGenerator
input = 'left'
primary_block = '0'
paired_block = '2'
new_boundary = 'middle'
[]
[]
[Functions]
[forcing_fnu]
type = ParsedFunction
expression = -5.8*(x+y)+x*x*x-x+y*y*y-y
[]
[forcing_fnv]
type = ParsedFunction
expression = -4
[]
[slnu]
type = ParsedGradFunction
expression = x*x*x-x+y*y*y-y
grad_x = 3*x*x-1
grad_y = 3*y*y-1
[]
[slnv]
type = ParsedGradFunction
expression = x*x+y*y
grad_x = 2*x
grad_y = 2*y
[]
# NeumannBC functions
[bc_fnut]
type = ParsedFunction
expression = 3*y*y-1
[]
[bc_fnub]
type = ParsedFunction
expression = -3*y*y+1
[]
[bc_fnul]
type = ParsedFunction
expression = -3*x*x+1
[]
[bc_fnur]
type = ParsedFunction
expression = 3*x*x-1
[]
[]
[Variables]
[u]
order = THIRD
family = HIERARCHIC
[]
[v]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
[]
[test1]
type = CoupledConvection
variable = u
velocity_vector = v
[]
[diff2]
type = Diffusion
variable = v
[]
[react]
type = Reaction
variable = u
[]
[forceu]
type = BodyForce
variable = u
function = forcing_fnu
[]
[forcev]
type = BodyForce
variable = v
function = forcing_fnv
[]
[]
[BCs]
[bc_v]
type = FunctionDirichletBC
variable = v
function = slnv
boundary = 'left right top bottom'
[]
[bc_u_tb]
type = CoupledKernelGradBC
variable = u
var2 = v
vel = '0.1 0.1'
boundary = 'top bottom left right'
[]
[bc_ul]
type = FunctionNeumannBC
variable = u
function = bc_fnul
boundary = 'left'
[]
[bc_ur]
type = FunctionNeumannBC
variable = u
function = bc_fnur
boundary = 'right'
[]
[bc_ut]
type = FunctionNeumannBC
variable = u
function = bc_fnut
boundary = 'top'
[]
[bc_ub]
type = FunctionNeumannBC
variable = u
function = bc_fnub
boundary = 'bottom'
[]
[]
[Dampers]
active = ''
[limit_v]
type = BoundingValueElementDamper
variable = v
max_value = 1.5
min_value = -20
[]
[limit_u]
type = BoundingValueElementDamper
variable = u
max_value = 1.5
min_value = -20
[]
[]
[InterfaceKernels]
[diff_ik_2]
type = InterfaceDiffusion
variable = 'u'
neighbor_var = 'v'
boundary = 'middle'
[]
[diff_ik_1]
type = InterfaceDiffusion
variable = 'v'
neighbor_var = 'u'
boundary = 'middle'
[]
[]
[DGKernels]
[diff_dg_2]
type = DGDiffusion
variable = 'u'
epsilon = -1
sigma = 6
[]
[diff_dg_1]
type = DGDiffusion
variable = 'u'
epsilon = -1
sigma = 6
[]
[]
[DiracKernels]
[source_2]
type = FunctionDiracSource
variable = 'u'
point = '0.1 0.1 0'
function = 'x + y'
[]
[source_1]
type = FunctionDiracSource
variable = 'u'
point = '0.1 0.1 0'
function = 'x + y'
block = '2'
[]
[source_0]
type = FunctionDiracSource
variable = 'u'
# in block 0, but since it's not block restricted it shows up as active in
# block 2 as well
point = '0.6 0.5 0'
function = 'x + y'
[]
[]
[Materials]
[diff]
type = GenericConstantMaterial
prop_names = 'D D_neighbor'
prop_values = '0 0'
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-15
nl_abs_tol = 1e-13
[]
[Debug]
show_execution_order = 'NONE ALWAYS INITIAL NONLINEAR LINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
[]
(test/tests/transfers/multiapp_high_order_variable_transfer/parent_L2_Lagrange.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Variables]
[power_density]
family = L2_LAGRANGE
order = FIRST
[]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2'
[]
[]
[Kernels]
[diff]
type = Reaction
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[Postprocessors]
[pwr_avg]
type = ElementAverageValue
block = '0'
variable = power_density
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = sub_L2_Lagrange.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[p_to_sub]
type = MultiAppShapeEvaluationTransfer
source_variable = power_density
variable = power_density
to_multi_app = sub
execute_on = 'timestep_end'
[]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(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
[]
[]
(test/tests/variables/fe_monomial_const/monomial-const-2d.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 100
ny = 100
elem_type = QUAD4
[]
[Functions]
[./bc_fn]
type=ParsedFunction
expression=0
[../]
[./bc_fnt]
type = ParsedFunction
expression = 0
[../]
[./bc_fnb]
type = ParsedFunction
expression = 0
[../]
[./bc_fnl]
type = ParsedFunction
expression = 0
[../]
[./bc_fnr]
type = ParsedFunction
expression = 0
[../]
[./forcing_fn]
# type = ParsedFunction
# expression = 0
type = MTPiecewiseConst2D
[../]
[./solution]
type = MTPiecewiseConst2D
[../]
[]
[Variables]
[./u]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
# Note: MOOSE's DirichletBCs do not work properly with shape functions that do not
# have DOFs at the element edges. This test works because the solution
# has been designed to be zero at the boundary which is satisfied by the IC
# Ticket #1352
active = ''
[./bc_all]
type=FunctionDirichletBC
variable = u
boundary = 'top bottom left right'
function = bc_fn
[../]
[./bc_top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = bc_fnt
[../]
[./bc_bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bc_fnb
[../]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1.e-10
[./Adaptivity]
[../]
[]
[Outputs]
execute_on = 'timestep_end'
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[]
(test/tests/auxkernels/mesh_integer/dg_mesh_integer.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 5
ny = 5
extra_element_integers = 'material_id'
[]
[set_material_id0]
type = SubdomainBoundingBoxGenerator
input = gmg
bottom_left = '0 0 0'
top_right = '0.8 0.6 0'
block_id = 0
location = INSIDE
integer_name = material_id
[]
[set_material_id1]
type = SubdomainBoundingBoxGenerator
input = set_material_id0
bottom_left = '0 0 0'
top_right = '0.8 0.6 0'
block_id = 1
location = OUTSIDE
integer_name = material_id
[]
[]
[Variables]
[u]
family = L2_LAGRANGE
order = FIRST
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = dc
[]
[timederivative]
type = TimeDerivative
variable = u
[]
[sourceterm]
type = BodyForce
variable = u
function = 1
[]
[]
[DGKernels]
[dg_diff]
type = DGDiffusion
variable = u
diff = dc
epsilon = -1
sigma = 6
[]
[]
[AuxVariables]
[id]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[id]
type = ElementIntegerAux
variable = id
integer_names = material_id
[]
[]
[BCs]
[vacuum]
type = VacuumBC
variable = u
boundary = 'right left top bottom'
[]
[]
[Materials]
[dc]
type = ConstantIDMaterial
prop_name = dc
prop_values = '1 2'
id_name = material_id
[]
[]
[Postprocessors]
[unorm]
type = ElementL2Norm
variable = u
[]
[]
[Executioner]
type = Transient
end_time = 0.1
dt = 0.01
nl_abs_tol = 1.e-15
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/postprocessors/num_adaptivity_cycles/num_adaptivity_cycles_toggle_adaptivity.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1
solve_type = 'PJFNK'
[]
[Adaptivity]
cycles_per_step = 1
marker = box
max_h_level = 2
initial_steps = 4
initial_marker = initial_box
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = dont_mark
type = BoxMarker
[../]
[./initial_box]
type = BoxMarker
bottom_left = '0.8 0.1 0'
top_right = '0.9 0.2 0'
inside = refine
outside = dont_mark
[../]
[../]
[]
[UserObjects]
[./toggle_adaptivity]
type = ToggleMeshAdaptivity
mesh_adaptivity = 'off'
[../]
[]
[Postprocessors]
[./adaptivity_cycles]
type = NumAdaptivityCycles
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
csv = true
[]
(modules/functional_expansion_tools/examples/2D_interface_no_material/main.i)
# Derived from the example '2D_interface' with the following differences:
#
# 1) No materials are used
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0.0
xmax = 0.4
nx = 6
ymin = 0.0
ymax = 10.0
ny = 20
[]
[Variables]
[./m]
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./source_m]
type = BodyForce
variable = m
value = 100
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
value = 2
variable = m
[../]
[]
[BCs]
[./interface_value]
type = FXValueBC
variable = m
boundary = right
function = FX_Basis_Value_Main
[../]
[./interface_flux]
type = FXFluxBC
boundary = right
variable = m
function = FX_Basis_Flux_Main
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '4'
physical_bounds = '0.0 10'
y = Legendre
[../]
[./FX_Basis_Flux_Main]
type = FunctionSeries
series_type = Cartesian
orders = '5'
physical_bounds = '0.0 10'
y = Legendre
[../]
[]
[UserObjects]
[./FX_Flux_UserObject_Main]
type = FXBoundaryFluxUserObject
function = FX_Basis_Flux_Main
variable = m
boundary = right
diffusivity = 0.1
[../]
[]
[Postprocessors]
[./average_interface_value]
type = SideAverageValue
variable = m
boundary = right
[../]
[./total_flux]
type = SideDiffusiveFluxIntegral
variable = m
boundary = right
diffusivity = 0.1
[../]
[./picard_iterations]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1.0
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
sub_cycling = true
[../]
[]
[Transfers]
[./FluxToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Flux_UserObject_Main
multi_app_object_name = FX_Basis_Flux_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[./FluxToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Flux_Main
multi_app_object_name = FX_Flux_UserObject_Sub
[../]
[]
(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
[]
(test/tests/multiapps/restart_multilevel/subsub.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 1
nx = 10
[]
[Functions]
[./u_fn]
type = ParsedFunction
expression = t*x
[../]
[./ffn]
type = ParsedFunction
expression = x
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[./fn]
type = BodyForce
variable = u
function = ffn
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = FunctionDirichletBC
variable = u
boundary = right
function = u_fn
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(modules/xfem/test/tests/moving_interface/verification/1D_rz_lsdep1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: quasi-1D
# Coordinate System: rz
# Material Numbers/Types: level set dep 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# A simple transient heat transfer problem in cylindrical coordinates designed
# with the Method of Manufactured Solutions. This problem was developed to
# verify XFEM performance in the presence of a moving interface for linear
# element models that can be exactly evaluated by FEM/Moose. Both the
# temperature solution and level set function are designed to be linear to
# attempt to minimize error between the Moose/exact solution and XFEM results.
# Thermal conductivity is dependent upon the value of the level set function
# at each timestep.
# Results:
# The temperature at the left boundary (x=1) exhibits the largest difference
# between the FEM/Moose solution and XFEM results. We present the XFEM
# results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 480.0008131
# 0.6 520 520.0038333
# 0.8 560 560.0088286
# 1.0 600 600.0131612
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 1
xmin = 1.0
xmax = 2.0
ymin = 0.0
ymax = 0.5
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-200*x+400) + (1/x)*(310*t - (10/1.02)*x*t - (1/1.02)*t^2)'
[../]
[./neumann_func]
type = ParsedFunction
expression = '((0.05/2.04)*(2.04-x-0.2*t) + 1.5)*200*t'
[../]
[./k_func]
type = ParsedFunction
expression = '(0.05/2.04)*(2.04-x-0.2*t) + 1.5'
[../]
[./ls_func]
type = ParsedFunction
expression = '2.04 - x -0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericFunctionMaterial
prop_names = 'diffusion_coefficient'
prop_values = 'k_func'
[../]
[]
[BCs]
[./left_u]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 'right'
value = 400
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/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/stochastic_tools/test/tests/surrogates/cross_validation/sub_vector.i)
L = 1
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 100
xmax = ${L}
elem_type = EDGE3
[]
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 10000
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 2.0
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 300
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[VectorPostprocessors]
[T_vec]
type = LineValueSampler
variable = T
start_point = '0 0 0'
end_point = '${L} 0 0'
num_points = 10
sort_by = x
[]
[]
(test/tests/mortar/continuity-2d-non-conforming/soln-continuity-pg.i)
[Mesh]
second_order = false
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[]
[secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[]
[]
[Variables]
[T]
block = '1 2'
order = FIRST
[]
[lambda]
block = '10'
order = FIRST
use_dual = true
[]
[]
[AuxVariables]
[aux_lm]
block = '10'
order = FIRST
use_dual = false
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln
variable = T
boundary = '3 4 5 6 7 8'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = '-4 + x^2 + y^2'
[]
[exact_soln]
type = ParsedFunction
expression = 'x^2 + y^2'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
use_petrov_galerkin = true
aux_lm = aux_lm
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
exodus = true
[]
(test/tests/outputs/variables/show_single_vars.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
# This test uses ElementalVariableValue postprocessors on specific
# elements, so element numbering needs to stay unchanged
allow_renumbering = false
[]
[Functions]
[./ffn]
type = ParsedFunction
expression = -4
[../]
[./exactfn]
type = ParsedFunction
expression = x*x+y*y
[../]
[./aux_exact_fn]
type = ParsedFunction
expression = t*(x*x+y*y)
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = ffn
[../]
[]
[AuxVariables]
[./aux_u]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./a]
type = FunctionAux
variable = aux_u
function = aux_exact_fn
[../]
[]
[BCs]
[./left]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exactfn
[../]
[]
[Postprocessors]
[./elem_56]
type = ElementalVariableValue
variable = u
elementid = 56
[../]
[./aux_elem_99]
type = ElementalVariableValue
variable = aux_u
elementid = 99
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.01
start_time = 0
num_steps = 1
[]
[Outputs]
exodus = true
show = 'aux_u'
[]
(test/tests/variables/fe_monomial_const/monomial-const-3d.i)
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
nx = 21
ny = 21
nz = 21
elem_type = HEX8
[]
[Functions]
[./bc_fn]
type=ParsedFunction
expression=0
[../]
[./bc_fnt]
type = ParsedFunction
expression = 0
[../]
[./bc_fnb]
type = ParsedFunction
expression = 0
[../]
[./bc_fnl]
type = ParsedFunction
expression = 0
[../]
[./bc_fnr]
type = ParsedFunction
expression = 0
[../]
[./forcing_fn]
# type = ParsedFunction
# expression = 0
type = MTPiecewiseConst3D
[../]
[./solution]
type = MTPiecewiseConst3D
[../]
[]
[Variables]
[./u]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
# Note: MOOSE's DirichletBCs do not work properly with shape functions that do not
# have DOFs at the element edges. This test works because the solution
# has been designed to be zero at the boundary which is satisfied by the IC
# Ticket #1352
active = ''
[./bc_all]
type=FunctionDirichletBC
variable = u
boundary = 'top bottom left right'
function = bc_fn
[../]
[./bc_top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = bc_fnt
[../]
[./bc_bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bc_fnb
[../]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1.e-9
[./Adaptivity]
[../]
[]
[Outputs]
execute_on = 'timestep_end'
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[]
(modules/stochastic_tools/test/tests/reporters/mapping/map_sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmax = 10
[]
[Variables]
[u]
[]
[v]
[]
[]
[Kernels]
[diffusion_u]
type = MatDiffusion
variable = u
diffusivity = D_u
[]
[source_u]
type = BodyForce
variable = u
value = 1.0
[]
[diffusion_v]
type = MatDiffusion
variable = v
diffusivity = D_v
[]
[source_v]
type = BodyForce
variable = v
value = 1.0
[]
[]
[Materials]
[diffusivity_u]
type = GenericConstantMaterial
prop_names = D_u
prop_values = 2.0
[]
[diffusivity_v]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 4.0
[]
[]
[BCs]
[left_u]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right_u]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[VariableMappings]
inactive = pod
[pod]
type = PODMapping
filename = "map_training_data_pod_mapping.rd"
num_modes_to_compute = '5 5'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Reporters]
inactive = "pod_coeffs"
[solution_storage]
type = SolutionContainer
execute_on = 'FINAL'
[]
[pod_coeffs]
type = MappingReporter
mapping = pod
variables = "u v"
[]
[]
(test/tests/variables/fe_hier/hier-3-2d.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 5
ny = 5
elem_type = QUAD9
[]
[Functions]
[./bc_fnt]
type = ParsedFunction
expression = 3*y*y
[../]
[./bc_fnb]
type = ParsedFunction
expression = -3*y*y
[../]
[./bc_fnl]
type = ParsedFunction
expression = -3*x*x
[../]
[./bc_fnr]
type = ParsedFunction
expression = 3*x*x
[../]
[./forcing_fn]
type = ParsedFunction
expression = -6*x-6*y+(x*x*x)+(y*y*y)
[../]
[./solution]
type = ParsedGradFunction
expression = (x*x*x)+(y*y*y)
grad_x = 3*x*x
grad_y = 3*y*y
[../]
[]
[Variables]
[./u]
order = THIRD
family = HIERARCHIC
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./bc_top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = bc_fnt
[../]
[./bc_bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bc_fnb
[../]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/mesh/named_entities/named_entities_test.i)
[Mesh]
file = named_entities.e
uniform_refine = 1
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
block = '1 center_block 3'
[./InitialCondition]
type = ConstantIC
value = 20
block = 'center_block 3'
[../]
[../]
[]
[AuxVariables]
[./reporter]
order = CONSTANT
family = MONOMIAL
block = 'left_block 3'
[../]
[]
[ICs]
[./reporter_ic]
type = ConstantIC
variable = reporter
value = 10
[../]
[]
[Kernels]
active = 'diff body_force'
[./diff]
type = Diffusion
variable = u
# Note we are using both names and numbers here
block = 'left_block 2 right_block'
[../]
[./body_force]
type = BodyForce
variable = u
block = 'center_block'
value = 10
[../]
[]
[AuxKernels]
[./hardness]
type = MaterialRealAux
variable = reporter
property = 'hardness'
block = 'left_block 3'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left_side'
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 'right_side'
value = 1
[../]
[]
[Postprocessors]
[./elem_average]
type = ElementAverageValue
variable = u
block = 'center_block'
execute_on = 'initial timestep_end'
[../]
[./side_average]
type = SideAverageValue
variable = u
boundary = 'right_side'
execute_on = 'initial timestep_end'
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'hardness'
prop_values = 10
block = '1 right_block'
[../]
[./empty]
type = MTMaterial
block = 'center_block'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(test/tests/bcs/nodal_normals/cylinder_hexes.i)
[Mesh]
file = cylinder-hexes.e
[]
[Functions]
[./all_bc_fn]
type = ParsedFunction
expression = x*x+y*y
[../]
[./f_fn]
type = ParsedFunction
expression = -4
[../]
[]
[NodalNormals]
boundary = '1'
corner_boundary = 100
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = f_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = 'all_bc_fn'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-13
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/heat_transfer/test/tests/recover/recover.i)
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
file = recover_in.e
[]
[Variables]
[./temp]
initial_condition = 580.0
[../]
[]
[AuxVariables]
[./gap_cond]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[./heat_source]
type = BodyForce
variable = temp
block = pellet_type_1
value = 1e3
function = 't'
[../]
[]
[ThermalContact]
[./thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 5
secondary = 10
emissivity_primary = 0
emissivity_secondary = 0
quadrature = true
[../]
[]
[BCs]
[./outside]
type = DirichletBC
value = 580
boundary = '1 2 3'
variable = temp
[../]
[./edge]
type = DirichletBC
value = 700
boundary = 10
variable = temp
[../]
[]
[Materials]
[./thermal_3]
type = HeatConductionMaterial
block = 3
thermal_conductivity = 5
specific_heat = 12
[../]
[./thermal_1]
type = HeatConductionMaterial
block = 1
thermal_conductivity = 16.0
specific_heat = 330.0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu superlu_dist'
nl_rel_tol = 1e-9
nl_abs_tol = 1e-11
start_time = -200
n_startup_steps = 1
end_time = 1.02e5
num_steps = 10
dtmax = 2e6
dtmin = 1
[./TimeStepper]
type = IterationAdaptiveDT
dt = 2.0e2
optimal_iterations = 15
iteration_window = 2
[../]
[./Quadrature]
order = FIFTH
side_order = SEVENTH
[../]
[]
[Postprocessors]
[./ave_temp_interior]
type = SideAverageValue
boundary = 9
variable = temp
execute_on = 'initial linear'
[../]
[./avg_clad_temp]
type = SideAverageValue
boundary = 7
variable = temp
execute_on = 'initial timestep_end'
[../]
[./flux_from_clad]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 5
diffusivity = thermal_conductivity
[../]
[./_dt]
type = TimestepSize
[../]
[]
[Outputs]
exodus = true
[]
(modules/stochastic_tools/test/tests/surrogates/poly_chaos/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = u
diffusivity = D
[]
[absorption]
type = MaterialReaction
variable = u
coefficient = sig
[]
[source]
type = BodyForce
variable = u
value = 1.0
[]
[]
[Materials]
[diffusivity]
type = GenericConstantMaterial
prop_names = D
prop_values = 2.0
[]
[xs]
type = GenericConstantMaterial
prop_names = sig
prop_values = 2.0
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Postprocessors]
[avg]
type = AverageNodalVariableValue
variable = u
[]
[max]
type = NodalExtremeValue
variable = u
value_type = max
[]
[]
(test/tests/dampers/min_damping/min_elem_damping.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./u_dt]
type = TimeDerivative
variable = u
[../]
[./u_source]
type = BodyForce
variable = u
value = 1
[../]
[]
[BCs]
[./u_left]
type = DirichletBC
boundary = left
variable = u
value = 0.0
[../]
[]
[Dampers]
[./limit]
type = BoundingValueElementDamper
variable = u
max_value = 1.5
min_value = -1.5
min_damping = 0.001
[../]
[]
[Executioner]
type = Transient
num_steps = 2
[]
[Postprocessors]
[./u_avg]
type = ElementAverageValue
variable = u
[../]
[./dt]
type = TimestepSize
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/mms/pspg/pspg_mms_test.i)
mu=1.5
rho=2.5
[GlobalParams]
gravity = '0 0 0'
pspg = true
convective_term = true
integrate_p_by_parts = true
laplace = true
u = vel_x
v = vel_y
pressure = p
alpha = 1e-6
order = FIRST
family = LAGRANGE
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
elem_type = QUAD9
nx = 4
ny = 4
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./vel_x]
[../]
[./vel_y]
[../]
[./p]
[../]
[]
[Kernels]
# mass
[./mass]
type = INSMass
variable = p
x_vel_forcing_func = vel_x_source_func
y_vel_forcing_func = vel_y_source_func
[../]
# x-momentum, space
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
component = 0
forcing_func = vel_x_source_func
[../]
# y-momentum, space
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
component = 1
forcing_func = vel_y_source_func
[../]
[./p_source]
type = BodyForce
function = p_source_func
variable = p
[../]
[]
[BCs]
[./vel_x]
type = FunctionDirichletBC
boundary = 'left right top bottom'
function = vel_x_func
variable = vel_x
[../]
[./vel_y]
type = FunctionDirichletBC
boundary = 'left right top bottom'
function = vel_y_func
variable = vel_y
[../]
[./p]
type = FunctionDirichletBC
boundary = 'left right top bottom'
function = p_func
variable = p
[../]
[]
[Functions]
[./vel_x_source_func]
type = ParsedFunction
expression = '-${mu}*(-0.028*pi^2*x^2*sin(0.2*pi*x*y) - 0.028*pi^2*y^2*sin(0.2*pi*x*y) - 0.1*pi^2*sin(0.5*pi*x) - 0.4*pi^2*sin(pi*y)) + ${rho}*(0.14*pi*x*cos(0.2*pi*x*y) + 0.4*pi*cos(pi*y))*(0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3) + ${rho}*(0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x))*(0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5) + 0.1*pi*y*cos(0.2*pi*x*y) + 0.25*pi*cos(0.5*pi*x)'
[../]
[./vel_y_source_func]
type = ParsedFunction
expression = '-${mu}*(-0.018*pi^2*x^2*sin(0.3*pi*x*y) - 0.018*pi^2*y^2*sin(0.3*pi*x*y) - 0.384*pi^2*sin(0.8*pi*x) - 0.027*pi^2*sin(0.3*pi*y)) + ${rho}*(0.06*pi*x*cos(0.3*pi*x*y) + 0.09*pi*cos(0.3*pi*y))*(0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3) + ${rho}*(0.06*pi*y*cos(0.3*pi*x*y) + 0.48*pi*cos(0.8*pi*x))*(0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5) + 0.1*pi*x*cos(0.2*pi*x*y) + 0.3*pi*cos(0.3*pi*y)'
[../]
[./p_source_func]
type = ParsedFunction
expression = '-0.06*pi*x*cos(0.3*pi*x*y) - 0.14*pi*y*cos(0.2*pi*x*y) - 0.2*pi*cos(0.5*pi*x) - 0.09*pi*cos(0.3*pi*y)'
[../]
[./vel_x_func]
type = ParsedFunction
expression = '0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5'
[../]
[./vel_y_func]
type = ParsedFunction
expression = '0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3'
[../]
[./p_func]
type = ParsedFunction
expression = '0.5*sin(0.5*pi*x) + 1.0*sin(0.3*pi*y) + 0.5*sin(0.2*pi*x*y) + 0.5'
[../]
[./vxx_func]
type = ParsedFunction
expression = '0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x)'
[../]
[./px_func]
type = ParsedFunction
expression = '0.1*pi*y*cos(0.2*pi*x*y) + 0.25*pi*cos(0.5*pi*x)'
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
[./exodus]
type = Exodus
[../]
[./csv]
type = CSV
[../]
[]
[Postprocessors]
[./L2vel_x]
type = ElementL2Error
variable = vel_x
function = vel_x_func
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2vel_y]
variable = vel_y
function = vel_y_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2p]
variable = p
function = p_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2vxx]
variable = vxx
function = vxx_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2px]
variable = px
function = px_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[]
[AuxVariables]
[./vxx]
family = MONOMIAL
order = FIRST
[../]
[./px]
family = MONOMIAL
order = FIRST
[../]
[]
[AuxKernels]
[./vxx]
type = VariableGradientComponent
component = x
variable = vxx
gradient_variable = vel_x
[../]
[./px]
type = VariableGradientComponent
component = x
variable = px
gradient_variable = p
[../]
[]
(test/tests/auxkernels/function_scalar_aux/function_scalar_aux.i)
#
# Testing a solution that is second order in space and first order in time
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[AuxVariables]
[./x]
family = SCALAR
order = FIRST
[../]
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = ((x*x)+(y*y))-(4*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[./x_fn]
type = ParsedFunction
expression = t
[../]
[]
[AuxScalarKernels]
[./x_saux]
type = FunctionScalarAux
variable = x
function = x_fn
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.25
[]
[Outputs]
exodus = true
[]
(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/navier_stokes/test/tests/finite_element/ins/mms/supg/supg_mms_test.i)
mu=1.5
rho=2.5
[GlobalParams]
gravity = '0 0 0'
supg = true
convective_term = true
integrate_p_by_parts = false
laplace = true
u = vel_x
v = vel_y
pressure = p
alpha = 1
order = SECOND
family = LAGRANGE
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
elem_type = QUAD9
nx = 4
ny = 4
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./vel_x]
[../]
[./vel_y]
[../]
[./p]
order = FIRST
[../]
[]
[Kernels]
# mass
[./mass]
type = INSMass
variable = p
[../]
# x-momentum, space
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
component = 0
forcing_func = vel_x_source_func
[../]
# y-momentum, space
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
component = 1
forcing_func = vel_y_source_func
[../]
[./p_source]
type = BodyForce
function = p_source_func
variable = p
[../]
[]
[BCs]
[./vel_x]
type = FunctionDirichletBC
preset = false
boundary = 'left right top bottom'
function = vel_x_func
variable = vel_x
[../]
[./vel_y]
type = FunctionDirichletBC
preset = false
boundary = 'left right top bottom'
function = vel_y_func
variable = vel_y
[../]
[./p]
type = FunctionDirichletBC
preset = false
boundary = 'left right top bottom'
function = p_func
variable = p
[../]
[]
[Functions]
[./vel_x_source_func]
type = ParsedFunction
expression = '-${mu}*(-0.028*pi^2*x^2*sin(0.2*pi*x*y) - 0.028*pi^2*y^2*sin(0.2*pi*x*y) - 0.1*pi^2*sin(0.5*pi*x) - 0.4*pi^2*sin(pi*y)) + ${rho}*(0.14*pi*x*cos(0.2*pi*x*y) + 0.4*pi*cos(pi*y))*(0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3) + ${rho}*(0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x))*(0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5) + 0.1*pi*y*cos(0.2*pi*x*y) + 0.25*pi*cos(0.5*pi*x)'
[../]
[./vel_y_source_func]
type = ParsedFunction
expression = '-${mu}*(-0.018*pi^2*x^2*sin(0.3*pi*x*y) - 0.018*pi^2*y^2*sin(0.3*pi*x*y) - 0.384*pi^2*sin(0.8*pi*x) - 0.027*pi^2*sin(0.3*pi*y)) + ${rho}*(0.06*pi*x*cos(0.3*pi*x*y) + 0.09*pi*cos(0.3*pi*y))*(0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3) + ${rho}*(0.06*pi*y*cos(0.3*pi*x*y) + 0.48*pi*cos(0.8*pi*x))*(0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5) + 0.1*pi*x*cos(0.2*pi*x*y) + 0.3*pi*cos(0.3*pi*y)'
[../]
[./p_source_func]
type = ParsedFunction
expression = '-0.06*pi*x*cos(0.3*pi*x*y) - 0.14*pi*y*cos(0.2*pi*x*y) - 0.2*pi*cos(0.5*pi*x) - 0.09*pi*cos(0.3*pi*y)'
[../]
[./vel_x_func]
type = ParsedFunction
expression = '0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5'
[../]
[./vel_y_func]
type = ParsedFunction
expression = '0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3'
[../]
[./p_func]
type = ParsedFunction
expression = '0.5*sin(0.5*pi*x) + 1.0*sin(0.3*pi*y) + 0.5*sin(0.2*pi*x*y) + 0.5'
[../]
[./vxx_func]
type = ParsedFunction
expression = '0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x)'
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
[./exodus]
type = Exodus
[../]
[./csv]
type = CSV
[../]
[]
[Postprocessors]
[./L2vel_x]
type = ElementL2Error
variable = vel_x
function = vel_x_func
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2vel_y]
variable = vel_y
function = vel_y_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2p]
variable = p
function = p_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2vxx]
variable = vxx
function = vxx_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[]
[AuxVariables]
[./vxx]
family = MONOMIAL
order = FIRST
[../]
[]
[AuxKernels]
[./vxx]
type = VariableGradientComponent
component = x
variable = vxx
gradient_variable = vel_x
[../]
[]
(test/tests/postprocessors/element_h1_error_pps/element_h1_error_pp_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 3
xmin = 0
xmax = 2
ymin = 0
ymax = 2
[]
[Variables]
active = 'u'
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Functions]
active = 'forcing_func u_func'
[forcing_func]
type = ParsedFunction
expression = alpha*alpha*pi*pi*sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '4'
[]
[u_func]
type = ParsedGradFunction
expression = sin(alpha*pi*x)
grad_x = alpha*pi*cos(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '4'
[]
[]
[Kernels]
active = 'diff forcing'
[diff]
type = Diffusion
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = forcing_func
[]
[]
[BCs]
active = 'left right'
[left]
type = DirichletBC
variable = u
boundary = '1'
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = '3'
value = 0
[]
[]
[Executioner]
type = Steady
[Adaptivity]
refine_fraction = 1.0
coarsen_fraction = 0.0
max_h_level = 10
steps = 4
[]
[]
[Postprocessors]
[dofs]
type = NumDOFs
execute_on = 'initial timestep_end'
[]
[h1_error]
type = ElementH1Error
variable = u
function = u_func
execute_on = 'initial timestep_end'
[]
[h1_semi]
type = ElementH1SemiError
variable = u
function = u_func
execute_on = 'initial timestep_end'
[]
[l2_error]
type = ElementL2Error
variable = u
function = u_func
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
file_base = out
exodus = false
csv = true
[]
(test/tests/outputs/oversample/over_sampling_test_file.i)
[Mesh]
type = FileMesh
file = square_3x3.e
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[./forcing_fn]
type = ParsedFunction
expression = -4+(x*x+y*y)
[../]
[]
[Variables]
active = 'u'
[./u]
order = THIRD
family = HERMITE
[../]
[]
[Kernels]
active = 'ie diff ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '1 2 3 4'
function = exact_fn
[../]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.2
start_time = 0
num_steps = 5
[]
[Outputs]
file_base = out_file
exodus = true
[./oversampling]
file_base = out_file_oversample
type = Exodus
refinements = 3
[../]
[]
(modules/optimization/test/tests/optimizationreporter/constant_heat_source/forward_nonLinear.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 2
ymax = 2
[]
[Variables]
[T]
initial_condition = 100
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = T
diffusivity = thermal_conductivity
[]
[heat_source]
type = BodyForce
function = volumetric_heat_func
variable = T
[]
[]
[BCs]
[left]
type = NeumannBC
variable = T
boundary = left
value = 0
[]
[right]
type = NeumannBC
variable = T
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = T
boundary = bottom
value = 200
[]
[top]
type = DirichletBC
variable = T
boundary = top
value = 100
[]
[]
[Functions]
[volumetric_heat_func]
type = ParsedOptimizationFunction
expression = q
param_symbol_names = 'q'
param_vector_name = 'params/q'
[]
[]
[Materials]
[steel]
type = ParsedMaterial
f_name = 'thermal_conductivity'
function = '.01*T'
args = 'T'
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'preonly lu superlu_dist'
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = T
[]
[params]
type = ConstantReporter
real_vector_names = 'q'
real_vector_values = '0' # Dummy value
[]
[]
[Outputs]
console = false
file_base = 'forward_nl'
[]
(test/tests/dgkernels/hfem/hfem_jacobian.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
elem_type = QUAD9 # SIDE_HIERARCHIC needs side nodes
nx = 3
ny = 3
dim = 2
[]
[]
[Variables]
[u]
order = FOURTH
family = MONOMIAL
[]
[lambda]
family = SIDE_HIERARCHIC
order = FIRST
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
[]
[source]
type = BodyForce
variable = u
value = '1'
[]
[]
[DGKernels]
[testjumps]
type = HFEMTestJump
variable = u
side_variable = lambda
[]
[trialjumps]
type = HFEMTrialJump
variable = lambda
interior_variable = u
[]
[]
[BCs]
[u_robin]
type = VacuumBC
boundary = 'left right top bottom'
variable = u
[]
[lambda_D_unused]
type = PenaltyDirichletBC
boundary = 'left right top bottom'
variable = lambda
penalty = 1
[]
[]
[Postprocessors]
[intu]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[]
[lambdanorm]
type = ElementSidesL2Norm
variable = lambda
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
(test/tests/interfacekernels/2d_interface/coupled_value_coupled_flux_dot.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./break_boundary]
input = interface
type = BreakBoundaryOnSubdomainGenerator
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./v]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 2
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 4
block = 1
[../]
[./source_u]
type = BodyForce
variable = u
function = 0.1*t
[../]
[]
[InterfaceKernels]
[./interface]
type = PenaltyInterfaceDiffusionDot
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 right top'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1'
[../]
[]
[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 = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu superlu_dist '
dt = 0.1
num_steps = 10
dtmin = 0.1
line_search = none
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
(modules/porous_flow/test/tests/mass_conservation/mass03.i)
# checking that the mass postprocessor correctly calculates the mass
# 1phase, 1component, constant porosity, with a constant fluid source
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
initial_condition = -0.5
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pp
[]
[source]
type = BodyForce
variable = pp
value = 0.1 # kg/m^3/s
[]
[]
[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]
[porepressure]
type = PointValue
point = '0 0 0'
variable = pp
execute_on = 'initial timestep_end'
[]
[total_mass]
type = PorousFlowFluidMass
execute_on = 'initial timestep_end'
[]
[]
[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-12 1E-20 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 10
[]
[Outputs]
execute_on = 'initial timestep_end'
file_base = mass03
csv = 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/porous_flow/test/tests/energy_conservation/heat04_fullysat_action.i)
# heat04, but using an action
#
# The sample is a single unit element, with fixed displacements on
# all sides. A heat source of strength S (J/m^3/s) is applied into
# the element. There is no fluid flow or heat flow. The rise
# in temperature, porepressure and stress, and the change in porosity is
# matched with theory.
#
# In this case, fluid mass must be conserved, and there is no
# volumetric strain, so
# porosity * fluid_density = constant
# Also, the energy-density in the rock-fluid system increases with S:
# d/dt [(1 - porosity) * rock_density * rock_heat_cap * T + porosity * fluid_density * fluid_heat_cap * T] = S
# Also, the porosity evolves according to THM as
# porosity = biot + (porosity0 - biot) * exp( (biot - 1) * P / fluid_bulk + rock_thermal_exp * T)
# Finally, the effective stress must be exactly zero (as there is
# no strain).
#
# Let us assume that
# fluid_density = dens0 * exp(P / fluid_bulk - fluid_thermal_exp * T)
# Then the conservation of fluid mass means
# porosity = por0 * exp(- P / fluid_bulk + fluid_thermal_exp * T)
# where dens0 * por0 = the initial fluid mass.
# The last expression for porosity, combined with the THM one,
# and assuming that biot = 1 for simplicity, gives
# porosity = 1 + (porosity0 - 1) * exp(rock_thermal_exp * T) = por0 * exp(- P / fluid_bulk + fluid_thermal_exp * T) .... (A)
#
# This stuff may be substituted into the heat energy-density equation:
# S = d/dt [(1 - porosity0) * exp(rock_thermal_exp * T) * rock_density * rock_heat_cap * T + porosity * fluid_density * fluid_heat_cap * T]
#
# If S is constant then
# S * t = (1 - porosity0) * exp(rock_thermal_exp * T) * rock_density * rock_heat_cap * T + porosity * fluid_density * fluid_heat_cap * T
# with T(t=0) = 0 then Eqn(A) implies that por0 = porosity0 and
# P / fluid_bulk = fluid_thermal_exp * T - log(1 + (por0 - 1) * exp(rock_thermal_exp * T)) + log(por0)
#
# Parameters:
# A = 2
# fluid_bulk = 2.0
# dens0 = 3.0
# fluid_thermal_exp = 0.5
# fluid_heat_cap = 2
# por0 = 0.5
# rock_thermal_exp = 0.25
# rock_density = 5
# rock_heat_capacity = 0.2
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.5
cv = 2
cp = 2
bulk_modulus = 2.0
density0 = 3.0
[]
[]
[PorousFlowFullySaturated]
coupling_type = ThermoHydroMechanical
displacements = 'disp_x disp_y disp_z'
porepressure = pp
temperature = temp
dictator_name = Sir
biot_coefficient = 1.0
gravity = '0 0 0'
fp = the_simple_fluid
stabilization = none
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = Sir
block = 0
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[pp]
[]
[temp]
[]
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[]
[]
[Kernels]
[heat_source]
type = BodyForce
function = 1
variable = temp
[]
[]
[Functions]
[err_T_fcn]
type = ParsedFunction
symbol_names = 'por0 rte temp rd rhc m0 fhc source'
symbol_values = '0.5 0.25 t0 5 0.2 1.5 2 1'
expression = '((1-por0)*exp(rte*temp)*rd*rhc*temp+m0*fhc*temp-source*t)/(source*t)'
[]
[err_pp_fcn]
type = ParsedFunction
symbol_names = 'por0 rte temp rd rhc m0 fhc source bulk pp fte'
symbol_values = '0.5 0.25 t0 5 0.2 1.5 2 1 2 p0 0.5'
expression = '(bulk*(fte*temp-log(1+(por0-1)*exp(rte*temp))+log(por0))-pp)/pp'
[]
[]
[AuxVariables]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = ComputeLinearElasticStress
[]
[porosity]
type = PorousFlowPorosity
thermal = true
fluid = true
mechanical = true
ensure_positive = false
biot_coefficient = 1.0
porosity_zero = 0.5
thermal_expansion_coeff = 0.25
solid_bulk = 2
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 0.2
density = 5.0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0 0 0 0 0 0 0 0 0'
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0 0 0 0 0 0 0 0 0'
[]
[]
[Postprocessors]
[p0]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = pp
[]
[t0]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = temp
[]
[porosity]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = porosity
[]
[stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[]
[stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[]
[stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[]
[fluid_mass]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'timestep_end'
outputs = 'console csv'
[]
[total_heat]
type = PorousFlowHeatEnergy
phase = 0
execute_on = 'timestep_end'
outputs = 'console csv'
[]
[err_T]
type = FunctionValuePostprocessor
function = err_T_fcn
[]
[err_P]
type = FunctionValuePostprocessor
function = err_pp_fcn
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-12 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 5
[]
[Outputs]
execute_on = 'initial timestep_end'
file_base = heat04_fullysat_action
csv = true
[]
(test/tests/kernels/diffusion_with_hanging_node/ad_simple_diffusion.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 1
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = ADDiffusion
variable = u
[../]
[force]
type = ADBodyForce
variable = u
function = '0'
[]
[]
[BCs]
# BCs cannot be preset due to Jacobian test
[./left]
type = DirichletBC
preset = false
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
preset = false
variable = u
boundary = right
value = 1
[../]
[]
[Preconditioning]
[./pre]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options = '-pc_svd_monitor'
petsc_options_iname = '-pc_type'
petsc_options_value = 'svd'
[]
[Outputs]
exodus = true
[]
[Adaptivity]
marker = box
max_h_level = 1
initial_steps = 1
[./Markers]
[./box]
type = BoxMarker
bottom_left = '0.5 0 0'
top_right = '1 1 0'
inside = 'refine'
outside = 'do_nothing'
[../]
[../]
[]
(python/peacock/tests/common/transient.i)
###########################################################
# This is a simple test with a time-dependent problem
# demonstrating the use of a "Transient" Executioner.
#
# @Requirement F1.10
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./dt]
type = TimestepSize
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
# Preconditioned JFNK (default)
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_transient
exodus = true
[]
(test/tests/actions/meta_action_multiple_tasks/circle_quads.i)
[Mesh]
file = circle-quads.e
[]
[Functions]
[./all_bc_fn]
type = ParsedFunction
expression = x*x+y*y
[../]
[./f_fn]
type = ParsedFunction
expression = -4
[../]
[./analytical_normal_x]
type = ParsedFunction
expression = x
[../]
[./analytical_normal_y]
type = ParsedFunction
expression = y
[../]
[]
# An Action that adds an Action that satisfies multiple tasks!
[MetaNodalNormals]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = f_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = 'all_bc_fn'
[../]
[]
[Postprocessors]
[./nx_pps]
type = NodalL2Error
variable = nodal_normal_x
boundary = '1'
function = analytical_normal_x
[../]
[./ny_pps]
type = NodalL2Error
variable = nodal_normal_y
boundary = '1'
function = analytical_normal_y
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-13
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/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
[]
[]
(test/tests/executioners/executioner/steady_state_check_test.i)
#
# Run transient simulation into steady state
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Variables]
active = 'u'
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
# expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
expression = -4
[../]
[./exact_fn]
type = ParsedFunction
# expression = t*t*t*((x*x)+(y*y))
expression = ((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
solve_type = 'PJFNK'
nl_abs_tol = 1e-14
start_time = 0.0
num_steps = 12
dt = 1
steady_state_detection = true
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_ss_check
exodus = true
[]
(test/tests/materials/functor_properties/bc/bc.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[v][]
[]
[Kernels]
[diff]
type = FunctorMatDiffusion
variable = v
diffusivity = 1
[]
[source]
type = BodyForce
variable = v
function = 'x + y'
[]
[]
[BCs]
[bounds]
type = MatPropBC
variable = v
boundary = 'left right top bottom'
mat_prop = 'prop'
[]
[]
[Materials]
[functor]
type = ADGenericFunctorMaterial
prop_names = 'prop'
prop_values = 'v'
execute_on = 'LINEAR NONLINEAR'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
[]
(tutorials/tutorial02_multiapps/step01_multiapps/05_parent_parallel.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 40
ny = 40
nz = 40
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = 1.
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
perf_graph = true
[]
[MultiApps]
[sub_app]
type = TransientMultiApp
positions = '0 0 0 1 0 0 2 0 0'
input_files = '05_sub_parallel.i'
[]
[]
(tutorials/tutorial02_multiapps/step01_multiapps/06_parent_twoapps.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 40
ny = 40
nz = 40
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = 1.
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
perf_graph = true
[]
[MultiApps]
[app1]
type = TransientMultiApp
positions = '0 0 0 1 0 0 2 0 0'
input_files = '06_sub_twoapps.i'
[]
[app2]
type = TransientMultiApp
positions = '0 0 0 1 0 0'
input_files = '06_sub_twoapps.i'
[]
[]
(modules/stochastic_tools/test/tests/variablemappings/pod_mapping/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 6
xmax = 6
[]
[Variables]
[v]
[]
[]
[Kernels]
[diffusion_v]
type = MatDiffusion
variable = v
diffusivity = D_v
[]
[source_v]
type = BodyForce
variable = v
value = 1.0
[]
[]
[Materials]
[diffusivity_v]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 4.0
[]
[]
[BCs]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Reporters]
[solution_storage]
type = SolutionContainer
execute_on = 'FINAL'
[]
[]
(test/tests/kernels/ode/ode_sys_impl_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[]
[Functions]
[./f_fn]
type = ParsedFunction
expression = -4
[../]
[./bc_all_fn]
type = ParsedFunction
expression = x*x+y*y
[../]
# ODEs
[./exact_x_fn]
type = ParsedFunction
expression = (-1/3)*exp(-t)+(4/3)*exp(5*t)
[../]
[]
# NL
[Variables]
[./u]
family = LAGRANGE
order = FIRST
[../]
# ODE variables
[./x]
family = SCALAR
order = FIRST
initial_condition = 1
[../]
[./y]
family = SCALAR
order = FIRST
initial_condition = 2
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./uff]
type = BodyForce
variable = u
function = f_fn
[../]
[]
[ScalarKernels]
[./td1]
type = ODETimeDerivative
variable = x
[../]
[./ode1]
type = ImplicitODEx
variable = x
y = y
[../]
[./td2]
type = ODETimeDerivative
variable = y
[../]
[./ode2]
type = ImplicitODEy
variable = y
x = x
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = bc_all_fn
[../]
[]
[Postprocessors]
active = 'exact_x l2err_x'
[./exact_x]
type = FunctionValuePostprocessor
function = exact_x_fn
execute_on = 'initial timestep_end'
point = '0 0 0'
[../]
[./l2err_x]
type = ScalarL2Error
variable = x
function = exact_x_fn
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
start_time = 0
dt = 0.01
num_steps = 100
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/elastic_patch/ad_elastic_patch_rz.i)
#
# This problem is taken from the Abaqus verification manual:
# "1.5.4 Patch test for axisymmetric elements"
# The stress solution is given as:
# xx = yy = zz = 2000
# xy = 400
#
# Since the strain is 1e-3 in all three directions, the new density should be
# new_density = original_density * V_0 / V
# new_density = 0.283 / (1 + 1e-3 + 1e-3 + 1e-3) = 0.282153
[GlobalParams]
displacements = 'disp_x disp_y'
temperature = temp
[]
[Mesh]
file = elastic_patch_rz.e
coord_type = RZ
[]
[Variables]
[temp]
initial_condition = 117.56
[]
[]
[Modules/TensorMechanics/Master/All]
strain = SMALL
incremental = true
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_zx'
[]
[Kernels]
[body]
type = BodyForce
variable = disp_y
value = 1
function = '-400/x'
[]
[heat]
type = TimeDerivative
variable = temp
[]
[]
[BCs]
[ur]
type = FunctionDirichletBC
variable = disp_x
boundary = 10
function = '1e-3*x'
[]
[uz]
type = FunctionDirichletBC
variable = disp_y
boundary = 10
function = '1e-3*(x+y)'
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.25
[]
[stress]
type = ComputeStrainIncrementBasedStress
[]
[]
[Materials]
[density]
type = ADDensity
density = 0.283
outputs = all
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
end_time = 1.0
[]
[Outputs]
[out]
type = Exodus
elemental_as_nodal = true
[]
[]
(test/tests/multiapps/secant_postprocessor/transient_main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[time]
type = TimeDerivative
variable = u
[]
[source]
type = BodyForce
variable = u
value = 1
[]
[]
[BCs]
[left]
type = PostprocessorDirichletBC
variable = u
boundary = left
postprocessor = 'from_sub'
[]
[]
[Postprocessors]
[coupling_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[from_sub]
type = Receiver
default = 0
[]
[to_sub]
type = SideAverageValue
variable = u
boundary = right
[]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
# App coupling parameters
fixed_point_algorithm = 'secant'
fixed_point_max_its = 30
transformed_postprocessors = 'from_sub'
[]
[Outputs]
csv = true
exodus = false
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = 'transient_sub.i'
clone_parent_mesh = true
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[left_from_sub]
type = MultiAppPostprocessorTransfer
from_multi_app = sub
from_postprocessor = 'to_main'
to_postprocessor = 'from_sub'
reduction_type = 'average'
[]
[right_to_sub]
type = MultiAppPostprocessorTransfer
to_multi_app = sub
from_postprocessor = 'to_sub'
to_postprocessor = 'from_main'
[]
[]
(test/tests/misc/check_error/missing_coupled_mat_prop_test.i)
[Mesh]
file = rectangle.e
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff body_force'
[./diff]
type = Diffusion
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
block = 1
value = 10
[../]
[]
[BCs]
active = 'right'
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Materials]
# This material is global and uses a coupled property
[./mat_global]
type = CoupledMaterial
mat_prop = 'some_prop'
coupled_mat_prop = 'mp1'
block = '1 2'
[../]
# This material supplies a value for block 1 ONLY
[./mat_0]
type = GenericConstantMaterial
block = 1
prop_names = 'mp1'
prop_values = 2
[../]
[]
[Executioner]
type = Steady
# solve_type = 'PJFNK'
# preconditioner = 'ILU'
solve_type = 'PJFNK'
# petsc_options_iname = '-pc_type -pc_hypre_type'
# petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
file_base = missing_mat_prop_test
[]
(test/tests/mortar/aux-gap/mismatch.i)
[Mesh]
second_order = true
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[]
[secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[]
[]
[Variables]
[T]
block = '1 2'
order = SECOND
[]
[lambda]
block = '10'
use_dual = true
order = SECOND
[]
[]
[AuxVariables]
[gap]
block = '10'
[]
[]
[AuxKernels]
[gap]
type = WeightedGapAux
variable = gap
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln
variable = T
boundary = '3 4 5 6 7 8'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = '-4 + x^2 + y^2'
[]
[exact_soln]
type = ParsedFunction
expression = 'x^2 + y^2'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
exodus = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
(test/tests/functions/pps_function/pp_function.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./function_force]
function = pp_func
variable = u
type = BodyForce
[../]
[]
[BCs]
active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out
exodus = true
[]
[Functions]
[./pp_func]
pp = right_value
type = PostprocessorFunction
[../]
[]
[Postprocessors]
[./right_value]
variable = u
execute_on = linear
boundary = 1
type = SideAverageValue
[../]
[]
(examples/ex14_pps/ex14_compare_solutions_1.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
ny = 100
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
parallel_type = replicated # This uses SolutionUserObject which doesn't work with DistributedMesh.
[]
[Variables]
[./forced]
order = THIRD
family = HERMITE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = forced
[../]
[./forcing]
type = BodyForce
variable = forced
function = 'x*x+y*y' # Any object expecting a function name can also receive a ParsedFunction string
[../]
[]
[BCs]
[./all]
type = DirichletBC
variable = forced
boundary = 'bottom right top left'
value = 0
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
xda = true #XDA writes out the perfect internal state of all variables, allowing SolutionUserObject to read back in higher order solutions and adapted meshes
[]
(test/tests/materials/material/exception_material.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./mat]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./time_derivative]
type = TimeDerivative
variable = u
[../]
[./diff]
type = MatDiffusionTest
variable = u
prop_name = matp
[../]
[./f]
type = BodyForce
variable = u
function = '20'
[../]
[]
[AuxKernels]
[./mat]
# Sequence of events:
# 1.) MaterialRealAux is re-evaluated every linear iteration
# 2.) MaterialRealAux calls ExceptionMaterial::computeQpProperties()
# 3.) ExceptionMaterial throws a MooseException.
# 4.) The MooseException is caught and handled by MOOSE.
# 5.) The next solve is automatically failed.
# 6.) Time timestep is cut and we try again.
#
# The idea is to test that MOOSE can recover when exceptions are
# thrown during AuxKernel evaluation, and not just nonlinear
# residual/jacobian evaluation.
type = MaterialRealAux
variable = mat
property = matp
[../]
[]
[BCs]
[./all]
type = DirichletBC
variable = u
boundary = 'left top bottom right'
value = 0
[../]
[]
[Materials]
[./mat]
type = ExceptionMaterial
block = 0
rank = 0
coupled_var = u
[../]
[]
[Executioner]
type = Transient
dt = 0.1
end_time = .5
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/mms/supg/supg_pspg_adv_dominated_mms.i)
mu=1.5e-4
rho=2.5
[GlobalParams]
gravity = '0 0 0'
supg = true
pspg = true
convective_term = true
integrate_p_by_parts = false
transient_term = true
laplace = true
u = vel_x
v = vel_y
pressure = p
alpha = 1e0
order = FIRST
family = LAGRANGE
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
elem_type = QUAD9
nx = 4
ny = 4
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./vel_x]
[../]
[./vel_y]
[../]
[./p]
order = FIRST
[../]
[]
[Kernels]
# mass
[./mass]
type = INSMass
variable = p
x_vel_forcing_func = vel_x_source_func
y_vel_forcing_func = vel_y_source_func
[../]
[./x_time]
type = INSMomentumTimeDerivative
variable = vel_x
[../]
[./y_time]
type = INSMomentumTimeDerivative
variable = vel_y
[../]
# x-momentum, space
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
component = 0
forcing_func = vel_x_source_func
[../]
# y-momentum, space
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
component = 1
forcing_func = vel_y_source_func
[../]
[./p_source]
type = BodyForce
function = p_source_func
variable = p
[../]
[]
[BCs]
[./vel_x]
type = FunctionDirichletBC
boundary = 'left right top bottom'
function = vel_x_func
variable = vel_x
[../]
[./vel_y]
type = FunctionDirichletBC
boundary = 'left right top bottom'
function = vel_y_func
variable = vel_y
[../]
[./p]
type = FunctionDirichletBC
boundary = 'left right top bottom'
function = p_func
variable = p
[../]
[]
[Functions]
[./vel_x_source_func]
type = ParsedFunction
expression = '-${mu}*(-0.028*pi^2*x^2*sin(0.2*pi*x*y) - 0.028*pi^2*y^2*sin(0.2*pi*x*y) - 0.1*pi^2*sin(0.5*pi*x) - 0.4*pi^2*sin(pi*y)) + ${rho}*(0.14*pi*x*cos(0.2*pi*x*y) + 0.4*pi*cos(pi*y))*(0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3) + ${rho}*(0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x))*(0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5) + 0.1*pi*y*cos(0.2*pi*x*y) + 0.25*pi*cos(0.5*pi*x)'
[../]
[./vel_y_source_func]
type = ParsedFunction
expression = '-${mu}*(-0.018*pi^2*x^2*sin(0.3*pi*x*y) - 0.018*pi^2*y^2*sin(0.3*pi*x*y) - 0.384*pi^2*sin(0.8*pi*x) - 0.027*pi^2*sin(0.3*pi*y)) + ${rho}*(0.06*pi*x*cos(0.3*pi*x*y) + 0.09*pi*cos(0.3*pi*y))*(0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3) + ${rho}*(0.06*pi*y*cos(0.3*pi*x*y) + 0.48*pi*cos(0.8*pi*x))*(0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5) + 0.1*pi*x*cos(0.2*pi*x*y) + 0.3*pi*cos(0.3*pi*y)'
[../]
[./p_source_func]
type = ParsedFunction
expression = '-0.06*pi*x*cos(0.3*pi*x*y) - 0.14*pi*y*cos(0.2*pi*x*y) - 0.2*pi*cos(0.5*pi*x) - 0.09*pi*cos(0.3*pi*y)'
[../]
[./vel_x_func]
type = ParsedFunction
expression = '0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5'
[../]
[./vel_y_func]
type = ParsedFunction
expression = '0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3'
[../]
[./p_func]
type = ParsedFunction
expression = '0.5*sin(0.5*pi*x) + 1.0*sin(0.3*pi*y) + 0.5*sin(0.2*pi*x*y) + 0.5'
[../]
[./vxx_func]
type = ParsedFunction
expression = '0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x)'
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_view'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu NONZERO superlu_dist'
line_search = 'none'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-12
nl_max_its = 10
l_tol = 1e-6
l_max_its = 10
# To run to steady-state, set num-steps to some large number (1000000 for example)
type = Transient
num_steps = 10
steady_state_detection = true
steady_state_tolerance = 1e-10
[./TimeStepper]
dt = .1
type = IterationAdaptiveDT
cutback_factor = 0.4
growth_factor = 1.2
optimal_iterations = 20
[../]
[]
[Outputs]
execute_on = 'final'
[./exodus]
type = Exodus
[../]
[./csv]
type = CSV
[../]
[]
[Postprocessors]
[./L2vel_x]
type = ElementL2Error
variable = vel_x
function = vel_x_func
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2vel_y]
variable = vel_y
function = vel_y_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2p]
variable = p
function = p_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2vxx]
variable = vxx
function = vxx_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[]
[AuxVariables]
[./vxx]
family = MONOMIAL
order = FIRST
[../]
[]
[AuxKernels]
[./vxx]
type = VariableGradientComponent
component = x
variable = vxx
gradient_variable = vel_x
[../]
[]
(modules/optimization/test/tests/optimizationreporter/material/forward.i)
[Mesh]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[heat_source]
type = BodyForce
value = 1000
variable = temperature
[]
[]
[BCs]
[left]
type = NeumannBC
variable = temperature
boundary = left
value = 0
[]
[right]
type = NeumannBC
variable = temperature
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 200
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 100
[]
[]
[Functions]
[thermo_conduct]
type = ParsedOptimizationFunction
expression = 'alpha'
param_symbol_names = 'alpha'
param_vector_name = 'params/p1'
[]
[]
[Materials]
[steel]
type = GenericFunctionMaterial
prop_names = 'thermal_conductivity'
prop_values = 'thermo_conduct'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'preonly lu superlu_dist'
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
[]
[params]
type = ConstantReporter
real_vector_names = 'p1'
real_vector_values = '0' # Dummy value
[]
[]
[Outputs]
console = false
file_base = 'forward'
[]
(test/tests/kernels/ad_scalar_kernel_constraint/scalar_constraint_together.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[exact_fn]
type = ParsedFunction
value = 'x*x+y*y'
[]
[ffn]
type = ParsedFunction
value = -4
[]
[bottom_bc_fn]
type = ParsedFunction
value = -2*y
[]
[right_bc_fn]
type = ParsedFunction
value = 2*x
[]
[top_bc_fn]
type = ParsedFunction
value = 2*y
[]
[left_bc_fn]
type = ParsedFunction
value = -2*x
[]
[]
[Variables]
[u]
family = LAGRANGE
order = SECOND
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[Kernels]
[diff]
type = ADDiffusion
variable = u
[]
[ffnk]
type = ADBodyForce
variable = u
function = ffn
[]
[sk_lm]
type = ADScalarLMKernel
variable = u
kappa = lambda
pp_name = pp
value = 2.666666666666666
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[bottom]
type = ADFunctionNeumannBC
variable = u
boundary = 'bottom'
function = bottom_bc_fn
[]
[right]
type = ADFunctionNeumannBC
variable = u
boundary = 'right'
function = right_bc_fn
[]
[top]
type = ADFunctionNeumannBC
variable = u
boundary = 'top'
function = top_bc_fn
[]
[left]
type = ADFunctionNeumannBC
variable = u
boundary = 'left'
function = left_bc_fn
[]
[]
[Postprocessors]
# integrate the volume of domain since original objects set
# int(phi)=V0, rather than int(phi-V0)=0
[pp]
type = FunctionElementIntegral
function = 1
execute_on = initial
[]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Steady
residual_and_jacobian_together = true
nl_rel_tol = 1e-9
l_tol = 1.e-10
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
solve_type = NEWTON
[]
[Outputs]
# exodus = true
csv = true
hide = lambda
[]
(test/tests/multiapps/steffensen_postprocessor/steady_main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[source]
type = BodyForce
variable = u
value = 1
[]
[]
[BCs]
[left]
type = PostprocessorDirichletBC
variable = u
boundary = left
postprocessor = 'from_sub'
[]
[]
[Postprocessors]
[from_sub]
type = Receiver
default = 0
[]
[to_sub]
type = SideAverageValue
variable = u
boundary = right
[]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Steady
# Solve parameters
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
# App coupling parameters
fixed_point_algorithm = 'steffensen'
fixed_point_max_its = 100
transformed_postprocessors = 'from_sub'
[]
[Outputs]
csv = true
exodus = false
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = steady_sub.i
clone_parent_mesh = true
execute_on = 'timestep_begin'
# we keep the full postprocessor output history of the subapp
keep_full_output_history = true
transformed_postprocessors = 'from_main'
[]
[]
[Transfers]
[left_from_sub]
type = MultiAppPostprocessorTransfer
from_multi_app = sub
from_postprocessor = 'to_main'
to_postprocessor = 'from_sub'
reduction_type = 'average'
[]
[right_to_sub]
type = MultiAppPostprocessorTransfer
to_multi_app = sub
from_postprocessor = 'to_sub'
to_postprocessor = 'from_main'
[]
[]
(test/tests/multiapps/steffensen_postprocessor/steady_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[sink]
type = BodyForce
variable = u
value = -1
[]
[]
[BCs]
[right]
type = PostprocessorDirichletBC
variable = u
boundary = right
postprocessor = 'from_main'
[]
[]
[Postprocessors]
[from_main]
type = Receiver
default = 0
[]
[to_main]
type = SideAverageValue
variable = u
boundary = left
[]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
fixed_point_algorithm = 'steffensen'
[]
[Outputs]
csv = true
exodus = false
[]
(modules/stochastic_tools/test/tests/reporters/BFActiveLearning/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 0.13061533868990033
elem_type = EDGE3
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 10951.864006672608
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 10.320058433901163
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 279.8173854189593
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[avg]
type = AverageNodalVariableValue
variable = T
[]
[max]
type = NodalExtremeValue
variable = T
value_type = max
[]
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Outputs]
[]
(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
[]
(test/tests/materials/ad_material/conversion/1d_dirichlet.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmax = 2
[]
[Variables]
[v]
initial_condition = 1.1
[]
[]
[Kernels]
inactive = 'ad_diff'
[diff]
type = MatDiffusion
variable = v
diffusivity = 'coef'
[]
[ad_diff]
type = ADMatDiffusion
variable = v
diffusivity = 'ad_coef_2'
[]
[sink]
type = ADBodyForce
variable = v
function = 'sink'
[]
[]
[BCs]
[bounds]
type = DirichletBC
variable = v
boundary = 'left right'
value = 0
[]
[]
[Functions]
[sink]
type = ParsedFunction
expression = '3*x^3'
[]
[]
[Materials]
[ad_coef]
type = ADParsedMaterial
property_name = 'ad_coef'
expression = '0.01 * max(v, 1)'
coupled_variables = 'v'
[]
[converter_to_regular]
type = MaterialADConverter
ad_props_in = 'ad_coef'
reg_props_out = 'coef'
[]
# at this point we should have lost the derivatives
[converter_to_ad]
type = MaterialADConverter
reg_props_in = 'coef'
ad_props_out = 'ad_coef_2'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
[]
(test/tests/outputs/debug/show_var_residual_norms.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Functions]
[forcing_fnu]
type = ParsedFunction
expression = -5.8*(x+y)+x*x*x-x+y*y*y-y
[]
[forcing_fnv]
type = ParsedFunction
expression = -4
[]
[slnu]
type = ParsedGradFunction
expression = x*x*x-x+y*y*y-y
grad_x = 3*x*x-1
grad_y = 3*y*y-1
[]
[slnv]
type = ParsedGradFunction
expression = x*x+y*y
grad_x = 2*x
grad_y = 2*y
[]
#NeumannBC functions
[bc_fnut]
type = ParsedFunction
expression = 3*y*y-1
[]
[bc_fnub]
type = ParsedFunction
expression = -3*y*y+1
[]
[bc_fnul]
type = ParsedFunction
expression = -3*x*x+1
[]
[bc_fnur]
type = ParsedFunction
expression = 3*x*x-1
[]
[]
[Variables]
[u]
order = THIRD
family = HIERARCHIC
[]
[v]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
active = 'diff1 diff2 test1 forceu forcev react'
[diff1]
type = Diffusion
variable = u
[]
[test1]
type = CoupledConvection
variable = u
velocity_vector = v
[]
[diff2]
type = Diffusion
variable = v
[]
[react]
type = Reaction
variable = u
[]
[forceu]
type = BodyForce
variable = u
function = forcing_fnu
[]
[forcev]
type = BodyForce
variable = v
function = forcing_fnv
[]
[]
[BCs]
active = 'bc_u_tb bc_v bc_ul bc_ur bc_ut bc_ub'
[bc_u]
type = FunctionPenaltyDirichletBC
variable = u
function = slnu
boundary = 'left right top bottom'
penalty = 1e6
[]
[bc_v]
type = FunctionDirichletBC
variable = v
function = slnv
boundary = 'left right top bottom'
[]
[bc_u_lr]
type = FunctionPenaltyDirichletBC
variable = u
function = slnu
boundary = 'left right top bottom'
penalty = 1e6
[]
[bc_u_tb]
type = CoupledKernelGradBC
variable = u
var2 = v
vel = '0.1 0.1'
boundary = 'top bottom left right'
[]
[bc_ul]
type = FunctionNeumannBC
variable = u
function = bc_fnul
boundary = 'left'
[]
[bc_ur]
type = FunctionNeumannBC
variable = u
function = bc_fnur
boundary = 'right'
[]
[bc_ut]
type = FunctionNeumannBC
variable = u
function = bc_fnut
boundary = 'top'
[]
[bc_ub]
type = FunctionNeumannBC
variable = u
function = bc_fnub
boundary = 'bottom'
[]
[]
[Preconditioning]
active = ' '
[prec]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'L2u L2v'
[dofs]
type = NumDOFs
[]
[h]
type = AverageElementSize
[]
[L2u]
type = ElementL2Error
variable = u
function = slnu
[]
[L2v]
type = ElementL2Error
variable = v
function = slnv
[]
[H1error]
type = ElementH1Error
variable = u
function = solution
[]
[H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-15
nl_abs_tol = 1e-13
[]
[Outputs]
execute_on = 'timestep_end'
[debug] # This is a test, use the [Debug] block to enable this
type = VariableResidualNormsDebugOutput
[]
[]
(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
[../]
[]
(test/tests/vectorpostprocessors/element_variables_difference_max/element_variables_difference_max.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 10
nz = 10
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./forcing_v]
type = ParsedFunction
expression = 'x * y * z'
[../]
[]
[Kernels]
[./diffusion_u]
type = Diffusion
variable = u
[../]
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diffusion_v]
type = Diffusion
variable = v
[../]
[./forcing_v]
type = BodyForce
variable = v
function = forcing_v
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = 'u'
boundary = 'bottom'
value = 1
[../]
[./top]
type = DirichletBC
variable = 'u'
boundary = 'top'
value = 0
[../]
[]
[VectorPostprocessors]
[./difference]
type = ElementVariablesDifferenceMax
compare_a = u
compare_b = v
[../]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 1
solve_type = PJFNK
[]
[Outputs]
execute_on = 'initial timestep_end'
csv = true
[]
(modules/optimization/examples/materialTransient/forward_and_adjoint.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[]
[Variables/u]
initial_condition = 0
[]
[Kernels]
[dt]
type = TimeDerivative
variable = u
[]
[diff]
type = MatDiffusion
variable = u
diffusivity = D
[]
[src]
type = BodyForce
variable = u
value = 1
[]
[]
[BCs]
[dirichlet]
type = DirichletBC
variable = u
boundary = 'right top'
value = 0
[]
[]
[Materials]
[diffc]
type = GenericFunctionMaterial
prop_names = 'D'
prop_values = 'diffc_fun'
output_properties = 'D'
outputs = 'exodus'
[]
[]
[Functions]
[diffc_fun]
type = NearestReporterCoordinatesFunction
value_name = 'diffc_rep/D_vals'
x_coord_name = 'diffc_rep/D_x_coord'
y_coord_name = 'diffc_rep/D_y_coord'
[]
[]
[Reporters]
[diffc_rep]
type = ConstantReporter
real_vector_names = 'D_x_coord D_y_coord D_vals'
real_vector_values = '0.25 0.75 0.25 0.75;
0.25 0.25 0.75 0.75;
1 0.2 0.2 0.05' # Reference solution
outputs = none
[]
[data]
type = OptimizationData
variable = u
[]
[]
[Postprocessors]
[D1]
type = PointValue
variable = D
point = '0.25 0.25 0'
[]
[D2]
type = PointValue
variable = D
point = '0.75 0.25 0'
[]
[D3]
type = PointValue
variable = D
point = '0.25 0.75 0'
[]
[D4]
type = PointValue
variable = D
point = '0.75 0.75 0'
[]
[]
[Executioner]
type = TransientAndAdjoint
forward_system = nl0
adjoint_system = adjoint
nl_rel_tol = 1e-8
nl_abs_tol = 1e-12
l_tol = 1e-12
dt = 0.1
num_steps = 10
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
kernel_coverage_check = false
[]
[Variables]
[u_adjoint]
initial_condition = 0
solver_sys = adjoint
outputs = none
[]
[]
[DiracKernels]
[misfit]
type = ReporterTimePointSource
variable = u_adjoint
value_name = data/misfit_values
x_coord_name = data/measurement_xcoord
y_coord_name = data/measurement_ycoord
z_coord_name = data/measurement_zcoord
time_name = data/measurement_time
[]
[]
[VectorPostprocessors]
[adjoint]
type = ElementOptimizationDiffusionCoefFunctionInnerProduct
variable = u_adjoint
forward_variable = u
function = diffc_fun
execute_on = ADJOINT_TIMESTEP_END
outputs = none
[]
[]
[Outputs]
# The default exodus object executes only during the forward system solve,
# so the adjoint variable in the resulting file will show only 0.
# Unfortunately, there is no way to output the adjoint variable with Exodus.
exodus = true
console = false
[]
(modules/fluid_properties/test/tests/stiffened_gas/test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
elem_type = QUAD4
[]
[Functions]
[./f_fn]
type = ParsedFunction
expression = -4
[../]
[./bc_fn]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./e]
initial_condition = 113206.45935406466
[../]
[./v]
initial_condition = 0.0007354064593540647
[../]
[./p]
family = MONOMIAL
order = CONSTANT
[../]
[./T]
family = MONOMIAL
order = CONSTANT
[../]
[./cp]
family = MONOMIAL
order = CONSTANT
[../]
[./cv]
family = MONOMIAL
order = CONSTANT
[../]
[./c]
family = MONOMIAL
order = CONSTANT
[../]
[./mu]
family = MONOMIAL
order = CONSTANT
[../]
[./k]
family = MONOMIAL
order = CONSTANT
[../]
[./g]
family = MONOMIAL
order = CONSTANT
[../]
[]
[AuxKernels]
[./p]
type = MaterialRealAux
variable = p
property = pressure
[../]
[./T]
type = MaterialRealAux
variable = T
property = temperature
[../]
[./cp]
type = MaterialRealAux
variable = cp
property = cp
[../]
[./cv]
type = MaterialRealAux
variable = cv
property = cv
[../]
[./c]
type = MaterialRealAux
variable = c
property = c
[../]
[./mu]
type = MaterialRealAux
variable = mu
property = mu
[../]
[./k]
type = MaterialRealAux
variable = k
property = k
[../]
[./g]
type = MaterialRealAux
variable = g
property = g
[../]
[]
[FluidProperties]
[./sg]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
mu = 0.9
k = 0.6
[../]
[]
[Materials]
[./fp_mat]
type = FluidPropertiesMaterialVE
e = e
v = v
fp = sg
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = f_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = bc_fn
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(test/tests/interfacekernels/adaptivity/adaptivity.i)
# This input file is used for two tests:
# 1) Check that InterfaceKernels work with mesh adaptivity
# 2) Error out when InterfaceKernels are used with adaptivity
# and stateful material prpoerties
[Mesh]
parallel_type = 'replicated'
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0.5 0 0'
top_right = '1 1 0'
block_id = 1
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./break_boundary]
input = interface
type = BreakBoundaryOnSubdomainGenerator
[../]
[]
[Variables]
[./u]
[./InitialCondition]
type = ConstantIC
value = 1
[../]
block = 0
[../]
[./u_neighbor]
[./InitialCondition]
type = ConstantIC
value = 1
[../]
block = 1
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = (x*x*x)-6.0*x
[../]
[./bc_fn]
type = ParsedFunction
expression = (x*x*x)
[../]
[]
[Kernels]
[./diff]
type = MatDiffusionTest
variable = u
prop_name = diffusivity
block = 0
[../]
[./abs]
type = Reaction
variable = u
block = 0
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
block = 0
[../]
[./diffn]
type = MatDiffusionTest
variable = u_neighbor
prop_name = diffusivity
block = 1
[../]
[./absn]
type = Reaction
variable = u_neighbor
block = 1
[../]
[./forcingn]
type = BodyForce
variable = u_neighbor
function = forcing_fn
block = 1
[../]
[]
[InterfaceKernels]
[./flux_match]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = u_neighbor
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = FunctionDirichletBC
variable = u
boundary = 'left'
function = bc_fn
[../]
[./u_neighbor]
type = FunctionDirichletBC
variable = u_neighbor
boundary = 'right'
function = bc_fn
[../]
[]
[Materials]
active = 'constant'
[./stateful]
type = StatefulTest
prop_names = 'diffusivity'
prop_values = '1'
block = '0 1'
[../]
[./constant]
type = GenericConstantMaterial
prop_names = 'diffusivity'
prop_values = '1'
block = '0 1'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Adaptivity]
marker = 'marker'
steps = 1
[./Markers]
[./marker]
type = BoxMarker
bottom_left = '0 0 0'
top_right = '1 1 0'
inside = refine
outside = coarsen
[../]
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/time_integrators/implicit-euler/ie_adapt.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 4
ny = 4
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.25
[./Adaptivity]
refine_fraction = 0.2
coarsen_fraction = 0.3
max_h_level = 4
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/interfacekernels/ik_displaced/displaced.i)
[Mesh]
displacements = 'disp_x disp_y'
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./break_boundary]
input = interface
type = BreakBoundaryOnSubdomainGenerator
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./v]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[../]
[./source_u]
type = BodyForce
variable = u
value = 1
[../]
[]
[InterfaceKernels]
[./interface]
type = InterfacialSource
variable = u
neighbor_var = v
boundary = primary0_interface
use_displaced_mesh = true
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 right top'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1'
[../]
[]
[Postprocessors]
[./u_int]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[../]
[./v_int]
type = ElementIntegralVariablePostprocessor
variable = v
block = 1
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
file_base = displaced
exodus = true
[]
[Functions]
[./disp_x_func]
type = ParsedFunction
expression = x
[../]
[./disp_y_func]
type = ParsedFunction
expression = y
[../]
[]
[ICs]
[./disp_x_ic]
function = disp_x_func
variable = disp_x
type = FunctionIC
[../]
[./disp_y_ic]
function = disp_y_func
variable = disp_y
type = FunctionIC
[../]
[]
(test/tests/bcs/ad_function_dirichlet_bc/test.i)
###########################################################
# This is a test of Boundary Condition System. The
# FunctionDirichletBC is used to contribute the residuals
# to the boundary term operators in the weak form.
#
# @Requirement F3.40
###########################################################
[Mesh]
[./square]
type = GeneratedMeshGenerator
dim = 2
nx = 32
ny = 32
[../]
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./ff_1]
type = ParsedFunction
expression = alpha*alpha*pi
symbol_names = 'alpha'
symbol_values = '16'
[../]
[./ff_2]
type = ParsedFunction
expression = pi*sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '16'
[../]
[./forcing_func]
type = CompositeFunction
functions = 'ff_1 ff_2'
[../]
[./bc_func]
type = ParsedFunction
expression = sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '16'
[../]
[]
[Kernels]
[./diff]
type = ADDiffusion
variable = u
[../]
[./forcing]
type = ADBodyForce
variable = u
function = forcing_func
[../]
[]
[BCs]
[./all]
type = ADFunctionDirichletBC
variable = u
boundary = 'left right'
function = bc_func
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/dgkernels/adaptivity/adaptivity.i)
# This input file is used for two tests:
# 1) Check that DGKernels work with mesh adaptivity
# 2) Error out when DGKernels are used with adaptivity
# and stateful material prpoerties
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
parallel_type = 'replicated'
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = (x*x*x)-6.0*x
[../]
[./bc_fn]
type = ParsedFunction
expression = (x*x*x)
[../]
[]
[Kernels]
[./diff]
type = MatDiffusionTest
variable = u
prop_name = diffusivity
[../]
[./abs]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGKernels]
[./dgdiff]
type = DGDiffusion
variable = u
sigma = 6
epsilon = -1.0
diff = diffusivity
[../]
[]
[BCs]
active = 'all'
[./all]
type = DGMDDBC
variable = u
boundary = '1 2 3 4'
function = bc_fn
prop_name = diffusivity
sigma = 6
epsilon = -1.0
[../]
[]
[Materials]
active = 'constant'
[./stateful]
type = StatefulTest
prop_names = 'diffusivity'
prop_values = '1'
[../]
[./constant]
type = GenericConstantMaterial
prop_names = 'diffusivity'
prop_values = '1'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Adaptivity]
marker = 'marker'
steps = 1
[./Indicators]
[./error]
type = GradientJumpIndicator
variable = u
[../]
[../]
[./Markers]
[./marker]
type = ErrorFractionMarker
coarsen = 0.5
indicator = error
refine = 0.5
[../]
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/time_steppers/function_dt/function_dt_no_interpolation.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*t*(x*x+y*y)
[../]
[./forcing_fn]
type = ParsedFunction
expression = 2*t*(x*x+y*y)-4*t*t
[../]
[./dts]
type = PiecewiseConstant
x = '0 4 8 12 20'
y = '0 1 2 4 8'
direction = right
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]
[ICs]
[./u_var]
type = FunctionIC
variable = u
function = exact_fn
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 20
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/restart/restart_transient_from_transient/pseudo_trans_with_2subs.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = 'replicated'
[]
[AuxVariables]
[Tf]
[]
[]
[Variables]
[power_density]
[]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2'
[]
[]
[Kernels]
[timedt]
type = TimeDerivative
variable = power_density
[]
[diff]
type = Diffusion
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[BCs]
[left]
type = DirichletBC
variable = power_density
boundary = left
value = 50
[]
[right]
type = DirichletBC
variable = power_density
boundary = right
value = 1e3
[]
[]
[Postprocessors]
[pwr_avg]
type = ElementAverageValue
variable = power_density
execute_on = 'initial timestep_end'
[]
[temp_avg]
type = ElementAverageValue
variable = Tf
execute_on = 'initial timestep_end'
[]
[temp_max]
type = ElementExtremeValue
value_type = max
variable = Tf
execute_on = 'initial timestep_end'
[]
[temp_min]
type = ElementExtremeValue
value_type = min
variable = Tf
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
end_time = 20
dt = 2.0
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0
0.5 0 0'
input_files = pseudo_trans_with_2subs_sub.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[p_to_sub]
type = MultiAppProjectionTransfer
source_variable = power_density
variable = power_density
to_multi_app = sub
execute_on = 'timestep_end'
[]
[t_from_sub]
type = MultiAppGeometricInterpolationTransfer
source_variable = temp
variable = Tf
from_multi_app = sub
execute_on = 'timestep_end'
[]
[]
[Outputs]
exodus = true
perf_graph = true
checkpoint = true
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
(test/tests/dampers/bounding_value_nodal_damper/bounding_value_max_test.i)
# This model tests the BoundingValueNodalDamper. The converged solution
# for u starts out in the range from 0 to 1, but after several steps,
# a volumetric source drives it to a value greater than 1, which is
# outside the range of the damper. At that point, the solution can
# no longer converge, and the model errors out with a failure to converge.
# The test verifies that the damper computes the correct value in the first
# nonlinear iteration when the solution exceeds the bounds.
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./source]
type = BodyForce
variable = u
function = 't'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Dampers]
[./bounding_value_damp]
type = BoundingValueNodalDamper
min_value = 0.0
max_value = 1.0
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
end_time = 3.0
dt = 0.5
dtmin = 0.5
nl_max_its = 5
[]
(test/tests/postprocessors/interface_value/interface_fe_variable_value_postprocessor.i)
postprocessor_type = InterfaceAverageVariableValuePostprocessor
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 6
xmax = 3
ny = 9
ymax = 3
elem_type = QUAD4
[]
[./subdomain_id]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '2 1 0'
block_id = 1
[../]
[./interface]
input = subdomain_id
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'interface'
[../]
[]
[Functions]
[./fn_exact]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[./ffn]
type = ParsedFunction
expression = -4
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = FIRST
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = ffn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = fn_exact
[../]
[]
[Materials]
[./stateful1]
type = StatefulMaterial
block = 0
initial_diffusivity = 5
[../]
[./stateful2]
type = StatefulMaterial
block = 1
initial_diffusivity = 2
[../]
[]
[AuxKernels]
[./diffusivity_1]
type = MaterialRealAux
property = diffusivity
variable = diffusivity_1
[]
[./diffusivity_2]
type = MaterialRealAux
property = diffusivity
variable = diffusivity_2
[]
[]
[AuxVariables]
[./diffusivity_1]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_2]
family = MONOMIAL
order = CONSTANT
[]
[]
[Postprocessors]
[./diffusivity_average]
type = ${postprocessor_type}
interface_value_type = average
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_jump_primary_secondary]
type = ${postprocessor_type}
interface_value_type = jump_primary_minus_secondary
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_jump_secondary_primary]
type = ${postprocessor_type}
interface_value_type = jump_secondary_minus_primary
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_jump_abs]
type = ${postprocessor_type}
interface_value_type = jump_abs
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_primary]
type = ${postprocessor_type}
interface_value_type = primary
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_secondary]
type = ${postprocessor_type}
interface_value_type = secondary
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_single_variable]
type = ${postprocessor_type}
interface_value_type = primary
variable = diffusivity_1
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
file_base = ${raw ${postprocessor_type} _fe}
exodus = true
[]
(test/tests/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
[]
(modules/xfem/test/tests/moving_interface/verification/2D_rz_lsdep1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: 2D
# Coordinate System: rz
# Material Numbers/Types: level set dep 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# Transient 2D heat transfer problem in cylindrical coordinates designed with
# the Method of Manufactured Solutions. This problem was developed to verify
# XFEM performance on linear elements in the presence of a moving interface
# sweeping across the x-y coordinates of a system with thermal conductivity
# dependent upon the transient level set function. This problem can be
# exactly evaluated by FEM/Moose without the moving interface. Both the
# temperature and level set function are designed to be linear to attempt to
# minimize the error between the Moose/exact solution and XFEM results.
# Results:
# The temperature at the bottom left boundary (x=1, y=1) exhibits the largest
# difference between the FEM/Moose solution and XFEM results. We present the
# XFEM results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 479.9998717
# 0.6 520 519.9994963
# 0.8 560 559.9989217
# 1.0 600 599.9986735
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 1.0
xmax = 2.0
ymin = 1.0
ymax = 2.0
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-100*x-100*y+400) + t*(-2.5*y/(2.04*x) + 155/x - t/(2.04*x)
- 7.5/2.04)'
[../]
[./neumann_func]
type = ParsedFunction
expression = '((0.01/2.04)*(-2.5*x-2.5*y-t)+1.55)*100*t'
[../]
[./dirichlet_right_func]
type = ParsedFunction
expression = '(-100*y+200)*t+400'
[../]
[./dirichlet_top_func]
type = ParsedFunction
expression = '(-100*x+200)*t+400'
[../]
[./k_func]
type = ParsedFunction
expression = '(0.01/2.04)*(-2.5*x-2.5*y-t) + 1.55'
[../]
[./ls_func]
type = ParsedFunction
expression = '-0.5*(x+y) + 2.04 -0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericFunctionMaterial
prop_names = 'diffusion_coefficient'
prop_values = 'k_func'
[../]
[]
[BCs]
[./left_du]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = FunctionDirichletBC
variable = u
boundary = 'right'
function = dirichlet_right_func
[../]
[./bottom_du]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = neumann_func
[../]
[./top_u]
type = FunctionDirichletBC
variable = u
boundary = 'top'
function = dirichlet_top_func
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/combined/test/tests/poro_mechanics/pp_generation.i)
# A sample is constrained on all sides and its boundaries are
# also impermeable. Fluid is pumped into the sample via a
# volumetric source (ie m^3/second per cubic meter), and the
# rise in porepressure is observed.
#
# Source = s (units = 1/second)
#
# Expect:
# porepressure = Biot-Modulus*s*t
# stress = 0 (remember this is effective stress)
#
# Parameters:
# Biot coefficient = 0.3
# Porosity = 0.1
# Bulk modulus = 2
# Shear modulus = 1.5
# fluid bulk modulus = 1/0.3 = 3.333333
# 1/Biot modulus = (1 - 0.3)*(0.3 - 0.1)/2 + 0.1*0.3 = 0.1. BiotModulus = 10
# s = 0.1
#
# Expect
# porepressure = t
# stress = 0
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
porepressure = porepressure
block = 0
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./porepressure]
[../]
[]
[BCs]
[./confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[../]
[./confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[../]
[./confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[../]
[]
[Kernels]
[./grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
[../]
[./grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
[../]
[./grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
component = 2
[../]
[./poro_x]
type = PoroMechanicsCoupling
variable = disp_x
component = 0
[../]
[./poro_y]
type = PoroMechanicsCoupling
variable = disp_y
component = 1
[../]
[./poro_z]
type = PoroMechanicsCoupling
variable = disp_z
component = 2
[../]
[./poro_timederiv]
type = PoroFullSatTimeDerivative
variable = porepressure
[../]
[./source]
type = BodyForce
function = 0.1
variable = porepressure
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./poro_material]
type = PoroFullSatMaterial
porosity0 = 0.1
biot_coefficient = 0.3
solid_bulk_compliance = 0.5
fluid_bulk_compliance = 0.3
constant_porosity = true
[../]
[]
[Postprocessors]
[./p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
[../]
[./zdisp]
type = PointValue
outputs = csv
point = '0 0 0.5'
variable = disp_z
[../]
[./stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[../]
[./stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[../]
[./stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-14 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = pp_generation
[./csv]
type = CSV
[../]
[]
(test/tests/postprocessors/side_pps/side_pps_multi_bnd_test.i)
#
# Tests elemental PPS running on multiple blocks
#
[Mesh]
type = StripeMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 3
ny = 3
elem_type = QUAD4
stripes = 3
# StripeMesh currently only works correctly with ReplicatedMesh.
parallel_type = replicated
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = x*(y+1)
[../]
[]
[Variables]
[./u]
family = MONOMIAL
order = CONSTANT
[../]
[]
[Kernels]
[./uv]
type = Reaction
variable = u
[../]
[./fv]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[Postprocessors]
[./int_0_1]
type = SideIntegralVariablePostprocessor
variable = u
boundary = '0 1'
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
execute_on = 'timestep_end'
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[]
(test/tests/kernels/scalar_kernel_constraint/diffusion_bipass_scalar.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[exact_fn]
type = ParsedFunction
value = 'x*x+y*y'
[]
[ffn]
type = ParsedFunction
value = -4
[]
[bottom_bc_fn]
type = ParsedFunction
value = -2*y
[]
[right_bc_fn]
type = ParsedFunction
value = 2*x
[]
[top_bc_fn]
type = ParsedFunction
value = 2*y
[]
[left_bc_fn]
type = ParsedFunction
value = -2*x
[]
[]
[Variables]
[u]
family = LAGRANGE
order = SECOND
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[Kernels]
# Make sure that we can derive from the scalar base class
# but actually not assign a scalar variable
[diff]
type = DiffusionNoScalar
variable = u
[]
[ffnk]
type = BodyForce
variable = u
function = ffn
[]
[sk_lm]
type = ScalarLMKernel
variable = u
kappa = lambda
pp_name = pp
value = 2.666666666666666
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bottom_bc_fn
[]
[right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = right_bc_fn
[]
[top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = top_bc_fn
[]
[left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = left_bc_fn
[]
[]
[Postprocessors]
# integrate the volume of domain since original objects set
# int(phi)=V0, rather than int(phi-V0)=0
[pp]
type = FunctionElementIntegral
function = 1
execute_on = initial
[]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-9
l_tol = 1.e-10
nl_max_its = 10
# This example builds an indefinite matrix, so "-pc_type hypre -pc_hypre_type boomeramg" cannot
# be used reliably on this problem
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
# This is a linear problem, so we don't need to recompute the
# Jacobian. This isn't a big deal for a Steady problems, however, as
# there is only one solve.
solve_type = 'LINEAR'
[]
[Outputs]
# exodus = true
csv = true
hide = lambda
[]
(test/tests/transfers/multiapp_conservative_transfer/sub_power_density.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.01 # to make sure the meshes don't align
xmax = 0.49 # to make sure the meshes don't align
ymax = 1
nx = 10
ny = 10
[]
[block1]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0.2 0.2 0'
top_right = '0.3 0.8 0'
[]
[]
[Variables]
[sink]
family = MONOMIAL
order = CONSTANT
[]
[]
[Functions]
[sink_func]
type = ParsedFunction
expression = '5e2*x*(0.5-x)+5e1'
[]
[]
[Kernels]
[reaction]
type = Reaction
variable = sink
[]
[coupledforce]
type = BodyForce
variable = sink
function = sink_func
[]
[]
[AuxVariables]
[from_parent]
block = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[sink]
type = ElementIntegralVariablePostprocessor
block = 1
variable = sink
[]
[from_parent_pp]
type = ElementIntegralVariablePostprocessor
block = 1
variable = from_parent
execute_on = 'transfer'
[]
[]
[Outputs]
exodus = true
[]
(test/tests/restart/restart_transient_from_steady/restart_trans_with_2subs.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = 'replicated'
[]
[Problem]
restart_file_base = steady_with_2subs_out_cp/LATEST
[]
[AuxVariables]
[Tf]
[]
[]
[Variables]
[power_density]
[]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2' # increase this function to drive transient
[]
[]
[Kernels]
[timedt]
type = TimeDerivative
variable = power_density
[]
[diff]
type = Diffusion
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[BCs]
[left]
type = DirichletBC
variable = power_density
boundary = left
value = 50
[]
[right]
type = DirichletBC
variable = power_density
boundary = right
value = 1e3
[]
[]
[Postprocessors]
[pwr_avg]
type = ElementAverageValue
block = '0'
variable = power_density
execute_on = 'initial timestep_end'
[]
[temp_avg]
type = ElementAverageValue
variable = Tf
block = '0'
execute_on = 'initial timestep_end'
[]
[temp_max]
type = ElementExtremeValue
value_type = max
variable = Tf
block = '0'
execute_on = 'initial timestep_end'
[]
[temp_min]
type = ElementExtremeValue
value_type = min
variable = Tf
block = '0'
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 3
dt = 1.0
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-7
fixed_point_rel_tol = 1e-7
fixed_point_abs_tol = 1e-07
fixed_point_max_its = 4
line_search = none
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0
0.5 0 0'
input_files = restart_trans_with_sub_sub.i
execute_on = 'timestep_end'
[../]
[]
[Transfers]
[p_to_sub]
type = MultiAppProjectionTransfer
source_variable = power_density
variable = power_density
to_multi_app = sub
execute_on = 'timestep_end'
[]
[t_from_sub]
type = MultiAppGeometricInterpolationTransfer
source_variable = temp
variable = Tf
from_multi_app = sub
execute_on = 'timestep_end'
[]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(test/tests/transfers/multiapp_conservative_transfer/parent_nearest_point.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[block1]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0.5 0 0'
top_right = '1 1 0'
[]
[]
[Variables]
[power_density]
[]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2'
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[BCs]
[left]
type = DirichletBC
variable = power_density
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = power_density
boundary = right
value = 1e3
[]
[]
[AuxVariables]
[from_sub]
[]
[]
[VectorPostprocessors]
[from_nearest_point]
type = NearestPointIntegralVariablePostprocessor
variable = power_density
points = '0 0.5 0 1 0.5 0'
[]
[to_nearest_point]
type = NearestPointIntegralVariablePostprocessor
variable = from_sub
points = '0 0.5 0 1 0.5 0'
execute_on = 'transfer'
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
input_files = sub_nearest_point.i
positions = '0 0 0 0.5 0 0'
execute_on = timestep_end
[]
[]
[Transfers]
[to_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = power_density
variable = from_parent
to_multi_app = sub
execute_on = timestep_end
# The following inputs specify what postprocessors should be conserved
# 1 NearestPointIntegralVariablePostprocessor is specified on the parent
# side with N points, where N is the number of subapps
# 1 pp is specified on the subapp side
from_postprocessors_to_be_preserved = 'from_nearest_point'
to_postprocessors_to_be_preserved = 'from_parent_pp'
[]
[from_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = sink
variable = from_sub
from_multi_app = sub
execute_on = timestep_end
# The following inputs specify what postprocessors should be conserved
# 1 NearestPointIntegralVariablePostprocessor is specified on the parent
# with N points, where N is the number of subapps
# 1 pp is specified on the subapp side
to_postprocessors_to_be_preserved = 'to_nearest_point'
from_postprocessors_to_be_preserved = 'sink'
[]
[]
[Outputs]
csv = true
exodus = true
[]
(modules/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/porous_flow/test/tests/poro_elasticity/pp_generation_action.i)
# Same as pp_generation.i, but using an Action
#
# A sample is constrained on all sides and its boundaries are
# also impermeable. Fluid is pumped into the sample via a
# volumetric source (ie kg/second per cubic meter), and the
# rise in porepressure is observed.
#
# Source = s (units = kg/m^3/second)
#
# Expect:
# fluid_mass = mass0 + s*t
# stress = 0 (remember this is effective stress)
# Porepressure = fluid_bulk*log(fluid_mass_density/density_P0), where fluid_mass_density = fluid_mass*porosity
# porosity = biot+(phi0-biot)*exp(pp(biot-1)/solid_bulk)
#
# Parameters:
# Biot coefficient = 0.3
# Phi0 = 0.1
# Solid Bulk modulus = 2
# fluid_bulk = 13
# density_P0 = 1
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.0
bulk_modulus = 13.0
viscosity = 1.0
density0 = 1.0
[]
[]
[PorousFlowUnsaturated]
coupling_type = HydroMechanical
displacements = 'disp_x disp_y disp_z'
porepressure = porepressure
biot_coefficient = 0.3
gravity = '0 0 0'
fp = the_simple_fluid
van_genuchten_alpha = 1.0
van_genuchten_m = 0.8
relative_permeability_type = Corey
relative_permeability_exponent = 0.0
save_component_rate_in = nodal_kg_per_s
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[]
[]
[Kernels]
[source]
type = BodyForce
function = 0.1
variable = porepressure
[]
[]
[AuxVariables]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[nodal_kg_per_s]
[]
[]
[AuxKernels]
[porosity]
type = PorousFlowPropertyAux
variable = porosity
property = porosity
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = ComputeLinearElasticStress
[]
[porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
porosity_zero = 0.1
biot_coefficient = 0.3
solid_bulk = 2
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 1 0 0 0 1' # unimportant
[]
[]
[Functions]
[porosity_analytic]
type = ParsedFunction
expression = 'biot+(phi0-biot)*exp(pp*(biot-1)/bulk)'
symbol_names = 'biot phi0 pp bulk'
symbol_values = '0.3 0.1 p0 2'
[]
[]
[Postprocessors]
[nodal_kg_per_s]
type = PointValue
outputs = csv
point = '0 0 0'
variable = nodal_kg_per_s
[]
[fluid_mass]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'initial timestep_end'
[]
[porosity]
type = PointValue
outputs = 'console csv'
point = '0 0 0'
variable = porosity
[]
[p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
[]
[porosity_analytic]
type = FunctionValuePostprocessor
function = porosity_analytic
[]
[zdisp]
type = PointValue
outputs = csv
point = '0 0 0.5'
variable = disp_z
[]
[stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[]
[stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[]
[stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-14 1E-10 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = pp_generation_action
csv = true
[]
(test/tests/dampers/min_damping/min_nodal_damping.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./u_dt]
type = TimeDerivative
variable = u
[../]
[./u_source]
type = BodyForce
variable = u
value = 1
[../]
[]
[BCs]
[./u_left]
type = DirichletBC
boundary = left
variable = u
value = 0.0
[../]
[]
[Dampers]
[./limit]
type = BoundingValueNodalDamper
variable = u
max_value = 1.5
min_value = -1.5
min_damping = 0.001
[../]
[]
[Executioner]
type = Transient
num_steps = 2
[]
[Postprocessors]
[./u_avg]
type = ElementAverageValue
variable = u
[../]
[./dt]
type = TimestepSize
[../]
[]
(test/tests/bcs/nodal_normals/cylinder_hexes_2nd.i)
[Mesh]
file = cylinder-hexes-2nd.e
[]
[Functions]
[./all_bc_fn]
type = ParsedFunction
expression = x*x+y*y
[../]
[./f_fn]
type = ParsedFunction
expression = -4
[../]
[]
[NodalNormals]
boundary = '1'
corner_boundary = 100
order = SECOND
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = f_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = 'all_bc_fn'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-13
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/porous_flow/test/tests/energy_conservation/heat04_action_KT.i)
# heat04, but using an action with KT stabilization.
# See heat04.i for a full discussion of the results.
# The KT stabilization should have no impact as there is no flow, but this input file checks that MOOSE runs.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.5
cv = 2
cp = 2
bulk_modulus = 2.0
density0 = 3.0
[]
[]
[PorousFlowUnsaturated]
coupling_type = ThermoHydroMechanical
displacements = 'disp_x disp_y disp_z'
porepressure = pp
temperature = temp
dictator_name = Sir
biot_coefficient = 1.0
gravity = '0 0 0'
fp = the_simple_fluid
van_genuchten_alpha = 1.0E-12
van_genuchten_m = 0.5
relative_permeability_type = Corey
relative_permeability_exponent = 0.0
stabilization = KT
flux_limiter_type = superbee
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = Sir
block = 0
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[pp]
[]
[temp]
[]
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[]
[]
[Kernels]
[heat_source]
type = BodyForce
function = 1
variable = temp
[]
[]
[Functions]
[err_T_fcn]
type = ParsedFunction
symbol_names = 'por0 rte temp rd rhc m0 fhc source'
symbol_values = '0.5 0.25 t0 5 0.2 1.5 2 1'
expression = '((1-por0)*exp(rte*temp)*rd*rhc*temp+m0*fhc*temp-source*t)/(source*t)'
[]
[err_pp_fcn]
type = ParsedFunction
symbol_names = 'por0 rte temp rd rhc m0 fhc source bulk pp fte'
symbol_values = '0.5 0.25 t0 5 0.2 1.5 2 1 2 p0 0.5'
expression = '(bulk*(fte*temp-log(1+(por0-1)*exp(rte*temp))+log(por0))-pp)/pp'
[]
[]
[AuxVariables]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = ComputeLinearElasticStress
[]
[porosity]
type = PorousFlowPorosity
thermal = true
fluid = true
mechanical = true
ensure_positive = false
biot_coefficient = 1.0
porosity_zero = 0.5
thermal_expansion_coeff = 0.25
solid_bulk = 2
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 0.2
density = 5.0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0 0 0 0 0 0 0 0 0'
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0 0 0 0 0 0 0 0 0'
[]
[]
[Postprocessors]
[p0]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = pp
[]
[t0]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = temp
[]
[porosity]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = porosity
[]
[stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[]
[stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[]
[stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[]
[fluid_mass]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'timestep_end'
outputs = 'console csv'
[]
[total_heat]
type = PorousFlowHeatEnergy
phase = 0
execute_on = 'timestep_end'
outputs = 'console csv'
[]
[err_T]
type = FunctionValuePostprocessor
function = err_T_fcn
[]
[err_P]
type = FunctionValuePostprocessor
function = err_pp_fcn
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-12 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 5
[]
[Outputs]
execute_on = 'initial timestep_end'
file_base = heat04_action
csv = true
[]
(test/tests/userobjects/nearest_point_layered_average/nearest_radius_layered_average.i)
# This input tests the NearestRadiusLayeredAverage object by taking the average
# of layered rings and using the variable u(x,y,x) = r + z, where r sqrt(x^2 + y^2)
# Given a ring of inner and outer radii r1 and r2, respectively, and of height z1 and z2,
# the analytical solution is given by:
# avg(r1,r2,z1,z2) = 2/3 * (r1^2 + r1*r2 + r2^2) / (r1 + r2) + (z1 + z2) / 2
# Convergence to these values as num_sectors is increased is verified.
[Mesh]
[./ccmg]
type = ConcentricCircleMeshGenerator
num_sectors = 8
radii = '0.1 0.2 0.3 0.4 0.5'
rings = '2 2 2 2 2'
has_outer_square = false
preserve_volumes = true
smoothing_max_it = 3
[]
[./extruder]
type = MeshExtruderGenerator
input = ccmg
extrusion_vector = '0 0 1'
num_layers = 4
[]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ring_average]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./reac]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = func
[../]
[]
[Functions]
[func]
type = ParsedFunction
expression = 'sqrt(x * x + y * y) + z'
[]
[]
[AuxKernels]
[./np_layered_average]
type = SpatialUserObjectAux
variable = ring_average
execute_on = timestep_end
user_object = nrla
[../]
[]
[UserObjects]
[./nrla]
type = NearestRadiusLayeredAverage
direction = z
num_layers = 2
points = '0.05 0 0
0.15 0 0
0.25 0 0
0.35 0 0
0.45 0 0'
variable = u
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(tutorials/tutorial02_multiapps/step02_transfers/04_parent_multiscale.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[vt]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 0.2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[micro]
type = TransientMultiApp
positions = '0.15 0.15 0 0.45 0.45 0 0.75 0.75 0'
input_files = '04_sub_multiscale.i'
cli_args = 'BCs/right/value=1 BCs/right/value=2 BCs/right/value=3'
execute_on = timestep_end
output_in_position = true
[]
[]
[Transfers]
[push_u]
type = MultiAppVariableValueSampleTransfer
to_multi_app = micro
source_variable = u
variable = ut
[]
[pull_v]
type = MultiAppPostprocessorInterpolationTransfer
from_multi_app = micro
variable = vt
postprocessor = average_v
[]
[]
(modules/porous_flow/test/tests/poro_elasticity/pp_generation.i)
# A sample is constrained on all sides and its boundaries are
# also impermeable. Fluid is pumped into the sample via a
# volumetric source (ie kg/second per cubic meter), and the
# rise in porepressure is observed.
#
# Source = s (units = kg/m^3/second)
#
# Expect:
# fluid_mass = mass0 + s*t
# stress = 0 (remember this is effective stress)
# Porepressure = fluid_bulk*log(fluid_mass_density/density_P0), where fluid_mass_density = fluid_mass*porosity
# porosity = biot+(phi0-biot)*exp(pp(biot-1)/solid_bulk)
#
# Parameters:
# Biot coefficient = 0.3
# Phi0 = 0.1
# Solid Bulk modulus = 2
# fluid_bulk = 13
# density_P0 = 1
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[]
[]
[Kernels]
[grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
[]
[grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
[]
[grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
component = 2
[]
[poro_x]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
variable = disp_x
component = 0
[]
[poro_y]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
variable = disp_y
component = 1
[]
[poro_z]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
component = 2
variable = disp_z
[]
[poro_vol_exp]
type = PorousFlowMassVolumetricExpansion
variable = porepressure
fluid_component = 0
[]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = porepressure
[]
[flux]
type = PorousFlowAdvectiveFlux
variable = porepressure
gravity = '0 0 0'
fluid_component = 0
[]
[source]
type = BodyForce
function = 0.1
variable = porepressure
[]
[]
[AuxVariables]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xz]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_yz]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[]
[porosity]
type = PorousFlowPropertyAux
variable = porosity
property = porosity
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 13
density0 = 1
thermal_expansion = 0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = ComputeLinearElasticStress
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = porepressure
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
porosity_zero = 0.1
biot_coefficient = 0.3
solid_bulk = 2
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 1 0 0 0 1' # unimportant
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 0 # unimportant in this fully-saturated situation
phase = 0
[]
[]
[Functions]
[porosity_analytic]
type = ParsedFunction
expression = 'biot+(phi0-biot)*exp(pp*(biot-1)/bulk)'
symbol_names = 'biot phi0 pp bulk'
symbol_values = '0.3 0.1 p0 2'
[]
[]
[Postprocessors]
[fluid_mass]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'initial timestep_end'
[]
[porosity]
type = PointValue
outputs = 'console csv'
point = '0 0 0'
variable = porosity
[]
[p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
[]
[porosity_analytic]
type = FunctionValuePostprocessor
function = porosity_analytic
[]
[zdisp]
type = PointValue
outputs = csv
point = '0 0 0.5'
variable = disp_z
[]
[stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[]
[stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[]
[stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_max_it -snes_stol'
petsc_options_value = 'bcgs bjacobi 10000 1E-11'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = pp_generation
[csv]
type = CSV
[]
[]
(modules/stochastic_tools/examples/sobol/diffusion.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables/T]
initial_condition = 300
[]
[Kernels]
[time]
type = ADTimeDerivative
variable = T
[]
[diff]
type = ADMatDiffusion
variable = T
diffusivity = diffusivity
[]
[source]
type = ADBodyForce
variable = T
value = 100
function = 1
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = T
boundary = left
value = 300
[]
[right]
type = ADNeumannBC
variable = T
boundary = right
value = -100
[]
[]
[Materials/constant]
type = ADGenericConstantMaterial
prop_names = 'diffusivity'
prop_values = 1
[]
[Executioner]
type = Transient
solve_type = NEWTON
num_steps = 4
dt = 0.25
[]
[Postprocessors]
[T_avg]
type = ElementAverageValue
variable = T
execute_on = 'initial timestep_end'
[]
[q_left]
type = ADSideDiffusiveFluxAverage
variable = T
boundary = left
diffusivity = diffusivity
execute_on = 'initial timestep_end'
[]
[]
[Controls/stochastic]
type = SamplerReceiver
[]
[Outputs]
[]
(test/tests/dampers/interactions/interacting_node_elem_dampers.i)
# This model tests interactions between nodal and element dampers.
# The test verifies that the minimum of the value of a nodal and
# element damper is always used.
# If run with the nodal1 and elem1 dampers active, the element damper
# will govern. With nodal2 and elem2 dampers, the nodal damper governs.
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./source]
type = BodyForce
variable = u
function = 't'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Dampers]
active = 'nodal1 elem1'
[./nodal1]
#gives a damping of 0.3333 on step 6
type = BoundingValueNodalDamper
min_value = 0.0
max_value = 1.0
variable = u
[../]
[./elem1]
#gives a damping of 0.141536 on step 6
type = BoundingValueElementDamper
min_value = 0.0
max_value = 1.012
variable = u
[../]
[./nodal2]
#gives a damping of 0.3333 on step 6
type = BoundingValueNodalDamper
min_value = 0.0
max_value = 1.0
variable = u
[../]
[./elem2]
#gives a damping of 0.743318 on step 6
type = BoundingValueElementDamper
min_value = 0.0
max_value = 1.02
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
end_time = 3.0
dt = 0.5
dtmin = 0.5
nl_max_its = 5
[]
(test/tests/problems/reference_residual_problem/reference_residual.i)
coef=1
[Mesh]
type = GeneratedMesh
dim = 1
nx = 2
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
[]
[Variables]
[u][]
[v][]
[]
[Kernels]
[u_diff]
type = CoefDiffusion
variable = u
coef = ${coef}
[]
[u_rxn]
type = PReaction
variable = u
coefficient = ${coef}
power = 2
[]
[u_f]
type = BodyForce
variable = u
value = ${coef}
[]
[v_diff]
type = Diffusion
variable = v
[]
[v_rxn]
type = PReaction
variable = v
coefficient = 1
power = 2
[]
[v_f]
type = BodyForce
variable = v
value = 1
[]
[]
[BCs]
[u]
type = RobinBC
boundary = 'left right'
coef = ${coef}
variable = u
extra_vector_tags = 'ref'
[]
[v]
type = RobinBC
boundary = 'left right'
coef = 1
variable = v
extra_vector_tags = 'ref'
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(tutorials/tutorial02_multiapps/step01_multiapps/03_parent_subcycle.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 1.
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
type = TransientMultiApp
positions = '0 0 0'
input_files = '03_sub_subcycle.i'
sub_cycling = true
# output_sub_cycles = true
[]
[]
(test/tests/restart/restart_transient_from_steady/restart_trans_with_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Problem]
restart_file_base = steady_with_sub_out_cp/LATEST
[]
[AuxVariables]
[Tf]
[]
[]
[Variables]
[power_density]
[]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2' # increase this function to drive transient
[]
[]
[Kernels]
[timedt]
type = TimeDerivative
variable = power_density
[]
[diff]
type = Diffusion
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[BCs]
[left]
type = DirichletBC
variable = power_density
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = power_density
boundary = right
value = 1e3
[]
[]
[Postprocessors]
[pwr_avg]
type = ElementAverageValue
block = '0'
variable = power_density
execute_on = 'initial timestep_end'
[]
[temp_avg]
type = ElementAverageValue
variable = Tf
block = '0'
execute_on = 'initial timestep_end'
[]
[temp_max]
type = ElementExtremeValue
value_type = max
variable = Tf
block = '0'
execute_on = 'initial timestep_end'
[]
[temp_min]
type = ElementExtremeValue
value_type = min
variable = Tf
block = '0'
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 3
dt = 1.0
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-7
fixed_point_rel_tol = 1e-7
fixed_point_abs_tol = 1e-07
fixed_point_max_its = 4
line_search = none
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = restart_trans_with_sub_sub.i
execute_on = 'timestep_end'
[../]
[]
[Transfers]
[p_to_sub]
type = MultiAppShapeEvaluationTransfer
source_variable = power_density
variable = power_density
to_multi_app = sub
execute_on = 'timestep_end'
[]
[t_from_sub]
type = MultiAppShapeEvaluationTransfer
source_variable = temp
variable = Tf
from_multi_app = sub
execute_on = 'timestep_end'
[]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/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/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
# [../]
#[]
(test/tests/auxkernels/mesh_integer/mesh_integer.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 5
ny = 5
extra_element_integers = 'material_id'
[]
[set_material_id0]
type = SubdomainBoundingBoxGenerator
input = gmg
bottom_left = '0 0 0'
top_right = '0.8 0.6 0'
block_id = 0
location = INSIDE
integer_name = material_id
[]
[set_material_id1]
type = SubdomainBoundingBoxGenerator
input = set_material_id0
bottom_left = '0 0 0'
top_right = '0.8 0.6 0'
block_id = 1
location = OUTSIDE
integer_name = material_id
[]
[]
[Variables]
[u][]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = dc
[]
[timederivative]
type = TimeDerivative
variable = u
[]
[sourceterm]
type = BodyForce
variable = u
function = 1
[]
[]
[AuxVariables]
[id]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[id]
type = ElementIntegerAux
variable = id
integer_names = material_id
[]
[]
[BCs]
[vacuum]
type = VacuumBC
variable = u
boundary = 'right left top bottom'
[]
[]
[Materials]
[dc]
type = ConstantIDMaterial
prop_name = dc
prop_values = '1 2'
id_name = material_id
[]
[]
[Postprocessors]
[unorm]
type = ElementL2Norm
variable = u
[]
[]
[Executioner]
type = Transient
end_time = 0.1
dt = 0.01
nl_abs_tol = 1.e-15
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/restart/restart_subapp_not_parent/two_step_solve_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*t*(x*x+y*y)
[../]
[./forcing_fn]
type = ParsedFunction
expression = 2*t*(x*x+y*y)-4*t*t
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]
[ICs]
[./u_var]
type = FunctionIC
variable = u
function = exact_fn
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[../]
[]
[Postprocessors]
[./average]
type = ElementAverageValue
variable = u
[../]
[]
[Executioner]
type = Transient
start_time = 0.0
end_time = 2.0
dt = 1.0
[]
[Outputs]
[./checkpoint]
type = Checkpoint
num_files = 3
[../]
[]
(modules/stochastic_tools/examples/surrogates/combined/trans_diff_2d/trans_diff_sub.i)
[Functions]
[src_func]
type = ParsedFunction
expression = "1000*sin(f*t)"
symbol_names = 'f'
symbol_values = '20'
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 2
nx = 100
xmin = -0.5
xmax = 0.5
ny = 100
ymin = -0.5
ymax = 0.5
[]
[source_domain]
type = ParsedSubdomainMeshGenerator
input = msh
combinatorial_geometry = '(x<0.1 & x>-0.1) & (y<0.1 & y>-0.1)'
block_id=1
[]
[]
[Variables]
[T]
initial_condition = 300
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = T
diffusivity = diff_coeff
[]
[source]
type = BodyForce
variable = T
function = src_func
block = 1
[]
[time_deriv]
type = TimeDerivative
variable = T
[]
[]
[Materials]
[diff_coeff]
type = ParsedMaterial
property_name = diff_coeff
coupled_variables = 'T'
constant_names = 'C'
constant_expressions = 0.02
expression = 'C * pow(300/T, 2)'
[]
[]
[BCs]
[neumann_all]
type = NeumannBC
variable = T
boundary = 'left right top bottom'
value = 0
[]
[]
[Executioner]
type = Transient
num_steps = 100
dt = 0.01
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_rel_tol = 1e-6
l_abs_tol = 1e-6
timestep_tolerance = 1e-6
[]
[Postprocessors]
[max]
type = NodalExtremeValue
variable = T
[]
[min]
type = NodalExtremeValue
variable = T
value_type = min
[]
[time_max]
type = TimeExtremeValue
postprocessor = max
[]
[time_min]
type = TimeExtremeValue
postprocessor = min
value_type = min
[]
[]
(test/tests/dgkernels/dg_block_restrict/2d_dg_diffusion_block_restrict.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmax = 2
nx = 10
ymax = 2
ny = 10
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
block_id = 1
top_right = '1 1 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '1'
paired_block = '0'
new_boundary = 'primary1_interface'
[]
[boundaries]
input = interface
type = BreakBoundaryOnSubdomainGenerator
boundaries = 'left bottom'
[]
[]
[Variables]
[u]
order = FIRST
family = L2_LAGRANGE
block = 1
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[source]
type = BodyForce
variable = u
[]
[]
[DGKernels]
[dg_diffusion]
type = DGDiffusion
variable = u
sigma = 4
epsilon = 1
[]
[]
[BCs]
[vacuum]
type = VacuumBC
variable = u
boundary = 'left_to_1 bottom_to_1'
[]
[primary1_inteface]
type = VacuumBC
variable = u
boundary = 'primary1_interface'
[]
[]
[Postprocessors]
[norm]
type = ElementL2Norm
variable = u
block = 1
[]
[]
[Executioner]
type = Steady
nl_abs_tol = 1e-12
[]
[Problem]
kernel_coverage_check = false
[]
[Outputs]
exodus = true
[]
(test/tests/controls/libtorch_nn_control/read_control.i)
pi = 3.14159265359
period = 0.25
diff_coeff = 0.5
cp = 1.0
[Functions]
[src_func]
type = ParsedFunction
value = "sin(${pi}/${period}*t)"
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 2
nx = 20
xmin = -0.5
xmax = 0.5
ny = 20
ymin = -0.5
ymax = 0.5
[]
[source_domain]
type = ParsedSubdomainMeshGenerator
input = msh
combinatorial_geometry = '(x<0.2 & x>-0.2) & (y<0.2 & y>-0.2)'
block_id = 1
[]
[]
[Variables]
[T]
initial_condition = 1
[]
[]
[Kernels]
[diffusion]
type = CoefDiffusion
variable = T
coef = ${diff_coeff}
[]
[source]
type = BodyForce
variable = T
function = src_func
block = 1
[]
[anti_source]
type = BodyForce
variable = T
value = 0
block = 1
[]
[time_deriv]
type = CoefTimeDerivative
Coefficient = ${cp}
variable = T
[]
[]
[BCs]
[neumann_rest]
type = NeumannBC
variable = T
boundary = 'left right top bottom'
value = 0
[]
[]
[Executioner]
type = Transient
num_steps = 25
dt = 0.1
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_abs_tol = 1e-12
line_search = 'none'
[]
[Postprocessors]
[T_max]
type = NodalExtremeValue
variable = T
execute_on = 'INITIAL TIMESTEP_END'
[]
[control_value]
type = LibtorchControlValuePostprocessor
control_name = src_control
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Controls]
[src_control]
type = LibtorchNeuralNetControl
parameters = "Kernels/anti_source/value"
responses = 'T_max'
[]
[]
[Reporters]
inactive = 'nn_parameters'
[T_reporter]
type = AccumulateReporter
reporters = 'T_max/value control_value/value'
outputs = csv_out
[]
[nn_parameters]
type = LibtorchArtificialNeuralNetParameters
control_name = src_control
execute_on = FINAL
outputs = json_out
[]
[]
[Outputs]
[csv_out]
type = CSV
execute_on = FINAL
[]
[json_out]
type = JSON
execute_on = FINAL
execute_system_information_on = NONE
[]
[]
(test/tests/constraints/overwrite_variables/test_balance.i)
# Test to exemplify the use of overwriting of variables in the framework.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e3
use_displaced_mesh = true
[]
[Mesh]
[block_one]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = 4.5
xmax = 5.5
ymin = 4.5
ymax = 5.5
zmin = 0.0001
zmax = 1.0001
boundary_name_prefix = 'ball'
[]
[block_two]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
xmin = 0.0
xmax = 10
ymin = 0.0
ymax = 10
zmin = -2
zmax = 0
boundary_name_prefix = 'base'
boundary_id_offset = 10
[]
[block_one_id]
type = SubdomainIDGenerator
input = block_one
subdomain_id = 1
[]
[block_two_id]
type = SubdomainIDGenerator
input = block_two
subdomain_id = 2
[]
[combine]
type = MeshCollectionGenerator
inputs = ' block_one_id block_two_id'
[]
allow_renumbering = false
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[AuxVariables]
[vel_x]
[]
[accel_x]
[]
[vel_y]
[]
[accel_y]
[]
[vel_z]
[]
[accel_z]
[]
[gap_rate]
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[vel_x]
type = TimeDerivative
variable = disp_x
[]
[vel_y]
type = TimeDerivative
variable = disp_y
[]
[vel_z]
type = TimeDerivative
variable = disp_z
[]
[source_m]
type = BodyForce
variable = disp_z
value = -100
[]
[]
[BCs]
[x_front]
type = DirichletBC
variable = disp_x
boundary = 'ball_front'
preset = false
value = 0.0
[]
[y_front]
type = DirichletBC
variable = disp_y
boundary = 'ball_front'
preset = false
value = 0.0
[]
[x_fixed]
type = DirichletBC
variable = disp_x
boundary = 'base_back'
value = 0.0
preset = true
[]
[y_fixed]
type = DirichletBC
variable = disp_y
boundary = 'base_back'
value = 0.0
preset = true
[]
[z_fixed]
type = DirichletBC
variable = disp_z
boundary = 'base_back'
value = 0.0
preset = true
[]
[z_fixed_front]
type = DirichletBC
variable = disp_z
boundary = 'base_front'
value = 0.0
preset = true
[]
[]
[Constraints]
[overwrite]
type = ExplicitDynamicsOverwrite
model = frictionless_balance
primary = base_front
secondary = ball_back
vel_x = 'vel_x'
vel_y = 'vel_y'
vel_z = 'vel_z'
primary_variable = disp_x
boundary = 'base_front'
component = 0
variable = disp_x
gap_rate = gap_rate
[]
[]
[Materials]
[density_one]
type = GenericConstantMaterial
prop_names = density
prop_values = 1e5
outputs = 'exodus'
output_properties = 'density'
block = '1'
[]
[density_two]
type = GenericConstantMaterial
prop_names = density
prop_values = 1e5
outputs = 'exodus'
output_properties = 'density'
block = '2'
[]
[]
[Executioner]
type = Transient
start_time = -0.01
end_time = -0.008
dt = 1.0e-5
timestep_tolerance = 1e-6
[TimeIntegrator]
type = CentralDifference
solve_type = lumped
[]
[]
[Outputs]
interval = 50
exodus = true
csv = true
[]
[Postprocessors]
[]
(test/tests/dgkernels/2d_diffusion_dg/dg_stateful.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[../]
[./exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./abs]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGKernels]
[./dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[../]
[]
[BCs]
[./all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[]
[Materials]
[./stateful]
type = StatefulMaterial
initial_diffusivity = 1
boundary = 'left'
[../]
[./general]
type = GenericConstantMaterial
block = '0'
prop_names = 'dummy'
prop_values = '1'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-10
[]
(tutorials/tutorial02_multiapps/step03_coupling/03_parent_subcycling_picard.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[vt]
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Materials]
[diff]
type = ParsedMaterial
property_name = D
coupled_variables = 'vt'
expression = 'vt'
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 0.2
fixed_point_max_its = 10
nl_abs_tol = 1e-10
fixed_point_rel_tol = 1e-6
fixed_point_abs_tol = 1e-10
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[micro]
type = TransientMultiApp
positions = '0.15 0.15 0 0.45 0.45 0 0.75 0.75 0'
input_files = '03_sub_subcycling_picard.i'
execute_on = timestep_end
output_in_position = true
sub_cycling = true
[]
[]
[Transfers]
[push_u]
type = MultiAppVariableValueSampleTransfer
to_multi_app = micro
source_variable = u
variable = ut
[]
[pull_v]
type = MultiAppPostprocessorInterpolationTransfer
from_multi_app = micro
variable = vt
postprocessor = average_v
[]
[]
(test/tests/misc/check_error/coupled_grad_without_declare.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Functions]
[forcing_fnu]
type = ParsedFunction
expression = -5.8*(x+y)+x*x*x-x+y*y*y-y
[]
[forcing_fnv]
type = ParsedFunction
expression = -4
[]
[slnu]
type = ParsedGradFunction
expression = x*x*x-x+y*y*y-y
grad_x = 3*x*x-1
grad_y = 3*y*y-1
[]
[slnv]
type = ParsedGradFunction
expression = x*x+y*y
grad_x = 2*x
grad_y = 2*y
[]
#NeumannBC functions
[bc_fnut]
type = ParsedFunction
expression = 3*y*y-1
[]
[bc_fnub]
type = ParsedFunction
expression = -3*y*y+1
[]
[bc_fnul]
type = ParsedFunction
expression = -3*x*x+1
[]
[bc_fnur]
type = ParsedFunction
expression = 3*x*x-1
[]
[]
[Variables]
[u]
order = THIRD
family = HIERARCHIC
[]
[v]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
active = 'diff1 diff2 test1 forceu forcev react'
[diff1]
type = Diffusion
variable = u
[]
[test1]
type = CoupledConvection
variable = u
velocity_vector = v
# Trigger the error in this class
test_coupling_declaration_error = true
[]
[diff2]
type = Diffusion
variable = v
[]
[react]
type = Reaction
variable = u
[]
[forceu]
type = BodyForce
variable = u
function = forcing_fnu
[]
[forcev]
type = BodyForce
variable = v
function = forcing_fnv
[]
[]
[BCs]
active = 'bc_u_tb bc_v bc_ul bc_ur bc_ut bc_ub'
[bc_u]
type = FunctionPenaltyDirichletBC
variable = u
function = slnu
boundary = 'left right top bottom'
penalty = 1e6
[]
[bc_v]
type = FunctionDirichletBC
variable = v
function = slnv
boundary = 'left right top bottom'
[]
[bc_u_lr]
type = FunctionPenaltyDirichletBC
variable = u
function = slnu
boundary = 'left right top bottom'
penalty = 1e6
[]
[bc_u_tb]
type = CoupledKernelGradBC
variable = u
var2 = v
vel = '0.1 0.1'
boundary = 'top bottom left right'
[]
[bc_ul]
type = FunctionNeumannBC
variable = u
function = bc_fnul
boundary = 'left'
[]
[bc_ur]
type = FunctionNeumannBC
variable = u
function = bc_fnur
boundary = 'right'
[]
[bc_ut]
type = FunctionNeumannBC
variable = u
function = bc_fnut
boundary = 'top'
[]
[bc_ub]
type = FunctionNeumannBC
variable = u
function = bc_fnub
boundary = 'bottom'
[]
[]
[Preconditioning]
active = ' '
[prec]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'L2u L2v'
[dofs]
type = NumDOFs
[]
[h]
type = AverageElementSize
[]
[L2u]
type = ElementL2Error
variable = u
function = slnu
[]
[L2v]
type = ElementL2Error
variable = v
function = slnv
[]
[H1error]
type = ElementH1Error
variable = u
function = solution
[]
[H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-15
nl_abs_tol = 1e-13
[]
[Outputs]
execute_on = 'timestep_end'
[]
[Debug]
show_var_residual_norms = true
[]
(test/tests/restart/restart_add_variable/transient_with_stateful.i)
# We run a simple problem (5 time steps and save off the solution)
# In part2, we load the solution and solve a steady problem. The test check, that the initial state in part 2 is the same as the last state from part1
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[./forcing_fn]
type = ParsedFunction
expression = -4+(x*x+y*y)
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./diffusivity]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./out_diffusivity]
type = MaterialRealAux
variable = diffusivity
property = diffusivity
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = MatDiffusionTest
variable = u
prop_name = diffusivity
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Materials]
[./mat]
type = StatefulMaterial
block = 0
initial_diffusivity = 0.5
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.2
start_time = 0
num_steps = 5
[]
[Outputs]
checkpoint = true
[./out]
type = Exodus
elemental_as_nodal = true
execute_elemental_on = none
[../]
[]
(test/tests/kernels/ad_2d_diffusion/2d_diffusion_bodyforce_test.i)
###########################################################
# This is a simple test of the Kernel System.
# It solves the Laplacian equation on a small 2x2 grid.
# The "Diffusion" kernel is used to calculate the
# residuals of the weak form of this operator. The
# "BodyForce" kernel is used to apply a time-dependent
# volumetric source.
###########################################################
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = ADDiffusion
variable = u
[../]
[./bf]
type = ADBodyForce
variable = u
postprocessor = ramp
[../]
[]
[Functions]
[./ramp]
type = ParsedFunction
expression = 't'
[../]
[]
[Postprocessors]
[./ramp]
type = FunctionValuePostprocessor
function = ramp
execute_on = linear
[../]
[]
[BCs]
active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[]
[Executioner]
type = Transient
dt = 1.0
end_time = 1.0
solve_type = 'NEWTON'
[]
[Outputs]
file_base = bodyforce_out
exodus = true
[]
(test/tests/userobjects/nearest_point_layered_average/radius_points_from_uo.i)
[Mesh]
[ccmg]
type = ConcentricCircleMeshGenerator
num_sectors = 8
radii = '0.1 0.2 0.3 0.4 0.5'
rings = '2 2 2 2 2'
has_outer_square = false
preserve_volumes = true
smoothing_max_it = 3
[]
[extruder]
type = MeshExtruderGenerator
input = ccmg
extrusion_vector = '0 0 1'
num_layers = 4
[]
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[ring_average]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[reac]
type = Reaction
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = func
[]
[]
[Functions]
[func]
type = ParsedFunction
expression = 'sqrt(x * x + y * y) + z'
[]
[]
[AuxKernels]
[np_layered_average]
type = SpatialUserObjectAux
variable = ring_average
execute_on = timestep_end
user_object = nrla
[]
[]
[UserObjects]
[nrla]
type = NearestRadiusLayeredAverage
direction = z
num_layers = 2
points = '0.05 0 0
0.15 0 0
0.25 0 0
0.35 0 0
0.45 0 0'
variable = u
[]
[]
[VectorPostprocessors]
# getting the points from the user object itself is here exactly equivalent to the points
# provided in the 'spatial_manually_provided' vector postprocessor
[spatial_from_uo]
type = SpatialUserObjectVectorPostprocessor
userobject = nrla
[]
[spatial_manually_provided]
type = SpatialUserObjectVectorPostprocessor
userobject = nrla
points = '0.05 0 0.25
0.05 0 0.75
0.15 0 0.25
0.15 0 0.75
0.25 0 0.25
0.25 0 0.75
0.35 0 0.25
0.35 0 0.75
0.45 0 0.25
0.45 0 0.75'
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
exodus = true
execute_on = final
[]
(test/tests/restart/restart_add_variable/add_variable_restart.i)
# Use the exodus file for restarting the problem:
# - restart one variable
# - and have one extra variable
# - have PBP active to have more system in Equation system
#
[Mesh]
file = transient_with_stateful_out.e
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[./forcing_fn]
type = ParsedFunction
expression = -4+(x*x+y*y)
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./diffusivity]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./out_diffusivity]
type = MaterialRealAux
variable = diffusivity
property = diffusivity
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = MatDiffusionTest
variable = u
prop_name = diffusivity
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[Materials]
[./mat]
type = StatefulMaterial
block = 0
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left_v]
type = DirichletBC
variable = v
boundary = '3'
value = 0
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '1'
value = 1
[../]
[]
[Preconditioning]
[./PBP]
type = PBP
solve_order = 'u v'
preconditioner = 'AMG AMG'
[../]
[]
[Executioner]
type = Transient
solve_type = JFNK
dt = 0.1
reset_dt = true #NECESSARY to force a change in DT when using restart!
num_steps = 3
[]
[Outputs]
[./out]
type = Exodus
elemental_as_nodal = true
execute_elemental_on = none
[../]
[]
[Problem]
restart_file_base = transient_with_stateful_out_cp/LATEST
[]
(modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_convection/plate.parent.i)
# This tests a temperature and heat transfer coefficient using the MultiApp system.
# Simple heat conduction problem with heat source is solved,
# to obtain an analytical solution:
# T(x,t) = 300 + 20t(x-1)^2
# The temperature is picked up by the child
# side of the solve, to use as ambiant temperature in a convective BC.
htc = 100
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 1
nx = 10
[]
[Functions]
[left_bc_fn]
type = PiecewiseLinear
x = '0 10'
y = '300 500'
[]
[]
[Variables]
[T]
[]
[]
[AuxVariables]
[htc_ext]
initial_condition = ${htc}
[]
[]
[Functions]
[source_term]
type = ParsedFunction
expression = '20 * x * x - 40 * x + 20 - 40 * t'
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T
value = 300
[]
[]
[Kernels]
[td]
type = ADTimeDerivative
variable = T
[]
[diff]
type = ADDiffusion
variable = T
[]
[source]
type = BodyForce
function = 'source_term'
variable = T
[]
[]
[BCs]
[left]
type = FunctionDirichletBC
variable = T
boundary = left
function = left_bc_fn
[]
[right]
type = NeumannBC
variable = T
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
dt = 0.5
end_time = 10
nl_abs_tol = 1e-10
abort_on_solve_fail = true
[]
[MultiApps]
[thm]
type = TransientMultiApp
app_type = ThermalHydraulicsApp
input_files = plate.i
execute_on = TIMESTEP_END
[]
[]
[Transfers]
[T_to_child]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = thm
source_variable = T
variable = T_ext
[]
[htc_to_child]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = thm
source_variable = htc_ext
variable = htc_ext
[]
[]
[Outputs]
exodus = true
[]
(modules/functional_expansion_tools/examples/2D_interface_different_submesh/main.i)
# Derived from the example '2D_interface' with the following differences:
#
# 1) The number of y divisions in the sub app is not the same as the master app
# 2) The subapp mesh is skewed in y
# 3) The Functional Expansion order for the flux term was increased to 7
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0.0
xmax = 0.4
nx = 6
ymin = 0.0
ymax = 10.0
ny = 20
[]
[Variables]
[./m]
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./source_m]
type = BodyForce
variable = m
value = 100
[../]
[]
[Materials]
[./Impervium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '0.00001 50.0 100.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
value = 2
variable = m
[../]
[]
[BCs]
[./interface_value]
type = FXValueBC
variable = m
boundary = right
function = FX_Basis_Value_Main
[../]
[./interface_flux]
type = FXFluxBC
boundary = right
variable = m
function = FX_Basis_Flux_Main
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '4'
physical_bounds = '0.0 10'
y = Legendre
[../]
[./FX_Basis_Flux_Main]
type = FunctionSeries
series_type = Cartesian
orders = '7'
physical_bounds = '0.0 10'
y = Legendre
[../]
[]
[UserObjects]
[./FX_Flux_UserObject_Main]
type = FXBoundaryFluxUserObject
function = FX_Basis_Flux_Main
variable = m
boundary = right
diffusivity = thermal_conductivity
[../]
[]
[Postprocessors]
[./average_interface_value]
type = SideAverageValue
variable = m
boundary = right
[../]
[./total_flux]
type = SideDiffusiveFluxIntegral
variable = m
boundary = right
diffusivity = thermal_conductivity
[../]
[./picard_iterations]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1.0
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
sub_cycling = true
[../]
[]
[Transfers]
[./FluxToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Flux_UserObject_Main
multi_app_object_name = FX_Basis_Flux_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[./FluxToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Flux_Main
multi_app_object_name = FX_Flux_UserObject_Sub
[../]
[]
(test/tests/transfers/general_field/user_object/duplicated_user_object_tests/tosub_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 8
xmax = 0.1
ymax = 0.5
coord_type = rz
[]
[Variables]
[u]
initial_condition = 1
[]
[]
[AuxVariables]
[multi_layered_average]
[]
[element_multi_layered_average]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[axial_force]
type = ParsedFunction
expression = 1000*y
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[force]
type = BodyForce
variable = u
function = axial_force
[]
[]
[BCs]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.001
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_temperature/phy.parent.i)
# This tests a transfer of temperature values computed by master app and used by a child app
# as a heat structure boundary condition
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 1
nx = 10
[]
[Functions]
[T_bc_fn]
type = ParsedFunction
expression = '300+t*x*10'
[]
[T_ffn]
type = ParsedFunction
expression = 'x*10'
[]
[]
[Variables]
[T]
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T
value = 300
[]
[]
[Kernels]
[td]
type = ADTimeDerivative
variable = T
[]
[diff]
type = ADDiffusion
variable = T
[]
[ffn]
type = BodyForce
variable = T
function = T_ffn
[]
[]
[BCs]
[left]
type = FunctionDirichletBC
variable = T
boundary = 'left right'
function = T_bc_fn
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 2
nl_abs_tol = 1e-10
abort_on_solve_fail = true
solve_type = NEWTON
[]
[MultiApps]
[thm]
type = TransientMultiApp
app_type = ThermalHydraulicsApp
input_files = phy.child.i
execute_on = 'initial timestep_end'
[]
[]
[Transfers]
[T_to_thm]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = thm
source_variable = T
variable = T_ext
to_boundaries = 'hs:outer'
[]
[]
[Outputs]
exodus = true
show = 'T'
[]
(python/peacock/tests/common/transient_with_date.i)
###########################################################
# This is a simple test with a time-dependent problem
# demonstrating the use of a "Transient" Executioner.
#
# @Requirement F1.10
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./dt]
type = TimestepSize
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
# Preconditioned JFNK (default)
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = with_date
exodus = true
[./with_date]
type = Exodus
file_base = with_date
append_date = true
append_date_format = '%Y-%m-%d'
[../]
[]
(test/tests/postprocessors/num_nodes/num_nodes.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
nz = 0
zmax = 0
elem_type = QUAD4
uniform_refine = 1
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./u_aux]
order = FIRST
family = LAGRANGE
[../]
[./v_aux]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 3
dt = 1
solve_type = PJFNK
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 3
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Postprocessors]
[./num_nodes]
type = NumNodes
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
csv = true
[]
(test/tests/multiapps/secant_postprocessor/steady_main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[source]
type = BodyForce
variable = u
value = 1
[]
[]
[BCs]
[left]
type = PostprocessorDirichletBC
variable = u
boundary = left
postprocessor = 'from_sub'
[]
[]
[Postprocessors]
[from_sub]
type = Receiver
default = 0
[]
[to_sub]
type = SideAverageValue
variable = u
boundary = right
[]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Steady
# Solve parameters
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
# App coupling parameters
fixed_point_algorithm = 'secant'
fixed_point_max_its = 100
transformed_postprocessors = 'from_sub'
[]
[Outputs]
csv = true
exodus = false
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = steady_sub.i
clone_parent_mesh = true
execute_on = 'timestep_begin'
# we keep the full postprocessor output history of the subapp
keep_full_output_history = true
transformed_postprocessors = 'from_main'
[]
[]
[Transfers]
[left_from_sub]
type = MultiAppPostprocessorTransfer
from_multi_app = sub
from_postprocessor = 'to_main'
to_postprocessor = 'from_sub'
reduction_type = 'average'
[]
[right_to_sub]
type = MultiAppPostprocessorTransfer
to_multi_app = sub
from_postprocessor = 'to_sub'
to_postprocessor = 'from_main'
[]
[]
(test/tests/meshgenerators/lower_d_block_generator/ids.i)
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[./lower_d_block]
type = LowerDBlockFromSidesetGenerator
input = gmg
new_block_id = 10
sidesets = '0 0 1 2 3'
[]
[]
[Variables]
[./u]
block = 0
[../]
[./v]
block = 10
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
block = 0
[../]
[./srcv]
type = BodyForce
block = 10
variable = v
function = 1
[../]
[./time_v]
type = TimeDerivative
block = 10
variable = v
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/domain-user-object/measure-conservation-interface.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[]
[Variables]
[u]
block = '0'
[]
[v]
block = '1'
[]
[]
[UserObjects]
[test]
type = InterfaceDomainUserObject
u = u
v = v
block = '0'
robin_boundaries = 'left'
interface_boundaries = 'primary0_interface'
interface_penalty = 1e6
nl_abs_tol = 1e-10
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
block = 0
[]
[force_u]
type = BodyForce
variable = u
block = 0
[]
[diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[]
[]
[InterfaceKernels]
[penalty_interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[]
[]
[BCs]
[left]
type = RobinBC
variable = u
boundary = 'left'
[]
[right]
type = RobinBC
variable = v
boundary = 'right'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_rel_tol = 0
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(test/tests/restart/restart_steady_from_transient/transient.i)
# We run a simple problem (5 time steps and save off the solution)
# In part2, we load the solution and solve a steady problem. The test check, that the initial state in part 2 is the same as the last state from part1
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 20
ny = 20
parallel_type = replicated
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[./forcing_fn]
type = ParsedFunction
expression = -4+(x*x+y*y)
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'ie diff ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.2
start_time = 0
num_steps = 5
[]
[Outputs]
exodus = true
checkpoint = true
[]
(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
[]
(test/tests/kernels/vector_fe/coupled_scalar_vector.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = -1
ymin = -1
elem_type = QUAD9
[]
[Variables]
[./u]
family = NEDELEC_ONE
order = FIRST
[../]
[./v]
[../]
[]
[Kernels]
[./wave]
type = VectorFEWave
variable = u
x_forcing_func = 'x_ffn'
y_forcing_func = 'y_ffn'
[../]
[./diff]
type = Diffusion
variable = v
[../]
[./source]
type = BodyForce
variable = v
[../]
[./advection]
type = EFieldAdvection
variable = v
efield = u
charge = 'positive'
mobility = 100
[../]
[]
[BCs]
[./bnd]
type = VectorCurlPenaltyDirichletBC
boundary = 'left right top bottom'
penalty = 1e10
function_x = 'x_sln'
function_y = 'y_sln'
variable = u
[../]
[./bnd_v]
type = DirichletBC
boundary = 'left right top bottom'
value = 0
variable = v
[../]
[]
[Functions]
[./x_ffn]
type = ParsedFunction
expression = '(2*pi*pi + 1)*cos(pi*x)*sin(pi*y)'
[../]
[./y_ffn]
type = ParsedFunction
expression = '-(2*pi*pi + 1)*sin(pi*x)*cos(pi*y)'
[../]
[./x_sln]
type = ParsedFunction
expression = 'cos(pi*x)*sin(pi*y)'
[../]
[./y_sln]
type = ParsedFunction
expression = '-sin(pi*x)*cos(pi*y)'
[../]
[]
[Preconditioning]
[./pre]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'asm'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
[]
[Outputs]
exodus = true
[]
(modules/stochastic_tools/test/tests/surrogates/nearest_point/sub_vector.i)
L = 1
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 100
xmax = ${L}
elem_type = EDGE3
[]
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 10000
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 2.0
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 300
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[VectorPostprocessors]
[T_vec]
type = LineValueSampler
variable = T
start_point = '0 0 0'
end_point = '${L} 0 0'
num_points = 10
sort_by = x
[]
[]
(modules/optimization/test/tests/optimizationreporter/mesh_source/forward.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[]
[Variables/u]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[src]
type = BodyForce
variable = u
function = src_func
[]
[]
[BCs]
[dirichlet]
type = DirichletBC
variable = u
boundary = 'bottom left'
value = 0
[]
[]
[Functions]
[src_func]
type = ParameterMeshFunction
exodus_mesh = parameter_mesh_in.e
parameter_name = src_rep/vals
[]
[]
[Reporters]
[src_rep]
type = ConstantReporter
real_vector_names = 'vals'
real_vector_values = '1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0'
[]
[measure_data]
type = OptimizationData
variable = u
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[AuxVariables]
[source]
[]
[]
[AuxKernels]
[source_aux]
type = FunctionAux
variable = source
function = src_func
[]
[]
[Outputs]
exodus = true
console = false
execute_on = timestep_end
[]
(test/tests/restart/restart_subapp_not_parent/two_step_solve_sub_restart.i)
[Mesh]
file = two_step_solve_parent_full_solve0_checkpoint_cp/0002-mesh.cpr
[]
[Problem]
restart_file_base = two_step_solve_parent_full_solve0_checkpoint_cp/LATEST
force_restart = true
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*t*(x*x+y*y)
[../]
[./forcing_fn]
type = ParsedFunction
expression = 2*t*(x*x+y*y)-4*t*t
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]
# Initial Condition will come from the restart file
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[../]
[]
[Postprocessors]
[./average]
type = ElementAverageValue
variable = u
[../]
[]
[Executioner]
type = Transient
end_time = 2.0
dt = 1.0
[]
[Outputs]
exodus = true
[]
(test/tests/restart/restart_transient_from_steady/steady_with_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[AuxVariables]
[Tf]
[]
[]
[Variables]
[power_density]
[]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2'
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[BCs]
[left]
type = DirichletBC
variable = power_density
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = power_density
boundary = right
value = 1e3
[]
[]
[Postprocessors]
[pwr_avg]
type = ElementAverageValue
variable = power_density
execute_on = 'initial timestep_end'
[]
[temp_avg]
type = ElementAverageValue
variable = Tf
execute_on = 'initial final'
[]
[temp_max]
type = ElementExtremeValue
value_type = max
variable = Tf
execute_on = 'initial final'
[]
[temp_min]
type = ElementExtremeValue
value_type = min
variable = Tf
execute_on = 'initial final'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
fixed_point_rel_tol = 1E-7
fixed_point_abs_tol = 1.0e-07
fixed_point_max_its = 12
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = steady_with_sub_sub.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[p_to_sub]
type = MultiAppShapeEvaluationTransfer
source_variable = power_density
variable = power_density
to_multi_app = sub
execute_on = 'timestep_end'
[]
[t_from_sub]
type = MultiAppShapeEvaluationTransfer
source_variable = temp
variable = Tf
from_multi_app = sub
execute_on = 'timestep_end'
[]
[]
[Outputs]
exodus = true
perf_graph = true
checkpoint = true
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
(modules/solid_mechanics/test/tests/initial_stress/gravity_with_aux.i)
# Apply an initial stress, using AuxVariables, that should be
# exactly that caused by gravity, and then
# do a transient step to check that nothing
# happens
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 10
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -10
zmax = 0
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[./weight]
type = BodyForce
variable = disp_z
value = -0.5 # this is density*gravity
[../]
[]
[BCs]
# back = zmin
# front = zmax
# bottom = ymin
# top = ymax
# left = xmin
# right = xmax
[./x]
type = DirichletBC
variable = disp_x
boundary = 'left right'
value = 0
[../]
[./y]
type = DirichletBC
variable = disp_y
boundary = 'bottom top'
value = 0
[../]
[./z]
type = DirichletBC
variable = disp_z
boundary = 'back'
value = 0
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./aux_equals_1]
initial_condition = 1
[../]
[./aux_equals_2]
initial_condition = 2
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[]
[Functions]
[./half_weight]
type = ParsedFunction
expression = '0.25*z' # half of the initial stress that should result from the weight force
[../]
[./kxx]
type = ParsedFunction
expression = '0.4*z' # some arbitrary xx and yy stress that should not affect the result
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1
poissons_ratio = 0.25
[../]
[./strain]
type = ComputeSmallStrain
eigenstrain_names = ini_stress
[../]
[./strain_from_initial_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = 'kxx 0 0 0 kxx 0 0 0 half_weight'
initial_stress_aux = 'aux_equals_1 aux_equals_1 aux_equals_1 aux_equals_1 aux_equals_1 aux_equals_1 aux_equals_1 aux_equals_1 aux_equals_2'
eigenstrain_name = ini_stress
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
end_time = 1.0
dt = 1.0
solve_type = NEWTON
type = Transient
nl_abs_tol = 1E-8
nl_rel_tol = 1E-12
l_tol = 1E-3
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
file_base = gravity_with_aux
exodus = true
[]
(modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined_fully_saturated_volume.i)
# A sample is constrained on all sides, except its top
# and its boundaries are
# also impermeable. Fluid is pumped into the sample via a
# volumetric source (ie m^3/second per cubic meter), and the
# rise in the top surface, porepressure, and stress are observed.
#
# In the standard poromechanics scenario, the Biot Modulus is held
# fixed and the source has units 1/s. Then the expected result
# is
# strain_zz = disp_z = BiotCoefficient*BiotModulus*s*t/((bulk + 4*shear/3) + BiotCoefficient^2*BiotModulus)
# porepressure = BiotModulus*(s*t - BiotCoefficient*strain_zz)
# stress_xx = (bulk - 2*shear/3)*strain_zz (remember this is effective stress)
# stress_zz = (bulk + 4*shear/3)*strain_zz (remember this is effective stress)
#
# In standard porous_flow, everything is based on mass, eg the source has
# units kg/s/m^3. This is discussed in the other pp_generation_unconfined
# models. In this test, we use the FullySaturated Kernel and set
# multiply_by_density = false
# meaning the fluid Kernel has units of volume, and the source, s, has units 1/time
#
# The ratios are:
# stress_xx/strain_zz = (bulk - 2*shear/3) = 1 (for the parameters used here)
# stress_zz/strain_zz = (bulk + 4*shear/3) = 4 (for the parameters used here)
# porepressure/strain_zz = 13.3333333 (for the parameters used here)
#
# Expect
# disp_z = 0.3*10*s*t/((2 + 4*1.5/3) + 0.3^2*10) = 0.612245*s*t
# porepressure = 10*(s*t - 0.3*0.612245*s*t) = 8.163265*s*t
# stress_xx = (2 - 2*1.5/3)*0.612245*s*t = 0.612245*s*t
# stress_zz = (2 + 4*shear/3)*0.612245*s*t = 2.44898*s*t
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back'
[]
[]
[Kernels]
[grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
[]
[grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
[]
[grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
component = 2
[]
[poro_x]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
variable = disp_x
component = 0
[]
[poro_y]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
variable = disp_y
component = 1
[]
[poro_z]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
component = 2
variable = disp_z
[]
[mass0]
type = PorousFlowFullySaturatedMassTimeDerivative
variable = porepressure
multiply_by_density = false
coupling_type = HydroMechanical
biot_coefficient = 0.3
[]
[source]
type = BodyForce
function = 0.1
variable = porepressure
[]
[]
[AuxVariables]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xz]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_yz]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 3.3333333333
density0 = 1
thermal_expansion = 0
[]
[]
[Materials]
[temperature_qp]
type = PorousFlowTemperature
[]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
[]
[stress]
type = ComputeLinearElasticStress
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = porepressure
[]
[simple_fluid_qp]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst # the "const" is irrelevant here: all that uses Porosity is the BiotModulus, which just uses the initial value of porosity
porosity = 0.1
[]
[biot_modulus]
type = PorousFlowConstantBiotModulus
biot_coefficient = 0.3
fluid_bulk_modulus = 3.3333333333
solid_bulk_compliance = 0.5
[]
[]
[Postprocessors]
[p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
[]
[zdisp]
type = PointValue
outputs = csv
point = '0 0 0.5'
variable = disp_z
[]
[stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[]
[stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[]
[stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[]
[stress_xx_over_strain]
type = FunctionValuePostprocessor
function = stress_xx_over_strain_fcn
outputs = csv
[]
[stress_zz_over_strain]
type = FunctionValuePostprocessor
function = stress_zz_over_strain_fcn
outputs = csv
[]
[p_over_strain]
type = FunctionValuePostprocessor
function = p_over_strain_fcn
outputs = csv
[]
[]
[Functions]
[stress_xx_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'stress_xx zdisp'
[]
[stress_zz_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'stress_zz zdisp'
[]
[p_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'p0 zdisp'
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-14 1E-10 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = pp_generation_unconfined_fully_saturated_volume
[csv]
type = CSV
[]
[]
(test/tests/misc/check_error/incomplete_kernel_variable_coverage_test.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff body_force'
[./diff]
type = Diffusion
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
value = 10
[../]
[]
[BCs]
active = 'right'
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
file_base = out
[]
(modules/combined/test/tests/poro_mechanics/pp_generation_unconfined.i)
# A sample is constrained on all sides, except its top
# and its boundaries are
# also impermeable. Fluid is pumped into the sample via a
# volumetric source (ie m^3/second per cubic meter), and the
# rise in the top surface, porepressure, and stress are observed.
#
# Source = s (units = 1/second)
#
# Expect:
# strain_zz = disp_z = BiotCoefficient*BiotModulus*s*t/((bulk + 4*shear/3) + BiotCoefficient^2*BiotModulus)
# porepressure = BiotModulus*(s*t - BiotCoefficient*strain_zz)
# stress_xx = (bulk - 2*shear/3)*strain_zz (remember this is effective stress)
# stress_xx = (bulk + 4*shear/3)*strain_zz (remember this is effective stress)
#
# Parameters:
# Biot coefficient = 0.3
# Porosity = 0.1
# Bulk modulus = 2
# Shear modulus = 1.5
# fluid bulk modulus = 1/0.3 = 3.333333
# 1/Biot modulus = (1 - 0.3)*(0.3 - 0.1)/2 + 0.1*0.3 = 0.1. BiotModulus = 10
#
# s = 0.1
#
# Expect
# disp_z = 0.3*10*s*t/((2 + 4*1.5/3) + 0.3^2*10) = 0.612245*s*t
# porepressure = 10*(s*t - 0.3*0.612245*s*t) = 8.163265*s*t
# stress_xx = (2 - 2*1.5/3)*0.612245*s*t = 0.612245*s*t
# stress_zz = (2 + 4*shear/3)*0.612245*s*t = 2.44898*s*t
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
porepressure = porepressure
block = 0
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./porepressure]
[../]
[]
[BCs]
[./confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[../]
[./confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[../]
[./confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back'
[../]
[]
[Kernels]
[./grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
[../]
[./grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
[../]
[./grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
component = 2
[../]
[./poro_x]
type = PoroMechanicsCoupling
variable = disp_x
component = 0
[../]
[./poro_y]
type = PoroMechanicsCoupling
variable = disp_y
component = 1
[../]
[./poro_z]
type = PoroMechanicsCoupling
variable = disp_z
component = 2
[../]
[./poro_timederiv]
type = PoroFullSatTimeDerivative
variable = porepressure
[../]
[./source]
type = BodyForce
function = 0.1
variable = porepressure
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./poro_material]
type = PoroFullSatMaterial
porosity0 = 0.1
biot_coefficient = 0.3
solid_bulk_compliance = 0.5
fluid_bulk_compliance = 0.3
constant_porosity = true
[../]
[]
[Postprocessors]
[./p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
[../]
[./zdisp]
type = PointValue
outputs = csv
point = '0 0 0.5'
variable = disp_z
[../]
[./stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[../]
[./stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[../]
[./stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-14 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = pp_generation_unconfined
[./csv]
type = CSV
[../]
[]
(test/tests/restart/restart_diffusion/exodus_refined_refined_restart_2_test.i)
[Mesh]
file = exodus_refined_restart_1.e
uniform_refine = 1
# Restart relies on the ExodusII_IO::copy_nodal_solution()
# functionality, which only works with ReplicatedMesh.
parallel_type = replicated
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
initial_from_file_var = u
initial_from_file_timestep = 2
[../]
[]
[Kernels]
active = 'bodyforce ie'
[./bodyforce]
type = BodyForce
variable = u
value = 10.0
[../]
[./ie]
type = TimeDerivative
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 = Transient
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 10
dt = .1
[]
[Outputs]
file_base = exodus_refined_refined_restart_2
exodus = true
[]
(test/tests/time_integrators/convergence/explicit_convergence.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 4
ny = 4
elem_type = QUAD9
[]
[Variables]
active = 'u'
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[./forcing_fn]
type = ParsedFunction
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
implicit = false
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
implicit = false
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
# We are solving only mass matrices in this problem. The Jacobi
# preconditioner is a bit faster than ILU or AMG for this.
petsc_options_iname = '-pc_type'
petsc_options_value = 'jacobi'
start_time = 0.0
end_time = 0.03125
dt = 0.00390625
[./TimeIntegrator]
type = Heun
[../]
# For explicit methods, we use the LINEAR solve type.
solve_type = 'LINEAR'
l_tol = 1e-13
[]
[Outputs]
execute_on = 'initial timestep_end'
exodus = true
[]
(test/tests/problems/no_material_coverage_check/no_material_coverage_check.i)
[Mesh]
file = rectangle.e
[]
[Problem]
material_coverage_check = false
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
block = 1
value = 10
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Materials]
[./mat1]
type = GenericConstantMaterial
block = 1
prop_names = 'diff1'
prop_values = '1'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(modules/stochastic_tools/examples/surrogates/pod_rb/2d_multireg/sub.i)
halfa = 10
fulla = 20
[Problem]
type = FEProblem
extra_tag_vectors = 'diff0 diff1 diff2 diff3 abs0 abs1 abs2 abs3 src0 src1 src2'
[]
[Mesh]
[msh]
type = CartesianMeshGenerator
dim = 2
dx = '10 20 20 20 20 20 20 20 20'
dy = '10 20 20 20 20 20 20 20 20'
ix = '${halfa} ${fulla} ${fulla} ${fulla} ${fulla} ${fulla} ${fulla} ${fulla} ${fulla}'
iy = '${halfa} ${fulla} ${fulla} ${fulla} ${fulla} ${fulla} ${fulla} ${fulla} ${fulla}'
subdomain_id = '1 0 0 0 1 0 0 2 3
0 0 0 0 0 0 0 2 3
0 0 1 0 0 0 2 2 3
0 0 0 0 0 0 2 3 3
1 0 0 0 1 2 2 3 3
0 0 0 0 2 2 3 3 3
0 0 2 2 2 3 3 3 3
2 2 2 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3'
[]
[]
[Variables]
[psi]
[]
[]
[Kernels]
[diff0]
type = MatDiffusion
variable = psi
diffusivity = D0
extra_vector_tags = 'diff0'
block = 0
[]
[diff1]
type = MatDiffusion
variable = psi
diffusivity = D1
extra_vector_tags = 'diff1'
block = 1
[]
[diff2]
type = MatDiffusion
variable = psi
diffusivity = D2
extra_vector_tags = 'diff2'
block = 2
[]
[diff3]
type = MatDiffusion
variable = psi
diffusivity = D3
extra_vector_tags = 'diff3'
block = 3
[]
[abs0]
type = MaterialReaction
variable = psi
coefficient = absxs0
extra_vector_tags = 'abs0'
block = 0
[]
[abs1]
type = MaterialReaction
variable = psi
coefficient = absxs1
extra_vector_tags = 'abs1'
block = 1
[]
[abs2]
type = MaterialReaction
variable = psi
coefficient = absxs2
extra_vector_tags = 'abs2'
block = 2
[]
[abs3]
type = MaterialReaction
variable = psi
coefficient = absxs3
extra_vector_tags = 'abs3'
block = 3
[]
[src0]
type = BodyForce
variable = psi
value = 1
extra_vector_tags = 'src0'
block = 0
[]
[src1]
type = BodyForce
variable = psi
value = 1
extra_vector_tags = 'src1'
block = 1
[]
[src2]
type = BodyForce
variable = psi
value = 1
extra_vector_tags = 'src2'
block = 2
[]
[]
[Materials]
[D0]
type = GenericConstantMaterial
prop_names = D0
prop_values = 1
block = 0
[]
[D1]
type = GenericConstantMaterial
prop_names = D1
prop_values = 1
block = 1
[]
[D2]
type = GenericConstantMaterial
prop_names = D2
prop_values = 1
block = 2
[]
[D3]
type = GenericConstantMaterial
prop_names = D3
prop_values = 1
block = 3
[]
[absxs0]
type = GenericConstantMaterial
prop_names = absxs0
prop_values = 1
block = 0
[]
[absxs1]
type = GenericConstantMaterial
prop_names = absxs1
prop_values = 1
block = 1
[]
[absxs2]
type = GenericConstantMaterial
prop_names = absxs2
prop_values = 1
block = 2
[]
[absxs3]
type = GenericConstantMaterial
prop_names = absxs3
prop_values = 1
block = 3
[]
[]
[BCs]
[left]
type = NeumannBC
variable = psi
boundary = left
value = 0
[]
[bottom]
type = NeumannBC
variable = psi
boundary = bottom
value = 0
[]
[top]
type = DirichletBC
variable = psi
boundary = top
value = 0
[]
[right]
type = DirichletBC
variable = psi
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = linear
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Postprocessors]
[nodal_l2]
type = NodalL2Norm
variable = psi
[]
[]
[Outputs]
[]
(test/tests/postprocessors/pps_interval/pps_interval_mismatch.i)
[Mesh]
file = square-2x2-nodeids.e
# This test can only be run with renumering disabled, so the
# NodalVariableValue postprocessor's node id is well-defined.
allow_renumbering = false
[]
[Variables]
active = 'u v'
[./u]
order = SECOND
family = LAGRANGE
[../]
[./v]
order = SECOND
family = LAGRANGE
[../]
[]
[Functions]
active = 'force_fn exact_fn left_bc'
[./force_fn]
type = ParsedFunction
expression = '1-x*x+2*t'
[../]
[./exact_fn]
type = ParsedFunction
expression = '(1-x*x)*t'
[../]
[./left_bc]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
active = '
time_u diff_u ffn_u
time_v diff_v'
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'all_u left_v right_v'
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = exact_fn
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '2'
value = 0
[../]
[]
[Postprocessors]
active = 'l2 node1 node4'
[./l2]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./node1]
type = NodalVariableValue
variable = u
nodeid = 15
[../]
[./node4]
type = NodalVariableValue
variable = v
nodeid = 10
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
end_time = 1
[]
[Outputs]
time_step_interval = 4
exodus = true
[./console]
type = Console
time_step_interval = 3
[../]
[]
(test/tests/postprocessors/element_l2_difference/element_l2_difference.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
elem_type = QUAD9
[]
[Variables]
[./u]
[../]
[./v]
order = SECOND
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./force_u]
type = BodyForce
variable = u
function = 'x*x*x+y*y*y'
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[./force_v]
type = BodyForce
variable = v
function = 'x*x*x+y*y*y'
[../]
[]
[BCs]
[./left_u]
type = DirichletBC
variable = u
boundary = 'left bottom right top'
value = 0
[../]
[./left_v]
type = DirichletBC
variable = v
boundary = 'left bottom right top'
value = 0
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[./l2_difference]
type = ElementL2Difference
variable = u
other_variable = v
[../]
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined_fully_saturated.i)
# A sample is constrained on all sides, except its top
# and its boundaries are
# also impermeable. Fluid is pumped into the sample via a
# volumetric source (ie kg/second per cubic meter), and the
# rise in the top surface, porepressure, and stress are observed.
#
# In the standard poromechanics scenario, the Biot Modulus is held
# fixed and the source has units 1/time. Then the expected result
# is
# strain_zz = disp_z = BiotCoefficient*BiotModulus*s*t/((bulk + 4*shear/3) + BiotCoefficient^2*BiotModulus)
# porepressure = BiotModulus*(s*t - BiotCoefficient*strain_zz)
# stress_xx = (bulk - 2*shear/3)*strain_zz (remember this is effective stress)
# stress_zz = (bulk + 4*shear/3)*strain_zz (remember this is effective stress)
#
# In porous_flow, however, the source has units kg/s/m^3. The ratios remain
# fixed:
# stress_xx/strain_zz = (bulk - 2*shear/3) = 1 (for the parameters used here)
# stress_zz/strain_zz = (bulk + 4*shear/3) = 4 (for the parameters used here)
# porepressure/strain_zz = 13.3333333 (for the parameters used here)
#
# Expect
# disp_z = 0.3*10*s*t/((2 + 4*1.5/3) + 0.3^2*10) = 0.612245*s*t
# porepressure = 10*(s*t - 0.3*0.612245*s*t) = 8.163265*s*t
# stress_xx = (2 - 2*1.5/3)*0.612245*s*t = 0.612245*s*t
# stress_zz = (2 + 4*shear/3)*0.612245*s*t = 2.44898*s*t
# The relationship between the constant poroelastic source
# s (m^3/second/m^3) and the PorousFlow source, S (kg/second/m^3) is
# S = fluid_density * s = s * exp(porepressure/fluid_bulk)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back'
[]
[]
[Kernels]
[grad_stress_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
[]
[grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
[]
[grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
component = 2
[]
[poro_x]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
variable = disp_x
component = 0
[]
[poro_y]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
variable = disp_y
component = 1
[]
[poro_z]
type = PorousFlowEffectiveStressCoupling
biot_coefficient = 0.3
component = 2
variable = disp_z
[]
[mass0]
type = PorousFlowFullySaturatedMassTimeDerivative
variable = porepressure
coupling_type = HydroMechanical
biot_coefficient = 0.3
[]
[source]
type = BodyForce
function = '0.1*exp(8.163265306*0.1*t/3.3333333333)'
variable = porepressure
[]
[]
[AuxVariables]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xz]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_yz]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 3.3333333333
density0 = 1
thermal_expansion = 0
[]
[]
[Materials]
[temperature_qp]
type = PorousFlowTemperature
[]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
[]
[stress]
type = ComputeLinearElasticStress
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = porepressure
[]
[simple_fluid_qp]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity]
type = PorousFlowPorosityConst # the "const" is irrelevant here: all that uses Porosity is the BiotModulus, which just uses the initial value of porosity
porosity = 0.1
[]
[biot_modulus]
type = PorousFlowConstantBiotModulus
biot_coefficient = 0.3
fluid_bulk_modulus = 3.3333333333
solid_bulk_compliance = 0.5
[]
[]
[Postprocessors]
[p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
[]
[zdisp]
type = PointValue
outputs = csv
point = '0 0 0.5'
variable = disp_z
[]
[stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[]
[stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[]
[stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[]
[stress_xx_over_strain]
type = FunctionValuePostprocessor
function = stress_xx_over_strain_fcn
outputs = csv
[]
[stress_zz_over_strain]
type = FunctionValuePostprocessor
function = stress_zz_over_strain_fcn
outputs = csv
[]
[p_over_strain]
type = FunctionValuePostprocessor
function = p_over_strain_fcn
outputs = csv
[]
[]
[Functions]
[stress_xx_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'stress_xx zdisp'
[]
[stress_zz_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'stress_zz zdisp'
[]
[p_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'p0 zdisp'
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-14 1E-10 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = pp_generation_unconfined_fully_saturated
[csv]
type = CSV
[]
[]
(test/tests/bcs/nodal_normals/circle_tris.i)
[Mesh]
file = circle-tris.e
[]
[Functions]
[all_bc_fn]
type = ParsedFunction
expression = x*x+y*y
[]
[f_fn]
type = ParsedFunction
expression = -4
[]
[analytical_normal_x]
type = ParsedFunction
expression = x
[]
[analytical_normal_y]
type = ParsedFunction
expression = y
[]
[]
[NodalNormals]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = f_fn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = 'all_bc_fn'
[]
[]
[Postprocessors]
[nx_pps]
type = NodalL2Error
variable = nodal_normal_x
boundary = '1'
function = analytical_normal_x
[]
[ny_pps]
type = NodalL2Error
variable = nodal_normal_y
boundary = '1'
function = analytical_normal_y
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-13
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/ics/from_exodus_solution/nodal_part2.i)
# Use the exodus file for restarting the problem:
# - restart one variable
# - and have one extra variable with IC
#
[Mesh]
file = out_nodal_part1.e
[]
[Functions]
[exact_fn]
type = ParsedFunction
expression = ((x*x)+(y*y))
[]
[forcing_fn]
type = ParsedFunction
expression = -4
[]
[]
[Variables]
active = 'u v'
[u]
order = FIRST
family = LAGRANGE
initial_from_file_var = u
initial_from_file_timestep = 6
[]
[v]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = BoundingBoxIC
x1 = 0.0
x2 = 1.0
y1 = 0.0
y2 = 1.0
inside = 3.0
outside = 1.0
[]
[]
[]
[Problem]
allow_initial_conditions_with_restart = true
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = forcing_fn
[]
[diff_v]
type = Diffusion
variable = v
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[]
[left_v]
type = DirichletBC
variable = v
boundary = '3'
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = '1'
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out_nodal_var_restart
exodus = true
[]
(test/tests/preconditioners/vcp/no_condense_test.i)
[Mesh]
[original_file_mesh]
type = FileMeshGenerator
file = non_conform_2blocks.e
[]
[secondary_side]
input = original_file_mesh
type = LowerDBlockFromSidesetGenerator
sidesets = '10'
new_block_id = '100'
new_block_name = 'secondary_side'
[]
[primary_side]
input = secondary_side
type = LowerDBlockFromSidesetGenerator
sidesets = '20'
new_block_id = '200'
new_block_name = 'primary_side'
[]
[]
[Functions]
[exact_sln]
type = ParsedFunction
expression = sin(2*pi*x)*sin(2*pi*y)
[]
[ffn]
type = ParsedFunction
expression = 8*pi*pi*sin(2*pi*x)*sin(2*pi*y)
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[lm]
order = FIRST
family = LAGRANGE
block = secondary_side
use_dual = false
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = ffn
[]
[]
[Constraints]
[ced]
type = EqualValueConstraint
variable = lm
secondary_variable = u
primary_boundary = 20
primary_subdomain = 200
secondary_boundary = 10
secondary_subdomain = 100
[]
[]
[BCs]
[all]
type = DirichletBC
variable = u
boundary = '30 40'
value = 0.0
[]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_sln
variable = u
boundary = '50 60'
[]
[]
[Postprocessors]
[l2_error]
type = ElementL2Error
variable = u
function = exact_sln
block = '1 2'
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_view'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' lu NONZERO 1e-12'
l_max_its = 100
nl_rel_tol = 1e-6
[]
[Outputs]
csv = true
[]
(test/tests/time_integrators/implicit-euler/ie.i)
###########################################################
# This is a simple test with a time-dependent problem
# demonstrating the use of the TimeIntegrator system.
#
# Testing a solution that is second order in space
# and first order in time
#
# @Requirement F1.30
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = ((x*x)+(y*y))-(4*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
# Test of the TimeIntegrator System
scheme = 'implicit-euler'
start_time = 0.0
num_steps = 5
dt = 0.25
[]
[Outputs]
exodus = true
[]
(modules/optimization/test/tests/misc/scaling_test/scaling_test.i)
[Problem]
nl_sys_names = 'nl0 adjoint'
kernel_coverage_check = false
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 2
nz = 1
xmin = 9.4615
xmax = 92.0115
ymin = 3.175
ymax = 22.225
zmin = 0.489
zmax = 0.755
[]
[]
[Variables]
[T]
scaling = 10
[]
[lam_T]
solver_sys = adjoint
scaling = 1e3
[]
[]
[Kernels]
[heat_conduction]
type = ADMatDiffusion
variable = T
diffusivity = thermal_conductivity
[]
[heat_source]
type = ADBodyForce
function = src_fuel_function
variable = T
[]
[]
[BCs]
[dir_BC_front]
type = NeumannBC
variable = T
boundary = front
value = 2
[]
[dir_BC_back]
type = DirichletBC
variable = T
boundary = back
value = 300
[]
[]
[Materials]
# fuel properties
[fuel_thermal]
type = ADGenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 17.6e3
[]
[]
[Executioner]
type = SteadyAndAdjoint
forward_system = nl0
adjoint_system = adjoint
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu mumps'
line_search = 'none'
nl_rel_tol = 1e-6
nl_abs_tol = 1e-30
nl_max_its = 10
l_max_its = 10
[]
##---------Forward Optimization stuff------------------#
[Reporters]
[measure_data]
type = ConstantReporter
real_vector_names = 'x y z u weight'
real_vector_values = '0.2 0.2 0.0; 0.3 0.8 0.0; 0 0 0; 5 5 5; 1 1 1'
[]
[params_fuel]
type = ConstantReporter
real_vector_names = 'source'
real_vector_values = '5e7' # Dummy
[]
[]
[Functions]
[src_fuel_function]
type = ParsedOptimizationFunction
expression = q
param_symbol_names = 'q'
param_vector_name = 'params_fuel/source'
[]
[]
##---------Adjoint Optimization stuff------------------#
[DiracKernels]
[adjointLoad_T]
type = ReporterPointSource
variable = lam_T
x_coord_name = measure_data/x
y_coord_name = measure_data/y
z_coord_name = measure_data/z
value_name = measure_data/u
[]
[]
##--------- Outputs ------------------#
[Debug]
show_var_residual_norms = true
[]
(test/tests/utils/spline_interpolation/bicubic_spline_interpolation_y_normal.i)
[Mesh]
type = GeneratedMesh
dim = 3
ny = 1 # needed to ensure Z is the problem dimension
nx = 4
nz = 4
xmax = 4
zmax = 4
[]
[Functions]
[./yx1]
type = ParsedFunction
expression = '3*z^2'
[../]
[./yx2]
type = ParsedFunction
expression = '6*x^2'
[../]
[./spline_fn]
type = BicubicSplineFunction
normal_component = y
x1 = '0 2 4'
x2 = '0 2 4 6'
y = '0 16 128 432 8 24 136 440 64 80 192 496'
yx11 = '0 0 0 0'
yx1n = '48 48 48 48'
yx21 = '0 0 0'
yx2n = '216 216 216'
yx1 = 'yx1'
yx2 = 'yx2'
[../]
[./u_func]
type = ParsedFunction
expression = 'z^3 + 2*x^3'
[../]
[./u2_forcing_func]
type = ParsedFunction
expression = '-6*z - 12*x'
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./bi_func_value]
order = FIRST
family = LAGRANGE
[../]
[./x_deriv]
order = FIRST
family = LAGRANGE
[../]
[./z_deriv]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./bi_func_value]
type = FunctionAux
variable = bi_func_value
function = spline_fn
[../]
[./deriv_1]
type = FunctionDerivativeAux
function = spline_fn
variable = z_deriv
component = z
[../]
[./deriv_2]
type = FunctionDerivativeAux
function = spline_fn
variable = x_deriv
component = x
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
function = u2_forcing_func
[../]
[]
[BCs]
[./sides]
type = FunctionDirichletBC
variable = u
boundary = 'left right front back'
function = u_func
[../]
[]
[Postprocessors]
[./nodal_l2_err_spline]
type = NodalL2Error
variable = u
function = spline_fn
execute_on = 'initial timestep_end'
[../]
[./nodal_l2_err_analytic]
type = NodalL2Error
variable = u
function = u_func
execute_on = 'initial timestep_end'
[../]
[./x_deriv_err_analytic]
type = NodalL2Error
variable = x_deriv
function = yx2
execute_on = 'initial timestep_end'
[../]
[./z_deriv_err_analytic]
type = NodalL2Error
variable = z_deriv
function = yx1
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/fluid_properties/test/tests/ideal_gas/test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
elem_type = QUAD4
[]
[Functions]
[./f_fn]
type = ParsedFunction
expression = -4
[../]
[./bc_fn]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./e]
initial_condition = 6232.5
[../]
[./v]
initial_condition = 0.02493
[../]
[./p]
family = MONOMIAL
order = CONSTANT
[../]
[./T]
family = MONOMIAL
order = CONSTANT
[../]
[./cp]
family = MONOMIAL
order = CONSTANT
[../]
[./cv]
family = MONOMIAL
order = CONSTANT
[../]
[./c]
family = MONOMIAL
order = CONSTANT
[../]
[./mu]
family = MONOMIAL
order = CONSTANT
[../]
[./k]
family = MONOMIAL
order = CONSTANT
[../]
[./g]
family = MONOMIAL
order = CONSTANT
[../]
[]
[AuxKernels]
[./p]
type = MaterialRealAux
variable = p
property = pressure
[../]
[./T]
type = MaterialRealAux
variable = T
property = temperature
[../]
[./cp]
type = MaterialRealAux
variable = cp
property = cp
[../]
[./cv]
type = MaterialRealAux
variable = cv
property = cv
[../]
[./c]
type = MaterialRealAux
variable = c
property = c
[../]
[./mu]
type = MaterialRealAux
variable = mu
property = mu
[../]
[./k]
type = MaterialRealAux
variable = k
property = k
[../]
[./g]
type = MaterialRealAux
variable = g
property = g
[../]
[]
[FluidProperties]
[./ideal_gas]
type = IdealGasFluidProperties
gamma = 1.4
molar_mass = 1.000536678700361
[../]
[]
[Materials]
[./fp_mat]
type = FluidPropertiesMaterialVE
e = e
v = v
fp = ideal_gas
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = f_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = bc_fn
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(tutorials/tutorial02_multiapps/step01_multiapps/07_parent_multilevel.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 40
ny = 40
nz = 40
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = 1.
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
perf_graph = true
[]
[MultiApps]
[uno]
type = TransientMultiApp
positions = '0 0 0 1 0 0'
input_files = '07_sub_multilevel.i'
[]
[]
(test/tests/variables/fe_hermite/hermite-3-3d.i)
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
nx = 1
ny = 1
nz = 1
elem_type = HEX27
# This problem only has 1 element, so using DistributedMesh in parallel
# isn't really an option, and we don't care that much about DistributedMesh
# in serial.
parallel_type = replicated
[]
[Functions]
[./bc_fnt]
type = ParsedFunction
expression = 3*y*y
[../]
[./bc_fnb]
type = ParsedFunction
expression = -3*y*y
[../]
[./bc_fnl]
type = ParsedFunction
expression = -3*x*x
[../]
[./bc_fnr]
type = ParsedFunction
expression = 3*x*x
[../]
[./bc_fnk]
type = ParsedFunction
expression = -3*z*z
[../]
[./bc_fnf]
type = ParsedFunction
expression = 3*z*z
[../]
[./forcing_fn]
type = ParsedFunction
expression = -6*x-6*y-6*z+(x*x*x)+(y*y*y)+(z*z*z)
[../]
[./solution]
type = ParsedGradFunction
value = (x*x*x)+(y*y*y)+(z*z*z)
grad_x = 3*x*x
grad_y = 3*y*y
grad_z = 3*z*z
[../]
[]
[Variables]
[./u]
order = THIRD
family = HERMITE
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./bc_top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = bc_fnt
[../]
[./bc_bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bc_fnb
[../]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[./bc_front]
type = FunctionNeumannBC
variable = u
boundary = 'front'
function = bc_fnf
[../]
[./bc_back]
type = FunctionNeumannBC
variable = u
boundary = 'back'
function = bc_fnk
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/multiapps/picard/function_dt_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
ymin = 0
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[Functions]
[v_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[dts]
type = PiecewiseLinear
x = '0.1 10'
y = '0.1 10'
[]
[]
[AuxVariables]
[v]
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[ufn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = v_fn
[]
[]
[Executioner]
type = Transient
dt = 0.1
solve_type = 'PJFNK'
nl_abs_tol = 1e-10
fixed_point_max_its = 2
start_time = 0
num_steps = 3
[TimeStepper]
type = FunctionDT
function = dts
[]
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub_app]
app_type = MooseTestApp
type = TransientMultiApp
input_files = 'function_dt_sub.i'
execute_on = timestep_end
positions = '0 -1 0'
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[]
[]
(examples/ex14_pps/ex14_compare_solutions_2.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 11
ny = 11
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
[]
[Variables]
[./forced]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = forced
[../]
[./forcing]
type = BodyForce
variable = forced
function = 'x*x+y*y' # Any object expecting a function name can also receive a ParsedFunction string
[../]
[]
[BCs]
[./all]
type = DirichletBC
variable = forced
boundary = 'bottom right top left'
value = 0
[../]
[]
[UserObjects]
[./fine_solution]
# Read in the fine grid solution
type = SolutionUserObject
system_variables = forced
mesh = ex14_compare_solutions_1_out_0000_mesh.xda
es = ex14_compare_solutions_1_out_0000.xda
[../]
[]
[Functions]
[./fine_function]
# Create a Function out of the fine grid solution
# Note: This references the SolutionUserObject above
type = SolutionFunction
solution = fine_solution
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[./Quadrature]
# The integration of the error happens on the coarse mesh
# To reduce integration error of the finer solution we can
# raise the integration order.
# Note: This will slow down the calculation a bit
order = SIXTH
[../]
[]
[Postprocessors]
[./error]
# Compute the error between the computed solution and the fine-grid solution
type = ElementL2Error
variable = forced
function = fine_function
[../]
[]
[Outputs]
execute_on = 'timestep_end'
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/kernels/ad_reaction/ad_reaction.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
[]
[Variables]
[u]
[]
[]
[Kernels]
[diffusion]
type = ADDiffusion
variable = u
[]
[reaction]
type = ADReaction
variable = u
[]
[force]
type = ADBodyForce
variable = u
[]
[]
[BCs]
[left]
type = ADDirichletBC
boundary = left
variable = u
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(test/tests/kernels/scalar_constraint/scalar_constraint_kernel.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[./ffn]
type = ParsedFunction
expression = -4
[../]
[./bottom_bc_fn]
type = ParsedFunction
expression = -2*y
[../]
[./right_bc_fn]
type = ParsedFunction
expression = 2*x
[../]
[./top_bc_fn]
type = ParsedFunction
expression = 2*y
[../]
[./left_bc_fn]
type = ParsedFunction
expression = -2*x
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[./lambda]
family = SCALAR
order = FIRST
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffnk]
type = BodyForce
variable = u
function = ffn
[../]
[./sk_lm]
type = ScalarLagrangeMultiplier
variable = u
lambda = lambda
[../]
[]
[ScalarKernels]
[./constraint]
type = AverageValueConstraint
variable = lambda
pp_name = pp
value = 2.666666666666666
[../]
[]
[BCs]
[./bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bottom_bc_fn
[../]
[./right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = right_bc_fn
[../]
[./top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = top_bc_fn
[../]
[./left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = left_bc_fn
[../]
[]
[Postprocessors]
[./pp]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = linear
[../]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
[./pc]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-9
l_tol = 1.e-10
nl_max_its = 10
# This example builds an indefinite matrix, so "-pc_type hypre -pc_hypre_type boomeramg" cannot
# be used reliably on this problem. ILU(0) seems to do OK in both serial and parallel in my testing,
# I have not seen any zero pivot issues.
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'bjacobi ilu'
# This is a linear problem, so we don't need to recompute the
# Jacobian. This isn't a big deal for a Steady problems, however, as
# there is only one solve.
solve_type = 'LINEAR'
[]
[Outputs]
exodus = true
hide = lambda
[]
(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
[]
(test/tests/multiapps/picard/function_dt_sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 1
nx = 10
[]
[Functions]
[./u_fn]
type = ParsedFunction
expression = t*x
[../]
[./ffn]
type = ParsedFunction
expression = x
[../]
[./dts]
type = PiecewiseLinear
x = '0.1 10'
y = '0.1 10'
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[./fn]
type = BodyForce
variable = u
function = ffn
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = FunctionDirichletBC
variable = u
boundary = right
function = u_fn
[../]
[]
[Executioner]
type = Transient
dt = 0.1
solve_type = 'PJFNK'
nl_abs_tol = 1e-10
start_time = 0
num_steps = 3
[./TimeStepper]
type = FunctionDT
function = dts
[../]
[]
[Outputs]
exodus = true
[]
(examples/ex14_pps/ex14.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 32
ny = 32
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
[]
[Variables]
[forced]
order = FIRST
family = LAGRANGE
[]
[]
[Functions]
# A ParsedFunction allows us to supply analytic expressions directly in the input file
[exact]
type = ParsedFunction
expression = sin(alpha*pi*x)
symbol_names = alpha
symbol_values = 16
[]
# This function is an actual compiled function
[force]
type = ExampleFunction
alpha = 16
[]
[]
[Kernels]
[diff]
type = ADDiffusion
variable = forced
[]
# This Kernel can take a function name to use
[forcing]
type = ADBodyForce
variable = forced
function = force
[]
[]
[BCs]
# The BC can take a function name to use
[all]
type = FunctionDirichletBC
variable = forced
boundary = 'bottom right top left'
function = exact
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[h]
type = AverageElementSize
[]
[error]
type = ElementL2Error
variable = forced
function = exact
[]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
csv = true
[]
(test/tests/time_integrators/tvdrk2/2d-quadratic.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 20
ny = 20
elem_type = QUAD9
[]
[Functions]
[./ic]
type = ParsedFunction
expression = 0
[../]
[./forcing_fn]
type = ParsedFunction
expression = 2*t*((x*x)+(y*y))-(4*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*((x*x)+(y*y))
[../]
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
implicit = true
[../]
[./diff]
type = Diffusion
variable = u
implicit = false
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
implicit = false
[../]
[]
[ICs]
[./u_ic]
type = FunctionIC
variable = u
function = ic
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
[./TimeIntegrator]
type = ExplicitTVDRK2
[../]
solve_type = 'LINEAR'
start_time = 0.0
num_steps = 10
dt = 0.0001
l_tol = 1e-8
[]
[Outputs]
exodus = true
perf_graph = true
[]
(test/tests/variables/fe_hier/hier-3-3d.i)
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -1
xmax = 1
ymin = -1
ymax = 1
zmin = -1
zmax = 1
nx = 1
ny = 1
nz = 1
elem_type = HEX27
# This problem only has 1 element, so using DistributedMesh in parallel
# isn't really an option, and we don't care that much about DistributedMesh
# in serial.
parallel_type = replicated
[]
[Functions]
[./bc_fnt]
type = ParsedFunction
expression = 3*y*y
[../]
[./bc_fnb]
type = ParsedFunction
expression = -3*y*y
[../]
[./bc_fnl]
type = ParsedFunction
expression = -3*x*x
[../]
[./bc_fnr]
type = ParsedFunction
expression = 3*x*x
[../]
[./bc_fnk]
type = ParsedFunction
expression = -3*z*z
[../]
[./bc_fnf]
type = ParsedFunction
expression = 3*z*z
[../]
[./forcing_fn]
type = ParsedFunction
expression = -6*x-6*y-6*z+(x*x*x)+(y*y*y)+(z*z*z)
[../]
[./solution]
type = ParsedGradFunction
expression = (x*x*x)+(y*y*y)+(z*z*z)
grad_x = 3*x*x
grad_y = 3*y*y
grad_z = 3*z*z
[../]
[]
[Variables]
[./u]
order = THIRD
family = HIERARCHIC
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./bc_top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = bc_fnt
[../]
[./bc_bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bc_fnb
[../]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[./bc_front]
type = FunctionNeumannBC
variable = u
boundary = 'front'
function = bc_fnf
[../]
[./bc_back]
type = FunctionNeumannBC
variable = u
boundary = 'back'
function = bc_fnk
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/stochastic_tools/test/tests/surrogates/pod_rb/errors/sub.i)
[Problem]
type = FEProblem
extra_tag_vectors = 'diff react bodyf'
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 15
xmax = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = u
diffusivity = k
extra_vector_tags = 'diff'
[]
[reaction]
type = MaterialReaction
variable = u
coefficient = alpha
extra_vector_tags = 'react'
[]
[source]
type = BodyForce
variable = u
value = 1.0
extra_vector_tags = 'bodyf'
[]
[]
[Materials]
[k]
type = GenericConstantMaterial
prop_names = k
prop_values = 1.0
[]
[alpha]
type = GenericConstantMaterial
prop_names = alpha
prop_values = 1.0
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
(test/tests/bcs/functor_dirichlet_bc/test.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
dim = 2
nx = 32
ny = 32
[]
[]
[Variables]
[u]
[]
[]
[Functions]
[ff_1]
type = ParsedFunction
expression = alpha*alpha*pi
symbol_names = 'alpha'
symbol_values = '16'
[]
[ff_2]
type = ParsedFunction
expression = pi*sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '16'
[]
[forcing_func]
type = CompositeFunction
functions = 'ff_1 ff_2'
[]
[bc_func]
type = ParsedFunction
expression = sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '16'
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = forcing_func
[]
[]
[BCs]
[all]
type = FunctorDirichletBC
variable = u
boundary = 'left right'
functor = bc_func
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/mortar/convergence-studies/solution-continuity/continuity.i)
[Mesh]
second_order = true
[./left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[../]
[./left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary_id = '0 1 2 3'
new_boundary_name = 'lb_bottom lb_right lb_top lb_left'
[../]
[./left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[../]
[./right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 1
xmax = 2
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[../]
[./right_block_id]
type = SubdomainIDGenerator
input = right_block
subdomain_id = 2
[../]
[right_block_change_boundary_id]
type = RenameBoundaryGenerator
input = right_block_id
old_boundary_id = '0 1 2 3'
new_boundary_id = '100 101 102 103'
[]
[./combined]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_change_boundary_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'left_block right_block'
[../]
[right_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = rb_right
block = right_block
normal = '1 0 0'
[]
[right_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_right_sideset
new_boundary = rb_left
block = right_block
normal = '-1 0 0'
[]
[right_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_left_sideset
new_boundary = rb_top
block = right_block
normal = '0 1 0'
[]
[right_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_top_sideset
new_boundary = rb_bottom
block = right_block
normal = '0 -1 0'
[]
[secondary]
input = right_bottom_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'lb_right'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'rb_left'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[./T]
block = 'left_block right_block'
order = SECOND
[../]
[./lambda]
block = 'secondary_lower'
[../]
[]
[BCs]
[./neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln_primal
variable = T
boundary = 'lb_bottom lb_top lb_left rb_bottom rb_right rb_top'
[../]
[]
[Kernels]
[./conduction]
type = Diffusion
variable = T
block = 'left_block right_block'
[../]
[./sink]
type = Reaction
variable = T
block = 'left_block right_block'
[../]
[./forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = 'left_block right_block'
[../]
[]
[Functions]
[./forcing_function]
type = ParsedFunction
expression = ''
[../]
[./exact_soln_primal]
type = ParsedFunction
expression = ''
[../]
[exact_soln_lambda]
type = ParsedFunction
expression = ''
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[./mortar]
type = EqualValueConstraint
primary_boundary = rb_left
secondary_boundary = lb_right
primary_subdomain = primary_lower
secondary_subdomain = secondary_lower
secondary_variable = T
variable = lambda
delta = 0.4
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
[Outputs]
csv = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
[Postprocessors]
[L2lambda]
type = ElementL2Error
variable = lambda
function = exact_soln_lambda
execute_on = 'timestep_end'
block = 'secondary_lower'
[]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = 'left_block right_block'
[]
[h]
type = AverageElementSize
block = 'left_block right_block'
[]
[]
(test/tests/mortar/continuity-3d-non-conforming/continuity_penalty_sphere_hex.i)
[Mesh]
second_order = false
[file]
type = FileMeshGenerator
file = spheres_hex8.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
new_block_id = 11
new_block_name = "secondary"
sidesets = '101'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
new_block_id = 12
new_block_name = "primary"
sidesets = '102'
[]
uniform_refine = 0
[]
[Problem]
error_on_jacobian_nonzero_reallocation = true
[]
[Variables]
[T]
block = '1 2'
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln_primal
variable = T
boundary = '1 2'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = 'x^2 + y^2 + z^2 - 6'
[]
[exact_soln_primal]
type = ParsedFunction
expression = 'x^2 + y^2 + z^2'
[]
[exact_soln_lambda]
type = ParsedFunction
expression = '4'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = PenaltyEqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = '12'
secondary_subdomain = '11'
secondary_variable = T
correct_edge_dropping = true
penalty_value = 1.e5
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 6'
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = '1 2'
[]
[h]
type = AverageElementSize
block = '1 2'
[]
[]
(test/tests/postprocessors/element_l2_error_pps/element_l2_error_pp_test.i)
###########################################################
# This is a simple test of the Postprocessor System. This
# test uses a forcing function and the MMS to verify
# correctness of the implementation.
# Grid adaptivity is applied at successively finer grids
# to verify the correct slope of the measure of error
# against the analytical solution.
#
# @Requirement F6.10
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 3
xmin = 0
xmax = 2
ymin = 0
ymax = 2
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
active = 'forcing_func u_func'
[./forcing_func]
type = ParsedFunction
expression = alpha*alpha*pi*pi*sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '4'
[../]
[./u_func]
type = ParsedFunction
expression = sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '4'
[../]
[]
[Kernels]
active = 'diff forcing'
[./diff]
type = Diffusion
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_func
[../]
[]
[BCs]
active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = '1'
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = '3'
value = 0
[../]
[]
[Executioner]
type = Steady
[./Adaptivity]
refine_fraction = 1.0
coarsen_fraction = 0.0
max_h_level = 10
steps = 4
[../]
[]
# Postprocessor System
[Postprocessors]
[./integral]
type = ElementL2Error
variable = u
function = u_func
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
file_base = out
exodus = false
csv = true
[]
(modules/stochastic_tools/test/tests/userobjects/inverse_mapping/sub.i)
S = 10
D = 10
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmax = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[v_aux]
[]
[]
[Kernels]
[diffusion_v]
type = MatDiffusion
variable = v
diffusivity = D_v
[]
[source_v]
type = BodyForce
variable = v
value = 1.0
[]
[]
[AuxKernels]
[func_aux]
type = FunctionAux
variable = v_aux
function = v_aux_func
[]
[]
[Functions]
[v_aux_func]
type = ParsedFunction
expression = 'S * x + D'
symbol_names = 'S D'
symbol_values = '${S} ${D}'
[]
[]
[Materials]
[diffusivity_v]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 4.0
[]
[]
[BCs]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Reporters]
[solution_storage]
type = SolutionContainer
execute_on = 'FINAL'
[]
[solution_storage_aux]
type = SolutionContainer
execute_on = 'FINAL'
system = aux
[]
[]
(test/tests/time_integrators/bdf2/bdf2_adapt.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 4
ny = 4
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.25
[./Adaptivity]
refine_fraction = 0.2
coarsen_fraction = 0.3
max_h_level = 4
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/restart/restart_transient_from_transient/restart_trans_with_2subs.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = 'replicated'
[]
[Problem]
restart_file_base = pseudo_trans_with_2subs_out_cp/LATEST
[]
[AuxVariables]
[Tf]
[]
[]
[Variables]
[power_density]
[]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2' # increase this function to drive transient
[]
[]
[Kernels]
[timedt]
type = TimeDerivative
variable = power_density
[]
[diff]
type = Diffusion
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[BCs]
[left]
type = DirichletBC
variable = power_density
boundary = left
value = 50
[]
[right]
type = DirichletBC
variable = power_density
boundary = right
value = 1e3
[]
[]
[Postprocessors]
[pwr_avg]
type = ElementAverageValue
block = '0'
variable = power_density
execute_on = 'initial timestep_end'
[]
[temp_avg]
type = ElementAverageValue
variable = Tf
block = '0'
execute_on = 'initial timestep_end'
[]
[temp_max]
type = ElementExtremeValue
value_type = max
variable = Tf
block = '0'
execute_on = 'initial timestep_end'
[]
[temp_min]
type = ElementExtremeValue
value_type = min
variable = Tf
block = '0'
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 3
dt = 1.0
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
line_search = none
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0
0.5 0 0'
input_files = restart_trans_with_2subs_sub.i
execute_on = 'timestep_end'
[../]
[]
[Transfers]
[p_to_sub]
type = MultiAppProjectionTransfer
source_variable = power_density
variable = power_density
to_multi_app = sub
execute_on = 'timestep_end'
[]
[t_from_sub]
type = MultiAppGeometricInterpolationTransfer
source_variable = temp
variable = Tf
from_multi_app = sub
execute_on = 'timestep_end'
[]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(test/tests/misc/check_error/subdomain_restricted_auxkernel_mismatch.i)
[Mesh]
file = rectangle.e
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./foo]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[Kernels]
active = 'diff body_force'
[./diff]
type = Diffusion
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
block = 1
value = 10
[../]
[]
[AuxKernels]
[./foo]
type = ConstantAux
variable = foo
value = 1
block = 2
[../]
[]
[BCs]
active = 'right'
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
# petsc_options = '-snes_mf_operator'
# petsc_options_iname = '-pc_type -pc_hypre_type'
# petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
file_base = out
[]
(test/tests/time_integrators/explicit-euler/ee-1d-quadratic.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -1
xmax = 1
nx = 20
elem_type = EDGE3
[]
[Functions]
[./ic]
type = ParsedFunction
expression = 0
[../]
[./forcing_fn]
type = ParsedFunction
expression = x*x-2*t
[../]
[./exact_fn]
type = ParsedFunction
expression = t*x*x
[../]
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = ic
[../]
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
# lumping = true
implicit = true
[../]
[./diff]
type = Diffusion
variable = u
implicit = false
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
implicit = false
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1'
function = exact_fn
implicit = true
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Transient
scheme = 'explicit-euler'
solve_type = 'LINEAR'
l_tol = 1e-12
start_time = 0.0
num_steps = 20
dt = 0.00005
[]
[Outputs]
exodus = true
[./console]
type = Console
max_rows = 10
[../]
[]
(test/tests/mortar/continuity-3d-non-conforming/continuity_mixed.i)
[Mesh]
second_order = false
[file]
type = FileMeshGenerator
file = mixed_mesh.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
new_block_id = 11
new_block_name = "secondary"
sidesets = '101'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
new_block_id = 12
new_block_name = "primary"
sidesets = '102'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[T]
block = '1 2'
[]
[lambda]
block = 'secondary'
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln_primal
variable = T
boundary = '1 2'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi) + 3*pi^2*sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_primal]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_lambda]
type = ParsedFunction
expression = 'pi*sin(pi*y)*sin(pi*z)*cos(pi*x)'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = '12'
secondary_subdomain = '11'
variable = lambda
secondary_variable = T
delta = 0.1
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[L2lambda]
type = ElementL2Error
variable = lambda
function = exact_soln_lambda
execute_on = 'timestep_end'
block = 'secondary'
[]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = '1 2'
[]
[h]
type = AverageElementSize
block = '1 2'
[]
[]
(modules/stochastic_tools/examples/parameter_study/diffusion_vector.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables/T]
initial_condition = 300
[]
[Kernels]
[time]
type = ADTimeDerivative
variable = T
[]
[diff]
type = ADMatDiffusion
variable = T
diffusivity = diffusivity
[]
[source]
type = ADBodyForce
variable = T
value = 100
function = 1
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = T
boundary = left
value = 300
[]
[right]
type = ADNeumannBC
variable = T
boundary = right
value = -100
[]
[]
[Materials/constant]
type = ADGenericConstantMaterial
prop_names = 'diffusivity'
prop_values = 1
[]
[Executioner]
type = Transient
num_steps = 4
dt = 0.25
[]
[Postprocessors]
[T_avg]
type = ElementAverageValue
variable = T
execute_on = 'initial timestep_end'
[]
[q_left]
type = ADSideDiffusiveFluxAverage
variable = T
boundary = left
diffusivity = diffusivity
execute_on = 'initial timestep_end'
[]
[]
[Reporters]
[acc]
type = AccumulateReporter
reporters = 'T_avg/value q_left/value'
[]
[]
[Controls/stochastic]
type = SamplerReceiver
[]
[Outputs]
[]
(test/tests/outputs/residual/output_residual_test.i)
[Mesh]
file = sq-2blk.e
uniform_refine = 3
[]
[Variables]
# variable in the whole domain
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
# subdomain restricted variable
[./v]
order = FIRST
family = LAGRANGE
block = '1'
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[./exact_fn_v]
type = ParsedFunction
expression = t+1
[../]
[]
[Kernels]
[./ie_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = forcing_fn
[../]
[./ie_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '1 2 3 4'
function = exact_fn
[../]
[./bottom_v]
type = DirichletBC
variable = v
boundary = 5
value = 0
[../]
[./top_v]
type = FunctionDirichletBC
variable = v
boundary = 6
function = exact_fn_v
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out
exodus = true
[]
[Debug]
show_var_residual = 'u v'
show_var_residual_norms = true
[]
(test/tests/postprocessors/nodal_var_value/pps_output_test.i)
[Mesh]
file = square-2x2-nodeids.e
# This test can only be run with renumering disabled, so the
# NodalVariableValue postprocessor's node id is well-defined.
allow_renumbering = false
[]
[Variables]
active = 'u v'
[./u]
order = SECOND
family = LAGRANGE
[../]
[./v]
order = SECOND
family = LAGRANGE
[../]
[]
[Functions]
active = 'force_fn exact_fn left_bc'
[./force_fn]
type = ParsedFunction
expression = '1-x*x+2*t'
[../]
[./exact_fn]
type = ParsedFunction
expression = '(1-x*x)*t'
[../]
[./left_bc]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
active = '
time_u diff_u ffn_u
time_v diff_v'
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'all_u left_v right_v'
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = exact_fn
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '2'
value = 0
[../]
[]
[Postprocessors]
[./l2]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./node1]
type = NodalVariableValue
variable = u
nodeid = 15
outputs = exodus
[../]
[./node4]
type = NodalVariableValue
variable = v
nodeid = 10
outputs = console
[../]
[./avg_v]
type = AverageElementSize
outputs = none
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/executioners/steady_time/steady_time.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
nx = 4
ny = 4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = time_function
[../]
[]
[Functions]
[./time_function]
type = ParsedFunction
expression = 't+1'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left right bottom top'
value = 0
[../]
[]
[Postprocessors]
[./norm]
type = ElementL2Norm
variable = u
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(test/tests/misc/save_in/dg_save_in_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 9
ny = 9
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[AuxVariables]
[./tot_resid]
order = FIRST
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
save_in = 'tot_resid'
[../]
[./forcing]
type = BodyForce
variable = u
function = 1
save_in = 'tot_resid'
[../]
[]
[DGKernels]
[./dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
save_in = 'tot_resid'
[../]
[]
[BCs]
[./robin]
type = RobinBC
boundary = 'left right top bottom'
variable = u
save_in = 'tot_resid'
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_rel_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(test/tests/dampers/bounding_value_element_damper/bounding_value_max_test.i)
# This model tests the BoundingValueElementDamper. The converged solution
# for u starts out in the range from 0 to 1, but after several steps,
# a volumetric source drives it to a value greater than 1, which is
# outside the range of the damper. At that point, the solution can
# no longer converge, and the model errors out with a failure to converge.
# The test verifies that the damper computes the correct value in the first
# nonlinear iteration when the solution exceeds the bounds.
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./source]
type = BodyForce
variable = u
function = 't'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Dampers]
[./bounding_value_damp]
type = BoundingValueElementDamper
min_value = 0.0
max_value = 1.0
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
end_time = 3.0
dt = 0.5
dtmin = 0.5
nl_max_its = 5
[]
(test/tests/outputs/oversample/over_sampling_test_gen.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 3
ny = 3
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[./forcing_fn]
type = ParsedFunction
expression = -4+(x*x+y*y)
[../]
[]
[Variables]
active = 'u'
[./u]
order = THIRD
family = HERMITE
[../]
[]
[Kernels]
active = 'ie diff ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.2
start_time = 0
num_steps = 5
[]
[Outputs]
file_base = out_gen
exodus = true
[./oversampling]
file_base = out_gen_oversample
type = Exodus
refinements = 3
[../]
[]
(test/tests/postprocessors/num_vars/num_vars.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Functions]
[forcing_fnu]
type = ParsedFunction
expression = -6*(x+y)+x*x+y*y
[]
[forcing_fnv]
type = ParsedFunction
expression = -4+x*x*x-x+y*y*y-y
[]
[bc_fnut]
type = ParsedFunction
expression = 3*y*y-1
[]
[bc_fnub]
type = ParsedFunction
expression = -3*y*y+1
[]
[bc_fnul]
type = ParsedFunction
expression = -3*x*x+1
[]
[bc_fnur]
type = ParsedFunction
expression = 3*x*x-1
[]
[slnu]
type = ParsedGradFunction
expression = x*x*x-x+y*y*y-y
grad_x = 3*x*x-1
grad_y = 3*y*y-1
[]
[slnv]
type = ParsedGradFunction
expression = x*x+y*y
grad_x = 2*x
grad_y = 2*y
[]
[]
[Variables]
[u]
order = THIRD
family = HIERARCHIC
[]
[v]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
[]
[diff2]
type = Diffusion
variable = v
[]
[forceu]
type = BodyForce
variable = u
function = forcing_fnu
[]
[forcev]
type = BodyForce
variable = v
function = forcing_fnv
[]
[]
[BCs]
[bc_ut]
type = FunctionDirichletBC
variable = u
boundary = top
function = bc_fnut
[]
[bc_ub]
type = FunctionDirichletBC
variable = u
boundary = bottom
function = bc_fnub
[]
[bc_ul]
type = FunctionDirichletBC
variable = u
boundary = left
function = bc_fnul
[]
[bc_ur]
type = FunctionDirichletBC
variable = u
boundary = right
function = bc_fnur
[]
[bc_v]
type = FunctionDirichletBC
variable = v
function = slnv
boundary = 'top left right bottom'
[]
[]
[Preconditioning]
[prec]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_vars'
[dofs]
type = NumDOFs
[]
[h]
type = AverageElementSize
[]
[L2u]
type = ElementL2Error
variable = u
function = slnu
[]
[L2v]
type = ElementL2Error
variable = v
function = slnv
[]
[H1error]
type = ElementH1Error
variable = u
function = solution
[]
[H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[]
[num_vars]
type = NumVars
system = 'NL'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_rel_tol = 1e-15
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
[]
(test/tests/dampers/min_damping/min_general_damping.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./u_dt]
type = TimeDerivative
variable = u
[../]
[./u_source]
type = BodyForce
variable = u
value = 1
[../]
[]
[Dampers]
[./limit]
type = ConstantDamper
damping = 0.25
min_damping = 0.5
[../]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 1.0
dtmin = 0.5
[]
[Postprocessors]
[./u_avg]
type = ElementAverageValue
variable = u
[../]
[./dt]
type = TimestepSize
[../]
[]
(modules/optimization/test/tests/optimizationreporter/mesh_source/forward_and_adjoint.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
kernel_coverage_check = false
[]
[Variables]
[u]
[]
[u_adjoint]
solver_sys = adjoint
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[src]
type = BodyForce
variable = u
function = src_func
[]
[]
[BCs]
[dirichlet]
type = DirichletBC
variable = u
boundary = 'bottom left'
value = 0
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = u_adjoint
x_coord_name = measure_data/measurement_xcoord
y_coord_name = measure_data/measurement_ycoord
z_coord_name = measure_data/measurement_zcoord
value_name = measure_data/misfit_values
[]
[]
[Functions]
[src_func]
type = ParameterMeshFunction
exodus_mesh = parameter_mesh_in.e
parameter_name = src_rep/vals
[]
[]
[Reporters]
[src_rep]
type = ConstantReporter
real_vector_names = 'vals'
real_vector_values = '1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0'
[]
[measure_data]
type = OptimizationData
variable = u
[]
[]
[VectorPostprocessors]
[gradient_vpp]
type = ElementOptimizationSourceFunctionInnerProduct
variable = u_adjoint
function = src_func
execute_on = ADJOINT_TIMESTEP_END
[]
[]
[Executioner]
type = SteadyAndAdjoint
forward_system = nl0
adjoint_system = adjoint
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-12
l_tol = 1e-12
[]
[AuxVariables]
[source]
[]
[]
[AuxKernels]
[source_aux]
type = FunctionAux
variable = source
function = src_func
[]
[]
[Outputs]
exodus = true
console = true
execute_on = timestep_end
[]
(test/tests/mesh/custom_partitioner/custom_linear_partitioner_restart_test.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 10.0
[]
[./Partitioner]
type = LibmeshPartitioner
partitioner = linear
[../]
parallel_type = replicated
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'bodyforce ie'
[./bodyforce]
type = BodyForce
variable = u
value = 10.0
[../]
[./ie]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 10
dt = .1
[]
[Outputs]
file_base = custom_linear_partitioner_restart_test_out
exodus = true
[]
(test/tests/postprocessors/element_time_derivative/element_time_derivative_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
# dudt = 3*t^2*(x^2 + y^2)
type = ParsedFunction
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./forcing_fn2]
# dudt = 3*t^2*(x^2 + y^2)
type = ParsedFunction
expression = t*x*y
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn2
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./elementAvgTimeDerivative]
type = ElementAverageTimeDerivative
variable = u
[../]
[./elementAvgValue]
type = ElementAverageValue
variable = u
[../]
[]
[Executioner]
type = Transient
scheme = implicit-euler
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_elm_time_deriv
csv = true
[]
(test/tests/mortar/periodic-value/periodic.i)
[Mesh]
[file]
type = FileMeshGenerator
file = square.msh
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
new_block_id = 11
new_block_name = "secondary"
sidesets = '101'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
new_block_id = 12
new_block_name = "primary"
sidesets = '103'
[]
[]
[Variables]
[u]
order = SECOND
block = 'domain'
[]
[lm]
block = 'secondary'
[]
[]
[Kernels]
[diffusion]
type = Diffusion
variable = u
block = 'domain'
[]
[force]
type = BodyForce
variable = u
block = 'domain'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
value = 1
boundary = 'left'
[]
[]
[Constraints]
[ev]
type = EqualValueConstraint
variable = lm
secondary_variable = u
primary_boundary = 103
secondary_boundary = 101
primary_subdomain = 12
secondary_subdomain = 11
periodic = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(modules/optimization/test/tests/optimizationreporter/bimaterial/model_and_adjoint.i)
# Steady state Heat conduction in a 2D domain with two diffusivities
# The domain is -4 <= x <= 4 and -4 <= y <= 4
# The top-half of the domain (y > 0) has high diffusivity
# The bottom-half of the domain (y < 0) has low diffusivity
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 16
ny = 16
xmin = -4
xmax = 4
ymin = -4
ymax = 4
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
kernel_coverage_check = false
[]
[Variables]
[temperature]
[]
[temperature_adjoint]
solver_sys = adjoint
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = diffusivity
[]
[heat_source]
type = BodyForce
value = 100
variable = temperature
[]
[]
[BCs]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 0
[]
[]
[Functions]
[diffusivity_function]
type = NearestReporterCoordinatesFunction
x_coord_name = data/coordx
y_coord_name = data/coordy
value_name = data/diffusivity
[]
[]
[Materials]
[mat]
type = GenericFunctionMaterial
prop_names = diffusivity
prop_values = diffusivity_function
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = temperature_adjoint
x_coord_name = measure_data/measurement_xcoord
y_coord_name = measure_data/measurement_ycoord
z_coord_name = measure_data/measurement_zcoord
value_name = measure_data/misfit_values
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
[]
[data]
type = ConstantReporter
real_vector_names = 'coordx coordy diffusivity'
real_vector_values = '0 0; -2 2; 5 10'
[]
[]
[VectorPostprocessors]
[gradvec]
type = ElementOptimizationDiffusionCoefFunctionInnerProduct
variable = temperature_adjoint
forward_variable = temperature
function = diffusivity_function
execute_on = ADJOINT_TIMESTEP_END
[]
[]
[Executioner]
type = SteadyAndAdjoint
forward_system = nl0
adjoint_system = adjoint
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_forced_its = 1
line_search = none
nl_abs_tol = 1e-8
[]
[Outputs]
console = false
[]
(test/tests/multiapps/restart_multilevel/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
ymin = 0
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[Functions]
[v_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[]
[AuxVariables]
[v]
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[ufn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = v_fn
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
checkpoint = true
[]
[MultiApps]
[sub_app]
app_type = MooseTestApp
type = TransientMultiApp
input_files = 'sub.i'
execute_on = timestep_end
positions = '0 -1 0'
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[]
[]
(test/tests/variables/fe_hier/hier-2-1d.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -1
xmax = 1
nx = 5
elem_type = EDGE3
[]
[Functions]
[./bc_fnl]
type = ParsedFunction
expression = -2*x
[../]
[./bc_fnr]
type = ParsedFunction
expression = 2*x
[../]
[./forcing_fn]
type = ParsedFunction
expression = -2+x*x
[../]
[./solution]
type = ParsedGradFunction
expression = x*x
grad_x = 2*x
[../]
[]
[Variables]
[./u]
order = SECOND
family = HIERARCHIC
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/auxkernels/constant_scalar_aux/constant_scalar_aux.i)
#
# Testing a solution that is second order in space and first order in time
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[AuxVariables]
[./x]
family = SCALAR
order = FIRST
[../]
[]
[Variables]
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[ICs]
[./ic_x]
type = ScalarConstantIC
variable = x
value = 11
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = ((x*x)+(y*y))-(4*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[]
[AuxScalarKernels]
[./const_x]
type = ConstantScalarAux
variable = x
value = 11
[../]
[]
[Kernels]
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.25
# [./Adaptivity]
# refine_fraction = 0.2
# coarsen_fraction = 0.3
# max_h_level = 4
# [../]
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/postprocessor_spatial_user_object/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -0.01
xmax = 0.01
[]
[Functions]
[./fn]
type = ParsedFunction
expression = 'if(a < 0.8625, 1, 0)'
symbol_names = 'a'
symbol_values = 'a_avg'
[../]
[]
[Variables]
[./u]
family = MONOMIAL
order = CONSTANT
[../]
[]
[AuxVariables]
[./a]
family = MONOMIAL
order = CONSTANT
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./rhs]
type = BodyForce
variable = u
function = 1
[../]
[]
[Postprocessors]
[./fn_pps]
type = FunctionValuePostprocessor
function = fn
execute_on = 'initial timestep_end'
[../]
[./a_avg]
type = ElementAverageValue
variable = a
[../]
[]
[UserObjects]
[./fn_uo]
type = PostprocessorSpatialUserObject
postprocessor = fn_pps
[../]
[]
[Executioner]
type = Transient
dt = 0.1
[]
(test/tests/restart/restart_diffusion/restart_diffusion_test_transient_new_name.i)
[Mesh]
file = steady_out.e
[]
[Variables]
[./u_new]
order = FIRST
family = LAGRANGE
# Testing that we can load a solution from a different variable name
initial_from_file_var = u
initial_from_file_timestep = 2
[../]
[]
[Kernels]
active = 'bodyforce ie'
[./bodyforce]
type = BodyForce
variable = u_new
value = 10.0
[../]
[./ie]
type = TimeDerivative
variable = u_new
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u_new
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u_new
boundary = 1
value = 1
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 10
dt = .1
[]
[Outputs]
exodus = true
[]
(modules/optimization/test/tests/executioners/transient_and_adjoint/nonuniform_tstep.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
[]
[Variables]
[u]
[]
[u_adjoint]
solver_sys = adjoint
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[src]
type = BodyForce
variable = u
value = 10
[]
[src_adjoint]
type = BodyForce
variable = u_adjoint
value = 100
[]
[]
[BCs]
[dirichlet]
type = DirichletBC
variable = u
boundary = 'top right'
value = 0
[]
[]
[Executioner]
type = TransientAndAdjoint
forward_system = nl0
adjoint_system = adjoint
[TimeStepper]
type = TimeSequenceStepper
time_sequence = '0 0.1 0.2 0.4 0.7 1.1 1.4 1.6 1.7'
[]
end_time = 1.7
nl_rel_tol = 1e-12
l_tol = 1e-12
[]
[Postprocessors]
[u_avg]
type = ElementAverageValue
variable = u
execute_on = 'TIMESTEP_END ADJOINT_TIMESTEP_END'
[]
[u_adjoint_avg]
type = ElementAverageValue
variable = u_adjoint
execute_on = ADJOINT_TIMESTEP_END
[]
[inner_product]
type = VariableInnerProduct
variable = u
second_variable = u_adjoint
execute_on = ADJOINT_TIMESTEP_END
[]
[]
[Outputs]
[forward]
type = CSV
[]
[adjoint]
type = CSV
execute_on = 'INITIAL ADJOINT_TIMESTEP_END'
[]
[console]
type = Console
execute_postprocessors_on = 'INITIAL TIMESTEP_END ADJOINT_TIMESTEP_END'
[]
[]
(test/tests/userobjects/interface_user_object/interface_userobject_material_value.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
[../]
[./primary0_interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./break_boundary]
input = primary0_interface
type = BreakBoundaryOnSubdomainGenerator
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./v]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 2
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 4
block = 1
[../]
[./source_u]
type = BodyForce
variable = u
function = 0.1*t
[../]
[]
[InterfaceKernels]
[./primary0_interface]
type = PenaltyInterfaceDiffusionDot
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 right top'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = TRUE
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
dt = 0.1
num_steps = 3
dtmin = 0.1
line_search = none
[]
[Outputs]
exodus = true
[]
[UserObjects]
[./interface_material_uo]
type = InterfaceUserObjectTestGetMaterialProperty
property = 'primary_prop'
property_neighbor = 'secondary_prop'
property_boundary = 'boundary_prop'
property_interface = 'interface_prop'
boundary = 'primary0_interface'
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
[../]
[]
[Materials]
[./mat_primary]
type = LinearNonLinearIterationMaterial
block = 0
prefactor = 1
prop_name = 'primary_prop'
[../]
[./mat_secondary]
type = LinearNonLinearIterationMaterial
block = 1
prefactor = 2
prop_name = 'secondary_prop'
[../]
[./mat_boundary]
type = LinearNonLinearIterationMaterial
prefactor = 3
boundary = 'primary0_interface'
prop_name = 'boundary_prop'
[../]
[./mat_interface]
type = LinearNonLinearIterationInterfaceMaterial
prefactor = 4
boundary = 'primary0_interface'
prop_name = 'interface_prop'
[../]
[]
(modules/stochastic_tools/test/tests/reporters/parallel_storage/sub.i)
S = 10
D = 10
[Mesh]
type = GeneratedMesh
dim = 1
nx = 6
xmax = 6
[]
[Variables]
[u]
[]
[v]
[]
[]
[AuxVariables]
[u_aux]
[]
[]
[Kernels]
[diffusion_u]
type = MatDiffusion
variable = u
diffusivity = D_u
[]
[source_u]
type = BodyForce
variable = u
value = 1.0
[]
[diffusion_v]
type = MatDiffusion
variable = v
diffusivity = D_v
[]
[source_v]
type = BodyForce
variable = v
value = 1.0
[]
[]
[AuxKernels]
[func_aux]
type = FunctionAux
variable = u_aux
function = u_aux_func
[]
[]
[Functions]
[u_aux_func]
type = ParsedFunction
expression = 'S * pow(x, D/10)'
symbol_names = 'S D'
symbol_values = '${S} ${D}'
[]
[]
[Materials]
[diffusivity_u]
type = GenericConstantMaterial
prop_names = D_u
prop_values = 2.0
[]
[diffusivity_v]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 4.0
[]
[]
[BCs]
[left_u]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right_u]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Reporters]
[solution_storage]
type = SolutionContainer
execute_on = 'FINAL'
[]
[solution_storage_aux]
type = SolutionContainer
execute_on = 'FINAL'
system = aux
[]
[]
(test/tests/executioners/time_period/time_period_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Functions]
[./exact_p1]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[../]
[./ffn_p1]
type = ParsedFunction
expression = (x*x+y*y)-4*t
[../]
[./exact_p2]
type = ParsedFunction
expression = t*((x*x*x)+(y*y*y))
[../]
[./ffn_p2]
type = ParsedFunction
expression = (x*x*x+y*y*y)-6*t*(x+y)
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn1]
type = BodyForce
variable = u
function = ffn_p1
[../]
[./ffn2]
type = BodyForce
variable = u
function = ffn_p2
[../]
[]
[BCs]
[./all1]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_p1
[../]
[./all2]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_p2
[../]
[]
[Executioner]
type = Transient
start_time = 0
dt = 0.1
num_steps = 10
[]
[Controls]
[./first_period]
type = TimePeriod
start_time = 0.0
end_time = 0.45
enable_objects = '*/ffn1 */all1'
disable_objects = '*/ffn2 */all2'
execute_on = 'initial timestep_begin'
set_sync_times = true
[../]
[]
[Outputs]
exodus = true
[]
(modules/optimization/test/tests/outputs/exodus_optimization_steady/forward.i)
[Mesh]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[heat_source]
type = BodyForce
value = 1000
variable = temperature
[]
[]
[BCs]
[left]
type = NeumannBC
variable = temperature
boundary = left
value = 0
[]
[right]
type = NeumannBC
variable = temperature
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 200
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 100
[]
[]
[Functions]
[thermo_conduct]
type = ParsedOptimizationFunction
expression = 'alpha'
param_symbol_names = 'alpha'
param_vector_name = 'params/p1'
[]
[]
[Materials]
[steel]
type = GenericFunctionMaterial
prop_names = 'thermal_conductivity'
prop_values = 'thermo_conduct'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'preonly lu superlu_dist'
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
[]
[params]
type = ConstantReporter
real_vector_names = 'p1'
real_vector_values = '0' # Dummy value
[]
[]
[Outputs]
console = false
file_base = 'forward'
[exo]
type = ExodusOptimizationSteady
execute_on = 'TIMESTEP_END'
[]
[]
(test/tests/executioners/transient_sync_time/transient_time_interval_output_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./bc_func]
type = ParsedFunction
expression = sin(pi*0.1*x*t)
[../]
# Laplacian of the function above
[./interior_func]
type = ParsedFunction
expression = 0.01*pi*pi*t*t*sin(0.1*pi*x*t)
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = interior_func
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = bc_func
[../]
[]
[Executioner]
type = Transient
dt = 1
start_time = 0
num_steps = 10
# These times will be sync'd in the output
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_tio
time_step_interval = 3
[./exodus]
type = Exodus
execute_on = 'final timestep_end'
[../]
[]
(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/problems/reference_residual_problem/ad_abs_ref.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
[]
[GlobalParams]
absolute_value_vector_tags = 'absref'
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'absref'
extra_tag_vectors = 'absref'
[]
[Variables]
[u][]
[v]
scaling = 1e-6
[]
[]
[Functions]
[ramp]
type = ParsedFunction
expression = 'if(t < 5, t - 5, 0) * x'
[]
[]
[Kernels]
[u_dt]
type = ADTimeDerivative
variable = u
[]
[u_coupled_rx]
type = ADCoupledForce
variable = u
v = v
coef = 1
[]
[v_dt]
type = ADTimeDerivative
variable = v
[]
[v_neg_force]
type = ADBodyForce
variable = v
value = ${fparse -1 / 2}
function = ramp
[]
[v_force]
type = ADBodyForce
variable = v
value = 1
function = ramp
[]
[]
[Postprocessors]
[u_avg]
type = ElementAverageValue
variable = u
execute_on = 'TIMESTEP_END INITIAL'
[]
[v_avg]
type = ElementAverageValue
variable = v
execute_on = 'TIMESTEP_END INITIAL'
[]
[timestep]
type = TimePostprocessor
outputs = 'none'
[]
[v_old]
type = ElementAverageValue
variable = v
execute_on = TIMESTEP_BEGIN
outputs = none
[]
[u_old]
type = ElementAverageValue
variable = u
execute_on = TIMESTEP_BEGIN
outputs = none
[]
[v_exact]
type = ParsedPostprocessor
pp_names = 'timestep v_old'
function = 't := if(timestep > 5, 5, timestep); (t^2 - 9 * t) / 8'
[]
[u_exact]
type = ParsedPostprocessor
pp_names = 'u_old v_exact'
function = 'u_old + v_exact'
[]
[]
[Executioner]
type = Transient
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = none
num_steps = 10
nl_rel_tol = 1e-06
verbose = true
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/initial_stress/gravity_cosserat.i)
# Apply an initial stress that should be
# exactly that caused by gravity, and then
# do a transient step to check that nothing
# happens
# TODO: currently this has no div(moment_stress)
# contriution to the Kernels. This is because
# there is no way in MOOSE of calculating
# moment stresses and applying initial stresses.
# This will become possible after issue #7243 is
# resolved.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 10
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -10
zmax = 0
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./wc_x]
[../]
[./wc_y]
[../]
[./wc_z]
[../]
[]
[Kernels]
[./cx_elastic]
type = CosseratStressDivergenceTensors
variable = disp_x
component = 0
[../]
[./cy_elastic]
type = CosseratStressDivergenceTensors
variable = disp_y
component = 1
[../]
[./cz_elastic]
type = CosseratStressDivergenceTensors
variable = disp_z
component = 2
[../]
[./x_moment]
type = MomentBalancing
variable = wc_x
component = 0
[../]
[./y_moment]
type = MomentBalancing
variable = wc_y
component = 1
[../]
[./z_moment]
type = MomentBalancing
variable = wc_z
component = 2
[../]
[./weight]
type = BodyForce
variable = disp_z
value = -0.5 # this is density*gravity
[../]
[]
[BCs]
# back = zmin
# front = zmax
# bottom = ymin
# top = ymax
# left = xmin
# right = xmax
[./x]
type = DirichletBC
variable = disp_x
boundary = 'left right'
value = 0
[../]
[./y]
type = DirichletBC
variable = disp_y
boundary = 'bottom top'
value = 0
[../]
[./z]
type = DirichletBC
variable = disp_z
boundary = 'back'
value = 0
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[]
[Functions]
[./weight]
type = ParsedFunction
expression = '0.5*z' # initial stress that should result from the weight force
[../]
[./kxx]
type = ParsedFunction
expression = '0.4*z' # some arbitrary xx and yy stress that should not affect the result
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeCosseratElasticityTensor
B_ijkl = '1.1 0.6 0.6' # In Forest notation this is alpha=1.1 (this is unimportant), beta=gamma=0.6.
fill_method_bending = 'general_isotropic'
fill_method = symmetric_isotropic
E_ijkl = '0.4 0.4' # young = 1, poisson = 0.25
[../]
[./strain]
type = ComputeCosseratSmallStrain
eigenstrain_names = ini_stress
[../]
[./ini_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = 'kxx 0 0 0 kxx 0 0 0 weight'
eigenstrain_name = ini_stress
[../]
[./stress]
type = ComputeCosseratLinearElasticStress
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
end_time = 1.0
dt = 1.0
solve_type = NEWTON
type = Transient
nl_abs_tol = 1E-8
nl_rel_tol = 1E-12
l_tol = 1E-3
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
file_base = gravity_cosserat
exodus = true
[]
(test/tests/postprocessors/element_average_value/elem_pps_multi_block_test.i)
#
# Tests elemental PPS running on multiple block
#
[Mesh]
type = StripeMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 3
ny = 3
elem_type = QUAD4
stripes = 3
# StripeMesh currently only works correctly with ReplicatedMesh.
parallel_type = replicated
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = x
[../]
[]
[Variables]
[./u]
family = MONOMIAL
order = CONSTANT
[../]
[]
[Kernels]
[./uv]
type = Reaction
variable = u
[../]
[./fv]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[Postprocessors]
[./avg_1_2]
type = ElementAverageValue
variable = u
block = '0 1'
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
execute_on = 'timestep_end'
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[]
(modules/fluid_properties/test/tests/calorically_imperfect_gas/test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
elem_type = QUAD4
[]
[Functions]
[f_fn]
type = ParsedFunction
expression = -4
[]
[bc_fn]
type = ParsedFunction
expression = 'x*x+y*y'
[]
[e_fn]
type = PiecewiseLinear
x = '100 280 300 350 400 450 500 550 600 700 800 900 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 5000'
y = '783.9 2742.3 2958.6 3489.2 4012.7 4533.3 5053.8 5574 6095.1 7140.2 8192.9 9256.3 10333.6 12543.9 14836.6 17216.3 19688.4 22273.7 25018.3 28042.3 31544.2 35818.1 41256.5 100756.5'
scale_factor = 1e3
[]
[mu_fn]
type = PiecewiseLinear
x = '100 280 300 350 400 450 500 550 600 700 800 900 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 5000'
y = '85.42 85.42 89.53 99.44 108.9 117.98 126.73 135.2 143.43 159.25 174.36 188.9 202.96 229.88 255.5 280.05 303.67 326.45 344.97 366.49 387.87 409.48 431.86 431.86'
scale_factor = 1e-7
[]
[k_fn]
type = PiecewiseLinear
x = '100 280 300 350 400 450 500 550 600 700 800 900 1000 1200 1400 1600 1800 2000 2200 2400 2600 2800 3000 5000'
y = '186.82 186.82 194.11 212.69 231.55 250.38 268.95 287.19 305.11 340.24 374.92 409.66 444.75 511.13 583.42 656.44 733.32 826.53 961.15 1180.38 1546.31 2135.49 3028.08 3028.08'
scale_factor = 1e-3
[]
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[e]
initial_condition = 4012.7e3
[]
[v]
initial_condition = 0.0007354064593540647
[]
[p]
family = MONOMIAL
order = CONSTANT
[]
[T]
family = MONOMIAL
order = CONSTANT
[]
[cp]
family = MONOMIAL
order = CONSTANT
[]
[cv]
family = MONOMIAL
order = CONSTANT
[]
[c]
family = MONOMIAL
order = CONSTANT
[]
[mu]
family = MONOMIAL
order = CONSTANT
[]
[k]
family = MONOMIAL
order = CONSTANT
[]
[g]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[p]
type = MaterialRealAux
variable = p
property = pressure
[]
[T]
type = MaterialRealAux
variable = T
property = temperature
[]
[cp]
type = MaterialRealAux
variable = cp
property = cp
[]
[cv]
type = MaterialRealAux
variable = cv
property = cv
[]
[c]
type = MaterialRealAux
variable = c
property = c
[]
[mu]
type = MaterialRealAux
variable = mu
property = mu
[]
[k]
type = MaterialRealAux
variable = k
property = k
[]
[g]
type = MaterialRealAux
variable = g
property = g
[]
[]
[FluidProperties]
[h2]
type = CaloricallyImperfectGas
molar_mass = 0.002
e = e_fn
k = k_fn
mu = mu_fn
min_temperature = 100
max_temperature = 5000
[]
[]
[Materials]
[fp_mat]
type = FluidPropertiesMaterialVE
e = e
v = v
fp = h2
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = f_fn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = bc_fn
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/elastic_patch/elastic_patch_rz.i)
#
# This problem is taken from the Abaqus verification manual:
# "1.5.4 Patch test for axisymmetric elements"
# The stress solution is given as:
# xx = yy = zz = 2000
# xy = 400
#
# Since the strain is 1e-3 in all three directions, the new density should be
# new_density = original_density * V_0 / V
# new_density = 0.283 / (1 + 1e-3 + 1e-3 + 1e-3) = 0.282153
[GlobalParams]
displacements = 'disp_x disp_y'
temperature = temp
[]
[Mesh]
file = elastic_patch_rz.e
coord_type = RZ
[]
[Variables]
[temp]
initial_condition = 117.56
[]
[]
[Modules/TensorMechanics/Master/All]
strain = SMALL
incremental = true
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_zx'
[]
[Kernels]
[body]
type = BodyForce
variable = disp_y
value = 1
function = '-400/x'
[]
[heat]
type = TimeDerivative
variable = temp
[]
[]
[BCs]
[ur]
type = FunctionDirichletBC
variable = disp_x
boundary = 10
function = '1e-3*x'
[]
[uz]
type = FunctionDirichletBC
variable = disp_y
boundary = 10
function = '1e-3*(x+y)'
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.25
[]
[stress]
type = ComputeStrainIncrementBasedStress
[]
[density]
type = Density
density = 0.283
outputs = all
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
end_time = 1.0
[]
[Outputs]
[out]
type = Exodus
elemental_as_nodal = true
[]
[]
(modules/heat_transfer/test/tests/radiation_transfer_symmetry/cavity_with_pillars_symmetry_bc.i)
#
# inner_left: 8
# inner_top: 11
# inner_bottom: 10
# inner_front: 9
# back_2: 7
# obstruction: 6
#
[Mesh]
[cartesian]
type = CartesianMeshGenerator
dim = 3
dx = '0.4 0.5 0.5 0.5'
dy = '0.5 0.75 0.5'
dz = '1.5 0.5'
subdomain_id = '
3 1 1 1
3 1 2 1
3 1 1 1
3 1 1 1
3 1 1 1
3 1 1 1
'
[]
[add_obstruction]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 2
paired_block = 1
new_boundary = obstruction
input = cartesian
[]
[add_new_back]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(z) < 1e-10'
included_subdomains = '1'
normal = '0 0 -1'
new_sideset_name = back_2
input = add_obstruction
[]
[add_inner_left]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 3
paired_block = 1
new_boundary = inner_left
input = add_new_back
[]
[add_inner_front]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(z - 2) < 1e-10'
included_subdomains = '1'
normal = '0 0 1'
new_sideset_name = inner_front
input = add_inner_left
[]
[add_inner_bottom]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(y) < 1e-10'
included_subdomains = '1'
normal = '0 -1 0'
new_sideset_name = inner_bottom
input = add_inner_front
[]
[add_inner_top]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(y - 1.75) < 1e-10'
included_subdomains = '1'
normal = '0 1 0'
new_sideset_name = inner_top
input = add_inner_bottom
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[temperature]
block = '2 3'
initial_condition = 300
[]
[]
[Kernels]
[conduction]
type = HeatConduction
variable = temperature
block = '2 3'
diffusion_coefficient = 1
[]
[source]
type = BodyForce
variable = temperature
value = 1000
block = '2'
[]
[]
[BCs]
[convective]
type = CoupledConvectiveHeatFluxBC
variable = temperature
T_infinity = 300
htc = 50
boundary = 'left'
[]
[]
[GrayDiffuseRadiation]
[./cavity]
boundary = '6 7 8 9 10 11'
emissivity = '1 1 1 1 1 1'
n_patches = '1 1 1 1 1 1'
adiabatic_boundary = '7 9 10 11'
symmetry_boundary = '2'
partitioners = 'metis metis metis metis metis metis'
temperature = temperature
ray_tracing_face_order = SECOND
normalize_view_factor = false
[../]
[]
[Postprocessors]
[Tpv]
type = PointValue
variable = temperature
point = '0.3 0.5 0.5'
[]
[volume]
type = VolumePostprocessor
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/adaptivity/initial_adapt/initial_adapt.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1
solve_type = 'PJFNK'
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 2
initial_steps = 2
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/materials/material/adv_mat_couple_test2.i)
[Mesh]
file = rectangle.e
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff body_force'
[./diff]
type = Diffusion
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
block = 1
value = 10
[../]
[]
[BCs]
active = 'right'
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Materials]
[./mat_3]
type = GenericConstantMaterial
prop_names = 'prop3'
prop_values = '300'
block = '1 2'
[../]
[./mat_2]
type = CoupledMaterial
mat_prop = 'prop2'
coupled_mat_prop = 'prop3'
block = '1 2'
[../]
[./mat_1]
type = CoupledMaterial2
mat_prop = 'prop1'
coupled_mat_prop1 = 'prop2'
coupled_mat_prop2 = 'prop3'
block = '1 2'
[../]
[]
[Executioner]
type = Steady
# solve_type = 'PJFNK'
# preconditioner = 'ILU'
solve_type = 'PJFNK'
# petsc_options_iname = '-pc_type -pc_hypre_type'
# petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
file_base = out_adv_coupled2
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/mms/lid-driven/hybrid-cg-dg-mms.i)
rho=1.1
mu=1.1
cp=1.1
k=1.1
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = -1
xmax = 1.0
ymin = -1
ymax = 1.0
nx = 2
ny = 2
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[]
[]
[Variables]
[u]
family = MONOMIAL
[]
[v]
family = MONOMIAL
[]
[pressure][]
[T]
family = MONOMIAL
[]
[]
[Kernels]
[momentum_x_convection]
type = ADConservativeAdvection
variable = u
velocity = 'velocity'
advected_quantity = 'rhou'
[]
[momentum_x_diffusion]
type = MatDiffusion
variable = u
diffusivity = 'mu'
[]
[momentum_x_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = u
pressure = pressure
component = 0
[]
[u_forcing]
type = BodyForce
variable = u
function = forcing_u
[]
[momentum_y_convection]
type = ADConservativeAdvection
variable = v
velocity = 'velocity'
advected_quantity = 'rhov'
[]
[momentum_y_diffusion]
type = MatDiffusion
variable = v
diffusivity = 'mu'
[]
[momentum_y_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = v
pressure = pressure
component = 1
[]
[v_forcing]
type = BodyForce
variable = v
function = forcing_v
[]
[mass]
type = ADConservativeAdvection
variable = pressure
velocity = velocity
advected_quantity = -1
[]
[p_forcing]
type = BodyForce
variable = pressure
function = forcing_p
[]
[T_convection]
type = ADConservativeAdvection
variable = T
velocity = 'velocity'
advected_quantity = 'rho_cp_temp'
[]
[T_diffusion]
type = MatDiffusion
variable = T
diffusivity = 'k'
[]
[T_forcing]
type = BodyForce
variable = T
function = forcing_T
[]
[]
[DGKernels]
[momentum_x_convection]
type = ADDGAdvection
variable = u
velocity = 'velocity'
advected_quantity = 'rhou'
[]
[momentum_x_diffusion]
type = DGDiffusion
variable = u
sigma = 6
epsilon = -1
diff = 'mu'
[]
[momentum_y_convection]
type = ADDGAdvection
variable = v
velocity = 'velocity'
advected_quantity = 'rhov'
[]
[momentum_y_diffusion]
type = DGDiffusion
variable = v
sigma = 6
epsilon = -1
diff = 'mu'
[]
[T_convection]
type = ADDGAdvection
variable = T
velocity = 'velocity'
advected_quantity = 'rho_cp_temp'
[]
[T_diffusion]
type = DGDiffusion
variable = T
sigma = 6
epsilon = -1
diff = 'k'
[]
[]
[BCs]
[u_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right top'
variable = u
sigma = 6
epsilon = -1
function = exact_u
diff = 'mu'
[]
[v_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right top'
variable = v
sigma = 6
epsilon = -1
function = exact_v
diff = 'mu'
[]
[pressure_pin]
type = FunctionDirichletBC
variable = pressure
boundary = 'pinned_node'
function = 'exact_p'
[]
[T_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right top'
variable = T
sigma = 6
epsilon = -1
function = exact_T
diff = 'k'
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho cp'
prop_values = '${rho} ${cp}'
[]
[const_reg]
type = GenericConstantMaterial
prop_names = 'mu k'
prop_values = '${mu} ${k}'
[]
[vel]
type = ADVectorFromComponentVariablesMaterial
vector_prop_name = 'velocity'
u = u
v = v
[]
[rhou]
type = ADParsedMaterial
property_name = 'rhou'
coupled_variables = 'u'
material_property_names = 'rho'
expression = 'rho*u'
[]
[rhov]
type = ADParsedMaterial
property_name = 'rhov'
coupled_variables = 'v'
material_property_names = 'rho'
expression = 'rho*v'
[]
[rho_cp]
type = ADParsedMaterial
property_name = 'rho_cp'
material_property_names = 'rho cp'
expression = 'rho*cp'
[]
[rho_cp_temp]
type = ADParsedMaterial
property_name = 'rho_cp_temp'
material_property_names = 'rho cp'
coupled_variables = 'T'
expression = 'rho*cp*T'
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'sin(y)*cos((1/2)*x*pi)'
[]
[forcing_u]
type = ParsedFunction
expression = 'mu*sin(y)*cos((1/2)*x*pi) + (1/4)*pi^2*mu*sin(y)*cos((1/2)*x*pi) - 1/2*pi*rho*sin(x)*sin(y)*sin((1/2)*y*pi)*cos((1/2)*x*pi) + rho*sin(x)*cos(y)*cos((1/2)*x*pi)*cos((1/2)*y*pi) - pi*rho*sin(y)^2*sin((1/2)*x*pi)*cos((1/2)*x*pi) + sin(y)*cos(x)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_v]
type = ParsedFunction
expression = 'sin(x)*cos((1/2)*y*pi)'
[]
[forcing_v]
type = ParsedFunction
expression = 'mu*sin(x)*cos((1/2)*y*pi) + (1/4)*pi^2*mu*sin(x)*cos((1/2)*y*pi) - pi*rho*sin(x)^2*sin((1/2)*y*pi)*cos((1/2)*y*pi) - 1/2*pi*rho*sin(x)*sin(y)*sin((1/2)*x*pi)*cos((1/2)*y*pi) + rho*sin(y)*cos(x)*cos((1/2)*x*pi)*cos((1/2)*y*pi) + sin(x)*cos(y)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'sin(x)*sin(y)'
[]
[forcing_p]
type = ParsedFunction
expression = '(1/2)*pi*sin(x)*sin((1/2)*y*pi) + (1/2)*pi*sin(y)*sin((1/2)*x*pi)'
[]
[exact_T]
type = ParsedFunction
expression = 'cos(x)*cos(y)'
[]
[forcing_T]
type = ParsedFunction
expression = '-cp*rho*sin(x)*sin(y)*cos(x)*cos((1/2)*y*pi) - cp*rho*sin(x)*sin(y)*cos(y)*cos((1/2)*x*pi) - 1/2*pi*cp*rho*sin(x)*sin((1/2)*y*pi)*cos(x)*cos(y) - 1/2*pi*cp*rho*sin(y)*sin((1/2)*x*pi)*cos(x)*cos(y) + 2*k*cos(x)*cos(y)'
symbol_names = 'rho cp k'
symbol_values = '${rho} ${cp} ${k}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO mumps'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2Error
variable = u
function = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2v]
variable = v
function = exact_v
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2T]
variable = T
function = exact_T
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
variable = pressure
function = exact_p
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(test/tests/executioners/solve_type_linear/linear_with_full_smp.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
[]
[Variables]
[u]
[]
[v]
[]
[]
[Kernels]
[u_diffusion]
type = Diffusion
variable = u
[]
[v_diffusion]
type = Diffusion
variable = v
[]
[u_reaction]
type = Reaction
variable = u
[]
[v_reaction]
type = Reaction
variable = v
[]
[u_force]
type = BodyForce
variable = u
[]
[v_force]
type = CoupledForce
variable = v
v = u
[]
[]
[Executioner]
type = Steady
solve_type = LINEAR
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/picard_postprocessor/transient_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[time]
type = TimeDerivative
variable = u
[]
[sink]
type = BodyForce
variable = u
value = -1
[]
[]
[BCs]
[right]
type = PostprocessorDirichletBC
variable = u
boundary = right
postprocessor = 'from_main'
[]
[]
[Postprocessors]
[from_main]
type = Receiver
default = 0
[]
[to_main]
type = SideAverageValue
variable = u
boundary = left
[]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
[]
[Outputs]
[csv]
type = CSV
start_step = 6
[]
exodus = false
[]
(test/tests/auxkernels/time_integration/time_integration.i)
# This test covers the usage of the VariableTimeIntegrationAux
# kernel. Here we test three different schemes for integrating a field
# variable in time. Midpoint, Trapezoidal, and Simpson's rule are
# used. For this test, we use a manufactured solution and we compare
# the Trapezoidal and Simpson's rule, which must be exact for this
# exact solution, which is a linear function of time.
#
# The set up problem is
#
# du/dt - Laplacian(u) = Q
#
# with exact solution: u = t*(x*x+y*y).
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD9
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
[]
[Functions]
[./dts]
type = PiecewiseLinear
x = '0.01 0.1'
y = '0.005 0.05'
[../]
[]
[Variables]
[./u]
initial_condition = 0.0
family = LAGRANGE
order = SECOND
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./timederivative]
type = TimeDerivative
variable = u
[../]
[./sourceterm]
type = BodyForce
variable = u
function = Source
[../]
[]
[AuxVariables]
[./v_midpoint]
[../]
[./v_trapazoid]
[../]
[./v_simpson]
[../]
[]
[AuxKernels]
[./MidpointTimeIntegrator]
type = VariableTimeIntegrationAux
variable_to_integrate = u
variable = v_midpoint
order = 1
[../]
[./TrapazoidalTimeIntegrator]
type = VariableTimeIntegrationAux
variable_to_integrate = u
variable = v_trapazoid
order = 2
[../]
[./SimpsonsTimeIntegrator]
type = VariableTimeIntegrationAux
variable_to_integrate = u
variable = v_simpson
order = 3
[../]
[]
[BCs]
[./RightBC]
type = FunctionDirichletBC
variable = u
function = RightBC
boundary = 'right'
[../]
[./LeftBC]
type = FunctionDirichletBC
variable = u
function = LeftBC
boundary = 'left'
[../]
[./TopBC]
type = FunctionDirichletBC
variable = u
function = TopBC
boundary = 'top'
[../]
[./BottomBC]
type = FunctionDirichletBC
variable = u
function = BottomBC
boundary = 'bottom'
[../]
[]
[Functions]
[./Soln]
type = ParsedFunction
expression = 't*(x*x+y*y)'
[../]
[./Source]
type = ParsedFunction
expression = '(x*x + y*y) - 4*t'
[../]
[./TopBC]
type = ParsedFunction
expression = 't*(x*x+1)'
[../]
[./BottomBC]
type = ParsedFunction
expression = 't*x*x'
[../]
[./RightBC]
type = ParsedFunction
expression = 't*(y*y+1)'
[../]
[./LeftBC]
type = ParsedFunction
expression = 't*y*y'
[../]
[]
[Postprocessors]
[./l2_error]
type = NodalL2Error
variable = u
function = Soln
[../]
[]
[Executioner]
type = Transient
end_time = 0.1
# dt = 0.1
# num_steps = 10
[./TimeStepper]
type = FunctionDT
function = dts
[../]
nl_abs_tol = 1.e-15
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/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
[]
[]
(test/tests/mortar/continuity-2d-conforming/conforming.i)
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-conf.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Functions]
[./exact_sln]
type = ParsedFunction
expression= y
[../]
[./ffn]
type = ParsedFunction
expression= 0
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = ffn
[../]
[]
[Constraints]
[./ced]
type = EqualValueConstraint
variable = lm
secondary_variable = u
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '1 2 3 4'
function = exact_sln
[../]
[]
[Postprocessors]
[./l2_error]
type = ElementL2Error
variable = u
function = exact_sln
block = '1 2'
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
[./fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
l_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(test/tests/interfacekernels/1d_interface/mixed_shapes.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[../]
[./interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./interface_again]
input = interface
type = SideSetsBetweenSubdomainsGenerator
primary_block = '1'
paired_block = '0'
new_boundary = 'primary1_interface'
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = '0'
[../]
[./v]
order = FIRST
family = MONOMIAL
block = '1'
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[../]
[./body_u]
type = BodyForce
variable = u
block = 0
function = 'x^3+x^2+x+1'
[../]
[./body_v]
type = BodyForce
variable = v
block = 1
function = 'x^3+x^2+x+1'
[../]
[]
[DGKernels]
[./dg_diff_v]
type = DGDiffusion
variable = v
block = 1
diff = 2
sigma = 6
epsilon = -1
[../]
[]
[InterfaceKernels]
[./interface]
type = OneSideDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
D = 4
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left'
value = 1
[../]
# [./right]
# type = DirichletBC
# variable = v
# boundary = 'right'
# value = 0
# [../]
[./right]
type = DGFunctionDiffusionDirichletBC
variable = v
boundary = 'right'
function = 0
epsilon = -1
sigma = 6
[../]
[./middle]
type = NeumannBC
variable = u
boundary = 'primary0_interface'
value = '.5'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
[Debug]
show_var_residual_norms = true
[]
(test/tests/userobjects/internal_side_user_object/internal_side_user_object.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
ymin = -1
xmax = 1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[]
[Functions]
[./fn_exact]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[./ffn]
type = ParsedFunction
expression = -4
[../]
[]
[UserObjects]
[./isuo]
type = InsideUserObject
variable = u
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = FIRST
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = ffn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = fn_exact
[../]
[]
[Postprocessors]
[./value]
type = InsideValuePPS
user_object = isuo
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(python/mms/test/mms_spatial.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 8
ny = 8
[]
[Variables]
[u][]
[]
[Kernels]
[diff]
type = ADDiffusion
variable = u
[]
[force]
type = BodyForce
variable = u
function = force
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = 'sin(2*pi*x)*sin(2*pi*y)'
[]
[force]
type = ParsedFunction
expression = '8*pi^2*sin(2*x*pi)*sin(2*y*pi)'
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
function = exact
boundary = 'left right top bottom'
[]
[]
[Postprocessors]
[error]
type = ElementL2Error
function = exact
variable = u
[]
[h]
type = AverageElementSize
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/kernels/vector_fe/coupled_scalar_default_vector_value.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = -1.1
ymin = -1.1
xmax = 1.1
ymax = 1.1
[]
[Variables]
[./v]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = v
[../]
[./source]
type = BodyForce
variable = v
[../]
[./advection]
type = EFieldAdvection
variable = v
charge = 'positive'
mobility = 1
[../]
[]
[BCs]
[left]
type = DirichletBC
variable = v
value = 0
boundary = left
[]
[right]
type = DirichletBC
variable = v
value = 1
boundary = right
[]
[]
[Preconditioning]
[./pre]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'asm'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/poro_elasticity/pp_generation_fullysat_action.i)
# Same as pp_generation.i, but using an Action
#
# A sample is constrained on all sides and its boundaries are
# also impermeable. Fluid is pumped into the sample via a
# volumetric source (ie kg/second per cubic meter), and the
# rise in porepressure is observed.
#
# Source = s (units = kg/m^3/second)
#
# Expect:
# fluid_mass = mass0 + s*t
# stress = 0 (remember this is effective stress)
# Porepressure = fluid_bulk*log(fluid_mass_density/density_P0), where fluid_mass_density = fluid_mass/porosity
# porosity = biot+(phi0-biot)*exp(pp(biot-1)/solid_bulk)
#
# Parameters:
# Biot coefficient = 0.3
# Phi0 = 0.1
# Solid Bulk modulus = 2
# fluid_bulk = 13
# density_P0 = 1
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.0
bulk_modulus = 13.0
viscosity = 1.0
density0 = 1.0
[]
[]
[PorousFlowFullySaturated]
coupling_type = HydroMechanical
displacements = 'disp_x disp_y disp_z'
porepressure = porepressure
biot_coefficient = 0.3
gravity = '0 0 0'
fp = the_simple_fluid
stabilization = none # not needed: there is no flow
save_component_rate_in = nodal_kg_per_s
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[]
[]
[Kernels]
[source]
type = BodyForce
function = 0.1
variable = porepressure
[]
[]
[AuxVariables]
[nodal_kg_per_s]
[]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[porosity]
type = PorousFlowPropertyAux
variable = porosity
property = porosity
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = ComputeLinearElasticStress
[]
[porosity]
type = PorousFlowPorosity
fluid = true
mechanical = true
porosity_zero = 0.1
biot_coefficient = 0.3
solid_bulk = 2
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 1 0 0 0 1' # unimportant
[]
[]
[Functions]
[porosity_analytic]
type = ParsedFunction
expression = 'biot+(phi0-biot)*exp(pp*(biot-1)/bulk)'
symbol_names = 'biot phi0 pp bulk'
symbol_values = '0.3 0.1 p0 2'
[]
[]
[Postprocessors]
[nodal_kg_per_s]
type = PointValue
point = ' 0 0 0'
variable = nodal_kg_per_s
outputs = csv
[]
[fluid_mass]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'initial timestep_end'
[]
[porosity]
type = PointValue
outputs = 'console csv'
point = '0 0 0'
variable = porosity
[]
[p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
[]
[porosity_analytic]
type = FunctionValuePostprocessor
function = porosity_analytic
[]
[zdisp]
type = PointValue
outputs = csv
point = '0 0 0.5'
variable = disp_z
[]
[stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[]
[stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[]
[stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-14 1E-10 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = pp_generation_fullysat_action
csv = true
[]
(modules/xfem/test/tests/moving_interface/verification/2D_xy_homog1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: 2D
# Coordinate System: xy
# Material Numbers/Types: homogeneous 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# Transient 2D heat transfer problem in Cartesian coordinates designed with
# the Method of Manufactured Solutions. This problem was developed to verify
# XFEM performance on linear elements in the presence of a moving interface
# sweeping across the x-y coordinates of a system with homogeneous material
# properties. This problem can be exactly evaluated by FEM/Moose without the
# moving interface. Both the temperature and level set function are designed
# to be linear to attempt to minimize error between the Moose/exact solution
# and XFEM results.
# Results:
# The temperature at the bottom left boundary (x=0, y=0) exhibits the largest
# difference between the FEM/Moose solution and XFEM results. We present the
# XFEM results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 479.9998791
# 0.6 520 519.9995307
# 0.8 560 559.9989724
# 1.0 600 599.9984541
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraints]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-100*x-100*y+200)'
[../]
[./neumann_func]
type = ParsedFunction
expression = '1.5*100*t'
[../]
[./dirichlet_right_func]
type = ParsedFunction
expression = '(-100*y+100)*t+400'
[../]
[./dirichlet_top_func]
type = ParsedFunction
expression = '(-100*x+100)*t+400'
[../]
[./ls_func]
type = ParsedFunction
expression = '-0.5*(x+y) + 1.04 - 0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericConstantMaterial
prop_names = 'diffusion_coefficient'
prop_values = 1.5
[../]
[]
[BCs]
[./left_du]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = FunctionDirichletBC
variable = u
boundary = 'right'
function = dirichlet_right_func
[../]
[./bottom_du]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = neumann_func
[../]
[./top_u]
type = FunctionDirichletBC
variable = u
boundary = 'top'
function = dirichlet_top_func
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/transfers/multiapp_conservative_transfer/parent_power_density.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[block1]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0.5 0 0'
top_right = '1 1 0'
[]
[]
[Variables]
[power_density]
[]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2'
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[BCs]
[left]
type = DirichletBC
variable = power_density
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = power_density
boundary = right
value = 1e3
[]
[]
[AuxVariables]
[from_sub]
[]
[]
[Postprocessors]
[pwr0]
type = ElementIntegralVariablePostprocessor
block = 0
variable = power_density
[]
[pwr1]
type = ElementIntegralVariablePostprocessor
block = 1
variable = power_density
[]
[from_sub0]
type = ElementIntegralVariablePostprocessor
block = 0
variable = from_sub
execute_on = 'transfer'
[]
[from_sub1]
type = ElementIntegralVariablePostprocessor
block = 1
variable = from_sub
execute_on = 'transfer'
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
input_files = sub_power_density.i
positions = '0 0 0 0.5 0 0'
execute_on = timestep_end
[]
[]
[Transfers]
[to_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = power_density
variable = from_parent
to_multi_app = sub
execute_on = timestep_end
# The following inputs specify what postprocessors should be conserved
# N pps are specified on the parent side, where N is the number of subapps
# 1 pp is specified on the subapp side
from_postprocessors_to_be_preserved = 'pwr0 pwr1'
to_postprocessors_to_be_preserved = 'from_parent_pp'
[]
[from_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = sink
variable = from_sub
from_multi_app = sub
execute_on = timestep_end
# The following inputs specify what postprocessors should be conserved
# N pps are specified on the parent side, where N is the number of subapps
# 1 pp is specified on the subapp side
to_postprocessors_to_be_preserved = 'from_sub0 from_sub1'
from_postprocessors_to_be_preserved = 'sink'
[]
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/multiapp_conservative_transfer/sub_userobject.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 8
xmax = 0.1
ymax = 0.5
coord_type = rz
[]
[Variables]
[u]
initial_condition = 1
[]
[]
[AuxVariables]
[layered_average_value]
order = CONSTANT
family = MONOMIAL
[]
[]
[Postprocessors]
[from_postprocessor]
type = ElementIntegralVariablePostprocessor
variable = layered_average_value
[]
[]
[Functions]
[axial_force]
type = ParsedFunction
expression = 1000*y
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[force]
type = BodyForce
variable = u
function = axial_force
[]
[]
[AuxKernels]
[layered_aux]
type = SpatialUserObjectAux
variable = layered_average_value
execute_on = 'nonlinear TIMESTEP_END'
user_object = layered_average
[]
[]
[BCs]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[UserObjects]
[layered_average]
type = LayeredAverage
variable = u
direction = y
num_layers = 4
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.001
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/stochastic_tools/examples/parameter_study/nonlin_diff_react/nonlin_diff_react_sub.i)
[Functions]
[source]
type = ParsedFunction
expression = "100 * sin(2 * pi * x) * sin(2 * pi * y)"
[]
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 50
xmin = 0
xmax = 1
ny = 50
ymin = 0
ymax = 1
[]
[]
[Variables]
[U]
family = lagrange
order = first
[]
[]
[Kernels]
[diffusion]
type = Diffusion
variable = U
[]
[nonlin_function]
type = ExponentialReaction
variable = U
mu1 = 0.3
mu2 = 9
[]
[source]
type = BodyForce
variable = U
function = source
[]
[]
[BCs]
[dirichlet_all]
type = DirichletBC
variable = U
boundary = 'left right top bottom'
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[max]
type = ElementExtremeValue
variable = U
[]
[min]
type = ElementExtremeValue
variable = U
value_type = min
[]
[average]
type = ElementAverageValue
variable = U
[]
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Outputs]
[]
(test/tests/controls/bool_function_control/bool_function_control.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[Functions]
[solve_fn]
type = ParsedFunction
expression = 'if(t<0.3, 1, 0)'
[]
[]
[Variables]
[u]
initial_condition = 1
[]
[]
[Kernels]
[td]
type = TimeDerivative
variable = u
[]
[bf]
type = BodyForce
variable = u
function = 1
[]
[]
[Controls]
[solve_ctrl]
type = BoolFunctionControl
function = solve_fn
parameter = '*/*/solve'
execute_on = timestep_begin
[]
[]
[Postprocessors]
[./u_val]
type = ElementAverageValue
variable = u
execute_on = 'initial timestep_begin'
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
[]
[Outputs]
csv = true
[]
(test/tests/multiapps/picard_postprocessor/steady_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[sink]
type = BodyForce
variable = u
value = -1
[]
[]
[BCs]
[right]
type = PostprocessorDirichletBC
variable = u
boundary = right
postprocessor = 'from_main'
[]
[]
[Postprocessors]
[from_main]
type = Receiver
default = 0
[]
[to_main]
type = SideAverageValue
variable = u
boundary = left
[]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
[]
[Outputs]
csv = true
exodus = false
[]
(modules/optimization/examples/materialTransient/forward.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[]
[Variables/u]
initial_condition = 0
[]
[Kernels]
[dt]
type = TimeDerivative
variable = u
[]
[diff]
type = MatDiffusion
variable = u
diffusivity = D
[]
[src]
type = BodyForce
variable = u
value = 1
[]
[]
[BCs]
[dirichlet]
type = DirichletBC
variable = u
boundary = 'right top'
value = 0
[]
[]
[Materials]
[diffc]
type = GenericFunctionMaterial
prop_names = 'D'
prop_values = 'diffc_fun'
output_properties = 'D'
outputs = 'exodus'
[]
[]
[Functions]
[diffc_fun]
type = NearestReporterCoordinatesFunction
value_name = 'diffc_rep/D_vals'
x_coord_name = 'diffc_rep/D_x_coord'
y_coord_name = 'diffc_rep/D_y_coord'
[]
[]
[Reporters]
[diffc_rep]
type = ConstantReporter
real_vector_names = 'D_x_coord D_y_coord D_vals'
real_vector_values = '0.25 0.75 0.25 0.75;
0.25 0.25 0.75 0.75;
1 0.2 0.2 0.05' # Reference solution
outputs = none
[]
[data]
type = OptimizationData
variable = u
measurement_points = '0.25 0.25 0 0.25 0.75 0 0.75 0.25 0 0.75 0.75 0
0.25 0.25 0 0.25 0.75 0 0.75 0.25 0 0.75 0.75 0
0.25 0.25 0 0.25 0.75 0 0.75 0.25 0 0.75 0.75 0
0.25 0.25 0 0.25 0.75 0 0.75 0.25 0 0.75 0.75 0
0.25 0.25 0 0.25 0.75 0 0.75 0.25 0 0.75 0.75 0
0.25 0.25 0 0.25 0.75 0 0.75 0.25 0 0.75 0.75 0
0.25 0.25 0 0.25 0.75 0 0.75 0.25 0 0.75 0.75 0
0.25 0.25 0 0.25 0.75 0 0.75 0.25 0 0.75 0.75 0
0.25 0.25 0 0.25 0.75 0 0.75 0.25 0 0.75 0.75 0
0.25 0.25 0 0.25 0.75 0 0.75 0.25 0 0.75 0.75 0'
measurement_times = '0.1 0.1 0.1 0.1
0.2 0.2 0.2 0.2
0.3 0.3 0.3 0.3
0.4 0.4 0.4 0.4
0.5 0.5 0.5 0.5
0.6 0.6 0.6 0.6
0.7 0.7 0.7 0.7
0.8 0.8 0.8 0.8
0.9 0.9 0.9 0.9
1.0 1.0 1.0 1.0'
measurement_values = '0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0'
[]
[]
[Postprocessors]
[D1]
type = PointValue
variable = D
point = '0.25 0.25 0'
[]
[D2]
type = PointValue
variable = D
point = '0.75 0.25 0'
[]
[D3]
type = PointValue
variable = D
point = '0.25 0.75 0'
[]
[D4]
type = PointValue
variable = D
point = '0.75 0.75 0'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
nl_rel_tol = 1e-8
nl_abs_tol = 1e-12
dt = 0.1
num_steps = 10
[]
[Outputs]
csv = true
exodus = true
[]
(test/tests/misc/check_error/incomplete_kernel_block_coverage_test.i)
[Mesh]
file = rectangle.e
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff body_force'
[./diff]
type = Diffusion
variable = u
block = 1
[../]
[./body_force]
type = BodyForce
variable = u
block = 1
value = 10
[../]
[]
[BCs]
active = 'right'
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
(test/tests/mortar/continuity-2d-conforming/conforming_two_var.i)
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-conf.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Functions]
[./exact_sln]
type = ParsedFunction
expression= y
[../]
[./ffn]
type = ParsedFunction
expression= 0
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./lm_u]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[../]
[./v]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./lm_v]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = ffn
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[./coupled_u]
type = CoupledForce
variable = v
v = u
[../]
[]
[Problem]
extra_tag_vectors = 'ref'
[]
[Constraints]
[./ced_u]
type = EqualValueConstraint
variable = lm_u
secondary_variable = u
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
absolute_value_vector_tags = 'ref'
[../]
[./ced_v]
type = EqualValueConstraint
variable = lm_v
secondary_variable = v
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
absolute_value_vector_tags = 'ref'
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '1 2 3 4'
function = exact_sln
[../]
[./allv]
type = DirichletBC
variable = v
boundary = '1 2 3 4'
value = 0
[../]
[]
[Postprocessors]
[./l2_error]
type = ElementL2Error
variable = u
function = exact_sln
block = '1 2'
execute_on = 'initial timestep_end'
[../]
[./l2_v]
type = ElementL2Norm
variable = v
block = '1 2'
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
[./fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
l_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/functional_expansion_tools/examples/2D_interface/main.i)
# Basic example coupling a master and sub app at an interface in a 2D model.
# The master app provides a flux term to the sub app via Functional Expansions, which then performs
# its calculations. The sub app's interface conditions, both value and flux, are transferred back
# to the master app
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0.0
xmax = 0.4
nx = 6
ymin = 0.0
ymax = 10.0
ny = 20
[]
[Variables]
[./m]
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./source_m]
type = BodyForce
variable = m
value = 100
[../]
[]
[Materials]
[./Impervium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '0.00001 50.0 100.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
value = 2
variable = m
[../]
[]
[BCs]
[./interface_value]
type = FXValueBC
variable = m
boundary = right
function = FX_Basis_Value_Main
[../]
[./interface_flux]
type = FXFluxBC
boundary = right
variable = m
function = FX_Basis_Flux_Main
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '4'
physical_bounds = '0.0 10'
y = Legendre
[../]
[./FX_Basis_Flux_Main]
type = FunctionSeries
series_type = Cartesian
orders = '5'
physical_bounds = '0.0 10'
y = Legendre
[../]
[]
[UserObjects]
[./FX_Flux_UserObject_Main]
type = FXBoundaryFluxUserObject
function = FX_Basis_Flux_Main
variable = m
boundary = right
diffusivity = thermal_conductivity
[../]
[]
[Postprocessors]
[./average_interface_value]
type = SideAverageValue
variable = m
boundary = right
[../]
[./total_flux]
type = SideDiffusiveFluxIntegral
variable = m
boundary = right
diffusivity = thermal_conductivity
[../]
[./picard_iterations]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1.0
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
sub_cycling = true
[../]
[]
[Transfers]
[./FluxToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Flux_UserObject_Main
multi_app_object_name = FX_Basis_Flux_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[./FluxToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Flux_Main
multi_app_object_name = FX_Flux_UserObject_Sub
[../]
[]
(test/tests/mortar/continuity-3d-non-conforming/continuity_penalty_tet.i)
[Mesh]
second_order = false
[left_block]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 2
nz = 2
xmin = 0
xmax = 0.3
ymin = 0
ymax = .5
zmin = 0
zmax = .5
elem_type = TET4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'lb_bottom lb_back lb_right lb_front lb_left lb_top'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 2
nz = 2
xmin = 0.3
xmax = 0.6
ymin = 0
ymax = .5
zmin = 0
zmax = .5
elem_type = TET4
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block
subdomain_id = 2
[]
[right_block_change_boundary_id]
type = RenameBoundaryGenerator
input = right_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'left_block right_block'
[]
[right_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = rb_right
block = right_block
normal = '1 0 0'
[]
[right_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_right_sideset
new_boundary = rb_left
block = right_block
normal = '-1 0 0'
[]
[right_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_left_sideset
new_boundary = rb_top
block = right_block
normal = '0 0 1'
[]
[right_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_top_sideset
new_boundary = rb_bottom
block = right_block
normal = '0 0 -1'
[]
[right_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_bottom_sideset
new_boundary = rb_front
block = right_block
normal = '0 1 0'
[]
[right_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_front_sideset
new_boundary = rb_back
block = right_block
normal = '0 -1 0'
[]
[secondary]
input = right_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'lb_right'
new_block_id = '12'
new_block_name = 'secondary'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'rb_left'
new_block_id = '11'
new_block_name = 'primary'
[]
[]
[Variables]
[T]
block = '1 2'
order = FIRST
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln_primal
variable = T
boundary = 'lb_back lb_front lb_left lb_top lb_bottom rb_right rb_top rb_bottom rb_front rb_back'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi) + 3*pi^2*sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_primal]
type = ParsedFunction
expression = 'sin(x*pi)*sin(y*pi)*sin(z*pi)'
[]
[exact_soln_lambda]
type = ParsedFunction
expression = 'pi*sin(pi*y)*sin(pi*z)*cos(pi*x)'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = PenaltyEqualValueConstraint
primary_boundary = 'rb_left'
secondary_boundary = 'lb_right'
primary_subdomain = '11'
secondary_subdomain = '12'
secondary_variable = T
penalty_value = 1.0e5
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = 'left_block right_block'
[]
[h]
type = AverageElementSize
block = 'left_block right_block'
[]
[]
(test/tests/auxkernels/error_function_aux/error_function_aux.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./element_l2_error]
# Aux field variable representing the L2 error on each element
order = CONSTANT
family = MONOMIAL
[../]
[./element_h1_error]
# Aux field variable representing the H1 error on each element
order = CONSTANT
family = MONOMIAL
[../]
[./element_l2_norm]
# Aux field variable representing the L^2 norm of the solution variable
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = sin(2*pi*x)*sin(2*pi*y)
[../]
[./forcing_fn]
type = ParsedFunction
expression = 8*pi^2*sin(2*pi*x)*sin(2*pi*y)
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[AuxKernels]
[./l2_norm_aux]
type = ElementLpNormAux
variable = element_l2_norm
coupled_variable = u
[../]
[./l2_error_aux]
type = ElementL2ErrorFunctionAux
variable = element_l2_error
# A function representing the exact solution for the solution
function = exact_fn
# The nonlinear variable representing the FEM solution
coupled_variable = u
[../]
[./h1_error_aux]
type = ElementH1ErrorFunctionAux
variable = element_h1_error
# A function representing the exact solution for the solution
function = exact_fn
# The nonlinear variable representing the FEM solution
coupled_variable = u
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'bottom left right top'
function = exact_fn
[../]
[]
[Postprocessors]
[./L2_error]
# The L2 norm of the error over the entire mesh. Note: this is
# *not* equal to the sum over all the elements of the L2-error
# norms.
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/relative_solution_difference_norm/test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
elem_type = QUAD4
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./ffn]
type = ParsedFunction
expression = '2 - t'
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = ffn
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 0
[../]
[]
[Postprocessors]
[./rsn]
type = RelativeSolutionDifferenceNorm
execute_on = TIMESTEP_END
[../]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/xfem/test/tests/moving_interface/verification/1D_rz_homog1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: quasi-1D
# Coordinate System: rz
# Material Numbers/Types: homogeneous 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# A simple transient heat transfer problem in cylindrical coordinates designed
# with the Method of Manufactured Solutions. This problem was developed to
# verify XFEM performance in the presence of a moving interface for linear
# element models that can be exactly evaluated by FEM/Moose. Both the
# temperature solution and level set function are designed to be linear to
# attempt to minimize error between the Moose/exact solution and XFEM results.
# Thermal conductivity is a single, constant value at all points in the system.
# Results:
# The temperature at the left boundary (x=1) exhibits the largest difference
# between the FEM/Moose solution and XFEM results. We present the XFEM results
# at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 480.0008118
# 0.6 520 520.0038529
# 0.8 560 560.0089177
# 1.0 600 600.0133344
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 1
xmin = 1.0
xmax = 2.0
ymin = 0.0
ymax = 0.5
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-200*x+400) + 200*1.5*t/x'
[../]
[./neumann_func]
type = ParsedFunction
expression = '1.5*200*t'
[../]
[./ls_func]
type = ParsedFunction
expression = '2.04 - x - 0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericConstantMaterial
prop_names = 'diffusion_coefficient'
prop_values = 1.5
[../]
[]
[BCs]
[./left_u]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 'right'
value = 400
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/utils/spline_interpolation/bicubic_spline_interpolation.i)
[Mesh]
type = GeneratedMesh
dim = 3
nz = 1
nx = 4
ny = 4
xmax = 4
ymax = 4
[]
[Functions]
[./yx1]
type = ParsedFunction
expression = '3*x^2'
[../]
[./yx2]
type = ParsedFunction
expression = '6*y^2'
[../]
[./spline_fn]
type = BicubicSplineFunction
x1 = '0 2 4'
x2 = '0 2 4 6'
y = '0 16 128 432 8 24 136 440 64 80 192 496'
yx11 = '0 0 0 0'
yx1n = '48 48 48 48'
yx21 = '0 0 0'
yx2n = '216 216 216'
yx1 = 'yx1'
yx2 = 'yx2'
[../]
[./u_func]
type = ParsedFunction
expression = 'x^3 + 2*y^3'
[../]
[./u2_forcing_func]
type = ParsedFunction
expression = '-6*x - 12*y'
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./bi_func_value]
order = FIRST
family = LAGRANGE
[../]
[./x_deriv]
order = FIRST
family = LAGRANGE
[../]
[./y_deriv]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./bi_func_value]
type = FunctionAux
variable = bi_func_value
function = spline_fn
[../]
[./deriv_1]
type = FunctionDerivativeAux
function = spline_fn
variable = x_deriv
component = x
[../]
[./deriv_2]
type = FunctionDerivativeAux
function = spline_fn
variable = y_deriv
component = y
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
function = u2_forcing_func
[../]
[]
[BCs]
[./sides]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = u_func
[../]
[]
[Postprocessors]
[./nodal_l2_err_spline]
type = NodalL2Error
variable = u
function = spline_fn
execute_on = 'initial timestep_end'
[../]
[./nodal_l2_err_analytic]
type = NodalL2Error
variable = u
function = u_func
execute_on = 'initial timestep_end'
[../]
[./x_deriv_err_analytic]
type = NodalL2Error
variable = x_deriv
function = yx1
execute_on = 'initial timestep_end'
[../]
[./y_deriv_err_analytic]
type = NodalL2Error
variable = y_deriv
function = yx2
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(test/tests/bcs/dmg_periodic/dmg_simple_periodic_bc.i)
[Mesh]
[dmg]
type = DistributedRectilinearMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 10
xmax = 1
ymax = 1
zmax = 1
[]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[forcing]
type = BodyForce
variable = u
[]
[./dot]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./Periodic]
[./all]
variable = u
auto_direction = 'x y z'
[../]
[../]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 5
solve_type = NEWTON
nl_rel_tol = 1e-10
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/materials/material/adv_mat_couple_test.i)
[Mesh]
file = rectangle.e
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff body_force'
[./diff]
type = Diffusion
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
block = 1
value = 10
[../]
[]
[BCs]
active = 'right'
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Materials]
# This material is global and uses a coupled property
[./mat_global]
type = CoupledMaterial
mat_prop = 'some_prop'
coupled_mat_prop = 'mp1'
block = '1 2'
[../]
# This material supplies a value for block 1 ONLY
[./mat_0]
type = GenericConstantMaterial
block = 1
prop_names = 'mp1'
prop_values = 2
[../]
# This material supplies a value for block 2 ONLY
[./mat_1]
type = GenericConstantMaterial
block = 2
prop_names = 'mp1'
prop_values = 200
[../]
[]
[Executioner]
type = Steady
# solve_type = 'PJFNK'
# preconditioner = 'ILU'
solve_type = 'PJFNK'
# petsc_options_iname = '-pc_type -pc_hypre_type'
# petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
file_base = out_adv_coupled
exodus = true
[]
[Debug]
show_material_props = true
[]
(test/tests/kernels/scalar_kernel_constraint/diffusion_override_scalar.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[exact_fn]
type = ParsedFunction
value = 'x*x+y*y'
[]
[ffn]
type = ParsedFunction
value = -4
[]
[bottom_bc_fn]
type = ParsedFunction
value = -2*y
[]
[right_bc_fn]
type = ParsedFunction
value = 2*x
[]
[top_bc_fn]
type = ParsedFunction
value = 2*y
[]
[left_bc_fn]
type = ParsedFunction
value = -2*x
[]
[]
[Variables]
[u]
family = LAGRANGE
order = SECOND
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[Kernels]
# Make sure that we can derive from the scalar base class
# but actually not assign a scalar variable
[diff]
type = DiffusionNoScalar
variable = u
scalar_variable = lambda
[]
[ffnk]
type = BodyForce
variable = u
function = ffn
[]
[sk_lm]
type = ScalarLMKernel
variable = u
kappa = lambda
pp_name = pp
value = 2.666666666666666
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bottom_bc_fn
[]
[right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = right_bc_fn
[]
[top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = top_bc_fn
[]
[left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = left_bc_fn
[]
[]
[Postprocessors]
# integrate the volume of domain since original objects set
# int(phi)=V0, rather than int(phi-V0)=0
[pp]
type = FunctionElementIntegral
function = 1
execute_on = initial
[]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-9
l_tol = 1.e-10
nl_max_its = 10
# This example builds an indefinite matrix, so "-pc_type hypre -pc_hypre_type boomeramg" cannot
# be used reliably on this problem. ILU(0) seems to do OK in both serial and parallel in my testing,
# I have not seen any zero pivot issues.
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'bjacobi ilu'
# This is a linear problem, so we don't need to recompute the
# Jacobian. This isn't a big deal for a Steady problems, however, as
# there is only one solve.
solve_type = 'LINEAR'
[]
[Outputs]
# exodus = true
csv = true
hide = lambda
[]
(test/tests/executioners/transient_sync_time/transient_sync_time_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./bc_func]
type = ParsedFunction
expression = sin(pi*0.1*x*t)
[../]
# Laplacian of the function above
[./interior_func]
type = ParsedFunction
expression = 0.01*pi*pi*t*t*sin(0.1*pi*x*t)
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = interior_func
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
preset = false
boundary = '0 1 2 3'
function = bc_func
[../]
[]
[Executioner]
type = Transient
dt = 1
start_time = 0
end_time = 40
num_steps = 1000
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out
exodus = true
sync_times = '10.5 20 30.5'
[]
(test/tests/preconditioners/smp/smp_single_adapt_test.i)
#
# This is not very strong test since the problem being solved is linear, so the difference between
# full Jacobian and block diagonal preconditioner is not that big
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 5
ny = 5
elem_type = QUAD4
[]
[Functions]
[./exact_v]
type = ParsedFunction
expression = sin(pi*x)*sin(pi*y)
[../]
[./force_fn_v]
type = ParsedFunction
expression = 2*pi*pi*sin(pi*x)*sin(pi*y)
[../]
[]
[Variables]
active = 'u v'
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
off_diag_row = 'u'
off_diag_column = 'v'
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./conv_u]
type = CoupledForce
variable = u
v = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[./ffn_v]
type = BodyForce
variable = v
function = force_fn_v
[../]
[]
[BCs]
[./left_u]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 3
value = 1
[../]
[./all_v]
type = FunctionDirichletBC
variable = v
boundary = '0 1 2 3'
function = exact_v
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[./Adaptivity]
steps = 3
coarsen_fraction = 0.1
refine_fraction = 0.2
max_h_level = 5
[../]
[]
[Outputs]
exodus = true
print_mesh_changed_info = true
[]
(modules/heat_transfer/test/tests/heat_conduction/coupled_convective_heat_flux/on_off.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./t_infinity]
[../]
[./active]
initial_condition = 1
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
value = 1000
[../]
[]
[AuxKernels]
[./t_infinity]
type = ConstantAux
variable = t_infinity
value = 500
execute_on = initial
[../]
[./active_right]
type = ConstantAux
variable = active
value = 0
boundary = right
[../]
[]
[BCs]
[./right]
type = CoupledConvectiveHeatFluxBC
variable = u
boundary = 'left right top bottom'
htc = 10
T_infinity = t_infinity
scale_factor = active
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(test/tests/dgkernels/ad_dg_diffusion/2d_diffusion_ad_dg_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[u]
order = FIRST
family = MONOMIAL
[InitialCondition]
type = ConstantIC
value = 1
[]
[]
[]
[Functions]
[forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[]
[exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[abs] # u * v
type = Reaction
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[DGKernels]
[dg_diff]
type = ADDGDiffusion
variable = u
epsilon = -1
sigma = 6
diff = diff
[]
[]
[Materials]
[ad_coupled_mat]
type = ADCoupledMaterial
coupled_var = u
ad_mat_prop = diff
regular_mat_prop = diff_regular
[]
[]
[BCs]
[all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[Adaptivity]
steps = 2
refine_fraction = 1.0
coarsen_fraction = 0
max_h_level = 8
[]
nl_rel_tol = 1e-10
[]
[Postprocessors]
[h]
type = AverageElementSize
[]
[dofs]
type = NumDOFs
[]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[]
[]
[Outputs]
exodus = true
[]
(test/tests/dgkernels/2d_diffusion_dg/2d_diffusion_dg_test.i)
###########################################################
# This is a test of the Discontinuous Galerkin System.
# Discontinous basis functions are used (Monomials) and
# a Laplacian DGKernel contributes to the
# internal edges around each element. Jumps are allowed
# but penalized by this method.
#
# @Requirement F3.60
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
# xmin = -1
# xmax = 1
# ymin = -1
# ymax = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
active = 'u'
[u]
order = FIRST
family = MONOMIAL
[InitialCondition]
type = ConstantIC
value = 1
[]
[]
[]
[Functions]
active = 'forcing_fn exact_fn'
[forcing_fn]
type = ParsedFunction
# function = -4.0+(x*x)+(y*y)
# function = x
# function = (x*x)-2.0
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
# function = (x*x*x)-6.0*x
[]
[exact_fn]
type = ParsedGradFunction
# function = x
# grad_x = 1
# grad_y = 0
# function = (x*x)+(y*y)
# grad_x = 2*x
# grad_y = 2*y
# function = (x*x)
# grad_x = 2*x
# grad_y = 0
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
# function = (x*x*x)
# grad_x = 3*x*x
# grad_y = 0
[]
[]
[Kernels]
active = 'diff abs forcing'
[diff]
type = Diffusion
variable = u
[]
[abs] # u * v
type = Reaction
variable = u
[]
[forcing]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[DGKernels]
active = 'dg_diff'
[dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[]
[]
[BCs]
active = 'all'
[all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
# petsc_options = '-snes_mf'
# petsc_options_iname = '-pc_type -pc_hypre_type'
# petsc_options_value = 'hypre boomeramg'
# petsc_options = '-snes_mf'
# max_r_steps = 2
[Adaptivity]
steps = 2
refine_fraction = 1.0
coarsen_fraction = 0
max_h_level = 8
[]
nl_rel_tol = 1e-10
# nl_rel_tol = 1e-12
[]
[Postprocessors]
active = 'h dofs l2_err'
[h]
type = AverageElementSize
[]
[dofs]
type = NumDOFs
[]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[]
[]
[Outputs]
file_base = out
exodus = true
[]
(test/tests/postprocessors/num_dofs/num_dofs.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./u_aux]
order = FIRST
family = LAGRANGE
[../]
[./v_aux]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1
solve_type = PJFNK
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 2
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Postprocessors]
[./num_dofs_nl]
type = NumDOFs
system = NL
[../]
[./num_dofs_aux]
type = NumDOFs
system = AUX
[../]
# default
[./num_dofs_all]
type = NumDOFs
system = ALL
[../]
[]
[Outputs]
csv = true
[]
(test/tests/multiapps/restart/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
ymin = 0
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[Functions]
[v_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[]
[AuxVariables]
[v]
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[ufn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = v_fn
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
checkpoint = true
[]
[MultiApps]
[sub_app]
app_type = MooseTestApp
type = TransientMultiApp
input_files = 'sub.i'
execute_on = timestep_end
positions = '0 -1 0'
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[]
[]
(modules/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
[]
(test/tests/bcs/penalty_dirichlet_bc/penalty_dirichlet_bc_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = -2*(x*x+y*y-2)+(1-x*x)*(1-y*y)
[../]
[./solution]
type = ParsedGradFunction
value = (1-x*x)*(1-y*y)
grad_x = 2*(x*y*y-x)
grad_y = 2*(x*x*y-y)
[../]
[]
[Variables]
[./u]
order = SECOND
family = HIERARCHIC
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'bc_all'
[./bc_all]
type = PenaltyDirichletBC
variable = u
value = 0
boundary = 'top left right bottom'
penalty = 1e5
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-14
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/functional_expansion_tools/test/tests/standard_use/interface_coupled.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0.0
xmax = 0.4
nx = 6
ymin = 0.0
ymax = 10.0
ny = 20
[]
[Variables]
[./m]
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./source_m]
type = BodyForce
variable = m
value = 100
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
value = 2
variable = m
[../]
[]
[BCs]
[./interface_value]
type = FXValueBC
variable = m
boundary = right
function = FX_Basis_Value_Main
[../]
[./interface_flux]
type = FXFluxBC
boundary = right
variable = m
function = FX_Basis_Flux_Main
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '4'
physical_bounds = '0.0 10'
y = Legendre
[../]
[./FX_Basis_Flux_Main]
type = FunctionSeries
series_type = Cartesian
orders = '5'
physical_bounds = '0.0 10'
y = Legendre
[../]
[]
[UserObjects]
[./FX_Flux_UserObject_Main]
type = FXBoundaryFluxUserObject
function = FX_Basis_Flux_Main
variable = m
boundary = right
diffusivity = 0.1
[../]
[]
[Postprocessors]
[./average_interface_value]
type = SideAverageValue
variable = m
boundary = right
[../]
[./total_flux]
type = SideDiffusiveFluxIntegral
variable = m
boundary = right
diffusivity = 0.1
[../]
[./picard_iterations]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1.0
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = interface_sub.i
sub_cycling = true
[../]
[]
[Transfers]
[./FluxToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Flux_UserObject_Main
multi_app_object_name = FX_Basis_Flux_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[./FluxToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Flux_Main
multi_app_object_name = FX_Flux_UserObject_Sub
[../]
[]
(modules/optimization/test/tests/executioners/transient_and_adjoint/multi_variable.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
[]
[Variables]
[u]
[]
[v]
[]
[u_adjoint]
solver_sys = adjoint
[]
[v_adjoint]
solver_sys = adjoint
[]
[]
[Kernels]
[time_u]
type = TimeDerivative
variable = u
[]
[time_v]
type = TimeDerivative
variable = v
[]
[diff_u]
type = Diffusion
variable = u
[]
[diff_v]
type = Diffusion
variable = v
[]
[uv]
type = CoupledForce
variable = u
v = v
coef = 10
[]
[vu]
type = CoupledForce
variable = v
v = u
coef = 1
[]
[src_u]
type = BodyForce
variable = u
value = 1
[]
[src_u_adjoint]
type = BodyForce
variable = u_adjoint
value = 0
[]
[src_v_adjoint]
type = BodyForce
variable = v_adjoint
value = 1
[]
[]
[BCs]
[dirichlet_u]
type = DirichletBC
variable = u
boundary = 'top right'
value = 0
[]
[dirichlet_v]
type = DirichletBC
variable = v
boundary = 'top right'
value = 0
[]
[]
[Executioner]
type = TransientAndAdjoint
forward_system = nl0
adjoint_system = adjoint
dt = 0.2
num_steps = 5
nl_rel_tol = 1e-12
l_tol = 1e-12
[]
[Postprocessors]
[u_avg]
type = ElementAverageValue
variable = u
execute_on = 'TIMESTEP_END ADJOINT_TIMESTEP_END'
[]
[u_adjoint_avg]
type = ElementAverageValue
variable = u_adjoint
execute_on = ADJOINT_TIMESTEP_END
[]
[v_avg]
type = ElementAverageValue
variable = v
execute_on = 'TIMESTEP_END ADJOINT_TIMESTEP_END'
[]
[v_adjoint_avg]
type = ElementAverageValue
variable = v_adjoint
execute_on = ADJOINT_TIMESTEP_END
[]
[u_inner_product]
type = VariableInnerProduct
variable = u
second_variable = u_adjoint
execute_on = ADJOINT_TIMESTEP_END
[]
[v_inner_product]
type = VariableInnerProduct
variable = v
second_variable = v_adjoint
execute_on = ADJOINT_TIMESTEP_END
[]
[]
[Outputs]
[forward]
type = CSV
[]
[adjoint]
type = CSV
execute_on = 'INITIAL ADJOINT_TIMESTEP_END'
[]
[console]
type = Console
execute_postprocessors_on = 'INITIAL TIMESTEP_END ADJOINT_TIMESTEP_END'
[]
[]
(modules/porous_flow/test/tests/energy_conservation/heat04_action.i)
# heat04, but using an action
#
# The sample is a single unit element, with fixed displacements on
# all sides. A heat source of strength S (J/m^3/s) is applied into
# the element. There is no fluid flow or heat flow. The rise
# in temperature, porepressure and stress, and the change in porosity is
# matched with theory.
#
# In this case, fluid mass must be conserved, and there is no
# volumetric strain, so
# porosity * fluid_density = constant
# Also, the energy-density in the rock-fluid system increases with S:
# d/dt [(1 - porosity) * rock_density * rock_heat_cap * T + porosity * fluid_density * fluid_heat_cap * T] = S
# Also, the porosity evolves according to THM as
# porosity = biot + (porosity0 - biot) * exp( (biot - 1) * P / fluid_bulk + rock_thermal_exp * T)
# Finally, the effective stress must be exactly zero (as there is
# no strain).
#
# Let us assume that
# fluid_density = dens0 * exp(P / fluid_bulk - fluid_thermal_exp * T)
# Then the conservation of fluid mass means
# porosity = por0 * exp(- P / fluid_bulk + fluid_thermal_exp * T)
# where dens0 * por0 = the initial fluid mass.
# The last expression for porosity, combined with the THM one,
# and assuming that biot = 1 for simplicity, gives
# porosity = 1 + (porosity0 - 1) * exp(rock_thermal_exp * T) = por0 * exp(- P / fluid_bulk + fluid_thermal_exp * T) .... (A)
#
# This stuff may be substituted into the heat energy-density equation:
# S = d/dt [(1 - porosity0) * exp(rock_thermal_exp * T) * rock_density * rock_heat_cap * T + porosity * fluid_density * fluid_heat_cap * T]
#
# If S is constant then
# S * t = (1 - porosity0) * exp(rock_thermal_exp * T) * rock_density * rock_heat_cap * T + porosity * fluid_density * fluid_heat_cap * T
# with T(t=0) = 0 then Eqn(A) implies that por0 = porosity0 and
# P / fluid_bulk = fluid_thermal_exp * T - log(1 + (por0 - 1) * exp(rock_thermal_exp * T)) + log(por0)
#
# Parameters:
# A = 2
# fluid_bulk = 2.0
# dens0 = 3.0
# fluid_thermal_exp = 0.5
# fluid_heat_cap = 2
# por0 = 0.5
# rock_thermal_exp = 0.25
# rock_density = 5
# rock_heat_capacity = 0.2
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.5
cv = 2
cp = 2
bulk_modulus = 2.0
density0 = 3.0
[]
[]
[PorousFlowUnsaturated]
coupling_type = ThermoHydroMechanical
displacements = 'disp_x disp_y disp_z'
porepressure = pp
temperature = temp
dictator_name = Sir
biot_coefficient = 1.0
gravity = '0 0 0'
fp = the_simple_fluid
van_genuchten_alpha = 1.0E-12
van_genuchten_m = 0.5
relative_permeability_type = Corey
relative_permeability_exponent = 0.0
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = Sir
block = 0
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[pp]
[]
[temp]
[]
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back front'
[]
[]
[Kernels]
[heat_source]
type = BodyForce
function = 1
variable = temp
[]
[]
[Functions]
[err_T_fcn]
type = ParsedFunction
symbol_names = 'por0 rte temp rd rhc m0 fhc source'
symbol_values = '0.5 0.25 t0 5 0.2 1.5 2 1'
expression = '((1-por0)*exp(rte*temp)*rd*rhc*temp+m0*fhc*temp-source*t)/(source*t)'
[]
[err_pp_fcn]
type = ParsedFunction
symbol_names = 'por0 rte temp rd rhc m0 fhc source bulk pp fte'
symbol_values = '0.5 0.25 t0 5 0.2 1.5 2 1 2 p0 0.5'
expression = '(bulk*(fte*temp-log(1+(por0-1)*exp(rte*temp))+log(por0))-pp)/pp'
[]
[]
[AuxVariables]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = ComputeLinearElasticStress
[]
[porosity]
type = PorousFlowPorosity
thermal = true
fluid = true
mechanical = true
ensure_positive = false
biot_coefficient = 1.0
porosity_zero = 0.5
thermal_expansion_coeff = 0.25
solid_bulk = 2
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 0.2
density = 5.0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0 0 0 0 0 0 0 0 0'
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0 0 0 0 0 0 0 0 0'
[]
[]
[Postprocessors]
[p0]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = pp
[]
[t0]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = temp
[]
[porosity]
type = PointValue
outputs = 'console csv'
execute_on = 'timestep_end'
point = '0 0 0'
variable = porosity
[]
[stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[]
[stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[]
[stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[]
[fluid_mass]
type = PorousFlowFluidMass
fluid_component = 0
execute_on = 'timestep_end'
outputs = 'console csv'
[]
[total_heat]
type = PorousFlowHeatEnergy
phase = 0
execute_on = 'timestep_end'
outputs = 'console csv'
[]
[err_T]
type = FunctionValuePostprocessor
function = err_T_fcn
[]
[err_P]
type = FunctionValuePostprocessor
function = err_pp_fcn
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-12 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 5
[]
[Outputs]
execute_on = 'initial timestep_end'
file_base = heat04_action
csv = true
[]
(test/tests/multiapps/secant_postprocessor/steady_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[sink]
type = BodyForce
variable = u
value = -1
[]
[]
[BCs]
[right]
type = PostprocessorDirichletBC
variable = u
boundary = right
postprocessor = 'from_main'
[]
[]
[Postprocessors]
[from_main]
type = Receiver
default = 0
[]
[to_main]
type = SideAverageValue
variable = u
boundary = left
[]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
fixed_point_algorithm = 'secant'
[]
[Outputs]
csv = true
exodus = false
[]
(modules/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
[]
(test/tests/multiapps/restart_subapp_ic/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
ymin = 0
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[Functions]
[v_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[]
[AuxVariables]
[v]
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[ufn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = v_fn
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
checkpoint = true
[]
[MultiApps]
[sub_app]
app_type = MooseTestApp
type = TransientMultiApp
input_files = 'sub.i'
execute_on = timestep_end
positions = '0 -1 0'
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[]
[]
(test/tests/executioners/executioner/steady-adapt.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 3
ny = 3
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = -4
[../]
[./exact_fn]
type = ParsedFunction
expression = ((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ffn'
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[./Adaptivity]
steps = 3
coarsen_fraction = 0.1
refine_fraction = 0.2
max_h_level = 5
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_steady_adapt
exodus = true
print_mesh_changed_info = true
[]
(modules/optimization/test/tests/executioners/transient_and_adjoint/self_adjoint.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
[]
[Variables]
[u]
[]
[u_adjoint]
solver_sys = adjoint
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[src]
type = BodyForce
variable = u
value = 1
[]
[src_adjoint]
type = BodyForce
variable = u_adjoint
value = 10
[]
[]
[BCs]
[dirichlet]
type = DirichletBC
variable = u
boundary = 'top right'
value = 0
[]
[]
[Executioner]
type = TransientAndAdjoint
forward_system = nl0
adjoint_system = adjoint
dt = 0.2
num_steps = 5
nl_rel_tol = 1e-12
l_tol = 1e-12
[]
[Postprocessors]
[u_avg]
type = ElementAverageValue
variable = u
execute_on = 'TIMESTEP_END ADJOINT_TIMESTEP_END'
[]
[u_adjoint_avg]
type = ElementAverageValue
variable = u_adjoint
execute_on = ADJOINT_TIMESTEP_END
[]
[inner_product]
type = VariableInnerProduct
variable = u
second_variable = u_adjoint
execute_on = ADJOINT_TIMESTEP_END
[]
[]
[Outputs]
[forward]
type = CSV
[]
[adjoint]
type = CSV
execute_on = 'INITIAL ADJOINT_TIMESTEP_END'
[]
[console]
type = Console
execute_postprocessors_on = 'INITIAL TIMESTEP_END ADJOINT_TIMESTEP_END'
[]
[]
(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/kernels/forcing_function/forcing_function_test.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
uniform_refine = 4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
active = 'forcing_func'
[./forcing_func]
type = ParsedFunction
expression = alpha*alpha*pi*pi*sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '16'
[../]
[]
[Kernels]
active = 'diff forcing'
[./diff]
type = Diffusion
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_func
[../]
[]
[BCs]
active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out
exodus = true
[]
(test/tests/postprocessors/pps_interval/pps_out_interval.i)
[Mesh]
file = square-2x2-nodeids.e
# This test can only be run with renumering disabled, so the
# NodalVariableValue postprocessor's node id is well-defined.
allow_renumbering = false
[]
[Variables]
active = 'u v'
[./u]
order = SECOND
family = LAGRANGE
[../]
[./v]
order = SECOND
family = LAGRANGE
[../]
[]
[Functions]
active = 'force_fn exact_fn left_bc'
[./force_fn]
type = ParsedFunction
expression = '1-x*x+2*t'
[../]
[./exact_fn]
type = ParsedFunction
expression = '(1-x*x)*t'
[../]
[./left_bc]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
active = '
time_u diff_u ffn_u
time_v diff_v'
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'all_u left_v right_v'
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = exact_fn
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '2'
value = 0
[../]
[]
[Postprocessors]
active = 'l2 node1 node4'
[./l2]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./node1]
type = NodalVariableValue
variable = u
nodeid = 15
[../]
[./node4]
type = NodalVariableValue
variable = v
nodeid = 10
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
end_time = 1
[]
[Outputs]
file_base = pps_out_interval
time_step_interval = 2
exodus = true
[./console]
type = Console
time_step_interval = 1
[../]
[]
(modules/heat_transfer/test/tests/convective_heat_flux/coupled.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
[]
[Variables]
[./temp]
initial_condition = 200.0
[../]
[]
[Kernels]
[./heat_dt]
type = TimeDerivative
variable = temp
[../]
[./heat_conduction]
type = Diffusion
variable = temp
[../]
[./heat]
type = BodyForce
variable = temp
value = 0
[../]
[]
[BCs]
[./right]
type = ConvectiveHeatFluxBC
variable = temp
boundary = 'right'
T_infinity = T_inf
heat_transfer_coefficient = htc
heat_transfer_coefficient_dT = dhtc_dT
[../]
[]
[Materials]
[./T_inf]
type = ParsedMaterial
property_name = T_inf
coupled_variables = temp
expression = 'temp + 1'
[../]
[./htc]
type = ParsedMaterial
property_name = htc
coupled_variables = temp
expression = 'temp / 100 + 1'
[../]
[./dhtc_dT]
type = ParsedMaterial
property_name = dhtc_dT
coupled_variables = temp
expression = '1 / 100'
[../]
[]
[Postprocessors]
[./left_temp]
type = SideAverageValue
variable = temp
boundary = left
execute_on = 'TIMESTEP_END initial'
[../]
[./right_temp]
type = SideAverageValue
variable = temp
boundary = right
[../]
[./right_flux]
type = SideDiffusiveFluxAverage
variable = temp
boundary = right
diffusivity = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1
nl_abs_tol = 1e-12
[]
[Outputs]
[./out]
type = CSV
time_step_interval = 10
[../]
[]
(test/tests/tag/tag_interface_kernels.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 2
xmax = 2
ny = 2
ymax = 2
nz = 2
zmax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 1'
block_id = 1
[../]
[./break_boundary]
input = subdomain1
type = BreakBoundaryOnSubdomainGenerator
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[]
[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
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1'
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1'
[../]
[./source_u]
type = BodyForce
variable = u
value = 1
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1 vec_tag2'
[../]
[]
[InterfaceKernels]
[./interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1 vec_tag2'
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 back_to_0 right top front'
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1 back_to_1'
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1'
[../]
[]
[AuxVariables]
[./tag_variable1]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./tag_variable2]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[AuxKernels]
[./TagVectorAux1]
type = TagVectorAux
variable = tag_variable1
v = u
block = 0
vector_tag = vec_tag2
execute_on = timestep_end
[../]
[./TagVectorAux2]
type = TagMatrixAux
variable = tag_variable2
v = v
block = 1
matrix_tag = mat_tag2
execute_on = timestep_end
[../]
[]
[Postprocessors]
[./u_int]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[../]
[./v_int]
type = ElementIntegralVariablePostprocessor
variable = v
block = 1
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Problem]
type = TagTestProblem
test_tag_vectors = 'nontime residual vec_tag1 vec_tag2'
test_tag_matrices = 'mat_tag1 mat_tag2'
extra_tag_matrices = 'mat_tag1 mat_tag2'
extra_tag_vectors = 'vec_tag1 vec_tag2'
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(modules/optimization/test/tests/optimizationreporter/constant_heat_source/forward.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 2
ymax = 2
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[heat_source]
type = BodyForce
function = volumetric_heat_func
variable = temperature
[]
[]
[BCs]
[left]
type = NeumannBC
variable = temperature
boundary = left
value = 0
[]
[right]
type = NeumannBC
variable = temperature
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 200
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 100
[]
[]
[Functions]
[volumetric_heat_func]
type = ParsedOptimizationFunction
expression = q
param_symbol_names = 'q'
param_vector_name = 'params/q'
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'preonly lu superlu_dist'
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
[]
[params]
type = ConstantReporter
real_vector_names = 'q'
real_vector_values = '0' # Dummy value
[]
[]
[Outputs]
console = false
file_base = 'forward'
[]
(python/peacock/tests/common/oversample.i)
###########################################################
# This is a simple test with a time-dependent problem
# demonstrating the use of a "Transient" Executioner.
#
# @Requirement F1.10
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
# dudt = 3*t^2*(x^2 + y^2)
expression = 3*t*t*((x*x)+(y*y))-(4*t*t*t)
[../]
[./exact_fn]
type = ParsedFunction
expression = t*t*t*((x*x)+(y*y))
[../]
[]
[Kernels]
active = 'diff ie ffn'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'all'
[./all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Postprocessors]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./dt]
type = TimestepSize
[../]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
# Preconditioned JFNK (default)
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_transient
exodus = true
[./refine_2]
type = Exodus
file_base = oversample_2
refinements = 2
[../]
[]
(test/tests/transfers/general_field/user_object/duplicated_user_object_tests/tosub_displaced_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 8
xmax = 0.1
ymax = 0.5
displacements = 'disp_x disp_y'
coord_type = rz
[]
[Variables]
[u]
initial_condition = 1
[]
[]
[AuxVariables]
[multi_layered_average]
[]
[element_multi_layered_average]
order = CONSTANT
family = MONOMIAL
[]
[disp_x]
initial_condition = 0.0
[]
[disp_y]
initial_condition = 0.5
[]
[]
[Functions]
[axial_force]
type = ParsedFunction
expression = 1000*y
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[force]
type = BodyForce
variable = u
function = axial_force
[]
[]
[BCs]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.001
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(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
[]
(test/tests/interfacekernels/hybrid/interface.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 40
xmax = 2
ny = 40
ymax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0.5 0.5 0'
top_right = '1.5 1.5 0'
block_id = 1
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '1'
paired_block = '0'
new_boundary = 'primary1_interface'
[]
[]
[Variables]
[u]
block = 0
[]
[v]
block = 1
[]
[]
[Kernels]
[diff_u]
type = MatDiffusion
variable = u
diffusivity = D
block = 0
[]
[diff_v]
type = MatDiffusion
variable = v
diffusivity = D
block = 1
[]
[source_u]
type = BodyForce
variable = u
value = 1
block = 0
[]
[source_v]
type = BodyForce
variable = v
value = 1
block = 1
[]
[]
[BCs]
[u]
type = VacuumBC
variable = u
boundary = 'left bottom right top'
[]
[interface_bc]
type = ADMatchedValueBC
variable = v
v = u
boundary = primary1_interface
[]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
[InterfaceKernels]
active = 'diffusion'
[./diffusion]
type = InterfaceDiffusion
variable = v
neighbor_var = u
boundary = primary1_interface
D = 'D'
D_neighbor = 'D'
[../]
[./penalty]
type = PenaltyInterfaceDiffusion
variable = v
neighbor_var = u
boundary = primary1_interface
penalty = 1e3
[../]
[]
[Materials]
[mat0]
type = GenericConstantMaterial
prop_names = 'D'
prop_values = '1'
block = 0
[]
[mat1]
type = GenericConstantMaterial
prop_names = 'D'
prop_values = '1'
block = 1
[]
[]
[AuxVariables]
[c][]
[]
[AuxKernels]
[u]
type = ParsedAux
variable = c
coupled_variables = 'u'
expression = 'u'
block = 0
[]
[v]
type = ParsedAux
variable = c
coupled_variables = 'v'
expression = 'v'
block = 1
[]
[]
(modules/optimization/test/tests/executioners/steady_and_adjoint/nonlinear_diffusion.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
[]
[Variables]
[u]
[]
[u_adjoint]
solver_sys = adjoint
[]
[]
[Kernels]
[diff]
type = ADMatDiffusion
variable = u
diffusivity = D
[]
[src]
type = ADBodyForce
variable = u
value = 1
[]
[src_adjoint]
type = ADBodyForce
variable = u_adjoint
value = 1
[]
[]
[BCs]
[dirichlet]
type = ADDirichletBC
variable = u
boundary = 'top right'
value = 0
[]
[]
[Materials]
[diffc]
type = ADParsedMaterial
property_name = D
expression = '0.1 + 5 * u'
coupled_variables = 'u'
[]
[]
[Postprocessors]
[u_avg]
type = ElementAverageValue
variable = u
[]
[u_adjoint_avg]
type = ElementAverageValue
variable = u_adjoint
execute_on = ADJOINT_TIMESTEP_END
[]
[inner_product]
type = VariableInnerProduct
variable = u
second_variable = u_adjoint
execute_on = ADJOINT_TIMESTEP_END
[]
[]
[Executioner]
type = SteadyAndAdjoint
forward_system = nl0
adjoint_system = adjoint
nl_rel_tol = 1e-12
l_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/KKS_system/kks_multiphase.i)
#
# This test is for the 3-phase KKS model
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
nz = 0
xmin = 0
xmax = 40
ymin = 0
ymax = 40
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[AuxVariables]
[./Energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Variables]
# concentration
[./c]
order = FIRST
family = LAGRANGE
[../]
# order parameter 1
[./eta1]
order = FIRST
family = LAGRANGE
[../]
# order parameter 2
[./eta2]
order = FIRST
family = LAGRANGE
[../]
# order parameter 3
[./eta3]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[../]
# phase concentration 1
[./c1]
order = FIRST
family = LAGRANGE
initial_condition = 0.2
[../]
# phase concentration 2
[./c2]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[../]
# phase concentration 3
[./c3]
order = FIRST
family = LAGRANGE
initial_condition = 0.8
[../]
# Lagrange multiplier
[./lambda]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[../]
[]
[ICs]
[./eta1]
variable = eta1
type = SmoothCircleIC
x1 = 20.0
y1 = 20.0
radius = 10
invalue = 0.9
outvalue = 0.1
int_width = 4
[../]
[./eta2]
variable = eta2
type = SmoothCircleIC
x1 = 20.0
y1 = 20.0
radius = 10
invalue = 0.1
outvalue = 0.9
int_width = 4
[../]
[./c]
variable = c
type = SmoothCircleIC
x1 = 20.0
y1 = 20.0
radius = 10
invalue = 0.2
outvalue = 0.5
int_width = 2
[../]
[]
[Materials]
# simple toy free energies
[./f1]
type = DerivativeParsedMaterial
property_name = F1
coupled_variables = 'c1'
expression = '20*(c1-0.2)^2'
[../]
[./f2]
type = DerivativeParsedMaterial
property_name = F2
coupled_variables = 'c2'
expression = '20*(c2-0.5)^2'
[../]
[./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
property_name = h1
[../]
# h2(eta1, eta2, eta3)
[./h2]
type = SwitchingFunction3PhaseMaterial
eta_i = eta2
eta_j = eta3
eta_k = eta1
property_name = h2
[../]
# h3(eta1, eta2, eta3)
[./h3]
type = SwitchingFunction3PhaseMaterial
eta_i = eta3
eta_j = eta1
eta_k = eta2
property_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 = '0.7 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
coupled_variables = '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
coupled_variables = '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
coupled_variables = '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
coupled_variables = '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
coupled_variables = '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
coupled_variables = '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
coupled_variables = '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
coupled_variables = '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
coupled_variables = '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
coupled_variables = '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
[../]
[]
[AuxKernels]
[./Energy_total]
type = KKSMultiFreeEnergy
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gj_names = 'g1 g2 g3'
variable = Energy
w = 1
interfacial_vars = 'eta1 eta2 eta3'
kappa_names = 'kappa kappa kappa'
[../]
[]
[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 = 2
dt = 0.5
[]
[Preconditioning]
active = 'full'
[./full]
type = SMP
full = true
[../]
[./mydebug]
type = FDP
full = true
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/nodalkernels/penalty_dirichlet/nodal_penalty_dirichlet.i)
#In order to compare the solution generated using preset BC, the penalty was set to 1e10.
#Large penalty number should be used with caution.
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = -2*(x*x+y*y-2)
[../]
[./solution]
type = ParsedGradFunction
value = (1-x*x)*(1-y*y)
grad_x = 2*(x*y*y-x)
grad_y = 2*(x*x*y-y)
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[NodalKernels]
[./bc_all]
type = PenaltyDirichletNodalKernel
variable = u
value = 0
boundary = 'top left right bottom'
penalty = 1e10
[../]
[]
# [BCs]
# [./fix]
# type = DirichletBC
# preset = true
# variable = u
# value = 0
# boundary = 'top left right bottom'
# [../]
# []
[Postprocessors]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-14
[]
[Outputs]
file_base = nodal_preset_bc_out
exodus = true
[]
(test/tests/dgkernels/2d_diffusion_dg/no_functor_additions.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[AuxVariables]
[v]
order = FIRST
family = MONOMIAL
[]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[../]
[./exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./abs] # u * v
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGKernels]
[regular_dg_diffusion]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[]
[]
[DGDiffusionAction]
variable = u
kernels_to_add = 'COUPLED'
coupled_var = v
[]
[BCs]
[./all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[console]
type = Console
system_info = 'framework mesh aux nonlinear relationship execution'
[]
[]
[Problem]
error_on_jacobian_nonzero_reallocation = true
[]
[Postprocessors]
[num_rm]
type = NumRelationshipManagers
[]
[]
(test/tests/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
[../]
[]
(python/peacock/tests/input_tab/InputTree/gold/transient.i)
# ##########################################################
# This is a simple test with a time-dependent problem
# demonstrating the use of a "Transient" Executioner.
#
# @Requirement F1.10
# ##########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = ConstantIC
value = 0
[]
[]
[]
[Functions]
[forcing_fn]
# dudt = 3*t^2*(x^2 + y^2)
type = ParsedFunction
expression = '3*t*t*((x*x)+(y*y))-(4*t*t*t)'
[]
[exact_fn]
type = ParsedFunction
expression = 't*t*t*((x*x)+(y*y))'
[]
[]
[Kernels]
[ie]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[BCs]
inactive = 'left right'
[all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[]
[left]
type = DirichletBC
variable = u
boundary = '3'
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = '1'
value = 1
[]
[]
[Postprocessors]
[l2_err]
type = ElementL2Error
variable = 'u'
function = exact_fn
[]
[dt]
type = TimestepSize
[]
[]
[Executioner]
# Preconditioned JFNK (default)
type = Transient
scheme = implicit-euler
solve_type = PJFNK
start_time = 0.0
num_steps = 5
dt = 0.1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_transient
exodus = true
[]
(test/tests/multiapps/restart/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 1
nx = 10
[]
[Functions]
[./u_fn]
type = ParsedFunction
expression = t*x
[../]
[./ffn]
type = ParsedFunction
expression = x
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[./fn]
type = BodyForce
variable = u
function = ffn
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = FunctionDirichletBC
variable = u
boundary = right
function = u_fn
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(test/tests/bcs/ad_penalty_dirichlet_bc/penalty_dirichlet_bc_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = -2*(x*x+y*y-2)+(1-x*x)*(1-y*y)
[../]
[./solution]
type = ParsedGradFunction
value = (1-x*x)*(1-y*y)
grad_x = 2*(x*y*y-x)
grad_y = 2*(x*x*y-y)
[../]
[]
[Variables]
[./u]
order = SECOND
family = HIERARCHIC
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = ADDiffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = ADBodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
active = 'bc_all'
[./bc_all]
type = ADPenaltyDirichletBC
variable = u
value = 0
boundary = 'top left right bottom'
penalty = 1e5
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_rel_tol = 1e-14
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/fvkernels/fv_adapt/transient-adapt.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
elem_type = QUAD4
[]
[]
[Variables]
[u]
order = CONSTANT
family = MONOMIAL
[]
[v][]
[]
[Functions]
[force]
type = ParsedFunction
expression = t
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = v
[]
[force]
type = BodyForce
variable = v
function = force
[]
[]
[FVKernels]
[diff]
type = FVDiffusion
variable = u
coeff = coeff
[]
[force]
type = FVBodyForce
variable = u
function = force
[]
[]
[FVBCs]
[right]
type = FVDirichletBC
variable = u
boundary = right
value = 1
[]
[left]
type = FVDirichletBC
variable = u
boundary = left
value = 0
[]
[]
[BCs]
[right]
type = DirichletBC
variable = v
boundary = right
value = 1
[]
[left]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[]
[Materials]
[diff]
type = ADGenericFunctorMaterial
prop_names = 'coeff'
prop_values = '1'
[]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 1
solve_type = 'NEWTON'
[]
[Adaptivity]
marker = box
initial_steps = 1
[Markers]
[box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[]
[]
[]
[Outputs]
exodus = true
[]
(test/tests/outputs/debug/show_execution_userobjects.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1.5 2.4'
dy = '1.3 0.9'
ix = '3 2'
iy = '2 3'
subdomain_id = '0 1
1 0'
[]
[add_interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'cmg'
primary_block = 0
paired_block = 1
new_boundary = 'interface'
[]
second_order = true
[]
[Functions]
[forcing_fnu]
type = ParsedFunction
expression = -5.8*(x+y)+x*x*x-x+y*y*y-y
[]
[forcing_fnv]
type = ParsedFunction
expression = -4
[]
[slnu]
type = ParsedGradFunction
expression = x*x*x-x+y*y*y-y
grad_x = 3*x*x-1
grad_y = 3*y*y-1
[]
[slnv]
type = ParsedGradFunction
expression = x*x+y*y
grad_x = 2*x
grad_y = 2*y
[]
# NeumannBC functions
[bc_fnut]
type = ParsedFunction
expression = 3*y*y-1
[]
[bc_fnub]
type = ParsedFunction
expression = -3*y*y+1
[]
[bc_fnul]
type = ParsedFunction
expression = -3*x*x+1
[]
[bc_fnur]
type = ParsedFunction
expression = 3*x*x-1
[]
[]
[Variables]
[u]
order = SECOND
family = HIERARCHIC
[]
[v]
order = SECOND
family = LAGRANGE
initial_condition = 1
[]
[]
[AuxVariables]
[v_elem]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
active = 'diff1 diff2 test1 forceu forcev react'
[diff1]
type = Diffusion
variable = u
[]
[test1]
type = CoupledConvection
variable = u
velocity_vector = v
[]
[diff2]
type = Diffusion
variable = v
[]
[react]
type = Reaction
variable = u
[]
[forceu]
type = BodyForce
variable = u
function = forcing_fnu
[]
[forcev]
type = BodyForce
variable = v
function = forcing_fnv
[]
[]
[AuxKernels]
[set_v_elem]
type = FunctionAux
variable = v_elem
# selected not to be the solution for no particular reason
function = forcing_fnv
[]
[]
[BCs]
[bc_v]
type = FunctionDirichletBC
variable = v
function = slnv
boundary = 'left right top bottom'
[]
[bc_u_tb]
type = CoupledKernelGradBC
variable = u
var2 = v
vel = '0.1 0.1'
boundary = 'top bottom left right'
[]
[bc_ul]
type = FunctionNeumannBC
variable = u
function = bc_fnul
boundary = 'left'
[]
[bc_ur]
type = FunctionNeumannBC
variable = u
function = bc_fnur
boundary = 'right'
[]
[bc_ut]
type = FunctionNeumannBC
variable = u
function = bc_fnut
boundary = 'top'
[]
[bc_ub]
type = FunctionNeumannBC
variable = u
function = bc_fnub
boundary = 'bottom'
[]
[]
[Postprocessors]
# Global user objects
[dofs]
type = NumDOFs
[]
[h]
type = AverageElementSize
[]
# Elemental user objects
[L2u]
type = ElementL2Error
variable = u
function = slnu
# Testing an option
force_preic = true
[]
[L2v]
type = ElementL2Error
variable = v
function = slnv
# Testing an option
force_preaux = true
[]
[H1error]
type = ElementH1Error
variable = u
function = slnu
[]
[H1Semierror]
type = ElementH1SemiError
variable = u
function = slnu
[]
[L2v_elem]
type = ElementL2Error
variable = v_elem
function = slnv
[]
[f_integral]
type = FunctionElementIntegral
function = slnv
[]
[int_v]
type = ElementIntegralVariablePostprocessor
variable = v
block = 1
execute_on = 'TIMESTEP_END transfer'
[]
[int_v_elem]
type = ElementIntegralVariablePostprocessor
variable = v_elem
block = 1
execute_on = 'TIMESTEP_END transfer'
[]
# Side user objects
[integral_v]
type = SideIntegralVariablePostprocessor
variable = v
boundary = 0
[]
[]
[VectorPostprocessors]
# General UOs
[memory]
type = VectorMemoryUsage
[]
[line]
type = LineValueSampler
variable = v
num_points = 10
start_point = '0 0 0'
end_point = '0.5 0.5 0'
sort_by = 'x'
[]
# Nodal UOs
[nodal_sampler_y]
type = NodalValueSampler
variable = v
sort_by = 'y'
[]
[nodal_sampler_x]
type = NodalValueSampler
variable = v
sort_by = 'x'
[]
# Element UO
[elem_sample]
type = ElementValueSampler
variable = v_elem
sort_by = 'x'
[]
[]
[UserObjects]
# Nodal user objects
[find_node]
type = NearestNodeNumberUO
point = '0.5 0.5 0'
[]
# Side user objects
[side_int]
type = LayeredSideIntegral
variable = v
boundary = 0
direction = y
num_layers = 4
[]
[side_int_2]
type = NearestPointLayeredSideIntegral
variable = v
boundary = 0
direction = x
num_layers = 3
points = '1 1 0'
[]
# Interface user objects
[values]
type = InterfaceQpValueUserObject
var = v
boundary = interface
[]
inactive = 'prime_1 prime_2'
# Threaded general user objects
[prime_2]
type = PrimeProductUserObject
[]
[prime_1]
type = PrimeProductUserObject
[]
# Domain user objects
[domain_2]
type = InterfaceDomainUserObject
u = u
v = v
block = '0'
robin_boundaries = 'left'
interface_boundaries = 'interface'
interface_penalty = 1e-10
nl_abs_tol = 1e1
[]
[domain_1]
type = InterfaceDomainUserObject
u = u
v = v
block = '0 1'
robin_boundaries = 'left'
interface_boundaries = 'interface'
interface_penalty = 1e-10
nl_abs_tol = 1e1
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_tol = 1e-5
[]
[Problem]
kernel_coverage_check = false
[]
[MultiApps]
active = ''
[full_solve]
type = FullSolveMultiApp
execute_on = 'initial timestep_end final'
input_files = show_execution_userobjects.i
cli_args = 'Problem/solve=false'
[]
[]
[Transfers]
active = ''
[conservative]
type = MultiAppNearestNodeTransfer
from_multi_app = full_solve
source_variable = v
variable = v_elem
from_postprocessors_to_be_preserved = int_v
to_postprocessors_to_be_preserved = int_v_elem
[]
[]
[Debug]
show_execution_order = 'ALWAYS INITIAL NONLINEAR LINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
[]
(test/tests/utils/spline_interpolation/bicubic_spline_interpolation_x_normal.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1 # needed to ensure Z is the problem dimension
ny = 4
nz = 4
ymax = 4
zmax = 4
[]
[Functions]
[./yx1]
type = ParsedFunction
expression = '3*y^2'
[../]
[./yx2]
type = ParsedFunction
expression = '6*z^2'
[../]
[./spline_fn]
type = BicubicSplineFunction
normal_component = 'x'
x1 = '0 2 4'
x2 = '0 2 4 6'
y = '0 16 128 432 8 24 136 440 64 80 192 496'
yx11 = '0 0 0 0'
yx1n = '48 48 48 48'
yx21 = '0 0 0'
yx2n = '216 216 216'
yx1 = 'yx1'
yx2 = 'yx2'
[../]
[./u_func]
type = ParsedFunction
expression = 'y^3 + 2*z^3'
[../]
[./u2_forcing_func]
type = ParsedFunction
expression = '-6*y - 12*z'
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./bi_func_value]
order = FIRST
family = LAGRANGE
[../]
[./y_deriv]
order = FIRST
family = LAGRANGE
[../]
[./z_deriv]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./bi_func_value]
type = FunctionAux
variable = bi_func_value
function = spline_fn
[../]
[./deriv_1]
type = FunctionDerivativeAux
function = spline_fn
variable = y_deriv
component = y
[../]
[./deriv_2]
type = FunctionDerivativeAux
function = spline_fn
variable = z_deriv
component = z
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
function = u2_forcing_func
[../]
[]
[BCs]
[./sides]
type = FunctionDirichletBC
variable = u
boundary = 'left right front back'
function = u_func
[../]
[]
[Postprocessors]
[./nodal_l2_err_spline]
type = NodalL2Error
variable = u
function = spline_fn
execute_on = 'initial timestep_end'
[../]
[./nodal_l2_err_analytic]
type = NodalL2Error
variable = u
function = u_func
execute_on = 'initial timestep_end'
[../]
[./y_deriv_err_analytic]
type = NodalL2Error
variable = y_deriv
function = yx1
execute_on = 'initial timestep_end'
[../]
[./z_deriv_err_analytic]
type = NodalL2Error
variable = z_deriv
function = yx2
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/steffensen_postprocessor/transient_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[time]
type = TimeDerivative
variable = u
[]
[sink]
type = BodyForce
variable = u
value = -1
[]
[]
[BCs]
[right]
type = PostprocessorDirichletBC
variable = u
boundary = right
postprocessor = 'from_main'
[]
[]
[Postprocessors]
[from_main]
type = Receiver
default = 0
[]
[to_main]
type = SideAverageValue
variable = u
boundary = left
[]
[average]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
fixed_point_algorithm = 'steffensen'
[]
[Outputs]
[csv]
type = CSV
start_step = 6
[]
exodus = false
[]
(test/tests/postprocessors/element_integral_var_pps/pps_old_value.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 4
ny = 4
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
initial_condition = 1
[../]
[]
[Functions]
[./force_fn]
type = ParsedFunction
expression = '1'
[../]
[./exact_fn]
type = ParsedFunction
expression = 't'
[../]
[]
[Kernels]
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[]
[BCs]
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./a]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = 'initial timestep_end'
[../]
[./total_a]
type = TimeIntegratedPostprocessor
value = a
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 1
start_time = 1
end_time = 3
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/multiapps/restart_subapp_ic/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 1
nx = 10
[]
[Functions]
[u_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[fn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = FunctionDirichletBC
variable = u
boundary = right
function = u_fn
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(test/tests/interfacekernels/3d_interface/coupled_value_coupled_flux.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 2
xmax = 2
ny = 2
ymax = 2
nz = 2
zmax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 1'
block_id = 1
[../]
[./break_boundary]
input = subdomain1
type = BreakBoundaryOnSubdomainGenerator
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[]
[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 = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 back_to_0 right top front'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1 back_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]
exodus = true
print_linear_residuals = true
[]
(test/tests/restart/restart_transient_from_steady/steady_with_2subs.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = 'replicated'
[]
[AuxVariables]
[Tf]
[]
[]
[Variables]
[power_density]
[]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2'
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[BCs]
[left]
type = DirichletBC
variable = power_density
boundary = left
value = 50
[]
[right]
type = DirichletBC
variable = power_density
boundary = right
value = 1e3
[]
[]
[Postprocessors]
[pwr_avg]
type = ElementAverageValue
variable = power_density
execute_on = 'initial timestep_end'
[]
[temp_avg]
type = ElementAverageValue
variable = Tf
execute_on = 'initial final'
[]
[temp_max]
type = ElementExtremeValue
value_type = max
variable = Tf
execute_on = 'initial final'
[]
[temp_min]
type = ElementExtremeValue
value_type = min
variable = Tf
execute_on = 'initial final'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
fixed_point_rel_tol = 1E-7
fixed_point_abs_tol = 1.0e-07
fixed_point_max_its = 12
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0
0.5 0 0'
input_files = steady_with_sub_sub.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[p_to_sub]
type = MultiAppProjectionTransfer
source_variable = power_density
variable = power_density
to_multi_app = sub
execute_on = 'timestep_end'
[]
[t_from_sub]
type = MultiAppGeometricInterpolationTransfer
source_variable = temp
variable = Tf
from_multi_app = sub
execute_on = 'timestep_end'
[]
[]
[Outputs]
exodus = true
perf_graph = true
checkpoint = true
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
(test/tests/time_steppers/timesequence_stepper/timesequence_failed_solve.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = t*t*(x*x+y*y)
[../]
[./forcing_fn]
type = ParsedFunction
expression = 2*t*(x*x+y*y)-4*t*t
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]
[ICs]
[./u_var]
type = FunctionIC
variable = u
function = exact_fn
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = 'left right top bottom'
function = exact_fn
[../]
[]
[Executioner]
type = Transient
# This timestepper does not use dt to set the timestep, it uses the time_sequence.
# dt = 250
dtmin=250
end_time = 3000.0
[./TimeStepper]
type = TimeSequenceStepperFailTest
time_sequence = '0 1000.0 2000.0'
[../]
nl_rel_tol=1.e-10
[]
[Outputs]
file_base = timesequence_failed_solve
exodus = true
[]
(test/tests/variables/fe_monomial_const/monomial-const-1d.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -1
xmax = 1
nx = 100
elem_type = EDGE3
[]
[Functions]
[./bc_fn]
type=ParsedFunction
expression=0
[../]
[./forcing_fn]
type = MTPiecewiseConst1D
[../]
[./solution]
type = MTPiecewiseConst1D
[../]
[]
[Variables]
[./u]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
# Note: MOOSE's DirichletBCs do not work properly with shape functions that do not
# have DOFs at the element edges. This test works because the solution
# has been designed to be zero at the boundary which is satisfied by the IC
# Ticket #1352
active = ''
[./bc_all]
type=FunctionDirichletBC
variable = u
boundary = 'left right'
function = bc_fn
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1.e-9
[./Adaptivity]
[../]
[]
[Outputs]
execute_on = 'timestep_end'
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[]
(test/tests/kernels/coupled_time_derivative/ad_coupled_time_derivative_test.i)
###########################################################
# This is a simple test of the CoupledTimeDerivative kernel.
# The expected solution for the variable v is
# v(x) = 1/2 * (x^2 + x)
###########################################################
[Mesh]
type = GeneratedMesh
nx = 5
ny = 5
dim = 2
[]
[Variables]
[./u]
[../]
[./v]
[../]
[]
[Kernels]
[./time_u]
type = TimeDerivative
variable = u
[../]
[./fn_u]
type = BodyForce
variable = u
function = 1
[../]
[./time_v]
type = ADCoupledTimeDerivative
variable = v
v = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = v
boundary = 'left'
value = 0
[../]
[./right]
type = DirichletBC
variable = v
boundary = 'right'
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 1
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
file_base = coupled_time_derivative_test_out
[]
(modules/stochastic_tools/test/tests/surrogates/load_store/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = u
diffusivity = D
[]
[absorption]
type = MaterialReaction
variable = u
coefficient = sig
[]
[source]
type = BodyForce
variable = u
value = 1.0
[]
[]
[Materials]
[diffusivity]
type = GenericConstantMaterial
prop_names = D
prop_values = 2.0
[]
[xs]
type = GenericConstantMaterial
prop_names = sig
prop_values = 2.0
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Postprocessors]
[avg]
type = AverageNodalVariableValue
variable = u
[]
[max]
type = NodalExtremeValue
variable = u
value_type = max
[]
[]
(test/tests/postprocessors/num_adaptivity_cycles/num_adaptivity_cycles_toggle_adaptivity_wait.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1
solve_type = 'PJFNK'
[]
[Adaptivity]
cycles_per_step = 1
marker = box
max_h_level = 2
initial_steps = 4
initial_marker = initial_box
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = dont_mark
type = BoxMarker
[../]
[./initial_box]
type = BoxMarker
bottom_left = '0.8 0.1 0'
top_right = '0.9 0.2 0'
inside = refine
outside = dont_mark
[../]
[../]
[]
[UserObjects]
[./toggle_adaptivity]
type = ToggleMeshAdaptivity
mesh_adaptivity = 'off'
apply_after_timestep = 1
[../]
[]
[Postprocessors]
[./adaptivity_cycles]
type = NumAdaptivityCycles
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
csv = true
[]
(modules/combined/test/tests/elastic_thermal_patch/elastic_thermal_patch_rz.i)
#
# This problem is modified from the Abaqus verification manual:
# "1.5.4 Patch test for axisymmetric elements"
# The original stress solution is given as:
# xx = yy = zz = 2000
# xy = 400
#
# Here, E=1e6 and nu=0.25.
# However, with a +100 degree change in temperature and a coefficient
# of thermal expansion of 1e-6, the solution becomes:
# xx = yy = zz = 1800
# xy = 400
# since
# E*(1-nu)/(1+nu)/(1-2*nu)*(1+2*nu/(1-nu))*(1e-3-1e-4) = 1800
#
# Also,
#
# dSrr dSrz Srr-Stt
# ---- + ---- + ------- + br = 0
# dr dz r
#
# and
#
# dSrz Srz dSzz
# ---- + --- + ---- + bz = 0
# dr r dz
#
# where
# Srr = stress in rr
# Szz = stress in zz
# Stt = stress in theta-theta
# Srz = stress in rz
# br = body force in r direction
# bz = body force in z direction
#
[GlobalParams]
displacements = 'disp_x disp_y'
temperature = temp
volumetric_locking_correction = true
[]
[Problem]
coord_type = RZ
[]
[Mesh]
file = elastic_thermal_patch_rz_test.e
[]
[Functions]
[./ur]
type = ParsedFunction
expression = '1e-3*x'
[../]
[./uz]
type = ParsedFunction
expression = '1e-3*(x+y)'
[../]
[./body]
type = ParsedFunction
expression = '-400/x'
[../]
[./temp]
type = ParsedFunction
expression = '117.56+100*t'
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./temp]
initial_condition = 117.56
[../]
[]
[Modules/TensorMechanics/Master/All]
add_variables = true
strain = SMALL
incremental = true
eigenstrain_names = eigenstrain
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_zx'
[]
[Kernels]
[./body]
type = BodyForce
variable = disp_y
value = 1
function = body
[../]
[./heat]
type = HeatConduction
variable = temp
[../]
[]
[BCs]
[./ur]
type = FunctionDirichletBC
variable = disp_x
boundary = 10
function = ur
[../]
[./uz]
type = FunctionDirichletBC
variable = disp_y
boundary = 10
function = uz
[../]
[./temp]
type = FunctionDirichletBC
variable = temp
boundary = 10
function = temp
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
lambda = 400000.0
poissons_ratio = 0.25
[../]
[./thermal_strain]
type = ComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 1e-6
stress_free_temperature = 117.56
eigenstrain_name = eigenstrain
[../]
[./stress]
type = ComputeStrainIncrementBasedStress
[../]
[./heat]
type = HeatConductionMaterial
specific_heat = 0.116
thermal_conductivity = 4.85e-4
[../]
[./density]
type = Density
density = 0.283
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
nl_abs_tol = 1e-11
nl_rel_tol = 1e-12
l_max_its = 20
start_time = 0.0
dt = 1.0
num_steps = 1
end_time = 1.0
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/element_vec_l2_error_pps/element_vec_l2_error.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
[]
[Variables]
active = 'u v'
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
active = 'bc_u bc_v f_u f_v'
# A ParsedFunction allows us to supply analytic expressions
# directly in the input file
[./bc_u]
type = ParsedFunction
expression = sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '2'
[../]
[./bc_v]
type = ParsedFunction
expression = sin(alpha*pi*y)
symbol_names = 'alpha'
symbol_values = '2'
[../]
[./f_u]
type = ParsedFunction
expression = alpha*alpha*pi*pi*sin(alpha*pi*x)
symbol_names = 'alpha'
symbol_values = '2'
[../]
[./f_v]
type = ParsedFunction
expression = alpha*alpha*pi*pi*sin(alpha*pi*y)
symbol_names = 'alpha'
symbol_values = '2'
[../]
[]
[Kernels]
active = 'diff_u diff_v forcing_u forcing_v'
[./diff_u]
type = Diffusion
variable = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
# This Kernel can take a function name to use
[./forcing_u]
type = BodyForce
variable = u
function = f_u
[../]
[./forcing_v]
type = BodyForce
variable = v
function = f_v
[../]
[]
[BCs]
active = 'all_u all_v'
# The BC can take a function name to use
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = 'bottom right top left'
function = bc_u
[../]
[./all_v]
type = FunctionDirichletBC
variable = v
boundary = 'bottom right top left'
function = bc_v
[../]
[]
[Executioner]
type = Steady
[./Adaptivity]
refine_fraction = 1.0
coarsen_fraction = 0.0
max_h_level = 10
steps = 3
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
execute_on = 'initial timestep_end'
[../]
[./integral]
type = ElementVectorL2Error
var_x = u
var_y = v
function_x = bc_u
function_y = bc_v
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
file_base = out
exodus = false
csv = true
[]
(test/tests/postprocessors/postprocessor_dependency/element_side_pp.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 3
ny = 3
elem_type = QUAD9
[]
[Variables]
active = 'u v'
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 2.8
[../]
[../]
[./v]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 5.4
[../]
[../]
[]
[Functions]
active = 'force_fn exact_fn left_bc'
[./force_fn]
type = ParsedFunction
expression = '1-x*x+2*t'
[../]
[./exact_fn]
type = ParsedFunction
expression = '(1-x*x)*t'
[../]
[./left_bc]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
active = '
time_u diff_u ffn_u
time_v diff_v'
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'all_u left_v right_v'
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '1'
value = 0
[../]
[]
[Postprocessors]
[./sidepp]
type = SideIntegralVariablePostprocessor
variable = v
execute_on = timestep_end
boundary = '0 1 2 3'
[../]
[./passsidepp]
type = ElementSidePP
side_pp = sidepp
execute_on = timestep_end
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
end_time = 0.3
[]
[Outputs]
file_base = out
csv = true
[]
(test/tests/userobjects/side_uo_with_lowerd_use/side-uo-with-lower-d-use.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = 0
ymax = 2
nx = 2
ny = 2
subdomain_ids = '1 2 3 4'
[]
[1to2]
type = SideSetsBetweenSubdomainsGenerator
input = gmg
primary_block = '1'
paired_block = '2'
new_boundary = 'onetwo'
[]
[2to1]
type = SideSetsBetweenSubdomainsGenerator
input = 1to2
primary_block = '2'
paired_block = '1'
new_boundary = 'twoone'
[]
[1to3]
type = SideSetsBetweenSubdomainsGenerator
input = 2to1
primary_block = '1'
paired_block = '3'
new_boundary = 'onethree'
[]
[3to1]
type = SideSetsBetweenSubdomainsGenerator
input = 1to3
primary_block = '3'
paired_block = '1'
new_boundary = 'threeone'
[]
build_all_side_lowerd_mesh = true
[]
[Variables]
[u]
order = THIRD
family = MONOMIAL
block = '1 2 3 4'
[]
[lambda]
order = CONSTANT
family = MONOMIAL
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
block = '1 2 3 4'
[]
[reaction]
type = Reaction
variable = u
rate = '1'
block = '1 2 3 4'
[]
[source]
type = BodyForce
variable = u
value = '1'
block = '1 2 3 4'
[]
[]
[DGKernels]
[surface]
type = HFEMDiffusion
variable = u
lowerd_variable = lambda
[]
[]
[BCs]
[all]
type = NeumannBC
boundary = 'left right top bottom'
variable = u
[]
[]
[UserObjects]
[onetwo_uo]
type = LowerDIntegralSideUserObject
boundary = onetwo
lowerd_variable = lambda
[]
[twoone_uo]
type = LowerDIntegralSideUserObject
boundary = twoone
lowerd_variable = lambda
[]
[onethree_uo]
type = LowerDIntegralSideUserObject
boundary = onethree
lowerd_variable = lambda
[]
[threeone_uo]
type = LowerDIntegralSideUserObject
boundary = threeone
lowerd_variable = lambda
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
(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/stochastic_tools/examples/surrogates/polynomial_regression/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 1
elem_type = EDGE3
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 1.0
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 2.0
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 300
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[max]
type = NodalExtremeValue
variable = T
value_type = max
[]
[]
[Outputs]
[]
(modules/optimization/test/tests/executioners/transient_and_adjoint/nonlinear_diffusivity.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
[]
[Variables]
[u]
[]
[u_adjoint]
solver_sys = adjoint
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = ADMatDiffusion
variable = u
diffusivity = D
[]
[src]
type = ADBodyForce
variable = u
value = 1
[]
[src_adjoint]
type = ADBodyForce
variable = u_adjoint
value = 1
[]
[]
[BCs]
[dirichlet]
type = ADDirichletBC
variable = u
boundary = 'top right'
value = 0
[]
[]
[Materials]
[diffc]
type = ADParsedMaterial
property_name = D
expression = '0.1 + 5 * u'
coupled_variables = 'u'
[]
[]
[Postprocessors]
[u_avg]
type = ElementAverageValue
variable = u
execute_on = 'TIMESTEP_END ADJOINT_TIMESTEP_END'
[]
[u_adjoint_avg]
type = ElementAverageValue
variable = u_adjoint
execute_on = ADJOINT_TIMESTEP_END
[]
[inner_product]
type = VariableInnerProduct
variable = u
second_variable = u_adjoint
execute_on = ADJOINT_TIMESTEP_END
[]
[]
[Executioner]
type = TransientAndAdjoint
forward_system = nl0
adjoint_system = adjoint
dt = 0.2
num_steps = 5
nl_rel_tol = 1e-12
l_tol = 1e-12
[]
[Outputs]
[forward]
type = CSV
[]
[adjoint]
type = CSV
execute_on = 'INITIAL ADJOINT_TIMESTEP_END'
[]
[console]
type = Console
execute_postprocessors_on = 'INITIAL TIMESTEP_END ADJOINT_TIMESTEP_END'
[]
[]
(test/tests/multiapps/restart_subapp_ic/sub2.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 1
nx = 10
[]
[Functions]
[u_fn]
type = ParsedFunction
expression = t*x
[]
[ffn]
type = ParsedFunction
expression = x
[]
[]
[Variables]
[u]
initial_condition = 4.2
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[fn]
type = BodyForce
variable = u
function = ffn
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = FunctionDirichletBC
variable = u
boundary = right
function = u_fn
[]
[]
[Problem]
# Being restarted by the parent, yet the ICs are overriding the initial solution
# See t=0.5s in the gold/parent2_out_sub_app0.e file
allow_initial_conditions_with_restart = true
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_1D.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
nx = 2
xmax = 2
[]
[split]
type = SubdomainBoundingBoxGenerator
input = mesh
block_id = 1
bottom_left = '1 0 0'
top_right = '2 0 0'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = split
primary_block = 1
paired_block = 0
new_boundary = 'interface0'
[]
uniform_refine = 4
[]
[Variables]
# Defining a DFEM variable to handle gap discontinuity
[T]
order = FIRST
family = MONOMIAL
[]
[]
[AuxVariables]
# Auxvariable containing bulk temperature of gap
[Tbulk]
order = FIRST
family = LAGRANGE
initial_condition = 300 # K
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = T
diffusivity = conductivity
[]
[source]
type = BodyForce
variable = T
value = 1.0
[]
[]
[DGKernels]
# DG kernel to represent diffusion accross element faces
[./dg_diff]
type = DGDiffusion
variable = T
epsilon = -1
sigma = 6
diff = conductivity
# Ignoring gap side set because no diffusion accross there
exclude_boundary = 'interface0'
[../]
[]
[InterfaceKernels]
active = 'gap'
# Heat transfer kernel using Tbulk as material
[gap]
type = SideSetHeatTransferKernel
variable = T
neighbor_var = T
boundary = 'interface0'
[]
# Heat transfer kernel using Tbulk as auxvariable
[gap_var]
type = SideSetHeatTransferKernel
variable = T
neighbor_var = T
boundary = 'interface0'
Tbulk_var = Tbulk
[]
[]
[Functions]
[bc_func]
type = ConstantFunction
value = 300
[]
[exact]
type = ParsedFunction
expression = '
A := if(x < 1, -0.5, -0.25);
B := if(x < 1, -0.293209850655001, 0.0545267662299068);
C := if(x < 1, 300.206790149345, 300.19547323377);
d := -1;
A * (x+d) * (x+d) + B * (x+d) + C'
[]
[]
[BCs]
[bc_left]
type = DGFunctionDiffusionDirichletBC
boundary = 'left'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[bc_right]
type = DGFunctionDiffusionDirichletBC
boundary = 'right'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[]
[Materials]
[k0]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 1.0
block = 0
[]
[k1]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 2.0
block = 1
[]
[gap_mat]
type = SideSetHeatTransferMaterial
boundary = 'interface0'
conductivity = 1.5
gap_length = 1.0
h_primary = 1
h_neighbor = 1
Tbulk = 300
emissivity_primary = 1
emissivity_neighbor = 1
[]
[]
[Postprocessors]
[error]
type = ElementL2Error
variable = T
function = exact
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/kernels/scalar_constraint/scalar_constraint_kernel_disp.i)
#
# This test is identical to scalar_constraint_kernel.i, but it everything is evaluated on the displaced mesh
#
[GlobalParams]
use_displaced_mesh = true
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
displacements = 'disp_x disp_y'
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[./ffn]
type = ParsedFunction
expression = -4
[../]
[./bottom_bc_fn]
type = ParsedFunction
expression = -2*y
[../]
[./right_bc_fn]
type = ParsedFunction
expression = 2*x
[../]
[./top_bc_fn]
type = ParsedFunction
expression = 2*y
[../]
[./left_bc_fn]
type = ParsedFunction
expression = -2*x
[../]
[]
[AuxVariables]
[./disp_x]
family = LAGRANGE
order = SECOND
[../]
[./disp_y]
family = LAGRANGE
order = SECOND
[../]
[]
[AuxKernels]
[./disp_x_ak]
type = ConstantAux
variable = disp_x
value = 0
[../]
[./disp_y_ak]
type = ConstantAux
variable = disp_y
value = 0
[../]
[]
# NL
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[./lambda]
family = SCALAR
order = FIRST
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffnk]
type = BodyForce
variable = u
function = ffn
[../]
[./sk_lm]
type = ScalarLagrangeMultiplier
variable = u
lambda = lambda
[../]
[]
[ScalarKernels]
[./constraint]
type = AverageValueConstraint
variable = lambda
pp_name = pp
value = 2.666666666666666
# overrride the global setting, scalar kernels do not live on a mesh
use_displaced_mesh = false
[../]
[]
[BCs]
[./bottom]
type = FunctionNeumannBC
variable = u
boundary = '0'
function = bottom_bc_fn
[../]
[./right]
type = FunctionNeumannBC
variable = u
boundary = '1'
function = right_bc_fn
[../]
[./top]
type = FunctionNeumannBC
variable = u
boundary = '2'
function = top_bc_fn
[../]
[./left]
type = FunctionNeumannBC
variable = u
boundary = '3'
function = left_bc_fn
[../]
[]
[Postprocessors]
[./pp]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = linear
[../]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
[./pc]
type = SMP
full = true
solve_type = 'PJFNK'
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-14
l_tol = 1e-7
[]
[Outputs]
exodus = true
hide = lambda
[]
(test/tests/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/mortar/convergence-studies/gap-conductance/gap-conductance.i)
[Problem]
error_on_jacobian_nonzero_reallocation = true
[]
[Mesh]
second_order = true
[./left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[../]
[./left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary_id = '0 1 2 3'
new_boundary = 'lb_bottom lb_right lb_top lb_left'
[../]
[./left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[../]
[./right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 2
xmax = 3
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
[../]
[./right_block_id]
type = SubdomainIDGenerator
input = right_block
subdomain_id = 2
[../]
[right_block_change_boundary_id]
type = RenameBoundaryGenerator
input = right_block_id
old_boundary_id = '0 1 2 3'
new_boundary_id = '100 101 102 103'
[]
[./combined]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_change_boundary_id'
[../]
[./block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'left_block right_block'
[../]
[right_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = rb_right
block = right_block
normal = '1 0 0'
[]
[right_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_right_sideset
new_boundary = rb_left
block = right_block
normal = '-1 0 0'
[]
[right_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_left_sideset
new_boundary = rb_top
block = right_block
normal = '0 1 0'
[]
[right_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = right_top_sideset
new_boundary = rb_bottom
block = right_block
normal = '0 -1 0'
[]
[secondary]
input = right_bottom_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'lb_right'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'rb_left'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[./T]
block = 'left_block right_block'
order = SECOND
[../]
[./lambda]
block = 'secondary_lower'
family = MONOMIAL
order = CONSTANT
[../]
[]
[BCs]
[./neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln_primal
variable = T
boundary = 'lb_bottom lb_top lb_left rb_bottom rb_right rb_top'
[../]
[]
[Kernels]
[./conduction]
type = Diffusion
variable = T
block = 'left_block right_block'
[../]
[./sink]
type = Reaction
variable = T
block = 'left_block right_block'
[../]
[./forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = 'left_block right_block'
[../]
[]
[Functions]
[./forcing_function]
type = ParsedFunction
expression = ''
[../]
[./exact_soln_primal]
type = ParsedFunction
expression = ''
[../]
[exact_soln_lambda]
type = ParsedFunction
expression = ''
[]
[mms_secondary]
type = ParsedFunction
expression = ''
[]
[mms_primary]
type = ParsedFunction
expression = ''
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[./mortar]
type = GapHeatConductanceTest
primary_boundary = rb_left
secondary_boundary = lb_right
primary_subdomain = primary_lower
secondary_subdomain = secondary_lower
secondary_variable = T
variable = lambda
secondary_gap_conductance = 1
primary_gap_conductance = 1
secondary_mms_function = mms_secondary
primary_mms_function = mms_primary
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
[Postprocessors]
[L2lambda]
type = ElementL2Error
variable = lambda
function = exact_soln_lambda
execute_on = 'timestep_end'
block = 'secondary_lower'
[]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = 'left_block right_block'
[]
[h]
type = AverageElementSize
block = 'left_block right_block'
[]
[]
(test/tests/preconditioners/pbp/pbp_dg_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[../]
[./v]
order = FIRST
family = MONOMIAL
[../]
[]
[Preconditioning]
[./PBP]
type = PBP
solve_order = 'u v'
preconditioner = 'AMG AMG'
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./abs_u]
type = Reaction
variable = u
[../]
[./forcing_u]
type = BodyForce
variable = u
function = forcing_fn
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[./abs_v]
type = Reaction
variable = v
[../]
[./forcing_v]
type = BodyForce
variable = v
function = forcing_fn
[../]
[./conv_v]
type = CoupledForce
variable = v
v = u
[../]
[]
[DGKernels]
[./dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[../]
[./dg_diff_2]
type = DGDiffusion
variable = v
epsilon = -1
sigma = 6
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[../]
[./exact_fn]
type = ParsedGradFunction
value = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[../]
[]
[BCs]
[./all_u]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[./all_v]
type = DGFunctionDiffusionDirichletBC
variable = v
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[]
[Problem]
type = FEProblem
error_on_jacobian_nonzero_reallocation = true
[]
[Executioner]
type = Steady
l_max_its = 10
nl_max_its = 10
solve_type = JFNK
[]
[Outputs]
exodus = true
[]
(modules/richards/test/tests/jacobian_2/jn_fu_01.i)
# two phase
# unsaturated = true
# gravity = false
# supg = false
# transient = false
[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 = RichardsSUPGnone
[../]
[./SUPGgas]
type = RichardsSUPGnone
[../]
[]
[Variables]
[./pwater]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
block = 0
min = -1
max = 0
[../]
[../]
[./pgas]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
block = 0
min = 0
max = 1
[../]
[../]
[./non_Richards]
[../]
[]
[Kernels]
active = 'richardsfwater richardsfgas non_Richards_should_have_0_off_diag'
[./richardstwater]
type = RichardsMassChange
variable = pwater
[../]
[./richardsfwater]
type = RichardsFullyUpwindFlux
variable = pwater
[../]
[./richardstgas]
type = RichardsMassChange
variable = pgas
[../]
[./richardsfgas]
type = RichardsFullyUpwindFlux
variable = pgas
[../]
[./non_Richards_should_have_0_off_diag]
type = BodyForce
variable = non_Richards
function = 0
[../]
[]
[Materials]
[./rock]
type = RichardsMaterial
block = 0
mat_porosity = 0.1
mat_permeability = '1E-5 0 0 0 1E-5 0 0 0 1E-5'
viscosity = '1E-3 0.5E-3'
gravity = '0 0 0'
linear_shape_fcns = true
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -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 = jn01
exodus = false
[]
(test/tests/multiapps/restart/sub2.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 1
nx = 10
[]
[Functions]
[./u_fn]
type = ParsedFunction
expression = t*x
[../]
[./ffn]
type = ParsedFunction
expression = x
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[./fn]
type = BodyForce
variable = u
function = ffn
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = FunctionDirichletBC
variable = u
boundary = right
function = u_fn
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(test/tests/interfacekernels/3d_interface/coupled_value_coupled_flux_with_jump_material.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 2
xmax = 2
ny = 2
ymax = 2
nz = 2
zmax = 2
[]
[./subdomain1]
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 1'
block_id = 1
input = gen
[../]
[./break_boundary]
input = subdomain1
type = BreakBoundaryOnSubdomainGenerator
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[]
[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
[../]
[]
[AuxVariables]
[./jump_var]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[jump_aux]
type = MaterialRealAux
boundary = primary0_interface
property = jump
variable = jump_var
[]
[]
[InterfaceKernels]
[./interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
jump_prop_name = jump
[../]
[]
[Materials]
[./jump]
type = JumpInterfaceMaterial
var = u
neighbor_var = v
boundary = primary0_interface
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 back_to_0 right top front'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1 back_to_1'
[../]
[]
[Postprocessors]
[./u_int]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[../]
[./v_int]
type = ElementIntegralVariablePostprocessor
variable = v
block = 1
[../]
[interface_var_jump]
type = InterfaceAverageVariableValuePostprocessor
interface_value_type = jump_abs
variable = u
neighbor_variable = v
execute_on = TIMESTEP_END
boundary = primary0_interface
[]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
(test/tests/variables/fe_hermite/hermite-3-1d.i)
###########################################################
# This is a simple test demonstrating the use of the
# Hermite variable type.
#
# @Requirement F3.10
###########################################################
[Mesh]
type = GeneratedMesh
dim = 1
xmin = -1
xmax = 1
nx = 5
elem_type = EDGE3
[]
[Functions]
[./bc_fnl]
type = ParsedFunction
expression = -3*x*x
[../]
[./bc_fnr]
type = ParsedFunction
expression = 3*x*x
[../]
[./forcing_fn]
type = ParsedFunction
expression = -6*x+(x*x*x)
[../]
[./solution]
type = ParsedGradFunction
value = x*x*x
grad_x = 3*x*x
[../]
[]
# Hermite Variable type
[Variables]
[./u]
order = THIRD
family = HERMITE
[../]
[]
[Kernels]
active = 'diff forcing reaction'
[./diff]
type = Diffusion
variable = u
[../]
[./reaction]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[BCs]
[./bc_left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = bc_fnl
[../]
[./bc_right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = bc_fnr
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./h]
type = AverageElementSize
[../]
[./L2error]
type = ElementL2Error
variable = u
function = solution
[../]
[./H1error]
type = ElementH1Error
variable = u
function = solution
[../]
[./H1Semierror]
type = ElementH1SemiError
variable = u
function = solution
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/ics/from_exodus_solution/elem_part2.i)
# Use the exodus file for restarting the problem:
# - restart elemental aux variable
[Mesh]
[fmg]
type = FileMeshGenerator
file = elem_part1_out.e
use_for_exodus_restart = true
[]
# This problem uses ExodusII_IO::copy_elemental_solution(), which only
# works with ReplicatedMesh
parallel_type = replicated
[]
[Functions]
[exact_fn]
type = ParsedFunction
expression = ((x*x)+(y*y))
[]
[forcing_fn]
type = ParsedFunction
expression = -4
[]
[]
[AuxVariables]
[e]
order = CONSTANT
family = MONOMIAL
initial_from_file_var = e
initial_from_file_timestep = 6
[]
[]
[AuxKernels]
[ak]
type = ProjectionAux
variable = e
v = e
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = forcing_fn
[]
[]
[BCs]
[all]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(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/postprocessors/avg_nodal_var_value/avg_nodal_var_value_ts_begin.i)
[Mesh]
file = square-2x2-nodeids.e
[]
[Variables]
active = 'u v'
[./u]
order = SECOND
family = LAGRANGE
[../]
[./v]
order = SECOND
family = LAGRANGE
[../]
[]
[Functions]
active = 'force_fn exact_fn left_bc'
[./force_fn]
type = ParsedFunction
expression = '1-x*x+2*t'
[../]
[./exact_fn]
type = ParsedFunction
expression = '(1-x*x)*t'
[../]
[./left_bc]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
active = '
time_u diff_u ffn_u
time_v diff_v'
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'all_u left_v right_v'
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '1'
function = exact_fn
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '2'
value = 0
[../]
[]
[Postprocessors]
[./l2]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[./node1]
type = AverageNodalVariableValue
variable = u
boundary = 10
execute_on = TIMESTEP_BEGIN
[../]
[./node4]
type = AverageNodalVariableValue
variable = v
boundary = 13
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out_avg_nodal_var_value_ts_begin
exodus = true
[]
(modules/level_set/test/tests/verification/1d_level_set_supg_mms/1d_level_set_supg_mms.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 32
nx = 64
[]
[Variables]
[./phi]
[../]
[]
[AuxVariables]
[./velocity]
family = LAGRANGE_VEC
[../]
[]
[ICs]
[./phi_ic]
function = phi_exact
variable = phi
type = FunctionIC
[../]
[./vel_ic]
type = VectorFunctionIC
variable = velocity
function = velocity_func
[]
[]
[Functions]
[./phi_exact]
type = ParsedFunction
expression = 'a*exp(1/(10*t))*sin(2*pi*x/b) + 1'
symbol_names = 'a b'
symbol_values = '1 8'
[../]
[./phi_mms]
type = ParsedFunction
expression = '-a*exp(1/(10*t))*sin(2*pi*x/b)/(10*t^2) + 2*pi*a*exp(1/(10*t))*cos(2*pi*x/b)/b'
symbol_names = 'a b'
symbol_values = '1 8'
[../]
[./velocity_func]
type = ParsedVectorFunction
expression_x = '1'
expression_y = '1'
[../]
[]
[Kernels]
[./time]
type = TimeDerivative
variable = phi
[../]
[./time_supg]
type = LevelSetTimeDerivativeSUPG
variable = phi
velocity = velocity
[../]
[./phi_advection]
type = LevelSetAdvection
variable = phi
velocity = velocity
[../]
[./phi_forcing]
type = BodyForce
variable = phi
function = phi_mms
[../]
[./phi_advection_supg]
type = LevelSetAdvectionSUPG
variable = phi
velocity = velocity
[../]
[./phi_forcing_supg]
type = LevelSetForcingFunctionSUPG
velocity = velocity
variable = phi
function = phi_mms
[../]
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = phi_exact
variable = phi
[../]
[./h]
type = AverageElementSize
[../]
[./point]
type = PointValue
point = '0.1 0 0'
variable = phi
[../]
[]
[Executioner]
type = Transient
start_time = 1
dt = 0.01
end_time = 1.25
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_sub_type'
petsc_options_value = 'asm ilu'
scheme = bdf2
nl_rel_tol = 1e-12
[]
[Outputs]
time_step_interval = 10
execute_on = 'timestep_end'
csv = true
[]
(modules/heat_transfer/test/tests/convective_heat_flux/t_inf.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
[]
[Variables]
[./temp]
initial_condition = 200.0
[../]
[]
[Kernels]
[./heat_dt]
type = TimeDerivative
variable = temp
[../]
[./heat_conduction]
type = HeatConduction
variable = temp
diffusion_coefficient = 1
[../]
[./heat]
type = BodyForce
variable = temp
value = 0
[../]
[]
[BCs]
[./right]
type = ConvectiveHeatFluxBC
variable = temp
boundary = 'right'
T_infinity = 100.0
heat_transfer_coefficient = 1
heat_transfer_coefficient_dT = 0
[../]
[]
[Postprocessors]
[./left_temp]
type = SideAverageValue
variable = temp
boundary = left
execute_on = 'TIMESTEP_END initial'
[../]
[./right_temp]
type = SideAverageValue
variable = temp
boundary = right
[../]
[./right_flux]
type = SideDiffusiveFluxAverage
variable = temp
boundary = right
diffusivity = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1e1
nl_abs_tol = 1e-12
[]
[Outputs]
# csv = true
[]
(test/tests/kernels/forcing_function/forcing_function_error_check.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
uniform_refine = 4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
active = 'forcing_func'
[./forcing_func]
type = ParsedFunction
expression = '"alpha*alpha*pi*pi*sin(alpha*pi*x)"'
symbol_names = 'alpha'
symbol_values = '16'
[../]
[]
[Kernels]
active = 'diff forcing'
[./diff]
type = Diffusion
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_func
[../]
[]
[BCs]
active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
[]
[Outputs]
execute_on = 'timestep_end'
file_base = out
exodus = true
[]
(modules/electromagnetics/test/tests/kernels/scalar_complex_helmholtz/scalar_complex_helmholtz.i)
# problem: -(cu')' - k^2 * u = -F , 0 < x < L, u: R -> C
# u(x=0) = g0 , u(x=L) = gL
# k = a + jb
# a = a(x) = 2 * (1 + x/L)
# b = b(x) = (1 + x/L)
# c = d + jh
# d = d(x) = 12 * (1 + x/L)^2
# h = h(x) = 4 * (1 + x/L)^2
# L = 10
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = 10
nx = 100
[]
[]
[Variables]
[u_real]
order = FIRST
family = LAGRANGE
[]
[u_imag]
order = FIRST
family = LAGRANGE
[]
[]
[Functions]
[k_real]
type = ParsedFunction
expression = '2*(1 + x/10)'
[]
[k_imag]
type = ParsedFunction
expression = '(1 + x/10)'
[]
[d_func]
type = ParsedFunction
expression = '12 * (1 + x/10)^2'
[]
[h_func]
type = ParsedFunction
expression = '4 * (1 + x/10)^2'
[]
[negative_h_func]
type = ParsedFunction
expression = '-4 * (1 + x/10)^2'
[]
[RHS_real]
type = MMSTestFunc
L = 10
g0_real = 1
g0_imag = -1
gL_real = 0
gL_imag = 0
component = real
[]
[RHS_imag]
type = MMSTestFunc
L = 10
g0_real = 1
g0_imag = -1
gL_real = 0
gL_imag = 0
component = imaginary
[]
[]
[Materials]
[k_real_mat]
type = ADGenericFunctionMaterial
prop_names = k_real_mat
prop_values = k_real
[]
[k_imag_mat]
type = ADGenericFunctionMaterial
prop_names = k_imag_mat
prop_values = k_imag
[]
[wave_equation_coefficient]
type = WaveEquationCoefficient
k_real = k_real_mat
k_imag = k_imag_mat
eps_rel_real = 1
eps_rel_imag = 0
mu_rel_real = 1
mu_rel_imag = 0
[]
[negative_wave_equation_coefficient_imaginary]
type = ADParsedMaterial
property_name = negative_wave_equation_coefficient_imaginary
material_property_names = wave_equation_coefficient_imaginary
expression = '-1 * wave_equation_coefficient_imaginary'
[]
[]
[Kernels]
[laplacian_real]
type = FunctionDiffusion
function = d_func
variable = u_real
[]
[coupledLaplacian_real]
type = FunctionDiffusion
function = negative_h_func
v = u_imag
variable = u_real
[]
[coeffField_real]
type = ADMatReaction
reaction_rate = wave_equation_coefficient_real
variable = u_real
[]
[coupledField_real]
type = ADMatCoupledForce
v = u_imag
mat_prop_coef = negative_wave_equation_coefficient_imaginary
variable = u_real
[]
[bodyForce_real]
type = BodyForce
function = RHS_real
variable = u_real
[]
[laplacian_imag]
type = FunctionDiffusion
function = d_func
variable = u_imag
[]
[coupledLaplacian_imag]
type = FunctionDiffusion
function = h_func
v = u_real
variable = u_imag
[]
[coeffField_imag]
type = ADMatReaction
reaction_rate = wave_equation_coefficient_real
variable = u_imag
[]
[coupledField_imag]
type = ADMatCoupledForce
v = u_real
mat_prop_coef = wave_equation_coefficient_imaginary
variable = u_imag
[]
[bodyForce_imag]
type = BodyForce
function = RHS_imag
variable = u_imag
[]
[]
[BCs]
[left_real]
type = DirichletBC
value = 1
boundary = left
variable = u_real
[]
[left_imag]
type = DirichletBC
value = -1
boundary = left
variable = u_imag
[]
[right_real]
type = DirichletBC
value = 0
boundary = right
variable = u_real
[]
[right_imag]
type = DirichletBC
value = 0
boundary = right
variable = u_imag
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(test/tests/mortar/continuity-3d-non-conforming/continuity_sphere_hex.i)
[Mesh]
second_order = false
[file]
type = FileMeshGenerator
file = spheres_hex8.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
new_block_id = 11
new_block_name = "secondary"
sidesets = '101'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
new_block_id = 12
new_block_name = "primary"
sidesets = '102'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[T]
block = '1 2'
[]
[lambda]
block = 'secondary'
[]
[]
[BCs]
[neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln_primal
variable = T
boundary = '1 2'
[]
[]
[Kernels]
[conduction]
type = Diffusion
variable = T
block = '1 2'
[]
[sink]
type = Reaction
variable = T
block = '1 2'
[]
[forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[]
[]
[Functions]
[forcing_function]
type = ParsedFunction
expression = 'x^2 + y^2 + z^2 - 6'
[]
[exact_soln_primal]
type = ParsedFunction
expression = 'x^2 + y^2 + z^2'
[]
[exact_soln_lambda]
type = ParsedFunction
expression = '4'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = EqualValueConstraint
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = '12'
secondary_subdomain = '11'
variable = lambda
secondary_variable = T
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu basic NONZERO 1e-15'
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[L2lambda]
type = ElementL2Error
variable = lambda
function = exact_soln_lambda
execute_on = 'timestep_end'
block = 'secondary'
[]
[L2u]
type = ElementL2Error
variable = T
function = exact_soln_primal
execute_on = 'timestep_end'
block = '1 2'
[]
[h]
type = AverageElementSize
block = '1 2'
[]
[]
(test/tests/outputs/exodus/variable_output_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./aux]
family = SCALAR
[../]
[]
[Functions]
[./force]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = BodyForce
variable = u
function = force
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 4
dt = 1
solve_type = PJFNK
[]
[Adaptivity]
steps = 1
marker = box
max_h_level = 2
[./Markers]
[./box]
bottom_left = '0.3 0.3 0'
inside = refine
top_right = '0.6 0.6 0'
outside = do_nothing
type = BoxMarker
[../]
[../]
[]
[Postprocessors]
[./aux_pp]
type = ScalarVariable
variable = aux
outputs = none
[../]
[]
[Outputs]
execute_on = 'timestep_end'
[./exodus]
type = Exodus
file_base = new_out
hide_variables = 'u box aux_pp'
scalar_as_nodal = true
execute_scalars_on = none
[../]
[./console]
Type = Console
[../]
[]
(modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_ktemp_1D.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
nx = 2
xmax = 2
[]
[split]
type = SubdomainBoundingBoxGenerator
input = mesh
block_id = 1
bottom_left = '1 0 0'
top_right = '2 0 0'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = split
primary_block = 1
paired_block = 0
new_boundary = 'interface0'
[]
uniform_refine = 4
[]
[Variables]
[T]
order = FIRST
family = MONOMIAL
[]
[]
[AuxVariables]
[Tbulk]
order = FIRST
family = LAGRANGE
initial_condition = 300 # K
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = T
diffusivity = conductivity
[]
[source]
type = BodyForce
variable = T
value = 1.0
[]
[]
[DGKernels]
[dg_diff]
type = DGDiffusion
variable = T
epsilon = -1
sigma = 6
diff = conductivity
exclude_boundary = 'interface0'
[]
[]
[InterfaceKernels]
[gap_var]
type = SideSetHeatTransferKernel
variable = T
neighbor_var = T
boundary = 'interface0'
Tbulk_var = Tbulk
[]
[]
[Functions]
# Defining temperature dependent fucntion for conductivity across side set
[kgap]
type = ParsedFunction
expression = 't / 200'
[]
[bc_func]
type = ConstantFunction
value = 300
[]
[exact]
type = ParsedFunction
expression = '
A := if(x < 1, -0.5, -0.25);
B := if(x < 1, -0.293209850655001, 0.0545267662299068);
C := if(x < 1, 300.206790149345, 300.19547323377);
d := -1;
A * (x+d) * (x+d) + B * (x+d) + C'
[]
[]
[BCs]
[bc_left]
type = DGFunctionDiffusionDirichletBC
boundary = 'left'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[bc_right]
type = DGFunctionDiffusionDirichletBC
boundary = 'right'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[]
[Materials]
[k0]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 1.0
block = 0
[]
[k1]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 2.0
block = 1
[]
[gap_mat]
type = SideSetHeatTransferMaterial
boundary = 'interface0'
# Using temperature dependent function for gap conductivity
conductivity_temperature_function = kgap
# Variable to evaluate conductivity with
gap_temperature = Tbulk
gap_length = 1.0
h_primary = 1
h_neighbor = 1
emissivity_primary = 1
emissivity_neighbor = 1
[]
[]
[Postprocessors]
[error]
type = ElementL2Error
variable = T
function = exact
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/stochastic_tools/examples/parameter_study/diffusion_time.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables/T]
initial_condition = 300
[]
[Kernels]
[time]
type = ADTimeDerivative
variable = T
[]
[diff]
type = ADMatDiffusion
variable = T
diffusivity = diffusivity
[]
[source]
type = ADBodyForce
variable = T
value = 100
function = 1
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = T
boundary = left
value = 300
[]
[right]
type = ADNeumannBC
variable = T
boundary = right
value = -100
[]
[]
[Materials/constant]
type = ADGenericConstantMaterial
prop_names = 'diffusivity'
prop_values = 1
[]
[Executioner]
type = Transient
num_steps = 4
dt = 0.25
[]
[Postprocessors]
[T_avg]
type = ElementAverageValue
variable = T
execute_on = 'initial timestep_end'
[]
[q_left]
type = ADSideDiffusiveFluxAverage
variable = T
boundary = left
diffusivity = diffusivity
execute_on = 'initial timestep_end'
[]
[]
[VectorPostprocessors]
[T_vec]
type = LineValueSampler
variable = T
start_point = '0 0.5 0'
end_point = '1 0.5 0'
num_points = 11
sort_by = x
execute_on = 'initial timestep_end'
[]
[]
[Controls/stochastic]
type = SamplerReceiver
[]
[Outputs]
[]
(test/tests/restart/restart_diffusion/exodus_refined_restart_2_test.i)
[Mesh]
file = exodus_refined_restart_1.e
# Restart relies on the ExodusII_IO::copy_nodal_solution()
# functionality, which only works with ReplicatedMesh.
parallel_type = replicated
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
initial_from_file_var = u
initial_from_file_timestep = 2
[../]
[]
[Kernels]
active = 'bodyforce ie'
[./bodyforce]
type = BodyForce
variable = u
value = 10.0
[../]
[./ie]
type = TimeDerivative
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 = Transient
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 10
dt = .1
[]
[Outputs]
file_base = exodus_refined_restart_2
exodus = true
[]
(test/tests/misc/check_error/subdomain_restricted_kernel_mismatch.i)
[Mesh]
file = rectangle.e
[]
[Variables]
active = 'u v'
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[Kernels]
active = 'diff body_force'
[./diff]
type = Diffusion
variable = u
[../]
[./body_force]
type = BodyForce
variable = v
block = 2
value = 10
[../]
[]
[BCs]
active = 'right'
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
# petsc_options = '-snes_mf_operator'
# petsc_options_iname = '-pc_type -pc_hypre_type'
# petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
file_base = out
[]
(test/tests/indicators/laplacian_jump_indicator/biharmonic.i)
[GlobalParams]
# Parameters used by Functions.
vars = 'c'
vals = '50'
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
nx = 10
ny = 10
[]
[Variables]
[./u]
order = THIRD
family = HERMITE
[../]
[]
[Kernels]
[./biharmonic]
type = Biharmonic
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
function = forcing_func
[../]
[]
[BCs]
active = 'all_value all_flux'
[./all_value]
type = FunctionPenaltyDirichletBC
variable = u
boundary = 'left right top bottom'
function = u_func
penalty = 1e10
[../]
[./all_flux]
type = FunctionPenaltyFluxBC
variable = u
boundary = 'left right top bottom'
function = u_func
penalty = 1e10
[../]
[./all_laplacian]
type = BiharmonicLapBC
variable = u
boundary = 'left right top bottom'
laplacian_function = lapu_func
[../]
[]
[Adaptivity]
[Indicators]
[error]
type = LaplacianJumpIndicator
variable = u
scale_by_flux_faces = true
[]
[]
[]
[Executioner]
type = Steady
# Note: the unusually tight tolerances here are due to the penalty
# BCs (currently the only way of accurately Dirichlet boundary
# conditions on Hermite elements in MOOSE).
nl_rel_tol = 1.e-15
l_tol = 1.e-15
# We have exact Jacobians
solve_type = 'NEWTON'
# Use 6x6 quadrature to ensure the forcing function is integrated
# accurately.
[./Quadrature]
type = GAUSS
order = ELEVENTH
[../]
[]
[Functions]
[./u_func]
type = ParsedGradFunction
value = 'exp(-c*(x^2+y^2))'
grad_x = '-2*c*exp(-c*(x^2+y^2))*x'
grad_y = '-2*c*exp(-c*(x^2+y^2))*y'
[../]
[./lapu_func]
type = ParsedFunction
expression = '4*c*(c*(x^2+y^2) - 1)*exp(-c*(x^2+y^2))'
[../]
[./forcing_func]
type = ParsedFunction
expression = '16*c^2*(c^2*(x^2+y^2)^2 - 4*c*(x^2+y^2) + 2)*exp(-c*(x^2+y^2))'
[../]
[]
[Postprocessors]
[./l2_error]
type = ElementL2Error
variable = u
function = u_func
[../]
[./h1_error]
type = ElementH1Error
variable = u
function = u_func
[../]
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/poro_elasticity/pp_generation_unconfined_constM_action.i)
# This file uses a PorousFlowFullySaturated Action. The equivalent non-Action input file is pp_generation_unconfined_constM.i
#
# A sample is constrained on all sides, except its top
# and its boundaries are
# also impermeable. Fluid is pumped into the sample via a
# volumetric source (ie kg/second per cubic meter), and the
# rise in the top surface, porepressure, and stress are observed.
#
# In the standard poromechanics scenario, the Biot Modulus is held
# fixed and the source, s, has units m^3/second/m^3. Then the expected result
# is
# strain_zz = disp_z = BiotCoefficient*BiotModulus*s*t/((bulk + 4*shear/3) + BiotCoefficient^2*BiotModulus)
# porepressure = BiotModulus*(s*t - BiotCoefficient*strain_zz)
# stress_xx = (bulk - 2*shear/3)*strain_zz (remember this is effective stress)
# stress_zz = (bulk + 4*shear/3)*strain_zz (remember this is effective stress)
#
# In porous_flow, however, the source has units kg/second/m^3. The ratios remain
# fixed:
# stress_xx/strain_zz = (bulk - 2*shear/3) = 1 (for the parameters used here)
# stress_zz/strain_zz = (bulk + 4*shear/3) = 4 (for the parameters used here)
# porepressure/strain_zz = 13.3333333 (for the parameters used here)
#
# Expect
# disp_z = 0.3*10*s*t/((2 + 4*1.5/3) + 0.3^2*10) = 0.612245*s*t
# porepressure = 10*(s*t - 0.3*0.612245*s*t) = 8.163265*s*t
# stress_xx = (2 - 2*1.5/3)*0.612245*s*t = 0.612245*s*t
# stress_zz = (2 + 4*shear/3)*0.612245*s*t = 2.44898*s*t
# The relationship between the constant poroelastic source
# s (m^3/second/m^3) and the PorousFlow source, S (kg/second/m^3) is
# S = fluid_density * s = s * exp(porepressure/fluid_bulk)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[]
[BCs]
[confinex]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'left right'
[]
[confiney]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top'
[]
[confinez]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'back'
[]
[]
[PorousFlowFullySaturated]
porepressure = porepressure
biot_coefficient = 0.3
coupling_type = HydroMechanical
displacements = 'disp_x disp_y disp_z'
gravity = '0 0 0'
fp = simple_fluid
stabilization = Full
[]
[Kernels]
[source]
type = BodyForce
function = '0.1*exp(8.163265306*0.1*t/3.3333333333)'
variable = porepressure
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 3.3333333333
density0 = 1
thermal_expansion = 0
viscosity = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1.5'
# bulk modulus is lambda + 2*mu/3 = 1 + 2*1.5/3 = 2
fill_method = symmetric_isotropic
[]
[strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
[]
[stress]
type = ComputeLinearElasticStress
[]
[porosity]
type = PorousFlowPorosityHMBiotModulus
porosity_zero = 0.1
biot_coefficient = 0.3
solid_bulk = 2
constant_fluid_bulk_modulus = 3.3333333333
constant_biot_modulus = 10.0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1 0 0 0 1 0 0 0 1' # unimportant
[]
[]
[Postprocessors]
[p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
[]
[zdisp]
type = PointValue
outputs = csv
point = '0 0 0.5'
variable = disp_z
[]
[stress_xx]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_xx
[]
[stress_yy]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_yy
[]
[stress_zz]
type = PointValue
outputs = csv
point = '0 0 0'
variable = stress_zz
[]
[]
[Functions]
[stress_xx_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'stress_xx zdisp'
[]
[stress_zz_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'stress_zz zdisp'
[]
[p_over_strain_fcn]
type = ParsedFunction
expression = a/b
symbol_names = 'a b'
symbol_values = 'p0 zdisp'
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-14 1E-10 10000'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = 0
end_time = 10
dt = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = pp_generation_unconfined_constM_action
[csv]
type = CSV
[]
[]
(framework/include/kernels/UserForcingFunction.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 "BodyForce.h"
/**
* Deprecated, use BodyForce.
*/
class UserForcingFunction : public BodyForce
{
public:
static InputParameters validParams();
UserForcingFunction(const InputParameters & parameters);
protected:
Real f();
};
(modules/heat_transfer/include/kernels/HeatSource.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 "BodyForce.h"
// Forward Declarations
class HeatSource : public BodyForce
{
public:
static InputParameters validParams();
HeatSource(const InputParameters & parameters);
};