https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
ComputeLinearElasticPFFractureStress Class Reference

Phase-field fracture This class computes the stress and energy contribution for the small strain Linear Elastic formulation of phase field fracture. More...

#include <ComputeLinearElasticPFFractureStress.h>

Inheritance diagram for ComputeLinearElasticPFFractureStress:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 ComputeLinearElasticPFFractureStress (const InputParameters &parameters)
 
void initialSetup () override
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialPropertyByName (const std::string &name)
 
void validateDerivativeMaterialPropertyBase (const std::string &base)
 
const MaterialPropertyName derivativePropertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName derivativePropertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName derivativePropertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName derivativePropertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Types

enum class  Decomposition_type { strain_spectral , strain_vol_dev , stress_spectral , none }
 Decomposittion type. More...
 

Protected Member Functions

virtual void computeQpStress () override
 Compute the stress and store it in the _stress material property for the current quadrature point.
 
void computeStrainSpectral (Real &F_pos, Real &F_neg)
 Method to split elastic energy based on strain spectral decomposition.
 
void computeStrainVolDev (Real &F_pos, Real &F_neg)
 Method to split elastic energy based on strain volumetric/deviatoric decomposition.
 
void computeStressSpectral (Real &F_pos, Real &F_neg)
 Method to split elastic energy based on stress spectral decomposition.
 
virtual void initQpStatefulProperties () override
 
virtual void computeQpProperties () override
 
bool hasGuaranteedMaterialProperty (const MaterialPropertyName &prop, Guarantee guarantee)
 

Protected Attributes

enum ComputeLinearElasticPFFractureStress::Decomposition_type _decomposition_type
 
const std::string _elasticity_tensor_name
 Name of the elasticity tensor material property.
 
const MaterialProperty< RankFourTensor > & _elasticity_tensor
 Elasticity tensor material property.
 
const VariableValue_c
 Coupled order parameter defining the crack.
 
const MaterialProperty< Real > & _l
 Material property defining crack width, declared elsewhere.
 
const MaterialProperty< Real > & _gc
 Material property defining gc parameter, declared elsewhere.
 
const MaterialProperty< Real > & _pressure
 Material property defining pressure, declared elsewhere.
 
bool _use_current_hist
 Use current value of history variable.
 
bool _use_snes_vi_solver
 Use PETSc's VI (Reduced space active set solvers for variational inequalities based on Newton's method) solver.
 
MaterialProperty< Real > & _H
 History variable that prevents crack healing, declared in this material.
 
const MaterialProperty< Real > & _H_old
 Old value of history variable.
 
const MaterialProperty< Real > & _barrier
 material property for fracture energy barrier
 
MaterialProperty< Real > & _E
 Material property for elastic energy.
 
MaterialProperty< Real > & _dEdc
 Derivative of elastic energy w.r.t damage variable.
 
MaterialProperty< Real > & _d2Ed2c
 Second-order derivative of elastic energy w.r.t damage variable.
 
MaterialProperty< RankTwoTensor > & _dstress_dc
 Derivative of stress w.r.t damage variable.
 
MaterialProperty< RankTwoTensor > & _d2Fdcdstrain
 Second-order derivative of elastic energy w.r.t damage variable and strain.
 
const MaterialProperty< Real > & _D
 Material property for energetic degradation function.
 
const MaterialProperty< Real > & _dDdc
 Derivative of degradation function w.r.t damage variable.
 
const MaterialProperty< Real > & _d2Dd2c
 Second-order derivative of degradation w.r.t damage variable.
 
const MaterialProperty< Real > & _I
 Material property for damage indicator function.
 
const MaterialProperty< Real > & _dIdc
 Derivative of damage indicator function w.r.t damage variable.
 
const MaterialProperty< Real > & _d2Id2c
 Second-order derivative of damage indicator function w.r.t damage variable.
 
const std::string _base_name
 Base name prepended to all material property names to allow for multi-material systems.
 
const MaterialProperty< RankTwoTensor > & _mechanical_strain
 Mechanical strain material property.
 
MaterialProperty< RankTwoTensor > & _stress
 Stress material property.
 
MaterialProperty< RankTwoTensor > & _elastic_strain
 Elastic strain material property.
 
const MaterialProperty< RankTwoTensor > & _extra_stress
 Extra stress tensor.
 
std::vector< const Function * > _initial_stress_fcn
 initial stress components
 
