- argsvariable dependencies for the prefactor
C++ Type:std::vector<VariableName>
Controllable:No
Description:variable dependencies for the prefactor
- 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 Variable Eigenstrain
Computes an Eigenstrain and its derivatives that is a function of multiple variables, where the prefactor is defined in a derivative material
Description
ComputeVariableEigenstrain
calculates the eigenstrain as a function of a specified variable as well as the contributions of the eigenstrain to the first and second order derivatives of the elastic strain. This class is most often only used in phase field simulations where first and second derivatives are required and the limitation on elastic only strains is not overly restrictive.
The Rank-2 tensor eigenstrain is calculated as a function of a Rank-2 tensor base and a scalar material property. (1) where is the computed eigenstrain, is a scalar material property, and is the tensor selected by the user as the base of the eigenstrain. The material property is used to introduce dependence of the eigenstrain on the user-specified variable.
The contributions of the eigenstrain to the first and second elastic strain derivatives are calculated with use of the MOOSE DerivativeMaterialInterface applied to the prefactor variables. (2) where and are the first and second derivatives of the elastic strain contributions due to the eigenstrain.
This class assumes the presence of only elastic strain in the computation of the first and second derivatives.
Example Input File
[./eigenstrain]
type = ComputeVariableEigenstrain
eigen_base = '1'
args = c
prefactor = prefactor
eigenstrain_name = eigenstrain
[../]
(modules/combined/test/tests/multiphase_mechanics/simpleeigenstrain.i)where the argument for the args
parameter in the eigenstrain matches the name of the coupled variable, here shown as an auxvariable
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 125.0
y1 = 125.0
radius = 60.0
invalue = 1.0
outvalue = 0.1
int_width = 50.0
[../]
[../]
(modules/combined/test/tests/multiphase_mechanics/simpleeigenstrain.i)and the argument for the prefactor
parameter in the eigenstrain material matches the function name (f_name
parameter) in the DerivativeParsedMaterial
[./prefactor]
type = DerivativeParsedMaterial
coupled_variables = c
property_name = prefactor
constant_names = 'epsilon0 c0'
constant_expressions = '0.05 0'
expression = '(c - c0) * epsilon0'
[../]
(modules/combined/test/tests/multiphase_mechanics/simpleeigenstrain.i)Finally, the eigenstrain_name
parameter value must also be set for the strain calculator, and an example parameter setting is shown below:
[./strain]
type = ComputeSmallStrain
eigenstrain_names = eigenstrain
[../]
(modules/combined/test/tests/multiphase_mechanics/simpleeigenstrain.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/test/tests/eigenstrain/variable_cahnhilliard.i)
- (modules/combined/examples/phase_field-mechanics/kks_mechanics_KHS.i)
- (modules/combined/test/tests/multiphase_mechanics/simpleeigenstrain.i)
- (modules/combined/test/tests/eigenstrain/inclusion.i)
- (modules/combined/examples/phase_field-mechanics/LandauPhaseTrans.i)
- (modules/combined/examples/phase_field-mechanics/SimplePhaseTrans.i)
- (modules/combined/test/tests/eigenstrain/variable.i)
- (modules/combined/examples/phase_field-mechanics/Conserved.i)
- (modules/combined/test/tests/multiphase_mechanics/elasticenergymaterial.i)
- (modules/combined/test/tests/eigenstrain/variable_finite.i)
- (modules/combined/examples/publications/rapid_dev/fig7b.i)
References
No citations exist within this document.(modules/combined/test/tests/multiphase_mechanics/simpleeigenstrain.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 25
xmax = 250
ymax = 250
elem_type = QUAD4
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 125.0
y1 = 125.0
radius = 60.0
invalue = 1.0
outvalue = 0.1
int_width = 50.0
[../]
[../]
[./e11_aux]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_e11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = e11_aux
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.
[../]
[./left]
type = DirichletBC
boundary = left
variable = disp_x
value = 0.
[../]
[]
[Kernels]
[./TensorMechanics]
[../]
[]
[Materials]
# This deprecated material is replaced by the materials below
#
#[./eigenstrain]
# type = SimpleEigenStrainMaterial
# block = 0
# epsilon0 = 0.05
# c = c
# disp_y = disp_y
# disp_x = disp_x
# C_ijkl = '3 1 1 3 1 3 1 1 1 '
# fill_method = symmetric9
#[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '3 1 1 3 1 3 1 1 1 '
[../]
[./strain]
type = ComputeSmallStrain
eigenstrain_names = eigenstrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./prefactor]
type = DerivativeParsedMaterial
coupled_variables = c
property_name = prefactor
constant_names = 'epsilon0 c0'
constant_expressions = '0.05 0'
expression = '(c - c0) * epsilon0'
[../]
[./eigenstrain]
type = ComputeVariableEigenstrain
eigen_base = '1'
args = c
prefactor = prefactor
eigenstrain_name = eigenstrain
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
nl_abs_tol = 1e-10
num_steps = 1
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/multiphase_mechanics/simpleeigenstrain.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 25
xmax = 250
ymax = 250
elem_type = QUAD4
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 125.0
y1 = 125.0
radius = 60.0
invalue = 1.0
outvalue = 0.1
int_width = 50.0
[../]
[../]
[./e11_aux]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_e11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = e11_aux
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.
[../]
[./left]
type = DirichletBC
boundary = left
variable = disp_x
value = 0.
[../]
[]
[Kernels]
[./TensorMechanics]
[../]
[]
[Materials]
# This deprecated material is replaced by the materials below
#
#[./eigenstrain]
# type = SimpleEigenStrainMaterial
# block = 0
# epsilon0 = 0.05
# c = c
# disp_y = disp_y
# disp_x = disp_x
# C_ijkl = '3 1 1 3 1 3 1 1 1 '
# fill_method = symmetric9
#[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '3 1 1 3 1 3 1 1 1 '
[../]
[./strain]
type = ComputeSmallStrain
eigenstrain_names = eigenstrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./prefactor]
type = DerivativeParsedMaterial
coupled_variables = c
property_name = prefactor
constant_names = 'epsilon0 c0'
constant_expressions = '0.05 0'
expression = '(c - c0) * epsilon0'
[../]
[./eigenstrain]
type = ComputeVariableEigenstrain
eigen_base = '1'
args = c
prefactor = prefactor
eigenstrain_name = eigenstrain
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
nl_abs_tol = 1e-10
num_steps = 1
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/multiphase_mechanics/simpleeigenstrain.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 25
xmax = 250
ymax = 250
elem_type = QUAD4
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 125.0
y1 = 125.0
radius = 60.0
invalue = 1.0
outvalue = 0.1
int_width = 50.0
[../]
[../]
[./e11_aux]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_e11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = e11_aux
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.
[../]
[./left]
type = DirichletBC
boundary = left
variable = disp_x
value = 0.
[../]
[]
[Kernels]
[./TensorMechanics]
[../]
[]
[Materials]
# This deprecated material is replaced by the materials below
#
#[./eigenstrain]
# type = SimpleEigenStrainMaterial
# block = 0
# epsilon0 = 0.05
# c = c
# disp_y = disp_y
# disp_x = disp_x
# C_ijkl = '3 1 1 3 1 3 1 1 1 '
# fill_method = symmetric9
#[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '3 1 1 3 1 3 1 1 1 '
[../]
[./strain]
type = ComputeSmallStrain
eigenstrain_names = eigenstrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./prefactor]
type = DerivativeParsedMaterial
coupled_variables = c
property_name = prefactor
constant_names = 'epsilon0 c0'
constant_expressions = '0.05 0'
expression = '(c - c0) * epsilon0'
[../]
[./eigenstrain]
type = ComputeVariableEigenstrain
eigen_base = '1'
args = c
prefactor = prefactor
eigenstrain_name = eigenstrain
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
nl_abs_tol = 1e-10
num_steps = 1
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/multiphase_mechanics/simpleeigenstrain.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 25
xmax = 250
ymax = 250
elem_type = QUAD4
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 125.0
y1 = 125.0
radius = 60.0
invalue = 1.0
outvalue = 0.1
int_width = 50.0
[../]
[../]
[./e11_aux]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_e11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = e11_aux
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.
[../]
[./left]
type = DirichletBC
boundary = left
variable = disp_x
value = 0.
[../]
[]
[Kernels]
[./TensorMechanics]
[../]
[]
[Materials]
# This deprecated material is replaced by the materials below
#
#[./eigenstrain]
# type = SimpleEigenStrainMaterial
# block = 0
# epsilon0 = 0.05
# c = c
# disp_y = disp_y
# disp_x = disp_x
# C_ijkl = '3 1 1 3 1 3 1 1 1 '
# fill_method = symmetric9
#[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '3 1 1 3 1 3 1 1 1 '
[../]
[./strain]
type = ComputeSmallStrain
eigenstrain_names = eigenstrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./prefactor]
type = DerivativeParsedMaterial
coupled_variables = c
property_name = prefactor
constant_names = 'epsilon0 c0'
constant_expressions = '0.05 0'
expression = '(c - c0) * epsilon0'
[../]
[./eigenstrain]
type = ComputeVariableEigenstrain
eigen_base = '1'
args = c
prefactor = prefactor
eigenstrain_name = eigenstrain
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
nl_abs_tol = 1e-10
num_steps = 1
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/eigenstrain/variable_cahnhilliard.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 16
ny = 16
xmin = 0
xmax = 50
ymin = 0
ymax = 50
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 0
y1 = 0
radius = 25.0
invalue = 1.0
outvalue = 0.0
int_width = 50.0
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./TensorMechanics]
displacements = 'disp_x disp_y'
[../]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
[AuxVariables]
[./sigma11_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./sigma22_aux]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./matl_sigma11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = sigma11_aux
[../]
[./matl_sigma22]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = sigma22_aux
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1 5'
block = 0
[../]
[./chemical_free_energy]
type = DerivativeParsedMaterial
block = 0
property_name = Fc
coupled_variables = 'c'
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2
enable_jit = true
derivative_order = 2
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
C_ijkl = '7 7'
fill_method = symmetric_isotropic
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
[./var_dependence]
type = DerivativeParsedMaterial
block = 0
expression = 0.1*c
coupled_variables = c
property_name = var_dep
enable_jit = true
derivative_order = 2
[../]
[./eigenstrain]
type = ComputeVariableEigenstrain
block = 0
eigen_base = '1 1 1 0 0 0'
prefactor = var_dep
args = 'c'
eigenstrain_name = eigenstrain
[../]
[./strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
eigenstrain_names = eigenstrain
[../]
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = Fe
block = 0
args = 'c'
derivative_order = 2
[../]
[./free_energy]
type = DerivativeSumMaterial
block = 0
property_name = F
sum_materials = 'Fc Fe'
coupled_variables = 'c'
derivative_order = 2
[../]
[]
[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]
[./SMP]
type = SMP
full = true
[../]
[]
[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 = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-10
start_time = 0.0
num_steps = 2
dt = 1
[]
[Outputs]
exodus = true
[]
(modules/combined/examples/phase_field-mechanics/kks_mechanics_KHS.i)
# KKS phase-field model coupled with elasticity using Khachaturyan's scheme as
# described in L.K. Aagesen et al., Computational Materials Science, 140, 10-21 (2017)
# Original run #170403a
[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.2389*(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.1339*(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
[../]
[./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'
[../]
# Chemical 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
f_name = f_el_mat
args = 'eta'
outputs = exodus
[../]
# h(eta)
[./h_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta
[../]
# 1- h(eta), putting in function explicitly
[./one_minus_h_eta_explicit]
type = DerivativeParsedMaterial
property_name = one_minus_h_explicit
coupled_variables = eta
expression = 1-eta^3*(6*eta^2-15*eta+10)
outputs = exodus
[../]
# 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
base_name = C_matrix
C_ijkl = '103.3 74.25 74.25 103.3 74.25 103.3 46.75 46.75 46.75'
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 = C_ppt
fill_method = symmetric9
[../]
[./C]
type = CompositeElasticityTensor
args = eta
tensors = 'C_matrix C_ppt'
weights = 'one_minus_h_explicit h'
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
eigenstrain_names = 'eigenstrain_ppt'
[../]
[./eigen_strain]
type = ComputeVariableEigenstrain
eigen_base = '0.00377 0.00377 0.00377 0 0 0'
prefactor = h
args = eta
eigenstrain_name = 'eigenstrain_ppt'
[../]
[]
[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 = fm
fb_name = fp
[../]
#
# Cahn-Hilliard Equation
#
[./CHBulk]
type = KKSSplitCHCRes
variable = c
ca = cm
fa_name = fm
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 = fm
fb_name = fp
w = 0.0264
args = 'cp cm'
[../]
[./ACBulkC]
type = KKSACBulkC
variable = eta
ca = cm
cb = cp
fa_name = fm
[../]
[./ACBulk_el] #This adds df_el/deta for strain interpolation
type = AllenCahn
variable = eta
f_name = f_el_mat
[../]
[./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
[../]
[]
[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
[../]
[./int_position]
type = FindValueOnLine
start_point = '-10 0 0'
end_point = '10 0 0'
v = eta
target = 0.5
[../]
[]
#
# Precondition using handcoded off-diagonal terms
#
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Outputs]
[./exodus]
type = Exodus
time_step_interval = 20
[../]
checkpoint = true
[./csv]
type = CSV
execute_on = 'final'
[../]
[]
(modules/combined/test/tests/multiphase_mechanics/simpleeigenstrain.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 25
xmax = 250
ymax = 250
elem_type = QUAD4
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 125.0
y1 = 125.0
radius = 60.0
invalue = 1.0
outvalue = 0.1
int_width = 50.0
[../]
[../]
[./e11_aux]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_e11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = e11_aux
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.
[../]
[./left]
type = DirichletBC
boundary = left
variable = disp_x
value = 0.
[../]
[]
[Kernels]
[./TensorMechanics]
[../]
[]
[Materials]
# This deprecated material is replaced by the materials below
#
#[./eigenstrain]
# type = SimpleEigenStrainMaterial
# block = 0
# epsilon0 = 0.05
# c = c
# disp_y = disp_y
# disp_x = disp_x
# C_ijkl = '3 1 1 3 1 3 1 1 1 '
# fill_method = symmetric9
#[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '3 1 1 3 1 3 1 1 1 '
[../]
[./strain]
type = ComputeSmallStrain
eigenstrain_names = eigenstrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./prefactor]
type = DerivativeParsedMaterial
coupled_variables = c
property_name = prefactor
constant_names = 'epsilon0 c0'
constant_expressions = '0.05 0'
expression = '(c - c0) * epsilon0'
[../]
[./eigenstrain]
type = ComputeVariableEigenstrain
eigen_base = '1'
args = c
prefactor = prefactor
eigenstrain_name = eigenstrain
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
nl_abs_tol = 1e-10
num_steps = 1
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/eigenstrain/inclusion.i)
# This test allows comparison of simulation and analytical solution for a misfitting precipitate
# using ComputeVariableEigenstrain for the simulation and the InclusionProperties material
# for the analytical solution. Increasing mesh resolution will improve agreement.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
xmax = 1.5
ymax = 1.5
elem_type = QUAD4
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./TensorMechanics]
[../]
[]
[AuxVariables]
[./s11_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./s12_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./s22_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./s11_an]
order = CONSTANT
family = MONOMIAL
[../]
[./s12_an]
order = CONSTANT
family = MONOMIAL
[../]
[./s22_an]
order = CONSTANT
family = MONOMIAL
[../]
[./e11_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./e12_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./e22_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./e11_an]
order = CONSTANT
family = MONOMIAL
[../]
[./e12_an]
order = CONSTANT
family = MONOMIAL
[../]
[./e22_an]
order = CONSTANT
family = MONOMIAL
[../]
[./fel_an]
order = CONSTANT
family = MONOMIAL
[../]
[./c]
[../]
[]
[AuxKernels]
[./matl_s11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = s11_aux
[../]
[./matl_s12]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 1
variable = s12_aux
[../]
[./matl_s22]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = s22_aux
[../]
[./matl_s11_an]
type = RankTwoAux
rank_two_tensor = stress_an
index_i = 0
index_j = 0
variable = s11_an
[../]
[./matl_s12_an]
type = RankTwoAux
rank_two_tensor = stress_an
index_i = 0
index_j = 1
variable = s12_an
[../]
[./matl_s22_an]
type = RankTwoAux
rank_two_tensor = stress_an
index_i = 1
index_j = 1
variable = s22_an
[../]
[./matl_e11]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 0
index_j = 0
variable = e11_aux
[../]
[./matl_e12]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 0
index_j = 1
variable = e12_aux
[../]
[./matl_e22]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 1
index_j = 1
variable = e22_aux
[../]
[./matl_e11_an]
type = RankTwoAux
rank_two_tensor = strain_an
index_i = 0
index_j = 0
variable = e11_an
[../]
[./matl_e12_an]
type = RankTwoAux
rank_two_tensor = strain_an
index_i = 0
index_j = 1
variable = e12_an
[../]
[./matl_e22_an]
type = RankTwoAux
rank_two_tensor = strain_an
index_i = 1
index_j = 1
variable = e22_an
[../]
[./matl_fel_an]
type = MaterialRealAux
variable = fel_an
property = fel_an_mat
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
C_ijkl = '1 1'
fill_method = symmetric_isotropic
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
[./var_dependence]
type = DerivativeParsedMaterial
block = 0
expression = 0.005*c^2
coupled_variables = c
outputs = exodus
output_properties = 'var_dep'
f_name = var_dep
enable_jit = true
derivative_order = 2
[../]
[./eigenstrain]
type = ComputeVariableEigenstrain
block = 0
eigen_base = '1 1 0 0 0 0'
prefactor = var_dep
args = c
eigenstrain_name = eigenstrain
[../]
[./strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
eigenstrain_names = eigenstrain
[../]
[./analytical]
type = InclusionProperties
a = 0.1
b = 0.1
lambda = 1
mu = 1
misfit_strains = '0.005 0.005'
strain_name = strain_an
stress_name = stress_an
energy_name = fel_an_mat
[../]
[]
[BCs]
active = 'left_x bottom_y'
[./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
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 30
nl_max_its = 10
nl_rel_tol = 1.0e-10
[]
[Outputs]
exodus = true
[]
[ICs]
[./c_IC]
int_width = 0.075
x1 = 0
y1 = 0
radius = 0.1
outvalue = 0
variable = c
invalue = 1
type = SmoothCircleIC
[../]
[]
(modules/combined/examples/phase_field-mechanics/LandauPhaseTrans.i)
#
# Martensitic transformation
# Chemical driving force described by Landau Polynomial
# Coupled with elasticity (Mechanics)
#
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
ny = 100
xmin = 0
xmax = 100
ymin = 0
ymax = 100
elem_type = QUAD4
[]
[Variables]
[./eta1]
[./InitialCondition]
type = RandomIC
min = 0
max = 0.1
[../]
[../]
[./eta2]
[./InitialCondition]
type = RandomIC
min = 0
max = 0.1
[../]
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
generate_output = 'stress_xx stress_yy'
eigenstrain_names = 'eigenstrain1 eigenstrain2'
[../]
[]
[Kernels]
[./eta_bulk1]
type = AllenCahn
variable = eta1
args = 'eta2'
f_name = F
[../]
[./eta_bulk2]
type = AllenCahn
variable = eta2
args = 'eta1'
f_name = F
[../]
[./eta_interface1]
type = ACInterface
variable = eta1
kappa_name = kappa_eta
[../]
[./eta_interface2]
type = ACInterface
variable = eta2
kappa_name = kappa_eta
[../]
[./deta1dt]
type = TimeDerivative
variable = eta1
[../]
[./deta2dt]
type = TimeDerivative
variable = eta2
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'L kappa_eta'
prop_values = '1 1'
[../]
[./chemical_free_energy]
type = DerivativeParsedMaterial
property_name = Fc
coupled_variables = 'eta1 eta2'
constant_names = 'A2 A3 A4'
constant_expressions = '0.2 -12.6 12.4'
expression = 'A2/2*(eta1^2+eta2^2) + A3/3*(eta1^3+eta2^3) + A4/4*(eta1^2+eta2^2)^2'
enable_jit = true
derivative_order = 2
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '700 300 300 700 300 700 300 300 300'
fill_method = symmetric9
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./var_dependence1]
type = DerivativeParsedMaterial
property_name = var_dep1
coupled_variables = 'eta1'
expression = eta1
enable_jit = true
derivative_order = 2
[../]
[./var_dependence2]
type = DerivativeParsedMaterial
property_name = var_dep2
coupled_variables = 'eta2'
expression = eta2
enable_jit = true
derivative_order = 2
[../]
[./eigenstrain1]
type = ComputeVariableEigenstrain
eigen_base = '0.1 -0.1 0 0 0 0'
prefactor = var_dep1
args = 'eta1'
eigenstrain_name = eigenstrain1
[../]
[./eigenstrain2]
type = ComputeVariableEigenstrain
eigen_base = '-0.1 0.1 0 0 0 0'
prefactor = var_dep2
args = 'eta2'
eigenstrain_name = eigenstrain2
[../]
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = Fe
args = 'eta1 eta2'
derivative_order = 2
[../]
[./totol_free_energy]
type = DerivativeSumMaterial
property_name = F
sum_materials = 'Fc Fe'
coupled_variables = 'eta1 eta2'
derivative_order = 2
[../]
[]
[BCs]
[./all_y]
type = DirichletBC
variable = disp_y
boundary = 'top bottom left right'
value = 0
[../]
[./all_x]
type = DirichletBC
variable = disp_x
boundary = 'top bottom left right'
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 = 10
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 9
iteration_window = 2
growth_factor = 1.1
cutback_factor = 0.75
dt = 0.3
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/combined/examples/phase_field-mechanics/SimplePhaseTrans.i)
#
# Martensitic transformation
# One structural order parameter (SOP) governed by AllenCahn Eqn.
# Chemical driving force described by Landau Polynomial
# Coupled with elasticity (Mechanics)
# Eigenstrain as a function of SOP
#
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
ny = 100
xmin = 0
xmax = 100
ymin = 0
ymax = 100
elem_type = QUAD4
[]
[Variables]
[./eta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 50
y1 = 50
radius = 10.0
invalue = 1.0
outvalue = 0.0
int_width = 5.0
[../]
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
generate_output = 'stress_xx stress_yy'
eigenstrain_names = 'eigenstrain'
[../]
[]
[Kernels]
[./eta_bulk]
type = AllenCahn
variable = eta
f_name = F
[../]
[./eta_interface]
type = ACInterface
variable = eta
kappa_name = kappa_eta
[../]
[./time]
type = TimeDerivative
variable = eta
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'L kappa_eta'
prop_values = '1 1'
[../]
[./chemical_free_energy]
type = DerivativeParsedMaterial
property_name = Fc
coupled_variables = 'eta'
constant_names = 'A2 A3 A4'
constant_expressions = '0.2 -12.6 12.4'
expression = A2/2*eta^2+A3/3*eta^3+A4/4*eta^4
enable_jit = true
derivative_order = 2
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '70 30 30 70 30 70 30 30 30'
fill_method = symmetric9
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./var_dependence]
type = DerivativeParsedMaterial
expression = eta
coupled_variables = 'eta'
property_name = var_dep
enable_jit = true
derivative_order = 2
[../]
[./eigenstrain]
type = ComputeVariableEigenstrain
eigen_base = '0.1 0.1 0 0 0 0'
prefactor = var_dep
#outputs = exodus
args = 'eta'
eigenstrain_name = eigenstrain
[../]
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = Fe
args = 'eta'
derivative_order = 2
[../]
[./free_energy]
type = DerivativeSumMaterial
property_name = F
sum_materials = 'Fc Fe'
coupled_variables = 'eta'
derivative_order = 2
[../]
[]
[BCs]
[./all_y]
type = DirichletBC
variable = disp_y
boundary = 'top bottom left right'
value = 0
[../]
[./all_x]
type = DirichletBC
variable = disp_x
boundary = 'top bottom left right'
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 = 10
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 9
iteration_window = 2
growth_factor = 1.1
cutback_factor = 0.75
dt = 0.3
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/combined/test/tests/eigenstrain/variable.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmax = 0.5
ymax = 0.5
elem_type = QUAD4
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./TensorMechanics]
[../]
[]
[AuxVariables]
[./e11_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./e22_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./c]
[../]
[./eigen_strain00]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./matl_e11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = e11_aux
[../]
[./matl_e22]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = e22_aux
[../]
[./eigen_strain00]
type = RankTwoAux
variable = eigen_strain00
rank_two_tensor = eigenstrain
index_j = 0
index_i = 0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
C_ijkl = '1 1'
fill_method = symmetric_isotropic
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
[./var_dependence]
type = DerivativeParsedMaterial
block = 0
expression = 0.5*c^2
coupled_variables = c
outputs = exodus
output_properties = 'var_dep'
f_name = var_dep
enable_jit = true
derivative_order = 2
[../]
[./eigenstrain]
type = ComputeVariableEigenstrain
block = 0
eigen_base = '1 1 1 0 0 0'
prefactor = var_dep
args = c
eigenstrain_name = eigenstrain
[../]
[./strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
eigenstrain_names = eigenstrain
[../]
[]
[BCs]
active = 'left_x bottom_y'
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = right
value = 0
[../]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = top
value = 0.01
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 20
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-50
[]
[Outputs]
exodus = true
[]
[ICs]
[./c_IC]
int_width = 0.075
x1 = 0
y1 = 0
radius = 0.25
outvalue = 0
variable = c
invalue = 1
type = SmoothCircleIC
[../]
[]
(modules/combined/examples/phase_field-mechanics/Conserved.i)
#
# Example 1
# Illustrating the coupling between chemical and mechanical (elastic) driving forces.
# An oversized precipitate deforms under a uniaxial compressive 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]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 0
y1 = 0
radius = 25.0
invalue = 1.0
outvalue = 0.0
int_width = 50.0
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./TensorMechanics]
displacements = 'disp_x disp_y'
[../]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
#
# The AuxVariables and AuxKernels below are added to visualize the xx and yy stress tensor components
#
[AuxVariables]
[./sigma11_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./sigma22_aux]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./matl_sigma11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = sigma11_aux
[../]
[./matl_sigma22]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = sigma22_aux
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1 5'
block = 0
#kappa = 0.1
#mob = 1e-3
[../]
# simple chemical free energy with a miscibility gap
[./chemical_free_energy]
type = DerivativeParsedMaterial
block = 0
property_name = Fc
coupled_variables = 'c'
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2
enable_jit = true
derivative_order = 2
[../]
# undersized solute (voidlike)
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
# lambda, mu values
C_ijkl = '7 7'
# Stiffness tensor is created from lambda=7, mu=7 using symmetric_isotropic fill method
fill_method = symmetric_isotropic
# See RankFourTensor.h for details on fill methods
# '15 15' results in a high stiffness (the elastic free energy will dominate)
# '7 7' results in a low stiffness (the chemical free energy will dominate)
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
[./var_dependence]
type = DerivativeParsedMaterial
block = 0
# eigenstrain coefficient
# -0.1 will result in an undersized precipitate
# 0.1 will result in an oversized precipitate
expression = 0.1*c
coupled_variables = c
f_name = var_dep
enable_jit = true
derivative_order = 2
[../]
[./eigenstrain]
type = ComputeVariableEigenstrain
block = 0
eigen_base = '1 1 1 0 0 0'
prefactor = var_dep
#outputs = exodus
args = 'c'
eigenstrain_name = eigenstrain
[../]
[./strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
eigenstrain_names = eigenstrain
[../]
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = Fe
block = 0
args = 'c'
derivative_order = 2
[../]
# Sum up chemical and elastic contributions
[./free_energy]
type = DerivativeSumMaterial
block = 0
property_name = F
sum_materials = 'Fc Fe'
coupled_variables = 'c'
derivative_order = 2
[../]
[]
[BCs]
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = 'top'
# prescribed displacement
# -5 will result in a compressive stress
# 5 will result in a tensile stress
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
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 = 1
[../]
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/multiphase_mechanics/elasticenergymaterial.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 25
nz = 0
xmax = 250
ymax = 250
zmax = 0
elem_type = QUAD4
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./c]
[./InitialCondition]
type = SmoothCircleIC
x1 = 125.0
y1 = 125.0
radius = 60.0
invalue = 1.0
outvalue = 0.1
int_width = 50.0
[../]
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[./left]
type = DirichletBC
boundary = left
variable = disp_x
value = 0.0
[../]
[]
[Kernels]
[./TensorMechanics]
[../]
[./dummy]
type = MatDiffusion
variable = c
diffusivity = 0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '3 1 1 3 1 3 1 1 1 '
[../]
[./strain]
type = ComputeSmallStrain
eigenstrain_names = eigenstrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./prefactor]
type = DerivativeParsedMaterial
coupled_variables = c
property_name = prefactor
constant_names = 'epsilon0 c0'
constant_expressions = '0.05 0'
expression = '(c - c0) * epsilon0'
[../]
[./eigenstrain]
type = ComputeVariableEigenstrain
eigen_base = '1'
args = c
prefactor = prefactor
eigenstrain_name = eigenstrain
[../]
[./elasticenergy]
type = ElasticEnergyMaterial
args = 'c'
outputs = exodus
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
nl_abs_tol = 1e-10
num_steps = 1
petsc_options_iname = '-pc_factor_shift_type'
petsc_options_value = 'nonzero'
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/eigenstrain/variable_finite.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 0.5
ymax = 0.5
elem_type = QUAD4
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./strain11]
order = CONSTANT
family = MONOMIAL
[../]
[./stress11]
order = CONSTANT
family = MONOMIAL
[../]
[./c]
[../]
[./eigenstrain00]
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./c_IC]
int_width = 0.15
x1 = 0
y1 = 0
radius = 0.25
outvalue = 0
variable = c
invalue = 1
type = SmoothCircleIC
[../]
[]
[Kernels]
[./TensorMechanics]
[../]
[]
[AuxKernels]
[./strain11]
type = RankTwoAux
rank_two_tensor = mechanical_strain
index_i = 0
index_j = 0
variable = strain11
[../]
[./stress11]
type = RankTwoAux
rank_two_tensor = mechanical_strain
index_i = 1
index_j = 1
variable = stress11
[../]
[./eigenstrain00]
type = RankTwoAux
variable = eigenstrain00
rank_two_tensor = eigenstrain
index_j = 0
index_i = 0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
C_ijkl = '1 1'
fill_method = symmetric_isotropic
[../]
[./var_dependence]
type = DerivativeParsedMaterial
block = 0
expression = 0.01*c^2
coupled_variables = c
outputs = exodus
output_properties = 'var_dep'
f_name = var_dep
enable_jit = true
derivative_order = 2
[../]
[./eigenstrain]
type = ComputeVariableEigenstrain
block = 0
eigen_base = '1 1 1 0 0 0'
args = c
prefactor = var_dep
eigenstrain_name = eigenstrain
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'disp_x disp_y'
eigenstrain_names = eigenstrain
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[]
[BCs]
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./top_y]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = 0.0005*t
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
num_steps = 3
solve_type = PJFNK
petsc_options_iname = '-pc_type '
petsc_options_value = lu
l_max_its = 20
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-9
reset_dt = true
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/combined/examples/publications/rapid_dev/fig7b.i)
#
# Fig. 7 input for 10.1016/j.commatsci.2017.02.017
# D. Schwen et al./Computational Materials Science 132 (2017) 36-45
# Dashed black curve (2)
# Eigenstrain is globally applied. Single global elastic free energies.
# 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
[../]
[../]
[./Fe_fit]
order = SECOND
[../]
[]
[Modules/TensorMechanics/Master/all]
add_variables = true
eigenstrain_names = eigenstrain
[]
[Kernels]
# 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]
type = ComputeElasticityTensor
C_ijkl = '1 1'
fill_method = symmetric_isotropic
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
# eigenstrain as a function of phase
[./eigenstrain]
type = ComputeVariableEigenstrain
eigen_base = '0.05 0.05 0.05 0 0 0'
prefactor = h
args = eta
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
[../]
# global chemical free energy
[./chemical_free_energy]
type = DerivativeTwoPhaseMaterial
f_name = Fc
fa_name = Fc1
fb_name = Fc2
eta = eta
args = 'c'
W = 4
[../]
# global elastic free energy
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = Fe
args = 'eta'
output_properties = Fe
derivative_order = 2
[../]
# free energy
[./free_energy]
type = DerivativeSumMaterial
property_name = F
sum_materials = 'Fc Fe'
coupled_variables = 'c eta'
derivative_order = 2
[../]
[]
[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 = 8
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}/eigenstrain_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}/eigenstrain_vpp
[../]
[]