- vThe coupled variable which provides the force
C++ Type:std::vector<VariableName>
Controllable:No
Description:The coupled variable which provides the force
- 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
CoupledForce / ADCoupledForce
Description
CoupledForce
(and the AD version, ADCoupledForce
) implements a source term within the domain proportional to a coupled variable: where is a known scalar coefficient, is a coupled unknown value, and the second term on the left hand side corresponds to the strong forms of other kernels. In a species transport context, the value can be regarded as a reaction rate coefficient.
The weak form, in inner-product notation, is defined as
where are the test functions and is the finite element solution of the weak formulation.
The corresponding Jacobian (used in CoupledForce
) is
Example Syntax
The kernel block below shows a variable that is diffusing and being produced at a rate proportional to the concentration of a variable which is also diffusing.
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./coupled_force_u]
type = CoupledForce
variable = u
v = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
(test/tests/bcs/coupled_dirichlet_bc/coupled_dirichlet_bc.i)In this example the input parameter "coef" that corresponds to is omitted. In this case the "coef" value defaults to one.
The coupled variable "v" cannot be equal to the equation "variable" with this kernel. Use the CoefReaction kernel for this purpose.
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
- coef1Coefficent ($\sigma$) multiplier for the coupled force term.
Default:1
C++ Type:double
Controllable:No
Description:Coefficent ($\sigma$) multiplier for the coupled force term.
- displacementsThe displacements
C++ Type:std::vector<VariableName>
Controllable:No
Description:The displacements
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Default:False
C++ Type:bool
Controllable:No
Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Optional Parameters
- 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
- (tutorials/tutorial02_multiapps/step03_coupling/02_sub_picard.i)
- (test/tests/functions/parsed/mms_transient_coupled.i)
- (test/tests/multiapps/picard/pseudo_transient_picard_sub.i)
- (test/tests/multiapps/relaxation/sub_relaxed_parent.i)
- (modules/functional_expansion_tools/test/tests/errors/multiapp_missing_local_object.i)
- (test/tests/multiapps/picard_multilevel/picard_parent.i)
- (test/tests/transfers/coord_transform/both-transformed/mesh-function/main-app.i)
- (test/tests/multiapps/secant/transient_sub.i)
- (test/tests/preconditioners/pbp/pbp_dg_test.i)
- (test/tests/executioners/solve_type_linear/linear_with_full_smp.i)
- (test/tests/misc/check_error/coupling_nonexistent_field.i)
- (test/tests/multiapps/picard/pseudo_transient_picard_parent.i)
- (test/tests/auxkernels/element_aux_var/element_high_order_aux_test.i)
- (test/tests/kernels/hfem/3d-lower-d-volumes.i)
- (test/tests/multiapps/picard_multilevel/multilevel_dt_rejection/picard_sub.i)
- (test/tests/multiapps/picard/picard_custom_postprocessor.i)
- (modules/navier_stokes/test/tests/finite_element/ins/bcs/advection_bc/2d_advection_bc.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/2d_mbb_pde.i)
- (modules/functional_expansion_tools/examples/2D_volumetric_Cartesian/main.i)
- (test/tests/multiapps/picard/picard_parent.i)
- (modules/combined/test/tests/restart-transient-from-ss-with-stateful/parent_ss.i)
- (modules/functional_expansion_tools/test/tests/standard_use/volume_coupling_custom_norm.i)
- (modules/optimization/test/tests/executioners/transient_and_adjoint/multi_variable.i)
- (test/tests/transfers/general_field/user_object/coord_transform/main-app.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_balance/large_gap_heat_transfer_test_cylinder.i)
- (test/tests/misc/multiple-nl-systems/fully-coupled.i)
- (test/tests/multiapps/steffensen/steady_main.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_3D_mortar.i)
- (modules/functional_expansion_tools/test/tests/errors/multiapp_bad_user_object.i)
- (test/tests/problems/reference_residual_problem/abs_ref_acceptable.i)
- (test/tests/preconditioners/smp/smp_group_test.i)
- (test/tests/preconditioners/fdp/fdp_test.i)
- (test/tests/multiapps/steffensen/steady_sub.i)
- (test/tests/transfers/coord_transform/both-transformed/user_object/main-app.i)
- (test/tests/fvkernels/fv_coupled_var/coupled.i)
- (modules/phase_field/test/tests/KKS_system/nonlinear.i)
- (test/tests/restart/restart_transient_from_transient/restart_trans_with_2subs_sub.i)
- (python/peacock/tests/input_tab/InputFileEditor/gold/fsp_test.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_sphere3D_mortar.i)
- (test/tests/outputs/console/multiapp/picard_parent_both.i)
- (test/tests/restart/restart_transient_from_transient/pseudo_trans_with_2subs_sub.i)
- (modules/functional_expansion_tools/test/tests/errors/multiapp_missing_sub_object.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_balance/large_gap_heat_transfer_test_rz_cylinder.i)
- (test/tests/multiapps/picard_multilevel/picard_sub.i)
- (test/tests/executioners/eigen_executioners/ne_deficient_b.i)
- (test/tests/multiapps/picard_failure/picard_sub.i)
- (modules/combined/examples/optimization/helmholtz_multimat_nostrip.i)
- (test/tests/auxkernels/element_aux_var/l2_element_aux_var_test.i)
- (test/tests/problems/eigen_problem/eigensolvers/ne_coupled_picard_subT.i)
- (test/tests/multiapps/relaxation/sub_relaxed_sub.i)
- (modules/combined/examples/optimization/helmholtz_multimat_strip.i)
- (test/tests/transfers/coord_transform/transform-main-main-app.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_sphere3D.i)
- (test/tests/misc/multiple-nl-systems/ad-test.i)
- (test/tests/executioners/eigen_executioners/ne_coupled.i)
- (test/tests/multiapps/picard/picard_adaptive_parent.i)
- (test/tests/auxkernels/nodal_aux_var/nodal_aux_init_test.i)
- (test/tests/problems/eigen_problem/eigensolvers/ne-coupled-scaling.i)
- (tutorials/tutorial02_multiapps/step03_coupling/03_sub_subcycling_picard.i)
- (test/tests/problems/eigen_problem/eigensolvers/ne_coupled_scaled.i)
- (test/tests/multiapps/secant/steady_sub.i)
- (test/tests/preconditioners/smp/smp_single_test.i)
- (test/tests/multiapps/steffensen/transient_main.i)
- (examples/ex11_prec/default.i)
- (test/tests/multiapps/picard/picard_abs_tol_parent.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere.i)
- (test/tests/multiapps/picard/steady_custom_picard_parent.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_cylindrical_subapp_mesh_refine/main.i)
- (modules/combined/test/tests/optimization/optimization_density_update/top_opt_2d_pde_filter.i)
- (examples/ex12_pbp/ex12.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_cylindrical/main.i)
- (test/tests/outputs/debug/show_functors.i)
- (test/tests/multiapps/picard_multilevel/2level_picard/sub_level1.i)
- (test/tests/multiapps/relaxation/picard_relaxed_sub.i)
- (test/tests/multiapps/steffensen/transient_sub.i)
- (test/tests/auxkernels/nodal_aux_var/nodal_aux_var_test.i)
- (test/tests/preconditioners/fsp/fsp_test.i)
- (test/tests/multiapps/picard/picard_rel_tol_parent.i)
- (test/tests/misc/check_error/multi_precond_test.i)
- (test/tests/problems/eigen_problem/eigensolvers/ne_coupled.i)
- (test/tests/multiapps/picard_multilevel/fullsolve_multilevel/parent.i)
- (test/tests/problems/eigen_problem/eigensolvers/ne_deficient_b.i)
- (modules/combined/examples/optimization/2d_mbb_pde_amr.i)
- (test/tests/multiapps/picard_multilevel/multilevel_dt_rejection/parent.i)
- (examples/ex11_prec/smp.i)
- (test/tests/transfers/coord_transform/both-transformed/projection/main-app.i)
- (test/tests/transfers/multiapp_conservative_transfer/sub_conservative_transfer.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder_mortar_error.i)
- (test/tests/transfers/coord_transform/rz-xyz/2d-rz.i)
- (test/tests/multiapps/secant/steady_main.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_rz_cylinder.i)
- (test/tests/restart/restart_transient_from_steady/steady_with_2subs_sub.i)
- (test/tests/multiapps/picard/steady_picard_sub.i)
- (test/tests/transfers/multiapp_postprocessor_interpolation_transfer/multilevel_sub.i)
- (modules/functional_expansion_tools/test/tests/errors/multiapp_incompatible_orders.i)
- (modules/scalar_transport/test/tests/ncp-lms/interpolated-ncp-lm-nodal-enforcement.i)
- (modules/functional_expansion_tools/test/tests/standard_use/volume_coupled.i)
- (test/tests/restart/restart_transient_from_steady/restart_trans_with_2subs_sub.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_rz_cylinder_mortar.i)
- (modules/porous_flow/examples/multiapp_fracture_flow/diffusion_multiapp/matrix_app_heat.i)
- (test/tests/preconditioners/pbp/pbp_test_options.i)
- (test/tests/problems/eigen_problem/eigensolvers/ne_coupled_picard_sub.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder_mortar.i)
- (test/tests/problems/reference_residual_problem/ad_abs_ref.i)
- (test/tests/mortar/continuity-2d-conforming/conforming_two_var.i)
- (test/tests/preconditioners/pbp/pbp_adapt_test.i)
- (test/tests/multiapps/picard/picard_adaptive_sub.i)
- (test/tests/transfers/coord_transform/main-app.i)
- (test/tests/multiapps/picard_sub_cycling/fully_coupled.i)
- (test/tests/multiapps/picard_failure/picard_parent.i)
- (test/tests/restart/restart_transient_from_steady/steady_with_sub_sub.i)
- (test/tests/multiapps/picard_multilevel/2level_picard/sub_level2.i)
- (test/tests/bcs/coupled_dirichlet_bc/coupled_dirichlet_bc.i)
- (test/tests/problems/reference_residual_problem/no_ref.i)
- (test/tests/outputs/variables/output_vars_hidden_shown_check.i)
- (test/tests/auxkernels/element_aux_var/element_aux_var_test.i)
- (test/tests/userobjects/side_user_object_no_boundary_error/lower_d_side_boundary.i)
- (test/tests/quadrature/qweights/positive_qweights.i)
- (test/tests/multiapps/picard_sub_cycling/picard_parent.i)
- (modules/functional_expansion_tools/test/tests/errors/multiapp_bad_function_series.i)
- (modules/external_petsc_solver/test/tests/external_petsc_problem/moose_as_sub.i)
- (test/tests/transfers/coord_transform/both-transformed/pp_interpolation/main-app.i)
- (test/tests/preconditioners/fsp/unside-by-var.i)
- (test/tests/transfers/multiapp_high_order_variable_transfer/sub_L2_Lagrange_conservative.i)
- (test/tests/multiapps/picard_sub_cycling/picard_sub.i)
- (test/tests/multiapps/picard/steady_picard_parent.i)
- (test/tests/multiapps/picard_multilevel/fullsolve_multilevel/sub_level1.i)
- (modules/combined/examples/optimization/2d_mbb_pde.i)
- (test/tests/multiapps/picard/fully_coupled.i)
- (test/tests/kernels/hfem/lower-d-volumes.i)
- (test/tests/multiapps/picard_multilevel/fullsolve_multilevel/sub_level2.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_Cartesian_different_submesh/main.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/3d_mbb.i)
- (modules/functional_expansion_tools/test/tests/standard_use/multiapp_print_coefficients.i)
- (test/tests/misc/check_error/coupling_scalar_into_field.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder.i)
- (test/tests/multiapps/picard_catch_up/sub.i)
- (modules/navier_stokes/test/tests/finite_element/ins/bcs/advection_bc/advection_bc.i)
- (test/tests/kernels/array_kernels/standard_save_in.i)
- (test/tests/kernels/ad_coupled_force/fe_test.i)
- (test/tests/problems/reference_residual_problem/abs_ref.i)
- (test/tests/outputs/console/multiapp/picard_sub.i)
- (test/tests/transfers/coord_transform/both-transformed/nearest-node/main-app.i)
- (modules/combined/test/tests/optimization/optimization_density_update/top_opt_3d_pde_filter.i)
- (test/tests/restart/restart_transient_from_steady/restart_trans_with_sub_sub.i)
- (test/tests/outputs/console/multiapp/picard_parent.i)
- (test/tests/preconditioners/pbp/pbp_test.i)
- (modules/optimization/test/tests/executioners/steady_and_adjoint/multi_variable.i)
- (tutorials/tutorial02_multiapps/step03_coupling/01_sub.i)
- (test/tests/multiapps/relaxation/picard_sub.i)
- (test/tests/multiapps/picard_catch_up/sub_failing_problem.i)
- (test/tests/executioners/nullspace/singular_contaminated.i)
- (python/peacock/tests/common/fsp_test.i)
- (examples/ex11_prec/fdp.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/2d_mbb_pde_amr.i)
- (test/tests/multiapps/relaxation/picard_relaxed_parent.i)
- (modules/functional_expansion_tools/examples/1D_volumetric_Cartesian/main.i)
- (modules/external_petsc_solver/test/tests/external_petsc_problem/moose_as_parent.i)
- (test/tests/multiapps/picard/picard_sub.i)
- (test/tests/preconditioners/smp/smp_single_adapt_test.i)
- (test/tests/transfers/coord_transform/both-transformed/copy/main-app.i)
- (test/tests/multiapps/picard_catch_up/parent.i)
- (modules/fsi/test/tests/2d-finite-strain-steady/thermal-me.i)
- (test/tests/misc/check_error/coupling_itself.i)
- (test/tests/kernels/hfem/dirichlet.i)
- (test/tests/multiapps/secant/transient_main.i)
- (test/tests/fvkernels/block-restriction/fv-and-fe-block-restriction.i)
- (test/tests/multiapps/picard_failure/picard_sub_no_fail.i)
- (test/tests/kernels/ad_coupled_force/aux_test.i)
- (test/tests/transfers/multiapp_high_order_variable_transfer/sub_L2_Lagrange.i)
- (test/tests/multiapps/picard_multilevel/2level_picard/mutilevel_app.i)
- (python/peacock/tests/input_tab/InputTree/gold/fsp_test.i)
- (modules/external_petsc_solver/test/tests/partition/moose_as_parent.i)
- (test/tests/preconditioners/fsp/fsp_test_image.i)
- (test/tests/transfers/coord_transform/both-transformed/interpolation/main-app.i)
- (test/tests/outputs/variables/output_vars_test.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere_mortar_error.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere_mortar.i)
- (test/tests/auxkernels/nodal_aux_var/nodal_aux_ts_test.i)
- (test/tests/problems/eigen_problem/eigensolvers/ne-coupled-resid-scaling.i)
- (modules/combined/examples/optimization/3d_mbb.i)
- (test/tests/executioners/nullspace/singular.i)
- (test/tests/preconditioners/fsp/nested-split.i)
- (test/tests/misc/multiple-nl-systems/test.i)
- (test/tests/multiapps/relaxation/picard_parent.i)
- (modules/combined/test/tests/restart-transient-from-ss-with-stateful/parent_tr.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_3D.i)
- (test/tests/multiapps/relaxation/bad_relax_factor_parent.i)
- (test/tests/transfers/coord_transform/single-app.i)
- (test/tests/problems/eigen_problem/jfnk_mo/ne_coupled_mo.i)
- (test/tests/outputs/variables/output_vars_nonexistent.i)
- (modules/functional_expansion_tools/test/tests/standard_use/multiapp_different_physical_boundaries.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_Cartesian/main.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_balance/large_gap_heat_transfer_test_sphere.i)
- (test/tests/fvkernels/fv-to-fe-coupling/1d.i)
Child Objects
(test/tests/bcs/coupled_dirichlet_bc/coupled_dirichlet_bc.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./coupled_force_u]
type = CoupledForce
variable = u
v = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
# BCs on left
# u: u=1
# v: v=2
[./left_u]
type = DirichletBC
variable = u
boundary = 3
value = 1
[../]
[./left_v]
type = DirichletBC
variable = v
boundary = 3
value = 2
[../]
# BCs on right
# u: c*u + u^2 + v^2 = 9
# v: no flux
[./right_u]
type = CoupledDirichletBC
variable = u
boundary = 1
value = 9
v=v
[../]
[]
[Preconditioning]
[./precond]
type = SMP
# 'full = true' is required for computeOffDiagJacobian() to get
# called. If you comment this out, you should see that this test
# requires a different number of linear and nonlinear iterations.
full = true
[../]
[]
[Executioner]
type = Steady
# solve_type = 'PJFNK'
solve_type = 'NEWTON'
# Uncomment next line to disable line search. With line search enabled, you must use full=true with Newton or else it will fail.
# line_search = 'none'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_rel_tol = 1e-10
l_tol = 1e-12
nl_max_its = 10
[]
[Outputs]
file_base = out
exodus = true
[]
v
C++ Type:std::vector<VariableName>
Controllable:No
Description:The coupled variable which provides the force
variable
C++ Type:NonlinearVariableName
Controllable:No
Description:The name of the variable that this residual object operates on
(tutorials/tutorial02_multiapps/step03_coupling/02_sub_picard.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[ut]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = v
[]
[force]
type = CoupledForce
variable = v
v = ut
coef = 100
[]
[td]
type = TimeDerivative
variable = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = v
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 0.2
nl_abs_tol = 1e-10
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[average_v]
type = ElementAverageValue
variable = v
[]
[]
(test/tests/functions/parsed/mms_transient_coupled.i)
###########################################################
# This is a simple test of the Function System. This
# test uses forcing terms produced from analytical
# functions of space and time to verify a solution
# using MMS.
#
# @Requirement F6.20
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0.0
xmax = 1.0
nx = 10
ymin = 0.0
ymax = 1.0
ny = 10
uniform_refine = 2
elem_type = QUAD4
[]
[Variables]
[./u]
[../]
[./v]
[../]
[]
[Functions]
[./v_left_bc]
# Left-side boundary condition for v equation, v(0,y,t) = u(0.5,y,t). This is accomplished using a PointValue postprocessor, which is what this input file was designed to test.
type = ParsedFunction
expression = a
symbol_values = u_midpoint
symbol_names = a
[../]
[./u_mms_func]
# MMS Forcing function for the u equation.
type = ParsedFunction
expression = ' 20*exp(20*t)*x*x*x-6*exp(20*t)*x-(2-0.125*exp(20*t))*sin(5/2*x*pi)-0.125*exp(20*t)-1
'
[../]
[./v_mms_func]
# MMS forcing function for the v equation.
type = ParsedFunction
expression = -2.5*exp(20*t)*sin(5/2*x*pi)+2.5*exp(20*t)+25/4*(2-0.125*exp(20*t))*sin(5/2*x*pi)*pi*pi
[../]
[./u_right_bc]
type = ParsedFunction
expression = 3*exp(20*t) # \nabla{u}|_{x=1} = 3\exp(20*t)
[../]
[./u_exact]
# Exact solution for the MMS function for the u variable.
type = ParsedFunction
expression = exp(20*t)*pow(x,3)+1
[../]
[./v_exact]
# Exact MMS solution for v.
type = ParsedFunction
expression = (2-0.125*exp(20*t))*sin(5/2*pi*x)+0.125*exp(20*t)+1
[../]
[]
[Kernels]
# Strong Form:
# \frac{\partial u}{\partial t} - \nabla \cdot 0.5 \nabla u - v = 0
# \frac{\partial u}{\partial t} - \nabla \cdot \nabla v = 0
#
# BCs:
# u(0,y,t) = 1
# \nabla u |_{x=1} = 3\exp(20*t)
# v(0,y,t) = u(0.5,y,t)
# v(1,y,t) = 3
# \nabla u |_{y=0,1} = 0
# \nabla v |_{y=0,1} = 0
#
[./u_time]
type = TimeDerivative
variable = u
[../]
[./u_diff]
type = Diffusion
variable = u
[../]
[./u_source]
type = CoupledForce
variable = u
v = v
[../]
[./v_diff]
type = Diffusion
variable = v
[../]
[./u_mms]
type = BodyForce
variable = u
function = u_mms_func
[../]
[./v_mms]
type = BodyForce
variable = v
function = v_mms_func
[../]
[./v_time]
type = TimeDerivative
variable = v
[../]
[]
[BCs]
[./u_left]
type = DirichletBC
variable = u
boundary = left # x=0
value = 1 # u(0,y,t)=1
[../]
[./u_right]
type = FunctionNeumannBC
variable = u
boundary = right # x=1
function = u_right_bc # \nabla{u}|_{x=1}=3\exp(20t)
[../]
[./v_left]
type = FunctionDirichletBC
variable = v
boundary = left # x=0
function = v_left_bc # v(0,y,t) = u(0.5,y,t)
[../]
[./v_right]
type = DirichletBC
variable = v
boundary = right # x=1
value = 3 # v(1,y,t) = 3
[../]
[]
[Postprocessors]
[./u_midpoint]
type = PointValue
variable = u
point = '0.5 0.5 0'
execute_on = 'initial timestep_end'
[../]
[./u_midpoint_exact]
type = FunctionValuePostprocessor
function = u_exact
point = '0.5 0.5 0.0'
execute_on = 'initial timestep_end'
[../]
[./u_error]
type = ElementL2Error
variable = u
function = u_exact
execute_on = 'initial timestep_end'
[../]
[./v_error]
type = ElementL2Error
variable = v
function = v_exact
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
dt = 0.01
solve_type = NEWTON
end_time = 0.1
scheme = crank-nicolson
[]
[Outputs]
exodus = true
[]
[ICs]
[./u_initial]
# Use the MMS exact solution to compute the initial conditions.
function = u_exact
variable = u
type = FunctionIC
[../]
[./v_exact]
# Use the MMS exact solution to compute the initial condition.
function = v_exact
variable = v
type = FunctionIC
[../]
[]
(test/tests/multiapps/picard/pseudo_transient_picard_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./v]
[../]
[]
[AuxVariables]
[./u]
[../]
[]
[Kernels]
[./time]
type = CoefTimeDerivative
variable = v
Coefficient = 0.1
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[./force_v]
type = CoupledForce
variable = v
v = u
[../]
[]
[BCs]
[./left_v]
type = DirichletBC
variable = v
boundary = left
value = 1
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[../]
[]
[Postprocessors]
[./vnorm]
type = ElementL2Norm
variable = v
[../]
[]
[Executioner]
type = Transient
end_time = 10
nl_abs_tol = 1e-12
steady_state_detection = true
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/relaxation/sub_relaxed_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
initial_condition = 1
[]
[inverse_v]
initial_condition = 1
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = inverse_v
[]
[]
[AuxKernels]
[invert_v]
type = QuotientAux
variable = inverse_v
denominator = v
numerator = 20.0
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[Neumann_right]
type = NeumannBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
num_steps = 4
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_abs_tol = 1e-14
[]
[Outputs]
exodus = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_begin
positions = '0 0 0'
input_files = sub_relaxed_sub.i
transformed_variables = v
relaxation_factor = 0.94
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(modules/functional_expansion_tools/test/tests/errors/multiapp_missing_local_object.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = multiapp_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(test/tests/multiapps/picard_multilevel/picard_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[coupled_force]
type = CoupledForce
variable = u
v = v
[]
[time]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 1
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]
[sub1]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = picard_sub.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[v]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub1
source_variable = v
variable = v
[]
[]
(test/tests/transfers/coord_transform/both-transformed/mesh-function/main-app.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = -1
ymax = 0
nx = 10
ny = 10
alpha_rotation = 90
[]
[Variables]
[u][]
[]
[AuxVariables]
[v][]
[v_elem]
order = CONSTANT
family = MONOMIAL
[]
[w][]
[w_elem]
order = CONSTANT
family = MONOMIAL
[]
[]
[ICs]
[w]
type = FunctionIC
function = 'cos(x)*sin(y)'
variable = w
[]
[w_elem]
type = FunctionIC
function = 'cos(x)*sin(y)'
variable = w_elem
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
verbose = true
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = 'sub-app.i'
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[from_sub]
type = MultiAppShapeEvaluationTransfer
from_multi_app = sub
source_variable = v
variable = v
execute_on = 'timestep_begin'
error_on_miss = true
# extend the bounding box slightly since a transformed node
# may miss the bounding box by machine precision
bbox_factor = 1.1
[]
[from_sub_elem]
type = MultiAppShapeEvaluationTransfer
from_multi_app = sub
source_variable = v_elem
variable = v_elem
execute_on = 'timestep_begin'
error_on_miss = true
[]
[to_sub]
type = MultiAppShapeEvaluationTransfer
to_multi_app = sub
source_variable = w
variable = w
execute_on = 'timestep_begin'
error_on_miss = true
# extend the bounding box slightly since a transformed node
# may miss the bounding box by machine precision
bbox_factor = 1.1
[]
[to_sub_elem]
type = MultiAppShapeEvaluationTransfer
to_multi_app = sub
source_variable = w_elem
variable = w_elem
execute_on = 'timestep_begin'
error_on_miss = true
[]
[]
(test/tests/multiapps/secant/transient_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[u]
[]
[]
[Kernels]
[time]
type = CoefTimeDerivative
variable = v
Coefficient = 0.1
[]
[diff_v]
type = Diffusion
variable = v
[]
[force_v]
type = CoupledForce
variable = v
v = u
[]
[]
[BCs]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 1
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Postprocessors]
[vnorm]
type = ElementL2Norm
variable = v
[]
[]
[Executioner]
type = Transient
end_time = 10
nl_abs_tol = 1e-12
steady_state_detection = true
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_algorithm = 'secant'
[]
[Outputs]
[csv]
type = CSV
start_step = 6
[]
exodus = false
[]
(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
[]
(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/misc/check_error/coupling_nonexistent_field.i)
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./coupled]
type = CoupledForce
variable = u
# 'a' does not exist -> error
v = a
[../]
[]
[Executioner]
type = Steady
[]
(test/tests/multiapps/picard/pseudo_transient_picard_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[unorm]
type = ElementL2Norm
variable = u
execute_on = 'initial timestep_end'
[]
[vnorm]
type = ElementL2Norm
variable = v
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
fixed_point_rel_tol = 1e-6
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
input_files = pseudo_transient_picard_sub.i
no_backup_and_restore = true
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(test/tests/auxkernels/element_aux_var/element_high_order_aux_test.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./high_order]
order = NINTH
family = MONOMIAL
[../]
[./one]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
# Coupling of nonlinear to Aux
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = CoupledForce
variable = u
v = one
[../]
[]
[AuxKernels]
[./coupled_high_order]
variable = high_order
type = CoupledAux
value = 2
operator = +
coupled = u
execute_on = 'initial timestep_end'
[../]
[./constant]
variable = one
type = ConstantAux
value = 1
execute_on = 'initial timestep_end'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Postprocessors]
[./int2_u]
type = ElementL2Norm
variable = u
execute_on = 'initial timestep_end'
[../]
[./int2_ho]
type = ElementL2Norm
variable = high_order
execute_on = 'initial timestep_end'
[../]
[./int_u]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = 'initial timestep_end'
[../]
[./int_ho]
type = ElementIntegralVariablePostprocessor
variable = high_order
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
[./ex_out]
type = Exodus
file_base = ho
elemental_as_nodal = true
[../]
[]
(test/tests/kernels/hfem/3d-lower-d-volumes.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 3
ny = 3
nz = 3
dim = 3
[]
build_all_side_lowerd_mesh = true
[]
[Variables]
[u]
order = THIRD
family = MONOMIAL
block = 0
[]
[uhat]
order = CONSTANT
family = MONOMIAL
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[lambda]
order = CONSTANT
family = MONOMIAL
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[lambdab]
order = CONSTANT
family = MONOMIAL
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[]
[AuxVariables]
[v]
order = CONSTANT
family = MONOMIAL
block = 0
initial_condition = '1'
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
block = 0
[]
[source]
type = CoupledForce
variable = u
v = v
coef = '1'
block = 0
[]
[reaction]
type = Reaction
variable = uhat
rate = '1'
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[uhat_coupled]
type = CoupledForce
variable = uhat
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
v = lambdab
coef = '1'
[]
[]
[DGKernels]
[surface]
type = TestLowerDVolumes
variable = u
lowerd_variable = lambda
l = 1
n = 3
[]
[]
[BCs]
[all]
type = HFEMDirichletBC
boundary = 'left right top bottom back front'
variable = u
lowerd_variable = lambdab
uhat = uhat
[]
[]
[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/multiapps/picard_multilevel/multilevel_dt_rejection/picard_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[v2]
[]
[v3]
[]
[w]
[]
[]
[AuxKernels]
[set_w]
type = NormalizationAux
variable = w
source_variable = v
normal_factor = 0.1
[]
[]
[Kernels]
[diff_v]
type = Diffusion
variable = v
[]
[coupled_force]
type = CoupledForce
variable = v
v = v2
[]
[coupled_force2]
type = CoupledForce
variable = v
v = v3
[]
[td_v]
type = TimeDerivative
variable = v
[]
[]
[BCs]
[left_v]
type = FunctionDirichletBC
variable = v
boundary = left
function = func
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Functions]
[func]
type = ParsedFunction
expression = 'if(t < 2.5, 1, 1 / t)'
[]
[]
[Postprocessors]
[picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[parent_time]
type = Receiver
execute_on = 'timestep_end'
[]
[parent_dt]
type = Receiver
execute_on = 'timestep_end'
[]
[time]
type = TimePostprocessor
execute_on = 'timestep_end'
[]
[dt]
type = TimestepSize
execute_on = 'timestep_end'
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 2 # deliberately make it fail at 2 to test the time step rejection behavior
nl_rel_tol = 1e-5 # loose enough to force multiple Picard iterations on this example
l_tol = 1e-5 # loose enough to force multiple Picard iterations on this example
fixed_point_rel_tol = 1e-8
num_steps = 2
[]
[MultiApps]
[sub2]
type = TransientMultiApp
positions = '0 0 0'
input_files = picard_sub2.i
execute_on = timestep_end
[]
[]
[Transfers]
[v_to_v3]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub2
source_variable = v
variable = v3
[]
[w]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub2
source_variable = w
variable = w
[]
[time_to_sub]
type = MultiAppPostprocessorTransfer
from_postprocessor = time
to_postprocessor = sub_time
to_multi_app = sub2
[]
[dt_to_sub]
type = MultiAppPostprocessorTransfer
from_postprocessor = dt
to_postprocessor = sub_dt
to_multi_app = sub2
[]
[matser_time_to_sub]
type = MultiAppPostprocessorTransfer
from_postprocessor = time
to_postprocessor = parent_time
to_multi_app = sub2
[]
[parent_dt_to_sub]
type = MultiAppPostprocessorTransfer
from_postprocessor = dt
to_postprocessor = parent_dt
to_multi_app = sub2
[]
[]
(test/tests/multiapps/picard/picard_custom_postprocessor.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[unorm_begin]
type = ElementL2Norm
variable = u
execute_on = 'initial timestep_begin'
outputs = none
[]
[unorm]
type = ElementL2Norm
variable = u
execute_on = 'initial timestep_end'
[]
[unorm_err]
type = RelativeDifferencePostprocessor
value1 = unorm
value2 = unorm_begin
outputs = none
[]
[vnorm]
type = ElementL2Norm
variable = v
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
disable_fixed_point_residual_norm_check = true
custom_pp = unorm_err
nl_abs_tol = 1e-14
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
input_files = steady_picard_sub.i
no_backup_and_restore = true
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/bcs/advection_bc/2d_advection_bc.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 10.0
ymax = 10
nx = 10
ny = 10
[]
[Variables]
[./phi]
[../]
[]
[AuxVariables]
[./vx]
[../]
[./force]
[../]
[]
[ICs]
[./vx]
type = FunctionIC
variable = vx
function = vx_function
[../]
[./force]
type = FunctionIC
variable = force
function = forcing
[../]
[]
[Kernels]
[./advection]
type = MassConvectiveFlux
variable = phi
vel_x = vx
[../]
[./rhs]
type = CoupledForce
variable = phi
v = force
[../]
[]
[BCs]
[./inflow_enthalpy]
type = DirichletBC
variable = phi
boundary = 'left'
value = 1
[../]
[./outflow_term]
type = AdvectionBC
variable = phi
velocity_vector = 'vx'
boundary = 'right'
[../]
[]
[Functions]
[./vx_function]
type = ParsedFunction
expression = '1 + x * x'
[../]
[./forcing]
type = ParsedFunction
expression = 'x'
[../]
[./analytical]
type = ParsedFunction
expression = '(1 + 0.5 * x * x) / (1 + x * x)'
[../]
[]
[Postprocessors]
[./error]
type = ElementL2Error
variable = phi
function = analytical
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/combined/test/tests/optimization/compliance_sensitivity/2d_mbb_pde.i)
vol_frac = 0.5
E0 = 1
Emin = 1e-8
power = 3
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 150
ny = 50
xmin = 0
xmax = 30
ymin = 0
ymax = 10
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold_y
nodes = 0
[]
[push]
type = ExtraNodesetGenerator
input = node
new_boundary = push
coord = '30 10 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[Dc]
initial_condition = -1.0
[]
[]
[AuxVariables]
[sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[AuxKernel]
type = MaterialRealAux
variable = sensitivity
property = sensitivity
execute_on = LINEAR
[]
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[Dc_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[AuxKernel]
type = SelfAux
variable = Dc_elem
v = Dc
execute_on = 'TIMESTEP_END'
[]
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[Kernels]
[diffusion]
type = FunctionDiffusion
variable = Dc
function = 0.15 # radius coeff
[]
[potential]
type = Reaction
variable = Dc
[]
[source]
type = CoupledForce
variable = Dc
v = sensitivity
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_y
boundary = hold_y
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[boundary_penalty]
type = ADRobinBC
variable = Dc
boundary = 'left top'
coefficient = 10
[]
[boundary_penalty_right]
type = ADRobinBC
variable = Dc
boundary = 'right'
coefficient = 10
[]
[]
[NodalKernels]
[push]
type = NodalGravity
variable = disp_y
boundary = push
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
incremental = false
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[update]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
line_search = none
nl_abs_tol = 1e-4
l_max_its = 200
start_time = 0.0
dt = 1.0
num_steps = 70
[]
[Outputs]
[out]
type = CSV
execute_on = 'INITIAL TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
[]
[]
[Controls]
[first_period]
type = TimePeriod
start_time = 0.0
end_time = 10
enable_objects = 'BCs::boundary_penalty_right'
execute_on = 'initial timestep_begin'
[]
[]
(modules/functional_expansion_tools/examples/2D_volumetric_Cartesian/main.i)
# Basic example coupling a master and sub app in a 2D Cartesian volume.
#
# The master app provides field values to the sub app via Functional Expansions, which then performs
# its calculations. The sub app's solution field values are then transferred back to the master app
# and coupled into the solution of the master app solution.
#
# This example couples Functional Expansions via AuxVariable.
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0.0
xmax = 10.0
nx = 15
ymin = 1.0
ymax = 11.0
ny = 25
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'top bottom left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3 4'
physical_bounds = '0.0 10.0 1.0 11.0'
x = Legendre
y = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(test/tests/multiapps/picard/picard_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
num_steps = 20
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_abs_tol = 1e-14
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = picard_sub.i
clone_parent_mesh = true
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(modules/combined/test/tests/restart-transient-from-ss-with-stateful/parent_ss.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
nx = 8
ny = 8
xmin = -82.627
xmax = 82.627
ymin = -82.627
ymax = 82.627
dim = 2
[]
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
initial_condition = 500
[../]
[]
[AuxVariables]
[./power]
order = FIRST
family = L2_LAGRANGE
initial_condition = 350
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[./heat_source_fuel]
type = CoupledForce
variable = temp
v = 'power'
[../]
[]
[BCs]
[./all]
type = DirichletBC
variable = temp
boundary = 'bottom top left right'
value = 300
[../]
[]
[Materials]
[./heat_material]
type = HeatConductionMaterial
temp = temp
specific_heat = 1000
thermal_conductivity = 500
[../]
[./density]
type = Density
density = 2000
[../]
[]
[Postprocessors]
[./avg_temp]
type = ElementAverageValue
variable = temp
execute_on = 'initial timestep_end'
[../]
[./avg_power]
type = ElementAverageValue
variable = power
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 300'
line_search = 'none'
l_tol = 1e-05
nl_rel_tol = 1e-12
nl_abs_tol = 1e-9
l_max_its = 50
nl_max_its = 25
[]
[Outputs]
perf_graph = true
color = true
exodus = true
[checkpoint]
type = Checkpoint
num_files = 2
additional_execute_on = 'FINAL' # seems to be a necessary to avoid a Checkpoint bug
[]
[]
[MultiApps]
[./bison]
type = FullSolveMultiApp
positions = '0 0 0'
input_files = 'sub_ss.i'
execute_on = 'timestep_end'
[../]
[]
[Transfers]
[./to_bison_mechanics]
type = MultiAppProjectionTransfer
to_multi_app = bison
variable = temp
source_variable = temp
execute_on = 'timestep_end'
[../]
[]
(modules/functional_expansion_tools/test/tests/standard_use/volume_coupling_custom_norm.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
generation_type = 'sqrt_mu'
expansion_type = 'sqrt_mu'
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
file_base = 'volume_coupled_out'
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = volume_coupling_custom_norm_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/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]
nl_sys = adjoint
[]
[v_adjoint]
nl_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'
[]
[]
(test/tests/transfers/general_field/user_object/coord_transform/main-app.i)
# This input is a duplicate of test/tests/transfers/coord_transform/both_transformed/user_object
# The parameters are different between the GeneralFieldUserObject transfer and its deprecated
# ancestor
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = -1
ymax = 0
nx = 10
ny = 10
# Quarter turn around Z axis
alpha_rotation = -90
# Flips around Y axis
# beta_rotation = -180
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[from_sub_app_var]
[]
[from_sub_app_var_elem]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = CoupledForce
variable = u
v = from_sub_app_var
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
verbose = true
[]
[Outputs]
exodus = true
[]
[UserObjects]
[main_uo]
type = LayeredAverage
direction = x
num_layers = 5
variable = u
[]
[]
[MultiApps]
[sub_app]
# Shift is offset by sub-app mesh + rotations
# positions = '1 0 0.0'
type = FullSolveMultiApp
input_files = sub-app.i
app_type = MooseTestApp
bounding_box_padding = '0.25 0.25 0'
bounding_box_inflation = 0
execute_on = TIMESTEP_END
[]
[]
[Transfers]
[layered_transfer_to_sub_app]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = main_uo
variable = sub_app_var
to_multi_app = sub_app
[]
[layered_transfer_to_sub_app_elem]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = main_uo
variable = sub_app_var_elem
to_multi_app = sub_app
[]
[layered_transfer_from_sub_app]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = sub_app_uo
variable = from_sub_app_var
from_multi_app = sub_app
[]
[layered_transfer_from_sub_app_elem]
type = MultiAppGeneralFieldUserObjectTransfer
source_user_object = sub_app_uo
variable = from_sub_app_var_elem
from_multi_app = sub_app
[]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_balance/large_gap_heat_transfer_test_cylinder.i)
rpv_core_gap_size = 0.15
core_outer_radius = 2
rpv_inner_radius = ${fparse 2 + rpv_core_gap_size}
rpv_outer_radius = ${fparse 2.5 + rpv_core_gap_size}
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
[core_gap_rpv]
type = ConcentricCircleMeshGenerator
num_sectors = 10
radii = '${core_outer_radius} ${rpv_inner_radius} ${rpv_outer_radius}'
rings = '2 1 2'
has_outer_square = false
preserve_volumes = true
portion = full
[]
[rename_core_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = core_gap_rpv
primary_block = 1
paired_block = 2
new_boundary = 'core_outer'
[]
[rename_inner_rpv_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = rename_core_bdy
primary_block = 3
paired_block = 2
new_boundary = 'rpv_inner'
[]
[2d_mesh]
type = BlockDeletionGenerator
input = rename_inner_rpv_bdy
block = 2
[]
[]
[Variables]
[Tsolid]
initial_condition = 500
[]
[]
[Kernels]
[heat_source]
type = CoupledForce
variable = Tsolid
block = '${core_blocks}'
v = power_density
[]
[heat_conduction]
type = HeatConduction
variable = Tsolid
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = Tsolid
boundary = 'outer' # outer RPV
coefficient = ${rpv_outer_htc}
T_infinity = ${rpv_outer_Tinf}
[]
[]
[ThermalContact]
[RPV_gap]
type = GapHeatTransfer
gap_geometry_type = 'CYLINDER'
emissivity_primary = 0.8
emissivity_secondary = 0.8
variable = Tsolid
primary = 'core_outer'
secondary = 'rpv_inner'
gap_conductivity = 0.1
quadrature = true
cylinder_axis_point_1 = '0 0 0'
cylinder_axis_point_2 = '0 0 5'
[]
[]
[AuxVariables]
[power_density]
block = '${core_blocks}'
initial_condition = 50e3
[]
[]
[Materials]
[simple_mat]
type = HeatConductionMaterial
thermal_conductivity = 34.6 # W/m/K
[]
[]
[Postprocessors]
[Tcore_avg]
type = ElementAverageValue
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${core_blocks}'
[]
[Trpv_avg]
type = ElementAverageValue
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${rpv_blocks}'
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = '${core_blocks}'
[]
[rpv_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = Tsolid
boundary = 'outer' # outer RVP
T_fluid = ${rpv_outer_Tinf}
htc = ${rpv_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(rpv_convective_out - ptot) / ptot'
pp_names = 'rpv_convective_out ptot'
[]
[]
[Executioner]
type = Steady
automatic_scaling = true
compute_scaling_once = false
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_max_its = 100
[Quadrature]
side_order = seventh
[]
line_search = none
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/misc/multiple-nl-systems/fully-coupled.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
[]
[Variables]
[u]
[]
[v]
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
[]
[diff_v]
type = Diffusion
variable = v
[]
[force]
type = CoupledForce
variable = v
v = u
[]
[]
[BCs]
[left_u]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right_u]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/steffensen/steady_main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[unorm]
type = ElementL2Norm
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'
fixed_point_max_its = 30
transformed_variables = 'u'
accept_on_max_fixed_point_iteration = true
[]
[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
transformed_variables = 'v'
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_3D_mortar.i)
outer_htc = 10 # W/m^2/K
outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 6
nz = 6
xmin = -1
xmax = -0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
elem_type = HEX27
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'left_bottom left_back left_right left_front left_left left_top'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 8
nz = 8
xmin = 0.5
xmax = 1
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
elem_type = HEX27
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3 4 5'
# new_boundary = 'right_bottom right_back right_right right_front right_left right_top'
new_boundary = '100 101 102 103 104 105'
[]
[right_block_sidesets_rename]
type = RenameBoundaryGenerator
input = right_block_sidesets
old_boundary = '100 101 102 103 104 105'
new_boundary = 'right_bottom right_back right_right right_front right_left right_top'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sidesets_rename
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[left_lower]
type = LowerDBlockFromSidesetGenerator
input = combined_mesh
sidesets = 'left_right'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[right_lower]
type = LowerDBlockFromSidesetGenerator
input = left_lower
sidesets = 'right_left'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[lm]
order = SECOND
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[AuxVariables]
[power_density]
block = 1
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
block = '1 2'
[]
[heat_source]
type = CoupledForce
variable = temp
block = '1'
v = power_density
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = temp
boundary = 'left_right'
primary_emissivity = 0.0
secondary_emissivity = 0.0
[]
[conduction]
type = GapFluxModelConduction
temperature = temp
boundary = 'left_right'
gap_conductivity = 5.0
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
primary_boundary = 'right_left'
primary_subdomain = 'primary_lower'
secondary_boundary = 'left_right'
secondary_subdomain = 'secondary_lower'
gap_flux_models = 'radiation conduction'
gap_geometry_type = PLATE
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = 'right_right' # outer RPV
coefficient = ${outer_htc}
T_infinity = ${outer_Tinf}
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-8
[]
[Outputs]
exodus = true
csv = true
[Console]
type = Console
[]
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = 'left_right'
variable = temp
[]
[temp_right]
type = SideAverageValue
boundary = 'right_left'
variable = temp
[]
[flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 'left_right'
diffusivity = thermal_conductivity
[]
[flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 'right_left'
diffusivity = thermal_conductivity
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 1
[]
[convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = 'right_right' # outer RVP
T_fluid = ${outer_Tinf}
htc = ${outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(convective_out - ptot) / ptot'
pp_names = 'convective_out ptot'
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = 'left_right right_left'
variable = temp
[]
[]
(modules/functional_expansion_tools/test/tests/errors/multiapp_bad_user_object.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[./AnotheruserObject]
type = EmptyPostprocessor
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = multiapp_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = AnotheruserObject
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(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/preconditioners/smp/smp_group_test.i)
###########################################################
# This test exercises the customer Preconditioner System.
# A Single Matrix Preconditioner is built using
# coupling specified by the user.
#
# @Requirement F1.40
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Variables]
[./u]
[../]
[./v]
[../]
[./p]
[../]
[./q]
[../]
[]
# Single Matrix Preconditioner
[Preconditioning]
[./SMP]
type = SMP
coupled_groups = 'u,v p,q'
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./conv_u]
type = CoupledForce
variable = u
v = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[./diff_p]
type = Diffusion
variable = p
[../]
[./conv_p]
type = CoupledForce
variable = p
v = q
[../]
[./diff_q]
type = Diffusion
variable = q
[../]
[]
[BCs]
[./left_u]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./bottom_v]
type = DirichletBC
variable = v
boundary = 0
value = 5
[../]
[./top_v]
type = DirichletBC
variable = v
boundary = 2
value = 2
[../]
[./left_p]
type = DirichletBC
variable = p
boundary = 1
value = 2
[../]
[./bottom_q]
type = DirichletBC
variable = q
boundary = 0
value = 3
[../]
[./top_q]
type = DirichletBC
variable = q
boundary = 2
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_max_its = 2
[]
[Outputs]
exodus = true
[]
(test/tests/preconditioners/fdp/fdp_test.i)
[Mesh]
type = GeneratedMesh
nx = 2
ny = 2
dim = 2
[]
[Variables]
[./u]
[../]
[./v]
[../]
[]
[Preconditioning]
[./FDP]
type = FDP
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./conv_v]
type = CoupledForce
variable = v
v = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = false
[]
[ICs]
[./u]
variable = u
type = RandomIC
min = 0.1
max = 0.9
[../]
[./v]
variable = v
type = RandomIC
min = 0.1
max = 0.9
[../]
[]
(test/tests/multiapps/steffensen/steady_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[u]
[]
[]
[Kernels]
[diff_v]
type = Diffusion
variable = v
[]
[force_v]
type = CoupledForce
variable = v
v = u
[]
[]
[BCs]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 1
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Postprocessors]
[vnorm]
type = ElementL2Norm
variable = v
[]
[]
[Executioner]
type = Steady
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
[]
(test/tests/transfers/coord_transform/both-transformed/user_object/main-app.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = -1
ymax = 0
nx = 10
ny = 10
# Quarter turn around Z axis
alpha_rotation = -90
# Flips around Y axis
# beta_rotation = -180
[]
[Variables]
[u][]
[]
[AuxVariables]
[from_sub_app_var][]
[from_sub_app_var_elem]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = CoupledForce
variable = u
v = from_sub_app_var
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
verbose = true
[]
[Outputs]
exodus = true
[]
[UserObjects]
[main_uo]
type = LayeredAverage
direction = x
num_layers = 5
variable = u
[]
[]
[MultiApps]
[sub_app]
# Shift is offset by sub-app mesh + rotations
# positions = '1 0 0.0'
type = FullSolveMultiApp
input_files = sub-app.i
app_type = MooseTestApp
bounding_box_padding = '0.25 0.25 0'
bounding_box_inflation = 0
use_displaced_mesh = true
execute_on = TIMESTEP_END
[]
[]
[Transfers]
[layered_transfer_to_sub_app]
type = MultiAppUserObjectTransfer
user_object = main_uo
variable = sub_app_var
to_multi_app = sub_app
displaced_target_mesh = true
[]
[layered_transfer_to_sub_app_elem]
type = MultiAppUserObjectTransfer
user_object = main_uo
variable = sub_app_var_elem
to_multi_app = sub_app
displaced_target_mesh = true
[]
[layered_transfer_from_sub_app]
type = MultiAppUserObjectTransfer
user_object = sub_app_uo
variable = from_sub_app_var
from_multi_app = sub_app
# displaced_source_mesh = true
[]
[layered_transfer_from_sub_app_elem]
type = MultiAppUserObjectTransfer
user_object = sub_app_uo
variable = from_sub_app_var_elem
from_multi_app = sub_app
# displaced_source_mesh = true
[]
[]
(test/tests/fvkernels/fv_coupled_var/coupled.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 2
[]
[Variables]
[u][]
[v]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[w]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[s][]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[rxn]
type = Reaction
variable = u
rate = 2.0
[]
[diffs]
type = Diffusion
variable = s
[]
[prod]
type = CoupledForce
variable = s
v = u
[]
[]
[FVKernels]
[diff]
type = FVDiffusion
variable = v
coeff = coeff
[]
[rxn]
type = FVReaction
variable = v
rate = 2.0
[]
[diffw]
type = FVDiffusion
variable = w
coeff = coeff
[]
[prod]
type = FVCoupledForce
variable = w
v = 'v'
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = v
boundary = left
value = 0
[]
[right]
type = FVDirichletBC
variable = v
boundary = right
value = 1
[]
[leftw]
type = FVDirichletBC
variable = w
boundary = left
value = 0
[]
[rightw]
type = FVDirichletBC
variable = w
boundary = right
value = 1
[]
[]
[Materials]
[diff]
type = ADGenericFunctorMaterial
prop_names = 'coeff'
prop_values = '1'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[lefts]
type = DirichletBC
variable = s
boundary = left
value = 0
[]
[rights]
type = DirichletBC
variable = s
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/KKS_system/nonlinear.i)
#
# This test checks if the thwo phase and lagrange multiplier solutions can be replicated
# with a two order parameter approach, where the second order parameter eta2 is a
# nonlinear variable that is set as eta2 := 1 - eta1 (using Reaction, CoupledForce, and BodyForce)
# The solution is reproduced.
#
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmax = 5
[]
[AuxVariables]
[Fglobal]
order = CONSTANT
family = MONOMIAL
[]
[]
[Variables]
# concentration
[c]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = x/5
[]
[]
# order parameter 1
[eta1]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
# order parameter 2
[eta2]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
# phase concentration 1
[c1]
order = FIRST
family = LAGRANGE
initial_condition = 0.9
[]
# phase concentration 2
[c2]
order = FIRST
family = LAGRANGE
initial_condition = 0.1
[]
[]
[Materials]
# simple toy free energies
[f1] # = fd
type = DerivativeParsedMaterial
property_name = F1
coupled_variables = 'c1'
expression = '(0.9-c1)^2'
[]
[f2] # = fm
type = DerivativeParsedMaterial
property_name = F2
coupled_variables = 'c2'
expression = '(0.1-c2)^2'
[]
# Switching functions for each phase
[h1_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta1
function_name = h1
[]
[h2_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta2
function_name = h2
[]
# Coefficients for diffusion equation
[Dh1]
type = DerivativeParsedMaterial
material_property_names = 'D h1(eta1)'
expression = D*h1
property_name = Dh1
coupled_variables = eta1
[]
[Dh2]
type = DerivativeParsedMaterial
material_property_names = 'D h2(eta2)'
expression = D*h2
property_name = Dh2
coupled_variables = eta2
[]
# Barrier functions for each phase
[g1]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta1
function_name = g1
[]
[g2]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta2
function_name = g2
[]
# constant properties
[constants]
type = GenericConstantMaterial
prop_names = 'D L kappa'
prop_values = '0.7 0.7 0.2'
[]
[]
[Kernels]
#Kernels for diffusion equation
[diff_time]
type = TimeDerivative
variable = c
[]
[diff_c1]
type = MatDiffusion
variable = c
diffusivity = Dh1
v = c1
args = 'eta1'
[]
[diff_c2]
type = MatDiffusion
variable = c
diffusivity = Dh2
v = c2
args = 'eta2'
[]
# Kernels for Allen-Cahn equation for eta1
[deta1dt]
type = TimeDerivative
variable = eta1
[]
[ACBulkF1]
type = KKSMultiACBulkF
variable = eta1
Fj_names = 'F1 F2 '
hj_names = 'h1 h2 '
gi_name = g1
eta_i = eta1
wi = 0.2
coupled_variables = 'c1 c2 eta2'
[]
[ACBulkC1]
type = KKSMultiACBulkC
variable = eta1
Fj_names = 'F1 F2'
hj_names = 'h1 h2'
cj_names = 'c1 c2'
eta_i = eta1
coupled_variables = 'eta2'
[]
[ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa
[]
# Phase concentration constraints
[chempot12]
type = KKSPhaseChemicalPotential
variable = c1
cb = c2
fa_name = F1
fb_name = F2
[]
[phaseconcentration]
type = KKSMultiPhaseConcentration
variable = c2
cj = 'c1 c2'
hj_names = 'h1 h2'
etas = 'eta1 eta2'
c = c
[]
# equation for eta2 = 1 - eta1
# 0 = eta2 + eta1 -1
[constraint_eta1] # eta2
type = Reaction
variable = eta2
[]
[constraint_eta2] # + eta1
type = CoupledForce
variable = eta2
coef = -1
v = eta1
[]
[constraint_one] # - 1
type = BodyForce
variable = eta2
[]
[]
[AuxKernels]
[Fglobal_total]
type = KKSMultiFreeEnergy
Fj_names = 'F1 F2 '
hj_names = 'h1 h2 '
gj_names = 'g1 g2 '
variable = Fglobal
w = 0.2
interfacial_vars = 'eta1 eta2 '
kappa_names = 'kappa kappa'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'lu nonzero'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-11
end_time = 350
dt = 10
[]
[VectorPostprocessors]
[c]
type = LineValueSampler
variable = c
start_point = '0 0 0'
end_point = '5 0 0'
num_points = 21
sort_by = x
[]
[]
[Outputs]
csv = true
execute_on = FINAL
[]
(test/tests/restart/restart_transient_from_transient/restart_trans_with_2subs_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 3
xmax = 0.3
ymax = 0.3
[]
[AuxVariables]
[power_density]
[]
[]
[Variables]
[temp]
[]
[]
[Kernels]
[heat_conduction]
type = Diffusion
variable = temp
[]
[heat_ie]
type = TimeDerivative
variable = temp
[]
[heat_source_fuel]
type = CoupledForce
variable = temp
v = power_density
[]
[]
[BCs]
[bc]
type = DirichletBC
variable = temp
boundary = '1 3'
value = 100
[]
[bc2]
type = NeumannBC
variable = temp
boundary = '0 2'
value = 10.0
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
start_time = 0
end_time = 3
dt = 1.0
nl_abs_tol = 1e-7
nl_rel_tol = 1e-7
[]
[Postprocessors]
[temp_fuel_avg]
type = ElementAverageValue
variable = temp
block = '0'
execute_on = 'initial timestep_end'
[]
[pwr_density]
type = ElementIntegralVariablePostprocessor
block = '0'
variable = power_density
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
perf_graph = true
exodus = true
color = true
[]
(python/peacock/tests/input_tab/InputFileEditor/gold/fsp_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[v]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
[]
[conv_v]
type = CoupledForce
variable = v
v = 'u'
[]
[diff_v]
type = Diffusion
variable = v
[]
[]
[BCs]
inactive = 'right_v'
[left_u]
type = DirichletBC
variable = u
boundary = '1'
value = 0
[]
[right_u]
type = DirichletBC
variable = u
boundary = '2'
value = 100
[]
[left_v]
type = DirichletBC
variable = v
boundary = '1'
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = '2'
value = 0
[]
[]
[Executioner]
# This is setup automatically in MOOSE (SetupPBPAction.C)
# petsc_options = '-snes_mf_operator'
# petsc_options_iname = '-pc_type'
# petsc_options_value = 'asm'
type = Steady
[]
[Preconditioning]
[FSP]
# It is the starting point of splitting
type = FSP
topsplit = 'uv' # uv should match the following block name
[uv]
# Generally speaking, there are four types of splitting we could choose
# <additive,multiplicative,symmetric_multiplicative,schur>
# An approximate solution to the original system
# | A_uu A_uv | | u | _ |f_u|
# | 0 A_vv | | v | - |f_v|
# is obtained by solving the following subsystems
# A_uu u = f_u and A_vv v = f_v
# If splitting type is specified as schur, we may also want to set more options to
# control how schur works using PETSc options
# petsc_options_iname = '-pc_fieldsplit_schur_fact_type -pc_fieldsplit_schur_precondition'
# petsc_options_value = 'full selfp'
splitting = 'u v' # u and v are the names of subsolvers
splitting_type = additive
[]
[u]
# PETSc options for this subsolver
# A prefix will be applied, so just put the options for this subsolver only
vars = 'u'
petsc_options_iname = '-pc_type -ksp_type'
petsc_options_value = ' hypre preonly'
[]
[v]
# PETSc options for this subsolver
vars = 'v'
petsc_options_iname = '-pc_type -ksp_type'
petsc_options_value = ' hypre preonly'
[]
[]
[]
[Outputs]
file_base = out
exodus = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_sphere3D_mortar.i)
sphere_outer_htc = 10 # W/m^2/K
sphere_outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Mesh]
[file]
type = FileMeshGenerator
file = sphere3D.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '3'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[AuxVariables]
# [gap_conductance]
# order = CONSTANT
# family = MONOMIAL
# []
[power_density]
block = 'fuel'
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
block = '1 2'
[]
[heat_source]
type = CoupledForce
variable = temp
block = 'fuel'
v = power_density
[]
[]
# [AuxKernels]
# [gap_cond]
# type = MaterialRealAux
# property = gap_conductance
# variable = gap_conductance
# boundary = 2
# []
# []
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = temp
boundary = 2
primary_emissivity = 0.0
secondary_emissivity = 0.0
[]
[conduction]
type = GapFluxModelConduction
temperature = temp
boundary = 2
gap_conductivity = 5.0
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
primary_boundary = 3
primary_subdomain = 10000
secondary_boundary = 2
secondary_subdomain = 10001
gap_flux_models = 'radiation conduction'
gap_geometry_type = SPHERE
sphere_origin = '0 0 0'
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = '4' # outer RPV
coefficient = ${sphere_outer_htc}
T_infinity = ${sphere_outer_Tinf}
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-7
[]
[Outputs]
exodus = true
csv = true
[Console]
type = Console
[]
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = 2
variable = temp
[]
[temp_right]
type = SideAverageValue
boundary = 3
variable = temp
[]
[flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[]
[flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 'fuel'
[]
[sphere_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = '4' # outer RVP
T_fluid = ${sphere_outer_Tinf}
htc = ${sphere_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(sphere_convective_out - ptot) / ptot'
pp_names = 'sphere_convective_out ptot'
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '2 3'
variable = temp
[]
[]
(test/tests/outputs/console/multiapp/picard_parent_both.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v_begin]
[]
[v_end]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u_begin]
type = CoupledForce
variable = u
v = v_begin
[]
[force_u_end]
type = CoupledForce
variable = u
v = v_end
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[]
[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'
fixed_point_max_its = 30
nl_abs_tol = 1e-14
[]
[MultiApps]
[sub_begin]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = picard_sub.i
[]
[sub_end]
type = TransientMultiApp
app_type = MooseTestApp
positions = '1 1 1'
input_files = picard_sub.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[v_from_sub_begin]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_begin
source_variable = v
variable = v_begin
[]
[u_to_sub_begin]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub_begin
source_variable = u
variable = u
[]
[v_from_sub_end]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub_end
source_variable = v
variable = v_end
[]
[u_to_sub_end]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub_end
source_variable = u
variable = u
[]
[]
(test/tests/restart/restart_transient_from_transient/pseudo_trans_with_2subs_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 3
xmax = 0.3
ymax = 0.3
[]
[AuxVariables]
[power_density]
[]
[]
[Variables]
[temp]
[]
[]
[Kernels]
[heat_timedt]
type = TimeDerivative
variable = temp
[]
[heat_conduction]
type = Diffusion
variable = temp
[]
[heat_source_fuel]
type = CoupledForce
variable = temp
v = power_density
[]
[]
[BCs]
[bc]
type = DirichletBC
variable = temp
boundary = '1 3'
value = 100
[]
[bc2]
type = NeumannBC
variable = temp
boundary = '0 2'
value = 10.0
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-7
nl_rel_tol = 1e-7
end_time = 20
dt = 2.0
[]
[Postprocessors]
[temp_fuel_avg]
type = ElementAverageValue
variable = temp
execute_on = 'initial timestep_end'
[]
[pwr_density]
type = ElementIntegralVariablePostprocessor
variable = power_density
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
perf_graph = true
exodus = true
color = true
[]
(modules/functional_expansion_tools/test/tests/errors/multiapp_missing_sub_object.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = multiapp_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_balance/large_gap_heat_transfer_test_rz_cylinder.i)
rpv_core_gap_size = 0.2
core_outer_radius = 2
rpv_inner_radius = '${fparse 2 + rpv_core_gap_size}'
rpv_outer_radius = '${fparse 2.5 + rpv_core_gap_size}'
rpv_width = '${fparse rpv_outer_radius - rpv_inner_radius}'
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
[gmg]
type = CartesianMeshGenerator
dim = 2
dx = '${core_outer_radius} ${rpv_core_gap_size} ${rpv_width}'
ix = '400 1 100'
dy = 1
iy = '5'
[]
[set_block_id1]
type = SubdomainBoundingBoxGenerator
input = gmg
bottom_left = '0 0 0'
top_right = '${core_outer_radius} 1 0'
block_id = 1
location = INSIDE
[]
[rename_core_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = set_block_id1
primary_block = 1
paired_block = 0
new_boundary = 'core_outer'
[]
[set_block_id3]
type = SubdomainBoundingBoxGenerator
input = rename_core_bdy
bottom_left = '${rpv_inner_radius} 0 0'
top_right = '${rpv_outer_radius} 1 0'
block_id = 3
location = INSIDE
[]
[rename_inner_rpv_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = set_block_id3
primary_block = 3
paired_block = 0
new_boundary = 'rpv_inner'
[]
# comment out for test without gap
[2d_mesh]
type = BlockDeletionGenerator
input = rename_inner_rpv_bdy
block = 0
[]
[]
[Problem]
coord_type = RZ
[]
[Variables]
[Tsolid]
initial_condition = 500
[]
[]
[Kernels]
[heat_source]
type = CoupledForce
variable = Tsolid
block = '${core_blocks}'
v = power_density
[]
[heat_conduction]
type = HeatConduction
variable = Tsolid
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = Tsolid
boundary = 'right' # outer RPV
coefficient = ${rpv_outer_htc}
T_infinity = ${rpv_outer_Tinf}
[]
[]
[ThermalContact]
[RPV_gap]
type = GapHeatTransfer
gap_geometry_type = 'CYLINDER'
emissivity_primary = 0.8
emissivity_secondary = 0.8
variable = Tsolid
primary = 'core_outer'
secondary = 'rpv_inner'
gap_conductivity = 0.1
quadrature = true
[]
[]
[AuxVariables]
[power_density]
block = '${core_blocks}'
initial_condition = 50e3
[]
[]
[Materials]
[simple_mat]
type = HeatConductionMaterial
thermal_conductivity = 34.6 # W/m/K
[]
[]
[Postprocessors]
[Tcore_avg]
type = ElementAverageValue
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${core_blocks}'
[]
[Trpv_avg]
type = ElementAverageValue
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${rpv_blocks}'
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = '${core_blocks}'
[]
[rpv_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = Tsolid
boundary = 'right' # outer RVP
T_fluid = ${rpv_outer_Tinf}
htc = ${rpv_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(rpv_convective_out - ptot) / ptot'
pp_names = 'rpv_convective_out ptot'
[]
[flux_from_core] # converges to ptot as the mesh is refined
type = SideDiffusiveFluxIntegral
variable = Tsolid
boundary = core_outer
diffusivity = thermal_conductivity
[]
[flux_into_rpv] # converges to rpv_convective_out as the mesh is refined
type = SideDiffusiveFluxIntegral
variable = Tsolid
boundary = rpv_inner
diffusivity = thermal_conductivity
[]
[]
[Executioner]
type = Steady
automatic_scaling = true
compute_scaling_once = false
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_max_its = 100
[Quadrature]
# order = fifth
side_order = seventh
[]
line_search = none
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/multiapps/picard_multilevel/picard_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[v2]
[]
[]
[Kernels]
[diff_v]
type = Diffusion
variable = v
[]
[coupled_force]
type = CoupledForce
variable = v
v = v2
[]
[td_v]
type = TimeDerivative
variable = v
[]
[]
[BCs]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 1
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Postprocessors]
# Accumulate the number of times 'timestep_end' is reached
# (which is an indicator of the number of Picard iterations)
[cumulative_picard_its_pp]
type = TestPostprocessor
test_type = custom_execute_on
execute_on = 'timestep_end'
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 1
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]
[sub2]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = picard_sub2.i
sub_cycling = true
execute_on = timestep_end
[]
[]
[Transfers]
[v2]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub2
source_variable = v
variable = v2
[]
[]
(test/tests/executioners/eigen_executioners/ne_deficient_b.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
elem_type = QUAD4
nx = 8
ny = 8
uniform_refine = 0
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
eigen = true
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[./rhs]
type = CoupledEigenKernel
variable = u
v = v
[../]
[./src_v]
type = CoupledForce
variable = v
v = u
[../]
[]
[BCs]
[./homogeneous_u]
type = DirichletBC
variable = u
boundary = '0 1 2 3'
value = 0
[../]
[./homogeneous_v]
type = DirichletBC
variable = v
boundary = '0 1 2 3'
value = 0
[../]
[]
[Executioner]
type = NonlinearEigen
bx_norm = 'vnorm'
free_power_iterations = 2
nl_abs_tol = 1e-12
nl_rel_tol = 1e-50
k0 = 1.0
output_after_power_iterations = false
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
[]
[Postprocessors]
[./vnorm]
type = ElementIntegralVariablePostprocessor
variable = v
# execute on residual is important for nonlinear eigen solver!
execute_on = linear
[../]
[./udiff]
type = ElementL2Diff
variable = u
outputs = console
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = ne_deficient_b
exodus = true
[]
(test/tests/multiapps/picard_failure/picard_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]
[Variables]
[./v]
[../]
[]
[AuxVariables]
[./u]
[../]
[]
[Kernels]
[./diff_v]
type = Diffusion
variable = v
[../]
[./force_v]
type = CoupledForce
variable = v
v = u
[../]
[./nan]
type = NanAtCountKernel
variable = v
count = 32
[../]
[]
[BCs]
[./left_v]
type = DirichletBC
variable = v
boundary = left
value = 1
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[../]
[]
[Postprocessors]
[./elem_average_value]
type = ElementAverageValue
variable = v
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-10
snesmf_reuse_base = false
[]
[Outputs]
exodus = true
[]
(modules/combined/examples/optimization/helmholtz_multimat_nostrip.i)
vol_frac = 0.35
power = 1.1
Emin = 1.0e-6
Ess = 0.475 # ss
Et = 1.0 # w
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
# final_generator = 'MoveRight'
[Bottom]
type = GeneratedMeshGenerator
dim = 2
nx = 320
ny = 30
xmin = 0
xmax = 150
ymin = 0
ymax = 15
[]
[RenameBottom]
type = RenameBoundaryGenerator
input = Bottom
old_boundary = 'top bottom right left'
new_boundary = 'top_bottom bottom_bottom right_bottom left_bottom'
[]
[Top]
type = GeneratedMeshGenerator
dim = 2
nx = 320
ny = 30
xmin = 0
xmax = 150
ymin = 0
ymax = 15
[]
[MoveTop]
type = TransformGenerator
input = Top
transform = TRANSLATE
vector_value = '0 15 0'
[]
[RenameTop]
type = RenameBoundaryGenerator
input = MoveTop
old_boundary = 'top bottom right left'
new_boundary = 'top_top bottom_top right_top left_top'
[]
[bottom_gen]
type = ParsedSubdomainMeshGenerator
input = RenameBottom
combinatorial_geometry = 'y <= 15'
block_id = 1
[]
[top_gen]
type = ParsedSubdomainMeshGenerator
input = RenameTop
combinatorial_geometry = 'y > 15'
block_id = 3
[]
[stitch]
type = StitchedMeshGenerator
inputs = 'bottom_gen top_gen'
stitch_boundaries_pairs = 'top_bottom bottom_top'
[]
[left_load]
type = ExtraNodesetGenerator
input = stitch
new_boundary = left_load
coord = '37.5 30 0'
[]
[right_load]
type = ExtraNodesetGenerator
input = left_load
new_boundary = right_load
coord = '112.5 30 0'
[]
[left_support]
type = ExtraNodesetGenerator
input = right_load
new_boundary = left_support
coord = '0 0 0'
[]
[right_support]
type = ExtraNodesetGenerator
input = left_support
new_boundary = right_support
coord = '150 0 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[Dc]
initial_condition = -1.0
[]
[]
[AuxVariables]
[Cc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[AuxKernel]
type = MaterialRealAux
variable = sensitivity
property = sensitivity
execute_on = LINEAR
[]
[]
[mat_den_nodal]
family = L2_LAGRANGE
order = FIRST
initial_condition = ${vol_frac}
[AuxKernel]
type = SelfAux
execute_on = TIMESTEP_END
variable = mat_den_nodal
v = mat_den
[]
[]
[Dc_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[AuxKernel]
type = SelfAux
variable = Dc_elem
v = Dc
execute_on = 'TIMESTEP_END'
[]
[]
[]
[Kernels]
[diffusion]
type = FunctionDiffusion
variable = Dc
function = 4.0
[]
[potential]
type = Reaction
variable = Dc
[]
[source]
type = CoupledForce
variable = Dc
v = sensitivity
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = left_support
value = 0.0
[]
[no_x]
type = DirichletBC
variable = disp_x
boundary = left_support
value = 0.0
[]
[no_y_right]
type = DirichletBC
variable = disp_y
boundary = right_support
value = 0.0
[]
[boundary_penalty]
type = ADRobinBC
variable = Dc
boundary = 'bottom_bottom right_bottom left_bottom top_top right_top left_top'
coefficient = 10
[]
[]
[NodalKernels]
[left_down]
type = NodalGravity
variable = disp_y
boundary = left_load
gravity_value = -1e-3
mass = 1
[]
[right_down]
type = NodalGravity
variable = disp_y
boundary = right_load
gravity_value = -1e-3
mass = 1
[]
[]
[Materials]
[elasticity_tensor_one]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys_one
poissons_ratio = poissons_ratio
args = 'mat_den'
block = '1'
[]
[elasticity_tensor_three]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys_three
poissons_ratio = poissons_ratio
args = 'mat_den'
block = '3'
[]
# One: Tungsten
[E_phys_one]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${Et}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys_one
block = '1'
outputs = 'exodus'
[]
# Three: SS316
[E_phys_three]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${Ess}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys_three
block = '3'
outputs = 'exodus'
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc_one]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys_one
block = '1'
[]
[dc_three]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys_three
block = '3'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[update_one]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
block = '1'
[]
[update_three]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
block = '3'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-10
dt = 1.0
num_steps = 90
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'initial timestep_end'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
function = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
block = '1 3'
[]
[objective_one]
type = ElementIntegralMaterialProperty
mat_prop = strain_energy_density
execute_on = 'INITIAL TIMESTEP_END'
block = '1'
[]
[objective_three]
type = ElementIntegralMaterialProperty
mat_prop = strain_energy_density
execute_on = 'INITIAL TIMESTEP_END'
block = '3'
[]
[]
(test/tests/auxkernels/element_aux_var/l2_element_aux_var_test.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
second_order = true
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./l2_lagrange]
order = FIRST
family = L2_LAGRANGE
[../]
[./l2_hierarchic]
order = FIRST
family = L2_HIERARCHIC
[../]
[./one]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
# Coupling of nonlinear to Aux
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = CoupledForce
variable = u
v = one
[../]
[]
[AuxKernels]
[./coupled_l2_lagrange]
variable = l2_lagrange
type = CoupledAux
value = 2
operator = +
coupled = u
execute_on = 'initial timestep_end'
[../]
[./coupled_l2_hierarchic]
variable = l2_hierarchic
type = CoupledAux
value = 2
operator = +
coupled = u
execute_on = 'initial timestep_end'
[../]
[./constant]
variable = one
type = ConstantAux
value = 1
execute_on = 'initial timestep_end'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Postprocessors]
[./int2_u]
type = ElementL2Norm
variable = u
execute_on = 'initial timestep_end'
[../]
[./int2_l2_lagrange]
type = ElementL2Norm
variable = l2_lagrange
execute_on = 'initial timestep_end'
[../]
[./int2_l2_hierarchic]
type = ElementL2Norm
variable = l2_hierarchic
execute_on = 'initial timestep_end'
[../]
[./int_u]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = 'initial timestep_end'
[../]
[./int_l2_lagrange]
type = ElementIntegralVariablePostprocessor
variable = l2_lagrange
execute_on = 'initial timestep_end'
[../]
[./int_l2_hierarchic]
type = ElementIntegralVariablePostprocessor
variable = l2_hierarchic
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
[./ex_out]
type = Exodus
file_base = l2elemaux
elemental_as_nodal = true
[../]
[]
(test/tests/problems/eigen_problem/eigensolvers/ne_coupled_picard_subT.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
elem_type = QUAD4
nx = 8
ny = 8
[]
[Variables]
[./T]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./power]
order = FIRST
family = LAGRANGE
initial_condition = 0.1
[../]
[]
[Kernels]
[./diff_T]
type = Diffusion
variable = T
[../]
[./src_T]
type = CoupledForce
variable = T
v = power
[../]
[]
[BCs]
[./homogeneousT]
type = DirichletBC
variable = T
boundary = '0 1 2 3'
value = 0
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_abs_tol = 1e-8
nl_rel_tol = 1e-6
fixed_point_max_its = 20
fixed_point_rel_tol = 1e-6
[]
[MultiApps]
[./sub]
type = FullSolveMultiApp
keep_solution_during_restore = true
input_files = ne_coupled_picard_subT_sub.i
execute_on = timestep_end
[../]
[]
[Transfers]
[./T_to_sub]
type = MultiAppShapeEvaluationTransfer
to_multi_app = sub
source_variable = T
variable = T
execute_on = timestep_end
[../]
[./power_from_sub]
type = MultiAppShapeEvaluationTransfer
from_multi_app = sub
source_variable = power
variable = power
execute_on = timestep_end
[../]
[]
[Outputs]
csv = true
exodus =true
execute_on = 'timestep_end'
[]
(test/tests/multiapps/relaxation/sub_relaxed_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./v]
[../]
[]
[AuxVariables]
[./u]
[../]
[]
[Kernels]
[./diff_v]
type = Diffusion
variable = v
[../]
[./force_v]
type = CoupledForce
variable = v
v = u
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[]
[BCs]
[./left_v]
type = DirichletBC
variable = v
boundary = left
value = 2
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 20
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(modules/combined/examples/optimization/helmholtz_multimat_strip.i)
vol_frac = 0.35
power = 1.1
Emin = 1.0e-6
Ess = 0.475 # ss
Et = 1.0 # w
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
# final_generator = 'MoveRight'
[Bottom]
type = GeneratedMeshGenerator
dim = 2
nx = 320
ny = 30
xmin = 0
xmax = 150
ymin = 0
ymax = 15
[]
[RenameBottom]
type = RenameBoundaryGenerator
input = Bottom
old_boundary = 'top bottom right left'
new_boundary = 'top_bottom bottom_bottom right_bottom left_bottom'
[]
[Middle]
type = GeneratedMeshGenerator
dim = 2
nx = 320
ny = 6
xmin = 0
xmax = 150
ymin = 0
ymax = 3
[]
[MoveMiddle]
type = TransformGenerator
input = Middle
transform = TRANSLATE
vector_value = '0 15 0'
[]
[RenameMiddle]
type = RenameBoundaryGenerator
input = MoveMiddle
old_boundary = 'top bottom right left'
new_boundary = 'top_middle bottom_middle right_middle left_middle'
[]
[Top]
type = GeneratedMeshGenerator
dim = 2
nx = 320
ny = 30
xmin = 0
xmax = 150
ymin = 0
ymax = 15
[]
[MoveTop]
type = TransformGenerator
input = Top
transform = TRANSLATE
vector_value = '0 18 0'
[]
[RenameTop]
type = RenameBoundaryGenerator
input = MoveTop
old_boundary = 'top bottom right left'
new_boundary = 'top_top bottom_top right_top left_top'
[]
[bottom_gen]
type = ParsedSubdomainMeshGenerator
input = RenameBottom
combinatorial_geometry = 'y <= 15'
block_id = 1
[]
[middle_gen]
type = ParsedSubdomainMeshGenerator
input = RenameMiddle
combinatorial_geometry = 'y <= 18 & y > 15'
block_id = 2
[]
[top_gen]
type = ParsedSubdomainMeshGenerator
input = RenameTop
combinatorial_geometry = 'y > 18'
block_id = 3
[]
[stitch]
type = StitchedMeshGenerator
inputs = 'bottom_gen middle_gen top_gen'
stitch_boundaries_pairs = 'top_bottom bottom_middle; top_middle bottom_top'
[]
[left_load]
type = ExtraNodesetGenerator
input = stitch
new_boundary = left_load
coord = '37.5 33 0'
[]
[right_load]
type = ExtraNodesetGenerator
input = left_load
new_boundary = right_load
coord = '112.5 33 0'
[]
[left_support]
type = ExtraNodesetGenerator
input = right_load
new_boundary = left_support
coord = '0 0 0'
[]
[right_support]
type = ExtraNodesetGenerator
input = left_support
new_boundary = right_support
coord = '150 0 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[Dc]
initial_condition = -1.0
[]
[]
[AuxVariables]
[Cc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[AuxKernel]
type = MaterialRealAux
variable = sensitivity
property = sensitivity
execute_on = LINEAR
[]
block = '1 2 3'
[]
[mat_den_nodal]
family = L2_LAGRANGE
order = FIRST
initial_condition = ${vol_frac}
[AuxKernel]
type = SelfAux
execute_on = TIMESTEP_END
variable = mat_den_nodal
v = mat_den
[]
[]
[Dc_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[AuxKernel]
type = SelfAux
variable = Dc_elem
v = Dc
execute_on = 'TIMESTEP_END'
[]
[]
[]
[Kernels]
[diffusion]
type = FunctionDiffusion
variable = Dc
function = 4.0
[]
[potential]
type = Reaction
variable = Dc
[]
[source]
type = CoupledForce
variable = Dc
v = sensitivity
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = left_support
value = 0.0
[]
[no_x]
type = DirichletBC
variable = disp_x
boundary = left_support
value = 0.0
[]
[no_y_right]
type = DirichletBC
variable = disp_y
boundary = right_support
value = 0.0
[]
[boundary_penalty]
type = ADRobinBC
variable = Dc
boundary = 'bottom_bottom right_bottom left_bottom top_top right_top left_top left_middle '
'right_middle'
coefficient = 10
[]
[]
[NodalKernels]
[left_down]
type = NodalGravity
variable = disp_y
boundary = left_load
gravity_value = -1e-3
mass = 1
[]
[right_down]
type = NodalGravity
variable = disp_y
boundary = right_load
gravity_value = -1e-3
mass = 1
[]
[]
[Materials]
[sensitivity]
type = ParsedMaterial
property_name = 'sensitivity'
block = '2'
expression = '0'
[]
[elasticity_tensor_one]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys_one
poissons_ratio = poissons_ratio
args = 'mat_den'
block = '1'
[]
[elasticity_tensor_three]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys_three
poissons_ratio = poissons_ratio
args = 'mat_den'
block = '3'
[]
[elasticity_tensor_two]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1.0
poissons_ratio = 0.3
block = '2'
[]
# One: Tungsten
[E_phys_one]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${Et}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys_one
block = '1'
outputs = 'exodus'
[]
# Three: SS316
[E_phys_three]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${Ess}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys_three
block = '3'
outputs = 'exodus'
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc_one]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys_one
block = '1'
[]
[dc_three]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys_three
block = '3'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[update_one]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
block = '1'
[]
[update_three]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
block = '3'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-10
dt = 1.0
num_steps = 90
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'initial timestep_end'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
function = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
block = '1 3'
[]
[objective_one]
type = ElementIntegralMaterialProperty
mat_prop = strain_energy_density
execute_on = 'INITIAL TIMESTEP_END'
block = '1'
[]
[objective_three]
type = ElementIntegralMaterialProperty
mat_prop = strain_energy_density
execute_on = 'INITIAL TIMESTEP_END'
block = '3'
[]
[]
(test/tests/transfers/coord_transform/transform-main-main-app.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 1
xmax = 3
nx = 20
ny = 10
length_unit = '5*m'
alpha_rotation = 90
[]
[Variables]
[u][]
[]
[AuxVariables]
[v][]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 5 0'
input_files = 'transform-main-sub-app.i'
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[from_sub]
type = MultiAppNearestNodeTransfer
from_multi_app = sub
source_variable = v
variable = v
execute_on = 'timestep_begin'
[]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_sphere3D.i)
sphere_outer_htc = 10 # W/m^2/K
sphere_outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Mesh]
file = sphere3D.e
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[]
[AuxVariables]
[gap_conductance]
order = CONSTANT
family = MONOMIAL
[]
[power_density]
block = 'fuel'
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
[]
[heat_source]
type = CoupledForce
variable = temp
block = 'fuel'
v = power_density
[]
[]
[AuxKernels]
[gap_cond]
type = MaterialRealAux
property = gap_conductance
variable = gap_conductance
boundary = 2
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[ThermalContact]
[thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
gap_conductivity = 5
gap_geometry_type = SPHERE
sphere_origin = '0 0 0'
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = '4' # outer RPV
coefficient = ${sphere_outer_htc}
T_infinity = ${sphere_outer_Tinf}
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-7
[Quadrature]
order = fifth
side_order = seventh
[]
[]
[Outputs]
exodus = true
csv = true
[Console]
type = Console
[]
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = 2
variable = temp
[]
[temp_right]
type = SideAverageValue
boundary = 3
variable = temp
[]
[flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[]
[flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 'fuel'
[]
[sphere_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = '4' # outer RVP
T_fluid = ${sphere_outer_Tinf}
htc = ${sphere_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(sphere_convective_out - ptot) / ptot'
pp_names = 'sphere_convective_out ptot'
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '2 3'
variable = temp
[]
[]
(test/tests/misc/multiple-nl-systems/ad-test.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
[]
[Problem]
nl_sys_names = 'u v'
[]
[Variables]
[u]
nl_sys = 'u'
[]
[v]
nl_sys = 'v'
[]
[]
[Kernels]
[diff_u]
type = ADDiffusion
variable = u
[]
[diff_v]
type = ADDiffusion
variable = v
[]
[force]
type = ADCoupledForce
variable = v
v = u
[]
[]
[BCs]
[left_u]
type = ADDirichletBC
variable = u
boundary = left
value = 0
[]
[right_u]
type = ADDirichletBC
variable = u
boundary = right
value = 1
[]
[left_v]
type = ADDirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = ADDirichletBC
variable = v
boundary = right
value = 1
[]
[]
[Executioner]
type = SteadySolve2
solve_type = 'NEWTON'
petsc_options = '-snes_monitor'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
first_nl_sys_to_solve = 'u'
second_nl_sys_to_solve = 'v'
[]
[Outputs]
print_nonlinear_residuals = false
print_linear_residuals = false
exodus = true
[]
(test/tests/executioners/eigen_executioners/ne_coupled.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
elem_type = QUAD4
nx = 8
ny = 8
uniform_refine = 0
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./T]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./power]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = DiffMKernel
variable = u
mat_prop = diffusion
offset = 0.0
[../]
[./rhs]
type = MassEigenKernel
variable = u
[../]
[./diff_T]
type = Diffusion
variable = T
[../]
[./src_T]
type = CoupledForce
variable = T
v = power
[../]
[]
[AuxKernels]
[./power_ak]
type = NormalizationAux
variable = power
source_variable = u
normalization = unorm
# this coefficient will affect the eigenvalue.
normal_factor = 10
execute_on = linear
[../]
[]
[BCs]
[./homogeneous]
type = DirichletBC
variable = u
boundary = '0 1 2 3'
value = 0
[../]
[./homogeneousT]
type = DirichletBC
variable = T
boundary = '0 1 2 3'
value = 0
[../]
[]
[Materials]
[./dc]
type = VarCouplingMaterial
var = T
block = 0
base = 1.0
coef = 1.0
[../]
[]
[Executioner]
type = NonlinearEigen
bx_norm = 'unorm'
free_power_iterations = 2
nl_abs_tol = 1e-12
nl_rel_tol = 1e-50
k0 = 1.0
output_after_power_iterations = false
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
[]
[Postprocessors]
active = 'unorm udiff'
[./unorm]
type = ElementIntegralVariablePostprocessor
variable = u
# execute on residual is important for nonlinear eigen solver!
execute_on = linear
[../]
[./udiff]
type = ElementL2Diff
variable = u
outputs = console
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = ne_coupled
exodus = true
[]
(test/tests/multiapps/picard/picard_adaptive_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
num_steps = 20
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_abs_tol = 1e-14
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.1
# cutback_factor, growth_factor, optimal_iterations, time_dt and time_t added through CLI args
[]
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = picard_adaptive_sub.i
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(test/tests/auxkernels/nodal_aux_var/nodal_aux_init_test.i)
#
# Testing nodal aux variables that are computed only at the end of the time step
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 3
ny = 3
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
initial_condition = 5
[../]
[]
[AuxVariables]
active = 'aux1 aux2'
[./aux1]
order = FIRST
family = LAGRANGE
initial_condition = 2
[../]
[./aux2]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'ie diff force'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
#Coupling of nonlinear to Aux
[./force]
type = CoupledForce
variable = u
v = aux2
[../]
[]
[AuxKernels]
active = 'constant field'
#Simple Aux Kernel
[./constant]
variable = aux1
type = ConstantAux
value = 1
execute_on = nonlinear
[../]
#AuxKernel that is setup only before the simulation starts
[./field]
variable = aux2
type = CoupledAux
value = 2
coupled = u
execute_on = initial
[../]
[]
[BCs]
active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 3
value = 1
[../]
[]
[Executioner]
type = Transient
start_time = 0
dt = 0.1
num_steps = 2
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
file_base = out_init
[]
(test/tests/problems/eigen_problem/eigensolvers/ne-coupled-scaling.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
elem_type = QUAD4
nx = 8
ny = 8
[]
[Variables]
[u][]
[T][]
[]
[AuxVariables]
[power][]
[]
[Kernels]
[./diff]
type = DiffMKernel
variable = u
mat_prop = diffusion
offset = 0.0
[../]
[./rhs]
type = CoefReaction
variable = u
coefficient = -1.0
extra_vector_tags = 'eigen'
[../]
[./diff_T]
type = CoefDiffusion
variable = T
coef = 1e30
[../]
[./src_T]
type = CoupledForce
variable = T
v = power
coef = 1e30
[../]
[]
[AuxKernels]
[./power_ak]
type = NormalizationAux
variable = power
source_variable = u
normalization = unorm
# this coefficient will affect the eigenvalue.
normal_factor = 10
execute_on = linear
[../]
[]
[BCs]
[./homogeneous]
type = DirichletBC
variable = u
boundary = '0 1 2 3'
value = 0
[../]
[./eigenU]
type = EigenDirichletBC
variable = u
boundary = '0 1 2 3'
[../]
[./homogeneousT]
type = DirichletBC
variable = T
boundary = '0 1 2 3'
value = 0
[../]
[]
[Materials]
[./dc]
type = VarCouplingMaterial
var = T
block = 0
base = 1.0
coef = 1.0
[../]
[]
[Executioner]
type = Eigenvalue
solve_type = PJFNK
automatic_scaling = true
petsc_options = '-pc_svd_monitor'
petsc_options_iname = '-pc_type'
petsc_options_value = 'svd'
verbose = true
[]
[Postprocessors]
[./unorm]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = linear
[../]
[]
[VectorPostprocessors]
[./eigenvalues]
type = Eigenvalues
execute_on = 'timestep_end'
[../]
[]
[Outputs]
exodus = true
csv = true
execute_on = 'timestep_end'
[]
(tutorials/tutorial02_multiapps/step03_coupling/03_sub_subcycling_picard.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[ut]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = v
[]
[force]
type = CoupledForce
variable = v
v = ut
coef = 100
[]
[td]
type = TimeDerivative
variable = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = v
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 0.05
nl_abs_tol = 1e-10
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[average_v]
type = ElementAverageValue
variable = v
[]
[]
(test/tests/problems/eigen_problem/eigensolvers/ne_coupled_scaled.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
elem_type = QUAD4
nx = 8
ny = 8
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./T]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./power]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = DiffMKernel
variable = u
mat_prop = diffusion
offset = 0.0
[../]
[./rhs]
type = CoefReaction
variable = u
coefficient = -1.0
extra_vector_tags = 'eigen'
[../]
[./diff_T]
type = Diffusion
variable = T
[../]
[./src_T]
type = CoupledForce
variable = T
v = power
[../]
[]
[AuxKernels]
[./power_ak]
type = NormalizationAux
variable = power
source_variable = u
normalization = unorm
# this coefficient will affect the eigenvalue.
normal_factor = 10
execute_on = linear
[../]
[]
[BCs]
[./homogeneous]
type = DirichletBC
variable = u
boundary = '0 1 2 3'
value = 0
[../]
[./eigenU]
type = EigenDirichletBC
variable = u
boundary = '0 1 2 3'
[../]
[./homogeneousT]
type = DirichletBC
variable = T
boundary = '0 1 2 3'
value = 0
[../]
[]
[Materials]
[./dc]
type = VarCouplingMaterial
var = T
block = 0
base = 1.0
coef = 1.0
[../]
[]
[Executioner]
type = Eigenvalue
solve_type = PJFNK
# Postprocessor value to normalize
normalization = unorm
# Value to set normilization to
normal_factor = 17
[]
[Postprocessors]
[./unorm]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = linear
[../]
[]
[Outputs]
exodus = true
execute_on = 'timestep_end'
[]
(test/tests/multiapps/secant/steady_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[u]
[]
[]
[Kernels]
[diff_v]
type = Diffusion
variable = v
[]
[force_v]
type = CoupledForce
variable = v
v = u
[]
[]
[BCs]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 1
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Postprocessors]
[vnorm]
type = ElementL2Norm
variable = v
[]
[]
[Executioner]
type = Steady
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
[]
(test/tests/preconditioners/smp/smp_single_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 are not that big
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
off_diag_row = 'u'
off_diag_column = 'v'
[../]
[]
[Kernels]
active = 'diff_u conv_u diff_v'
[./diff_u]
type = Diffusion
variable = u
[../]
[./conv_u]
type = CoupledForce
variable = u
v = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'left_u top_v bottom_v'
[./left_u]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 3
value = 9
[../]
[./bottom_v]
type = DirichletBC
variable = v
boundary = 0
value = 5
[../]
[./top_v]
type = DirichletBC
variable = v
boundary = 2
value = 2
[../]
[]
[Executioner]
type = Steady
# l_max_its = 1
# nl_max_its = 1
# nl_rel_tol = 1e-10
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/steffensen/transient_main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[coupling_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[unorm]
type = ElementL2Norm
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'
fixed_point_max_its = 30
transformed_variables = 'u'
[]
[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]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
execute_on = 'timestep_begin'
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
execute_on = 'timestep_begin'
[]
[]
(examples/ex11_prec/default.i)
[Mesh]
file = square.e
[]
[Variables]
[./diffused]
order = FIRST
family = LAGRANGE
[../]
[./forced]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_diffused]
type = Diffusion
variable = diffused
[../]
[./conv_forced]
type = CoupledForce
variable = forced
v = diffused
[../]
[./diff_forced]
type = Diffusion
variable = forced
[../]
[]
[BCs]
#Note we have active on and neglect the right_forced BC
active = 'left_diffused right_diffused left_forced'
[./left_diffused]
type = DirichletBC
variable = diffused
boundary = 'left'
value = 0
[../]
[./right_diffused]
type = DirichletBC
variable = diffused
boundary = 'right'
value = 100
[../]
[./left_forced]
type = DirichletBC
variable = forced
boundary = 'left'
value = 0
[../]
[./right_forced]
type = DirichletBC
variable = forced
boundary = 'right'
value = 0
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/picard/picard_abs_tol_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 20
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-12
fixed_point_max_its = 10
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = picard_sub.i
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere.i)
sphere_outer_htc = 10 # W/m^2/K
sphere_outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
[file]
type = FileMeshGenerator
file = cyl2D.e
[]
allow_renumbering = false
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[]
[AuxVariables]
[gap_conductance]
order = CONSTANT
family = MONOMIAL
[]
[power_density]
block = 'fuel'
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
[]
[heat_source]
type = CoupledForce
variable = temp
block = 'fuel'
v = power_density
[]
[]
[AuxKernels]
[gap_cond]
type = MaterialRealAux
property = gap_conductance
variable = gap_conductance
boundary = 2
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[ThermalContact]
[thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0.0
emissivity_secondary = 0.0
gap_conductivity = 5
# quadrature = true
gap_geometry_type = SPHERE
sphere_origin = '0 0 0'
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = '4' # outer RPV
coefficient = ${sphere_outer_htc}
T_infinity = ${sphere_outer_Tinf}
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '2 3'
variable = temp
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-7
[Quadrature]
order = fifth
side_order = seventh
[]
[]
[Outputs]
exodus = true
csv = true
[Console]
type = Console
[]
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = 2
variable = temp
[]
[temp_right]
type = SideAverageValue
boundary = 3
variable = temp
[]
[flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[]
[flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 'fuel'
[]
[sphere_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = '4' # outer RVP
T_fluid = ${sphere_outer_Tinf}
htc = ${sphere_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(sphere_convective_out - ptot) / ptot'
pp_names = 'sphere_convective_out ptot'
[]
[]
(test/tests/multiapps/picard/steady_custom_picard_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[unorm]
type = ElementL2Norm
variable = u
execute_on = 'initial timestep_end'
[]
[vnorm]
type = ElementL2Norm
variable = v
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = SteadyWithPicardCheck
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
disable_fixed_point_residual_norm_check = true
pp_name = unorm
pp_step_tol = 1e-4
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
input_files = steady_picard_sub.i
no_backup_and_restore = true
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(modules/functional_expansion_tools/examples/3D_volumetric_cylindrical_subapp_mesh_refine/main.i)
# Derived from the example '3D_volumetric_cylindrical' with the following differences:
#
# 1) The model mesh is refined in the MasterApp by 1
# 2) Mesh adaptivity is enabled for the SubApp
# 3) Output from the SubApp is enabled so that the mesh changes can be visualized
[Mesh]
type = FileMesh
file = cyl-tet.e
uniform_refine = 1
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'top bottom outside'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = CylindricalDuo
orders = '5 3' # Axial first, then (r, t) FX
physical_bounds = '-2.5 2.5 0 0 1' # z_min z_max x_center y_center radius
z = Legendre # Axial in z
disc = Zernike # (r, t) default to unit disc in x-y plane
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
output_sub_cycles = true
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/combined/test/tests/optimization/optimization_density_update/top_opt_2d_pde_filter.i)
vol_frac = 0.4
E0 = 1e5
Emin = 1e-4
power = 2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 20
xmin = 0
xmax = 20
ymin = 0
ymax = 10
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = pull
nodes = 0
[]
[]
[Variables]
[Dc]
initial_condition = -1.0
[]
[]
[AuxVariables]
[sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[AuxKernel]
type = MaterialRealAux
variable = sensitivity
property = sensitivity
execute_on = LINEAR
[]
[]
[compliance]
family = MONOMIAL
order = CONSTANT
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[Dc_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[AuxKernel]
type = SelfAux
variable = Dc_elem
v = Dc
execute_on = 'TIMESTEP_END'
[]
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[Kernels]
[diffusion]
type = FunctionDiffusion
variable = Dc
function = 0.05
[]
[potential]
type = Reaction
variable = Dc
[]
[source]
type = CoupledForce
variable = Dc
v = sensitivity
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_y
boundary = right
value = 0.0
[]
[boundary_penalty]
type = ADRobinBC
variable = Dc
boundary = 'left top'
coefficient = 10
[]
[]
[NodalKernels]
[pull]
type = NodalGravity
variable = disp_y
boundary = pull
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
incremental = false
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[update]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type '
petsc_options_value = 'lu'
nl_abs_tol = 1e-10
line_search = none
dt = 1.0
num_steps = 30
[]
[Outputs]
[out]
type = Exodus
time_step_interval = 10
[]
[]
(examples/ex12_pbp/ex12.i)
[Mesh]
file = square.e
[]
[Variables]
[./diffused]
order = FIRST
family = LAGRANGE
[../]
[./forced]
order = FIRST
family = LAGRANGE
[../]
[]
# The Preconditioning block
[Preconditioning]
[./PBP]
type = PBP
solve_order = 'diffused forced'
preconditioner = 'LU LU'
off_diag_row = 'forced'
off_diag_column = 'diffused'
[../]
[]
[Kernels]
[./diff_diffused]
type = Diffusion
variable = diffused
[../]
[./conv_forced]
type = CoupledForce
variable = forced
v = diffused
[../]
[./diff_forced]
type = Diffusion
variable = forced
[../]
[]
[BCs]
#Note we have active on and neglect the right_forced BC
active = 'left_diffused right_diffused left_forced'
[./left_diffused]
type = DirichletBC
variable = diffused
boundary = 'left'
value = 0
[../]
[./right_diffused]
type = DirichletBC
variable = diffused
boundary = 'right'
value = 100
[../]
[./left_forced]
type = DirichletBC
variable = forced
boundary = 'left'
value = 0
[../]
[./right_forced]
type = DirichletBC
variable = forced
boundary = 'right'
value = 0
[../]
[]
[Executioner]
type = Steady
solve_type = JFNK
[]
[Outputs]
exodus = true
[]
(modules/functional_expansion_tools/examples/3D_volumetric_cylindrical/main.i)
# Basic example coupling a master and sub app in a 3D cylindrical mesh from an input file
#
# The master app provides field values to the sub app via Functional Expansions, which then performs
# its calculations. The sub app's solution field values are then transferred back to the master app
# and coupled into the solution of the master app solution.
#
# This example couples Functional Expansions via AuxVariable, the recommended approach.
#
# Note: this problem is not light, and may take a few minutes to solve.
[Mesh]
type = FileMesh
file = cyl-tet.e
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'top bottom outside'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = CylindricalDuo
orders = '5 3' # Axial first, then (r, t) FX
physical_bounds = '-2.5 2.5 0 0 1' # z_min z_max x_center y_center radius
z = Legendre # Axial in z
disc = Zernike # (r, t) default to unit disc in x-y plane
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(test/tests/outputs/debug/show_functors.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 40
xmax = 2
[]
[]
[Debug]
show_functors = true
[]
[Variables]
[fv]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 1
[]
[fe]
initial_condition = 1
[]
[]
[FVKernels]
[diff]
type = FVDiffusion
variable = fv
coeff = fv_prop
coeff_interp_method = average
[]
[coupled]
type = FVCoupledForce
v = fv
variable = fv
[]
[]
[Kernels]
[diff]
type = ADFunctorMatDiffusion
variable = fe
diffusivity = fe_prop
[]
[coupled]
type = CoupledForce
v = fv
variable = fe
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = fv
boundary = left
value = 0
[]
[right]
type = FVDirichletBC
variable = fv
boundary = right
value = 1
[]
[]
[BCs]
[left]
type = DirichletBC
variable = fe
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = fe
boundary = right
value = 1
[]
[]
[Materials]
active = 'fe_mat fv_mat'
[bad_mat]
type = FEFVCouplingMaterial
fe_var = fe
fv_var = fv
execute_on = 'linear nonlinear'
[]
[fe_mat]
type = FEFVCouplingMaterial
fe_var = fe
execute_on = 'linear nonlinear'
[]
[fv_mat]
type = FEFVCouplingMaterial
fv_var = fv
[]
[fe_mat_bad_dep]
type = FEFVCouplingMaterial
fe_var = fe
declared_prop_name = bad
[]
[fv_mat_bad_dep]
type = FEFVCouplingMaterial
fv_var = fv
retrieved_prop_name = bad
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
line_search = 'none'
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/picard_multilevel/2level_picard/sub_level1.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[u]
[]
[w]
[]
[]
[Kernels]
[time_derivative]
type = TimeDerivative
variable = v
[]
[diffusion]
type = Diffusion
variable = v
[]
[source]
type = CoupledForce
variable = v
v = u
[]
[]
[BCs]
[dirichlet0]
type = DirichletBC
variable = v
boundary = '0'
value = 0
[]
[dirichlet]
type = DirichletBC
variable = v
boundary = '2'
value = 100
[]
[]
[Postprocessors]
[avg_u]
type = ElementAverageValue
variable = u
execute_on = 'initial timestep_begin timestep_end'
[]
[avg_v]
type = ElementAverageValue
variable = v
execute_on = 'initial timestep_begin timestep_end'
[]
[avg_w]
type = ElementAverageValue
variable = w
execute_on = 'initial timestep_begin timestep_end'
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
end_time = 0.1
dt = 0.02
[]
[MultiApps]
[level2-]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = sub_level2.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[v_to_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = v
variable = v
to_multi_app = level2-
execute_on = 'timestep_end'
[]
[w_from_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = w
variable = w
from_multi_app = level2-
execute_on = 'timestep_end'
[]
[]
[Outputs]
exodus = true
perf_graph = true
[screen]
type = Console
execute_postprocessors_on = "timestep_end timestep_begin"
[]
[]
(test/tests/multiapps/relaxation/picard_relaxed_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./v]
[../]
[]
[AuxVariables]
[./u]
[../]
[]
[Kernels]
[./diff_v]
type = Diffusion
variable = v
[../]
[./force_v]
type = CoupledForce
variable = v
v = u
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[]
[BCs]
[./left_v]
type = DirichletBC
variable = v
boundary = left
value = 2
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 20
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/steffensen/transient_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[u]
[]
[]
[Kernels]
[time]
type = CoefTimeDerivative
variable = v
Coefficient = 0.1
[]
[diff_v]
type = Diffusion
variable = v
[]
[force_v]
type = CoupledForce
variable = v
v = u
[]
[]
[BCs]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 1
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Postprocessors]
[vnorm]
type = ElementL2Norm
variable = v
[]
[]
[Executioner]
type = Transient
end_time = 10
nl_abs_tol = 1e-12
steady_state_detection = true
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_algorithm = 'steffensen'
[]
[Outputs]
[csv]
type = CSV
start_step = 6
[]
exodus = false
[]
(test/tests/auxkernels/nodal_aux_var/nodal_aux_var_test.i)
###########################################################
# This is a simple test of the AuxKernel System.
# Several explicit calculations are being done
# using spatial variables.
# This simulation demonstrates coupling, and dependency
# resolution. For simplicity all AuxVariables in this
# simulation are constant.
#
# @Requirement F5.30
###########################################################
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
active = 'one five coupled'
[./one]
order = FIRST
family = LAGRANGE
[../]
[./five]
order = FIRST
family = LAGRANGE
[../]
[./coupled]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff force'
[./diff]
type = Diffusion
variable = u
[../]
#Coupling of nonlinear to Aux
[./force]
type = CoupledForce
variable = u
v = one
[../]
[]
# AuxKernel System
[AuxKernels]
#Simple Aux Kernel
[./constant]
variable = one
type = ConstantAux
value = 1
[../]
#Shows coupling of Aux to nonlinear
[./coupled]
variable = coupled
type = CoupledAux
value = 2
coupled = u
[../]
[./five]
type = ConstantAux
variable = five
boundary = '3 1'
value = 5
[../]
[]
[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
[]
(test/tests/preconditioners/fsp/fsp_test.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u v'
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff_u conv_v diff_v'
[./diff_u]
type = Diffusion
variable = u
[../]
[./conv_v]
type = CoupledForce
variable = v
v = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'left_u right_u left_v'
[./left_u]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 1
value = 100
[../]
[./left_v]
type = DirichletBC
variable = v
boundary = 3
value = 0
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = 1
value = 0
[../]
[]
[Executioner]
type = Steady
# This is setup automatically in MOOSE (SetupPBPAction.C)
# petsc_options = '-snes_mf_operator'
# petsc_options_iname = '-pc_type'
# petsc_options_value = 'asm'
[]
[Preconditioning]
active = 'FSP'
[./FSP]
type = FSP
# It is the starting point of splitting
topsplit = 'uv' # 'uv' should match the following block name
[./uv]
splitting = 'u v' # 'u' and 'v' are the names of subsolvers
# Generally speaking, there are four types of splitting we could choose
# <additive,multiplicative,symmetric_multiplicative,schur>
splitting_type = additive
# An approximate solution to the original system
# | A_uu A_uv | | u | _ |f_u|
# | 0 A_vv | | v | - |f_v|
# is obtained by solving the following subsystems
# A_uu u = f_u and A_vv v = f_v
# If splitting type is specified as schur, we may also want to set more options to
# control how schur works using PETSc options
# petsc_options_iname = '-pc_fieldsplit_schur_fact_type -pc_fieldsplit_schur_precondition'
# petsc_options_value = 'full selfp'
[../]
[./u]
vars = 'u'
# PETSc options for this subsolver
# A prefix will be applied, so just put the options for this subsolver only
petsc_options_iname = '-pc_type -ksp_type'
petsc_options_value = ' hypre preonly'
[../]
[./v]
vars = 'v'
# PETSc options for this subsolver
petsc_options_iname = '-pc_type -ksp_type'
petsc_options_value = ' hypre preonly'
[../]
[../]
[]
[Outputs]
file_base = out
exodus = true
[]
(test/tests/multiapps/picard/picard_rel_tol_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 20
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-12
fixed_point_max_its = 10
fixed_point_rel_tol = 1e-7
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = picard_sub.i
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(test/tests/misc/check_error/multi_precond_test.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Preconditioning]
active = 'PBP FDP'
[./PBP]
type = PBP
solve_order = 'u v'
preconditioner = 'LU LU'
off_diag_row = 'v'
off_diag_column = 'u'
[../]
[./FDP]
type = FDP
off_diag_row = 'v'
off_diag_column = 'u'
[../]
[]
[Variables]
active = 'u v'
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff_u conv_v diff_v'
[./diff_u]
type = Diffusion
variable = u
[../]
[./conv_v]
type = CoupledForce
variable = v
v = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'left_u right_u left_v'
[./left_u]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 1
value = 100
[../]
[./left_v]
type = DirichletBC
variable = v
boundary = 3
value = 0
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = 1
value = 0
[../]
[]
[Executioner]
type = Steady
l_max_its = 1
nl_max_its = 1
solve_type = JFNK
[]
[Outputs]
file_base = pbp_out
[]
(test/tests/problems/eigen_problem/eigensolvers/ne_coupled.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
elem_type = QUAD4
nx = 8
ny = 8
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./T]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./power]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = DiffMKernel
variable = u
mat_prop = diffusion
offset = 0.0
[../]
[./rhs]
type = CoefReaction
variable = u
coefficient = -1.0
extra_vector_tags = 'eigen'
[../]
[./diff_T]
type = Diffusion
variable = T
[../]
[./src_T]
type = CoupledForce
variable = T
v = power
[../]
[]
[AuxKernels]
[./power_ak]
type = NormalizationAux
variable = power
source_variable = u
normalization = unorm
# this coefficient will affect the eigenvalue.
normal_factor = 10
execute_on = linear
[../]
[]
[BCs]
[./homogeneous]
type = DirichletBC
variable = u
boundary = '0 1 2 3'
value = 0
[../]
[./eigenU]
type = EigenDirichletBC
variable = u
boundary = '0 1 2 3'
[../]
[./homogeneousT]
type = DirichletBC
variable = T
boundary = '0 1 2 3'
value = 0
[../]
[]
[Materials]
[./dc]
type = VarCouplingMaterial
var = T
block = 0
base = 1.0
coef = 1.0
[../]
[]
[Executioner]
type = Eigenvalue
solve_type = PJFNK
[]
[Postprocessors]
[./unorm]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = linear
[../]
[]
[VectorPostprocessors]
[./eigenvalues]
type = Eigenvalues
execute_on = 'timestep_end'
[../]
[]
[Outputs]
csv = true
file_base = ne_coupled
execute_on = 'timestep_end'
[]
(test/tests/multiapps/picard_multilevel/fullsolve_multilevel/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
initial_condition = 50
[]
[]
[Kernels]
[diffusion]
type = Diffusion
variable = u
[]
[source]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[dirichlet0]
type = DirichletBC
variable = u
boundary = '3'
value = 0
[]
[dirichlet]
type = DirichletBC
variable = u
boundary = '1'
value = 100
[]
[]
[Postprocessors]
[avg_u]
type = ElementAverageValue
variable = u
execute_on = 'initial linear'
[]
[avg_v]
type = ElementAverageValue
variable = v
execute_on = 'initial linear'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
fixed_point_rel_tol = 1E-3
fixed_point_abs_tol = 1.0e-05
fixed_point_max_its = 12
[]
[MultiApps]
[level1-]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = sub_level1.i
execute_on = 'timestep_end'
# We have to make backups of the full tree in order to do a proper restore for the Picard iteration.
no_backup_and_restore = false
[]
[]
[Transfers]
[u_to_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = u
variable = u
to_multi_app = level1-
execute_on = 'timestep_end'
[]
[v_from_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = v
variable = v
from_multi_app = level1-
execute_on = 'timestep_end'
[]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(test/tests/problems/eigen_problem/eigensolvers/ne_deficient_b.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
elem_type = QUAD4
nx = 8
ny = 8
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
eigen = true
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[./rhs]
type = CoupledForce
variable = u
v = v
extra_vector_tags = 'eigen'
[../]
[./src_v]
type = CoupledForce
variable = v
v = u
[../]
[]
[BCs]
[./homogeneous_u]
type = DirichletBC
variable = u
boundary = '0 1 2 3'
value = 0
[../]
[./homogeneous_v]
type = DirichletBC
variable = v
boundary = '0 1 2 3'
value = 0
[../]
[./eigenBC_u]
type = EigenDirichletBC
variable = u
boundary = '0 1 2 3'
[../]
[./eigenBC_v]
type = EigenDirichletBC
variable = v
boundary = '0 1 2 3'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Eigenvalue
solve_type = PJFNK
[]
[VectorPostprocessors]
[./eigenvalues]
type = Eigenvalues
execute_on = 'timestep_end'
[../]
[]
[Outputs]
csv = true
file_base = ne_deficient_b
execute_on = 'timestep_end'
[]
(modules/combined/examples/optimization/2d_mbb_pde_amr.i)
vol_frac = 0.5
E0 = 1
Emin = 1e-8
power = 2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 30
ny = 10
xmin = 0
xmax = 30
ymin = 0
ymax = 10
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = pull
nodes = 0
[]
[push]
type = ExtraNodesetGenerator
input = node
new_boundary = push
coord = '30 10 0'
[]
[]
[Variables]
[Dc]
initial_condition = -1.0
[]
[]
[AuxVariables]
[Emin]
family = MONOMIAL
order = CONSTANT
initial_condition = ${Emin}
[]
[power]
family = MONOMIAL
order = CONSTANT
initial_condition = ${power}
[]
[E0]
family = MONOMIAL
order = CONSTANT
initial_condition = ${E0}
[]
[sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[AuxKernel]
type = MaterialRealAux
variable = sensitivity
property = sensitivity
execute_on = LINEAR
[]
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[Dc_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[AuxKernel]
type = SelfAux
variable = Dc_elem
v = Dc
execute_on = 'TIMESTEP_END'
[]
[]
[mat_den_nodal]
family = L2_LAGRANGE
order = FIRST
initial_condition = ${vol_frac}
[AuxKernel]
type = SelfAux
execute_on = TIMESTEP_END
variable = mat_den_nodal
v = mat_den
[]
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[Kernels]
[diffusion]
type = FunctionDiffusion
variable = Dc
function = 0.15 # radius coeff
[]
[potential]
type = Reaction
variable = Dc
[]
[source]
type = CoupledForce
variable = Dc
v = sensitivity
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_y
boundary = pull
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[boundary_penalty]
type = ADRobinBC
variable = Dc
boundary = 'left top'
coefficient = 10
[]
[boundary_penalty_right]
type = ADRobinBC
variable = Dc
boundary = 'right'
coefficient = 10
[]
[]
[NodalKernels]
[pull]
type = NodalGravity
variable = disp_y
boundary = push
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'Emin mat_den power E0'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
incremental = false
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[update]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
line_search = none
nl_abs_tol = 1e-4
l_max_its = 200
start_time = 0.0
dt = 1.0
num_steps = 70
[]
[Outputs]
[out]
type = Exodus
execute_on = 'INITIAL TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Controls]
[first_period]
type = TimePeriod
start_time = 0.0
end_time = 40
enable_objects = 'BCs::boundary_penalty_right'
execute_on = 'initial timestep_begin'
[]
[]
[Adaptivity]
max_h_level = 2
recompute_markers_during_cycles = true
interval = 1
cycles_per_step = 1
marker = density_marker
[Indicators]
[density_jump]
type = ValueJumpIndicator
variable = mat_den_nodal
[]
[]
[Markers]
[density_marker]
type = ErrorToleranceMarker
indicator = density_jump
coarsen = 0.1
refine = 0.1
[]
[]
[]
(test/tests/multiapps/picard_multilevel/multilevel_dt_rejection/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[AuxKernels]
[set_v]
type = FunctionAux
variable = v
function = 't'
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[coupled_force]
type = CoupledForce
variable = u
v = v
[]
[time]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
num_steps = 2
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 1
auto_advance = false
[]
[MultiApps]
[sub1]
type = TransientMultiApp
positions = '0 0 0'
input_files = picard_sub.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[u_to_v2]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub1
source_variable = u
variable = v2
[]
[time_to_sub]
type = MultiAppPostprocessorTransfer
from_postprocessor = time
to_postprocessor = parent_time
to_multi_app = sub1
[]
[dt_to_sub]
type = MultiAppPostprocessorTransfer
from_postprocessor = dt
to_postprocessor = parent_dt
to_multi_app = sub1
[]
[]
[Postprocessors]
[time]
type = TimePostprocessor
execute_on = 'timestep_end'
[]
[dt]
type = TimestepSize
execute_on = 'timestep_end'
[]
[]
(examples/ex11_prec/smp.i)
[Mesh]
file = square.e
[]
[Variables]
[./diffused]
order = FIRST
family = LAGRANGE
[../]
[./forced]
order = FIRST
family = LAGRANGE
[../]
[]
# The Preconditioning block
[Preconditioning]
active = 'SMP_jfnk'
[./SMP_jfnk]
type = SMP
off_diag_row = 'forced'
off_diag_column = 'diffused'
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[../]
[./SMP_jfnk_full]
type = SMP
full = true
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[../]
[./SMP_n]
type = SMP
off_diag_row = 'forced'
off_diag_column = 'diffused'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[../]
[]
[Kernels]
[./diff_diffused]
type = Diffusion
variable = diffused
[../]
[./conv_forced]
type = CoupledForce
variable = forced
v = diffused
[../]
[./diff_forced]
type = Diffusion
variable = forced
[../]
[]
[BCs]
#Note we have active on and neglect the right_forced BC
active = 'left_diffused right_diffused left_forced'
[./left_diffused]
type = DirichletBC
variable = diffused
boundary = 1
value = 0
[../]
[./right_diffused]
type = DirichletBC
variable = diffused
boundary = 2
value = 100
[../]
[./left_forced]
type = DirichletBC
variable = forced
boundary = 1
value = 0
[../]
[./right_forced]
type = DirichletBC
variable = forced
boundary = 2
value = 0
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/coord_transform/both-transformed/projection/main-app.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = -1
ymax = 0
nx = 10
ny = 10
alpha_rotation = 90
[]
[Variables]
[u][]
[]
[AuxVariables]
[v][]
[v_elem]
order = CONSTANT
family = MONOMIAL
[]
[w][]
[w_elem]
order = CONSTANT
family = MONOMIAL
[]
[]
[ICs]
[w]
type = FunctionIC
function = 'cos(x)*sin(y)'
variable = w
[]
[w_elem]
type = FunctionIC
function = 'cos(x)*sin(y)'
variable = w_elem
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
verbose = true
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = 'sub-app.i'
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[from_sub]
type = MultiAppProjectionTransfer
from_multi_app = sub
source_variable = v
variable = v
execute_on = 'timestep_begin'
[]
[from_sub_elem]
type = MultiAppProjectionTransfer
from_multi_app = sub
source_variable = v_elem
variable = v_elem
execute_on = 'timestep_begin'
[]
[to_sub]
type = MultiAppProjectionTransfer
to_multi_app = sub
source_variable = w
variable = w
execute_on = 'timestep_begin'
[]
[to_sub_elem]
type = MultiAppProjectionTransfer
to_multi_app = sub
source_variable = w_elem
variable = w_elem
execute_on = 'timestep_begin'
[]
[]
(test/tests/transfers/multiapp_conservative_transfer/sub_conservative_transfer.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = 0.05
xmax = 1.2
ymin = 0.05
ymax = 1.1
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./coupledforce]
type = CoupledForce
variable = u
v = aux_u
[../]
[]
[AuxVariables]
[./aux_u]
family = LAGRANGE
order = FIRST
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Postprocessors]
[./to_postprocessor]
type = ElementIntegralVariablePostprocessor
variable = aux_u
execute_on = 'transfer'
[../]
[]
[Problem]
type = FEProblem
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_abs_tol = 1e-12
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder_mortar_error.i)
rpv_core_gap_size = 0.15
core_outer_radius = 2
rpv_inner_radius = ${fparse 2 + rpv_core_gap_size}
rpv_outer_radius = ${fparse 2.5 + rpv_core_gap_size}
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
[core_gap_rpv]
type = ConcentricCircleMeshGenerator
num_sectors = 10
radii = '${core_outer_radius} ${rpv_inner_radius} ${rpv_outer_radius}'
rings = '2 1 2'
has_outer_square = false
preserve_volumes = true
portion = full
[]
[rename_core_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = core_gap_rpv
primary_block = 1
paired_block = 2
new_boundary = 'core_outer'
[]
[rename_inner_rpv_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = rename_core_bdy
primary_block = 3
paired_block = 2
new_boundary = 'rpv_inner'
[]
[2d_mesh]
type = BlockDeletionGenerator
input = rename_inner_rpv_bdy
block = 2
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = 'rpv_inner'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = 2d_mesh
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = 'core_outer'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Variables]
[Tsolid]
initial_condition = 500
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[Kernels]
[heat_source]
type = CoupledForce
variable = Tsolid
block = '${core_blocks}'
v = power_density
[]
[heat_conduction]
type = HeatConduction
variable = Tsolid
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = Tsolid
boundary = 'outer' # outer RPV
coefficient = ${rpv_outer_htc}
T_infinity = ${rpv_outer_Tinf}
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = Tsolid
boundary = 'rpv_inner'
primary_emissivity = 0.8
secondary_emissivity = 0.8
[]
[conduction]
type = GapFluxModelConduction
temperature = Tsolid
boundary = 'rpv_inner'
gap_conductivity = 0.1
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = Tsolid
primary_boundary = 'core_outer'
primary_subdomain = 10000
secondary_boundary = 'rpv_inner'
secondary_subdomain = 10001
gap_flux_models = 'radiation conduction'
gap_geometry_type = 'CYLINDER'
cylinder_axis_point_2 = '0 0 5'
[]
[]
[AuxVariables]
[power_density]
block = '${core_blocks}'
initial_condition = 50e3
[]
[]
[Materials]
[simple_mat]
type = HeatConductionMaterial
thermal_conductivity = 34.6 # W/m/K
[]
[]
[Postprocessors]
[Tcore_avg]
type = ElementAverageValue
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${core_blocks}'
[]
[Trpv_avg]
type = ElementAverageValue
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${rpv_blocks}'
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = '${core_blocks}'
[]
[rpv_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = Tsolid
boundary = 'outer' # outer RVP
T_fluid = ${rpv_outer_Tinf}
htc = ${rpv_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(rpv_convective_out - ptot) / ptot'
pp_names = 'rpv_convective_out ptot'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = 'rpv_inner core_outer'
variable = 'Tsolid'
[]
[]
[Executioner]
type = Steady
petsc_options = '-snes_converged_reason -pc_svd_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -mat_mffd_err -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = ' lu superlu_dist 1e-5 NONZERO '
'1e-15'
snesmf_reuse_base = false
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_max_its = 100
line_search = none
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/transfers/coord_transform/rz-xyz/2d-rz.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 3
coord_type = RZ
beta_rotation = 90
[]
[Variables]
[u][]
[]
[AuxVariables]
[v][]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/secant/steady_main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[unorm]
type = ElementL2Norm
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'
fixed_point_max_its = 30
transformed_variables = 'u'
[]
[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
transformed_variables = 'v'
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_rz_cylinder.i)
rpv_core_gap_size = 0.2
core_outer_radius = 2
rpv_inner_radius = '${fparse 2 + rpv_core_gap_size}'
rpv_outer_radius = '${fparse 2.5 + rpv_core_gap_size}'
rpv_width = '${fparse rpv_outer_radius - rpv_inner_radius}'
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
[gmg]
type = CartesianMeshGenerator
dim = 2
dx = '${core_outer_radius} ${rpv_core_gap_size} ${rpv_width}'
ix = '400 1 100'
dy = 1
iy = '5'
[]
[set_block_id1]
type = SubdomainBoundingBoxGenerator
input = gmg
bottom_left = '0 0 0'
top_right = '${core_outer_radius} 1 0'
block_id = 1
location = INSIDE
[]
[rename_core_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = set_block_id1
primary_block = 1
paired_block = 0
new_boundary = 'core_outer'
[]
[set_block_id3]
type = SubdomainBoundingBoxGenerator
input = rename_core_bdy
bottom_left = '${rpv_inner_radius} 0 0'
top_right = '${rpv_outer_radius} 1 0'
block_id = 3
location = INSIDE
[]
[rename_inner_rpv_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = set_block_id3
primary_block = 3
paired_block = 0
new_boundary = 'rpv_inner'
[]
# comment out for test without gap
[2d_mesh]
type = BlockDeletionGenerator
input = rename_inner_rpv_bdy
block = 0
[]
allow_renumbering = false
[]
[Problem]
coord_type = RZ
[]
[Variables]
[Tsolid]
initial_condition = 500
[]
[]
[Kernels]
[heat_source]
type = CoupledForce
variable = Tsolid
block = '${core_blocks}'
v = power_density
[]
[heat_conduction]
type = HeatConduction
variable = Tsolid
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = Tsolid
boundary = 'right' # outer RPV
coefficient = ${rpv_outer_htc}
T_infinity = ${rpv_outer_Tinf}
[]
[]
[ThermalContact]
[RPV_gap]
type = GapHeatTransfer
gap_geometry_type = 'CYLINDER'
emissivity_primary = 0.8
emissivity_secondary = 0.8
variable = Tsolid
primary = 'core_outer'
secondary = 'rpv_inner'
gap_conductivity = 0.1
quadrature = true
[]
[]
[AuxVariables]
[power_density]
block = '${core_blocks}'
initial_condition = 50e3
[]
[]
[Materials]
[simple_mat]
type = HeatConductionMaterial
thermal_conductivity = 34.6 # W/m/K
[]
[]
[Postprocessors]
[Tcore_avg]
type = ElementAverageValue
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${core_blocks}'
[]
[Trpv_avg]
type = ElementAverageValue
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${rpv_blocks}'
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = '${core_blocks}'
[]
[rpv_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = Tsolid
boundary = 'right' # outer RVP
T_fluid = ${rpv_outer_Tinf}
htc = ${rpv_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(rpv_convective_out - ptot) / ptot'
pp_names = 'rpv_convective_out ptot'
[]
[flux_from_core] # converges to ptot as the mesh is refined
type = SideDiffusiveFluxIntegral
variable = Tsolid
boundary = core_outer
diffusivity = thermal_conductivity
[]
[flux_into_rpv] # converges to rpv_convective_out as the mesh is refined
type = SideDiffusiveFluxIntegral
variable = Tsolid
boundary = rpv_inner
diffusivity = thermal_conductivity
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = 'rpv_inner core_outer'
variable = Tsolid
[]
[]
[Executioner]
type = Steady
automatic_scaling = true
compute_scaling_once = false
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_max_its = 100
[Quadrature]
# order = fifth
side_order = seventh
[]
line_search = none
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/restart/restart_transient_from_steady/steady_with_2subs_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 3
xmax = 0.3
ymax = 0.3
[]
[AuxVariables]
[power_density]
[]
[]
[Variables]
[temp]
[]
[]
[Kernels]
[heat_conduction]
type = Diffusion
variable = temp
[]
[heat_source_fuel]
type = CoupledForce
variable = temp
v = power_density
[]
[]
[BCs]
[bc]
type = DirichletBC
variable = temp
boundary = '1 3'
value = 100
[]
[bc2]
type = NeumannBC
variable = temp
boundary = '0 2'
value = 10.0
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-7
nl_rel_tol = 1e-7
[]
[Postprocessors]
[temp_fuel_avg]
type = ElementAverageValue
variable = temp
execute_on = 'initial timestep_end'
[]
[pwr_density]
type = ElementIntegralVariablePostprocessor
variable = power_density
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
perf_graph = true
exodus = true
color = true
[]
(test/tests/multiapps/picard/steady_picard_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./v]
[../]
[]
[AuxVariables]
[./u]
[../]
[]
[Kernels]
[./diff_v]
type = Diffusion
variable = v
[../]
[./force_v]
type = CoupledForce
variable = v
v = u
[../]
[]
[BCs]
[./left_v]
type = DirichletBC
variable = v
boundary = left
value = 1
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[../]
[]
[Postprocessors]
[./vnorm]
type = ElementL2Norm
variable = v
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-14
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/multiapp_postprocessor_interpolation_transfer/multilevel_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./subsub_average]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = CoupledForce
variable = u
v = subsub_average
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Postprocessors]
[./sub_average]
type = ElementAverageValue
variable = u
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.3
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0 0.5 0.5 0'
input_files = multilevel_subsub.i
[../]
[]
[Transfers]
[./subsub_average]
type = MultiAppPostprocessorInterpolationTransfer
from_multi_app = sub
variable = subsub_average
postprocessor = subsub_average
[../]
[]
(modules/functional_expansion_tools/test/tests/errors/multiapp_incompatible_orders.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '36'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = multiapp_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(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/functional_expansion_tools/test/tests/standard_use/volume_coupled.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = volume_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(test/tests/restart/restart_transient_from_steady/restart_trans_with_2subs_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 3
xmax = 0.3
ymax = 0.3
[]
[AuxVariables]
[power_density]
[]
[]
[Variables]
[temp]
[]
[]
[Kernels]
[heat_conduction]
type = Diffusion
variable = temp
[]
[heat_ie]
type = TimeDerivative
variable = temp
[]
[heat_source_fuel]
type = CoupledForce
variable = temp
v = power_density
[]
[]
[BCs]
[bc]
type = DirichletBC
variable = temp
boundary = '1 3'
value = 100
[]
[bc2]
type = NeumannBC
variable = temp
boundary = '0 2'
value = 10.0
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
start_time = 0
end_time = 3
dt = 1.0
nl_abs_tol = 1e-7
nl_rel_tol = 1e-7
[]
[Postprocessors]
[temp_fuel_avg]
type = ElementAverageValue
variable = temp
block = '0'
execute_on = 'initial timestep_end'
[]
[pwr_density]
type = ElementIntegralVariablePostprocessor
block = '0'
variable = power_density
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
perf_graph = true
exodus = true
color = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_rz_cylinder_mortar.i)
rpv_core_gap_size = 0.2
core_outer_radius = 2
rpv_inner_radius = '${fparse 2 + rpv_core_gap_size}'
rpv_outer_radius = '${fparse 2.5 + rpv_core_gap_size}'
rpv_width = '${fparse rpv_outer_radius - rpv_inner_radius}'
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
[gmg]
type = CartesianMeshGenerator
dim = 2
dx = '${core_outer_radius} ${rpv_core_gap_size} ${rpv_width}'
ix = '400 1 100'
dy = 1
iy = '5'
[]
[set_block_id1]
type = SubdomainBoundingBoxGenerator
input = gmg
bottom_left = '0 0 0'
top_right = '${core_outer_radius} 1 0'
block_id = 1
location = INSIDE
[]
[rename_core_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = set_block_id1
primary_block = 1
paired_block = 0
new_boundary = 'core_outer'
[]
[set_block_id3]
type = SubdomainBoundingBoxGenerator
input = rename_core_bdy
bottom_left = '${rpv_inner_radius} 0 0'
top_right = '${rpv_outer_radius} 1 0'
block_id = 3
location = INSIDE
[]
[rename_inner_rpv_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = set_block_id3
primary_block = 3
paired_block = 0
new_boundary = 'rpv_inner'
[]
# comment out for test without gap
[2d_mesh]
type = BlockDeletionGenerator
input = rename_inner_rpv_bdy
block = 0
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = 'rpv_inner'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = 2d_mesh
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = 'core_outer'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
coord_type = RZ
[]
[Variables]
[Tsolid]
initial_condition = 500
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[Kernels]
[heat_source]
type = CoupledForce
variable = Tsolid
block = '${core_blocks}'
v = power_density
[]
[heat_conduction]
type = HeatConduction
variable = Tsolid
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = Tsolid
boundary = 'right' # outer RPV
coefficient = ${rpv_outer_htc}
T_infinity = ${rpv_outer_Tinf}
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = Tsolid
boundary = 'rpv_inner'
primary_emissivity = 0.8
secondary_emissivity = 0.8
[]
[conduction]
type = GapFluxModelConduction
temperature = Tsolid
boundary = 'rpv_inner'
gap_conductivity = 0.1
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = Tsolid
primary_boundary = 'core_outer'
primary_subdomain = 10000
secondary_boundary = 'rpv_inner'
secondary_subdomain = 10001
gap_flux_models = 'radiation conduction'
gap_geometry_type = 'CYLINDER'
[]
[]
[AuxVariables]
[power_density]
block = '${core_blocks}'
initial_condition = 50e3
[]
[]
[Materials]
[simple_mat]
type = HeatConductionMaterial
thermal_conductivity = 34.6 # W/m/K
[]
[]
[Postprocessors]
[Tcore_avg]
type = ElementAverageValue
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${core_blocks}'
[]
[Trpv_avg]
type = ElementAverageValue
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${rpv_blocks}'
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = '${core_blocks}'
[]
[rpv_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = Tsolid
boundary = 'right' # outer RVP
T_fluid = ${rpv_outer_Tinf}
htc = ${rpv_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(rpv_convective_out - ptot) / ptot'
pp_names = 'rpv_convective_out ptot'
[]
[flux_from_core] # converges to ptot as the mesh is refined
type = SideDiffusiveFluxIntegral
variable = Tsolid
boundary = core_outer
diffusivity = thermal_conductivity
[]
[flux_into_rpv] # converges to rpv_convective_out as the mesh is refined
type = SideDiffusiveFluxIntegral
variable = Tsolid
boundary = rpv_inner
diffusivity = thermal_conductivity
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = 'rpv_inner core_outer'
variable = Tsolid
[]
[]
[Executioner]
type = Steady
petsc_options = '-snes_converged_reason -pc_svd_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -mat_mffd_err -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = ' lu superlu_dist 1e-5 NONZERO '
'1e-15'
snesmf_reuse_base = false
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_max_its = 100
line_search = none
[]
[Outputs]
exodus = false
csv = true
[]
(modules/porous_flow/examples/multiapp_fracture_flow/diffusion_multiapp/matrix_app_heat.i)
# Heat energy from this fracture app is transferred to the matrix app
[Mesh]
[generate]
type = GeneratedMeshGenerator
dim = 1
nx = 100
xmin = 0
xmax = 50.0
[]
[]
[Variables]
[matrix_T]
[]
[]
[AuxVariables]
[heat_from_frac]
[]
[]
[Kernels]
[dot]
type = TimeDerivative
variable = matrix_T
[]
[matrix_diffusion]
type = Diffusion
variable = matrix_T
[]
[fromFrac]
type = CoupledForce
variable = matrix_T
v = heat_from_frac
[]
[]
[Preconditioning]
[entire_jacobian]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 100
end_time = 100
[]
[Outputs]
print_linear_residuals = false
[]
(test/tests/preconditioners/pbp/pbp_test_options.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
# init_unif_refine = 6
[]
[Variables]
active = 'u v'
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Preconditioning]
active = 'PBP'
[./PBP]
type = PBP
solve_order = 'u v'
preconditioner = 'LU LU'
off_diag_row = 'v'
off_diag_column = 'u'
petsc_options = '' # Test petsc options in PBP block
[../]
[]
[Kernels]
active = 'diff_u conv_v diff_v'
[./diff_u]
type = Diffusion
variable = u
[../]
[./conv_v]
type = CoupledForce
variable = v
v = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'left_u right_u left_v'
[./left_u]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 1
value = 100
[../]
[./left_v]
type = DirichletBC
variable = v
boundary = 3
value = 0
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = 1
value = 0
[../]
[]
[Executioner]
type = Steady
l_max_its = 1
nl_max_its = 1
solve_type = JFNK
[]
[Outputs]
file_base = out_dummy
exodus = true
[]
(test/tests/problems/eigen_problem/eigensolvers/ne_coupled_picard_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
elem_type = QUAD4
nx = 8
ny = 8
[]
[Variables]
[./T]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./power]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_T]
type = Diffusion
variable = T
[../]
[./src_T]
type = CoupledForce
variable = T
v = power
[../]
[]
[BCs]
[./homogeneousT]
type = DirichletBC
variable = T
boundary = '0 1 2 3'
value = 0
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
execute_on = 'timestep_end'
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder_mortar.i)
rpv_core_gap_size = 0.15
core_outer_radius = 2
rpv_inner_radius = '${fparse 2 + rpv_core_gap_size}'
rpv_outer_radius = '${fparse 2.5 + rpv_core_gap_size}'
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
[core_gap_rpv]
type = ConcentricCircleMeshGenerator
num_sectors = 10
radii = '${core_outer_radius} ${rpv_inner_radius} ${rpv_outer_radius}'
rings = '2 1 2'
has_outer_square = false
preserve_volumes = true
portion = full
[]
[rename_core_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = core_gap_rpv
primary_block = 1
paired_block = 2
new_boundary = 'core_outer'
[]
[rename_inner_rpv_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = rename_core_bdy
primary_block = 3
paired_block = 2
new_boundary = 'rpv_inner'
[]
[2d_mesh]
type = BlockDeletionGenerator
input = rename_inner_rpv_bdy
block = 2
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = 'rpv_inner'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = 2d_mesh
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = 'core_outer'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Variables]
[Tsolid]
initial_condition = 500
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[Kernels]
[heat_source]
type = CoupledForce
variable = Tsolid
block = '${core_blocks}'
v = power_density
[]
[heat_conduction]
type = HeatConduction
variable = Tsolid
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = Tsolid
boundary = 'outer' # outer RPV
coefficient = ${rpv_outer_htc}
T_infinity = ${rpv_outer_Tinf}
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = Tsolid
boundary = 'rpv_inner'
primary_emissivity = 0.8
secondary_emissivity = 0.8
[]
[conduction]
type = GapFluxModelConduction
temperature = Tsolid
boundary = 'rpv_inner'
gap_conductivity = 0.1
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = Tsolid
primary_boundary = 'core_outer'
primary_subdomain = 10000
secondary_boundary = 'rpv_inner'
secondary_subdomain = 10001
gap_flux_models = 'radiation conduction'
gap_geometry_type = 'CYLINDER'
[]
[]
[AuxVariables]
[power_density]
block = '${core_blocks}'
initial_condition = 50e3
[]
[]
[Materials]
[simple_mat]
type = HeatConductionMaterial
thermal_conductivity = 34.6 # W/m/K
[]
[]
[Postprocessors]
[Tcore_avg]
type = ElementAverageValue
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${core_blocks}'
[]
[Trpv_avg]
type = ElementAverageValue
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${rpv_blocks}'
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = '${core_blocks}'
[]
[rpv_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = Tsolid
boundary = 'outer' # outer RVP
T_fluid = ${rpv_outer_Tinf}
htc = ${rpv_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(rpv_convective_out - ptot) / ptot'
pp_names = 'rpv_convective_out ptot'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = 'rpv_inner core_outer'
variable = 'Tsolid'
[]
[]
[Executioner]
type = Steady
petsc_options = '-snes_converged_reason -pc_svd_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' lu superlu_dist 1e-5 NONZERO 1e-15'
snesmf_reuse_base = false
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_max_its = 100
line_search = none
[]
[Outputs]
exodus = false
csv = true
[]
(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
[]
(test/tests/mortar/continuity-2d-conforming/conforming_two_var.i)
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-conf.e
[]
[secondary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Functions]
[./exact_sln]
type = ParsedFunction
expression= y
[../]
[./ffn]
type = ParsedFunction
expression= 0
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./lm_u]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[../]
[./v]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./lm_v]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = ffn
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[./coupled_u]
type = CoupledForce
variable = v
v = u
[../]
[]
[Problem]
extra_tag_vectors = 'ref'
[]
[Constraints]
[./ced_u]
type = EqualValueConstraint
variable = lm_u
secondary_variable = u
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
absolute_value_vector_tags = 'ref'
[../]
[./ced_v]
type = EqualValueConstraint
variable = lm_v
secondary_variable = v
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
absolute_value_vector_tags = 'ref'
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = u
boundary = '1 2 3 4'
function = exact_sln
[../]
[./allv]
type = DirichletBC
variable = v
boundary = '1 2 3 4'
value = 0
[../]
[]
[Postprocessors]
[./l2_error]
type = ElementL2Error
variable = u
function = exact_sln
block = '1 2'
execute_on = 'initial timestep_end'
[../]
[./l2_v]
type = ElementL2Norm
variable = v
block = '1 2'
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
[./fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
l_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/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/multiapps/picard/picard_adaptive_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./v]
[../]
[]
[AuxVariables]
[./u]
[../]
[]
[Kernels]
[./diff_v]
type = Diffusion
variable = v
[../]
[./force_v]
type = CoupledForce
variable = v
v = u
[../]
[]
[BCs]
[./left_v]
type = DirichletBC
variable = v
boundary = left
value = 1
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 20
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-10
[./TimeStepper]
type = IterationAdaptiveDT
cutback_factor = 0.4
growth_factor = 1.2
optimal_iterations = 6
dt = 0.1
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/coord_transform/main-app.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 1
xmax = 3
nx = 20
ny = 10
[]
[Variables]
[u][]
[]
[AuxVariables]
[v][]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '1 0 0'
input_files = 'sub-app.i'
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[from_sub]
type = MultiAppNearestNodeTransfer
from_multi_app = sub
source_variable = v
variable = v
execute_on = 'timestep_begin'
[]
[]
(test/tests/multiapps/picard_sub_cycling/fully_coupled.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[./v]
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[./force_u]
type = CoupledForce
variable = u
v = v
[../]
[./force_v]
type = CoupledForce
variable = v
v = u
[../]
[./td_v]
type = TimeDerivative
variable = v
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left_v]
type = DirichletBC
variable = v
boundary = left
value = 1
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-14
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/picard_failure/picard_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_abs_tol = 1e-14
[]
[Outputs]
exodus = true
[]
[MultiApps]
active = 'sub' # will be modified by CLI overrides
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = picard_sub.i
[]
[sub_no_fail]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = picard_sub_no_fail.i
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(test/tests/restart/restart_transient_from_steady/steady_with_sub_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[AuxVariables]
[./power_density]
[../]
[]
[Variables]
[./temp]
[../]
[]
[Kernels]
[./heat_conduction]
type = Diffusion
variable = temp
[../]
[./heat_ie]
type = TimeDerivative
variable = temp
[../]
[./heat_source_fuel]
type = CoupledForce
variable = temp
v = power_density
[../]
[]
[BCs]
[bc]
type = DirichletBC
variable = temp
boundary = '0 1 2 3'
value = 450
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
start_time = 0
end_time = 10
dt = 1.0
nl_abs_tol = 1e-7
nl_rel_tol = 1e-7
[]
[Postprocessors]
[./temp_fuel_avg]
type = ElementAverageValue
variable = temp
execute_on = 'initial timestep_end'
[../]
[./pwr_density]
type = ElementIntegralVariablePostprocessor
variable = power_density
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
perf_graph = true
exodus = true
color = true
[]
(test/tests/multiapps/picard_multilevel/2level_picard/sub_level2.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
[]
[Variables]
[w]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[time_derivative]
type = TimeDerivative
variable = w
[]
[diffusion]
type = Diffusion
variable = w
[]
[source]
type = CoupledForce
variable = w
v = v
[]
[]
[BCs]
[dirichlet0]
type = DirichletBC
variable = w
boundary = '3'
value = 0
[]
[dirichlet]
type = DirichletBC
variable = w
boundary = '1'
value = 100
[]
[]
[Postprocessors]
[avg_v]
type = ElementAverageValue
variable = v
execute_on = 'initial timestep_begin timestep_end'
[]
[avg_w]
type = ElementAverageValue
variable = w
execute_on = 'initial timestep_begin timestep_end'
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
end_time = 0.1
dt = 0.02
[]
[Outputs]
exodus = true
[screen]
type = Console
execute_postprocessors_on= "timestep_end timestep_begin"
[]
[]
(test/tests/bcs/coupled_dirichlet_bc/coupled_dirichlet_bc.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./coupled_force_u]
type = CoupledForce
variable = u
v = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
# BCs on left
# u: u=1
# v: v=2
[./left_u]
type = DirichletBC
variable = u
boundary = 3
value = 1
[../]
[./left_v]
type = DirichletBC
variable = v
boundary = 3
value = 2
[../]
# BCs on right
# u: c*u + u^2 + v^2 = 9
# v: no flux
[./right_u]
type = CoupledDirichletBC
variable = u
boundary = 1
value = 9
v=v
[../]
[]
[Preconditioning]
[./precond]
type = SMP
# 'full = true' is required for computeOffDiagJacobian() to get
# called. If you comment this out, you should see that this test
# requires a different number of linear and nonlinear iterations.
full = true
[../]
[]
[Executioner]
type = Steady
# solve_type = 'PJFNK'
solve_type = 'NEWTON'
# Uncomment next line to disable line search. With line search enabled, you must use full=true with Newton or else it will fail.
# line_search = 'none'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_rel_tol = 1e-10
l_tol = 1e-12
nl_max_its = 10
[]
[Outputs]
file_base = out
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/variables/output_vars_hidden_shown_check.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = SECOND
family = LAGRANGE
[../]
# ODE variables
[./x]
family = SCALAR
order = FIRST
initial_condition = 1
[../]
[./y]
family = SCALAR
order = FIRST
initial_condition = 2
[../]
[]
[AuxVariables]
[./elemental]
order = CONSTANT
family = MONOMIAL
[../]
[./elemental_restricted]
order = CONSTANT
family = MONOMIAL
[../]
[./nodal]
order = FIRST
family = LAGRANGE
[../]
[./nodal_restricted]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./conv_u]
type = CoupledForce
variable = u
v = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[AuxKernels]
[./elemental]
type = ConstantAux
variable = elemental
value = 1
[../]
[./elemental_restricted]
type = ConstantAux
variable = elemental_restricted
value = 1
[../]
[./nodal]
type = ConstantAux
variable = elemental
value = 2
[../]
[./nodal_restricted]
type = ConstantAux
variable = elemental_restricted
value = 2
[../]
[]
[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]
active = 'left_u right_u left_v'
[./left_u]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 3
value = 9
[../]
[./left_v]
type = DirichletBC
variable = v
boundary = 1
value = 5
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = 2
value = 2
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.01
num_steps = 10
[]
[Outputs]
file_base = out_hidden
exodus = true
hide = 'u elemental nodal x'
show = u
[]
(test/tests/auxkernels/element_aux_var/element_aux_var_test.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[]
[AuxVariables]
[one]
order = CONSTANT
family = MONOMIAL
[]
[five]
order = FIRST
family = LAGRANGE
[]
[three]
order = CONSTANT
family = MONOMIAL
[]
[coupled_nine]
order = CONSTANT
family = MONOMIAL
[]
[coupled_fifteen]
order = CONSTANT
family = MONOMIAL
[]
[coupled]
order = CONSTANT
family = MONOMIAL
[]
[coupled_nl]
order = CONSTANT
family = MONOMIAL
[]
[coupled_grad_nl]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
# Coupling of nonlinear to Aux
[diff]
type = Diffusion
variable = u
[]
[force]
type = CoupledForce
variable = u
v = one
[]
[]
[AuxKernels]
# Simple Aux Kernel
# Shows coupling of Element to Nodal
# Shows coupling of Element to non-linear
# Shows coupling of Element to non-linear grad
[constant]
variable = one
type = ConstantAux
value = 1
[]
[coupled_nine]
variable = coupled_nine
type = CoupledAux
value = 3
operator = *
coupled = three
[]
[coupled_three]
variable = three
type = CoupledAux
value = 2
operator = +
coupled = one
[]
[coupled_fifteen]
variable = coupled_fifteen
type = CoupledAux
value = 5
operator = *
coupled = three
[]
[coupled]
variable = coupled
type = CoupledAux
value = 2
coupled = five
[]
[coupled_nl]
variable = coupled_nl
type = CoupledAux
value = 2
coupled = u
[]
[coupled_grad_nl]
variable = coupled_grad_nl
type = CoupledGradAux
grad = '2 0 0'
coupled = u
[]
[five]
type = ConstantAux
variable = five
boundary = '3 1'
value = 5
[]
[]
[BCs]
[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]
type = Exodus
elemental_as_nodal = true
[]
[]
(test/tests/userobjects/side_user_object_no_boundary_error/lower_d_side_boundary.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
[]
[uhat]
order = CONSTANT
family = MONOMIAL
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[lambda]
order = CONSTANT
family = MONOMIAL
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[lambdab]
order = CONSTANT
family = MONOMIAL
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[]
[AuxVariables]
[v]
order = CONSTANT
family = MONOMIAL
block = 0
initial_condition = '1'
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
block = 0
[]
[source]
type = CoupledForce
variable = u
v = v
coef = '1'
block = 0
[]
[reaction]
type = Reaction
variable = uhat
rate = '1'
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[uhat_coupled]
type = CoupledForce
variable = uhat
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
v = lambdab
coef = '1'
[]
[]
[DGKernels]
[surface]
type = HFEMDiffusion
variable = u
lowerd_variable = lambda
[]
[]
[BCs]
[all]
type = HFEMDirichletBC
boundary = 'left right top bottom'
variable = u
lowerd_variable = lambdab
uhat = uhat
[]
[]
[Problem]
solve = false
[]
[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'
[]
[Postprocessors]
[avg]
type = SideAverageValue
boundary = 'left right top bottom'
[]
[]
(test/tests/quadrature/qweights/positive_qweights.i)
[Mesh]
[./square]
type = FileMeshGenerator
file = cube.e
[../]
[]
[Variables]
[u][]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[heat_source_fuel]
type = CoupledForce
variable = u
v = power_density
[]
[]
[BCs]
[robin]
type = RobinBC
variable = u
boundary = '1 2 3 4 5 6'
[]
[]
[AuxVariables]
[power_density]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[source]
type = ParsedAux
variable = power_density
use_xyzt = true
expression = 'if(x>0.1,100,1)'
[]
[]
[Executioner]
type = Steady
[./Quadrature]
allow_negative_qweights = false
[../]
solve_type = 'NEWTON'
petsc_options_iname = "-pc_type"
petsc_options_value = "hypre"
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/picard_sub_cycling/picard_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./v]
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[./force_u]
type = CoupledForce
variable = u
v = v
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 1
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]
[./sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = picard_sub.i
sub_cycling = true
interpolate_transfers = true
[../]
[]
[Transfers]
[./v_from_sub]
type = MultiAppNearestNodeTransfer
from_multi_app = sub
source_variable = v
variable = v
[../]
[./u_to_sub]
type = MultiAppNearestNodeTransfer
to_multi_app = sub
source_variable = u
variable = u
[../]
[]
(modules/functional_expansion_tools/test/tests/errors/multiapp_bad_function_series.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[./AnotherFunction]
type = ConstantFunction
value = -1
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = multiapp_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = AnotherFunction
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/external_petsc_solver/test/tests/external_petsc_problem/moose_as_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./v]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[./cf]
type = CoupledForce
coef = 10000
variable = u
v=v
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[./picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[../]
[]
(test/tests/transfers/coord_transform/both-transformed/pp_interpolation/main-app.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = -1
ymax = 0
nx = 10
ny = 10
alpha_rotation = 90
[]
[Variables]
[u][]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = CoupledForce
variable = u
v = new_val_x
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
verbose = true
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = CentroidMultiApp
app_type = MooseTestApp
input_files = 'sub-app.i'
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[send]
type = MultiAppVariableValueSamplePostprocessorTransfer
to_multi_app = sub
source_variable = x_nodal
postprocessor = rec_x
[]
[send_elem]
type = MultiAppVariableValueSamplePostprocessorTransfer
to_multi_app = sub
source_variable = y_elem
postprocessor = rec_y
[]
[get_back]
type = MultiAppPostprocessorInterpolationTransfer
from_multi_app = sub
variable = new_val_x
postprocessor = rec_x
[]
[get_back_elem]
type = MultiAppPostprocessorInterpolationTransfer
from_multi_app = sub
variable = new_val_y_elem
postprocessor = rec_y
[]
[]
[AuxVariables]
[x_nodal]
[InitialCondition]
type = FunctionIC
function = 'x'
[]
[]
[y_elem]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = 'y'
[]
[]
[new_val_x]
[]
[new_val_y_elem]
order = CONSTANT
family = MONOMIAL
[]
[]
(test/tests/preconditioners/fsp/unside-by-var.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[]
[]
[Variables]
[u][]
[v][]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
[]
[conv_v]
type = CoupledForce
variable = v
v = u
[]
[diff_v]
type = Diffusion
variable = v
[]
[]
[BCs]
[left_u]
type = DirichletBC
variable = u
boundary = 3
value = 0
[]
[right_u]
type = DirichletBC
variable = u
boundary = 1
value = 100
[]
[left_v]
type = DirichletBC
variable = v
boundary = 3
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = 1
value = 0
[]
[]
[Executioner]
type = Steady
[]
[Preconditioning]
[FSP]
type = FSP
topsplit = 'top'
[top]
splitting = 'u_diri rest'
splitting_type = multiplicative
petsc_options_iname = '-ksp_type'
petsc_options_value = 'fgmres'
[]
[u_diri]
vars = 'u'
sides = 'left right'
[]
[rest]
unside_by_var_var_name = 'u u'
unside_by_var_boundary_name = 'left right'
[]
[]
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/multiapp_high_order_variable_transfer/sub_L2_Lagrange_conservative.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmax = 0.5
ymax = 0.5
[]
[AuxVariables]
[./power_density]
family = L2_LAGRANGE
order = FIRST
[../]
[]
[Variables]
[./temp]
[../]
[]
[Kernels]
[./heat_conduction]
type = Diffusion
variable = temp
[../]
[./heat_source_fuel]
type = CoupledForce
variable = temp
v = power_density
[../]
[]
[BCs]
[bc]
type = DirichletBC
variable = temp
boundary = '0 1 2 3'
value = 450
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-7
nl_rel_tol = 1e-7
[]
[Postprocessors]
[./temp_fuel_avg]
type = ElementAverageValue
variable = temp
[../]
[./pwr_density]
type = ElementIntegralVariablePostprocessor
block = '0'
variable = power_density
execute_on = 'transfer'
[../]
[]
[Outputs]
perf_graph = true
exodus = true
color = true
[]
(test/tests/multiapps/picard_sub_cycling/picard_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./v]
[../]
[]
[AuxVariables]
[./u]
[../]
[]
[Kernels]
[./diff_v]
type = Diffusion
variable = v
[../]
[./force_v]
type = CoupledForce
variable = v
v = u
[../]
[./td_v]
type = TimeDerivative
variable = v
[../]
[]
[BCs]
[./left_v]
type = DirichletBC
variable = v
boundary = left
value = 1
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/picard/steady_picard_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[unorm]
type = ElementL2Norm
variable = u
execute_on = 'initial timestep_end'
[]
[vnorm]
type = ElementL2Norm
variable = v
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Steady
nl_abs_tol = 1e-14
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 10
fixed_point_rel_tol = 1e-6
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
input_files = steady_picard_sub.i
no_backup_and_restore = true
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(test/tests/multiapps/picard_multilevel/fullsolve_multilevel/sub_level1.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[u]
[]
[w]
[]
[]
[Kernels]
[time_derivative]
type = TimeDerivative
variable = v
[]
[diffusion]
type = Diffusion
variable = v
[]
[source]
type = CoupledForce
variable = v
v = u
[]
[]
[BCs]
[dirichlet0]
type = DirichletBC
variable = v
boundary = '0'
value = 0
[]
[dirichlet]
type = DirichletBC
variable = v
boundary = '2'
value = 100
[]
[]
[Postprocessors]
[avg_u]
type = ElementAverageValue
variable = u
execute_on = 'initial linear'
[]
[avg_v]
type = ElementAverageValue
variable = v
execute_on = 'initial linear'
[]
[avg_w]
type = ElementAverageValue
variable = w
execute_on = 'initial linear'
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
end_time = 0.1
dt = 0.02
[]
[MultiApps]
[level2-]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = sub_level2.i
execute_on = 'timestep_end'
# sub_cycling = true
[]
[]
[Transfers]
[v_to_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = v
variable = v
to_multi_app = level2-
execute_on = 'timestep_end'
[]
[w_from_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = w
variable = w
from_multi_app = level2-
execute_on = 'timestep_end'
[]
[]
[Outputs]
exodus = true
perf_graph = true
# print_linear_residuals = false
[]
(modules/combined/examples/optimization/2d_mbb_pde.i)
vol_frac = 0.5
E0 = 1
Emin = 1e-8
power = 2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 150
ny = 50
xmin = 0
xmax = 30
ymin = 0
ymax = 10
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold_y
nodes = 0
[]
[push]
type = ExtraNodesetGenerator
input = node
new_boundary = push
coord = '30 10 0'
[]
[]
[Variables]
[Dc]
initial_condition = -1.0
[]
[]
[AuxVariables]
[Emin]
family = MONOMIAL
order = CONSTANT
initial_condition = ${Emin}
[]
[power]
family = MONOMIAL
order = CONSTANT
initial_condition = ${power}
[]
[E0]
family = MONOMIAL
order = CONSTANT
initial_condition = ${E0}
[]
[sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[AuxKernel]
type = MaterialRealAux
variable = sensitivity
property = sensitivity
execute_on = LINEAR
[]
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[Dc_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[AuxKernel]
type = SelfAux
variable = Dc_elem
v = Dc
execute_on = 'TIMESTEP_END'
[]
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[Kernels]
[diffusion]
type = FunctionDiffusion
variable = Dc
function = 0.15 # radius coeff
[]
[potential]
type = Reaction
variable = Dc
[]
[source]
type = CoupledForce
variable = Dc
v = sensitivity
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_y
boundary = hold_y
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[boundary_penalty]
type = ADRobinBC
variable = Dc
boundary = 'left top'
coefficient = 10
[]
[boundary_penalty_right]
type = ADRobinBC
variable = Dc
boundary = 'right'
coefficient = 10
[]
[]
[NodalKernels]
[push]
type = NodalGravity
variable = disp_y
boundary = push
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'Emin mat_den power E0'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
incremental = false
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[update]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
line_search = none
nl_abs_tol = 1e-4
l_max_its = 200
start_time = 0.0
dt = 1.0
num_steps = 70
[]
[Outputs]
[out]
type = Exodus
execute_on = 'INITIAL TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Controls]
[first_period]
type = TimePeriod
start_time = 0.0
end_time = 10
enable_objects = 'BCs::boundary_penalty_right'
execute_on = 'initial timestep_begin'
[]
[]
(test/tests/multiapps/picard/fully_coupled.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[./v]
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[./force_u]
type = CoupledForce
variable = u
v = v
[../]
[./force_v]
type = CoupledForce
variable = v
v = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[./left_v]
type = DirichletBC
variable = v
boundary = left
value = 1
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 20
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/kernels/hfem/lower-d-volumes.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
[]
[uhat]
order = CONSTANT
family = MONOMIAL
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[lambda]
order = CONSTANT
family = MONOMIAL
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[lambdab]
order = CONSTANT
family = MONOMIAL
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[]
[AuxVariables]
[v]
order = CONSTANT
family = MONOMIAL
block = 0
initial_condition = '1'
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
block = 0
[]
[source]
type = CoupledForce
variable = u
v = v
coef = '1'
block = 0
[]
[reaction]
type = Reaction
variable = uhat
rate = '1'
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[uhat_coupled]
type = CoupledForce
variable = uhat
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
v = lambdab
coef = '1'
[]
[]
[DGKernels]
[surface]
type = TestLowerDVolumes
variable = u
lowerd_variable = lambda
l = 1
n = 3
[]
[]
[BCs]
[all]
type = HFEMDirichletBC
boundary = 'left right top bottom'
variable = u
lowerd_variable = lambdab
uhat = uhat
[]
[]
[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/multiapps/picard_multilevel/fullsolve_multilevel/sub_level2.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
[]
[Variables]
[w]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[time_derivative]
type = TimeDerivative
variable = w
[]
[diffusion]
type = Diffusion
variable = w
[]
[source]
type = CoupledForce
variable = w
v = v
[]
[]
[BCs]
[dirichlet]
type = DirichletBC
variable = w
boundary = '0'
value = 0
[]
[]
[Postprocessors]
[avg_v]
type = ElementAverageValue
variable = v
execute_on = 'initial linear'
[]
[avg_w]
type = ElementAverageValue
variable = w
execute_on = 'initial linear'
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
end_time = 0.1
dt = 0.02
# steady_state_detection = true
[]
[Outputs]
exodus = true
# print_linear_residuals = false
[]
(modules/functional_expansion_tools/examples/3D_volumetric_Cartesian_different_submesh/main.i)
# Derived from the example '3D_volumetric_Cartesian' with the following differences:
#
# 1) The number of x and y divisions in the sub app is not the same as the master app
# 2) The subapp mesh is skewed in x and z
[Mesh]
type = GeneratedMesh
dim = 3
xmin = 0.0
xmax = 10.0
nx = 15
ymin = 1.0
ymax = 11.0
ny = 25
zmin = 2.0
zmax = 12.0
nz = 35
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'top bottom left right front back'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3 4 5'
physical_bounds = '0.0 10.0 1.0 11.0 2.0 12.0'
x = Legendre
y = Legendre
z = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/combined/test/tests/optimization/compliance_sensitivity/3d_mbb.i)
vol_frac = 0.5
E0 = 1
Emin = 1e-8
power = 3
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 3
nx = 30
ny = 10
nz = 10
xmin = 0
xmax = 30
ymin = 0
ymax = 10
zmin = 0
zmax = 10
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold_y
coord = '0 0 0; 0 0 10'
[]
[push]
type = ExtraNodesetGenerator
input = node
new_boundary = push
coord = '30 10 5'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[Dc]
initial_condition = -1.0
[]
[]
[AuxVariables]
[sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[AuxKernel]
type = MaterialRealAux
variable = sensitivity
property = sensitivity
execute_on = LINEAR
[]
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[Dc_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[AuxKernel]
type = SelfAux
variable = Dc_elem
v = Dc
execute_on = 'TIMESTEP_END'
[]
[]
[mat_den_nodal]
family = L2_LAGRANGE
order = FIRST
initial_condition = ${vol_frac}
[AuxKernel]
type = SelfAux
execute_on = TIMESTEP_END
variable = mat_den_nodal
v = mat_den
[]
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[Kernels]
[diffusion]
type = FunctionDiffusion
variable = Dc
function = 0.15 # radius coeff
[]
[potential]
type = Reaction
variable = Dc
[]
[source]
type = CoupledForce
variable = Dc
v = sensitivity
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_y
boundary = hold_y
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[boundary_penalty]
type = ADRobinBC
variable = Dc
boundary = 'left top front back'
coefficient = 10
[]
[boundary_penalty_right]
type = ADRobinBC
variable = Dc
boundary = 'right'
coefficient = 10
[]
[]
[NodalKernels]
[push]
type = NodalGravity
variable = disp_y
boundary = push
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
incremental = false
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[update]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
line_search = none
nl_abs_tol = 1e-4
l_max_its = 200
start_time = 0.0
dt = 1.0
num_steps = 2
[]
[Outputs]
[out]
type = CSV
execute_on = 'INITIAL TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
[]
[]
[Controls]
[first_period]
type = TimePeriod
start_time = 0.0
end_time = 10
enable_objects = 'BCs::boundary_penalty_right'
execute_on = 'initial timestep_begin'
[]
[]
(modules/functional_expansion_tools/test/tests/standard_use/multiapp_print_coefficients.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
print_when_set = true # Print coefficients when a MultiAppFXTransfer is executed
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
print_state = true # Print after the FX coefficients are computer
print_when_set = true # Print coefficients when a MultiAppFXTransfer is executed
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = multiapp_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(test/tests/misc/check_error/coupling_scalar_into_field.i)
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./u]
[../]
[./a]
family = SCALAR
order = FIRST
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./coupled]
type = CoupledForce
variable = u
# this should trigger an error message, 'v' should a field variable
v = a
[../]
[]
[ScalarKernels]
[./alpha]
type = AlphaCED
variable = a
value = 1
[../]
[]
[BCs]
[./all]
type = DirichletBC
boundary = 'left right top bottom'
variable = u
value = 0
[../]
[]
[Executioner]
type = Steady
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder.i)
rpv_core_gap_size = 0.15
core_outer_radius = 2
rpv_inner_radius = '${fparse 2 + rpv_core_gap_size}'
rpv_outer_radius = '${fparse 2.5 + rpv_core_gap_size}'
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
[core_gap_rpv]
type = ConcentricCircleMeshGenerator
num_sectors = 10
radii = '${core_outer_radius} ${rpv_inner_radius} ${rpv_outer_radius}'
rings = '2 1 2'
has_outer_square = false
preserve_volumes = true
portion = full
[]
[rename_core_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = core_gap_rpv
primary_block = 1
paired_block = 2
new_boundary = 'core_outer'
[]
[rename_inner_rpv_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = rename_core_bdy
primary_block = 3
paired_block = 2
new_boundary = 'rpv_inner'
[]
[2d_mesh]
type = BlockDeletionGenerator
input = rename_inner_rpv_bdy
block = 2
[]
allow_renumbering = false
[]
[Variables]
[Tsolid]
initial_condition = 500
[]
[]
[Kernels]
[heat_source]
type = CoupledForce
variable = Tsolid
block = '${core_blocks}'
v = power_density
[]
[heat_conduction]
type = HeatConduction
variable = Tsolid
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = Tsolid
boundary = 'outer' # outer RPV
coefficient = ${rpv_outer_htc}
T_infinity = ${rpv_outer_Tinf}
[]
[]
[ThermalContact]
[RPV_gap]
type = GapHeatTransfer
gap_geometry_type = 'CYLINDER'
emissivity_primary = 0.8
emissivity_secondary = 0.8
variable = Tsolid
primary = 'core_outer'
secondary = 'rpv_inner'
gap_conductivity = 0.1
quadrature = true
cylinder_axis_point_1 = '0 0 0'
cylinder_axis_point_2 = '0 0 5'
[]
[]
[AuxVariables]
[power_density]
block = '${core_blocks}'
initial_condition = 50e3
[]
[]
[Materials]
[simple_mat]
type = HeatConductionMaterial
thermal_conductivity = 34.6 # W/m/K
[]
[]
[Postprocessors]
[Tcore_avg]
type = ElementAverageValue
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${core_blocks}'
[]
[Trpv_avg]
type = ElementAverageValue
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${rpv_blocks}'
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = '${core_blocks}'
[]
[rpv_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = Tsolid
boundary = 'outer' # outer RVP
T_fluid = ${rpv_outer_Tinf}
htc = ${rpv_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(rpv_convective_out - ptot) / ptot'
pp_names = 'rpv_convective_out ptot'
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = 'rpv_inner core_outer'
variable = Tsolid
[]
[]
[Executioner]
type = Steady
automatic_scaling = true
compute_scaling_once = false
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_max_its = 100
[Quadrature]
side_order = seventh
[]
line_search = none
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/multiapps/picard_catch_up/sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]
[Variables]
[./v]
[../]
[]
[AuxVariables]
[./u]
[../]
[]
[Kernels]
[./diff_v]
type = Diffusion
variable = v
[../]
[./force_v]
type = CoupledForce
variable = v
v = u
[../]
[./nan]
type = NanAtCountKernel
variable = v
count = 32
[../]
[]
[BCs]
[./left_v]
type = DirichletBC
variable = v
preset = false
boundary = left
value = 1
[../]
[./right_v]
type = FunctionDirichletBC
variable = v
preset = false
boundary = right
function = 't + 1'
[../]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-10
snesmf_reuse_base = false
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/bcs/advection_bc/advection_bc.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 10.0
nx = 100
[]
[Variables]
[./phi]
[../]
[]
[AuxVariables]
[./vx]
[../]
[./force]
[../]
[]
[ICs]
[./vx]
type = FunctionIC
variable = vx
function = vx_function
[../]
[./force]
type = FunctionIC
variable = force
function = forcing
[../]
[]
[Kernels]
[./advection]
type = MassConvectiveFlux
variable = phi
vel_x = vx
[../]
[./rhs]
type = CoupledForce
variable = phi
v = force
[../]
[]
[BCs]
[./inflow_enthalpy]
type = DirichletBC
variable = phi
boundary = 'left'
value = 1
[../]
[./outflow_term]
type = AdvectionBC
variable = phi
velocity_vector = 'vx'
boundary = 'right'
[../]
[]
[Functions]
[./vx_function]
type = ParsedFunction
expression = '1 + x * x'
[../]
[./forcing]
type = ParsedFunction
expression = 'x'
[../]
[./analytical]
type = ParsedFunction
expression = '(1 + 0.5 * x * x) / (1 + x * x)'
[../]
[]
[Postprocessors]
[./error]
type = ElementL2Error
variable = phi
function = analytical
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
perf_graph = true
[]
(test/tests/kernels/array_kernels/standard_save_in.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0.5 0.5 0'
top_right = '1 1 0'
block_id = 1
[]
[]
[Variables]
[u_0]
order = FIRST
family = L2_LAGRANGE
[]
[u_1]
order = FIRST
family = L2_LAGRANGE
[]
[]
[AuxVariables]
[u_diff_save_in_0]
order = FIRST
family = L2_LAGRANGE
[]
[u_diff_save_in_1]
order = FIRST
family = L2_LAGRANGE
[]
[u_vacuum_save_in_0]
order = FIRST
family = L2_LAGRANGE
[]
[u_vacuum_save_in_1]
order = FIRST
family = L2_LAGRANGE
[]
[u_dg_save_in_0]
order = FIRST
family = L2_LAGRANGE
[]
[u_dg_save_in_1]
order = FIRST
family = L2_LAGRANGE
[]
[u_diff_diag_save_in_0]
order = FIRST
family = L2_LAGRANGE
[]
[u_diff_diag_save_in_1]
order = FIRST
family = L2_LAGRANGE
[]
[u_vacuum_diag_save_in_0]
order = FIRST
family = L2_LAGRANGE
[]
[u_vacuum_diag_save_in_1]
order = FIRST
family = L2_LAGRANGE
[]
[u_dg_diag_save_in_0]
order = FIRST
family = L2_LAGRANGE
[]
[u_dg_diag_save_in_1]
order = FIRST
family = L2_LAGRANGE
[]
[]
[Kernels]
[diff0]
type = MatCoefDiffusion
variable = u_0
conductivity = dc
save_in = u_diff_save_in_0
diag_save_in = u_diff_diag_save_in_0
[]
[diff1]
type = Diffusion
variable = u_1
save_in = u_diff_save_in_1
diag_save_in = u_diff_diag_save_in_1
[]
[reaction0]
type = CoefReaction
variable = u_0
[]
[reaction1]
type = CoefReaction
variable = u_1
[]
[reaction01]
type = CoupledForce
variable = u_1
v = u_0
coef = 0.1
[]
[]
[DGKernels]
[dgdiff0]
type = DGDiffusion
variable = u_0
diff = dc
sigma = 4
epsilon = 1
save_in = u_dg_save_in_0
diag_save_in = u_dg_diag_save_in_0
[]
[dgdiff1]
type = DGDiffusion
variable = u_1
sigma = 4
epsilon = 1
save_in = u_dg_save_in_1
diag_save_in = u_dg_diag_save_in_1
[]
[]
[BCs]
[left0]
type = VacuumBC
variable = u_0
boundary = 1
save_in = u_vacuum_save_in_0
diag_save_in = u_vacuum_diag_save_in_0
[]
[left1]
type = VacuumBC
variable = u_1
boundary = 1
save_in = u_vacuum_save_in_1
diag_save_in = u_vacuum_diag_save_in_1
[]
[right0]
type = PenaltyDirichletBC
variable = u_0
boundary = 2
value = 1
penalty = 4
[]
[right1]
type = PenaltyDirichletBC
variable = u_1
boundary = 2
value = 2
penalty = 4
[]
[]
[Materials]
[dc0]
type = GenericConstantMaterial
block = 0
prop_names = dc
prop_values = 1
[]
[dc1]
type = GenericConstantMaterial
block = 1
prop_names = dc
prop_values = 2
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[intu0]
type = ElementIntegralVariablePostprocessor
variable = u_0
[]
[intu1]
type = ElementIntegralVariablePostprocessor
variable = u_1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
file_base = array_save_in_out
exodus = true
[]
(test/tests/kernels/ad_coupled_force/fe_test.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[]
[]
[Variables]
[u]
[]
[v]
[]
[]
[Kernels]
[diff_u]
type = ADDiffusion
variable = u
[]
[force_u]
type = ADCoupledForce
variable = u
v = v
[]
[diff_v]
type = ADDiffusion
variable = v
[]
[]
[BCs]
[left_u]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right_u]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 5
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 3
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
(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/outputs/console/multiapp/picard_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[u]
[]
[]
[Kernels]
[diff_v]
type = Diffusion
variable = v
[]
[force_v]
type = CoupledForce
variable = v
v = u
[]
[]
[BCs]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 1
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-10
[]
(test/tests/transfers/coord_transform/both-transformed/nearest-node/main-app.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = -1
ymax = 0
nx = 10
ny = 10
alpha_rotation = 90
[]
[Variables]
[u][]
[]
[AuxVariables]
[v][]
[v_elem]
order = CONSTANT
family = MONOMIAL
[]
[w][]
[w_elem]
order = CONSTANT
family = MONOMIAL
[]
[]
[ICs]
[w]
type = FunctionIC
function = 'cos(x)*sin(y)'
variable = w
[]
[w_elem]
type = FunctionIC
function = 'cos(x)*sin(y)'
variable = w_elem
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
verbose = true
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = 'sub-app.i'
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[from_sub]
type = MultiAppNearestNodeTransfer
from_multi_app = sub
source_variable = v
variable = v
execute_on = 'timestep_begin'
[]
[from_sub_elem]
type = MultiAppNearestNodeTransfer
from_multi_app = sub
source_variable = v_elem
variable = v_elem
execute_on = 'timestep_begin'
[]
[to_sub]
type = MultiAppNearestNodeTransfer
to_multi_app = sub
source_variable = w
variable = w
execute_on = 'timestep_begin'
[]
[to_sub_elem]
type = MultiAppNearestNodeTransfer
to_multi_app = sub
source_variable = w_elem
variable = w_elem
execute_on = 'timestep_begin'
[]
[]
(modules/combined/test/tests/optimization/optimization_density_update/top_opt_3d_pde_filter.i)
vol_frac = 0.4
E0 = 1e5
Emin = 1e-4
power = 2
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 3
nx = 24
ny = 12
nz = 12
xmin = 0
xmax = 20
ymin = 0
ymax = 10
zmin = 0
zmax = 10
[]
[middle_bottom_left_edge]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = pull
coord = '0 0 5'
[]
[]
[Variables]
[Dc]
initial_condition = -1.0
[]
[]
[AuxVariables]
[sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[AuxKernel]
type = MaterialRealAux
variable = sensitivity
property = sensitivity
execute_on = LINEAR
[]
[]
[compliance]
family = MONOMIAL
order = CONSTANT
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[Dc_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[AuxKernel]
type = SelfAux
variable = Dc_elem
v = Dc
execute_on = 'TIMESTEP_END'
[]
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[Kernels]
[diffusion]
type = FunctionDiffusion
variable = Dc
function = 0.05
[]
[potential]
type = Reaction
variable = Dc
[]
[source]
type = CoupledForce
variable = Dc
v = sensitivity
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_y
boundary = right
value = 0.0
[]
[no_z]
type = DirichletBC
variable = disp_z
boundary = right
value = 0.0
[]
[boundary_penalty]
type = ADRobinBC
variable = Dc
boundary = 'left top front back'
coefficient = 10
[]
[]
[NodalKernels]
[pull]
type = NodalGravity
variable = disp_y
boundary = pull
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
incremental = false
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[update]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type '
petsc_options_value = 'lu'
nl_abs_tol = 1e-10
line_search = none
dt = 1.0
num_steps = 10
[]
[Outputs]
[out]
type = Exodus
time_step_interval = 10
[]
[]
(test/tests/restart/restart_transient_from_steady/restart_trans_with_sub_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[AuxVariables]
[./power_density]
[../]
[]
[Variables]
[./temp]
# initial_condition = 1000000
[../]
[]
[Kernels]
[./heat_conduction]
type = Diffusion
variable = temp
[../]
[./heat_ie]
type = TimeDerivative
variable = temp
[../]
[./heat_source_fuel]
type = CoupledForce
variable = temp
v = power_density
[../]
[]
[BCs]
[bc]
type = DirichletBC
variable = temp
boundary = '0 1 2 3'
value = 450
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
start_time = 0
end_time = 3
dt = 1.0
nl_abs_tol = 1e-7
nl_rel_tol = 1e-7
[]
[Postprocessors]
[./temp_fuel_avg]
type = ElementAverageValue
variable = temp
block = '0'
execute_on = 'initial timestep_end'
[../]
[./pwr_density]
type = ElementIntegralVariablePostprocessor
block = '0'
variable = power_density
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
perf_graph = true
exodus = true
color = true
[]
(test/tests/outputs/console/multiapp/picard_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[]
[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'
fixed_point_max_its = 30
nl_abs_tol = 1e-14
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = picard_sub.i
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(test/tests/preconditioners/pbp/pbp_test.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
# init_unif_refine = 6
[]
[Variables]
active = 'u v'
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Preconditioning]
[./PBP]
type = PBP
solve_order = 'u v'
preconditioner = 'LU LU'
off_diag_row = 'v'
off_diag_column = 'u'
petsc_options = '' # Test petsc options in PBP block
[../]
[]
[Problem]
type = FEProblem
error_on_jacobian_nonzero_reallocation = true
[]
[Kernels]
active = 'diff_u conv_v diff_v'
[./diff_u]
type = Diffusion
variable = u
[../]
[./conv_v]
type = CoupledForce
variable = v
v = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'left_u right_u left_v'
[./left_u]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 1
value = 100
[../]
[./left_v]
type = DirichletBC
variable = v
boundary = 3
value = 0
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = 1
value = 0
[../]
[]
[Executioner]
type = Steady
l_max_its = 10
nl_max_its = 10
solve_type = JFNK
[]
[Outputs]
file_base = out
exodus = true
[]
(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]
nl_sys = adjoint
[]
[v_adjoint]
nl_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
[]
(tutorials/tutorial02_multiapps/step03_coupling/01_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[ut]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = v
[]
[force]
type = CoupledForce
variable = v
v = ut
coef = 100
[]
[td]
type = TimeDerivative
variable = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = v
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
[]
[Postprocessors]
[average_v]
type = ElementAverageValue
variable = v
[]
[]
(test/tests/multiapps/relaxation/picard_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./v]
[../]
[]
[AuxVariables]
[./u]
[../]
[]
[Kernels]
[./diff_v]
type = Diffusion
variable = v
[../]
[./force_v]
type = CoupledForce
variable = v
v = u
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[]
[BCs]
[./left_v]
type = DirichletBC
variable = v
boundary = left
value = 2
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 20
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/picard_catch_up/sub_failing_problem.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]
[Variables]
[./v]
[../]
[]
[AuxVariables]
[./u]
[../]
[]
[Kernels]
[./diff_v]
type = Diffusion
variable = v
[../]
[./force_v]
type = CoupledForce
variable = v
v = u
[../]
[]
[BCs]
[./left_v]
type = DirichletBC
variable = v
boundary = left
value = 1
[../]
[./right_v]
type = FunctionDirichletBC
variable = v
boundary = right
function = 't + 1'
[../]
[]
[Problem]
type = FailingProblem
fail_steps = '2'
[../]
[Executioner]
type = Transient
num_steps = 2
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(test/tests/executioners/nullspace/singular_contaminated.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 10
nx = 8
[]
[Problem]
null_space_dimension = 1
transpose_null_space_dimension = 1
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./eig]
type = MassEigenKernel
variable = u
eigen_postprocessor = 1.0002920196258376e+01
eigen = false
[../]
[./force]
type = CoupledForce
variable = u
v = aux_v
[../]
[]
[AuxVariables]
[./aux_v]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = eigen_mode
[../]
[../]
[]
[AuxKernels]
[./set_source]
type = FunctionAux
variable = aux_v
function = contaminated_second_harmonic
execute_on = timestep_begin
[../]
[]
[Functions]
[./eigen_mode]
type = ParsedFunction
expression = 'sqrt(2.0 / L) * sin(mode * pi * x / L)'
symbol_names = 'L mode'
symbol_values = '10 1'
[../]
[./contaminated_second_harmonic]
type = ParsedFunction
expression = 'sqrt(2.0 / L) * sin(mode * pi * x / L) + a * sqrt(2.0 / L) * sin(pi * x / L)'
symbol_names = 'L mode a'
symbol_values = '10 2 1'
[../]
[]
[BCs]
[./homogeneous]
type = DirichletBC
variable = u
boundary = '0 1'
value = 0
[../]
[]
[VectorPostprocessors]
[./sample_solution]
type = LineValueSampler
variable = u
start_point = '0 0 0'
end_point = '10 0 0'
sort_by = x
num_points = 9
execute_on = timestep_end
[../]
[]
[Preconditioning]
[./prec]
type = SMP
full = true
[../]
[]
[Executioner]
type = SteadyWithNull
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_pc_side -snes_type -ksp_norm_type'
petsc_options_value = 'hypre boomeramg left ksponly preconditioned'
nl_rel_tol = 1.0e-14
nl_abs_tol = 1.0e-14
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
[]
(python/peacock/tests/common/fsp_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]
[Variables]
active = 'u v'
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff_u conv_v diff_v'
[./diff_u]
type = Diffusion
variable = u
[../]
[./conv_v]
type = CoupledForce
variable = v
v = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'left_u right_u left_v'
[./left_u]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 2
value = 100
[../]
[./left_v]
type = DirichletBC
variable = v
boundary = 1
value = 0
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = 2
value = 0
[../]
[]
[Executioner]
type = Steady
# This is setup automatically in MOOSE (SetupPBPAction.C)
# petsc_options = '-snes_mf_operator'
# petsc_options_iname = '-pc_type'
# petsc_options_value = 'asm'
[]
[Preconditioning]
active = 'FSP'
[./FSP]
type = FSP
# It is the starting point of splitting
topsplit = 'uv' # uv should match the following block name
[./uv]
splitting = 'u v' # u and v are the names of subsolvers
# Generally speaking, there are four types of splitting we could choose
# <additive,multiplicative,symmetric_multiplicative,schur>
splitting_type = additive
# An approximate solution to the original system
# | A_uu A_uv | | u | _ |f_u|
# | 0 A_vv | | v | - |f_v|
# is obtained by solving the following subsystems
# A_uu u = f_u and A_vv v = f_v
# If splitting type is specified as schur, we may also want to set more options to
# control how schur works using PETSc options
# petsc_options_iname = '-pc_fieldsplit_schur_fact_type -pc_fieldsplit_schur_precondition'
# petsc_options_value = 'full selfp'
[../]
[./u]
vars = 'u'
# PETSc options for this subsolver
# A prefix will be applied, so just put the options for this subsolver only
petsc_options_iname = '-pc_type -ksp_type'
petsc_options_value = ' hypre preonly'
[../]
[./v]
vars = 'v'
# PETSc options for this subsolver
petsc_options_iname = '-pc_type -ksp_type'
petsc_options_value = ' hypre preonly'
[../]
[../]
[]
[Outputs]
file_base = out
exodus = true
[]
(examples/ex11_prec/fdp.i)
[Mesh]
file = square.e
[]
[Variables]
[./diffused]
order = FIRST
family = LAGRANGE
[../]
[./forced]
order = FIRST
family = LAGRANGE
[../]
[]
# The Preconditioning block
[Preconditioning]
active = 'FDP_jfnk'
[./FDP_jfnk]
type = FDP
off_diag_row = 'forced'
off_diag_column = 'diffused'
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -mat_fd_coloring_err -mat_fd_type'
petsc_options_value = 'lu 1e-6 ds'
[../]
[./FDP_n]
type = FDP
off_diag_row = 'forced'
off_diag_column = 'diffused'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -mat_fd_coloring_err -mat_fd_type'
petsc_options_value = 'lu 1e-6 ds'
[../]
[./FDP_n_full]
type = FDP
full = true
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -mat_fd_coloring_err -mat_fd_type'
petsc_options_value = 'lu 1e-6 ds'
[../]
[]
[Kernels]
[./diff_diffused]
type = Diffusion
variable = diffused
[../]
[./conv_forced]
type = CoupledForce
variable = forced
v = diffused
[../]
[./diff_forced]
type = Diffusion
variable = forced
[../]
[]
[BCs]
#Note we have active on, and neglect the right_forced BC
active = 'left_diffused right_diffused left_forced'
[./left_diffused]
type = DirichletBC
variable = diffused
boundary = 'left'
value = 0
[../]
[./right_diffused]
type = DirichletBC
variable = diffused
boundary = 'right'
value = 100
[../]
[./left_forced]
type = DirichletBC
variable = forced
boundary = 'left'
value = 0
[../]
[./right_forced]
type = DirichletBC
variable = forced
boundary = 'right'
value = 0
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/optimization/compliance_sensitivity/2d_mbb_pde_amr.i)
vol_frac = 0.5
E0 = 1
Emin = 1e-8
power = 3
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 30
ny = 10
xmin = 0
xmax = 30
ymin = 0
ymax = 10
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold
nodes = 0
[]
[push]
type = ExtraNodesetGenerator
input = node
new_boundary = push
coord = '30 10 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[Dc]
initial_condition = -1.0
[]
[]
[AuxVariables]
[sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[AuxKernel]
type = MaterialRealAux
variable = sensitivity
property = sensitivity
execute_on = LINEAR
[]
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[Dc_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[AuxKernel]
type = SelfAux
variable = Dc_elem
v = Dc
execute_on = 'TIMESTEP_END'
[]
[]
[mat_den_nodal]
family = L2_LAGRANGE
order = FIRST
initial_condition = ${vol_frac}
[AuxKernel]
type = SelfAux
execute_on = TIMESTEP_END
variable = mat_den_nodal
v = mat_den
[]
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[Kernels]
[diffusion]
type = FunctionDiffusion
variable = Dc
function = 0.15 # radius coeff
[]
[potential]
type = Reaction
variable = Dc
[]
[source]
type = CoupledForce
variable = Dc
v = sensitivity
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_y
boundary = hold
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[boundary_penalty]
type = ADRobinBC
variable = Dc
boundary = 'left top'
coefficient = 10
[]
[boundary_penalty_right]
type = ADRobinBC
variable = Dc
boundary = 'right'
coefficient = 10
[]
[]
[NodalKernels]
[push]
type = NodalGravity
variable = disp_y
boundary = push
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
incremental = false
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[update]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
line_search = none
nl_abs_tol = 1e-4
l_max_its = 200
start_time = 0.0
dt = 1.0
num_steps = 70
[]
[Outputs]
[out]
type = CSV
execute_on = 'INITIAL TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
[]
[]
[Controls]
[first_period]
type = TimePeriod
start_time = 0.0
end_time = 40
enable_objects = 'BCs::boundary_penalty_right'
execute_on = 'initial timestep_begin'
[]
[]
[Adaptivity]
max_h_level = 2
recompute_markers_during_cycles = true
interval = 1
cycles_per_step = 1
marker = density_marker
[Indicators]
[density_jump]
type = ValueJumpIndicator
variable = mat_den_nodal
[]
[]
[Markers]
[density_marker]
type = ErrorToleranceMarker
indicator = density_jump
coarsen = 0.1
refine = 0.1
[]
[]
[]
(test/tests/multiapps/relaxation/picard_relaxed_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
initial_condition = 1
[]
[inverse_v]
initial_condition = 1
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = inverse_v
[]
[]
[AuxKernels]
[invert_v]
type = QuotientAux
variable = inverse_v
denominator = v
numerator = 20.0
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[Neumann_right]
type = NeumannBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
num_steps = 4
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_abs_tol = 1e-14
relaxation_factor = 0.95
transformed_variables = u
[]
[Outputs]
exodus = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_begin
positions = '0 0 0'
input_files = picard_relaxed_sub.i
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(modules/functional_expansion_tools/examples/1D_volumetric_Cartesian/main.i)
# Basic example coupling a master and sub app in a 1D Cartesian volume.
#
# The master app provides field values to the sub app via Functional Expansions, which then performs
# its calculations. The sub app's solution field values are then transferred back to the master app
# and coupled into the solution of the master app solution.
#
# This example couples Functional Expansions via AuxVariable.
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/external_petsc_solver/test/tests/external_petsc_problem/moose_as_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./v]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[./cf]
type = CoupledForce
coef = 10000
variable = u
v=v
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.2
solve_type = 'PJFNK'
fixed_point_max_its = 10
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[./picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[../]
[]
[MultiApps]
[./sub_app]
type = TransientMultiApp
input_files = 'petsc_transient_as_sub.i'
app_type = ExternalPetscSolverApp
library_path = '../../../../external_petsc_solver/lib'
[../]
[]
[Transfers]
[./fromsub]
type = MultiAppShapeEvaluationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[../]
[]
(test/tests/multiapps/picard/picard_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./v]
[../]
[]
[AuxVariables]
[./u]
[../]
[]
[Kernels]
[./diff_v]
type = Diffusion
variable = v
[../]
[./force_v]
type = CoupledForce
variable = v
v = u
[../]
[]
[BCs]
[./left_v]
type = DirichletBC
variable = v
boundary = left
value = 1
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 20
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(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
[]
(test/tests/transfers/coord_transform/both-transformed/copy/main-app.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = -1
ymax = 0
nx = 10
ny = 10
alpha_rotation = 90
[]
[Variables]
[u][]
[]
[AuxVariables]
[v][]
[v_elem]
order = CONSTANT
family = MONOMIAL
[]
[w][]
[w_elem]
order = CONSTANT
family = MONOMIAL
[]
[]
[ICs]
[w]
type = FunctionIC
function = 'cos(x)*sin(y)'
variable = w
[]
[w_elem]
type = FunctionIC
function = 'cos(x)*sin(y)'
variable = w_elem
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
verbose = true
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = 'sub-app.i'
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[from_sub]
type = MultiAppCopyTransfer
from_multi_app = sub
source_variable = v
variable = v
execute_on = 'timestep_begin'
[]
[from_sub_elem]
type = MultiAppCopyTransfer
from_multi_app = sub
source_variable = v_elem
variable = v_elem
execute_on = 'timestep_begin'
[]
[to_sub]
type = MultiAppCopyTransfer
to_multi_app = sub
source_variable = w
variable = w
execute_on = 'timestep_begin'
[]
[to_sub_elem]
type = MultiAppCopyTransfer
to_multi_app = sub
source_variable = w_elem
variable = w_elem
execute_on = 'timestep_begin'
[]
[]
(test/tests/multiapps/picard_catch_up/parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = 'v'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
preset = false
boundary = 'left'
value = 0
[]
[right]
type = DirichletBC
variable = u
preset = false
boundary = 'right'
value = 1
[]
[]
[Postprocessors]
[picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_abs_tol = 1e-14
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = 'sub.i'
max_catch_up_steps = 100
max_failures = 100
catch_up = true
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(modules/fsi/test/tests/2d-finite-strain-steady/thermal-me.i)
# Units: specific_heat_capacity--cp--J/(kg.K); density--rho--kg/(cm^3);
# dynamic_viscosity--mu--kg/(cm.s); thermal_conductivity--k--W/(cm.K);
# pressure--kg/(cm.s^2); force--kg.cm/s^2
outlet_pressure = 0
inlet_velocity = 150 # cm/s
ini_temp = 593 # K
heat_transfer_coefficient = 9 # W/(cm2.K)
g = -981 # cm/s2
alpha_fluid = 2e-4 # thermal expansion coefficient of fluid used in INSADBoussinesqBodyForce
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = '2layers_2d_midline.msh'
[]
[Variables]
[velocity]
family = LAGRANGE_VEC
order = FIRST
block = 'fluid'
[]
[p]
family = LAGRANGE
order = FIRST
block = 'fluid'
[]
[Tf]
family = LAGRANGE
order = FIRST
block = 'fluid'
[]
[Ts]
family = LAGRANGE
order = FIRST
block = 'solid'
[]
[disp_x]
family = LAGRANGE
order = FIRST
block = 'solid fluid'
[]
[disp_y]
family = LAGRANGE
order = FIRST
block = 'solid fluid'
[]
[]
[AuxVariables]
[heat_source]
family = MONOMIAL
order = FIRST
block = 'solid'
[]
[]
[ICs]
[initial_velocity]
type = VectorConstantIC
variable = velocity
x_value = 0
y_value = ${inlet_velocity}
z_value = 0
[]
[initial_p]
type = FunctionIC
variable = p
function = ini_p
[]
[initial_Tf]
type = ConstantIC
variable = Tf
value = ${ini_temp}
[]
[initial_Ts]
type = ConstantIC
variable = Ts
value = ${ini_temp}
[]
[]
[Kernels]
[fluid_mass]
type = INSADMass
variable = p
use_displaced_mesh = true
[]
[fluid_mass_pspg]
type = INSADMassPSPG
variable = p
use_displaced_mesh = true
[]
[fluid_momentum_time]
type = INSADMomentumTimeDerivative
variable = velocity
use_displaced_mesh = true
[]
[fluid_momentum_convection]
type = INSADMomentumAdvection
variable = velocity
use_displaced_mesh = true
[]
[fluid_momentum_viscous]
type = INSADMomentumViscous
variable = velocity
use_displaced_mesh = true
[]
[fluid_momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
use_displaced_mesh = true
[]
[fluid_momentum_gravity]
type = INSADGravityForce
variable = velocity
gravity = '0 ${g} 0'
use_displaced_mesh = true
[]
[fluid_momentum_buoyancy]
type = INSADBoussinesqBodyForce
variable = velocity
gravity = '0 ${g} 0'
alpha_name = 'alpha_fluid'
ref_temp = 'T_ref'
temperature = Tf
use_displaced_mesh = true
[]
[fluid_momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
use_displaced_mesh = true
[]
[fluid_temperature_time]
type = INSADHeatConductionTimeDerivative
variable = Tf
use_displaced_mesh = true
[]
[fluid_temperature_conduction]
type = ADHeatConduction
variable = Tf
thermal_conductivity = 'k'
use_displaced_mesh = true
[]
[fluid_temperature_advection]
type = INSADEnergyAdvection
variable = Tf
use_displaced_mesh = true
[]
[fluid_temperature_supg]
type = INSADEnergySUPG
variable = Tf
velocity = velocity
use_displaced_mesh = true
[]
[solid_temperature_time]
type = ADHeatConductionTimeDerivative
variable = Ts
density_name = 'rho'
specific_heat = 'cp'
block = 'solid'
use_displaced_mesh = true
[]
[solid_temperature_conduction]
type = ADHeatConduction
variable = Ts
thermal_conductivity = 'k'
block = 'solid'
use_displaced_mesh = true
[]
[heat_source]
type = ADCoupledForce
variable = Ts
v = heat_source
block = 'solid'
use_displaced_mesh = true
[]
[disp_x_smooth]
type = Diffusion
variable = disp_x
block = fluid
[]
[disp_y_smooth]
type = Diffusion
variable = disp_y
block = fluid
[]
[]
[Modules/TensorMechanics/Master]
strain = FINITE
material_output_order = FIRST
generate_output = 'vonmises_stress stress_xx stress_yy stress_zz strain_xx strain_yy strain_zz'
[solid]
block = 'solid'
temperature = Ts
automatic_eigenstrain_names = true
[]
[]
[InterfaceKernels]
[convection_heat_transfer]
type = ConjugateHeatTransfer
variable = Tf
T_fluid = Tf
neighbor_var = 'Ts'
boundary = 'solid_wall'
htc = 'htc'
use_displaced_mesh = true
[]
[]
[AuxKernels]
[heat_source_distribution_auxk]
type = FunctionAux
variable = heat_source
function = heat_source_distribution_function
block = 'solid'
use_displaced_mesh = true
[]
[]
[BCs]
[no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'solid_wall'
use_displaced_mesh = true
[]
[inlet_velocity]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'fluid_bottom'
function_y = ${inlet_velocity}
use_displaced_mesh = true
[]
[symmetry]
type = ADVectorFunctionDirichletBC
variable = velocity
boundary = 'fluid_wall'
function_x = 0
set_x_comp = true
set_y_comp = false
set_z_comp = false
use_displaced_mesh = true
[]
[outlet_p]
type = DirichletBC
variable = p
boundary = 'fluid_top'
value = ${outlet_pressure}
use_displaced_mesh = true
[]
[inlet_T]
type = DirichletBC
variable = Tf
boundary = 'fluid_bottom'
value = ${ini_temp}
use_displaced_mesh = true
[]
[pin1_y]
type = DirichletBC
variable = disp_y
boundary = 'pin1'
value = 0
use_displaced_mesh = true
[]
[pin1_x]
type = DirichletBC
variable = disp_x
boundary = 'pin1'
value = 0
use_displaced_mesh = true
[]
[top_and_bottom_y]
type = DirichletBC
variable = disp_y
boundary = 'solid_bottom solid_top fluid_top fluid_bottom'
value = 0
use_displaced_mesh = true
[]
[left_and_right_x]
type = DirichletBC
variable = disp_x
boundary = 'fluid_wall fluid_bottom'
value = 0
use_displaced_mesh = true
[]
[]
[Materials]
[rho_solid]
type = ADParsedMaterial
property_name = rho
expression = '0.0110876 * pow(9.9672e-1 + 1.179e-5 * Ts - 2.429e-9 * pow(Ts,2) + 1.219e-12 * pow(Ts,3),-3)'
coupled_variables = 'Ts'
block = 'solid'
use_displaced_mesh = true
[]
[cp_solid]
type = ADParsedMaterial
property_name = cp
expression = '0.76 * ((302.27 * pow((548.68 / Ts),2) * exp(548.68 / Ts)) / pow((exp(548.68 / Ts) - 1),2) + 2 * 8.463e-3 * Ts + 8.741e7 * 18531.7 * exp(-18531.7 / Ts) / pow(Ts,2)) + 0.24 * ((322.49 * pow((587.41/Ts),2) * exp(587.41 / Ts)) / pow((exp(587.41 / Ts) - 1),2) + 2 * 1.4679e-2 * Ts)'
coupled_variables = 'Ts'
block = 'solid'
use_displaced_mesh = true
[]
[k_solid]
type = ADParsedMaterial
property_name = k
expression = '1.158/(7.5408 + 17.692 * (Ts / 1000) + 3.6142 * pow((Ts/1000),2)) + 74.105 * pow((Ts / 1000),-2.5) * exp(-16.35 / (Ts / 1000))'
coupled_variables = 'Ts'
block = 'solid'
use_displaced_mesh = true
[]
[rho_fluid]
type = ADParsedMaterial
property_name = rho
expression = '(11096 - 1.3236 * Tf) * 1e-6'
coupled_variables = 'Tf'
block = 'fluid'
use_displaced_mesh = true
[]
[cp_fluid]
type = ADParsedMaterial
property_name = cp
expression = '159 - 2.72e-2 * Tf + 7.12e-6 * pow(Tf,2)'
coupled_variables = 'Tf'
block = 'fluid'
use_displaced_mesh = true
[]
[k_fluid]
type = ADParsedMaterial
property_name = k
expression = '(3.61 + 1.517e-2 * Tf - 1.741e-6 * pow(Tf,2)) * 1e-2'
coupled_variables = 'Tf'
block = 'fluid'
use_displaced_mesh = true
[]
[mu_fluid]
type = ADParsedMaterial
property_name = mu
expression = '4.94e-6 * exp(754.1/Tf)'
coupled_variables = 'Tf'
block = 'fluid'
use_displaced_mesh = true
[]
[buoyancy_thermal_expansion_coefficient_fluid]
type = ADGenericConstantMaterial
prop_names = 'alpha_fluid'
prop_values = '${alpha_fluid}'
block = 'fluid'
use_displaced_mesh = true
[]
[buoyancy_reference_temperature_fluid]
type = GenericConstantMaterial
prop_names = 'T_ref'
prop_values = '${ini_temp}'
block = 'fluid'
use_displaced_mesh = true
[]
[ins_mat_fluid]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = Tf
block = 'fluid'
use_displaced_mesh = true
[]
[htc]
type = ADGenericFunctionMaterial
prop_names = htc
prop_values = htc_function
use_displaced_mesh = true
[]
[elasticity_solid]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2e7
poissons_ratio = 0.32
block = 'solid'
use_displaced_mesh = true
[]
[thermal_expansion_solid]
type = ComputeThermalExpansionEigenstrain
temperature = Ts
thermal_expansion_coeff = 2e-4
stress_free_temperature = 593
eigenstrain_name = thermal_expansion
block = 'solid'
use_displaced_mesh = true
[]
[stress_solid]
type = ComputeFiniteStrainElasticStress
block = 'solid'
[]
[]
[Functions]
[htc_function]
type = ParsedFunction
expression = ${heat_transfer_coefficient}
[]
[ini_p]
type = ParsedFunction
expression = '0.010302 * 981 * (10 - y)'
[]
[heat_source_distribution_function]
type = ParsedFunction
expression = '300 * sin(pi * y / 10)'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
solve_type = 'PJFNK'
[]
[]
[Executioner]
type = Transient
end_time = 1e4
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_max_its = 30
l_max_its = 100
automatic_scaling = true
compute_scaling_once = true
off_diagonals_in_auto_scaling = true
dtmin = 1
nl_abs_tol = 1e-12
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 6
growth_factor = 1.5
dt = 1
[]
[]
[Outputs]
[csv]
type = CSV
file_base = 'thermal-me'
execute_on = 'final'
[]
[]
[Postprocessors]
[average_solid_Ts]
type = ElementAverageValue
variable = Ts
block = 'solid'
use_displaced_mesh = true
[]
[average_fluid_Tf]
type = ElementAverageValue
variable = Tf
block = 'fluid'
use_displaced_mesh = true
[]
[max_solid_Ts]
type = ElementExtremeValue
variable = Ts
value_type = max
block = 'solid'
use_displaced_mesh = true
[]
[max_fluid_Tf]
type = ElementExtremeValue
variable = Tf
value_type = max
block = 'fluid'
use_displaced_mesh = true
[]
[min_solid_Ts]
type = ElementExtremeValue
variable = Ts
value_type = min
block = 'solid'
use_displaced_mesh = true
[]
[min_fluid_Tf]
type = ElementExtremeValue
variable = Tf
value_type = min
block = 'fluid'
use_displaced_mesh = true
[]
[]
[Debug]
show_var_residual_norms = true
[]
(test/tests/misc/check_error/coupling_itself.i)
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./coupled]
type = CoupledForce
variable = u
v = u
[../]
[]
[Executioner]
type = Steady
[]
(test/tests/kernels/hfem/dirichlet.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
[]
[uhat]
order = CONSTANT
family = MONOMIAL
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[lambda]
order = CONSTANT
family = MONOMIAL
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[lambdab]
order = CONSTANT
family = MONOMIAL
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[]
[AuxVariables]
[v]
order = CONSTANT
family = MONOMIAL
block = 0
initial_condition = '1'
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
block = 0
[]
[source]
type = CoupledForce
variable = u
v = v
coef = '1'
block = 0
[]
[reaction]
type = Reaction
variable = uhat
rate = '1'
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[uhat_coupled]
type = CoupledForce
variable = uhat
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
v = lambdab
coef = '1'
[]
[]
[DGKernels]
[surface]
type = HFEMDiffusion
variable = u
lowerd_variable = lambda
[]
[]
[BCs]
[all]
type = HFEMDirichletBC
boundary = 'left right top bottom'
variable = u
lowerd_variable = lambdab
uhat = uhat
[]
[]
[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/multiapps/secant/transient_main.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
parallel_type = replicated
uniform_refine = 1
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[unorm]
type = ElementL2Norm
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'
fixed_point_max_its = 30
transformed_variables = 'u'
[]
[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]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
execute_on = 'timestep_begin'
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
execute_on = 'timestep_begin'
[]
[]
(test/tests/fvkernels/block-restriction/fv-and-fe-block-restriction.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 80
xmax = 4
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '2.0 0 0'
block_id = 1
top_right = '4.0 1.0 0'
[]
[left_right]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'left_right'
[]
[right_left]
input = left_right
type = SideSetsBetweenSubdomainsGenerator
primary_block = '1'
paired_block = '0'
new_boundary = 'right_left'
[]
[]
[Variables]
[left_fv]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 1
block = 0
[]
[left_fe]
initial_condition = 1
block = 0
[]
[right_fv]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 1
block = 1
[]
[right_fe]
initial_condition = 1
block = 1
[]
[]
[FVKernels]
active = 'bad_left_diff left_coupled bad_right_diff right_coupled'
[bad_left_diff]
type = FVDiffusion
variable = left_fv
coeff = fv_prop
block = 0
coeff_interp_method = average
[]
[good_left_diff]
type = FVDiffusion
variable = left_fv
coeff = left_fv_prop
block = 0
coeff_interp_method = average
[]
[left_coupled]
type = FVCoupledForce
v = left_fv
variable = left_fv
block = 0
[]
[bad_right_diff]
type = FVDiffusion
variable = right_fv
coeff = fv_prop
block = 1
coeff_interp_method = average
[]
[good_right_diff]
type = FVDiffusion
variable = right_fv
coeff = right_fv_prop
block = 1
coeff_interp_method = average
[]
[right_coupled]
type = FVCoupledForce
v = right_fv
variable = right_fv
block = 1
[]
[]
[Kernels]
[left_diff]
type = ADFunctorMatDiffusion
variable = left_fe
diffusivity = fe_prop
[]
[left_coupled]
type = CoupledForce
v = left_fv
variable = left_fe
[]
[right_diff]
type = ADFunctorMatDiffusion
variable = right_fe
diffusivity = fe_prop
[]
[right_coupled]
type = CoupledForce
v = right_fv
variable = right_fe
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = left_fv
boundary = left
value = 0
[]
[left_right]
type = FVDirichletBC
variable = left_fv
boundary = left_right
value = 1
[]
[right_left]
type = FVDirichletBC
variable = right_fv
boundary = right_left
value = 0
[]
[right]
type = FVDirichletBC
variable = right_fv
boundary = right
value = 1
[]
[]
[BCs]
[left]
type = DirichletBC
variable = left_fe
boundary = left
value = 0
[]
[left_right]
type = DirichletBC
variable = left_fe
boundary = left_right
value = 1
[]
[right_left]
type = DirichletBC
variable = right_fe
boundary = right_left
value = 0
[]
[right]
type = DirichletBC
variable = right_fe
boundary = right
value = 1
[]
[]
[Materials]
active = 'fe_mat_left bad_fv_mat_left fe_mat_right bad_fv_mat_right'
[fe_mat_left]
type = FEFVCouplingMaterial
fe_var = left_fe
block = 0
[]
[bad_fv_mat_left]
type = FEFVCouplingMaterial
fv_var = left_fv
block = 0
[]
[good_fv_mat_left]
type = FEFVCouplingMaterial
fv_var = left_fv
fv_prop_name = 'left_fv_prop'
block = 0
[]
[fe_mat_right]
type = FEFVCouplingMaterial
fe_var = right_fe
block = 1
[]
[bad_fv_mat_right]
type = FEFVCouplingMaterial
fv_var = right_fv
block = 1
[]
[good_fv_mat_right]
type = FEFVCouplingMaterial
fv_var = right_fv
fv_prop_name = 'right_fv_prop'
block = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
line_search = 'none'
[]
[Outputs]
exodus = true
[]
(test/tests/multiapps/picard_failure/picard_sub_no_fail.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]
[Variables]
[./v]
[../]
[]
[AuxVariables]
[./u]
[../]
[]
[Kernels]
[./diff_v]
type = Diffusion
variable = v
[../]
[./force_v]
type = CoupledForce
variable = v
v = u
[../]
[]
[BCs]
[./left_v]
type = DirichletBC
variable = v
boundary = left
value = 1
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[../]
[]
[Postprocessors]
[./elem_average_value]
type = ElementAverageValue
variable = v
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(test/tests/kernels/ad_coupled_force/aux_test.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[]
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[a]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[diff]
type = ADDiffusion
variable = u
[]
[force]
type = ADCoupledForce
variable = u
v = a
[]
[]
[AuxKernels]
[a]
variable = a
type = ConstantAux
value = 10
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = ADDirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
(test/tests/transfers/multiapp_high_order_variable_transfer/sub_L2_Lagrange.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[AuxVariables]
[./power_density]
family = L2_LAGRANGE
order = FIRST
[../]
[]
[Variables]
[./temp]
[../]
[]
[Kernels]
[./heat_conduction]
type = Diffusion
variable = temp
[../]
[./heat_source_fuel]
type = CoupledForce
variable = temp
v = power_density
[../]
[]
[BCs]
[bc]
type = DirichletBC
variable = temp
boundary = '0 1 2 3'
value = 450
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-7
nl_rel_tol = 1e-7
[]
[Postprocessors]
[./temp_fuel_avg]
type = ElementAverageValue
variable = temp
block = '0'
execute_on = 'initial timestep_end'
[../]
[./pwr_density]
type = ElementIntegralVariablePostprocessor
block = '0'
variable = power_density
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
perf_graph = true
exodus = true
color = true
[]
(test/tests/multiapps/picard_multilevel/2level_picard/mutilevel_app.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
initial_condition = 50
[]
[]
[Kernels]
[diffusion]
type = Diffusion
variable = u
[]
[source]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[dirichlet0]
type = DirichletBC
variable = u
boundary = '3'
value = 0
[]
[dirichlet]
type = DirichletBC
variable = u
boundary = '1'
value = 100
[]
[]
[Postprocessors]
[avg_u]
type = ElementAverageValue
variable = u
execute_on = 'initial timestep_begin timestep_end'
[]
[avg_v]
type = ElementAverageValue
variable = v
execute_on = 'initial timestep_begin timestep_end'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
fixed_point_rel_tol = 1E-3
fixed_point_abs_tol = 1.0e-05
fixed_point_max_its = 2
accept_on_max_fixed_point_iteration = true
[]
[MultiApps]
[level1-]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = sub_level1.i
execute_on = 'timestep_end'
keep_solution_during_restore = true
[]
[]
[Transfers]
[u_to_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = u
variable = u
to_multi_app = level1-
execute_on = 'timestep_end'
[]
[v_from_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = v
variable = v
from_multi_app = level1-
execute_on = 'timestep_end'
[]
[]
[Outputs]
exodus = true
perf_graph = true
[screen]
type = Console
execute_postprocessors_on = "timestep_end timestep_begin"
[]
[]
(python/peacock/tests/input_tab/InputTree/gold/fsp_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[v]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
[]
[conv_v]
type = CoupledForce
variable = v
v = 'u'
[]
[diff_v]
type = Diffusion
variable = v
[]
[]
[BCs]
inactive = 'right_v'
[left_u]
type = DirichletBC
variable = u
boundary = '1'
value = 0
[]
[right_u]
type = DirichletBC
variable = u
boundary = '2'
value = 100
[]
[left_v]
type = DirichletBC
variable = v
boundary = '1'
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = '2'
value = 0
[]
[]
[Executioner]
# This is setup automatically in MOOSE (SetupPBPAction.C)
# petsc_options = '-snes_mf_operator'
# petsc_options_iname = '-pc_type'
# petsc_options_value = 'asm'
type = Steady
[]
[Preconditioning]
[FSP]
# It is the starting point of splitting
type = FSP
topsplit = 'uv' # uv should match the following block name
[uv]
# Generally speaking, there are four types of splitting we could choose
# <additive,multiplicative,symmetric_multiplicative,schur>
# An approximate solution to the original system
# | A_uu A_uv | | u | _ |f_u|
# | 0 A_vv | | v | - |f_v|
# is obtained by solving the following subsystems
# A_uu u = f_u and A_vv v = f_v
# If splitting type is specified as schur, we may also want to set more options to
# control how schur works using PETSc options
# petsc_options_iname = '-pc_fieldsplit_schur_fact_type -pc_fieldsplit_schur_precondition'
# petsc_options_value = 'full selfp'
splitting = 'u v' # u and v are the names of subsolvers
splitting_type = additive
[]
[u]
# PETSc options for this subsolver
# A prefix will be applied, so just put the options for this subsolver only
symbol_names = 'u'
petsc_options_iname = '-pc_type -ksp_type'
petsc_options_value = ' hypre preonly'
[]
[v]
# PETSc options for this subsolver
symbol_names = 'v'
petsc_options_iname = '-pc_type -ksp_type'
petsc_options_value = ' hypre preonly'
[]
[]
[]
[Outputs]
file_base = out
exodus = true
[]
(modules/external_petsc_solver/test/tests/partition/moose_as_parent.i)
[Mesh]
[gmg]
type = DistributedRectilinearMeshGenerator
dim = 2
nx = 20
ny = 21
partition = square
[]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./v]
[../]
[pid]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[pid_aux]
type = ProcessorIDAux
variable = pid
execute_on = 'INITIAL'
[]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./td]
type = TimeDerivative
variable = u
[../]
[./cf]
type = CoupledForce
coef = 10000
variable = u
v=v
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.2
solve_type = 'PJFNK'
fixed_point_max_its = 10
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[./picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[../]
[]
[MultiApps]
[./sub_app]
type = TransientMultiApp
input_files = 'petsc_transient_as_sub.i'
app_type = ExternalPetscSolverApp
library_path = '../../../../external_petsc_solver/lib'
[../]
[]
[Transfers]
[./fromsub]
type = MultiAppShapeEvaluationTransfer
from_multi_app = sub_app
source_variable = u
variable = v
[../]
[]
(test/tests/preconditioners/fsp/fsp_test_image.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 41
ny = 41
[]
[./image]
input = gen
type = ImageSubdomainGenerator
file = kitten.png
threshold = 100
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = 1
[../]
[./v]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./conv_v]
type = CoupledForce
variable = v
v = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'left_u left_v right_u'
[./left_u]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = right
value = 100
[../]
[./left_v]
type = DirichletBC
variable = v
boundary = left
value = 0
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[../]
[]
[Problem]
type = FEProblem
material_coverage_check = false
kernel_coverage_check = false
[]
[Executioner]
# This is setup automatically in MOOSE (SetupPBPAction.C)
# petsc_options = '-snes_mf_operator'
# petsc_options_iname = '-pc_type'
# petsc_options_value = 'asm'
type = Steady
[]
[Preconditioning]
[./FSP]
# It is the starting point of splitting
type = FSP
topsplit = 'uv' # 'uv'
[./uv]
# Generally speaking, there are four types of splitting we could choose
# <additive,multiplicative,symmetric_multiplicative,schur>
# An approximate solution to the original system
# | A_uu A_uv | | u | _ |f_u|
# | 0 A_vv | | v | - |f_v|
# is obtained by solving the following subsystems
# A_uu u = f_u and A_vv v = f_v
# If splitting type is specified as schur, we may also want to set more options to
# control how schur works using PETSc options
# petsc_options_iname = '-pc_fieldsplit_schur_fact_type -pc_fieldsplit_schur_precondition'
# petsc_options_value = 'full selfp'
splitting = 'u v' # 'u' and 'v'
splitting_type = additive
[../]
[./u]
# PETSc options for this subsolver
# A prefix will be applied, so just put the options for this subsolver only
vars = u
petsc_options_iname = '-pc_type -ksp_type'
petsc_options_value = ' hypre preonly'
[../]
[./v]
# PETSc options for this subsolver
vars = v
petsc_options_iname = '-pc_type -ksp_type'
petsc_options_value = ' hypre preonly'
[../]
[../]
[]
[Outputs]
file_base = kitten_out
exodus = true
[]
(test/tests/transfers/coord_transform/both-transformed/interpolation/main-app.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = -1
ymax = 0
nx = 10
ny = 10
alpha_rotation = 90
[]
[Variables]
[u][]
[]
[AuxVariables]
[v][]
[v_elem]
order = CONSTANT
family = MONOMIAL
[]
[w][]
[w_elem]
order = CONSTANT
family = MONOMIAL
[]
[]
[ICs]
[w]
type = FunctionIC
function = 'cos(x)*sin(y)'
variable = w
[]
[w_elem]
type = FunctionIC
function = 'cos(x)*sin(y)'
variable = w_elem
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = CoupledForce
variable = u
v = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
verbose = true
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = 'sub-app.i'
execute_on = 'timestep_begin'
[]
[]
[Transfers]
[from_sub]
type = MultiAppGeometricInterpolationTransfer
from_multi_app = sub
source_variable = v
variable = v
execute_on = 'timestep_begin'
[]
[from_sub_elem]
type = MultiAppGeometricInterpolationTransfer
from_multi_app = sub
source_variable = v_elem
variable = v_elem
execute_on = 'timestep_begin'
[]
[to_sub]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = sub
source_variable = w
variable = w
execute_on = 'timestep_begin'
[]
[to_sub_elem]
type = MultiAppGeometricInterpolationTransfer
to_multi_app = sub
source_variable = w_elem
variable = w_elem
execute_on = 'timestep_begin'
[]
[]
(test/tests/outputs/variables/output_vars_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = SECOND
family = LAGRANGE
[../]
# ODE variables
[./x]
family = SCALAR
order = FIRST
initial_condition = 1
[../]
[./y]
family = SCALAR
order = FIRST
initial_condition = 2
[../]
[]
[AuxVariables]
[./elemental]
order = CONSTANT
family = MONOMIAL
[../]
[./elemental_restricted]
order = CONSTANT
family = MONOMIAL
[../]
[./nodal]
order = FIRST
family = LAGRANGE
[../]
[./nodal_restricted]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./conv_u]
type = CoupledForce
variable = u
v = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[AuxKernels]
[./elemental]
type = ConstantAux
variable = elemental
value = 1
[../]
[./elemental_restricted]
type = ConstantAux
variable = elemental_restricted
value = 1
[../]
[./nodal]
type = ConstantAux
variable = elemental
value = 2
[../]
[./nodal_restricted]
type = ConstantAux
variable = elemental_restricted
value = 2
[../]
[]
[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]
active = 'left_u right_u left_v'
[./left_u]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 3
value = 9
[../]
[./left_v]
type = DirichletBC
variable = v
boundary = 1
value = 5
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = 2
value = 2
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.01
num_steps = 1
[]
[Outputs]
show = 'x u nodal elemental'
[./out]
type = Exodus
elemental_as_nodal = true
scalar_as_nodal = true
[../]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere_mortar_error.i)
sphere_outer_htc = 10 # W/m^2/K
sphere_outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Problem]
coord_type = RZ
kernel_coverage_check = false
material_coverage_check = false
[]
[Mesh]
[file]
type = FileMeshGenerator
file = cyl2D.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '3'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[lm]
order = SECOND
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[AuxVariables]
[power_density]
block = 'fuel'
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
block = '1 2'
[]
[heat_source]
type = CoupledForce
variable = temp
block = 'fuel'
v = power_density
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = temp
boundary = 2
primary_emissivity = 0.0
secondary_emissivity = 0.0
[]
[conduction]
type = GapFluxModelConduction
temperature = temp
boundary = 2
gap_conductivity = 5.0
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
primary_boundary = 3
primary_subdomain = 10000
secondary_boundary = 2
secondary_subdomain = 10001
gap_flux_models = 'radiation conduction'
gap_geometry_type = SPHERE
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = '4' # outer RPV
coefficient = ${sphere_outer_htc}
T_infinity = ${sphere_outer_Tinf}
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-7
[]
[Outputs]
exodus = true
csv = true
[Console]
type = Console
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '2 3'
variable = temp
[]
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = 2
variable = temp
[]
[temp_right]
type = SideAverageValue
boundary = 3
variable = temp
[]
[flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[]
[flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 'fuel'
[]
[sphere_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = '4' # outer RVP
T_fluid = ${sphere_outer_Tinf}
htc = ${sphere_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(sphere_convective_out - ptot) / ptot'
pp_names = 'sphere_convective_out ptot'
[]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere_mortar.i)
sphere_outer_htc = 10 # W/m^2/K
sphere_outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Problem]
coord_type = RZ
kernel_coverage_check = false
material_coverage_check = false
[]
[Mesh]
[file]
type = FileMeshGenerator
file = cyl2D.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '3'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[lm]
order = SECOND
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[AuxVariables]
[power_density]
block = 'fuel'
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
block = '1 2'
[]
[heat_source]
type = CoupledForce
variable = temp
block = 'fuel'
v = power_density
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = temp
boundary = 2
primary_emissivity = 0.0
secondary_emissivity = 0.0
[]
[conduction]
type = GapFluxModelConduction
temperature = temp
boundary = 2
gap_conductivity = 5.0
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
primary_boundary = 3
primary_subdomain = 10000
secondary_boundary = 2
secondary_subdomain = 10001
gap_flux_models = 'radiation conduction'
gap_geometry_type = SPHERE
sphere_origin = '0 0 0'
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = '4' # outer RPV
coefficient = ${sphere_outer_htc}
T_infinity = ${sphere_outer_Tinf}
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-7
[]
[Outputs]
exodus = true
csv = true
[Console]
type = Console
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '2 3'
variable = temp
[]
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = 2
variable = temp
[]
[temp_right]
type = SideAverageValue
boundary = 3
variable = temp
[]
[flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[]
[flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 'fuel'
[]
[sphere_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = '4' # outer RVP
T_fluid = ${sphere_outer_Tinf}
htc = ${sphere_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(sphere_convective_out - ptot) / ptot'
pp_names = 'sphere_convective_out ptot'
[]
[]
(test/tests/auxkernels/nodal_aux_var/nodal_aux_ts_test.i)
#
# Testing nodal aux variables that are computed only at the end of the time step
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 3
ny = 3
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
active = 'aux1 aux2'
[./aux1]
order = FIRST
family = LAGRANGE
[../]
[./aux2]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'ie diff force'
[./ie]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
#Coupling of nonlinear to Aux
[./force]
type = CoupledForce
variable = u
v = aux2
[../]
[]
[AuxKernels]
active = 'constant field'
#Simple Aux Kernel
[./constant]
variable = aux1
type = ConstantAux
value = 1
[../]
#Shows coupling of Aux to nonlinear
[./field]
variable = aux2
type = CoupledAux
value = 2
coupled = u
execute_on = timestep_end
[../]
[]
[BCs]
active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 3
value = 1
[../]
[]
[Executioner]
type = Transient
start_time = 0
dt = 0.1
num_steps = 2
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out_ts
exodus = true
[]
(test/tests/problems/eigen_problem/eigensolvers/ne-coupled-resid-scaling.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
elem_type = QUAD4
nx = 8
ny = 8
[]
[Variables]
[u]
initial_condition = 1
[]
[T]
initial_condition = 1
[]
[]
[AuxVariables]
[power][]
[]
[Kernels]
[./diff]
type = DiffMKernel
variable = u
mat_prop = diffusion
offset = 0.0
[../]
[./rhs]
type = CoefReaction
variable = u
coefficient = -1.0
extra_vector_tags = 'eigen'
[../]
[./diff_T]
type = CoefDiffusion
variable = T
coef = 1e30
[../]
[./src_T]
type = CoupledForce
variable = T
v = power
coef = 1e30
[../]
[]
[AuxKernels]
[./power_ak]
type = NormalizationAux
variable = power
source_variable = u
normalization = unorm
# this coefficient will affect the eigenvalue.
normal_factor = 10
execute_on = linear
[../]
[]
[BCs]
[./homogeneous]
type = DirichletBC
variable = u
boundary = '0 1 2 3'
value = 0
[../]
[./eigenU]
type = EigenDirichletBC
variable = u
boundary = '0 1 2 3'
[../]
[./homogeneousT]
type = DirichletBC
variable = T
boundary = '0 1 2 3'
value = 0
[../]
[./eigenT]
type = EigenDirichletBC
variable = T
boundary = '0 1 2 3'
[../]
[]
[Materials]
[./dc]
type = VarCouplingMaterial
var = T
block = 0
base = 1.0
coef = 1.0
[../]
[]
[Executioner]
type = Eigenvalue
solve_type = PJFNK
automatic_scaling = true
petsc_options = '-pc_svd_monitor'
petsc_options_iname = '-pc_type'
petsc_options_value = 'svd'
verbose = true
resid_vs_jac_scaling_param = 1
[]
[Postprocessors]
[./unorm]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = linear
[../]
[]
[VectorPostprocessors]
[./eigenvalues]
type = Eigenvalues
execute_on = 'timestep_end'
[../]
[]
[Outputs]
exodus = true
csv = true
execute_on = 'timestep_end'
[]
(modules/combined/examples/optimization/3d_mbb.i)
vol_frac = 0.5
E0 = 1
Emin = 1e-8
power = 2
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 3
nx = 60
ny = 20
nz = 20
xmin = 0
xmax = 30
ymin = 0
ymax = 10
zmin = 0
zmax = 10
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold_y
coord = '0 0 0; 0 0 10'
[]
[push]
type = ExtraNodesetGenerator
input = node
new_boundary = push
coord = '30 10 5'
[]
[]
[Variables]
[disp_z]
[]
[Dc]
initial_condition = -1.0
[]
[]
[AuxVariables]
[Emin]
family = MONOMIAL
order = CONSTANT
initial_condition = ${Emin}
[]
[power]
family = MONOMIAL
order = CONSTANT
initial_condition = ${power}
[]
[E0]
family = MONOMIAL
order = CONSTANT
initial_condition = ${E0}
[]
[sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[AuxKernel]
type = MaterialRealAux
variable = sensitivity
property = sensitivity
execute_on = LINEAR
[]
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[Dc_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[AuxKernel]
type = SelfAux
variable = Dc_elem
v = Dc
execute_on = 'TIMESTEP_END'
[]
[]
[mat_den_nodal]
family = L2_LAGRANGE
order = FIRST
initial_condition = ${vol_frac}
[AuxKernel]
type = SelfAux
execute_on = TIMESTEP_END
variable = mat_den_nodal
v = mat_den
[]
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[Kernels]
[diffusion]
type = FunctionDiffusion
variable = Dc
function = 0.15 # radius coeff
[]
[potential]
type = Reaction
variable = Dc
[]
[source]
type = CoupledForce
variable = Dc
v = sensitivity
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_y
boundary = hold_y
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[boundary_penalty]
type = ADRobinBC
variable = Dc
boundary = 'left top front back'
coefficient = 10
[]
[boundary_penalty_right]
type = ADRobinBC
variable = Dc
boundary = 'right'
coefficient = 10
[]
[]
[NodalKernels]
[push]
type = NodalGravity
variable = disp_y
boundary = push
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'Emin mat_den power E0'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
incremental = false
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[update]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
line_search = none
nl_abs_tol = 1e-4
l_max_its = 200
start_time = 0.0
dt = 1.0
num_steps = 70
[]
[Outputs]
[out]
type = Exodus
execute_on = 'INITIAL TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Controls]
[first_period]
type = TimePeriod
start_time = 0.0
end_time = 10
enable_objects = 'BCs::boundary_penalty_right'
execute_on = 'initial timestep_begin'
[]
[]
(test/tests/executioners/nullspace/singular.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 10
nx = 8
[]
[Problem]
null_space_dimension = 1
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./eig]
type = MassEigenKernel
variable = u
eigen_postprocessor = 1.0002920196258376e+01
eigen = false
[../]
[./force]
type = CoupledForce
variable = u
v = aux_v
[../]
[]
[AuxVariables]
[./aux_v]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = eigen_mode
[../]
[../]
[]
[AuxKernels]
[./set_source]
type = FunctionAux
variable = aux_v
function = second_harmonic
execute_on = timestep_begin
[../]
[]
[Functions]
[./eigen_mode]
type = ParsedFunction
expression = 'sqrt(2.0 / L) * sin(mode * pi * x / L)'
symbol_names = 'L mode'
symbol_values = '10 1'
[../]
[./second_harmonic]
type = ParsedFunction
expression = 'sqrt(2.0 / L) * sin(mode * pi * x / L)'
symbol_names = 'L mode'
symbol_values = '10 2'
[../]
[]
[BCs]
[./homogeneous]
type = DirichletBC
variable = u
boundary = '0 1'
value = 0
[../]
[]
[VectorPostprocessors]
[./sample_solution]
type = LineValueSampler
variable = u
start_point = '0 0 0'
end_point = '10 0 0'
sort_by = x
num_points = 9
execute_on = timestep_end
[../]
[]
[Preconditioning]
[./prec]
type = SMP
full = true
[../]
[]
[Executioner]
type = SteadyWithNull
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_pc_side -snes_type -ksp_norm_type'
petsc_options_value = 'hypre boomeramg left ksponly preconditioned'
nl_rel_tol = 1.0e-14
nl_abs_tol = 1.0e-14
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
[]
(test/tests/preconditioners/fsp/nested-split.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[]
[]
[Variables]
[u][]
[v][]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
[]
[conv_v]
type = CoupledForce
variable = v
v = u
[]
[diff_v]
type = Diffusion
variable = v
[]
[]
[BCs]
[left_u]
type = DirichletBC
variable = u
boundary = 3
value = 0
[]
[right_u]
type = DirichletBC
variable = u
boundary = 1
value = 100
[]
[left_v]
type = DirichletBC
variable = v
boundary = 3
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = 1
value = 0
[]
[]
[Executioner]
type = Steady
[]
[Preconditioning]
[FSP]
type = FSP
topsplit = 'by_var'
[by_var]
splitting = 'u v'
splitting_type = multiplicative
petsc_options_iname = '-ksp_type'
petsc_options_value = 'fgmres'
[]
[u]
vars = 'u'
splitting = 'u_diri u_bulk'
splitting_type = multiplicative
petsc_options_iname = '-ksp_type'
petsc_options_value = 'fgmres'
[]
[u_diri]
vars = 'u'
petsc_options = '-ksp_view_pmat'
sides = 'left right'
[]
[u_bulk]
vars = 'u'
petsc_options = '-ksp_view_pmat'
petsc_options_iname = '-ksp_type'
petsc_options_value = 'cg'
unsides = 'left right'
[]
[v]
vars = 'v'
splitting = 'v_diri v_bulk'
splitting_type = multiplicative
petsc_options_iname = '-ksp_type'
petsc_options_value = 'fgmres'
[]
[v_diri]
vars = 'v'
petsc_options = '-ksp_view_pmat'
sides = 'left right'
[]
[v_bulk]
vars = 'v'
petsc_options = '-ksp_view_pmat'
petsc_options_iname = '-ksp_type'
petsc_options_value = 'cg'
unsides = 'left right'
[]
[]
[]
[Outputs]
exodus = true
[]
(test/tests/misc/multiple-nl-systems/test.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
[]
[Problem]
nl_sys_names = 'u v'
[]
[Variables]
[u]
nl_sys = 'u'
[]
[v]
nl_sys = 'v'
[]
[]
[Kernels]
[diff_u]
type = Diffusion
variable = u
[]
[diff_v]
type = Diffusion
variable = v
[]
[force]
type = CoupledForce
variable = v
v = u
[]
[]
[BCs]
[left_u]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right_u]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 1
[]
[]
[Executioner]
type = SteadySolve2
solve_type = 'NEWTON'
petsc_options = '-snes_monitor'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
first_nl_sys_to_solve = 'u'
second_nl_sys_to_solve = 'v'
[]
[Outputs]
print_nonlinear_residuals = false
print_linear_residuals = false
exodus = true
[]
(test/tests/multiapps/relaxation/picard_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
initial_condition = 1
[]
[inverse_v]
initial_condition = 1
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = inverse_v
[]
[]
[AuxKernels]
[invert_v]
type = QuotientAux
variable = inverse_v
denominator = v
numerator = 20.0
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[Neumann_right]
type = NeumannBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
num_steps = 4
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_abs_tol = 1e-14
[]
[Outputs]
exodus = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_begin
positions = '0 0 0'
input_files = picard_relaxed_sub.i
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(modules/combined/test/tests/restart-transient-from-ss-with-stateful/parent_tr.i)
[Problem]
restart_file_base = parent_ss_checkpoint_cp/LATEST
force_restart = true
# The auxiliary field has an initial condition
allow_initial_conditions_with_restart = true
[]
[Mesh]
file = parent_ss_checkpoint_cp/LATEST
[]
[Variables]
[temp]
# no initial condition for restart.
[]
[]
[AuxVariables]
[power]
order = FIRST
family = L2_LAGRANGE
initial_condition = 350
[]
[]
[Kernels]
[heat]
type = HeatConduction
variable = temp
[]
[heat_ie]
type = HeatConductionTimeDerivative
variable = temp
[]
[heat_source_fuel]
type = CoupledForce
variable = temp
v = 'power'
[]
[]
[BCs]
[all]
type = DirichletBC
variable = temp
boundary = 'bottom top left right'
value = 300
[]
[]
[Materials]
[heat_material]
type = HeatConductionMaterial
temp = temp
specific_heat = 1000
thermal_conductivity = 500
[]
[density]
type = Density
density = 2000
[]
[]
[Postprocessors]
[avg_temp]
type = ElementAverageValue
variable = temp
execute_on = 'timestep_end'
[]
[avg_power]
type = ElementAverageValue
variable = power
execute_on = 'timestep_end'
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 300'
line_search = 'none'
l_tol = 1e-02
nl_rel_tol = 5e-05
nl_abs_tol = 5e-05
l_max_its = 50
nl_max_its = 25
start_time = 0
end_time = 40
dt = 10
[]
[Outputs]
print_linear_residuals = false
perf_graph = true
color = true
exodus = true
[]
[MultiApps]
[bison]
type = TransientMultiApp
positions = '0 0 0'
input_files = 'sub_tr.i'
execute_on = 'timestep_end'
[]
[]
[Transfers]
[to_bison_mechanics]
type = MultiAppProjectionTransfer
to_multi_app = bison
variable = temp
source_variable = temp
execute_on = 'timestep_end'
[]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_3D.i)
outer_htc = 10 # W/m^2/K
outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 6
nz = 6
xmin = -1
xmax = -0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
elem_type = HEX27
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'left_bottom left_back left_right left_front left_left left_top'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 8
nz = 8
xmin = 0.5
xmax = 1
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
elem_type = HEX27
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3 4 5'
# new_boundary = 'right_bottom right_back right_right right_front right_left right_top'
new_boundary = '100 101 102 103 104 105'
[]
[right_block_sidesets_rename]
type = RenameBoundaryGenerator
input = right_block_sidesets
old_boundary = '100 101 102 103 104 105'
new_boundary = 'right_bottom right_back right_right right_front right_left right_top'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sidesets_rename
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[]
[AuxVariables]
[gap_conductance]
order = CONSTANT
family = MONOMIAL
[]
[power_density]
block = 1
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
[]
[heat_source]
type = CoupledForce
variable = temp
block = 1
v = power_density
[]
[]
[AuxKernels]
[gap_cond]
type = MaterialRealAux
property = gap_conductance
variable = gap_conductance
boundary = 'left_right'
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[ThermalContact]
[thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 'right_left'
secondary = 'left_right'
emissivity_primary = 0
emissivity_secondary = 0
gap_conductivity = 5
gap_geometry_type = PLATE
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = 'right_right' # outer RPV
coefficient = ${outer_htc}
T_infinity = ${outer_Tinf}
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-8
[Quadrature]
order = fifth
side_order = seventh
[]
[]
[Outputs]
exodus = true
csv = true
[Console]
type = Console
[]
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = 'left_right'
variable = temp
[]
[temp_right]
type = SideAverageValue
boundary = 'right_left'
variable = temp
[]
[flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 'left_right'
diffusivity = thermal_conductivity
[]
[flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 'right_left'
diffusivity = thermal_conductivity
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 1
[]
[convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = 'right_right' # outer RVP
T_fluid = ${outer_Tinf}
htc = ${outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(convective_out - ptot) / ptot'
pp_names = 'convective_out ptot'
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = 'left_right right_left'
variable = temp
[]
[]
(test/tests/multiapps/relaxation/bad_relax_factor_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
initial_condition = 1
[]
[inverse_v]
initial_condition = 1
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[force_u]
type = CoupledForce
variable = u
v = inverse_v
[]
[]
[AuxKernels]
[invert_v]
type = QuotientAux
variable = inverse_v
denominator = v
numerator = 20.0
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[Neumann_right]
type = NeumannBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[picard_its]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
num_steps = 4
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_abs_tol = 1e-14
relaxation_factor = 2.0
transformed_variables = u
[]
[Outputs]
exodus = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_begin
positions = '0 0 0'
input_files = picard_relaxed_sub.i
[]
[]
[Transfers]
[v_from_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = sub
source_variable = v
variable = v
[]
[u_to_sub]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = sub
source_variable = u
variable = u
[]
[]
(test/tests/transfers/coord_transform/single-app.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 1
xmax = 3
nx = 20
ny = 10
[]
[Variables]
[u][]
[v][]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[force]
type = CoupledForce
variable = u
v = v
[]
[diff_v]
type = Diffusion
variable = v
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/problems/eigen_problem/jfnk_mo/ne_coupled_mo.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
elem_type = QUAD4
nx = 8
ny = 8
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./T]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./rhs]
type = CoefReaction
variable = u
coefficient = -1.0
extra_vector_tags = 'eigen'
[../]
[./diff_T]
type = Diffusion
variable = T
[../]
[./src_T]
type = CoupledForce
variable = T
v = u
[../]
[]
[BCs]
[./homogeneous]
type = DirichletBC
variable = u
boundary = '0 1 2 3'
value = 0
[../]
[./eigenU]
type = EigenDirichletBC
variable = u
boundary = '0 1 2 3'
[../]
[./homogeneousT]
type = DirichletBC
variable = T
boundary = '0 1 2 3'
value = 0
[../]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Eigenvalue
solve_type = PJFNKMO
nl_rel_tol = 1e-6
[]
[VectorPostprocessors]
[./eigenvalues]
type = Eigenvalues
execute_on = 'timestep_end'
[../]
[]
[Outputs]
csv = true
file_base = ne_coupled
execute_on = 'timestep_end'
[]
(test/tests/outputs/variables/output_vars_nonexistent.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = SECOND
family = LAGRANGE
[../]
# ODE variables
[./x]
family = SCALAR
order = FIRST
initial_condition = 1
[../]
[./y]
family = SCALAR
order = FIRST
initial_condition = 2
[../]
[]
[AuxVariables]
[./elemental]
order = CONSTANT
family = MONOMIAL
[../]
[./elemental_restricted]
order = CONSTANT
family = MONOMIAL
[../]
[./nodal]
order = FIRST
family = LAGRANGE
[../]
[./nodal_restricted]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./td]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./conv_u]
type = CoupledForce
variable = u
v = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[AuxKernels]
[./elemental]
type = ConstantAux
variable = elemental
value = 1
[../]
[./elemental_restricted]
type = ConstantAux
variable = elemental_restricted
value = 1
[../]
[./nodal]
type = ConstantAux
variable = elemental
value = 2
[../]
[./nodal_restricted]
type = ConstantAux
variable = elemental_restricted
value = 2
[../]
[]
[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]
active = 'left_u right_u left_v'
[./left_u]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 3
value = 9
[../]
[./left_v]
type = DirichletBC
variable = v
boundary = 1
value = 5
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = 2
value = 2
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.01
num_steps = 10
[]
[Outputs]
file_base = out_nonexistent
exodus = true
show = 'u elemental nodal x foo1 foo2'
[]
(modules/functional_expansion_tools/test/tests/standard_use/multiapp_different_physical_boundaries.i)
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = Diffusion
variable = m
[../]
[./time_diff_m]
type = TimeDerivative
variable = m
[../]
[./s_in]
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '1.0 9.0'
x = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = multiapp_sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/functional_expansion_tools/examples/3D_volumetric_Cartesian/main.i)
# Basic example coupling a master and sub app in a 3D Cartesian volume.
#
# The master app provides field values to the sub app via Functional Expansions, which then performs
# its calculations. The sub app's solution field values are then transferred back to the master app
# and coupled into the solution of the master app solution.
#
# This example couples Functional Expansions via AuxVariable.
#
# Note: this problem is not light, and may take a few minutes to solve.
[Mesh]
type = GeneratedMesh
dim = 3
xmin = 0.0
xmax = 10.0
nx = 15
ymin = 1.0
ymax = 11.0
ny = 25
zmin = 2.0
zmax = 12.0
nz = 35
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'top bottom left right front back'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3 4 5'
physical_bounds = '0.0 10.0 1.0 11.0 2.0 12.0'
x = Legendre
y = Legendre
z = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_balance/large_gap_heat_transfer_test_sphere.i)
sphere_outer_htc = 10 # W/m^2/K
sphere_outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
[file]
type = FileMeshGenerator
file = cyl2D.e
[]
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[]
[AuxVariables]
[gap_conductance]
order = CONSTANT
family = MONOMIAL
[]
[power_density]
block = 'fuel'
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
[]
[heat_source]
type = CoupledForce
variable = temp
block = 'fuel'
v = power_density
[]
[]
[AuxKernels]
[gap_cond]
type = MaterialRealAux
property = gap_conductance
variable = gap_conductance
boundary = 2
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[ThermalContact]
[thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0.8
emissivity_secondary = 0.8
gap_conductivity = 0.1
quadrature = true
gap_geometry_type = SPHERE
sphere_origin = '0 0 0'
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = '4' # outer RPV
coefficient = ${sphere_outer_htc}
T_infinity = ${sphere_outer_Tinf}
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-7
[Quadrature]
order = fifth
side_order = seventh
[]
[]
[Outputs]
exodus = false
csv = true
[Console]
type = Console
[]
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = 2
variable = temp
[]
[temp_right]
type = SideAverageValue
boundary = 3
variable = temp
[]
[flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[]
[flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 'fuel'
[]
[sphere_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = '4' # outer RVP
T_fluid = ${sphere_outer_Tinf}
htc = ${sphere_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(sphere_convective_out - ptot) / ptot'
pp_names = 'sphere_convective_out ptot'
[]
[]
(test/tests/fvkernels/fv-to-fe-coupling/1d.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 40
xmax = 2
[]
[]
[Variables]
[fv]
family = MONOMIAL
order = CONSTANT
fv = true
initial_condition = 1
[]
[fe]
initial_condition = 1
[]
[]
[FVKernels]
[diff]
type = FVDiffusion
variable = fv
coeff = fv_prop
coeff_interp_method = average
[]
[coupled]
type = FVCoupledForce
v = fv
variable = fv
[]
[]
[Kernels]
[diff]
type = ADFunctorMatDiffusion
variable = fe
diffusivity = fe_prop
[]
[coupled]
type = CoupledForce
v = fv
variable = fe
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = fv
boundary = left
value = 0
[]
[right]
type = FVDirichletBC
variable = fv
boundary = right
value = 1
[]
[]
[BCs]
[left]
type = DirichletBC
variable = fe
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = fe
boundary = right
value = 1
[]
[]
[Materials]
active = 'fe_mat fv_mat'
[bad_mat]
type = FEFVCouplingMaterial
fe_var = fe
fv_var = fv
execute_on = 'linear nonlinear'
[]
[fe_mat]
type = FEFVCouplingMaterial
fe_var = fe
execute_on = 'linear nonlinear'
[]
[fv_mat]
type = FEFVCouplingMaterial
fv_var = fv
[]
[fe_mat_bad_dep]
type = FEFVCouplingMaterial
fe_var = fe
declared_prop_name = bad
[]
[fv_mat_bad_dep]
type = FEFVCouplingMaterial
fv_var = fv
retrieved_prop_name = bad
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
line_search = 'none'
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/include/kernels/CoupledForceRZ.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 "CoupledForce.h"
#include "RZSymmetry.h"
/**
* Source term proportional to the coupled variable in RZ coordinates
*/
class CoupledForceRZ : public CoupledForce, public RZSymmetry
{
public:
CoupledForceRZ(const InputParameters & parameters);
protected:
virtual Real computeQpResidual() override;
virtual Real computeQpJacobian() override;
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override;
public:
static InputParameters validParams();
};