MaterialProperty< RankFourTensor > & _Jacobian_mult
 derivative of stress w.r.t. strain (_dstress_dstrain)
 

Private Member Functions

bool haveMaterialProperty (const std::string &prop_name)
 
std::vector< VariableName > buildVariableVector (const VariableName &c1, const VariableName &c2, const VariableName &c3)
 
void validateCouplingHelper (const MaterialPropertyName &base, const std::vector< VariableName > &c, const System &system, std::vector< VariableName > &missing)
 
bool isNotObjectVariable (const VariableName &name)
 

Private Attributes

FEProblemBase_dmi_fe_problem
 
const InputParameters_gc_params
 Parameters of the object with this interface.
 
FEProblemBase *const _gc_feproblem
 Reference to the FEProblemBase class.
 
BlockRestrictable *const _gc_block_restrict
 Access block restrictions of the object with this interface.
 

Detailed Description

Phase-field fracture This class computes the stress and energy contribution for the small strain Linear Elastic formulation of phase field fracture.

Definition at line 21 of file ComputeLinearElasticPFFractureStress.h.

Member Enumeration Documentation

◆ Decomposition_type

Constructor & Destructor Documentation

◆ ComputeLinearElasticPFFractureStress()

ComputeLinearElasticPFFractureStress::ComputeLinearElasticPFFractureStress ( const InputParameters parameters)

Definition at line 29 of file ComputeLinearElasticPFFractureStress.C.

31 : ComputePFFractureStressBase(parameters),
33 _decomposition_type(getParam<MooseEnum>("decomposition_type").getEnum<Decomposition_type>())
34{
35}
ComputePFFractureStressBase is the base class for stress in phase field fracture model.
Add-on class that provides the functionality to check if guarantees for material properties are provi...

Member Function Documentation

◆ computeQpProperties()

void ComputeGeneralStressBase::computeQpProperties ( )
overrideprotectedvirtualinherited

Definition at line 44 of file ComputeGeneralStressBase.C.

45{
47
48 // Add in extra stress
49 _stress[_qp] += _extra_stress[_qp];
50}
const MaterialProperty< RankTwoTensor > & _extra_stress
Extra stress tensor.
virtual void computeQpStress()=0
Compute the stress and store it in the _stress material property for the current quadrature point.
MaterialProperty< RankTwoTensor > & _stress
Stress material property.

◆ computeQpStress()

void ComputeLinearElasticPFFractureStress::computeQpStress ( )
overrideprotectedvirtual

Compute the stress and store it in the _stress material property for the current quadrature point.

Implements ComputeGeneralStressBase.

Definition at line 196 of file ComputeLinearElasticPFFractureStress.C.

