- eigen_baseVector of values defining the constant base tensor for the Eigenstrain
C++ Type:std::vector<double>
Controllable:No
Description:Vector of values defining the constant base tensor for the Eigenstrain
- eigenstrain_nameMaterial property name for the eigenstrain tensor computed by this model. IMPORTANT: The name of this property must also be provided to the strain calculator.
C++ Type:std::string
Controllable:No
Description:Material property name for the eigenstrain tensor computed by this model. IMPORTANT: The name of this property must also be provided to the strain calculator.
Compute Eigenstrain
Computes a constant Eigenstrain
Description
The class ComputeEigenstrain
allows the user to specify a constant value of an eigenstrain for a simulation. The eigenstrain is added to the mechanical strain, which can be elastic or inelastic, before computing the corresponding stress measure:
Eigenstrain is the term given to a strain which does not result directly from an applied force. Chapter 3 of Qu and Cherkaoui (2006) describes the relationship between total, elastic, and eigen- strains and provides examples using thermal expansion and dislocations. Eigenstrains are also referred to as residual strains, stress-free strains, or intrinsic strains; translated from German, Eigen means own or intrinsic in English. The term eigenstrain was introduced by Mura (1982).
Based on the number and values of constants provided as the argument to the eigen_base
parameter, ComputeEigenstrain
will build an isotropic, symmetric, or skew-symmetric Rank-2 eigenstrain tensor.
Example Input File Syntax
[./eigen]
type = ComputeEigenstrain
eigenstrain_name = eigen_true
eigen_base = '1e-3 1e-3 1e-3 0 0 0'
[../]
(modules/solid_mechanics/test/tests/visco/gen_kv_driving.i)Input Parameters
- base_nameOptional parameter that allows the user to define multiple mechanics material systems on the same block, i.e. for multiple phases
C++ Type:std::string
Controllable:No
Description:Optional parameter that allows the user to define multiple mechanics material systems on the same block, i.e. for multiple phases
- blockThe list of blocks (ids or names) that this object will be applied
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:The list of blocks (ids or names) that this object will be applied
- boundaryThe list of boundaries (ids or names) from the mesh where this object applies
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The list of boundaries (ids or names) from the mesh where this object applies
- computeTrueWhen false, MOOSE will not call compute methods on this material. The user must call computeProperties() after retrieving the MaterialBase via MaterialBasePropertyInterface::getMaterialBase(). Non-computed MaterialBases are not sorted for dependencies.
Default:True
C++ Type:bool
Controllable:No
Description:When false, MOOSE will not call compute methods on this material. The user must call computeProperties() after retrieving the MaterialBase via MaterialBasePropertyInterface::getMaterialBase(). Non-computed MaterialBases are not sorted for dependencies.
- constant_onNONEWhen ELEMENT, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps.When SUBDOMAIN, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps. Evaluations on element qps will be skipped
Default:NONE
C++ Type:MooseEnum
Options:NONE, ELEMENT, SUBDOMAIN
Controllable:No
Description:When ELEMENT, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps.When SUBDOMAIN, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps. Evaluations on element qps will be skipped
- declare_suffixAn optional suffix parameter that can be appended to any declared properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Controllable:No
Description:An optional suffix parameter that can be appended to any declared properties. The suffix will be prepended with a '_' character.
- prefactor1Name of material property defining the variable dependence
Default:1
C++ Type:MaterialPropertyName
Controllable:No
Description:Name of material property defining the variable dependence
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Default:False
C++ Type:bool
Controllable:No
Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Optional Parameters
- 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
- output_propertiesList of material properties, from this material, to output (outputs must also be defined to an output type)
C++ Type:std::vector<std::string>
Controllable:No
Description:List of material properties, from this material, to output (outputs must also be defined to an output type)
- outputsnone Vector of output names where you would like to restrict the output of variables(s) associated with this object
Default:none
C++ Type:std::vector<OutputName>
Controllable:No
Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object
Outputs Parameters
Input Files
- (modules/combined/examples/phase_field-mechanics/Pattern1.i)
- (modules/contact/test/tests/mortar_tm/2drz/frictionless_second/finite.i)
- (modules/contact/test/tests/mortar_tm/2drz/frictionless_first/small.i)
- (modules/contact/test/tests/mortar_tm/2drz/frictionless_second/finite_rr.i)
- (modules/contact/test/tests/mortar_tm/2drz/ad_frictionless_second/finite.i)
- (modules/solid_mechanics/test/tests/ad_linear_elasticity/thermal_expansion.i)
- (modules/combined/test/tests/multiphase_mechanics/twophasestress.i)
- (modules/solid_mechanics/test/tests/visco/gen_kv_driving.i)
- (modules/contact/test/tests/mortar_tm/2drz/ad_frictionless_second/finite_rr.i)
- (modules/combined/examples/publications/rapid_dev/fig7a.i)
- (modules/solid_mechanics/test/tests/visco/gen_maxwell_driving.i)
- (modules/contact/test/tests/mortar_tm/2drz/ad_frictionless_second/small.i)
- (modules/contact/test/tests/mortar_tm/2drz/frictionless_second/small.i)
- (modules/combined/test/tests/multiphase_mechanics/multiphasestress.i)
- (modules/contact/test/tests/mortar_tm/2drz/ad_frictionless_first/finite.i)
- (modules/solid_mechanics/test/tests/ad_linear_elasticity/applied_strain.i)
- (modules/combined/examples/phase_field-mechanics/Nonconserved.i)
- (modules/contact/test/tests/mortar_tm/2drz/ad_frictionless_first/finite_rr.i)
- (modules/combined/examples/phase_field-mechanics/kks_mechanics_VTS.i)
- (modules/combined/test/tests/linear_elasticity/applied_strain.i)
- (modules/contact/test/tests/mortar_tm/2drz/frictionless_first/finite.i)
- (modules/contact/test/tests/mortar_tm/2drz/frictionless_first/finite_rr.i)
- (modules/contact/test/tests/mortar_tm/2drz/ad_frictionless_first/small.i)
- (modules/combined/test/tests/linear_elasticity/thermal_expansion.i)
References
- Toshio Mura.
General theory of eigenstrains.
In Micromechanics of Defects in Solids, pages 1–62.
Springer, 1982.[BibTeX]
@incollection{mura1982general, author = "Mura, Toshio", title = "General theory of eigenstrains", booktitle = "Micromechanics of Defects in Solids", pages = "1--62", year = "1982", publisher = "Springer" }
- Jianmin Qu and Mohammed Cherkaoui.
Fundamentals of micromechanics of solids.
Wiley Online Library, 2006.[BibTeX]
@book{qu2006fundamentals, author = "Qu, Jianmin and Cherkaoui, Mohammed", title = "Fundamentals of micromechanics of solids", year = "2006", publisher = "Wiley Online Library" }
(modules/solid_mechanics/test/tests/visco/gen_kv_driving.i)
# Represents a unique Maxwell module with E = 10GPa and eta = 10 days with an imposed eigenstrain alpha = 0.001.
# The behavior is set up so that the creep strain is driven by both the elastic stress and the internal
# stress induced by the eigenstrain (E * alpha).
#
# In this test, the specimen is free of external stress (sigma = 0) so the creep deformation only derives from
# the eigenstrain. The total strain to be expected is:
# epsilon = alpha * (1 + t / eta)
# Both the stress and the elastic strain are 0.
#
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
elem_type = HEX8
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./creep_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
variable = stress_xx
rank_two_tensor = stress
index_j = 0
index_i = 0
execute_on = timestep_end
[../]
[./strain_xx]
type = RankTwoAux
variable = strain_xx
rank_two_tensor = total_strain
index_j = 0
index_i = 0
execute_on = timestep_end
[../]
[./creep_strain_xx]
type = RankTwoAux
variable = creep_strain_xx
rank_two_tensor = creep_strain
index_j = 0
index_i = 0
execute_on = timestep_end
[../]
[]
[BCs]
[./symmy]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[../]
[./symmx]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./symmz]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[../]
[]
[Materials]
[./eigen]
type = ComputeEigenstrain
eigenstrain_name = eigen_true
eigen_base = '1e-3 1e-3 1e-3 0 0 0'
[../]
[./kelvin_voigt]
type = GeneralizedKelvinVoigtModel
creep_modulus = ''
creep_viscosity = '10'
poisson_ratio = 0.2
young_modulus = 10e9
driving_eigenstrain = eigen_true
[../]
[./stress]
type = ComputeMultipleInelasticStress
inelastic_models = 'creep'
[../]
[./creep]
type = LinearViscoelasticStressUpdate
[../]
[./strain]
type = ComputeIncrementalSmallStrain
displacements = 'disp_x disp_y disp_z'
eigenstrain_names = 'eigen_true'
[../]
[]
[UserObjects]
[./update]
type = LinearViscoelasticityManager
viscoelastic_model = kelvin_voigt
[../]
[]
[Postprocessors]
[./stress_xx]
type = ElementAverageValue
variable = stress_xx
block = 'ANY_BLOCK_ID 0'
[../]
[./strain_xx]
type = ElementAverageValue
variable = strain_xx
block = 'ANY_BLOCK_ID 0'
[../]
[./creep_strain_xx]
type = ElementAverageValue
variable = creep_strain_xx
block = 'ANY_BLOCK_ID 0'
[../]
[]
[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-11
nl_abs_tol = 1e-8
dtmin = 0.01
end_time = 100
[./TimeStepper]
type = LogConstantDT
first_dt = 0.1
log_dt = 0.1
[../]
[]
[Outputs]
file_base = gen_kv_driving_out
exodus = true
[]
(modules/combined/examples/phase_field-mechanics/Pattern1.i)
#
# Pattern example 1
#
# Phase changes driven by a combination mechanical (elastic) and chemical
# driving forces. In this three phase system a matrix phase, an oversized and
# an undersized precipitate phase compete. The chemical free energy favors a
# phase separation into either precipitate phase. A mix of both precipitate
# emerges to balance lattice expansion and contraction.
#
# This example demonstrates the use of
# * ACMultiInterface
# * SwitchingFunctionConstraintEta and SwitchingFunctionConstraintLagrange
# * DerivativeParsedMaterial
# * ElasticEnergyMaterial
# * DerivativeMultiPhaseMaterial
# * MultiPhaseStressMaterial
# which are the components to se up a phase field model with an arbitrary number
# of phases
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 80
ny = 80
nz = 0
xmin = -20
xmax = 20
ymin = -20
ymax = 20
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[GlobalParams]
# CahnHilliard needs the third derivatives
derivative_order = 3
enable_jit = true
displacements = 'disp_x disp_y'
[]
# AuxVars to compute the free energy density for outputting
[AuxVariables]
[./local_energy]
order = CONSTANT
family = MONOMIAL
[../]
[./cross_energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./local_free_energy]
type = TotalFreeEnergy
variable = local_energy
interfacial_vars = 'c'
kappa_names = 'kappa_c'
additional_free_energy = cross_energy
[../]
[./cross_terms]
type = CrossTermGradientFreeEnergy
variable = cross_energy
interfacial_vars = 'eta1 eta2 eta3'
kappa_names = 'kappa11 kappa12 kappa13
kappa21 kappa22 kappa23
kappa31 kappa32 kappa33'
[../]
[]
[Variables]
# Solute concentration variable
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = 0
max = 0.8
seed = 1235
[../]
[../]
# Order parameter for the Matrix
[./eta1]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[../]
# Order parameters for the 2 different inclusion orientations
[./eta2]
order = FIRST
family = LAGRANGE
initial_condition = 0.1
[../]
[./eta3]
order = FIRST
family = LAGRANGE
initial_condition = 0.1
[../]
# Mesh displacement
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
# Lagrange-multiplier
[./lambda]
order = FIRST
family = LAGRANGE
initial_condition = 1.0
[../]
[]
[Kernels]
# Set up stress divergence kernels
[./TensorMechanics]
[../]
# Cahn-Hilliard kernels
[./c_res]
type = CahnHilliard
variable = c
f_name = F
args = 'eta1 eta2 eta3'
[../]
[./time]
type = TimeDerivative
variable = c
[../]
# Allen-Cahn and Lagrange-multiplier constraint kernels for order parameter 1
[./deta1dt]
type = TimeDerivative
variable = eta1
[../]
[./ACBulk1]
type = AllenCahn
variable = eta1
args = 'eta2 eta3 c'
mob_name = L1
f_name = F
[../]
[./ACInterface1]
type = ACMultiInterface
variable = eta1
etas = 'eta1 eta2 eta3'
mob_name = L1
kappa_names = 'kappa11 kappa12 kappa13'
[../]
[./lagrange1]
type = SwitchingFunctionConstraintEta
variable = eta1
h_name = h1
lambda = lambda
[../]
# Allen-Cahn and Lagrange-multiplier constraint kernels for order parameter 2
[./deta2dt]
type = TimeDerivative
variable = eta2
[../]
[./ACBulk2]
type = AllenCahn
variable = eta2
args = 'eta1 eta3 c'
mob_name = L2
f_name = F
[../]
[./ACInterface2]
type = ACMultiInterface
variable = eta2
etas = 'eta1 eta2 eta3'
mob_name = L2
kappa_names = 'kappa21 kappa22 kappa23'
[../]
[./lagrange2]
type = SwitchingFunctionConstraintEta
variable = eta2
h_name = h2
lambda = lambda
[../]
# Allen-Cahn and Lagrange-multiplier constraint kernels for order parameter 3
[./deta3dt]
type = TimeDerivative
variable = eta3
[../]
[./ACBulk3]
type = AllenCahn
variable = eta3
args = 'eta1 eta2 c'
mob_name = L3
f_name = F
[../]
[./ACInterface3]
type = ACMultiInterface
variable = eta3
etas = 'eta1 eta2 eta3'
mob_name = L3
kappa_names = 'kappa31 kappa32 kappa33'
[../]
[./lagrange3]
type = SwitchingFunctionConstraintEta
variable = eta3
h_name = h3
lambda = lambda
[../]
# Lagrange-multiplier constraint kernel for lambda
[./lagrange]
type = SwitchingFunctionConstraintLagrange
variable = lambda
etas = 'eta1 eta2 eta3'
h_names = 'h1 h2 h3'
epsilon = 1e-6
[../]
[]
[Materials]
# declare a few constants, such as mobilities (L,M) and interface gradient prefactors (kappa*)
[./consts]
type = GenericConstantMaterial
prop_names = 'M kappa_c L1 L2 L3 kappa11 kappa12 kappa13 kappa21 kappa22 kappa23 kappa31 kappa32 kappa33'
prop_values = '0.2 0 1 1 1 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 '
[../]
# We use this to output the level of constraint enforcement
# ideally it should be 0 everywhere, if the constraint is fully enforced
[./etasummat]
type = ParsedMaterial
property_name = etasum
coupled_variables = 'eta1 eta2 eta3'
material_property_names = 'h1 h2 h3'
expression = 'h1+h2+h3-1'
outputs = exodus
[../]
# This parsed material creates a single property for visualization purposes.
# It will be 0 for phase 1, -1 for phase 2, and 1 for phase 3
[./phasemap]
type = ParsedMaterial
property_name = phase
coupled_variables = 'eta2 eta3'
expression = 'if(eta3>0.5,1,0)-if(eta2>0.5,1,0)'
outputs = exodus
[../]
# matrix phase
[./elasticity_tensor_1]
type = ComputeElasticityTensor
base_name = phase1
C_ijkl = '3 3'
fill_method = symmetric_isotropic
[../]
[./strain_1]
type = ComputeSmallStrain
base_name = phase1
displacements = 'disp_x disp_y'
[../]
[./stress_1]
type = ComputeLinearElasticStress
base_name = phase1
[../]
# oversized phase
[./elasticity_tensor_2]
type = ComputeElasticityTensor
base_name = phase2
C_ijkl = '7 7'
fill_method = symmetric_isotropic
[../]
[./strain_2]
type = ComputeSmallStrain
base_name = phase2
displacements = 'disp_x disp_y'
eigenstrain_names = eigenstrain
[../]
[./stress_2]
type = ComputeLinearElasticStress
base_name = phase2
[../]
[./eigenstrain_2]
type = ComputeEigenstrain
base_name = phase2
eigen_base = '0.02'
eigenstrain_name = eigenstrain
[../]
# undersized phase
[./elasticity_tensor_3]
type = ComputeElasticityTensor
base_name = phase3
C_ijkl = '7 7'
fill_method = symmetric_isotropic
[../]
[./strain_3]
type = ComputeSmallStrain
base_name = phase3
displacements = 'disp_x disp_y'
eigenstrain_names = eigenstrain
[../]
[./stress_3]
type = ComputeLinearElasticStress
base_name = phase3
[../]
[./eigenstrain_3]
type = ComputeEigenstrain
base_name = phase3
eigen_base = '-0.05'
eigenstrain_name = eigenstrain
[../]
# switching functions
[./switching1]
type = SwitchingFunctionMaterial
function_name = h1
eta = eta1
h_order = SIMPLE
[../]
[./switching2]
type = SwitchingFunctionMaterial
function_name = h2
eta = eta2
h_order = SIMPLE
[../]
[./switching3]
type = SwitchingFunctionMaterial
function_name = h3
eta = eta3
h_order = SIMPLE
[../]
[./barrier]
type = MultiBarrierFunctionMaterial
etas = 'eta1 eta2 eta3'
[../]
# chemical free energies
[./chemical_free_energy_1]
type = DerivativeParsedMaterial
property_name = Fc1
expression = '4*c^2'
coupled_variables = 'c'
derivative_order = 2
[../]
[./chemical_free_energy_2]
type = DerivativeParsedMaterial
property_name = Fc2
expression = '(c-0.9)^2-0.4'
coupled_variables = 'c'
derivative_order = 2
[../]
[./chemical_free_energy_3]
type = DerivativeParsedMaterial
property_name = Fc3
expression = '(c-0.9)^2-0.5'
coupled_variables = 'c'
derivative_order = 2
[../]
# elastic free energies
[./elastic_free_energy_1]
type = ElasticEnergyMaterial
base_name = phase1
f_name = Fe1
derivative_order = 2
args = 'c' # should be empty
[../]
[./elastic_free_energy_2]
type = ElasticEnergyMaterial
base_name = phase2
f_name = Fe2
derivative_order = 2
args = 'c' # should be empty
[../]
[./elastic_free_energy_3]
type = ElasticEnergyMaterial
base_name = phase3
f_name = Fe3
derivative_order = 2
args = 'c' # should be empty
[../]
# phase free energies (chemical + elastic)
[./phase_free_energy_1]
type = DerivativeSumMaterial
property_name = F1
sum_materials = 'Fc1 Fe1'
coupled_variables = 'c'
derivative_order = 2
[../]
[./phase_free_energy_2]
type = DerivativeSumMaterial
property_name = F2
sum_materials = 'Fc2 Fe2'
coupled_variables = 'c'
derivative_order = 2
[../]
[./phase_free_energy_3]
type = DerivativeSumMaterial
property_name = F3
sum_materials = 'Fc3 Fe3'
coupled_variables = 'c'
derivative_order = 2
[../]
# global free energy
[./free_energy]
type = DerivativeMultiPhaseMaterial
f_name = F
fi_names = 'F1 F2 F3'
hi_names = 'h1 h2 h3'
etas = 'eta1 eta2 eta3'
coupled_variables = 'c'
W = 3
[../]
# Generate the global stress from the phase stresses
[./global_stress]
type = MultiPhaseStressMaterial
phase_base = 'phase1 phase2 phase3'
h = 'h1 h2 h3'
[../]
[]
[BCs]
# the boundary conditions on the displacement enforce periodicity
# at zero total shear and constant volume
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = 'top'
value = 0
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = 'right'
value = 0
[../]
[./Periodic]
[./disp_x]
auto_direction = 'y'
[../]
[./disp_y]
auto_direction = 'x'
[../]
# all other phase field variables are fully periodic
[./c]
auto_direction = 'x y'
[../]
[./eta1]
auto_direction = 'x y'
[../]
[./eta2]
auto_direction = 'x y'
[../]
[./eta3]
auto_direction = 'x y'
[../]
[./lambda]
auto_direction = 'x y'
[../]
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
# We monitor the total free energy and the total solute concentration (should be constant)
[Postprocessors]
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
variable = local_energy
[../]
[./total_solute]
type = ElementIntegralVariablePostprocessor
variable = c
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm ilu'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-10
start_time = 0.0
num_steps = 200
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.1
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[./table]
type = CSV
delimiter = ' '
[../]
[]
[Debug]
# show_var_residual_norms = true
[]
(modules/contact/test/tests/mortar_tm/2drz/frictionless_second/finite.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'finite'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = 0
ymax = 10
nx = 2
ny = 33
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
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]
[block]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'block'
[]
[plank]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
preset = false
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = block_right
value = 0
[]
[right_y]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = 'plank block'
[]
[swell]
type = ComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[]
[swell_mat]
type = GenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 3
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[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'
[]
[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'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/mortar_tm/2drz/frictionless_first/small.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'small'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
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.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
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]
[block]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'block'
[]
[plank]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1.0e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = DirichletBC
variable = disp_x
boundary = block_right
value = 0
[]
[right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ComputeLinearElasticStress
block = 'plank block'
[]
[swell]
type = ComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[]
[swell_mat]
type = GenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 10
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[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'
[]
[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'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/mortar_tm/2drz/frictionless_second/finite_rr.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'finite_rr'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = 0
ymax = 10
nx = 2
ny = 33
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
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]
[block]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'block'
extra_vector_tags = 'ref'
[]
[plank]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
extra_vector_tags = 'ref'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
preset = false
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = block_right
value = 0
[]
[right_y]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = 'plank block'
[]
[swell]
type = ComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[]
[swell_mat]
type = GenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 3
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
nl_abs_tol = 1e-12
[]
[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'
[]
[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'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/mortar_tm/2drz/ad_frictionless_second/finite.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'finite'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = 0
ymax = 10
nx = 2
ny = 33
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
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]
[block]
use_automatic_differentiation = true
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'block'
[]
[plank]
use_automatic_differentiation = true
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
preset = false
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = block_right
value = 0
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[]
[]
[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'
[]
[swell]
type = ADComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[]
[swell_mat]
type = ADGenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 3
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[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'
[]
[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'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/solid_mechanics/test/tests/ad_linear_elasticity/thermal_expansion.i)
# This input file is designed to test the RankTwoAux and RankFourAux
# auxkernels, which report values out of the Tensors used in materials
# properties.
# Materials properties into AuxVariables - these are elemental variables, not nodal variables.
[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 = 'stress_xx stress_yy stress_xy'
use_automatic_differentiation = true
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0
[../]
[./stress]
type = ADComputeLinearElasticStress
[../]
[./eigenstrain]
type = ADComputeEigenstrain
eigen_base = '1e-4'
eigenstrain_name = eigenstrain
[../]
[]
[BCs]
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_rel_tol = 1e-14
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/multiphase_mechanics/twophasestress.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = 0
xmax = 2
ymin = 0
ymax = 2
elem_type = QUAD4
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[AuxVariables]
[./eta]
[./InitialCondition]
type = FunctionIC
function = 'x/2'
[../]
[../]
[./e11_aux]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./matl_e11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = e11_aux
[../]
[]
[Kernels]
[./TensorMechanics]
[../]
[]
[Materials]
[./elasticity_tensor_A]
type = ComputeElasticityTensor
base_name = A
fill_method = symmetric9
C_ijkl = '1e6 1e5 1e5 1e6 0 1e6 .4e6 .2e6 .5e6'
[../]
[./strain_A]
type = ComputeSmallStrain
base_name = A
eigenstrain_names = eigenstrain
[../]
[./stress_A]
type = ComputeLinearElasticStress
base_name = A
[../]
[./eigenstrain_A]
type = ComputeEigenstrain
base_name = A
eigen_base = '0.1 0.05 0 0 0 0.01'
prefactor = -1
eigenstrain_name = eigenstrain
[../]
[./elasticity_tensor_B]
type = ComputeElasticityTensor
base_name = B
fill_method = symmetric9
C_ijkl = '1e6 0 0 1e6 0 1e6 .5e6 .5e6 .5e6'
[../]
[./strain_B]
type = ComputeSmallStrain
base_name = B
eigenstrain_names = 'B_eigenstrain'
[../]
[./stress_B]
type = ComputeLinearElasticStress
base_name = B
[../]
[./eigenstrain_B]
type = ComputeEigenstrain
base_name = B
eigen_base = '0.1 0.05 0 0 0 0.01'
prefactor = -1
eigenstrain_name = 'B_eigenstrain'
[../]
[./switching]
type = SwitchingFunctionMaterial
eta = eta
[../]
[./combined]
type = TwoPhaseStressMaterial
base_A = A
base_B = B
[../]
[]
[BCs]
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/solid_mechanics/test/tests/visco/gen_kv_driving.i)
# Represents a unique Maxwell module with E = 10GPa and eta = 10 days with an imposed eigenstrain alpha = 0.001.
# The behavior is set up so that the creep strain is driven by both the elastic stress and the internal
# stress induced by the eigenstrain (E * alpha).
#
# In this test, the specimen is free of external stress (sigma = 0) so the creep deformation only derives from
# the eigenstrain. The total strain to be expected is:
# epsilon = alpha * (1 + t / eta)
# Both the stress and the elastic strain are 0.
#
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
elem_type = HEX8
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./creep_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
variable = stress_xx
rank_two_tensor = stress
index_j = 0
index_i = 0
execute_on = timestep_end
[../]
[./strain_xx]
type = RankTwoAux
variable = strain_xx
rank_two_tensor = total_strain
index_j = 0
index_i = 0
execute_on = timestep_end
[../]
[./creep_strain_xx]
type = RankTwoAux
variable = creep_strain_xx
rank_two_tensor = creep_strain
index_j = 0
index_i = 0
execute_on = timestep_end
[../]
[]
[BCs]
[./symmy]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[../]
[./symmx]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./symmz]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[../]
[]
[Materials]
[./eigen]
type = ComputeEigenstrain
eigenstrain_name = eigen_true
eigen_base = '1e-3 1e-3 1e-3 0 0 0'
[../]
[./kelvin_voigt]
type = GeneralizedKelvinVoigtModel
creep_modulus = ''
creep_viscosity = '10'
poisson_ratio = 0.2
young_modulus = 10e9
driving_eigenstrain = eigen_true
[../]
[./stress]
type = ComputeMultipleInelasticStress
inelastic_models = 'creep'
[../]
[./creep]
type = LinearViscoelasticStressUpdate
[../]
[./strain]
type = ComputeIncrementalSmallStrain
displacements = 'disp_x disp_y disp_z'
eigenstrain_names = 'eigen_true'
[../]
[]
[UserObjects]
[./update]
type = LinearViscoelasticityManager
viscoelastic_model = kelvin_voigt
[../]
[]
[Postprocessors]
[./stress_xx]
type = ElementAverageValue
variable = stress_xx
block = 'ANY_BLOCK_ID 0'
[../]
[./strain_xx]
type = ElementAverageValue
variable = strain_xx
block = 'ANY_BLOCK_ID 0'
[../]
[./creep_strain_xx]
type = ElementAverageValue
variable = creep_strain_xx
block = 'ANY_BLOCK_ID 0'
[../]
[]
[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-11
nl_abs_tol = 1e-8
dtmin = 0.01
end_time = 100
[./TimeStepper]
type = LogConstantDT
first_dt = 0.1
log_dt = 0.1
[../]
[]
[Outputs]
file_base = gen_kv_driving_out
exodus = true
[]
(modules/contact/test/tests/mortar_tm/2drz/ad_frictionless_second/finite_rr.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'finite_rr'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = 0
ymax = 10
nx = 2
ny = 33
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
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]
[block]
use_automatic_differentiation = true
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'block'
extra_vector_tags = 'ref'
[]
[plank]
use_automatic_differentiation = true
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
extra_vector_tags = 'ref'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
preset = false
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = block_right
value = 0
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[]
[]
[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'
[]
[swell]
type = ADComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[]
[swell_mat]
type = ADGenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 3
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
nl_abs_tol = 1e-12
[]
[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'
[]
[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'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/combined/examples/publications/rapid_dev/fig7a.i)
#
# Fig. 7 input for 10.1016/j.commatsci.2017.02.017
# D. Schwen et al./Computational Materials Science 132 (2017) 36-45
# Solid gray curve (1)
# Eigenstrain and elastic energies ar computed per phase and then interpolated.
# Supply the RADIUS parameter (10-35) on the command line to generate data
# for all curves in the plot.
#
[Mesh]
type = GeneratedMesh
dim = 1
nx = 32
xmin = 0
xmax = 100
second_order = true
[]
[Problem]
coord_type = RSPHERICAL
[]
[GlobalParams]
displacements = 'disp_r'
[]
[Functions]
[./diff]
type = ParsedFunction
expression = '${RADIUS}-pos_c'
symbol_names = pos_c
symbol_values = pos_c
[../]
[]
# AuxVars to compute the free energy density for outputting
[AuxVariables]
[./local_energy]
order = CONSTANT
family = MONOMIAL
[../]
[./cross_energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./local_free_energy]
type = TotalFreeEnergy
variable = local_energy
interfacial_vars = 'c'
kappa_names = 'kappa_c'
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
[Variables]
# Solute concentration variable
[./c]
[./InitialCondition]
type = SmoothCircleIC
invalue = 1
outvalue = 0
x1 = 0
y1 = 0
radius = ${RADIUS}
int_width = 3
[../]
[../]
[./w]
[../]
# Phase order parameter
[./eta]
[./InitialCondition]
type = SmoothCircleIC
invalue = 1
outvalue = 0
x1 = 0
y1 = 0
radius = ${RADIUS}
int_width = 3
[../]
[../]
# Mesh displacement
[./disp_r]
order = SECOND
[../]
[./Fe_fit]
order = SECOND
[../]
[]
[Kernels]
# Set up stress divergence kernels
[./TensorMechanics]
[../]
# Split Cahn-Hilliard kernels
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
args = 'eta'
kappa_name = kappa_c
w = w
[../]
[./wres]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
# Allen-Cahn and Lagrange-multiplier constraint kernels for order parameter 1
[./detadt]
type = TimeDerivative
variable = eta
[../]
[./ACBulk1]
type = AllenCahn
variable = eta
args = 'c'
mob_name = L
f_name = F
[../]
[./ACInterface]
type = ACInterface
variable = eta
mob_name = L
kappa_name = kappa_eta
[../]
[./Fe]
type = MaterialPropertyValue
prop_name = Fe
variable = Fe_fit
[../]
[./autoadjust]
type = MaskedBodyForce
variable = w
function = diff
mask = mask
[../]
[]
[Materials]
# declare a few constants, such as mobilities (L,M) and interface gradient prefactors (kappa*)
[./consts]
type = GenericConstantMaterial
prop_names = 'M L kappa_c kappa_eta'
prop_values = '1.0 1.0 0.5 1'
[../]
# forcing function mask
[./mask]
type = ParsedMaterial
property_name = mask
expression = grad/dt
material_property_names = 'grad dt'
[../]
[./grad]
type = VariableGradientMaterial
variable = c
prop = grad
[../]
[./time]
type = TimeStepMaterial
[../]
# global mechanical properties
[./elasticity_tensor_1]
type = ComputeElasticityTensor
C_ijkl = '1 1'
base_name = phase1
fill_method = symmetric_isotropic
[../]
[./elasticity_tensor_2]
type = ComputeElasticityTensor
C_ijkl = '1 1'
base_name = phase2
fill_method = symmetric_isotropic
[../]
[./strain_1]
type = ComputeRSphericalSmallStrain
base_name = phase1
[../]
[./strain_2]
type = ComputeRSphericalSmallStrain
base_name = phase2
eigenstrain_names = eigenstrain
[../]
[./stress_1]
type = ComputeLinearElasticStress
base_name = phase1
[../]
[./stress_2]
type = ComputeLinearElasticStress
base_name = phase2
[../]
# eigenstrain per phase
[./eigenstrain2]
type = ComputeEigenstrain
eigen_base = '0.05 0.05 0.05 0 0 0'
base_name = phase2
eigenstrain_name = eigenstrain
[../]
# switching functions
[./switching]
type = SwitchingFunctionMaterial
function_name = h
eta = eta
h_order = SIMPLE
[../]
[./barrier]
type = BarrierFunctionMaterial
eta = eta
[../]
# chemical free energies
[./chemical_free_energy_1]
type = DerivativeParsedMaterial
property_name = Fc1
expression = 'c^2'
coupled_variables = 'c'
derivative_order = 2
[../]
[./chemical_free_energy_2]
type = DerivativeParsedMaterial
property_name = Fc2
expression = '(1-c)^2'
coupled_variables = 'c'
derivative_order = 2
[../]
# elastic free energies
[./elastic_free_energy_1]
type = ElasticEnergyMaterial
f_name = Fe1
args = ''
base_name = phase1
derivative_order = 2
[../]
[./elastic_free_energy_2]
type = ElasticEnergyMaterial
f_name = Fe2
args = ''
base_name = phase2
derivative_order = 2
[../]
# per phase free energies
[./free_energy_1]
type = DerivativeSumMaterial
property_name = F1
sum_materials = 'Fc1 Fe1'
coupled_variables = 'c'
derivative_order = 2
[../]
[./free_energy_2]
type = DerivativeSumMaterial
property_name = F2
sum_materials = 'Fc2 Fe2'
coupled_variables = 'c'
derivative_order = 2
[../]
# global chemical free energy
[./global_free_energy]
type = DerivativeTwoPhaseMaterial
f_name = F
fa_name = F1
fb_name = F2
eta = eta
args = 'c'
W = 4
[../]
# global stress
[./global_stress]
type = TwoPhaseStressMaterial
base_A = phase1
base_B = phase2
[../]
[./elastic_free_energy]
type = DerivativeTwoPhaseMaterial
f_name = Fe
fa_name = Fe1
fb_name = Fe2
eta = eta
args = 'c'
W = 0
[../]
[]
[BCs]
[./left_r]
type = DirichletBC
variable = disp_r
boundary = 'left'
value = 0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
# We monitor the total free energy and the total solute concentration (should be constant)
[Postprocessors]
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
variable = local_energy
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[./total_solute]
type = ElementIntegralVariablePostprocessor
variable = c
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[./pos_c]
type = FindValueOnLine
start_point = '0 0 0'
end_point = '100 0 0'
v = c
target = 0.582
tol = 1e-8
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[./pos_eta]
type = FindValueOnLine
start_point = '0 0 0'
end_point = '100 0 0'
v = eta
target = 0.5
tol = 1e-8
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[./c_min]
type = ElementExtremeValue
value_type = min
variable = c
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[]
[VectorPostprocessors]
[./line]
type = LineValueSampler
variable = 'Fe_fit c w'
start_point = '0 0 0'
end_point = '100 0 0'
num_points = 5000
sort_by = x
outputs = vpp
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
l_max_its = 30
nl_max_its = 15
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 2.0e-9
start_time = 0.0
end_time = 100000.0
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 7
iteration_window = 1
dt = 1
[../]
[./Adaptivity]
initial_adaptivity = 5
interval = 10
max_h_level = 5
refine_fraction = 0.9
coarsen_fraction = 0.1
[../]
[]
[Outputs]
print_linear_residuals = false
perf_graph = true
execute_on = 'INITIAL TIMESTEP_END'
[./table]
type = CSV
delimiter = ' '
file_base = radius_${RADIUS}/energy_pp
[../]
[./vpp]
type = CSV
delimiter = ' '
sync_times = '10 50 100 500 1000 5000 10000 50000 100000'
sync_only = true
time_data = true
file_base = radius_${RADIUS}/energy_vpp
[../]
[]
(modules/solid_mechanics/test/tests/visco/gen_maxwell_driving.i)
# Represents a unique Maxwell module with E = 10GPa and eta = 10 days with an imposed eigenstrain alpha = 0.001.
# The behavior is set up so that the creep strain is driven by both the elastic stress and the internal
# stress induced by the eigenstrain (E * alpha).
#
# In this test, the specimen is free of external stress (sigma = 0) so the creep deformation only derives from
# the eigenstrain. The total strain to be expected is:
# epsilon = alpha * (1 + t / eta)
# Both the stress and the elastic strain are 0.
#
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
elem_type = HEX8
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./creep_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
variable = stress_xx
rank_two_tensor = stress
index_j = 0
index_i = 0
execute_on = timestep_end
[../]
[./strain_xx]
type = RankTwoAux
variable = strain_xx
rank_two_tensor = total_strain
index_j = 0
index_i = 0
execute_on = timestep_end
[../]
[./creep_strain_xx]
type = RankTwoAux
variable = creep_strain_xx
rank_two_tensor = creep_strain
index_j = 0
index_i = 0
execute_on = timestep_end
[../]
[]
[BCs]
[./symmy]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[../]
[./symmx]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./symmz]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[../]
[]
[Materials]
[./eigen]
type = ComputeEigenstrain
eigenstrain_name = eigen_true
eigen_base = '1e-3 1e-3 1e-3 0 0 0'
[../]
[./maxwell]
type = GeneralizedMaxwellModel
creep_modulus = '10e9'
creep_viscosity = '10'
poisson_ratio = 0.2
young_modulus = 10e9
driving_eigenstrain = eigen_true
[../]
[./stress]
type = ComputeMultipleInelasticStress
inelastic_models = 'creep'
[../]
[./creep]
type = LinearViscoelasticStressUpdate
[../]
[./strain]
type = ComputeIncrementalSmallStrain
displacements = 'disp_x disp_y disp_z'
eigenstrain_names = 'eigen_true'
[../]
[]
[UserObjects]
[./update]
type = LinearViscoelasticityManager
viscoelastic_model = maxwell
[../]
[]
[Postprocessors]
[./stress_xx]
type = ElementAverageValue
variable = stress_xx
block = 'ANY_BLOCK_ID 0'
[../]
[./strain_xx]
type = ElementAverageValue
variable = strain_xx
block = 'ANY_BLOCK_ID 0'
[../]
[./creep_strain_xx]
type = ElementAverageValue
variable = creep_strain_xx
block = 'ANY_BLOCK_ID 0'
[../]
[]
[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-11
nl_abs_tol = 1e-8
dtmin = 0.01
end_time = 100
[./TimeStepper]
type = LogConstantDT
first_dt = 0.1
log_dt = 0.1
[../]
[]
[Outputs]
file_base = gen_maxwell_driving_out
exodus = true
[]
(modules/contact/test/tests/mortar_tm/2drz/ad_frictionless_second/small.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'small'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = 0
ymax = 10
nx = 2
ny = 33
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
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]
[block]
use_automatic_differentiation = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'block'
[]
[plank]
use_automatic_differentiation = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = DirichletBC
variable = disp_x
boundary = block_right
value = 0
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[]
[]
[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 = ADComputeLinearElasticStress
block = 'plank block'
[]
[swell]
type = ADComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[]
[swell_mat]
type = ADGenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 3
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[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'
[]
[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'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/mortar_tm/2drz/frictionless_second/small.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'small'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = 0
ymax = 10
nx = 2
ny = 33
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
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]
[block]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'block'
[]
[plank]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = DirichletBC
variable = disp_x
boundary = block_right
value = 0
[]
[right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ComputeLinearElasticStress
block = 'plank block'
[]
[swell]
type = ComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[]
[swell_mat]
type = GenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 3
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[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'
[]
[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'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/combined/test/tests/multiphase_mechanics/multiphasestress.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = 0
xmax = 2
ymin = 0
ymax = 2
elem_type = QUAD4
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./eta1]
[./InitialCondition]
type = FunctionIC
function = 'x/2'
[../]
[../]
[./eta2]
[./InitialCondition]
type = FunctionIC
function = 'y/2'
[../]
[../]
[./eta3]
[./InitialCondition]
type = FunctionIC
function = '(2^0.5-(y-1)^2=(y-1)^2)/2'
[../]
[../]
[./e11_aux]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./matl_e11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = e11_aux
[../]
[]
[Kernels]
[./TensorMechanics]
[../]
[]
[Materials]
[./elasticity_tensor_A]
type = ComputeElasticityTensor
base_name = A
fill_method = symmetric9
C_ijkl = '1e6 1e5 1e5 1e6 0 1e6 .4e6 .2e6 .5e6'
[../]
[./strain_A]
type = ComputeSmallStrain
base_name = A
eigenstrain_names = eigenstrain
[../]
[./stress_A]
type = ComputeLinearElasticStress
base_name = A
[../]
[./eigenstrain_A]
type = ComputeEigenstrain
base_name = A
eigen_base = '0.1 0.05 0 0 0 0.01'
prefactor = -1
eigenstrain_name = eigenstrain
[../]
[./elasticity_tensor_B]
type = ComputeElasticityTensor
base_name = B
fill_method = symmetric9
C_ijkl = '1e6 0 0 1e6 0 1e6 .5e6 .5e6 .5e6'
[../]
[./strain_B]
type = ComputeSmallStrain
base_name = B
eigenstrain_names = 'B_eigenstrain'
[../]
[./stress_B]
type = ComputeLinearElasticStress
base_name = B
[../]
[./eigenstrain_B]
type = ComputeEigenstrain
base_name = B
eigen_base = '0.1 0.05 0 0 0 0.01'
prefactor = -1
eigenstrain_name = 'B_eigenstrain'
[../]
[./elasticity_tensor_C]
type = ComputeElasticityTensor
base_name = C
fill_method = symmetric9
C_ijkl = '1.1e6 1e5 0 1e6 0 1e6 .5e6 .2e6 .5e6'
[../]
[./strain_C]
type = ComputeSmallStrain
base_name = C
eigenstrain_names = 'C_eigenstrain'
[../]
[./stress_C]
type = ComputeLinearElasticStress
base_name = C
[../]
[./eigenstrain_C]
type = ComputeEigenstrain
base_name = C
eigen_base = '0.1 0.05 0 0 0 0.01'
prefactor = -1
eigenstrain_name = 'C_eigenstrain'
[../]
[./switching_A]
type = SwitchingFunctionMaterial
function_name = h1
eta = eta1
[../]
[./switching_B]
type = SwitchingFunctionMaterial
function_name = h2
eta = eta2
[../]
[./switching_C]
type = SwitchingFunctionMaterial
function_name = h3
eta = eta3
[../]
[./combined]
type = MultiPhaseStressMaterial
phase_base = 'A B C'
h = 'h1 h2 h3'
[../]
[]
[BCs]
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/contact/test/tests/mortar_tm/2drz/ad_frictionless_first/finite.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
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.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
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]
[block]
use_automatic_differentiation = true
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'block'
[]
[plank]
use_automatic_differentiation = true
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = DirichletBC
variable = disp_x
boundary = block_right
value = 0
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[]
[]
[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'
[]
[swell]
type = ADComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[]
[swell_mat]
type = ADGenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[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'
[]
[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'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = 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/combined/examples/phase_field-mechanics/Nonconserved.i)
#
# Example 2
# Phase change driven by a mechanical (elastic) driving force.
# An oversized phase inclusion grows under a uniaxial tensile stress.
# Check the file below for comments and suggestions for parameter modifications.
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
nz = 0
xmin = 0
xmax = 50
ymin = 0
ymax = 50
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./eta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 0
y1 = 0
radius = 30.0
invalue = 1.0
outvalue = 0.0
int_width = 10.0
[../]
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./TensorMechanics]
displacements = 'disp_x disp_y'
[../]
[./eta_bulk]
type = AllenCahn
variable = eta
f_name = F
[../]
[./eta_interface]
type = ACInterface
variable = eta
kappa_name = 1
[../]
[./time]
type = TimeDerivative
variable = eta
[../]
[]
#
# Try visualizing the stress tensor components as done in Conserved.i
#
[Materials]
[./consts]
type = GenericConstantMaterial
block = 0
prop_names = 'L'
prop_values = '1'
[../]
# matrix phase
[./stiffness_a]
type = ComputeElasticityTensor
base_name = phasea
block = 0
# lambda, mu values
C_ijkl = '7 7'
# Stiffness tensor is created from lambda=7, mu=7 for symmetric_isotropic fill method
fill_method = symmetric_isotropic
# See RankFourTensor.h for details on fill methods
[../]
[./strain_a]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
base_name = phasea
[../]
[./stress_a]
type = ComputeLinearElasticStress
block = 0
base_name = phasea
[../]
[./elastic_free_energy_a]
type = ElasticEnergyMaterial
base_name = phasea
f_name = Fea
block = 0
args = ''
[../]
# oversized precipitate phase (simulated using thermal expansion)
[./stiffness_b]
type = ComputeElasticityTensor
base_name = phaseb
block = 0
# Stiffness tensor lambda, mu values
# Note that the two phases could have different stiffnesses.
# Try reducing the precipitate stiffness (to '1 1') rather than making it oversized
C_ijkl = '7 7'
fill_method = symmetric_isotropic
[../]
[./strain_b]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
base_name = phaseb
eigenstrain_names = eigenstrain
[../]
[./eigenstrain_b]
type = ComputeEigenstrain
base_name = phaseb
eigen_base = '0.1 0.1 0.1'
eigenstrain_name = eigenstrain
[../]
[./stress_b]
type = ComputeLinearElasticStress
block = 0
base_name = phaseb
[../]
[./elastic_free_energy_b]
type = ElasticEnergyMaterial
base_name = phaseb
f_name = Feb
block = 0
args = ''
[../]
# Generate the global free energy from the phase free energies
[./switching]
type = SwitchingFunctionMaterial
block = 0
eta = eta
h_order = SIMPLE
[../]
[./barrier]
type = BarrierFunctionMaterial
block = 0
eta = eta
g_order = SIMPLE
[../]
[./free_energy]
type = DerivativeTwoPhaseMaterial
block = 0
f_name = F
fa_name = Fea
fb_name = Feb
eta = eta
args = ''
W = 0.1
derivative_order = 2
[../]
# Generate the global stress from the phase stresses
[./global_stress]
type = TwoPhaseStressMaterial
block = 0
base_A = phasea
base_B = phaseb
[../]
[]
[BCs]
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = 'top'
value = 5
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0
[../]
[]
[Preconditioning]
# active = ' '
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
# this gives best performance on 4 cores
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type '
petsc_options_value = 'asm lu'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-10
start_time = 0.0
num_steps = 200
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.2
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/contact/test/tests/mortar_tm/2drz/ad_frictionless_first/finite_rr.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite_rr'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
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.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
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]
[block]
use_automatic_differentiation = true
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'block'
extra_vector_tags = 'ref'
[]
[plank]
use_automatic_differentiation = true
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
extra_vector_tags = 'ref'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = DirichletBC
variable = disp_x
boundary = block_right
value = 0
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[]
[]
[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'
[]
[swell]
type = ADComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[]
[swell_mat]
type = ADGenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
nl_abs_tol = 1e-12
[]
[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'
[]
[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'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/combined/examples/phase_field-mechanics/kks_mechanics_VTS.i)
# KKS phase-field model coupled with elasticity using the Voigt-Taylor scheme as
# described in L.K. Aagesen et al., Computational Materials Science, 140, 10-21 (2017)
# Original run #170329e
[Mesh]
type = GeneratedMesh
dim = 3
nx = 640
ny = 1
nz = 1
xmin = -10
xmax = 10
ymin = 0
ymax = 0.03125
zmin = 0
zmax = 0.03125
elem_type = HEX8
[]
[Variables]
# order parameter
[./eta]
order = FIRST
family = LAGRANGE
[../]
# solute concentration
[./c]
order = FIRST
family = LAGRANGE
[../]
# chemical potential
[./w]
order = FIRST
family = LAGRANGE
[../]
# solute phase concentration (matrix)
[./cm]
order = FIRST
family = LAGRANGE
[../]
# solute phase concentration (precipitate)
[./cp]
order = FIRST
family = LAGRANGE
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./eta_ic]
variable = eta
type = FunctionIC
function = ic_func_eta
block = 0
[../]
[./c_ic]
variable = c
type = FunctionIC
function = ic_func_c
block = 0
[../]
[./w_ic]
variable = w
type = ConstantIC
value = 0.00991
block = 0
[../]
[./cm_ic]
variable = cm
type = ConstantIC
value = 0.131
block = 0
[../]
[./cp_ic]
variable = cp
type = ConstantIC
value = 0.236
block = 0
[../]
[]
[Functions]
[./ic_func_eta]
type = ParsedFunction
expression = '0.5*(1.0+tanh((x)/delta_eta/sqrt(2.0)))'
symbol_names = 'delta_eta'
symbol_values = '0.8034'
[../]
[./ic_func_c]
type = ParsedFunction
expression = '0.2388*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^3*(6*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^2-15*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))+10)+0.1338*(1-(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^3*(6*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^2-15*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))+10))'
symbol_names = 'delta'
symbol_values = '0.8034'
[../]
[./psi_eq_int]
type = ParsedFunction
expression = 'volume*psi_alpha'
symbol_names = 'volume psi_alpha'
symbol_values = 'volume psi_alpha'
[../]
[./gamma]
type = ParsedFunction
expression = '(psi_int - psi_eq_int) / dy / dz'
symbol_names = 'psi_int psi_eq_int dy dz'
symbol_values = 'psi_int psi_eq_int 0.03125 0.03125'
[../]
[]
[AuxVariables]
[./sigma11]
order = CONSTANT
family = MONOMIAL
[../]
[./sigma22]
order = CONSTANT
family = MONOMIAL
[../]
[./sigma33]
order = CONSTANT
family = MONOMIAL
[../]
[./e11]
order = CONSTANT
family = MONOMIAL
[../]
[./e12]
order = CONSTANT
family = MONOMIAL
[../]
[./e22]
order = CONSTANT
family = MONOMIAL
[../]
[./e33]
order = CONSTANT
family = MONOMIAL
[../]
[./e_el11]
order = CONSTANT
family = MONOMIAL
[../]
[./e_el12]
order = CONSTANT
family = MONOMIAL
[../]
[./e_el22]
order = CONSTANT
family = MONOMIAL
[../]
[./f_el]
order = CONSTANT
family = MONOMIAL
[../]
[./eigen_strain00]
order = CONSTANT
family = MONOMIAL
[../]
[./Fglobal]
order = CONSTANT
family = MONOMIAL
[../]
[./psi]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./matl_sigma11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = sigma11
[../]
[./matl_sigma22]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = sigma22
[../]
[./matl_sigma33]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = sigma33
[../]
[./matl_e11]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 0
index_j = 0
variable = e11
[../]
[./matl_e12]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 0
index_j = 1
variable = e12
[../]
[./matl_e22]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 1
index_j = 1
variable = e22
[../]
[./matl_e33]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 2
index_j = 2
variable = e33
[../]
[./f_el]
type = MaterialRealAux
variable = f_el
property = f_el_mat
execute_on = timestep_end
[../]
[./GlobalFreeEnergy]
variable = Fglobal
type = KKSGlobalFreeEnergy
fa_name = fm
fb_name = fp
w = 0.0264
kappa_names = kappa
interfacial_vars = eta
[../]
[./psi_potential]
variable = psi
type = ParsedAux
coupled_variables = 'Fglobal w c f_el sigma11 e11'
expression = 'Fglobal - w*c + f_el - sigma11*e11'
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = right
value = 0
[../]
[./front_y]
type = DirichletBC
variable = disp_y
boundary = front
value = 0
[../]
[./back_y]
type = DirichletBC
variable = disp_y
boundary = back
value = 0
[../]
[./top_z]
type = DirichletBC
variable = disp_z
boundary = top
value = 0
[../]
[./bottom_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0
[../]
[]
[Materials]
# Chemical free energy of the matrix
[./fm]
type = DerivativeParsedMaterial
property_name = fm
coupled_variables = 'cm'
expression = '6.55*(cm-0.13)^2'
[../]
# Elastic energy of the matrix
[./elastic_free_energy_m]
type = ElasticEnergyMaterial
base_name = matrix
f_name = fe_m
args = ' '
outputs = exodus
[../]
# Total free energy of the matrix
[./Total_energy_matrix]
type = DerivativeSumMaterial
property_name = f_total_matrix
sum_materials = 'fm fe_m'
coupled_variables = 'cm'
[../]
# Free energy of the precipitate phase
[./fp]
type = DerivativeParsedMaterial
property_name = fp
coupled_variables = 'cp'
expression = '6.55*(cp-0.235)^2'
[../]
# Elastic energy of the precipitate
[./elastic_free_energy_p]
type = ElasticEnergyMaterial
base_name = ppt
f_name = fe_p
args = ' '
outputs = exodus
[../]
# Total free energy of the precipitate
[./Total_energy_ppt]
type = DerivativeSumMaterial
property_name = f_total_ppt
sum_materials = 'fp fe_p'
coupled_variables = 'cp'
[../]
# Total elastic energy
[./Total_elastic_energy]
type = DerivativeTwoPhaseMaterial
eta = eta
f_name = f_el_mat
fa_name = fe_m
fb_name = fe_p
outputs = exodus
W = 0
[../]
# h(eta)
[./h_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta
[../]
# g(eta)
[./g_eta]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'M L kappa misfit'
prop_values = '0.7 0.7 0.01704 0.00377'
[../]
#Mechanical properties
[./Stiffness_matrix]
type = ComputeElasticityTensor
C_ijkl = '103.3 74.25 74.25 103.3 74.25 103.3 46.75 46.75 46.75'
base_name = matrix
fill_method = symmetric9
[../]
[./Stiffness_ppt]
type = ComputeElasticityTensor
C_ijkl = '100.7 71.45 71.45 100.7 71.45 100.7 50.10 50.10 50.10'
base_name = ppt
fill_method = symmetric9
[../]
[./stress_matrix]
type = ComputeLinearElasticStress
base_name = matrix
[../]
[./stress_ppt]
type = ComputeLinearElasticStress
base_name = ppt
[../]
[./strain_matrix]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
base_name = matrix
[../]
[./strain_ppt]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
base_name = ppt
eigenstrain_names = 'eigenstrain_ppt'
[../]
[./eigen_strain]
type = ComputeEigenstrain
base_name = ppt
eigen_base = '1 1 1 0 0 0'
prefactor = misfit
eigenstrain_name = 'eigenstrain_ppt'
[../]
[./global_stress]
type = TwoPhaseStressMaterial
base_A = matrix
base_B = ppt
[../]
[./global_strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
[../]
[]
[Kernels]
[./TensorMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
# enforce c = (1-h(eta))*cm + h(eta)*cp
[./PhaseConc]
type = KKSPhaseConcentration
ca = cm
variable = cp
c = c
eta = eta
[../]
# enforce pointwise equality of chemical potentials
[./ChemPotVacancies]
type = KKSPhaseChemicalPotential
variable = cm
cb = cp
fa_name = f_total_matrix
fb_name = f_total_ppt
[../]
#
# Cahn-Hilliard Equation
#
[./CHBulk]
type = KKSSplitCHCRes
variable = c
ca = cm
fa_name = f_total_matrix
w = w
[../]
[./dcdt]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./ckernel]
type = SplitCHWRes
mob_name = M
variable = w
[../]
#
# Allen-Cahn Equation
#
[./ACBulkF]
type = KKSACBulkF
variable = eta
fa_name = f_total_matrix
fb_name = f_total_ppt
w = 0.0264
args = 'cp cm'
[../]
[./ACBulkC]
type = KKSACBulkC
variable = eta
ca = cm
cb = cp
fa_name = f_total_matrix
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = kappa
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm ilu nonzero'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-11
num_steps = 200
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.5
[../]
[]
[VectorPostprocessors]
#[./eta]
# type = LineValueSampler
# start_point = '-10 0 0'
# end_point = '10 0 0'
# variable = eta
# num_points = 321
# sort_by = id
#[../]
#[./eta_position]
# type = FindValueOnLineSample
# vectorpostprocessor = eta
# variable_name = eta
# search_value = 0.5
#[../]
# [./f_el]
# type = LineMaterialRealSampler
# start = '-20 0 0'
# end = '20 0 0'
# sort_by = id
# property = f_el
# [../]
# [./f_el_a]
# type = LineMaterialRealSampler
# start = '-20 0 0'
# end = '20 0 0'
# sort_by = id
# property = fe_m
# [../]
# [./f_el_b]
# type = LineMaterialRealSampler
# start = '-20 0 0'
# end = '20 0 0'
# sort_by = id
# property = fe_p
# [../]
# [./h_out]
# type = LineMaterialRealSampler
# start = '-20 0 0'
# end = '20 0 0'
# sort_by = id
# property = h
# [../]
# [./fm_out]
# type = LineMaterialRealSampler
# start = '-20 0 0'
# end = '20 0 0'
# sort_by = id
# property = fm
# [../]
[]
[Postprocessors]
[./f_el_int]
type = ElementIntegralMaterialProperty
mat_prop = f_el_mat
[../]
[./c_alpha]
type = SideAverageValue
boundary = left
variable = c
[../]
[./c_beta]
type = SideAverageValue
boundary = right
variable = c
[../]
[./e11_alpha]
type = SideAverageValue
boundary = left
variable = e11
[../]
[./e11_beta]
type = SideAverageValue
boundary = right
variable = e11
[../]
[./s11_alpha]
type = SideAverageValue
boundary = left
variable = sigma11
[../]
[./s22_alpha]
type = SideAverageValue
boundary = left
variable = sigma22
[../]
[./s33_alpha]
type = SideAverageValue
boundary = left
variable = sigma33
[../]
[./s11_beta]
type = SideAverageValue
boundary = right
variable = sigma11
[../]
[./s22_beta]
type = SideAverageValue
boundary = right
variable = sigma22
[../]
[./s33_beta]
type = SideAverageValue
boundary = right
variable = sigma33
[../]
[./f_el_alpha]
type = SideAverageValue
boundary = left
variable = f_el
[../]
[./f_el_beta]
type = SideAverageValue
boundary = right
variable = f_el
[../]
[./f_c_alpha]
type = SideAverageValue
boundary = left
variable = Fglobal
[../]
[./f_c_beta]
type = SideAverageValue
boundary = right
variable = Fglobal
[../]
[./chem_pot_alpha]
type = SideAverageValue
boundary = left
variable = w
[../]
[./chem_pot_beta]
type = SideAverageValue
boundary = right
variable = w
[../]
[./psi_alpha]
type = SideAverageValue
boundary = left
variable = psi
[../]
[./psi_beta]
type = SideAverageValue
boundary = right
variable = psi
[../]
[./total_energy]
type = ElementIntegralVariablePostprocessor
variable = Fglobal
[../]
# Get simulation cell size from postprocessor
[./volume]
type = ElementIntegralMaterialProperty
mat_prop = 1
[../]
[./psi_eq_int]
type = FunctionValuePostprocessor
function = psi_eq_int
[../]
[./psi_int]
type = ElementIntegralVariablePostprocessor
variable = psi
[../]
[./gamma]
type = FunctionValuePostprocessor
function = gamma
[../]
[]
#
# Precondition using handcoded off-diagonal terms
#
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Outputs]
[./exodus]
type = Exodus
time_step_interval = 20
[../]
[./csv]
type = CSV
execute_on = 'final'
[../]
#[./console]
# type = Console
# output_file = true
# [../]
[]
(modules/combined/test/tests/linear_elasticity/applied_strain.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
nz = 0
xmin = 0
xmax = 2
ymin = 0
ymax = 2
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Modules/TensorMechanics/Master/All]
strain = SMALL
eigenstrain_names = eigenstrain
add_variables = true
generate_output = 'strain_xx strain_yy strain_xy'
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '1e6 0 0 1e6 0 1e6 .5e6 .5e6 .5e6'
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./eigenstrain]
type = ComputeEigenstrain
eigen_base = '0.1 0.05 0 0 0 0.01'
prefactor = -1
eigenstrain_name = eigenstrain
[../]
[]
[BCs]
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/mortar_tm/2drz/frictionless_first/finite.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
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.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
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]
[block]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'block'
[]
[plank]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = DirichletBC
variable = disp_x
boundary = block_right
value = 0
[]
[right_y]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = 'plank block'
[]
[swell]
type = ComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[]
[swell_mat]
type = GenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[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'
[]
[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'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/mortar_tm/2drz/frictionless_first/finite_rr.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite_rr'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
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.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
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]
[block]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'block'
extra_vector_tags = 'ref'
[]
[plank]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
extra_vector_tags = 'ref'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = DirichletBC
variable = disp_x
boundary = block_right
value = 0
[]
[right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = 'plank block'
[]
[swell]
type = ComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[]
[swell_mat]
type = GenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
nl_abs_tol = 1e-12
[]
[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'
[]
[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'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/mortar_tm/2drz/ad_frictionless_first/small.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'small'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
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.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
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]
[block]
use_automatic_differentiation = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'block'
[]
[plank]
use_automatic_differentiation = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = DirichletBC
variable = disp_x
boundary = block_right
value = 0
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[]
[]
[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 = ADComputeLinearElasticStress
block = 'plank block'
[]
[swell]
type = ADComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[]
[swell_mat]
type = ADGenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 10
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[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'
[]
[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'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/combined/test/tests/linear_elasticity/thermal_expansion.i)
# This input file is designed to test the RankTwoAux and RankFourAux
# auxkernels, which report values out of the Tensors used in materials
# properties.
# Materials properties into AuxVariables - these are elemental variables, not nodal variables.
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
nz = 0
xmin = 0
xmax = 2
ymin = 0
ymax = 2
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Modules/TensorMechanics/Master/All]
strain = SMALL
eigenstrain_names = eigenstrain
add_variables = true
generate_output = 'stress_xx stress_yy stress_xy'
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '1e6 0 0 1e6 0 1e6 .5e6 .5e6 .5e6'
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./eigenstrain]
type = ComputeEigenstrain
eigen_base = '1e-4'
eigenstrain_name = eigenstrain
[../]
[]
[BCs]
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_rel_tol = 1e-14
[]
[Outputs]
exodus = true
[]