- 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
MatDiffusion
Diffusion equation Kernel that takes an isotropic Diffusivity from a material property
Implements the term where the diffusion coefficient (diffusivity
) is provided by a FunctionMaterial
function material (see Phase Field Module
for more information), is the nonlinear variable the kernel is operating on.
This kernel can be used in a coupled form if the optional v
variable is specified. This allows applying the diffusion operator to a variable given by v
, which is different from the kernel variable.
can depend on arbitrary nonlinear variables (args
). The complete Jacobian contributions are provided by the kernel. To build the Jacobian the kernel uses all derivatives of with respect to the kernel variable and the variables specified in args
.
Input Parameters
- argsOptional vector of arguments for the diffusivity. If provided and diffusivity is a derivative parsed material, Jacobian contributions from the diffusivity will be automatically computed
C++ Type:std::vector<VariableName>
Controllable:No
Description:Optional vector of arguments for the diffusivity. If provided and diffusivity is a derivative parsed material, Jacobian contributions from the diffusivity will be automatically computed
- 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
- concDeprecated! Use 'v' instead
C++ Type:std::vector<VariableName>
Controllable:No
Description:Deprecated! Use 'v' instead
- diffusivityDThe diffusivity value or material property
Default:D
C++ Type:MaterialPropertyName
Controllable:No
Description:The diffusivity value or material property
- 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.
- vCoupled concentration variable for kernel to operate on; if this is not specified, the kernel's nonlinear variable will be used as usual
C++ Type:std::vector<VariableName>
Controllable:No
Description:Coupled concentration variable for kernel to operate on; if this is not specified, the kernel's nonlinear variable will be used as usual
Optional Parameters
- absolute_value_vector_tagsThe tags for the vectors this residual object should fill with the absolute value of the residual contribution
C++ Type:std::vector<TagName>
Controllable:No
Description:The tags for the vectors this residual object should fill with the absolute value of the residual contribution
- extra_matrix_tagsThe extra tags for the matrices this Kernel should fill
C++ Type:std::vector<TagName>
Controllable:No
Description:The extra tags for the matrices this Kernel should fill
- extra_vector_tagsThe extra tags for the vectors this Kernel should fill
C++ Type:std::vector<TagName>
Controllable:No
Description:The extra tags for the vectors this Kernel should fill
- matrix_tagssystemThe tag for the matrices this Kernel should fill
Default:system
C++ Type:MultiMooseEnum
Options:nontime, system
Controllable:No
Description:The tag for the matrices this Kernel should fill
- vector_tagsnontimeThe tag for the vectors this Kernel should fill
Default:nontime
C++ Type:MultiMooseEnum
Options:nontime, time
Controllable:No
Description:The tag for the vectors this Kernel should fill
Tagging Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- diag_save_inThe name of auxiliary variables to save this Kernel's diagonal Jacobian contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
C++ Type:std::vector<AuxVariableName>
Controllable:No
Description:The name of auxiliary variables to save this Kernel's diagonal Jacobian contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- implicitTrueDetermines whether this object is calculated using an implicit or explicit form
Default:True
C++ Type:bool
Controllable:No
Description:Determines whether this object is calculated using an implicit or explicit form
- save_inThe name of auxiliary variables to save this Kernel's residual contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
C++ Type:std::vector<AuxVariableName>
Controllable:No
Description:The name of auxiliary variables to save this Kernel's residual contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
- seed0The seed for the master random number generator
Default:0
C++ Type:unsigned int
Controllable:No
Description:The seed for the master random number generator
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Advanced Parameters
Input Files
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialAnisotropy.i)
- (test/tests/dgkernels/passive-scalar-channel-flow/test.i)
- (modules/stochastic_tools/test/tests/surrogates/poly_chaos/sub.i)
- (modules/optimization/test/tests/optimizationreporter/bimaterial/model.i)
- (modules/xfem/test/tests/moving_interface/verification/2D_rz_homog1mat.i)
- (test/tests/executioners/eigen_convergence/a.i)
- (test/tests/scaling/ignore-variables/ignore.i)
- (modules/stochastic_tools/examples/surrogates/sub.i)
- (modules/stochastic_tools/test/tests/functions/drl_reward/drl_reward.i)
- (test/tests/outputs/exodus/exodus_side_discontinuous_edge2.i)
- (test/tests/outputs/csv/csv_transient_vpp.i)
- (modules/xfem/test/tests/moving_interface/verification/2D_xy_homog1mat.i)
- (test/tests/materials/derivative_material_interface/bad_evaluation.i)
- (modules/xfem/test/tests/moving_interface/verification/1D_xy_homog1mat.i)
- (modules/contact/test/tests/bouncing-block-contact/frictional-mortar-min-lm-mortar-disp.i)
- (test/tests/misc/solution_invalid/solution_invalid.i)
- (modules/contact/test/tests/bouncing-block-contact/frictionless-penalty-weighted-gap.i)
- (test/tests/kernels/hfem/3d-lower-d-volumes.i)
- (modules/contact/test/tests/bouncing-block-contact/variational-frictional.i)
- (test/tests/auxkernels/mesh_integer/mesh_integer.i)
- (modules/stochastic_tools/test/tests/transfers/serialized_solution_transfer/sub.i)
- (modules/xfem/test/tests/moving_interface/phase_transition_3d.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialAnisotropyAntitrap.i)
- (modules/contact/test/tests/bouncing-block-contact/frictional-nodal-min-normal-lm-mortar-pdass-tangential-lm-mortar-action.i)
- (modules/optimization/test/tests/optimizationreporter/point_loads/forward_and_adjoint.i)
- (modules/phase_field/test/tests/SplitCH/forward_split_math_test.i)
- (test/tests/mesh/add_subdomain_ids/add_subdomain_ids.i)
- (modules/stochastic_tools/test/tests/reporters/parallel_storage/sub.i)
- (modules/optimization/test/tests/optimizationreporter/point_loads/adjoint.i)
- (modules/phase_field/examples/multiphase/GrandPotential3Phase_masscons.i)
- (modules/optimization/test/tests/optimizationreporter/constant_heat_source/forward.i)
- (modules/phase_field/test/tests/KKS_system/nonlinear.i)
- (modules/phase_field/test/tests/initial_conditions/SmoothSuperellipsoidIC_3D.i)
- (modules/contact/test/tests/bouncing-block-contact/frictionless-nodal-reduced-active-set.i)
- (modules/xfem/test/tests/moving_interface/cut_mesh_3d.i)
- (modules/xfem/test/tests/moving_interface/verification/1D_xy_lsdep1mat.i)
- (modules/stochastic_tools/test/tests/surrogates/nearest_point/sub_vector.i)
- (test/tests/interfacekernels/1d_interface/reaction_1D_transient.i)
- (modules/phase_field/test/tests/GBType/GB_Type_Phase2.i)
- (modules/optimization/test/tests/executioners/constrained/shape_optimization/forward.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/sub.i)
- (modules/stochastic_tools/test/tests/controls/libtorch_drl_control/libtorch_drl_control.i)
- (modules/optimization/test/tests/optimizationreporter/constant_heat_source/adjoint.i)
- (modules/optimization/test/tests/optimizationreporter/point_loads/forward_homogeneous.i)
- (modules/stochastic_tools/test/tests/userobjects/inverse_mapping/sub.i)
- (modules/contact/test/tests/bouncing-block-contact/variational-frictional-action.i)
- (modules/stochastic_tools/test/tests/reporters/ActiveLearningGP/sub.i)
- (modules/phase_field/test/tests/phase_field_crystal/PFCEnergyDensity/auxkernel.i)
- (modules/phase_field/examples/anisotropic_interfaces/GrandPotentialTwophaseAnisotropy.i)
- (modules/heat_transfer/test/tests/sideset_heat_transfer/cfem_gap.i)
- (modules/stochastic_tools/test/tests/reporters/mapping/map_sub.i)
- (test/tests/userobjects/side_uo_with_lowerd_use/side-uo-with-lower-d-use.i)
- (modules/contact/test/tests/mortar_aux_kernels/pressure-aux-frictionless-3d.i)
- (modules/phase_field/test/tests/MultiSmoothCircleIC/latticesmoothcircleIC_test.i)
- (modules/stochastic_tools/test/tests/actions/parameter_study_action/sub_eigen.i)
- (modules/phase_field/test/tests/phase_field_crystal/PFCTrad/PFCTrad_test.i)
- (modules/contact/test/tests/mortar_cartesian_lms/frictionless-mortar-3d.i)
- (modules/optimization/test/tests/optimizationreporter/general_opt/point_loads_gen_opt/forward.i)
- (modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d.i)
- (test/tests/misc/rename-parameters/rename-mat-prop.i)
- (modules/optimization/test/tests/outputs/exodus_optimization_steady/adjoint_iteration_output.i)
- (test/tests/materials/interface_material/interface_value_material_noIK.i)
- (modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d_pg.i)
- (modules/contact/test/tests/bouncing-block-contact/frictional-nodal-min-normal-lm-mortar-pdass-tangential-lm-mortar-disp.i)
- (modules/contact/test/tests/bouncing-block-contact/tied-nodes.i)
- (modules/combined/examples/publications/rapid_dev/fig6.i)
- (test/tests/materials/interface_material/interface_value_material_split_mesh.i)
- (modules/optimization/test/tests/optimizationreporter/bc_load_linearFunction/forward.i)
- (modules/phase_field/examples/slkks/CrFe.i)
- (modules/phase_field/test/tests/electrochem_sintering/ElectrochemicalSintering_test.i)
- (modules/phase_field/test/tests/mobility_derivative/coupledmatdiffusion.i)
- (modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/lid-driven/hybrid-cg-dg.i)
- (modules/optimization/test/tests/optimizationreporter/material/adjoint_explicit.i)
- (modules/phase_field/test/tests/phase_field_crystal/PFCTrad/pfct_newton_split1_asm1_10.i)
- (modules/contact/test/tests/bouncing-block-contact/mixed-weighted-gap-swapped.i)
- (modules/stochastic_tools/test/tests/reporters/BFActiveLearning/sub_lf.i)
- (modules/optimization/test/tests/optimizationreporter/material/adjoint.i)
- (modules/combined/test/tests/multiphase_mechanics/elasticenergymaterial.i)
- (test/tests/scaling/remove-singularity/test.i)
- (test/tests/constraints/overwrite_variables/test_balance.i)
- (modules/phase_field/test/tests/phase_field_crystal/PFCTrad/pfct_newton_split1_asm5.i)
- (test/tests/kernels/2d_diffusion/matdiffusion.i)
- (test/tests/executioners/eigen_convergence/b.i)
- (modules/stochastic_tools/test/tests/surrogates/cross_validation/sub_vector.i)
- (modules/contact/test/tests/mortar_cartesian_lms/frictionless-mortar-3d-friction.i)
- (modules/stochastic_tools/test/tests/reporters/BFActiveLearning/sub.i)
- (modules/optimization/test/tests/outputs/exodus_optimization_steady/forward.i)
- (modules/stochastic_tools/examples/surrogates/combined/trans_diff_2d/trans_diff_sub.i)
- (modules/scalar_transport/test/tests/multiple-species/multiple-species.i)
- (modules/contact/test/tests/mortar_cartesian_lms/frictionless-weighted-gap-lm.i)
- (modules/optimization/test/tests/optimizationreporter/bimaterial/grad.i)
- (test/tests/materials/ad_material/conversion/1d_dirichlet.i)
- (modules/phase_field/test/tests/KKS_system/lagrange_multiplier.i)
- (modules/stochastic_tools/examples/surrogates/polynomial_regression/sub.i)
- (test/tests/misc/rename-parameters/rename-param.i)
- (modules/scalar_transport/test/tests/multiple-species/single-specie.i)
- (modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/channel-flow/channel-hybrid.i)
- (modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d-test-derivative-trimming.i)
- (modules/stochastic_tools/test/tests/surrogates/polynomial_regression/sub_vector.i)
- (tutorials/tutorial02_multiapps/step03_coupling/01_parent.i)
- (modules/optimization/examples/materialTransient/forward.i)
- (test/tests/kernels/hfem/robin.i)
- (test/tests/materials/interface_material/interface_value_material.i)
- (modules/phase_field/test/tests/KKS_system/kks_multiphase.i)
- (modules/stochastic_tools/test/tests/variablemappings/pod_mapping/sub.i)
- (modules/xfem/test/tests/moving_interface/verification/1D_rz_homog1mat.i)
- (modules/contact/test/tests/mortar_aux_kernels/pressure-aux-friction-3d.i)
- (test/tests/userobjects/side_user_object_no_boundary_error/lower_d_side_boundary.i)
- (test/tests/kernels/ad_mat_diffusion/1D_transient.i)
- (modules/contact/test/tests/bouncing-block-contact/frictionless-penalty-weighted-gap-action.i)
- (modules/xfem/test/tests/moving_interface/moving_diffusion.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialPFM.i)
- (modules/stochastic_tools/test/tests/surrogates/load_store/sub.i)
- (modules/stochastic_tools/test/tests/surrogates/pod_rb/internal/sub.i)
- (modules/phase_field/test/tests/mobility_derivative/matdiffusion.i)
- (modules/contact/test/tests/bouncing-block-contact/frictional-penalty-weighted-vel.i)
- (modules/phase_field/test/tests/mobility_derivative/mobility_derivative_direct_coupled_test.i)
- (modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/mms/lid-driven/hybrid-cg-dg-mms.i)
- (modules/stochastic_tools/test/tests/surrogates/pod_rb/errors/sub.i)
- (modules/optimization/test/tests/optimizationreporter/material/forward.i)
- (modules/optimization/test/tests/optimizationreporter/bc_load_linearFunction/forward_and_adjoint.i)
- (modules/optimization/test/tests/executioners/constrained/inequality/forward_and_adjoint.i)
- (test/tests/auxkernels/mesh_integer/dg_mesh_integer.i)
- (test/tests/materials/functor_properties/traditional-mat-props.i)
- (test/tests/kernels/hfem/lower-d-volumes.i)
- (test/tests/interfacekernels/hybrid/interface.i)
- (modules/stochastic_tools/test/tests/userobjects/inverse_mapping/inverse_map.i)
- (modules/phase_field/test/tests/MultiSmoothCircleIC/multismoothcircleIC_test.i)
- (test/tests/interfacekernels/1d_interface/reaction_1D_steady.i)
- (modules/phase_field/test/tests/SoretDiffusion/split_temp.i)
- (modules/phase_field/test/tests/slkks/full_solve.i)
- (modules/optimization/test/tests/optimizationreporter/bimaterial/model_and_adjoint.i)
- (modules/phase_field/examples/anisotropic_interfaces/GrandPotentialSolidification.i)
- (modules/xfem/test/tests/moving_interface/verification/1D_rz_lsdep1mat.i)
- (modules/optimization/test/tests/optimizationreporter/constant_heat_source/forward_nonLinear.i)
- (test/tests/kernels/simple_transient_diffusion/ill_conditioned_simple_diffusion.i)
- (modules/contact/test/tests/bouncing-block-contact/bouncing-block-ranfs.i)
- (test/tests/outputs/exodus/exodus_side_discontinuous.i)
- (modules/phase_field/test/tests/SoretDiffusion/direct_temp.i)
- (modules/xfem/test/tests/moving_interface/verification/2D_rz_lsdep1mat.i)
- (modules/optimization/test/tests/outputs/exodus_optimization_steady/forward_and_adjoint_iteration_output.i)
- (modules/optimization/examples/materialTransient/forward_and_adjoint.i)
- (tutorials/tutorial02_multiapps/step03_coupling/02_parent_picard.i)
- (modules/phase_field/test/tests/MultiSmoothCircleIC/latticesmoothcircleIC_normal_test.i)
- (test/tests/dgkernels/hfem/hfem_jacobian.i)
- (modules/optimization/test/tests/optimizationreporter/general_opt/point_loads_gen_opt/forward_homogeneous.i)
- (modules/phase_field/test/tests/mobility_derivative/mobility_derivative_split_coupled_test.i)
- (modules/optimization/test/tests/optimizationreporter/bc_load_linearFunction/homogeneous_forward.i)
- (modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_ktemp_1D.i)
- (modules/optimization/test/tests/optimizationreporter/bc_load_linearFunction/adjoint.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/unstabilized-velocity-component-objects.i)
- (modules/optimization/test/tests/optimizationreporter/point_loads/forward.i)
- (modules/phase_field/test/tests/KKS_system/auxkernel.i)
- (test/tests/mortar/periodic_segmental_constraint/periodic_checker2d.i)
- (modules/optimization/test/tests/optimizationreporter/general_opt/point_loads_gen_opt/forward_and_adjoint.i)
- (modules/xfem/test/tests/moving_interface/verification/2D_xy_lsdep1mat.i)
- (test/tests/mortar/periodic_segmental_constraint/penalty_periodic_checker2d.i)
- (modules/xfem/test/tests/moving_interface/verification/1D_xy_discrete2mat.i)
- (modules/phase_field/test/tests/mobility_derivative/AC_mobility_derivative_coupled_test.i)
- (modules/stochastic_tools/test/tests/surrogates/pod_rb/boundary/sub.i)
- (tutorials/tutorial02_multiapps/step03_coupling/03_parent_subcycling_picard.i)
- (modules/stochastic_tools/test/tests/transfers/libtorch_nn_transfer/libtorch_drl_control_sub.i)
- (modules/phase_field/test/tests/MultiSmoothCircleIC/multismoothcircleIC_normal_test.i)
- (test/tests/materials/stateful_prop/stateful_reg_template.i)
- (modules/contact/test/tests/bouncing-block-contact/frictionless-weighted-gap.i)
- (test/tests/materials/stateful_prop/stateful_reg.i)
- (test/tests/misc/solution_invalid/solution_invalid_recover.i)
- (modules/optimization/examples/materialTransient/gradient.i)
- (modules/navier_stokes/examples/laser-welding/2d-fv.i)
- (test/tests/kernels/hfem/dirichlet.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialMultiphase.i)
- (modules/optimization/test/tests/optimizationreporter/general_opt/point_loads_gen_opt/adjoint.i)
- (modules/stochastic_tools/examples/surrogates/cross_validation/all_sub.i)
- (modules/phase_field/examples/anisotropic_interfaces/GrandPotentialPlanarGrowth.i)
- (modules/optimization/test/tests/optimizationreporter/constant_heat_source/adjoint_nonLinear.i)
- (test/tests/kernels/hfem/neumann.i)
- (test/tests/kernels/ad_mat_diffusion/2d_steady_state.i)
- (modules/optimization/test/tests/optimizationreporter/general_opt/point_loads_gen_opt/forward_and_adjoint_transfer_data.i)
- (modules/stochastic_tools/examples/surrogates/gaussian_process/sub.i)
- (test/tests/materials/interface_material/interface_value_material_split_mesh_stateful.i)
- (modules/contact/test/tests/bouncing-block-contact/frictionless-weighted-gap-mixed-basis.i)
- (modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d-action.i)
- (modules/xfem/test/tests/moving_interface/phase_transition_2d.i)
- (modules/phase_field/test/tests/initial_conditions/SmoothCircleIC_3D.i)
- (modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_1D.i)
- (modules/stochastic_tools/examples/surrogates/pod_rb/2d_multireg/sub.i)
- (modules/phase_field/examples/multiphase/GrandPotential3Phase.i)
- (modules/contact/test/tests/bouncing-block-contact/grid-sequencing/grid-sequencing.i)
- (modules/phase_field/test/tests/MultiSmoothCircleIC/specifiedsmoothcircleIC_test.i)
- (modules/stochastic_tools/examples/libtorch_drl_control/libtorch_drl_control_sub.i)
- (test/tests/outputs/debug/show_material_props_consumed.i)
- (test/tests/userobjects/domain-user-object/measure-conservation.i)
(modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialAnisotropy.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
xmin = -2
xmax = 2
ymin = -2
ymax = 2
[]
# enable_jit set to false in many materials to make this test start up faster.
# It is recommended to set enable_jit = true or just remove these lines for
# production runs with this model
[GlobalParams]
radius = 1.0
int_width = 0.8
x1 = 0
y1 = 0
derivative_order = 2
enable_jit = false
[]
[Variables]
[./w]
[../]
[./etaa0]
[../]
[./etab0]
[../]
[]
[AuxVariables]
[./bnds]
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
v = 'etaa0 etab0'
[../]
[]
[ICs]
[./w]
type = SmoothCircleIC
variable = w
# note w = A*(c-cleq), A = 1.0, cleq = 0.0 ,i.e., w = c (in the matrix/liquid phase)
outvalue = -4.0
invalue = 0.0
[../]
[./etaa0]
type = SmoothCircleIC
variable = etaa0
#Solid phase
outvalue = 0.0
invalue = 1.0
[../]
[./etab0]
type = SmoothCircleIC
variable = etab0
#Liquid phase
outvalue = 1.0
invalue = 0.0
[../]
[]
[BCs]
[./Periodic]
[./w]
variable = w
auto_direction = 'x y'
[../]
[./etaa0]
variable = etaa0
auto_direction = 'x y'
[../]
[./etab0]
variable = etab0
auto_direction = 'x y'
[../]
[../]
[]
[Kernels]
# Order parameter eta_alpha0
[./ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0'
gamma_names = 'gab'
[../]
[./ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etab0 w'
[../]
[./ACa0_int1]
type = ACInterface2DMultiPhase1
variable = etaa0
etas = 'etab0'
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
[../]
[./ACa0_int2]
type = ACInterface2DMultiPhase2
variable = etaa0
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
[../]
[./ea0_dot]
type = TimeDerivative
variable = etaa0
[../]
# Order parameter eta_beta0
[./ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etaa0'
gamma_names = 'gab'
[../]
[./ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etaa0 w'
[../]
[./ACb0_int1]
type = ACInterface2DMultiPhase1
variable = etab0
etas = 'etaa0'
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
[../]
[./ACb0_int2]
type = ACInterface2DMultiPhase2
variable = etab0
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
[../]
[./eb0_dot]
type = TimeDerivative
variable = etab0
[../]
#Chemical potential
[./w_dot]
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
[../]
[./Diffusion]
type = MatDiffusion
variable = w
diffusivity = Dchi
[../]
[./coupled_etaa0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[./coupled_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[]
[Materials]
[./ha]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0'
phase_etas = 'etaa0'
[../]
[./hb]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0'
phase_etas = 'etab0'
[../]
[./omegaa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
[../]
[./omegab]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegab
material_property_names = 'Vm kb cbeq'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
[../]
[./rhoa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
[../]
[./rhob]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
[../]
[./kappaa]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
etaa = etaa0
etab = etab0
outputs = exodus
output_properties = 'kappaa dkappadgrad_etaa'
[../]
[./kappab]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
etaa = etab0
etab = etaa0
outputs = exodus
output_properties = 'kappab dkappadgrad_etab'
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'L D chi Vm ka caeq kb cbeq gab mu'
prop_values = '1.0 1.0 0.1 1.0 10.0 0.1 10.0 0.9 4.5 10.0'
[../]
[./Mobility]
type = ParsedMaterial
property_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
l_tol = 1.0e-5
nl_rel_tol = 1.0e-10
nl_abs_tol = 1e-12
num_steps = 2
dt = 0.001
[]
[Outputs]
exodus = true
[]
(test/tests/dgkernels/passive-scalar-channel-flow/test.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 10
ymin = -1
ymax = 1
nx = 20
ny = 4
[]
[]
[Variables]
[u]
family = MONOMIAL
[]
[]
[Kernels]
[convection]
type = ADConservativeAdvection
variable = u
velocity = 'velocity'
[]
[diffusion]
type = MatDiffusion
variable = u
diffusivity = 1
[]
[]
[DGKernels]
[convection]
type = ADDGAdvection
variable = u
velocity = 'velocity'
[]
[diffusion]
type = DGDiffusion
variable = u
sigma = 6
epsilon = -1
diff = 1
[]
[]
[Functions]
[v_inlet]
type = ParsedVectorFunction
expression_x = '1'
[]
[]
[BCs]
[u_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'bottom top'
variable = u
sigma = 6
epsilon = -1
function = '0'
diff = 1
[]
[u_in]
type = ADConservativeAdvectionBC
boundary = 'left'
variable = u
velocity_function = v_inlet
primal_dirichlet_value = 1
[]
[u_out]
type = ADConservativeAdvectionBC
boundary = 'right'
variable = u
velocity_mat_prop = 'velocity'
[]
[]
[Materials]
[vel]
type = ADVectorFromComponentVariablesMaterial
vector_prop_name = 'velocity'
u = 1
v = 0
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/stochastic_tools/test/tests/surrogates/poly_chaos/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = u
diffusivity = D
[]
[absorption]
type = MaterialReaction
variable = u
coefficient = sig
[]
[source]
type = BodyForce
variable = u
value = 1.0
[]
[]
[Materials]
[diffusivity]
type = GenericConstantMaterial
prop_names = D
prop_values = 2.0
[]
[xs]
type = GenericConstantMaterial
prop_names = sig
prop_values = 2.0
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Postprocessors]
[avg]
type = AverageNodalVariableValue
variable = u
[]
[max]
type = NodalExtremeValue
variable = u
value_type = max
[]
[]
(modules/optimization/test/tests/optimizationreporter/bimaterial/model.i)
# Steady state Heat conduction in a 2D domain with two diffusivities
# The domain is -4 <= x <= 4 and -4 <= y <= 4
# The top-half of the domain (y > 0) has high diffusivity
# The bottom-half of the domain (y < 0) has low diffusivity
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 16
ny = 16
xmin = -4
xmax = 4
ymin = -4
ymax = 4
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = diffusivity
[]
[heat_source]
type = BodyForce
value = 100
variable = temperature
[]
[]
[AuxVariables]
[grad_Tx]
order = CONSTANT
family = MONOMIAL
[]
[grad_Ty]
order = CONSTANT
family = MONOMIAL
[]
[grad_Tz]
order = CONSTANT
family = MONOMIAL
[]
[]
[BCs]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 0
[]
[]
[Functions]
[diffusivity_function]
type = NearestReporterCoordinatesFunction
x_coord_name = data/coordx
y_coord_name = data/coordy
value_name = data/diffusivity
[]
[]
[Materials]
[mat]
type = GenericFunctionMaterial
prop_names = diffusivity
prop_values = diffusivity_function
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
[]
[data]
type = ConstantReporter
real_vector_names = 'coordx coordy diffusivity'
real_vector_values = '0 0; -2 2; 5 10'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_forced_its = 1
line_search = none
nl_abs_tol = 1e-8
[]
[Outputs]
file_base = 'forward'
console = false
[]
(modules/xfem/test/tests/moving_interface/verification/2D_rz_homog1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: 2D
# Coordinate System: rz
# Material Numbers/Types: homogeneous 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# Transient 2D heat transfer problem in cylindrical coordinates designed with
# the Method of Manufactured Solutions. This problem was developed to verify
# XFEM performance on linear elements in the presence of a moving interface
# sweeping across the x-y coordinates of a system with homogeneous material
# properties. This problem can be exactly evaluated by FEM/Moose without the
# moving interface. Both the temperature and level set function are designed
# to be linear to attempt to minimize error between the Moose/exact solution
# and XFEM results.
# Results:
# The temperature at the bottom left boundary (x=1, y=1) exhibits the largest
# difference between the FEM/Moose solution and XFEM results. We present the
# XFEM results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 479.9998745
# 0.6 520 519.9995067
# 0.8 560 559.9989409
# 1.0 600 599.9987054
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 1.0
xmax = 2.0
ymin = 1.0
ymax = 2.0
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraints]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-100*x-100*y+400) + 100*1.5*t/x'
[../]
[./neumann_func]
type = ParsedFunction
expression = '1.5*100*t'
[../]
[./dirichlet_right_func]
type = ParsedFunction
expression = '(-100*y+200)*t+400'
[../]
[./dirichlet_top_func]
type = ParsedFunction
expression = '(-100*x+200)*t+400'
[../]
[./ls_func]
type = ParsedFunction
expression = '-0.5*(x+y) + 2.04 - 0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericConstantMaterial
prop_names = 'diffusion_coefficient'
prop_values = 1.5
[../]
[]
[BCs]
[./left_du]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = FunctionDirichletBC
variable = u
boundary = 'right'
function = dirichlet_right_func
[../]
[./bottom_du]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = neumann_func
[../]
[./top_u]
type = FunctionDirichletBC
variable = u
boundary = 'top'
function = dirichlet_top_func
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/executioners/eigen_convergence/a.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 160
ymin = 0
ymax = 160
nx = 8
ny = 8
[]
uniform_refine = 0
[]
[Variables]
[u]
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
diffusivity = diffusivity
variable = u
[]
[reaction]
type = CoefReaction
coefficient = 0.01
variable = u
[]
[rhs]
type = CoefReaction
extra_vector_tags = 'eigen'
coefficient = -0.01
variable = u
[]
[]
[BCs]
[robin]
type = VacuumBC
boundary = 'left bottom'
variable = u
[]
[]
[Materials]
[nm]
type = GenericConstantMaterial
block = 0
prop_names = 'diffusivity'
prop_values = 0.333333333333333333
[]
[]
[VectorPostprocessors]
[eigen]
type = Eigenvalues
inverse_eigenvalue = true
[]
[]
[Postprocessors]
[fluxintegral]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = linear
[]
[]
[Problem]
type = EigenProblem
[]
[Executioner]
type = Eigenvalue
solve_type = PJFNK
free_power_iterations = 4
nl_abs_tol = 2e-10
[]
[Outputs]
csv = true
[]
(test/tests/scaling/ignore-variables/ignore.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
[]
[Variables]
[u][]
[v][]
[x]
family = SCALAR
type = MooseVariableBase
[]
[y]
family = SCALAR
[]
[]
[Kernels]
[dt_u]
type = TimeDerivative
variable = u
[]
[diff_u]
type = Diffusion
variable = u
[]
[dt_v]
type = TimeDerivative
variable = v
[]
[diff_v]
type = MatDiffusion
variable = v
diffusivity = 1e-3
[]
[]
[ScalarKernels]
[dt_x]
type = ODETimeDerivative
variable = x
[]
[ode_x]
type = ParsedODEKernel
variable = x
coupled_variables = y
expression = '-3*x - 2*y'
[]
[dt_y]
type = ODETimeDerivative
variable = y
[]
[ode_y ]
type = ParsedODEKernel
variable = y
expression = '10*y'
[]
[]
[Executioner]
type = Transient
num_steps = 2
automatic_scaling = true
compute_scaling_once = false
ignore_variables_for_autoscaling = 'v y'
solve_type = NEWTON
verbose = true
[]
(modules/stochastic_tools/examples/surrogates/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 1
elem_type = EDGE3
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 1.0
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 2.0
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 300
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[avg]
type = AverageNodalVariableValue
variable = T
[]
[max]
type = NodalExtremeValue
variable = T
value_type = max
[]
[]
[Outputs]
[]
(modules/stochastic_tools/test/tests/functions/drl_reward/drl_reward.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 0.0
xmax = 7.0
nx = 3
[]
[]
[Variables]
[temp]
initial_condition = 300
[]
[]
[Kernels]
[time]
type = CoefTimeDerivative
variable = temp
Coefficient = '${fparse 1.00630182*1.225}'
[]
[heat_conduc]
type = MatDiffusion
variable = temp
diffusivity = 'k'
[]
[]
[BCs]
[dirichlet]
type = FunctionDirichletBC
function = "200"
variable = temp
boundary = 'right'
[]
[]
[Functions]
[design_function]
type = ParsedFunction
value = 't/3600*297'
[]
[reward_function]
type = ScaledAbsDifferenceDRLRewardFunction
design_function = design_function
observed_value = center_temp_tend
c1 = 1
c2 = 10
[]
[]
[Materials]
[constant]
type = GenericConstantMaterial
prop_names = 'k'
prop_values = 26.53832364
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-8
start_time = 0.0
end_time = 3600
dt = 1800
[]
[Postprocessors]
[center_temp_tend]
type = PointValue
variable = temp
point = '3.5 0.0 0.0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[reward]
type = FunctionValuePostprocessor
function = reward_function
execute_on = 'INITIAL TIMESTEP_END'
indirect_dependencies = 'center_temp_tend'
[]
[]
[Outputs]
csv = true
[]
(test/tests/outputs/exodus/exodus_side_discontinuous_edge2.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 16
dim = 1
[]
[]
[Variables]
[u]
order = THIRD
family = MONOMIAL
[]
[lambda]
family = SIDE_HIERARCHIC
order = CONSTANT
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
[]
[source]
type = BodyForce
variable = u
value = '1'
[]
[]
[DGKernels]
[testjumps]
type = HFEMTestJump
variable = u
side_variable = lambda
[]
[trialjumps]
type = HFEMTrialJump
variable = lambda
interior_variable = u
[]
[]
[BCs]
[u_robin]
type = VacuumBC
boundary = 'left right'
variable = u
[]
[lambda_D_unused]
type = PenaltyDirichletBC
boundary = 'left right'
variable = lambda
penalty = 1
[]
[]
[Postprocessors]
[intu]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[]
[lambdanorm]
type = ElementSidesL2Norm
variable = lambda
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
[Outputs]
[out]
type = Exodus
discontinuous = true
side_discontinuous = true
file_base = 'exodus_side_discontinuous_edge2_out'
[]
[]
(test/tests/outputs/csv/csv_transient_vpp.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
parallel_type = replicated
[]
[Variables]
[u]
[]
[]
[Materials]
[D]
# we need to make sure not to supply derivatives to have a
# wrong Jacobian to force more iterations to test the output on
type = ParsedMaterial
property_name = D
expression = 'u^2+0.1'
coupled_variables = u
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = D
[]
[time]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[VectorPostprocessors]
[nodes]
type = NodalValueSampler
boundary = top
sort_by = x
variable = u
execute_on = 'INITIAL NONLINEAR LINEAR TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
num_steps = 3
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
verbose = true
[]
[Outputs]
[out]
type = CSV
execute_on = 'LINEAR'
[]
[]
(modules/xfem/test/tests/moving_interface/verification/2D_xy_homog1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: 2D
# Coordinate System: xy
# Material Numbers/Types: homogeneous 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# Transient 2D heat transfer problem in Cartesian coordinates designed with
# the Method of Manufactured Solutions. This problem was developed to verify
# XFEM performance on linear elements in the presence of a moving interface
# sweeping across the x-y coordinates of a system with homogeneous material
# properties. This problem can be exactly evaluated by FEM/Moose without the
# moving interface. Both the temperature and level set function are designed
# to be linear to attempt to minimize error between the Moose/exact solution
# and XFEM results.
# Results:
# The temperature at the bottom left boundary (x=0, y=0) exhibits the largest
# difference between the FEM/Moose solution and XFEM results. We present the
# XFEM results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 479.9998791
# 0.6 520 519.9995307
# 0.8 560 559.9989724
# 1.0 600 599.9984541
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraints]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-100*x-100*y+200)'
[../]
[./neumann_func]
type = ParsedFunction
expression = '1.5*100*t'
[../]
[./dirichlet_right_func]
type = ParsedFunction
expression = '(-100*y+100)*t+400'
[../]
[./dirichlet_top_func]
type = ParsedFunction
expression = '(-100*x+100)*t+400'
[../]
[./ls_func]
type = ParsedFunction
expression = '-0.5*(x+y) + 1.04 - 0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericConstantMaterial
prop_names = 'diffusion_coefficient'
prop_values = 1.5
[../]
[]
[BCs]
[./left_du]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = FunctionDirichletBC
variable = u
boundary = 'right'
function = dirichlet_right_func
[../]
[./bottom_du]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = neumann_func
[../]
[./top_u]
type = FunctionDirichletBC
variable = u
boundary = 'top'
function = dirichlet_top_func
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/materials/derivative_material_interface/bad_evaluation.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = MatDiffusion
variable = u
diffusivity = F
[../]
[]
[Materials]
[./time]
type = GenericFunctionMaterial
prop_names = 'time'
prop_values = 't'
outputs = all
[../]
[./F]
type = DerivativeParsedMaterial
property_name = F
material_property_names = 'time'
expression = 'if (time < 1.9, 1, log(-1))'
disable_fpoptimizer = true
enable_jit = false
evalerror_behavior = nan
[../]
[]
[Executioner]
type = Transient
num_steps = 2
[]
(modules/xfem/test/tests/moving_interface/verification/1D_xy_homog1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: quasi-1D
# Coordinate System: xy
# Material Numbers/Types: homogeneous 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed linear level set function
# Description:
# A simple transient heat transfer problem in Cartesian coordinates designed
# with the Method of Manufactured Solutions. This problem was developed to
# verify XFEM performance in the presence of a moving interface for linear
# element models that can be exactly evaluated by FEM/Moose. Both the
# temperature solution and level set function are designed to be linear to
# attempt to minimize error between the Moose/exact solution and XFEM results.
# Thermal conductivity is a single, constant value at all points in the system.
# Results:
# The temperature at the left boundary (x=0) exhibits the largest difference
# between the FEM/Moose solution and XFEM results. We present the XFEM results
# at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 480.0000064
# 0.6 520 520.0000323
# 0.8 560 560.0000896
# 1.0 600 600.0001870
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 1
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 0.5
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-200*x+200)'
[../]
[./ls_func]
type = ParsedFunction
expression = '1-(x-0.04)-0.2*t'
[../]
[./neumann_func]
type = ParsedFunction
expression = '1.5*200*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericConstantMaterial
prop_names = 'diffusion_coefficient'
prop_values = 1.5
[../]
[]
[BCs]
[./left_du]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 'right'
value = 400
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/contact/test/tests/bouncing-block-contact/frictional-mortar-min-lm-mortar-disp.i)
starting_point = 2e-1
# We offset slightly so we avoid the case where the bottom of the secondary block and the top of the
# primary block are perfectly vertically aligned which can cause the backtracking line search some
# issues for a coarse mesh (basic line search handles that fine)
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[./disp_x]
block = '1 2'
# order = SECOND
[../]
[./disp_y]
block = '1 2'
# order = SECOND
[../]
[./normal_lm]
block = 3
family = MONOMIAL
order = CONSTANT
[../]
[./tangential_lm]
block = 3
family = MONOMIAL
order = CONSTANT
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[Constraints]
[normal_lm]
type = NormalMortarLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_x
secondary_disp_y = disp_y
use_displaced_mesh = true
compute_primal_residuals = false
ncp_function_type = min
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[]
[tangential_lm]
type = TangentialMortarLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = tangential_lm
secondary_variable = disp_x
secondary_disp_y = disp_y
use_displaced_mesh = true
compute_primal_residuals = false
contact_pressure = normal_lm
friction_coefficient = .1
ncp_function_type = min
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
preset = false
boundary = 40
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
preset = false
boundary = 40
value = 0.0
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
preset = false
boundary = 50
function = '1e-2 * t'
[../]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor -snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(test/tests/misc/solution_invalid/solution_invalid.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmax = 1
ymax = 1
[]
[Variables]
[u]
[]
[]
# Sets solution invalid using the SolutionInvalidInterface, as diffusivity exceeds the set threshold.
[Materials]
[filter]
type = NonsafeMaterial
diffusivity = 0.5
threshold = 0.3
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = u
diffusivity = diffusivity
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 1
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Problem]
type = FEProblem
allow_invalid_solution = false
immediately_print_invalid_solution = false
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
[]
[Reporters/solution_invalidity]
type = SolutionInvalidityReporter
execute_on = FINAL
[]
[Outputs]
file_base = 'solution_invalid'
[out]
type = JSON
execute_on = 'FINAL'
[]
[]
(modules/contact/test/tests/bouncing-block-contact/frictionless-penalty-weighted-gap.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
preset = false
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[UserObjects]
[weighted_gap_uo]
type = PenaltyWeightedGapUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
disp_x = disp_x
disp_y = disp_y
penalty = 1e0
use_physical_gap = true
[]
[]
[Constraints]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = true
abort_on_solve_fail = true
nl_rel_tol = 1e-13
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[]
(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
[]
[]
(modules/contact/test/tests/bouncing-block-contact/variational-frictional.i)
starting_point = 2e-1
# We offset slightly so we avoid the case where the bottom of the secondary block and the top of the
# primary block are perfectly vertically aligned which can cause the backtracking line search some
# issues for a coarse mesh (basic line search handles that fine)
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
correct_edge_dropping = true
[]
[Mesh]
[file_mesh]
type = FileMeshGenerator
file = long-bottom-block-1elem-blocks-coarse.e
[]
[]
[Variables]
[disp_x]
block = '1 2'
scaling = 1e1
[]
[disp_y]
block = '1 2'
scaling = 1e1
[]
[contact_action_normal_lm]
block = 4
scaling = 1e3
[]
[contact_action_tangential_lm]
block = 4
scaling = 1e2
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[AuxVariables]
[procid]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[procid]
type = ProcessorIDAux
variable = procid
[]
[]
[UserObjects]
[weighted_velocities_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 10
secondary_boundary = 20
primary_subdomain = 3
secondary_subdomain = 4
lm_variable_normal = contact_action_normal_lm
lm_variable_tangential_one = contact_action_tangential_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
correct_edge_dropping = true
[]
[]
[Constraints]
[frictional_normal_lm]
type = ComputeFrictionalForceLMMechanicalContact
primary_boundary = 10
secondary_boundary = 20
primary_subdomain = 3
secondary_subdomain = 4
variable = contact_action_normal_lm
friction_lm = contact_action_tangential_lm
disp_x = disp_x
disp_y = disp_y
mu = 0.1
normalize_c = true
c = 1.0e-2
c_t = 1.0e-1
correct_edge_dropping = true
weighted_velocities_uo = weighted_velocities_uo
weighted_gap_uo = weighted_velocities_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 10
secondary_boundary = 20
primary_subdomain = 3
secondary_subdomain = 4
variable = contact_action_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_velocities_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 10
secondary_boundary = 20
primary_subdomain = 3
secondary_subdomain = 4
variable = contact_action_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_velocities_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 10
secondary_boundary = 20
primary_subdomain = 3
secondary_subdomain = 4
variable = contact_action_tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_velocities_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 10
secondary_boundary = 20
primary_subdomain = 3
secondary_subdomain = 4
variable = contact_action_tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_velocities_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-15'
l_max_its = 30
nl_max_its = 25
line_search = 'none'
nl_rel_tol = 1e-12
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
hide = procid
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
(test/tests/auxkernels/mesh_integer/mesh_integer.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 5
ny = 5
extra_element_integers = 'material_id'
[]
[set_material_id0]
type = SubdomainBoundingBoxGenerator
input = gmg
bottom_left = '0 0 0'
top_right = '0.8 0.6 0'
block_id = 0
location = INSIDE
integer_name = material_id
[]
[set_material_id1]
type = SubdomainBoundingBoxGenerator
input = set_material_id0
bottom_left = '0 0 0'
top_right = '0.8 0.6 0'
block_id = 1
location = OUTSIDE
integer_name = material_id
[]
[]
[Variables]
[u][]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = dc
[]
[timederivative]
type = TimeDerivative
variable = u
[]
[sourceterm]
type = BodyForce
variable = u
function = 1
[]
[]
[AuxVariables]
[id]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[id]
type = ElementIntegerAux
variable = id
integer_names = material_id
[]
[]
[BCs]
[vacuum]
type = VacuumBC
variable = u
boundary = 'right left top bottom'
[]
[]
[Materials]
[dc]
type = ConstantIDMaterial
prop_name = dc
prop_values = '1 2'
id_name = material_id
[]
[]
[Postprocessors]
[unorm]
type = ElementL2Norm
variable = u
[]
[]
[Executioner]
type = Transient
end_time = 0.1
dt = 0.01
nl_abs_tol = 1.e-15
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/stochastic_tools/test/tests/transfers/serialized_solution_transfer/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 6
xmax = 6
[]
[Variables]
[u]
[]
[v]
[]
[]
[Kernels]
[diffusion_u]
type = MatDiffusion
variable = u
diffusivity = D_u
[]
[source_u]
type = BodyForce
variable = u
value = 1.0
[]
[diffusion_v]
type = MatDiffusion
variable = v
diffusivity = D_v
[]
[source_v]
type = BodyForce
variable = v
value = 1.0
[]
[]
[Materials]
[diffusivity_u]
type = GenericConstantMaterial
prop_names = D_u
prop_values = 2.0
[]
[diffusivity_v]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 4.0
[]
[]
[BCs]
[left_u]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right_u]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Reporters]
[solution_storage]
type = SolutionContainer
execute_on = 'FINAL'
[]
[]
(modules/xfem/test/tests/moving_interface/phase_transition_3d.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 11
ny = 1
nz = 1
xmin = 0.0
xmax = 20.0
ymin = 0.0
ymax = 5.0
zmin = 0.0
zmax = 5.0
elem_type = HEX8
[]
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[velocity]
type = XFEMPhaseTransitionMovingInterfaceVelocity
diffusivity_at_positive_level_set = 5
diffusivity_at_negative_level_set = 1
equilibrium_concentration_jump = 1
value_at_interface_uo = value_uo
[]
[value_uo]
type = NodeValueAtXFEMInterface
variable = 'u'
interface_mesh_cut_userobject = 'cut_mesh'
execute_on = TIMESTEP_END
level_set_var = ls
[]
[cut_mesh]
type = InterfaceMeshCut3DUserObject
mesh_file = flat_interface_2d.e
interface_velocity_uo = velocity
heal_always = true
[]
[]
[Variables]
[u]
[]
[]
[ICs]
[ic_u]
type = FunctionIC
variable = u
function = 'if(x<5.01, 2, 1)'
[]
[]
[AuxVariables]
[ls]
order = FIRST
family = LAGRANGE
[]
[]
[Constraints]
[u_constraint]
type = XFEMEqualValueAtInterface
geometric_cut_userobject = 'cut_mesh'
use_displaced_mesh = false
variable = u
value = 2
alpha = 1e6
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[]
[time]
type = TimeDerivative
variable = u
[]
[]
[AuxKernels]
[ls]
type = MeshCutLevelSetAux
mesh_cut_user_object = cut_mesh
variable = ls
execute_on = 'TIMESTEP_BEGIN'
[]
[]
[Materials]
[diffusivity_A]
type = GenericConstantMaterial
prop_names = A_diffusion_coefficient
prop_values = 5
[]
[diffusivity_B]
type = GenericConstantMaterial
prop_names = B_diffusion_coefficient
prop_values = 1
[]
[diff_combined]
type = LevelSetBiMaterialReal
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = diffusion_coefficient
[]
[]
[BCs]
# Define boundary conditions
[left_u]
type = DirichletBC
variable = u
value = 2
boundary = left
[]
[right_u]
type = NeumannBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_tol = 1e-3
nl_max_its = 15
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
start_time = 0.0
dt = 1
num_steps = 5
max_xfem_update = 1
[]
[Outputs]
execute_on = timestep_end
exodus = true
perf_graph = true
[]
(modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialAnisotropyAntitrap.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
xmin = -2
xmax = 2
ymin = -2
ymax = 2
[]
[GlobalParams]
radius = 1.0
int_width = 0.8
x1 = 0
y1 = 0
enable_jit = true
derivative_order = 2
[]
[Variables]
[./w]
[../]
[./etaa0]
[../]
[./etab0]
[../]
[]
[AuxVariables]
[./bnds]
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
v = 'etaa0 etab0'
[../]
[]
[ICs]
[./w]
type = SmoothCircleIC
variable = w
outvalue = -4.0
invalue = 0.0
[../]
[./etaa0]
type = SmoothCircleIC
variable = etaa0
#Solid phase
outvalue = 0.0
invalue = 1.0
[../]
[./etab0]
type = SmoothCircleIC
variable = etab0
#Liquid phase
outvalue = 1.0
invalue = 0.0
[../]
[]
[Kernels]
# Order parameter eta_alpha0
[./ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0'
gamma_names = 'gab'
[../]
[./ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etab0 w'
[../]
[./ACa0_int1]
type = ACInterface2DMultiPhase1
variable = etaa0
etas = 'etab0'
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
[../]
[./ACa0_int2]
type = ACInterface2DMultiPhase2
variable = etaa0
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
[../]
[./ea0_dot]
type = TimeDerivative
variable = etaa0
[../]
# Order parameter eta_beta0
[./ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etaa0'
gamma_names = 'gab'
[../]
[./ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etaa0 w'
[../]
[./ACb0_int1]
type = ACInterface2DMultiPhase1
variable = etab0
etas = 'etaa0'
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
[../]
[./ACb0_int2]
type = ACInterface2DMultiPhase2
variable = etab0
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
[../]
[./eb0_dot]
type = TimeDerivative
variable = etab0
[../]
#Chemical potential
[./w_dot]
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
coupled_variables = '' # in this case chi (the susceptibility) is simply a constant
[../]
[./Diffusion]
type = MatDiffusion
variable = w
diffusivity = Dchi
args = ''
[../]
[./coupled_etaa0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[./coupled_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[./coupled_etaa0dot_int]
type = AntitrappingCurrent
variable = w
v = etaa0
f_name = rhodiff
[../]
[./coupled_etab0dot_int]
type = AntitrappingCurrent
variable = w
v = etab0
f_name = rhodiff
[../]
[]
[Materials]
[./ha]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0'
phase_etas = 'etaa0'
[../]
[./hb]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0'
phase_etas = 'etab0'
[../]
[./omegaa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
[../]
[./omegab]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegab
material_property_names = 'Vm kb cbeq'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
[../]
[./rhoa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
[../]
[./rhob]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
[../]
[./int]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhodiff
material_property_names = 'rhoa rhob'
constant_names = 'int_width'
constant_expressions = '0.8'
expression = 'int_width*(rhob-rhoa)'
[../]
[./kappaa]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
etaa = etaa0
etab = etab0
[../]
[./kappab]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
etaa = etab0
etab = etaa0
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'L D chi Vm ka caeq kb cbeq gab mu'
prop_values = '1.0 1.0 0.1 1.0 10.0 0.1 10.0 0.9 4.5 10.0'
[../]
[./Mobility]
type = ParsedMaterial
property_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 lu 1'
l_tol = 1.0e-3
nl_rel_tol = 1.0e-8
nl_abs_tol = 1e-8
num_steps = 3
[./TimeStepper]
type = IterationAdaptiveDT
dt = 0.001
[../]
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/bouncing-block-contact/frictional-nodal-min-normal-lm-mortar-pdass-tangential-lm-mortar-action.i)
starting_point = 2e-1
# We offset slightly so we avoid the case where the bottom of the secondary block and the top of the
# primary block are perfectly vertically aligned which can cause the backtracking line search some
# issues for a coarse mesh (basic line search handles that fine)
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
[original_file_mesh]
type = FileMeshGenerator
file = long-bottom-block-1elem-blocks-coarse.e
[]
# These sidesets need to be deleted because the contact action adds them automatically. For this
# particular mesh, the new IDs will be identical to the deleted ones and will conflict if we don't
# remove the original ones.
[delete_3]
type = BlockDeletionGenerator
input = original_file_mesh
block = 3
[]
[revised_file_mesh]
type = BlockDeletionGenerator
input = delete_3
block = 4
[]
[]
[Variables]
[disp_x]
block = '1 2'
# order = SECOND
[]
[disp_y]
block = '1 2'
# order = SECOND
[]
[]
[Contact]
[frictional]
primary = 20
secondary = 10
formulation = mortar
model = coulomb
friction_coefficient = 0.1
c_normal = 1.0e-2
c_tangential = 1.0e-1
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
hide = 'contact_pressure nodal_area penetration'
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = frictional_normal_lm
subdomain = frictional_secondary_subdomain
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/optimization/test/tests/optimizationreporter/point_loads/forward_and_adjoint.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 1.4
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
kernel_coverage_check = false
[]
[Variables]
[temperature]
[]
[temperature_adjoint]
nl_sys = adjoint
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = temperature
x_coord_name = 'point_source/x'
y_coord_name = 'point_source/y'
z_coord_name = 'point_source/z'
value_name = 'point_source/value'
[]
[misfit]
type = ReporterPointSource
variable = temperature_adjoint
x_coord_name = measure_data/measurement_xcoord
y_coord_name = measure_data/measurement_ycoord
z_coord_name = measure_data/measurement_zcoord
value_name = measure_data/misfit_values
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temperature
boundary = left
value = 300
[]
[right]
type = DirichletBC
variable = temperature
boundary = right
value = 300
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 300
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 300
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = SteadyAndAdjoint
forward_system = nl0
adjoint_system = adjoint
nl_rel_tol = 1e-12
l_tol = 1e-12
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[VectorPostprocessors]
[gradient]
type = PointValueSampler
points = '0.2 0.2 0
0.7 0.56 0
0.4 1 0'
variable = temperature_adjoint
sort_by = id
execute_on = ADJOINT_TIMESTEP_END
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
[]
[point_source]
type = ConstantReporter
real_vector_names = 'x y z value'
real_vector_values = '0.2 0.7 0.4;
0.2 0.56 1;
0 0 0;
-1000 120 500'
[]
[]
[Outputs]
console = false
[]
(modules/phase_field/test/tests/SplitCH/forward_split_math_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmax = 25.0
ymax = 25.0
elem_type = QUAD
[]
[Variables]
[./c]
[../]
[./w]
[../]
[]
[ICs]
[./c_IC]
type = CrossIC
variable = c
x1 = 0
x2 = 25
y1 = 0
y2 = 25
[../]
[]
[Kernels]
[./cdot]
type = TimeDerivative
variable = c
[../]
[./grad_w]
type = MatDiffusion
variable = c
v = w
diffusivity = 1.0
[../]
[./grad_c]
type = MatDiffusion
variable = w
v = c
diffusivity = 2.0
[../]
[./w2]
type = CoupledMaterialDerivative
variable = w
v = c
f_name = F
[../]
[./w3]
type = CoefReaction
variable = w
coefficient = -1.0
[../]
[]
[AuxVariables]
[./local_energy]
family = MONOMIAL
order = CONSTANT
[../]
[]
[AuxKernels]
[./local_energy]
type = TotalFreeEnergy
variable = local_energy
f_name = F
kappa_names = kappa_c
interfacial_vars = c
[../]
[]
[Materials]
[./kappa_c]
type = GenericConstantMaterial
prop_names = kappa_c
prop_values = 2.0
[../]
[./free_energy]
type = DerivativeParsedMaterial
coupled_variables = c
expression = '(1 - c)^2 * (1 + c)^2'
property_name = F
[../]
[]
[Postprocessors]
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
variable = local_energy
[../]
[./total_c]
type = ElementIntegralVariablePostprocessor
variable = c
execute_on = 'initial TIMESTEP_END'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
l_max_its = 30
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 5
dt = 0.7
[]
[Outputs]
exodus = true
[]
(test/tests/mesh/add_subdomain_ids/add_subdomain_ids.i)
[Mesh]
[generate]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
add_subdomain_ids = 999
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[diff2]
type = MatDiffusion
diffusivity = 2
variable = u
block = 999
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/stochastic_tools/test/tests/reporters/parallel_storage/sub.i)
S = 10
D = 10
[Mesh]
type = GeneratedMesh
dim = 1
nx = 6
xmax = 6
[]
[Variables]
[u]
[]
[v]
[]
[]
[AuxVariables]
[u_aux]
[]
[]
[Kernels]
[diffusion_u]
type = MatDiffusion
variable = u
diffusivity = D_u
[]
[source_u]
type = BodyForce
variable = u
value = 1.0
[]
[diffusion_v]
type = MatDiffusion
variable = v
diffusivity = D_v
[]
[source_v]
type = BodyForce
variable = v
value = 1.0
[]
[]
[AuxKernels]
[func_aux]
type = FunctionAux
variable = u_aux
function = u_aux_func
[]
[]
[Functions]
[u_aux_func]
type = ParsedFunction
expression = 'S * pow(x, D/10)'
symbol_names = 'S D'
symbol_values = '${S} ${D}'
[]
[]
[Materials]
[diffusivity_u]
type = GenericConstantMaterial
prop_names = D_u
prop_values = 2.0
[]
[diffusivity_v]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 4.0
[]
[]
[BCs]
[left_u]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right_u]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Reporters]
[solution_storage]
type = SolutionContainer
execute_on = 'FINAL'
[]
[solution_storage_aux]
type = SolutionContainer
execute_on = 'FINAL'
system = aux
[]
[]
(modules/optimization/test/tests/optimizationreporter/point_loads/adjoint.i)
# DO NOT CHANGE THIS TEST
# this test is documented as an example in forceInv_pointLoads.md
# if this test is changed, the figures will need to be updated.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 1.4
[]
[Variables]
[adjoint]
[]
[]
[Problem]
extra_tag_vectors = 'ref'
[]
[AuxVariables]
[residual_src]
[]
[]
[AuxKernels]
[residual_src]
type = TagVectorAux
vector_tag = 'ref'
v = 'adjoint'
variable = 'residual_src'
[]
[]
[Variables]
[adjoint]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = adjoint
diffusivity = thermal_conductivity
[]
[]
#-----every adjoint problem should have these two
[DiracKernels]
[pt]
type = ReporterPointSource
variable = adjoint
x_coord_name = misfit/measurement_xcoord
y_coord_name = misfit/measurement_ycoord
z_coord_name = misfit/measurement_zcoord
value_name = misfit/misfit_values
extra_vector_tags = 'ref'
[]
[]
[Reporters]
[misfit]
type = OptimizationData
[]
[]
[BCs]
[left]
type = DirichletBC
variable = adjoint
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = adjoint
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = adjoint
boundary = bottom
value = 0
[]
[top]
type = DirichletBC
variable = adjoint
boundary = top
value = 0
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-6
nl_rel_tol = 1e-8
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[VectorPostprocessors]
[gradient]
type = PointValueSampler
points = '0.2 0.2 0
0.7 0.56 0
0.4 1 0'
variable = adjoint
sort_by = id
[]
[]
[Outputs]
console = false
exodus = false
file_base = 'adjoint'
[]
(modules/phase_field/examples/multiphase/GrandPotential3Phase_masscons.i)
# This is an example of implementation of the multi-phase, multi-order parameter
# grand potential based phase-field model described in Phys. Rev. E, 98, 023309
# (2018). It includes 3 phases with 1 grain of each phase.
# This is a revised version of the model that eliminates small variations in mass
# that have been observed with the original formulation. In this version, rather
# than evolving the chemical potential as a field variable, we evolve the composition
# field using a normal Cahn-Hilliard equation, then relate chemical potential to
# composition using Eq. (22) from the paper (this relationship is derived from the
# grand potential functional and is valid only for parabolic free energies).
[Mesh]
type = GeneratedMesh
dim = 2
nx = 60
ny = 60
xmin = -15
xmax = 15
ymin = -15
ymax = 15
[]
[Variables]
[w]
[]
[c]
[]
[etaa0]
[]
[etab0]
[]
[etad0]
[]
[]
[ICs]
[IC_etaa0]
type = BoundingBoxIC
variable = etaa0
x1 = -10
y1 = -10
x2 = 10
y2 = 10
inside = 1.0
outside = 0.0
[]
[IC_etad0]
type = BoundingBoxIC
variable = etad0
x1 = -10
y1 = -10
x2 = 10
y2 = 10
inside = 0.0
outside = 1.0
[]
[IC_c]
type = BoundingBoxIC
variable = c
x1 = -10
y1 = -10
x2 = 10
y2 = 10
inside = 0.1
outside = 0.5
[]
[IC_w]
type = FunctionIC
variable = w
function = ic_func_w
[]
[]
[Functions]
[ic_func_w]
type = ConstantFunction
value = 0
[]
[]
[Kernels]
# Order parameter eta_alpha0
[ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0 etad0'
gamma_names = 'gab gad'
[]
[ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
coupled_variables = 'etab0 etad0 w'
[]
[ACa0_int]
type = ACInterface
variable = etaa0
kappa_name = kappa
[]
[ea0_dot]
type = TimeDerivative
variable = etaa0
[]
# Order parameter eta_beta0
[ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etaa0 etad0'
gamma_names = 'gab gbd'
[]
[ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etad0 w'
[]
[ACb0_int]
type = ACInterface
variable = etab0
kappa_name = kappa
[]
[eb0_dot]
type = TimeDerivative
variable = etab0
[]
# Order parameter eta_delta0
[ACd0_bulk]
type = ACGrGrMulti
variable = etad0
v = 'etaa0 etab0'
gamma_names = 'gad gbd'
[]
[ACd0_sw]
type = ACSwitching
variable = etad0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etab0 w'
[]
[ACd0_int]
type = ACInterface
variable = etad0
kappa_name = kappa
[]
[ed0_dot]
type = TimeDerivative
variable = etad0
[]
#Concentration
[c_dot]
type = TimeDerivative
variable = c
[]
[Diffusion]
type = MatDiffusion
variable = c
v = w
diffusivity = DchiVm
args = ''
[]
#The following relate chemical potential to composition using Eq. (22)
[w_rxn]
type = MatReaction
variable = w
v = c
mob_name = -1
[]
[ca_rxn]
type = MatReaction
variable = w
mob_name = 'hoverk_a'
args = 'etaa0 etab0 etad0'
[]
[ca_bodyforce]
type = MaskedBodyForce
variable = w
mask = ha
coupled_variables = 'etaa0 etab0 etad0'
value = 0.1 #caeq
[]
[cb_rxn]
type = MatReaction
variable = w
mob_name = 'hoverk_b'
args = 'etaa0 etab0 etad0'
[]
[cb_bodyforce]
type = MaskedBodyForce
variable = w
mask = hb
coupled_variables = 'etaa0 etab0 etad0'
value = 0.9 #cbeq
[]
[cd_rxn]
type = MatReaction
variable = w
mob_name = 'hoverk_d'
args = 'etaa0 etab0 etad0'
[]
[cd_bodyforce]
type = MaskedBodyForce
variable = w
mask = hd
coupled_variables = 'etaa0 etab0 etad0'
value = 0.5 #cdeq
[]
[]
[Materials]
[ha_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etaa0'
[]
[hb_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etab0'
[]
[hd_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hd
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etad0'
[]
[omegaa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
derivative_order = 2
[]
[omegab]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegab
material_property_names = 'Vm kb cbeq'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
derivative_order = 2
[]
[omegad]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegad
material_property_names = 'Vm kd cdeq'
expression = '-0.5*w^2/Vm^2/kd-w/Vm*cdeq'
derivative_order = 2
[]
[rhoa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
derivative_order = 2
[]
[rhob]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
derivative_order = 2
[]
[rhod]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhod
material_property_names = 'Vm kd cdeq'
expression = 'w/Vm^2/kd + cdeq/Vm'
derivative_order = 2
[]
[const]
type = GenericConstantMaterial
prop_names = 'kappa_c kappa L D Vm ka caeq kb cbeq kd cdeq gab gad gbd mu tgrad_corr_mult'
prop_values = '0 1 1.0 1.0 1.0 10.0 0.1 10.0 0.9 10.0 0.5 1.5 1.5 1.5 1.0 0.0'
[]
[Mobility]
type = DerivativeParsedMaterial
property_name = DchiVm
material_property_names = 'D chi Vm' #Factor of Vm is needed to evolve c instead of rho
expression = 'D*chi*Vm'
derivative_order = 2
[]
[chi]
type = DerivativeParsedMaterial
property_name = chi
material_property_names = 'Vm ha(etaa0,etab0,etad0) ka hb(etaa0,etab0,etad0) kb hd(etaa0,etab0,etad0) kd'
expression = '(ha/ka + hb/kb + hd/kd) / Vm^2'
coupled_variables = 'etaa0 etab0 etad0'
derivative_order = 2
[]
[hoverk_a]
type = DerivativeParsedMaterial
material_property_names = 'ha(etaa0,etab0,etad0) Vm ka'
property_name = hoverk_a
expression = 'ha / Vm / ka'
[]
[hoverk_b]
type = DerivativeParsedMaterial
material_property_names = 'hb(etaa0,etab0,etad0) Vm kb'
property_name = hoverk_b
expression = 'hb / Vm / kb'
[]
[hoverk_d]
type = DerivativeParsedMaterial
material_property_names = 'hd(etaa0,etab0,etad0) Vm kd'
property_name = hoverk_d
expression = 'hd / Vm / kd'
[]
[]
[Postprocessors]
[c_total]
type = ElementIntegralVariablePostprocessor
variable = c
[]
[]
[Executioner]
type = Transient
nl_max_its = 15
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = -pc_type
petsc_options_value = asm
l_max_its = 15
l_tol = 1.0e-3
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 20
nl_abs_tol = 1e-10
dt = 1.0
[]
[Outputs]
csv = true
exodus = true
[]
(modules/optimization/test/tests/optimizationreporter/constant_heat_source/forward.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 2
ymax = 2
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[heat_source]
type = BodyForce
function = volumetric_heat_func
variable = temperature
[]
[]
[BCs]
[left]
type = NeumannBC
variable = temperature
boundary = left
value = 0
[]
[right]
type = NeumannBC
variable = temperature
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 200
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 100
[]
[]
[Functions]
[volumetric_heat_func]
type = ParsedOptimizationFunction
expression = q
param_symbol_names = 'q'
param_vector_name = 'params/q'
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'preonly lu superlu_dist'
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
[]
[params]
type = ConstantReporter
real_vector_names = 'q'
real_vector_values = '0' # Dummy value
[]
[]
[Outputs]
console = false
file_base = 'forward'
[]
(modules/phase_field/test/tests/KKS_system/nonlinear.i)
#
# This test checks if the thwo phase and lagrange multiplier solutions can be replicated
# with a two order parameter approach, where the second order parameter eta2 is a
# nonlinear variable that is set as eta2 := 1 - eta1 (using Reaction, CoupledForce, and BodyForce)
# The solution is reproduced.
#
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmax = 5
[]
[AuxVariables]
[Fglobal]
order = CONSTANT
family = MONOMIAL
[]
[]
[Variables]
# concentration
[c]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = x/5
[]
[]
# order parameter 1
[eta1]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
# order parameter 2
[eta2]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
# phase concentration 1
[c1]
order = FIRST
family = LAGRANGE
initial_condition = 0.9
[]
# phase concentration 2
[c2]
order = FIRST
family = LAGRANGE
initial_condition = 0.1
[]
[]
[Materials]
# simple toy free energies
[f1] # = fd
type = DerivativeParsedMaterial
property_name = F1
coupled_variables = 'c1'
expression = '(0.9-c1)^2'
[]
[f2] # = fm
type = DerivativeParsedMaterial
property_name = F2
coupled_variables = 'c2'
expression = '(0.1-c2)^2'
[]
# Switching functions for each phase
[h1_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta1
function_name = h1
[]
[h2_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta2
function_name = h2
[]
# Coefficients for diffusion equation
[Dh1]
type = DerivativeParsedMaterial
material_property_names = 'D h1(eta1)'
expression = D*h1
property_name = Dh1
coupled_variables = eta1
[]
[Dh2]
type = DerivativeParsedMaterial
material_property_names = 'D h2(eta2)'
expression = D*h2
property_name = Dh2
coupled_variables = eta2
[]
# Barrier functions for each phase
[g1]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta1
function_name = g1
[]
[g2]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta2
function_name = g2
[]
# constant properties
[constants]
type = GenericConstantMaterial
prop_names = 'D L kappa'
prop_values = '0.7 0.7 0.2'
[]
[]
[Kernels]
#Kernels for diffusion equation
[diff_time]
type = TimeDerivative
variable = c
[]
[diff_c1]
type = MatDiffusion
variable = c
diffusivity = Dh1
v = c1
args = 'eta1'
[]
[diff_c2]
type = MatDiffusion
variable = c
diffusivity = Dh2
v = c2
args = 'eta2'
[]
# Kernels for Allen-Cahn equation for eta1
[deta1dt]
type = TimeDerivative
variable = eta1
[]
[ACBulkF1]
type = KKSMultiACBulkF
variable = eta1
Fj_names = 'F1 F2 '
hj_names = 'h1 h2 '
gi_name = g1
eta_i = eta1
wi = 0.2
coupled_variables = 'c1 c2 eta2'
[]
[ACBulkC1]
type = KKSMultiACBulkC
variable = eta1
Fj_names = 'F1 F2'
hj_names = 'h1 h2'
cj_names = 'c1 c2'
eta_i = eta1
coupled_variables = 'eta2'
[]
[ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa
[]
# Phase concentration constraints
[chempot12]
type = KKSPhaseChemicalPotential
variable = c1
cb = c2
fa_name = F1
fb_name = F2
[]
[phaseconcentration]
type = KKSMultiPhaseConcentration
variable = c2
cj = 'c1 c2'
hj_names = 'h1 h2'
etas = 'eta1 eta2'
c = c
[]
# equation for eta2 = 1 - eta1
# 0 = eta2 + eta1 -1
[constraint_eta1] # eta2
type = Reaction
variable = eta2
[]
[constraint_eta2] # + eta1
type = CoupledForce
variable = eta2
coef = -1
v = eta1
[]
[constraint_one] # - 1
type = BodyForce
variable = eta2
[]
[]
[AuxKernels]
[Fglobal_total]
type = KKSMultiFreeEnergy
Fj_names = 'F1 F2 '
hj_names = 'h1 h2 '
gj_names = 'g1 g2 '
variable = Fglobal
w = 0.2
interfacial_vars = 'eta1 eta2 '
kappa_names = 'kappa kappa'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'lu nonzero'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-11
end_time = 350
dt = 10
[]
[VectorPostprocessors]
[c]
type = LineValueSampler
variable = c
start_point = '0 0 0'
end_point = '5 0 0'
num_points = 21
sort_by = x
[]
[]
[Outputs]
csv = true
execute_on = FINAL
[]
(modules/phase_field/test/tests/initial_conditions/SmoothSuperellipsoidIC_3D.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 15
ny = 15
nz = 15
xmax = 50
ymax = 50
zmax = 50
elem_type = HEX8
[]
[Variables]
[./c]
[../]
[]
[ICs]
[./c]
type = SmoothSuperellipsoidIC
variable = c
x1 = 25.0
y1 = 25.0
z1 = 25.0
a = 8
b = 12
c = 16
n = 3.5
invalue = 1.0
outvalue = 0
int_width = 4.0
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./Diffusion]
type = MatDiffusion
variable = c
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y z'
[../]
[../]
[]
[Materials]
[./Diffusivity]
type = GenericConstantMaterial
prop_names = D
prop_values = 1.0
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 20
l_tol = 1.0e-5
nl_max_its = 40
nl_rel_tol = 5.0e-14
start_time = 0.0
num_steps = 1
dt = 2.0
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/bouncing-block-contact/frictionless-nodal-reduced-active-set.i)
starting_point = .5
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1
[]
[Mesh]
file = square-blocks-no-offset.e
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${starting_point}
type = ConstantIC
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[Constraints]
[./disp_x]
type = RANFSNormalMechanicalContact
secondary = 10
primary = 20
variable = disp_x
primary_variable = disp_x
component = x
[../]
[./disp_y]
type = RANFSNormalMechanicalContact
secondary = 10
primary = 20
variable = disp_y
primary_variable = disp_y
component = y
[../]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
preset = false
boundary = 40
value = 0.0
[../]
[./topx]
type = DirichletBC
variable = disp_x
preset = false
boundary = 30
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
preset = false
boundary = 40
value = 0.0
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = 30
function = '${starting_point} - t'
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
dtmin = 1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -ksp_monitor_true_residual -snes_view'
petsc_options_iname = '-mat_mffd_err -pc_type -pc_hypre_type'
petsc_options_value = '1e-5 hypre boomeramg'
l_max_its = 30
nl_max_its = 20
line_search = 'project'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exo]
type = Exodus
execute_on = 'nonlinear'
[]
print_linear_residuals = false
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Postprocessors]
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[]
(modules/xfem/test/tests/moving_interface/cut_mesh_3d.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y disp_z'
[]
[XFEM]
geometric_cut_userobjects = 'cut_mesh'
qrule = volfrac
output_cut_plane = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 11
ny = 11
nz = 1
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
zmin = 0.0
zmax = 0.1
elem_type = HEX8
[]
[block1]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '0.5 1 0.1'
input = gen
[]
[block2]
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '0.5 0 0'
top_right = '1 1 0.1'
input = block1
[]
[]
[UserObjects]
[cut_mesh]
type = InterfaceMeshCut3DUserObject
mesh_file = cylinder_surface.e
interface_velocity_function = vel_func
heal_always = true
block = 2
[]
[]
[Functions]
[vel_func]
type = ConstantFunction
value = 0.011
[]
[]
[Modules/TensorMechanics/Master]
displacements = 'disp_x disp_y disp_z'
[all]
strain = SMALL
add_variables = true
incremental = false
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress'
displacements = 'disp_x disp_y disp_z'
[]
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[ls]
[]
[]
[AuxKernels]
[ls]
type = MeshCutLevelSetAux
mesh_cut_user_object = cut_mesh
variable = ls
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = 1
[]
[time_deriv]
type = TimeDerivative
variable = u
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 207000
poissons_ratio = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[BCs]
[front_u]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[back_u]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[box1_x]
type = DirichletBC
variable = disp_x
value = 0
boundary = left
[]
[box1_y]
type = DirichletBC
variable = disp_y
value = 0
boundary = left
[]
[box1_z]
type = DirichletBC
variable = disp_z
value = 0
boundary = left
[]
[box2_x]
type = FunctionDirichletBC
variable = disp_x
function = '0.01*t'
boundary = right
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 20
l_tol = 1e-3
nl_max_its = 15
nl_rel_tol = 1e-10
nl_abs_tol = 1e-12
start_time = 0.0
dt = 2
end_time = 2
max_xfem_update = 1
[]
[Outputs]
exodus = true
[]
(modules/xfem/test/tests/moving_interface/verification/1D_xy_lsdep1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: quasi-1D
# Coordinate System: xy
# Material Numbers/Types: level set dep 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# A simple transient heat transfer problem in Cartesian coordinates designed
# with the Method of Manufactured Solutions. This problem was developed to
# verify XFEM performance in the presence of a moving interface for linear
# element models that can be exactly evaluated by FEM/Moose. Both the
# temperature solution and level set function are designed to be linear to
# attempt to minimize error between the Moose/exact solution and XFEM results.
# Thermal conductivity is dependent upon the value of the level set function
# at each timestep.
# Results:
# The temperature at the left boundary (x=0) exhibits the largest difference
# between the FEM/Moose solution and XFEM results. We present the XFEM
# results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 479.9999722
# 0.6 520 519.9998726
# 0.8 560 559.9997314
# 1.0 600 599.9996885
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 1
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 0.5
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = 'rhoCp*(-200*x+200)-(0.05*200*t/1.04)'
symbol_names = 'rhoCp'
symbol_values = 10
[../]
[./neumann_func]
type = ParsedFunction
expression = '((0.05/1.04)*(1-(x-0.04)-0.2*t) + 1.5)*200*t'
[../]
[./k_func]
type = ParsedFunction
expression = '(0.05/1.04)*(1-(x-0.04)-0.2*t) + 1.5'
[../]
[./ls_func]
type = ParsedFunction
expression = '1.04 - x - 0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericFunctionMaterial
prop_names = 'diffusion_coefficient'
prop_values = 'k_func'
[../]
[]
[BCs]
[./left_u]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 'right'
value = 400
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/stochastic_tools/test/tests/surrogates/nearest_point/sub_vector.i)
L = 1
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 100
xmax = ${L}
elem_type = EDGE3
[]
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 10000
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 2.0
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 300
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[VectorPostprocessors]
[T_vec]
type = LineValueSampler
variable = T
start_point = '0 0 0'
end_point = '${L} 0 0'
num_points = 10
sort_by = x
[]
[]
(test/tests/interfacekernels/1d_interface/reaction_1D_transient.i)
# Transient-state test for the InterfaceReaction kernel.
#
# Same to steady-state, except the following
#
# Natural BCs are applied (i.e. NewmannBC h=0 at left and right)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'subdomain1'
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = '0'
[../]
[./v]
order = FIRST
family = LAGRANGE
block = '1'
[../]
[]
[Kernels]
[./diff_u]
type = MatDiffusion
diffusivity = D
variable = u
block = '0'
[../]
[./diff_v]
type = MatDiffusion
diffusivity = D
variable = v
block = '1'
[../]
[./diff_u_dt]
type = TimeDerivative
variable = u
block = '0'
[../]
[./diff_v_dt]
type = TimeDerivative
variable = v
block = '1'
[../]
[./source_u]
type = BodyForce
variable = u
block = '0'
[../]
[]
[InterfaceKernels]
[./interface]
type = InterfaceDiffusion
variable = u
neighbor_var = 'v'
boundary = 'primary0_interface'
D = D
D_neighbor = D
[../]
[./interface_reaction]
type = InterfaceReaction
variable = u
neighbor_var = 'v'
boundary = 'primary0_interface'
kf = 1 # Forward reaction rate coefficient
kb = 2 # Backward reaction rate coefficient
[../]
[]
[Materials]
[./block0]
type = GenericConstantMaterial
block = '0'
prop_names = 'D'
prop_values = '4'
[../]
[./block1]
type = GenericConstantMaterial
block = '1'
prop_names = 'D'
prop_values = '2'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
[Debug]
show_var_residual_norms = true
[]
(modules/phase_field/test/tests/GBType/GB_Type_Phase2.i)
# MOOSE input file
# Written by Pierre-Clement Simon - Idaho National Laboratory
#
# Project:
# TRISO fuel fission gas transport: Silver diffusion in silicon carbide
#
# Published with:
# ---
#
# Phase Field Model: Isotropic diffusion equation
# type: Steady-State
# Grain structure: Bicrystal with heterogeneous diffusion (higher in GBs than within grains)
# BCs: Periodic for AEH, flux and fix for direct method
# System: Ag in SiC with bulk and Gb diffusion from LLS
#
#
# Info:
# - Dimentional input file for the diffusion of a solute in a complex
# polycrystal
#
#
# Updates from previous file:
#
#
# Units
# length: nm
# time: s
# energy: --
# quantity: --
[Mesh]
file = 'GB_Type_Phase1_out.e'
[]
[GlobalParams]
op_num = 6
var_name_base = gr
[]
[UserObjects]
[./initial_grains]
type = SolutionUserObject
mesh = 'GB_Type_Phase1_out.e'
timestep = LATEST
[../]
[./grain_tracker]
type = GrainTracker
threshold = 0.2
connecting_threshold = 0.08
compute_var_to_feature_map = true
flood_entity_type = ELEMENTAL
compute_halo_maps = true # For displaying HALO fields
[../]
[]
[Variables]
[./cx_AEH] #composition used for the x-component of the AEH solve
initial_condition = 0.5
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
variable = 'cx_AEH'
[../]
[../]
[]
[AuxVariables]
[./gr0]
order = FIRST
family = LAGRANGE
[../]
[./gr1]
order = FIRST
family = LAGRANGE
[../]
[./gr2]
order = FIRST
family = LAGRANGE
[../]
[./gr3]
order = FIRST
family = LAGRANGE
[../]
[./gr4]
order = FIRST
family = LAGRANGE
[../]
[./gr5]
order = FIRST
family = LAGRANGE
[../]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[./bnds_LAGB]
order = FIRST
family = LAGRANGE
[../]
[./bnds_HAGB]
order = FIRST
family = LAGRANGE
[../]
[./gb_type]
order = CONSTANT
family = MONOMIAL
[../]
[./EBSD_grain]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./init_grO]
type = SolutionAux
execute_on = INITIAL
variable = gr0
solution = initial_grains
from_variable = gr0
[../]
[./init_gr1]
type = SolutionAux
execute_on = INITIAL
variable = gr1
solution = initial_grains
from_variable = gr1
[../]
[./init_gr2]
type = SolutionAux
execute_on = INITIAL
variable = gr2
solution = initial_grains
from_variable = gr2
[../]
[./init_gr3]
type = SolutionAux
execute_on = INITIAL
variable = gr3
solution = initial_grains
from_variable = gr3
[../]
[./init_gr4]
type = SolutionAux
execute_on = INITIAL
variable = gr4
solution = initial_grains
from_variable = gr4
[../]
[./init_gr5]
type = SolutionAux
execute_on = INITIAL
variable = gr5
solution = initial_grains
from_variable = gr5
[../]
[./init_EBSD_grain]
type = SolutionAux
execute_on = INITIAL
variable = EBSD_grain
solution = initial_grains
from_variable = ebsd_numbers
[../]
[./gb_type]
type = SolutionAux
execute_on = 'INITIAL TIMESTEP_END'
variable = gb_type
solution = initial_grains
from_variable = gb_type
[../]
[./bnds_aux]
# AuxKernel that calculates the GB term
type = BndsCalcAux
variable = bnds
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./bnds_LAGB]
# Calculate the bnds for specific GB type
type = SolutionAuxMisorientationBoundary
variable = bnds_LAGB
gb_type_order = 1
solution = initial_grains
from_variable = gb_type
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./bnds_HAGB]
# Calculate the bnds for specific GB type
type = SolutionAuxMisorientationBoundary
variable = bnds_HAGB
gb_type_order = 2
solution = initial_grains
from_variable = gb_type
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
[Kernels]
[./Diff_x]
type = MatDiffusion
diffusivity = D_Scaling
variable = cx_AEH
args = 'bnds'
[../]
[]
[Materials]
#=========================================================== Generic Constants
[./consts]
type = GenericConstantMaterial
prop_names = 'R T '
prop_values = '8.3145 1450'
# unit J.mol-1.K-1 K
[../]
[./consts_expected]
type = GenericConstantMaterial
prop_names = 'Db Dgbl Dgbh'
prop_values = '0.007 0.302 821.672'
# unit nm^2/s nm^2/s nm^2/s
outputs = exodus
[../]
#===================================================== Interpolation functions
[./hgb] # equal to 1 in grain boundaries, 0 elsewhere in grains.
type = DerivativeParsedMaterial
coupled_variables = 'bnds'
constant_names = 'bnds_middle width tanh_cst_x2'
constant_expressions = '0.75 0.0596 2.1972245773362196'
expression = '1-0.5*(1.0+tanh(tanh_cst_x2*(bnds-bnds_middle)/width))'
property_name = 'hgb'
outputs = exodus
[../]
[./hgb_lagb] # equal to 1 in grain boundaries, 0 elsewhere in grains.
type = DerivativeParsedMaterial
coupled_variables = 'bnds_LAGB'
constant_names = 'bnds_middle width tanh_cst_x2'
constant_expressions = '0.75 0.0596 2.1972245773362196'
expression = '1-0.5*(1.0+tanh(tanh_cst_x2*(bnds_LAGB-bnds_middle)/width))'
property_name = 'hgb_lagb'
outputs = exodus
[../]
[./hgb_hagb] # equal to 1 in grain boundaries, 0 elsewhere in grains.
type = DerivativeParsedMaterial
coupled_variables = 'bnds_HAGB'
constant_names = 'bnds_middle width tanh_cst_x2'
constant_expressions = '0.75 0.0596 2.1972245773362196'
expression = '1-0.5*(1.0+tanh(tanh_cst_x2*(bnds_HAGB-bnds_middle)/width))'
property_name = 'hgb_hagb'
outputs = exodus
[../]
#====================================================== Diffusion coefficients
#====================== Diffusion coefficients - Basic values and coefficients
[./Grain_boundary_width] # size of grain boundaries in input polycrystal, as well as length scales for domain size
type = GenericConstantMaterial
prop_names = 'wGB_ref wGB L '
prop_values = '1 6 9000'
# unit -- -- -- --
[../]
#============================================ Corrected Diffusion coefficients
#========================================================= Analytical 1 - 1x1y
[./Diffusion_coefficient_D]
type = DerivativeParsedMaterial
property_name = 'D_Scaling'
coupled_variables = 'bnds'
material_property_names = 'Db Dgbh Dgbl hgb_lagb(bnds_LAGB) hgb_hagb(bnds_HAGB) hgb(bnds)'
expression = '(1-hgb)*Db+hgb*hgb_lagb/(hgb_lagb+hgb_hagb)*Dgbl+hgb*hgb_hagb/(hgb_lagb+hgb_hagb)*Dgbh'
outputs = exodus
derivative_order = 2
[../]
[]
# It converges faster if all the residuals are at the same magnitude
[Debug]
show_var_residual_norms = true
[../]
[Preconditioning]
[./SMP]
type = SMP
off_diag_row = 'cx_AEH'
off_diag_column = 'cx_AEH'
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -pc_hypre_boomeramg_strong_threshold'
petsc_options_value = 'hypre boomeramg 31 0.7'
l_max_its = 50
nl_max_its = 50
l_tol = 1e-04
l_abs_tol = 1e-50
nl_abs_tol = 1e-10
nl_rel_tol = 1e-10
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/optimization/test/tests/executioners/constrained/shape_optimization/forward.i)
# This test is documented as an example for ConstrainedShapeOptimization. This
# test should not be changed without updating the documentation.
inner_radius = 6
outer_radius = 10
volume_constraint = 200
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[mesh]
type = ConcentricCircleMeshGenerator
has_outer_square = no
num_sectors = 16
radii = '${inner_radius} ${outer_radius}'
rings = '16 16'
preserve_volumes = false
[]
[inner_radius]
type = SideSetsBetweenSubdomainsGenerator
input = mesh
new_boundary = inner
primary_block = 2
paired_block = 1
[]
[delete]
type = BlockDeletionGenerator
input = inner_radius
block = 1
[]
[gather_all]
type = BoundingBoxNodeSetGenerator
input = delete
bottom_left = '-100 -100 -100'
top_right = '100 100 100'
new_boundary = total
[]
[combine]
type = SideSetsFromBoundingBoxGenerator
input = gather_all
bottom_left = '-100 -100 -100'
top_right = '100 100 100'
boundaries_old = 'inner outer'
boundary_new = moving
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[T]
[]
[]
[AuxVariables]
[dist_between]
[AuxKernel]
type = NearestNodeDistanceAux
variable = dist_between
paired_boundary = moving
boundary = total
block = 2
use_displaced_mesh = false
execute_on = "INITIAL"
[]
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
use_displaced_mesh = false
diffusivity = diff_coef
[]
[disp_y]
type = MatDiffusion
variable = disp_y
use_displaced_mesh = false
diffusivity = diff_coef
[]
# run physics of interest on deformed mesh
[Diffusion]
type = FunctionDiffusion
variable = T
use_displaced_mesh = true
[]
[Source]
type = BodyForce
variable = T
value = 1
use_displaced_mesh = true
[]
[]
[Materials]
# perserve elements near the boundary
[diff_coef]
type = ParsedMaterial
coupled_variables = 'dist_between'
expression = '1/(dist_between+0.5)'
property_name = 'diff_coef'
[]
[h]
type = ADGenericFunctionMaterial
prop_names = h
prop_values = h
[]
# convection type boundary condition
[convection_bc]
type = ADParsedMaterial
coupled_variables = "T"
expression = "h*(100-T)"
material_property_names = "h"
property_name = convection
[]
[]
[Functions]
[r1_x]
type = ParsedOptimizationFunction
expression = 'r1 * cos((atan(y/x)))'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[r1_y]
type = ParsedOptimizationFunction
expression = 'r1 * sin((atan(y/x)))'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[r0_x]
type = ParsedOptimizationFunction
expression = 'r0 * cos((atan(y/x)))'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[r0_y]
type = ParsedOptimizationFunction
expression = 'r0 * sin((atan(y/x)))'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[h]
type = ParsedOptimizationFunction
# r0+${inner_radius} is the true current inner radius
expression = '10 /(pi * (r0+${inner_radius})^3)'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[eq_grad_r0]
type = ParsedOptimizationFunction
expression = '-2 * pi * (r0 + ${inner_radius})'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[eq_grad_r1]
type = ParsedOptimizationFunction
# r1+${outer_radius} is the true current outer radius
expression = '2 * pi * (r1+${outer_radius})'
param_symbol_names = 'r0 r1'
param_vector_name = 'params/radii'
[]
[]
[BCs]
[diffuse_r1_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 'outer'
function = r1_x
preset = false
[]
[diffuse_r1_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = 'outer'
function = r1_y
preset = false
[]
[diffuse_r0_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 'inner'
function = r0_x
preset = false
[]
[diffuse_r0_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = 'inner'
function = r0_y
preset = false
[]
# run physics on deformed mesh
[convection]
type = ADMatNeumannBC
variable = T
boundary = inner
boundary_material = convection
use_displaced_mesh = true
value = 1
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Reporters]
[params]
type = ConstantReporter
real_vector_names = 'radii'
real_vector_values = '0 0'
dof_id_type_vector_names = 'num_params'
dof_id_type_vector_values = '2'
[]
[]
[Postprocessors]
[current_volume]
type = VolumePostprocessor
use_displaced_mesh = true
[]
# objective function
[objective]
type = NodalExtremeValue
variable = T
[]
[eq_constraint]
type = ParsedPostprocessor
pp_names = current_volume
function = 'current_volume - ${volume_constraint}'
[]
[func_r0]
type = FunctionValuePostprocessor
function = eq_grad_r0
[]
[func_r1]
type = FunctionValuePostprocessor
function = eq_grad_r1
[]
[]
[VectorPostprocessors]
# convert "Real" postprocessors to vectors
[vol_constraint]
type = VectorOfPostprocessors
postprocessors = 'eq_constraint'
force_postaux = true
[]
[eq_grad]
type = VectorOfPostprocessors
postprocessors = 'func_r0 func_r1'
force_postaux = true
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = none
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
[]
[Outputs]
console = false
[]
(modules/stochastic_tools/test/tests/surrogates/gaussian_process/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 1
elem_type = EDGE3
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 1.0
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 2.0
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 300
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[avg]
type = AverageNodalVariableValue
variable = T
[]
[]
(modules/stochastic_tools/test/tests/controls/libtorch_drl_control/libtorch_drl_control.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 0.0
xmax = 7.0
nx = 20
[]
[]
[Variables]
[temp]
initial_condition = 300
[]
[]
[Kernels]
[time]
type = CoefTimeDerivative
variable = temp
Coefficient = '${fparse 1.00630182*1.225}'
[]
[heat_conduc]
type = MatDiffusion
variable = temp
diffusivity = 'k'
[]
[]
[BCs]
[left_flux]
type = NeumannBC
value = 0.0
boundary = 'left'
variable = temp
[]
[dirichlet]
type = FunctionDirichletBC
function = temp_env
variable = temp
boundary = 'right'
[]
[]
[Functions]
[temp_env]
type = ParsedFunction
value = '15.0*sin(t/86400.0 *pi) + 273.0'
[]
[]
[Materials]
[constant]
type = GenericConstantMaterial
prop_names = 'k'
prop_values = 26.53832364
[]
[]
[Postprocessors]
[center_temp]
type = PointValue
variable = temp
point = '3.5 0.0 0.0'
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[center_temp_tend]
type = PointValue
variable = temp
point = '3.5 0.0 0.0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[env_temp]
type = FunctionValuePostprocessor
function = temp_env
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[left_flux]
type = LibtorchControlValuePostprocessor
control_name = src_control
execute_on = 'INITIAL TIMESTEP_END'
[]
[log_prob_left_flux]
type = LibtorchDRLLogProbabilityPostprocessor
control_name = src_control
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Controls]
inactive = src_control_empty
[src_control]
seed = 11
type = LibtorchDRLControl
parameters = "BCs/left_flux/value"
responses = 'center_temp env_temp'
input_timesteps = 2
response_scaling_factors = '0.03 0.03'
response_shift_factors = '270 270'
action_standard_deviations = '0.1'
action_scaling_factors = 200
filename = 'mynet_control.net'
torch_script_format = false
num_neurons_per_layer = '16 6'
activation_function = 'relu'
execute_on = 'TIMESTEP_BEGIN'
[]
[src_control_empty]
type = LibtorchDRLControl
parameters = "BCs/left_flux/value"
responses = 'center_temp env_temp'
input_timesteps = 2
response_scaling_factors = '0.03 0.03'
response_shift_factors = '270 270'
action_standard_deviations = '0.1'
action_scaling_factors = 100
execute_on = 'TIMESTEP_BEGIN'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-8
start_time = 0.0
end_time = 18000
dt = 1800.0
[]
[Outputs]
csv = true
[]
(modules/optimization/test/tests/optimizationreporter/constant_heat_source/adjoint.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 2
ymax = 2
[]
[Variables]
[adjoint_T]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = adjoint_T
diffusivity = thermal_conductivity
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = adjoint_T
x_coord_name = misfit/measurement_xcoord
y_coord_name = misfit/measurement_ycoord
z_coord_name = misfit/measurement_zcoord
value_name = misfit/misfit_values
[]
[]
[Reporters]
[misfit]
type = OptimizationData
[]
[params]
type = ConstantReporter
real_vector_names = 'q'
real_vector_values = '0' # Dummy value
[]
[]
[BCs]
[left]
type = NeumannBC
variable = adjoint_T
boundary = left
value = 0
[]
[right]
type = NeumannBC
variable = adjoint_T
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = adjoint_T
boundary = bottom
value = 0
[]
[top]
type = DirichletBC
variable = adjoint_T
boundary = top
value = 0
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'preonly lu superlu_dist'
[]
[Functions]
[volumetric_heat_func]
type = ParsedOptimizationFunction
expression = q
param_symbol_names = 'q'
param_vector_name = 'params/q'
[]
[]
[VectorPostprocessors]
[gradient_vpp]
type = ElementOptimizationSourceFunctionInnerProduct
variable = adjoint_T
function = volumetric_heat_func
[]
[]
[Outputs]
console = false
file_base = 'adjoint'
[]
(modules/optimization/test/tests/optimizationreporter/point_loads/forward_homogeneous.i)
# DO NOT CHANGE THIS TEST
# this test is documented as an example in forceInv_pointLoads.md
# if this test is changed, the figures will need to be updated.
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 1.4
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = temperature
x_coord_name = 'point_source/x'
y_coord_name = 'point_source/y'
z_coord_name = 'point_source/z'
value_name = 'point_source/value'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temperature
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = temperature
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 0
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 0
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-6
nl_rel_tol = 1e-8
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[VectorPostprocessors]
[point_source]
type = ConstantVectorPostprocessor
vector_names = 'x y z value'
value = '0.2 0.7 0.4;
0.2 0.56 1;
0 0 0;
-1000 120 500'
execute_on = LINEAR
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
[]
[]
[Outputs]
console = false
file_base = 'forward_homo'
[]
(modules/stochastic_tools/test/tests/userobjects/inverse_mapping/sub.i)
S = 10
D = 10
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmax = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[v_aux]
[]
[]
[Kernels]
[diffusion_v]
type = MatDiffusion
variable = v
diffusivity = D_v
[]
[source_v]
type = BodyForce
variable = v
value = 1.0
[]
[]
[AuxKernels]
[func_aux]
type = FunctionAux
variable = v_aux
function = v_aux_func
[]
[]
[Functions]
[v_aux_func]
type = ParsedFunction
expression = 'S * x + D'
symbol_names = 'S D'
symbol_values = '${S} ${D}'
[]
[]
[Materials]
[diffusivity_v]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 4.0
[]
[]
[BCs]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Reporters]
[solution_storage]
type = SolutionContainer
execute_on = 'FINAL'
[]
[solution_storage_aux]
type = SolutionContainer
execute_on = 'FINAL'
system = aux
[]
[]
(modules/contact/test/tests/bouncing-block-contact/variational-frictional-action.i)
starting_point = 2e-1
# We offset slightly so we avoid the case where the bottom of the secondary block and the top of the
# primary block are perfectly vertically aligned which can cause the backtracking line search some
# issues for a coarse mesh (basic line search handles that fine)
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
[]
[Mesh]
[file_mesh]
type = FileMeshGenerator
file = long-bottom-block-1elem-blocks-coarse.e
[]
[remove]
type = BlockDeletionGenerator
input = file_mesh
block = '3 4'
[]
patch_update_strategy = iteration
[]
# [Problem]
# type = DumpObjectsProblem
# dump_path = Contact/contact_action
# []
[Variables]
[disp_x]
block = '1 2'
scaling = 1e1
[]
[disp_y]
block = '1 2'
scaling = 1e1
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[AuxVariables]
[procid]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[procid]
type = ProcessorIDAux
variable = procid
[]
[]
[Contact]
[contact_action]
model = coulomb
formulation = mortar
c_normal = 1.0e-2
c_tangential = 1.0e-1
friction_coefficient = 0.1
primary = 10
secondary = 20
normalize_c = true
normal_lm_scaling = 1e3
tangential_lm_scaling = 1e2
correct_edge_dropping = true
use_dual = false
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-15'
l_max_its = 30
nl_max_its = 25
line_search = 'none'
nl_rel_tol = 1e-12
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exodus]
type = Exodus
hide = 'procid contact_pressure nodal_area penetration'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
(modules/stochastic_tools/test/tests/reporters/ActiveLearningGP/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 0.13061533868990033
elem_type = EDGE3
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 10951.864006672608
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 10.320058433901163
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 279.8173854189593
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[avg]
type = AverageNodalVariableValue
variable = T
[]
[max]
type = NodalExtremeValue
variable = T
value_type = max
[]
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Outputs]
[]
(modules/phase_field/test/tests/phase_field_crystal/PFCEnergyDensity/auxkernel.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
nz = 0
xmax = 6
ymax = 6
zmax = 0
[]
[Variables]
[./n]
[./InitialCondition]
type = RandomIC
min = 0.0
max = 0.1
[../]
[../]
[./u]
scaling = 1e2
[../]
[./v]
scaling = 1e1
[../]
[]
[AuxVariables]
[./ed]
order = CONSTANT
family = MONOMIAL
[../]
[./edrff0]
order = CONSTANT
family = MONOMIAL
[../]
[./edrff1]
order = CONSTANT
family = MONOMIAL
[../]
[./edrff2]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./ndot]
type = TimeDerivative
variable = n
[../]
[./n_bulk]
type = CHBulkPFCTrad
variable = n
[../]
[./u_term]
type = MatDiffusion
variable = n
v = u
diffusivity = C2
[../]
[./v_term]
type = MatDiffusion
variable = n
v = v
diffusivity = C4
[../]
[./u_rctn]
type = Reaction
variable = u
[../]
[./u_gradn]
type = LaplacianSplit
variable = u
c = n
[../]
[./v_rctn]
type = Reaction
variable = v
[../]
[./v_gradu]
type = LaplacianSplit
variable = v
c = u
[../]
[]
[AuxKernels]
[./Energy_n]
type = PFCEnergyDensity
execute_on = 'initial timestep_end'
variable = ed
v = 'n u v'
[../]
[./Energy_rff0]
type = PFCRFFEnergyDensity
execute_on = 'initial timestep_end'
variable = edrff0
log_approach = tolerance
v = 'n u v'
[../]
[./Energy_rff1]
type = PFCRFFEnergyDensity
execute_on = 'initial timestep_end'
variable = edrff1
log_approach = cancelation
v = 'n u v'
[../]
[./Energy_rff2]
type = PFCRFFEnergyDensity
execute_on = 'initial timestep_end'
variable = edrff2
log_approach = expansion
v = 'n u v'
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./PFCTrad]
type = PFCTradMaterial
order = FOURTH
[../]
[]
[Postprocessors]
[./Total_free_energy]
type = PFCElementEnergyIntegral
variable = ed
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
active = 'SMP'
[./SMP]
type = SMP
full = false
off_diag_row = 'u n n v'
off_diag_column = 'n u v u'
[../]
[./FDP]
type = FDP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
# petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
# petsc_options_value = 'hypre boomeramg 101'
# petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
# petsc_options_value = 'asm 101 preonly lu 1'
petsc_options_iname = '-pc_type '
petsc_options_value = 'lu '
l_max_its = 100
l_tol = 1e-04
nl_rel_tol = 1e-09
nl_abs_tol = 1e-11
num_steps = 1
dt = 0.1
[]
[Outputs]
exodus = true
[]
(modules/phase_field/examples/anisotropic_interfaces/GrandPotentialTwophaseAnisotropy.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = -4
xmax = 4
ymin = -4
ymax = 4
uniform_refine = 2
[]
[GlobalParams]
radius = 0.5
int_width = 0.3
x1 = 0
y1 = 0
derivative_order = 2
[]
[Variables]
[./w]
[../]
[./etaa0]
[../]
[./etab0]
[../]
[]
[AuxVariables]
[./bnds]
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
v = 'etaa0 etab0'
[../]
[]
[ICs]
[./w]
type = SmoothCircleIC
variable = w
# note w = A*(c-cleq), A = 1.0, cleq = 0.0 ,i.e., w = c (in the matrix/liquid phase)
outvalue = -4.0
invalue = 0.0
[../]
[./etaa0]
type = SmoothCircleIC
variable = etaa0
#Solid phase
outvalue = 0.0
invalue = 1.0
[../]
[./etab0]
type = SmoothCircleIC
variable = etab0
#Liquid phase
outvalue = 1.0
invalue = 0.0
[../]
[]
[BCs]
[./Periodic]
[./w]
variable = w
auto_direction = 'x y'
[../]
[./etaa0]
variable = etaa0
auto_direction = 'x y'
[../]
[./etab0]
variable = etab0
auto_direction = 'x y'
[../]
[../]
[]
[Kernels]
# Order parameter eta_alpha0
[./ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0'
gamma_names = 'gab'
[../]
[./ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etab0 w'
[../]
[./ACa0_int1]
type = ACInterface2DMultiPhase1
variable = etaa0
etas = 'etab0'
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
[../]
[./ACa0_int2]
type = ACInterface2DMultiPhase2
variable = etaa0
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
[../]
[./ea0_dot]
type = TimeDerivative
variable = etaa0
[../]
# Order parameter eta_beta0
[./ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etaa0'
gamma_names = 'gab'
[../]
[./ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etaa0 w'
[../]
[./ACb0_int1]
type = ACInterface2DMultiPhase1
variable = etab0
etas = 'etaa0'
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
[../]
[./ACb0_int2]
type = ACInterface2DMultiPhase2
variable = etab0
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
[../]
[./eb0_dot]
type = TimeDerivative
variable = etab0
[../]
#Chemical potential
[./w_dot]
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
[../]
[./Diffusion]
type = MatDiffusion
variable = w
diffusivity = Dchi
[../]
[./coupled_etaa0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[./coupled_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[]
[Materials]
[./ha]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0'
phase_etas = 'etaa0'
[../]
[./hb]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0'
phase_etas = 'etab0'
[../]
[./omegaa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
[../]
[./omegab]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegab
material_property_names = 'Vm kb cbeq'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
[../]
[./rhoa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
[../]
[./rhob]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
[../]
[./kappaa]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
etaa = etaa0
etab = etab0
outputs = exodus
output_properties = 'kappaa'
[../]
[./kappab]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
etaa = etab0
etab = etaa0
outputs = exodus
output_properties = 'kappab'
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'L D chi Vm ka caeq kb cbeq gab mu'
prop_values = '1.0 1.0 0.1 1.0 10.0 0.1 10.0 0.9 4.5 10.0'
[../]
[./Mobility]
type = ParsedMaterial
property_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_tol = 1.0e-3
l_max_its = 30
nl_max_its = 15
nl_rel_tol = 1.0e-8
nl_abs_tol = 1e-8
end_time = 10.0
[./TimeStepper]
type = IterationAdaptiveDT
dt = 0.0005
cutback_factor = 0.7
growth_factor = 1.2
[../]
[]
[Adaptivity]
initial_steps = 5
max_h_level = 3
initial_marker = err_eta
marker = err_bnds
[./Markers]
[./err_eta]
type = ErrorFractionMarker
coarsen = 0.3
refine = 0.95
indicator = ind_eta
[../]
[./err_bnds]
type = ErrorFractionMarker
coarsen = 0.3
refine = 0.95
indicator = ind_bnds
[../]
[../]
[./Indicators]
[./ind_eta]
type = GradientJumpIndicator
variable = etaa0
[../]
[./ind_bnds]
type = GradientJumpIndicator
variable = bnds
[../]
[../]
[]
[Outputs]
time_step_interval = 10
exodus = true
[]
(modules/heat_transfer/test/tests/sideset_heat_transfer/cfem_gap.i)
[Mesh]
# Build 2-by-2 mesh
[mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
# Create blocs 0, 1, 2, 3
[block_1]
type = SubdomainBoundingBoxGenerator
input = mesh
block_id = 1
bottom_left = '1 0 0'
top_right = '2 1 0'
[]
[block_2]
type = SubdomainBoundingBoxGenerator
input = block_1
block_id = 2
bottom_left = '0 1 0'
top_right = '1 2 0'
[]
[block_3]
type = SubdomainBoundingBoxGenerator
input = block_2
block_id = 3
bottom_left = '1 1 0'
top_right = '2 2 0'
[]
# Create inner sidesets
[interface_01]
type = SideSetsBetweenSubdomainsGenerator
input = block_3
primary_block = 0
paired_block = 1
new_boundary = 'interface_01'
[]
[interface_13]
type = SideSetsBetweenSubdomainsGenerator
input = interface_01
primary_block = 1
paired_block = 3
new_boundary = 'interface_13'
[]
[interface_32]
type = SideSetsBetweenSubdomainsGenerator
input = interface_13
primary_block = 3
paired_block = 2
new_boundary = 'interface_32'
[]
[interface_20]
type = SideSetsBetweenSubdomainsGenerator
input = interface_32
primary_block = 2
paired_block = 0
new_boundary = 'interface_20'
[]
# Create outer boundaries
[boundary_left_0]
type = SideSetsAroundSubdomainGenerator
input = interface_20
block = 0
normal = '-1 0 0'
new_boundary = 'left_0'
[]
[boundary_bot_0]
type = SideSetsAroundSubdomainGenerator
input = boundary_left_0
block = 0
normal = '0 -1 0'
new_boundary = 'bot_0'
[]
[boundary_bot_1]
type = SideSetsAroundSubdomainGenerator
input = boundary_bot_0
block = 1
normal = '0 -1 0'
new_boundary = 'bot_1'
[]
[boundary_right_1]
type = SideSetsAroundSubdomainGenerator
input = boundary_bot_1
block = 1
normal = '1 0 0'
new_boundary = 'right_1'
[]
[boundary_right_3]
type = SideSetsAroundSubdomainGenerator
input = boundary_right_1
block = 3
normal = '1 0 0'
new_boundary = 'right_3'
[]
[boundary_top_3]
type = SideSetsAroundSubdomainGenerator
input = boundary_right_3
block = 3
normal = '0 1 0'
new_boundary = 'top_3'
[]
[boundary_top_2]
type = SideSetsAroundSubdomainGenerator
input = boundary_top_3
block = 2
normal = '0 1 0'
new_boundary = 'top_2'
[]
[boundary_left_2]
type = SideSetsAroundSubdomainGenerator
input = boundary_top_2
block = 2
normal = '-1 0 0'
new_boundary = 'left_2'
[]
uniform_refine = 4
[]
[Variables]
# Need to have variable for each block to allow discontinuity
[T0]
block = 0
[]
[T1]
block = 1
[]
[T2]
block = 2
[]
[T3]
block = 3
[]
[]
[Kernels]
# Diffusion kernel for each block's variable
[diff_0]
type = MatDiffusion
variable = T0
diffusivity = conductivity
block = 0
[]
[diff_1]
type = MatDiffusion
variable = T1
diffusivity = conductivity
block = 1
[]
[diff_2]
type = MatDiffusion
variable = T2
diffusivity = conductivity
block = 2
[]
[diff_3]
type = MatDiffusion
variable = T3
diffusivity = conductivity
block = 3
[]
# Source for two of the blocks
[source_0]
type = BodyForce
variable = T0
value = 5e5
block = '0'
[]
[source_3]
type = BodyForce
variable = T3
value = 5e5
block = '3'
[]
[]
[InterfaceKernels]
# Side set kernel to represent heat transfer across blocks
# Automatically uses the materials defined in SideSetHeatTransferMaterial
[gap_01]
type = SideSetHeatTransferKernel
# This variable defined on a given block must match the primary_block given when the side set was generated
variable = T0
# This variable defined on a given block must match the paired_block given when the side set was generated
neighbor_var = T1
boundary = 'interface_01'
[]
[gap_13]
type = SideSetHeatTransferKernel
variable = T1
neighbor_var = T3
boundary = 'interface_13'
[]
[gap_32]
type = SideSetHeatTransferKernel
variable = T3
neighbor_var = T2
boundary = 'interface_32'
[]
[gap_20]
type = SideSetHeatTransferKernel
variable = T2
neighbor_var = T0
boundary = 'interface_20'
[]
[]
# Creating auxiliary variable to combine block restricted solutions
# Ignores discontinuity though
[AuxVariables]
[T]
[]
[]
[AuxKernels]
[temp_0]
type = NormalizationAux
variable = T
source_variable = T0
block = 0
[]
[temp_1]
type = NormalizationAux
variable = T
source_variable = T1
block = 1
[]
[temp_2]
type = NormalizationAux
variable = T
source_variable = T2
block = 2
[]
[temp_3]
type = NormalizationAux
variable = T
source_variable = T3
block = 3
[]
[]
[BCs]
# Boundary condition for each block's outer surface
[bc_left_2]
type = DirichletBC
boundary = 'left_2'
variable = T2
value = 300.0
[]
[bc_left_0]
type = DirichletBC
boundary = 'left_0'
variable = T0
value = 300.0
[]
[bc_bot_0]
type = DirichletBC
boundary = 'bot_0'
variable = T0
value = 300.0
[]
[bc_bot_1]
type = DirichletBC
boundary = 'bot_1'
variable = T1
value = 300.0
[]
[./bc_top_2]
type = ConvectiveFluxFunction # (Robin BC)
variable = T2
boundary = 'top_2'
coefficient = 1e3 # W/K/m^2
T_infinity = 600.0
[../]
[./bc_top_3]
type = ConvectiveFluxFunction # (Robin BC)
variable = T3
boundary = 'top_3'
coefficient = 1e3 # W/K/m^2
T_infinity = 600.0
[../]
[./bc_right_3]
type = ConvectiveFluxFunction # (Robin BC)
variable = T3
boundary = 'right_3'
coefficient = 1e3 # W/K/m^2
T_infinity = 600.0
[../]
[./bc_right_1]
type = ConvectiveFluxFunction # (Robin BC)
variable = T1
boundary = 'right_1'
coefficient = 1e3 # W/K/m^2
T_infinity = 600.0
[../]
[]
[Materials]
[fuel]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 75
block = '0 3'
[]
[mod]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 7.5
block = '1 2'
[]
# Interface material used for SideSetHeatTransferKernel
# Heat transfer meachnisms ignored if certain properties are not supplied
[gap_mat]
type = SideSetHeatTransferMaterial
boundary = 'interface_01 interface_13 interface_32 interface_20'
conductivity = 0.41
gap_length = 0.002
Tbulk = 750
h_primary = 3000
h_neighbor = 3000
emissivity_primary = 0.85
emissivity_neighbor = 0.85
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
l_tol = 1e-8
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -ksp_gmres_restart'
petsc_options_value = 'lu superlu_dist 50'
[]
[Outputs]
exodus = true
[]
(modules/stochastic_tools/test/tests/reporters/mapping/map_sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmax = 10
[]
[Variables]
[u]
[]
[v]
[]
[]
[Kernels]
[diffusion_u]
type = MatDiffusion
variable = u
diffusivity = D_u
[]
[source_u]
type = BodyForce
variable = u
value = 1.0
[]
[diffusion_v]
type = MatDiffusion
variable = v
diffusivity = D_v
[]
[source_v]
type = BodyForce
variable = v
value = 1.0
[]
[]
[Materials]
[diffusivity_u]
type = GenericConstantMaterial
prop_names = D_u
prop_values = 2.0
[]
[diffusivity_v]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 4.0
[]
[]
[BCs]
[left_u]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right_u]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[VariableMappings]
inactive = pod
[pod]
type = PODMapping
filename = "map_training_data_pod_mapping.rd"
num_modes_to_compute = '5 5'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Reporters]
inactive = "pod_coeffs"
[solution_storage]
type = SolutionContainer
execute_on = 'FINAL'
[]
[pod_coeffs]
type = MappingReporter
mapping = pod
variables = "u v"
[]
[]
(test/tests/userobjects/side_uo_with_lowerd_use/side-uo-with-lower-d-use.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = 0
ymax = 2
nx = 2
ny = 2
subdomain_ids = '1 2 3 4'
[]
[1to2]
type = SideSetsBetweenSubdomainsGenerator
input = gmg
primary_block = '1'
paired_block = '2'
new_boundary = 'onetwo'
[]
[2to1]
type = SideSetsBetweenSubdomainsGenerator
input = 1to2
primary_block = '2'
paired_block = '1'
new_boundary = 'twoone'
[]
[1to3]
type = SideSetsBetweenSubdomainsGenerator
input = 2to1
primary_block = '1'
paired_block = '3'
new_boundary = 'onethree'
[]
[3to1]
type = SideSetsBetweenSubdomainsGenerator
input = 1to3
primary_block = '3'
paired_block = '1'
new_boundary = 'threeone'
[]
build_all_side_lowerd_mesh = true
[]
[Variables]
[u]
order = THIRD
family = MONOMIAL
block = '1 2 3 4'
[]
[lambda]
order = CONSTANT
family = MONOMIAL
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
block = '1 2 3 4'
[]
[reaction]
type = Reaction
variable = u
rate = '1'
block = '1 2 3 4'
[]
[source]
type = BodyForce
variable = u
value = '1'
block = '1 2 3 4'
[]
[]
[DGKernels]
[surface]
type = HFEMDiffusion
variable = u
lowerd_variable = lambda
[]
[]
[BCs]
[all]
type = NeumannBC
boundary = 'left right top bottom'
variable = u
[]
[]
[UserObjects]
[onetwo_uo]
type = LowerDIntegralSideUserObject
boundary = onetwo
lowerd_variable = lambda
[]
[twoone_uo]
type = LowerDIntegralSideUserObject
boundary = twoone
lowerd_variable = lambda
[]
[onethree_uo]
type = LowerDIntegralSideUserObject
boundary = onethree
lowerd_variable = lambda
[]
[threeone_uo]
type = LowerDIntegralSideUserObject
boundary = threeone
lowerd_variable = lambda
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
(modules/contact/test/tests/mortar_aux_kernels/pressure-aux-frictionless-3d.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Problem]
# error_on_jacobian_nonzero_reallocation = true
[]
[Mesh]
second_order = false
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[lm_z]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[normal_lm]
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[normal_lm]
type = MortarPressureComponentAux
variable = normal_lm
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
lm_var_x = lm_x
lm_var_y = lm_y
lm_var_z = lm_z
component = 'NORMAL'
boundary = 'top_bottom'
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapCartesianLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
lm_z = lm_z
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
correct_edge_dropping = true
c = 1e+02
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_z]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_z
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -mat_mffd_err -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist 1e-5 NONZERO 1e-10'
end_time = 1
dt = .5
dtmin = .01
l_max_its = 100
nl_max_its = 30
# nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = false
csv = true
execute_on = 'FINAL'
[]
[VectorPostprocessors]
[normal_lm]
type = NodalValueSampler
block = secondary_lower
variable = normal_lm
sort_by = 'id'
[]
[]
(modules/phase_field/test/tests/MultiSmoothCircleIC/latticesmoothcircleIC_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 22
ny = 22
nz = 22
xmin = 0
xmax = 100
ymin = 0
ymax = 100
zmin = 0
zmax = 100
elem_type = HEX8
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./c]
type = LatticeSmoothCircleIC
variable = c
invalue = 1.0
outvalue = 0.0001
circles_per_side = '3 3 3'
pos_variation = 0.0
radius = 10.0
int_width = 12.0
radius_variation = 0.2
radius_variation_type = uniform
[../]
[]
[Kernels]
active = 'ie_c diff'
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./diff]
type = MatDiffusion
variable = c
diffusivity = D_v
[../]
[]
[BCs]
[]
[Materials]
active = 'Dv'
[./Dv]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 0.074802
[../]
[]
[Postprocessors]
active = 'bubbles'
[./bubbles]
type = FeatureFloodCount
variable = c
execute_on = 'initial timestep_end'
flood_entity_type = NODAL
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -mat_mffd_type'
petsc_options_value = 'hypre boomeramg 101 ds'
l_max_its = 20
l_tol = 1e-4
nl_max_its = 20
nl_rel_tol = 1e-9
nl_abs_tol = 1e-11
start_time = 0.0
num_steps =1
dt = 100.0
[]
[Outputs]
exodus = true
[]
(modules/stochastic_tools/test/tests/actions/parameter_study_action/sub_eigen.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
elem_type = QUAD4
nx = 8
ny = 8
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = D
[]
[rhs]
type = MatReaction
variable = u
mob_name = L
extra_vector_tags = 'eigen'
[]
[]
[Materials]
[mat]
type = GenericFunctionMaterial
prop_names = 'D L'
prop_values = 'diff_fun react_fun'
[]
[]
[Functions]
[diff_fun]
type = ConstantFunction
value = 1
[]
[react_fun]
type = ConstantFunction
value = 1
[]
[]
[BCs]
[homogeneous]
type = DirichletBC
variable = u
boundary = '0 1 2 3'
value = 0
[]
[eigen]
type = EigenDirichletBC
variable = u
boundary = '0 1 2 3'
[]
[]
[Executioner]
type = Eigenvalue
[]
[VectorPostprocessors]
[eigenvalues]
type = Eigenvalues
[]
[]
[Postprocessors]
[eigenvalue]
type = VectorPostprocessorComponent
vectorpostprocessor = eigenvalues
vector_name = eigen_values_real
index = 0
[]
[]
(modules/phase_field/test/tests/phase_field_crystal/PFCTrad/PFCTrad_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 50
ny = 50
xmax = 8
ymax = 8
[]
[Variables]
[./n]
[./InitialCondition]
type = RandomIC
min = -1
max = 4
[../]
[../]
[./u]
scaling = 1e2
[../]
[./v]
scaling = 1e1
[../]
[]
[Kernels]
[./ndot]
type = TimeDerivative
variable = n
[../]
[./n_bulk]
type = CHBulkPFCTrad
variable = n
[../]
[./u_term]
type = MatDiffusion
variable = n
v = u
diffusivity = C2
[../]
[./v_term]
type = MatDiffusion
variable = n
v = v
diffusivity = C4
[../]
[./u_rctn]
type = Reaction
variable = u
[../]
[./u_gradn]
type = LaplacianSplit
variable = u
c = n
[../]
[./v_rctn]
type = Reaction
variable = v
[../]
[./v_gradu]
type = LaplacianSplit
variable = v
c = u
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./PFCTrad]
type = PFCTradMaterial
order = FOURTH
[../]
[]
[Preconditioning]
active = 'SMP'
[./SMP]
type = SMP
full = false
off_diag_row = 'u n n v'
off_diag_column = 'n u v u'
[../]
[./FDP]
type = FDP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
# petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
# petsc_options_value = 'hypre boomeramg 101'
# petsc_options_iname = -pc_type
# petsc_options_value = lu
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 101 preonly lu 5'
l_max_its = 100
l_tol = 1e-04
nl_rel_tol = 1e-09
nl_abs_tol = 1e-11
num_steps = 2
dt = 0.1
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/mortar_cartesian_lms/frictionless-mortar-3d.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
second_order = false
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[lm_z]
block = 'secondary_lower'
use_dual = true
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapCartesianLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
lm_z = lm_z
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
correct_edge_dropping = true
c = 1e+02
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_z]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_z
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Preconditioning]
[vcp]
type = VCP
full = true
lm_variable = 'lm_x lm_y lm_z'
primary_variable = 'disp_x disp_y disp_z'
preconditioner = 'LU'
is_lm_coupling_diagonal = true
adaptive_condensation = true
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = .5
dtmin = .01
solve_type = 'NEWTON'
petsc_options_iname = '-mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = '1e-5 NONZERO 1e-10'
l_max_its = 100
nl_max_its = 30
# nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
perf_graph = true
exodus = true
csv = true
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = lm_z
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = lm_z
sort_by = 'id'
execute_on = NONLINEAR
[]
[]
(modules/optimization/test/tests/optimizationreporter/general_opt/point_loads_gen_opt/forward.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 1.4
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = temperature
x_coord_name = 'point_source/x'
y_coord_name = 'point_source/y'
z_coord_name = 'point_source/z'
value_name = 'point_source/value'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temperature
boundary = left
value = 300
[]
[right]
type = DirichletBC
variable = temperature
boundary = right
value = 300
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 300
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 300
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-6
nl_rel_tol = 1e-8
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[VectorPostprocessors]
[point_source]
type = ConstantVectorPostprocessor
vector_names = 'x y z value'
value = '0.2 0.7 0.4;
0.2 0.56 1;
0 0 0;
-1000 120 500'
execute_on = LINEAR
[]
[vertical]
type = LineValueSampler
variable = 'temperature'
start_point = '0.5 0 0'
end_point = '0.5 1.4 0'
num_points = 21
sort_by = y
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
objective_name = misfit_norm
measurement_points = ${measurement_points}
measurement_values = ${measurement_values}
[]
[]
[Outputs]
console = false
file_base = 'forward'
[]
(modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
second_order = false
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[mortar_normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
[]
[]
[Constraints]
[normal_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = .5
dtmin = .01
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15 1e-5'
l_max_its = 100
nl_max_its = 30
# nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = mortar_normal_lm
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_normal_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[]
(test/tests/misc/rename-parameters/rename-mat-prop.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
nx = 20
dim = 1
[]
[]
[Variables]
[u][]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = 2
[]
[rxn]
type = RenamedMatReaction
variable = u
reaction_coefficient = 'rxn_coeff'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 1
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Materials]
[diff]
type = GenericConstantMaterial
prop_names = 'rxn_coeff'
prop_values = '-2'
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[avg_u]
type = ElementAverageValue
variable = u
[]
[]
[Outputs]
csv = true
[]
(modules/optimization/test/tests/outputs/exodus_optimization_steady/adjoint_iteration_output.i)
[Mesh]
[]
[Variables]
[adjointVar]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = adjointVar
diffusivity = thermal_conductivity
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = adjointVar
x_coord_name = misfit/measurement_xcoord
y_coord_name = misfit/measurement_ycoord
z_coord_name = misfit/measurement_zcoord
value_name = misfit/misfit_values
[]
[]
[Reporters]
[misfit]
type = OptimizationData
[]
[params]
type = ConstantReporter
real_vector_names = 'p1'
real_vector_values = '0' # Dummy value
[]
[]
[AuxVariables]
[temperature_forward]
[]
[]
[BCs]
[left]
type = NeumannBC
variable = adjointVar
boundary = left
value = 0
[]
[right]
type = NeumannBC
variable = adjointVar
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = adjointVar
boundary = bottom
value = 0
[]
[top]
type = DirichletBC
variable = adjointVar
boundary = top
value = 0
[]
[]
[Functions]
[thermo_conduct]
type = ParsedOptimizationFunction
expression = 'alpha'
param_symbol_names = 'alpha'
param_vector_name = 'params/p1'
[]
[]
[Materials]
[thermalProp]
type = GenericFunctionMaterial
prop_names = 'thermal_conductivity'
prop_values = 'thermo_conduct'
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'preonly lu superlu_dist'
[]
[VectorPostprocessors]
[adjoint_grad]
type = ElementOptimizationDiffusionCoefFunctionInnerProduct
variable = adjointVar
forward_variable = temperature_forward
function = thermo_conduct
[]
[]
[Outputs]
console = false
file_base = 'adjoint'
[exodus]
type = ExodusOptimizationSteady
execute_on = 'TIMESTEP_END'
[]
[]
(test/tests/materials/interface_material/interface_value_material_noIK.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
elem_type = QUAD4
[]
[./subdomain_id]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1 0 0'
top_right = '2 2 0'
block_id = 1
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain_id
primary_block = '0'
paired_block = '1'
new_boundary = 'interface'
[../]
[]
[Variables]
[./u]
block = 0
[../]
[./v]
block = 1
[../]
[]
[Kernels]
[./diff]
type = MatDiffusion
variable = u
diffusivity = 'diffusivity'
block = 0
[../]
[./diff_v]
type = MatDiffusion
variable = v
diffusivity = 'diffusivity'
block = 1
[../]
[]
[BCs]
[u_left]
type = DirichletBC
boundary = 'left'
variable = u
value = 1
[]
[v_right]
type = DirichletBC
boundary = 'right'
variable = v
value = 0
[]
[]
[Materials]
[./stateful1]
type = StatefulMaterial
block = 0
initial_diffusivity = 1
# outputs = all
[../]
[./stateful2]
type = StatefulMaterial
block = 1
initial_diffusivity = 2
# outputs = all
[../]
[./interface_material_avg]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = average
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
[../]
[./interface_material_jump_primary_minus_secondary]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = jump_primary_minus_secondary
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
[../]
[./interface_material_jump_secondary_minus_primary]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = jump_secondary_minus_primary
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
[../]
[./interface_material_jump_abs]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = jump_abs
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
[../]
[./interface_material_primary]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = primary
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
[../]
[./interface_material_secondary]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
mat_prop_var_out_basename = diff_var
boundary = interface
interface_value_type = secondary
nl_var_primary = u
nl_var_secondary = v
[../]
[]
[AuxKernels]
[./interface_material_avg]
type = MaterialRealAux
property = diff_average
variable = diffusivity_average
boundary = interface
[]
[./interface_material_jump_primary_minus_secondary]
type = MaterialRealAux
property = diff_jump_primary_minus_secondary
variable = diffusivity_jump_primary_minus_secondary
boundary = interface
[]
[./interface_material_jump_secondary_minus_primary]
type = MaterialRealAux
property = diff_jump_secondary_minus_primary
variable = diffusivity_jump_secondary_minus_primary
boundary = interface
[]
[./interface_material_jump_abs]
type = MaterialRealAux
property = diff_jump_abs
variable = diffusivity_jump_abs
boundary = interface
[]
[./interface_material_primary]
type = MaterialRealAux
property = diff_primary
variable = diffusivity_primary
boundary = interface
[]
[./interface_material_secondary]
type = MaterialRealAux
property = diff_secondary
variable = diffusivity_secondary
boundary = interface
[]
[diffusivity_var]
type = MaterialRealAux
property = diffusivity
variable = diffusivity_var
[]
[]
[AuxVariables]
[diffusivity_var]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_average]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_jump_primary_minus_secondary]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_jump_secondary_minus_primary]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_jump_abs]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_primary]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_secondary]
family = MONOMIAL
order = CONSTANT
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d_pg.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[mortar_normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[aux_lm]
block = 'secondary_lower'
use_dual = false
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_petrov_galerkin = true
aux_lm = aux_lm
[]
[]
[Constraints]
[normal_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = .5
dtmin = .01
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15 1e-5'
l_max_its = 100
nl_max_its = 30
nl_abs_tol = 1e-12
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[contact]
type = ContactDOFSetSize
variable = mortar_normal_lm
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[lambda]
type = ElementAverageValue
variable = mortar_normal_lm
block = 'secondary_lower'
[]
[]
(modules/contact/test/tests/bouncing-block-contact/frictional-nodal-min-normal-lm-mortar-pdass-tangential-lm-mortar-disp.i)
starting_point = 2e-1
# We offset slightly so we avoid the case where the bottom of the secondary block and the top of the
# primary block are perfectly vertically aligned which can cause the backtracking line search some
# issues for a coarse mesh (basic line search handles that fine)
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
[file_mesh]
type = FileMeshGenerator
file = long-bottom-block-1elem-blocks-coarse.e
[]
[]
[Variables]
[disp_x]
block = '1 2'
# order = SECOND
[]
[disp_y]
block = '1 2'
# order = SECOND
[]
[frictional_normal_lm]
block = 3
use_dual = true
[]
[frictional_tangential_lm]
block = 3
use_dual = true
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[UserObjects]
[weighted_velocities_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable_normal = frictional_normal_lm
lm_variable_tangential_one = frictional_tangential_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[frictional_normal_lm]
type = ComputeFrictionalForceLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_normal_lm
friction_lm = frictional_tangential_lm
disp_x = disp_x
disp_y = disp_y
mu = 0.1
c = 1.0e-2
c_t = 1.0e-1
weighted_gap_uo = weighted_velocities_uo
weighted_velocities_uo = weighted_velocities_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_velocities_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_velocities_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_velocities_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_velocities_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[]
(modules/contact/test/tests/bouncing-block-contact/tied-nodes.i)
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
[]
[Mesh]
file = long-bottom-block-symmetric-single-element.e
[]
[Variables]
[./disp_x]
scaling = 2
[../]
[./disp_y]
scaling = 3
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[Constraints]
[./disp_x]
type = RANFSTieNode
secondary = 10
primary = 20
variable = disp_x
primary_variable = disp_x
component = x
[../]
[./disp_y]
type = RANFSTieNode
secondary = 10
primary = 20
variable = disp_y
primary_variable = disp_y
component = y
[../]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[../]
[./topy]
type = DirichletBC
variable = disp_y
boundary = 30
value = 0
[../]
[./topx]
type = DirichletBC
variable = disp_x
boundary = 30
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dtmin = 1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exo]
type = Exodus
[]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[]
(modules/combined/examples/publications/rapid_dev/fig6.i)
#
# Fig. 6 input for 10.1016/j.commatsci.2017.02.017
# D. Schwen et al./Computational Materials Science 132 (2017) 36-45
# Three phase interface simulation demonstrating the interfacial stability
# w.r.t. formation of a tspurious third phase
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 120
ny = 120
nz = 0
xmin = 0
xmax = 40
ymin = 0
ymax = 40
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
# concentration
[./c]
[../]
# order parameter 1
[./eta1]
[../]
# order parameter 2
[./eta2]
[../]
# order parameter 3
[./eta3]
[../]
# phase concentration 1
[./c1]
initial_condition = 0.4
[../]
# phase concentration 2
[./c2]
initial_condition = 0.5
[../]
# phase concentration 3
[./c3]
initial_condition = 0.8
[../]
# Lagrange multiplier
[./lambda]
initial_condition = 0.0
[../]
[]
[AuxVariables]
[./T]
[./InitialCondition]
type = FunctionIC
function = 'x-10'
[../]
[../]
[]
[Functions]
[./ic_func_eta1]
type = ParsedFunction
expression = '0.5*(1.0+tanh((x-10)/sqrt(2.0))) * 0.5*(1.0+tanh((y-10)/sqrt(2.0)))'
[../]
[./ic_func_eta2]
type = ParsedFunction
expression = '0.5*(1.0-tanh((x-10)/sqrt(2.0)))'
[../]
[./ic_func_eta3]
type = ParsedFunction
expression = '1 - 0.5*(1.0-tanh((x-10)/sqrt(2.0)))
- 0.5*(1.0+tanh((x-10)/sqrt(2.0))) * 0.5*(1.0+tanh((y-10)/sqrt(2.0)))'
[../]
[./ic_func_c]
type = ParsedFunction
expression = '0.5 * 0.5*(1.0-tanh((x-10)/sqrt(2.0)))
+ 0.4 * 0.5*(1.0+tanh((x-10)/sqrt(2.0))) * 0.5*(1.0+tanh((y-10)/sqrt(2.0)))
+ 0.8 * (1 - 0.5*(1.0-tanh((x-10)/sqrt(2.0)))
- 0.5*(1.0+tanh((x-10)/sqrt(2.0))) * 0.5*(1.0+tanh((y-10)/sqrt(2.0))))'
[../]
[]
[ICs]
[./eta1]
variable = eta1
type = FunctionIC
function = ic_func_eta1
[../]
[./eta2]
variable = eta2
type = FunctionIC
function = ic_func_eta2
[../]
[./eta3]
variable = eta3
type = FunctionIC
function = ic_func_eta3
[../]
[./c]
variable = c
type = FunctionIC
function = ic_func_c
[../]
[]
[Materials]
# simple toy free energies
[./f1]
type = DerivativeParsedMaterial
property_name = F1
coupled_variables = 'c1'
expression = '20*(c1-0.4)^2'
[../]
[./f2]
type = DerivativeParsedMaterial
property_name = F2
coupled_variables = 'c2 T'
expression = '20*(c2-0.5)^2 + 0.01*T'
[../]
[./f3]
type = DerivativeParsedMaterial
property_name = F3
coupled_variables = 'c3'
expression = '20*(c3-0.8)^2'
[../]
# Switching functions for each phase
# h1(eta1, eta2, eta3)
[./h1]
type = SwitchingFunction3PhaseMaterial
eta_i = eta1
eta_j = eta2
eta_k = eta3
f_name = h1
[../]
# h2(eta1, eta2, eta3)
[./h2]
type = SwitchingFunction3PhaseMaterial
eta_i = eta2
eta_j = eta3
eta_k = eta1
f_name = h2
[../]
# h3(eta1, eta2, eta3)
[./h3]
type = SwitchingFunction3PhaseMaterial
eta_i = eta3
eta_j = eta1
eta_k = eta2
f_name = h3
[../]
# Coefficients for diffusion equation
[./Dh1]
type = DerivativeParsedMaterial
material_property_names = 'D h1'
expression = D*h1
property_name = Dh1
[../]
[./Dh2]
type = DerivativeParsedMaterial
material_property_names = 'D h2'
expression = D*h2
property_name = Dh2
[../]
[./Dh3]
type = DerivativeParsedMaterial
material_property_names = 'D h3'
expression = D*h3
property_name = Dh3
[../]
# Barrier functions for each phase
[./g1]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta1
function_name = g1
[../]
[./g2]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta2
function_name = g2
[../]
[./g3]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta3
function_name = g3
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'L kappa D'
prop_values = '1.0 1.0 1'
[../]
[]
[Kernels]
#Kernels for diffusion equation
[./diff_time]
type = TimeDerivative
variable = c
[../]
[./diff_c1]
type = MatDiffusion
variable = c
diffusivity = Dh1
v = c1
[../]
[./diff_c2]
type = MatDiffusion
variable = c
diffusivity = Dh2
v = c2
[../]
[./diff_c3]
type = MatDiffusion
variable = c
diffusivity = Dh3
v = c3
[../]
# Kernels for Allen-Cahn equation for eta1
[./deta1dt]
type = TimeDerivative
variable = eta1
[../]
[./ACBulkF1]
type = KKSMultiACBulkF
variable = eta1
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g1
eta_i = eta1
wi = 1.0
args = 'c1 c2 c3 eta2 eta3'
[../]
[./ACBulkC1]
type = KKSMultiACBulkC
variable = eta1
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta1
args = 'eta2 eta3'
[../]
[./ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa
[../]
[./multipler1]
type = MatReaction
variable = eta1
v = lambda
mob_name = L
[../]
# Kernels for Allen-Cahn equation for eta2
[./deta2dt]
type = TimeDerivative
variable = eta2
[../]
[./ACBulkF2]
type = KKSMultiACBulkF
variable = eta2
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g2
eta_i = eta2
wi = 1.0
args = 'c1 c2 c3 eta1 eta3'
[../]
[./ACBulkC2]
type = KKSMultiACBulkC
variable = eta2
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta2
args = 'eta1 eta3'
[../]
[./ACInterface2]
type = ACInterface
variable = eta2
kappa_name = kappa
[../]
[./multipler2]
type = MatReaction
variable = eta2
v = lambda
mob_name = L
[../]
# Kernels for the Lagrange multiplier equation
[./mult_lambda]
type = MatReaction
variable = lambda
mob_name = 3
[../]
[./mult_ACBulkF_1]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g1
eta_i = eta1
wi = 1.0
mob_name = 1
args = 'c1 c2 c3 eta2 eta3'
[../]
[./mult_ACBulkC_1]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta1
args = 'eta2 eta3'
mob_name = 1
[../]
[./mult_CoupledACint_1]
type = SimpleCoupledACInterface
variable = lambda
v = eta1
kappa_name = kappa
mob_name = 1
[../]
[./mult_ACBulkF_2]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g2
eta_i = eta2
wi = 1.0
mob_name = 1
args = 'c1 c2 c3 eta1 eta3'
[../]
[./mult_ACBulkC_2]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta2
args = 'eta1 eta3'
mob_name = 1
[../]
[./mult_CoupledACint_2]
type = SimpleCoupledACInterface
variable = lambda
v = eta2
kappa_name = kappa
mob_name = 1
[../]
[./mult_ACBulkF_3]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g3
eta_i = eta3
wi = 1.0
mob_name = 1
args = 'c1 c2 c3 eta1 eta2'
[../]
[./mult_ACBulkC_3]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta3
args = 'eta1 eta2'
mob_name = 1
[../]
[./mult_CoupledACint_3]
type = SimpleCoupledACInterface
variable = lambda
v = eta3
kappa_name = kappa
mob_name = 1
[../]
# Kernels for constraint equation eta1 + eta2 + eta3 = 1
# eta3 is the nonlinear variable for the constraint equation
[./eta3reaction]
type = MatReaction
variable = eta3
mob_name = 1
[../]
[./eta1reaction]
type = MatReaction
variable = eta3
v = eta1
mob_name = 1
[../]
[./eta2reaction]
type = MatReaction
variable = eta3
v = eta2
mob_name = 1
[../]
[./one]
type = BodyForce
variable = eta3
value = -1.0
[../]
# Phase concentration constraints
[./chempot12]
type = KKSPhaseChemicalPotential
variable = c1
cb = c2
fa_name = F1
fb_name = F2
[../]
[./chempot23]
type = KKSPhaseChemicalPotential
variable = c2
cb = c3
fa_name = F2
fb_name = F3
[../]
[./phaseconcentration]
type = KKSMultiPhaseConcentration
variable = c3
cj = 'c1 c2 c3'
hj_names = 'h1 h2 h3'
etas = 'eta1 eta2 eta3'
c = c
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm ilu nonzero'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-11
num_steps = 1000
[./TimeStepper]
type = IterationAdaptiveDT
dt = 0.2
optimal_iterations = 10
iteration_window = 2
[../]
[]
[Preconditioning]
active = 'full'
[./full]
type = SMP
full = true
[../]
[./mydebug]
type = FDP
full = true
[../]
[]
[Outputs]
exodus = true
checkpoint = true
print_linear_residuals = false
[./csv]
type = CSV
execute_on = 'final'
[../]
[]
#[VectorPostprocessors]
# [./c]
# type = LineValueSampler
# start_point = '-25 0 0'
# end_point = '25 0 0'
# variable = c
# num_points = 151
# sort_by = id
# execute_on = timestep_end
# [../]
# [./eta1]
# type = LineValueSampler
# start_point = '-25 0 0'
# end_point = '25 0 0'
# variable = eta1
# num_points = 151
# sort_by = id
# execute_on = timestep_end
# [../]
# [./eta2]
# type = LineValueSampler
# start_point = '-25 0 0'
# end_point = '25 0 0'
# variable = eta2
# num_points = 151
# sort_by = id
# execute_on = timestep_end
# [../]
# [./eta3]
# type = LineValueSampler
# start_point = '-25 0 0'
# end_point = '25 0 0'
# variable = eta3
# num_points = 151
# sort_by = id
# execute_on = timestep_end
# [../]
#[]
(test/tests/materials/interface_material/interface_value_material_split_mesh.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
elem_type = QUAD4
[]
[./subdomain_id]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1 0 0'
top_right = '2 2 0'
block_id = 1
[../]
[./split]
type = BreakMeshByBlockGenerator
input = subdomain_id
[../]
[]
[Variables]
[./u]
block = 0
[../]
[./v]
block = 1
[../]
[]
[Kernels]
[./diff]
type = MatDiffusion
variable = u
diffusivity = 'diffusivity'
block = 0
[../]
[./diff_v]
type = MatDiffusion
variable = v
diffusivity = 'diffusivity'
block = 1
[../]
[]
[InterfaceKernels]
[tied]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
jump_prop_name = "average_jump"
penalty = 1e6
boundary = 'interface'
[]
[]
[BCs]
[u_left]
type = DirichletBC
boundary = 'left'
variable = u
value = 1
[]
[v_right]
type = DirichletBC
boundary = 'right'
variable = v
value = 0
[]
[]
[Materials]
[./stateful1]
type = StatefulMaterial
block = 0
initial_diffusivity = 1
# outputs = all
[../]
[./stateful2]
type = StatefulMaterial
block = 1
initial_diffusivity = 2
# outputs = all
[../]
[./interface_material_avg]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = average
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
[../]
[./interface_material_jump_primary_minus_secondary]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = jump_primary_minus_secondary
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
[../]
[./interface_material_jump_secondary_minus_primary]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = jump_secondary_minus_primary
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
[../]
[./interface_material_jump_abs]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = jump_abs
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
[../]
[./interface_material_primary]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = primary
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
[../]
[./interface_material_secondary]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
mat_prop_var_out_basename = diff_var
boundary = interface
interface_value_type = secondary
nl_var_primary = u
nl_var_secondary = v
[../]
[]
[AuxKernels]
[./interface_material_avg]
type = MaterialRealAux
property = diff_average
variable = diffusivity_average
boundary = interface
[]
[./interface_material_jump_primary_minus_secondary]
type = MaterialRealAux
property = diff_jump_primary_minus_secondary
variable = diffusivity_jump_primary_minus_secondary
boundary = interface
[]
[./interface_material_jump_secondary_minus_primary]
type = MaterialRealAux
property = diff_jump_secondary_minus_primary
variable = diffusivity_jump_secondary_minus_primary
boundary = interface
[]
[./interface_material_jump_abs]
type = MaterialRealAux
property = diff_jump_abs
variable = diffusivity_jump_abs
boundary = interface
[]
[./interface_material_primary]
type = MaterialRealAux
property = diff_primary
variable = diffusivity_primary
boundary = interface
[]
[./interface_material_secondary]
type = MaterialRealAux
property = diff_secondary
variable = diffusivity_secondary
boundary = interface
[]
[diffusivity_var]
type = MaterialRealAux
property = diffusivity
variable = diffusivity_var
[]
[]
[AuxVariables]
[diffusivity_var]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_average]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_jump_primary_minus_secondary]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_jump_secondary_minus_primary]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_jump_abs]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_primary]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_secondary]
family = MONOMIAL
order = CONSTANT
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(modules/optimization/test/tests/optimizationreporter/bc_load_linearFunction/forward.i)
[Mesh]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[]
[BCs]
[left]
type = FunctionNeumannBC
variable = temperature
boundary = left
function = left_function
[]
[right]
type = FunctionNeumannBC
variable = temperature
boundary = right
function = right_function
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 200
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 100
[]
[]
[Functions]
[left_function]
type = ParsedOptimizationFunction
expression = 'a + b*y'
param_symbol_names = 'a b'
param_vector_name = 'params_left/vals'
[]
[right_function]
type = ParsedOptimizationFunction
expression = 'a'
param_symbol_names = 'a'
param_vector_name = 'params_right/vals'
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
line_search = none
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'preonly lu superlu_dist'
[]
[VectorPostprocessors]
[vertical_1]
type = LineValueSampler
variable = 'temperature'
start_point = '0.2 0.0 0'
end_point = '0.2 2.0 0'
num_points = 21
sort_by = y
[]
[vertical_2]
type = LineValueSampler
variable = 'temperature'
start_point = '0.8 0.0 0'
end_point = '0.8 2.0 0'
num_points = 21
sort_by = y
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
variable_weight_names = weightForTemperature
[]
[params_left]
type = ConstantReporter
real_vector_names = 'vals'
real_vector_values = '0 0' # Dummy
[]
[params_right]
type = ConstantReporter
real_vector_names = 'vals'
real_vector_values = '0' # Dummy
[]
[]
[Outputs]
console = false
exodus = false
file_base = 'forward'
[]
(modules/phase_field/examples/slkks/CrFe.i)
#
# SLKKS two phase example for the BCC and SIGMA phases. The sigma phase contains
# multiple sublattices. Free energy from
# Jacob, Aurelie, Erwin Povoden-Karadeniz, and Ernst Kozeschnik. "Revised thermodynamic
# description of the Fe-Cr system based on an improved sublattice model of the sigma phase."
# Calphad 60 (2018): 16-28.
#
# In this simulation we consider diffusion (Cahn-Hilliard) and phase transformation.
#
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 160
ny = 1
nz = 0
xmin = -25
xmax = 25
ymin = -2.5
ymax = 2.5
elem_type = QUAD4
[]
[]
[AuxVariables]
[Fglobal]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[sigma_cr0]
type = PiecewiseLinear
data_file = CrFe_sigma_out_var_0001.csv
format = columns
x_index_in_file = 5
y_index_in_file = 2
xy_in_file_only = false
[]
[sigma_cr1]
type = PiecewiseLinear
data_file = CrFe_sigma_out_var_0001.csv
format = columns
x_index_in_file = 5
y_index_in_file = 3
xy_in_file_only = false
[]
[sigma_cr2]
type = PiecewiseLinear
data_file = CrFe_sigma_out_var_0001.csv
format = columns
x_index_in_file = 5
y_index_in_file = 4
xy_in_file_only = false
[]
[]
[Variables]
# order parameters
[eta1]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
[eta2]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
# solute concentration
[cCr]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = '(x+25)/50*0.5+0.1'
[]
[]
# sublattice concentrations
[BCC_CR]
initial_condition = 0.45
[]
[SIGMA_0CR]
[InitialCondition]
type = CoupledValueFunctionIC
function = sigma_cr0
v = cCr
variable = SIGMA_0CR
[]
[]
[SIGMA_1CR]
[InitialCondition]
type = CoupledValueFunctionIC
function = sigma_cr1
v = cCr
variable = SIGMA_1CR
[]
[]
[SIGMA_2CR]
[InitialCondition]
type = CoupledValueFunctionIC
function = sigma_cr2
v = cCr
variable = SIGMA_2CR
[]
[]
# Lagrange multiplier
[lambda]
[]
[]
[Materials]
# CALPHAD free energies
[F_BCC_A2]
type = DerivativeParsedMaterial
property_name = F_BCC_A2
outputs = exodus
output_properties = F_BCC_A2
expression = 'BCC_FE:=1-BCC_CR; G := 8.3145*T*(1.0*if(BCC_CR > 1.0e-15,BCC_CR*log(BCC_CR),0) + '
'1.0*if(BCC_FE > 1.0e-15,BCC_FE*plog(BCC_FE,eps),0) + 3.0*if(BCC_VA > '
'1.0e-15,BCC_VA*log(BCC_VA),0))/(BCC_CR + BCC_FE) + 8.3145*T*if(T < '
'548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + '
'311.5*BCC_CR*BCC_VA - '
'1043.0*BCC_FE*BCC_VA,-8.13674105561218e-49*T^15/(0.525599232981783*BCC_CR*BCC_FE*BCC_'
'VA*(BCC_CR - BCC_FE) - 0.894055608820709*BCC_CR*BCC_FE*BCC_VA + '
'0.298657718120805*BCC_CR*BCC_VA - BCC_FE*BCC_VA + 9.58772770853308e-13)^15 - '
'4.65558036243985e-30*T^9/(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^9 - '
'1.3485349181899e-10*T^3/(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^3 + 1 - '
'0.905299382744392*(548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'932.5*BCC_CR*BCC_FE*BCC_VA + 311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA + '
'1.0e-9)/T,if(T < -548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'932.5*BCC_CR*BCC_FE*BCC_VA - 311.5*BCC_CR*BCC_VA + '
'1043.0*BCC_FE*BCC_VA,-8.13674105561218e-49*T^15/(-0.525599232981783*BCC_CR*BCC_FE*BCC'
'_VA*(BCC_CR - BCC_FE) + 0.894055608820709*BCC_CR*BCC_FE*BCC_VA - '
'0.298657718120805*BCC_CR*BCC_VA + BCC_FE*BCC_VA + 9.58772770853308e-13)^15 - '
'4.65558036243985e-30*T^9/(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) '
'+ 0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^9 - '
'1.3485349181899e-10*T^3/(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^3 + 1 - '
'0.905299382744392*(-548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'932.5*BCC_CR*BCC_FE*BCC_VA - 311.5*BCC_CR*BCC_VA + 1043.0*BCC_FE*BCC_VA + '
'1.0e-9)/T,if(T > -548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'932.5*BCC_CR*BCC_FE*BCC_VA - 311.5*BCC_CR*BCC_VA + 1043.0*BCC_FE*BCC_VA & '
'548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + '
'311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA < '
'0,-79209031311018.7*(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^5/T^5 - '
'3.83095660520737e+42*(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^15/T^15 - '
'1.22565886734485e+72*(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^25/T^25,if(T > '
'548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + '
'311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA & 548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - '
'BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + 311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA > '
'0,-79209031311018.7*(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^5/T^5 - '
'3.83095660520737e+42*(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^15/T^15 - '
'1.22565886734485e+72*(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^25/T^25,0))))*log((2.15*BCC_CR*BCC_FE*BCC_VA - '
'0.008*BCC_CR*BCC_VA + 2.22*BCC_FE*BCC_VA)*if(2.15*BCC_CR*BCC_FE*BCC_VA - '
'0.008*BCC_CR*BCC_VA + 2.22*BCC_FE*BCC_VA <= 0,-1.0,1.0) + 1)/(BCC_CR + BCC_FE) + '
'1.0*(BCC_CR*BCC_VA*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + '
'BCC_FE*BCC_VA*if(T >= 298.15 & T < 1811.0,77358.5*1/T - 23.5143*T*log(T) + 124.134*T '
'- 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= 1811.0 & T < '
'6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - 25383.581,0)))/(BCC_CR '
'+ BCC_FE) + 1.0*(BCC_CR*BCC_FE*BCC_VA*(500.0 - 1.5*T)*(BCC_CR - BCC_FE) + '
'BCC_CR*BCC_FE*BCC_VA*(24600.0 - 14.98*T) + BCC_CR*BCC_FE*BCC_VA*(9.15*T - '
'14000.0)*(BCC_CR - BCC_FE)^2)/(BCC_CR + BCC_FE); G/100000'
coupled_variables = 'BCC_CR'
constant_names = 'BCC_VA T eps'
constant_expressions = '1 1000 0.01'
[]
[F_SIGMA]
type = DerivativeParsedMaterial
property_name = F_SIGMA
outputs = exodus
output_properties = F_SIGMA
expression = 'SIGMA_0FE := 1-SIGMA_0CR; SIGMA_1FE := 1-SIGMA_1CR; SIGMA_2FE := 1-SIGMA_2CR; G := '
'8.3145*T*(10.0*if(SIGMA_0CR > 1.0e-15,SIGMA_0CR*plog(SIGMA_0CR,eps),0) + '
'10.0*if(SIGMA_0FE > 1.0e-15,SIGMA_0FE*plog(SIGMA_0FE,eps),0) + 4.0*if(SIGMA_1CR > '
'1.0e-15,SIGMA_1CR*plog(SIGMA_1CR,eps),0) + 4.0*if(SIGMA_1FE > '
'1.0e-15,SIGMA_1FE*plog(SIGMA_1FE,eps),0) + 16.0*if(SIGMA_2CR > '
'1.0e-15,SIGMA_2CR*plog(SIGMA_2CR,eps),0) + 16.0*if(SIGMA_2FE > '
'1.0e-15,SIGMA_2FE*plog(SIGMA_2FE,eps),0))/(10.0*SIGMA_0CR + 10.0*SIGMA_0FE + '
'4.0*SIGMA_1CR + 4.0*SIGMA_1FE + 16.0*SIGMA_2CR + 16.0*SIGMA_2FE) + '
'(SIGMA_0FE*SIGMA_1CR*SIGMA_2CR*SIGMA_2FE*(-70.0*T - 170400.0) + '
'SIGMA_0FE*SIGMA_1FE*SIGMA_2CR*SIGMA_2FE*(-10.0*T - 330839.0))/(10.0*SIGMA_0CR + '
'10.0*SIGMA_0FE + 4.0*SIGMA_1CR + 4.0*SIGMA_1FE + 16.0*SIGMA_2CR + 16.0*SIGMA_2FE) + '
'(SIGMA_0CR*SIGMA_1CR*SIGMA_2CR*(30.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - '
'26.908*T*log(T) + 157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= '
'2180.0 & T < 6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) '
'+ 132000.0) + SIGMA_0CR*SIGMA_1CR*SIGMA_2FE*(-110.0*T + 16.0*if(T >= 298.15 & T < '
'1811.0,77358.5*1/T - 23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - '
'5.89269e-8*T^3.0 + 1225.7,if(T >= 1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - '
'46.0*T*log(T) + 299.31255*T - 25383.581,0)) + 14.0*if(T >= 298.15 & T < '
'2180.0,139250.0*1/T - 26.908*T*log(T) + 157.48*T + 0.00189435*T^2.0 - '
'1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < 6000.0,-2.88526e+32*T^(-9.0) - '
'50.0*T*log(T) + 344.18*T - 34869.344,0)) + 123500.0) + '
'SIGMA_0CR*SIGMA_1FE*SIGMA_2CR*(4.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 26.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 140486.0) '
'+ SIGMA_0CR*SIGMA_1FE*SIGMA_2FE*(20.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 10.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 148800.0) '
'+ SIGMA_0FE*SIGMA_1CR*SIGMA_2CR*(10.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 20.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 56200.0) + '
'SIGMA_0FE*SIGMA_1CR*SIGMA_2FE*(26.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 4.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 152700.0) '
'+ SIGMA_0FE*SIGMA_1FE*SIGMA_2CR*(14.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 16.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 46200.0) + '
'SIGMA_0FE*SIGMA_1FE*SIGMA_2FE*(30.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 173333.0))/(10.0*SIGMA_0CR + 10.0*SIGMA_0FE + 4.0*SIGMA_1CR + '
'4.0*SIGMA_1FE + 16.0*SIGMA_2CR + 16.0*SIGMA_2FE); G/100000'
coupled_variables = 'SIGMA_0CR SIGMA_1CR SIGMA_2CR'
constant_names = 'T eps'
constant_expressions = '1000 0.01'
[]
# h(eta)
[h1]
type = SwitchingFunctionMaterial
function_name = h1
h_order = HIGH
eta = eta1
[]
[h2]
type = SwitchingFunctionMaterial
function_name = h2
h_order = HIGH
eta = eta2
[]
# g(eta)
[g1]
type = BarrierFunctionMaterial
function_name = g1
g_order = SIMPLE
eta = eta1
[]
[g2]
type = BarrierFunctionMaterial
function_name = g2
g_order = SIMPLE
eta = eta2
[]
# constant properties
[constants]
type = GenericConstantMaterial
prop_names = 'D L kappa'
prop_values = '10 1 0.1 '
[]
# Coefficients for diffusion equation
[Dh1]
type = DerivativeParsedMaterial
material_property_names = 'D h1(eta1)'
expression = D*h1
property_name = Dh1
coupled_variables = eta1
derivative_order = 1
[]
[Dh2a]
type = DerivativeParsedMaterial
material_property_names = 'D h2(eta2)'
expression = D*h2*10/30
property_name = Dh2a
coupled_variables = eta2
derivative_order = 1
[]
[Dh2b]
type = DerivativeParsedMaterial
material_property_names = 'D h2(eta2)'
expression = D*h2*4/30
property_name = Dh2b
coupled_variables = eta2
derivative_order = 1
[]
[Dh2c]
type = DerivativeParsedMaterial
material_property_names = 'D h2(eta2)'
expression = D*h2*16/30
property_name = Dh2c
coupled_variables = eta2
derivative_order = 1
[]
[]
[Kernels]
#Kernels for diffusion equation
[diff_time]
type = TimeDerivative
variable = cCr
[]
[diff_c1]
type = MatDiffusion
variable = cCr
diffusivity = Dh1
v = BCC_CR
coupled_variables = eta1
[]
[diff_c2a]
type = MatDiffusion
variable = cCr
diffusivity = Dh2a
v = SIGMA_0CR
coupled_variables = eta2
[]
[diff_c2b]
type = MatDiffusion
variable = cCr
diffusivity = Dh2b
v = SIGMA_1CR
coupled_variables = eta2
[]
[diff_c2c]
type = MatDiffusion
variable = cCr
diffusivity = Dh2c
v = SIGMA_2CR
coupled_variables = eta2
[]
# enforce pointwise equality of chemical potentials
[chempot1a2a]
# The BCC phase has only one sublattice
# we tie it to the first sublattice with site fraction 10/(10+4+16) in the sigma phase
type = KKSPhaseChemicalPotential
variable = BCC_CR
cb = SIGMA_0CR
kb = '${fparse 10/30}'
fa_name = F_BCC_A2
fb_name = F_SIGMA
args_b = 'SIGMA_1CR SIGMA_2CR'
[]
[chempot2a2b]
# This kernel ties the first two sublattices in the sigma phase together
type = SLKKSChemicalPotential
variable = SIGMA_0CR
a = 10
cs = SIGMA_1CR
as = 4
F = F_SIGMA
coupled_variables = 'SIGMA_2CR'
[]
[chempot2b2c]
# This kernel ties the remaining two sublattices in the sigma phase together
type = SLKKSChemicalPotential
variable = SIGMA_1CR
a = 4
cs = SIGMA_2CR
as = 16
F = F_SIGMA
coupled_variables = 'SIGMA_0CR'
[]
[phaseconcentration]
# This kernel ties the sum of the sublattice concentrations to the global concentration cCr
type = SLKKSMultiPhaseConcentration
variable = SIGMA_2CR
c = cCr
ns = '1 3'
as = '1 10 4 16'
cs = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR'
h_names = 'h1 h2'
eta = 'eta1 eta2'
[]
# Kernels for Allen-Cahn equation for eta1
[deta1dt]
type = TimeDerivative
variable = eta1
[]
[ACBulkF1]
type = KKSMultiACBulkF
variable = eta1
Fj_names = 'F_BCC_A2 F_SIGMA'
hj_names = 'h1 h2'
gi_name = g1
eta_i = eta1
wi = 0.1
coupled_variables = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR eta2'
[]
[ACBulkC1]
type = SLKKSMultiACBulkC
variable = eta1
F = F_BCC_A2
c = BCC_CR
ns = '1 3'
as = '1 10 4 16'
cs = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR'
h_names = 'h1 h2'
eta = 'eta1 eta2'
[]
[ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa
[]
[lagrange1]
type = SwitchingFunctionConstraintEta
variable = eta1
h_name = h1
lambda = lambda
coupled_variables = 'eta2'
[]
# Kernels for Allen-Cahn equation for eta1
[deta2dt]
type = TimeDerivative
variable = eta2
[]
[ACBulkF2]
type = KKSMultiACBulkF
variable = eta2
Fj_names = 'F_BCC_A2 F_SIGMA'
hj_names = 'h1 h2'
gi_name = g2
eta_i = eta2
wi = 0.1
coupled_variables = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR eta1'
[]
[ACBulkC2]
type = SLKKSMultiACBulkC
variable = eta2
F = F_BCC_A2
c = BCC_CR
ns = '1 3'
as = '1 10 4 16'
cs = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR'
h_names = 'h1 h2'
eta = 'eta1 eta2'
[]
[ACInterface2]
type = ACInterface
variable = eta2
kappa_name = kappa
[]
[lagrange2]
type = SwitchingFunctionConstraintEta
variable = eta2
h_name = h2
lambda = lambda
coupled_variables = 'eta1'
[]
# Lagrange-multiplier constraint kernel for lambda
[lagrange]
type = SwitchingFunctionConstraintLagrange
variable = lambda
h_names = 'h1 h2'
etas = 'eta1 eta2'
epsilon = 1e-6
[]
[]
[AuxKernels]
[GlobalFreeEnergy]
type = KKSMultiFreeEnergy
variable = Fglobal
Fj_names = 'F_BCC_A2 F_SIGMA'
hj_names = 'h1 h2'
gj_names = 'g1 g2'
interfacial_vars = 'eta1 eta2'
kappa_names = 'kappa kappa'
w = 0.1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
line_search = none
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -ksp_gmres_restart'
petsc_options_value = 'asm lu nonzero 30'
l_max_its = 100
nl_max_its = 20
nl_abs_tol = 1e-10
end_time = 10000
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 12
iteration_window = 2
growth_factor = 1.5
cutback_factor = 0.7
dt = 0.1
[]
[]
[VectorPostprocessors]
[var]
type = LineValueSampler
start_point = '-25 0 0'
end_point = '25 0 0'
variable = 'cCr eta1 eta2 SIGMA_0CR SIGMA_1CR SIGMA_2CR'
num_points = 151
sort_by = id
execute_on = 'initial timestep_end'
[]
[mat]
type = LineMaterialRealSampler
start = '-25 0 0'
end = '25 0 0'
property = 'F_BCC_A2 F_SIGMA'
sort_by = id
execute_on = 'initial timestep_end'
[]
[]
[Postprocessors]
[F]
type = ElementIntegralVariablePostprocessor
variable = Fglobal
execute_on = 'initial timestep_end'
[]
[cmin]
type = NodalExtremeValue
value_type = min
variable = cCr
execute_on = 'initial timestep_end'
[]
[cmax]
type = NodalExtremeValue
value_type = max
variable = cCr
execute_on = 'initial timestep_end'
[]
[ctotal]
type = ElementIntegralVariablePostprocessor
variable = cCr
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
exodus = true
print_linear_residuals = false
csv = true
perf_graph = true
[]
(modules/phase_field/test/tests/electrochem_sintering/ElectrochemicalSintering_test.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 800
xmin = 0
xmax = 80
[]
[GlobalParams]
op_num = 2
var_name_base = gr
int_width = 4
[]
[Variables]
[wvy]
[]
[wvo]
[]
[phi]
[]
[PolycrystalVariables]
[]
[V]
[]
[]
[AuxVariables]
[bnds]
[]
[negative_V]
[]
[E_x]
order = CONSTANT
family = MONOMIAL
[]
[E_y]
order = CONSTANT
family = MONOMIAL
[]
[ns_cat_aux]
order = CONSTANT
family = MONOMIAL
[]
[ns_an_aux]
order = CONSTANT
family = MONOMIAL
[]
[T]
[]
[]
[Functions]
[ic_func_gr0]
type = ParsedFunction
expression = '0.5*(1.0-tanh((x)/sqrt(2.0*2.0)))'
[]
[ic_func_gr1]
type = ParsedFunction
expression = '0.5*(1.0+tanh((x)/sqrt(2.0*2.0)))'
[]
[]
[ICs]
[gr0_IC]
type = FunctionIC
variable = gr0
function = ic_func_gr0
[]
[gr1_IC]
type = FunctionIC
variable = gr1
function = ic_func_gr1
[]
[wvy_IC]
type = ConstantIC
variable = wvy
value = 2.7827
[]
[wvo_IC]
type = ConstantIC
variable = wvo
value = 2.7827
[]
[T_IC]
type = ConstantIC
variable = T
value = 1600
[]
[]
[BCs]
[v_left]
type = DirichletBC
preset = true
variable = V
boundary = left
value = 1e-2
[]
[v_right]
type = DirichletBC
preset = true
variable = V
boundary = right
value = 0
[]
[gr0_left]
type = DirichletBC
preset = true
variable = gr0
boundary = left
value = 0.5 #Grain boundary at left hand side of domain
[]
[gr1_left]
type = DirichletBC
preset = true
variable = gr1
boundary = left
value = 0.5 #Grain boundary at left hand side of domain
[]
[wvo_right]
type = DirichletBC
preset = true
variable = wvo
boundary = right
value = 2.7827
[]
[wvy_right]
type = DirichletBC
preset = true
variable = wvy
boundary = right
value = 2.7827
[]
[]
[Materials]
# Free energy coefficients for parabolic curves
[ks_cat]
type = ParsedMaterial
property_name = ks_cat
coupled_variables = 'T'
constant_names = 'a b Va'
constant_expressions = '-0.0017 140.44 0.03726'
expression = '(a*T + b) * Va^2'
[]
[ks_an]
type = ParsedMaterial
property_name = ks_an
coupled_variables = 'T'
constant_names = 'a b Va'
constant_expressions = '-0.0017 140.44 0.03726'
expression = '(a*T + b) * Va^2'
[]
[kv_cat]
type = ParsedMaterial
property_name = kv_cat
material_property_names = 'ks_cat'
expression = '10*ks_cat'
[]
[kv_an]
type = ParsedMaterial
property_name = kv_an
material_property_names = 'ks_cat'
expression = '10*ks_cat'
[]
# Diffusivity and mobilities
[chiDy]
type = GrandPotentialTensorMaterial
f_name = chiDy
diffusivity_name = Dvy
solid_mobility = L
void_mobility = Lv
chi = chi_cat
surface_energy = 6.24
c = phi
T = T
D0 = 5.9e11
GBmob0 = 1.60e12
Q = 4.14
Em = 4.25
bulkindex = 1
gbindex = 1
surfindex = 1
[]
[chiDo]
type = GrandPotentialTensorMaterial
f_name = chiDo
diffusivity_name = Dvo
solid_mobility = Lo
void_mobility = Lvo
chi = chi_an
surface_energy = 6.24
c = phi
T = T
D0 = 5.9e11
GBmob0 = 1.60e12
Q = 4.14
Em = 4.25
bulkindex = 1
gbindex = 1
surfindex = 1
[]
# Everything else
[ns_y_min]
type = DerivativeParsedMaterial
property_name = ns_y_min
coupled_variables = 'gr0 gr1 T'
constant_names = 'Ef_B Ef_GB kB Va_Y'
constant_expressions = '4.37 4.37 8.617343e-5 0.03726'
derivative_order = 2
expression = 'bnds:=gr0^2 + gr1^2; Ef:=Ef_B + 4.0 * (Ef_GB - Ef_B) * (1.0 - bnds)^2;
'
' exp(-Ef/kB/T) / Va_Y'
[]
[ns_o_min]
type = DerivativeParsedMaterial
property_name = ns_o_min
coupled_variables = 'gr0 gr1 T'
constant_names = 'Ef_B Ef_GB kB Va_O'
constant_expressions = '4.37 4.37 8.617343e-5 0.02484'
derivative_order = 2
expression = 'bnds:=gr0^2 + gr1^2; Ef:=Ef_B + 4.0 * (Ef_GB - Ef_B) * (1.0 - bnds)^2;
'
' exp(-Ef/kB/T) / Va_O'
[]
[sintering]
type = ElectrochemicalSinteringMaterial
chemical_potentials = 'wvy wvo'
electric_potential = V
void_op = phi
Temperature = T
surface_energy = 6.24
grainboundary_energy = 5.18
solid_energy_coefficients = 'kv_cat kv_cat'
void_energy_coefficients = 'kv_cat kv_an'
min_vacancy_concentrations_solid = 'ns_y_min ns_o_min'
min_vacancy_concentrations_void = '26.837 40.256'
defect_charges = '-3 2'
solid_relative_permittivity = 30
solid_energy_model = DILUTE
[]
[density_chi_y]
type = ElectrochemicalDefectMaterial
chemical_potential = wvy
void_op = phi
Temperature = T
electric_potential = V
void_density_name = nv_cat
solid_density_name = ns_cat
chi_name = chi_cat
void_energy_coefficient = kv_cat
min_vacancy_concentration_solid = ns_y_min
min_vacancy_concentration_void = 26.837
solid_energy_model = DILUTE
defect_charge = -3
solid_relative_permittivity = 30
[]
[density_chi_o]
type = ElectrochemicalDefectMaterial
chemical_potential = wvo
void_op = phi
Temperature = T
electric_potential = V
void_density_name = nv_an
solid_density_name = ns_an
chi_name = chi_an
void_energy_coefficient = kv_an
min_vacancy_concentration_solid = ns_o_min
min_vacancy_concentration_void = 40.256
solid_energy_model = DILUTE
defect_charge = 2
solid_relative_permittivity = 30
[]
[permittivity]
type = DerivativeParsedMaterial
property_name = permittivity
coupled_variables = 'phi'
material_property_names = 'hs hv'
constant_names = 'eps_rel_solid eps_void_over_e'
constant_expressions = '30 5.52e-2' #eps_void_over_e in 1/V/nm
derivative_order = 2
expression = '-hs * eps_rel_solid * eps_void_over_e - hv * eps_void_over_e'
[]
[void_pre]
type = DerivativeParsedMaterial
property_name = void_pre
material_property_names = 'hv'
constant_names = 'Z_cat Z_an nv_y_min nv_o_min'
constant_expressions = '-3 2 26.837 40.256'
derivative_order = 2
expression = '-hv * (Z_cat * nv_y_min + Z_an * nv_o_min)'
[]
[cat_mu_pre]
type = DerivativeParsedMaterial
property_name = cat_mu_pre
material_property_names = 'hv kv_cat'
constant_names = 'Z_cat'
constant_expressions = '-3'
derivative_order = 2
expression = '-hv * Z_cat / kv_cat'
[]
[an_mu_pre]
type = DerivativeParsedMaterial
property_name = an_mu_pre
material_property_names = 'hv kv_an'
constant_names = 'Z_an'
constant_expressions = '2'
derivative_order = 2
expression = '-hv * Z_an / kv_an'
[]
[cat_V_pre]
type = DerivativeParsedMaterial
property_name = cat_V_pre
material_property_names = 'hv kv_cat'
constant_names = 'Z_cat v_scale e '
constant_expressions = '-3 1 1'
derivative_order = 2
expression = 'hv * Z_cat^2 * e * v_scale / kv_cat'
[]
[an_V_pre]
type = DerivativeParsedMaterial
property_name = an_V_pre
material_property_names = 'hv kv_an'
constant_names = 'Z_an v_scale e '
constant_expressions = '2 1 1'
derivative_order = 2
expression = 'hv * Z_an^2 * e * v_scale / kv_an'
[]
[]
#This action adds most kernels needed for grand potential model
[Modules]
[PhaseField]
[GrandPotential]
switching_function_names = 'hv hs'
anisotropic = 'true true'
chemical_potentials = 'wvy wvo'
mobilities = 'chiDy chiDo'
susceptibilities = 'chi_cat chi_an'
free_energies_w = 'nv_cat ns_cat nv_an ns_an'
gamma_gr = gamma
mobility_name_gr = L
kappa_gr = kappa
free_energies_gr = 'omegav omegas'
additional_ops = 'phi'
gamma_grxop = gamma
mobility_name_op = Lv
kappa_op = kappa
free_energies_op = 'omegav omegas'
[]
[]
[]
[Kernels]
[barrier_phi]
type = ACBarrierFunction
variable = phi
v = 'gr0 gr1'
gamma = gamma
mob_name = Lv
[]
[kappa_phi]
type = ACKappaFunction
variable = phi
mob_name = Lv
kappa_name = kappa
[]
[Laplace]
type = MatDiffusion
variable = V
diffusivity = permittivity
args = 'phi'
[]
[potential_void_constants]
type = MaskedBodyForce
variable = V
coupled_variables = 'phi'
mask = void_pre
[]
[potential_cat_mu]
type = MatReaction
variable = V
v = wvy
mob_name = cat_mu_pre
[]
[potential_an_mu]
type = MatReaction
variable = V
v = wvo
mob_name = an_mu_pre
[]
[potential_cat_V]
type = MatReaction
variable = V
mob_name = cat_V_pre
[]
[potential_an_V]
type = MatReaction
variable = V
mob_name = an_V_pre
[]
[potential_solid_cat]
type = MaskedExponential
variable = V
w = wvy
T = T
coupled_variables = 'phi gr0 gr1'
mask = hs
species_charge = -3
n_eq = ns_y_min
[]
[potential_solid_an]
type = MaskedExponential
variable = V
w = wvo
T = T
coupled_variables = 'phi gr0 gr1'
mask = hs
species_charge = 2
n_eq = ns_o_min
[]
[]
[AuxKernels]
[bnds_aux]
type = BndsCalcAux
variable = bnds
execute_on = 'initial timestep_end'
[]
[negative_V]
type = ParsedAux
variable = negative_V
coupled_variables = V
expression = '-V'
[]
[E_x]
type = VariableGradientComponent
variable = E_x
gradient_variable = negative_V
component = x
[]
[E_y]
type = VariableGradientComponent
variable = E_y
gradient_variable = negative_V
component = y
[]
[ns_cat_aux]
type = MaterialRealAux
variable = ns_cat_aux
property = ns_cat
[]
[ns_an_aux]
type = MaterialRealAux
variable = ns_an_aux
property = ns_an
[]
[]
[Postprocessors]
[ns_cat_total]
type = ElementIntegralMaterialProperty
mat_prop = ns_cat
[]
[ns_an_total]
type = ElementIntegralMaterialProperty
mat_prop = ns_an
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -sub_pc_type -pc_asm_overlap -ksp_gmres_restart -sub_ksp_type'
petsc_options_value = ' asm lu 1 31 preonly'
nl_max_its = 40
l_max_its = 30
l_tol = 1e-4
nl_rel_tol = 1e-8
nl_abs_tol = 1e-13
start_time = 0
num_steps = 2
automatic_scaling = true
[TimeStepper]
type = IterationAdaptiveDT
dt = 1
optimal_iterations = 8
iteration_window = 2
[]
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/mobility_derivative/coupledmatdiffusion.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
xmax = 15.0
ymax = 15.0
elem_type = QUAD4
[]
[Variables]
[./c]
[./InitialCondition]
type = CrossIC
x1 = 0.0
x2 = 30.0
y1 = 0.0
y2 = 30.0
[../]
[../]
[./d]
[./InitialCondition]
type = SmoothCircleIC
x1 = 15
y1 = 15
radius = 8
int_width = 3
invalue = 2
outvalue = 0
[../]
[../]
[./u]
[../]
[./w]
[../]
[]
[Kernels]
[./ctime]
type = TimeDerivative
variable = c
[../]
[./umat]
type = MatReaction
variable = c
v = u
mob_name = 1
[../]
[./urxn]
type = Reaction
variable = u
[../]
[./cres]
type = MatDiffusion
variable = u
diffusivity = Dc
args = d
v = c
[../]
[./dtime]
type = TimeDerivative
variable = d
[../]
[./wmat]
type = MatReaction
variable = d
v = w
mob_name = 1
[../]
[./wrxn]
type = Reaction
variable = w
[../]
[./dres]
type = MatDiffusion
variable = w
diffusivity = Dd
args = c
v = d
[../]
[]
[Materials]
[./Dc]
type = DerivativeParsedMaterial
property_name = Dc
expression = '0.01+c^2+d'
coupled_variables = 'c d'
derivative_order = 1
[../]
[./Dd]
type = DerivativeParsedMaterial
property_name = Dd
expression = 'd^2+c+1.5'
coupled_variables = 'c d'
derivative_order = 1
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'BDF2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 lu 1'
dt = 1
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/lid-driven/hybrid-cg-dg.i)
mu = 1
rho = 1
l = 200
U = 1
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${l}
ymin = 0
ymax = ${l}
nx = 20
ny = 20
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[]
[]
[Variables]
[u]
family = MONOMIAL
[]
[v]
family = MONOMIAL
[]
[pressure][]
[]
[Kernels]
[momentum_x_convection]
type = ADConservativeAdvection
variable = u
velocity = 'velocity'
advected_quantity = 'rhou'
[]
[momentum_x_diffusion]
type = MatDiffusion
variable = u
diffusivity = 'mu'
[]
[momentum_x_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = u
pressure = pressure
component = 0
[]
[momentum_y_convection]
type = ADConservativeAdvection
variable = v
velocity = 'velocity'
advected_quantity = 'rhov'
[]
[momentum_y_diffusion]
type = MatDiffusion
variable = v
diffusivity = 'mu'
[]
[momentum_y_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = v
pressure = pressure
component = 1
[]
[mass]
type = ADConservativeAdvection
variable = pressure
velocity = velocity
advected_quantity = -1
[]
[]
[DGKernels]
[momentum_x_convection]
type = ADDGAdvection
variable = u
velocity = 'velocity'
advected_quantity = 'rhou'
[]
[momentum_x_diffusion]
type = DGDiffusion
variable = u
sigma = 6
epsilon = -1
diff = 'mu'
[]
[momentum_y_convection]
type = ADDGAdvection
variable = v
velocity = 'velocity'
advected_quantity = 'rhov'
[]
[momentum_y_diffusion]
type = DGDiffusion
variable = v
sigma = 6
epsilon = -1
diff = 'mu'
[]
[]
[BCs]
[u_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right'
variable = u
sigma = 6
epsilon = -1
function = '0'
diff = 'mu'
[]
[v_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right top'
variable = v
sigma = 6
epsilon = -1
function = '0'
diff = 'mu'
[]
[u_top]
type = DGFunctionDiffusionDirichletBC
boundary = 'top'
variable = u
sigma = 6
epsilon = -1
function = '${U}'
diff = 'mu'
[]
[pressure_pin]
type = DirichletBC
variable = pressure
boundary = 'pinned_node'
value = 0
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho'
prop_values = '${rho}'
[]
[const_reg]
type = GenericConstantMaterial
prop_names = 'mu'
prop_values = '${mu}'
[]
[vel]
type = ADVectorFromComponentVariablesMaterial
vector_prop_name = 'velocity'
u = u
v = v
[]
[rhou]
type = ADParsedMaterial
property_name = 'rhou'
coupled_variables = 'u'
material_property_names = 'rho'
expression = 'rho*u'
[]
[rhov]
type = ADParsedMaterial
property_name = 'rhov'
coupled_variables = 'v'
material_property_names = 'rho'
expression = 'rho*v'
[]
[]
[AuxVariables]
[vel_x]
family = MONOMIAL
order = CONSTANT
[]
[vel_y]
family = MONOMIAL
order = CONSTANT
[]
[p]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[vel_x]
type = ProjectionAux
variable = vel_x
v = u
[]
[vel_y]
type = ProjectionAux
variable = vel_y
v = v
[]
[p]
type = ProjectionAux
variable = p
v = pressure
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[Re]
type = ParsedPostprocessor
pp_names = ''
function = '${rho} * ${U} * ${l} / ${mu}'
[]
[]
(modules/optimization/test/tests/optimizationreporter/material/adjoint_explicit.i)
[Mesh]
[]
[Variables]
[adjoint_var]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = adjoint_var
diffusivity = thermal_conductivity
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = adjoint_var
x_coord_name = misfit/measurement_xcoord
y_coord_name = misfit/measurement_ycoord
z_coord_name = misfit/measurement_zcoord
value_name = misfit/misfit_values
[]
[]
[Reporters]
[misfit]
type = OptimizationData
[]
[]
[AuxVariables]
[temperature_forward]
[]
[grad_Tx]
order = CONSTANT
family = MONOMIAL
[]
[grad_Ty]
order = CONSTANT
family = MONOMIAL
[]
[grad_Tz]
order = CONSTANT
family = MONOMIAL
[]
[grad_Tfx]
order = CONSTANT
family = MONOMIAL
[]
[grad_Tfy]
order = CONSTANT
family = MONOMIAL
[]
[grad_Tfz]
order = CONSTANT
family = MONOMIAL
[]
[negative_gradient]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[grad_Tx]
type = VariableGradientComponent
component = x
variable = grad_Tx
gradient_variable = adjoint_var
[]
[grad_Ty]
type = VariableGradientComponent
component = y
variable = grad_Ty
gradient_variable = adjoint_var
[]
[grad_Tz]
type = VariableGradientComponent
component = z
variable = grad_Tz
gradient_variable = adjoint_var
[]
[grad_Tfx]
type = VariableGradientComponent
component = x
variable = grad_Tfx
gradient_variable = temperature_forward
[]
[grad_Tfy]
type = VariableGradientComponent
component = y
variable = grad_Tfy
gradient_variable = temperature_forward
[]
[grad_Tfz]
type = VariableGradientComponent
component = z
variable = grad_Tfz
gradient_variable = temperature_forward
[]
[negative_gradient]
type = ParsedAux
variable = negative_gradient
args = 'grad_Tx grad_Ty grad_Tz grad_Tfx grad_Tfy grad_Tfz'
function = '-(grad_Tx*grad_Tfx+grad_Ty*grad_Tfy+grad_Tz*grad_Tfz)'
[]
[]
[BCs]
[left]
type = NeumannBC
variable = adjoint_var
boundary = left
value = 0
[]
[right]
type = NeumannBC
variable = adjoint_var
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = adjoint_var
boundary = bottom
value = 0
[]
[top]
type = DirichletBC
variable = adjoint_var
boundary = top
value = 0
[]
[]
[Functions]
[thermo_conduct]
type = ParsedFunction
value = alpha
vars = 'alpha'
vals = 'p1'
[]
[]
[Materials]
[thermalProp]
type = GenericFunctionMaterial
prop_names = 'thermal_conductivity'
prop_values = 'thermo_conduct'
[]
[thermalPropDeriv]
type = GenericFunctionMaterial
prop_names = 'thermal_conductivity_deriv'
prop_values = '1'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'preonly lu superlu_dist'
[]
[Postprocessors]
[pp_adjoint_grad_parsedFunc]
type = ElementIntegralVariablePostprocessor
variable = negative_gradient
execute_on = 'initial linear'
[]
[p1]
type = ConstantValuePostprocessor
value = 10
execute_on = 'initial linear'
[]
[]
[Controls]
[parameterReceiver]
type = ControlsReceiver
[]
[]
[VectorPostprocessors]
[adjoint_grad]
type = VectorOfPostprocessors
postprocessors = 'pp_adjoint_grad_parsedFunc'
[]
[]
[Outputs]
console = false
file_base = 'adjoint'
[]
(modules/phase_field/test/tests/phase_field_crystal/PFCTrad/pfct_newton_split1_asm1_10.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 50
ny = 50
xmax = 8
ymax = 8
[]
[Variables]
[./n]
[./InitialCondition]
type = RandomIC
min = -1
max = 4
[../]
[../]
[./u]
scaling = 1e2
[../]
[./v]
scaling = 1e1
[../]
[]
[Kernels]
[./ndot]
type = TimeDerivative
variable = n
[../]
[./n_bulk]
type = CHBulkPFCTrad
variable = n
[../]
[./u_term]
type = MatDiffusion
variable = n
v = u
diffusivity = C2
[../]
[./v_term]
type = MatDiffusion
variable = n
v = v
diffusivity = C4
[../]
[./u_rctn]
type = Reaction
variable = u
[../]
[./u_gradn]
type = LaplacianSplit
variable = u
c = n
[../]
[./v_rctn]
type = Reaction
variable = v
[../]
[./v_gradu]
type = LaplacianSplit
variable = v
c = u
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./PFCTrad]
type = PFCTradMaterial
order = 4
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
l_max_its = 100
l_tol = 1e-04
nl_rel_tol = 1e-09
nl_abs_tol = 1e-11
splitting = 'nuv'
petsc_options = '-snes_view'
num_steps = 2
dt = 0.1
[]
[Splits]
[./nuv]
splitting = 'v nu'
splitting_type = schur
schur_type = full
schur_pre = Sp
#petsc_options = '-dm_view'
[../]
[./nu]
vars = 'n u'
petsc_options = '-ksp_monitor'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_asm_nblocks -pc_asm_overlap -sub_pc_type'
petsc_options_value = ' 101 asm 10 1 lu'
[../]
[./v]
vars = 'v'
#petsc_options = '-ksp_monitor'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 101 preonly lu 0'
#full = true
[../]
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/bouncing-block-contact/mixed-weighted-gap-swapped.i)
starting_point = 2e-1
# We offset slightly so we avoid the case where the bottom of the secondary block and the top of the
# primary block are perfectly vertically aligned which can cause the backtracking line search some
# issues for a coarse mesh (basic line search handles that fine)
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
correct_edge_dropping = true
[]
[Mesh]
second_order = true
[file_mesh]
type = FileMeshGenerator
file = long-bottom-block-1elem-blocks-coarse.e
[]
[]
[Variables]
[disp_x]
block = '1 2'
scaling = 1e1
order = SECOND
[]
[disp_y]
block = '1 2'
scaling = 1e1
order = SECOND
[]
[frictional_normal_lm]
block = 4
scaling = 1e3
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = 10
secondary_boundary = 20
primary_subdomain = 3
secondary_subdomain = 4
lm_variable = frictional_normal_lm
disp_x = disp_x
disp_y = disp_y
correct_edge_dropping = true
[]
[]
[Constraints]
[frictional_normal_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = 10
secondary_boundary = 20
primary_subdomain = 3
secondary_subdomain = 4
variable = frictional_normal_lm
disp_x = disp_x
disp_y = disp_y
normalize_c = true
c = 1.0e-2
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 10
secondary_boundary = 20
primary_subdomain = 3
secondary_subdomain = 4
variable = frictional_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 10
secondary_boundary = 20
primary_subdomain = 3
secondary_subdomain = 4
variable = frictional_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-15'
l_max_its = 30
nl_max_its = 25
line_search = 'none'
nl_rel_tol = 1e-12
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
(modules/stochastic_tools/test/tests/reporters/BFActiveLearning/sub_lf.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 5
xmax = 0.09
elem_type = EDGE3
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 10951.864006672608
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 10.320058433901163
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 279.8173854189593
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[avg]
type = AverageNodalVariableValue
variable = T
[]
[max]
type = NodalExtremeValue
variable = T
value_type = max
[]
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Outputs]
[]
(modules/optimization/test/tests/optimizationreporter/material/adjoint.i)
[Mesh]
[]
[Variables]
[adjointVar]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = adjointVar
diffusivity = thermal_conductivity
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = adjointVar
x_coord_name = misfit/measurement_xcoord
y_coord_name = misfit/measurement_ycoord
z_coord_name = misfit/measurement_zcoord
value_name = misfit/misfit_values
[]
[]
[Reporters]
[misfit]
type = OptimizationData
[]
[params]
type = ConstantReporter
real_vector_names = 'p1'
real_vector_values = '0' # Dummy value
[]
[]
[AuxVariables]
[temperature_forward]
[]
[]
[BCs]
[left]
type = NeumannBC
variable = adjointVar
boundary = left
value = 0
[]
[right]
type = NeumannBC
variable = adjointVar
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = adjointVar
boundary = bottom
value = 0
[]
[top]
type = DirichletBC
variable = adjointVar
boundary = top
value = 0
[]
[]
[Functions]
[thermo_conduct]
type = ParsedOptimizationFunction
expression = 'alpha'
param_symbol_names = 'alpha'
param_vector_name = 'params/p1'
[]
[]
[Materials]
[thermalProp]
type = GenericFunctionMaterial
prop_names = 'thermal_conductivity'
prop_values = 'thermo_conduct'
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'preonly lu superlu_dist'
[]
[VectorPostprocessors]
[adjoint_grad]
type = ElementOptimizationDiffusionCoefFunctionInnerProduct
variable = adjointVar
forward_variable = temperature_forward
function = thermo_conduct
[]
[]
[Outputs]
console = false
file_base = 'adjoint'
[]
(modules/combined/test/tests/multiphase_mechanics/elasticenergymaterial.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 25
nz = 0
xmax = 250
ymax = 250
zmax = 0
elem_type = QUAD4
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./c]
[./InitialCondition]
type = SmoothCircleIC
x1 = 125.0
y1 = 125.0
radius = 60.0
invalue = 1.0
outvalue = 0.1
int_width = 50.0
[../]
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[./left]
type = DirichletBC
boundary = left
variable = disp_x
value = 0.0
[../]
[]
[Kernels]
[./TensorMechanics]
[../]
[./dummy]
type = MatDiffusion
variable = c
diffusivity = 0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '3 1 1 3 1 3 1 1 1 '
[../]
[./strain]
type = ComputeSmallStrain
eigenstrain_names = eigenstrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./prefactor]
type = DerivativeParsedMaterial
coupled_variables = c
property_name = prefactor
constant_names = 'epsilon0 c0'
constant_expressions = '0.05 0'
expression = '(c - c0) * epsilon0'
[../]
[./eigenstrain]
type = ComputeVariableEigenstrain
eigen_base = '1'
args = c
prefactor = prefactor
eigenstrain_name = eigenstrain
[../]
[./elasticenergy]
type = ElasticEnergyMaterial
args = 'c'
outputs = exodus
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
nl_abs_tol = 1e-10
num_steps = 1
petsc_options_iname = '-pc_factor_shift_type'
petsc_options_value = 'nonzero'
[]
[Outputs]
exodus = true
[]
(test/tests/scaling/remove-singularity/test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[v][]
[w][]
[]
[Kernels]
[diff_v]
type = ADMatDiffusion
variable = v
diffusivity = 1e-20
[]
[diff_w]
type = MatDiffusion
variable = w
diffusivity = 1e-40
[]
[]
[BCs]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 1
[]
[left_w]
type = DirichletBC
variable = w
boundary = left
value = 0
[]
[right_w]
type = DirichletBC
variable = w
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'Newton'
petsc_options = '-pc_svd_monitor'
petsc_options_iname = '-pc_type'
petsc_options_value = 'svd'
automatic_scaling = true
verbose = true
[]
[Outputs]
exodus = true
[]
(test/tests/constraints/overwrite_variables/test_balance.i)
# Test to exemplify the use of overwriting of variables in the framework.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e3
use_displaced_mesh = true
[]
[Mesh]
[block_one]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = 4.5
xmax = 5.5
ymin = 4.5
ymax = 5.5
zmin = 0.0001
zmax = 1.0001
boundary_name_prefix = 'ball'
[]
[block_two]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
xmin = 0.0
xmax = 10
ymin = 0.0
ymax = 10
zmin = -2
zmax = 0
boundary_name_prefix = 'base'
boundary_id_offset = 10
[]
[block_one_id]
type = SubdomainIDGenerator
input = block_one
subdomain_id = 1
[]
[block_two_id]
type = SubdomainIDGenerator
input = block_two
subdomain_id = 2
[]
[combine]
type = MeshCollectionGenerator
inputs = ' block_one_id block_two_id'
[]
allow_renumbering = false
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[AuxVariables]
[vel_x]
[]
[accel_x]
[]
[vel_y]
[]
[accel_y]
[]
[vel_z]
[]
[accel_z]
[]
[gap_rate]
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[vel_x]
type = TimeDerivative
variable = disp_x
[]
[vel_y]
type = TimeDerivative
variable = disp_y
[]
[vel_z]
type = TimeDerivative
variable = disp_z
[]
[source_m]
type = BodyForce
variable = disp_z
value = -100
[]
[]
[BCs]
[x_front]
type = DirichletBC
variable = disp_x
boundary = 'ball_front'
preset = false
value = 0.0
[]
[y_front]
type = DirichletBC
variable = disp_y
boundary = 'ball_front'
preset = false
value = 0.0
[]
[x_fixed]
type = DirichletBC
variable = disp_x
boundary = 'base_back'
value = 0.0
preset = true
[]
[y_fixed]
type = DirichletBC
variable = disp_y
boundary = 'base_back'
value = 0.0
preset = true
[]
[z_fixed]
type = DirichletBC
variable = disp_z
boundary = 'base_back'
value = 0.0
preset = true
[]
[z_fixed_front]
type = DirichletBC
variable = disp_z
boundary = 'base_front'
value = 0.0
preset = true
[]
[]
[Constraints]
[overwrite]
type = ExplicitDynamicsOverwrite
model = frictionless_balance
primary = base_front
secondary = ball_back
vel_x = 'vel_x'
vel_y = 'vel_y'
vel_z = 'vel_z'
primary_variable = disp_x
boundary = 'base_front'
component = 0
variable = disp_x
gap_rate = gap_rate
[]
[]
[Materials]
[density_one]
type = GenericConstantMaterial
prop_names = density
prop_values = 1e5
outputs = 'exodus'
output_properties = 'density'
block = '1'
[]
[density_two]
type = GenericConstantMaterial
prop_names = density
prop_values = 1e5
outputs = 'exodus'
output_properties = 'density'
block = '2'
[]
[]
[Executioner]
type = Transient
start_time = -0.01
end_time = -0.008
dt = 1.0e-5
timestep_tolerance = 1e-6
[TimeIntegrator]
type = CentralDifference
solve_type = lumped
[]
[]
[Outputs]
interval = 50
exodus = true
csv = true
[]
[Postprocessors]
[]
(modules/phase_field/test/tests/phase_field_crystal/PFCTrad/pfct_newton_split1_asm5.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 50
ny = 50
xmax = 8
ymax = 8
[]
[Variables]
[./n]
[./InitialCondition]
type = RandomIC
min = -1
max = 4
[../]
[../]
[./u]
scaling = 1e2
[../]
[./v]
scaling = 1e1
[../]
[]
[Kernels]
[./ndot]
type = TimeDerivative
variable = n
[../]
[./n_bulk]
type = CHBulkPFCTrad
variable = n
[../]
[./u_term]
type = MatDiffusion
variable = n
v = u
diffusivity = C2
[../]
[./v_term]
type = MatDiffusion
variable = n
v = v
diffusivity = C4
[../]
[./u_rctn]
type = Reaction
variable = u
[../]
[./u_gradn]
type = LaplacianSplit
variable = u
c = n
[../]
[./v_rctn]
type = Reaction
variable = v
[../]
[./v_gradu]
type = LaplacianSplit
variable = v
c = u
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./PFCTrad]
type = PFCTradMaterial
order = 4
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
l_max_its = 100
l_tol = 1e-04
nl_rel_tol = 1e-09
nl_abs_tol = 1e-11
splitting = 'nuv'
petsc_options = '-snes_view'
num_steps = 2
dt = 0.1
[]
[Splits]
[./nuv]
splitting = 'v nu'
splitting_type = schur
schur_type = full
schur_pre = Sp
#petsc_options = '-dm_view'
[../]
[./nu]
vars = 'n u'
petsc_options = '-ksp_monitor'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_asm_overlap -sub_pc_type'
petsc_options_value = ' 101 asm 5 lu'
[../]
[./v]
vars = 'v'
#petsc_options = '-ksp_monitor'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 101 preonly lu 0'
#full = true
[../]
[]
[Outputs]
execute_on = 'initial timestep_end linear'
exodus = true
[]
(test/tests/kernels/2d_diffusion/matdiffusion.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmax = 1.0
ymax = 1.0
elem_type = QUAD4
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./cres]
type = MatDiffusion
variable = u
diffusivity = Du
[../]
[./ctime]
type = TimeDerivative
variable = u
[../]
[]
[Materials]
[./Dc]
type = DerivativeParsedMaterial
property_name = Du
expression = '0.01+u^2'
coupled_variables = 'u'
derivative_order = 1
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = NeumannBC
variable = u
boundary = 2
value = 1
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
scheme = 'BDF2'
dt = 1
num_steps = 2
[]
[Outputs]
exodus = true
[]
(test/tests/executioners/eigen_convergence/b.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 160
ymin = 0
ymax = 160
nx = 8
ny = 8
[]
uniform_refine = 0
[]
[Variables]
[u]
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
diffusivity = diffusivity
variable = u
[]
[reaction]
type = CoefReaction
coefficient = 0.01
variable = u
[]
[rhs]
type = MassEigenKernel
coefficient = 0.01
variable = u
[]
[]
[BCs]
[robin]
type = VacuumBC
boundary = 'left bottom'
variable = u
[]
[]
[Materials]
[nm]
type = GenericConstantMaterial
block = 0
prop_names = 'diffusivity'
prop_values = 0.333333333333333333
[]
[]
[Postprocessors]
[fluxintegral]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = linear
[]
[]
[Executioner]
type = NonlinearEigen
bx_norm = fluxintegral
solve_type = PJFNK
free_power_iterations = 4
nl_abs_tol = 2e-10
output_after_power_iterations = false
[]
[Outputs]
csv = true
[]
(modules/stochastic_tools/test/tests/surrogates/cross_validation/sub_vector.i)
L = 1
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 100
xmax = ${L}
elem_type = EDGE3
[]
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 10000
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 2.0
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 300
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[VectorPostprocessors]
[T_vec]
type = LineValueSampler
variable = T
start_point = '0 0 0'
end_point = '${L} 0 0'
num_points = 10
sort_by = x
[]
[]
(modules/contact/test/tests/mortar_cartesian_lms/frictionless-mortar-3d-friction.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
second_order = false
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[lm_z]
block = 'secondary_lower'
use_dual = true
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeFrictionalForceCartesianLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
lm_z = lm_z
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
correct_edge_dropping = true
c = 1e+02
c_t = 1e+2
mu = 0.10
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_z]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_z
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Preconditioning]
[vcp]
type = VCP
full = true
lm_variable = 'lm_x lm_y lm_z'
primary_variable = 'disp_x disp_y disp_z'
preconditioner = 'LU'
is_lm_coupling_diagonal = true
adaptive_condensation = true
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = .5
dtmin = .01
solve_type = 'NEWTON'
petsc_options_iname = '-pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' NONZERO 1e-10'
l_max_its = 100
nl_max_its = 30
# nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
perf_graph = true
exodus = true
csv = true
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = lm_z
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = lm_z
sort_by = 'id'
execute_on = NONLINEAR
[]
[]
(modules/stochastic_tools/test/tests/reporters/BFActiveLearning/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 0.13061533868990033
elem_type = EDGE3
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 10951.864006672608
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 10.320058433901163
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 279.8173854189593
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[avg]
type = AverageNodalVariableValue
variable = T
[]
[max]
type = NodalExtremeValue
variable = T
value_type = max
[]
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Outputs]
[]
(modules/optimization/test/tests/outputs/exodus_optimization_steady/forward.i)
[Mesh]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[heat_source]
type = BodyForce
value = 1000
variable = temperature
[]
[]
[BCs]
[left]
type = NeumannBC
variable = temperature
boundary = left
value = 0
[]
[right]
type = NeumannBC
variable = temperature
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 200
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 100
[]
[]
[Functions]
[thermo_conduct]
type = ParsedOptimizationFunction
expression = 'alpha'
param_symbol_names = 'alpha'
param_vector_name = 'params/p1'
[]
[]
[Materials]
[steel]
type = GenericFunctionMaterial
prop_names = 'thermal_conductivity'
prop_values = 'thermo_conduct'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'preonly lu superlu_dist'
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
[]
[params]
type = ConstantReporter
real_vector_names = 'p1'
real_vector_values = '0' # Dummy value
[]
[]
[Outputs]
console = false
file_base = 'forward'
[exo]
type = ExodusOptimizationSteady
execute_on = 'TIMESTEP_END'
[]
[]
(modules/stochastic_tools/examples/surrogates/combined/trans_diff_2d/trans_diff_sub.i)
[Functions]
[src_func]
type = ParsedFunction
expression = "1000*sin(f*t)"
symbol_names = 'f'
symbol_values = '20'
[]
[]
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 2
nx = 100
xmin = -0.5
xmax = 0.5
ny = 100
ymin = -0.5
ymax = 0.5
[]
[source_domain]
type = ParsedSubdomainMeshGenerator
input = msh
combinatorial_geometry = '(x<0.1 & x>-0.1) & (y<0.1 & y>-0.1)'
block_id=1
[]
[]
[Variables]
[T]
initial_condition = 300
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = T
diffusivity = diff_coeff
[]
[source]
type = BodyForce
variable = T
function = src_func
block = 1
[]
[time_deriv]
type = TimeDerivative
variable = T
[]
[]
[Materials]
[diff_coeff]
type = ParsedMaterial
property_name = diff_coeff
coupled_variables = 'T'
constant_names = 'C'
constant_expressions = 0.02
expression = 'C * pow(300/T, 2)'
[]
[]
[BCs]
[neumann_all]
type = NeumannBC
variable = T
boundary = 'left right top bottom'
value = 0
[]
[]
[Executioner]
type = Transient
num_steps = 100
dt = 0.01
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_rel_tol = 1e-6
l_abs_tol = 1e-6
timestep_tolerance = 1e-6
[]
[Postprocessors]
[max]
type = NodalExtremeValue
variable = T
[]
[min]
type = NodalExtremeValue
variable = T
value_type = min
[]
[time_max]
type = TimeExtremeValue
postprocessor = max
[]
[time_min]
type = TimeExtremeValue
postprocessor = min
value_type = min
[]
[]
(modules/scalar_transport/test/tests/multiple-species/multiple-species.i)
Krht = 1
Krtt = 1
Krhh = 1
Kdh2 = 1
Kdt2 = 1
Kdht = 1
Ph2_left = 1
Pt2_left = 2
Pht_left = 3
Ph2_right = 0
Pt2_right = 0
Pht_right = 0
d_h = 1
d_t = 1
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = ref
[]
[Variables]
[h]
[]
[t]
[]
[]
[Kernels]
[time_h]
type = TimeDerivative
variable = h
extra_vector_tags = ref
[]
[diff_h]
type = MatDiffusion
variable = h
diffusivity = ${d_h}
extra_vector_tags = ref
[]
[time_t]
type = TimeDerivative
variable = t
extra_vector_tags = ref
[]
[diff_t]
type = MatDiffusion
variable = t
diffusivity = ${d_t}
extra_vector_tags = ref
[]
[]
[BCs]
[ht_h_left]
type = BinaryRecombinationBC
variable = h
v = t
Kr = Krht
boundary = left
[]
[ht_t_left]
type = BinaryRecombinationBC
variable = t
v = h
Kr = Krht
boundary = left
[]
[hh_left]
type = BinaryRecombinationBC
variable = h
v = h
Kr = Krhh
boundary = left
[]
[tt_left]
type = BinaryRecombinationBC
variable = t
v = t
Kr = Krtt
boundary = left
[]
[h_from_h2_left]
type = DissociationFluxBC
variable = h
v = ${Ph2_left} # Partial pressure of H2
Kd = Kdh2
boundary = left
[]
[t_from_t2_left]
type = DissociationFluxBC
variable = t
v = ${Pt2_left} # Partial pressure of T2
Kd = Kdt2
boundary = left
[]
[h_from_ht_left]
type = DissociationFluxBC
variable = h
v = ${Pht_left} # Partial pressure of HT
Kd = Kdht
boundary = left
[]
[t_from_ht_left]
type = DissociationFluxBC
variable = t
v = ${Pht_left} # Partial pressure of HT
Kd = Kdht
boundary = left
[]
[ht_h_right]
type = BinaryRecombinationBC
variable = h
v = t
Kr = Krht
boundary = right
[]
[ht_t_right]
type = BinaryRecombinationBC
variable = t
v = h
Kr = Krht
boundary = right
[]
[hh_right]
type = BinaryRecombinationBC
variable = h
v = h
Kr = Krhh
boundary = right
[]
[tt_right]
type = BinaryRecombinationBC
variable = t
v = t
Kr = Krtt
boundary = right
[]
[h_from_h2_right]
type = DissociationFluxBC
variable = h
v = ${Ph2_right} # Partial pressure of H2
Kd = Kdh2
boundary = right
[]
[t_from_t2_right]
type = DissociationFluxBC
variable = t
v = ${Pt2_right} # Partial pressure of T2
Kd = Kdt2
boundary = right
[]
[h_from_ht_right]
type = DissociationFluxBC
variable = h
v = ${Pht_right} # Partial pressure of HT
Kd = Kdht
boundary = right
[]
[t_from_ht_right]
type = DissociationFluxBC
variable = t
v = ${Pht_right} # Partial pressure of HT
Kd = Kdht
boundary = right
[]
[]
[Materials]
[Krht]
type = ADConstantMaterial
property_name = 'Krht'
value = '${Krht}'
[]
[Krhh]
type = ADConstantMaterial
property_name = 'Krhh'
value = '${Krhh}'
[]
[Krtt]
type = ADConstantMaterial
property_name = 'Krtt'
value = '${Krtt}'
[]
[Kdh2]
type = ADConstantMaterial
property_name = 'Kdh2'
value = '${Kdh2}'
[]
[Kdt2]
type = ADConstantMaterial
property_name = 'Kdt2'
value = '${Kdt2}'
[]
[Kdht]
type = ADConstantMaterial
property_name = 'Kdht'
value = '${Kdht}'
[]
[]
[Postprocessors]
[downstream_h_flux]
type = SideFluxAverage
variable = h
boundary = right
diffusivity = ${d_h}
[]
[downstream_t_flux]
type = SideFluxAverage
variable = t
boundary = right
diffusivity = ${d_t}
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
num_steps = 1000
steady_state_detection = true
steady_state_tolerance = 3e-08
dt = .1
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/mortar_cartesian_lms/frictionless-weighted-gap-lm.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[lm_x]
block = 3
[]
[lm_y]
block = 3
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapCartesianLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_x = lm_x
lm_y = lm_y
variable = lm_x # Shouldn't be needed, but forced by framework
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
c = 1
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = 5
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
l_tol = 1e-03
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = true
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = lm_y
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/optimization/test/tests/optimizationreporter/bimaterial/grad.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 16
ny = 16
xmin = -4
xmax = 4
ymin = -4
ymax = 4
[]
[]
[Variables]
[adjoint_T]
[]
[]
[Kernels]
[conduction]
type = MatDiffusion
diffusivity = diffusivity
variable = adjoint_T
[]
[]
[Reporters]
[misfit]
type = OptimizationData
[]
[data]
type = ConstantReporter
real_vector_names = 'coordx coordy diffusivity'
real_vector_values = '0 0; -2 2; 5 10'
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = adjoint_T
x_coord_name = misfit/measurement_xcoord
y_coord_name = misfit/measurement_ycoord
z_coord_name = misfit/measurement_zcoord
value_name = misfit/misfit_values
[]
[]
[BCs]
[bottom]
type = DirichletBC
variable = adjoint_T
boundary = bottom
value = 0
[]
[]
[AuxVariables]
[temperature_forward]
[]
[]
[Functions]
[diffusivity_function]
type = NearestReporterCoordinatesFunction
x_coord_name = data/coordx
y_coord_name = data/coordy
value_name = data/diffusivity
[]
[]
[Materials] #same material as what was used in the forward model
[mat]
type = GenericFunctionMaterial
prop_names = diffusivity
prop_values = diffusivity_function
[]
[]
[VectorPostprocessors]
[gradvec]
type = ElementOptimizationDiffusionCoefFunctionInnerProduct
variable = adjoint_T
forward_variable = temperature_forward
function = diffusivity_function
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_forced_its = 1
line_search = none
nl_abs_tol = 1e-8
[]
[Outputs]
console = false
file_base = 'adjoint'
[]
(test/tests/materials/ad_material/conversion/1d_dirichlet.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmax = 2
[]
[Variables]
[v]
initial_condition = 1.1
[]
[]
[Kernels]
inactive = 'ad_diff'
[diff]
type = MatDiffusion
variable = v
diffusivity = 'coef'
[]
[ad_diff]
type = ADMatDiffusion
variable = v
diffusivity = 'ad_coef_2'
[]
[sink]
type = ADBodyForce
variable = v
function = 'sink'
[]
[]
[BCs]
[bounds]
type = DirichletBC
variable = v
boundary = 'left right'
value = 0
[]
[]
[Functions]
[sink]
type = ParsedFunction
expression = '3*x^3'
[]
[]
[Materials]
[ad_coef]
type = ADParsedMaterial
property_name = 'ad_coef'
expression = '0.01 * max(v, 1)'
coupled_variables = 'v'
[]
[converter_to_regular]
type = MaterialADConverter
ad_props_in = 'ad_coef'
reg_props_out = 'coef'
[]
# at this point we should have lost the derivatives
[converter_to_ad]
type = MaterialADConverter
reg_props_in = 'coef'
ad_props_out = 'ad_coef_2'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/KKS_system/lagrange_multiplier.i)
#
# This test ensures that the equilibrium solution using two order parameters with a
# Lagrange multiplier constraint is identical to the dedicated two phase formulation
# in two_phase.i
#
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmax = 5
[]
[AuxVariables]
[Fglobal]
order = CONSTANT
family = MONOMIAL
[]
[]
[Variables]
# concentration
[c]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = x/5
[]
[]
# order parameter 1
[eta1]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
# order parameter 2
[eta2]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
# phase concentration 1
[c1]
order = FIRST
family = LAGRANGE
initial_condition = 0.2
[]
# phase concentration 2
[c2]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
# Lagrange multiplier
[lambda]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[]
[]
[Materials]
# simple toy free energies
[f1] # = fd
type = DerivativeParsedMaterial
property_name = F1
coupled_variables = 'c1'
expression = '(0.9-c1)^2'
[]
[f2] # = fm
type = DerivativeParsedMaterial
property_name = F2
coupled_variables = 'c2'
expression = '(0.1-c2)^2'
[]
# Switching functions for each phase
[h1_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta1
function_name = h1
[]
[h2_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta2
function_name = h2
[]
# Coefficients for diffusion equation
[Dh1]
type = DerivativeParsedMaterial
material_property_names = 'D h1'
expression = D*h1
property_name = Dh1
[]
[Dh2]
type = DerivativeParsedMaterial
material_property_names = 'D h2'
expression = D*h2
property_name = Dh2
[]
# Barrier functions for each phase
[g1]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta1
function_name = g1
[]
[g2]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta2
function_name = g2
[]
# constant properties
[constants]
type = GenericConstantMaterial
prop_names = 'D L kappa'
prop_values = '0.7 0.7 0.2'
[]
[]
[Kernels]
#Kernels for diffusion equation
[diff_time]
type = TimeDerivative
variable = c
[]
[diff_c1]
type = MatDiffusion
variable = c
diffusivity = Dh1
v = c1
[]
[diff_c2]
type = MatDiffusion
variable = c
diffusivity = Dh2
v = c2
[]
# Kernels for Allen-Cahn equation for eta1
[deta1dt]
type = TimeDerivative
variable = eta1
[]
[ACBulkF1]
type = KKSMultiACBulkF
variable = eta1
Fj_names = 'F1 F2 '
hj_names = 'h1 h2 '
gi_name = g1
eta_i = eta1
wi = 0.2
coupled_variables = 'c1 c2 eta2'
[]
[ACBulkC1]
type = KKSMultiACBulkC
variable = eta1
Fj_names = 'F1 F2'
hj_names = 'h1 h2'
cj_names = 'c1 c2'
eta_i = eta1
coupled_variables = 'eta2'
[]
[ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa
[]
[multipler1]
type = MatReaction
variable = eta1
v = lambda
mob_name = L
[]
# Kernels for the Lagrange multiplier equation
[mult_lambda]
type = MatReaction
variable = lambda
mob_name = 2
[]
[mult_ACBulkF_1]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 '
hj_names = 'h1 h2 '
gi_name = g1
eta_i = eta1
wi = 0.2
mob_name = 1
coupled_variables = 'c1 c2 eta2 '
[]
[mult_ACBulkC_1]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2'
hj_names = 'h1 h2'
cj_names = 'c1 c2'
eta_i = eta1
coupled_variables = 'eta2 '
mob_name = 1
[]
[mult_CoupledACint_1]
type = SimpleCoupledACInterface
variable = lambda
v = eta1
kappa_name = kappa
mob_name = 1
[]
[mult_ACBulkF_2]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 '
hj_names = 'h1 h2 '
gi_name = g2
eta_i = eta2
wi = 0.2
mob_name = 1
coupled_variables = 'c1 c2 eta1 '
[]
[mult_ACBulkC_2]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2'
hj_names = 'h1 h2'
cj_names = 'c1 c2'
eta_i = eta2
coupled_variables = 'eta1 '
mob_name = 1
[]
[mult_CoupledACint_2]
type = SimpleCoupledACInterface
variable = lambda
v = eta2
kappa_name = kappa
mob_name = 1
[]
# Kernels for constraint equation eta1 + eta2 = 1
# eta2 is the nonlinear variable for the constraint equation
[eta2reaction]
type = MatReaction
variable = eta2
mob_name = 1
[]
[eta1reaction]
type = MatReaction
variable = eta2
v = eta1
mob_name = 1
[]
[one]
type = BodyForce
variable = eta2
value = -1.0
[]
# Phase concentration constraints
[chempot12]
type = KKSPhaseChemicalPotential
variable = c1
cb = c2
fa_name = F1
fb_name = F2
[]
[phaseconcentration]
type = KKSMultiPhaseConcentration
variable = c2
cj = 'c1 c2'
hj_names = 'h1 h2'
etas = 'eta1 eta2'
c = c
[]
[]
[AuxKernels]
[Fglobal_total]
type = KKSMultiFreeEnergy
Fj_names = 'F1 F2 '
hj_names = 'h1 h2 '
gj_names = 'g1 g2 '
variable = Fglobal
w = 0.2
interfacial_vars = 'eta1 eta2 '
kappa_names = 'kappa kappa'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'lu nonzero'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-11
num_steps = 35
dt = 10
[]
[VectorPostprocessors]
[c]
type = LineValueSampler
variable = c
start_point = '0 0 0'
end_point = '5 0 0'
num_points = 21
sort_by = x
[]
[]
[Outputs]
csv = true
execute_on = FINAL
[]
(modules/stochastic_tools/examples/surrogates/polynomial_regression/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 1
elem_type = EDGE3
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 1.0
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 2.0
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 300
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[max]
type = NodalExtremeValue
variable = T
value_type = max
[]
[]
[Outputs]
[]
(test/tests/misc/rename-parameters/rename-param.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
nx = 20
dim = 1
[]
[]
[Variables]
[u][]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = 2
[]
[rxn]
type = RenamedKernel
variable = u
base_coeff = 2
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 1
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[avg_u]
type = ElementAverageValue
variable = u
[]
[]
[Outputs]
csv = true
[]
(modules/scalar_transport/test/tests/multiple-species/single-specie.i)
Krtt=0.
Kdt2=1
Pt2_left=1
Pt2_right=0
d_t=1
l=1
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmax = ${l}
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = ref
[]
[Variables]
[t][]
[]
[Kernels]
[time_t]
type = TimeDerivative
variable = t
extra_vector_tags = ref
[]
[diff_t]
type = MatDiffusion
variable = t
diffusivity = ${d_t}
extra_vector_tags = ref
[]
[]
[BCs]
[tt_recombination]
type = BinaryRecombinationBC
variable = t
v = t
Kr = Krtt
boundary = 'left right'
[]
[t_from_t2_left]
type = DissociationFluxBC
variable = t
v = ${Pt2_left} # Partial pressure of T2
Kd = Kdt2
boundary = left
[]
[t_from_t2_right]
type = DissociationFluxBC
variable = t
v = ${Pt2_right} # Partial pressure of T2
Kd = Kdt2
boundary = right
[]
[]
[Materials]
[Krtt]
type = ADConstantMaterial
property_name = 'Krtt'
value = ${Krtt}
[]
[Kdt2]
type = ADConstantMaterial
property_name = 'Kdt2'
value = '${Kdt2}'
[]
[]
[Postprocessors]
[downstream_t_flux]
type = SideFluxAverage
variable = t
boundary = right
diffusivity = ${d_t}
[]
[downstream_t_conc]
type = SideAverageValue
variable = t
boundary = right
outputs = 'none'
[]
[upstream_t_conc]
type = SideAverageValue
variable = t
boundary = left
outputs = 'none'
[]
[difference]
type = DifferencePostprocessor
value1 = upstream_t_conc
value2 = downstream_t_conc
outputs = 'none'
[]
[domain_averaged_flux]
type = ScalePostprocessor
scaling_factor = ${fparse d_t / l}
value = difference
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
num_steps = 40
steady_state_detection = true
dt = .1
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/channel-flow/channel-hybrid.i)
mu = 1.1
rho = 1.1
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 10
ymin = -1
ymax = 1
nx = 100
ny = 20
[]
[]
[Variables]
[u]
family = MONOMIAL
[]
[v]
family = MONOMIAL
[]
[pressure][]
[]
[Kernels]
[momentum_x_convection]
type = ADConservativeAdvection
variable = u
velocity = 'velocity'
advected_quantity = 'rhou'
[]
[momentum_x_diffusion]
type = MatDiffusion
variable = u
diffusivity = 'mu'
[]
[momentum_x_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = u
pressure = pressure
component = 0
[]
[momentum_y_convection]
type = ADConservativeAdvection
variable = v
velocity = 'velocity'
advected_quantity = 'rhov'
[]
[momentum_y_diffusion]
type = MatDiffusion
variable = v
diffusivity = 'mu'
[]
[momentum_y_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = v
pressure = pressure
component = 1
[]
[mass]
type = ADConservativeAdvection
variable = pressure
velocity = velocity
advected_quantity = -1
[]
[]
[DGKernels]
[momentum_x_convection]
type = ADDGAdvection
variable = u
velocity = 'velocity'
advected_quantity = 'rhou'
[]
[momentum_x_diffusion]
type = DGDiffusion
variable = u
sigma = 6
epsilon = -1
diff = 'mu'
[]
[momentum_y_convection]
type = ADDGAdvection
variable = v
velocity = 'velocity'
advected_quantity = 'rhov'
[]
[momentum_y_diffusion]
type = DGDiffusion
variable = v
sigma = 6
epsilon = -1
diff = 'mu'
[]
[]
[Functions]
[v_inlet]
type = ParsedVectorFunction
expression_x = '1'
[]
[]
[BCs]
[u_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'bottom top'
variable = u
sigma = 6
epsilon = -1
function = '0'
diff = 'mu'
[]
[v_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'bottom top'
variable = v
sigma = 6
epsilon = -1
function = '0'
diff = 'mu'
[]
[u_in]
type = ADConservativeAdvectionBC
boundary = 'left'
variable = u
velocity_function = v_inlet
primal_dirichlet_value = 1
primal_coefficient = 'rho'
[]
[v_in]
type = ADConservativeAdvectionBC
boundary = 'left'
variable = v
velocity_function = v_inlet
primal_dirichlet_value = 0
primal_coefficient = 'rho'
[]
[p_in]
type = ADConservativeAdvectionBC
boundary = 'left'
variable = pressure
velocity_function = v_inlet
advected_quantity = -1
[]
[u_out]
type = ADConservativeAdvectionBC
boundary = 'right'
variable = u
velocity_mat_prop = 'velocity'
advected_quantity = 'rhou'
[]
[v_out]
type = ADConservativeAdvectionBC
boundary = 'right'
variable = v
velocity_mat_prop = 'velocity'
advected_quantity = 'rhov'
[]
[p_out]
type = DirichletBC
variable = pressure
boundary = 'right'
value = 0
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho'
prop_values = '${rho}'
[]
[const_reg]
type = GenericConstantMaterial
prop_names = 'mu'
prop_values = '${mu}'
[]
[vel]
type = ADVectorFromComponentVariablesMaterial
vector_prop_name = 'velocity'
u = u
v = v
[]
[rhou]
type = ADParsedMaterial
property_name = 'rhou'
coupled_variables = 'u'
material_property_names = 'rho'
expression = 'rho*u'
[]
[rhov]
type = ADParsedMaterial
property_name = 'rhov'
coupled_variables = 'v'
material_property_names = 'rho'
expression = 'rho*v'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d-test-derivative-trimming.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
second_order = false
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[mortar_normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
[]
[]
[Constraints]
[normal_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
c = 1.0e4
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = .5
dtmin = .01
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15 1e-5'
l_max_its = 100
nl_max_its = 30
# nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = mortar_normal_lm
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_normal_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[]
(modules/stochastic_tools/test/tests/surrogates/polynomial_regression/sub_vector.i)
L = 1
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 100
xmax = ${L}
elem_type = EDGE3
[]
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 10000
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 2.0
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 300
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[VectorPostprocessors]
[T_vec]
type = LineValueSampler
variable = T
start_point = '0 0 0'
end_point = '${L} 0 0'
num_points = 10
sort_by = x
[]
[]
(tutorials/tutorial02_multiapps/step03_coupling/01_parent.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[vt]
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Materials]
[diff]
type = ParsedMaterial
property_name = D
coupled_variables = 'vt'
expression = 'vt'
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 0.2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[micro]
type = TransientMultiApp
positions = '0.15 0.15 0 0.45 0.45 0 0.75 0.75 0'
input_files = '01_sub.i'
execute_on = timestep_end
output_in_position = true
[]
[]
[Transfers]
[push_u]
type = MultiAppVariableValueSampleTransfer
to_multi_app = micro
source_variable = u
variable = ut
[]
[pull_v]
type = MultiAppPostprocessorInterpolationTransfer
from_multi_app = micro
variable = vt
postprocessor = average_v
[]
[]
(modules/optimization/examples/materialTransient/forward.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[]
[Variables/u]
initial_condition = 0
[]
[Kernels]
[dt]
type = TimeDerivative
variable = u
[]
[diff]
type = MatDiffusion
variable = u
diffusivity = D
[]
[src]
type = BodyForce
variable = u
value = 1
[]
[]
[BCs]
[dirichlet]
type = DirichletBC
variable = u
boundary = 'right top'
value = 0
[]
[]
[Materials]
[diffc]
type = GenericFunctionMaterial
prop_names = 'D'
prop_values = 'diffc_fun'
output_properties = 'D'
outputs = 'exodus'
[]
[]
[Functions]
[diffc_fun]
type = NearestReporterCoordinatesFunction
value_name = 'diffc_rep/D_vals'
x_coord_name = 'diffc_rep/D_x_coord'
y_coord_name = 'diffc_rep/D_y_coord'
[]
[]
[Reporters]
[diffc_rep]
type = ConstantReporter
real_vector_names = 'D_x_coord D_y_coord D_vals'
real_vector_values = '0.25 0.75 0.25 0.75;
0.25 0.25 0.75 0.75;
1 0.2 0.2 0.05' # Reference solution
outputs = none
[]
[data]
type = OptimizationData
variable = u
measurement_points = '0.25 0.25 0 0.25 0.75 0 0.75 0.25 0 0.75 0.75 0
0.25 0.25 0 0.25 0.75 0 0.75 0.25 0 0.75 0.75 0
0.25 0.25 0 0.25 0.75 0 0.75 0.25 0 0.75 0.75 0
0.25 0.25 0 0.25 0.75 0 0.75 0.25 0 0.75 0.75 0
0.25 0.25 0 0.25 0.75 0 0.75 0.25 0 0.75 0.75 0
0.25 0.25 0 0.25 0.75 0 0.75 0.25 0 0.75 0.75 0
0.25 0.25 0 0.25 0.75 0 0.75 0.25 0 0.75 0.75 0
0.25 0.25 0 0.25 0.75 0 0.75 0.25 0 0.75 0.75 0
0.25 0.25 0 0.25 0.75 0 0.75 0.25 0 0.75 0.75 0
0.25 0.25 0 0.25 0.75 0 0.75 0.25 0 0.75 0.75 0'
measurement_times = '0.1 0.1 0.1 0.1
0.2 0.2 0.2 0.2
0.3 0.3 0.3 0.3
0.4 0.4 0.4 0.4
0.5 0.5 0.5 0.5
0.6 0.6 0.6 0.6
0.7 0.7 0.7 0.7
0.8 0.8 0.8 0.8
0.9 0.9 0.9 0.9
1.0 1.0 1.0 1.0'
measurement_values = '0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0'
[]
[]
[Postprocessors]
[D1]
type = PointValue
variable = D
point = '0.25 0.25 0'
[]
[D2]
type = PointValue
variable = D
point = '0.75 0.25 0'
[]
[D3]
type = PointValue
variable = D
point = '0.25 0.75 0'
[]
[D4]
type = PointValue
variable = D
point = '0.75 0.75 0'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
nl_rel_tol = 1e-8
nl_abs_tol = 1e-12
dt = 0.1
num_steps = 10
[]
[Outputs]
csv = true
exodus = true
[]
(test/tests/kernels/hfem/robin.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 3
ny = 3
dim = 2
[]
build_all_side_lowerd_mesh = true
[]
[Variables]
[u]
order = THIRD
family = MONOMIAL
block = 0
[]
[lambda]
order = CONSTANT
family = MONOMIAL
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
block = 0
[]
[source]
type = BodyForce
variable = u
value = '1'
block = 0
[]
[]
[DGKernels]
[surface]
type = HFEMDiffusion
variable = u
lowerd_variable = lambda
[]
[]
[BCs]
[all]
type = VacuumBC
boundary = 'left right top bottom'
variable = u
[]
[]
[Postprocessors]
[intu]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[]
[lambdanorm]
type = ElementL2Norm
variable = lambda
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
[Outputs]
[out]
# we hide lambda because it may flip sign due to element
# renumbering with distributed mesh
type = Exodus
hide = lambda
[]
[]
(test/tests/materials/interface_material/interface_value_material.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
elem_type = QUAD4
[]
[./subdomain_id]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1 0 0'
top_right = '2 2 0'
block_id = 1
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain_id
primary_block = '0'
paired_block = '1'
new_boundary = 'interface'
[../]
[]
[Variables]
[./u]
block = 0
[../]
[./v]
block = 1
[../]
[]
[Kernels]
[./diff]
type = MatDiffusion
variable = u
diffusivity = 'diffusivity'
block = 0
[../]
[./diff_v]
type = MatDiffusion
variable = v
diffusivity = 'diffusivity'
block = 1
[../]
[]
[InterfaceKernels]
[tied]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
jump_prop_name = "average_jump"
penalty = 1e6
boundary = 'interface'
[]
[]
[BCs]
[u_left]
type = DirichletBC
boundary = 'left'
variable = u
value = 1
[]
[v_right]
type = DirichletBC
boundary = 'right'
variable = v
value = 0
[]
[]
[Materials]
[./stateful1]
type = StatefulMaterial
block = 0
initial_diffusivity = 1
# outputs = all
[../]
[./stateful2]
type = StatefulMaterial
block = 1
initial_diffusivity = 2
# outputs = all
[../]
[./interface_material_avg]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = average
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
[../]
[./interface_material_jump_primary_minus_secondary]
type = ADInterfaceValueMaterial # To test generic routines
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = jump_primary_minus_secondary
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
[../]
[./interface_material_jump_secondary_minus_primary]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = jump_secondary_minus_primary
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
[../]
[./interface_material_jump_abs]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = jump_abs
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
[../]
[./interface_material_primary]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = primary
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
[../]
[./interface_material_secondary]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
mat_prop_var_out_basename = diff_var
boundary = interface
interface_value_type = secondary
nl_var_primary = u
nl_var_secondary = v
[../]
[]
[AuxKernels]
[./interface_material_avg]
type = MaterialRealAux
property = diff_average
variable = diffusivity_average
boundary = interface
[]
[./interface_material_jump_primary_minus_secondary]
type = MaterialRealAux
property = diff_jump_primary_minus_secondary
variable = diffusivity_jump_primary_minus_secondary
boundary = interface
[]
[./interface_material_jump_secondary_minus_primary]
type = MaterialRealAux
property = diff_jump_secondary_minus_primary
variable = diffusivity_jump_secondary_minus_primary
boundary = interface
[]
[./interface_material_jump_abs]
type = MaterialRealAux
property = diff_jump_abs
variable = diffusivity_jump_abs
boundary = interface
[]
[./interface_material_primary]
type = MaterialRealAux
property = diff_primary
variable = diffusivity_primary
boundary = interface
[]
[./interface_material_secondary]
type = MaterialRealAux
property = diff_secondary
variable = diffusivity_secondary
boundary = interface
[]
[diffusivity_var]
type = MaterialRealAux
property = diffusivity
variable = diffusivity_var
[]
[]
[AuxVariables]
[diffusivity_var]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_average]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_jump_primary_minus_secondary]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_jump_secondary_minus_primary]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_jump_abs]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_primary]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_secondary]
family = MONOMIAL
order = CONSTANT
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/KKS_system/kks_multiphase.i)
#
# This test is for the 3-phase KKS model
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
nz = 0
xmin = 0
xmax = 40
ymin = 0
ymax = 40
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[AuxVariables]
[./Energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Variables]
# concentration
[./c]
order = FIRST
family = LAGRANGE
[../]
# order parameter 1
[./eta1]
order = FIRST
family = LAGRANGE
[../]
# order parameter 2
[./eta2]
order = FIRST
family = LAGRANGE
[../]
# order parameter 3
[./eta3]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[../]
# phase concentration 1
[./c1]
order = FIRST
family = LAGRANGE
initial_condition = 0.2
[../]
# phase concentration 2
[./c2]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[../]
# phase concentration 3
[./c3]
order = FIRST
family = LAGRANGE
initial_condition = 0.8
[../]
# Lagrange multiplier
[./lambda]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[../]
[]
[ICs]
[./eta1]
variable = eta1
type = SmoothCircleIC
x1 = 20.0
y1 = 20.0
radius = 10
invalue = 0.9
outvalue = 0.1
int_width = 4
[../]
[./eta2]
variable = eta2
type = SmoothCircleIC
x1 = 20.0
y1 = 20.0
radius = 10
invalue = 0.1
outvalue = 0.9
int_width = 4
[../]
[./c]
variable = c
type = SmoothCircleIC
x1 = 20.0
y1 = 20.0
radius = 10
invalue = 0.2
outvalue = 0.5
int_width = 2
[../]
[]
[Materials]
# simple toy free energies
[./f1]
type = DerivativeParsedMaterial
property_name = F1
coupled_variables = 'c1'
expression = '20*(c1-0.2)^2'
[../]
[./f2]
type = DerivativeParsedMaterial
property_name = F2
coupled_variables = 'c2'
expression = '20*(c2-0.5)^2'
[../]
[./f3]
type = DerivativeParsedMaterial
property_name = F3
coupled_variables = 'c3'
expression = '20*(c3-0.8)^2'
[../]
# Switching functions for each phase
# h1(eta1, eta2, eta3)
[./h1]
type = SwitchingFunction3PhaseMaterial
eta_i = eta1
eta_j = eta2
eta_k = eta3
property_name = h1
[../]
# h2(eta1, eta2, eta3)
[./h2]
type = SwitchingFunction3PhaseMaterial
eta_i = eta2
eta_j = eta3
eta_k = eta1
property_name = h2
[../]
# h3(eta1, eta2, eta3)
[./h3]
type = SwitchingFunction3PhaseMaterial
eta_i = eta3
eta_j = eta1
eta_k = eta2
property_name = h3
[../]
# Coefficients for diffusion equation
[./Dh1]
type = DerivativeParsedMaterial
material_property_names = 'D h1'
expression = D*h1
property_name = Dh1
[../]
[./Dh2]
type = DerivativeParsedMaterial
material_property_names = 'D h2'
expression = D*h2
property_name = Dh2
[../]
[./Dh3]
type = DerivativeParsedMaterial
material_property_names = 'D h3'
expression = D*h3
property_name = Dh3
[../]
# Barrier functions for each phase
[./g1]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta1
function_name = g1
[../]
[./g2]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta2
function_name = g2
[../]
[./g3]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta3
function_name = g3
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'L kappa D'
prop_values = '0.7 1.0 1'
[../]
[]
[Kernels]
#Kernels for diffusion equation
[./diff_time]
type = TimeDerivative
variable = c
[../]
[./diff_c1]
type = MatDiffusion
variable = c
diffusivity = Dh1
v = c1
[../]
[./diff_c2]
type = MatDiffusion
variable = c
diffusivity = Dh2
v = c2
[../]
[./diff_c3]
type = MatDiffusion
variable = c
diffusivity = Dh3
v = c3
[../]
# Kernels for Allen-Cahn equation for eta1
[./deta1dt]
type = TimeDerivative
variable = eta1
[../]
[./ACBulkF1]
type = KKSMultiACBulkF
variable = eta1
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g1
eta_i = eta1
wi = 1.0
coupled_variables = 'c1 c2 c3 eta2 eta3'
[../]
[./ACBulkC1]
type = KKSMultiACBulkC
variable = eta1
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta1
coupled_variables = 'eta2 eta3'
[../]
[./ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa
[../]
[./multipler1]
type = MatReaction
variable = eta1
v = lambda
mob_name = L
[../]
# Kernels for Allen-Cahn equation for eta2
[./deta2dt]
type = TimeDerivative
variable = eta2
[../]
[./ACBulkF2]
type = KKSMultiACBulkF
variable = eta2
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g2
eta_i = eta2
wi = 1.0
coupled_variables = 'c1 c2 c3 eta1 eta3'
[../]
[./ACBulkC2]
type = KKSMultiACBulkC
variable = eta2
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta2
coupled_variables = 'eta1 eta3'
[../]
[./ACInterface2]
type = ACInterface
variable = eta2
kappa_name = kappa
[../]
[./multipler2]
type = MatReaction
variable = eta2
v = lambda
mob_name = L
[../]
# Kernels for the Lagrange multiplier equation
[./mult_lambda]
type = MatReaction
variable = lambda
mob_name = 3
[../]
[./mult_ACBulkF_1]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g1
eta_i = eta1
wi = 1.0
mob_name = 1
coupled_variables = 'c1 c2 c3 eta2 eta3'
[../]
[./mult_ACBulkC_1]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta1
coupled_variables = 'eta2 eta3'
mob_name = 1
[../]
[./mult_CoupledACint_1]
type = SimpleCoupledACInterface
variable = lambda
v = eta1
kappa_name = kappa
mob_name = 1
[../]
[./mult_ACBulkF_2]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g2
eta_i = eta2
wi = 1.0
mob_name = 1
coupled_variables = 'c1 c2 c3 eta1 eta3'
[../]
[./mult_ACBulkC_2]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta2
coupled_variables = 'eta1 eta3'
mob_name = 1
[../]
[./mult_CoupledACint_2]
type = SimpleCoupledACInterface
variable = lambda
v = eta2
kappa_name = kappa
mob_name = 1
[../]
[./mult_ACBulkF_3]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g3
eta_i = eta3
wi = 1.0
mob_name = 1
coupled_variables = 'c1 c2 c3 eta1 eta2'
[../]
[./mult_ACBulkC_3]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta3
coupled_variables = 'eta1 eta2'
mob_name = 1
[../]
[./mult_CoupledACint_3]
type = SimpleCoupledACInterface
variable = lambda
v = eta3
kappa_name = kappa
mob_name = 1
[../]
# Kernels for constraint equation eta1 + eta2 + eta3 = 1
# eta3 is the nonlinear variable for the constraint equation
[./eta3reaction]
type = MatReaction
variable = eta3
mob_name = 1
[../]
[./eta1reaction]
type = MatReaction
variable = eta3
v = eta1
mob_name = 1
[../]
[./eta2reaction]
type = MatReaction
variable = eta3
v = eta2
mob_name = 1
[../]
[./one]
type = BodyForce
variable = eta3
value = -1.0
[../]
# Phase concentration constraints
[./chempot12]
type = KKSPhaseChemicalPotential
variable = c1
cb = c2
fa_name = F1
fb_name = F2
[../]
[./chempot23]
type = KKSPhaseChemicalPotential
variable = c2
cb = c3
fa_name = F2
fb_name = F3
[../]
[./phaseconcentration]
type = KKSMultiPhaseConcentration
variable = c3
cj = 'c1 c2 c3'
hj_names = 'h1 h2 h3'
etas = 'eta1 eta2 eta3'
c = c
[../]
[]
[AuxKernels]
[./Energy_total]
type = KKSMultiFreeEnergy
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gj_names = 'g1 g2 g3'
variable = Energy
w = 1
interfacial_vars = 'eta1 eta2 eta3'
kappa_names = 'kappa kappa kappa'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm ilu nonzero'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-11
num_steps = 2
dt = 0.5
[]
[Preconditioning]
active = 'full'
[./full]
type = SMP
full = true
[../]
[./mydebug]
type = FDP
full = true
[../]
[]
[Outputs]
exodus = true
[]
(modules/stochastic_tools/test/tests/variablemappings/pod_mapping/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 6
xmax = 6
[]
[Variables]
[v]
[]
[]
[Kernels]
[diffusion_v]
type = MatDiffusion
variable = v
diffusivity = D_v
[]
[source_v]
type = BodyForce
variable = v
value = 1.0
[]
[]
[Materials]
[diffusivity_v]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 4.0
[]
[]
[BCs]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Reporters]
[solution_storage]
type = SolutionContainer
execute_on = 'FINAL'
[]
[]
(modules/xfem/test/tests/moving_interface/verification/1D_rz_homog1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: quasi-1D
# Coordinate System: rz
# Material Numbers/Types: homogeneous 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# A simple transient heat transfer problem in cylindrical coordinates designed
# with the Method of Manufactured Solutions. This problem was developed to
# verify XFEM performance in the presence of a moving interface for linear
# element models that can be exactly evaluated by FEM/Moose. Both the
# temperature solution and level set function are designed to be linear to
# attempt to minimize error between the Moose/exact solution and XFEM results.
# Thermal conductivity is a single, constant value at all points in the system.
# Results:
# The temperature at the left boundary (x=1) exhibits the largest difference
# between the FEM/Moose solution and XFEM results. We present the XFEM results
# at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 480.0008118
# 0.6 520 520.0038529
# 0.8 560 560.0089177
# 1.0 600 600.0133344
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 1
xmin = 1.0
xmax = 2.0
ymin = 0.0
ymax = 0.5
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-200*x+400) + 200*1.5*t/x'
[../]
[./neumann_func]
type = ParsedFunction
expression = '1.5*200*t'
[../]
[./ls_func]
type = ParsedFunction
expression = '2.04 - x - 0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericConstantMaterial
prop_names = 'diffusion_coefficient'
prop_values = 1.5
[../]
[]
[BCs]
[./left_u]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 'right'
value = 400
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/contact/test/tests/mortar_aux_kernels/pressure-aux-friction-3d.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
second_order = false
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[lm_z]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[normal_lm]
family = LAGRANGE
order = FIRST
[]
[tangent1_lm]
family = LAGRANGE
order = FIRST
[]
[tangent2_lm]
family = LAGRANGE
order = FIRST
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[AuxKernels]
[tangent2_lm]
type = MortarPressureComponentAux
variable = tangent2_lm
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
lm_var_x = lm_x
lm_var_y = lm_y
lm_var_z = lm_z
component = 'tangent2'
boundary = 'top_bottom'
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeFrictionalForceCartesianLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
lm_z = lm_z
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
correct_edge_dropping = true
c = 1e+02
c_t = 1e+2
mu = 0.10
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_z]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_z
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = .5
dtmin = .01
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_view'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' lu superlu_dist NONZERO 1e-15'
l_max_its = 100
nl_max_its = 30
# nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = false
csv = true
execute_on = 'FINAL'
[]
[VectorPostprocessors]
[tangent2_lm]
type = NodalValueSampler
block = secondary_lower
variable = tangent2_lm
sort_by = 'id'
[]
[]
(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/kernels/ad_mat_diffusion/1D_transient.i)
# This test solves a 1D transient heat equation
# The error is calculated by comparing to the analytical solution
# The problem setup and analytical solution are taken from "Advanced Engineering
# Mathematics, 10th edition" by Erwin Kreyszig.
# http://www.amazon.com/Advanced-Engineering-Mathematics-Erwin-Kreyszig/dp/0470458364
# It is Example 1 in section 12.6 on page 561
[Mesh]
type = GeneratedMesh
dim = 1
nx = 160
xmax = 80
[]
[Variables]
[./T]
[../]
[]
[ICs]
[./T_IC]
type = FunctionIC
variable = T
function = '100*sin(pi*x/80)'
[../]
[]
[Kernels]
[./diff]
type = MatDiffusion
variable = T
diffusivity = 0.95
[../]
[./dt]
type = CoefTimeDerivative
variable = T
Coefficient = 0.82064
[../]
[]
[BCs]
[./sides]
type = DirichletBC
variable = T
boundary = 'left right'
value = 0
[../]
[]
[Executioner]
type = Transient
dt = 1e-2
end_time = 1
[]
[Postprocessors]
[./error]
type = NodalL2Error
function = '100*sin(pi*x/80)*exp(-0.95/(0.092*8.92)*pi^2/80^2*t)'
variable = T
outputs = console
[../]
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/bouncing-block-contact/frictionless-penalty-weighted-gap-action.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
preset = false
[]
[Mesh]
[mesh_file]
type = FileMeshGenerator
file = long-bottom-block-1elem-blocks.e
[]
[remove_blocks]
type = BlockDeletionGenerator
input = mesh_file
block = '3 4'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[Contact]
[weighted_gap]
formulation = mortar_penalty
model = frictionless
secondary = 10
primary = 20
penalty = 1e0
use_dual = false
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = true
abort_on_solve_fail = true
nl_rel_tol = 1e-13
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[]
(modules/xfem/test/tests/moving_interface/moving_diffusion.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 3
xmin = 0.0
xmax = 1
ymin = 0.0
ymax = 1
elem_type = QUAD4
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./ls_func]
type = ParsedFunction
expression = 'x-0.76+0.21*t'
[../]
[]
[Kernels]
[./diff]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./time_deriv]
type = TimeDerivative
variable = u
[../]
[]
[Constraints]
[./u_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = u
jump = 0
use_penalty = true
alpha = 1e5
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[]
[BCs]
[./right_u]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./left_u]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Materials]
[./diffusivity_A]
type = GenericConstantMaterial
prop_names = A_diffusion_coefficient
prop_values = 5
[../]
[./diffusivity_B]
type = GenericConstantMaterial
prop_names = B_diffusion_coefficient
prop_values = 0.5
[../]
[./diff_combined]
type = LevelSetBiMaterialReal
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = diffusion_coefficient
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
l_max_its = 20
l_tol = 1e-3
nl_max_its = 15
nl_rel_tol = 1e-6
nl_abs_tol = 1e-5
start_time = 0.0
dt = 1
end_time = 2
max_xfem_update = 1
[]
[Outputs]
exodus = true
execute_on = timestep_end
perf_graph = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialPFM.i)
# this input file test the implementation of the grand-potential phase-field model based on M.Plapp PRE 84,031601(2011)
# in this simple example, the liquid and solid free energies are parabola with the same curvature and the material properties are constant
# Note that this example also test The SusceptibilityTimeDerivative kernels
[Mesh]
type = GeneratedMesh
dim = 2
nx = 16
ny = 16
xmax = 32
ymax = 32
[]
[GlobalParams]
radius = 20.0
int_width = 4.0
x1 = 0
y1 = 0
[]
[Variables]
[./w]
[../]
[./eta]
[../]
[]
[ICs]
[./w]
type = SmoothCircleIC
variable = w
# note w = A*(c-cleq), A = 1.0, cleq = 0.0 ,i.e., w = c (in the matrix/liquid phase)
outvalue = -0.2
invalue = 0.2
[../]
[./eta]
type = SmoothCircleIC
variable = eta
outvalue = 0.0
invalue = 1.0
[../]
[]
[Kernels]
[./w_dot]
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
coupled_variables = '' # in this case chi (the susceptibility) is simply a constant
[../]
[./Diffusion]
type = MatDiffusion
variable = w
diffusivity = D
args = ''
[../]
[./coupled_etadot]
type = CoupledSusceptibilityTimeDerivative
variable = w
v = eta
f_name = ft
coupled_variables = 'eta'
[../]
[./AC_bulk]
type = AllenCahn
variable = eta
f_name = F
coupled_variables = 'w'
[../]
[./AC_int]
type = ACInterface
variable = eta
[../]
[./e_dot]
type = TimeDerivative
variable = eta
[../]
[]
[Materials]
[./constants]
type = GenericConstantMaterial
prop_names = 'kappa_op D L chi cseq cleq A'
prop_values = '4.0 1.0 1.0 1.0 0.0 1.0 1.0'
[../]
[./liquid_GrandPotential]
type = DerivativeParsedMaterial
expression = '-0.5 * w^2/A - cleq * w'
coupled_variables = 'w'
property_name = f1
material_property_names = 'cleq A'
[../]
[./solid_GrandPotential]
type = DerivativeParsedMaterial
expression = '-0.5 * w^2/A - cseq * w'
coupled_variables = 'w'
property_name = f2
material_property_names = 'cseq A'
[../]
[./switching_function]
type = SwitchingFunctionMaterial
eta = eta
h_order = HIGH
[../]
[./barrier_function]
type = BarrierFunctionMaterial
eta = eta
[../]
[./cs]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = cs
material_property_names = 'A cseq'
expression = 'w/A + cseq' # since w = A*(c-cseq)
derivative_order = 2
[../]
[./cl]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = cl
material_property_names = 'A cleq'
expression = 'w/A + cleq' # since w = A*(c-cleq)
derivative_order = 2
[../]
[./total_GrandPotential]
type = DerivativeTwoPhaseMaterial
coupled_variables = 'w'
eta = eta
fa_name = f1
fb_name = f2
derivative_order = 2
W = 1.0
[../]
[./coupled_eta_function]
type = DerivativeParsedMaterial
expression = '(cs - cl) * dh'
coupled_variables = 'eta w'
property_name = ft
material_property_names = 'cs cl dh:=D[h,eta]'
derivative_order = 1
outputs = exodus
[../]
[./concentration]
type = ParsedMaterial
property_name = c
material_property_names = 'dF:=D[F,w]'
expression = '-dF'
outputs = exodus
[../]
[]
[Postprocessors]
[./C]
type = ElementIntegralMaterialProperty
mat_prop = c
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
l_max_its = 15
l_tol = 1e-3
nl_max_its = 15
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
num_steps = 5
dt = 10.0
[]
[Outputs]
exodus = true
csv = true
execute_on = 'TIMESTEP_END'
[]
(modules/stochastic_tools/test/tests/surrogates/load_store/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = u
diffusivity = D
[]
[absorption]
type = MaterialReaction
variable = u
coefficient = sig
[]
[source]
type = BodyForce
variable = u
value = 1.0
[]
[]
[Materials]
[diffusivity]
type = GenericConstantMaterial
prop_names = D
prop_values = 2.0
[]
[xs]
type = GenericConstantMaterial
prop_names = sig
prop_values = 2.0
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Postprocessors]
[avg]
type = AverageNodalVariableValue
variable = u
[]
[max]
type = NodalExtremeValue
variable = u
value_type = max
[]
[]
(modules/stochastic_tools/test/tests/surrogates/pod_rb/internal/sub.i)
[Problem]
type = FEProblem
extra_tag_vectors = 'diff react bodyf'
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 15
xmax = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = u
diffusivity = k
extra_vector_tags = 'diff'
[]
[reaction]
type = MaterialReaction
variable = u
coefficient = alpha
extra_vector_tags = 'react'
[]
[source]
type = BodyForce
variable = u
value = 1.0
extra_vector_tags = 'bodyf'
[]
[]
[Materials]
[k]
type = GenericConstantMaterial
prop_names = k
prop_values = 1.0
[]
[alpha]
type = GenericConstantMaterial
prop_names = alpha
prop_values = 1.0
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
(modules/phase_field/test/tests/mobility_derivative/matdiffusion.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
xmax = 15.0
ymax = 15.0
elem_type = QUAD4
[]
[Variables]
[./c]
[./InitialCondition]
type = CrossIC
x1 = 0.0
x2 = 30.0
y1 = 0.0
y2 = 30.0
[../]
[../]
[./d]
[./InitialCondition]
type = SmoothCircleIC
x1 = 15
y1 = 15
radius = 8
int_width = 3
invalue = 2
outvalue = 0
[../]
[../]
[]
[Kernels]
[./cres]
type = MatDiffusion
variable = c
diffusivity = Dc
args = d
[../]
[./ctime]
type = TimeDerivative
variable = c
[../]
[./dres]
type = MatDiffusion
variable = d
diffusivity = Dd
args = c
[../]
[./dtime]
type = TimeDerivative
variable = d
[../]
[]
[Materials]
[./Dc]
type = DerivativeParsedMaterial
property_name = Dc
expression = '0.01+c^2+d'
coupled_variables = 'c d'
derivative_order = 1
[../]
[./Dd]
type = DerivativeParsedMaterial
property_name = Dd
expression = 'd^2+c+1.5'
coupled_variables = 'c d'
derivative_order = 1
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'BDF2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 lu 1'
dt = 1
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/bouncing-block-contact/frictional-penalty-weighted-vel.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
preset = false
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[UserObjects]
[weighted_vel_uo]
type = PenaltyFrictionUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
penalty = 5e1
penalty_friction = 1e0
friction_coefficient = 0.4
[]
[]
[Constraints]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[tangent_x]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangent_y]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = true
abort_on_solve_fail = true
nl_rel_tol = 1e-12
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[]
(modules/phase_field/test/tests/mobility_derivative/mobility_derivative_direct_coupled_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 30
ymax = 30
elem_type = QUAD4
[]
[Variables]
[./c]
family = HERMITE
order = THIRD
[../]
[./d]
[../]
[]
[ICs]
[./c_IC]
type = SmoothCircleIC
x1 = 15
y1 = 15
radius = 12
variable = c
int_width = 3
invalue = 1
outvalue = 0
[../]
[./d_IC]
type = BoundingBoxIC
x1 = 0
x2 = 15
y1 = 0
y2 = 30
inside = 1.0
outside = 0.0
variable = d
[../]
[]
[Kernels]
[./c_bulk]
type = CahnHilliard
variable = c
mob_name = M
f_name = F
coupled_variables = d
[../]
[./c_int]
type = CHInterface
variable = c
kappa_name = kappa_c
mob_name = M
coupled_variables = d
[../]
[./c_dot]
type = TimeDerivative
variable = c
[../]
[./d_dot]
type = TimeDerivative
variable = d
[../]
[./d_diff]
type = MatDiffusion
variable = d
diffusivity = diffusivity
[../]
[]
[Materials]
[./kappa]
type = GenericConstantMaterial
prop_names = kappa_c
prop_values = 2.0
[../]
[./mob]
type = DerivativeParsedMaterial
property_name = M
coupled_variables = 'c d'
expression = if(d>0.001,d,0.001)*if(c<0,0.5,if(c>1,0.5,1-0.5*c^2))
derivative_order = 2
[../]
[./free_energy]
type = MathEBFreeEnergy
property_name = F
c = c
[../]
[./d_diff]
type = GenericConstantMaterial
prop_names = diffusivity
prop_values = 1.0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = BDF2
solve_type = NEWTON
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 lu 1'
l_max_its = 30
l_tol = 1.0e-4
nl_max_its = 50
nl_rel_tol = 1.0e-10
dt = 0.25
num_steps = 2
[]
[Outputs]
execute_on = 'timestep_end'
[./oversample]
refinements = 2
type = Exodus
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/mms/lid-driven/hybrid-cg-dg-mms.i)
rho=1.1
mu=1.1
cp=1.1
k=1.1
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = -1
xmax = 1.0
ymin = -1
ymax = 1.0
nx = 2
ny = 2
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[]
[]
[Variables]
[u]
family = MONOMIAL
[]
[v]
family = MONOMIAL
[]
[pressure][]
[T]
family = MONOMIAL
[]
[]
[Kernels]
[momentum_x_convection]
type = ADConservativeAdvection
variable = u
velocity = 'velocity'
advected_quantity = 'rhou'
[]
[momentum_x_diffusion]
type = MatDiffusion
variable = u
diffusivity = 'mu'
[]
[momentum_x_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = u
pressure = pressure
component = 0
[]
[u_forcing]
type = BodyForce
variable = u
function = forcing_u
[]
[momentum_y_convection]
type = ADConservativeAdvection
variable = v
velocity = 'velocity'
advected_quantity = 'rhov'
[]
[momentum_y_diffusion]
type = MatDiffusion
variable = v
diffusivity = 'mu'
[]
[momentum_y_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = v
pressure = pressure
component = 1
[]
[v_forcing]
type = BodyForce
variable = v
function = forcing_v
[]
[mass]
type = ADConservativeAdvection
variable = pressure
velocity = velocity
advected_quantity = -1
[]
[p_forcing]
type = BodyForce
variable = pressure
function = forcing_p
[]
[T_convection]
type = ADConservativeAdvection
variable = T
velocity = 'velocity'
advected_quantity = 'rho_cp_temp'
[]
[T_diffusion]
type = MatDiffusion
variable = T
diffusivity = 'k'
[]
[T_forcing]
type = BodyForce
variable = T
function = forcing_T
[]
[]
[DGKernels]
[momentum_x_convection]
type = ADDGAdvection
variable = u
velocity = 'velocity'
advected_quantity = 'rhou'
[]
[momentum_x_diffusion]
type = DGDiffusion
variable = u
sigma = 6
epsilon = -1
diff = 'mu'
[]
[momentum_y_convection]
type = ADDGAdvection
variable = v
velocity = 'velocity'
advected_quantity = 'rhov'
[]
[momentum_y_diffusion]
type = DGDiffusion
variable = v
sigma = 6
epsilon = -1
diff = 'mu'
[]
[T_convection]
type = ADDGAdvection
variable = T
velocity = 'velocity'
advected_quantity = 'rho_cp_temp'
[]
[T_diffusion]
type = DGDiffusion
variable = T
sigma = 6
epsilon = -1
diff = 'k'
[]
[]
[BCs]
[u_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right top'
variable = u
sigma = 6
epsilon = -1
function = exact_u
diff = 'mu'
[]
[v_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right top'
variable = v
sigma = 6
epsilon = -1
function = exact_v
diff = 'mu'
[]
[pressure_pin]
type = FunctionDirichletBC
variable = pressure
boundary = 'pinned_node'
function = 'exact_p'
[]
[T_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right top'
variable = T
sigma = 6
epsilon = -1
function = exact_T
diff = 'k'
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho cp'
prop_values = '${rho} ${cp}'
[]
[const_reg]
type = GenericConstantMaterial
prop_names = 'mu k'
prop_values = '${mu} ${k}'
[]
[vel]
type = ADVectorFromComponentVariablesMaterial
vector_prop_name = 'velocity'
u = u
v = v
[]
[rhou]
type = ADParsedMaterial
property_name = 'rhou'
coupled_variables = 'u'
material_property_names = 'rho'
expression = 'rho*u'
[]
[rhov]
type = ADParsedMaterial
property_name = 'rhov'
coupled_variables = 'v'
material_property_names = 'rho'
expression = 'rho*v'
[]
[rho_cp]
type = ADParsedMaterial
property_name = 'rho_cp'
material_property_names = 'rho cp'
expression = 'rho*cp'
[]
[rho_cp_temp]
type = ADParsedMaterial
property_name = 'rho_cp_temp'
material_property_names = 'rho cp'
coupled_variables = 'T'
expression = 'rho*cp*T'
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'sin(y)*cos((1/2)*x*pi)'
[]
[forcing_u]
type = ParsedFunction
expression = 'mu*sin(y)*cos((1/2)*x*pi) + (1/4)*pi^2*mu*sin(y)*cos((1/2)*x*pi) - 1/2*pi*rho*sin(x)*sin(y)*sin((1/2)*y*pi)*cos((1/2)*x*pi) + rho*sin(x)*cos(y)*cos((1/2)*x*pi)*cos((1/2)*y*pi) - pi*rho*sin(y)^2*sin((1/2)*x*pi)*cos((1/2)*x*pi) + sin(y)*cos(x)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_v]
type = ParsedFunction
expression = 'sin(x)*cos((1/2)*y*pi)'
[]
[forcing_v]
type = ParsedFunction
expression = 'mu*sin(x)*cos((1/2)*y*pi) + (1/4)*pi^2*mu*sin(x)*cos((1/2)*y*pi) - pi*rho*sin(x)^2*sin((1/2)*y*pi)*cos((1/2)*y*pi) - 1/2*pi*rho*sin(x)*sin(y)*sin((1/2)*x*pi)*cos((1/2)*y*pi) + rho*sin(y)*cos(x)*cos((1/2)*x*pi)*cos((1/2)*y*pi) + sin(x)*cos(y)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'sin(x)*sin(y)'
[]
[forcing_p]
type = ParsedFunction
expression = '(1/2)*pi*sin(x)*sin((1/2)*y*pi) + (1/2)*pi*sin(y)*sin((1/2)*x*pi)'
[]
[exact_T]
type = ParsedFunction
expression = 'cos(x)*cos(y)'
[]
[forcing_T]
type = ParsedFunction
expression = '-cp*rho*sin(x)*sin(y)*cos(x)*cos((1/2)*y*pi) - cp*rho*sin(x)*sin(y)*cos(y)*cos((1/2)*x*pi) - 1/2*pi*cp*rho*sin(x)*sin((1/2)*y*pi)*cos(x)*cos(y) - 1/2*pi*cp*rho*sin(y)*sin((1/2)*x*pi)*cos(x)*cos(y) + 2*k*cos(x)*cos(y)'
symbol_names = 'rho cp k'
symbol_values = '${rho} ${cp} ${k}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO mumps'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2Error
variable = u
function = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2v]
variable = v
function = exact_v
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2T]
variable = T
function = exact_T
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
variable = pressure
function = exact_p
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(modules/stochastic_tools/test/tests/surrogates/pod_rb/errors/sub.i)
[Problem]
type = FEProblem
extra_tag_vectors = 'diff react bodyf'
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 15
xmax = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = u
diffusivity = k
extra_vector_tags = 'diff'
[]
[reaction]
type = MaterialReaction
variable = u
coefficient = alpha
extra_vector_tags = 'react'
[]
[source]
type = BodyForce
variable = u
value = 1.0
extra_vector_tags = 'bodyf'
[]
[]
[Materials]
[k]
type = GenericConstantMaterial
prop_names = k
prop_values = 1.0
[]
[alpha]
type = GenericConstantMaterial
prop_names = alpha
prop_values = 1.0
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
(modules/optimization/test/tests/optimizationreporter/material/forward.i)
[Mesh]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[heat_source]
type = BodyForce
value = 1000
variable = temperature
[]
[]
[BCs]
[left]
type = NeumannBC
variable = temperature
boundary = left
value = 0
[]
[right]
type = NeumannBC
variable = temperature
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 200
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 100
[]
[]
[Functions]
[thermo_conduct]
type = ParsedOptimizationFunction
expression = 'alpha'
param_symbol_names = 'alpha'
param_vector_name = 'params/p1'
[]
[]
[Materials]
[steel]
type = GenericFunctionMaterial
prop_names = 'thermal_conductivity'
prop_values = 'thermo_conduct'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'preonly lu superlu_dist'
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
[]
[params]
type = ConstantReporter
real_vector_names = 'p1'
real_vector_values = '0' # Dummy value
[]
[]
[Outputs]
console = false
file_base = 'forward'
[]
(modules/optimization/test/tests/optimizationreporter/bc_load_linearFunction/forward_and_adjoint.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 20
xmax = 1
ymax = 2
bias_x = 1.1
bias_y = 1.1
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
kernel_coverage_check = false
[]
[Variables]
[temperature]
[]
[temperature_adjoint]
nl_sys = adjoint
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[]
[BCs]
[left]
type = FunctionNeumannBC
variable = temperature
boundary = left
function = left_function
[]
[right]
type = FunctionNeumannBC
variable = temperature
boundary = right
function = right_function
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 200
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 100
[]
[]
[Functions]
[left_function]
type = ParsedOptimizationFunction
expression = 'a + b*y'
param_symbol_names = 'a b'
param_vector_name = 'params/left'
[]
[right_function]
type = ParsedOptimizationFunction
expression = 'a'
param_symbol_names = 'a'
param_vector_name = 'params/right'
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = SteadyAndAdjoint
forward_system = nl0
adjoint_system = adjoint
line_search = none
nl_rel_tol = 1e-12
l_tol = 1e-12
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = temperature_adjoint
x_coord_name = measure_data/measurement_xcoord
y_coord_name = measure_data/measurement_ycoord
z_coord_name = measure_data/measurement_zcoord
value_name = measure_data/misfit_values
weight_name = measure_data/weight
[]
[]
[VectorPostprocessors]
[grad_bc_left]
type = SideOptimizationNeumannFunctionInnerProduct
variable = temperature_adjoint
function = left_function
boundary = left
execute_on = ADJOINT_TIMESTEP_END
[]
[grad_bc_right]
type = SideOptimizationNeumannFunctionInnerProduct
variable = temperature_adjoint
function = right_function
boundary = right
execute_on = ADJOINT_TIMESTEP_END
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
measurement_file = 'measurementData.csv'
file_xcoord = 'coordx'
file_ycoord ='y'
file_zcoord = 'z'
file_value = 'weightedMeasurement'
file_variable_weights = 'weight'
variable_weight_names = 'weight'
[]
[params]
type = ConstantReporter
real_vector_names = 'left right'
real_vector_values = '0 0; 0' # Dummy
[]
[vector_sqsum]
type = ParsedVectorRealReductionReporter
name = sqsum
reporter_name= 'measure_data/misfit_values'
initial_value = 0
expression = 'reduction_value+indexed_value*indexed_value'
outputs=none
[]
[obj_sum]
type = ParsedScalarReporter
name = value
reporter_names = 'vector_sqsum/sqsum'
reporter_symbols = 'a'
expression = '0.5*a'
[]
[]
[Outputs]
console = false
exodus = true
[]
(modules/optimization/test/tests/executioners/constrained/inequality/forward_and_adjoint.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 20
xmax = 1
ymax = 1
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
kernel_coverage_check = false
[]
[Variables]
[temperature]
[]
[temperature_adjoint]
nl_sys = adjoint
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[]
[BCs]
[left]
type = FunctionNeumannBC
variable = temperature
boundary = left
function = left_function
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 200
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 100
[]
[]
[Functions]
[left_function]
type = ParsedOptimizationFunction
expression = 'a + b*y'
param_symbol_names = 'a b'
param_vector_name = 'params/left'
[]
[dc_db]
type = ParsedFunction
expression = 'y'
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = SteadyAndAdjoint
forward_system = nl0
adjoint_system = adjoint
line_search = none
nl_rel_tol = 1e-12
l_tol = 1e-12
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = temperature_adjoint
x_coord_name = measure_data/measurement_xcoord
y_coord_name = measure_data/measurement_ycoord
z_coord_name = measure_data/measurement_zcoord
value_name = measure_data/misfit_values
[]
[]
[VectorPostprocessors]
[grad_bc_left]
type = SideOptimizationNeumannFunctionInnerProduct
variable = temperature_adjoint
function = left_function
boundary = left
execute_on = ADJOINT_TIMESTEP_END
[]
[]
[Postprocessors]
[sum]
type = FunctionSideIntegral
boundary = left
function = left_function
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
[]
[params]
type = ConstantReporter
real_vector_names = 'left'
real_vector_values = '0 0' # Dummy
execute_on = NONE
[]
[]
[Outputs]
console = false
exodus = false
json = true
[]
#---------Inequality constraints------------#
[VectorPostprocessors]
[gradient_c]
type = VectorOfPostprocessors
postprocessors = 'dc_da dc_db'
[]
[ineq]
type = VectorOfPostprocessors
postprocessors = 'constraint'
[]
[]
[Postprocessors]
[constraint]
type = ParsedPostprocessor
function = '150 - sum' # 150 is the constraint we want to satisfy
pp_names = sum
[]
[dc_da]
type = FunctionSideIntegral
boundary = left
function = -1
[]
[dc_db]
type = FunctionSideIntegral
boundary = left
function = '-y'
[]
[]
(test/tests/auxkernels/mesh_integer/dg_mesh_integer.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 5
ny = 5
extra_element_integers = 'material_id'
[]
[set_material_id0]
type = SubdomainBoundingBoxGenerator
input = gmg
bottom_left = '0 0 0'
top_right = '0.8 0.6 0'
block_id = 0
location = INSIDE
integer_name = material_id
[]
[set_material_id1]
type = SubdomainBoundingBoxGenerator
input = set_material_id0
bottom_left = '0 0 0'
top_right = '0.8 0.6 0'
block_id = 1
location = OUTSIDE
integer_name = material_id
[]
[]
[Variables]
[u]
family = L2_LAGRANGE
order = FIRST
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = dc
[]
[timederivative]
type = TimeDerivative
variable = u
[]
[sourceterm]
type = BodyForce
variable = u
function = 1
[]
[]
[DGKernels]
[dg_diff]
type = DGDiffusion
variable = u
diff = dc
epsilon = -1
sigma = 6
[]
[]
[AuxVariables]
[id]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[id]
type = ElementIntegerAux
variable = id
integer_names = material_id
[]
[]
[BCs]
[vacuum]
type = VacuumBC
variable = u
boundary = 'right left top bottom'
[]
[]
[Materials]
[dc]
type = ConstantIDMaterial
prop_name = dc
prop_values = '1 2'
id_name = material_id
[]
[]
[Postprocessors]
[unorm]
type = ElementL2Norm
variable = u
[]
[]
[Executioner]
type = Transient
end_time = 0.1
dt = 0.01
nl_abs_tol = 1.e-15
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/materials/functor_properties/traditional-mat-props.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[diff_u]
type = MatDiffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = 'left'
value = 1
[]
[right]
type = DirichletBC
variable = u
boundary = 'right'
value = 0
[]
[]
[Materials]
[block0]
type = GenericConstantMaterial
block = '0'
prop_names = 'D'
prop_values = '4'
[]
[block1]
type = GenericConstantMaterial
block = '1'
prop_names = 'D'
prop_values = '2'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[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/interfacekernels/hybrid/interface.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 40
xmax = 2
ny = 40
ymax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0.5 0.5 0'
top_right = '1.5 1.5 0'
block_id = 1
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '1'
paired_block = '0'
new_boundary = 'primary1_interface'
[]
[]
[Variables]
[u]
block = 0
[]
[v]
block = 1
[]
[]
[Kernels]
[diff_u]
type = MatDiffusion
variable = u
diffusivity = D
block = 0
[]
[diff_v]
type = MatDiffusion
variable = v
diffusivity = D
block = 1
[]
[source_u]
type = BodyForce
variable = u
value = 1
block = 0
[]
[source_v]
type = BodyForce
variable = v
value = 1
block = 1
[]
[]
[BCs]
[u]
type = VacuumBC
variable = u
boundary = 'left bottom right top'
[]
[interface_bc]
type = ADMatchedValueBC
variable = v
v = u
boundary = primary1_interface
[]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
[InterfaceKernels]
active = 'diffusion'
[./diffusion]
type = InterfaceDiffusion
variable = v
neighbor_var = u
boundary = primary1_interface
D = 'D'
D_neighbor = 'D'
[../]
[./penalty]
type = PenaltyInterfaceDiffusion
variable = v
neighbor_var = u
boundary = primary1_interface
penalty = 1e3
[../]
[]
[Materials]
[mat0]
type = GenericConstantMaterial
prop_names = 'D'
prop_values = '1'
block = 0
[]
[mat1]
type = GenericConstantMaterial
prop_names = 'D'
prop_values = '1'
block = 1
[]
[]
[AuxVariables]
[c][]
[]
[AuxKernels]
[u]
type = ParsedAux
variable = c
coupled_variables = 'u'
expression = 'u'
block = 0
[]
[v]
type = ParsedAux
variable = c
coupled_variables = 'v'
expression = 'v'
block = 1
[]
[]
(modules/stochastic_tools/test/tests/userobjects/inverse_mapping/inverse_map.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmax = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[v_pod]
[]
[v_aux]
[]
[v_aux_pod]
[]
[]
[Kernels]
[diffusion_v]
type = MatDiffusion
variable = v
diffusivity = D_v
[]
[source_v]
type = BodyForce
variable = v
value = 1.0
[]
[]
[AuxKernels]
[func_aux]
type = FunctionAux
variable = v_aux
function = v_aux_func
[]
[]
[Functions]
[v_aux_func]
type = ParsedFunction
expression = 'S * x + D'
symbol_names = 'S D'
symbol_values = '2 5'
[]
[]
[Materials]
[diffusivity_v]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 2.0
[]
[]
[BCs]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 5
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[UserObjects]
[im]
type = InverseMapping
mapping = pod
surrogate = "polyreg_v polyreg_v_aux"
variable_to_fill = "v_pod v_aux_pod"
variable_to_reconstruct = "v v_aux"
parameters = '2 5'
execute_on = TIMESTEP_END
[]
[]
[Surrogates]
[polyreg_v]
type = PolynomialRegressionSurrogate
filename = "create_mapping_main_rom_polyreg_v.rd"
[]
[polyreg_v_aux]
type = PolynomialRegressionSurrogate
filename = "create_mapping_main_rom_polyreg_v_aux.rd"
[]
[]
[VariableMappings]
[pod]
type = PODMapping
filename = "create_mapping_main_mapping_pod_mapping.rd"
num_modes_to_compute = 2
[]
[]
[Postprocessors]
[error_v]
type = ElementL2Difference
variable = v
other_variable = v_pod
execute_on = FINAL
outputs = csv_errors
[]
[error_v_aux]
type = ElementL2Difference
variable = v_aux
other_variable = v_aux_pod
execute_on = FINAL
outputs = csv_errors
[]
[]
[Outputs]
exodus = true
execute_on = 'FINAL'
[csv_errors]
type = CSV
[]
[]
(modules/phase_field/test/tests/MultiSmoothCircleIC/multismoothcircleIC_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 15
ny = 15
nz = 15
xmin = 0
xmax = 100
ymin = 0
ymax = 100
zmin = 0
zmax = 100
elem_type = HEX8
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./c]
type = MultiSmoothCircleIC
variable = c
invalue = 1.0
outvalue = 0.0001
bubspac = 30.0 # This spacing is from bubble center to bubble center
numbub = 6
radius = 10.0
int_width = 12.0
radius_variation = 0.2
radius_variation_type = uniform
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./diff]
type = MatDiffusion
variable = c
diffusivity = D_v
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y z'
[../]
[../]
[]
[Materials]
[./Dv]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 0.074802
[../]
[]
[Postprocessors]
[./bubbles]
type = FeatureFloodCount
variable = c
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -mat_mffd_type'
petsc_options_value = 'hypre boomeramg 101 ds'
l_max_its = 20
l_tol = 1e-4
nl_max_its = 20
nl_rel_tol = 1e-9
nl_abs_tol = 1e-11
start_time = 0.0
num_steps = 1
dt = 100.0
[./Adaptivity]
refine_fraction = .5
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/interfacekernels/1d_interface/reaction_1D_steady.i)
# Steady-state test for the InterfaceReaction kernel.
#
# Specie M transport from domain 1 (0<=x<=1) to domain 2 (1<x<=2),
# u and v are concentrations in domain 1 and domain 2.
#
# Diffusion in both domains can be described by Ficks law and diffusion
# kernel is applied.
#
# Specie M has different diffusity in different domains, here set as D1=4, D2=2.
#
# Dirichlet boundary conditions are applied, i.e., u(0)=1, v(2)=0
#
# At the interface consider the following
#
# (a) Fluxes are matched from both domains (InterfaceDiffusion kernel)
#
# (b) First-order reaction is R = kf*u - kb*v
#
# Analytical solution is
# u = -0.2*u+1, 0<=u<=1
# v = -0.4*v+0.8, 1<v<=2
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'subdomain1'
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = '0'
[../]
[./v]
order = FIRST
family = LAGRANGE
block = '1'
[../]
[]
[Kernels]
[./diff_u]
type = MatDiffusion
variable = u
block = '0'
diffusivity = D
[../]
[./diff_v]
type = MatDiffusion
variable = v
block = '1'
diffusivity = D
[../]
[]
[InterfaceKernels]
[./interface]
type = InterfaceDiffusion
variable = u
neighbor_var = 'v'
boundary = 'primary0_interface'
D = D
D_neighbor = D
[../]
[./interface_reaction]
type = InterfaceReaction
variable = u
neighbor_var = 'v'
boundary = 'primary0_interface'
kf = 1 # Forward reaction rate coefficient
kb = 2 # Backward reaction rate coefficient
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left'
value = 1
[../]
[./right]
type = DirichletBC
variable = v
boundary = 'right'
value = 0
[../]
[]
[Materials]
[./block0]
type = GenericConstantMaterial
block = '0'
prop_names = 'D'
prop_values = '4'
[../]
[./block1]
type = GenericConstantMaterial
block = '1'
prop_names = 'D'
prop_values = '2'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_rel_tol = 1e-10
[]
[Outputs]
print_linear_residuals = true
execute_on = 'FINAL'
exodus = true
csv = true
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[./elemental_error_u]
type = ElementL2Error
function = -0.2*x+1
variable = 'u'
block = '0'
[../]
[./elemental_error_v]
type = ElementL2Error
function = -0.4*x+0.8
variable = 'v'
block = '1'
[../]
[]
(modules/phase_field/test/tests/SoretDiffusion/split_temp.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 60
xmax = 500
elem_type = EDGE
[]
[GlobalParams]
polynomial_order = 8
[]
[Variables]
[./c]
[../]
[./w]
scaling = 1.0e2
[../]
[./T]
initial_condition = 1000.0
scaling = 1.0e5
[../]
[]
[ICs]
[./c_IC]
type = SmoothCircleIC
x1 = 125.0
y1 = 0.0
radius = 60.0
invalue = 1.0
outvalue = 0.1
int_width = 100.0
variable = c
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
kappa_name = kappa
w = w
f_name = F
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./w_res_soret]
type = SoretDiffusion
variable = w
c = c
T = T
diff_name = D
Q_name = Qstar
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./HtCond]
type = MatDiffusion
variable = T
diffusivity = thermal_conductivity
[../]
[]
[BCs]
[./Left_T]
type = DirichletBC
variable = T
boundary = left
value = 1000.0
[../]
[./Right_T]
type = DirichletBC
variable = T
boundary = right
value = 1015.0
[../]
[]
[Materials]
[./Copper]
type = PFParamsPolyFreeEnergy
block = 0
c = c
T = T # K
int_width = 60.0
length_scale = 1.0e-9
time_scale = 1.0e-9
D0 = 3.1e-5 # m^2/s, from Brown1980
Em = 0.71 # in eV, from Balluffi1978 Table 2
Ef = 1.28 # in eV, from Balluffi1978 Table 2
surface_energy = 0.708 # Total guess
[../]
[./thcond]
type = ParsedMaterial
block = 0
coupled_variables = 'c'
expression = 'if(c>0.7,1e-8,4e-8)'
property_name = thermal_conductivity
outputs = exodus
[../]
[./free_energy]
type = PolynomialFreeEnergy
block = 0
c = c
derivative_order = 2
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
l_max_its = 30
l_tol = 1.0e-4
nl_max_its = 25
nl_rel_tol = 1.0e-9
num_steps = 60
dt = 20.0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/slkks/full_solve.i)
#
# SLKKS two phase example for the BCC and SIGMA phases. The sigma phase contains
# multiple sublattices. Free energy from
# Jacob, Aurelie, Erwin Povoden-Karadeniz, and Ernst Kozeschnik. "Revised thermodynamic
# description of the Fe-Cr system based on an improved sublattice model of the sigma phase."
# Calphad 60 (2018): 16-28.
#
# In this simulation we consider diffusion (Cahn-Hilliard) and phase transformation.
#
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 30
ny = 1
xmin = -25
xmax = 25
[]
[]
[AuxVariables]
[Fglobal]
order = CONSTANT
family = MONOMIAL
[]
[]
[Variables]
# order parameters
[eta1]
initial_condition = 0.5
[]
[eta2]
initial_condition = 0.5
[]
# solute concentration
[cCr]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = '(x+25)/50*0.5+0.1'
[]
[]
# sublattice concentrations (good guesses are needed here! - they can be obtained
# form a static solve like in sublattice_concentrations.i)
[BCC_CR]
[InitialCondition]
type = FunctionIC
function = '(x+25)/50*0.5+0.1'
[]
[]
[SIGMA_0CR]
[InitialCondition]
type = FunctionIC
function = '(x+25)/50*0.17+0.01'
[]
[]
[SIGMA_1CR]
[InitialCondition]
type = FunctionIC
function = '(x+25)/50*0.36+0.02'
[]
[]
[SIGMA_2CR]
[InitialCondition]
type = FunctionIC
function = '(x+25)/50*0.33+0.20'
[]
[]
# Lagrange multiplier
[lambda]
[]
[]
[Materials]
# CALPHAD free energies
[F_BCC_A2]
type = DerivativeParsedMaterial
property_name = F_BCC_A2
outputs = exodus
output_properties = F_BCC_A2
expression = 'BCC_FE:=1-BCC_CR; G := 8.3145*T*(1.0*if(BCC_CR > 1.0e-15,BCC_CR*log(BCC_CR),0) + '
'1.0*if(BCC_FE > 1.0e-15,BCC_FE*plog(BCC_FE,eps),0) + 3.0*if(BCC_VA > '
'1.0e-15,BCC_VA*log(BCC_VA),0))/(BCC_CR + BCC_FE) + 8.3145*T*if(T < '
'548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + '
'311.5*BCC_CR*BCC_VA - '
'1043.0*BCC_FE*BCC_VA,-8.13674105561218e-49*T^15/(0.525599232981783*BCC_CR*BCC_FE*BCC_'
'VA*(BCC_CR - BCC_FE) - 0.894055608820709*BCC_CR*BCC_FE*BCC_VA + '
'0.298657718120805*BCC_CR*BCC_VA - BCC_FE*BCC_VA + 9.58772770853308e-13)^15 - '
'4.65558036243985e-30*T^9/(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^9 - '
'1.3485349181899e-10*T^3/(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^3 + 1 - '
'0.905299382744392*(548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'932.5*BCC_CR*BCC_FE*BCC_VA + 311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA + '
'1.0e-9)/T,if(T < -548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'932.5*BCC_CR*BCC_FE*BCC_VA - 311.5*BCC_CR*BCC_VA + '
'1043.0*BCC_FE*BCC_VA,-8.13674105561218e-49*T^15/(-0.525599232981783*BCC_CR*BCC_FE*BCC'
'_VA*(BCC_CR - BCC_FE) + 0.894055608820709*BCC_CR*BCC_FE*BCC_VA - '
'0.298657718120805*BCC_CR*BCC_VA + BCC_FE*BCC_VA + 9.58772770853308e-13)^15 - '
'4.65558036243985e-30*T^9/(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) '
'+ 0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^9 - '
'1.3485349181899e-10*T^3/(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^3 + 1 - '
'0.905299382744392*(-548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'932.5*BCC_CR*BCC_FE*BCC_VA - 311.5*BCC_CR*BCC_VA + 1043.0*BCC_FE*BCC_VA + '
'1.0e-9)/T,if(T > -548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'932.5*BCC_CR*BCC_FE*BCC_VA - 311.5*BCC_CR*BCC_VA + 1043.0*BCC_FE*BCC_VA & '
'548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + '
'311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA < '
'0,-79209031311018.7*(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^5/T^5 - '
'3.83095660520737e+42*(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^15/T^15 - '
'1.22565886734485e+72*(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^25/T^25,if(T > '
'548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + '
'311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA & 548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - '
'BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + 311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA > '
'0,-79209031311018.7*(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^5/T^5 - '
'3.83095660520737e+42*(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^15/T^15 - '
'1.22565886734485e+72*(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^25/T^25,0))))*log((2.15*BCC_CR*BCC_FE*BCC_VA - '
'0.008*BCC_CR*BCC_VA + 2.22*BCC_FE*BCC_VA)*if(2.15*BCC_CR*BCC_FE*BCC_VA - '
'0.008*BCC_CR*BCC_VA + 2.22*BCC_FE*BCC_VA <= 0,-1.0,1.0) + 1)/(BCC_CR + BCC_FE) + '
'1.0*(BCC_CR*BCC_VA*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + '
'BCC_FE*BCC_VA*if(T >= 298.15 & T < 1811.0,77358.5*1/T - 23.5143*T*log(T) + 124.134*T '
'- 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= 1811.0 & T < '
'6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - 25383.581,0)))/(BCC_CR '
'+ BCC_FE) + 1.0*(BCC_CR*BCC_FE*BCC_VA*(500.0 - 1.5*T)*(BCC_CR - BCC_FE) + '
'BCC_CR*BCC_FE*BCC_VA*(24600.0 - 14.98*T) + BCC_CR*BCC_FE*BCC_VA*(9.15*T - '
'14000.0)*(BCC_CR - BCC_FE)^2)/(BCC_CR + BCC_FE); G/100000'
coupled_variables = 'BCC_CR'
constant_names = 'BCC_VA T eps'
constant_expressions = '1 1000 0.01'
[]
[F_SIGMA]
type = DerivativeParsedMaterial
property_name = F_SIGMA
outputs = exodus
output_properties = F_SIGMA
expression = 'SIGMA_0FE := 1-SIGMA_0CR; SIGMA_1FE := 1-SIGMA_1CR; SIGMA_2FE := 1-SIGMA_2CR; G := '
'8.3145*T*(10.0*if(SIGMA_0CR > 1.0e-15,SIGMA_0CR*plog(SIGMA_0CR,eps),0) + '
'10.0*if(SIGMA_0FE > 1.0e-15,SIGMA_0FE*plog(SIGMA_0FE,eps),0) + 4.0*if(SIGMA_1CR > '
'1.0e-15,SIGMA_1CR*plog(SIGMA_1CR,eps),0) + 4.0*if(SIGMA_1FE > '
'1.0e-15,SIGMA_1FE*plog(SIGMA_1FE,eps),0) + 16.0*if(SIGMA_2CR > '
'1.0e-15,SIGMA_2CR*plog(SIGMA_2CR,eps),0) + 16.0*if(SIGMA_2FE > '
'1.0e-15,SIGMA_2FE*plog(SIGMA_2FE,eps),0))/(10.0*SIGMA_0CR + 10.0*SIGMA_0FE + '
'4.0*SIGMA_1CR + 4.0*SIGMA_1FE + 16.0*SIGMA_2CR + 16.0*SIGMA_2FE) + '
'(SIGMA_0FE*SIGMA_1CR*SIGMA_2CR*SIGMA_2FE*(-70.0*T - 170400.0) + '
'SIGMA_0FE*SIGMA_1FE*SIGMA_2CR*SIGMA_2FE*(-10.0*T - 330839.0))/(10.0*SIGMA_0CR + '
'10.0*SIGMA_0FE + 4.0*SIGMA_1CR + 4.0*SIGMA_1FE + 16.0*SIGMA_2CR + 16.0*SIGMA_2FE) + '
'(SIGMA_0CR*SIGMA_1CR*SIGMA_2CR*(30.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - '
'26.908*T*log(T) + 157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= '
'2180.0 & T < 6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) '
'+ 132000.0) + SIGMA_0CR*SIGMA_1CR*SIGMA_2FE*(-110.0*T + 16.0*if(T >= 298.15 & T < '
'1811.0,77358.5*1/T - 23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - '
'5.89269e-8*T^3.0 + 1225.7,if(T >= 1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - '
'46.0*T*log(T) + 299.31255*T - 25383.581,0)) + 14.0*if(T >= 298.15 & T < '
'2180.0,139250.0*1/T - 26.908*T*log(T) + 157.48*T + 0.00189435*T^2.0 - '
'1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < 6000.0,-2.88526e+32*T^(-9.0) - '
'50.0*T*log(T) + 344.18*T - 34869.344,0)) + 123500.0) + '
'SIGMA_0CR*SIGMA_1FE*SIGMA_2CR*(4.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 26.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 140486.0) '
'+ SIGMA_0CR*SIGMA_1FE*SIGMA_2FE*(20.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 10.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 148800.0) '
'+ SIGMA_0FE*SIGMA_1CR*SIGMA_2CR*(10.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 20.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 56200.0) + '
'SIGMA_0FE*SIGMA_1CR*SIGMA_2FE*(26.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 4.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 152700.0) '
'+ SIGMA_0FE*SIGMA_1FE*SIGMA_2CR*(14.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 16.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 46200.0) + '
'SIGMA_0FE*SIGMA_1FE*SIGMA_2FE*(30.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 173333.0))/(10.0*SIGMA_0CR + 10.0*SIGMA_0FE + 4.0*SIGMA_1CR + '
'4.0*SIGMA_1FE + 16.0*SIGMA_2CR + 16.0*SIGMA_2FE); G/100000'
coupled_variables = 'SIGMA_0CR SIGMA_1CR SIGMA_2CR'
constant_names = 'T eps'
constant_expressions = '1000 0.01'
[]
# h(eta)
[h1]
type = SwitchingFunctionMaterial
function_name = h1
h_order = HIGH
eta = eta1
[]
[h2]
type = SwitchingFunctionMaterial
function_name = h2
h_order = HIGH
eta = eta2
[]
# g(eta)
[g1]
type = BarrierFunctionMaterial
function_name = g1
g_order = SIMPLE
eta = eta1
[]
[g2]
type = BarrierFunctionMaterial
function_name = g2
g_order = SIMPLE
eta = eta2
[]
# constant properties
[constants]
type = GenericConstantMaterial
prop_names = 'D L kappa'
prop_values = '10 1 0.1 '
[]
# Coefficients for diffusion equation
[Dh1]
type = DerivativeParsedMaterial
material_property_names = 'D h1(eta1)'
expression = D*h1
property_name = Dh1
coupled_variables = eta1
derivative_order = 1
[]
[Dh2a]
type = DerivativeParsedMaterial
material_property_names = 'D h2(eta2)'
expression = D*h2*10/30
property_name = Dh2a
coupled_variables = eta2
derivative_order = 1
[]
[Dh2b]
type = DerivativeParsedMaterial
material_property_names = 'D h2(eta2)'
expression = D*h2*4/30
property_name = Dh2b
coupled_variables = eta2
derivative_order = 1
[]
[Dh2c]
type = DerivativeParsedMaterial
material_property_names = 'D h2(eta2)'
expression = D*h2*16/30
property_name = Dh2c
coupled_variables = eta2
derivative_order = 1
[]
[]
[Kernels]
#Kernels for diffusion equation
[diff_time]
type = TimeDerivative
variable = cCr
[]
[diff_c1]
type = MatDiffusion
variable = cCr
diffusivity = Dh1
v = BCC_CR
args = eta1
[]
[diff_c2a]
type = MatDiffusion
variable = cCr
diffusivity = Dh2a
v = SIGMA_0CR
args = eta2
[]
[diff_c2b]
type = MatDiffusion
variable = cCr
diffusivity = Dh2b
v = SIGMA_1CR
args = eta2
[]
[diff_c2c]
type = MatDiffusion
variable = cCr
diffusivity = Dh2c
v = SIGMA_2CR
args = eta2
[]
# enforce pointwise equality of chemical potentials
[chempot1a2a]
# The BCC phase has only one sublattice
# we tie it to the first sublattice with site fraction 10/(10+4+16) in the sigma phase
type = KKSPhaseChemicalPotential
variable = BCC_CR
cb = SIGMA_0CR
kb = '${fparse 10/30}'
fa_name = F_BCC_A2
fb_name = F_SIGMA
args_b = 'SIGMA_1CR SIGMA_2CR'
[]
[chempot2a2b]
# This kernel ties the first two sublattices in the sigma phase together
type = SLKKSChemicalPotential
variable = SIGMA_0CR
a = 10
cs = SIGMA_1CR
as = 4
F = F_SIGMA
coupled_variables = 'SIGMA_2CR'
[]
[chempot2b2c]
# This kernel ties the remaining two sublattices in the sigma phase together
type = SLKKSChemicalPotential
variable = SIGMA_1CR
a = 4
cs = SIGMA_2CR
as = 16
F = F_SIGMA
coupled_variables = 'SIGMA_0CR'
[]
[phaseconcentration]
# This kernel ties the sum of the sublattice concentrations to the global concentration cCr
type = SLKKSMultiPhaseConcentration
variable = SIGMA_2CR
c = cCr
ns = '1 3'
as = '1 10 4 16'
cs = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR'
h_names = 'h1 h2'
eta = 'eta1 eta2'
[]
# Kernels for Allen-Cahn equation for eta1
[deta1dt]
type = TimeDerivative
variable = eta1
[]
[ACBulkF1]
type = KKSMultiACBulkF
variable = eta1
Fj_names = 'F_BCC_A2 F_SIGMA'
hj_names = 'h1 h2'
gi_name = g1
eta_i = eta1
wi = 0.1
coupled_variables = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR eta2'
[]
[ACBulkC1]
type = SLKKSMultiACBulkC
variable = eta1
F = F_BCC_A2
c = BCC_CR
ns = '1 3'
as = '1 10 4 16'
cs = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR'
h_names = 'h1 h2'
eta = 'eta1 eta2'
[]
[ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa
[]
[lagrange1]
type = SwitchingFunctionConstraintEta
variable = eta1
h_name = h1
lambda = lambda
coupled_variables = 'eta2'
[]
# Kernels for Allen-Cahn equation for eta1
[deta2dt]
type = TimeDerivative
variable = eta2
[]
[ACBulkF2]
type = KKSMultiACBulkF
variable = eta2
Fj_names = 'F_BCC_A2 F_SIGMA'
hj_names = 'h1 h2'
gi_name = g2
eta_i = eta2
wi = 0.1
coupled_variables = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR eta1'
[]
[ACBulkC2]
type = SLKKSMultiACBulkC
variable = eta2
F = F_BCC_A2
c = BCC_CR
ns = '1 3'
as = '1 10 4 16'
cs = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR'
h_names = 'h1 h2'
eta = 'eta1 eta2'
[]
[ACInterface2]
type = ACInterface
variable = eta2
kappa_name = kappa
[]
[lagrange2]
type = SwitchingFunctionConstraintEta
variable = eta2
h_name = h2
lambda = lambda
coupled_variables = 'eta1'
[]
# Lagrange-multiplier constraint kernel for lambda
[lagrange]
type = SwitchingFunctionConstraintLagrange
variable = lambda
h_names = 'h1 h2'
etas = 'eta1 eta2'
epsilon = 1e-6
[]
[]
[AuxKernels]
[GlobalFreeEnergy]
type = KKSMultiFreeEnergy
variable = Fglobal
Fj_names = 'F_BCC_A2 F_SIGMA'
hj_names = 'h1 h2'
gj_names = 'g1 g2'
interfacial_vars = 'eta1 eta2'
kappa_names = 'kappa kappa'
w = 0.1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
line_search = none
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -ksp_gmres_restart'
petsc_options_value = 'asm lu nonzero 30'
l_max_its = 100
nl_max_its = 20
nl_abs_tol = 1e-10
end_time = 1000
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 12
iteration_window = 2
growth_factor = 2
cutback_factor = 0.5
dt = 0.1
[]
[]
[Postprocessors]
[F]
type = ElementIntegralVariablePostprocessor
variable = Fglobal
[]
[cmin]
type = NodalExtremeValue
value_type = min
variable = cCr
[]
[cmax]
type = NodalExtremeValue
value_type = max
variable = cCr
[]
[]
[Outputs]
exodus = true
print_linear_residuals = false
# exclude lagrange multiplier from output, it can diff more easily
hide = lambda
[]
(modules/optimization/test/tests/optimizationreporter/bimaterial/model_and_adjoint.i)
# Steady state Heat conduction in a 2D domain with two diffusivities
# The domain is -4 <= x <= 4 and -4 <= y <= 4
# The top-half of the domain (y > 0) has high diffusivity
# The bottom-half of the domain (y < 0) has low diffusivity
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 16
ny = 16
xmin = -4
xmax = 4
ymin = -4
ymax = 4
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
kernel_coverage_check = false
[]
[Variables]
[temperature]
[]
[temperature_adjoint]
nl_sys = adjoint
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = diffusivity
[]
[heat_source]
type = BodyForce
value = 100
variable = temperature
[]
[]
[BCs]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 0
[]
[]
[Functions]
[diffusivity_function]
type = NearestReporterCoordinatesFunction
x_coord_name = data/coordx
y_coord_name = data/coordy
value_name = data/diffusivity
[]
[]
[Materials]
[mat]
type = GenericFunctionMaterial
prop_names = diffusivity
prop_values = diffusivity_function
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = temperature_adjoint
x_coord_name = measure_data/measurement_xcoord
y_coord_name = measure_data/measurement_ycoord
z_coord_name = measure_data/measurement_zcoord
value_name = measure_data/misfit_values
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
[]
[data]
type = ConstantReporter
real_vector_names = 'coordx coordy diffusivity'
real_vector_values = '0 0; -2 2; 5 10'
[]
[]
[VectorPostprocessors]
[gradvec]
type = ElementOptimizationDiffusionCoefFunctionInnerProduct
variable = temperature_adjoint
forward_variable = temperature
function = diffusivity_function
execute_on = ADJOINT_TIMESTEP_END
[]
[]
[Executioner]
type = SteadyAndAdjoint
forward_system = nl0
adjoint_system = adjoint
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_forced_its = 1
line_search = none
nl_abs_tol = 1e-8
[]
[Outputs]
console = false
[]
(modules/phase_field/examples/anisotropic_interfaces/GrandPotentialSolidification.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 28
ny = 28
xmin = -7
xmax = 7
ymin = -7
ymax = 7
uniform_refine = 2
[]
[GlobalParams]
radius = 0.2
int_width = 0.1
x1 = 0.0
y1 = 0.0
derivative_order = 2
[]
[Variables]
[./w]
[../]
[./etaa0]
[../]
[./etab0]
[../]
[./T]
[../]
[]
[AuxVariables]
[./bnds]
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
v = 'etaa0 etab0'
[../]
[]
[ICs]
[./w]
type = SmoothCircleIC
variable = w
# note w = A*(c-cleq), A = 1.0, cleq = 0.0 ,i.e., w = c (in the matrix/liquid phase)
outvalue = -4.0
invalue = 0.0
[../]
[./etaa0]
type = SmoothCircleIC
variable = etaa0
#Solid phase
outvalue = 0.0
invalue = 1.0
[../]
[./etab0]
type = SmoothCircleIC
variable = etab0
#Liquid phase
outvalue = 1.0
invalue = 0.0
[../]
[]
[Kernels]
# Order parameter eta_alpha0
[./ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0'
gamma_names = 'gab'
[../]
[./ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etab0 w T'
[../]
[./ACa0_int1]
type = ACInterface2DMultiPhase1
variable = etaa0
etas = 'etab0'
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
[../]
[./ACa0_int2]
type = ACInterface2DMultiPhase2
variable = etaa0
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
[../]
[./ea0_dot]
type = TimeDerivative
variable = etaa0
[../]
# Order parameter eta_beta0
[./ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etaa0'
gamma_names = 'gab'
[../]
[./ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etaa0 w T'
[../]
[./ACb0_int1]
type = ACInterface2DMultiPhase1
variable = etab0
etas = 'etaa0'
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
[../]
[./ACb0_int2]
type = ACInterface2DMultiPhase2
variable = etab0
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
[../]
[./eb0_dot]
type = TimeDerivative
variable = etab0
[../]
#Chemical potential
[./w_dot]
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
[../]
[./Diffusion]
type = MatDiffusion
variable = w
diffusivity = Dchi
[../]
[./coupled_etaa0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[./coupled_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[./T_dot]
type = TimeDerivative
variable = T
[../]
[./CoefDiffusion]
type = Diffusion
variable = T
[../]
[./etaa0_dot_T]
type = CoefCoupledTimeDerivative
variable = T
v = etaa0
coef = -5.0
[../]
[]
[Materials]
[./ha]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0'
phase_etas = 'etaa0'
[../]
[./hb]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0'
phase_etas = 'etab0'
[../]
[./omegaa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
[../]
[./omegab]
type = DerivativeParsedMaterial
coupled_variables = 'w T'
property_name = omegab
material_property_names = 'Vm kb cbeq S Tm'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq-S*(T-Tm)'
[../]
[./rhoa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
[../]
[./rhob]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
[../]
[./kappaa]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
etaa = etaa0
etab = etab0
anisotropy_strength = 0.05
kappa_bar = 0.05
outputs = exodus
output_properties = 'kappaa'
[../]
[./kappab]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
etaa = etab0
etab = etaa0
anisotropy_strength = 0.05
kappa_bar = 0.05
outputs = exodus
output_properties = 'kappab'
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'L D chi Vm ka caeq kb cbeq gab mu S Tm'
prop_values = '33.33 1.0 0.1 1.0 10.0 0.1 10.0 0.9 4.5 10.0 1.0 5.0'
[../]
[./Mobility]
type = ParsedMaterial
property_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_tol = 1.0e-3
l_max_its = 30
nl_max_its = 15
nl_rel_tol = 1.0e-8
nl_abs_tol = 1e-10
end_time = 2.0
dtmax = 0.05
[./TimeStepper]
type = IterationAdaptiveDT
dt = 0.0005
cutback_factor = 0.7
growth_factor = 1.2
[../]
[]
[Adaptivity]
initial_steps = 5
max_h_level = 3
initial_marker = err_eta
marker = err_bnds
[./Markers]
[./err_eta]
type = ErrorFractionMarker
coarsen = 0.3
refine = 0.95
indicator = ind_eta
[../]
[./err_bnds]
type = ErrorFractionMarker
coarsen = 0.3
refine = 0.95
indicator = ind_bnds
[../]
[../]
[./Indicators]
[./ind_eta]
type = GradientJumpIndicator
variable = etaa0
[../]
[./ind_bnds]
type = GradientJumpIndicator
variable = bnds
[../]
[../]
[]
[Outputs]
time_step_interval = 5
exodus = true
[]
(modules/xfem/test/tests/moving_interface/verification/1D_rz_lsdep1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: quasi-1D
# Coordinate System: rz
# Material Numbers/Types: level set dep 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# A simple transient heat transfer problem in cylindrical coordinates designed
# with the Method of Manufactured Solutions. This problem was developed to
# verify XFEM performance in the presence of a moving interface for linear
# element models that can be exactly evaluated by FEM/Moose. Both the
# temperature solution and level set function are designed to be linear to
# attempt to minimize error between the Moose/exact solution and XFEM results.
# Thermal conductivity is dependent upon the value of the level set function
# at each timestep.
# Results:
# The temperature at the left boundary (x=1) exhibits the largest difference
# between the FEM/Moose solution and XFEM results. We present the XFEM
# results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 480.0008131
# 0.6 520 520.0038333
# 0.8 560 560.0088286
# 1.0 600 600.0131612
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 1
xmin = 1.0
xmax = 2.0
ymin = 0.0
ymax = 0.5
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-200*x+400) + (1/x)*(310*t - (10/1.02)*x*t - (1/1.02)*t^2)'
[../]
[./neumann_func]
type = ParsedFunction
expression = '((0.05/2.04)*(2.04-x-0.2*t) + 1.5)*200*t'
[../]
[./k_func]
type = ParsedFunction
expression = '(0.05/2.04)*(2.04-x-0.2*t) + 1.5'
[../]
[./ls_func]
type = ParsedFunction
expression = '2.04 - x -0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericFunctionMaterial
prop_names = 'diffusion_coefficient'
prop_values = 'k_func'
[../]
[]
[BCs]
[./left_u]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 'right'
value = 400
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/optimization/test/tests/optimizationreporter/constant_heat_source/forward_nonLinear.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 2
ymax = 2
[]
[Variables]
[T]
initial_condition = 100
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = T
diffusivity = thermal_conductivity
[]
[heat_source]
type = BodyForce
function = volumetric_heat_func
variable = T
[]
[]
[BCs]
[left]
type = NeumannBC
variable = T
boundary = left
value = 0
[]
[right]
type = NeumannBC
variable = T
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = T
boundary = bottom
value = 200
[]
[top]
type = DirichletBC
variable = T
boundary = top
value = 100
[]
[]
[Functions]
[volumetric_heat_func]
type = ParsedOptimizationFunction
expression = q
param_symbol_names = 'q'
param_vector_name = 'params/q'
[]
[]
[Materials]
[steel]
type = ParsedMaterial
f_name = 'thermal_conductivity'
function = '.01*T'
args = 'T'
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'preonly lu superlu_dist'
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = T
[]
[params]
type = ConstantReporter
real_vector_names = 'q'
real_vector_values = '0' # Dummy value
[]
[]
[Outputs]
console = false
file_base = 'forward_nl'
[]
(test/tests/kernels/simple_transient_diffusion/ill_conditioned_simple_diffusion.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 2
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = MatDiffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
preset = false
boundary = left
value = 0
[../]
[./right]
type = FunctionDirichletBC
variable = u
preset = false
boundary = right
function = constant
[../]
[]
[Functions]
[constant]
type = ParsedFunction
expression = '1'
[]
[ramp]
type = ParsedFunction
expression = 't'
[]
[]
[Materials]
active = 'constant'
[constant]
type = GenericConstantMaterial
prop_names = 'D'
prop_values = '1e20'
[]
[function]
type = GenericFunctionMaterial
prop_names = 'D'
prop_values = '10^(t-1)'
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 2
dtmin = 2
solve_type = NEWTON
petsc_options = '-pc_svd_monitor -ksp_view_pmat -snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -snes_stol'
petsc_options_value = 'svd 0'
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/bouncing-block-contact/bouncing-block-ranfs.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
ping_pong_protection = true
[]
[Mesh]
file = long-bottom-block-no-lower-d.e
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[Contact]
[./top_bottom]
secondary = 10
primary = 20
model = frictionless
formulation = ranfs
[../]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[../]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = 2.5
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type -mat_mffd_err'
petsc_options_value = 'hypre boomeramg 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exo]
type = Exodus
[]
checkpoint = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[]
(test/tests/outputs/exodus/exodus_side_discontinuous.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
elem_type = QUAD9 # SIDE_HIERARCHIC needs side nodes
nx = 3
ny = 3
dim = 2
[]
[]
[Variables]
[u]
order = THIRD
family = MONOMIAL
[]
[lambda]
family = SIDE_HIERARCHIC
order = CONSTANT
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
[]
[source]
type = BodyForce
variable = u
value = '1'
[]
[]
[DGKernels]
[testjumps]
type = HFEMTestJump
variable = u
side_variable = lambda
[]
[trialjumps]
type = HFEMTrialJump
variable = lambda
interior_variable = u
[]
[]
[BCs]
[u_robin]
type = VacuumBC
boundary = 'left right top bottom'
variable = u
[]
[lambda_D_unused]
type = PenaltyDirichletBC
boundary = 'left right top bottom'
variable = lambda
penalty = 1
[]
[]
[Postprocessors]
[intu]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[]
[lambdanorm]
type = ElementSidesL2Norm
variable = lambda
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
[Outputs]
[out]
type = Exodus
discontinuous = true
side_discontinuous = true
file_base = 'exodus_side_discontinuous_out'
[]
[]
(modules/phase_field/test/tests/SoretDiffusion/direct_temp.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 30
xmax = 500
elem_type = EDGE
[]
[GlobalParams]
polynomial_order = 8
[]
[Variables]
[./c]
family = HERMITE
order = THIRD
[../]
[./T]
initial_condition = 1000.0
scaling = 1.0e5
[../]
[]
[ICs]
[./c_IC]
type = SmoothCircleIC
x1 = 125.0
y1 = 0.0
radius = 60.0
invalue = 1.0
outvalue = 0.1
int_width = 100.0
variable = c
[../]
[]
[Kernels]
[./c_int]
type = CHInterface
variable = c
kappa_name = kappa
mob_name = M
[../]
[./c_bulk]
type = CahnHilliard
variable = c
mob_name = M
f_name = F
[../]
[./c_soret]
type = SoretDiffusion
variable = c
T = T
diff_name = D
Q_name = Qstar
[../]
[./c_dot]
type = TimeDerivative
variable = c
[../]
[./HtCond]
type = MatDiffusion
variable = T
diffusivity = thermal_conductivity
[../]
[]
[BCs]
[./Left_T]
type = DirichletBC
variable = T
boundary = left
value = 1000.0
[../]
[./Right_T]
type = DirichletBC
variable = T
boundary = right
value = 1015.0
[../]
[]
[Materials]
[./Copper]
type = PFParamsPolyFreeEnergy
c = c
T = T # K
int_width = 60.0
length_scale = 1.0e-9
time_scale = 1.0e-9
D0 = 3.1e-5 # m^2/s, from Brown1980
Em = 0.71 # in eV, from Balluffi1978 Table 2
Ef = 1.28 # in eV, from Balluffi1978 Table 2
surface_energy = 0.708 # Total guess
[../]
[./thcond]
type = ParsedMaterial
coupled_variables = 'c'
expression = 'if(c>0.7,1e-8,4e-8)'
property_name = thermal_conductivity
outputs = exodus
[../]
[./free_energy]
type = PolynomialFreeEnergy
c = c
derivative_order = 3
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
l_max_its = 30
l_tol = 1.0e-4
nl_max_its = 25
nl_rel_tol = 1.0e-9
num_steps = 60
dt = 8.0
[]
[Outputs]
exodus = true
[]
(modules/xfem/test/tests/moving_interface/verification/2D_rz_lsdep1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: 2D
# Coordinate System: rz
# Material Numbers/Types: level set dep 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# Transient 2D heat transfer problem in cylindrical coordinates designed with
# the Method of Manufactured Solutions. This problem was developed to verify
# XFEM performance on linear elements in the presence of a moving interface
# sweeping across the x-y coordinates of a system with thermal conductivity
# dependent upon the transient level set function. This problem can be
# exactly evaluated by FEM/Moose without the moving interface. Both the
# temperature and level set function are designed to be linear to attempt to
# minimize the error between the Moose/exact solution and XFEM results.
# Results:
# The temperature at the bottom left boundary (x=1, y=1) exhibits the largest
# difference between the FEM/Moose solution and XFEM results. We present the
# XFEM results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 479.9998717
# 0.6 520 519.9994963
# 0.8 560 559.9989217
# 1.0 600 599.9986735
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 1.0
xmax = 2.0
ymin = 1.0
ymax = 2.0
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-100*x-100*y+400) + t*(-2.5*y/(2.04*x) + 155/x - t/(2.04*x)
- 7.5/2.04)'
[../]
[./neumann_func]
type = ParsedFunction
expression = '((0.01/2.04)*(-2.5*x-2.5*y-t)+1.55)*100*t'
[../]
[./dirichlet_right_func]
type = ParsedFunction
expression = '(-100*y+200)*t+400'
[../]
[./dirichlet_top_func]
type = ParsedFunction
expression = '(-100*x+200)*t+400'
[../]
[./k_func]
type = ParsedFunction
expression = '(0.01/2.04)*(-2.5*x-2.5*y-t) + 1.55'
[../]
[./ls_func]
type = ParsedFunction
expression = '-0.5*(x+y) + 2.04 -0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericFunctionMaterial
prop_names = 'diffusion_coefficient'
prop_values = 'k_func'
[../]
[]
[BCs]
[./left_du]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = FunctionDirichletBC
variable = u
boundary = 'right'
function = dirichlet_right_func
[../]
[./bottom_du]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = neumann_func
[../]
[./top_u]
type = FunctionDirichletBC
variable = u
boundary = 'top'
function = dirichlet_top_func
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/optimization/test/tests/outputs/exodus_optimization_steady/forward_and_adjoint_iteration_output.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 1.4
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
kernel_coverage_check = false
[]
[Variables]
[temperature]
[]
[temperature_adjoint]
nl_sys = adjoint
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = temperature
x_coord_name = 'point_source/x'
y_coord_name = 'point_source/y'
z_coord_name = 'point_source/z'
value_name = 'point_source/value'
[]
[misfit]
type = ReporterPointSource
variable = temperature_adjoint
x_coord_name = measure_data/measurement_xcoord
y_coord_name = measure_data/measurement_ycoord
z_coord_name = measure_data/measurement_zcoord
value_name = measure_data/misfit_values
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temperature
boundary = left
value = 300
[]
[right]
type = DirichletBC
variable = temperature
boundary = right
value = 300
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 300
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 300
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = SteadyAndAdjoint
forward_system = nl0
adjoint_system = adjoint
nl_rel_tol = 1e-12
l_tol = 1e-12
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[VectorPostprocessors]
[gradient]
type = PointValueSampler
points = '0.2 0.2 0
0.7 0.56 0
0.4 1 0'
variable = temperature_adjoint
sort_by = id
execute_on = ADJOINT_TIMESTEP_END
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
[]
[point_source]
type = ConstantReporter
real_vector_names = 'x y z value'
real_vector_values = '0.2 0.7 0.4;
0.2 0.56 1;
'
' 0 0 0;
-1000 120 500'
[]
[]
[Outputs]
console = false
[exodus]
type = ExodusOptimizationSteady
execute_on = 'TIMESTEP_END'
[]
[]
(modules/optimization/examples/materialTransient/forward_and_adjoint.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[]
[Variables/u]
initial_condition = 0
[]
[Kernels]
[dt]
type = TimeDerivative
variable = u
[]
[diff]
type = MatDiffusion
variable = u
diffusivity = D
[]
[src]
type = BodyForce
variable = u
value = 1
[]
[]
[BCs]
[dirichlet]
type = DirichletBC
variable = u
boundary = 'right top'
value = 0
[]
[]
[Materials]
[diffc]
type = GenericFunctionMaterial
prop_names = 'D'
prop_values = 'diffc_fun'
output_properties = 'D'
outputs = 'exodus'
[]
[]
[Functions]
[diffc_fun]
type = NearestReporterCoordinatesFunction
value_name = 'diffc_rep/D_vals'
x_coord_name = 'diffc_rep/D_x_coord'
y_coord_name = 'diffc_rep/D_y_coord'
[]
[]
[Reporters]
[diffc_rep]
type = ConstantReporter
real_vector_names = 'D_x_coord D_y_coord D_vals'
real_vector_values = '0.25 0.75 0.25 0.75;
0.25 0.25 0.75 0.75;
1 0.2 0.2 0.05' # Reference solution
outputs = none
[]
[data]
type = OptimizationData
variable = u
[]
[]
[Postprocessors]
[D1]
type = PointValue
variable = D
point = '0.25 0.25 0'
[]
[D2]
type = PointValue
variable = D
point = '0.75 0.25 0'
[]
[D3]
type = PointValue
variable = D
point = '0.25 0.75 0'
[]
[D4]
type = PointValue
variable = D
point = '0.75 0.75 0'
[]
[]
[Executioner]
type = TransientAndAdjoint
forward_system = nl0
adjoint_system = adjoint
nl_rel_tol = 1e-8
nl_abs_tol = 1e-12
l_tol = 1e-12
dt = 0.1
num_steps = 10
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
kernel_coverage_check = false
[]
[Variables]
[u_adjoint]
initial_condition = 0
nl_sys = adjoint
outputs = none
[]
[]
[DiracKernels]
[misfit]
type = ReporterTimePointSource
variable = u_adjoint
value_name = data/misfit_values
x_coord_name = data/measurement_xcoord
y_coord_name = data/measurement_ycoord
z_coord_name = data/measurement_zcoord
time_name = data/measurement_time
[]
[]
[VectorPostprocessors]
[adjoint]
type = ElementOptimizationDiffusionCoefFunctionInnerProduct
variable = u_adjoint
forward_variable = u
function = diffc_fun
execute_on = ADJOINT_TIMESTEP_END
outputs = none
[]
[]
[Outputs]
# The default exodus object executes only during the forward system solve,
# so the adjoint variable in the resulting file will show only 0.
# Unfortunately, there is no way to output the adjoint variable with Exodus.
exodus = true
console = false
[]
(tutorials/tutorial02_multiapps/step03_coupling/02_parent_picard.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[vt]
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Materials]
[diff]
type = ParsedMaterial
property_name = D
coupled_variables = 'vt'
expression = 'vt'
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 0.2
fixed_point_max_its = 10
nl_abs_tol = 1e-10
fixed_point_rel_tol = 1e-6
fixed_point_abs_tol = 1e-10
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[micro]
type = TransientMultiApp
positions = '0.15 0.15 0 0.45 0.45 0 0.75 0.75 0'
input_files = '02_sub_picard.i'
execute_on = timestep_end
output_in_position = true
[]
[]
[Transfers]
[push_u]
type = MultiAppVariableValueSampleTransfer
to_multi_app = micro
source_variable = u
variable = ut
[]
[pull_v]
type = MultiAppPostprocessorInterpolationTransfer
from_multi_app = micro
variable = vt
postprocessor = average_v
[]
[]
(modules/phase_field/test/tests/MultiSmoothCircleIC/latticesmoothcircleIC_normal_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 22
ny = 22
nz = 22
xmin = 0
xmax = 100
ymin = 0
ymax = 100
zmin = 0
zmax = 100
elem_type = HEX8
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./c]
type = LatticeSmoothCircleIC
variable = c
invalue = 1.0
outvalue = 0.0001
circles_per_side = '3 3 3'
pos_variation = 10.0
radius = 10.0
int_width = 12.0
radius_variation = 2
radius_variation_type = normal
[../]
[]
[Kernels]
active = 'ie_c diff'
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./diff]
type = MatDiffusion
variable = c
diffusivity = D_v
[../]
[]
[BCs]
[]
[Materials]
active = 'Dv'
[./Dv]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 0.074802
[../]
[]
[Postprocessors]
active = 'bubbles'
[./bubbles]
type = FeatureFloodCount
variable = c
execute_on = 'initial timestep_end'
flood_entity_type = NODAL
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -mat_mffd_type'
petsc_options_value = 'hypre boomeramg 101 ds'
l_max_its = 20
l_tol = 1e-4
nl_max_its = 20
nl_rel_tol = 1e-9
nl_abs_tol = 1e-11
start_time = 0.0
num_steps =1
dt = 100.0
[]
[Outputs]
exodus = true
[]
(test/tests/dgkernels/hfem/hfem_jacobian.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
elem_type = QUAD9 # SIDE_HIERARCHIC needs side nodes
nx = 3
ny = 3
dim = 2
[]
[]
[Variables]
[u]
order = FOURTH
family = MONOMIAL
[]
[lambda]
family = SIDE_HIERARCHIC
order = FIRST
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
[]
[source]
type = BodyForce
variable = u
value = '1'
[]
[]
[DGKernels]
[testjumps]
type = HFEMTestJump
variable = u
side_variable = lambda
[]
[trialjumps]
type = HFEMTrialJump
variable = lambda
interior_variable = u
[]
[]
[BCs]
[u_robin]
type = VacuumBC
boundary = 'left right top bottom'
variable = u
[]
[lambda_D_unused]
type = PenaltyDirichletBC
boundary = 'left right top bottom'
variable = lambda
penalty = 1
[]
[]
[Postprocessors]
[intu]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[]
[lambdanorm]
type = ElementSidesL2Norm
variable = lambda
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
(modules/optimization/test/tests/optimizationreporter/general_opt/point_loads_gen_opt/forward_homogeneous.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 1.4
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = temperature
x_coord_name = 'point_source/x'
y_coord_name = 'point_source/y'
z_coord_name = 'point_source/z'
value_name = 'point_source/value'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temperature
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = temperature
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 0
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 0
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-6
nl_rel_tol = 1e-8
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[VectorPostprocessors]
[point_source]
type = ConstantVectorPostprocessor
vector_names = 'x y z value'
value = '0.2 0.7 0.4;
0.2 0.56 1;
0 0 0;
-1000 120 500'
execute_on = LINEAR
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
measurement_points = ${measurement_points}
measurement_values = ${measurement_values}
[]
[]
[Outputs]
console = false
file_base = 'forward_homo'
[]
(modules/phase_field/test/tests/mobility_derivative/mobility_derivative_split_coupled_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmax = 30.0
ymax = 30.0
elem_type = QUAD4
[]
[Variables]
[./c]
[../]
[./w]
[../]
[./d]
[../]
[]
[ICs]
[./c_IC]
type = CrossIC
x1 = 0.0
x2 = 30.0
y1 = 0.0
y2 = 30.0
variable = c
[../]
[./d_IC]
type = BoundingBoxIC
x1 = 0.0
x2 = 15.0
y1 = 0.0
y2 = 30.0
inside = 1.0
outside = 0.0
variable = d
[../]
[]
[Kernels]
[./cres]
type = SplitCHParsed
variable = c
kappa_name = kappa_c
w = w
f_name = F
[../]
[./wres]
type = SplitCHWRes
variable = w
mob_name = M
coupled_variables = 'c d'
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./d_dot]
type = TimeDerivative
variable = d
[../]
[./d_diff]
type = MatDiffusion
variable = d
diffusivity = diffusivity
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./kappa]
type = GenericConstantMaterial
prop_names = 'kappa_c'
prop_values = '2.0'
[../]
[./mob]
type = DerivativeParsedMaterial
property_name = M
coupled_variables = 'c d'
expression = 'if(d>0.001,d,0.001)*(1-0.5*c^2)'
outputs = exodus
derivative_order = 1
[../]
[./free_energy]
type = MathEBFreeEnergy
property_name = F
c = c
[../]
[./d_diff]
type = GenericConstantMaterial
prop_names = diffusivity
prop_values = 0.1
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'BDF2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 lu 1'
l_max_its = 30
l_tol = 1.0e-4
nl_max_its = 50
nl_rel_tol = 1.0e-10
dt = 10.0
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/optimization/test/tests/optimizationreporter/bc_load_linearFunction/homogeneous_forward.i)
[Mesh]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[]
[BCs]
[left]
type = FunctionNeumannBC
variable = temperature
boundary = left
function = left_function
[]
[right]
type = FunctionNeumannBC
variable = temperature
boundary = right
function = right_function
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 0
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 0
[]
[]
[Functions]
[left_function]
type = ParsedOptimizationFunction
expression = 'a + b*y'
param_symbol_names = 'a b'
param_vector_name = 'params_left/vals'
[]
[right_function]
type = ParsedOptimizationFunction
expression = 'a'
param_symbol_names = 'a'
param_vector_name = 'params_right/vals'
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = Steady
line_search = none
solve_type = NEWTON
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'preonly lu superlu_dist'
[]
[VectorPostprocessors]
[vertical_1]
type = LineValueSampler
variable = 'temperature'
start_point = '0.2 0.0 0'
end_point = '0.2 2.0 0'
num_points = 21
sort_by = y
[]
[vertical_2]
type = LineValueSampler
variable = 'temperature'
start_point = '0.8 0.0 0'
end_point = '0.8 2.0 0'
num_points = 21
sort_by = y
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable_weight_names = weightForTemperature
variable = temperature
[]
[params_left]
type = ConstantReporter
real_vector_names = 'vals'
real_vector_values = '0 0' # Dummy
[]
[params_right]
type = ConstantReporter
real_vector_names = 'vals'
real_vector_values = '0' # Dummy
[]
[]
[Outputs]
console = false
exodus = false
file_base = 'homogenous'
[]
(modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_ktemp_1D.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
nx = 2
xmax = 2
[]
[split]
type = SubdomainBoundingBoxGenerator
input = mesh
block_id = 1
bottom_left = '1 0 0'
top_right = '2 0 0'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = split
primary_block = 1
paired_block = 0
new_boundary = 'interface0'
[]
uniform_refine = 4
[]
[Variables]
[T]
order = FIRST
family = MONOMIAL
[]
[]
[AuxVariables]
[Tbulk]
order = FIRST
family = LAGRANGE
initial_condition = 300 # K
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = T
diffusivity = conductivity
[]
[source]
type = BodyForce
variable = T
value = 1.0
[]
[]
[DGKernels]
[dg_diff]
type = DGDiffusion
variable = T
epsilon = -1
sigma = 6
diff = conductivity
exclude_boundary = 'interface0'
[]
[]
[InterfaceKernels]
[gap_var]
type = SideSetHeatTransferKernel
variable = T
neighbor_var = T
boundary = 'interface0'
Tbulk_var = Tbulk
[]
[]
[Functions]
# Defining temperature dependent fucntion for conductivity across side set
[kgap]
type = ParsedFunction
expression = 't / 200'
[]
[bc_func]
type = ConstantFunction
value = 300
[]
[exact]
type = ParsedFunction
expression = '
A := if(x < 1, -0.5, -0.25);
B := if(x < 1, -0.293209850655001, 0.0545267662299068);
C := if(x < 1, 300.206790149345, 300.19547323377);
d := -1;
A * (x+d) * (x+d) + B * (x+d) + C'
[]
[]
[BCs]
[bc_left]
type = DGFunctionDiffusionDirichletBC
boundary = 'left'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[bc_right]
type = DGFunctionDiffusionDirichletBC
boundary = 'right'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[]
[Materials]
[k0]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 1.0
block = 0
[]
[k1]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 2.0
block = 1
[]
[gap_mat]
type = SideSetHeatTransferMaterial
boundary = 'interface0'
# Using temperature dependent function for gap conductivity
conductivity_temperature_function = kgap
# Variable to evaluate conductivity with
gap_temperature = Tbulk
gap_length = 1.0
h_primary = 1
h_neighbor = 1
emissivity_primary = 1
emissivity_neighbor = 1
[]
[]
[Postprocessors]
[error]
type = ElementL2Error
variable = T
function = exact
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/optimization/test/tests/optimizationreporter/bc_load_linearFunction/adjoint.i)
[Mesh]
[]
[Variables]
[adjoint_T]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = adjoint_T
diffusivity = thermal_conductivity
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = adjoint_T
x_coord_name = misfit/measurement_xcoord
y_coord_name = misfit/measurement_ycoord
z_coord_name = misfit/measurement_zcoord
value_name = misfit/misfit_values
weight_name = misfit/weight
[]
[]
[Reporters]
[misfit]
type = OptimizationData
variable_weight_names = 'weight'
[]
[params_left]
type = ConstantReporter
real_vector_names = 'vals'
real_vector_values = '0 0' # Dummy
[]
[params_right]
type = ConstantReporter
real_vector_names = 'vals'
real_vector_values = '0' # Dummy
[]
[]
[BCs]
[left]
type = NeumannBC
variable = adjoint_T
boundary = left
value = 0
[]
[right]
type = NeumannBC
variable = adjoint_T
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = adjoint_T
boundary = bottom
value = 0
[]
[top]
type = DirichletBC
variable = adjoint_T
boundary = top
value = 0
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
line_search = none
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'preonly lu superlu_dist'
[]
[Functions]
[left_function]
type = ParsedOptimizationFunction
expression = 'a + b*y'
param_symbol_names = 'a b'
param_vector_name = 'params_left/vals'
[]
[right_function]
type = ParsedOptimizationFunction
expression = 'a'
param_symbol_names = 'a'
param_vector_name = 'params_right/vals'
[]
[]
[VectorPostprocessors]
[grad_bc_left]
type = SideOptimizationNeumannFunctionInnerProduct
variable = adjoint_T
function = left_function
boundary = left
[]
[grad_bc_right]
type = SideOptimizationNeumannFunctionInnerProduct
variable = adjoint_T
function = right_function
boundary = right
[]
[]
[Outputs]
console = false
exodus = false
file_base = 'adjoint'
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/unstabilized-velocity-component-objects.i)
[Mesh]
file = '2d_cone.msh'
coord_type = RZ
[]
[Variables]
[vel_x]
order = SECOND
[]
[vel_y]
order = SECOND
[]
[p][]
[]
[Kernels]
[momentum_x_time]
type = TimeDerivative
variable = vel_x
[]
[momentum_x_convection]
type = ADAdvection
variable = vel_x
velocity = 'velocity'
[]
[momentum_x_diffusion]
type = MatDiffusion
variable = vel_x
diffusivity = 1
[]
[momentum_x_diffusion_rz]
type = ADMomentumViscousRZ
variable = vel_x
mu_name = 1
component = 0
[]
[momentum_x_pressure]
type = PressureGradient
integrate_p_by_parts = true
variable = vel_x
pressure = p
component = 0
[]
[momentum_y_time]
type = TimeDerivative
variable = vel_y
[]
[momentum_y_convection]
type = ADAdvection
variable = vel_y
velocity = 'velocity'
[]
[momentum_y_diffusion]
type = MatDiffusion
variable = vel_y
diffusivity = 1
[]
[momentum_y_diffusion_rz]
type = ADMomentumViscousRZ
variable = vel_y
mu_name = 1
component = 1
[]
[momentum_y_pressure]
type = PressureGradient
integrate_p_by_parts = true
variable = vel_y
pressure = p
component = 1
[]
[mass]
type = ADMassAdvection
variable = p
vel_x = vel_x
vel_y = vel_y
[]
[]
[BCs]
[u_in]
type = DirichletBC
boundary = bottom
variable = vel_x
value = 0
[]
[v_in]
type = FunctionDirichletBC
boundary = bottom
variable = vel_y
function = 'inlet_func'
[]
[u_axis_and_walls]
type = DirichletBC
boundary = 'left right'
variable = vel_x
value = 0
[]
[v_no_slip]
type = DirichletBC
boundary = 'right'
variable = vel_y
value = 0
[]
[]
[Materials]
[vel]
type = ADVectorFromComponentVariablesMaterial
vector_prop_name = 'velocity'
u = vel_x
v = vel_y
[]
[]
[Functions]
[inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[]
[]
[Executioner]
type = Transient
dt = 0.005
dtmin = 0.005
num_steps = 5
l_max_its = 100
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(modules/optimization/test/tests/optimizationreporter/point_loads/forward.i)
# DO NOT CHANGE THIS TEST
# this test is documented as an example in forceInv_pointLoads.md
# if this test is changed, the figures will need to be updated.
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 1.4
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = temperature
x_coord_name = 'point_source/x'
y_coord_name = 'point_source/y'
z_coord_name = 'point_source/z'
value_name = 'point_source/value'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temperature
boundary = left
value = 300
[]
[right]
type = DirichletBC
variable = temperature
boundary = right
value = 300
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 300
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 300
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-6
nl_rel_tol = 1e-8
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[VectorPostprocessors]
[point_source]
type = ConstantVectorPostprocessor
vector_names = 'x y z value'
value = '0.2 0.7 0.4;
0.2 0.56 1;
0 0 0;
-1000 120 500'
execute_on = LINEAR
[]
[vertical]
type = LineValueSampler
variable = 'temperature'
start_point = '0.5 0 0'
end_point = '0.5 1.4 0'
num_points = 21
sort_by = y
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
[]
[]
[Outputs]
console = false
file_base = 'forward'
[]
(modules/phase_field/test/tests/KKS_system/auxkernel.i)
#
# This test checks if the two phase and lagrange multiplier solutions can be replicated
# with a two order parameter approach, where the second order parameter eta2 is an
# auxiliary variable that is set as eta2 := 1 - eta1
# The solution is reproduced, but convergence is suboptimal, as important Jacobian
# terms for eta1 (that should come indirectly from eta2) are missing.
#
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmax = 5
[]
[AuxVariables]
[Fglobal]
order = CONSTANT
family = MONOMIAL
[]
# order parameter 2
[eta2]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
[]
#
# With this approach the derivative w.r.t. eta1 is lost in all terms depending on
# eta2 a potential fix would be to make eta2 a material property with derivatives.
# This would require a major rewrite of the phase field kernels, though.
#
[AuxKernels]
[eta2]
type = ParsedAux
variable = eta2
expression = '1-eta1'
coupled_variables = eta1
[]
[]
[Variables]
# concentration
[c]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = x/5
[]
[]
# order parameter 1
[eta1]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
# phase concentration 1
[c1]
order = FIRST
family = LAGRANGE
initial_condition = 0.9
[]
# phase concentration 2
[c2]
order = FIRST
family = LAGRANGE
initial_condition = 0.1
[]
[]
[Materials]
# simple toy free energies
[f1] # = fd
type = DerivativeParsedMaterial
property_name = F1
coupled_variables = 'c1'
expression = '(0.9-c1)^2'
[]
[f2] # = fm
type = DerivativeParsedMaterial
property_name = F2
coupled_variables = 'c2'
expression = '(0.1-c2)^2'
[]
# Switching functions for each phase
[h1_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta1
function_name = h1
[]
[h2_eta]
type = DerivativeParsedMaterial
material_property_names = 'h1(eta1)'
expression = '1-h1'
property_name = h2
coupled_variables = eta1
[]
# Coefficients for diffusion equation
[Dh1]
type = DerivativeParsedMaterial
material_property_names = 'D h1(eta1)'
expression = D*h1
property_name = Dh1
coupled_variables = eta1
[]
[Dh2]
type = DerivativeParsedMaterial
material_property_names = 'D h2(eta1)'
expression = 'D*h2'
property_name = Dh2
coupled_variables = eta1
[]
# Barrier functions for each phase
[g1]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta1
function_name = g1
[]
[g2]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta2
function_name = g2
[]
# constant properties
[constants]
type = GenericConstantMaterial
prop_names = 'D L kappa'
prop_values = '0.7 0.7 0.2'
[]
[]
[Kernels]
#Kernels for diffusion equation
[diff_time]
type = TimeDerivative
variable = c
[]
[diff_c1]
type = MatDiffusion
variable = c
diffusivity = Dh1
v = c1
args = eta1
[]
[diff_c2]
type = MatDiffusion
variable = c
diffusivity = Dh2
v = c2
args = eta1
[]
# Kernels for Allen-Cahn equation for eta1
[deta1dt]
type = TimeDerivative
variable = eta1
[]
[ACBulkF1]
type = KKSMultiACBulkF
variable = eta1
Fj_names = 'F1 F2'
hj_names = 'h1 h2'
gi_name = g1
eta_i = eta1
wi = 0.2
coupled_variables = 'c1 c2 eta2'
[]
[ACBulkC1]
type = KKSMultiACBulkC
variable = eta1
Fj_names = 'F1 F2'
hj_names = 'h1 h2'
cj_names = 'c1 c2'
eta_i = eta1
coupled_variables = 'eta2'
[]
[ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa
[]
# Phase concentration constraints
[chempot12]
type = KKSPhaseChemicalPotential
variable = c1
cb = c2
fa_name = F1
fb_name = F2
[]
[phaseconcentration]
type = KKSMultiPhaseConcentration
variable = c2
cj = 'c1 c2'
hj_names = 'h1 h2'
etas = 'eta1 eta2'
c = c
[]
[]
[AuxKernels]
[Fglobal_total]
type = KKSMultiFreeEnergy
Fj_names = 'F1 F2 '
hj_names = 'h1 h2 '
gj_names = 'g1 g2 '
variable = Fglobal
w = 0.2
interfacial_vars = 'eta1 eta2 '
kappa_names = 'kappa kappa'
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu '
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-11
end_time = 350
dt = 10
[]
[Preconditioning]
[full]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[c]
type = LineValueSampler
variable = c
start_point = '0 0 0'
end_point = '5 0 0'
num_points = 21
sort_by = x
[]
[]
[Outputs]
csv = true
execute_on = FINAL
[]
(test/tests/mortar/periodic_segmental_constraint/periodic_checker2d.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 1.0
ymin = -1.0
ymax = 1.0
nx = 16
ny = 16
elem_type = QUAD9
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[lowrig]
type = SubdomainBoundingBoxGenerator
input = 'left_block_id'
block_id = 2
bottom_left = '0 -1 0'
top_right = '1 0 0'
[]
[upplef]
type = SubdomainBoundingBoxGenerator
input = 'lowrig'
block_id = 3
bottom_left = '-1 0 0'
top_right = '0 1 0'
[]
[upprig]
type = SubdomainBoundingBoxGenerator
input = 'upplef'
block_id = 4
bottom_left = '0 0 0'
top_right = '1 1 0'
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = upprig
sidesets = '13'
new_block_id = '10003'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '11'
new_block_id = '10001'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_top'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = top
[]
[]
[Variables]
[u]
order = SECOND
family = LAGRANGE
[]
[epsilon]
order = SECOND
family = SCALAR
[]
[lm1]
order = FIRST
family = LAGRANGE
block = secondary_left
[]
[lm2]
order = FIRST
family = LAGRANGE
block = secondary_bottom
[]
[]
[AuxVariables]
[sigma]
order = SECOND
family = SCALAR
[]
[flux_x]
order = FIRST
family = MONOMIAL
[]
[flux_y]
order = FIRST
family = MONOMIAL
[]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 3'
execute_on = initial #timestep_end
[]
[]
[AuxKernels]
[flux_x]
type = DiffusionFluxAux
diffusivity = 'conductivity'
variable = flux_x
diffusion_variable = u
component = x
block = '1 2 3 4'
[]
[flux_y]
type = DiffusionFluxAux
diffusivity = 'conductivity'
variable = flux_y
diffusion_variable = u
component = y
block = '1 2 3 4'
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = '1 4'
[]
[diff2]
type = MatDiffusion
variable = u
block = '2 3'
diffusivity = conductivity
[]
[]
[Materials]
[k1]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 1.0
block = '1 4'
[]
[k2]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 10.0
block = '2 3'
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = EqualValueConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
variable = lm1
correct_edge_dropping = true
[]
[periodiclr]
type = PeriodicSegmentalConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm1
correct_edge_dropping = true
[]
[mortarbt]
type = EqualValueConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
variable = lm2
correct_edge_dropping = true
[]
[periodicbt]
type = PeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm2
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
full = true
type = SMP
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO 1e-15 strumpack'
solve_type = NEWTON
[]
[Postprocessors]
[max]
type = ElementExtremeValue
variable = 'flux_x'
[]
[]
[Outputs]
csv = true
[]
(modules/optimization/test/tests/optimizationreporter/general_opt/point_loads_gen_opt/forward_and_adjoint.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 1.4
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
kernel_coverage_check = false
[]
[Variables]
[temperature]
[]
[temperature_adjoint]
nl_sys = adjoint
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = temperature
x_coord_name = 'point_source/x'
y_coord_name = 'point_source/y'
z_coord_name = 'point_source/z'
value_name = 'point_source/value'
[]
[misfit]
type = ReporterPointSource
variable = temperature_adjoint
x_coord_name = measure_data/measurement_xcoord
y_coord_name = measure_data/measurement_ycoord
z_coord_name = measure_data/measurement_zcoord
value_name = measure_data/misfit_values
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temperature
boundary = left
value = 300
[]
[right]
type = DirichletBC
variable = temperature
boundary = right
value = 300
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 300
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 300
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = SteadyAndAdjoint
forward_system = nl0
adjoint_system = adjoint
nl_rel_tol = 1e-12
l_tol = 1e-12
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[VectorPostprocessors]
[gradient]
type = PointValueSampler
points = '0.2 0.2 0
0.7 0.56 0
0.4 1 0'
variable = temperature_adjoint
sort_by = id
execute_on = ADJOINT_TIMESTEP_END
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
measurement_points = '0.5 0.28 0
0.5 0.6 0
0.5 0.8 0
0.5 1.1 0'
measurement_values = '293 304 315 320'
objective_name = misfit_norm
[]
[point_source]
type = ConstantReporter
real_vector_names = 'x y z value'
real_vector_values = '0.2 0.7 0.4;
0.2 0.56 1;
0 0 0;
-1000 120 500'
[]
[]
[Outputs]
console = false
[]
(modules/xfem/test/tests/moving_interface/verification/2D_xy_lsdep1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: 2D
# Coordinate System: xy
# Material Numbers/Types: level set dep 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# Transient 2D heat transfer problem in Cartesian coordinates designed with
# the Method of Manufactured Solutions. This problem was developed to verify
# XFEM performance on linear elements in the presence of a moving interface
# sweeping across the x-y coordinates of a system with thermal conductivity
# dependent upon the transient level set function. This problem can be
# exactly evaluated by FEM/Moose without the moving interface. Both the
# temperature and level set function are designed to be linear to attempt to
# minimize the error between the Moose/exact solution and XFEM results.
# Results:
# The temperature at the bottom left boundary (x=0, y=0) exhibits the largest
# difference between the FEM/Moose solution and XFEM results. We present the
# XFEM results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 479.9998738
# 0.6 520 519.9995114
# 0.8 560 559.9989360
# 1.0 600 599.9983833
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraints]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-100*x-100*y+200)-(5*t/1.04)'
[../]
[./neumann_func]
type = ParsedFunction
expression = '((0.01/1.04)*(-2.5*x-2.5*y-t)+1.55)*100*t'
[../]
[./dirichlet_right_func]
type = ParsedFunction
expression = '(-100*y+100)*t+400'
[../]
[./dirichlet_top_func]
type = ParsedFunction
expression = '(-100*x+100)*t+400'
[../]
[./k_func]
type = ParsedFunction
expression = '(0.01/1.04)*(-2.5*x-2.5*y-t)+1.55'
[../]
[./ls_func]
type = ParsedFunction
expression = '-0.5*(x+y) + 1.04 -0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericFunctionMaterial
prop_names = 'diffusion_coefficient'
prop_values = 'k_func'
[../]
[]
[BCs]
[./left_du]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = FunctionDirichletBC
variable = u
boundary = 'right'
function = dirichlet_right_func
[../]
[./bottom_du]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = neumann_func
[../]
[./top_u]
type = FunctionDirichletBC
variable = u
boundary = 'top'
function = dirichlet_top_func
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/mortar/periodic_segmental_constraint/penalty_periodic_checker2d.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 1.0
ymin = -1.0
ymax = 1.0
nx = 16
ny = 16
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[./lowrig]
type = SubdomainBoundingBoxGenerator
input = 'left_block_id'
block_id = 2
bottom_left = '0 -1 0'
top_right = '1 0 0'
[../]
[./upplef]
type = SubdomainBoundingBoxGenerator
input = 'lowrig'
block_id = 3
bottom_left = '-1 0 0'
top_right = '0 1 0'
[../]
[./upprig]
type = SubdomainBoundingBoxGenerator
input = 'upplef'
block_id = 4
bottom_left = '0 0 0'
top_right = '1 1 0'
[../]
[left]
type = LowerDBlockFromSidesetGenerator
input = upprig
sidesets = '13'
new_block_id = '10003'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '11'
new_block_id = '10001'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_top'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = top
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[epsilon]
order = SECOND
family = SCALAR
[]
[]
[AuxVariables]
[sigma]
order = SECOND
family = SCALAR
[]
[./flux_x]
order = FIRST
family = MONOMIAL
[../]
[./flux_y]
order = FIRST
family = MONOMIAL
[../]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 3'
execute_on = initial #timestep_end
[]
[]
[AuxKernels]
[./flux_x]
type = DiffusionFluxAux
diffusivity = 'conductivity'
variable = flux_x
diffusion_variable = u
component = x
block = '1 2 3 4'
[../]
[./flux_y]
type = DiffusionFluxAux
diffusivity = 'conductivity'
variable = flux_y
diffusion_variable = u
component = y
block = '1 2 3 4'
[../]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = '1 4'
[]
[diff2]
type = MatDiffusion
variable = u
block = '2 3'
diffusivity = conductivity
[]
[]
[Materials]
[k1]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 1.0
block = '1 4'
[]
[k2]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 10.0
block = '2 3'
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = PenaltyEqualValueConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodiclr]
type = PenaltyPeriodicSegmentalConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[mortarbt]
type = PenaltyEqualValueConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodicbt]
type = PenaltyPeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[]
[Preconditioning]
[smp]
full = true
type = SMP
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
solve_type = NEWTON
[]
[Postprocessors]
[max]
type = ElementExtremeValue
variable = 'flux_x'
[]
[]
[Outputs]
csv = true
[]
(modules/xfem/test/tests/moving_interface/verification/1D_xy_discrete2mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: quasi-1D
# Coordinate System: xy
# Material Numbers/Types:discrete homog 2 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description
# A transient heat transfer problem in Cartesian coordinates designed with
# the Method of Manufactured Solutions. This problem was developed to verify
# XFEM performance in the presence of a moving interface separating two
# discrete material regions for linear element models. Both the temperature
# solution and level set function are designed to be linear to attempt to
# minimize error between the exact solution and XFEM results. Thermal
# conductivity, density, and heat capacity are homogeneous in each material
# region with a discontinuous jump in thermal flux between the two material
# regions.
# Results:
# The temperature at the left boundary is determined by the analytical
# solution, so temperature at the right boundary (x=1) should exhibit the
# largest difference between the analytical solution and XFEM results. We
# present the analytical and XFEM results at the material interface position
# and right side boundary at various times.
# Interface:
# Time Expected Temperature XFEM Calculated Temperature
# 20 746.75 746.7235521
# 40 893.05 893.0379081
# 60 1040.15 1040.1527530
#
# Right Boundary (x=1):
# Time Expected Temperature XFEM Calculated Temperature
# 20 720 719.9708681
# 40 840 839.9913293
# 60 960 960.0100886
#
# IMPORTANT NOTE:
# When running this input file, add the --allow-test-objects tag!!!
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 1
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 0.5
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = phi
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./phi]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = 'diffusion_coefficient'
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = phi
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
jump_flux = jump_flux_func
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = 'phi:=(0.75-x-0.001*t);
i:=(0.75-0.001*t);
if (phi>=0,
10*(8-x),
(7/(1-i))*((i-2)*x + (8-7*i)) )'
[../]
[./right_du_func]
type = ParsedFunction
expression = 'i:=(0.75-0.001*t);
(2.0/(1-i))*(-5+5*i+i*t-2*t)'
[../]
[./exact_u_func]
type = ParsedFunction
expression = 'phi:=(0.75-x-0.001*t);
i:=(0.75-0.001*t);
if (phi>=0,
605 - 5*x + t*(8-x),
(1/(1-i))*((-5+5*i+i*t-2*t)*x + (605-605*i+8*t-7*t*i)) )'
[../]
[./jump_flux_func]
type = ParsedFunction
expression = 'i:=(0.75-0.001*t);
k_1:=(20.0);
k_2:=(2.0);
k_1*(5+t) + (k_2/(1-i))*(-5+5*i+i*t-2*t)'
[../]
[./ls_func]
type = ParsedFunction
expression = '0.75 - x - 0.001*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'A_rhoCp B_rhoCp'
prop_values = '10 7'
[../]
[./therm_cond_prop]
type = GenericConstantMaterial
prop_names = 'A_diffusion_coefficient B_diffusion_coefficient'
prop_values = '20.0 2.0'
[../]
[./combined_rhoCp]
type = LevelSetBiMaterialReal
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = phi
prop_name = rhoCp
[../]
[./combined_diffusion_coefficient]
type = LevelSetBiMaterialReal
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = phi
prop_name = diffusion_coefficient
[../]
[]
[BCs]
[./left_u]
type = FunctionDirichletBC
variable = u
boundary = 'left'
function = exact_u_func
[../]
[./right_du]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = right_du_func
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 600
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
# petsc_options_iname = '-pc_type -pc_hypre_type'
# petsc_options_value = 'hypre boomeramg'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 20
end_time = 60.0
max_xfem_update = 2
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/phase_field/test/tests/mobility_derivative/AC_mobility_derivative_coupled_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 10
xmax = 50
ymin = 25
ymax = 50
[]
[Variables]
[./op]
[../]
[./v]
[../]
[]
[ICs]
[./op_IC]
type = SmoothCircleIC
x1 = 25.0
y1 = 25.0
radius = 15.0
invalue = 0.9
outvalue = 0.1
int_width = 3.0
variable = op
[../]
[./v_IC]
type = BoundingBoxIC
x1 = 0.0
x2 = 25.0
y1 = 0.0
y2 = 50.0
inside = 1.0
outside = 0.0
variable = v
[../]
[]
[Kernels]
[./op_dot]
type = TimeDerivative
variable = op
[../]
[./op_bulk]
type = AllenCahn
variable = op
f_name = F
mob_name = L
coupled_variables = v
[../]
[./op_interface]
type = ACInterface
variable = op
kappa_name = 1
mob_name = L
coupled_variables = v
[../]
[./v_dot]
type = TimeDerivative
variable = v
[../]
[./v_diff]
type = MatDiffusion
variable = v
diffusivity = 50.0
[../]
[]
[Materials]
[./consts]
type = DerivativeParsedMaterial
property_name = L
expression = 'l:=0.1+1*(v+op)^2; if(l<0.01, 0.01, l)'
coupled_variables = 'op v'
outputs = exodus
output_properties = 'L dL/dop dL/dv'
derivative_order = 2
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'op'
expression = '2*op^2*(1-op)^2 - 0.2*op'
derivative_order = 2
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 15
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 10
dt = 0.2
[]
[Outputs]
time_step_interval = 5
print_linear_residuals = false
exodus = true
[]
(modules/stochastic_tools/test/tests/surrogates/pod_rb/boundary/sub.i)
[Problem]
type = FEProblem
extra_tag_vectors = 'diff react bodyf dir_src dir_imp'
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 15
xmax = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = u
diffusivity = k
extra_vector_tags = 'diff'
[]
[reaction]
type = MaterialReaction
variable = u
coefficient = alpha
extra_vector_tags = 'react'
[]
[source]
type = BodyForce
variable = u
value = 1.0
extra_vector_tags = 'bodyf'
[]
[]
[Materials]
[k]
type = GenericConstantMaterial
prop_names = k
prop_values = 1.0
[]
[alpha]
type = GenericConstantMaterial
prop_names = alpha
prop_values = 1.0
[]
[]
[BCs]
[dummy_1]
type = DirichletBC
variable = u
boundary = left
value = 0
extra_vector_tags = 'dir_imp'
[]
[dummy_2]
type = DirichletBCModifier
variable = u
boundary = left
value = 1
extra_vector_tags = 'dir_src'
[]
[left]
type = DirichletBC
variable = u
boundary = left
value = 1
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
(tutorials/tutorial02_multiapps/step03_coupling/03_parent_subcycling_picard.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[vt]
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
[]
[force]
type = BodyForce
variable = u
value = 1.
[]
[td]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Materials]
[diff]
type = ParsedMaterial
property_name = D
coupled_variables = 'vt'
expression = 'vt'
[]
[]
[Executioner]
type = Transient
end_time = 2
dt = 0.2
fixed_point_max_its = 10
nl_abs_tol = 1e-10
fixed_point_rel_tol = 1e-6
fixed_point_abs_tol = 1e-10
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[MultiApps]
[micro]
type = TransientMultiApp
positions = '0.15 0.15 0 0.45 0.45 0 0.75 0.75 0'
input_files = '03_sub_subcycling_picard.i'
execute_on = timestep_end
output_in_position = true
sub_cycling = true
[]
[]
[Transfers]
[push_u]
type = MultiAppVariableValueSampleTransfer
to_multi_app = micro
source_variable = u
variable = ut
[]
[pull_v]
type = MultiAppPostprocessorInterpolationTransfer
from_multi_app = micro
variable = vt
postprocessor = average_v
[]
[]
(modules/stochastic_tools/test/tests/transfers/libtorch_nn_transfer/libtorch_drl_control_sub.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 0.0
xmax = 7.0
nx = 3
[]
[]
[Variables]
[temp]
initial_condition = 300
[]
[]
[Kernels]
[time]
type = CoefTimeDerivative
variable = temp
Coefficient = '${fparse 1.00630182*1.225}'
[]
[heat_conduc]
type = MatDiffusion
variable = temp
diffusivity = 'k'
[]
[]
[BCs]
[left_flux]
type = NeumannBC
value = 0.0
boundary = 'left'
variable = temp
[]
[dirichlet]
type = FunctionDirichletBC
function = temp_env
variable = temp
boundary = 'right'
[]
[]
[Functions]
[temp_env]
type = ParsedFunction
value = '15.0*sin(t/86400.0 *pi) + 273.0'
[]
[design_function]
type = ParsedFunction
value = '297'
[]
[reward_function]
type = ScaledAbsDifferenceDRLRewardFunction
design_function = design_function
observed_value = center_temp_tend
c1 = 1
c2 = 10
[]
[]
[Materials]
[constant]
type = GenericConstantMaterial
prop_names = 'k'
prop_values = 26.53832364
[]
[]
[Postprocessors]
[center_temp]
type = PointValue
variable = temp
point = '3.5 0.0 0.0'
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[center_temp_tend]
type = PointValue
variable = temp
point = '3.5 0.0 0.0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[env_temp]
type = FunctionValuePostprocessor
function = temp_env
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[reward]
type = FunctionValuePostprocessor
function = reward_function
execute_on = 'INITIAL TIMESTEP_END'
indirect_dependencies = 'center_temp_tend env_temp'
[]
[left_flux]
type = LibtorchControlValuePostprocessor
control_name = src_control
execute_on = 'INITIAL TIMESTEP_END'
[]
[log_prob_left_flux]
type = LibtorchDRLLogProbabilityPostprocessor
control_name = src_control
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Reporters]
[T_reporter]
type = AccumulateReporter
reporters = 'center_temp_tend/value env_temp/value reward/value left_flux/value log_prob_left_flux/value'
outputs = 'csv_out'
[]
[nn_parameters]
type = LibtorchArtificialNeuralNetParameters
control_name = src_control
outputs = json_out
[]
[]
[Controls]
[src_control]
type = LibtorchDRLControl
parameters = "BCs/left_flux/value"
responses = 'center_temp env_temp'
# keep consistent with LibtorchDRLControlTrainer
input_timesteps = 2
response_scaling_factors = '0.03 0.03'
response_shift_factors = '270 270'
action_standard_deviations = '0.1'
action_scaling_factors = 100
execute_on = 'TIMESTEP_BEGIN'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-8
start_time = 0.0
end_time = 86400
dt = 14400.0
[]
[Outputs]
[json_out]
type = JSON
execute_on = FINAL
execute_system_information_on = NONE
[]
[]
(modules/phase_field/test/tests/MultiSmoothCircleIC/multismoothcircleIC_normal_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 15
ny = 15
nz = 15
xmin = 0
xmax = 100
ymin = 0
ymax = 100
zmin = 0
zmax = 100
elem_type = HEX8
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./c]
type = MultiSmoothCircleIC
variable = c
invalue = 1.0
outvalue = 0.0001
bubspac = 30.0 # This spacing is from bubble center to bubble center
numbub = 10
radius = 10.0
int_width = 12.0
rand_seed = 2000
radius_variation = 2 #This is the standard deviation
radius_variation_type = normal
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./diff]
type = MatDiffusion
variable = c
diffusivity = D_v
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y z'
[../]
[../]
[]
[Materials]
[./Dv]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 0.074802
[../]
[]
[Postprocessors]
[./bubbles]
type = FeatureFloodCount
variable = c
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -mat_mffd_type'
petsc_options_value = 'hypre boomeramg 101 ds'
l_max_its = 20
l_tol = 1e-4
nl_max_its = 20
nl_rel_tol = 1e-9
nl_abs_tol = 1e-11
start_time = 0.0
num_steps = 1
dt = 100.0
[]
[Outputs]
exodus = true
[]
(test/tests/materials/stateful_prop/stateful_reg_template.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./dummy]
[../]
[]
[Kernels]
[./diff]
type = MatDiffusion
variable = dummy
diffusivity = dummy_prop
[../]
[]
[Materials]
[./matprop]
type = TemplateStateful
property_name = dummy_prop
[../]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/bouncing-block-contact/frictionless-weighted-gap.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[normal_lm]
block = 3
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable = normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
c = 1
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = true
nl_rel_tol = 1e-12
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(test/tests/materials/stateful_prop/stateful_reg.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[./dummy]
[../]
[]
[Kernels]
[./diff]
type = MatDiffusion
variable = dummy
diffusivity = dummy_prop
[../]
[]
[Materials]
[./matprop]
type = Stateful
property_name = dummy_prop
[../]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
exodus = true
[]
(test/tests/misc/solution_invalid/solution_invalid_recover.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmax = 1
ymax = 1
[]
[Variables]
[u]
[]
[]
# Sets solution invalid using the SolutionInvalidInterface, as diffusivity exceeds the set threshold.
[Materials]
[filter]
type = NonsafeMaterial
diffusivity = 0.5
threshold = 0.3
invalid_after_time = 1
[]
[]
[Kernels]
[du_dt]
type = TimeDerivative
variable = u
[]
[diffusion]
type = MatDiffusion
variable = u
diffusivity = diffusivity
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 1
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Problem]
type = FEProblem
allow_invalid_solution = true
immediately_print_invalid_solution = false
[]
[Executioner]
type = Transient
num_steps=3
error_on_dtmin=false
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
[]
[Reporters/solution_invalidity]
type = SolutionInvalidityReporter
[]
[Outputs]
file_base = 'solution_invalid_recover'
json = true
[]
(modules/optimization/examples/materialTransient/gradient.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[]
[Variables/u_adjoint]
initial_condition = 0
[]
[Kernels]
[dt]
type = TimeDerivative
variable = u_adjoint
[]
[diff]
type = MatDiffusion
variable = u_adjoint
diffusivity = D
[]
[]
[DiracKernels]
[misfit]
type = ReporterTimePointSource
variable = u_adjoint
value_name = data/misfit_values
x_coord_name = data/measurement_xcoord
y_coord_name = data/measurement_ycoord
z_coord_name = data/measurement_zcoord
time_name = data/measurement_time
reverse_time_end = 1
[]
[]
[BCs]
[dirichlet]
type = DirichletBC
variable = u_adjoint
boundary = 'right top'
value = 0
[]
[]
[Materials]
[diffc]
type = GenericFunctionMaterial
prop_names = 'D'
prop_values = 'diffc_fun'
[]
[]
[Functions]
[diffc_fun]
type = NearestReporterCoordinatesFunction
value_name = 'diffc_rep/D_vals'
x_coord_name = 'diffc_rep/D_x_coord'
y_coord_name = 'diffc_rep/D_y_coord'
[]
[]
[Reporters]
[diffc_rep]
type = ConstantReporter
real_vector_names = 'D_x_coord D_y_coord D_vals'
real_vector_values = '0.25 0.75 0.25 0.75;
0.25 0.25 0.75 0.75;
0.1 10 10 0.1' # Reference solution
outputs = none
[]
[data]
type = OptimizationData
[]
[]
[AuxVariables/u]
[]
[UserObjects]
[load_u]
type = AdjointSolutionUserObject
mesh = forward_out.e
system_variables = 'u'
reverse_time_end = 1
execute_on = 'timestep_begin'
[]
[]
[AuxKernels]
[u_aux]
type = SolutionAux
variable = u
solution = load_u
direct = true
execute_on = 'timestep_begin'
[]
[]
[VectorPostprocessors]
[adjoint]
type = ElementOptimizationDiffusionCoefFunctionInnerProduct
variable = u_adjoint
forward_variable = u
function = diffc_fun
reverse_time_end = 1
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
nl_rel_tol = 1e-8
nl_abs_tol = 1e-12
dt = 0.1
num_steps = 10
[]
(modules/navier_stokes/examples/laser-welding/2d-fv.i)
period=.2e-4 # s
endtime=${fparse 3 * period} # s
timestep=${fparse period / 100} # s
surfacetemp=2700 # K
bottomtemp=2700 # K
sb=5.67e-8 # W/(m^2 K^4)
advected_interp_method='upwind'
velocity_interp_method='rc'
rho='rho'
mu='mu'
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -.7e-3 # m
xmax = 0.7e-3 # m
ymin = -.35e-3 # m
ymax = 0
nx = 75
ny = 20
displacements = 'disp_x disp_y'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = vel_x
v = vel_y
pressure = pressure
use_displaced_mesh = true
disp_x = disp_x
disp_y = disp_y
[]
[]
[Problem]
extra_tag_vectors = 'e_time e_advection e_conduction e_laser e_radiation e_mesh_advection'
[]
[AuxVariables]
[mu_out]
type = MooseVariableFVReal
[]
[e_time]
type = MooseVariableFVReal
[]
[e_advection]
type = MooseVariableFVReal
[]
[e_mesh_advection]
type = MooseVariableFVReal
[]
[e_conduction]
type = MooseVariableFVReal
[]
[e_laser]
type = MooseVariableFVReal
[]
[e_radiation]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[mu_out]
type = FunctorAux
functor = mu
variable = mu_out
execute_on = timestep_end
[]
[e_time]
variable = e_time
vector_tag = e_time
v = T
execute_on = 'timestep_end'
type = TagVectorAux
[]
[e_advection]
variable = e_advection
vector_tag = e_advection
v = T
execute_on = 'timestep_end'
type = TagVectorAux
[]
[e_mesh_advection]
variable = e_mesh_advection
vector_tag = e_mesh_advection
v = T
execute_on = 'timestep_end'
type = TagVectorAux
[]
[e_conduction]
variable = e_conduction
vector_tag = e_conduction
v = T
execute_on = 'timestep_end'
type = TagVectorAux
[]
[e_laser]
variable = e_laser
vector_tag = e_laser
v = T
execute_on = 'timestep_end'
type = TagVectorAux
[]
[e_radiation]
variable = e_radiation
vector_tag = e_radiation
v = T
execute_on = 'timestep_end'
type = TagVectorAux
[]
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
[]
[vel_y]
type = INSFVVelocityVariable
[]
[T]
type = INSFVEnergyVariable
[]
[pressure]
type = INSFVPressureVariable
[]
[disp_x]
[]
[disp_y]
[]
[]
[ICs]
[T]
type = FunctionIC
variable = T
function = '${surfacetemp} + ((${surfacetemp} - ${bottomtemp}) / .35e-3) * y'
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
diffusivity = 1e6
[]
[disp_y]
type = MatDiffusion
variable = disp_y
diffusivity = 1e6
[]
[]
[FVKernels]
# pressure equation
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
use_displaced_mesh = true
boundaries_to_force = top
[]
# momentum equations
# u equation
[u_time]
type = INSFVMomentumTimeDerivative
variable = vel_x
rho = ${rho}
momentum_component = 'x'
use_displaced_mesh = true
[]
[u_advection]
type = INSFVMomentumAdvection
variable = vel_x
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
use_displaced_mesh = true
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = vel_x
mu = ${mu}
momentum_component = 'x'
use_displaced_mesh = true
[]
[u_pressure]
type = INSFVMomentumPressureFlux
variable = vel_x
momentum_component = 'x'
pressure = pressure
use_displaced_mesh = true
[]
[u_mesh_advection_volumetric]
type = INSFVMomentumMeshAdvection
variable = vel_x
momentum_component = 'x'
rho = ${rho}
disp_x = disp_x
disp_y = disp_y
add_to_a = false
use_displaced_mesh = true
[]
# v equation
[v_time]
type = INSFVMomentumTimeDerivative
variable = vel_y
rho = ${rho}
momentum_component = 'y'
use_displaced_mesh = true
[]
[v_advection]
type = INSFVMomentumAdvection
variable = vel_y
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
use_displaced_mesh = true
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = vel_y
mu = ${mu}
momentum_component = 'y'
use_displaced_mesh = true
[]
[v_pressure]
type = INSFVMomentumPressureFlux
variable = vel_y
momentum_component = 'y'
pressure = pressure
use_displaced_mesh = true
[]
[v_mesh_advection_volumetric]
type = INSFVMomentumMeshAdvection
variable = vel_y
momentum_component = 'y'
rho = ${rho}
disp_x = disp_x
disp_y = disp_y
add_to_a = false
use_displaced_mesh = true
[]
# energy equation
[temperature_time]
type = INSFVEnergyTimeDerivative
variable = T
rho = ${rho}
dh_dt = dh_dt
use_displaced_mesh = true
extra_vector_tags = 'e_time'
[]
[temperature_advection]
type = INSFVEnergyAdvection
variable = T
use_displaced_mesh = true
extra_vector_tags = 'e_advection'
[]
[temperature_conduction]
type = FVDiffusion
coeff = 'k'
variable = T
use_displaced_mesh = true
extra_vector_tags = 'e_conduction'
[]
[temperature_mesh_advection_volumetric]
type = INSFVMeshAdvection
variable = T
rho = ${rho}
disp_x = disp_x
disp_y = disp_y
advected_quantity = 'h'
use_displaced_mesh = true
extra_vector_tags = 'e_mesh_advection'
[]
[]
[FVBCs]
# momentum boundary conditions
[no_slip_x]
type = INSFVNoSlipWallBC
variable = vel_x
boundary = 'bottom right left'
function = 0
[]
[no_slip_y]
type = INSFVNoSlipWallBC
variable = vel_y
boundary = 'bottom right left'
function = 0
[]
[vapor_recoil_x]
type = INSFVVaporRecoilPressureMomentumFluxBC
variable = vel_x
boundary = 'top'
momentum_component = 'x'
rc_pressure = rc_pressure
use_displaced_mesh = true
[]
[vapor_recoil_y]
type = INSFVVaporRecoilPressureMomentumFluxBC
variable = vel_y
boundary = 'top'
momentum_component = 'y'
rc_pressure = rc_pressure
use_displaced_mesh = true
[]
# energy boundary conditions
[T_cold]
type = FVDirichletBC
variable = T
boundary = 'bottom'
value = '${bottomtemp}'
[]
[radiation_flux]
type = FVFunctorRadiativeBC
variable = T
boundary = 'top'
emissivity = '1'
Tinfinity = 300
stefan_boltzmann_constant = ${sb}
use_displaced_mesh = true
extra_vector_tags = 'e_radiation'
[]
[weld_flux]
type = FVGaussianEnergyFluxBC
variable = T
boundary = 'top'
P0 = 159.96989792079225
R = 1.25e-4
x_beam_coord = '2e-4 * sin(t * 2 * pi / ${period})'
y_beam_coord = 0
z_beam_coord = 0
use_displaced_mesh = true
extra_vector_tags = 'e_laser'
[]
[]
[BCs]
# displacement boundary conditions
[x_no_disp]
type = DirichletBC
variable = disp_x
boundary = 'bottom'
value = 0
[]
[y_no_disp]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[]
[displace_x_top]
type = INSADDisplaceBoundaryBC
boundary = 'top'
variable = 'disp_x'
velocity = 'vel'
component = 0
associated_subdomain = 0
[]
[displace_y_top]
type = INSADDisplaceBoundaryBC
boundary = 'top'
variable = 'disp_y'
velocity = 'vel'
component = 1
associated_subdomain = 0
[]
[displace_x_top_dummy]
type = INSADDummyDisplaceBoundaryIntegratedBC
boundary = 'top'
variable = 'disp_x'
velocity = 'vel'
component = 0
[]
[displace_y_top_dummy]
type = INSADDummyDisplaceBoundaryIntegratedBC
boundary = 'top'
variable = 'disp_y'
velocity = 'vel'
component = 1
[]
[]
[FunctorMaterials]
[steel]
type = AriaLaserWeld304LStainlessSteelFunctorMaterial
temperature = T
beta = 1e7
[]
[disp_vec_value_and_dot]
type = ADGenericVectorFunctorMaterial
prop_names = 'disp_vec'
prop_values = 'disp_x disp_y 0'
[]
[vel]
type = ADGenericVectorFunctorMaterial
prop_names = 'vel'
prop_values = 'vel_x vel_y 0'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type -mat_mffd_err'
petsc_options_value = 'lu NONZERO strumpack 1e-6'
[]
[]
[Executioner]
type = Transient
end_time = ${endtime}
dtmin = 1e-8
dtmax = ${timestep}
petsc_options = '-snes_converged_reason -ksp_converged_reason -options_left'
solve_type = 'PJFNK'
line_search = 'none'
nl_max_its = 12
l_max_its = 100
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 7
dt = ${timestep}
linear_iteration_ratio = 1e6
growth_factor = 1.1
[]
[]
[Outputs]
exodus = true
csv = true
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[laser_flux]
type = TagVectorSum
vector = 'e_laser'
[]
[volume_rho_cp_dT]
type = TagVectorSum
vector = 'e_time'
[]
[conduction]
type = TagVectorSum
vector = 'e_conduction'
[]
[advection]
type = TagVectorSum
vector = 'e_advection'
[]
[mesh_advection]
type = TagVectorSum
vector = 'e_mesh_advection'
[]
[radiation]
type = TagVectorSum
vector = 'e_radiation'
[]
[total_sum]
type = ParsedPostprocessor
function = 'laser_flux + volume_rho_cp_dT + advection + mesh_advection + conduction + radiation'
pp_names = 'laser_flux volume_rho_cp_dT advection mesh_advection conduction radiation'
[]
[]
(test/tests/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
[]
[]
(modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialMultiphase.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = -20
xmax = 20
ymin = -20
ymax = 20
[]
[GlobalParams]
op_num = 2
var_name_base = etab
[]
[Variables]
[./w]
[../]
[./etaa0]
[../]
[./etab0]
[../]
[./etab1]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./IC_etaa0]
type = FunctionIC
variable = etaa0
function = ic_func_etaa0
[../]
[./IC_etab0]
type = FunctionIC
variable = etab0
function = ic_func_etab0
[../]
[./IC_etab1]
type = FunctionIC
variable = etab1
function = ic_func_etab1
[../]
[./IC_w]
type = ConstantIC
value = -0.05
variable = w
[../]
[]
[Functions]
[./ic_func_etaa0]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2);0.5*(1.0-tanh((r-10.0)/sqrt(2.0)))'
[../]
[./ic_func_etab0]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2);0.5*(1.0+tanh((r-10)/sqrt(2.0)))*0.5*(1.0+tanh((y)/sqrt(2.0)))'
[../]
[./ic_func_etab1]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2);0.5*(1.0+tanh((r-10)/sqrt(2.0)))*0.5*(1.0-tanh((y)/sqrt(2.0)))'
[../]
[]
[BCs]
[]
[Kernels]
# Order parameter eta_alpha0
[./ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0 etab1'
gamma_names = 'gab gab'
[../]
[./ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etab0 etab1 w'
[../]
[./ACa0_int]
type = ACInterface
variable = etaa0
kappa_name = kappa
[../]
[./ea0_dot]
type = TimeDerivative
variable = etaa0
[../]
# Order parameter eta_beta0
[./ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etaa0 etab1'
gamma_names = 'gab gbb'
[../]
[./ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab1 w'
[../]
[./ACb0_int]
type = ACInterface
variable = etab0
kappa_name = kappa
[../]
[./eb0_dot]
type = TimeDerivative
variable = etab0
[../]
# Order parameter eta_beta1
[./ACb1_bulk]
type = ACGrGrMulti
variable = etab1
v = 'etaa0 etab0'
gamma_names = 'gab gbb'
[../]
[./ACb1_sw]
type = ACSwitching
variable = etab1
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0 w'
[../]
[./ACb1_int]
type = ACInterface
variable = etab1
kappa_name = kappa
[../]
[./eb1_dot]
type = TimeDerivative
variable = etab1
[../]
#Chemical potential
[./w_dot]
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
coupled_variables = '' # in this case chi (the susceptibility) is simply a constant
[../]
[./Diffusion]
type = MatDiffusion
variable = w
diffusivity = Dchi
args = ''
[../]
[./coupled_etaa0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0 etab1'
[../]
[./coupled_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0 etab1'
[../]
[./coupled_etab1dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab1
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0 etab1'
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[]
# enable_jit set to false in many materials to make this test start up faster.
# It is recommended to set enable_jit = true or just remove these lines for
# production runs with this model
[Materials]
[./ha]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0 etab1'
phase_etas = 'etaa0'
[../]
[./hb]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0 etab1'
phase_etas = 'etab0 etab1'
[../]
[./omegaa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
derivative_order = 2
enable_jit = false
[../]
[./omegab]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegab
material_property_names = 'Vm kb cbeq'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
derivative_order = 2
enable_jit = false
[../]
[./rhoa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
derivative_order = 2
enable_jit = false
[../]
[./rhob]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
derivative_order = 2
enable_jit = false
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'kappa_c kappa L D chi Vm ka caeq kb cbeq gab gbb mu'
prop_values = '0 1 1.0 1.0 1.0 1.0 10.0 0.1 10.0 0.9 4.5 1.5 1.0'
[../]
[./Mobility]
type = DerivativeParsedMaterial
property_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
derivative_order = 2
enable_jit = false
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 lu 1'
l_tol = 1.0e-3
nl_rel_tol = 1.0e-8
nl_abs_tol = 1e-8
num_steps = 2
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.1
[../]
[]
[Outputs]
exodus = true
[]
(modules/optimization/test/tests/optimizationreporter/general_opt/point_loads_gen_opt/adjoint.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 1.4
[]
[Variables]
[adjoint]
[]
[]
[Problem]
extra_tag_vectors = 'ref'
[]
[AuxVariables]
[residual_src]
[]
[]
[AuxKernels]
[residual_src]
type = TagVectorAux
vector_tag = 'ref'
v = 'adjoint'
variable = 'residual_src'
[]
[]
[Variables]
[adjoint]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = adjoint
diffusivity = thermal_conductivity
[]
[]
#-----every adjoint problem should have these two
[DiracKernels]
[pt]
type = ReporterPointSource
variable = adjoint
x_coord_name = misfit/measurement_xcoord
y_coord_name = misfit/measurement_ycoord
z_coord_name = misfit/measurement_zcoord
value_name = misfit/misfit_values
extra_vector_tags = 'ref'
[]
[]
[Reporters]
[misfit]
type = OptimizationData
measurement_points = ${measurement_points}
measurement_values = ${measurement_values}
[]
[]
[BCs]
[left]
type = DirichletBC
variable = adjoint
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = adjoint
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = adjoint
boundary = bottom
value = 0
[]
[top]
type = DirichletBC
variable = adjoint
boundary = top
value = 0
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-6
nl_rel_tol = 1e-8
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[VectorPostprocessors]
[gradient]
type = PointValueSampler
points = '0.2 0.2 0
0.7 0.56 0
0.4 1 0'
variable = adjoint
sort_by = id
[]
[]
[Outputs]
console = false
exodus = false
file_base = 'adjoint'
[]
(modules/stochastic_tools/examples/surrogates/cross_validation/all_sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 0.03
elem_type = EDGE3
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 10000
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 2.0
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 300
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[max]
type = NodalExtremeValue
variable = T
value_type = max
[]
[]
[Outputs]
[]
(modules/phase_field/examples/anisotropic_interfaces/GrandPotentialPlanarGrowth.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = -2
xmax = 2
ymin = -2
ymax = 2
uniform_refine = 2
[]
[GlobalParams]
x1 = -2
y1 = -2
x2 = 2
y2 = -1.5
derivative_order = 2
[]
[Variables]
[./w]
[../]
[./etaa0]
[../]
[./etab0]
[../]
[]
[AuxVariables]
[./bnds]
[../]
#Temperature
[./T]
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
v = 'etaa0 etab0'
[../]
[./T]
type = FunctionAux
function = 95.0+2.0*(y-1.0*t)
variable = T
execute_on = 'initial timestep_begin'
[../]
[]
[ICs]
[./w]
type = BoundingBoxIC
variable = w
# note w = A*(c-cleq), A = 1.0, cleq = 0.0 ,i.e., w = c (in the matrix/liquid phase)
outside = -4.0
inside = 0.0
[../]
[./etaa0]
type = BoundingBoxIC
variable = etaa0
#Solid phase
outside = 0.0
inside = 1.0
[../]
[./etab0]
type = BoundingBoxIC
variable = etab0
#Liquid phase
outside = 1.0
inside = 0.0
[../]
[]
[Kernels]
# Order parameter eta_alpha0
[./ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0'
gamma_names = 'gab'
[../]
[./ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etab0 w'
[../]
[./ACa0_int1]
type = ACInterface2DMultiPhase1
variable = etaa0
etas = 'etab0'
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
[../]
[./ACa0_int2]
type = ACInterface2DMultiPhase2
variable = etaa0
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
[../]
[./ea0_dot]
type = TimeDerivative
variable = etaa0
[../]
# Order parameter eta_beta0
[./ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etaa0'
gamma_names = 'gab'
[../]
[./ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etaa0 w'
[../]
[./ACb0_int1]
type = ACInterface2DMultiPhase1
variable = etab0
etas = 'etaa0'
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
[../]
[./ACb0_int2]
type = ACInterface2DMultiPhase2
variable = etab0
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
[../]
[./eb0_dot]
type = TimeDerivative
variable = etab0
[../]
#Chemical potential
[./w_dot]
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
[../]
[./Diffusion]
type = MatDiffusion
variable = w
diffusivity = Dchi
[../]
[./coupled_etaa0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[./coupled_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[]
[Materials]
[./ha]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0'
phase_etas = 'etaa0'
[../]
[./hb]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0'
phase_etas = 'etab0'
[../]
[./omegaa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
[../]
[./omegab]
type = DerivativeParsedMaterial
coupled_variables = 'w T'
property_name = omegab
material_property_names = 'Vm kb cbeq S Tm'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq-S*(T-Tm)'
[../]
[./rhoa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
[../]
[./rhob]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
[../]
[./kappaa]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
etaa = etaa0
etab = etab0
outputs = exodus
output_properties = 'kappaa'
[../]
[./kappab]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
etaa = etab0
etab = etaa0
outputs = exodus
output_properties = 'kappab'
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'L D chi Vm ka caeq kb cbeq gab mu S Tm'
prop_values = '1.0 1.0 0.1 1.0 10.0 0.1 10.0 0.9 4.5 10.0 1.0 100.0'
[../]
[./Mobility]
type = ParsedMaterial
property_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_tol = 1.0e-3
l_max_its = 30
nl_max_its = 15
nl_rel_tol = 1.0e-8
nl_abs_tol = 1e-8
end_time = 2.0
[./TimeStepper]
type = IterationAdaptiveDT
dt = 0.0005
cutback_factor = 0.7
growth_factor = 1.2
[../]
[]
[Adaptivity]
initial_steps = 3
max_h_level = 3
initial_marker = err_eta
marker = err_bnds
[./Markers]
[./err_eta]
type = ErrorFractionMarker
coarsen = 0.3
refine = 0.95
indicator = ind_eta
[../]
[./err_bnds]
type = ErrorFractionMarker
coarsen = 0.3
refine = 0.95
indicator = ind_bnds
[../]
[../]
[./Indicators]
[./ind_eta]
type = GradientJumpIndicator
variable = etaa0
[../]
[./ind_bnds]
type = GradientJumpIndicator
variable = bnds
[../]
[../]
[]
[Outputs]
time_step_interval = 10
exodus = true
[]
(modules/optimization/test/tests/optimizationreporter/constant_heat_source/adjoint_nonLinear.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 2
ymax = 2
[]
[Variables]
[adjoint_T]
[]
[]
[AuxVariables]
[T]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = adjoint_T
diffusivity = thermal_conductivity
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = adjoint_T
x_coord_name = misfit/measurement_xcoord
y_coord_name = misfit/measurement_ycoord
z_coord_name = misfit/measurement_zcoord
value_name = misfit/misfit_values
[]
[]
[Reporters]
[misfit]
type = OptimizationData
[]
[params]
type = ConstantReporter
real_vector_names = 'q'
real_vector_values = '0' # Dummy value
[]
[]
[BCs]
[left]
type = NeumannBC
variable = adjoint_T
boundary = left
value = 0
[]
[right]
type = NeumannBC
variable = adjoint_T
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = adjoint_T
boundary = bottom
value = 0
[]
[top]
type = DirichletBC
variable = adjoint_T
boundary = top
value = 0
[]
[]
[Materials]
[steel]
type = ParsedMaterial
f_name = 'thermal_conductivity'
function = '.01*T'
args = 'T'
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'preonly lu superlu_dist'
[]
[Functions]
[volumetric_heat_func]
type = ParsedOptimizationFunction
expression = q
param_symbol_names = 'q'
param_vector_name = 'params/q'
[]
[]
[VectorPostprocessors]
[gradient_vpp]
type = ElementOptimizationSourceFunctionInnerProduct
variable = adjoint_T
function = volumetric_heat_func
[]
[]
[Outputs]
console = false
file_base = 'adjoint_nl'
[]
(test/tests/kernels/hfem/neumann.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 3
ny = 3
dim = 2
[]
build_all_side_lowerd_mesh = true
[]
[Variables]
[u]
order = THIRD
family = MONOMIAL
block = 0
[]
[lambda]
order = CONSTANT
family = MONOMIAL
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
block = 0
[]
[reaction]
type = Reaction
variable = u
rate = '1'
block = 0
[]
[source]
type = BodyForce
variable = u
value = '1'
block = 0
[]
[]
[DGKernels]
[surface]
type = HFEMDiffusion
variable = u
lowerd_variable = lambda
[]
[]
[BCs]
[all]
type = NeumannBC
boundary = 'left right top bottom'
variable = u
[]
[]
[Postprocessors]
[intu]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[]
[lambdanorm]
type = ElementL2Norm
variable = lambda
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
[Outputs]
[out]
# we hide lambda because it may flip sign due to element
# renumbering with distributed mesh
type = Exodus
hide = lambda
[]
[]
(test/tests/kernels/ad_mat_diffusion/2d_steady_state.i)
# This test solves a 2D steady state heat equation
# The error is found by comparing to the analytical solution
# Note that the thermal conductivity, specific heat, and density in this problem
# Are set to 1, and need to be changed to the constants of the material being
# Analyzed
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmax = 2
ymax = 2
[]
[Variables]
[./T]
[../]
[]
[Kernels]
[./diff]
type = MatDiffusion
variable = T
diffusivity = 1
[../]
[]
[BCs]
[./zero]
type = DirichletBC
variable = T
boundary = 'left right bottom'
value = 0
[../]
[./top]
type = FunctionDirichletBC
variable = T
boundary = top
function = '10*sin(pi*x*0.5)'
[../]
[]
[Postprocessors]
[./nodal_error]
type = NodalL2Error
function = '10/(sinh(pi))*sin(pi*x*0.5)*sinh(pi*y*0.5)'
variable = T
outputs = console
[../]
[./elemental_error]
type = ElementL2Error
function = '10/(sinh(pi))*sin(pi*x*0.5)*sinh(pi*y*0.5)'
variable = T
outputs = console
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/optimization/test/tests/optimizationreporter/general_opt/point_loads_gen_opt/forward_and_adjoint_transfer_data.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 1.4
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
kernel_coverage_check = false
[]
[Variables]
[temperature]
[]
[temperature_adjoint]
nl_sys = adjoint
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = temperature
x_coord_name = 'point_source/x'
y_coord_name = 'point_source/y'
z_coord_name = 'point_source/z'
value_name = 'point_source/value'
[]
[misfit]
type = ReporterPointSource
variable = temperature_adjoint
x_coord_name = measure_data/measurement_xcoord
y_coord_name = measure_data/measurement_ycoord
z_coord_name = measure_data/measurement_zcoord
value_name = measure_data/misfit_values
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temperature
boundary = left
value = 300
[]
[right]
type = DirichletBC
variable = temperature
boundary = right
value = 300
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 300
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 300
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = SteadyAndAdjoint
forward_system = nl0
adjoint_system = adjoint
nl_rel_tol = 1e-12
l_tol = 1e-12
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[VectorPostprocessors]
[gradient]
type = PointValueSampler
points = '0.2 0.2 0
0.7 0.56 0
0.4 1 0'
variable = temperature_adjoint
sort_by = id
execute_on = ADJOINT_TIMESTEP_END
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
objective_name = misfit_norm
[]
[point_source]
type = ConstantReporter
real_vector_names = 'x y z value'
real_vector_values = '0.2 0.7 0.4;
0.2 0.56 1;
0 0 0;
-1000 120 500'
[]
[]
[Outputs]
console = false
[]
(modules/stochastic_tools/examples/surrogates/gaussian_process/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 0.03
elem_type = EDGE3
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 10000
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 5.0
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 300
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[avg]
type = AverageNodalVariableValue
variable = T
[]
[max]
type = NodalExtremeValue
variable = T
value_type = max
[]
[]
[Outputs]
[]
(test/tests/materials/interface_material/interface_value_material_split_mesh_stateful.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
elem_type = QUAD4
[]
[./subdomain_id]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1 0 0'
top_right = '2 2 0'
block_id = 1
[../]
[./split]
type = BreakMeshByBlockGenerator
input = subdomain_id
[../]
[]
[Variables]
[./u]
block = 0
[../]
[./v]
block = 1
[../]
[]
[Kernels]
[./diff]
type = MatDiffusion
variable = u
diffusivity = 'diffusivity'
block = 0
[../]
[./diff_v]
type = MatDiffusion
variable = v
diffusivity = 'diffusivity'
block = 1
[../]
[]
[InterfaceKernels]
[tied]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
penalty = 1e6
jump_prop_name = "average_jump"
boundary = 'interface'
[]
[]
[BCs]
[u_left]
type = DirichletBC
boundary = 'left'
variable = u
value = 1
[]
[v_right]
type = DirichletBC
boundary = 'right'
variable = v
value = 0
[]
[]
[Materials]
[./stateful1]
type = StatefulMaterial
block = 0
initial_diffusivity = 1
# outputs = all
[../]
[./stateful2]
type = StatefulMaterial
block = 1
initial_diffusivity = 2
# outputs = all
[../]
[./interface_material_avg]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = average
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
couple_old_values_and_properties = true
[../]
[./interface_material_jump_primary_minus_secondary]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = jump_primary_minus_secondary
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
couple_old_values_and_properties = true
[../]
[./interface_material_jump_secondary_minus_primary]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = jump_secondary_minus_primary
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
couple_old_values_and_properties = true
[../]
[./interface_material_jump_abs]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = jump_abs
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
couple_old_values_and_properties = true
[../]
[./interface_material_primary]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
boundary = interface
interface_value_type = primary
mat_prop_var_out_basename = diff_var
nl_var_primary = u
nl_var_secondary = v
couple_old_values_and_properties = true
[../]
[./interface_material_secondary]
type = InterfaceValueMaterial
mat_prop_primary = diffusivity
mat_prop_secondary = diffusivity
var_primary = diffusivity_var
var_secondary = diffusivity_var
mat_prop_out_basename = diff
mat_prop_var_out_basename = diff_var
boundary = interface
interface_value_type = secondary
nl_var_primary = u
nl_var_secondary = v
couple_old_values_and_properties = true
[../]
[]
[AuxKernels]
[./interface_material_avg]
type = MaterialRealAux
property = diff_average
variable = diffusivity_average
boundary = interface
[]
[./interface_material_jump_primary_minus_secondary]
type = MaterialRealAux
property = diff_jump_primary_minus_secondary
variable = diffusivity_jump_primary_minus_secondary
boundary = interface
[]
[./interface_material_jump_secondary_minus_primary]
type = MaterialRealAux
property = diff_jump_secondary_minus_primary
variable = diffusivity_jump_secondary_minus_primary
boundary = interface
[]
[./interface_material_jump_abs]
type = MaterialRealAux
property = diff_jump_abs
variable = diffusivity_jump_abs
boundary = interface
[]
[./interface_material_primary]
type = MaterialRealAux
property = diff_primary
variable = diffusivity_primary
boundary = interface
[]
[./interface_material_secondary]
type = MaterialRealAux
property = diff_secondary
variable = diffusivity_secondary
boundary = interface
[]
[./interface_material_avg_prev]
type = MaterialRealAux
property = diff_average_prev
variable = diffusivity_average_prev
boundary = interface
[]
[./interface_material_jump_primary_minus_secondary_prev]
type = MaterialRealAux
property = diff_jump_primary_minus_secondary_prev
variable = diffusivity_jump_primary_minus_secondary_prev
boundary = interface
[]
[./interface_material_jump_secondary_minus_primary_prev]
type = MaterialRealAux
property = diff_jump_secondary_minus_primary_prev
variable = diffusivity_jump_secondary_minus_primary_prev
boundary = interface
[]
[./interface_material_jump_abs_prev]
type = MaterialRealAux
property = diff_jump_abs_prev
variable = diffusivity_jump_abs_prev
boundary = interface
[]
[./interface_material_primary_prev]
type = MaterialRealAux
property = diff_primary_prev
variable = diffusivity_primary_prev
boundary = interface
[]
[./interface_material_secondary_prev]
type = MaterialRealAux
property = diff_secondary_prev
variable = diffusivity_secondary_prev
boundary = interface
[]
[diffusivity_var]
type = MaterialRealAux
property = diffusivity
variable = diffusivity_var
[]
[]
[AuxVariables]
[diffusivity_var]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_average]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_jump_primary_minus_secondary]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_jump_secondary_minus_primary]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_jump_abs]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_primary]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_secondary]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_average_prev]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_jump_primary_minus_secondary_prev]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_jump_secondary_minus_primary_prev]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_jump_abs_prev]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_primary_prev]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_secondary_prev]
family = MONOMIAL
order = CONSTANT
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
num_steps = 3
dt = 0.5
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/bouncing-block-contact/frictionless-weighted-gap-mixed-basis.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
second_order = true
patch_update_strategy = always
[]
[Variables]
[./disp_x]
block = '1 2'
order = SECOND
[../]
[./disp_y]
block = '1 2'
order = SECOND
[../]
[./normal_lm]
block = 3
[../]
[]
# [AuxVariables]
# [pid]
# order = CONSTANT
# family = MONOMIAL
# []
# []
# [AuxKernels]
# [pid]
# type = ProcessorIDAux
# variable = pid
# []
# []
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable = normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[./weighted_gap_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
c = 1
weighted_gap_uo = weighted_gap_uo
[../]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
preset = false
[../]
[./boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
preset = false
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
preset = false
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
preset = false
[../]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor -snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = false
abort_on_solve_fail = true
nl_rel_tol = 1e-12
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d-action.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[Contact]
[mortar]
primary = 'bottom_top'
secondary = 'top_bottom'
formulation = mortar
model = frictionless
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = .5
dtmin = .01
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15 1e-5'
l_max_its = 100
nl_max_its = 30
nl_abs_tol = 1e-12
nl_rel_tol = 1e-9
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = mortar_normal_lm
subdomain = 'mortar_secondary_subdomain'
execute_on = 'nonlinear timestep_end'
[]
[lambda]
type = ElementAverageValue
variable = mortar_normal_lm
block = 'mortar_secondary_subdomain'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = mortar_secondary_subdomain
variable = mortar_normal_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[]
(modules/xfem/test/tests/moving_interface/phase_transition_2d.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 11
ny = 1
xmin = 0.0
xmax = 20.0
ymin = 0.0
ymax = 5.0
elem_type = QUAD4
[]
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[velocity]
type = XFEMPhaseTransitionMovingInterfaceVelocity
diffusivity_at_positive_level_set = 5
diffusivity_at_negative_level_set = 1
equilibrium_concentration_jump = 1
value_at_interface_uo = value_uo
[]
[value_uo]
type = NodeValueAtXFEMInterface
variable = 'u'
interface_mesh_cut_userobject = 'cut_mesh'
execute_on = TIMESTEP_END
level_set_var = ls
[]
[cut_mesh]
type = InterfaceMeshCut2DUserObject
mesh_file = flat_interface_1d.e
interface_velocity_uo = velocity
heal_always = true
[]
[]
[Variables]
[u]
[]
[]
[ICs]
[ic_u]
type = FunctionIC
variable = u
function = 'if(x<5.01, 2, 1)'
[]
[]
[AuxVariables]
[ls]
order = FIRST
family = LAGRANGE
[]
[]
[Constraints]
[u_constraint]
type = XFEMEqualValueAtInterface
geometric_cut_userobject = 'cut_mesh'
use_displaced_mesh = false
variable = u
value = 2
alpha = 1e6
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[]
[time]
type = TimeDerivative
variable = u
[]
[]
[AuxKernels]
[ls]
type = MeshCutLevelSetAux
mesh_cut_user_object = cut_mesh
variable = ls
execute_on = 'TIMESTEP_BEGIN'
[]
[]
[Materials]
[diffusivity_A]
type = GenericConstantMaterial
prop_names = A_diffusion_coefficient
prop_values = 5
[]
[diffusivity_B]
type = GenericConstantMaterial
prop_names = B_diffusion_coefficient
prop_values = 1
[]
[diff_combined]
type = LevelSetBiMaterialReal
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = diffusion_coefficient
[]
[]
[BCs]
# Define boundary conditions
[left_u]
type = DirichletBC
variable = u
value = 2
boundary = left
[]
[right_u]
type = NeumannBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_tol = 1e-3
nl_max_its = 15
nl_rel_tol = 1e-9
nl_abs_tol = 1e-9
start_time = 0.0
dt = 1
num_steps = 5
max_xfem_update = 1
[]
[Outputs]
execute_on = timestep_end
exodus = true
perf_graph = true
[]
(modules/phase_field/test/tests/initial_conditions/SmoothCircleIC_3D.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 15
ny = 15
nz = 15
xmax = 50
ymax = 50
zmax = 50
elem_type = HEX8
[]
[Variables]
[./c]
[../]
[]
[ICs]
[./c]
type = SmoothCircleIC
variable = c
x1 = 25.0
y1 = 25.0
radius = 12
invalue = 1.0
outvalue = 0
int_width = 12
3D_spheres = false
z1 = 25
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./Diffusion]
type = MatDiffusion
variable = c
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y z'
[../]
[../]
[]
[Materials]
[./Diffusivity]
type = GenericConstantMaterial
prop_names = D
prop_values = 1.0
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 20
l_tol = 1.0e-5
nl_max_its = 40
nl_rel_tol = 5.0e-14
start_time = 0.0
num_steps = 1
dt = 2.0
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_1D.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
nx = 2
xmax = 2
[]
[split]
type = SubdomainBoundingBoxGenerator
input = mesh
block_id = 1
bottom_left = '1 0 0'
top_right = '2 0 0'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = split
primary_block = 1
paired_block = 0
new_boundary = 'interface0'
[]
uniform_refine = 4
[]
[Variables]
# Defining a DFEM variable to handle gap discontinuity
[T]
order = FIRST
family = MONOMIAL
[]
[]
[AuxVariables]
# Auxvariable containing bulk temperature of gap
[Tbulk]
order = FIRST
family = LAGRANGE
initial_condition = 300 # K
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = T
diffusivity = conductivity
[]
[source]
type = BodyForce
variable = T
value = 1.0
[]
[]
[DGKernels]
# DG kernel to represent diffusion accross element faces
[./dg_diff]
type = DGDiffusion
variable = T
epsilon = -1
sigma = 6
diff = conductivity
# Ignoring gap side set because no diffusion accross there
exclude_boundary = 'interface0'
[../]
[]
[InterfaceKernels]
active = 'gap'
# Heat transfer kernel using Tbulk as material
[gap]
type = SideSetHeatTransferKernel
variable = T
neighbor_var = T
boundary = 'interface0'
[]
# Heat transfer kernel using Tbulk as auxvariable
[gap_var]
type = SideSetHeatTransferKernel
variable = T
neighbor_var = T
boundary = 'interface0'
Tbulk_var = Tbulk
[]
[]
[Functions]
[bc_func]
type = ConstantFunction
value = 300
[]
[exact]
type = ParsedFunction
expression = '
A := if(x < 1, -0.5, -0.25);
B := if(x < 1, -0.293209850655001, 0.0545267662299068);
C := if(x < 1, 300.206790149345, 300.19547323377);
d := -1;
A * (x+d) * (x+d) + B * (x+d) + C'
[]
[]
[BCs]
[bc_left]
type = DGFunctionDiffusionDirichletBC
boundary = 'left'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[bc_right]
type = DGFunctionDiffusionDirichletBC
boundary = 'right'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[]
[Materials]
[k0]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 1.0
block = 0
[]
[k1]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 2.0
block = 1
[]
[gap_mat]
type = SideSetHeatTransferMaterial
boundary = 'interface0'
conductivity = 1.5
gap_length = 1.0
h_primary = 1
h_neighbor = 1
Tbulk = 300
emissivity_primary = 1
emissivity_neighbor = 1
[]
[]
[Postprocessors]
[error]
type = ElementL2Error
variable = T
function = exact
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/stochastic_tools/examples/surrogates/pod_rb/2d_multireg/sub.i)
halfa = 10
fulla = 20
[Problem]
type = FEProblem
extra_tag_vectors = 'diff0 diff1 diff2 diff3 abs0 abs1 abs2 abs3 src0 src1 src2'
[]
[Mesh]
[msh]
type = CartesianMeshGenerator
dim = 2
dx = '10 20 20 20 20 20 20 20 20'
dy = '10 20 20 20 20 20 20 20 20'
ix = '${halfa} ${fulla} ${fulla} ${fulla} ${fulla} ${fulla} ${fulla} ${fulla} ${fulla}'
iy = '${halfa} ${fulla} ${fulla} ${fulla} ${fulla} ${fulla} ${fulla} ${fulla} ${fulla}'
subdomain_id = '1 0 0 0 1 0 0 2 3
0 0 0 0 0 0 0 2 3
0 0 1 0 0 0 2 2 3
0 0 0 0 0 0 2 3 3
1 0 0 0 1 2 2 3 3
0 0 0 0 2 2 3 3 3
0 0 2 2 2 3 3 3 3
2 2 2 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3'
[]
[]
[Variables]
[psi]
[]
[]
[Kernels]
[diff0]
type = MatDiffusion
variable = psi
diffusivity = D0
extra_vector_tags = 'diff0'
block = 0
[]
[diff1]
type = MatDiffusion
variable = psi
diffusivity = D1
extra_vector_tags = 'diff1'
block = 1
[]
[diff2]
type = MatDiffusion
variable = psi
diffusivity = D2
extra_vector_tags = 'diff2'
block = 2
[]
[diff3]
type = MatDiffusion
variable = psi
diffusivity = D3
extra_vector_tags = 'diff3'
block = 3
[]
[abs0]
type = MaterialReaction
variable = psi
coefficient = absxs0
extra_vector_tags = 'abs0'
block = 0
[]
[abs1]
type = MaterialReaction
variable = psi
coefficient = absxs1
extra_vector_tags = 'abs1'
block = 1
[]
[abs2]
type = MaterialReaction
variable = psi
coefficient = absxs2
extra_vector_tags = 'abs2'
block = 2
[]
[abs3]
type = MaterialReaction
variable = psi
coefficient = absxs3
extra_vector_tags = 'abs3'
block = 3
[]
[src0]
type = BodyForce
variable = psi
value = 1
extra_vector_tags = 'src0'
block = 0
[]
[src1]
type = BodyForce
variable = psi
value = 1
extra_vector_tags = 'src1'
block = 1
[]
[src2]
type = BodyForce
variable = psi
value = 1
extra_vector_tags = 'src2'
block = 2
[]
[]
[Materials]
[D0]
type = GenericConstantMaterial
prop_names = D0
prop_values = 1
block = 0
[]
[D1]
type = GenericConstantMaterial
prop_names = D1
prop_values = 1
block = 1
[]
[D2]
type = GenericConstantMaterial
prop_names = D2
prop_values = 1
block = 2
[]
[D3]
type = GenericConstantMaterial
prop_names = D3
prop_values = 1
block = 3
[]
[absxs0]
type = GenericConstantMaterial
prop_names = absxs0
prop_values = 1
block = 0
[]
[absxs1]
type = GenericConstantMaterial
prop_names = absxs1
prop_values = 1
block = 1
[]
[absxs2]
type = GenericConstantMaterial
prop_names = absxs2
prop_values = 1
block = 2
[]
[absxs3]
type = GenericConstantMaterial
prop_names = absxs3
prop_values = 1
block = 3
[]
[]
[BCs]
[left]
type = NeumannBC
variable = psi
boundary = left
value = 0
[]
[bottom]
type = NeumannBC
variable = psi
boundary = bottom
value = 0
[]
[top]
type = DirichletBC
variable = psi
boundary = top
value = 0
[]
[right]
type = DirichletBC
variable = psi
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = linear
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Postprocessors]
[nodal_l2]
type = NodalL2Norm
variable = psi
[]
[]
[Outputs]
[]
(modules/phase_field/examples/multiphase/GrandPotential3Phase.i)
# This is an example of implementation of the multi-phase, multi-order parameter
# grand potential based phase-field model described in Phys. Rev. E, 98, 023309
# (2018). It includes 3 phases with 1 grain of each phase. This example was used
# to generate the results shown in Fig. 3 of the paper.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 60
xmin = -15
xmax = 15
[]
[Variables]
[./w]
[../]
[./etaa0]
[../]
[./etab0]
[../]
[./etad0]
[../]
[]
[ICs]
[./IC_etaa0]
type = FunctionIC
variable = etaa0
function = ic_func_etaa0
[../]
[./IC_etab0]
type = FunctionIC
variable = etab0
function = ic_func_etab0
[../]
[./IC_etad0]
type = ConstantIC
variable = etad0
value = 0.1
[../]
[./IC_w]
type = FunctionIC
variable = w
function = ic_func_w
[../]
[]
[Functions]
[./ic_func_etaa0]
type = ParsedFunction
expression = '0.9*0.5*(1.0-tanh((x)/sqrt(2.0)))'
[../]
[./ic_func_etab0]
type = ParsedFunction
expression = '0.9*0.5*(1.0+tanh((x)/sqrt(2.0)))'
[../]
[./ic_func_w]
type = ParsedFunction
expression = 0
[../]
[]
[Kernels]
# Order parameter eta_alpha0
[./ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0 etad0'
gamma_names = 'gab gad'
[../]
[./ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
coupled_variables = 'etab0 etad0 w'
[../]
[./ACa0_int]
type = ACInterface
variable = etaa0
kappa_name = kappa
[../]
[./ea0_dot]
type = TimeDerivative
variable = etaa0
[../]
# Order parameter eta_beta0
[./ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etaa0 etad0'
gamma_names = 'gab gbd'
[../]
[./ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etad0 w'
[../]
[./ACb0_int]
type = ACInterface
variable = etab0
kappa_name = kappa
[../]
[./eb0_dot]
type = TimeDerivative
variable = etab0
[../]
# Order parameter eta_delta0
[./ACd0_bulk]
type = ACGrGrMulti
variable = etad0
v = 'etaa0 etab0'
gamma_names = 'gad gbd'
[../]
[./ACd0_sw]
type = ACSwitching
variable = etad0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etab0 w'
[../]
[./ACd0_int]
type = ACInterface
variable = etad0
kappa_name = kappa
[../]
[./ed0_dot]
type = TimeDerivative
variable = etad0
[../]
#Chemical potential
[./w_dot]
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
coupled_variables = 'etaa0 etab0 etad0'
[../]
[./Diffusion]
type = MatDiffusion
variable = w
diffusivity = Dchi
args = ''
[../]
[./coupled_etaa0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob rhod'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etab0 etad0'
[../]
[./coupled_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob rhod'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etab0 etad0'
[../]
[./coupled_etad0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etad0
Fj_names = 'rhoa rhob rhod'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etab0 etad0'
[../]
[]
[Materials]
[./ha_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etaa0'
[../]
[./hb_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etab0'
[../]
[./hd_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hd
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etad0'
[../]
[./omegaa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
derivative_order = 2
[../]
[./omegab]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegab
material_property_names = 'Vm kb cbeq'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
derivative_order = 2
[../]
[./omegad]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegad
material_property_names = 'Vm kd cdeq'
expression = '-0.5*w^2/Vm^2/kd-w/Vm*cdeq'
derivative_order = 2
[../]
[./rhoa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
derivative_order = 2
[../]
[./rhob]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
derivative_order = 2
[../]
[./rhod]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhod
material_property_names = 'Vm kd cdeq'
expression = 'w/Vm^2/kd + cdeq/Vm'
derivative_order = 2
[../]
[./c]
type = ParsedMaterial
material_property_names = 'Vm rhoa rhob rhod ha hb hd'
expression = 'Vm * (ha * rhoa + hb * rhob + hd * rhod)'
property_name = c
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'kappa_c kappa L D Vm ka caeq kb cbeq kd cdeq gab gad gbd mu tgrad_corr_mult'
prop_values = '0 1 1.0 1.0 1.0 10.0 0.1 10.0 0.9 10.0 0.5 1.5 1.5 1.5 1.0 0.0'
[../]
[./Mobility]
type = DerivativeParsedMaterial
property_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
derivative_order = 2
[../]
[./chi]
type = DerivativeParsedMaterial
property_name = chi
material_property_names = 'Vm ha(etaa0,etab0,etad0) ka hb(etaa0,etab0,etad0) kb hd(etaa0,etab0,etad0) kd'
expression = '(ha/ka + hb/kb + hd/kd) / Vm^2'
coupled_variables = 'etaa0 etab0 etad0'
derivative_order = 2
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[VectorPostprocessors]
[./etaa0]
type = LineValueSampler
variable = etaa0
start_point = '-15 0 0'
end_point = '15 0 0'
num_points = 61
sort_by = x
execute_on = 'initial timestep_end final'
[../]
[./etab0]
type = LineValueSampler
variable = etab0
start_point = '-15 0 0'
end_point = '15 0 0'
num_points = 61
sort_by = x
execute_on = 'initial timestep_end final'
[../]
[./etad0]
type = LineValueSampler
variable = etad0
start_point = '-15 0 0'
end_point = '15 0 0'
num_points = 61
sort_by = x
execute_on = 'initial timestep_end final'
[../]
[]
[Executioner]
type = Transient
nl_max_its = 15
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = -pc_type
petsc_options_value = asm
l_max_its = 15
l_tol = 1.0e-3
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 20
nl_abs_tol = 1e-10
dt = 1.0
[]
[Outputs]
[./exodus]
type = Exodus
execute_on = 'initial timestep_end final'
time_step_interval = 1
[../]
[./csv]
type = CSV
execute_on = 'initial timestep_end final'
time_step_interval = 1
[../]
[]
(modules/contact/test/tests/bouncing-block-contact/grid-sequencing/grid-sequencing.i)
starting_point = 2e-1
# We offset slightly so we avoid the case where the bottom of the secondary block and the top of the
# primary block are perfectly vertically aligned which can cause the backtracking line search some
# issues for a coarsest mesh (basic line search handles that fine)
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
[]
[Mesh]
[File]
type = FileMeshGenerator
file = level0.e
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[Contact]
[contact]
secondary = 10
primary = 20
formulation = mortar
model = coulomb
friction_coefficient = 0.4
c_normal = 1e+02
c_tangential = 1.0e2
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
num_steps = 3
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-6'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
nl_abs_tol = 5e-10
num_grids = 5
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exo]
type = Exodus
sync_times = '15'
sync_only = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = contact_normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/phase_field/test/tests/MultiSmoothCircleIC/specifiedsmoothcircleIC_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 5
ny = 5
nz = 5
xmin = 0
xmax = 100
ymin = 0
ymax = 100
zmin = 0
zmax = 100
elem_type = HEX8
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./diff]
type = MatDiffusion
variable = c
diffusivity = D_v
[../]
[]
[ICs]
[./c]
type = SpecifiedSmoothCircleIC
variable = c
x_positions = '10 50 90'
y_positions = '30 20 80'
z_positions = '30 50 75'
radii = '21 25 16'
invalue = 1.0
outvalue = 0.0001
int_width = 4
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./Dv]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 0.074802
[../]
[]
[Postprocessors]
[./bubbles]
type = FeatureFloodCount
variable = c
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -mat_mffd_type'
petsc_options_value = 'hypre boomeramg 101 ds'
l_max_its = 20
l_tol = 1e-4
nl_max_its = 20
nl_rel_tol = 1e-9
nl_abs_tol = 1e-11
start_time = 0.0
num_steps = 1
dt = 100.0
[]
[Outputs]
exodus = true
[]
(modules/stochastic_tools/examples/libtorch_drl_control/libtorch_drl_control_sub.i)
air_density = 1.184 # kg/m3
air_cp = 1000 # J/(kg K)
air_effective_k = 0.5 # W/(m K)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.0
xmax = 7.0
ymin = 0.0
ymax = 5.0
nx = 35
ny = 25
[]
[]
[Variables]
[T]
initial_condition = 297
[]
[]
[Kernels]
[time_derivative]
type = CoefTimeDerivative
variable = T
Coefficient = '${fparse air_density*air_cp}'
[]
[heat_conduction]
type = MatDiffusion
variable = T
diffusivity = 'k'
[]
[]
[BCs]
[top_flux]
type = NeumannBC
value = 0.0
boundary = 'top'
variable = T
[]
[dirichlet]
type = FunctionDirichletBC
function = temp_env
variable = T
boundary = 'left right'
[]
[]
[Functions]
[temp_env]
type = ParsedFunction
value = '15.0*sin(t/86400.0*pi) + 273.0'
[]
[design_function]
type = ParsedFunction
value = '297'
[]
[reward_function]
type = ScaledAbsDifferenceDRLRewardFunction
design_function = design_function
observed_value = center_temp_tend
c1 = 1
c2 = 10
[]
[]
[Materials]
[constant]
type = GenericConstantMaterial
prop_names = 'k'
prop_values = ${air_effective_k}
[]
[]
[Postprocessors]
[center_temp]
type = PointValue
variable = T
point = '3.5 2.5 0.0'
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[center_temp_tend]
type = PointValue
variable = T
point = '3.5 2.5 0.0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[env_temp]
type = FunctionValuePostprocessor
function = temp_env
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[reward]
type = FunctionValuePostprocessor
function = reward_function
execute_on = 'INITIAL TIMESTEP_END'
indirect_dependencies = 'center_temp_tend env_temp'
[]
[top_flux]
type = LibtorchControlValuePostprocessor
control_name = src_control
[]
[log_prob_top_flux]
type = LibtorchDRLLogProbabilityPostprocessor
control_name = src_control
[]
[]
[Reporters]
[T_reporter]
type = AccumulateReporter
reporters = 'center_temp_tend/value env_temp/value reward/value top_flux/value log_prob_top_flux/value'
[]
[]
[Controls]
inactive = 'src_control_final'
[src_control]
type = LibtorchDRLControl
parameters = "BCs/top_flux/value"
responses = 'center_temp_tend env_temp'
# keep consistent with LibtorchDRLControlTrainer
input_timesteps = 2
response_scaling_factors = '0.03 0.03'
response_shift_factors = '290 290'
action_standard_deviations = '0.02'
action_scaling_factors = 200
execute_on = 'TIMESTEP_BEGIN'
[]
[src_control_final]
type = LibtorchNeuralNetControl
filename = 'mynet_control.net'
num_neurons_per_layer = '16 6'
activation_function = 'relu'
parameters = "BCs/top_flux/value"
responses = 'center_temp_tend env_temp'
# keep consistent with LibtorchDRLControlTrainer
input_timesteps = 2
response_scaling_factors = '0.03 0.03'
response_shift_factors = '290 290'
action_standard_deviations = '0.02'
action_scaling_factors = 200
execute_on = 'TIMESTEP_BEGIN'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-7
start_time = 0.0
end_time = 86400
dt = 900.0
[]
[Outputs]
console = false
[c]
type = CSV
execute_on = FINAL
[]
[]
(test/tests/outputs/debug/show_material_props_consumed.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[]
[Variables/u]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
[]
[diff2]
type = MatDiffusion
variable = u
diffusivity = 'andrew'
[]
[]
[Materials]
[block]
type = GenericConstantMaterial
block = '0'
prop_names = 'D andrew'
prop_values = '1 1980'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
[debug] # This is only a test, you should turn this on via [Debug] block
type = MaterialPropertyDebugOutput
[]
[]
(test/tests/userobjects/domain-user-object/measure-conservation.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
[]
[Variables]
[u]
order = FIRST
family = MONOMIAL
[]
[]
[UserObjects]
[test]
type = DGDiffusionDomainUserObject
function = 'x'
epsilon = -1
sigma = 6
u = u
diff = 'diff'
ad_diff = 'ad_diff'
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = 'diff'
[]
[]
[DGKernels]
[dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
diff = 'diff'
[]
[]
[BCs]
[all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = 'left right'
function = 'x'
epsilon = -1
sigma = 6
diff = 'diff'
[]
[]
[Materials]
[constant]
type = GenericConstantMaterial
prop_names = 'diff'
prop_values = '2'
[]
[ad_constant]
type = ADGenericConstantMaterial
prop_names = 'ad_diff'
prop_values = '2'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-14
[]
[Outputs]
exodus = true
[]