197{
198 Real F_pos, F_neg;
200
201 switch (_decomposition_type)
202 {
204 computeStrainSpectral(F_pos, F_neg);
205 break;
207 computeStrainVolDev(F_pos, F_neg);
208 break;
210 computeStressSpectral(F_pos, F_neg);
211 break;
212 default:
213 {
215 F_pos = stress.doubleContraction(_mechanical_strain[_qp]) / 2.0;
216 F_neg = 0.0;
218 _d2Fdcdstrain[_qp] = stress * _dDdc[_qp];
219
220 _stress[_qp] = _D[_qp] * stress - _pressure[_qp] * I2 * _I[_qp];
221 _dstress_dc[_qp] = stress * _dDdc[_qp] - _pressure[_qp] * I2 * _dIdc[_qp];
222 _Jacobian_mult[_qp] = _D[_qp] * _elasticity_tensor[_qp];
223 }
224 }
225
226 // // Assign history variable
227 Real hist_variable = _H_old[_qp];
229 {
230 _H[_qp] = F_pos;
231
233 hist_variable = _H[_qp];
234 }
235 else
236 {
237 if (F_pos > _H_old[_qp])
238 _H[_qp] = F_pos;
239 else
240 _H[_qp] = _H_old[_qp];
241
243 hist_variable = _H[_qp];
244
245 if (hist_variable < _barrier[_qp])
246 hist_variable = _barrier[_qp];
247 }
248
249 // Elastic free energy density
250 _E[_qp] =
251 hist_variable * _D[_qp] + F_neg - _pressure[_qp] * _mechanical_strain[_qp].trace() * _I[_qp];
252 _dEdc[_qp] =
253 hist_variable * _dDdc[_qp] - _pressure[_qp] * _mechanical_strain[_qp].trace() * _dIdc[_qp];
254 _d2Ed2c[_qp] = hist_variable * _d2Dd2c[_qp] -
255 _pressure[_qp] * _mechanical_strain[_qp].trace() * _d2Id2c[_qp];
256}
const MaterialProperty< RankTwoTensor > & _mechanical_strain
Mechanical strain material property.
MaterialProperty< RankFourTensor > & _Jacobian_mult
derivative of stress w.r.t. strain (_dstress_dstrain)
void computeStrainVolDev(Real &F_pos, Real &F_neg)
Method to split elastic energy based on strain volumetric/deviatoric decomposition.
void computeStressSpectral(Real &F_pos, Real &F_neg)
Method to split elastic energy based on stress spectral decomposition.
void computeStrainSpectral(Real &F_pos, Real &F_neg)
Method to split elastic energy based on strain spectral decomposition.
MaterialProperty< Real > & _H
History variable that prevents crack healing, declared in this material.
MaterialProperty< Real > & _E
Material property for elastic energy.
const MaterialProperty< Real > & _dDdc
Derivative of degradation function w.r.t damage variable.
const MaterialProperty< Real > & _d2Dd2c
Second-order derivative of degradation w.r.t damage variable.
const MaterialProperty< Real > & _D
Material property for energetic degradation function.
const MaterialProperty< Real > & _H_old
Old value of history variable.
MaterialProperty< RankTwoTensor > & _d2Fdcdstrain
Second-order derivative of elastic energy w.r.t damage variable and strain.
const MaterialProperty< Real > & _pressure
Material property defining pressure, declared elsewhere.
const MaterialProperty< Real > & _dIdc
Derivative of damage indicator function w.r.t damage variable.
const MaterialProperty< RankFourTensor > & _elasticity_tensor
Elasticity tensor material property.
const MaterialProperty< Real > & _barrier
material property for fracture energy barrier
bool _use_snes_vi_solver
Use PETSc's VI (Reduced space active set solvers for variational inequalities based on Newton's metho...
const MaterialProperty< Real > & _d2Id2c
Second-order derivative of damage indicator function w.r.t damage variable.
bool _use_current_hist
Use current value of history variable.
MaterialProperty< Real > & _d2Ed2c
Second-order derivative of elastic energy w.r.t damage variable.
MaterialProperty< RankTwoTensor > & _dstress_dc
Derivative of stress w.r.t damage variable.
MaterialProperty< Real > & _dEdc
Derivative of elastic energy w.r.t damage variable.
const MaterialProperty< Real > & _I
Material property for damage indicator function.
T doubleContraction(const RankTwoTensorTempl< T > &a) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ computeStrainSpectral()

void ComputeLinearElasticPFFractureStress::computeStrainSpectral ( Real &  F_pos,
Real &  F_neg 
)
protected

Method to split elastic energy based on strain spectral decomposition.

Parameters
F_postensile part of total elastic energy
F_negcompressive part of total elastic energy

Definition at line 49 of file ComputeLinearElasticPFFractureStress.C.

