- boundaryThe list of boundary IDs from the mesh where this object applies
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The list of boundary IDs from the mesh where this object applies
- valueValue of the BC
C++ Type:double
Controllable:Yes
Description:Value of the BC
- 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
ADDirichletBC
Imposes the essential boundary condition , where is a constant, controllable value.
Description
ADDirichletBC
is the simplest type of NodalBC
, and is used for imposing so-called "essential" boundary conditions on systems of partial differential equations (PDEs). Such boundary conditions force a particular set of degrees of freedom (DOFs) defined by the boundary
parameter to take on a single, controllable value. This class is appropriate to use for PDEs of the form
where is the domain, and is its boundary. In this case, a ADDirichletBC
object is used to impose the condition (2) on the subset of the boundary denoted by . In this case, the value
corresponds to the constant , and the user must define one or more sidesets corresponding to the boundary subset .
Note that ADDirichletBC
computes its Jacobian using automatic differentiation.
Preset boundary conditions
With the parameter preset = true
, the value of the boundary condition is applied before the solve begins. With preset = false
, the boundary condition is only enforced as the solve progresses. In most situations, presetting the boundary condition is better.
Example Input Syntax
[BCs]
active = 'left right'
# We will use preset BCs
[./left]
type = ADDirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = ADDirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
(test/tests/bcs/ad_bc_preset_nodal/bc_preset_nodal.i)Input Parameters
- diag_save_inThe name of auxiliary variables to save this BC'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 BC's diagonal jacobian contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
- displacementsThe displacements
C++ Type:std::vector<VariableName>
Controllable:No
Description:The displacements
- presetTrueWhether or not to preset the BC (apply the value before the solve begins).
Default:True
C++ Type:bool
Controllable:No
Description:Whether or not to preset the BC (apply the value before the solve begins).
- save_inThe name of auxiliary variables to save this BC'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 BC's residual contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
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_tagssystem timeThe tag for the matrices this Kernel should fill
Default:system time
C++ Type:MultiMooseEnum
Options:nontime, system, time
Controllable:No
Description:The tag for the matrices this Kernel should fill
- vector_tagsresidualThe tag for the vectors this Kernel should fill
Default:residual
C++ Type:MultiMooseEnum
Options:nontime, time, residual
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.
- 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
- 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/solid_mechanics/test/tests/power_law_creep/ad_smallstrain.i)
- (modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/gtn_single.i)
- (test/tests/kernels/ad_mat_coupled_force/aux_test.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/AD2drz.i)
- (modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/hoop_strain_comparison_coarse_zaxis.i)
- (modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/creep.i)
- (modules/optimization/test/tests/executioners/transient_and_adjoint/nonlinear_diffusivity.i)
- (tutorials/tutorial01_app_development/step10_auxkernels/test/tests/auxkernels/darcy_velocity/darcy_velocity_test.i)
- (modules/solid_mechanics/test/tests/ad_smeared_cracking/cracking_xyz.i)
- (modules/solid_mechanics/test/tests/ad_1D_spherical/finiteStrain_1DSphere_hollow.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/AD_finite_strain_power_law_creep.i)
- (modules/solid_mechanics/test/tests/shell/static/tapered.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/anis_mech_hill_tensor_creep.i)
- (modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/ad_uniaxial_y.i)
- (modules/solid_mechanics/test/tests/power_law_creep/ad_restart1.i)
- (modules/solid_mechanics/test/tests/ad_smeared_cracking/cracking_function.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/closed_gap_thermomechanical_mortar_contact.i)
- (modules/solid_mechanics/tutorials/introduction/mech_step02a.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/open_gap_pressure_dependent.i)
- (tutorials/tutorial01_app_development/step05_kernel_object/problems/pressure_diffusion.i)
- (modules/solid_mechanics/test/tests/temperature_dependent_hardening/ADtemp_dep_hardening.i)
- (test/tests/bcs/ad_matched_value_bc/test.i)
- (modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_dual_material_insulated.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/anis_mech_hill_tensor_creep_small_tiny_step_ts_limit_test.i)
- (modules/stochastic_tools/examples/parameter_study/diffusion_vector.i)
- (modules/contact/test/tests/verification/patch_tests/automatic_patch_update/iteration_adaptivity_parallel.i)
- (modules/solid_mechanics/test/tests/ad_smeared_cracking/cracking_rotation.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_z_3d.i)
- (modules/solid_mechanics/test/tests/action/material_output_first_lagrange_automatic.i)
- (test/tests/controls/time_periods/bcs/adbcs.i)
- (modules/solid_mechanics/test/tests/ad_1D_spherical/smallStrain_1DSphere.i)
- (modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_single_material_insulated.i)
- (test/tests/bcs/ad_bc_preset_nodal/bc_preset_nodal.i)
- (modules/contact/test/tests/verification/patch_tests/automatic_patch_update/iteration_adaptivity_parallel_node_face.i)
- (modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/exact.i)
- (modules/solid_mechanics/test/tests/ad_smeared_cracking/cracking_exponential.i)
- (modules/solid_mechanics/test/tests/j_integral_vtest/j_int_surfbreak_ellip_crack_sym_mm_cm_ad.i)
- (modules/solid_mechanics/test/tests/scalar_material_damage/ad_nonlocal_scalar_damage.i)
- (modules/heat_transfer/test/tests/joule_heating/transient_ad_jouleheating.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_integration_error.i)
- (modules/solid_mechanics/test/tests/ad_plastic/power_law_creep.i)
- (test/tests/misc/multiple-nl-systems/ad-test.i)
- (modules/contact/test/tests/mortar_tm/2d/ad_frictional/finite_stiff.i)
- (modules/solid_mechanics/test/tests/anisotropic_plasticity/ad_aniso_plasticity_x_rotate.i)
- (modules/solid_mechanics/test/tests/scalar_material_damage/ad_scalar_material_damage_creep_power.i)
- (tutorials/tutorial01_app_development/step08_test_harness/problems/pressure_diffusion.i)
- (modules/solid_mechanics/test/tests/finite_strain_elastic_anisotropy/3d_bar_orthotropic_full_rotation_ad.i)
- (test/tests/bcs/coupled_var_neumann/ad_coupled_var_neumann_nl.i)
- (tutorials/tutorial01_app_development/step09_mat_props/problems/pressure_diffusion.i)
- (modules/solid_mechanics/test/tests/anisotropic_plasticity/anis_plasticity_test.i)
- (modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/lps_dual.i)
- (modules/solid_mechanics/test/tests/ad_2D_geometries/2D-RZ_finiteStrain_test.i)
- (modules/optimization/test/tests/executioners/steady_and_adjoint/nonlinear_diffusion.i)
- (modules/solid_mechanics/test/tests/ad_2D_geometries/2D-RZ_centerline_VLC.i)
- (modules/heat_transfer/test/tests/ad_convective_heat_flux/flux.i)
- (modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/ad_aniso_plasticity_x_one_ref.i)
- (tutorials/tutorial01_app_development/step09_mat_props/test/tests/kernels/darcy_pressure/darcy_pressure_test.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/3d_bar_orthotropic_90deg_rotation_ad_creep_x.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/3d_bar_orthotropic_90deg_rotation_ad_creep_x_no_rotation.i)
- (modules/xfem/test/tests/moving_interface/moving_ad_diffusion.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/AD_finite_strain_laromance.i)
- (modules/stochastic_tools/test/tests/multiapps/transient_with_full_solve/sub.i)
- (modules/contact/test/tests/mortar_tm/2d/ad_frictional/finite_rr.i)
- (modules/solid_mechanics/test/tests/ad_smeared_cracking/cracking_rz.i)
- (test/tests/bcs/ad_coupled_lower_value/together.i)
- (modules/solid_mechanics/test/tests/scalar_material_damage/ad_scalar_material_damage.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/finite.i)
- (modules/solid_mechanics/test/tests/anisotropic_plasticity/ad_aniso_plasticity_y.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/finite_rr.i)
- (test/tests/fvkernels/fv_simple_diffusion/dirichlet.i)
- (modules/solid_mechanics/test/tests/ad_smeared_cracking/cracking_multiple_softening.i)
- (modules/contact/test/tests/3d-mortar-contact/half_sphere_nodal_geometry.i)
- (modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/hoop_strain_comparison_coarse_yaxis.i)
- (test/tests/mortar/displaced-gap-conductance-2d-non-conforming/gap-conductance.i)
- (modules/electromagnetics/test/tests/interfacekernels/electrostatic_contact/analytic_solution_test_three_block.i)
- (test/tests/kernels/ad_coupled_force/aux_test.i)
- (modules/solid_mechanics/test/tests/ad_thermal_expansion_function/mean_complex.i)
- (modules/heat_transfer/test/tests/interface_heating_mortar/transient_joule_heating_constraint.i)
- (modules/solid_mechanics/test/tests/ad_smeared_cracking/cracking_power.i)
- (modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/ad_uniaxial_x_non_linear.i)
- (test/tests/kernels/body_force/ad_mat_forcing_function_test.i)
- (tutorials/tutorial01_app_development/step10_auxkernels/test/tests/kernels/darcy_pressure/darcy_pressure_test.i)
- (modules/phase_field/test/tests/ad_coupled_gradient_dot/diffusion_rate.i)
- (modules/solid_mechanics/test/tests/ad_isotropic_elasticity_tensor/bulk_modulus_shear_modulus_test.i)
- (modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/lps_single.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/ADverification.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/ADlower_limit.i)
- (modules/solid_mechanics/test/tests/ad_elastic/finite_elastic.i)
- (modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/hoop_strain_comparison.i)
- (modules/solid_mechanics/test/tests/ad_thermal_expansion_function/instantaneous_complex.i)
- (modules/solid_mechanics/test/tests/power_law_creep/ad_restart2.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_temperature_coefficients.i)
- (modules/solid_mechanics/test/tests/shell/static/pressure_error.i)
- (modules/solid_mechanics/test/tests/ad_return_mapping/ad_return_mapping_derivative.i)
- (test/tests/nodalkernels/constraint_enforcement/ad-upper-and-lower-bound.i)
- (modules/solid_mechanics/test/tests/power_law_creep/nonad_bounds.i)
- (modules/solid_mechanics/test/tests/ad_linear_elasticity/linear_elastic_material.i)
- (test/tests/kernels/ad_scalar_kernel_constraint/scalar_constraint_kernel_RJ.i)
- (modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/ad_aniso_plasticity_x_one.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/3d_bar_orthotropic_90deg_rotation_ad_creep_z.i)
- (tutorials/tutorial01_app_development/step06_input_params/problems/pressure_diffusion.i)
- (modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/ad_uniaxial_x.i)
- (test/tests/fvkernels/fv_simple_diffusion/dirichlet-constrained-average-value.i)
- (modules/combined/test/tests/power_law_hardening/ADPowerLawHardening.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_temperature_coefficients_function.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_iso_creep_x_3d.i)
- (modules/solid_mechanics/test/tests/strain_energy_density/ad_rate_model_weak_plane.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/multi_component_mortar_thermal_conduction.i)
- (modules/solid_mechanics/test/tests/action/material_output_first_lagrange_manual.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_y_3d.i)
- (modules/solid_mechanics/test/tests/ad_finite_strain_jacobian/bending_jacobian.i)
- (modules/solid_mechanics/test/tests/ad_smeared_cracking/cracking_rz_exponential.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/closed_gap_pressure_dependent_thermal_contact.i)
- (modules/solid_mechanics/test/tests/power_law_creep/nonad_exception.i)
- (python/pyhit/tests/input.i)
- (modules/solid_mechanics/test/tests/j_integral_vtest/c_int_surfbreak_ellip_crack_sym_mm_ad.i)
- (modules/stochastic_tools/examples/parameter_study/diffusion_time.i)
- (modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/negative_porosity.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_x_3d.i)
- (modules/solid_mechanics/test/tests/ad_isotropic_elasticity_tensor/lambda_shear_modulus_test.i)
- (modules/xfem/test/tests/bimaterials/inclusion_ad_bimaterials_2d.i)
- (modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_single_material.i)
- (tutorials/tutorial01_app_development/step08_test_harness/test/tests/kernels/darcy_pressure/darcy_pressure_test.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/AD3d.i)
- (modules/combined/test/tests/ad_cavity_pressure/negative_volume.i)
- (test/tests/fvkernels/fv_simple_diffusion/neumann.i)
- (modules/combined/test/tests/3d-mortar-projection-tolerancing/test.i)
- (modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/lps_single_split.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_temperature_coefficients_function_variation.i)
- (modules/solid_mechanics/test/tests/volumetric_eigenstrain/ad_volumetric_eigenstrain.i)
- (modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/hoop_strain_comparison_coarse_xaxis.i)
- (modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_dual_material.i)
- (modules/heat_transfer/test/tests/function_ellipsoid_heat_source/function_heat_source.i)
- (modules/solid_mechanics/test/tests/t_stress/ad_t_stress_ellip_crack_3d.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/finite_action.i)
- (modules/solid_mechanics/test/tests/power_law_creep/ad_power_law_creep.i)
- (test/tests/kernels/ad_reaction/ad_reaction.i)
- (modules/solid_mechanics/test/tests/finite_strain_elastic_anisotropy/3d_bar_orthotropic_90deg_rotation_ad.i)
- (modules/stochastic_tools/examples/sobol/diffusion.i)
- (modules/xfem/test/tests/moving_interface/moving_ad_bimaterial.i)
- (modules/heat_transfer/test/tests/radiative_bcs/ad_radiative_bc_cyl.i)
- (modules/solid_mechanics/test/tests/ad_linear_elasticity/extra_stresses.i)
- (modules/contact/test/tests/mortar_tm/2d/ad_frictional/finite.i)
- (modules/solid_mechanics/test/tests/ad_smeared_cracking/cracking_plane_stress.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/ad_verification.i)
- (modules/solid_mechanics/test/tests/ad_2D_geometries/2D-RZ_finiteStrain_resid.i)
- (modules/solid_mechanics/test/tests/substepping/power_law_creep.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/finite_action_rr.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/varied_pressure_thermomechanical_mortar.i)
- (test/tests/interfacekernels/1d_interface/ad-coupled-value-coupled-flux.i)
- (modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_offset_single_material_insulated.i)
- (modules/solid_mechanics/test/tests/multi_power_law/power_law_creep.i)
- (tutorials/tutorial01_app_development/step10_auxkernels/problems/pressure_diffusion.i)
- (modules/solid_mechanics/test/tests/ad_finite_strain_jacobian/3d_bar.i)
- (modules/solid_mechanics/test/tests/ad_linear_elasticity/applied_strain.i)
- (modules/solid_mechanics/test/tests/power_law_creep/ad_exception.i)
- (modules/solid_mechanics/test/tests/anisotropic_plasticity/anis_elasticity_test.i)
- (modules/electromagnetics/test/tests/interfacekernels/electrostatic_contact/analytic_solution_test_two_block.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/3d_bar_orthotropic_90deg_rotation_ad_creep_z_no_rotation.i)
- (modules/xfem/test/tests/bimaterials/glued_ad_bimaterials_2d.i)
- (python/pyhit/tests/input_modified.i)
- (modules/solid_mechanics/test/tests/anisotropic_plasticity/ad_aniso_plasticity_x.i)
- (modules/xfem/test/tests/moving_interface/ad_phase_transition_2d.i)
- (modules/solid_mechanics/test/tests/substepping/ad_power_law_creep.i)
- (modules/solid_mechanics/test/tests/ad_isotropic_elasticity_tensor/youngs_modulus_poissons_ratio_test.i)
- (modules/solid_mechanics/test/tests/ad_2D_geometries/3D-RZ_finiteStrain_test.i)
- (modules/solid_mechanics/test/tests/scalar_material_damage/ad_combined_scalar_damage.i)
- (tutorials/tutorial01_app_development/step02_input_file/problems/pressure_diffusion.i)
- (modules/stochastic_tools/examples/parameter_study/diffusion.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/closed_gap_prescribed_pressure.i)
- (modules/solid_mechanics/test/tests/ad_smeared_cracking/cracking.i)
- (modules/combined/test/tests/additive_manufacturing/check_element_addition_by_variable.i)
(test/tests/bcs/ad_bc_preset_nodal/bc_preset_nodal.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
nz = 0
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff'
[./diff]
type = ADDiffusion
variable = u
[../]
[]
[BCs]
active = 'left right'
# We will use preset BCs
[./left]
type = ADDirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = ADDirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = bc_preset_out
exodus = true
[]
(modules/solid_mechanics/test/tests/power_law_creep/ad_smallstrain.i)
# 1x1x1 unit cube with uniform pressure on top face for the case of small strain.
# This test does not have a solid mechanics analog because there is not an equvialent
# small strain with rotations strain calculator material in solid mechanics
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
initial_condition = 1000.0
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = SMALL
incremental = true
add_variables = true
generate_output = 'stress_yy creep_strain_xx creep_strain_yy creep_strain_zz elastic_strain_yy'
use_automatic_differentiation = true
[]
[]
[Functions]
[top_pull]
type = PiecewiseLinear
x = '0 1'
y = '1 1'
[]
[]
[Kernels]
[heat]
type = Diffusion
variable = temp
[]
[heat_ie]
type = TimeDerivative
variable = temp
[]
[]
[BCs]
[u_top_pull]
type = ADPressure
variable = disp_y
boundary = top
factor = -10.0e6
function = top_pull
[]
[u_bottom_fix]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[u_yz_fix]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[u_xy_fix]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
[temp_fix]
type = DirichletBC
variable = temp
boundary = 'bottom top'
value = 1000.0
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 2e11
poissons_ratio = 0.3
constant_on = SUBDOMAIN
[]
[radial_return_stress]
type = ADComputeMultipleInelasticStress
inelastic_models = 'power_law_creep'
[]
[power_law_creep]
type = ADPowerLawCreepStressUpdate
coefficient = 1.0e-15
n_exponent = 4
activation_energy = 3.0e5
temperature = temp
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 20
nl_max_its = 20
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
l_tol = 1e-5
start_time = 0.0
end_time = 1.0
num_steps = 10
dt = 0.1
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/gtn_single.i)
# This test provides an example of an individual GTN viscoplasticity model
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmax = 0.002
ymax = 0.002
[]
[Physics/SolidMechanics/QuasiStatic/All]
strain = FINITE
add_variables = true
base_name = 'total'
generate_output = 'strain_xx strain_yy strain_xy hydrostatic_stress vonmises_stress'
use_automatic_differentiation = true
[]
[Functions]
[./pull]
type = PiecewiseLinear
x = '0 0.1'
y = '0 1e-5'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.3
base_name = 'total'
[../]
[./stress]
type = ADComputeMultipleInelasticStress
inelastic_models = gtn
outputs = all
base_name = 'total'
[../]
[./porosity]
type = ADPorosityFromStrain
initial_porosity = 0.1
inelastic_strain = 'total_combined_inelastic_strain'
outputs = 'all'
[../]
[./gtn]
type = ADViscoplasticityStressUpdate
total_strain_base_name = 'total'
coefficient = 'coef'
power = 3
viscoplasticity_model = GTN
outputs = all
relative_tolerance = 1e-11
[../]
[./coef]
type = ADParsedMaterial
property_name = coef
# Example of creep power law
expression = '1e-18 * exp(-4e4 / 1.987 / 1200)'
[../]
[]
[BCs]
[./no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./pull_disp_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = top
function = pull
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 0.01
end_time = 0.12
[]
[Postprocessors]
[./disp_x]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./disp_y]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[./avg_hydro]
type = ElementAverageValue
variable = total_hydrostatic_stress
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = total_vonmises_stress
[../]
[./dt]
type = TimestepSize
[../]
[./num_lin]
type = NumLinearIterations
outputs = console
[../]
[./num_nonlin]
type = NumNonlinearIterations
outputs = console
[../]
[./eff_creep_strain]
type = ElementAverageValue
variable = effective_viscoplasticity
[../]
[./porosity]
type = ElementAverageValue
variable = porosity
[../]
[]
[Outputs]
csv = true
[]
(test/tests/kernels/ad_mat_coupled_force/aux_test.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 4
ny = 4
dim = 2
[]
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[a]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[diff]
type = ADDiffusion
variable = u
[]
[force]
type = ADMatCoupledForce
variable = u
v = a
mat_prop_coef = test_prop
[]
[]
[AuxKernels]
[a]
variable = a
type = ConstantAux
value = 10
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = ADDirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Functions]
[test_func]
type = ParsedFunction
expression = 'x'
[]
[]
[Materials]
[test_prop]
type = ADGenericFunctionMaterial
prop_names = test_prop
prop_values = test_func
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
(modules/solid_mechanics/test/tests/rom_stress_update/AD2drz.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]
[Problem]
coord_type = RZ
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[temperature]
initial_condition = 900.0
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
use_automatic_differentiation = true
generate_output = vonmises_stress
[]
[]
[BCs]
[symmy]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[symmx]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0
[]
[pressure_x]
type = ADPressure
variable = disp_x
boundary = right
function = t
factor = 3.1675e5
[]
[pressure_y]
type = ADPressure
variable = disp_y
boundary = top
function = t
factor = 6.336e5
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 3.30e11
poissons_ratio = 0.3
[]
[stress]
type = ADComputeMultipleInelasticStress
inelastic_models = rom_stress_prediction
[]
[rom_stress_prediction]
type = ADSS316HLAROMANCEStressUpdateTest
temperature = temperature
initial_cell_dislocation_density = 6.0e12
initial_wall_dislocation_density = 4.4e11
outputs = all
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
nl_abs_tol = 1e-12
automatic_scaling = true
compute_scaling_once = false
num_steps = 5
dt = 2
[]
[Postprocessors]
[effective_strain_avg]
type = ElementAverageValue
variable = effective_creep_strain
[]
[temperature]
type = ElementAverageValue
variable = temperature
[]
[cell_dislocations]
type = ElementAverageValue
variable = cell_dislocations
[]
[wall_disloactions]
type = ElementAverageValue
variable = wall_dislocations
[]
[vonmises_stress]
type = ElementAverageValue
variable = vonmises_stress
[]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/hoop_strain_comparison_coarse_zaxis.i)
# This test compares the hoop strain at two different elements in an internally
# pressurized cylinder with anisotropic plasticity: different yield condition
# for hoop and axial directions. The elements are located circumferentially
# apart but at same axial position. It is expected that due to pressurization
# hoop strains will develop with uniform magnitude along hoop direction. The
# test verifies that the plastic hoop strain is uniform in hoop direction.
# For 3D simulations with material properties oriented along the curved
# geometry such as cylinder or sphere, the stresses and strains are rotated to
# the local coordinate system from the global coordinate system. The plastic
# strain is calculated in the local coordinate system and then transformed to
# the global coordinate system. This test involves a 3D cylindrical geometry,
# and helps in indirectly verifying that this transformation of stresses and
# strains back and forth between the local and global coordinate system is
# correctly implemented.
[Mesh]
file = quarter_cylinder_coarse_zaxis.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[plasticity_strain_xx]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xx
index_i = 0
index_j = 0
[]
[plasticity_strain_xy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xy
index_i = 0
index_j = 1
[]
[plasticity_strain_yy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_yy
index_i = 1
index_j = 1
[]
[plasticity_strain_zz]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_zz
index_i = 2
index_j = 2
[]
[stress_zz]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[]
[stress_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[]
[stress_yy]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[]
[Functions]
[push]
type = PiecewiseLinear
x = '0 1e2'
y = '0 200e6'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_zz elastic_strain_xx elastic_strain_yy stress_xx stress_yy stress_zz strain_zz plastic_strain_zz plastic_strain_xx plastic_strain_yy hoop_stress hoop_strain'
use_automatic_differentiation = true
add_variables = true
cylindrical_axis_point1 = '0 0 0'
cylindrical_axis_point2 = '0 0 1'
[]
[]
[Constraints]
[mid_section_plane]
type = EqualValueBoundaryConstraint
variable = disp_z
secondary = top # boundary
penalty = 1.0e+10
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 200.0e9
poissons_ratio = 0.2
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "plasticity"
max_iterations = 50
absolute_tolerance = 1e-30 #1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
# hill_constants = "0.5 0.5 0.5 1.5 1.5 1.5"
hill_constants = "0.5 0.5 0.25 1.5 1.5 1.5"
[]
[plasticity]
type = ADHillElastoPlasticityStressUpdate
hardening_constant = 1.5e10
hardening_exponent = 1.0
yield_stress = 0.0 # 60e6
local_cylindrical_csys = true
axis = z
absolute_tolerance = 1e-15 # 1e-8
relative_tolerance = 1e-13 # 1e-15
internal_solve_full_iteration_history = true
max_inelastic_increment = 2.0e-6
internal_solve_output_on = on_error
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = x_face
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = bottom
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = y_face
value = 0.0
[]
[Pressure]
[Side1]
boundary = inner
function = push
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-14
# nl_abs_tol = 1e-10
l_max_its = 90
nl_max_its = 30
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 30
iteration_window = 9
growth_factor = 1.05
cutback_factor = 0.5
timestep_limiting_postprocessor = matl_ts_min
dt = 0.1e-4
time_t = '0 6.23 10'
time_dt = '0.1 1.0e-2 1.0e-2'
[]
num_steps = 1
start_time = 0
end_time = 200.0
automatic_scaling = true
dtmax = 0.1e-4
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[hoop_strain_elementA]
type = ElementalVariableValue
elementid = 10
variable = hoop_strain
[]
[hoop_strain_elementB]
type = ElementalVariableValue
elementid = 4
variable = hoop_strain
[]
[hoop_strain_diff]
type = DifferencePostprocessor
value1 = hoop_strain_elementA
value2 = hoop_strain_elementB
[]
[]
[Outputs]
csv = true
exodus = false
perf_graph = true
[]
(modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/creep.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmax = 0.002
ymax = 0.002
[]
[Physics/SolidMechanics/QuasiStatic/All]
strain = FINITE
add_variables = true
base_name = 'total'
generate_output = 'strain_xx strain_yy strain_xy hydrostatic_stress vonmises_stress'
use_automatic_differentiation = true
[]
[Functions]
[./pull]
type = PiecewiseLinear
x = '0 0.1'
y = '0 1e-5'
[../]
[]
[Materials]
active='elasticity_tensor porous_stress porosity creep'
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.3
base_name = 'total'
[../]
[./porous_stress]
type = ADComputeMultipleInelasticStress
inelastic_models = creep
outputs = all
base_name = 'total'
[../]
[./regular_stress]
type = ADComputeMultipleInelasticStress
inelastic_models = creep
outputs = all
base_name = 'total'
[../]
[./porosity]
type = ADGenericConstantMaterial
prop_names = porosity
prop_values = 0.1
outputs = all
[../]
[./creep]
type = ADPowerLawCreepStressUpdate
activation_energy = 4e4
temperature = 1200
coefficient = 1e-18
gas_constant = 1.987
n_exponent = 3
base_name = 'creep'
outputs = all
[../]
[]
[BCs]
[./no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./pull_disp_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = top
function = pull
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 0.01
end_time = 0.12
[]
[Postprocessors]
[./disp_x]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./disp_y]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[./avg_hydro]
type = ElementAverageValue
variable = total_hydrostatic_stress
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = total_vonmises_stress
[../]
[./dt]
type = TimestepSize
[../]
[./num_lin]
type = NumLinearIterations
outputs = console
[../]
[./num_nonlin]
type = NumNonlinearIterations
outputs = console
[../]
[./eff_creep_strain]
type = ElementAverageValue
variable = creep_effective_creep_strain
[../]
[./porosity]
type = ElementAverageValue
variable = porosity
[../]
[]
[Outputs]
csv = true
[]
(modules/optimization/test/tests/executioners/transient_and_adjoint/nonlinear_diffusivity.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
[]
[Variables]
[u]
[]
[u_adjoint]
solver_sys = adjoint
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = ADMatDiffusion
variable = u
diffusivity = D
[]
[src]
type = ADBodyForce
variable = u
value = 1
[]
[src_adjoint]
type = ADBodyForce
variable = u_adjoint
value = 1
[]
[]
[BCs]
[dirichlet]
type = ADDirichletBC
variable = u
boundary = 'top right'
value = 0
[]
[]
[Materials]
[diffc]
type = ADParsedMaterial
property_name = D
expression = '0.1 + 5 * u'
coupled_variables = 'u'
[]
[]
[Postprocessors]
[u_avg]
type = ElementAverageValue
variable = u
execute_on = 'TIMESTEP_END ADJOINT_TIMESTEP_END'
[]
[u_adjoint_avg]
type = ElementAverageValue
variable = u_adjoint
execute_on = ADJOINT_TIMESTEP_END
[]
[inner_product]
type = VariableInnerProduct
variable = u
second_variable = u_adjoint
execute_on = ADJOINT_TIMESTEP_END
[]
[]
[Executioner]
type = TransientAndAdjoint
forward_system = nl0
adjoint_system = adjoint
dt = 0.2
num_steps = 5
nl_rel_tol = 1e-12
l_tol = 1e-12
[]
[Outputs]
[forward]
type = CSV
[]
[adjoint]
type = CSV
execute_on = 'INITIAL ADJOINT_TIMESTEP_END'
[]
[console]
type = Console
execute_postprocessors_on = 'INITIAL TIMESTEP_END ADJOINT_TIMESTEP_END'
[]
[]
(tutorials/tutorial01_app_development/step10_auxkernels/test/tests/auxkernels/darcy_velocity/darcy_velocity_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[pressure]
order = FIRST
family = LAGRANGE
[]
[]
[AuxVariables]
[velocity]
order = CONSTANT
family = MONOMIAL_VEC
[]
[]
[Kernels]
[diffusion]
type = DarcyPressure
variable = pressure
[]
[]
[AuxKernels]
[velocity]
type = DarcyVelocity
variable = velocity
pressure = pressure
execute_on = TIMESTEP_END
[]
[]
[Materials]
[column]
type = PackedColumn
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = pressure
boundary = left
value = 0
[]
[right]
type = ADDirichletBC
variable = pressure
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
l_tol = 1e-07 # tighter tolerance to acheive a numerically constant velocity field on 64-bit procs
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/ad_smeared_cracking/cracking_xyz.i)
#
[Mesh]
file = cracking_test.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Functions]
[./displx]
type = PiecewiseLinear
x = '0 1'
y = '0 0.00175'
[../]
[./velocity_y]
type = ParsedFunction
expression = 'if(t < 2, 0.00175, 0)'
[../]
[./velocity_z]
type = ParsedFunction
expression = 0.00175
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_zx'
use_automatic_differentiation = true
[../]
[]
[BCs]
[./fix_x]
type = ADDirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./move_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 4
function = displx
[../]
[./fix_y]
type = ADDirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[./move_y]
type = PresetVelocity
variable = disp_y
boundary = 5
function = velocity_y
# time_periods = 'p2 p3'
[../]
[./fix_z]
type = ADDirichletBC
variable = disp_z
boundary = 3
value = 0.0
[../]
[./move_z]
type = PresetVelocity
variable = disp_z
boundary = 6
function = velocity_z
# time_periods = 'p3'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 186.5e9
poissons_ratio = .316
[../]
[./elastic_stress]
type = ADComputeSmearedCrackingStress
cracking_stress = 119.3e6
cracked_elasticity_type = FULL
softening_models = exponential_softening
[../]
[./exponential_softening]
type = ADExponentialSoftening
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
petsc_options_iname = '-ksp_gmres_restart -pc_type'
petsc_options_value = '101 lu'
line_search = 'none'
l_max_its = 100
l_tol = 1e-5
nl_max_its = 100
nl_abs_tol = 1e-6
#nl_rel_tol = 1e-4
nl_rel_tol = 1e-8
start_time = 0.0
end_time = 3.0
dt = 0.01
[]
[Controls]
[./p1]
type = TimePeriod
start_time = 0.0
end_time = 1.0
disable_objects = 'BCs/move_y BCs/move_z'
reverse_on_false = false
execute_on = 'initial timestep_begin'
[../]
[./p2]
type = TimePeriod
start_time = 1.0
end_time = 2.0
disable_objects = 'BCs/move_z'
enable_objects = 'BCs/move_y'
reverse_on_false = false
execute_on = 'initial timestep_begin'
[../]
[./p3]
type = TimePeriod
start_time = 2.0
end_time = 3.0
enable_objects = 'BCs/move_y BCs/move_z'
reverse_on_false = false
execute_on = 'initial timestep_begin'
set_sync_times = true
[../]
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/ad_1D_spherical/finiteStrain_1DSphere_hollow.i)
# This simulation models the mechanics solution for a hollow sphere under
# pressure, applied on the outer surfaces, using 1D spherical symmetry
# assumpitions. The inner radius of the sphere, r = 4mm, is pinned to prevent
# rigid body movement of the sphere.
#
# From Bower (Applied Mechanics of Solids, 2008, available online at
# solidmechanics.org/text/Chapter4_1/Chapter4_1.htm), and applying the outer
# pressure and pinned displacement boundary conditions set in this simulation,
# the radial displacement is given by:
#
# u(r) = \frac{P(1 + v)(1 - 2v)b^3}{E(b^3(1 + v) + 2a^3(1-2v))} * (\frac{a^3}{r^2} - r)
#
# where P is the applied pressure, b is the outer radius, a is the inner radius,
# v is Poisson's ration, E is Young's Modulus, and r is the radial position.
#
# The radial stress is given by:
#
# S(r) = \frac{Pb^3}{b^3(1 + v) + 2a^3(1 - 2v)} * (\frac{2a^3}{r^3}(2v - 1) - (1 + v))
#
# The test assumes an inner radius of 4mm, and outer radius of 9 mm,
# zero displacement at r = 4mm, and an applied outer pressure of 2MPa.
# The radial stress is largest in the inner most element and, at an assumed
# mid element coordinate of 4.5mm, is equal to -2.545MPa.
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 4
xmax = 9
nx = 5
[]
[GlobalParams]
displacements = 'disp_r'
[]
[Problem]
coord_type = RSPHERICAL
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
use_automatic_differentiation = true
spherical_center_point = '4.0 0.0 0.0'
generate_output = 'spherical_radial_stress'
[]
[]
[Postprocessors]
[stress_rr]
type = ElementAverageValue
variable = spherical_radial_stress
[]
[]
[BCs]
[innerDisp]
type = ADDirichletBC
boundary = left
variable = disp_r
value = 0.0
[]
[outerPressure]
type = ADPressure
boundary = right
variable = disp_r
factor = 2
[]
[]
[Materials]
[Elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
poissons_ratio = 0.345
youngs_modulus = 1e4
[]
[stress]
type = ADComputeFiniteStrainElasticStress
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
# controls for linear iterations
l_max_its = 100
l_tol = 1e-8
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-10
nl_abs_tol = 1e-5
# time control
start_time = 0.0
dt = 0.25
dtmin = 0.0001
end_time = 0.25
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/rom_stress_update/AD_finite_strain_power_law_creep.i)
[GlobalParams]
displacements = 'disp_r disp_z'
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 1
xmax = 2
nx = 50
ny = 50
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
incremental = true
add_variables = true
eigenstrain_names = 'thermal'
use_automatic_differentiation = true
[]
[]
[AuxVariables]
[temp]
initial_condition = 1000.0
[]
[]
[AuxKernels]
[cooling]
type = FunctionAux
variable = temp
function = '1000-10*t*x'
[]
[]
[BCs]
[top_pull]
type = ADFunctionNeumannBC
variable = disp_z
boundary = top
function = '1e7*t'
use_displaced_mesh = true
[]
[bottom_fix]
type = ADDirichletBC
variable = disp_z
boundary = bottom
value = 0.0
[]
[left_fix]
type = ADDirichletBC
variable = disp_r
boundary = left
value = 0.0
[]
[]
[Materials]
[eigenstrain]
type = ADComputeThermalExpansionEigenstrain
eigenstrain_name = 'thermal'
stress_free_temperature = 1000
thermal_expansion_coeff = 1e-4
temperature = temp
[]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 2e11
poissons_ratio = 0.3
[]
[stress]
type = ADComputeMultipleInelasticStress
inelastic_models = 'creep'
[]
[creep]
type = ADPowerLawCreepStressUpdate
coefficient = 1.0e-15
n_exponent = 4
activation_energy = 3.0e5
temperature = temp
[]
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
end_time = 10
dt = 1
automatic_scaling = true
[]
[Outputs]
print_linear_converged_reason = false
print_nonlinear_converged_reason = false
print_linear_residuals = false
perf_graph = true
[]
(modules/solid_mechanics/test/tests/shell/static/tapered.i)
# Test for the stress and strain output for tapered shell elements.
# A tapered beam is represented with shell elements in XY plane
# having Young's Modulus of 210000 and poissons ratio of 0.3.
# The displacement in X direction is constrained in the left end and the
# displacement of center node of the left end is constrained in Y direction.
# A uniform displacement is applied at the right end.
# The problem is symmetric about Y-axis and the results are symmetric.
[Mesh]
[input]
type = FileMeshGenerator
file = taperedmesh.e
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[rot_x]
[]
[rot_y]
[]
[]
[AuxVariables]
[stress_00]
order = CONSTANT
family = MONOMIAL
[]
[stress_11]
order = CONSTANT
family = MONOMIAL
[]
[stress_22]
order = CONSTANT
family = MONOMIAL
[]
[stress_01]
order = CONSTANT
family = MONOMIAL
[]
[stress_10]
order = CONSTANT
family = MONOMIAL
[]
[stress_02]
order = CONSTANT
family = MONOMIAL
[]
[stress_20]
order = CONSTANT
family = MONOMIAL
[]
[stress_12]
order = CONSTANT
family = MONOMIAL
[]
[stress_21]
order = CONSTANT
family = MONOMIAL
[]
[strain_00]
order = CONSTANT
family = MONOMIAL
[]
[strain_11]
order = CONSTANT
family = MONOMIAL
[]
[strain_22]
order = CONSTANT
family = MONOMIAL
[]
[strain_01]
order = CONSTANT
family = MONOMIAL
[]
[strain_10]
order = CONSTANT
family = MONOMIAL
[]
[strain_02]
order = CONSTANT
family = MONOMIAL
[]
[strain_20]
order = CONSTANT
family = MONOMIAL
[]
[strain_12]
order = CONSTANT
family = MONOMIAL
[]
[strain_21]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[solid_disp_x]
type = ADStressDivergenceShell
block = 1
component = 0
variable = disp_x
through_thickness_order = SECOND
[]
[solid_disp_y]
type = ADStressDivergenceShell
block = 1
component = 1
variable = disp_y
through_thickness_order = SECOND
[]
[solid_disp_z]
type = ADStressDivergenceShell
block = 1
component = 2
variable = disp_z
through_thickness_order = SECOND
[]
[solid_rot_x]
type = ADStressDivergenceShell
block = 1
component = 3
variable = rot_x
through_thickness_order = SECOND
[]
[solid_rot_y]
type = ADStressDivergenceShell
block = 1
component = 4
variable = rot_y
through_thickness_order = SECOND
[]
[]
[AuxKernels]
[stress_00]
type = RankTwoAux
variable = stress_00
rank_two_tensor = global_stress_t_points_0
index_i = 0
index_j = 0
execute_on = TIMESTEP_END
[]
[strain_00]
type = RankTwoAux
variable = strain_00
rank_two_tensor = total_global_strain_t_points_0
index_i = 0
index_j = 0
execute_on = TIMESTEP_END
[]
[stress_11]
type = RankTwoAux
variable = stress_11
rank_two_tensor = global_stress_t_points_0
index_i = 1
index_j = 1
execute_on = TIMESTEP_END
[]
[strain_11]
type = RankTwoAux
variable = strain_11
rank_two_tensor = total_global_strain_t_points_0
index_i = 1
index_j = 1
execute_on = TIMESTEP_END
[]
[stress_22]
type = RankTwoAux
variable = stress_22
rank_two_tensor = global_stress_t_points_0
index_i = 2
index_j = 2
execute_on = TIMESTEP_END
[]
[strain_22]
type = RankTwoAux
variable = strain_22
rank_two_tensor = total_global_strain_t_points_0
index_i = 2
index_j = 2
execute_on = TIMESTEP_END
[]
[stress_01]
type = RankTwoAux
variable = stress_01
rank_two_tensor = global_stress_t_points_0
index_i = 0
index_j = 1
execute_on = TIMESTEP_END
[]
[strain_01]
type = RankTwoAux
variable = strain_01
rank_two_tensor = total_global_strain_t_points_0
index_i = 0
index_j = 1
execute_on = TIMESTEP_END
[]
[stress_10]
type = RankTwoAux
variable = stress_10
rank_two_tensor = global_stress_t_points_0
index_i = 1
index_j = 0
execute_on = TIMESTEP_END
[]
[strain_10]
type = RankTwoAux
variable = strain_10
rank_two_tensor = total_global_strain_t_points_0
index_i = 1
index_j = 0
execute_on = TIMESTEP_END
[]
[stress_02]
type = RankTwoAux
variable = stress_02
rank_two_tensor = global_stress_t_points_0
index_i = 0
index_j = 2
execute_on = TIMESTEP_END
[]
[strain_02]
type = RankTwoAux
variable = strain_02
rank_two_tensor = total_global_strain_t_points_0
index_i = 0
index_j = 2
execute_on = TIMESTEP_END
[]
[stress_20]
type = RankTwoAux
variable = stress_20
rank_two_tensor = global_stress_t_points_0
index_i = 2
index_j = 0
execute_on = TIMESTEP_END
[]
[strain_20]
type = RankTwoAux
variable = strain_20
rank_two_tensor = total_global_strain_t_points_0
index_i = 2
index_j = 0
execute_on = TIMESTEP_END
[]
[stress_12]
type = RankTwoAux
variable = stress_12
rank_two_tensor = global_stress_t_points_0
index_i = 1
index_j = 2
execute_on = TIMESTEP_END
[]
[strain_12]
type = RankTwoAux
variable = strain_12
rank_two_tensor = total_global_strain_t_points_0
index_i = 1
index_j = 2
execute_on = TIMESTEP_END
[]
[stress_21]
type = RankTwoAux
variable = stress_21
rank_two_tensor = global_stress_t_points_0
index_i = 2
index_j = 1
execute_on = TIMESTEP_END
[]
[strain_21]
type = RankTwoAux
variable = strain_21
rank_two_tensor = total_global_strain_t_points_0
index_i = 2
index_j = 1
execute_on = TIMESTEP_END
[]
[]
[BCs]
[BC_0]
type = ADDirichletBC
variable = disp_x
value = 0.0
boundary = '2' #left
[]
[BC_1]
type = ADDirichletBC
variable = disp_y
value = 0.0
boundary = 10 #left_side_mid
[]
[BC_2]
type = FunctionDirichletBC
variable = disp_x
boundary = '3'
function = displacement
[]
[]
[Functions]
[displacement]
type = PiecewiseLinear
x = '0.0 1.0'
y = '0.0 0.2'
[]
[]
[Materials]
[stress]
type = ADComputeShellStress
block = 1
through_thickness_order = SECOND
[]
[elasticity]
type = ADComputeIsotropicElasticityTensorShell
youngs_modulus = 210000
poissons_ratio = 0.3
block = 1
through_thickness_order = SECOND
[]
[strain]
type = ADComputeIncrementalShellStrain
block = 1
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y'
thickness = 0.1
through_thickness_order = SECOND
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = true
line_search = 'none'
nl_rel_tol = 1e-16
nl_abs_tol = 1e-16
dt = 1
dtmin = 1
end_time = 1
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/anis_mech_hill_tensor_creep.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 128
ny = 128
second_order = true
[]
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = false
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[]
[Variables]
[disp_x]
order = SECOND
scaling = 1e-10
[]
[disp_y]
order = SECOND
scaling = 1e-10
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 10e3'
y = '0 1e-4'
[]
[]
[Kernels]
[stress_x]
type = ADStressDivergenceTensors
component = 0
variable = disp_x
[]
[stress_y]
type = ADStressDivergenceTensors
component = 1
variable = disp_y
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
generate_output = 'elastic_strain_xx elastic_strain_yy elastic_strain_xy'
use_automatic_differentiation = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeElasticityTensor
fill_method = orthotropic
C_ijkl = '2.0e3 2.0e5 2.0e3 0.71428571e3 0.71428571e3 0.71428571e3 0.4 0.2 0.004 0.004 0.2 0.4'
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_creep"
max_iterations = 300
[]
[hill_tensor]
type = HillConstants
# F G H L M N
hill_constants = "0.5 0.5 0.3866 1.6413 1.6413 1.2731"
base_name = trial_creep
[]
[trial_creep]
type = ADHillCreepStressUpdate
coefficient = 1e-24
n_exponent = 4
m_exponent = 0
activation_energy = 0
# internal_solve_output_on = always
base_name = trial_creep
[]
[creep_one]
type = ADPowerLawCreepStressUpdate
coefficient = 1e-24
n_exponent = 4
activation_energy = 0
base_name = creep_one
[]
[creep_nine]
type = ADPowerLawCreepStressUpdate
coefficient = 9e-24
n_exponent = 4
activation_energy = 0
base_name = creep_nine
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[pull_disp_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = top
function = pull
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
petsc_options_iname = '-ksp_gmres_restart -pc_type -sub_pc_type'
petsc_options_value = '101 asm lu'
line_search = 'none'
nl_rel_tol = 1e-5
nl_abs_tol = 1.0e-13
num_steps = 200
dt = 1.0e2
automatic_scaling = true
[]
[Postprocessors]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[]
[Outputs]
csv = true
exodus = true
[]
(modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/ad_uniaxial_y.i)
# This test simulates uniaxial tensile loading in y-direction.
# The slope of the stress vs. plastic strain is evaluated from
# the simulation and compared with the value calculated using
# the analytical expression. This test uses a material with li-
# near strain hardening.
# For uniaxial tensile loading in y-direction, the slope of the
# stress vs. plastic strain is (2K / (F + H)) where K is the ha-
# rdening constant, and F & H are the Hill's constant. For deta-
# ils on the derivation of the expression for slope please refer
# the documentation of this material.
# Slope obtained from this MOOSE test simulation:
# = 1.521 x 10^9
# Slope obtained from analytical expression:
# = 2 x 10^9 / (0.6 + 0.7) = 1.538 x 10^9
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[sigma_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[plasticity_strain_xx]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xx
index_i = 0
index_j = 0
[]
[plasticity_strain_xy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xy
index_i = 0
index_j = 1
[]
[plasticity_strain_yy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_yy
index_i = 1
index_j = 1
[]
[sigma_yy]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1e1 1e8'
y = '0 -4e8 -4e8'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_yy stress_yy strain_yy plastic_strain_yy'
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeElasticityTensor
fill_method = orthotropic
C_ijkl = '10.0e10 15.0e10 20.0e10 2.0e10 2.0e10 2.0e10 0.2 0.2 0.2 0.13333333333333333 0.1 0.15'
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_plasticity"
max_iterations = 50
absolute_tolerance = 1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.6 0.4 0.7 1.5 1.5 1.5"
[]
[trial_plasticity]
type = ADHillElastoPlasticityStressUpdate
hardening_constant = 10e9
yield_stress = 60e6
absolute_tolerance = 1e-15
relative_tolerance = 1e-13
# internal_solve_full_iteration_history = true
max_inelastic_increment = 2.0e-5
# internal_solve_output_on = on_error
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
[Pressure]
[Side1]
boundary = top
function = pull
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-12
nl_abs_tol = 1.0e-14
l_max_its = 90
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 30
iteration_window = 9
growth_factor = 1.05
cutback_factor = 0.5
timestep_limiting_postprocessor = matl_ts_min
dt = 0.1
time_t = '0 2.5 10'
time_dt = '0.1 1.0e-2 1.0e-2'
[]
start_time = 0
end_time = 10.0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[plasticity_strain_yy]
type = ElementalVariableValue
variable = plastic_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 0
[]
[elastic_strain_yy]
type = ElementalVariableValue
variable = elastic_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 0
[]
[strain_yy]
type = ElementalVariableValue
variable = strain_yy
execute_on = 'TIMESTEP_END'
elementid = 0
[]
[sigma_yy]
type = ElementalVariableValue
variable = stress_yy
execute_on = 'TIMESTEP_END'
elementid = 0
[]
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/power_law_creep/ad_restart1.i)
# 1x1x1 unit cube with uniform pressure on top face
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
initial_condition = 1000.0
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
incremental = true
add_variables = true
generate_output = 'stress_yy creep_strain_xx creep_strain_yy creep_strain_zz elastic_strain_yy'
use_automatic_differentiation = true
[]
[]
[Functions]
[top_pull]
type = PiecewiseLinear
x = '0 1'
y = '1 1'
[]
[]
[Kernels]
[heat]
type = Diffusion
variable = temp
[]
[heat_ie]
type = TimeDerivative
variable = temp
[]
[]
[BCs]
[u_top_pull]
type = ADPressure
variable = disp_y
boundary = top
factor = -10.0e6
function = top_pull
[]
[u_bottom_fix]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[u_yz_fix]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[u_xy_fix]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
[temp_fix]
type = DirichletBC
variable = temp
boundary = 'bottom top'
value = 1000.0
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 2e11
poissons_ratio = 0.3
constant_on = SUBDOMAIN
[]
[radial_return_stress]
type = ADComputeMultipleInelasticStress
inelastic_models = 'power_law_creep'
[]
[power_law_creep]
type = ADPowerLawCreepStressUpdate
coefficient = 1.0e-15
n_exponent = 4
activation_energy = 3.0e5
temperature = temp
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 20
nl_max_its = 20
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
l_tol = 1e-5
start_time = 0.0
end_time = 1.0
num_steps = 6
dt = 0.1
[]
[Outputs]
exodus = true
[out]
type = Checkpoint
num_files = 1
[]
[]
(modules/solid_mechanics/test/tests/ad_smeared_cracking/cracking_function.i)
#
# Simple pull test for cracking. This tests the option to prescribe the
# cracking strength using an AuxVariable. In this case, an elemental
# AuxVariable is used, and a function is used to prescribe its value.
# One of the elements is weaker than the others, so the crack localizes
# in that element.
#
[Mesh]
file = plate.e
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./cracking_stress_fn]
order = CONSTANT
family = MONOMIAL
[../]
[./crack_flags2]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./displ]
type = PiecewiseLinear
x = '0 0.1 0.2 0.3 0.4'
y = '0 0.001 0 -0.001 0'
[../]
[./fstress]
type = ParsedFunction
expression = 'if(x > 0.667, 1.1e6, 1.2e6)'
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_zx strain_xx strain_yy strain_xy strain_yz'
use_automatic_differentiation = true
[../]
[]
[AuxKernels]
[./cracking_stress_fn]
type = FunctionAux
variable = cracking_stress_fn
function = fstress
execute_on = initial
[../]
[./crack_flags2]
type = ADMaterialRealVectorValueAux
property = crack_flags
variable = crack_flags2
component = 2
[../]
[]
[BCs]
[./pull]
type = ADFunctionDirichletBC
variable = disp_x
boundary = '3 4'
function = displ
[../]
[./pin_x]
type = ADDirichletBC
variable = disp_x
boundary = '1 2'
value = 0
[../]
[./pin_y]
type = ADDirichletBC
variable = disp_y
boundary = '1 4'
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 200.0e7
poissons_ratio = 0.0
[../]
[./elastic_stress]
type = ADComputeSmearedCrackingStress
cracking_stress = cracking_stress_fn
cracked_elasticity_type = FULL
softening_models = abrupt_softening
[../]
[./abrupt_softening]
type = ADAbruptSoftening
residual_stress = 0.0
[../]
[]
[Postprocessors]
[./elem_stress_xx]
type = ElementalVariableValue
variable = stress_xx
elementid = 2
[../]
[./elem_strain_xx]
type = ElementalVariableValue
variable = strain_xx
elementid = 2
[../]
[./elem_crack_flags_x]
type = ElementalVariableValue
variable = crack_flags2
elementid = 2
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101 '
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-8
nl_abs_tol = 1e-6
l_tol = 1e-5
start_time = 0.0
end_time = 0.2
dt = 0.0025
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/closed_gap_thermomechanical_mortar_contact.i)
## Units in the input file: m-Pa-s-K
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmax = 1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmin = 1
xmax = 2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
patch_update_strategy = iteration
[]
[Variables]
[disp_x]
block = 'left_block right_block'
[]
[disp_y]
block = 'left_block right_block'
[]
[temperature]
initial_condition = 300.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[Modules]
[TensorMechanics/Master]
[steel]
strain = FINITE
add_variables = false
use_automatic_differentiation = true
generate_output = 'strain_xx strain_xy strain_yy stress_xx stress_xy stress_yy'
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
eigenstrain_names = steel_thermal_expansion
block = 'left_block'
[]
[aluminum]
strain = FINITE
add_variables = false
use_automatic_differentiation = true
generate_output = 'strain_xx strain_xy strain_yy stress_xx stress_xy stress_yy'
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
eigenstrain_names = aluminum_thermal_expansion
block = 'right_block'
[]
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
block = 'left_block'
[]
[HeatTdot_steel]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = steel_heat_capacity
density_name = steel_density
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
block = 'right_block'
[]
[HeatTdot_aluminum]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = aluminum_heat_capacity
density_name = aluminum_density
block = 'right_block'
[]
[]
[BCs]
[fixed_bottom_edge]
type = ADDirichletBC
variable = disp_y
value = 0
boundary = 'moving_block_bottom fixed_block_bottom'
[]
[fixed_outer_edge]
type = ADDirichletBC
variable = disp_x
value = 0
boundary = 'fixed_block_right'
[]
[displacement_left_block]
type = ADFunctionDirichletBC
variable = disp_x
function = '2.0e-7*t'
boundary = 'moving_block_left'
[]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 800
boundary = 'fixed_block_right'
[]
[]
[Contact]
[interface]
primary = moving_block_right
secondary = fixed_block_left
model = frictionless
formulation = mortar
correct_edge_dropping = true
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed'
use_displaced_mesh = true
[]
[]
[Materials]
[steel_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1.93e11 #in Pa, 193 GPa, stainless steel 304
poissons_ratio = 0.29
block = 'left_block'
[]
[steel_stress]
type = ADComputeFiniteStrainElasticStress
block = 'left_block'
[]
[steel_thermal_expansion]
type = ADComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 17.3e-6 # stainless steel 304
stress_free_temperature = 300.0
temperature = temperature
eigenstrain_name = 'steel_thermal_expansion'
block = 'left_block'
[]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity steel_hardness'
prop_values = ' 8e3 16.2 0.5 129' ## for stainless steel 304
block = 'left_block'
[]
[aluminum_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 6.8e10 #in Pa, 68 GPa, aluminum
poissons_ratio = 0.36
block = 'right_block'
[]
[aluminum_stress]
type = ADComputeFiniteStrainElasticStress
block = 'right_block'
[]
[aluminum_thermal_expansion]
type = ADComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 24.0e-6 # aluminum
stress_free_temperature = 300.0
temperature = temperature
eigenstrain_name = 'aluminum_thermal_expansion'
block = 'right_block'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_hardness'
prop_values = ' 2.7e3 210 0.9 15' #for 99% pure Al
block = 'right_block'
[]
[]
[UserObjects]
[closed]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[steel_pt_interface_temperature]
type = NodalVariableValue
nodeid = 245
variable = temperature
[]
[aluminum_pt_interface_temperature]
type = NodalVariableValue
nodeid = 657
variable = temperature
[]
[steel_element_interface_stress]
type = ElementalVariableValue
variable = vonmises_stress
elementid = 199
[]
[aluminum_element_interface_stress]
type = ElementalVariableValue
variable = vonmises_stress
elementid = 560
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
# mortar contact solver options
petsc_options = '-snes_converged_reason -pc_svd_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = ' lu superlu_dist'
snesmf_reuse_base = false
nl_rel_tol = 1e-8
nl_max_its = 20
l_max_its = 50
dt = 2
end_time = 10
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/solid_mechanics/tutorials/introduction/mech_step02a.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[generated]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmax = 2
ymax = 1
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
# we added this in the first exercise problem
strain = FINITE
# enable the use of automatic differentiation objects
use_automatic_differentiation = true
[]
[]
[BCs]
[bottom_x]
# we use the AD version of this boundary condition here...
type = ADDirichletBC
variable = disp_x
boundary = bottom
value = 0
[]
[bottom_y]
# ...and here
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[Pressure]
[top]
boundary = top
function = 1e7*t
# make the action add AD versions of the boundary condition objects
use_automatic_differentiation = true
[]
[]
[]
[Materials]
[elasticity]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e9
poissons_ratio = 0.3
[]
[stress]
type = ADComputeFiniteStrainElasticStress
[]
[]
[Executioner]
type = Transient
# MOOSE automatically sets up SMP/full=true with NEWTON
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
end_time = 5
dt = 1
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/open_gap_pressure_dependent.i)
## Units in the input file: m-Pa-s-K
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmax = 1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmin = 1.0001
xmax = 2.0001
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[]
[Variables]
[disp_x]
block = 'left_block right_block'
[]
[disp_y]
block = 'left_block right_block'
[]
[temperature]
initial_condition = 525.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[Modules]
[TensorMechanics/Master]
[steel]
strain = SMALL
add_variables = false
use_automatic_differentiation = true
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
block = 'left_block'
[]
[aluminum]
strain = SMALL
add_variables = false
use_automatic_differentiation = true
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
block = 'right_block'
[]
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
block = 'right_block'
[]
[]
[BCs]
[fixed_bottom_edge]
type = ADDirichletBC
variable = disp_y
value = 0
boundary = 'moving_block_bottom fixed_block_bottom'
[]
[fixed_outer_edge]
type = ADDirichletBC
variable = disp_x
value = 0
boundary = 'fixed_block_right'
[]
[pressure_left_block]
type = ADPressure
variable = disp_x
boundary = 'moving_block_left'
component = 0
function = 1*t
[]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 800
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 250
boundary = 'fixed_block_right'
[]
[]
[Contact]
[interface]
primary = moving_block_right
secondary = fixed_block_left
model = frictionless
formulation = mortar
correct_edge_dropping = true
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed'
use_displaced_mesh = true
[]
[]
[Materials]
[steel_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1.93e11 #in Pa, 193 GPa, stainless steel 304
poissons_ratio = 0.29
block = 'left_block'
[]
[steel_stress]
type = ADComputeLinearElasticStress
block = 'left_block'
[]
[steel_density]
type = ADGenericConstantMaterial
prop_names = 'steel_density'
prop_values = 8e3 #in kg/m^3, stainless steel 304
block = 'left_block'
[]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_thermal_conductivity steel_heat_capacity steel_emissivity'
prop_values = '16.2 0.5 0.6' ## for stainless steel 304
block = 'left_block'
[]
[aluminum_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 6.8e10 #in Pa, 68 GPa, aluminum
poissons_ratio = 0.36
block = 'right_block'
[]
[aluminum_stress]
type = ADComputeLinearElasticStress
block = 'right_block'
[]
[aluminum_density]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density'
prop_values = 2.7e3 #in kg/m^3, stainless steel 304
block = 'right_block'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_thermal_conductivity aluminum_heat_capacity aluminum_emissivity'
prop_values = '210 0.9 0.25'
block = 'right_block'
[]
[]
[UserObjects]
[closed]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
primary_hardness = 1.0
secondary_hardness = 1.0
boundary = moving_block_right
contact_pressure = interface_normal_lm
[]
[]
[Postprocessors]
[steel_pt_interface_temperature]
type = NodalVariableValue
nodeid = 245
variable = temperature
[]
[aluminum_pt_interface_temperature]
type = NodalVariableValue
nodeid = 657
variable = temperature
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[steel_element_interface_stress]
type = ElementalVariableValue
variable = vonmises_stress
elementid = 199
[]
[aluminum_element_interface_stress]
type = ElementalVariableValue
variable = vonmises_stress
elementid = 560
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
csv = true
perf_graph = true
[]
(tutorials/tutorial01_app_development/step05_kernel_object/problems/pressure_diffusion.i)
[Mesh]
type = GeneratedMesh # Can generate simple lines, rectangles and rectangular prisms
dim = 2 # Dimension of the mesh
nx = 100 # Number of elements in the x direction
ny = 10 # Number of elements in the y direction
xmax = 0.304 # Length of test chamber
ymax = 0.0257 # Test chamber radius
[]
[Problem]
type = FEProblem # This is the "normal" type of Finite Element Problem in MOOSE
coord_type = RZ # Axisymmetric RZ
rz_coord_axis = X # Which axis the symmetry is around
[]
[Variables]
[pressure]
# Adds a Linear Lagrange variable by default
[]
[]
[Kernels]
[diffusion]
type = DarcyPressure # Zero-gravity, divergence-free form of Darcy's law
variable = pressure # Operate on the "pressure" variable from above
[]
[]
[BCs]
[inlet]
type = ADDirichletBC # Simple u=value BC
variable = pressure # Variable to be set
boundary = left # Name of a sideset in the mesh
value = 4000 # (Pa) From Figure 2 from paper. First data point for 1mm spheres.
[]
[outlet]
type = ADDirichletBC
variable = pressure
boundary = right
value = 0 # (Pa) Gives the correct pressure drop from Figure 2 for 1mm spheres
[]
[]
[Executioner]
type = Steady # Steady state problem
solve_type = NEWTON # Perform a Newton solve
# Set PETSc parameters to optimize solver efficiency
petsc_options_iname = '-pc_type -pc_hypre_type' # PETSc option pairs with values below
petsc_options_value = ' hypre boomeramg'
[]
[Outputs]
exodus = true # Output Exodus format
[]
(modules/solid_mechanics/test/tests/temperature_dependent_hardening/ADtemp_dep_hardening.i)
#
# This is a test of the piece-wise linear strain hardening model using the
# small strain formulation. This test exercises the temperature-dependent
# hardening curve capability.
#
# Test procedure:
# 1. The element is pulled to and then beyond the yield stress for a given
# temperature.
# 2. The displacement is then constant while the temperature increases and
# the yield stress decreases. This results in a lower stress with more
# plastic strain.
# 3. The temperature decreases beyond its original value giving a higher
# yield stress. The displacement increases, causing increases stress to
# the new yield stress.
# 4. The temperature and yield stress are constant with increasing
# displacement giving a constant stress and more plastic strain.
#
# Plotting total_strain_yy on the x axis and stress_yy on the y axis shows
# the stress history in a clear way.
#
# s |
# t | *****
# r | *
# e | ***** *
# s | * * *
# s | * *
# |*
# +------------------
# total strain
#
# The exact same problem was run in Abaqus with exactly the same result.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
# This test uses ElementalVariableValue postprocessors on specific
# elements, so element numbering needs to stay unchanged
allow_renumbering = false
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[temp]
order = FIRST
family = LAGRANGE
initial_condition = 500.0
[]
[]
[AuxKernels]
[temp_aux]
type = FunctionAux
variable = temp
function = temp_hist
[]
[]
[Functions]
[top_pull]
type = PiecewiseLinear
x = '0 1 2 4 5 6'
y = '0 0.025 0.05 0.05 0.06 0.085'
[]
[hf1]
type = PiecewiseLinear
x = '0.0 0.01 0.02 0.03 0.1'
y = '5000 5030 5060 5090 5300'
[]
[hf2]
type = PiecewiseLinear
x = '0.0 0.01 0.02 0.03 0.1'
y = '4000 4020 4040 4060 4200'
[]
[temp_hist]
type = PiecewiseLinear
x = '0 1 2 3 4'
y = '500 500 500 600 400'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = SMALL
incremental = true
add_variables = true
generate_output = 'stress_yy strain_yy plastic_strain_xx plastic_strain_yy plastic_strain_zz'
use_automatic_differentiation = true
[]
[]
[BCs]
[y_pull_function]
type = ADFunctionDirichletBC
variable = disp_y
boundary = 3
function = top_pull
[]
[x_bot]
type = ADDirichletBC
variable = disp_x
boundary = 4
value = 0.0
[]
[y_bot]
type = ADDirichletBC
variable = disp_y
boundary = 1
value = 0.0
[]
[z_bot]
type = ADDirichletBC
variable = disp_z
boundary = 0
value = 0.0
[]
[]
[Postprocessors]
[stress_yy_el]
type = ElementalVariableValue
variable = stress_yy
elementid = 0
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 2e5
poissons_ratio = 0.3
[]
[temp_dep_hardening]
type = ADTemperatureDependentHardeningStressUpdate
hardening_functions = 'hf1 hf2'
temperatures = '300.0 800.0'
relative_tolerance = 1e-25
absolute_tolerance = 1e-5
temperature = temp
[]
[radial_return_stress]
type = ADComputeMultipleInelasticStress
inelastic_models = 'temp_dep_hardening'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 4'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
end_time = 6
dt = 0.1
[]
[Outputs]
[out]
file_base = temp_dep_hardening_out
type = Exodus
[]
[]
(test/tests/bcs/ad_matched_value_bc/test.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[]
[]
# Solves a pair of coupled diffusion equations where u=v on the boundary
[Variables]
[u]
order = FIRST
family = LAGRANGE
initial_condition = 3
[]
[v]
order = FIRST
family = LAGRANGE
initial_condition = 2
[]
[]
[Kernels]
[diff_u]
type = ADDiffusion
variable = u
[]
[diff_v]
type = ADDiffusion
variable = v
[]
[]
[BCs]
[right_v]
type = ADDirichletBC
variable = v
boundary = 1
value = 3
[]
[left_u]
type = ADMatchedValueBC
variable = u
boundary = 3
v = v
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_rel_tol = 1e-10
l_tol = 1e-12
[]
[Outputs]
file_base = out
exodus = true
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_dual_material_insulated.i)
## Units in the input file: m-Pa-s-K-V
# Using the steady-state Fourier's law, the temperature at the interface in each block,
# in the case where thermal contact between the two blocks at the interface is not
# considered, (steel block on left, aluminum on right) is calculated as:
#
# T_{interface - steel} = 816.849K
# T_{interface - aluminum} = 339.871K
# which matches the simulation results to the 6 decimal places shown.
# As expected, the heat flux resulting from the volumetric Joule heating source is
# equivalent on both sides of the interface.
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmax = 0.1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmin = 0.1
xmax = 0.2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
[]
[Variables]
[temperature]
initial_condition = 300.0
[]
[potential]
[]
[potential_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 1.0
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
extra_vector_tags = 'ref'
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
extra_vector_tags = 'ref'
block = 'right_block'
[]
[electric_steel]
type = ADMatDiffusion
variable = potential
diffusivity = steel_electrical_conductivity
extra_vector_tags = 'ref'
block = 'left_block'
[]
[electric_aluminum]
type = ADMatDiffusion
variable = potential
diffusivity = aluminum_electrical_conductivity
extra_vector_tags = 'ref'
block = 'right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'fixed_block_right'
[]
[electric_left]
type = ADDirichletBC
variable = potential
value = 0.0
boundary = moving_block_left
[]
[electric_right]
type = ADDirichletBC
variable = potential
value = 3.0e-1
boundary = fixed_block_right
[]
[]
[Constraints]
[electrical_contact]
type = ModularGapConductanceConstraint
variable = potential_interface_lm
secondary_variable = potential
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_electric'
[]
[interface_heating]
type = ADInterfaceJouleHeatingConstraint
potential_lagrange_multiplier = potential_interface_lm
secondary_variable = temperature
primary_electrical_conductivity = steel_electrical_conductivity
secondary_electrical_conductivity = aluminum_electrical_conductivity
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
[]
[]
[Materials]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity steel_electrical_conductivity steel_hardness'
prop_values = '8e3 16.2 500.0 1.39e6 1.0' ## for stainless steel 304
block = 'left_block interface_secondary_subdomain'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 900.0 3.7e7 1.0' #for 99% pure Al
block = 'left_block right_block interface_secondary_subdomain'
[]
[]
[UserObjects]
[closed_electric]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_electrical_conductivity
secondary_conductivity = aluminum_electrical_conductivity
temperature = potential
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[steel_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_primary_subdomain
[]
[aluminum_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[interface_electrical_flux]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = fixed_block_left
diffusivity = aluminum_electrical_conductivity
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-6
nl_max_its = 100
nl_forced_its = 1
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/anis_mech_hill_tensor_creep_small_tiny_step_ts_limit_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
second_order = true
[]
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = false
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
incremental = true
generate_output = 'elastic_strain_xx elastic_strain_yy elastic_strain_xy stress_xx stress_xy '
'stress_yy'
use_automatic_differentiation = true
[]
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[Variables]
[disp_x]
order = SECOND
[]
[disp_y]
order = SECOND
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[creep_strain_xx]
type = ADRankTwoAux
rank_two_tensor = trial_creep_creep_strain
variable = creep_strain_xx
index_i = 0
index_j = 0
[]
[creep_strain_xy]
type = ADRankTwoAux
rank_two_tensor = trial_creep_creep_strain
variable = creep_strain_xy
index_i = 0
index_j = 1
[]
[creep_strain_yy]
type = ADRankTwoAux
rank_two_tensor = trial_creep_creep_strain
variable = creep_strain_yy
index_i = 1
index_j = 1
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1e3 1e8'
y = '0 1e2 1e2'
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeElasticityTensor
fill_method = orthotropic
C_ijkl = '2.0e3 2.0e5 2.0e3 0.71428571e3 0.71428571e3 0.71428571e3 0.4 0.2 0.004 0.004 0.2 0.4'
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_creep trial_creep_two"
max_iterations = 5
absolute_tolerance = 1e-05
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5 0.5 0.3866 1.6413 1.6413 1.2731"
base_name = trial_creep
[]
[trial_creep]
type = ADHillCreepStressUpdate
coefficient = 3e-18
n_exponent = 5
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 1.0e-5
base_name = trial_creep
# Force it to not use integration error
max_integration_error = 1.0
[]
[hill_tensor_two]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5 0.5 0.3866 1.6413 1.6413 1.2731"
base_name = trial_creep_two
[]
[trial_creep_two]
type = ADHillCreepStressUpdate
coefficient = 3e-18
n_exponent = 5
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 1.0e-5
base_name = trial_creep_two
# Force it to not use integration error
max_integration_error = 1.0
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = bottom
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[Pressure]
[Side1]
boundary = top
function = pull
[]
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-ksp_gmres_restart -pc_type -sub_pc_type'
petsc_options_value = '101 asm lu'
line_search = 'none'
nl_rel_tol = 1e-10
nl_abs_tol = 1.0e-14
l_max_its = 90
num_steps = 7
start_time = 0
automatic_scaling = true
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 30
iteration_window = 9
growth_factor = 2.0
cutback_factor = 0.5
timestep_limiting_postprocessor = matl_ts_min
dt = 5.0e1
[]
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[]
[Outputs]
csv = true
exodus = true
perf_graph = true
[]
(modules/stochastic_tools/examples/parameter_study/diffusion_vector.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables/T]
initial_condition = 300
[]
[Kernels]
[time]
type = ADTimeDerivative
variable = T
[]
[diff]
type = ADMatDiffusion
variable = T
diffusivity = diffusivity
[]
[source]
type = ADBodyForce
variable = T
value = 100
function = 1
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = T
boundary = left
value = 300
[]
[right]
type = ADNeumannBC
variable = T
boundary = right
value = -100
[]
[]
[Materials/constant]
type = ADGenericConstantMaterial
prop_names = 'diffusivity'
prop_values = 1
[]
[Executioner]
type = Transient
num_steps = 4
dt = 0.25
[]
[Postprocessors]
[T_avg]
type = ElementAverageValue
variable = T
execute_on = 'initial timestep_end'
[]
[q_left]
type = ADSideDiffusiveFluxAverage
variable = T
boundary = left
diffusivity = diffusivity
execute_on = 'initial timestep_end'
[]
[]
[Reporters]
[acc]
type = AccumulateReporter
reporters = 'T_avg/value q_left/value'
[]
[]
[Controls/stochastic]
type = SamplerReceiver
[]
[Outputs]
[]
(modules/contact/test/tests/verification/patch_tests/automatic_patch_update/iteration_adaptivity_parallel.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
coord_type = XYZ
patch_update_strategy = iteration
patch_size = 8
ghosting_patch_size = 20
[cube1]
type = GeneratedMeshGenerator
dim = 2
boundary_name_prefix = cube1
xmax = 1
ymax = 1
nx = 2
ny = 2
[]
[cube2]
type = GeneratedMeshGenerator
dim = 2
boundary_name_prefix = cube2
boundary_id_offset = 5
xmax = 1
ymax = 1
nx = 2
ny = 2
[]
[block_id]
type = SubdomainIDGenerator
input = cube2
subdomain_id = 2
[]
[combine]
inputs = 'cube1 block_id'
type = CombinerGenerator
positions = '0 0 0
0 1 0'
[]
[rename2]
type = RenameBlockGenerator
input = combine
old_block = '0 2'
new_block = 'cube1 cube2'
[]
[]
[Adaptivity]
initial_marker = box
initial_steps = 1
max_h_level = 1
[Markers]
[box]
type = BoxMarker
bottom_left = '0 0 0'
top_right = '0.5 0.5 0'
inside = refine
outside = do_nothing
[]
[]
[]
[Variables]
[disp_x]
block = 'cube1 cube2'
[]
[disp_y]
block = 'cube1 cube2'
[]
[]
[Modules/TensorMechanics/Master]
[cube1_mechanics]
strain = FINITE
block = 'cube1 cube2'
[]
[]
[BCs]
[cube1_x]
type = ADDirichletBC
variable = disp_x
boundary = 'cube1_bottom '
value = 0.0
[]
[cube1_y]
type = ADDirichletBC
variable = disp_y
boundary = 'cube1_bottom '
value = 0.0
[]
[cube2_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = 'cube2_top'
function = '-t'
preset = false
[]
[cube2_x]
type = ADDirichletBC
variable = disp_x
boundary = 'cube2_top'
value = 0
[]
[]
[Materials]
[cube1_elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 68.9e9
poissons_ratio = 0.3
block = 'cube1'
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = 'cube1 cube2'
[]
[cube2_elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 140e9
poissons_ratio = 0.3
block = 'cube2'
[]
[]
[Contact]
[contactswell]
secondary = cube1_top
primary = cube2_bottom
model = frictionless
formulation = mortar_penalty
penalty = 1.0e12
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
line_search = 'none'
nl_rel_tol = 1e-9
nl_abs_tol = 1e-9
nl_max_its = 50
l_tol = 1e-4
l_max_its = 50
start_time = 0.0
end_time = 0.02e-3
dtmax = 4
dtmin = 0.001e-3
dt = 0.01e-3
automatic_scaling = true
off_diagonals_in_auto_scaling = true
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
(modules/solid_mechanics/test/tests/ad_smeared_cracking/cracking_rotation.i)
# This test is to ensure that the smeared cracking model correctly handles finite
# rotation of cracked elements.
# This consists of a single element that is first subjected to tensile loading
# in the y-direction via a prescribed displacement. This loading is sufficiently
# high to crack the material in that direction, but not completely unload. The
# prescribed displacement is then reversed so that the element is returned to its
# original configuration.
# In the next phase of the analysis, this element is then rotated 90 degrees by
# prescribing the displacement of the bottom of the element. The prescribed
# displacement BC used to crack the element in the first phase is deactivated.
# Once the element is fully rotated, a new BC is activated on what was originally
# the top surface (but is now the surface on the right hand side) to pull in
# the x-direction.
# If everything is working correctly, the model should re-load on the original
# crack (which should be rotated along with the elemnent) up to the peak stress
# in the first phase of the analysis, and then continue the unloading process
# as the crack strains continue to increase. Throughout this analysis, there should
# only be a single crack, as manifested in the crack_flags variables.
[Mesh]
file = cracking_test.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_zx'
use_automatic_differentiation = true
[../]
[]
[AuxVariables]
[./crack_flags1]
order = CONSTANT
family = MONOMIAL
[../]
[./crack_flags2]
order = CONSTANT
family = MONOMIAL
[../]
[./crack_flags3]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./crack_flags1]
type = ADMaterialRealVectorValueAux
property = crack_flags
variable = crack_flags1
component = 0
[../]
[./crack_flags2]
type = ADMaterialRealVectorValueAux
property = crack_flags
variable = crack_flags2
component = 1
[../]
[./crack_flags3]
type = ADMaterialRealVectorValueAux
property = crack_flags
variable = crack_flags3
component = 2
[../]
[]
[BCs]
[./x_pin]
type = ADDirichletBC
variable = disp_x
boundary = '15 16'
value = 0.0
[../]
[./y_pin]
type = ADDirichletBC
variable = disp_y
boundary = '15 16'
value = 0.0
[../]
[./z_all]
type = ADDirichletBC
variable = disp_z
boundary = '11 12 13 14 15 16 17 18'
value = 0.0
[../]
[./x_lb]
type = ADFunctionDirichletBC
variable = disp_x
boundary = '11 12'
function = 'if(t<10,0,if(t>=100,1,1-cos((t-10)*pi/180)))'
[../]
[./y_lb]
type = ADFunctionDirichletBC
variable = disp_y
boundary = '11 12'
function = 'if(t<10,0,if(t>=100,1,sin((t-10)*pi/180)))'
[../]
[./x_lt]
type = ADFunctionDirichletBC
variable = disp_x
boundary = '13 14'
function = '2+(t-100)*0.01'
[../]
[./x_rt]
type = ADFunctionDirichletBC
variable = disp_x
boundary = '17 18'
function = '1+(t-100)*0.01'
[../]
[./top_pull]
type = ADFunctionDirichletBC
variable = disp_y
boundary = '13 14 17 18'
function = 'if(t<5,t*0.01,0.05-(t-5)*0.01)'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 100.e9
poissons_ratio = 0.
[../]
[./cracking_stress]
type = ADComputeSmearedCrackingStress
shear_retention_factor = 0.1
cracking_stress = 3.e9
cracked_elasticity_type = FULL
softening_models = exponential_softening
[../]
[./exponential_softening]
type = ADExponentialSoftening
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
petsc_options_iname = '-ksp_gmres_restart -pc_type'
petsc_options_value = '101 lu'
line_search = 'none'
l_max_its = 100
l_tol = 1e-5
nl_max_its = 100
nl_abs_tol = 1e-5
nl_rel_tol = 1e-12
start_time = 0
end_time = 110
dt = 1
[]
[Controls]
[./p1]
type = TimePeriod
start_time = 0.0
end_time = 10.0
disable_objects = 'BCs/x_lt BCs/x_rt'
enable_objects = 'BCs/top_pull'
reverse_on_false = false
execute_on = 'initial timestep_begin'
[../]
[./p2]
type = TimePeriod
start_time = 10.0
end_time = 101.0
disable_objects = 'BCs/x_lt BCs/x_rt BCs/top_pull'
reverse_on_false = false
execute_on = 'initial timestep_begin'
[../]
[./p3]
type = TimePeriod
start_time = 101.0
end_time = 110.0
enable_objects = 'BCs/x_lt BCs/x_rt'
disable_objects = 'BCs/top_pull'
reverse_on_false = false
execute_on = 'initial timestep_begin'
[../]
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_z_3d.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 10
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 1.0
ymax = 1.0
zmax = 10.0
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = '100'
nodes = '9 3'
input = gen
[]
[corner_node_2]
type = ExtraNodesetGenerator
new_boundary = '101'
nodes = '12 1'
input = corner_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[creep_strain_xx]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xx
index_i = 0
index_j = 0
[]
[creep_strain_xy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xy
index_i = 0
index_j = 1
[]
[creep_strain_zz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_zz
index_i = 2
index_j = 2
[]
[sigma_zz]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1.0'
y = '-4e1 -4e1'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_zz stress_zz stress_xx stress_yy stress_xy stress_xz stress_yz'
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 700
poissons_ratio = 0.0
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_creep_two"
max_iterations = 50
absolute_tolerance = 1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5 0.25 0.3866 1.6413 1.6413 1.2731"
[]
[trial_creep_two]
type = ADHillCreepStressUpdate
coefficient = 1e-16
n_exponent = 9
m_exponent = 0
activation_energy = 0
# F G H L M N
max_inelastic_increment = 0.00003
absolute_tolerance = 1e-20
relative_tolerance = 1e-20
# Force it to not use integration error
max_integration_error = 100.0
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_y
boundary = 100
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_x
boundary = 101
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
[pressure]
type = ADPressure
boundary = front
function = pull
variable = disp_z
component = 2
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1.0e-13
nl_abs_tol = 1.0e-13
l_max_its = 90
num_steps = 10
dt = 1.0e-4
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[creep_strain_zz]
type = ElementalVariableValue
variable = creep_strain_zz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_zz]
type = ElementalVariableValue
variable = elastic_strain_zz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_zz]
type = ElementalVariableValue
variable = stress_zz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[]
[Outputs]
csv = true
exodus = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/action/material_output_first_lagrange_automatic.i)
# This input file is designed to test adding extra stress to ADComputeLinearElasticStress
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 50
ymax = 50
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Physics/SolidMechanics/QuasiStatic/All]
strain = SMALL
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_zx hydrostatic_stress vonmises_stress'
material_output_order = 'CONSTANT CONSTANT CONSTANT CONSTANT CONSTANT CONSTANT CONSTANT FIRST'
material_output_family = 'MONOMIAL MONOMIAL MONOMIAL MONOMIAL MONOMIAL MONOMIAL MONOMIAL LAGRANGE'
use_automatic_differentiation = true
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0
[]
[stress]
type = ADComputeLinearElasticStress
extra_stress_names = 'stress_one stress_two'
[]
[stress_one]
type = GenericConstantRankTwoTensor
tensor_name = stress_one
tensor_values = '0 1e3 1e3 1e3 0 1e3 1e3 1e3 0'
[]
[stress_two]
type = GenericConstantRankTwoTensor
tensor_name = stress_two
tensor_values = '1e3 0 0 0 1e3 0 0 0 1e3'
[]
[]
[BCs]
[disp_x_BC]
type = ADDirichletBC
variable = disp_x
boundary = 'bottom top'
value = 0.5
[]
[disp_x_BC2]
type = ADDirichletBC
variable = disp_x
boundary = 'left right'
value = 0.01
[]
[disp_y_BC]
type = ADDirichletBC
variable = disp_y
boundary = 'bottom top'
value = 0.8
[]
[disp_y_BC2]
type = ADDirichletBC
variable = disp_y
boundary = 'left right'
value = 0.02
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Postprocessors]
[hydrostatic]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[von_mises]
type = NodalVariableValue
variable = vonmises_stress
nodeid = 0
[]
[]
[Outputs]
exodus = true
[]
(test/tests/controls/time_periods/bcs/adbcs.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = CoefDiffusion
variable = u
coef = 0.1
[]
[time]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = ADDirichletBC
variable = u
boundary = right
value = 1
[]
[right2]
type = ADFunctionDirichletBC
variable = u
boundary = right
function = (y*(t-1))+1
[]
[]
[Executioner]
type = Transient
num_steps = 20
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
[Controls]
[period0]
type = TimePeriod
disable_objects = 'BoundaryCondition::right2'
start_time = '0'
end_time = '0.95'
execute_on = 'initial timestep_begin'
[]
[period2]
type = TimePeriod
disable_objects = 'BCs/right'
start_time = '1'
execute_on = 'initial timestep_begin'
[]
[]
(modules/solid_mechanics/test/tests/ad_1D_spherical/smallStrain_1DSphere.i)
# This simulation models the mechanics solution for a solid sphere under
# pressure, applied on the outer surfaces, using 1D spherical symmetry
# assumpitions. The inner center of the sphere, r = 0, is pinned to prevent
# movement of the sphere.
#
# From Bower (Applied Mechanics of Solids, 2008, available online at
# solidmechanics.org/text/Chapter4_1/Chapter4_1.htm), and applying the outer
# pressure and pinned displacement boundary conditions set in this simulation,
# the radial displacement is given by:
#
# u(r) = \frac{- P * (1 - 2 * v) * r}{E}
#
# where P is the applied pressure, v is Poisson's ration, E is Young's Modulus,
# and r is the radial position.
#
# The test assumes a radius of 4, zero displacement at r = 0mm, and an applied
# outer pressure of 1MPa. Under these conditions in a solid sphere, the radial
# stress is constant and has a value of -1 MPa.
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 4
nx = 4
[]
[GlobalParams]
displacements = 'disp_r'
[]
[Problem]
coord_type = RSPHERICAL
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = SMALL
add_variables = true
save_in = residual_r
use_automatic_differentiation = true
generate_output = 'spherical_hoop_stress spherical_radial_stress'
spherical_center_point = '0.0 0.0 0.0'
[]
[]
[AuxVariables]
[residual_r]
[]
[]
[Postprocessors]
[stress_rr]
type = ElementAverageValue
variable = spherical_radial_stress
[]
[stress_tt]
type = ElementAverageValue
variable = spherical_hoop_stress
[]
[residual_r]
type = NodalSum
variable = residual_r
boundary = right
[]
[]
[BCs]
[innerDisp]
type = ADDirichletBC
boundary = left
variable = disp_r
value = 0.0
[]
[outerPressure]
type = ADPressure
boundary = right
variable = disp_r
factor = 1
[]
[]
[Materials]
[Elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
poissons_ratio = 0.345
youngs_modulus = 1e4
[]
[stress]
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
# controls for linear iterations
l_max_its = 100
l_tol = 1e-8
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-10
nl_abs_tol = 1e-5
# time control
start_time = 0.0
dt = 0.25
dtmin = 0.0001
end_time = 0.25
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_single_material_insulated.i)
## Units in the input file: m-Pa-s-K-V
# In this steady-state, symmetric simulation, the temperature at the interface between
# the two blocks of aluminum can be calculated through Fourier's law (see the documentation
# page for ADInterfaceJouleHeatingConstraint for the relevant formulas).
#
# With the prescribed 0.0 V (left) and 0.3V (right) potential boundary conditions, the
# electric potential drop is 9.25e6 [V * S / m^2]. From this current-density-like LM variable,
# the volumetric heat source at the interface is calculated as
# q = 1.15625e6 [W/m^3}
# Because of the 2D nature of this problem, the volumetric heat source is equal to
# the negative of the heat flux at the interface.
#
# Finally, the temperature at the interface is computed as a function of the block width,
# thermal conductivity, and specified temperature boundary condition (300K on both the
# left and right edges):
# T_{interface} = 850.5952K
# which matches the simulation result to the 6 decimal places shown.
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmax = 0.1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmin = 0.1
xmax = 0.2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
[]
[Variables]
[temperature]
initial_condition = 300.0
[]
[potential]
[]
[potential_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 1.0
[]
[]
[Kernels]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
extra_vector_tags = 'ref'
block = 'left_block right_block'
[]
[electric_aluminum]
type = ADMatDiffusion
variable = potential
diffusivity = aluminum_electrical_conductivity
extra_vector_tags = 'ref'
block = 'left_block right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'fixed_block_right'
[]
[electric_left]
type = ADDirichletBC
variable = potential
value = 0.0
boundary = moving_block_left
[]
[electric_right]
type = ADDirichletBC
variable = potential
value = 3.0e-1
boundary = fixed_block_right
[]
[]
[Constraints]
[electrical_contact]
type = ModularGapConductanceConstraint
variable = potential_interface_lm
secondary_variable = potential
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_electric'
[]
[interface_heating]
type = ADInterfaceJouleHeatingConstraint
potential_lagrange_multiplier = potential_interface_lm
secondary_variable = temperature
primary_electrical_conductivity = aluminum_electrical_conductivity
secondary_electrical_conductivity = aluminum_electrical_conductivity
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
[]
[]
[Materials]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 900.0 3.7e7 1.0' #for 99% pure Al
block = 'left_block right_block interface_secondary_subdomain'
[]
[]
[UserObjects]
[closed_electric]
type = GapFluxModelPressureDependentConduction
primary_conductivity = aluminum_electrical_conductivity
secondary_conductivity = aluminum_electrical_conductivity
temperature = potential
contact_pressure = interface_normal_lm
primary_hardness = aluminum_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[aluminum_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[aluminum_interface_potential]
type = AverageNodalVariableValue
variable = potential
block = interface_secondary_subdomain
[]
[interface_electrical_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = fixed_block_left
diffusivity = aluminum_electrical_conductivity
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
nl_abs_tol = 2e-10
nl_rel_tol = 1e-6
nl_max_its = 50
nl_forced_its = 1
[]
[Outputs]
csv = true
perf_graph = true
[]
(test/tests/bcs/ad_bc_preset_nodal/bc_preset_nodal.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
nz = 0
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff'
[./diff]
type = ADDiffusion
variable = u
[../]
[]
[BCs]
active = 'left right'
# We will use preset BCs
[./left]
type = ADDirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = ADDirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = bc_preset_out
exodus = true
[]
(modules/contact/test/tests/verification/patch_tests/automatic_patch_update/iteration_adaptivity_parallel_node_face.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
coord_type = XYZ
patch_update_strategy = iteration
patch_size = 8
ghosting_patch_size = 20
[cube1]
type = GeneratedMeshGenerator
dim = 2
boundary_name_prefix = cube1
xmax = 1
ymax = 1
nx = 2
ny = 2
[]
[cube2]
type = GeneratedMeshGenerator
dim = 2
boundary_name_prefix = cube2
boundary_id_offset = 5
xmax = 1
ymax = 1
nx = 2
ny = 2
[]
[block_id]
type = SubdomainIDGenerator
input = cube2
subdomain_id = 2
[]
[combine]
inputs = 'cube1 block_id'
type = CombinerGenerator
positions = '0 0 0
0 1 0'
[]
[rename2]
type = RenameBlockGenerator
input = combine
old_block = '0 2'
new_block = 'cube1 cube2'
[]
[]
[Adaptivity]
initial_marker = box
initial_steps = 1
max_h_level = 1
[Markers]
[box]
type = BoxMarker
bottom_left = '0 0 0'
top_right = '0.5 0.5 0'
inside = refine
outside = do_nothing
[]
[]
[]
[Variables]
[disp_x]
block = 'cube1 cube2'
[]
[disp_y]
block = 'cube1 cube2'
[]
[]
[Modules/TensorMechanics/Master]
[cube1_mechanics]
strain = FINITE
block = 'cube1 cube2'
[]
[]
[BCs]
[cube1_x]
type = ADDirichletBC
variable = disp_x
boundary = 'cube1_bottom '
value = 0.0
[]
[cube1_y]
type = ADDirichletBC
variable = disp_y
boundary = 'cube1_bottom '
value = 0.0
[]
[cube2_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = 'cube2_top'
function = '-t'
preset = false
[]
[cube2_x]
type = ADDirichletBC
variable = disp_x
boundary = 'cube2_top'
value = 0
[]
[]
[Materials]
[cube1_elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 68.9e9
poissons_ratio = 0.3
block = 'cube1'
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = 'cube1 cube2'
[]
[cube2_elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 140e9
poissons_ratio = 0.3
block = 'cube2'
[]
[]
[Contact]
[contactswell]
secondary = cube1_top
primary = cube2_bottom
model = frictionless
formulation = kinematic
penalty = 1.0e6
normalize_penalty = true
tangential_tolerance = 0.1
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
line_search = 'none'
nl_rel_tol = 1e-16
nl_abs_tol = 1e-16
nl_max_its = 50
l_tol = 1e-4
l_max_its = 50
start_time = 0.0
end_time = 0.02e-3
dtmax = 4
dtmin = 0.001e-3
dt = 0.01e-3
automatic_scaling = true
off_diagonals_in_auto_scaling = true
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
execute_on = 'FINAL'
[]
(modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/exact.i)
# This test provides comparison to calculated values from Leblond:1994kl
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
pore_shape_model = spherical
[]
[Mesh]
[./msh]
type = CartesianMeshGenerator
dim = 3
dx = 0.01
dy = 0.01
dz = 0.01
iz = 1
ix = 1
iy = 1
[../]
[./extra_nodeset]
type = ExtraNodesetGenerator
input = msh
new_boundary = 'origin'
coord = '0 0 0'
[]
[]
[Physics/SolidMechanics/QuasiStatic/All]
strain = FINITE
add_variables = true
generate_output = 'strain_xx strain_yy strain_xy hydrostatic_stress vonmises_stress'
use_automatic_differentiation = true
[]
[Functions]
[./Q_gtn]
type = ParsedFunction
symbol_names = 'avg_vonmises gtn_gauge_stress'
symbol_values = 'avg_vonmises gtn_gauge_stress'
expression = 'avg_vonmises/gtn_gauge_stress'
[../]
[./M_gtn]
type = ParsedFunction
symbol_names = 'avg_hydro gtn_gauge_stress'
symbol_values = 'avg_hydro gtn_gauge_stress'
expression = 'abs(avg_hydro) / gtn_gauge_stress'
[../]
[./Q_ten]
type = ParsedFunction
symbol_names = 'avg_vonmises ten_gauge_stress'
symbol_values = 'avg_vonmises ten_gauge_stress'
expression = 'avg_vonmises/ten_gauge_stress'
[../]
[./M_ten]
type = ParsedFunction
symbol_names = 'avg_hydro ten_gauge_stress'
symbol_values = 'avg_hydro ten_gauge_stress'
expression = 'abs(avg_hydro) / ten_gauge_stress'
[../]
[./Q_five]
type = ParsedFunction
symbol_names = 'avg_vonmises five_gauge_stress'
symbol_values = 'avg_vonmises five_gauge_stress'
expression = 'avg_vonmises/five_gauge_stress'
[../]
[./M_five]
type = ParsedFunction
symbol_names = 'avg_hydro five_gauge_stress'
symbol_values = 'avg_hydro five_gauge_stress'
expression = 'abs(avg_hydro) / five_gauge_stress'
[../]
[./Q_three]
type = ParsedFunction
symbol_names = 'avg_vonmises three_gauge_stress'
symbol_values = 'avg_vonmises three_gauge_stress'
expression = 'avg_vonmises / three_gauge_stress'
[../]
[./M_three]
type = ParsedFunction
symbol_names = 'avg_hydro three_gauge_stress'
symbol_values = 'avg_hydro three_gauge_stress'
expression = 'abs(avg_hydro) / three_gauge_stress'
[../]
[./Q_two]
type = ParsedFunction
symbol_names = 'avg_vonmises two_gauge_stress'
symbol_values = 'avg_vonmises two_gauge_stress'
expression = 'avg_vonmises/two_gauge_stress'
[../]
[./M_two]
type = ParsedFunction
symbol_names = 'avg_hydro two_gauge_stress'
symbol_values = 'avg_hydro two_gauge_stress'
expression = 'abs(avg_hydro) / two_gauge_stress'
[../]
[./Q_onepointfive]
type = ParsedFunction
symbol_names = 'avg_vonmises onepointfive_gauge_stress'
symbol_values = 'avg_vonmises onepointfive_gauge_stress'
expression = 'avg_vonmises / onepointfive_gauge_stress'
[../]
[./M_onepointfive]
type = ParsedFunction
symbol_names = 'avg_hydro onepointfive_gauge_stress'
symbol_values = 'avg_hydro onepointfive_gauge_stress'
expression = 'abs(avg_hydro) / onepointfive_gauge_stress'
[../]
[./Q_one]
type = ParsedFunction
symbol_names = 'avg_vonmises one_gauge_stress'
symbol_values = 'avg_vonmises one_gauge_stress'
expression = 'avg_vonmises / one_gauge_stress'
[../]
[./M_one]
type = ParsedFunction
symbol_names = 'avg_hydro one_gauge_stress'
symbol_values = 'avg_hydro one_gauge_stress'
expression = 'abs(avg_hydro) / one_gauge_stress'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.3
[../]
[./stress]
type = ADComputeMultipleInelasticStress
inelastic_models = 'gtn lps_ten lps_five lps_three lps_two lps_onepointfive lps_one'
outputs = all
extra_stress_names = extra_stress
[../]
[./porosity]
type = ADPorosityFromStrain
initial_porosity = 1e-3
inelastic_strain = 'combined_inelastic_strain'
outputs = 'all'
[../]
[./gtn]
type = ADViscoplasticityStressUpdate
coefficient = 0
power = 1 # arbitrary
viscoplasticity_model = GTN
base_name = gtn
outputs = all
relative_tolerance = 1e-30
[../]
[./lps_ten]
type = ADViscoplasticityStressUpdate
coefficient = 0
power = 10
base_name = ten
outputs = all
relative_tolerance = 1e-30
[../]
[./lps_five]
type = ADViscoplasticityStressUpdate
coefficient = 0
power = 5
base_name = five
outputs = all
relative_tolerance = 1e-30
[../]
[./lps_three]
type = ADViscoplasticityStressUpdate
coefficient = 0
power = 3
base_name = three
outputs = all
relative_tolerance = 1e-30
[../]
[./lps_two]
type = ADViscoplasticityStressUpdate
coefficient = 0
power = 2
base_name = two
outputs = all
relative_tolerance = 1e-30
[../]
[./lps_onepointfive]
type = ADViscoplasticityStressUpdate
coefficient = 0
power = 1.5
base_name = onepointfive
outputs = all
relative_tolerance = 1e-30
[../]
[./lps_one]
type = ADViscoplasticityStressUpdate
coefficient = 0
power = 1
base_name = one
outputs = all
relative_tolerance = 1e-30
[../]
[./const_stress]
type = ComputeExtraStressConstant
extra_stress_tensor = '1 1 1 1 1 1 1 1 1'
outputs = all
[../]
[]
[BCs]
[./no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[./Pressure]
[./bcs]
boundary = 'top right front'
function = '10^(t/4.5)'
use_automatic_differentiation = true
[../]
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
num_steps = 10
nl_abs_tol = 1e-8
[]
[Postprocessors]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
[../]
[./gtn_gauge_stress]
type = ElementAverageValue
variable = gtn_gauge_stress
outputs = none
[../]
[./0Q_gtn]
type = FunctionValuePostprocessor
function = Q_gtn
[../]
[./0M_gtn]
type = FunctionValuePostprocessor
function = M_gtn
[../]
[./ten_gauge_stress]
type = ElementAverageValue
variable = ten_gauge_stress
outputs = none
[../]
[./1Q_ten]
type = FunctionValuePostprocessor
function = Q_ten
[../]
[./1M_ten]
type = FunctionValuePostprocessor
function = M_ten
[../]
[./five_gauge_stress]
type = ElementAverageValue
variable = five_gauge_stress
outputs = none
[../]
[./2Q_five]
type = FunctionValuePostprocessor
function = Q_five
[../]
[./2M_five]
type = FunctionValuePostprocessor
function = M_five
[../]
[./three_gauge_stress]
type = ElementAverageValue
variable = three_gauge_stress
outputs = none
[../]
[./3Q_three]
type = FunctionValuePostprocessor
function = Q_three
[../]
[./3M_three]
type = FunctionValuePostprocessor
function = M_three
[../]
[./two_gauge_stress]
type = ElementAverageValue
variable = two_gauge_stress
outputs = none
[../]
[./4Q_two]
type = FunctionValuePostprocessor
function = Q_two
[../]
[./4M_two]
type = FunctionValuePostprocessor
function = M_two
[../]
[./onepointfive_gauge_stress]
type = ElementAverageValue
variable = onepointfive_gauge_stress
outputs = none
[../]
[./5Q_onepointfive]
type = FunctionValuePostprocessor
function = Q_onepointfive
[../]
[./5M_onepointfive]
type = FunctionValuePostprocessor
function = M_onepointfive
[../]
[./one_gauge_stress]
type = ElementAverageValue
variable = one_gauge_stress
outputs = none
[../]
[./6Q_one]
type = FunctionValuePostprocessor
function = Q_one
[../]
[./6M_one]
type = FunctionValuePostprocessor
function = M_one
[../]
[]
[Outputs]
csv = true
file_base = exact_spherical_out
[]
(modules/solid_mechanics/test/tests/ad_smeared_cracking/cracking_exponential.i)
#
# Test to exercise the exponential stress release
#
# Stress vs. strain should show a linear relationship until cracking,
# an exponential stress release, a linear relationship back to zero
# strain, a linear relationship with the original stiffness in
# compression and then back to zero strain, a linear relationship
# back to the exponential curve, and finally further exponential
# stress release.
#
[Mesh]
file = cracking_test.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Functions]
[./displx]
type = PiecewiseLinear
x = '0 1 2 3 4 5 6'
y = '0 0.00175 0 -0.0001 0 0.00175 0.0035'
[../]
[./disply]
type = PiecewiseLinear
x = '0 5 6'
y = '0 0 .00175'
[../]
[./displz]
type = PiecewiseLinear
x = '0 2 3'
y = '0 0 .0035'
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_zx'
use_automatic_differentiation = true
[../]
[]
[BCs]
[./pullx]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 4
function = displx
[../]
[./left]
type = ADDirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./fix_y]
type = ADDirichletBC
variable = disp_y
boundary = '11 12'
value = 0.0
[../]
[./move_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = '15 16'
function = disply
[../]
[./back]
type = ADDirichletBC
variable = disp_z
boundary = '3'
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 186.5e9
poissons_ratio = .316
[../]
[./elastic_stress]
type = ADComputeSmearedCrackingStress
cracking_stress = 119.3e6
cracked_elasticity_type = FULL
softening_models = exponential_softening
[../]
[./exponential_softening]
type = ADExponentialSoftening
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
petsc_options_iname = '-ksp_gmres_restart -pc_type'
petsc_options_value = '101 lu'
line_search = 'none'
l_max_its = 100
l_tol = 1e-6
nl_max_its = 10
nl_rel_tol = 1e-12
nl_abs_tol = 1.e-4
start_time = 0.0
dt = 0.02
dtmin = 0.02
num_steps = 300
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/j_integral_vtest/j_int_surfbreak_ellip_crack_sym_mm_cm_ad.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[Mesh]
file = ellip_crack_4sym_norad_mm.e
partitioner = centroid
centroid_partitioner_direction = z
[]
[AuxVariables]
[SED]
order = CONSTANT
family = MONOMIAL
[]
[resid_z]
[]
[]
[Functions]
[rampConstantUp]
type = PiecewiseLinear
x = '0. 1.'
y = '0. 0.1'
scale_factor = -689.5 #MPa
[]
[]
[DomainIntegral]
integrals = JIntegral
boundary = 1001
crack_direction_method = CrackMouth
crack_mouth_boundary = 11
crack_end_direction_method = CrackDirectionVector
crack_direction_vector_end_1 = '0.0 1.0 0.0'
crack_direction_vector_end_2 = '1.0 0.0 0.0'
radius_inner = '12.5 25.0 37.5'
radius_outer = '25.0 37.5 50.0'
intersecting_boundary = '1 2'
symmetry_plane = 2
position_type = angle
incremental = true
use_automatic_differentiation = true
[]
[Physics/SolidMechanics/QuasiStatic]
[master]
strain = FINITE
add_variables = true
incremental = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress'
use_automatic_differentiation = true
[]
[]
[AuxKernels]
[SED]
type = MaterialRealAux
variable = SED
property = strain_energy_density
execute_on = timestep_end
[]
[]
[BCs]
[crack_y]
type = ADDirichletBC
variable = disp_z
boundary = 6
value = 0.0
[]
[no_y]
type = ADDirichletBC
variable = disp_y
boundary = 12
value = 0.0
[]
[no_x]
type = ADDirichletBC
variable = disp_x
boundary = 1
value = 0.0
[]
[Pressure]
[Side1]
boundary = 5
function = rampConstantUp
[]
[] # BCs
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 206800
poissons_ratio = 0.3
[]
[elastic_stress]
type = ADComputeFiniteStrainElasticStress
[]
[]
[Executioner]
type = Transient
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'
petsc_options_value = 'lu NONZERO'
nl_max_its = 20
nl_abs_tol = 1e-5
nl_rel_tol = 1e-11
start_time = 0.0
dt = 1
end_time = 1
num_steps = 1
[]
[Postprocessors]
[_dt]
type = TimestepSize
[]
[nl_its]
type = NumNonlinearIterations
[]
[lin_its]
type = NumLinearIterations
[]
[react_z]
type = NodalSum
variable = resid_z
boundary = 5
[]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = j_int_surfbreak_ellip_crack_sym_mm_cm_ad_out
csv = true
[]
(modules/solid_mechanics/test/tests/scalar_material_damage/ad_nonlocal_scalar_damage.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -0.5
xmax = 0.5
nx = 5
ny = 5
nz = 5
elem_type = HEX8
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = SMALL
incremental = true
add_variables = true
generate_output = 'stress_xx strain_xx'
use_automatic_differentiation = true
[]
[]
[BCs]
[symmy]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[symmx]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0
[]
[symmz]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0
[]
[axial_load]
type = ADDirichletBC
variable = disp_x
boundary = right
value = 0.01
[]
[]
[Functions]
[func]
type = ParsedFunction
expression = 'if(x>=0,0.5*t, t)'
[]
[]
[UserObjects]
[ele_avg]
type = RadialAverage
prop_name = local_damage_reg
weights = constant
execute_on = "INITIAL timestep_end"
radius = 0.55
[]
[]
[Materials]
[non_ad_local_damage]
type = MaterialADConverter
ad_props_in = local_damage
reg_props_out = local_damage_reg
[]
[local_damage_index]
type = ADGenericFunctionMaterial
prop_names = local_damage_index
prop_values = func
[]
[local_damage]
type = ADScalarMaterialDamage
damage_index = local_damage_index
damage_index_name = local_damage
[]
[damage]
type = ADNonlocalDamage
average_UO = ele_avg
local_damage_model = local_damage
damage_index_name = nonlocal_damage
[]
[elasticity]
type = ADComputeIsotropicElasticityTensor
poissons_ratio = 0.2
youngs_modulus = 10e9
[]
[stress]
type = ADComputeDamageStress
damage_model = damage
[]
[]
[Postprocessors]
[stress_xx]
type = ElementAverageValue
variable = stress_xx
[]
[strain_xx]
type = ElementAverageValue
variable = strain_xx
[]
[nonlocal_damage]
type = ADElementAverageMaterialProperty
mat_prop = nonlocal_damage
[]
[local_damage]
type = ADElementAverageMaterialProperty
mat_prop = local_damage
[]
[]
[Executioner]
type = Transient
l_max_its = 50
l_tol = 1e-8
nl_max_its = 20
nl_rel_tol = 1e-12
nl_abs_tol = 1e-8
dt = 0.2
dtmin = 0.1
end_time = 1
[]
[Outputs]
csv = true
[]
(modules/heat_transfer/test/tests/joule_heating/transient_ad_jouleheating.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 5
ymax = 5
[]
[Variables]
[./T]
initial_condition = 293.0 #in K
[../]
[./elec]
[../]
[]
[Kernels]
[./HeatDiff]
type = ADHeatConduction
variable = T
[../]
[./HeatTdot]
type = ADHeatConductionTimeDerivative
variable = T
[../]
[./HeatSrc]
type = ADJouleHeatingSource
variable = T
elec = elec
[../]
[./electric]
type = ADHeatConduction
variable = elec
thermal_conductivity = electrical_conductivity
[../]
[]
[BCs]
[./lefttemp]
type = ADDirichletBC
boundary = left
variable = T
value = 293 #in K
[../]
[./elec_left]
type = ADDirichletBC
variable = elec
boundary = left
value = 1 #in V
[../]
[./elec_right]
type = ADDirichletBC
variable = elec
boundary = right
value = 0
[../]
[]
[Materials]
[./k]
type = ADGenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '397.48' #copper in W/(m K)
[../]
[./cp]
type = ADGenericConstantMaterial
prop_names = 'specific_heat'
prop_values = '385.0' #copper in J/(kg K)
[../]
[./rho]
type = ADGenericConstantMaterial
prop_names = 'density'
prop_values = '8920.0' #copper in kg/(m^3)
[../]
[./sigma] #copper is default material
type = ADElectricalConductivity
temperature = T
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'hypre'
dt = 1
end_time = 5
automatic_scaling = true
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_integration_error.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 2
nz = 2
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 10.0
ymax = 1.0
zmax = 1.0
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = '100'
nodes = '3 69'
input = gen
[]
[corner_node_2]
type = ExtraNodesetGenerator
new_boundary = '101'
nodes = '4 47'
input = corner_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[creep_strain_xx]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xx
index_i = 0
index_j = 0
[]
[creep_strain_xy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xy
index_i = 0
index_j = 1
[]
[creep_strain_yy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yy
index_i = 1
index_j = 1
[]
[sigma_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 1
index_j = 1
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1.0'
y = '0 -4e1'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_xx stress_xx'
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 7000
poissons_ratio = 0.0
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_creep_two"
max_iterations = 50
absolute_tolerance = 1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5 0.25 0.3866 1.6413 1.6413 1.2731"
[]
[trial_creep_two]
type = ADHillCreepStressUpdate
coefficient = 1e-16
n_exponent = 9
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 1.0e-4
absolute_tolerance = 1e-20
relative_tolerance = 1e-20
max_integration_error = 1.0e-5
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = 100
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = 101
value = 0.0
[]
[Pressure]
[Side1]
boundary = right
function = pull
[]
[]
[]
[UserObjects]
[terminator_creep]
type = Terminator
expression = 'time_step_size > matl_ts_min'
fail_mode = SOFT
execute_on = TIMESTEP_END
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1.0e-13
nl_abs_tol = 1.0e-13
l_max_its = 10
end_time = 1.65e-1
dt = 2.5e-2
start_time = 0
automatic_scaling = true
[./TimeStepper]
type = IterationAdaptiveDT
dt = 2.5e-2
time_t = '0.0 10.0'
time_dt = '2.5e-2 2.5e-2 '
optimal_iterations = 30
iteration_window = 9
growth_factor = 1.5
cutback_factor = 0.5
timestep_limiting_postprocessor = matl_ts_min
[../]
[]
[Postprocessors]
[time_step_size]
type = TimestepSize
[]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[creep_strain_xx]
type = ElementalVariableValue
variable = creep_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_xx]
type = ElementalVariableValue
variable = elastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_xx]
type = ElementalVariableValue
variable = stress_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[]
[Outputs]
csv = true
exodus = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/ad_plastic/power_law_creep.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
second_order = true
[]
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = false
[]
[AuxVariables]
[./hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[../]
[]
[Variables]
[./disp_x]
order = SECOND
scaling = 1e-10
[../]
[./disp_y]
order = SECOND
scaling = 1e-10
[../]
[]
[Functions]
[./pull]
type = PiecewiseLinear
x = '0 10'
y = '0 1e-3'
[../]
[]
[Kernels]
[./stress_x]
type = ADStressDivergenceTensors
component = 0
variable = disp_x
[../]
[./stress_y]
type = ADStressDivergenceTensors
component = 1
variable = disp_y
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.3
[../]
[./strain]
type = ADComputeIncrementalSmallStrain
[../]
[./elastic_strain]
type = ADComputeMultipleInelasticStress
[../]
[./creep_ten]
type = ADPowerLawCreepStressUpdate
coefficient = 10e-24
n_exponent = 4
activation_energy = 0
base_name = creep_ten
[../]
[./creep_ten2]
type = ADPowerLawCreepStressUpdate
coefficient = 10e-24
n_exponent = 4
activation_energy = 0
base_name = creep_ten2
[../]
[./creep_one]
type = ADPowerLawCreepStressUpdate
coefficient = 1e-24
n_exponent = 4
activation_energy = 0
base_name = creep_one
[../]
[./creep_nine]
type = ADPowerLawCreepStressUpdate
coefficient = 9e-24
n_exponent = 4
activation_energy = 0
base_name = creep_nine
[../]
[./creep_zero]
type = ADPowerLawCreepStressUpdate
coefficient = 0e-24
n_exponent = 4
activation_energy = 0
base_name = creep_zero
[../]
[]
[BCs]
[./no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./pull_disp_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = top
function = pull
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
petsc_options_iname = -pc_hypre_type
petsc_options_value = boomeramg
line_search = 'none'
nl_rel_tol = 1e-5
num_steps = 5
dt = 1e-1
[]
[Postprocessors]
[./max_disp_x]
type = ElementExtremeValue
variable = disp_x
[../]
[./max_disp_y]
type = ElementExtremeValue
variable = disp_y
[../]
[./max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[../]
[./dt]
type = TimestepSize
[../]
[./num_lin]
type = NumLinearIterations
outputs = console
[../]
[./num_nonlin]
type = NumNonlinearIterations
outputs = console
[../]
[]
[Outputs]
csv = true
[]
(test/tests/misc/multiple-nl-systems/ad-test.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
[]
[Problem]
nl_sys_names = 'u v'
[]
[Variables]
[u]
solver_sys = 'u'
[]
[v]
solver_sys = 'v'
[]
[]
[Kernels]
[diff_u]
type = ADDiffusion
variable = u
[]
[diff_v]
type = ADDiffusion
variable = v
[]
[force]
type = ADCoupledForce
variable = v
v = u
[]
[]
[BCs]
[left_u]
type = ADDirichletBC
variable = u
boundary = left
value = 0
[]
[right_u]
type = ADDirichletBC
variable = u
boundary = right
value = 1
[]
[left_v]
type = ADDirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = ADDirichletBC
variable = v
boundary = right
value = 1
[]
[]
[Executioner]
type = SteadySolve2
solve_type = 'NEWTON'
petsc_options = '-snes_monitor'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
first_nl_sys_to_solve = 'u'
second_nl_sys_to_solve = 'v'
[]
[Outputs]
print_nonlinear_residuals = false
print_linear_residuals = false
exodus = true
[]
(modules/contact/test/tests/mortar_tm/2d/ad_frictional/finite_stiff.i)
E_block = 1e7
E_plank = 1e9
elem = QUAD8
order = SECOND
name = 'finite_stiff'
[Mesh]
patch_size = 200
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[action]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
[]
[]
[Contact]
[frictional]
primary = plank_right
secondary = block_left
formulation = mortar
model = coulomb
c_normal = 1e0
c_tangential = 1e-6
friction_coefficient = 0.2
tangential_lm_scaling = 1.0e-10
[]
[]
[BCs]
[left_x]
type = ADDirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
preset = false
[]
[left_y]
type = ADDirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
preset = false
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-12'
end_time = 5.3
dt = 0.12
dtmin = 0.12
line_search = 'none'
nl_div_tol = 1e100
timestep_tolerance = 1e-6
l_abs_tol = 1e-13
nl_abs_tol = 1e-9
nl_rel_tol = 1e-14
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictional_normal_lm
subdomain = frictional_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/solid_mechanics/test/tests/anisotropic_plasticity/ad_aniso_plasticity_x_rotate.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 2
nz = 2
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 10.0
ymax = 1.0
zmax = 1.0
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = '100'
nodes = '3 69'
input = gen
[]
[corner_node_2]
type = ExtraNodesetGenerator
new_boundary = '101'
nodes = '4 47'
input = corner_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[elastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[plasticity_strain_xx]
type = ADRankTwoAux
rank_two_tensor = trial_plasticity_plastic_strain
variable = plastic_strain_xx
index_i = 0
index_j = 0
[]
[plasticity_strain_xy]
type = ADRankTwoAux
rank_two_tensor = trial_plasticity_plastic_strain
variable = plastic_strain_xy
index_i = 0
index_j = 1
[]
[plasticity_strain_yy]
type = ADRankTwoAux
rank_two_tensor = trial_plasticity_plastic_strain
variable = plastic_strain_yy
index_i = 1
index_j = 1
[]
[plasticity_strain_zz]
type = ADRankTwoAux
rank_two_tensor = trial_plasticity_plastic_strain
variable = plastic_strain_zz
index_i = 2
index_j = 2
[]
[sigma_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 1
index_j = 1
[]
[elastic_strain_yy]
type = ADRankTwoAux
rank_two_tensor = elastic_strain
variable = elastic_strain_yy
index_i = 1
index_j = 1
[]
[sigma_yy]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1e1 1e8'
y = '0 -4e2 -4e2'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_xx stress_xx'
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 70000
poissons_ratio = 0.25
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_plasticity"
max_iterations = 50
absolute_tolerance = 1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5829856 0.364424 0.6342174 2.0691375 2.3492325 1.814589"
base_name = trial_plasticity
rotation_angles = '90 90 90'
[]
[trial_plasticity]
type = ADHillPlasticityStressUpdate
hardening_constant = 2000.0
yield_stress = 0.001 # was 200 for verification
absolute_tolerance = 1e-14
relative_tolerance = 1e-12
base_name = trial_plasticity
internal_solve_full_iteration_history = true
max_inelastic_increment = 2.0e-6
internal_solve_output_on = on_error
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = 100
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = 101
value = 0.0
[]
[Pressure]
[Side1]
boundary = right
function = pull
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-11
nl_abs_tol = 1.0e-14
l_max_its = 90
num_steps = 25
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 30
iteration_window = 9
growth_factor = 1.05
cutback_factor = 0.5
timestep_limiting_postprocessor = matl_ts_min
dt = 1.0e-5
time_t = '0 3.4e-5 10'
time_dt = '1.0e-5 1.0e-7 1.0e-7'
[]
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[plasticity_strain_yy]
type = ElementalVariableValue
variable = plastic_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_yy]
type = ElementalVariableValue
variable = elastic_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_yy]
type = ElementalVariableValue
variable = stress_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[plasticity_strain_xx]
type = ElementalVariableValue
variable = plastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_xx]
type = ElementalVariableValue
variable = elastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_xx]
type = ElementalVariableValue
variable = stress_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[plasticity_strain_zz]
type = ElementalVariableValue
variable = plastic_strain_zz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/scalar_material_damage/ad_scalar_material_damage_creep_power.i)
# This is a basic test of the system for continuum damage mechanics
# materials. It uses ScalarMaterialDamage for the damage model,
# which simply gets its damage index from another material. In this
# case, we prescribe the evolution of the damage index using a
# function. A single element has a fixed prescribed displacement
# on one side that puts the element in tension, and then the
# damage index evolves from 0 to 1 over time, and this verifies
# that the stress correspondingly drops to 0.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
elem_type = HEX8
[]
[AuxVariables]
[damage_index]
order = CONSTANT
family = MONOMIAL
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = SMALL
incremental = true
add_variables = true
generate_output = 'stress_xx strain_xx creep_strain_xx'
use_automatic_differentiation = true
[]
[]
[AuxKernels]
[damage_index]
type = ADMaterialRealAux
variable = damage_index
property = damage_index_prop
execute_on = timestep_end
[]
[]
[BCs]
[symmy]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[symmx]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0
[]
[symmz]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0
[]
[axial_load]
type = ADDirichletBC
variable = disp_x
boundary = right
value = 0.01
[]
[]
[Functions]
[damage_evolution]
type = PiecewiseLinear
xy_data = '0.0 0.0
0.1 0.0
2.1 2.0'
[]
[]
[Materials]
[damage_index]
type = ADGenericFunctionMaterial
prop_names = damage_index_prop
prop_values = damage_evolution
[]
[damage]
type = ADScalarMaterialDamage
damage_index = damage_index_prop
[]
[stress]
type = ADComputeMultipleInelasticStress
damage_model = damage
inelastic_models = 'creep'
[]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 140000
poissons_ratio = 0.3
[]
[creep]
type = ADPowerLawCreepStressUpdate
coefficient = 1.1e-12 #
n_exponent = 8.7
m_exponent = 0
activation_energy = 0.0
[]
[]
[Postprocessors]
[stress_xx]
type = ElementAverageValue
variable = stress_xx
[]
[strain_xx]
type = ElementAverageValue
variable = strain_xx
[]
[creep_strain_xx]
type = ElementAverageValue
variable = creep_strain_xx
[]
[damage_index]
type = ElementAverageValue
variable = damage_index
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
l_max_its = 50
l_tol = 1e-8
nl_max_its = 20
nl_rel_tol = 1e-10
nl_abs_tol = 1e-8
dt = 0.1
dtmin = 0.001
end_time = 1.1
[]
[Outputs]
csv = true
[]
(tutorials/tutorial01_app_development/step08_test_harness/problems/pressure_diffusion.i)
[Mesh]
type = GeneratedMesh # Can generate simple lines, rectangles and rectangular prisms
dim = 2 # Dimension of the mesh
nx = 100 # Number of elements in the x direction
ny = 10 # Number of elements in the y direction
xmax = 0.304 # Length of test chamber
ymax = 0.0257 # Test chamber radius
[]
[Problem]
type = FEProblem # This is the "normal" type of Finite Element Problem in MOOSE
coord_type = RZ # Axisymmetric RZ
rz_coord_axis = X # Which axis the symmetry is around
[]
[Variables]
[pressure]
# Adds a Linear Lagrange variable by default
[]
[]
[Kernels]
[diffusion]
type = DarcyPressure # Zero-gravity, divergence-free form of Darcy's law
variable = pressure # Operate on the "pressure" variable from above
permeability = 0.8451e-09 # (m^2) assumed permeability of the porous medium
[]
[]
[BCs]
[inlet]
type = ADDirichletBC # Simple u=value BC
variable = pressure # Variable to be set
boundary = left # Name of a sideset in the mesh
value = 4000 # (Pa) From Figure 2 from paper. First data point for 1mm spheres.
[]
[outlet]
type = ADDirichletBC
variable = pressure
boundary = right
value = 0 # (Pa) Gives the correct pressure drop from Figure 2 for 1mm spheres
[]
[]
[Executioner]
type = Steady # Steady state problem
solve_type = NEWTON # Perform a Newton solve
# Set PETSc parameters to optimize solver efficiency
petsc_options_iname = '-pc_type -pc_hypre_type' # PETSc option pairs with values below
petsc_options_value = ' hypre boomeramg'
[]
[Outputs]
exodus = true # Output Exodus format
[]
(modules/solid_mechanics/test/tests/finite_strain_elastic_anisotropy/3d_bar_orthotropic_full_rotation_ad.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 2
ymin = 0
ymax = 10
zmin = 0
zmax = 2
nx = 1
ny = 1
nz = 1
elem_type = HEX8
[]
[corner]
type = ExtraNodesetGenerator
new_boundary = 101
coord = '0 0 0'
input = generated_mesh
[]
[side]
type = ExtraNodesetGenerator
new_boundary = 102
coord = '2 0 0'
input = corner
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
use_finite_deform_jacobian = true
volumetric_locking_correction = false
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_xz'
use_automatic_differentiation = true
[]
[]
[Materials]
[stress]
type = ADComputeFiniteStrainElasticStress
[]
[elasticity_tensor]
type = ADComputeElasticityTensor
fill_method = orthotropic
C_ijkl = '2.0e3 2.0e5 2.0e3 0.71428571e3 0.71428571e3 0.71428571e3 0.4 0.2 0.004 0.004 0.2 0.4'
[]
[]
[BCs]
[fix_z]
type = ADDirichletBC
variable = disp_z
boundary = bottom
value = 0
[]
[rot_y]
type = DisplacementAboutAxis
boundary = bottom
function = t
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 1
variable = disp_y
[]
#
[rot_x]
type = DisplacementAboutAxis
boundary = bottom
function = t
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 0
variable = disp_x
[]
[rot_y90]
type = DisplacementAboutAxis
boundary = bottom
function = 360
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 1
variable = disp_y
[]
#
[rot_x90]
type = DisplacementAboutAxis
boundary = bottom
function = 360
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 0
variable = disp_x
[]
[press]
boundary = top
function = '-1.0*(t-360)*10.0'
use_displaced_mesh = true
displacements = 'disp_x disp_y disp_z'
type = Pressure
variable = disp_y
[]
[]
[Controls]
[c1]
type = TimePeriod
enable_objects = 'BCs::rot_x BCs::rot_y'
disable_objects = 'BCs::rot_x90 BCs::rot_y90 BCs::press'
start_time = '0'
end_time = '360'
[]
[c190plus]
type = TimePeriod
enable_objects = 'BCs::rot_x90 BCs::rot_y90 BCs::press'
disable_objects = 'BCs::rot_x BCs::rot_y '
start_time = '360'
end_time = '660'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-08
nl_max_its = 50
l_tol = 1e-4
l_max_its = 50
start_time = 0.0
dt = 5
dtmin = 5
num_steps = 132
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(test/tests/bcs/coupled_var_neumann/ad_coupled_var_neumann_nl.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
[]
[Variables]
[u][]
[v][]
[]
[Kernels]
[diff]
type = ADDiffusion
variable = u
[]
[diff_v]
type = ADDiffusion
variable = v
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = u
boundary = 'left'
value = 0
[]
[right]
type = ADCoupledVarNeumannBC
variable = u
boundary = 'right'
v = v
[]
[v_left]
type = ADDirichletBC
variable = v
boundary = 'left'
value = 0
[]
[v_right]
type = ADDirichletBC
variable = v
boundary = 'right'
value = 1
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
file_base = coupled_var_neumann_nl_out
[]
(tutorials/tutorial01_app_development/step09_mat_props/problems/pressure_diffusion.i)
[Mesh]
type = GeneratedMesh # Can generate simple lines, rectangles and rectangular prisms
dim = 2 # Dimension of the mesh
nx = 100 # Number of elements in the x direction
ny = 10 # Number of elements in the y direction
xmax = 0.304 # Length of test chamber
ymax = 0.0257 # Test chamber radius
[]
[Problem]
type = FEProblem # This is the "normal" type of Finite Element Problem in MOOSE
coord_type = RZ # Axisymmetric RZ
rz_coord_axis = X # Which axis the symmetry is around
[]
[Variables]
[pressure]
# Adds a Linear Lagrange variable by default
[]
[]
[Kernels]
[diffusion]
type = DarcyPressure # Zero-gravity, divergence-free form of Darcy's law
variable = pressure # Operate on the "pressure" variable from above
[]
[]
[Materials]
[filter]
type = PackedColumn # Provides permeability and viscosity of water through packed 1mm spheres
[]
[]
[BCs]
[inlet]
type = ADDirichletBC # Simple u=value BC
variable = pressure # Variable to be set
boundary = left # Name of a sideset in the mesh
value = 4000 # (Pa) From Figure 2 from paper. First data point for 1mm spheres.
[]
[outlet]
type = ADDirichletBC
variable = pressure
boundary = right
value = 0 # (Pa) Gives the correct pressure drop from Figure 2 for 1mm spheres
[]
[]
[Executioner]
type = Steady # Steady state problem
solve_type = NEWTON # Perform a Newton solve
# Set PETSc parameters to optimize solver efficiency
petsc_options_iname = '-pc_type -pc_hypre_type' # PETSc option pairs with values below
petsc_options_value = ' hypre boomeramg'
[]
[Outputs]
exodus = true # Output Exodus format
[]
(modules/solid_mechanics/test/tests/anisotropic_plasticity/anis_plasticity_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[plasticity_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[plasticity_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[plasticity_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[Variables]
[disp_x]
scaling = 1e-10
[]
[disp_y]
scaling = 1e-10
[]
[disp_z]
scaling = 1e-10
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[plasticity_strain_xx]
type = ADRankTwoAux
rank_two_tensor = trial_plasticity_plastic_strain
variable = plasticity_strain_xx
index_i = 0
index_j = 0
[]
[plasticity_strain_xy]
type = ADRankTwoAux
rank_two_tensor = trial_plasticity_plastic_strain
variable = plasticity_strain_xy
index_i = 0
index_j = 1
[]
[plasticity_strain_yy]
type = ADRankTwoAux
rank_two_tensor = trial_plasticity_plastic_strain
variable = plasticity_strain_yy
index_i = 1
index_j = 1
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1e3 1e8'
y = '0 1e2 1e2'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
incremental = true
generate_output = 'elastic_strain_xx elastic_strain_yy elastic_strain_xy stress_xx stress_xy stress_yy'
use_automatic_differentiation = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 206800
poissons_ratio = 0.0
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_plasticity"
max_iterations = 500
absolute_tolerance = 1e-05
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "1.0 4.0 5.0 0.5 0.5 0.5"
base_name = trial_plasticity
[]
[trial_plasticity]
type = ADHillPlasticityStressUpdate
# internal_solve_output_on = always
# F G H L M N
hardening_constant = 5000
yield_stress = 20000000000000
base_name = trial_plasticity
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = bottom
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = bottom
value = 0.0
[]
[Pressure]
[Side1]
boundary = top
function = pull
[]
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-ksp_gmres_restart -pc_type -sub_pc_type'
petsc_options_value = '101 asm lu'
line_search = 'none'
nl_rel_tol = 1e-07
nl_abs_tol = 1.0e-15
l_max_its = 90
num_steps = 40
dt = 5.0e1
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/lps_dual.i)
# This test provides an example of combining two LPS viscoplasticity models with different stress
# exponents.
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmax = 0.002
ymax = 0.002
[]
[Variables]
[./temp]
initial_condition = 1000
[../]
[]
[Kernels]
[./dt]
type = ADTimeDerivative
variable = temp
[../]
[./diff]
type = ADDiffusion
variable = temp
[../]
[]
[Physics/SolidMechanics/QuasiStatic/All]
strain = FINITE
add_variables = true
generate_output = 'strain_xx strain_yy strain_xy hydrostatic_stress vonmises_stress'
use_automatic_differentiation = true
[]
[Functions]
[./pull]
type = PiecewiseLinear
x = '0 0.1'
y = '0 1e-5'
[../]
[./tot_effective_viscoplasticity]
type = ParsedFunction
symbol_values = 'lps_1_eff_creep_strain lps_3_eff_creep_strain'
symbol_names = 'lps_1_eff_creep_strain lps_3_eff_creep_strain'
expression = 'lps_1_eff_creep_strain+lps_3_eff_creep_strain'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.3
[../]
[./stress]
type = ADComputeMultipleInelasticStress
inelastic_models = 'one two'
outputs = all
[../]
[./porosity]
type = ADPorosityFromStrain
initial_porosity = 0.1
inelastic_strain = 'combined_inelastic_strain'
outputs = 'all'
[../]
[./one]
type = ADViscoplasticityStressUpdate
coefficient = 'coef_3'
power = 3
base_name = 'lps_1'
outputs = all
relative_tolerance = 1e-11
[../]
[./two]
type = ADViscoplasticityStressUpdate
coefficient = 1e-10
power = 1
base_name = 'lps_3'
outputs = all
relative_tolerance = 1e-11
[../]
[./coef]
type = ADParsedMaterial
property_name = coef_3
# Example of creep power law
coupled_variables = temp
expression = '0.5e-18 * exp(-4e4 / 1.987 / temp)'
[../]
[]
[BCs]
[./no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./pull_disp_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = top
function = pull
[../]
[./temp_ramp]
type = ADFunctionDirichletBC
boundary = right
function = '1000 + 400 * t / 0.12'
variable = temp
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 0.01
end_time = 0.12
[]
[Postprocessors]
[./disp_x]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./disp_y]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
[../]
[./dt]
type = TimestepSize
[../]
[./num_lin]
type = NumLinearIterations
outputs = console
[../]
[./num_nonlin]
type = NumNonlinearIterations
outputs = console
[../]
[./lps_1_eff_creep_strain]
type = ElementAverageValue
variable = lps_1_effective_viscoplasticity
[../]
[./lps_3_eff_creep_strain]
type = ElementAverageValue
variable = lps_3_effective_viscoplasticity
[../]
[./lps_1_gauge_stress]
type = ElementAverageValue
variable = lps_1_gauge_stress
[../]
[./lps_3_gauge_stress]
type = ElementAverageValue
variable = lps_3_gauge_stress
[../]
[./eff_creep_strain_tot]
type = FunctionValuePostprocessor
function = tot_effective_viscoplasticity
[../]
[./porosity]
type = ElementAverageValue
variable = porosity
[../]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/ad_2D_geometries/2D-RZ_finiteStrain_test.i)
# Considers the mechanics solution for a thick spherical shell that is uniformly
# pressurized on the inner and outer surfaces, using 2D axisymmetric geometry.
# This test uses the strain calculator ComputeAxisymmetricRZFiniteStrain,
# which is generated through the use of the SolidMechanics QuasiStatic Physics.
#
# From Roark (Formulas for Stress and Strain, McGraw-Hill, 1975), the radially-dependent
# circumferential stress in a uniformly pressurized thick spherical shell is given by:
#
# S(r) = [ Pi[ri^3(2r^3+ro^3)] - Po[ro^3(2r^3+ri^3)] ] / [2r^3(ro^3-ri^3)]
#
# where:
# Pi = inner pressure
# Po = outer pressure
# ri = inner radius
# ro = outer radius
#
# The tests assume an inner and outer radii of 5 and 10, with internal and external
# pressures of 100000 and 200000 at t = 1.0, respectively. The resulting compressive
# tangential stress is largest at the inner wall and, from the above equation, has a
# value of -271429.
#
# RESULTS are below. Since stresses are average element values, values for the
# edge element and one-element-in are used to extrapolate the stress to the
# inner surface. The vesrion of the tests that are checked use the coarsest meshes.
#
# Mesh Radial elem S(edge elem) S(one elem in) S(extrap to surf)
# 1D-SPH
# 2D-RZ 12 (x10) -265004 -254665 -270174
# 3D 12 (6x6) -261880 -252811 -266415
#
# 1D-SPH
# 2D-RZ 48 (x10) -269853 -266710 -271425
# 3D 48 (10x10) -268522 -265653 -269957
#
# The numerical solution converges to the analytical solution as the mesh is
# refined.
[Mesh]
file = 2D-RZ_mesh.e
[]
[GlobalParams]
displacements = 'disp_r disp_z'
[]
[Problem]
coord_type = RZ
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
block = 1
use_automatic_differentiation = true
[../]
[]
[AuxVariables]
[./stress_theta]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_theta]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_theta]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = stress_theta
execute_on = timestep_end
[../]
[./strain_theta]
type = ADRankTwoAux
rank_two_tensor = total_strain
index_i = 2
index_j = 2
variable = strain_theta
execute_on = timestep_end
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.345
block = 1
[../]
[./_elastic_strain]
type = ADComputeFiniteStrainElasticStress
block = 1
[../]
[]
[BCs]
# pin particle along symmetry planes
[./no_disp_r]
type = ADDirichletBC
variable = disp_r
boundary = xzero
value = 0.0
[../]
[./no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = yzero
value = 0.0
[../]
# exterior and internal pressures
[./exterior_pressure_r]
type = ADPressure
variable = disp_r
boundary = outer
component = 0
function = '200000*t'
[../]
[./exterior_pressure_z]
type = ADPressure
variable = disp_z
boundary = outer
component = 1
function = '200000*t'
[../]
[./interior_pressure_r]
type = ADPressure
variable = disp_r
boundary = inner
component = 0
function = '100000*t'
[../]
[./interior_pressure_z]
type = ADPressure
variable = disp_z
boundary = inner
component = 1
function = '100000*t'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = ' 201 hypre boomeramg 10'
line_search = 'none'
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
nl_rel_tol = 5e-9
nl_abs_tol = 1e-10
nl_max_its = 15
l_tol = 1e-3
l_max_its = 50
start_time = 0.0
end_time = 0.2
dt = 0.1
[]
[Postprocessors]
[./strainTheta]
type = ElementAverageValue
variable = strain_theta
[../]
[./stressTheta]
type = ElementAverageValue
variable = stress_theta
[../]
[./stressTheta_pt]
type = PointValue
point = '5.0 0.0 0.0'
#bottom inside edge for comparison to theory; use csv = true
variable = stress_theta
[../]
[]
[Outputs]
exodus = true
[]
(modules/optimization/test/tests/executioners/steady_and_adjoint/nonlinear_diffusion.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
[]
[Variables]
[u]
[]
[u_adjoint]
solver_sys = adjoint
[]
[]
[Kernels]
[diff]
type = ADMatDiffusion
variable = u
diffusivity = D
[]
[src]
type = ADBodyForce
variable = u
value = 1
[]
[src_adjoint]
type = ADBodyForce
variable = u_adjoint
value = 1
[]
[]
[BCs]
[dirichlet]
type = ADDirichletBC
variable = u
boundary = 'top right'
value = 0
[]
[]
[Materials]
[diffc]
type = ADParsedMaterial
property_name = D
expression = '0.1 + 5 * u'
coupled_variables = 'u'
[]
[]
[Postprocessors]
[u_avg]
type = ElementAverageValue
variable = u
[]
[u_adjoint_avg]
type = ElementAverageValue
variable = u_adjoint
execute_on = ADJOINT_TIMESTEP_END
[]
[inner_product]
type = VariableInnerProduct
variable = u
second_variable = u_adjoint
execute_on = ADJOINT_TIMESTEP_END
[]
[]
[Executioner]
type = SteadyAndAdjoint
forward_system = nl0
adjoint_system = adjoint
nl_rel_tol = 1e-12
l_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/ad_2D_geometries/2D-RZ_centerline_VLC.i)
# Simple test to check for use of AxisymmetricCenterlineAverageValue with
# volumetric_locking_correction activated in a tensor mechanics simulation
[Mesh]
type = GeneratedMesh
dim = 2
[]
[GlobalParams]
displacements = 'disp_r disp_z'
volumetric_locking_correction = true
[]
[Problem]
coord_type = RZ
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
use_automatic_differentiation = true
[../]
[]
[AuxVariables]
[./temperature]
initial_condition = 298.0
[../]
[]
[BCs]
[./symmetry_x]
type = ADDirichletBC
variable = disp_r
value = 0
boundary = left
[../]
[./roller_z]
type = ADDirichletBC
variable = disp_z
value = 0
boundary = bottom
[../]
[./top_load]
type = ADFunctionDirichletBC
variable = disp_z
function = -0.01*t
boundary = top
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.3
[../]
[./_elastic_strain]
type = ADComputeFiniteStrainElasticStress
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
nl_max_its = 15
l_tol = 1e-6
l_max_its = 50
start_time = 0.0
end_time = 0.3
dt = 0.1
[]
[Postprocessors]
[./center_temperature]
type = AxisymmetricCenterlineAverageValue
variable = temperature
boundary = left
[../]
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/heat_transfer/test/tests/ad_convective_heat_flux/flux.i)
# This is a test of the ConvectiveHeatFluxBC.
# There is a single 1x1 element with a prescribed temperature
# on the left side and a convective flux BC on the right side.
# The temperature on the left is 100, and the far-field temp is 200.
# The conductance of the body (conductivity * length) is 10
#
# If the conductance in the BC is also 10, the temperature on the
# right side of the solid element should be 150 because half of the
# temperature drop should occur over the body and half in the BC.
#
# The integrated flux is deltaT * conductance, or -50 * 10 = -500.
# The negative sign indicates that heat is going into the body.
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Problem]
extra_tag_vectors = 'bcs'
[]
[Variables]
[./temp]
initial_condition = 100.0
[../]
[]
[Kernels]
[./heat_conduction]
type = ADHeatConduction
variable = temp
thermal_conductivity = 10
[../]
[]
[BCs]
[./left]
type = ADDirichletBC
variable = temp
boundary = left
value = 100.0
[../]
[./right]
type = ADConvectiveHeatFluxBC
variable = temp
boundary = right
T_infinity = 200.0
heat_transfer_coefficient = 10
[../]
[]
[Postprocessors]
[./right_flux]
type = SideDiffusiveFluxAverage
variable = temp
boundary = right
diffusivity = 10
[../]
[]
[Executioner]
type = Transient
num_steps = 1.0
nl_rel_tol = 1e-12
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/ad_aniso_plasticity_x_one_ref.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 2
nz = 2
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 10.0
ymax = 1.0
zmax = 1.0
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[plasticity_strain_xx]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xx
index_i = 0
index_j = 0
[]
[plasticity_strain_xy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xy
index_i = 0
index_j = 1
[]
[plasticity_strain_yy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_yy
index_i = 1
index_j = 1
[]
[sigma_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 1
index_j = 1
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1e1 1e8'
y = '0 -4e2 -4e2'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_xx stress_xx'
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 70000
poissons_ratio = 0.25
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_plasticity"
max_iterations = 50
absolute_tolerance = 1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5829856 0.364424 0.6342174 2.0691375 2.3492325 1.814589"
[]
[trial_plasticity]
type = ADHillPlasticityStressUpdate
hardening_constant = 2000.0
yield_stress = 0.001 # was 200 for verification
absolute_tolerance = 1e-15
relative_tolerance = 1e-13
# internal_solve_full_iteration_history = true
max_inelastic_increment = 2.0e-6
# internal_solve_output_on = on_error
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = left
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = left
value = 0.0
[]
[Pressure]
[Side1]
boundary = right
function = pull
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-12
nl_abs_tol = 1.0e-14
l_max_its = 90
num_steps = 25
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 30
iteration_window = 9
growth_factor = 1.05
cutback_factor = 0.5
timestep_limiting_postprocessor = matl_ts_min
dt = 1.0e-5
time_t = '0 3.4e-5 10'
time_dt = '1.0e-5 1.0e-7 1.0e-7'
[]
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[plasticity_strain_xx]
type = ElementalVariableValue
variable = plastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 0
[]
[elastic_strain_xx]
type = ElementalVariableValue
variable = elastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 0
[]
[sigma_xx]
type = ElementalVariableValue
variable = stress_xx
execute_on = 'TIMESTEP_END'
elementid = 0
[]
[]
[Outputs]
csv = true
perf_graph = true
[]
(tutorials/tutorial01_app_development/step09_mat_props/test/tests/kernels/darcy_pressure/darcy_pressure_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[pressure]
[]
[]
[Kernels]
[diffusion]
type = DarcyPressure
variable = pressure
[]
[]
[Materials]
[column]
type = PackedColumn
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = pressure
boundary = left
value = 0
[]
[right]
type = ADDirichletBC
variable = pressure
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/3d_bar_orthotropic_90deg_rotation_ad_creep_x.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 2
ymin = 0
ymax = 10
zmin = 0
zmax = 2
nx = 1
ny = 1
nz = 1
elem_type = HEX8
[]
[corner]
type = ExtraNodesetGenerator
new_boundary = 101
coord = '0 0 0'
input = generated_mesh
[]
[side]
type = ExtraNodesetGenerator
new_boundary = 102
coord = '2 0 0'
input = corner
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
volumetric_locking_correction = true
use_automatic_differentiation = true
generate_output = 'elastic_strain_xx stress_xx creep_strain_xx creep_strain_yy creep_strain_zz'
[]
[]
[Materials]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_creep"
max_iterations = 50
absolute_tolerance = 1e-18
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.25 0.4 0.65 1.5 1.5 1.5"
use_large_rotation = true
[]
[trial_creep]
type = ADHillCreepStressUpdate
coefficient = 5e-14
n_exponent = 10
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 0.00003
absolute_tolerance = 1e-18
relative_tolerance = 1e-18
# Force it to not use integration error
max_integration_error = 100.0
use_transformation = true
[]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 500
poissons_ratio = 0.0
[]
[]
[BCs]
[fix_x]
type = ADDirichletBC
variable = disp_x
boundary = bottom
value = 0
[]
[rot_z]
type = DisplacementAboutAxis
boundary = bottom
function = t
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '1. 0. 1.0e-13'
component = 2
variable = disp_z
[]
#
[rot_y]
type = DisplacementAboutAxis
boundary = bottom
function = t
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '1. 0. 1.0e-13'
component = 1
variable = disp_y
[]
[rot_z90]
type = DisplacementAboutAxis
boundary = bottom
function = 90
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '1. 0. 1.0e-13'
component = 2
variable = disp_z
[]
#
[rot_y90]
type = DisplacementAboutAxis
boundary = bottom
function = 90
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '1. 0. 1.0e-13'
component = 1
variable = disp_y
[]
[press]
type = Pressure
boundary = top
function = '-1.0*(t-90)*0.1'
use_displaced_mesh = true
displacements = 'disp_x disp_y disp_z'
variable = disp_z
[]
[]
[Postprocessors]
# The strain is along Z axis, naming it creep_strain_yy
# for better comparison.
[creep_strain_yy]
type = ADElementAverageMaterialProperty
mat_prop = creep_strain_zz
[]
[]
[Controls]
[c1]
type = TimePeriod
enable_objects = 'BCs::rot_z BCs::rot_y'
disable_objects = 'BCs::rot_z90 BCs::rot_y90 BCs::press'
start_time = '0'
end_time = '90'
[]
[c190plus]
type = TimePeriod
enable_objects = 'BCs::rot_z90 BCs::rot_y90 BCs::press'
disable_objects = 'BCs::rot_z BCs::rot_y '
start_time = '90'
end_time = '390'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
nl_rel_tol = 1e-11
nl_abs_tol = 1e-11
nl_max_its = 50
l_tol = 1e-4
l_max_its = 50
start_time = 0.0
dt = 0.1
dtmin = 0.1
num_steps = 1200
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/3d_bar_orthotropic_90deg_rotation_ad_creep_x_no_rotation.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 2
ymin = 0
ymax = 10
zmin = 0
zmax = 2
nx = 1
ny = 1
nz = 1
elem_type = HEX8
[]
[corner]
type = ExtraNodesetGenerator
new_boundary = 101
coord = '0 0 0'
input = generated_mesh
[]
[side]
type = ExtraNodesetGenerator
new_boundary = 102
coord = '2 0 0'
input = corner
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
volumetric_locking_correction = true
use_automatic_differentiation = true
generate_output = 'elastic_strain_xx stress_xx creep_strain_xx creep_strain_yy creep_strain_zz'
[]
[]
[Materials]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_creep"
max_iterations = 50
absolute_tolerance = 1e-18
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.25 0.4 0.65 1.5 1.5 1.5"
[]
[trial_creep]
type = ADHillCreepStressUpdate
coefficient = 5e-14
n_exponent = 10
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 0.00003
absolute_tolerance = 1e-18
relative_tolerance = 1e-18
# Force it to not use integration error
max_integration_error = 100.0
[]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 500
poissons_ratio = 0.0
[]
[]
[BCs]
[fix_x]
type = ADDirichletBC
variable = disp_x
boundary = bottom
value = 0
[]
[rot_z]
type = DisplacementAboutAxis
boundary = bottom
function = 0
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '1. 0. 1.0e-13'
component = 2
variable = disp_z
[]
#
[rot_y]
type = DisplacementAboutAxis
boundary = bottom
function = 0
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '1. 0. 1.0e-13'
component = 1
variable = disp_y
[]
[rot_z90]
type = DisplacementAboutAxis
boundary = bottom
function = 0
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '1. 0. 1.0e-13'
component = 2
variable = disp_z
[]
#
[rot_y90]
type = DisplacementAboutAxis
boundary = bottom
function = 0
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '1. 0. 1.0e-13'
component = 1
variable = disp_y
[]
[press]
type = Pressure
boundary = top
function = '-1.0*(t-90)*0.1'
use_displaced_mesh = true
displacements = 'disp_x disp_y disp_z'
variable = disp_y
[]
[]
[Postprocessors]
[creep_strain_yy]
type = ADElementAverageMaterialProperty
mat_prop = creep_strain_yy
[]
[]
[Controls]
[c1]
type = TimePeriod
enable_objects = 'BCs::rot_z BCs::rot_y'
disable_objects = 'BCs::rot_z90 BCs::rot_y90 BCs::press'
start_time = '0'
end_time = '90'
[]
[c190plus]
type = TimePeriod
enable_objects = 'BCs::rot_z90 BCs::rot_y90 BCs::press'
disable_objects = 'BCs::rot_z BCs::rot_y '
start_time = '90'
end_time = '390'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
nl_rel_tol = 1e-11
nl_abs_tol = 1e-11
nl_max_its = 50
l_tol = 1e-4
l_max_its = 50
start_time = 0.0
dt = 0.1
dtmin = 0.1
num_steps = 1200
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/xfem/test/tests/moving_interface/moving_ad_diffusion.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 3
xmin = 0.0
xmax = 1
ymin = 0.0
ymax = 1
elem_type = QUAD4
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./ls_func]
type = ParsedFunction
expression = 'x-0.76+0.21*t'
[../]
[]
[Kernels]
[./diff]
type = ADMatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./time_deriv]
type = ADTimeDerivative
variable = u
[../]
[]
[Constraints]
[./u_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = u
jump = 0
use_penalty = true
alpha = 1e5
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[]
[BCs]
[./right_u]
type = ADDirichletBC
variable = u
boundary = left
value = 0
[../]
[./left_u]
type = ADDirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Materials]
[./diffusivity_A]
type = ADGenericConstantMaterial
prop_names = A_diffusion_coefficient
prop_values = 5
[../]
[./diffusivity_B]
type = ADGenericConstantMaterial
prop_names = B_diffusion_coefficient
prop_values = 0.5
[../]
[./diff_combined]
type = ADLevelSetBiMaterialReal
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = diffusion_coefficient
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
l_max_its = 20
l_tol = 1e-8
nl_max_its = 15
nl_rel_tol = 2e-12
nl_abs_tol = 1e-50
start_time = 0.0
dt = 1
end_time = 2
max_xfem_update = 1
[]
[Outputs]
exodus = true
execute_on = timestep_end
file_base = moving_diffusion_out
perf_graph = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/solid_mechanics/test/tests/rom_stress_update/AD_finite_strain_laromance.i)
[GlobalParams]
displacements = 'disp_r disp_z'
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 1
xmax = 2
nx = 50
ny = 50
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
incremental = true
add_variables = true
eigenstrain_names = 'thermal'
use_automatic_differentiation = true
[]
[]
[AuxVariables]
[temp]
initial_condition = 1000.0
[]
[]
[AuxKernels]
[cooling]
type = FunctionAux
variable = temp
function = '1000-10*t*x'
[]
[]
[BCs]
[bottom_fix]
type = ADDirichletBC
variable = disp_z
boundary = bottom
value = 0.0
[]
[left_fix]
type = ADDirichletBC
variable = disp_r
boundary = left
value = 0.0
[]
[]
[Materials]
[eigenstrain]
type = ADComputeThermalExpansionEigenstrain
eigenstrain_name = 'thermal'
stress_free_temperature = 1000
thermal_expansion_coeff = 1e-6 #1e-4
temperature = temp
[]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 3.30e11
poissons_ratio = 0.3
[]
[stress]
type = ADComputeMultipleInelasticStress
inelastic_models = rom_stress_prediction
[]
[rom_stress_prediction]
type = ADSS316HLAROMANCEStressUpdateTest
temperature = temp
initial_cell_dislocation_density = 6.0e12
initial_wall_dislocation_density = 4.4e11
outputs = all
[]
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
end_time = 10
dt = 1
automatic_scaling = true
[]
[Outputs]
# print_linear_converged_reason = false
# print_nonlinear_converged_reason = false
# print_linear_residuals = false
perf_graph = true
[]
(modules/stochastic_tools/test/tests/multiapps/transient_with_full_solve/sub.i)
[Mesh/gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
[]
[Variables/u]
[]
[Kernels/diff]
type = ADDiffusion
variable = u
[]
[BCs]
[left]
type = ADDirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = ADDirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors/center]
type = PointValue
point = '0.5 0 0'
variable = u
[]
[Controls/stochastic]
type = SamplerReceiver
[]
(modules/contact/test/tests/mortar_tm/2d/ad_frictional/finite_rr.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite_rr'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[action]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
extra_vector_tags = 'ref'
[]
[]
[Contact]
[frictional]
primary = plank_right
secondary = block_left
formulation = mortar
model = coulomb
c_normal = 1e3
c_tangential = 1e-6
friction_coefficient = 0.1
tangential_lm_scaling = 1.0e-10
[]
[]
[BCs]
[left_x]
type = ADDirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
preset = false
[]
[left_y]
type = ADDirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
preset = false
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
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'
end_time = 5.3
dt = 0.12
dtmin = 0.12
timestep_tolerance = 1e-6
line_search = 'contact'
nl_div_tol = 1e100
nl_abs_tol = 1e-7
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictional_normal_lm
subdomain = frictional_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/solid_mechanics/test/tests/ad_smeared_cracking/cracking_rz.i)
#
[Mesh]
file = cracking_rz_test.e
[]
[Problem]
coord_type = RZ
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Functions]
[./displ]
type = PiecewiseLinear
x = '0 1 2 3 4'
y = '0 1 0 -1 0'
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_zx'
use_automatic_differentiation = true
[../]
[]
[BCs]
[./pull]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 2
function = displ
[../]
[./left]
type = ADDirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./bottom]
type = ADDirichletBC
variable = disp_y
boundary = 3
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 4.0e7
poissons_ratio = 0.0
[../]
[./elastic_stress]
type = ADComputeSmearedCrackingStress
cracking_stress = 1.68e6
cracked_elasticity_type = FULL
softening_models = abrupt_softening
[../]
[./abrupt_softening]
type = ADAbruptSoftening
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101 '
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-8
nl_abs_tol = 1e-2
l_tol = 1e-5
start_time = 0.0
end_time = 0.1
dt = 0.025
[]
[Outputs]
exodus = true
[]
(test/tests/bcs/ad_coupled_lower_value/together.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[lower_d]
type = LowerDBlockFromSidesetGenerator
input = square
new_block_name = 'lower'
sidesets = 'top right'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[u]
block = 0
[]
[]
[AuxVariables]
[lower]
block = 'lower'
initial_condition = 10
[]
[]
[Kernels]
[diff]
type = ADDiffusion
variable = u
block = 0
[]
[]
[BCs]
[dirichlet]
type = ADDirichletBC
variable = u
boundary = 'left'
value = 0
[]
[neumann]
type = ADCoupledLowerValue
variable = u
boundary = 'right'
lower_d_var = lower
[]
[]
[Executioner]
type = Steady
residual_and_jacobian_together = true
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/scalar_material_damage/ad_scalar_material_damage.i)
# This is a basic test of the system for continuum damage mechanics
# materials. It uses ScalarMaterialDamage for the damage model,
# which simply gets its damage index from another material. In this
# case, we prescribe the evolution of the damage index using a
# function. A single element has a fixed prescribed displacement
# on one side that puts the element in tension, and then the
# damage index evolves from 0 to 1 over time, and this verifies
# that the stress correspondingly drops to 0.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
elem_type = HEX8
[]
[AuxVariables]
[damage_index]
order = CONSTANT
family = MONOMIAL
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = SMALL
incremental = true
add_variables = true
generate_output = 'stress_xx strain_xx'
use_automatic_differentiation = true
[]
[]
[AuxKernels]
[damage_index]
type = ADMaterialRealAux
variable = damage_index
property = damage_index_prop
execute_on = timestep_end
[]
[]
[BCs]
[symmy]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[symmx]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0
[]
[symmz]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0
[]
[axial_load]
type = ADDirichletBC
variable = disp_x
boundary = right
value = 0.01
[]
[]
[Functions]
[damage_evolution]
type = PiecewiseLinear
xy_data = '0.0 0.0
0.1 0.0
2.1 2.0'
[]
[]
[Materials]
[damage_index]
type = ADGenericFunctionMaterial
prop_names = damage_index_prop
prop_values = damage_evolution
[]
[damage]
type = ADScalarMaterialDamage
damage_index = damage_index_prop
[]
[stress]
type = ADComputeDamageStress
damage_model = damage
[]
[elasticity]
type = ADComputeIsotropicElasticityTensor
poissons_ratio = 0.2
youngs_modulus = 10e9
[]
[]
[Postprocessors]
[stress_xx]
type = ElementAverageValue
variable = stress_xx
[]
[strain_xx]
type = ElementAverageValue
variable = strain_xx
[]
[damage_index]
type = ElementAverageValue
variable = damage_index
[]
[]
[Executioner]
type = Transient
l_max_its = 50
l_tol = 1e-8
nl_max_its = 20
nl_rel_tol = 1e-12
nl_abs_tol = 1e-8
dt = 0.1
dtmin = 0.1
end_time = 1.1
[]
[Outputs]
csv=true
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/finite.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[secondary]
input = block_rename
type = LowerDBlockFromSidesetGenerator
sidesets = 'block_left'
new_block_id = '30'
new_block_name = 'frictionless_secondary_subdomain'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'plank_right'
new_block_id = '20'
new_block_name = 'frictionless_primary_subdomain'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[thermal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
scaling = 1e-7
[]
[frictionless_normal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
use_dual = true
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
strain = FINITE
[]
[]
[Kernels]
[hc]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
lm_variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_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 = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[thermal_contact]
type = GapConductanceConstraint
variable = thermal_lm
secondary_variable = temp
k = 1
use_displaced_mesh = true
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
displacements = 'disp_x disp_y'
[]
[]
[BCs]
[left_temp]
type = ADDirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = ADDirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[left_x]
type = ADDirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = ADDirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[heat_plank]
type = ADHeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = ADHeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact avg_temp'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/solid_mechanics/test/tests/anisotropic_plasticity/ad_aniso_plasticity_y.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
# Original verification nx = 2, ny = 10, nz = 2
nx = 2
ny = 10
nz = 2
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 1.0
ymax = 10.0
zmax = 1.0
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = '100'
nodes = '4 10'
input = gen
[]
[corner_node_2]
type = ExtraNodesetGenerator
new_boundary = '101'
nodes = '1 67'
input = corner_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[elastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[plasticity_strain_xx]
type = ADRankTwoAux
rank_two_tensor = trial_plasticity_plastic_strain
variable = plastic_strain_xx
index_i = 0
index_j = 0
[]
[plasticity_strain_xy]
type = ADRankTwoAux
rank_two_tensor = trial_plasticity_plastic_strain
variable = plastic_strain_xy
index_i = 0
index_j = 1
[]
[plasticity_strain_yy]
type = ADRankTwoAux
rank_two_tensor = trial_plasticity_plastic_strain
variable = plastic_strain_yy
index_i = 1
index_j = 1
[]
[elastic_strain_yy]
type = ADRankTwoAux
rank_two_tensor = elastic_strain
variable = elastic_strain_yy
index_i = 1
index_j = 1
[]
[sigma_yy]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1e1 1e8'
y = '0 -4e2 -4e2'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 70000
poissons_ratio = 0.25
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_plasticity"
max_iterations = 50
absolute_tolerance = 1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5829856 0.364424 0.6342174 2.0691375 2.3492325 1.814589"
base_name = trial_plasticity
[]
[trial_plasticity]
type = ADHillPlasticityStressUpdate
hardening_constant = 2000.0
yield_stress = 0.001
absolute_tolerance = 1e-14
relative_tolerance = 1e-12
base_name = trial_plasticity
internal_solve_full_iteration_history = true
max_inelastic_increment = 2.0e-6
internal_solve_output_on = on_error
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = 101
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = 100
value = 0.0
[]
[Pressure]
[Side1]
boundary = top
function = pull
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-11
nl_abs_tol = 1.0e-14
l_max_its = 90
num_steps = 25
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 30
iteration_window = 9
growth_factor = 1.05
cutback_factor = 0.5
timestep_limiting_postprocessor = matl_ts_min
dt = 1e-5
time_t = '0 3.2e-5 10'
time_dt = '1e-5 1.0e-7 1.0e-7'
[]
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[plasticity_strain_yy]
type = ElementalVariableValue
variable = plastic_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_yy]
type = ElementalVariableValue
variable = elastic_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_yy]
type = ElementalVariableValue
variable = stress_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/finite_rr.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[secondary]
input = block_rename
type = LowerDBlockFromSidesetGenerator
sidesets = 'block_left'
new_block_id = '30'
new_block_name = 'frictionless_secondary_subdomain'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'plank_right'
new_block_id = '20'
new_block_name = 'frictionless_primary_subdomain'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
converge_on = 'disp_x disp_y temp'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[thermal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
scaling = 1e-7
[]
[frictionless_normal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
use_dual = true
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
strain = FINITE
extra_vector_tags = 'ref'
[]
[]
[Kernels]
[hc]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
extra_vector_tags = 'ref'
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
lm_variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_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 = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[thermal_contact]
type = GapConductanceConstraint
variable = thermal_lm
secondary_variable = temp
k = 1
use_displaced_mesh = true
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
displacements = 'disp_x disp_y'
[]
[]
[BCs]
[left_temp]
type = ADDirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = ADDirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[left_x]
type = ADDirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = ADDirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[heat_plank]
type = ADHeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = ADHeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
nl_abs_tol = 1e-13
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact avg_temp'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(test/tests/fvkernels/fv_simple_diffusion/dirichlet.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[v]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[]
[Kernels]
[diff]
type = ADDiffusion
variable = u
[]
[]
[FVKernels]
[diff]
type = FVDiffusion
variable = v
coeff = coeff
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = v
boundary = left
value = 7
[]
[right]
type = FVDirichletBC
variable = v
boundary = right
value = 42
[]
[]
[Materials]
[diff]
type = ADGenericFunctorMaterial
prop_names = 'coeff'
prop_values = '1'
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = u
boundary = left
value = 7
[]
[right]
type = ADDirichletBC
variable = u
boundary = right
value = 42
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
residual_and_jacobian_together = true
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/ad_smeared_cracking/cracking_multiple_softening.i)
# Test of cracking with direction-specific release models in 3
# directions. Block is first pulled in one direction, and then
# held while it is sequentially pulled in the other two
# directions. Poisson's ratio is zero so that the cracking in one
# direction doesn't affect the others.
# Softening in the three directions should follow the laws for the
# prescribed models in the three directions, which are power law (x),
# exponential (y), and abrupt (z).
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Functions]
[./displx]
type = PiecewiseLinear
x = '0 1 2 3'
y = '0 1 1 1'
[../]
[./disply]
type = PiecewiseLinear
x = '0 1 2 3'
y = '0 0 1 1'
[../]
[./displz]
type = PiecewiseLinear
x = '0 1 2 3'
y = '0 0 0 1'
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_zx'
use_automatic_differentiation = true
[../]
[]
[BCs]
[./pullx]
type = ADFunctionDirichletBC
variable = disp_x
boundary = right
function = displx
[../]
[./pully]
type = ADFunctionDirichletBC
variable = disp_y
boundary = top
function = disply
[../]
[./pullz]
type = ADFunctionDirichletBC
variable = disp_z
boundary = front
function = displz
[../]
[./left]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./bottom]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./back]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 2.8e7
poissons_ratio = 0
[../]
[./elastic_stress]
type = ADComputeSmearedCrackingStress
cracking_stress = 1.68e6
cracked_elasticity_type = FULL
softening_models = 'power_law_softening exponential_softening abrupt_softening'
prescribed_crack_directions = 'x y z'
[../]
[./power_law_softening]
type = ADPowerLawSoftening
stiffness_reduction = 0.3333
[../]
[./exponential_softening]
type = ADExponentialSoftening
[../]
[./abrupt_softening]
type = ADAbruptSoftening
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
petsc_options_iname = '-ksp_gmres_restart -pc_type -sub_pc_type'
petsc_options_value = '101 asm lu'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
l_tol = 1e-5
start_time = 0.0
end_time = 3.0
dt = 0.01
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/3d-mortar-contact/half_sphere_nodal_geometry.i)
[Mesh]
[generated_mesh]
type = FileMeshGenerator
file = half_sphere.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 2002
new_block_name = 'secondary_lower'
sidesets = '202'
input = generated_mesh
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 1002
sidesets = '102'
new_block_name = 'primary_lower'
input = secondary
[]
patch_size = 20
patch_update_strategy = always
uniform_refine = 0
[]
[Problem]
kernel_coverage_check = false
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
order = FIRST
family = LAGRANGE
[]
[Variables]
[frictional_normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[frictional_tangential_lm]
block = 'secondary_lower'
use_dual = true
[]
[frictional_tangential_dir_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[saved_x]
[]
[saved_y]
[]
[saved_z]
[]
[tangent_x]
family = LAGRANGE
order = FIRST
[]
[tangent_y]
family = LAGRANGE
order = FIRST
[]
[tangent_z]
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[friction_x_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 102
secondary_boundary = 202
tangent_one = frictional_tangential_lm
tangent_two = frictional_tangential_dir_lm
variable = tangent_x
component = 0
boundary = 202
[]
[friction_y_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 102
secondary_boundary = 202
tangent_one = frictional_tangential_lm
tangent_two = frictional_tangential_dir_lm
variable = tangent_y
component = 1
boundary = 202
[]
[friction_z_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 102
secondary_boundary = 202
tangent_one = frictional_tangential_lm
tangent_two = frictional_tangential_dir_lm
variable = tangent_z
component = 2
boundary = 202
[]
[]
[Functions]
[push_down]
type = ParsedFunction
expression = 'if(t < 1.5, -t, t-3.0)'
[]
[force_z]
type = ParsedFunction
expression = 'if(t < 0.008, 0.0, (-t)*2.0e2 -t*t*100.0)' # 4.0e5
[]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = true
strain = FINITE
block = '1 2'
use_automatic_differentiation = true
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_zz'
save_in = 'saved_x saved_y saved_z'
use_finite_deform_jacobian = true
[]
[]
[BCs]
[botz]
type = ADDirichletBC
variable = disp_z
boundary = 101
value = 0.0
[]
[boty]
type = ADDirichletBC
variable = disp_y
boundary = 101
value = 0.0
[]
[botx]
type = ADDirichletBC
variable = disp_x
boundary = 101
value = 0.0
[]
[topz]
type = ADFunctionDirichletBC
variable = disp_z
boundary = '201'
function = push_down
[]
[topy]
type = ADDirichletBC
variable = disp_y
boundary = '201 202'
value = 0.0
[]
[topx]
type = ADDirichletBC
variable = disp_x
boundary = '201 202'
value = 0.0
[]
[]
[Materials]
[tensor]
type = ADComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1.40625e7
poissons_ratio = 0.25
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = '1'
[]
[tensor_1000]
type = ADComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e5
poissons_ratio = 0.0
[]
[stress_1000]
type = ADComputeFiniteStrainElasticStress
block = '2'
[]
[]
[Postprocessors]
[stress_zz]
type = ElementAverageValue
variable = stress_zz
block = 1
[]
[resid_z]
type = NodalSum
variable = saved_z
boundary = 201
[]
[disp_z]
type = NodalExtremeValue
variable = disp_z
boundary = 201
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -pc_factor_shift_type '
'-pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist nonzero 1e-14 1e-5'
line_search = 'none'
l_max_its = 60
nl_max_its = 50
dt = 0.004
dtmin = 0.00001
# end_time = 1.8
end_time = 0.000
nl_rel_tol = 1.0e-6 #1e-7 # -8, -6 to avoid many iterations. Switch it March 2021
nl_abs_tol = 1e-6 # 6 if no friction
l_tol = 1e-4
[]
[Outputs]
exodus = true
csv = true
print_linear_residuals = true
perf_graph = true
[console]
type = Console
max_rows = 5
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
lm_variable_normal = frictional_normal_lm
lm_variable_tangential_one = frictional_tangential_lm
lm_variable_tangential_two = frictional_tangential_dir_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
debug_mesh = true
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeFrictionalForceLMMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
friction_lm = frictional_tangential_lm
friction_lm_dir = frictional_tangential_dir_lm
c = 7.0e4
c_t = 7.0e4
mu = 0.4
debug_mesh = true
weighted_gap_uo = weighted_vel_uo
weighted_velocities_uo = weighted_vel_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
weighted_gap_uo = weighted_vel_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_z]
type = TangentialMortarMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_tangential_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_x_dir]
type = TangentialMortarMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_tangential_dir_lm
secondary_variable = disp_x
component = x
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y_dir]
type = TangentialMortarMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_tangential_dir_lm
secondary_variable = disp_y
component = y
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_z_dir]
type = TangentialMortarMechanicalContact
primary_boundary = 102
secondary_boundary = 202
primary_subdomain = 1002
secondary_subdomain = 2002
variable = frictional_tangential_dir_lm
secondary_variable = disp_z
component = z
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
weighted_velocities_uo = weighted_vel_uo
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/hoop_strain_comparison_coarse_yaxis.i)
# This test compares the hoop strain at two different elements in an internally
# pressurized cylinder with anisotropic plasticity: different yield condition
# for hoop and axial directions. The elements are located circumferentially
# apart but at same axial position. It is expected that due to pressurization
# hoop strains will develop with uniform magnitude along hoop direction. The
# test verifies that the plastic hoop strain is uniform in hoop direction.
# For 3D simulations with material properties oriented along the curved
# geometry such as cylinder or sphere, the stresses and strains are rotated to
# the local coordinate system from the global coordinate system. The plastic
# strain is calculated in the local coordinate system and then transformed to
# the global coordinate system. This test involves a 3D cylindrical geometry,
# and helps in indirectly verifying that this transformation of stresses and
# strains back and forth between the local and global coordinate system is
# correctly implemented.
[Mesh]
file = quarter_cylinder_coarse_yaxis.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[plasticity_strain_xx]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xx
index_i = 0
index_j = 0
[]
[plasticity_strain_xy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xy
index_i = 0
index_j = 1
[]
[plasticity_strain_yy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_yy
index_i = 1
index_j = 1
[]
[plasticity_strain_zz]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_zz
index_i = 2
index_j = 2
[]
[stress_zz]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[]
[stress_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[]
[stress_yy]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[]
[Functions]
[push]
type = PiecewiseLinear
x = '0 1e2'
y = '0 200e6'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_zz elastic_strain_xx elastic_strain_yy stress_xx stress_yy stress_zz strain_zz plastic_strain_zz plastic_strain_xx plastic_strain_yy hoop_stress hoop_strain'
use_automatic_differentiation = true
add_variables = true
cylindrical_axis_point1 = '0 0 0'
cylindrical_axis_point2 = '0 1 0'
[]
[]
[Constraints]
[mid_section_plane]
type = EqualValueBoundaryConstraint
variable = disp_y
secondary = top # boundary
penalty = 1.0e+10
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 200.0e9
poissons_ratio = 0.2
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "plasticity"
max_iterations = 50
absolute_tolerance = 1e-30 #1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
# hill_constants = "0.5 0.5 0.5 1.5 1.5 1.5"
hill_constants = "0.5 0.25 0.5 1.5 1.5 1.5"
[]
[plasticity]
type = ADHillElastoPlasticityStressUpdate
hardening_constant = 1.5e10
hardening_exponent = 1.0
yield_stress = 0.0 # 60e6
local_cylindrical_csys = true
axis = y
absolute_tolerance = 1e-15 # 1e-8
relative_tolerance = 1e-13 # 1e-15
internal_solve_full_iteration_history = true
max_inelastic_increment = 2.0e-6
internal_solve_output_on = on_error
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = x_face
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = z_face
value = 0.0
[]
[Pressure]
[Side1]
boundary = inner
function = push
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-14
# nl_abs_tol = 1e-10
l_max_its = 90
nl_max_its = 30
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 30
iteration_window = 9
growth_factor = 1.05
cutback_factor = 0.5
timestep_limiting_postprocessor = matl_ts_min
dt = 0.1e-4
time_t = '0 6.23 10'
time_dt = '0.1 1.0e-2 1.0e-2'
[]
num_steps = 1
start_time = 0
end_time = 200.0
automatic_scaling = true
dtmax = 0.1e-4
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[hoop_strain_elementA]
type = ElementalVariableValue
elementid = 10
variable = hoop_strain
[]
[hoop_strain_elementB]
type = ElementalVariableValue
elementid = 4
variable = hoop_strain
[]
[hoop_strain_diff]
type = DifferencePostprocessor
value1 = hoop_strain_elementA
value2 = hoop_strain_elementB
[]
[]
[Outputs]
csv = true
exodus = false
perf_graph = true
[]
(test/tests/mortar/displaced-gap-conductance-2d-non-conforming/gap-conductance.i)
[Mesh]
displacements = 'disp_x disp_y'
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
# block 1: left
# block 2: right
[]
[primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[]
[secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[]
[]
[AuxVariables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[AuxKernels]
[function_x]
type = FunctionAux
function = '.05 * t'
variable = 'disp_x'
block = '2'
execute_on = 'LINEAR TIMESTEP_BEGIN'
[]
[function_y]
type = FunctionAux
function = '.05 * t'
variable = 'disp_y'
block = '2'
execute_on = 'LINEAR TIMESTEP_BEGIN'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[T]
block = '1 2'
[]
[lambda]
block = '10'
family = MONOMIAL
order = CONSTANT
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = T
boundary = '5'
value = 0
[]
[right]
type = ADDirichletBC
variable = T
boundary = '8'
value = 1
[]
[]
[Kernels]
[conduction]
type = ADDiffusion
variable = T
block = '1 2'
[]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[mortar]
type = GapHeatConductanceTest
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
use_displaced_mesh = true
correct_edge_dropping = true
[]
[]
[Materials]
[constant]
type = ADGenericConstantMaterial
prop_names = 'gap_conductance'
prop_values = '.03'
block = '1 2'
use_displaced_mesh = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
type = Transient
num_steps = 5
petsc_options_iname = '-pc_type -snes_linesearch_type'
petsc_options_value = 'lu basic'
[]
[Outputs]
exodus = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
(modules/electromagnetics/test/tests/interfacekernels/electrostatic_contact/analytic_solution_test_three_block.i)
# Regression test for ElectrostaticContactCondition with analytic solution with
# three blocks
#
# dim = 1D
# X = [0,3]
# Interfaces at X = 1 and X = 2
#
# stainless_steel graphite stainless_steel
# +------------------+------------------+------------------+
#
# Left BC: Potential = 1
# Right BC: Potential = 0
# Left Interface: ElectrostaticContactCondition (primary = stainless_steel)
# Right Interface: ElectrostaticContactCondition (primary = graphite)
#
[Mesh]
[line]
type = GeneratedMeshGenerator
dim = 1
nx = 6
xmax = 3
[]
[break_center]
type = SubdomainBoundingBoxGenerator
input = line
block_id = 1
block_name = 'graphite'
bottom_left = '1 0 0'
top_right = '2 0 0'
[]
[break_right]
type = SubdomainBoundingBoxGenerator
input = break_center
block_id = 2
bottom_left = '2 0 0'
top_right = '3 0 0'
[]
[ssg_interface]
type = SideSetsBetweenSubdomainsGenerator
input = break_right
primary_block = 0
paired_block = 1
new_boundary = 'ssg_interface'
[]
[gss_interface]
type = SideSetsBetweenSubdomainsGenerator
input = ssg_interface
primary_block = 1
paired_block = 2
new_boundary = 'gss_interface'
[]
[block_rename]
type = RenameBlockGenerator
input = gss_interface
old_block = '0 2'
new_block = 'stainless_steel_left stainless_steel_right'
[]
[]
[Variables]
[potential_graphite]
block = graphite
[]
[potential_stainless_steel_left]
block = stainless_steel_left
[]
[potential_stainless_steel_right]
block = stainless_steel_right
[]
[]
[AuxVariables]
[analytic_potential_stainless_steel_left]
block = stainless_steel_left
[]
[analytic_potential_stainless_steel_right]
block = stainless_steel_right
[]
[analytic_potential_graphite]
block = graphite
[]
[]
[Kernels]
[electric_graphite]
type = ADMatDiffusion
variable = potential_graphite
diffusivity = electrical_conductivity
block = graphite
[]
[electric_stainless_steel_left]
type = ADMatDiffusion
variable = potential_stainless_steel_left
diffusivity = electrical_conductivity
block = stainless_steel_left
[]
[electric_stainless_steel_right]
type = ADMatDiffusion
variable = potential_stainless_steel_right
diffusivity = electrical_conductivity
block = stainless_steel_right
[]
[]
[AuxKernels]
[analytic_function_aux_stainless_steel_left]
type = FunctionAux
function = potential_fxn_stainless_steel_left
variable = analytic_potential_stainless_steel_left
block = stainless_steel_left
[]
[analytic_function_aux_stainless_steel_right]
type = FunctionAux
function = potential_fxn_stainless_steel_right
variable = analytic_potential_stainless_steel_right
block = stainless_steel_right
[]
[analytic_function_aux_graphite]
type = FunctionAux
function = potential_fxn_graphite
variable = analytic_potential_graphite
block = graphite
[]
[]
[BCs]
[elec_left]
type = ADDirichletBC
variable = potential_stainless_steel_left
boundary = left
value = 1
[]
[elec_right]
type = ADDirichletBC
variable = potential_stainless_steel_right
boundary = right
value = 0
[]
[]
[InterfaceKernels]
[electric_contact_conductance_ssg]
type = ElectrostaticContactCondition
variable = potential_stainless_steel_left
neighbor_var = potential_graphite
boundary = ssg_interface
mean_hardness = mean_hardness
mechanical_pressure = 3000
[]
[electric_contact_conductance_gss]
type = ElectrostaticContactCondition
variable = potential_graphite
neighbor_var = potential_stainless_steel_right
boundary = gss_interface
mean_hardness = mean_hardness
mechanical_pressure = 3000
[]
[]
[Materials]
#graphite (at 300 K)
[sigma_graphite]
type = ADGenericConstantMaterial
prop_names = electrical_conductivity
prop_values = 73069.2
block = graphite
[]
#stainless_steel (at 300 K)
[sigma_stainless_steel_left]
type = ADGenericConstantMaterial
prop_names = electrical_conductivity
prop_values = 1.41867e6
block = stainless_steel_left
[]
[sigma_stainless_steel_right]
type = ADGenericConstantMaterial
prop_names = electrical_conductivity
prop_values = 1.41867e6
block = stainless_steel_right
[]
# harmonic mean of graphite and stainless steel hardness
[mean_hardness]
type = ADGenericConstantMaterial
prop_names = mean_hardness
prop_values = 2.4797e9
[]
[]
[Functions]
[potential_fxn_stainless_steel_left]
type = ElectricalContactTestFunc
domain = stainless_steel
three_block = true
three_block_side = left
[]
[potential_fxn_stainless_steel_right]
type = ElectricalContactTestFunc
domain = stainless_steel
three_block = true
three_block_side = right
[]
[potential_fxn_graphite]
type = ElectricalContactTestFunc
domain = graphite
three_block = true
[]
[]
[Postprocessors]
[error_stainless_steel_left]
type = ElementL2Error
variable = potential_stainless_steel_left
function = potential_fxn_stainless_steel_left
block = stainless_steel_left
[]
[error_graphite]
type = ElementL2Error
variable = potential_graphite
function = potential_fxn_graphite
block = graphite
[]
[error_stainless_steel_right]
type = ElementL2Error
variable = potential_stainless_steel_right
function = potential_fxn_stainless_steel_right
block = stainless_steel_right
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = true
[]
[Outputs]
csv = true
perf_graph = true
[]
(test/tests/kernels/ad_coupled_force/aux_test.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[]
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[a]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[diff]
type = ADDiffusion
variable = u
[]
[force]
type = ADCoupledForce
variable = u
v = a
[]
[]
[AuxKernels]
[a]
variable = a
type = ConstantAux
value = 10
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = ADDirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
(modules/solid_mechanics/test/tests/ad_thermal_expansion_function/mean_complex.i)
# This test checks the thermal expansion calculated via a mean thermal expansion coefficient.
# The coefficient is selected so as to result in a 1e-4 strain in the x-axis, and to cross over
# from positive to negative strain.
[Mesh]
[./gen]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 4
nz = 4
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./temp]
[../]
[]
[Kernels]
[./temp_diff]
type = ADDiffusion
variable = temp
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = SMALL
add_variables = true
eigenstrain_names = eigenstrain
generate_output = 'strain_xx strain_yy strain_zz'
use_automatic_differentiation = true
[../]
[]
[BCs]
[./left]
type = ADDirichletBC
variable = disp_x
boundary = 'left'
value = 0.0
[../]
[./bottom]
type = ADDirichletBC
variable = disp_y
boundary = 'bottom'
value = 0.0
[../]
[./back]
type = ADDirichletBC
variable = disp_z
boundary = 'back'
value = 0.0
[../]
[./temp]
type = ADFunctionDirichletBC
variable = temp
boundary = 'front back top bottom left right'
function = '1 + t'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1
poissons_ratio = 0.3
[../]
[./stress]
type = ADComputeLinearElasticStress
[../]
[./thermal_expansion_strain]
type = ADComputeMeanThermalExpansionFunctionEigenstrain
thermal_expansion_function = cte_func_mean
thermal_expansion_function_reference_temperature = 1
stress_free_temperature = 1
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Functions]
[./cte_func_mean]
type = ParsedFunction
expression = '1e-6 + 1e-8 * t + 1e-8 * t^2 + exp(t) * 1e-2'
[../]
[]
[Postprocessors]
[./disp_x_max]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./temp_avg]
type = ElementAverageValue
variable = temp
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
num_steps = 1
[]
[Outputs]
csv = true
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/transient_joule_heating_constraint.i)
## Units in the input file: m-Pa-s-K-V
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmax = 0.1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmin = 0.1
xmax = 0.2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
[]
[Variables]
[temperature]
initial_condition = 300.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[potential]
[]
[potential_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 1.0
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
extra_vector_tags = 'ref'
block = 'left_block'
[]
[HeatTdot_steel]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = steel_heat_capacity #use parsed material property
density_name = steel_density
extra_vector_tags = 'ref'
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
extra_vector_tags = 'ref'
block = 'right_block'
[]
[HeatTdot_aluminum]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = aluminum_heat_capacity #use parsed material property
density_name = aluminum_density
extra_vector_tags = 'ref'
block = 'right_block'
[]
[electric_steel]
type = ADMatDiffusion
variable = potential
diffusivity = steel_electrical_conductivity
extra_vector_tags = 'ref'
block = 'left_block'
[]
[electric_aluminum]
type = ADMatDiffusion
variable = potential
diffusivity = aluminum_electrical_conductivity
extra_vector_tags = 'ref'
block = 'right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'fixed_block_right'
[]
[electric_left]
type = ADDirichletBC
variable = potential
value = 0.0
boundary = moving_block_left
[]
[electric_right]
type = ADDirichletBC
variable = potential
value = 3.0e-1
boundary = fixed_block_right
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_temperature'
[]
[electrical_contact]
type = ModularGapConductanceConstraint
variable = potential_interface_lm
secondary_variable = potential
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_electric'
[]
[interface_heating]
type = ADInterfaceJouleHeatingConstraint
potential_lagrange_multiplier = potential_interface_lm
secondary_variable = temperature
primary_electrical_conductivity = steel_electrical_conductivity
secondary_electrical_conductivity = aluminum_electrical_conductivity
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
[]
[]
[Materials]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity steel_electrical_conductivity steel_hardness'
prop_values = '8e3 16.2 500.0 1.39e6 1.0' ## for stainless steel 304
block = 'left_block interface_secondary_subdomain'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 900.0 3.7e7 1.0' #for 99% pure Al
block = 'left_block right_block interface_secondary_subdomain'
[]
[]
[UserObjects]
[closed_temperature]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[closed_electric]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_electrical_conductivity
secondary_conductivity = aluminum_electrical_conductivity
temperature = potential
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[steel_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_primary_subdomain
[]
[aluminum_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[interface_electrical_flux]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = fixed_block_left
diffusivity = aluminum_electrical_conductivity
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-4
nl_max_its = 100
nl_forced_its = 1
dt = 1200.0
dtmin = 1200.0
num_steps = 8
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/ad_smeared_cracking/cracking_power.i)
#
# Simple test of power law softening law for smeared cracking.
# Upon reaching the failure stress in the x direction, the
# softening model abruptly reduces the stress to a fraction
# of its original value, and re-loading occurs at a reduced
# stiffness. This is repeated multiple times.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Functions]
[./displ]
type = PiecewiseLinear
x = '0 1 2 3 4'
y = '0 1 0 -1 0'
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_zx'
use_automatic_differentiation = true
[../]
[]
[BCs]
[./pull]
type = ADFunctionDirichletBC
variable = disp_x
boundary = right
function = displ
[../]
[./left]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./bottom]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./back]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 2.8e7
poissons_ratio = 0
[../]
[./elastic_stress]
type = ADComputeSmearedCrackingStress
cracking_stress = 1.68e6
cracked_elasticity_type = FULL
softening_models = power_law_softening
[../]
[./power_law_softening]
type = ADPowerLawSoftening
stiffness_reduction = 0.3333
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
petsc_options_iname = '-ksp_gmres_restart -pc_type -sub_pc_type'
petsc_options_value = '101 asm lu'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
l_tol = 1e-5
start_time = 0.0
end_time = 1.0
dt = 0.01
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/ad_uniaxial_x_non_linear.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[sigma_xx]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[plasticity_strain_xx]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xx
index_i = 0
index_j = 0
[]
[plasticity_strain_xy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xy
index_i = 0
index_j = 1
[]
[plasticity_strain_yy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_yy
index_i = 1
index_j = 1
[]
[sigma_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1e1'
y = '0 -2e8'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_xx stress_xx strain_xx plastic_strain_xx'
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeElasticityTensor
fill_method = orthotropic
C_ijkl = '10.0e10 15.0e10 20.0e10 2.0e10 2.0e10 2.0e10 0.2 0.2 0.2 0.13333333333333333 0.1 0.15'
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_plasticity"
max_iterations = 50
absolute_tolerance = 1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.6 0.4 0.7 1.5 1.5 1.5"
[]
[trial_plasticity]
type = ADHillElastoPlasticityStressUpdate
hardening_constant = 1e9
hardening_exponent = 0.5
yield_stress = 60e6
absolute_tolerance = 1e-15 # 1e-8
relative_tolerance = 1e-13 # 1e-15
internal_solve_full_iteration_history = true
max_inelastic_increment = 2.0e-5
internal_solve_output_on = on_error
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
[Pressure]
[Side1]
boundary = right
function = pull
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-12
nl_abs_tol = 1.0e-14
l_max_its = 90
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 30
iteration_window = 9
growth_factor = 1.05
cutback_factor = 0.5
timestep_limiting_postprocessor = matl_ts_min
dt = 0.1
time_t = '0 2.5 10'
time_dt = '0.1 1.0e-2 1.0e-2'
[]
start_time = 0
end_time = 10.0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[plasticity_strain_xx]
type = ElementalVariableValue
variable = plastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 0
[]
[elastic_strain_xx]
type = ElementalVariableValue
variable = elastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 0
[]
[strain_xx]
type = ElementalVariableValue
variable = strain_xx
execute_on = 'TIMESTEP_END'
elementid = 0
[]
[sigma_xx]
type = ElementalVariableValue
variable = stress_xx
execute_on = 'TIMESTEP_END'
elementid = 0
[]
[]
[Outputs]
csv = true
perf_graph = true
[]
(test/tests/kernels/body_force/ad_mat_forcing_function_test.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[]
uniform_refine = 4
[]
[Variables]
[u]
[]
[alphapi]
initial_condition = ${fparse 16 * 3.14159265359}
[]
[]
[Materials]
[forcing_material]
type = ADDerivativeParsedMaterial
property_name = forcing_material
extra_symbols = x
coupled_variables = alphapi
expression = 'alphapi*alphapi*sin(alphapi*x)'
[]
[]
[Kernels]
[alphapi]
type = ADDiffusion
variable = alphapi
[]
[diff]
type = ADDiffusion
variable = u
[]
[forcing]
type = ADMatBodyForce
variable = u
material_property = forcing_material
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = u
boundary = right
value = 0
[]
[right]
type = ADDirichletBC
variable = u
boundary = left
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_rel_tol = 1e-12
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
hide = alphapi
[]
(tutorials/tutorial01_app_development/step10_auxkernels/test/tests/kernels/darcy_pressure/darcy_pressure_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[pressure]
[]
[]
[Kernels]
[diffusion]
type = DarcyPressure
variable = pressure
[]
[]
[Materials]
[column]
type = PackedColumn
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = pressure
boundary = left
value = 0
[]
[right]
type = ADDirichletBC
variable = pressure
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/ad_coupled_gradient_dot/diffusion_rate.i)
# Solves the problem
# -mu * Lap(u_dot) + u_dot = alpha * Lap(u) - 2*u*(1-3*u+2*u^2)
# for mu = 1 and alpha = 0.01
# (see appendix B of A. Guevel et al. "Viscous phase-field modeling for chemo-mechanical microstructural evolution: application to geomaterials and pressure solution." In print.)
n_elem = 100
alpha = 0.01
mu = 1
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 1
nx = '${n_elem}'
elem_type = EDGE2
[]
[Variables]
[u]
[InitialCondition]
type = ConstantIC
value = 0.51
[]
[]
[]
[Kernels]
[Lap]
type = ADMatDiffusion
variable = u
diffusivity = '${alpha}'
[]
[LapDot]
type = ADDiffusionRate
variable = u
mu = '${mu}'
[]
[Reac]
type = ADMatReaction
variable = u
reaction_rate = L
[]
[Visc]
type = ADTimeDerivative
variable = u
[]
[]
[Materials]
[parsed]
type = ADParsedMaterial
expression = '-2*(1-3*u+2*u*u)'
coupled_variables = 'u'
property_name = 'L'
[]
[]
[BCs]
[both]
type = ADDirichletBC
variable = u
value = 0.51
boundary = 'left right'
[]
[]
[Postprocessors]
[mid_u]
type = PointValue
variable = u
point = '0.5 0 0'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
num_steps = 1000
dt = 0.1
nl_abs_tol = 1e-9
[]
[Outputs]
print_linear_residuals = false
[csv]
type = CSV
file_base = 'diffusion_rate'
[]
[]
(modules/solid_mechanics/test/tests/ad_isotropic_elasticity_tensor/bulk_modulus_shear_modulus_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./stress_11]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = SMALL
add_variables = true
use_automatic_differentiation = true
[../]
[]
[AuxKernels]
[./stress_11]
type = ADRankTwoAux
variable = stress_11
rank_two_tensor = stress
index_j = 1
index_i = 1
[../]
[]
[BCs]
[./bottom]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0
[../]
[./left]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./back]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0
[../]
[./top]
type = ADDirichletBC
variable = disp_y
boundary = top
value = 0.001
[../]
[]
[Materials]
[./stress]
type = ADComputeLinearElasticStress
[../]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
bulk_modulus = 416666
shear_modulus = 454545
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
l_max_its = 20
nl_max_its = 10
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/lps_single.i)
# This test provides an example of an individual LPS viscoplasticity model
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmax = 0.002
ymax = 0.002
[]
[Physics/SolidMechanics/QuasiStatic/All]
strain = FINITE
add_variables = true
generate_output = 'strain_xx strain_yy strain_xy hydrostatic_stress vonmises_stress'
use_automatic_differentiation = true
[]
[Functions]
[./pull]
type = PiecewiseLinear
x = '0 0.1'
y = '0 1e-5'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.3
[../]
[./stress]
type = ADComputeMultipleInelasticStress
inelastic_models = lps
outputs = all
[../]
[./porosity]
type = ADPorosityFromStrain
initial_porosity = 0.1
inelastic_strain = 'combined_inelastic_strain'
outputs = 'all'
[../]
[./lps]
type = ADViscoplasticityStressUpdate
coefficient = 'coef'
power = 3
outputs = all
relative_tolerance = 1e-11
[../]
[./coef]
type = ADParsedMaterial
property_name = coef
# Example of creep power law
expression = '1e-18 * exp(-4e4 / 1.987 / 1200)'
[../]
[]
[BCs]
[./no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./pull_disp_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = top
function = pull
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 0.01
end_time = 0.12
[]
[Postprocessors]
[./disp_x]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./disp_y]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
[../]
[./dt]
type = TimestepSize
[../]
[./num_lin]
type = NumLinearIterations
outputs = console
[../]
[./num_nonlin]
type = NumNonlinearIterations
outputs = console
[../]
[./eff_creep_strain]
type = ElementAverageValue
variable = effective_viscoplasticity
[../]
[./porosity]
type = ElementAverageValue
variable = porosity
[../]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/rom_stress_update/ADverification.i)
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[temperature]
[]
[]
[AuxKernels]
[temp_aux]
type = FunctionAux
variable = temperature
function = temp_fcn
execute_on = 'initial timestep_begin'
[]
[]
[Functions]
[rhom_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 1
format = columns
xy_in_file_only = false
direction = right
[]
[rhoi_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 2
format = columns
xy_in_file_only = false
direction = right
[]
[vmJ2_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 3
format = columns
xy_in_file_only = false
direction = right
[]
[evm_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 4
format = columns
xy_in_file_only = false
direction = right
[]
[temp_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 5
format = columns
xy_in_file_only = false
direction = right
[]
[rhom_soln_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 7
format = columns
xy_in_file_only = false
direction = right
[]
[rhoi_soln_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 8
format = columns
xy_in_file_only = false
direction = right
[]
[creep_rate_soln_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 10
format = columns
xy_in_file_only = false
direction = right
[]
[rhom_diff_fcn]
type = ParsedFunction
symbol_names = 'rhom_soln rhom'
symbol_values = 'rhom_soln rhom'
expression = 'abs(rhom_soln - rhom) / rhom_soln'
[]
[rhoi_diff_fcn]
type = ParsedFunction
symbol_names = 'rhoi_soln rhoi'
symbol_values = 'rhoi_soln rhoi'
expression = 'abs(rhoi_soln - rhoi) / rhoi_soln'
[]
[creep_rate_diff_fcn]
type = ParsedFunction
symbol_names = 'creep_rate_soln creep_rate'
symbol_values = 'creep_rate_soln creep_rate'
expression = 'abs(creep_rate_soln - creep_rate) / creep_rate_soln'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
generate_output = 'vonmises_stress'
use_automatic_differentiation = true
[]
[]
[BCs]
[symmx]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0
[]
[symmy]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[symmz]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0
[]
[pressure_x]
type = ADPressure
variable = disp_x
boundary = right
function = vmJ2_fcn
factor = 0.5e6
[]
[pressure_y]
type = ADPressure
variable = disp_y
boundary = top
function = vmJ2_fcn
factor = -0.5e6
[]
[pressure_z]
type = ADPressure
variable = disp_z
boundary = front
function = vmJ2_fcn
factor = -0.5e6
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e11
poissons_ratio = 0.3
[]
[stress]
type = ADComputeMultipleInelasticStress
inelastic_models = rom_stress_prediction
[]
[rom_stress_prediction]
type = ADSS316HLAROMANCEStressUpdateTest
temperature = temperature
effective_inelastic_strain_name = effective_creep_strain
internal_solve_full_iteration_history = true
outputs = all
wall_dislocation_density_forcing_function = rhoi_fcn
cell_dislocation_density_forcing_function = rhom_fcn
old_creep_strain_forcing_function = evm_fcn
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_ksp_ew -snes_converged_reason -ksp_converged_reason'# -ksp_error_if_not_converged -snes_error_if_not_converged'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
automatic_scaling = true
compute_scaling_once = false
nl_abs_tol = 1e-10
dt = 1e-3
end_time = 1e-2
[]
[Postprocessors]
[effective_strain_avg]
type = ElementAverageValue
variable = effective_creep_strain
outputs = console
[]
[temperature]
type = ElementAverageValue
variable = temperature
outputs = console
[]
[rhom]
type = ElementAverageValue
variable = cell_dislocations
[]
[rhoi]
type = ElementAverageValue
variable = wall_dislocations
[]
[vonmises_stress]
type = ElementAverageValue
variable = vonmises_stress
outputs = console
[]
[creep_rate]
type = ElementAverageValue
variable = creep_rate
[]
[rhom_in]
type = FunctionValuePostprocessor
function = rhom_fcn
execute_on = 'TIMESTEP_END initial'
outputs = console
[]
[rhoi_in]
type = FunctionValuePostprocessor
function = rhoi_fcn
execute_on = 'TIMESTEP_END initial'
outputs = console
[]
[vmJ2_in]
type = FunctionValuePostprocessor
function = vmJ2_fcn
execute_on = 'TIMESTEP_END initial'
outputs = console
[]
[rhom_soln]
type = FunctionValuePostprocessor
function = rhom_soln_fcn
outputs = console
[]
[rhoi_soln]
type = FunctionValuePostprocessor
function = rhoi_soln_fcn
outputs = console
[]
[creep_rate_soln]
type = FunctionValuePostprocessor
function = creep_rate_soln_fcn
outputs = console
[]
[rhom_diff]
type = FunctionValuePostprocessor
function = rhom_diff_fcn
outputs = console
[]
[rhoi_diff]
type = FunctionValuePostprocessor
function = rhoi_diff_fcn
outputs = console
[]
[creep_rate_diff]
type = FunctionValuePostprocessor
function = creep_rate_diff_fcn
outputs = console
[]
[rhom_max_diff]
type = TimeExtremeValue
postprocessor = rhom_diff
outputs = console
[]
[rhoi_max_diff]
type = TimeExtremeValue
postprocessor = rhoi_diff
outputs = console
[]
[creep_rate_max_diff]
type = TimeExtremeValue
postprocessor = creep_rate_diff
outputs = console
[]
[]
[Outputs]
csv = true
file_base = 'verification_1e-3_out'
[]
(modules/solid_mechanics/test/tests/rom_stress_update/ADlower_limit.i)
temp = 800.0160634
disp = 1.0053264195e6
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[temperature]
initial_condition = ${temp}
[]
[]
[Functions]
[temp_weight]
type = ParsedFunction
symbol_names = 'lower_limit avg'
symbol_values = '800.0160634 temp_avg'
expression = 'val := 2 * avg / lower_limit - 1;
clamped := if(val <= -1, -0.99999, if(val >= 1, 0.99999, val));
plus := exp(-2 / (1 + clamped));
minus := exp(-2 / (1 - clamped));
plus / (plus + minus)'
[]
[stress_weight]
type = ParsedFunction
symbol_names = 'lower_limit avg'
symbol_values = '2.010652839e6 vonmises_stress'
expression = 'val := 2 * avg / lower_limit - 1;
clamped := if(val <= -1, -0.99999, if(val >= 1, 0.99999, val));
plus := exp(-2 / (1 + clamped));
minus := exp(-2 / (1 - clamped));
plus / (plus + minus)'
[]
[creep_rate_exact]
type = ParsedFunction
symbol_names = 'lower_limit_strain temp_weight stress_weight'
symbol_values = '3.370764e-12 temp_weight stress_weight'
expression = 'lower_limit_strain * temp_weight * stress_weight'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
use_automatic_differentiation = true
generate_output = vonmises_stress
[]
[]
[BCs]
[symmy]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[symmx]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0
[]
[symmz]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0
[]
[pressure_x]
type = ADPressure
variable = disp_x
boundary = right
factor = ${disp}
[]
[pressure_y]
type = ADPressure
variable = disp_y
boundary = top
factor = -${disp}
[]
[pressure_z]
type = ADPressure
variable = disp_z
boundary = front
factor = -${disp}
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 3.30e11
poissons_ratio = 0.3
[]
[stress]
type = ADComputeMultipleInelasticStress
inelastic_models = rom_stress_prediction
[]
[rom_stress_prediction]
type = ADSS316HLAROMANCEStressUpdateTest
temperature = temperature
initial_cell_dislocation_density = 6.0e12
initial_wall_dislocation_density = 4.4e11
outputs = all
apply_strain = false
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
nl_abs_tol = 1e-12
automatic_scaling = true
compute_scaling_once = false
num_steps = 1
dt = 1e5
[]
[Postprocessors]
[creep_rate_exact]
type = FunctionValuePostprocessor
function = creep_rate_exact
[]
[creep_rate_avg]
type = ElementAverageValue
variable = creep_rate
[]
[creep_rate_diff]
type = DifferencePostprocessor
value1 = creep_rate_exact
value2 = creep_rate_avg
[]
[temp_avg]
type = ElementAverageValue
variable = temperature
[]
[cell_dislocations]
type = ElementAverageValue
variable = cell_dislocations
[]
[wall_disloactions]
type = ElementAverageValue
variable = wall_dislocations
[]
[vonmises_stress]
type = ElementAverageValue
variable = vonmises_stress
[]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/ad_elastic/finite_elastic.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 3
ny = 3
nz = 3
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
# scale with one over Young's modulus
[./disp_x]
scaling = 1e-10
[../]
[./disp_y]
scaling = 1e-10
[../]
[./disp_z]
scaling = 1e-10
[../]
[]
[Kernels]
[./stress_x]
type = ADStressDivergenceTensors
component = 0
variable = disp_x
use_displaced_mesh = true
[../]
[./stress_y]
type = ADStressDivergenceTensors
component = 1
variable = disp_y
use_displaced_mesh = true
[../]
[./stress_z]
type = ADStressDivergenceTensors
component = 2
variable = disp_z
use_displaced_mesh = true
[../]
[]
[BCs]
[./symmy]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0
[../]
[./symmx]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./symmz]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0
[../]
[./tdisp]
type = ADDirichletBC
variable = disp_z
boundary = front
value = 0.1
[../]
[]
[Materials]
[./elasticity]
type = ADComputeIsotropicElasticityTensor
poissons_ratio = 0.3
youngs_modulus = 1e10
[../]
[]
[Materials]
[./strain]
type = ADComputeFiniteStrain
[../]
[./stress]
type = ADComputeFiniteStrainElasticStress
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
dt = 0.05
solve_type = 'NEWTON'
petsc_options_iname = -pc_hypre_type
petsc_options_value = boomeramg
dtmin = 0.05
num_steps = 1
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/hoop_strain_comparison.i)
# This test compares the hoop strain at two different elements in an internally
# pressurized cylinder with anisotropic plasticity: different yield condition
# for hoop and axial directions. The elements are located circumferentially
# apart but at same axial position. It is expected that due to pressurization
# hoop strains will develop with uniform magnitude along hoop direction. The
# test verifies that the plastic hoop strain is uniform in hoop direction.
# For 3D simulations with material properties oriented along the curved
# geometry such as cylinder or sphere, the stresses and strains are rotated to
# the local coordinate system from the global coordinate system. The plastic
# strain is calculated in the local coordinate system and then transformed to
# the global coordinate system. This test involves a 3D cylindrical geometry,
# and helps in indirectly verifying that this transformation of stresses and
# strains back and forth between the local and global coordinate system is
# correctly implemented.
[Mesh]
file = quarter_cylinder.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[plasticity_strain_xx]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xx
index_i = 0
index_j = 0
[]
[plasticity_strain_xy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xy
index_i = 0
index_j = 1
[]
[plasticity_strain_yy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_yy
index_i = 1
index_j = 1
[]
[plasticity_strain_zz]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_zz
index_i = 2
index_j = 2
[]
[stress_zz]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[]
[stress_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[]
[stress_yy]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[]
[Functions]
[push]
type = PiecewiseLinear
x = '0 1e2'
y = '0 200e6'
[]
[swelling_func]
type = ParsedFunction
expression = 0
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_zz elastic_strain_xx elastic_strain_yy stress_xx stress_yy stress_zz strain_zz plastic_strain_zz plastic_strain_xx plastic_strain_yy hoop_stress hoop_strain'
use_automatic_differentiation = true
add_variables = true
cylindrical_axis_point1 = '0 0 0'
cylindrical_axis_point2 = '0 1 0'
[]
[]
[Constraints]
[mid_section_plane]
type = EqualValueBoundaryConstraint
variable = disp_y
secondary = top # boundary
penalty = 1.0e+10
[]
[]
[Materials]
[swelling]
type = ADGenericFunctionMaterial
prop_values = swelling_func
prop_names = swelling
[]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 200.0e9
poissons_ratio = 0.2
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "plasticity"
max_iterations = 50
absolute_tolerance = 1e-30 #1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
# hill_constants = "0.5 0.5 0.5 1.5 1.5 1.5"
hill_constants = "0.5 0.25 0.5 1.5 1.5 1.5"
[]
[plasticity]
type = ADHillElastoPlasticityStressUpdate
hardening_constant = 1.5e10
hardening_exponent = 1.0
yield_stress = 0.0 # 60e6
local_cylindrical_csys = true
# local_spherical_csys = false
axis = y
absolute_tolerance = 1e-15 # 1e-8
relative_tolerance = 1e-13 # 1e-15
internal_solve_full_iteration_history = true
max_inelastic_increment = 2.0e-6
internal_solve_output_on = on_error
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = x_face
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = z_face
value = 0.0
[]
[Pressure]
[Side1]
boundary = inner
function = push
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-14
# nl_abs_tol = 1e-10
l_max_its = 90
nl_max_its = 30
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 30
iteration_window = 9
growth_factor = 1.05
cutback_factor = 0.5
timestep_limiting_postprocessor = matl_ts_min
dt = 0.1e-4
time_t = '0 6.23 10'
time_dt = '0.1 1.0e-2 1.0e-2'
[]
num_steps = 3
start_time = 0
end_time = 200.0
automatic_scaling = true
dtmax = 0.1e-4
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[hoop_strain_elementA]
type = ElementalVariableValue
elementid = 464
variable = hoop_strain
[]
[hoop_strain_elementB]
type = ElementalVariableValue
elementid = 478
variable = hoop_strain
[]
[hoop_strain_diff]
type = DifferencePostprocessor
value1 = hoop_strain_elementA
value2 = hoop_strain_elementB
[]
[]
[Outputs]
csv = true
exodus = false
perf_graph = true
[]
(modules/solid_mechanics/test/tests/ad_thermal_expansion_function/instantaneous_complex.i)
# This test checks the thermal expansion calculated via a mean thermal expansion coefficient.
# The coefficient is selected so as to result in a 1e-4 strain in the x-axis, and to cross over
# from positive to negative strain.
[Mesh]
[./gen]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 4
nz = 4
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./temp]
[../]
[]
[Kernels]
[./temp_diff]
type = ADDiffusion
variable = temp
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = SMALL
add_variables = true
eigenstrain_names = eigenstrain
generate_output = 'strain_xx strain_yy strain_zz'
use_automatic_differentiation = true
[../]
[]
[BCs]
[./left]
type = ADDirichletBC
variable = disp_x
boundary = 'left'
value = 0.0
[../]
[./bottom]
type = ADDirichletBC
variable = disp_y
boundary = 'bottom'
value = 0.0
[../]
[./back]
type = ADDirichletBC
variable = disp_z
boundary = 'back'
value = 0.0
[../]
[./temp]
type = ADFunctionDirichletBC
variable = temp
boundary = 'front back top bottom left right'
function = '1 + t'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1
poissons_ratio = 0.3
[../]
[./stress]
type = ADComputeLinearElasticStress
[../]
[./thermal_expansion_strain]
type = ADComputeInstantaneousThermalExpansionFunctionEigenstrain
thermal_expansion_function = cte_func_mean
stress_free_temperature = 1
temperature = temp
eigenstrain_name = eigenstrain
[../]
[]
[Functions]
[./cte_func_mean]
type = ParsedFunction
expression = '1e-6 + 1e-8 * t + 1e-8 * t^2 + exp(t) * 1e-2'
[../]
[]
[Postprocessors]
[./disp_x_max]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./temp_avg]
type = ElementAverageValue
variable = temp
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
num_steps = 1
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/power_law_creep/ad_restart2.i)
# 1x1x1 unit cube with uniform pressure on top face
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
initial_condition = 1000.0
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
incremental = true
add_variables = true
generate_output = 'stress_yy creep_strain_xx creep_strain_yy creep_strain_zz elastic_strain_yy'
use_automatic_differentiation = true
[]
[]
[Functions]
[top_pull]
type = PiecewiseLinear
x = '0 1'
y = '1 1'
[]
[]
[Kernels]
[heat]
type = Diffusion
variable = temp
[]
[heat_ie]
type = TimeDerivative
variable = temp
[]
[]
[BCs]
[u_top_pull]
type = ADPressure
variable = disp_y
boundary = top
factor = -10.0e6
function = top_pull
[]
[u_bottom_fix]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[u_yz_fix]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[u_xy_fix]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
[temp_fix]
type = DirichletBC
variable = temp
boundary = 'bottom top'
value = 1000.0
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 2e11
poissons_ratio = 0.3
constant_on = SUBDOMAIN
[]
[radial_return_stress]
type = ADComputeMultipleInelasticStress
inelastic_models = 'power_law_creep'
[]
[power_law_creep]
type = ADPowerLawCreepStressUpdate
coefficient = 1.0e-15
n_exponent = 4
activation_energy = 3.0e5
temperature = temp
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 20
nl_max_its = 20
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
l_tol = 1e-5
start_time = 0.6
end_time = 1.0
num_steps = 12
dt = 0.1
[]
[Outputs]
exodus = true
[]
[Problem]
restart_file_base = ad_restart1_out_cp/0006
# temp has an initial condition despite the restart
allow_initial_conditions_with_restart = true
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_temperature_coefficients.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 2
nz = 2
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 10.0
ymax = 1.0
zmax = 1.0
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = '100'
nodes = '3 69'
input = gen
[]
[corner_node_2]
type = ExtraNodesetGenerator
new_boundary = '101'
nodes = '4 47'
input = corner_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xz]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[creep_strain_xx]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xx
index_i = 0
index_j = 0
[]
[creep_strain_xy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xy
index_i = 0
index_j = 1
[]
[creep_strain_yy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yy
index_i = 1
index_j = 1
[]
[creep_strain_zz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_zz
index_i = 2
index_j = 2
[]
[creep_strain_xz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xz
index_i = 0
index_j = 2
[]
[creep_strain_yz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yz
index_i = 1
index_j = 2
[]
[sigma_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 1
index_j = 1
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1.0e-9 1.0'
y = '0 -4e1 -4e1'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_xx stress_xx'
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 700
poissons_ratio = 0.0
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = 'trial_creep_aniso_iso'
max_iterations = 50
[]
[hill_constants]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5 0.5 0.5 1.5 1.5 1.5"
[]
[trial_creep_aniso_iso]
type = ADHillCreepStressUpdate
coefficient = 1e-16
n_exponent = 9
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 0.00003
relative_tolerance = 1e-20
absolute_tolerance = 1e-20
internal_solve_output_on = never
# Force it to not use integration error
max_integration_error = 1.0
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = 100
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = 101
value = 0.0
[]
[Pressure]
[Side1]
boundary = right
function = pull
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-13
nl_abs_tol = 1.0e-14
l_max_its = 90
num_steps = 50
dt = 5.0e-4
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[creep_strain_xx]
type = ElementalVariableValue
variable = creep_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_yy]
type = ElementalVariableValue
variable = creep_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_zz]
type = ElementalVariableValue
variable = creep_strain_zz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_xy]
type = ElementalVariableValue
variable = creep_strain_xy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_yz]
type = ElementalVariableValue
variable = creep_strain_yz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_xz]
type = ElementalVariableValue
variable = creep_strain_xz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_xx]
type = ElementalVariableValue
variable = elastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_xx]
type = ElementalVariableValue
variable = stress_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[]
[Outputs]
csv = true
exodus = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/shell/static/pressure_error.i)
# Test for the stress and strain output for tapered shell elements.
# A tapered beam is represented with shell elements in XY plane
# having Young's Modulus of 210000 and poissons ratio of 0.3.
# The displacement in X direction is constrained in the left end and the
# displacement of center node of the left end is constrained in Y direction.
# A uniform pressure of 50 units is applied at the right end.
# The shell element strain calculation assumes four quadrature points.
# So, when a pressure is applied at the edge, two quadrature points
# are used in the strain calulator and an error is generated.
[Mesh]
[input]
type = FileMeshGenerator
file = taperedmesh.e
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[rot_x]
[]
[rot_y]
[]
[]
[AuxVariables]
[stress_00]
order = CONSTANT
family = MONOMIAL
[]
[stress_11]
order = CONSTANT
family = MONOMIAL
[]
[stress_22]
order = CONSTANT
family = MONOMIAL
[]
[stress_01]
order = CONSTANT
family = MONOMIAL
[]
[stress_10]
order = CONSTANT
family = MONOMIAL
[]
[stress_02]
order = CONSTANT
family = MONOMIAL
[]
[stress_20]
order = CONSTANT
family = MONOMIAL
[]
[stress_12]
order = CONSTANT
family = MONOMIAL
[]
[stress_21]
order = CONSTANT
family = MONOMIAL
[]
[strain_00]
order = CONSTANT
family = MONOMIAL
[]
[strain_11]
order = CONSTANT
family = MONOMIAL
[]
[strain_22]
order = CONSTANT
family = MONOMIAL
[]
[strain_01]
order = CONSTANT
family = MONOMIAL
[]
[strain_10]
order = CONSTANT
family = MONOMIAL
[]
[strain_02]
order = CONSTANT
family = MONOMIAL
[]
[strain_20]
order = CONSTANT
family = MONOMIAL
[]
[strain_12]
order = CONSTANT
family = MONOMIAL
[]
[strain_21]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[solid_disp_x]
type = ADStressDivergenceShell
block = 1
component = 0
variable = disp_x
through_thickness_order = SECOND
[]
[solid_disp_y]
type = ADStressDivergenceShell
block = 1
component = 1
variable = disp_y
through_thickness_order = SECOND
[]
[solid_disp_z]
type = ADStressDivergenceShell
block = 1
component = 2
variable = disp_z
through_thickness_order = SECOND
[]
[solid_rot_x]
type = ADStressDivergenceShell
block = 1
component = 3
variable = rot_x
through_thickness_order = SECOND
[]
[solid_rot_y]
type = ADStressDivergenceShell
block = 1
component = 4
variable = rot_y
through_thickness_order = SECOND
[]
[]
[AuxKernels]
[stress_00]
type = RankTwoAux
variable = stress_00
rank_two_tensor = global_stress_t_points_0
index_i = 0
index_j = 0
execute_on = TIMESTEP_END
[]
[strain_00]
type = RankTwoAux
variable = strain_00
rank_two_tensor = total_global_strain_t_points_0
index_i = 0
index_j = 0
execute_on = TIMESTEP_END
[]
[stress_11]
type = RankTwoAux
variable = stress_11
rank_two_tensor = global_stress_t_points_0
index_i = 1
index_j = 1
execute_on = TIMESTEP_END
[]
[strain_11]
type = RankTwoAux
variable = strain_11
rank_two_tensor = total_global_strain_t_points_0
index_i = 1
index_j = 1
execute_on = TIMESTEP_END
[]
[stress_22]
type = RankTwoAux
variable = stress_22
rank_two_tensor = global_stress_t_points_0
index_i = 2
index_j = 2
execute_on = TIMESTEP_END
[]
[strain_22]
type = RankTwoAux
variable = strain_22
rank_two_tensor = total_global_strain_t_points_0
index_i = 2
index_j = 2
execute_on = TIMESTEP_END
[]
[stress_01]
type = RankTwoAux
variable = stress_01
rank_two_tensor = global_stress_t_points_0
index_i = 0
index_j = 1
execute_on = TIMESTEP_END
[]
[strain_01]
type = RankTwoAux
variable = strain_01
rank_two_tensor = total_global_strain_t_points_0
index_i = 0
index_j = 1
execute_on = TIMESTEP_END
[]
[stress_10]
type = RankTwoAux
variable = stress_10
rank_two_tensor = global_stress_t_points_0
index_i = 1
index_j = 0
execute_on = TIMESTEP_END
[]
[strain_10]
type = RankTwoAux
variable = strain_10
rank_two_tensor = total_global_strain_t_points_0
index_i = 1
index_j = 0
execute_on = TIMESTEP_END
[]
[stress_02]
type = RankTwoAux
variable = stress_02
rank_two_tensor = global_stress_t_points_0
index_i = 0
index_j = 2
execute_on = TIMESTEP_END
[]
[strain_02]
type = RankTwoAux
variable = strain_02
rank_two_tensor = total_global_strain_t_points_0
index_i = 0
index_j = 2
execute_on = TIMESTEP_END
[]
[stress_20]
type = RankTwoAux
variable = stress_20
rank_two_tensor = global_stress_t_points_0
index_i = 2
index_j = 0
execute_on = TIMESTEP_END
[]
[strain_20]
type = RankTwoAux
variable = strain_20
rank_two_tensor = total_global_strain_t_points_0
index_i = 2
index_j = 0
execute_on = TIMESTEP_END
[]
[stress_12]
type = RankTwoAux
variable = stress_12
rank_two_tensor = global_stress_t_points_0
index_i = 1
index_j = 2
execute_on = TIMESTEP_END
[]
[strain_12]
type = RankTwoAux
variable = strain_12
rank_two_tensor = total_global_strain_t_points_0
index_i = 1
index_j = 2
execute_on = TIMESTEP_END
[]
[stress_21]
type = RankTwoAux
variable = stress_21
rank_two_tensor = global_stress_t_points_0
index_i = 2
index_j = 1
execute_on = TIMESTEP_END
[]
[strain_21]
type = RankTwoAux
variable = strain_21
rank_two_tensor = total_global_strain_t_points_0
index_i = 2
index_j = 1
execute_on = TIMESTEP_END
[]
[]
[BCs]
[BC_0]
type = ADDirichletBC
variable = disp_x
value = 0.0
boundary = '2' #left
[]
[BC_1]
type = ADDirichletBC
variable = disp_y
value = 0.0
boundary = 10 #left_side_mid
[]
[BC_2]
type = ADPressure
variable = disp_x
displacements = 'disp_x disp_y disp_z'
factor = -50
boundary = '3'
use_displaced_mesh = false
[]
[]
[Materials]
[stress]
type = ADComputeShellStress
block = 1
through_thickness_order = SECOND
[]
[elasticity]
type = ADComputeIsotropicElasticityTensorShell
youngs_modulus = 210000
poissons_ratio = 0.3
block = 1
through_thickness_order = SECOND
[]
[strain]
type = ADComputeIncrementalShellStrain
block = 1
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y'
thickness = 0.1
through_thickness_order = SECOND
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-8
l_abs_tol = 1e-8
nl_max_its = 100
l_max_its = 100
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/ad_return_mapping/ad_return_mapping_derivative.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
[]
[]
[AuxVariables]
[temp]
initial_condition = 1000.0
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
generate_output = 'stress_zz elastic_strain_zz creep_strain_zz'
use_automatic_differentiation = true
scaling = 1.06364e-11
[]
[]
[Functions]
[front_pull]
type = PiecewiseLinear
x = '0 1'
y = '0 1'
scale_factor = 0.5
[]
[]
[BCs]
[u_front_pull]
type = ADFunctionDirichletBC
variable = disp_z
boundary = front
function = front_pull
[]
[uz_back_fix]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
[u_yz_fix]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[u_xz_fix]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 2e11
poissons_ratio = 0.3
[]
[radial_return_stress]
type = ADComputeMultipleInelasticStress
inelastic_models = 'power_law_creep'
[]
[power_law_creep]
type = ADPowerLawCreepStressUpdate
coefficient = 1.0e-15
n_exponent = 4
activation_energy = 0.0
temperature = temp
# options for using substepping
use_substepping = INCREMENT_BASED
substep_strain_tolerance = 0.1
max_inelastic_increment = 0.01
automatic_differentiation_return_mapping = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type '
petsc_options_value = 'lu '
line_search = 'none'
nl_max_its = 10
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
end_time = 0.1
dt = 0.1
[]
[Outputs]
exodus = true
file_base = reference
[]
(test/tests/nodalkernels/constraint_enforcement/ad-upper-and-lower-bound.i)
l=10
nx=100
num_steps=10
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
[]
[Variables]
[u]
[]
[lm_upper]
[]
[lm_lower]
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'x'
[]
[]
[Kernels]
[time]
type = ADTimeDerivative
variable = u
[]
[diff]
type = ADDiffusion
variable = u
[]
[ffn]
type = ADBodyForce
variable = u
function = 'if(x<5,-1,1)'
[]
[]
[NodalKernels]
[upper_bound]
type = ADUpperBoundNodalKernel
variable = lm_upper
v = u
exclude_boundaries = 'left right'
upper_bound = 10
[]
[forces_from_upper]
type = ADCoupledForceNodalKernel
variable = u
v = lm_upper
coef = -1
[]
[lower_bound]
type = ADLowerBoundNodalKernel
variable = lm_lower
v = u
exclude_boundaries = 'left right'
lower_bound = 0
[]
[forces_from_lower]
type = ADCoupledForceNodalKernel
variable = u
v = lm_lower
coef = 1
[]
[]
[BCs]
[left]
type = ADDirichletBC
boundary = left
value = 0
variable = u
[]
[right]
type = ADDirichletBC
boundary = right
value = ${l}
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
solve_type = NEWTON
dtmin = 1
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_type -sub_pc_factor_levels -snes_linesearch_type'
petsc_options_value = '0 30 asm 16 basic'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = 'nonlinear timestep_end'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[active_upper_lm]
type = GreaterThanLessThanPostprocessor
variable = lm_upper
execute_on = 'nonlinear timestep_end'
value = 1e-8
comparator = 'greater'
[]
[upper_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = ${fparse 10+1e-8}
comparator = 'greater'
[]
[active_lower_lm]
type = GreaterThanLessThanPostprocessor
variable = lm_lower
execute_on = 'nonlinear timestep_end'
value = 1e-8
comparator = 'greater'
[]
[lower_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-8
comparator = 'less'
[]
[nls]
type = NumNonlinearIterations
[]
[cum_nls]
type = CumulativeValuePostprocessor
postprocessor = nls
[]
[]
(modules/solid_mechanics/test/tests/power_law_creep/nonad_bounds.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[finite]
add_variables = true
strain = FINITE
use_automatic_differentiation = true
[]
[]
[BCs]
[no_x]
type = ADDirichletBC
variable = disp_x
boundary = 'left'
value = 0.0
[]
[top]
type = ADDirichletBC
variable = disp_x
boundary = 'top'
value = 1e-4
[]
[no_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0.0
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e11
poissons_ratio = 0.3
[]
[elastic_stress]
type = ADComputeMultipleInelasticStress
inelastic_models = 'creep'
outputs = all
[]
[creep]
type = ADPowerLawCreepTest
coefficient = 10e-22
n_exponent = 2
activation_energy = 0
internal_solve_full_iteration_history = true
internal_solve_output_on = always
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = none
num_steps = 1
[]
[Outputs]
[]
(modules/solid_mechanics/test/tests/ad_linear_elasticity/linear_elastic_material.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 50
ymax = 50
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./diffused]
[./InitialCondition]
type = RandomIC
[../]
[../]
[]
[Physics/SolidMechanics/QuasiStatic/All]
strain = SMALL
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_zx'
use_automatic_differentiation = true
[]
[Kernels]
[./diff]
type = ADDiffusion
variable = diffused
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0
[../]
[./stress]
type = ADComputeLinearElasticStress
[../]
[]
[BCs]
[./bottom]
type = ADDirichletBC
variable = diffused
boundary = 'right'
value = 1
[../]
[./top]
type = ADDirichletBC
variable = diffused
boundary = 'top'
value = 0
[../]
[./disp_x_BC]
type = ADDirichletBC
variable = disp_x
boundary = 'bottom top'
value = 0.5
[../]
[./disp_x_BC2]
type = ADDirichletBC
variable = disp_x
boundary = 'left right'
value = 0.01
[../]
[./disp_y_BC]
type = ADDirichletBC
variable = disp_y
boundary = 'bottom top'
value = 0.8
[../]
[./disp_y_BC2]
type = ADDirichletBC
variable = disp_y
boundary = 'left right'
value = 0.02
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(test/tests/kernels/ad_scalar_kernel_constraint/scalar_constraint_kernel_RJ.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Variables]
[u]
family = LAGRANGE
order = SECOND
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[Kernels]
[diff]
type = ADDiffusion
variable = u
[]
[sk_lm]
type = ADScalarLMKernel
variable = u
kappa = lambda
pp_name = pp
value = 2.666666666666666
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[bottom]
type = ADDirichletBC
variable = u
boundary = 'bottom'
value = 0
[]
[right]
type = ADDirichletBC
variable = u
boundary = 'right'
value = 0
[]
[top]
type = ADDirichletBC
variable = u
boundary = 'top'
value = 0
[]
[left]
type = ADDirichletBC
variable = u
boundary = 'left'
value = 0
[]
[]
[Postprocessors]
# integrate the volume of domain since original objects set
# int(phi)=V0, rather than int(phi-V0)=0
[pp]
type = FunctionElementIntegral
function = 1
execute_on = initial
[]
[]
# Force LU decomposition, nonlinear iterations, to check Jacobian terms with single factorization
[Executioner]
type = Steady
residual_and_jacobian_together = true
nl_rel_tol = 1e-9
l_tol = 1.e-10
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
solve_type = NEWTON
[]
[Outputs]
exodus = true
hide = lambda
[]
(modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/ad_aniso_plasticity_x_one.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 2
nz = 2
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 10.0
ymax = 1.0
zmax = 1.0
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[plasticity_strain_xx]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xx
index_i = 0
index_j = 0
[]
[plasticity_strain_xy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xy
index_i = 0
index_j = 1
[]
[plasticity_strain_yy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_yy
index_i = 1
index_j = 1
[]
[sigma_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 1
index_j = 1
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1e1 1e8'
y = '0 -4e2 -4e2'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_xx stress_xx'
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 70000
poissons_ratio = 0.25
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_plasticity"
max_iterations = 50
absolute_tolerance = 1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5829856 0.364424 0.6342174 2.0691375 2.3492325 1.814589"
[]
[trial_plasticity]
type = ADHillElastoPlasticityStressUpdate
hardening_constant = 2000.0
yield_stress = 0.001 # was 200 for verification
absolute_tolerance = 1e-15
relative_tolerance = 1e-13
# internal_solve_full_iteration_history = true
max_inelastic_increment = 2.0e-6
# internal_solve_output_on = on_error
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = left
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = left
value = 0.0
[]
[Pressure]
[Side1]
boundary = right
function = pull
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-12
nl_abs_tol = 1.0e-14
l_max_its = 90
num_steps = 25
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 30
iteration_window = 9
growth_factor = 1.05
cutback_factor = 0.5
timestep_limiting_postprocessor = matl_ts_min
dt = 1.0e-5
time_t = '0 3.4e-5 10'
time_dt = '1.0e-5 1.0e-7 1.0e-7'
[]
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[plasticity_strain_xx]
type = ElementalVariableValue
variable = plastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 0
[]
[elastic_strain_xx]
type = ElementalVariableValue
variable = elastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 0
[]
[sigma_xx]
type = ElementalVariableValue
variable = stress_xx
execute_on = 'TIMESTEP_END'
elementid = 0
[]
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/3d_bar_orthotropic_90deg_rotation_ad_creep_z.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 2
ymin = 0
ymax = 10
zmin = 0
zmax = 2
nx = 1
ny = 1
nz = 1
elem_type = HEX8
[]
[corner]
type = ExtraNodesetGenerator
new_boundary = 101
coord = '0 0 0'
input = generated_mesh
[]
[side]
type = ExtraNodesetGenerator
new_boundary = 102
coord = '2 0 0'
input = corner
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
volumetric_locking_correction = true
use_automatic_differentiation = true
generate_output = 'elastic_strain_xx stress_xx creep_strain_xx'
[]
[]
[Materials]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_creep"
max_iterations = 50
absolute_tolerance = 1e-18
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5 1.0 0.5 1.5 1.5 1.5"
use_large_rotation = true
[]
[trial_creep]
type = ADHillCreepStressUpdate
coefficient = 5e-14
n_exponent = 10
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 0.00003
absolute_tolerance = 1e-18
relative_tolerance = 1e-18
# Force it to not use integration error
max_integration_error = 100.0
use_transformation = true
[]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 500
poissons_ratio = 0.0
[]
[]
[BCs]
[fix_z]
type = ADDirichletBC
variable = disp_z
boundary = bottom
value = 0
[]
[rot_y]
type = DisplacementAboutAxis
boundary = bottom
function = t
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 1
variable = disp_y
[]
#
[rot_x]
type = DisplacementAboutAxis
boundary = bottom
function = t
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 0
variable = disp_x
[]
[rot_y90]
type = DisplacementAboutAxis
boundary = bottom
function = 90
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 1
variable = disp_y
[]
#
[rot_x90]
type = DisplacementAboutAxis
boundary = bottom
function = 90
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 0
variable = disp_x
[]
[press]
boundary = top
function = '-1.0*(t-90)*0.1'
use_displaced_mesh = true
displacements = 'disp_x disp_y disp_z'
type = Pressure
variable = disp_x
[]
[]
[Postprocessors]
[creep_strain_xx]
type = ADElementAverageMaterialProperty
mat_prop = creep_strain_xx
[]
[]
[Controls]
[c1]
type = TimePeriod
enable_objects = 'BCs::rot_x BCs::rot_y'
disable_objects = 'BCs::rot_x90 BCs::rot_y90 BCs::press'
start_time = '0'
end_time = '90'
[]
[c190plus]
type = TimePeriod
enable_objects = 'BCs::rot_x90 BCs::rot_y90 BCs::press'
disable_objects = 'BCs::rot_x BCs::rot_y '
start_time = '90'
end_time = '390'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
nl_max_its = 50
automatic_scaling = true
l_tol = 1e-4
l_max_its = 50
start_time = 0.0
dt = 0.1
dtmin = 0.1
num_steps = 1200
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = false
csv = true
[]
(tutorials/tutorial01_app_development/step06_input_params/problems/pressure_diffusion.i)
[Mesh]
type = GeneratedMesh # Can generate simple lines, rectangles and rectangular prisms
dim = 2 # Dimension of the mesh
nx = 100 # Number of elements in the x direction
ny = 10 # Number of elements in the y direction
xmax = 0.304 # Length of test chamber
ymax = 0.0257 # Test chamber radius
[]
[Problem]
type = FEProblem # This is the "normal" type of Finite Element Problem in MOOSE
coord_type = RZ # Axisymmetric RZ
rz_coord_axis = X # Which axis the symmetry is around
[]
[Variables]
[pressure]
# Adds a Linear Lagrange variable by default
[]
[]
[Kernels]
[diffusion]
type = DarcyPressure # Zero-gravity, divergence-free form of Darcy's law
variable = pressure # Operate on the "pressure" variable from above
permeability = 0.8451e-09 # (m^2) assumed permeability of the porous medium
[]
[]
[BCs]
[inlet]
type = ADDirichletBC # Simple u=value BC
variable = pressure # Variable to be set
boundary = left # Name of a sideset in the mesh
value = 4000 # (Pa) From Figure 2 from paper. First data point for 1mm spheres.
[]
[outlet]
type = ADDirichletBC
variable = pressure
boundary = right
value = 0 # (Pa) Gives the correct pressure drop from Figure 2 for 1mm spheres
[]
[]
[Executioner]
type = Steady # Steady state problem
solve_type = NEWTON # Perform a Newton solve
# Set PETSc parameters to optimize solver efficiency
petsc_options_iname = '-pc_type -pc_hypre_type' # PETSc option pairs with values below
petsc_options_value = ' hypre boomeramg'
[]
[Outputs]
exodus = true # Output Exodus format
[]
(modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/ad_uniaxial_x.i)
# This test simulates uniaxial tensile loading in x-direction.
# The slope of the stress vs. plastic strain is evaluated from
# the simulation and compared with the value calculated using
# the analytical expression. This test uses a material with li-
# near strain hardening.
# For uniaxial tensile loading in y-direction, the slope of the
# stress vs. plastic strain is (2K / (G + H)) where K is the ha-
# rdening constant, and G & H are the Hill's constant. For deta-
# ils on the derivation of the expression for slope please refer
# the documentation of this material.
# Slope obtained from this MOOSE test simulation:
# = 1.791 x 10^9
# Slope obtained from analytical expression:
# = 2 x 10^9 / (0.4 + 0.7) = 1.818 x 10^9
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[sigma_xx]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[plasticity_strain_xx]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xx
index_i = 0
index_j = 0
[]
[plasticity_strain_xy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xy
index_i = 0
index_j = 1
[]
[plasticity_strain_yy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_yy
index_i = 1
index_j = 1
[]
[sigma_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1e1'
y = '0 -2e8'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_xx stress_xx strain_xx plastic_strain_xx'
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeElasticityTensor
fill_method = orthotropic
C_ijkl = '10.0e10 15.0e10 20.0e10 2.0e10 2.0e10 2.0e10 0.2 0.2 0.2 0.13333333333333333 0.1 0.15'
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_plasticity"
max_iterations = 50
absolute_tolerance = 1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.6 0.4 0.7 1.5 1.5 1.5"
[]
[trial_plasticity]
type = ADHillElastoPlasticityStressUpdate
hardening_constant = 10e9
yield_stress = 60e6
absolute_tolerance = 1e-15 # 1e-8
relative_tolerance = 1e-13 # 1e-15
# internal_solve_full_iteration_history = true
max_inelastic_increment = 2.0e-5
# internal_solve_output_on = on_error
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
[Pressure]
[Side1]
boundary = right
function = pull
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-12
nl_abs_tol = 1.0e-14
l_max_its = 90
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 30
iteration_window = 9
growth_factor = 1.05
cutback_factor = 0.5
timestep_limiting_postprocessor = matl_ts_min
dt = 0.1
time_t = '0 2.5 10'
time_dt = '0.1 1.0e-2 1.0e-2'
[]
start_time = 0
end_time = 10.0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[plasticity_strain_xx]
type = ElementalVariableValue
variable = plastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 0
[]
[elastic_strain_xx]
type = ElementalVariableValue
variable = elastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 0
[]
[strain_xx]
type = ElementalVariableValue
variable = strain_xx
execute_on = 'TIMESTEP_END'
elementid = 0
[]
[sigma_xx]
type = ElementalVariableValue
variable = stress_xx
execute_on = 'TIMESTEP_END'
elementid = 0
[]
[]
[Outputs]
csv = true
perf_graph = true
[]
(test/tests/fvkernels/fv_simple_diffusion/dirichlet-constrained-average-value.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[v]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[Kernels]
[diff]
type = ADDiffusion
variable = u
[]
[]
[FVKernels]
[diff]
type = FVDiffusion
variable = v
coeff = coeff
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = v
boundary = left
value = 7
[]
[right]
type = FVBoundaryIntegralValueConstraint
variable = v
boundary = right
phi0 = 42
lambda = lambda
[]
[]
[Materials]
[diff]
type = ADGenericFunctorMaterial
prop_names = 'coeff'
prop_values = '1'
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = u
boundary = left
value = 7
[]
[right]
type = ADDirichletBC
variable = u
boundary = right
value = 42
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
residual_and_jacobian_together = true
[]
[Outputs]
exodus = true
hide = lambda
[]
(modules/combined/test/tests/power_law_hardening/ADPowerLawHardening.i)
# This is a test of the isotropic power law hardening constitutive model.
# In this problem, a single Hex 8 element is fixed at the bottom and pulled at the top
# at a constant rate of 0.1.
# Before yield, stress = strain (=0.1*t) as youngs modulus is 1.0.
# The yield stress for this problem is 0.25 ( as strength coefficient is 0.5 and strain rate exponent is 0.5).
# Therefore, the material should start yielding at t = 2.5 seconds and then follow stress = K *pow(strain,n) or
# stress ~ 0.5*pow(0.1*t,0.5).
#
# This tensor mechanics version of the power law hardening plasticity model matches
# the solid mechanics version for this toy problem under exodiff limits
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[Mesh]
type = GeneratedMesh
dim = 3
[]
[AuxVariables]
[total_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[top_pull]
type = ParsedFunction
expression = t*(0.1)
[]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = true
strain = SMALL
incremental = true
generate_output = 'stress_yy'
use_automatic_differentiation = true
[]
[]
[AuxKernels]
[total_strain_yy]
type = ADRankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yy
index_i = 1
index_j = 1
[]
[]
[BCs]
[y_pull_function]
type = ADFunctionDirichletBC
variable = disp_y
boundary = top
function = top_pull
[]
[x_bot]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[y_bot]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[z_bot]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1.0
poissons_ratio = 0.3
[]
[power_law_hardening]
type = ADIsotropicPowerLawHardeningStressUpdate
strength_coefficient = 0.5 #K
strain_hardening_exponent = 0.5 #n
[]
[radial_return_stress]
type = ADComputeMultipleInelasticStress
inelastic_models = 'power_law_hardening'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-ksp_snes_ew'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 4'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
end_time = 5.0
dt = 0.25
[]
[Postprocessors]
[stress_yy]
type = ElementAverageValue
variable = stress_yy
[]
[strain_yy]
type = ElementAverageValue
variable = total_strain_yy
[]
[]
[Outputs]
[out]
type = Exodus
elemental_as_nodal = true
file_base = PowerLawHardening_out
[]
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_temperature_coefficients_function.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 2
nz = 2
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 10.0
ymax = 1.0
zmax = 1.0
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = '100'
nodes = '3 69'
input = gen
[]
[corner_node_2]
type = ExtraNodesetGenerator
new_boundary = '101'
nodes = '4 47'
input = corner_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[temperature]
order = CONSTANT
family = MONOMIAL
[]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xz]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[temperature]
type = ConstantAux
variable = temperature
value = 50
[]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[creep_strain_xx]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xx
index_i = 0
index_j = 0
[]
[creep_strain_xy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xy
index_i = 0
index_j = 1
[]
[creep_strain_yy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yy
index_i = 1
index_j = 1
[]
[creep_strain_zz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_zz
index_i = 2
index_j = 2
[]
[creep_strain_xz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xz
index_i = 0
index_j = 2
[]
[creep_strain_yz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yz
index_i = 1
index_j = 2
[]
[sigma_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 1
index_j = 1
[]
[]
[ICs]
[temp]
type = ConstantIC
variable = temperature
value = 50.0
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1.0e-9 1.0'
y = '0 -4e1 -4e1'
[]
[F]
type = PiecewiseLinear
x = '-1000 10000'
y = '0.5 0.5'
[]
[G]
type = PiecewiseLinear
x = '-1000 10000'
y = '0.5 0.5'
[]
[H]
type = PiecewiseLinear
x = '-1000 10000'
y = '0.5 0.5'
[]
[L]
type = PiecewiseLinear
x = '-1000 10000'
y = '1.5 1.5'
[]
[M]
type = PiecewiseLinear
x = '-1000 10000'
y = '1.5 1.5'
[]
[N]
type = PiecewiseLinear
x = '-1000 10000'
y = '1.5 1.5'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_xx stress_xx'
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 700
poissons_ratio = 0.0
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = 'trial_creep_aniso_iso'
max_iterations = 50
[]
[hill_constants]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5 0.5 0.5 1.5 1.5 1.5"
function_names = 'F G H L M N'
temperature = temperature
[]
[trial_creep_aniso_iso]
type = ADHillCreepStressUpdate
coefficient = 1e-16
n_exponent = 9
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 0.00003
relative_tolerance = 1e-20
absolute_tolerance = 1e-20
internal_solve_output_on = never
# Force it to not use integration error
max_integration_error = 1.0
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = 100
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = 101
value = 0.0
[]
[Pressure]
[Side1]
boundary = right
function = pull
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-13
nl_abs_tol = 1.0e-14
l_max_its = 90
num_steps = 50
dt = 5.0e-4
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[creep_strain_xx]
type = ElementalVariableValue
variable = creep_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_yy]
type = ElementalVariableValue
variable = creep_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_zz]
type = ElementalVariableValue
variable = creep_strain_zz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_xy]
type = ElementalVariableValue
variable = creep_strain_xy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_yz]
type = ElementalVariableValue
variable = creep_strain_yz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_xz]
type = ElementalVariableValue
variable = creep_strain_xz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_xx]
type = ElementalVariableValue
variable = elastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_xx]
type = ElementalVariableValue
variable = stress_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[]
[Outputs]
csv = true
exodus = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_iso_creep_x_3d.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 2
nz = 2
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 10.0
ymax = 1.0
zmax = 1.0
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = '100'
nodes = '3 69'
input = gen
[]
[corner_node_2]
type = ExtraNodesetGenerator
new_boundary = '101'
nodes = '4 47'
input = corner_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xz]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[creep_strain_xx]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xx
index_i = 0
index_j = 0
[]
[creep_strain_xy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xy
index_i = 0
index_j = 1
[]
[creep_strain_yy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yy
index_i = 1
index_j = 1
[]
[creep_strain_zz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_zz
index_i = 2
index_j = 2
[]
[creep_strain_xz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xz
index_i = 0
index_j = 2
[]
[creep_strain_yz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yz
index_i = 1
index_j = 2
[]
[sigma_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 1
index_j = 1
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1.0e-9 1.0'
y = '0 -4e1 -4e1'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_xx stress_xx'
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 700
poissons_ratio = 0.0
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
# inelastic_models = 'trial_creep_iso'
max_iterations = 50
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5 0.5 0.5 1.5 1.5 1.5"
[]
[trial_creep_aniso_iso]
type = ADHillCreepStressUpdate
coefficient = 1e-16
n_exponent = 9
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 0.00003
relative_tolerance = 1e-20
absolute_tolerance = 1e-20
internal_solve_output_on = never
# Force it to not use integration error
max_integration_error = 1.0
[]
[trial_creep_iso]
type = ADPowerLawCreepStressUpdate
coefficient = 1e-16
n_exponent = 9
m_exponent = 0
activation_energy = 0
# F G H L M N
max_inelastic_increment = 0.00003
relative_tolerance = 1e-16
absolute_tolerance = 1e-16
internal_solve_output_on = never
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = 100
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = 101
value = 0.0
[]
[Pressure]
[Side1]
boundary = right
function = pull
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-13
nl_abs_tol = 1.0e-14
l_max_its = 90
num_steps = 10
dt = 5.0e-4
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[creep_strain_xx]
type = ElementalVariableValue
variable = creep_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_yy]
type = ElementalVariableValue
variable = creep_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_zz]
type = ElementalVariableValue
variable = creep_strain_zz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_xy]
type = ElementalVariableValue
variable = creep_strain_xy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_yz]
type = ElementalVariableValue
variable = creep_strain_yz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_xz]
type = ElementalVariableValue
variable = creep_strain_xz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_xx]
type = ElementalVariableValue
variable = elastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_xx]
type = ElementalVariableValue
variable = stress_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[]
[Outputs]
csv = true
exodus = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/strain_energy_density/ad_rate_model_weak_plane.i)
# Single element test to check the strain energy density calculation
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
out_of_plane_strain = strain_zz
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 2
[]
[AuxVariables]
[SERD]
order = CONSTANT
family = MONOMIAL
[]
[]
[Variables]
[strain_zz]
[]
[]
[Functions]
[rampConstantUp]
type = PiecewiseLinear
x = '0. 1.'
y = '0. 1.'
scale_factor = -100
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[master]
strain = FINITE
add_variables = true
incremental = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress strain_xx strain_yy'
planar_formulation = WEAK_PLANE_STRESS
use_automatic_differentiation = true
[]
[]
[AuxKernels]
[SERD]
type = MaterialRealAux
variable = SERD
property = strain_energy_rate_density
execute_on = timestep_end
[]
[]
[BCs]
[no_x]
type = ADDirichletBC
variable = disp_x
boundary = 'left'
value = 0.0
[]
[no_y]
type = ADDirichletBC
variable = disp_y
boundary = 'bottom'
value = 0.0
[]
[Pressure]
[top]
boundary = 'top'
function = rampConstantUp
[]
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 206800
poissons_ratio = 0.0
[]
[radial_return_stress]
type = ADComputeMultipleInelasticStress
inelastic_models = 'powerlawcrp'
[]
[powerlawcrp]
type = ADPowerLawCreepStressUpdate
coefficient = 3.125e-21 # 7.04e-17 #
n_exponent = 4.0
m_exponent = 0.0
activation_energy = 0.0
# max_inelastic_increment = 0.01
[]
[strain_energy_rate_density]
type = ADStrainEnergyRateDensity
inelastic_models = 'powerlawcrp'
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 4'
line_search = 'none'
l_max_its = 50
nl_max_its = 20
nl_abs_tol = 3e-7
nl_rel_tol = 1e-12
l_tol = 1e-2
start_time = 0.0
dt = 1
end_time = 1
num_steps = 1
[]
[Postprocessors]
[SERD]
type = ElementAverageValue
variable = SERD
[]
[]
[Outputs]
csv = true
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/multi_component_mortar_thermal_conduction.i)
## Units in the input file: m-Pa-s-K
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmax = 1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmin = 1.
xmax = 2.
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
patch_update_strategy = iteration
[]
[Variables]
[disp_x]
block = 'left_block right_block'
[]
[disp_y]
block = 'left_block right_block'
[]
[temperature]
initial_condition = 525.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[Modules]
[TensorMechanics/Master]
[steel]
strain = SMALL
add_variables = false
use_automatic_differentiation = true
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
block = 'left_block'
[]
[aluminum]
strain = SMALL
add_variables = false
use_automatic_differentiation = true
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
block = 'right_block'
[]
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
block = 'left_block'
[]
[HeatTdot_steel]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = steel_heat_capacity
density_name = steel_density
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
block = 'right_block'
[]
[HeatTdot_aluminum]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = aluminum_heat_capacity
density_name = aluminum_density
block = 'right_block'
[]
[]
[BCs]
[fixed_bottom_edge]
type = ADDirichletBC
variable = disp_y
value = 0
boundary = 'moving_block_bottom fixed_block_bottom'
[]
[fixed_outer_edge]
type = ADDirichletBC
variable = disp_x
value = 0
boundary = 'fixed_block_right'
[]
[displacement_left_block]
type = ADFunctionDirichletBC
variable = disp_x
function = 'if(t<61, 2.0e-7, -2.0e-8*(t-60))'
boundary = 'moving_block_left'
[]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 800
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 250
boundary = 'fixed_block_right'
[]
[]
[Contact]
[interface]
primary = moving_block_right
secondary = fixed_block_left
model = frictionless
formulation = mortar
correct_edge_dropping = true
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'radiation closed'
use_displaced_mesh = true
[]
[]
[Materials]
[steel_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1.93e11 #in Pa, 193 GPa, stainless steel 304
poissons_ratio = 0.29
block = 'left_block'
[]
[steel_stress]
type = ADComputeLinearElasticStress
block = 'left_block'
[]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity'
prop_values = ' 8e3 16.2 0.5' ## for stainless steel 304
block = 'left_block'
[]
[aluminum_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 6.8e10 #in Pa, 68 GPa, aluminum
poissons_ratio = 0.36
block = 'right_block'
[]
[aluminum_stress]
type = ADComputeLinearElasticStress
block = 'right_block'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity'
prop_values = ' 2.7e3 210 0.9'
block = 'right_block'
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
secondary_emissivity = 0.25
primary_emissivity = 0.6
temperature = temperature
boundary = moving_block_right
[]
[closed]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = 1.0
secondary_hardness = 1.0
boundary = moving_block_right
[]
[]
[Postprocessors]
[steel_pt_interface_temperature]
type = NodalVariableValue
nodeid = 245
variable = temperature
[]
[aluminum_pt_interface_temperature]
type = NodalVariableValue
nodeid = 657
variable = temperature
[]
[aluminum_element_interface_stress]
type = ElementalVariableValue
variable = vonmises_stress
elementid = 560
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
# mortar contact solver options
petsc_options = '-snes_converged_reason -pc_svd_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = ' lu superlu_dist'
snesmf_reuse_base = false
nl_rel_tol = 1e-10
nl_max_its = 20
l_max_its = 50
dt = 60
end_time = 120
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/action/material_output_first_lagrange_manual.i)
# This input file is designed to test adding extra stress to ADComputeLinearElasticStress
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 50
ymax = 50
[]
[AuxVariables]
[vonmises_stress]
order = FIRST
family = LAGRANGE
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Physics/SolidMechanics/QuasiStatic/All]
strain = SMALL
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_zx hydrostatic_stress'
material_output_order = 'CONSTANT CONSTANT CONSTANT CONSTANT CONSTANT CONSTANT CONSTANT'
material_output_family = 'MONOMIAL MONOMIAL MONOMIAL MONOMIAL MONOMIAL MONOMIAL MONOMIAL'
use_automatic_differentiation = true
[]
[AuxKernels]
[vonmises_stress]
type = ADRankTwoScalarAux
variable = vonmises_stress
rank_two_tensor = stress
scalar_type = VonMisesStress
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0
[]
[stress]
type = ADComputeLinearElasticStress
extra_stress_names = 'stress_one stress_two'
[]
[stress_one]
type = GenericConstantRankTwoTensor
tensor_name = stress_one
tensor_values = '0 1e3 1e3 1e3 0 1e3 1e3 1e3 0'
[]
[stress_two]
type = GenericConstantRankTwoTensor
tensor_name = stress_two
tensor_values = '1e3 0 0 0 1e3 0 0 0 1e3'
[]
[]
[BCs]
[disp_x_BC]
type = ADDirichletBC
variable = disp_x
boundary = 'bottom top'
value = 0.5
[]
[disp_x_BC2]
type = ADDirichletBC
variable = disp_x
boundary = 'left right'
value = 0.01
[]
[disp_y_BC]
type = ADDirichletBC
variable = disp_y
boundary = 'bottom top'
value = 0.8
[]
[disp_y_BC2]
type = ADDirichletBC
variable = disp_y
boundary = 'left right'
value = 0.02
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Postprocessors]
[hydrostatic]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[von_mises]
type = ElementAverageValue
variable = vonmises_stress
[]
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_y_3d.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 10
nz = 2
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 1.0
ymax = 10.0
zmax = 1.0
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = '100'
nodes = '4 10'
input = gen
[]
[corner_node_2]
type = ExtraNodesetGenerator
new_boundary = '101'
nodes = '1 67'
input = corner_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[creep_strain_xx]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xx
index_i = 0
index_j = 0
[]
[creep_strain_xy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xy
index_i = 0
index_j = 1
[]
[creep_strain_yy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yy
index_i = 1
index_j = 1
[]
[creep_strain_zz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yy
index_i = 1
index_j = 1
[]
[sigma_yy]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1.0e-11 1.0'
y = '0 -4e1 -4e1'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_yy stress_yy'
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 700
poissons_ratio = 0.0
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_creep_two"
max_iterations = 50
absolute_tolerance = 1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5 0.25 0.3866 1.6413 1.6413 1.2731"
[]
[trial_creep_two]
type = ADHillCreepStressUpdate
coefficient = 1e-16
n_exponent = 9
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 0.00003
absolute_tolerance = 1e-20
relative_tolerance = 1e-20
# Force it to not use integration error
max_integration_error = 0.000001
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = 101
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = 100
value = 0.0
[]
[pressure]
type = ADPressure
boundary = top
function = pull
variable = disp_y
component = 1
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1.0e-13
nl_abs_tol = 1.0e-13
l_max_its = 90
num_steps = 10
dt = 1.0e-4
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[creep_strain_yy]
type = ElementalVariableValue
variable = creep_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_yy]
type = ElementalVariableValue
variable = elastic_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_yy]
type = ElementalVariableValue
variable = stress_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[]
[Outputs]
csv = true
exodus = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/ad_finite_strain_jacobian/bending_jacobian.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 2
nx = 10
ny = 2
elem_type = QUAD4
[]
[corner]
type = ExtraNodesetGenerator
new_boundary = 101
coord = '0 0'
input = generated_mesh
[]
[side]
type = ExtraNodesetGenerator
new_boundary = 102
coord = '10 0'
input = corner
[]
[mid]
type = ExtraNodesetGenerator
new_boundary = 103
coord = '5 2'
input = side
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
use_finite_deform_jacobian = true
volumetric_locking_correction = false
use_automatic_differentiation = true
[]
[]
[Materials]
[stress]
type = ADComputeFiniteStrainElasticStress
[]
[elasticity_tensor]
type = ADComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '1.684e5 0.176e5 0.176e5 1.684e5 0.176e5 1.684e5 0.754e5 0.754e5 0.754e5'
[]
[]
[BCs]
[fix_corner_x]
type = ADDirichletBC
variable = disp_x
boundary = 101
value = 0
[]
[fix_corner_y]
type = ADDirichletBC
variable = disp_y
boundary = 101
value = 0
[]
[fix_y]
type = ADDirichletBC
variable = disp_y
boundary = 102
value = 0
[]
[move_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = 103
function = '-t'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-10
nl_max_its = 10
l_tol = 1e-4
l_max_its = 50
dt = 0.1
dtmin = 0.1
num_steps = 2
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/ad_smeared_cracking/cracking_rz_exponential.i)
#
# Test to exercise the exponential stress release
#
# Stress vs. strain should show a linear relationship until cracking,
# an exponential stress release, a linear relationship back to zero
# strain, a linear relationship with the original stiffness in
# compression and then back to zero strain, a linear relationship
# back to the exponential curve, and finally further exponential
# stress release.
[Mesh]
file = cracking_rz_test.e
[]
[Problem]
coord_type = RZ
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Functions]
[./disply]
type = PiecewiseLinear
x = '0 1 2 3 4 5 6'
y = '0 0.00175 0 -0.0001 0 0.00175 0.0035'
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_zx'
use_automatic_differentiation = true
[../]
[]
[BCs]
[./pully]
type = ADFunctionDirichletBC
variable = disp_y
boundary = 4
function = disply
[../]
[./bottom]
type = ADDirichletBC
variable = disp_y
boundary = 3
value = 0.0
[../]
[./sides]
type = ADDirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 186.5e9
poissons_ratio = 0.316
[../]
[./elastic_stress]
type = ADComputeSmearedCrackingStress
cracking_stress = 119.3e6
cracked_elasticity_type = FULL
softening_models = exponential_softening
[../]
[./exponential_softening]
type = ADExponentialSoftening
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
petsc_options_iname = '-ksp_gmres_restart -pc_type'
petsc_options_value = '101 lu'
line_search = 'none'
l_max_its = 100
l_tol = 1e-5
nl_max_its = 10
nl_rel_tol = 1e-8
nl_abs_tol = 1e-3
start_time = 0.0
end_time = 6.0
dt = 0.005
dtmin = 0.005
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/closed_gap_pressure_dependent_thermal_contact.i)
## Units in the input file: m-Pa-s-K
# The analytical solution for a steady state thermal contact and a mechanical
# contact pressure of 1Pa, the temperature of the steel block at the interface
# is calcaluated as
#
# T^s_{int} = \frac{T^a_{BC}C_T k_a + T^s_{BC} k_s \left(k_a +C_T \right)}{k_s (k_a + C_T) + k_a C_T}
# T^s_{int} = 460K
#
# with the boundary conditions and thermal conductivity values specified in the
# input file below. Similarly, the temperature of the aluminum block (cold block)
# is calculated as
#
# T^a_{int} = \frac{T^s_{int} C_T + T^a_{BC} k_a}{k_a + C_T}
# T^a_{int} = 276K
#
# The values predicted by the simulation at the interface converge towards these
# temperature values, and are within a few degrees by 240s. A smaller timestep
# than is practical for the regression test application further reduces the difference
# between the analytical solution and the simulation result.
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmax = 1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmin = 1
xmax = 2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[]
[Variables]
[disp_x]
block = 'left_block right_block'
[]
[disp_y]
block = 'left_block right_block'
[]
[temperature]
initial_condition = 525.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[Modules]
[TensorMechanics/Master]
[steel]
strain = SMALL
add_variables = false
use_automatic_differentiation = true
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
block = 'left_block'
[]
[aluminum]
strain = SMALL
add_variables = false
use_automatic_differentiation = true
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
block = 'right_block'
[]
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
block = 'left_block'
[]
[HeatTdot_steel]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = steel_heat_capacity
density_name = steel_density
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
block = 'right_block'
[]
[HeatTdot_aluminum]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = aluminum_heat_capacity
density_name = aluminum_density
block = 'right_block'
[]
[]
[BCs]
[fixed_bottom_edge]
type = ADDirichletBC
variable = disp_y
value = 0
boundary = 'moving_block_bottom fixed_block_bottom'
[]
[fixed_outer_edge]
type = ADDirichletBC
variable = disp_x
value = 0
boundary = 'fixed_block_right'
[]
[displacement_left_block]
type = ADDirichletBC
variable = disp_x
value = 1.8e-11
boundary = 'moving_block_left'
[]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 800
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 250
boundary = 'fixed_block_right'
[]
[]
[Contact]
[interface]
primary = moving_block_right
secondary = fixed_block_left
model = frictionless
formulation = mortar
correct_edge_dropping = true
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed'
use_displaced_mesh = true
[]
[]
[Materials]
[steel_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1.93e11 #in Pa, 193 GPa, stainless steel 304
poissons_ratio = 0.29
block = 'left_block'
[]
[steel_stress]
type = ADComputeLinearElasticStress
block = 'left_block'
[]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity'
prop_values = '8e3 16.2 0.5' ## for stainless steel 304
block = 'left_block'
[]
[aluminum_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 6.8e10 #in Pa, 68 GPa, aluminum
poissons_ratio = 0.36
block = 'right_block'
[]
[aluminum_stress]
type = ADComputeLinearElasticStress
block = 'right_block'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity'
prop_values = ' 2.7e3 210 0.9'
block = 'right_block'
[]
[]
[UserObjects]
[closed]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = 1.0
secondary_hardness = 1.0
boundary = moving_block_right
[]
[]
[Postprocessors]
[steel_pt_interface_temperature]
type = NodalVariableValue
nodeid = 245
variable = temperature
[]
[aluminum_pt_interface_temperature]
type = NodalVariableValue
nodeid = 657
variable = temperature
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
# mortar contact solver options
petsc_options = '-snes_converged_reason -pc_svd_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = ' lu superlu_dist'
snesmf_reuse_base = false
nl_rel_tol = 1e-10
nl_max_its = 20
l_max_its = 50
dt = 60
end_time = 240
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/power_law_creep/nonad_exception.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[finite]
add_variables = true
strain = FINITE
use_automatic_differentiation = true
[]
[]
[BCs]
[no_x]
type = ADDirichletBC
variable = disp_x
boundary = 'left'
value = 0.0
[]
[top]
type = ADDirichletBC
variable = disp_x
boundary = 'top'
value = 1e-4
[]
[no_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0.0
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e11
poissons_ratio = 0.3
[]
[elastic_stress]
type = ADComputeMultipleInelasticStress
inelastic_models = 'creep'
outputs = all
[]
[creep]
type = ADPowerLawCreepTest
coefficient = 10e-22
n_exponent = 2
activation_energy = 0
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
snesmf_reuse_base = false # prevents segfault on mac in dbg
line_search = none
num_steps = 2
[]
[Outputs]
[]
(python/pyhit/tests/input.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
xmax = 3
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = ADDiffusion
variable = u
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = u
boundary = left
value = 300
[]
[right]
type = ADNeumannBC
variable = u
boundary = right
value = 100
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/j_integral_vtest/c_int_surfbreak_ellip_crack_sym_mm_ad.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[Mesh]
file = c_integral_coarse.e
partitioner = centroid
centroid_partitioner_direction = z
[]
[AuxVariables]
[SED]
order = CONSTANT
family = MONOMIAL
[]
[resid_z]
[]
[]
[Functions]
[rampConstantUp]
type = PiecewiseLinear
x = '0. 0.1 100.0'
y = '0. 1 1'
scale_factor = -68.95 #MPa
[]
[dts]
type = PiecewiseLinear
x = '0 1'
y = '1 400000'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[master]
strain = FINITE
add_variables = true
incremental = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress'
use_automatic_differentiation = true
[]
[]
[AuxKernels]
[SED]
type = MaterialRealAux
variable = SED
property = strain_energy_density
execute_on = timestep_end
[]
[]
[BCs]
[crack_y]
type = ADDirichletBC
variable = disp_z
boundary = 6
value = 0.0
[]
[no_y]
type = ADDirichletBC
variable = disp_y
boundary = 12
value = 0.0
[]
[no_x]
type = ADDirichletBC
variable = disp_x
boundary = 1
value = 0.0
[]
[Pressure]
[Side1]
boundary = 5
function = rampConstantUp
[] # BCs
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 206800
poissons_ratio = 0.0
[]
[radial_return_stress]
type = ADComputeMultipleInelasticStress
inelastic_models = 'powerlawcrp'
[]
[powerlawcrp]
type = ADPowerLawCreepStressUpdate
coefficient = 3.125e-21 # 7.04e-17 #
n_exponent = 4.0
m_exponent = 0.0
activation_energy = 0.0
# max_inelastic_increment = 0.01
[]
[]
[DomainIntegral]
integrals = CIntegral
boundary = 1001
crack_direction_method = CurvedCrackFront
crack_end_direction_method = CrackDirectionVector
crack_direction_vector_end_1 = '0.0 1.0 0.0'
crack_direction_vector_end_2 = '1.0 0.0 0.0'
radius_inner = '12.5 25.0 37.5'
radius_outer = '25.0 37.5 50.0'
intersecting_boundary = '1 2'
symmetry_plane = 2
incremental = true
inelastic_models = 'powerlawcrp'
use_automatic_differentiation = true
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
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'
petsc_options_value = 'lu NONZERO'
nl_max_its = 20
nl_abs_tol = 1e-3
nl_rel_tol = 1e-11
start_time = 0.0
end_time = 401
[TimeStepper]
type = FunctionDT
function = dts
min_dt = 1.0
[]
[]
[Postprocessors]
[_dt]
type = TimestepSize
[]
[nl_its]
type = NumNonlinearIterations
[]
[lin_its]
type = NumLinearIterations
[]
[react_z]
type = NodalSum
variable = resid_z
boundary = 5
[]
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
[]
(modules/stochastic_tools/examples/parameter_study/diffusion_time.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables/T]
initial_condition = 300
[]
[Kernels]
[time]
type = ADTimeDerivative
variable = T
[]
[diff]
type = ADMatDiffusion
variable = T
diffusivity = diffusivity
[]
[source]
type = ADBodyForce
variable = T
value = 100
function = 1
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = T
boundary = left
value = 300
[]
[right]
type = ADNeumannBC
variable = T
boundary = right
value = -100
[]
[]
[Materials/constant]
type = ADGenericConstantMaterial
prop_names = 'diffusivity'
prop_values = 1
[]
[Executioner]
type = Transient
num_steps = 4
dt = 0.25
[]
[Postprocessors]
[T_avg]
type = ElementAverageValue
variable = T
execute_on = 'initial timestep_end'
[]
[q_left]
type = ADSideDiffusiveFluxAverage
variable = T
boundary = left
diffusivity = diffusivity
execute_on = 'initial timestep_end'
[]
[]
[VectorPostprocessors]
[T_vec]
type = LineValueSampler
variable = T
start_point = '0 0.5 0'
end_point = '1 0.5 0'
num_points = 11
sort_by = x
execute_on = 'initial timestep_end'
[]
[]
[Controls/stochastic]
type = SamplerReceiver
[]
[Outputs]
[]
(modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/negative_porosity.i)
# This test provides an example of an individual LPS viscoplasticity model
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmax = 0.002
ymax = 0.002
[]
[Physics/SolidMechanics/QuasiStatic/All]
strain = FINITE
add_variables = true
generate_output = 'strain_xx strain_yy strain_xy hydrostatic_stress vonmises_stress'
use_automatic_differentiation = true
[]
[Functions]
[./pull]
type = PiecewiseLinear
x = '0 0.1'
y = '0 1e-5'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.3
[../]
[./stress]
type = ADComputeMultipleInelasticStress
inelastic_models = lps
outputs = all
[../]
[./porosity]
type = ADGenericConstantMaterial
prop_names = 'porosity'
prop_values = '-0.1'
outputs = 'all'
[../]
[./lps]
type = ADViscoplasticityStressUpdate
coefficient = 'coef'
power = 3
outputs = all
relative_tolerance = 1e-11
initial_porosity = 0.1
negative_behavior = ZERO
[../]
[./coef]
type = ADParsedMaterial
property_name = coef
# Example of creep power law
expression = '1e-18 * exp(-4e4 / 1.987 / 1200)'
[../]
[]
[BCs]
[./no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./pull_disp_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = top
function = pull
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 0.01
end_time = 0.12
[]
[Postprocessors]
[./disp_x]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./disp_y]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
[../]
[./dt]
type = TimestepSize
[../]
[./num_lin]
type = NumLinearIterations
outputs = console
[../]
[./num_nonlin]
type = NumNonlinearIterations
outputs = console
[../]
[./eff_creep_strain]
type = ElementAverageValue
variable = effective_viscoplasticity
[../]
[./porosity]
type = ElementAverageValue
variable = porosity
[../]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_x_3d.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 2
nz = 2
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 10.0
ymax = 1.0
zmax = 1.0
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = '100'
nodes = '3 69'
input = gen
[]
[corner_node_2]
type = ExtraNodesetGenerator
new_boundary = '101'
nodes = '4 47'
input = corner_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[creep_strain_xx]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xx
index_i = 0
index_j = 0
[]
[creep_strain_xy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xy
index_i = 0
index_j = 1
[]
[creep_strain_yy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yy
index_i = 1
index_j = 1
[]
[sigma_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 1
index_j = 1
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1.0e-9 1.0'
y = '0 -4e1 -4e1'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_xx stress_xx'
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 700
poissons_ratio = 0.0
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_creep_two"
max_iterations = 50
absolute_tolerance = 1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5 0.25 0.3866 1.6413 1.6413 1.2731"
[]
[trial_creep_two]
type = ADHillCreepStressUpdate
coefficient = 1e-16
n_exponent = 9
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 0.00003
absolute_tolerance = 1e-20
relative_tolerance = 1e-20
# Force it to not use integration error
max_integration_error = 100.0
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = 100
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = 101
value = 0.0
[]
[Pressure]
[Side1]
boundary = right
function = pull
[]
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -mat_mffd_err'
petsc_options_value = 'lu superlu_dist 1e-5'
nl_rel_tol = 1.0e-14
nl_abs_tol = 1.0e-14
l_max_its = 10
num_steps = 10
dt = 1.0e-4
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[creep_strain_xx]
type = ElementalVariableValue
variable = creep_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_xx]
type = ElementalVariableValue
variable = elastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_xx]
type = ElementalVariableValue
variable = stress_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[]
[Outputs]
csv = true
exodus = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/ad_isotropic_elasticity_tensor/lambda_shear_modulus_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./stress_11]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = SMALL
add_variables = true
use_automatic_differentiation = true
[../]
[]
[AuxKernels]
[./stress_11]
type = ADRankTwoAux
variable = stress_11
rank_two_tensor = stress
index_j = 1
index_i = 1
[../]
[]
[BCs]
[./bottom]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0
[../]
[./left]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./back]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0
[../]
[./top]
type = ADDirichletBC
variable = disp_y
boundary = top
value = 0.001
[../]
[]
[Materials]
[./stress]
type = ADComputeLinearElasticStress
[../]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
lambda = 113636
shear_modulus = 454545
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
l_max_its = 20
nl_max_its = 10
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(modules/xfem/test/tests/bimaterials/inclusion_ad_bimaterials_2d.i)
# This test is for a matrix-inclusion composite materials using AD
# The global stress is determined by switching the stress based on level set values
# The inclusion geometry is marked by a level set function
# The matrix and inclusion are glued together
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
[../]
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 11
ny = 11
xmin = 0.0
xmax = 5.
ymin = 0.0
ymax = 5.
elem_type = QUAD4
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Functions]
[./ls_func]
type = ParsedFunction
expression = 'sqrt((y-2.5)*(y-2.5) + (x-2.5)*(x-2.5)) - 1.5'
[../]
[]
[AuxVariables]
[./a_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
strain = SMALL
use_automatic_differentiation = true
add_variables = true
generate_output = 'stress_xx stress_yy stress_xy'
[../]
[]
[AuxKernels]
[./a_strain_xx]
type = ADRankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 0
variable = a_strain_xx
[../]
[./a_strain_yy]
type = ADRankTwoAux
rank_two_tensor = A_total_strain
index_i = 1
index_j = 1
variable = a_strain_yy
[../]
[./a_strain_xy]
type = ADRankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 1
variable = a_strain_xy
[../]
[./b_strain_xx]
type = ADRankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 0
variable = b_strain_xx
[../]
[./b_strain_yy]
type = ADRankTwoAux
rank_two_tensor = B_total_strain
index_i = 1
index_j = 1
variable = b_strain_yy
[../]
[./b_strain_xy]
type = ADRankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 1
variable = b_strain_xy
[../]
[]
[Constraints]
[./dispx_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_x
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[./dispy_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_y
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[]
[BCs]
[./bottomx]
type = ADDirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = ADDirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[./topx]
type = ADFunctionDirichletBC
boundary = top
variable = disp_x
function = '0.03*t'
[../]
[./topy]
type = ADFunctionDirichletBC
boundary = top
variable = disp_y
function = '0.03*t'
[../]
[]
[Materials]
[./elasticity_tensor_A]
type = ADComputeIsotropicElasticityTensor
base_name = A
youngs_modulus = 1e9
poissons_ratio = 0.3
[../]
[./strain_A]
type = ADComputeSmallStrain
base_name = A
[../]
[./stress_A]
type = ADComputeLinearElasticStress
base_name = A
[../]
[./elasticity_tensor_B]
type = ADComputeIsotropicElasticityTensor
base_name = B
youngs_modulus = 1e5
poissons_ratio = 0.3
[../]
[./strain_B]
type = ADComputeSmallStrain
base_name = B
[../]
[./stress_B]
type = ADComputeLinearElasticStress
base_name = B
[../]
[./combined_stress]
type = ADLevelSetBiMaterialRankTwo
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = stress
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
# controls for linear iterations
l_max_its = 20
l_tol = 1e-8
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-50 #1e-7
# time control
start_time = 0.0
dt = 0.5
end_time = 1.0
num_steps = 2
max_xfem_update = 1
[]
[Outputs]
exodus = true
file_base = inclusion_bimaterials_2d_out
execute_on = timestep_end
[./console]
type = Console
output_linear = true
[../]
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_single_material.i)
## Units in the input file: m-Pa-s-K-V
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmax = 0.1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmin = 0.1
xmax = 0.2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
[]
[Variables]
[temperature]
initial_condition = 300.0
[]
[potential]
[]
[potential_interface_lm]
block = 'interface_secondary_subdomain'
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 1.0
[]
[]
[Kernels]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
extra_vector_tags = 'ref'
block = 'left_block right_block'
[]
[electric_aluminum]
type = ADMatDiffusion
variable = potential
diffusivity = aluminum_electrical_conductivity
extra_vector_tags = 'ref'
block = 'left_block right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'fixed_block_right'
[]
[electric_left]
type = ADDirichletBC
variable = potential
value = 0.0
boundary = moving_block_left
[]
[electric_right]
type = ADDirichletBC
variable = potential
value = 3.0e-1
boundary = fixed_block_right
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_temperature'
[]
[electrical_contact]
type = ModularGapConductanceConstraint
variable = potential_interface_lm
secondary_variable = potential
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_electric'
[]
[interface_heating]
type = ADInterfaceJouleHeatingConstraint
potential_lagrange_multiplier = potential_interface_lm
secondary_variable = temperature
primary_electrical_conductivity = aluminum_electrical_conductivity
secondary_electrical_conductivity = aluminum_electrical_conductivity
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
[]
[]
[Materials]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 900.0 3.7e7 1.0' #for 99% pure Al
block = 'left_block right_block interface_secondary_subdomain'
[]
[]
[UserObjects]
[closed_temperature]
type = GapFluxModelPressureDependentConduction
primary_conductivity = aluminum_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = aluminum_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[closed_electric]
type = GapFluxModelPressureDependentConduction
primary_conductivity = aluminum_electrical_conductivity
secondary_conductivity = aluminum_electrical_conductivity
temperature = potential
contact_pressure = interface_normal_lm
primary_hardness = aluminum_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[aluminum_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[aluminum_interface_potential]
type = AverageNodalVariableValue
variable = potential
block = interface_secondary_subdomain
[]
[interface_electrical_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = fixed_block_left
diffusivity = aluminum_electrical_conductivity
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-6
nl_max_its = 50
nl_forced_its = 1
[]
[Outputs]
csv = true
perf_graph = true
[]
(tutorials/tutorial01_app_development/step08_test_harness/test/tests/kernels/darcy_pressure/darcy_pressure_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[pressure]
[]
[]
[Kernels]
[diffusion]
type = DarcyPressure
variable = pressure
permeability = 0.8451e-09
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = pressure
boundary = left
value = 0
[]
[right]
type = ADDirichletBC
variable = pressure
boundary = right
value = 1
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/rom_stress_update/AD3d.i)
p = 1e5
E = 3.3e11
stress_unit = 'Pa'
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[temperature]
initial_condition = 900.0
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
generate_output = 'vonmises_stress'
use_automatic_differentiation = true
[]
[]
[BCs]
[symmy]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[symmx]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0
[]
[symmz]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0
[]
[pressure_x]
type = ADPressure
variable = disp_x
boundary = right
factor = ${p}
[]
[pressure_y]
type = ADPressure
variable = disp_y
boundary = top
factor = -${p}
[]
[pressure_z]
type = ADPressure
variable = disp_z
boundary = front
factor = -${p}
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = ${E}
poissons_ratio = 0.3
[]
[stress]
type = ADComputeMultipleInelasticStress
inelastic_models = rom_stress_prediction
[]
[rom_stress_prediction]
type = ADSS316HLAROMANCEStressUpdateTest
temperature = temperature
initial_cell_dislocation_density = 6.0e12
initial_wall_dislocation_density = 4.4e11
outputs = all
stress_unit = ${stress_unit}
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
nl_abs_tol = 1e-12
automatic_scaling = true
compute_scaling_once = false
num_steps = 5
[]
[Postprocessors]
[effective_strain_avg]
type = ElementAverageValue
variable = effective_creep_strain
[]
[temperature]
type = ElementAverageValue
variable = temperature
[]
[cell_dislocations]
type = ElementAverageValue
variable = cell_dislocations
[]
[wall_disloactions]
type = ElementAverageValue
variable = wall_dislocations
[]
[]
[Outputs]
csv = true
[]
(modules/combined/test/tests/ad_cavity_pressure/negative_volume.i)
#
# Cavity Pressure Test
#
# This test is designed to compute a negative number of moles
# to trigger an error check in the CavityPressureUserObject.
# The negative number of moles is achieved by supplying an
# open volume to the InternalVolume postprocessor, which
# calculates a negative volume.
[Problem]
coord_type = RZ
[]
[GlobalParams]
displacements = 'disp_r disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 2
[]
[Functions]
[temperature]
type = PiecewiseLinear
x = '0 1'
y = '1 2'
scale_factor = 100
[]
[]
[Variables]
[temperature]
initial_condition = 100
[]
[]
[Modules/TensorMechanics/Master]
[block]
strain = FINITE
add_variables = true
use_automatic_differentiation = true
[]
[]
[Kernels]
[heat]
type = Diffusion
variable = temperature
use_displaced_mesh = true
[]
[]
[BCs]
[no_x]
type = ADDirichletBC
variable = disp_r
boundary = left
value = 0.0
[]
[no_y]
type = ADDirichletBC
variable = disp_z
boundary = bottom
value = 0.0
[]
[temperatureInterior]
type = ADFunctionDirichletBC
boundary = 2
function = temperature
variable = temperature
[]
[CavityPressure]
[pressure]
boundary = 'top bottom right'
initial_pressure = 10e5
R = 8.3143
output_initial_moles = initial_moles
temperature = aveTempInterior
volume = internalVolume
startup_time = 0.5
output = ppress
use_automatic_differentiation = true
[]
[]
[]
[Materials]
[elastic_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stress1]
type = ADComputeFiniteStrainElasticStress
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
nl_abs_tol = 1e-10
l_max_its = 20
dt = 0.5
end_time = 1.0
use_pre_SMO_residual = true
[]
[Postprocessors]
[internalVolume]
type = InternalVolume
boundary = 'top bottom right'
execute_on = 'initial linear'
[]
[aveTempInterior]
type = AxisymmetricCenterlineAverageValue
boundary = left
variable = temperature
execute_on = 'initial linear'
[]
[]
[Outputs]
exodus = false
[]
(test/tests/fvkernels/fv_simple_diffusion/neumann.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[v]
family = MONOMIAL
order = CONSTANT
fv = true
[]
[]
[Kernels]
[diff]
type = ADDiffusion
variable = u
[]
[]
[FVKernels]
[diff]
type = FVDiffusion
variable = v
coeff = coeff
[]
[]
[FVBCs]
[left]
type = FVNeumannBC
variable = v
boundary = left
value = 5
[]
[right]
type = FVDirichletBC
variable = v
boundary = right
value = 42
[]
[]
[Materials]
[diff]
type = ADGenericFunctorMaterial
prop_names = 'coeff'
prop_values = '1'
[]
[]
[BCs]
[left]
type = ADNeumannBC
variable = u
boundary = left
value = 5
[]
[right]
type = ADDirichletBC
variable = u
boundary = right
value = 42
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/3d-mortar-projection-tolerancing/test.i)
stress_free_temperature = 300
thermal_expansion_coeff = 6.66e-6
[Problem]
type = FEProblem
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
temperature = T_K
[]
[Mesh]
patch_update_strategy = iteration
use_displaced_mesh = true
patch_size = 40
[ori]
type = FileMeshGenerator
file = 'test.msh'
[]
[]
[Variables]
[disp_x]
block = 'pellet_inner pellet_outer'
[]
[disp_y]
block = 'pellet_inner pellet_outer'
[]
[disp_z]
block = 'pellet_inner pellet_outer'
[]
[T_K]
[InitialCondition]
type = ConstantIC
value = 300.0
[]
[]
[lm_pellet]
block = 'pellet_secondary_subdomain'
[]
[]
[Kernels]
[solid_x]
type = ADStressDivergenceTensors
variable = disp_x
component = 0
block = 'pellet_inner pellet_outer'
use_displaced_mesh = false
[]
[solid_y]
type = ADStressDivergenceTensors
variable = disp_y
component = 1
block = 'pellet_inner pellet_outer'
use_displaced_mesh = false
[]
[solid_z]
type = ADStressDivergenceTensors
variable = disp_z
component = 2
block = 'pellet_inner pellet_outer'
use_displaced_mesh = false
[]
[timeder]
type = ADHeatConductionTimeDerivative
variable = 'T_K'
density_name = density
specific_heat = specific_heat
block = 'pellet_inner pellet_outer'
use_displaced_mesh = true
[]
[diff]
type = ADHeatConduction
variable = 'T_K'
thermal_conductivity = thermal_conductivity
block = 'pellet_inner pellet_outer'
use_displaced_mesh = true
[]
[heatsource]
type = ADMatHeatSource
variable = 'T_K'
material_property = radial_source
block = 'pellet_inner pellet_outer'
use_displaced_mesh = true
[]
[]
[Debug]
show_var_residual_norms = TRUE
[]
[BCs]
[mirror_z]
type = ADDirichletBC
variable = disp_z
boundary = 'mirror_innerp mirror_outerp'
value = 0
[]
[mirror_x]
type = ADDirichletBC
variable = disp_x
boundary = 'mirror_innerp mirror_outerp'
value = 0
[]
[mirror_y]
type = ADDirichletBC
variable = disp_y
boundary = 'mirror_innerp mirror_outerp'
value = 0
[]
[]
[Materials]
[pellet_properties]
type = ADGenericConstantMaterial
prop_names = 'density thermal_conductivity specific_heat'
prop_values = '3.3112e3 34 1.2217e3'
block = 'pellet_inner pellet_outer'
[]
[pulse_shape_linear]
type = ADGenericFunctionMaterial
prop_values = '5e10*max(11455*(t)/7,1e-9)'
prop_names = 'radial_source'
output_properties = 'radial_source'
block = 'pellet_inner pellet_outer'
use_displaced_mesh = false
[]
[strain]
type = ADComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
eigenstrain_names = eigenstrain #nameS!
block = 'pellet_inner pellet_outer'
[]
[thermal_strain]
type = ADComputeThermalExpansionEigenstrain
stress_free_temperature = ${stress_free_temperature}
thermal_expansion_coeff = ${thermal_expansion_coeff}
eigenstrain_name = eigenstrain
block = 'pellet_inner pellet_outer'
[]
[elasticity]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 3.306e11
poissons_ratio = 0.329
[]
[stress]
type = ADComputeLinearElasticStress
block = 'pellet_inner pellet_outer'
[]
[]
[Contact]
[pellet]
primary = void_pellet_0
secondary = void_pellet_1
model = frictionless
formulation = mortar
c_normal = 1e6
correct_edge_dropping = true
[]
[]
[UserObjects]
[conduction]
type = GapFluxModelConduction
temperature = T_K
boundary = 'void_pellet_0 void_pellet_1'
gap_conductivity = 0.4
use_displaced_mesh = true
[]
[rad_pellet]
type = GapFluxModelRadiation
temperature = T_K
boundary = void_pellet_0
primary_emissivity = 0.37
secondary_emissivity = 0.37
use_displaced_mesh = true
[]
[]
[Constraints]
[gap_pellet]
type = ModularGapConductanceConstraint
variable = lm_pellet
secondary_variable = T_K
primary_boundary = 'void_pellet_0'
primary_subdomain = pellet_primary_subdomain
secondary_boundary = 'void_pellet_1'
secondary_subdomain = pellet_secondary_subdomain
gap_flux_models = 'conduction rad_pellet' #closed_pellet
gap_geometry_type = 'CYLINDER'
cylinder_axis_point_1 = '0 0 0'
cylinder_axis_point_2 = '0 0 1'
use_displaced_mesh = true
quadrature = SECOND
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -pc_factor_shift_type'
petsc_options_value = 'lu superlu_dist NONZERO'
automatic_scaling = true
line_search = none
ignore_variables_for_autoscaling = 'pellet_normal_lm'
compute_scaling_once = true
scaling_group_variables = 'disp_x disp_y disp_z; T_K'
nl_rel_tol = 1e-50
nl_abs_tol = 1e-8
nl_max_its = 20
dtmin = 1e-3
dt = 1e-3
start_time = 0e-3
end_time = 1
[]
[Outputs]
[exodus]
type = Exodus
file_base = constMat
[]
print_linear_residuals = false
[]
(modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/lps_single_split.i)
# This test provides an example of combining two LPS viscoplasticity model.
# The answer should be close, but not exactly the same, as lps_single.i
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmax = 0.002
ymax = 0.002
[]
[Physics/SolidMechanics/QuasiStatic/All]
strain = FINITE
add_variables = true
generate_output = 'strain_xx strain_yy strain_xy hydrostatic_stress vonmises_stress'
use_automatic_differentiation = true
[]
[Functions]
[./pull]
type = PiecewiseLinear
x = '0 0.1'
y = '0 1e-5'
[../]
[./tot_effective_viscoplasticity]
type = ParsedFunction
symbol_values = 'lps_1_eff_creep_strain lps_2_eff_creep_strain'
symbol_names = 'lps_1_eff_creep_strain lps_2_eff_creep_strain'
expression = 'lps_1_eff_creep_strain+lps_2_eff_creep_strain'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.3
[../]
[./stress]
type = ADComputeMultipleInelasticStress
inelastic_models = 'one two'
outputs = all
[../]
[./porosity]
type = ADPorosityFromStrain
initial_porosity = 0.1
inelastic_strain = 'combined_inelastic_strain'
outputs = 'all'
[../]
[./one]
type = ADViscoplasticityStressUpdate
coefficient = 'coef'
power = 3
base_name = 'lps_first'
outputs = all
relative_tolerance = 1e-11
[../]
[./two]
type = ADViscoplasticityStressUpdate
coefficient = 'coef'
power = 3
base_name = 'lps_second'
outputs = all
relative_tolerance = 1e-11
[../]
[./coef]
type = ADParsedMaterial
property_name = coef
# Example of creep power law
expression = '0.5e-18 * exp(-4e4 / 1.987 / 1200)'
[../]
[]
[BCs]
[./no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./pull_disp_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = top
function = pull
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 0.01
end_time = 0.12
[]
[Postprocessors]
[./disp_x]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./disp_y]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
[../]
[./dt]
type = TimestepSize
[../]
[./num_lin]
type = NumLinearIterations
outputs = console
[../]
[./num_nonlin]
type = NumNonlinearIterations
outputs = console
[../]
[./lps_1_eff_creep_strain]
type = ElementAverageValue
variable = lps_first_effective_viscoplasticity
outputs = none
[../]
[./lps_2_eff_creep_strain]
type = ElementAverageValue
variable = lps_second_effective_viscoplasticity
outputs = none
[../]
[./eff_creep_strain_tot]
type = FunctionValuePostprocessor
function = tot_effective_viscoplasticity
[../]
[./porosity]
type = ElementAverageValue
variable = porosity
[../]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_temperature_coefficients_function_variation.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 2
nz = 2
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 10.0
ymax = 1.0
zmax = 1.0
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = '100'
nodes = '3 69'
input = gen
[]
[corner_node_2]
type = ExtraNodesetGenerator
new_boundary = '101'
nodes = '4 47'
input = corner_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[temperature]
order = CONSTANT
family = MONOMIAL
[]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xz]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yz]
order = CONSTANT
family = MONOMIAL
[]
[hill_constants_f]
order = CONSTANT
family = MONOMIAL
[]
[hill_constants_g]
order = CONSTANT
family = MONOMIAL
[]
[hill_constants_h]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[temperature]
type = FunctionAux
variable = temperature
function = time_temperature
[]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[creep_strain_xx]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xx
index_i = 0
index_j = 0
[]
[creep_strain_xy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xy
index_i = 0
index_j = 1
[]
[creep_strain_yy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yy
index_i = 1
index_j = 1
[]
[creep_strain_zz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_zz
index_i = 2
index_j = 2
[]
[creep_strain_xz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xz
index_i = 0
index_j = 2
[]
[creep_strain_yz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yz
index_i = 1
index_j = 2
[]
[sigma_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 1
index_j = 1
[]
[hill_constant_f]
type = MaterialStdVectorAux
property = hill_constants
variable = hill_constants_f
index = 0
[]
[hill_constant_g]
type = MaterialStdVectorAux
property = hill_constants
variable = hill_constants_g
index = 1
[]
[hill_constant_h]
type = MaterialStdVectorAux
property = hill_constants
variable = hill_constants_h
index = 2
[]
[]
[ICs]
[temp]
type = ConstantIC
variable = temperature
value = 50.0
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1.0e-9 1.0'
y = '0 -4e1 -4e1'
[]
[F]
type = PiecewiseLinear
x = '50 200'
y = '0.2 0.5'
[]
[G]
type = PiecewiseLinear
x = '50 200'
y = '0.9 0.6'
[]
[H]
type = PiecewiseLinear
x = '50 200'
y = '0.5 0.3'
[]
[L]
type = PiecewiseLinear
x = '50 200'
y = '1.5 1.5'
[]
[M]
type = PiecewiseLinear
x = '50 200'
y = '1.5 1.5'
[]
[N]
type = PiecewiseLinear
x = '50 200'
y = '1.5 1.5'
[]
[time_temperature]
type = PiecewiseLinear
x = '0 1.0e-2'
y = '50 200'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_xx stress_xx'
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 700
poissons_ratio = 0.0
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = 'trial_creep_aniso_iso'
max_iterations = 50
[]
[hill_constants]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5 0.5 0.5 1.5 1.5 1.5"
function_names = 'F G H L M N'
temperature = temperature
[]
[trial_creep_aniso_iso]
type = ADHillCreepStressUpdate
coefficient = 1e-16
n_exponent = 9
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 0.00003
relative_tolerance = 1e-20
absolute_tolerance = 1e-20
internal_solve_output_on = never
# Force it to not use integration error
max_integration_error = 1.0
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = 100
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = 101
value = 0.0
[]
[Pressure]
[Side1]
boundary = right
function = pull
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-13
nl_abs_tol = 1.0e-14
l_max_its = 90
num_steps = 20
dt = 5.0e-4
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[creep_strain_xx]
type = ElementalVariableValue
variable = creep_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_yy]
type = ElementalVariableValue
variable = creep_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_zz]
type = ElementalVariableValue
variable = creep_strain_zz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_xy]
type = ElementalVariableValue
variable = creep_strain_xy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_yz]
type = ElementalVariableValue
variable = creep_strain_yz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_xz]
type = ElementalVariableValue
variable = creep_strain_xz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_xx]
type = ElementalVariableValue
variable = elastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_xx]
type = ElementalVariableValue
variable = stress_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[]
[Outputs]
csv = true
exodus = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/volumetric_eigenstrain/ad_volumetric_eigenstrain.i)
# This tests the ability of the ADComputeVolumetricEigenstrain material
# to compute an eigenstrain tensor that results in a solution that exactly
# recovers the specified volumetric expansion.
# This model applies volumetric strain that ramps from 0 to 2 to a unit cube
# and computes the final volume, which should be exactly 3. Note that the default
# TaylorExpansion option for decomposition_method gives a small (~4%) error
# with this very large incremental strain, but decomposition_method=EigenSolution
# gives the exact solution.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[AuxVariables]
[volumetric_strain]
order = CONSTANT
family = MONOMIAL
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[master]
strain = FINITE
eigenstrain_names = eigenstrain
decomposition_method = EigenSolution #Necessary for exact solution
use_automatic_differentiation = true
[]
[]
[AuxKernels]
[volumetric_strain]
type = ADRankTwoScalarAux
scalar_type = VolumetricStrain
rank_two_tensor = total_strain
variable = volumetric_strain
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[bottom]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[back]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[finite_strain_stress]
type = ADComputeFiniteStrainElasticStress
[]
[volumetric_eigenstrain]
type = ADComputeVolumetricEigenstrain
volumetric_materials = volumetric_change
eigenstrain_name = eigenstrain
[]
[volumetric_change]
type = ADGenericFunctionMaterial
prop_names = volumetric_change
prop_values = t
[]
[]
[Postprocessors]
[vol]
type = VolumePostprocessor
use_displaced_mesh = true
execute_on = 'initial timestep_end'
[]
[volumetric_strain]
type = ElementalVariableValue
variable = volumetric_strain
elementid = 0
[]
[disp_right]
type = NodalExtremeValue
variable = disp_x
boundary = right
[]
[]
[Executioner]
type = Transient
end_time = 2
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/anisotropic_elastoplasticity/hoop_strain_comparison_coarse_xaxis.i)
# This test compares the hoop strain at two different elements in an internally
# pressurized cylinder with anisotropic plasticity: different yield condition
# for hoop and axial directions. The elements are located circumferentially
# apart but at same axial position. It is expected that due to pressurization
# hoop strains will develop with uniform magnitude along hoop direction. The
# test verifies that the plastic hoop strain is uniform in hoop direction.
# For 3D simulations with material properties oriented along the curved
# geometry such as cylinder or sphere, the stresses and strains are rotated to
# the local coordinate system from the global coordinate system. The plastic
# strain is calculated in the local coordinate system and then transformed to
# the global coordinate system. This test involves a 3D cylindrical geometry,
# and helps in indirectly verifying that this transformation of stresses and
# strains back and forth between the local and global coordinate system is
# correctly implemented.
[Mesh]
file = quarter_cylinder_coarse_xaxis.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[plasticity_strain_xx]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xx
index_i = 0
index_j = 0
[]
[plasticity_strain_xy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_xy
index_i = 0
index_j = 1
[]
[plasticity_strain_yy]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_yy
index_i = 1
index_j = 1
[]
[plasticity_strain_zz]
type = ADRankTwoAux
rank_two_tensor = plastic_strain
variable = plastic_strain_zz
index_i = 2
index_j = 2
[]
[stress_zz]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[]
[stress_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[]
[stress_yy]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[]
[Functions]
[push]
type = PiecewiseLinear
x = '0 1e2'
y = '0 200e6'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_zz elastic_strain_xx elastic_strain_yy stress_xx stress_yy stress_zz strain_zz plastic_strain_zz plastic_strain_xx plastic_strain_yy hoop_stress hoop_strain'
use_automatic_differentiation = true
add_variables = true
cylindrical_axis_point1 = '0 0 0'
cylindrical_axis_point2 = '1 0 0'
[]
[]
[Constraints]
[mid_section_plane]
type = EqualValueBoundaryConstraint
variable = disp_x
secondary = top # boundary
penalty = 1.0e+10
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 200.0e9
poissons_ratio = 0.2
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "plasticity"
max_iterations = 50
absolute_tolerance = 1e-30 #1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
# hill_constants = "0.5 0.5 0.5 1.5 1.5 1.5"
hill_constants = "0.25 0.5 0.5 1.5 1.5 1.5"
[]
[plasticity]
type = ADHillElastoPlasticityStressUpdate
hardening_constant = 1.5e10
hardening_exponent = 1.0
yield_stress = 0.0 # 60e6
local_cylindrical_csys = true
axis = x
absolute_tolerance = 1e-15 # 1e-8
relative_tolerance = 1e-13 # 1e-15
internal_solve_full_iteration_history = true
max_inelastic_increment = 2.0e-6
internal_solve_output_on = on_error
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = bottom
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = z_face
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = y_face
value = 0.0
[]
[Pressure]
[Side1]
boundary = inner
function = push
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-14
# nl_abs_tol = 1e-10
l_max_its = 90
nl_max_its = 30
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 30
iteration_window = 9
growth_factor = 1.05
cutback_factor = 0.5
timestep_limiting_postprocessor = matl_ts_min
dt = 0.1e-4
time_t = '0 6.23 10'
time_dt = '0.1 1.0e-2 1.0e-2'
[]
num_steps = 1
start_time = 0
end_time = 200.0
automatic_scaling = true
dtmax = 0.1e-4
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[hoop_strain_elementA]
type = ElementalVariableValue
elementid = 10
variable = hoop_strain
[]
[hoop_strain_elementB]
type = ElementalVariableValue
elementid = 4
variable = hoop_strain
[]
[hoop_strain_diff]
type = DifferencePostprocessor
value1 = hoop_strain_elementA
value2 = hoop_strain_elementB
[]
[]
[Outputs]
csv = true
exodus = false
perf_graph = true
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_dual_material.i)
## Units in the input file: m-Pa-s-K-V
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmax = 0.1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmin = 0.1
xmax = 0.2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
[]
[Variables]
[temperature]
initial_condition = 300.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[potential]
[]
[potential_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 1.0
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
extra_vector_tags = 'ref'
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
extra_vector_tags = 'ref'
block = 'right_block'
[]
[electric_steel]
type = ADMatDiffusion
variable = potential
diffusivity = steel_electrical_conductivity
extra_vector_tags = 'ref'
block = 'left_block'
[]
[electric_aluminum]
type = ADMatDiffusion
variable = potential
diffusivity = aluminum_electrical_conductivity
extra_vector_tags = 'ref'
block = 'right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'fixed_block_right'
[]
[electric_left]
type = ADDirichletBC
variable = potential
value = 0.0
boundary = moving_block_left
[]
[electric_right]
type = ADDirichletBC
variable = potential
value = 3.0e-1
boundary = fixed_block_right
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_temperature'
[]
[electrical_contact]
type = ModularGapConductanceConstraint
variable = potential_interface_lm
secondary_variable = potential
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_electric'
[]
[interface_heating]
type = ADInterfaceJouleHeatingConstraint
potential_lagrange_multiplier = potential_interface_lm
secondary_variable = temperature
primary_electrical_conductivity = steel_electrical_conductivity
secondary_electrical_conductivity = aluminum_electrical_conductivity
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
[]
[]
[Materials]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity steel_electrical_conductivity steel_hardness'
prop_values = '8e3 16.2 500.0 1.39e6 1.0' ## for stainless steel 304
block = 'left_block interface_secondary_subdomain'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 900.0 3.7e7 1.0' #for 99% pure Al
block = 'left_block right_block interface_secondary_subdomain'
[]
[]
[UserObjects]
[closed_temperature]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[closed_electric]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_electrical_conductivity
secondary_conductivity = aluminum_electrical_conductivity
temperature = potential
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[steel_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_primary_subdomain
[]
[aluminum_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[interface_electrical_flux]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = fixed_block_left
diffusivity = aluminum_electrical_conductivity
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-6
nl_max_its = 100
nl_forced_its = 1
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/heat_transfer/test/tests/function_ellipsoid_heat_source/function_heat_source.i)
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -5.0
xmax = 5.0
nx = 10
ymin = -5.0
ymax = 5.0
ny = 10
zmin = 0.0
zmax = 1.0
nz = 1
[]
[Variables]
[./temp]
initial_condition = 300
[../]
[]
[Kernels]
[./time]
type = ADHeatConductionTimeDerivative
variable = temp
[../]
[./heat_conduct]
type = ADHeatConduction
variable = temp
thermal_conductivity = thermal_conductivity
[../]
[./heat_source]
type = ADMatHeatSource
material_property = volumetric_heat
variable = temp
[../]
[]
[BCs]
[./temp_bottom_fix]
type = ADDirichletBC
variable = temp
boundary = 1
value = 300
[../]
[]
[Materials]
[./heat]
type = ADHeatConductionMaterial
specific_heat = 603
thermal_conductivity = 10e-2
[../]
[./density]
type = ADGenericConstantMaterial
prop_names = 'density'
prop_values = '4.43e-6'
[../]
[./volumetric_heat]
type = FunctionPathEllipsoidHeatSource
rx = 1
ry = 1
rz = 1
power = 1000
efficiency = 0.5
factor = 2
function_x= path_x
function_y= path_y
function_z= path_z
[../]
[]
[Functions]
[./path_x]
type = ParsedFunction
expression = 2*cos(2.0*pi*t)
[../]
[./path_y]
type = ParsedFunction
expression = 2*sin(2.0*pi*t)
[../]
[./path_z]
type = ParsedFunction
expression = 1.0
[../]
[]
[Postprocessors]
[temp_max]
type = ElementExtremeValue
variable = temp
[]
[temp_min]
type = ElementExtremeValue
variable = temp
value_type = min
[]
[temp_avg]
type = ElementAverageValue
variable = temp
[]
[]
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'preonly lu superlu_dist'
l_max_its = 100
end_time = 1
dt = 0.1
dtmin = 1e-4
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/t_stress/ad_t_stress_ellip_crack_3d.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[Mesh]
file = ellip_crack_4sym_norad_mm.e
displacements = 'disp_x disp_y disp_z'
partitioner = centroid
centroid_partitioner_direction = z
[]
[AuxVariables]
[SED]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[rampConstantUp]
type = PiecewiseLinear
x = '0. 1.'
y = '0. 1.'
scale_factor = -689.5 #MPa
[]
[]
[DomainIntegral]
integrals = 'JIntegral InteractionIntegralKI InteractionIntegralT'
boundary = 1001
crack_direction_method = CurvedCrackFront
crack_end_direction_method = CrackDirectionVector
crack_direction_vector_end_1 = '0.0 1.0 0.0'
crack_direction_vector_end_2 = '1.0 0.0 0.0'
radius_inner = '12.5 25.0 37.5'
radius_outer = '25.0 37.5 50.0'
intersecting_boundary = '1 2'
symmetry_plane = 2
youngs_modulus = 206.8e+3 #MPa
poissons_ratio = 0.3
block = 1
incremental = true
use_automatic_differentiation = true
[]
[Physics/SolidMechanics/QuasiStatic]
[master]
strain = FINITE
add_variables = true
incremental = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress strain_xx strain_yy strain_zz'
use_automatic_differentiation = true
[]
[]
[AuxKernels]
[SED]
type = MaterialRealAux
variable = SED
property = strain_energy_density
execute_on = timestep_end
[]
[]
[BCs]
[crack_y]
type = ADDirichletBC
variable = disp_z
boundary = 6
value = 0.0
[]
[no_y]
type = ADDirichletBC
variable = disp_y
boundary = 12
value = 0.0
[]
[no_x]
type = ADDirichletBC
variable = disp_x
boundary = 1
value = 0.0
[]
[Pressure]
[Side1]
boundary = 5
function = rampConstantUp
use_automatic_differentiation = true
[]
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 206.8e+3
poissons_ratio = 0.3
[]
[elastic_stress]
type = ADComputeFiniteStrainElasticStress
[]
[]
[Executioner]
type = Transient
#petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 4'
line_search = 'none'
l_max_its = 50
nl_max_its = 20
nl_abs_tol = 1e-5
nl_rel_tol = 1e-11
l_tol = 1e-2
start_time = 0.0
dt = 1
end_time = 1
num_steps = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = ad_t_stress_ellip_crack_out
csv = true
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/finite_action.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
strain = FINITE
[]
[]
[Kernels]
[hc]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e6
[]
[]
[MortarGapHeatTransfer]
[mortar_heat_transfer]
temperature = temp
use_displaced_mesh = true
gap_flux_options = conduction
gap_conductivity = 1
boundary = plank_right
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
thermal_lm_scaling = 1e-7
gap_geometry_type = PLATE
[]
[]
[BCs]
[left_temp]
type = ADDirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = ADDirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[left_x]
type = ADDirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = ADDirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[heat_plank]
type = ADHeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = ADHeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact avg_temp'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/solid_mechanics/test/tests/power_law_creep/ad_power_law_creep.i)
# 1x1x1 unit cube with uniform pressure on top face
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
[]
[Variables]
[temp]
initial_condition = 1000.0
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
incremental = true
add_variables = true
generate_output = 'stress_yy creep_strain_xx creep_strain_yy creep_strain_zz elastic_strain_yy'
use_automatic_differentiation = true
[]
[]
[Kernels]
[heat]
type = Diffusion
variable = temp
[]
[heat_ie]
type = TimeDerivative
variable = temp
[]
[]
[BCs]
[u_top_pull]
type = ADPressure
variable = disp_y
boundary = top
factor = -10.0e6
[]
[u_bottom_fix]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[u_yz_fix]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[u_xy_fix]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
[temp_fix]
type = DirichletBC
variable = temp
boundary = 'bottom top'
value = 1000.0
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 2e11
poissons_ratio = 0.3
constant_on = SUBDOMAIN
[]
[radial_return_stress]
type = ADComputeMultipleInelasticStress
inelastic_models = 'power_law_creep'
[]
[power_law_creep]
type = ADPowerLawCreepStressUpdate
coefficient = 1.0e-15
n_exponent = 4
activation_energy = 3.0e5
temperature = temp
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
l_max_its = 20
nl_max_its = 20
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
l_tol = 1e-5
start_time = 0.0
end_time = 1.0
num_steps = 10
dt = 0.1
[]
[Outputs]
exodus = true
[]
(test/tests/kernels/ad_reaction/ad_reaction.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
[]
[Variables]
[u]
[]
[]
[Kernels]
[diffusion]
type = ADDiffusion
variable = u
[]
[reaction]
type = ADReaction
variable = u
[]
[force]
type = ADBodyForce
variable = u
[]
[]
[BCs]
[left]
type = ADDirichletBC
boundary = left
variable = u
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/finite_strain_elastic_anisotropy/3d_bar_orthotropic_90deg_rotation_ad.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 2
ymin = 0
ymax = 10
zmin = 0
zmax = 2
nx = 1
ny = 1
nz = 1
elem_type = HEX8
[]
[corner]
type = ExtraNodesetGenerator
new_boundary = 101
coord = '0 0 0'
input = generated_mesh
[]
[side]
type = ExtraNodesetGenerator
new_boundary = 102
coord = '2 0 0'
input = corner
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
use_finite_deform_jacobian = true
volumetric_locking_correction = false
use_automatic_differentiation = true
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_xz'
[]
[]
[Materials]
[stress]
type = ADComputeFiniteStrainElasticStress
[]
[elasticity_tensor]
type = ADComputeElasticityTensor
fill_method = orthotropic
C_ijkl = '2.0e3 2.0e5 2.0e3 0.71428571e3 0.71428571e3 0.71428571e3 0.4 0.2 0.004 0.004 0.2 0.4'
[]
[]
[BCs]
[fix_z]
type = ADDirichletBC
variable = disp_z
boundary = bottom
value = 0
[]
[rot_y]
type = DisplacementAboutAxis
boundary = bottom
function = t
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 1
variable = disp_y
[]
#
[rot_x]
type = DisplacementAboutAxis
boundary = bottom
function = t
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 0
variable = disp_x
[]
[rot_y90]
type = DisplacementAboutAxis
boundary = bottom
function = 90
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 1
variable = disp_y
[]
#
[rot_x90]
type = DisplacementAboutAxis
boundary = bottom
function = 90
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 0
variable = disp_x
[]
[press]
boundary = top
function = '-1.0*(t-90)*10.0'
use_displaced_mesh = true
displacements = 'disp_x disp_y disp_z'
type = Pressure
variable = disp_x
[]
[]
[Controls]
[c1]
type = TimePeriod
enable_objects = 'BCs::rot_x BCs::rot_y'
disable_objects = 'BCs::rot_x90 BCs::rot_y90 BCs::press'
start_time = '0'
end_time = '90'
[]
[c190plus]
type = TimePeriod
enable_objects = 'BCs::rot_x90 BCs::rot_y90 BCs::press'
disable_objects = 'BCs::rot_x BCs::rot_y '
start_time = '90'
end_time = '390'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-08
nl_max_its = 50
l_tol = 1e-4
l_max_its = 50
start_time = 0.0
dt = 5
dtmin = 5
num_steps = 78
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(modules/stochastic_tools/examples/sobol/diffusion.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables/T]
initial_condition = 300
[]
[Kernels]
[time]
type = ADTimeDerivative
variable = T
[]
[diff]
type = ADMatDiffusion
variable = T
diffusivity = diffusivity
[]
[source]
type = ADBodyForce
variable = T
value = 100
function = 1
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = T
boundary = left
value = 300
[]
[right]
type = ADNeumannBC
variable = T
boundary = right
value = -100
[]
[]
[Materials/constant]
type = ADGenericConstantMaterial
prop_names = 'diffusivity'
prop_values = 1
[]
[Executioner]
type = Transient
solve_type = NEWTON
num_steps = 4
dt = 0.25
[]
[Postprocessors]
[T_avg]
type = ElementAverageValue
variable = T
execute_on = 'initial timestep_end'
[]
[q_left]
type = ADSideDiffusiveFluxAverage
variable = T
boundary = left
diffusivity = diffusivity
execute_on = 'initial timestep_end'
[]
[]
[Controls/stochastic]
type = SamplerReceiver
[]
[Outputs]
[]
(modules/xfem/test/tests/moving_interface/moving_ad_bimaterial.i)
# This test is for two layer materials with different youngs modulus with AD
# The global stress is determined by switching the stress based on level set values
# The material interface is marked by a level set function
# The two layer materials are glued together
# This case is also meant to test for a bug in moving interfaces on displaced meshes
# It should fail during the healing step of the 2nd timestep if the bug is present.
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Mesh]
displacements = 'disp_x disp_y'
[generated_mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmin = 0.0
xmax = 5.
ymin = 0.0
ymax = 5.
elem_type = QUAD4
[]
[./left_bottom]
type = ExtraNodesetGenerator
new_boundary = 'left_bottom'
coord = '0.0 0.0'
input = generated_mesh
[../]
[./left_top]
type = ExtraNodesetGenerator
new_boundary = 'left_top'
coord = '0.0 5.'
input = left_bottom
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Functions]
[./ls_func]
type = ParsedFunction
expression = 'y-3.153 + t'
[../]
[]
[AuxVariables]
[./a_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
strain = SMALL
use_automatic_differentiation = true
add_variables = true
generate_output = 'stress_xx stress_yy stress_xy'
[../]
[]
[AuxKernels]
[./a_strain_xx]
type = ADRankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 0
variable = a_strain_xx
[../]
[./a_strain_yy]
type = ADRankTwoAux
rank_two_tensor = A_total_strain
index_i = 1
index_j = 1
variable = a_strain_yy
[../]
[./a_strain_xy]
type = ADRankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 1
variable = a_strain_xy
[../]
[./b_strain_xx]
type = ADRankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 0
variable = b_strain_xx
[../]
[./b_strain_yy]
type = ADRankTwoAux
rank_two_tensor = B_total_strain
index_i = 1
index_j = 1
variable = b_strain_yy
[../]
[./b_strain_xy]
type = ADRankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 1
variable = b_strain_xy
[../]
[]
[Constraints]
[./dispx_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_x
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[./dispy_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_y
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[]
[BCs]
[./bottomx]
type = ADDirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = ADDirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[./topx]
type = ADFunctionDirichletBC
boundary = top
variable = disp_x
function = 0.03*t
[../]
[./topy]
type = ADFunctionDirichletBC
boundary = top
variable = disp_y
function = '0.03*t'
[../]
[]
[Materials]
[./elasticity_tensor_A]
type = ADComputeIsotropicElasticityTensor
base_name = A
youngs_modulus = 1e9
poissons_ratio = 0.3
[../]
[./strain_A]
type = ADComputeSmallStrain
base_name = A
displacements = 'disp_x disp_y'
[../]
[./stress_A]
type = ADComputeLinearElasticStress
base_name = A
[../]
[./elasticity_tensor_B]
type = ADComputeIsotropicElasticityTensor
base_name = B
youngs_modulus = 1e7
poissons_ratio = 0.3
[../]
[./strain_B]
type = ADComputeSmallStrain
base_name = B
displacements = 'disp_x disp_y'
[../]
[./stress_B]
type = ADComputeLinearElasticStress
base_name = B
[../]
[./combined_stress]
type = ADLevelSetBiMaterialRankTwo
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = stress
[../]
[./combined_elasticity_tensor]
type = ADLevelSetBiMaterialRankFour
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = elasticity_tensor
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
line_search = 'bt'
# controls for linear iterations
l_max_its = 20
l_tol = 1e-8
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-50
# time control
start_time = 0.0
dt = 0.15
num_steps = 3
max_xfem_update = 1
[]
[Outputs]
exodus = true
execute_on = timestep_end
file_base = moving_bimaterial_out
perf_graph = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/heat_transfer/test/tests/radiative_bcs/ad_radiative_bc_cyl.i)
#
# Thin cylindrical shell with very high thermal conductivity
# so that temperature is almost uniform at 500 K. Radiative
# boundary conditions is applied. Heat flux out of boundary
# 'right' should be 3723.36; this is approached as the mesh
# is refined
#
[Mesh]
type = MeshGeneratorMesh
[cartesian]
type = CartesianMeshGenerator
dim = 2
dx = '1 1'
ix = '1 10'
dy = '1 1'
subdomain_id = '1 2 1 2'
[]
[remove_1]
type = BlockDeletionGenerator
block = 1
input = cartesian
[]
[readd_left]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(x - 1) < 1e-4'
new_sideset_name = left
input = remove_1
[]
[]
[Problem]
coord_type = RZ
[]
[Variables]
[temp]
initial_condition = 800.0
[]
[]
[Kernels]
[heat]
type = ADHeatConduction
variable = temp
[]
[]
[BCs]
[lefttemp]
type = ADDirichletBC
boundary = left
variable = temp
value = 800
[]
[radiative_bc]
type = ADInfiniteCylinderRadiativeBC
boundary = right
variable = temp
boundary_radius = 2
boundary_emissivity = 0.2
cylinder_radius = 3
cylinder_emissivity = 0.7
Tinfinity = 500
[]
[]
[Materials]
[density]
type = ADGenericConstantMaterial
prop_names = 'density thermal_conductivity'
prop_values = '1 1.0e5'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
petsc_options = '-snes_converged_reason'
line_search = none
nl_rel_tol = 1e-6
nl_abs_tol = 1e-7
[]
[Postprocessors]
[right]
type = ADSideDiffusiveFluxAverage
variable = temp
boundary = right
diffusivity = thermal_conductivity
[]
[min_temp]
type = ElementExtremeValue
variable = temp
value_type = min
[]
[max_temp]
type = ElementExtremeValue
variable = temp
value_type = max
[]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/ad_linear_elasticity/extra_stresses.i)
# This input file is designed to test adding extra stress to ADComputeLinearElasticStress
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 50
ymax = 50
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Physics/SolidMechanics/QuasiStatic/All]
strain = SMALL
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_zx hydrostatic_stress vonmises_stress'
use_automatic_differentiation = true
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0
[../]
[./stress]
type = ADComputeLinearElasticStress
extra_stress_names = 'stress_one stress_two'
[../]
[./stress_one]
type = GenericConstantRankTwoTensor
tensor_name = stress_one
tensor_values = '0 1e3 1e3 1e3 0 1e3 1e3 1e3 0'
[../]
[./stress_two]
type = GenericConstantRankTwoTensor
tensor_name = stress_two
tensor_values = '1e3 0 0 0 1e3 0 0 0 1e3'
[../]
[]
[BCs]
[./disp_x_BC]
type = ADDirichletBC
variable = disp_x
boundary = 'bottom top'
value = 0.5
[../]
[./disp_x_BC2]
type = ADDirichletBC
variable = disp_x
boundary = 'left right'
value = 0.01
[../]
[./disp_y_BC]
type = ADDirichletBC
variable = disp_y
boundary = 'bottom top'
value = 0.8
[../]
[./disp_y_BC2]
type = ADDirichletBC
variable = disp_y
boundary = 'left right'
value = 0.02
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Postprocessors]
[./hydrostatic]
type = ElementAverageValue
variable = hydrostatic_stress
[../]
[./von_mises]
type = ElementAverageValue
variable = vonmises_stress
[../]
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/mortar_tm/2d/ad_frictional/finite.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[action]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
[]
[]
[Contact]
[frictional]
primary = plank_right
secondary = block_left
formulation = mortar
model = coulomb
c_normal = 1e0
c_tangential = 1e-6
friction_coefficient = 0.1
tangential_lm_scaling = 1.0e-15
[]
[]
[BCs]
[left_x]
type = ADDirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
preset = false
[]
[left_y]
type = ADDirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
preset = false
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
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'
end_time = 5.3
dt = 0.12
dtmin = 0.12
timestep_tolerance = 1e-6
line_search = 'contact'
nl_div_tol = 1e100
nl_abs_tol = 1e-7
automatic_scaling = true
compute_scaling_once = false
ignore_variables_for_autoscaling = 'frictional_normal_lm frictional_tangential_lm'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictional_normal_lm
subdomain = frictional_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/solid_mechanics/test/tests/ad_smeared_cracking/cracking_plane_stress.i)
################################################################################
#
# 1x1x1 cube, single element
# simulate plane stress
# pull in +y direction on right surface to produce shear strain
#
#
#
# ____________
# /| /|
# / | 5 / | -X Left 1
# /__________ / | +X Right 4
# | | 3 | | +Y Top 5
# | 1 | | 4 | -Y Bottom 2
# | |_6_____|___| y +Z Front 6
# | / | / ^ -Z Back 3
# | / 2 | / |
# |/__________|/ |
# ----> x
# /
# /
# z
#
#
#
#################################################################################
[Mesh]
file = cube.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Functions]
[./displ]
type = PiecewiseLinear
x = '0 0.1 0.2 0.3 0.4'
y = '0 0.0026 0 -0.0026 0'
[../]
[./pressure]
type = PiecewiseLinear
x = '0 0.1 0.2 0.3 0.4'
y = '0 0 0 0 0'
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_zx'
use_automatic_differentiation = true
[../]
[]
[BCs]
[./pull_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = 4
function = displ
[../]
[./pin_x]
type = ADDirichletBC
variable = disp_x
boundary = '1 4'
value = 0.0
[../]
[./pin_y]
type = ADDirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./back]
type = ADDirichletBC
variable = disp_z
boundary = '3'
value = 0.0
[../]
[./front]
type = ADPressure
variable = disp_z
boundary = 6
function = pressure
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 200.0e3
poissons_ratio = .3
[../]
[./elastic_stress]
type = ADComputeSmearedCrackingStress
cracking_stress = 120
cracked_elasticity_type = DIAGONAL
shear_retention_factor = 0.1
softening_models = exponential_softening
[../]
[./exponential_softening]
type = ADExponentialSoftening
residual_stress = 0.1
beta = 0.1
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
petsc_options_iname = '-ksp_gmres_restart -pc_type -sub_pc_type'
petsc_options_value = '101 asm lu'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-8
l_tol = 1e-5
start_time = 0.0
end_time = 0.4
dt = 0.04
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/rom_stress_update/ad_verification.i)
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[temperature]
[]
[]
[AuxKernels]
[temp_aux]
type = FunctionAux
variable = temperature
function = temp_fcn
execute_on = 'initial timestep_begin'
[]
[]
[Functions]
[rhom_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 1
format = columns
xy_in_file_only = false
direction = LEFT_INCLUSIVE
[]
[rhoi_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 2
format = columns
xy_in_file_only = false
direction = LEFT_INCLUSIVE
[]
[vmJ2_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 3
format = columns
xy_in_file_only = false
direction = LEFT_INCLUSIVE
[]
[evm_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 4
format = columns
xy_in_file_only = false
direction = LEFT_INCLUSIVE
[]
[temp_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 5
format = columns
xy_in_file_only = false
direction = LEFT_INCLUSIVE
[]
[rhom_soln_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 7
format = columns
xy_in_file_only = false
direction = LEFT_INCLUSIVE
[]
[rhoi_soln_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 8
format = columns
xy_in_file_only = false
direction = LEFT_INCLUSIVE
[]
[creep_rate_soln_fcn]
type = PiecewiseConstant
data_file = ss316_verification_data.csv
x_index_in_file = 0
y_index_in_file = 10
format = columns
xy_in_file_only = false
direction = LEFT_INCLUSIVE
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
generate_output = 'vonmises_stress'
use_automatic_differentiation = true
[]
[]
[BCs]
[symmx]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0
[]
[symmy]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[symmz]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0
[]
[pull_x]
type = ADDirichletBC
variable = disp_x
boundary = right
value = 1e-5 # This is required to make a non-zero effective trial stress so radial return is engaged
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
shear_modulus = 1e13
poissons_ratio = 0.3
[]
[stress]
type = ADComputeMultipleInelasticStress
inelastic_models = rom_stress_prediction
[]
[rom_stress_prediction]
type = ADSS316HLAROMANCEStressUpdateTest
temperature = temperature
effective_inelastic_strain_name = effective_creep_strain
internal_solve_full_iteration_history = true
apply_strain = false
outputs = all
wall_dislocation_density_forcing_function = rhoi_fcn
cell_dislocation_density_forcing_function = rhom_fcn
old_creep_strain_forcing_function = evm_fcn
wall_input_window_low_failure = ERROR
wall_input_window_high_failure = ERROR
cell_input_window_low_failure = ERROR
cell_input_window_high_failure = ERROR
temperature_input_window_low_failure = ERROR
temperature_input_window_high_failure = ERROR
stress_input_window_low_failure = ERROR
stress_input_window_high_failure = ERROR
old_strain_input_window_low_failure = ERROR
old_strain_input_window_high_failure = ERROR
environment_input_window_low_failure = ERROR
environment_input_window_high_failure = ERROR
effective_stress_forcing_function = vmJ2_fcn
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_abs_tol = 1e-1 # Nothing is really being solved here, so loose tolerances are okay
dt = 1e-3
end_time = 1e-2
timestep_tolerance = 1e-3
[]
[Postprocessors]
[extrapolation]
type = ElementAverageValue
variable = ROM_extrapolation
outputs = console
[]
[old_strain_in]
type = FunctionValuePostprocessor
function = evm_fcn
execute_on = 'TIMESTEP_END initial'
outputs = console
[]
[temperature]
type = ElementAverageValue
variable = temperature
outputs = console
[]
[rhom]
type = ElementAverageValue
variable = cell_dislocations
[]
[rhoi]
type = ElementAverageValue
variable = wall_dislocations
[]
[creep_rate]
type = ElementAverageValue
variable = creep_rate
[]
[rhom_in]
type = FunctionValuePostprocessor
function = rhom_fcn
execute_on = 'TIMESTEP_END initial'
outputs = console
[]
[rhoi_in]
type = FunctionValuePostprocessor
function = rhoi_fcn
execute_on = 'TIMESTEP_END initial'
outputs = console
[]
[vmJ2_in]
type = FunctionValuePostprocessor
function = vmJ2_fcn
execute_on = 'TIMESTEP_END initial'
outputs = console
[]
[rhom_soln]
type = FunctionValuePostprocessor
function = rhom_soln_fcn
outputs = console
[]
[rhoi_soln]
type = FunctionValuePostprocessor
function = rhoi_soln_fcn
outputs = console
[]
[creep_rate_soln]
type = FunctionValuePostprocessor
function = creep_rate_soln_fcn
[]
[rhom_diff]
type = ParsedPostprocessor
pp_names = 'rhom_soln rhom'
expression = '(rhom_soln - rhom) / rhom_soln'
outputs = console
[]
[rhoi_diff]
type = ParsedPostprocessor
pp_names = 'rhoi_soln rhoi'
expression = '(rhoi_soln - rhoi) / rhoi_soln'
outputs = console
[]
[creep_rate_diff]
type = ParsedPostprocessor
pp_names = 'creep_rate creep_rate_soln'
expression = '(creep_rate_soln - creep_rate) / creep_rate_soln'
outputs = console
[]
[z_rhom_max_diff]
type = TimeExtremeValue
postprocessor = rhom_diff
value_type = abs_max
[]
[z_rhoi_max_diff]
type = TimeExtremeValue
postprocessor = rhoi_diff
value_type = abs_max
[]
[z_creep_rate_max_diff]
type = TimeExtremeValue
postprocessor = creep_rate_diff
value_type = abs_max
[]
[]
[Outputs]
csv = true
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
(modules/solid_mechanics/test/tests/ad_2D_geometries/2D-RZ_finiteStrain_resid.i)
# This tests the save_in_disp residual aux-variables for
# ComputeAxisymmetricRZFiniteStrain, which is generated through the use of the
# SolidMechanics QuasiStatic Physics. The GeneratedMesh is 1x1, rotated via axisym to
# create a cylinder of height 1, radius 1.
#
# PostProcessor force_z plots the force on the top surface of the cylinder.
#
# Displacement of 0.1 is applied to top of cylinder while other surfaces are
# constrained. Plotting force_z vs stress_z will show a slope of 3.14159 (pi),
# consistent with formula for normal stress:
#
# Stress = force / area
#
# where area is A = pi * r^2 for a circle.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
[]
[GlobalParams]
displacements = 'disp_r disp_z'
[]
[Problem]
coord_type = RZ
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
save_in = 'force_r force_z'
use_automatic_differentiation = true
[../]
[]
[AuxVariables]
[./stress_r]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_r]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_z]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_z]
order = CONSTANT
family = MONOMIAL
[../]
[./force_r]
order = FIRST
family = LAGRANGE
[../]
[./force_z]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./stress_r]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = stress_r
execute_on = timestep_end
[../]
[./strain_r]
type = ADRankTwoAux
rank_two_tensor = total_strain
index_i = 0
index_j = 0
variable = strain_r
execute_on = timestep_end
[../]
[./stress_z]
type = ADRankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = stress_z
execute_on = timestep_end
[../]
[./strain_z]
type = ADRankTwoAux
rank_two_tensor = total_strain
index_i = 1
index_j = 1
variable = strain_z
execute_on = timestep_end
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./_elastic_strain]
type = ADComputeFiniteStrainElasticStress
[../]
[]
[BCs]
[./no_disp_r_left]
type = ADDirichletBC
variable = disp_r
boundary = left
value = 0.0
[../]
[./no_disp_r_right]
type = ADDirichletBC
variable = disp_r
boundary = right
value = 0.0
[../]
[./no_disp_z_bottom]
type = ADDirichletBC
variable = disp_z
boundary = bottom
value = 0.0
[../]
[./top]
type = ADFunctionDirichletBC
variable = disp_z
boundary = top
function = 't'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = ' 201 hypre boomeramg 10'
line_search = 'none'
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
nl_rel_tol = 5e-9
nl_abs_tol = 1e-10
nl_max_its = 15
l_tol = 1e-3
l_max_its = 50
start_time = 0.0
end_time = 0.1
dt = 0.01
[]
[Postprocessors]
[./strainR]
type = ElementAverageValue
variable = strain_r
[../]
[./stressR]
type = ElementAverageValue
variable = stress_r
[../]
[./strainZ]
type = ElementAverageValue
variable = strain_z
[../]
[./stressZ]
type = ElementAverageValue
variable = stress_z
[../]
[./force_r]
type = NodalSum
variable = force_r
boundary = top
[../]
[./force_z]
type = NodalSum
variable = force_z
boundary = top
[../]
[]
[Outputs]
exodus = true
print_linear_residuals = false
perf_graph = true
[]
(modules/solid_mechanics/test/tests/substepping/power_law_creep.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
[]
[]
[AuxVariables]
[temp]
initial_condition = 1000.0
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
generate_output = 'stress_zz elastic_strain_zz creep_strain_zz'
use_automatic_differentiation = false
[]
[]
[Functions]
[front_pull]
type = PiecewiseLinear
x = '0 1'
y = '0 1'
scale_factor = 0.5
[]
[]
[BCs]
[u_front_pull]
type = ADFunctionDirichletBC
variable = disp_z
boundary = front
function = front_pull
[]
[uz_back_fix]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
[u_yz_fix]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[u_xz_fix]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2e11
poissons_ratio = 0.3
[]
[radial_return_stress]
type = ComputeMultipleInelasticStress
inelastic_models = 'power_law_creep'
[]
[power_law_creep]
type = PowerLawCreepStressUpdate
coefficient = 1.0e-15
n_exponent = 4
activation_energy = 0.0
temperature = temp
# options for using substepping
substep_strain_tolerance = 0.1
max_inelastic_increment = 0.01
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type '
petsc_options_value = 'lu '
line_search = 'none'
nl_max_its = 10
nl_rel_tol = 1e-6
nl_abs_tol = 1e-10
end_time = 0.1
dt = 0.1
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/finite_action_rr.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
converge_on = 'disp_x disp_y temp'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
strain = FINITE
extra_vector_tags = 'ref'
[]
[]
[Kernels]
[hc]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
extra_vector_tags = 'ref'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e6
[]
[]
[MortarGapHeatTransfer]
[mortar_heat_transfer]
temperature = temp
use_displaced_mesh = true
gap_flux_options = conduction
gap_conductivity = 1
boundary = plank_right
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
thermal_lm_scaling = 1e-7
gap_geometry_type = PLATE
[]
[]
[BCs]
[left_temp]
type = ADDirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = ADDirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[left_x]
type = ADDirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = ADDirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[heat_plank]
type = ADHeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = ADHeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
nl_abs_tol = 1e-13
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact avg_temp'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/varied_pressure_thermomechanical_mortar.i)
## Units in the input file: m-Pa-s-K
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
xmax = 0.25
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 13
xmin = 0.25
xmax = 0.5
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
patch_update_strategy = iteration
[]
[Variables]
[disp_x]
block = 'left_block right_block'
[]
[disp_y]
block = 'left_block right_block'
[]
[temperature]
initial_condition = 300.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[Modules]
[TensorMechanics/Master]
[steel]
strain = FINITE
add_variables = false
use_automatic_differentiation = true
generate_output = 'strain_xx strain_xy strain_yy stress_xx stress_xy stress_yy'
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
block = 'left_block'
[]
[aluminum]
strain = FINITE
add_variables = false
use_automatic_differentiation = true
generate_output = 'strain_xx strain_xy strain_yy stress_xx stress_xy stress_yy'
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
block = 'right_block'
[]
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
block = 'left_block'
[]
[HeatTdot_steel]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = steel_heat_capacity
density_name = steel_density
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
block = 'right_block'
[]
[HeatTdot_aluminum]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = aluminum_heat_capacity
density_name = aluminum_density
block = 'right_block'
[]
[]
[BCs]
[fixed_bottom_edge]
type = ADDirichletBC
variable = disp_y
value = 0
boundary = 'moving_block_bottom fixed_block_bottom'
[]
[fixed_outer_edge]
type = ADDirichletBC
variable = disp_x
value = 0
boundary = 'fixed_block_right'
[]
[pressure_left_block]
type = ADPressure
variable = disp_x
component = 0
boundary = 'moving_block_left'
function = '1e4*t*y'
[]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 800
boundary = 'fixed_block_right'
[]
[]
[Contact]
[interface]
primary = moving_block_right
secondary = fixed_block_left
model = frictionless
formulation = mortar
correct_edge_dropping = true
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed'
use_displaced_mesh = true
[]
[]
[Materials]
[steel_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1.93e11 #in Pa, 193 GPa, stainless steel 304
poissons_ratio = 0.29
block = 'left_block'
[]
[steel_stress]
type = ADComputeFiniteStrainElasticStress
block = 'left_block'
[]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity steel_hardness'
prop_values = ' 8e3 16.2 0.5 129' ## for stainless steel 304
block = 'left_block'
[]
[aluminum_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 6.8e10 #in Pa, 68 GPa, aluminum
poissons_ratio = 0.36
block = 'right_block'
[]
[aluminum_stress]
type = ADComputeFiniteStrainElasticStress
block = 'right_block'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_hardness'
prop_values = ' 2.7e3 210 0.9 15' #for 99% pure Al
block = 'right_block'
[]
[]
[UserObjects]
[closed]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[contact_pressure_max]
type = NodalExtremeValue
variable = interface_normal_lm
block = interface_secondary_subdomain
value_type = max
[]
[contact_pressure_average]
type = AverageNodalVariableValue
variable = interface_normal_lm
block = interface_secondary_subdomain
[]
[contact_pressure_min]
type = NodalExtremeValue
variable = interface_normal_lm
block = interface_secondary_subdomain
value_type = min
[]
[interface_temperature_max]
type = NodalExtremeValue
variable = temperature
block = interface_secondary_subdomain
value_type = max
[]
[interface_temperature_average]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_temperature_min]
type = NodalExtremeValue
variable = temperature
block = interface_secondary_subdomain
value_type = min
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
# mortar contact solver options
petsc_options = '-snes_converged_reason -pc_svd_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = ' lu superlu_dist'
snesmf_reuse_base = false
nl_rel_tol = 1e-7
nl_max_its = 20
l_max_its = 50
dt = 0.125
end_time = 1
[]
[Outputs]
csv = true
perf_graph = true
[]
(test/tests/interfacekernels/1d_interface/ad-coupled-value-coupled-flux.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[]
[Variables]
[u]
block = '0'
[]
[v]
block = '1'
[]
[]
[Kernels]
[diff_u]
type = ADMatDiffusion
variable = u
diffusivity = 4
block = 0
[]
[diff_v]
type = ADMatDiffusion
variable = v
diffusivity = 2
block = 1
[]
[]
[InterfaceKernels]
[penalty_interface]
type = ADPenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
jump_prop_name = "jump"
[]
[]
[Materials]
[bulk]
type = ADPiecewiseByBlockFunctorMaterial
prop_name = 'functor_var_mat_prop'
subdomain_to_prop_value = '0 u 1 v'
[]
[bulk_traditional]
type = ScalarPropFromFunctorProp
functor = 'functor_var_mat_prop'
prop = 'var_mat_prop'
[]
[jump]
type = PropertyJumpInterfaceMaterial
property = var_mat_prop
boundary = primary0_interface
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = u
boundary = 'left'
value = 1
[]
[right]
type = ADDirichletBC
variable = v
boundary = 'right'
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_offset_single_material_insulated.i)
## Units in the input file: m-Pa-s-K-V
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 100
xmax = 0.1
ymin = 0.1
ymax = 0.35
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 100
xmin = 0.1
xmax = 0.2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
[]
[Variables]
[temperature]
initial_condition = 300.0
[]
[potential]
[]
[potential_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 1.0
[]
[]
[Kernels]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
extra_vector_tags = 'ref'
block = 'left_block right_block'
[]
[electric_aluminum]
type = ADMatDiffusion
variable = potential
diffusivity = aluminum_electrical_conductivity
extra_vector_tags = 'ref'
block = 'left_block right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'fixed_block_right'
[]
[electric_left]
type = ADDirichletBC
variable = potential
value = 0.0
boundary = moving_block_left
[]
[electric_right]
type = ADDirichletBC
variable = potential
value = 3.0e-1
boundary = fixed_block_right
[]
[]
[Constraints]
[electrical_contact]
type = ModularGapConductanceConstraint
variable = potential_interface_lm
secondary_variable = potential
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_electric'
correct_edge_dropping = true
[]
[interface_heating]
type = ADInterfaceJouleHeatingConstraint
potential_lagrange_multiplier = potential_interface_lm
secondary_variable = temperature
primary_electrical_conductivity = aluminum_electrical_conductivity
secondary_electrical_conductivity = aluminum_electrical_conductivity
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
[]
[]
[Materials]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 900.0 3.7e7 1.0' #for 99% pure Al
block = 'left_block right_block interface_secondary_subdomain'
[]
[]
[UserObjects]
[closed_electric]
type = GapFluxModelPressureDependentConduction
primary_conductivity = aluminum_electrical_conductivity
secondary_conductivity = aluminum_electrical_conductivity
temperature = potential
contact_pressure = interface_normal_lm
primary_hardness = aluminum_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[interface_heat_flux_large_block]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[interface_heat_flux_small_block]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = aluminum_thermal_conductivity
[]
[interface_electrical_flux_large_block]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = fixed_block_left
diffusivity = aluminum_electrical_conductivity
[]
[interface_electrical_flux_small_block]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = moving_block_right
diffusivity = aluminum_electrical_conductivity
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
nl_abs_tol = 2e-10
nl_rel_tol = 1e-6
nl_max_its = 50
nl_forced_its = 1
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/multi_power_law/power_law_creep.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
second_order = true
[]
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = false
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 10'
y = '0 1e-3'
[]
[]
[AuxVariables]
[strain_energy_rate_density]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[strain_energy_rate_density]
type = MaterialRealAux
variable = strain_energy_rate_density
property = strain_energy_rate_density
execute_on = timestep_end
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = SMALL
incremental = true
add_variables = true
use_automatic_differentiation = true
generate_output = 'hydrostatic_stress vonmises_stress'
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.3
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "creep_nine creep_one"
[]
[creep_one]
type = ADPowerLawCreepStressUpdate
coefficient = 1e-24
n_exponent = 4
m_exponent = 0
activation_energy = 0
base_name = creep_one
[]
[creep_nine]
type = ADPowerLawCreepStressUpdate
coefficient = 9e-24
n_exponent = 4
m_exponent = 0
activation_energy = 0
base_name = creep_nine
[]
[strain_energy_rate_density]
type = ADStrainEnergyRateDensity
inelastic_models = 'creep_nine'
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[pull_disp_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = top
function = pull
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
petsc_options_iname = -pc_hypre_type
petsc_options_value = boomeramg
line_search = 'none'
nl_rel_tol = 1e-11
nl_abs_tol = 1e-11
num_steps = 5
dt = 1e-1
[]
[Postprocessors]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[]
[Outputs]
exodus = true
[]
(tutorials/tutorial01_app_development/step10_auxkernels/problems/pressure_diffusion.i)
[Mesh]
type = GeneratedMesh # Can generate simple lines, rectangles and rectangular prisms
dim = 2 # Dimension of the mesh
nx = 100 # Number of elements in the x direction
ny = 10 # Number of elements in the y direction
xmax = 0.304 # Length of test chamber
ymax = 0.0257 # Test chamber radius
[]
[Problem]
type = FEProblem # This is the "normal" type of Finite Element Problem in MOOSE
coord_type = RZ # Axisymmetric RZ
rz_coord_axis = X # Which axis the symmetry is around
[]
[Variables]
[pressure]
# Adds a Linear Lagrange variable by default
[]
[]
[AuxVariables]
[velocity]
order = CONSTANT # Since "pressure" is approximated linearly, its gradient must be constant
family = MONOMIAL_VEC # A monomial interpolation means this is an elemental AuxVariable
[]
[]
[Kernels]
[diffusion]
type = DarcyPressure # Zero-gravity, divergence-free form of Darcy's law
variable = pressure # Operate on the "pressure" variable from above
[]
[]
[AuxKernels]
[velocity]
type = DarcyVelocity
variable = velocity # Store volumetric flux vector in "velocity" variable from above
pressure = pressure # Couple to the "pressure" variable from above
execute_on = TIMESTEP_END # Perform calculation at the end of the solve step - after Kernels run
[]
[]
[Materials]
[filter]
type = PackedColumn # Provides permeability and viscosity of water through packed 1mm spheres
[]
[]
[BCs]
[inlet]
type = ADDirichletBC # Simple u=value BC
variable = pressure # Variable to be set
boundary = left # Name of a sideset in the mesh
value = 4000 # (Pa) From Figure 2 from paper. First data point for 1mm spheres.
[]
[outlet]
type = ADDirichletBC
variable = pressure
boundary = right
value = 0 # (Pa) Gives the correct pressure drop from Figure 2 for 1mm spheres
[]
[]
[Executioner]
type = Steady # Steady state problem
solve_type = NEWTON # Perform a Newton solve
# Set PETSc parameters to optimize solver efficiency
petsc_options_iname = '-pc_type -pc_hypre_type' # PETSc option pairs with values below
petsc_options_value = ' hypre boomeramg'
[]
[Outputs]
exodus = true # Output Exodus format
[]
(modules/solid_mechanics/test/tests/ad_finite_strain_jacobian/3d_bar.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 2
ymin = 0
ymax = 2
zmin = 0
zmax = 10
nx = 10
ny = 2
nz = 2
elem_type = HEX8
[]
[corner]
type = ExtraNodesetGenerator
new_boundary = 101
coord = '0 0 0'
input = generated_mesh
[]
[side]
type = ExtraNodesetGenerator
new_boundary = 102
coord = '2 0 0'
input = corner
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
use_finite_deform_jacobian = true
volumetric_locking_correction = false
use_automatic_differentiation = true
[]
[]
[Materials]
[stress]
type = ADComputeFiniteStrainElasticStress
[]
[elasticity_tensor]
type = ADComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '1.684e5 0.176e5 0.176e5 1.684e5 0.176e5 1.684e5 0.754e5 0.754e5 0.754e5'
[]
[]
[BCs]
[fix_corner_x]
type = ADDirichletBC
variable = disp_x
boundary = 101
value = 0
[]
[fix_corner_y]
type = ADDirichletBC
variable = disp_y
boundary = 101
value = 0
[]
[fix_side_y]
type = ADDirichletBC
variable = disp_y
boundary = 102
value = 0
[]
[fix_z]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0
[]
[move_z]
type = ADFunctionDirichletBC
variable = disp_z
boundary = front
function = 't'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-10
nl_max_its = 10
l_tol = 1e-4
l_max_its = 50
dt = 0.2
dtmin = 0.2
num_steps = 2
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/ad_linear_elasticity/applied_strain.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmax = 2
ymax = 2
[]
[Physics/SolidMechanics/QuasiStatic/All]
strain = SMALL
eigenstrain_names = eigenstrain
add_variables = true
generate_output = 'strain_xx strain_yy strain_xy'
use_automatic_differentiation = true
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0
[../]
[./stress]
type = ADComputeLinearElasticStress
[../]
[./eigenstrain]
type = ADComputeEigenstrain
eigen_base = '0.1 0.05 0 0 0 0.01'
prefactor = -1
eigenstrain_name = eigenstrain
[../]
[]
[BCs]
[./bottom_y]
type = ADDirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./left_x]
type = ADDirichletBC
variable = disp_x
boundary = 'left'
value = 0
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/power_law_creep/ad_exception.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[finite]
add_variables = true
strain = FINITE
use_automatic_differentiation = true
[]
[]
[BCs]
[no_x]
type = ADDirichletBC
variable = disp_x
boundary = 'left'
value = 0.0
[]
[top]
type = ADDirichletBC
variable = disp_x
boundary = 'top'
value = 1e-4
[]
[no_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0.0
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e11
poissons_ratio = 0.3
[]
[elastic_stress]
type = ADComputeMultipleInelasticStress
inelastic_models = 'creep'
outputs = all
[]
[creep]
type = ADPowerLawCreepTest
coefficient = 10e-22
n_exponent = 2
activation_energy = 0
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
snesmf_reuse_base = false # prevents segfault on mac in dbg
line_search = none
num_steps = 2
[]
[Outputs]
[]
(modules/solid_mechanics/test/tests/anisotropic_plasticity/anis_elasticity_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[]
[Variables]
[disp_x]
scaling = 1e-10
[]
[disp_y]
scaling = 1e-10
[]
[disp_z]
scaling = 1e-10
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1e3 1e8'
y = '0 1e2 1e2'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
incremental = true
generate_output = 'elastic_strain_xx elastic_strain_yy elastic_strain_xy stress_xx stress_xy stress_yy'
use_automatic_differentiation = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 206800
poissons_ratio = 0.0
[]
[stress_]
type = ADComputeFiniteStrainElasticStress
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = bottom
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = bottom
value = 0.0
[]
[Pressure]
[Side1]
boundary = top
function = pull
[]
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-ksp_gmres_restart -pc_type -sub_pc_type'
petsc_options_value = '101 asm lu'
line_search = 'none'
nl_rel_tol = 1e-07
nl_abs_tol = 1.0e-15
l_max_its = 90
num_steps = 40
dt = 5.0e1
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/electromagnetics/test/tests/interfacekernels/electrostatic_contact/analytic_solution_test_two_block.i)
# Regression test for ElectrostaticContactCondition with analytic solution with
# two blocks
#
# dim = 1D
# X = [0,2]
# Interface at X = 1
#
# stainless_steel graphite
# +------------------+------------------+
#
# Left BC: Potential = 1
# Right BC: Potential = 0
# Center Interface: ElectrostaticContactCondition
#
[Mesh]
[line]
type = GeneratedMeshGenerator
dim = 1
nx = 4
xmax = 2
[]
[break]
type = SubdomainBoundingBoxGenerator
input = line
block_id = 1
block_name = 'graphite'
bottom_left = '1 0 0'
top_right = '2 0 0'
[]
[block_rename]
type = RenameBlockGenerator
input = break
old_block = 0
new_block = 'stainless_steel'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = block_rename
primary_block = 'stainless_steel'
paired_block = 'graphite'
new_boundary = 'ssg_interface'
[]
[]
[Variables]
[potential_graphite]
block = graphite
[]
[potential_stainless_steel]
block = stainless_steel
[]
[]
[AuxVariables]
[analytic_potential_stainless_steel]
block = stainless_steel
[]
[analytic_potential_graphite]
block = graphite
[]
[]
[Kernels]
[electric_graphite]
type = ADMatDiffusion
variable = potential_graphite
diffusivity = electrical_conductivity
block = graphite
[]
[electric_stainless_steel]
type = ADMatDiffusion
variable = potential_stainless_steel
diffusivity = electrical_conductivity
block = stainless_steel
[]
[]
[AuxKernels]
[analytic_function_aux_stainless_steel]
type = FunctionAux
function = potential_fxn_stainless_steel
variable = analytic_potential_stainless_steel
block = stainless_steel
[]
[analytic_function_aux_graphite]
type = FunctionAux
function = potential_fxn_graphite
variable = analytic_potential_graphite
block = graphite
[]
[]
[BCs]
[elec_left]
type = ADDirichletBC
variable = potential_stainless_steel
boundary = left
value = 1
[]
[elec_right]
type = ADDirichletBC
variable = potential_graphite
boundary = right
value = 0
[]
[]
[InterfaceKernels]
[electric_contact_conductance_ssg]
type = ElectrostaticContactCondition
variable = potential_stainless_steel
neighbor_var = potential_graphite
boundary = ssg_interface
mean_hardness = mean_hardness
mechanical_pressure = 3000
[]
[]
[Materials]
#graphite (at 300 K)
[sigma_graphite]
type = ADGenericConstantMaterial
prop_names = electrical_conductivity
prop_values = 73069.2
block = graphite
[]
#stainless_steel (at 300 K)
[sigma_stainless_steel]
type = ADGenericConstantMaterial
prop_names = electrical_conductivity
prop_values = 1.41867e6
block = stainless_steel
[]
# harmonic mean of graphite and stainless steel hardness
[mean_hardness]
type = ADGenericConstantMaterial
prop_names = mean_hardness
prop_values = 2.4797e9
[]
[]
[Functions]
[potential_fxn_stainless_steel]
type = ElectricalContactTestFunc
domain = stainless_steel
[]
[potential_fxn_graphite]
type = ElectricalContactTestFunc
domain = graphite
[]
[]
[Postprocessors]
[error_stainless_steel]
type = ElementL2Error
variable = potential_stainless_steel
function = potential_fxn_stainless_steel
block = stainless_steel
[]
[error_graphite]
type = ElementL2Error
variable = potential_graphite
function = potential_fxn_graphite
block = graphite
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = true
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/3d_bar_orthotropic_90deg_rotation_ad_creep_z_no_rotation.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 2
ymin = 0
ymax = 10
zmin = 0
zmax = 2
nx = 1
ny = 1
nz = 1
elem_type = HEX8
[]
[corner]
type = ExtraNodesetGenerator
new_boundary = 101
coord = '0 0 0'
input = generated_mesh
[]
[side]
type = ExtraNodesetGenerator
new_boundary = 102
coord = '2 0 0'
input = corner
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
volumetric_locking_correction = true
use_automatic_differentiation = true
generate_output = 'elastic_strain_yy stress_yy creep_strain_yy'
[]
[]
[Materials]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_creep"
max_iterations = 50
absolute_tolerance = 1e-18
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5 1.0 0.5 1.5 1.5 1.5"
use_large_rotation = true
[]
[trial_creep]
type = ADHillCreepStressUpdate
coefficient = 5e-14
n_exponent = 10
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 0.00003
absolute_tolerance = 1e-18
relative_tolerance = 1e-18
# Force it to not use integration error
max_integration_error = 100.0
use_transformation = true
[]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 500
poissons_ratio = 0.0
[]
[]
[BCs]
[fix_z]
type = ADDirichletBC
variable = disp_z
boundary = bottom
value = 0
[]
[rot_y]
type = DisplacementAboutAxis
boundary = bottom
function = 0
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 1
variable = disp_y
[]
#
[rot_x]
type = DisplacementAboutAxis
boundary = bottom
function = 0
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 0
variable = disp_x
[]
[rot_y90]
type = DisplacementAboutAxis
boundary = bottom
function = 0
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 1
variable = disp_y
[]
#
[rot_x90]
type = DisplacementAboutAxis
boundary = bottom
function = 0
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 0
variable = disp_x
[]
[press]
boundary = top
function = '-1.0*(t-90)*0.1'
use_displaced_mesh = true
displacements = 'disp_x disp_y disp_z'
type = Pressure
variable = disp_y
[]
[]
[Controls]
[c1]
type = TimePeriod
enable_objects = 'BCs::rot_x BCs::rot_y'
disable_objects = 'BCs::rot_x90 BCs::rot_y90 BCs::press'
start_time = '0'
end_time = '90'
[]
[c190plus]
type = TimePeriod
enable_objects = 'BCs::rot_x90 BCs::rot_y90 BCs::press'
disable_objects = 'BCs::rot_x BCs::rot_y '
start_time = '90'
end_time = '390'
[]
[]
[Postprocessors]
[creep_strain_xx]
type = ADElementAverageMaterialProperty
mat_prop = creep_strain_yy
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
nl_max_its = 50
automatic_scaling = true
l_tol = 1e-4
l_max_its = 50
start_time = 0.0
dt = 0.1
dtmin = 0.1
num_steps = 1200
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/xfem/test/tests/bimaterials/glued_ad_bimaterials_2d.i)
# This test is for two layer materials with different youngs modulus using AD
# The global stress is determined by switching the stress based on level set values
# The material interface is marked by a level set function
# The two layer materials are glued together
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
[../]
[]
[Mesh]
displacements = 'disp_x disp_y'
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmin = 0.0
xmax = 5.
ymin = 0.0
ymax = 5.
elem_type = QUAD4
[]
[./left_bottom]
type = ExtraNodesetGenerator
new_boundary = 'left_bottom'
coord = '0.0 0.0'
input = gen
[../]
[./left_top]
type = ExtraNodesetGenerator
new_boundary = 'left_top'
coord = '0.0 5.'
input = left_bottom
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[Functions]
[./ls_func]
type = ParsedFunction
expression = 'y-2.5'
[../]
[]
[AuxVariables]
[./a_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
strain = SMALL
use_automatic_differentiation = true
add_variables = true
generate_output = 'stress_xx stress_yy stress_xy'
[../]
[]
[AuxKernels]
[./a_strain_xx]
type = ADRankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 0
variable = a_strain_xx
[../]
[./a_strain_yy]
type = ADRankTwoAux
rank_two_tensor = A_total_strain
index_i = 1
index_j = 1
variable = a_strain_yy
[../]
[./a_strain_xy]
type = ADRankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 1
variable = a_strain_xy
[../]
[./b_strain_xx]
type = ADRankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 0
variable = b_strain_xx
[../]
[./b_strain_yy]
type = ADRankTwoAux
rank_two_tensor = B_total_strain
index_i = 1
index_j = 1
variable = b_strain_yy
[../]
[./b_strain_xy]
type = ADRankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 1
variable = b_strain_xy
[../]
[]
[Constraints]
[./dispx_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_x
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[./dispy_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_y
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[]
[BCs]
[./bottomx]
type = ADDirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = ADDirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[./topx]
type = ADFunctionDirichletBC
boundary = top
variable = disp_x
function = 0.03*t
[../]
[./topy]
type = ADFunctionDirichletBC
boundary = top
variable = disp_y
function = '0.03*t'
[../]
[]
[Materials]
[./elasticity_tensor_A]
type = ADComputeIsotropicElasticityTensor
base_name = A
youngs_modulus = 1e9
poissons_ratio = 0.3
[../]
[./strain_A]
type = ADComputeSmallStrain
base_name = A
[../]
[./stress_A]
type = ADComputeLinearElasticStress
base_name = A
[../]
[./elasticity_tensor_B]
type = ADComputeIsotropicElasticityTensor
base_name = B
youngs_modulus = 1e5
poissons_ratio = 0.3
[../]
[./strain_B]
type = ADComputeSmallStrain
base_name = B
[../]
[./stress_B]
type = ADComputeLinearElasticStress
base_name = B
[../]
[./combined_stress]
type = ADLevelSetBiMaterialRankTwo
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = stress
[../]
[./combined_elasticity_tensor]
type = ADLevelSetBiMaterialRankFour
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = elasticity_tensor
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 8'
line_search = 'bt'
# controls for linear iterations
l_max_its = 20
l_tol = 1e-8
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-50
# time control
start_time = 0.0
dt = 0.1
num_steps = 2
max_xfem_update = 1
[]
[Outputs]
exodus = true
file_base = glued_bimaterials_2d_out
execute_on = timestep_end
[./console]
type = Console
output_linear = true
[../]
[]
(python/pyhit/tests/input_modified.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
xmax = 3
x_max = 4 # Changed from 3 to 4
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = ADDiffusion
variable = u
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = u
boundary = left
value = 300
[]
[right]
type = ADNeumannBC
variable = u
boundary = right
value = 100
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/anisotropic_plasticity/ad_aniso_plasticity_x.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 2
nz = 2
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 10.0
ymax = 1.0
zmax = 1.0
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = '100'
nodes = '3 69'
input = gen
[]
[corner_node_2]
type = ExtraNodesetGenerator
new_boundary = '101'
nodes = '4 47'
input = corner_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[elastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[plasticity_strain_xx]
type = ADRankTwoAux
rank_two_tensor = trial_plasticity_plastic_strain
variable = plastic_strain_xx
index_i = 0
index_j = 0
[]
[plasticity_strain_xy]
type = ADRankTwoAux
rank_two_tensor = trial_plasticity_plastic_strain
variable = plastic_strain_xy
index_i = 0
index_j = 1
[]
[plasticity_strain_yy]
type = ADRankTwoAux
rank_two_tensor = trial_plasticity_plastic_strain
variable = plastic_strain_yy
index_i = 1
index_j = 1
[]
[plasticity_strain_zz]
type = ADRankTwoAux
rank_two_tensor = trial_plasticity_plastic_strain
variable = plastic_strain_zz
index_i = 2
index_j = 2
[]
[sigma_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 1
index_j = 1
[]
[elastic_strain_yy]
type = ADRankTwoAux
rank_two_tensor = elastic_strain
variable = elastic_strain_yy
index_i = 1
index_j = 1
[]
[sigma_yy]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1e1 1e8'
y = '0 -4e2 -4e2'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_xx stress_xx'
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 70000
poissons_ratio = 0.25
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_plasticity"
max_iterations = 50
absolute_tolerance = 1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5829856 0.364424 0.6342174 2.0691375 2.3492325 1.814589"
base_name = trial_plasticity
[]
[trial_plasticity]
type = ADHillPlasticityStressUpdate
hardening_constant = 2000.0
yield_stress = 0.001 # was 200 for verification
absolute_tolerance = 1e-14
relative_tolerance = 1e-12
base_name = trial_plasticity
internal_solve_full_iteration_history = true
max_inelastic_increment = 2.0e-6
internal_solve_output_on = on_error
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = 100
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = 101
value = 0.0
[]
[Pressure]
[Side1]
boundary = right
function = pull
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-11
nl_abs_tol = 1.0e-14
l_max_its = 90
num_steps = 25
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 30
iteration_window = 9
growth_factor = 1.05
cutback_factor = 0.5
timestep_limiting_postprocessor = matl_ts_min
dt = 1.0e-5
time_t = '0 3.4e-5 10'
time_dt = '1.0e-5 1.0e-7 1.0e-7'
[]
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[plasticity_strain_yy]
type = ElementalVariableValue
variable = plastic_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_yy]
type = ElementalVariableValue
variable = elastic_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_yy]
type = ElementalVariableValue
variable = stress_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[plasticity_strain_xx]
type = ElementalVariableValue
variable = plastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_xx]
type = ElementalVariableValue
variable = elastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_xx]
type = ElementalVariableValue
variable = stress_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[plasticity_strain_zz]
type = ElementalVariableValue
variable = plastic_strain_zz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/xfem/test/tests/moving_interface/ad_phase_transition_2d.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 11
ny = 1
xmin = 0.0
xmax = 20.0
ymin = 0.0
ymax = 5.0
elem_type = QUAD4
[]
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[velocity]
type = XFEMPhaseTransitionMovingInterfaceVelocity
diffusivity_at_positive_level_set = 5
diffusivity_at_negative_level_set = 1
equilibrium_concentration_jump = 1
value_at_interface_uo = value_uo
[]
[value_uo]
type = NodeValueAtXFEMInterface
variable = 'u'
interface_mesh_cut_userobject = 'cut_mesh'
execute_on = TIMESTEP_END
level_set_var = ls
[]
[cut_mesh]
type = InterfaceMeshCut2DUserObject
mesh_file = flat_interface_1d.e
interface_velocity_uo = velocity
heal_always = true
[]
[]
[Variables]
[u]
[]
[]
[ICs]
[ic_u]
type = FunctionIC
variable = u
function = 'if(x<5.01, 2, 1)'
[]
[]
[AuxVariables]
[ls]
order = FIRST
family = LAGRANGE
[]
[]
[Constraints]
[u_constraint]
type = XFEMEqualValueAtInterface
geometric_cut_userobject = 'cut_mesh'
use_displaced_mesh = false
variable = u
value = 2
alpha = 1e6
[]
[]
[Kernels]
[diff]
type = ADMatDiffusion
variable = u
diffusivity = diffusion_coefficient
[]
[time]
type = ADTimeDerivative
variable = u
[]
[]
[AuxKernels]
[ls]
type = MeshCutLevelSetAux
mesh_cut_user_object = cut_mesh
variable = ls
execute_on = 'TIMESTEP_BEGIN'
[]
[]
[Materials]
[diffusivity_A]
type = ADGenericConstantMaterial
prop_names = A_diffusion_coefficient
prop_values = 5
[]
[diffusivity_B]
type = ADGenericConstantMaterial
prop_names = B_diffusion_coefficient
prop_values = 1
[]
[diff_combined]
type = ADLevelSetBiMaterialReal
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = diffusion_coefficient
[]
[]
[BCs]
# Define boundary conditions
[left_u]
type = ADDirichletBC
variable = u
value = 2
boundary = left
[]
[right_u]
type = ADNeumannBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_tol = 1e-3
nl_max_its = 15
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
start_time = 0.0
dt = 1
num_steps = 5
max_xfem_update = 1
[]
[Outputs]
file_base = phase_transition_2d_out
execute_on = timestep_end
exodus = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/substepping/ad_power_law_creep.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
[]
[]
[AuxVariables]
[temp]
initial_condition = 1000.0
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
generate_output = 'stress_zz elastic_strain_zz creep_strain_zz'
use_automatic_differentiation = true
[]
[]
[Functions]
[front_pull]
type = PiecewiseLinear
x = '0 1'
y = '0 1'
scale_factor = 0.5
[]
[]
[BCs]
[u_front_pull]
type = ADFunctionDirichletBC
variable = disp_z
boundary = front
function = front_pull
[]
[uz_back_fix]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
[u_yz_fix]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[u_xz_fix]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 2e11
poissons_ratio = 0.3
[]
[radial_return_stress]
type = ADComputeMultipleInelasticStress
inelastic_models = 'power_law_creep'
[]
[power_law_creep]
type = ADPowerLawCreepStressUpdate
coefficient = 1.0e-15
n_exponent = 4
activation_energy = 0.0
temperature = temp
# options for using substepping
substep_strain_tolerance = 0.1
max_inelastic_increment = 0.01
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type '
petsc_options_value = 'lu '
line_search = 'none'
nl_max_its = 10
nl_rel_tol = 1e-6
nl_abs_tol = 1e-10
end_time = 0.1
dt = 0.1
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/ad_isotropic_elasticity_tensor/youngs_modulus_poissons_ratio_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxVariables]
[./stress_11]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = SMALL
add_variables = true
use_automatic_differentiation = true
[../]
[]
[AuxKernels]
[./stress_11]
type = ADRankTwoAux
variable = stress_11
rank_two_tensor = stress
index_j = 1
index_i = 1
[../]
[]
[BCs]
[./bottom]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0
[../]
[./left]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./back]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0
[../]
[./top]
type = ADDirichletBC
variable = disp_y
boundary = top
value = 0.001
[../]
[]
[Materials]
[./stress]
type = ADComputeLinearElasticStress
[../]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
poissons_ratio = 0.1
youngs_modulus = 1e6
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
l_max_its = 20
nl_max_its = 10
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/ad_2D_geometries/3D-RZ_finiteStrain_test.i)
# Considers the mechanics solution for a thick spherical shell that is uniformly
# pressurized on the inner and outer surfaces, using 3D geometry.
#
# From Roark (Formulas for Stress and Strain, McGraw-Hill, 1975), the radially-dependent
# circumferential stress in a uniformly pressurized thick spherical shell is given by:
#
# S(r) = [ Pi[ri^3(2r^3+ro^3)] - Po[ro^3(2r^3+ri^3)] ] / [2r^3(ro^3-ri^3)]
#
# where:
# Pi = inner pressure
# Po = outer pressure
# ri = inner radius
# ro = outer radius
#
# The tests assume an inner and outer radii of 5 and 10, with internal and external
# pressures of 100000 and 200000 at t = 1.0, respectively. The resulting compressive
# tangential stress is largest at the inner wall and, from the above equation, has a
# value of -271429.
#
# RESULTS are below. Since stresses are average element values, values for the
# edge element and one-element-in are used to extrapolate the stress to the
# inner surface. The vesrion of the tests that are checked use the coarsest meshes.
#
# Mesh Radial elem S(edge elem) S(one elem in) S(extrap to surf)
# 1D-SPH
# 2D-RZ 12 (x10) -265004 -254665 -270174
# 3D 12 (6x6) -261880 -252811 -266415
#
# 1D-SPH
# 2D-RZ 48 (x10) -269853 -266710 -271425
# 3D 48 (10x10) -268522 -265653 -269957
#
# The numerical solution converges to the analytical solution as the mesh is
# refined.
[Mesh]
file = 3D_mesh.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
block = 1
use_displaced_mesh = true
use_automatic_differentiation = true
[../]
[]
[AuxVariables]
[./stress_theta]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_theta]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_theta]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = stress_theta
execute_on = timestep_end
[../]
[./strain_theta]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 2
index_j = 2
variable = strain_theta
execute_on = timestep_end
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.345
block = 1
[../]
[./elastic_strain]
type = ADComputeFiniteStrainElasticStress
block = 1
[../]
[]
[BCs]
# pin particle along symmetry planes
[./no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = xzero
value = 0.0
[../]
[./no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = yzero
value = 0.0
[../]
[./no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = zzero
value = 0.0
[../]
# exterior and internal pressures
[./exterior_pressure_x]
type = ADPressure
variable = disp_x
boundary = outer
component = 0
function = '200000*t'
[../]
[./exterior_pressure_y]
type = ADPressure
variable = disp_y
boundary = outer
component = 1
function = '200000*t'
[../]
[./exterior_pressure_z]
type = ADPressure
variable = disp_z
boundary = outer
component = 2
function = '200000*t'
[../]
[./interior_pressure_x]
type = ADPressure
variable = disp_x
boundary = inner
component = 0
function = '100000*t'
[../]
[./interior_pressure_y]
type = ADPressure
variable = disp_y
boundary = inner
component = 1
function = '100000*t'
[../]
[./interior_pressure_z]
type = ADPressure
variable = disp_z
boundary = inner
component = 2
function = '100000*t'
[../]
[]
[Debug]
show_var_residual_norms = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = ' 201 hypre boomeramg 10'
line_search = 'none'
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
nl_rel_tol = 5e-9
nl_abs_tol = 1e-10
nl_max_its = 15
l_tol = 1e-3
l_max_its = 50
start_time = 0.0
end_time = 0.2
dt = 0.1
[]
[Postprocessors]
[./strainTheta]
type = ElementAverageValue
variable = strain_theta
[../]
[./stressTheta]
type = ElementAverageValue
variable = stress_theta
[../]
[./stressTheta_pt]
type = PointValue
point = '5.0 0.0 0.0'
#bottom inside edge for comparison to theory; use csv = true
variable = stress_theta
[../]
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/scalar_material_damage/ad_combined_scalar_damage.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
elem_type = HEX8
[]
[AuxVariables]
[damage_index]
order = CONSTANT
family = MONOMIAL
[]
[damage_index_a]
order = CONSTANT
family = MONOMIAL
[]
[damage_index_b]
order = CONSTANT
family = MONOMIAL
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = SMALL
incremental = true
add_variables = true
generate_output = 'stress_xx strain_xx'
use_automatic_differentiation = true
[]
[]
[AuxKernels]
[damage_index]
type = ADMaterialRealAux
variable = damage_index
property = damage_index
execute_on = timestep_end
[]
[damage_index_a]
type = ADMaterialRealAux
variable = damage_index_a
property = damage_index_a
execute_on = timestep_end
[]
[damage_index_b]
type = ADMaterialRealAux
variable = damage_index_b
property = damage_index_b
execute_on = timestep_end
[]
[]
[BCs]
[symmy]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[symmx]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0
[]
[symmz]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0
[]
[axial_load]
type = ADDirichletBC
variable = disp_x
boundary = right
value = 0.01
[]
[]
[Functions]
[damage_evolution_a]
type = PiecewiseLinear
xy_data = '0.0 0.0
0.1 0.0
2.1 2.0'
[]
[damage_evolution_b]
type = PiecewiseLinear
xy_data = '0.0 0.2
0.1 0.2
2.1 0.7'
[]
[]
[Materials]
[damage_index_a]
type = ADGenericFunctionMaterial
prop_names = damage_index_prop_a
prop_values = damage_evolution_a
[]
[damage_index_b]
type = ADGenericFunctionMaterial
prop_names = damage_index_prop_b
prop_values = damage_evolution_b
[]
[damage_a]
type = ADScalarMaterialDamage
damage_index = damage_index_prop_a
damage_index_name = damage_index_a
[]
[damage_b]
type = ADScalarMaterialDamage
damage_index = damage_index_prop_b
damage_index_name = damage_index_b
[]
[damage]
type = ADCombinedScalarDamage
damage_models = 'damage_a damage_b'
[]
[stress]
type = ADComputeDamageStress
damage_model = damage
[]
[elasticity]
type = ADComputeIsotropicElasticityTensor
poissons_ratio = 0.2
youngs_modulus = 10e9
[]
[]
[Postprocessors]
[stress_xx]
type = ElementAverageValue
variable = stress_xx
[]
[strain_xx]
type = ElementAverageValue
variable = strain_xx
[]
[damage_index]
type = ElementAverageValue
variable = damage_index
[]
[damage_index_a]
type = ElementAverageValue
variable = damage_index_a
[]
[damage_index_b]
type = ElementAverageValue
variable = damage_index_b
[]
[]
[Executioner]
type = Transient
l_max_its = 50
l_tol = 1e-8
nl_max_its = 20
nl_rel_tol = 1e-12
nl_abs_tol = 1e-8
dt = 0.1
dtmin = 0.1
end_time = 1.1
[]
[Outputs]
csv=true
[]
(tutorials/tutorial01_app_development/step02_input_file/problems/pressure_diffusion.i)
[Mesh]
type = GeneratedMesh # Can generate simple lines, rectangles and rectangular prisms
dim = 2 # Dimension of the mesh
nx = 100 # Number of elements in the x direction
ny = 10 # Number of elements in the y direction
xmax = 0.304 # Length of test chamber
ymax = 0.0257 # Test chamber radius
[]
[Problem]
type = FEProblem # This is the "normal" type of Finite Element Problem in MOOSE
coord_type = RZ # Axisymmetric RZ
rz_coord_axis = X # Which axis the symmetry is around
[]
[Variables]
[pressure]
# Adds a Linear Lagrange variable by default
[]
[]
[Kernels]
[diffusion]
type = ADDiffusion # Laplacian operator
variable = pressure # Operate on the "pressure" variable from above
[]
[]
[BCs]
[inlet]
type = ADDirichletBC # Simple u=value BC
variable = pressure # Variable to be set
boundary = left # Name of a sideset in the mesh
value = 4000 # (Pa) From Figure 2 from paper. First data point for 1mm spheres.
[]
[outlet]
type = ADDirichletBC
variable = pressure
boundary = right
value = 0 # (Pa) Gives the correct pressure drop from Figure 2 for 1mm spheres
[]
[]
[Executioner]
type = Steady # Steady state problem
solve_type = NEWTON # Perform a Newton solve
# Set PETSc parameters to optimize solver efficiency
petsc_options_iname = '-pc_type -pc_hypre_type' # PETSc option pairs with values below
petsc_options_value = ' hypre boomeramg'
[]
[Outputs]
exodus = true # Output Exodus format
[]
(modules/stochastic_tools/examples/parameter_study/diffusion.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables/T]
initial_condition = 300
[]
[Kernels]
[time]
type = ADTimeDerivative
variable = T
[]
[diff]
type = ADMatDiffusion
variable = T
diffusivity = diffusivity
[]
[source]
type = ADBodyForce
variable = T
value = 100
function = 1
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = T
boundary = left
value = 300
[]
[right]
type = ADNeumannBC
variable = T
boundary = right
value = -100
[]
[]
[Materials/constant]
type = ADGenericConstantMaterial
prop_names = 'diffusivity'
prop_values = 1
[]
[Executioner]
type = Transient
num_steps = 4
dt = 0.25
[]
[Postprocessors]
[T_avg]
type = ElementAverageValue
variable = T
execute_on = 'initial timestep_end'
[]
[q_left]
type = ADSideDiffusiveFluxAverage
variable = T
boundary = left
diffusivity = diffusivity
execute_on = 'initial timestep_end'
[]
[]
[Controls/stochastic]
type = SamplerReceiver
[]
[Outputs]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/closed_gap_prescribed_pressure.i)
## Units in the input file: m-Pa-s-K
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmax = 1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmin = 1
xmax = 2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Variables]
[temperature]
initial_condition = 525.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 100.0
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
block = 'right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 800
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 250
boundary = 'fixed_block_right'
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed'
[]
[]
[Materials]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_hardness'
prop_values = '8e3 16.2 129' ## for stainless steel 304
block = 'left_block'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 15' #for 99% pure Al
block = 'right_block'
[]
[]
[UserObjects]
[closed]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[steel_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_primary_subdomain
[]
[aluminum_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = false
nl_rel_tol = 1e-14
nl_max_its = 20
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/ad_smeared_cracking/cracking.i)
#
# Simple pull test for cracking.
# The stress increases for two steps and then drops to zero.
[Mesh]
file = cracking_test.e
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Functions]
[./displ]
type = PiecewiseLinear
x = '0 1 2 3 4'
y = '0 1 0 -1 0'
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_zx'
use_automatic_differentiation = true
[../]
[]
[BCs]
[./pull]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 4
function = displ
[../]
[./left]
type = ADDirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./bottom]
type = ADDirichletBC
variable = disp_y
boundary = 2
value = 0.0
[../]
[./back]
type = ADDirichletBC
variable = disp_z
boundary = 3
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 2.8e7
poissons_ratio = 0
[../]
[./elastic_stress]
type = ADComputeSmearedCrackingStress
cracking_stress = 1.68e6
softening_models = abrupt_softening
[../]
[./abrupt_softening]
type = ADAbruptSoftening
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
petsc_options_iname = '-ksp_gmres_restart -pc_type -sub_pc_type'
petsc_options_value = '101 asm lu'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
l_tol = 1e-5
start_time = 0.0
end_time = 0.1
dt = 0.025
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/additive_manufacturing/check_element_addition_by_variable.i)
[Problem]
kernel_coverage_check = false
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 2.0
ymin = 0
ymax = 2.0
zmin = 0
zmax = 2.0
nx = 10
ny = 10
nz = 10
[]
[left_domain]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '2 2 1'
block_id = 1
[]
[right_domain]
input = left_domain
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 1'
top_right = '2 2 2'
block_id = 2
[]
[sidesets]
input = right_domain
type = SideSetsAroundSubdomainGenerator
normal = '0 0 1'
block = 1
new_boundary = 'moving_interface'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
block = '1 2'
[]
[Modules/TensorMechanics/Master]
[all]
# strain = FINITE
add_variables = true
generate_output = 'stress_zz strain_zz'
block = '1 2'
use_automatic_differentiation = true
[]
[]
[Materials]
[elasticity]
type = ADComputeVariableIsotropicElasticityTensor
poissons_ratio = 0.3
youngs_modulus = 1e3
block = '1 2'
[]
[stress]
type = ADComputeLinearElasticStress
block = '1 2'
[]
[]
[Functions]
[front_pull]
type = PiecewiseLinear
x = '0 1'
y = '0 1'
scale_factor = 0.5
[]
[]
[BCs]
[disp_front_pull]
type = ADFunctionDirichletBC
variable = disp_z
boundary = front
function = front_pull
[]
[uz_back_fix]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
[u_yz_fix]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[u_xz_fix]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
automatic_scaling = true
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_max_its = 10
nl_max_its = 20
nl_rel_tol = 1e-4
start_time = 0.0
end_time = 1.0
dt = 1e-1
dtmin = 1e-4
[]
[UserObjects]
[activated_elem_uo]
type = ActivateElementsCoupled
execute_on = timestep_begin
coupled_var = strain_zz
activate_value = 0.05
active_subdomain_id = 1
expand_boundary_name = 'moving_interface'
[]
[]
[Outputs]
exodus = true
[]