50{
51 // Isotropic elasticity is assumed and should be enforced
52 const Real lambda = _elasticity_tensor[_qp](0, 0, 1, 1);
53 const Real mu = _elasticity_tensor[_qp](0, 1, 0, 1);
54
56
57 // Compute eigenvectors and eigenvalues of mechanical strain and projection tensor
58 RankTwoTensor eigvec;
59 std::vector<Real> eigval(LIBMESH_DIM);
60 RankFourTensor Ppos =
61 _mechanical_strain[_qp].positiveProjectionEigenDecomposition(eigval, eigvec);
63
64 // Calculate tensors of outerproduct of eigen vectors
65 std::vector<RankTwoTensor> etens(LIBMESH_DIM);
66
67 for (const auto i : make_range(Moose::dim))
68 etens[i] = RankTwoTensor::selfOuterProduct(eigvec.column(i));
69
70 // Separate out positive and negative eigen values
71 std::vector<Real> epos(LIBMESH_DIM), eneg(LIBMESH_DIM);
72 for (const auto i : make_range(Moose::dim))
73 {
74 epos[i] = (std::abs(eigval[i]) + eigval[i]) / 2.0;
75 eneg[i] = -(std::abs(eigval[i]) - eigval[i]) / 2.0;
76 }
77
78 // Seprate positive and negative sums of all eigenvalues
79 Real etr = 0.0;
80 for (const auto i : make_range(Moose::dim))
81 etr += eigval[i];
82
83 const Real etrpos = (std::abs(etr) + etr) / 2.0;
84 const Real etrneg = -(std::abs(etr) - etr) / 2.0;
85
86 // Calculate the tensile (postive) and compressive (negative) parts of stress
87 RankTwoTensor stress0pos, stress0neg;
88 for (const auto i : make_range(Moose::dim))
89 {
90 stress0pos += etens[i] * (lambda * etrpos + 2.0 * mu * epos[i]);
91 stress0neg += etens[i] * (lambda * etrneg + 2.0 * mu * eneg[i]);
92 }
93
94 // sum squares of epos and eneg
95 Real pval(0.0), nval(0.0);
96 for (const auto i : make_range(Moose::dim))
97 {
98 pval += epos[i] * epos[i];
99 nval += eneg[i] * eneg[i];
100 }
101
102 _stress[_qp] = stress0pos * _D[_qp] - _pressure[_qp] * I2 * _I[_qp] + stress0neg;
103
104 // Energy with positive principal strains
105 F_pos = lambda * etrpos * etrpos / 2.0 + mu * pval;
106 F_neg = -lambda * etrneg * etrneg / 2.0 + mu * nval;
107
108 // 2nd derivative wrt c and strain = 0.0 if we used the previous step's history varible
110 _d2Fdcdstrain[_qp] = stress0pos * _dDdc[_qp];
111
112 // Used in StressDivergencePFFracTensors off-diagonal Jacobian
113 _dstress_dc[_qp] = stress0pos * _dDdc[_qp] - _pressure[_qp] * I2 * _dIdc[_qp];
114
115 _Jacobian_mult[_qp] = (I4sym - (1 - _D[_qp]) * Ppos) * _elasticity_tensor[_qp];
116}
const double mu
unsigned int dim
IntRange< T > make_range(T beg, T end)

Referenced by computeQpStress().

◆ computeStrainVolDev()

void ComputeLinearElasticPFFractureStress::computeStrainVolDev ( Real &  F_pos,
Real &  F_neg 
)
protected

Method to split elastic energy based on strain volumetric/deviatoric decomposition.

Parameters
F_postensile part of total elastic energy
F_negcompressive part of total elastic energy

Definition at line 153 of file ComputeLinearElasticPFFractureStress.C.

154{
155 // Isotropic elasticity is assumed and should be enforced
156 const Real lambda = _elasticity_tensor[_qp](0, 0, 1, 1);
157 const Real mu = _elasticity_tensor[_qp](0, 1, 0, 1);
158 const Real k = lambda + 2.0 * mu / LIBMESH_DIM;
159
161 RankFourTensor I2I2 = I2.outerProduct(I2);
162
163 RankFourTensor Jacobian_pos, Jacobian_neg;
164 RankTwoTensor strain0vol, strain0dev;
165 RankTwoTensor stress0pos, stress0neg;
166 Real strain0tr, strain0tr_neg, strain0tr_pos;
167
168 strain0dev = _mechanical_strain[_qp].deviatoric();
169 strain0vol = _mechanical_strain[_qp] - strain0dev;
170 strain0tr = _mechanical_strain[_qp].trace();
171 strain0tr_neg = std::min(strain0tr, 0.0);
172 strain0tr_pos = strain0tr - strain0tr_neg;
173 stress0neg = k * strain0tr_neg * I2;
174 stress0pos = _elasticity_tensor[_qp] * _mechanical_strain[_qp] - stress0neg;
175 // Energy with positive principal strains
176 RankTwoTensor strain0dev2 = strain0dev * strain0dev;
177 F_pos = 0.5 * k * strain0tr_pos * strain0tr_pos + mu * strain0dev2.trace();
178 F_neg = 0.5 * k * strain0tr_neg * strain0tr_neg;
179
180 _stress[_qp] = stress0pos * _D[_qp] - _pressure[_qp] * I2 * _I[_qp] + stress0neg;
181
182 // 2nd derivative wrt c and strain = 0.0 if we used the previous step's history varible
184 _d2Fdcdstrain[_qp] = stress0pos * _dDdc[_qp];
185
186 // Used in StressDivergencePFFracTensors off-diagonal Jacobian
187 _dstress_dc[_qp] = stress0pos * _dDdc[_qp] - _pressure[_qp] * I2 * _dIdc[_qp];
188
189 if (strain0tr < 0)
190 Jacobian_neg = k * I2I2;
191 Jacobian_pos = _elasticity_tensor[_qp] - Jacobian_neg;
192 _Jacobian_mult[_qp] = _D[_qp] * Jacobian_pos + Jacobian_neg;
193}
RankTwoTensorTempl< T > deviatoric() const

Referenced by computeQpStress().

◆ computeStressSpectral()

void ComputeLinearElasticPFFractureStress::computeStressSpectral ( Real &  F_pos,
Real &  F_neg 
)
protected

Method to split elastic energy based on stress spectral decomposition.

Parameters
F_postensile part of total elastic energy
F_negcompressive part of total elastic energy

Definition at line 119 of file ComputeLinearElasticPFFractureStress.C.

120{
121 // Compute Uncracked stress
123
125
126 // Create the positive and negative projection tensors
128 std::vector<Real> eigval;
129 RankTwoTensor eigvec;
130 RankFourTensor Ppos = stress.positiveProjectionEigenDecomposition(eigval, eigvec);
131
132 // Project the positive and negative stresses
133 RankTwoTensor stress0pos = Ppos * stress;
134 RankTwoTensor stress0neg = stress - stress0pos;
135
136 // Compute the positive and negative elastic energies
137 F_pos = (stress0pos).doubleContraction(_mechanical_strain[_qp]) / 2.0;
138 F_neg = (stress0neg).doubleContraction(_mechanical_strain[_qp]) / 2.0;
139
140 _stress[_qp] = stress0pos * _D[_qp] - _pressure[_qp] * I2 * _I[_qp] + stress0neg;
141
142 // 2nd derivative wrt c and strain = 0.0 if we used the previous step's history varible
144 _d2Fdcdstrain[_qp] = stress0pos * _dDdc[_qp];
145
146 // Used in StressDivergencePFFracTensors off-diagonal Jacobian
147 _dstress_dc[_qp] = stress0pos * _dDdc[_qp] - _pressure[_qp] * I2 * _dIdc[_qp];
148
149 _Jacobian_mult[_qp] = (I4sym - (1 - _D[_qp]) * Ppos) * _elasticity_tensor[_qp];
150}
RankFourTensorTempl< T > positiveProjectionEigenDecomposition(std::vector< T > &, RankTwoTensorTempl< T > &) const

Referenced by computeQpStress().

◆ hasGuaranteedMaterialProperty()

bool GuaranteeConsumer::hasGuaranteedMaterialProperty ( const MaterialPropertyName &  prop,
Guarantee  guarantee 
)
protectedinherited

Definition at line 28 of file GuaranteeConsumer.C.

30{
32 mooseError("hasGuaranteedMaterialProperty() needs to be called in initialSetup()");
33
34 // Reference to MaterialWarehouse for testing and retrieving block ids
35 const auto & warehouse = _gc_feproblem->getMaterialWarehouse();
36
37 // Complete set of ids that this object is active
41
42 // Loop over each id for this object
43 for (const auto & id : ids)
44 {
45 // If block materials exist, look if any issue the required guarantee
46 if (warehouse.hasActiveBlockObjects(id))
47 {
48 const std::vector<std::shared_ptr<MaterialBase>> & mats = warehouse.getActiveBlockObjects(id);
49 for (const auto & mat : mats)
50 {
51 const auto & mat_props = mat->getSuppliedItems();
52 if (mat_props.count(prop_name))
53 {
54 auto guarantee_mat = dynamic_cast<GuaranteeProvider *>(mat.get());
55 if (guarantee_mat && !guarantee_mat->hasGuarantee(prop_name, guarantee))
56 {
57 // we found at least one material on the set of block we operate on
58 // that does _not_ provide the requested guarantee
59 return false;
60 }
61 }
62 }
63 }
64 }
65
66 return true;
67}
void mooseError(Args &&... args)
virtual const std::set< SubdomainID > & blockIDs() const
virtual bool blockRestricted() const
const MaterialWarehouse & getMaterialWarehouse() const
virtual MooseMesh & mesh() override
virtual bool startedInitialSetup()
BlockRestrictable *const _gc_block_restrict
Access block restrictions of the object with this interface.
FEProblemBase *const _gc_feproblem
Reference to the FEProblemBase class.
Add-on class that provides the functionality to issue guarantees for declared material properties.
const std::set< SubdomainID > & meshSubdomains() const

Referenced by ComputeFiniteStrainElasticStress::computeQpStress(), LagrangianStressDivergenceBase::initialSetup(), ADComputeMultipleInelasticStress::initialSetup(), ADComputeSmearedCrackingStress::initialSetup(), initialSetup(), ComputeMultipleInelasticStressBase::initialSetup(), ComputeSmearedCrackingStress::initialSetup(), ComputeLagrangianStressBase::initialSetup(), ComputeStVenantKirchhoffStress::initialSetup(), and CriticalTimeStep::initialSetup().

◆ initialSetup()

void ComputeLinearElasticPFFractureStress::initialSetup ( )
override

Definition at line 38 of file ComputeLinearElasticPFFractureStress.C.

39{
43 mooseError("Decomposition approach of strain_vol_dev and strain_spectral can only be used with "
44 "isotropic elasticity tensor materials, use stress_spectral for anistropic "
45 "elasticity tensor materials");
46}
const std::string _elasticity_tensor_name
Name of the elasticity tensor material property.
bool hasGuaranteedMaterialProperty(const MaterialPropertyName &prop, Guarantee guarantee)

◆ initQpStatefulProperties()

void ComputePFFractureStressBase::initQpStatefulProperties ( )
overrideprotectedvirtualinherited

Reimplemented from ComputeGeneralStressBase.

Definition at line 70 of file ComputePFFractureStressBase.C.

71{
72 _H[_qp] = 0.0;
73}

◆ validParams()

InputParameters ComputeLinearElasticPFFractureStress::validParams ( )
static

Definition at line 16 of file ComputeLinearElasticPFFractureStress.C.

17{
19 params.addClassDescription("Computes the stress and free energy derivatives for the phase field "
20 "fracture model, with small strain");
21 MooseEnum Decomposition("strain_spectral strain_vol_dev stress_spectral none", "none");
22 params.addParam<MooseEnum>("decomposition_type",
23 Decomposition,
24 "Decomposition approaches. Choices are: " +
25 Decomposition.getRawNames());
26 return params;
27}
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
std::string getRawNames() const

Member Data Documentation

◆ _barrier

const MaterialProperty<Real>& ComputePFFractureStressBase::_barrier
protectedinherited

material property for fracture energy barrier

Definition at line 57 of file ComputePFFractureStressBase.h.

Referenced by computeQpStress().

◆ _base_name

const std::string ComputeGeneralStressBase::_base_name
protectedinherited

Base name prepended to all material property names to allow for multi-material systems.

Definition at line 43 of file ComputeGeneralStressBase.h.

Referenced by ComputeCosseratLinearElasticStress::initialSetup(), and ComputeLinearElasticStress::initialSetup().

◆ _c

const VariableValue& ComputePFFractureStressBase::_c
protectedinherited

Coupled order parameter defining the crack.

Definition at line 33 of file ComputePFFractureStressBase.h.

◆ _D

const MaterialProperty<Real>& ComputePFFractureStressBase::_D
protectedinherited

Material property for energetic degradation function.

Definition at line 75 of file ComputePFFractureStressBase.h.

Referenced by computeQpStress(), computeStrainSpectral(), computeStrainVolDev(), and computeStressSpectral().

◆ _d2Dd2c

const MaterialProperty<Real>& ComputePFFractureStressBase::_d2Dd2c
protectedinherited

Second-order derivative of degradation w.r.t damage variable.

Definition at line 81 of file ComputePFFractureStressBase.h.

Referenced by computeQpStress().

◆ _d2Ed2c

MaterialProperty<Real>& ComputePFFractureStressBase::_d2Ed2c
protectedinherited

Second-order derivative of elastic energy w.r.t damage variable.

Definition at line 66 of file ComputePFFractureStressBase.h.

Referenced by computeQpStress().

◆ _d2Fdcdstrain

MaterialProperty<RankTwoTensor>& ComputePFFractureStressBase::_d2Fdcdstrain
protectedinherited

Second-order derivative of elastic energy w.r.t damage variable and strain.

Definition at line 72 of file ComputePFFractureStressBase.h.

Referenced by computeQpStress(), computeStrainSpectral(), computeStrainVolDev(), and computeStressSpectral().

◆ _d2Id2c

const MaterialProperty<Real>& ComputePFFractureStressBase::_d2Id2c
protectedinherited

Second-order derivative of damage indicator function w.r.t damage variable.

Definition at line 90 of file ComputePFFractureStressBase.h.

Referenced by computeQpStress().

◆ _dDdc

const MaterialProperty<Real>& ComputePFFractureStressBase::_dDdc
protectedinherited

Derivative of degradation function w.r.t damage variable.

Definition at line 78 of file ComputePFFractureStressBase.h.

Referenced by computeQpStress(), computeStrainSpectral(), computeStrainVolDev(), and computeStressSpectral().

◆ _decomposition_type

enum ComputeLinearElasticPFFractureStress::Decomposition_type ComputeLinearElasticPFFractureStress::_decomposition_type
protected

Referenced by computeQpStress(), and initialSetup().

◆ _dEdc

MaterialProperty<Real>& ComputePFFractureStressBase::_dEdc
protectedinherited

Derivative of elastic energy w.r.t damage variable.

Definition at line 63 of file ComputePFFractureStressBase.h.

Referenced by computeQpStress().

◆ _dIdc

const MaterialProperty<Real>& ComputePFFractureStressBase::_dIdc
protectedinherited

Derivative of damage indicator function w.r.t damage variable.

Definition at line 87 of file ComputePFFractureStressBase.h.

Referenced by computeQpStress(), computeStrainSpectral(), computeStrainVolDev(), and computeStressSpectral().

◆ _dstress_dc

MaterialProperty<RankTwoTensor>& ComputePFFractureStressBase::_dstress_dc
protectedinherited

Derivative of stress w.r.t damage variable.

Definition at line 69 of file ComputePFFractureStressBase.h.

Referenced by computeQpStress(), computeStrainSpectral(), computeStrainVolDev(), and computeStressSpectral().

◆ _E

MaterialProperty<Real>& ComputePFFractureStressBase::_E
protectedinherited

Material property for elastic energy.

Definition at line 60 of file ComputePFFractureStressBase.h.

Referenced by computeQpStress().

◆ _elastic_strain

MaterialProperty<RankTwoTensor>& ComputeGeneralStressBase::_elastic_strain
protectedinherited

◆ _elasticity_tensor

const MaterialProperty<RankFourTensor>& ComputePFFractureStressBase::_elasticity_tensor
protectedinherited

Elasticity tensor material property.

Definition at line 30 of file ComputePFFractureStressBase.h.

Referenced by computeQpStress(), computeStrainSpectral(), computeStrainVolDev(), and computeStressSpectral().

◆ _elasticity_tensor_name

const std::string ComputePFFractureStressBase::_elasticity_tensor_name
protectedinherited

Name of the elasticity tensor material property.

Definition at line 28 of file ComputePFFractureStressBase.h.

Referenced by initialSetup().

◆ _extra_stress

const MaterialProperty<RankTwoTensor>& ComputeGeneralStressBase::_extra_stress
protectedinherited

Extra stress tensor.

Definition at line 53 of file ComputeGeneralStressBase.h.

Referenced by ComputeGeneralStressBase::computeQpProperties().

◆ _gc

const MaterialProperty<Real>& ComputePFFractureStressBase::_gc
protectedinherited

Material property defining gc parameter, declared elsewhere.

Definition at line 39 of file ComputePFFractureStressBase.h.

◆ _gc_block_restrict

BlockRestrictable* const GuaranteeConsumer::_gc_block_restrict
privateinherited

Access block restrictions of the object with this interface.

Definition at line 41 of file GuaranteeConsumer.h.

Referenced by GuaranteeConsumer::hasGuaranteedMaterialProperty().

◆ _gc_feproblem

FEProblemBase* const GuaranteeConsumer::_gc_feproblem
privateinherited

Reference to the FEProblemBase class.

Definition at line 38 of file GuaranteeConsumer.h.

Referenced by GuaranteeConsumer::hasGuaranteedMaterialProperty().

◆ _gc_params

const InputParameters& GuaranteeConsumer::_gc_params
privateinherited

Parameters of the object with this interface.

Definition at line 35 of file GuaranteeConsumer.h.

◆ _H

MaterialProperty<Real>& ComputePFFractureStressBase::_H
protectedinherited

History variable that prevents crack healing, declared in this material.

Definition at line 51 of file ComputePFFractureStressBase.h.

Referenced by computeQpStress(), and ComputePFFractureStressBase::initQpStatefulProperties().

◆ _H_old

const MaterialProperty<Real>& ComputePFFractureStressBase::_H_old
protectedinherited

Old value of history variable.

Definition at line 54 of file ComputePFFractureStressBase.h.

Referenced by computeQpStress().

◆ _I

const MaterialProperty<Real>& ComputePFFractureStressBase::_I
protectedinherited

Material property for damage indicator function.

Definition at line 84 of file ComputePFFractureStressBase.h.

Referenced by computeQpStress(), computeStrainSpectral(), computeStrainVolDev(), and computeStressSpectral().

◆ _initial_stress_fcn

std::vector<const Function *> ComputeGeneralStressBase::_initial_stress_fcn
protectedinherited

initial stress components

Definition at line 56 of file ComputeGeneralStressBase.h.

◆ _Jacobian_mult

MaterialProperty<RankFourTensor>& ComputeGeneralStressBase::_Jacobian_mult
protectedinherited

◆ _l

const MaterialProperty<Real>& ComputePFFractureStressBase::_l
protectedinherited

Material property defining crack width, declared elsewhere.

Definition at line 36 of file ComputePFFractureStressBase.h.

◆ _mechanical_strain

const MaterialProperty<RankTwoTensor>& ComputeGeneralStressBase::_mechanical_strain
protectedinherited

◆ _pressure

const MaterialProperty<Real>& ComputePFFractureStressBase::_pressure
protectedinherited

Material property defining pressure, declared elsewhere.

Definition at line 42 of file ComputePFFractureStressBase.h.

Referenced by computeQpStress(), computeStrainSpectral(), computeStrainVolDev(), and computeStressSpectral().

◆ _stress

MaterialProperty<RankTwoTensor>& ComputeGeneralStressBase::_stress
protectedinherited

Stress material property.

Definition at line 48 of file ComputeGeneralStressBase.h.

Referenced by ComputeMultipleInelasticStressBase::computeAdmissibleState(), ComputeMultipleInelasticCosseratStress::computeAdmissibleState(), ComputeGeneralStressBase::computeQpProperties(), ComputeMultiPlasticityStress::computeQpStress(), ComputeStrainIncrementBasedStress::computeQpStress(), FiniteStrainPlasticMaterial::computeQpStress(), AbaqusUMATStress::computeQpStress(), ComputeCosseratLinearElasticStress::computeQpStress(), ComputeFiniteStrainElasticStress::computeQpStress(), computeQpStress(), ComputeLinearElasticStress::computeQpStress(), ComputeLinearViscoelasticStress::computeQpStress(), ComputeMultipleInelasticStressBase::computeQpStress(), ComputeSmearedCrackingStress::computeQpStress(), ComputeMultipleCrystalPlasticityStress::computeQpStress(), ComputeMultipleInelasticStressBase::computeQpStressIntermediateConfiguration(), computeStrainSpectral(), computeStrainVolDev(), computeStressSpectral(), ComputeCreepPlasticityStress::computeTangentOperators(), ComputeMultipleInelasticStressBase::finiteStrainRotation(), FiniteStrainCrystalPlasticity::initQpStatefulProperties(), FiniteStrainUObasedCP::initQpStatefulProperties(), FiniteStrainHyperElasticViscoPlastic::initQpStatefulProperties(), ComputeGeneralStressBase::initQpStatefulProperties(), ComputeMultiPlasticityStress::postReturnMap(), FiniteStrainCrystalPlasticity::postSolveQp(), FiniteStrainUObasedCP::postSolveQp(), FiniteStrainHyperElasticViscoPlastic::postSolveQp(), ComputeSmearedCrackingStress::updateCrackingStateAndStress(), ComputeCreepPlasticityStress::updateQpState(), ComputeMultipleInelasticStress::updateQpState(), and ComputeMultipleInelasticStressBase::updateQpStateSingleModel().

◆ _use_current_hist

bool ComputePFFractureStressBase::_use_current_hist
protectedinherited

Use current value of history variable.

Definition at line 45 of file ComputePFFractureStressBase.h.

Referenced by computeQpStress(), computeStrainSpectral(), computeStrainVolDev(), and computeStressSpectral().

◆ _use_snes_vi_solver

bool ComputePFFractureStressBase::_use_snes_vi_solver
protectedinherited

Use PETSc's VI (Reduced space active set solvers for variational inequalities based on Newton's method) solver.

Definition at line 48 of file ComputePFFractureStressBase.h.

Referenced by computeQpStress().


The documentation for this class was generated from the following files: