www.mooseframework.org
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ComputeCrackedStress Class Reference

Computes energy and modifies the stress for phase field fracture. More...

#include <ComputeCrackedStress.h>

Inheritance diagram for ComputeCrackedStress:
[legend]

Public Member Functions

 ComputeCrackedStress (const InputParameters &parameters)
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual void computeQpProperties ()
 
virtual void initQpStatefulProperties ()
 

Protected Attributes

const std::string _base_name
 Base name of the stress after being modified to include cracks. More...
 
const std::string _uncracked_base_name
 Base name of the uncracked stress and strain. More...
 
bool _finite_strain_model
 Indicator if finite strain model is used, to determine if mechanical_strain or elastic_strain should be used. More...
 
bool _use_current_hist
 Use current value of history variable. More...
 
const MaterialProperty< RankTwoTensor > & _strain
 Mechanical_strain if finite_strain_model = false, otherwise elastic_strain. More...
 
const MaterialProperty< RankTwoTensor > & _uncracked_stress
 Uncracked stress calculated by another material. More...
 
const MaterialProperty< RankFourTensor > & _uncracked_Jacobian_mult
 Uncracked Jacobian_mult calculated by another material. More...
 
const VariableValue & _c
 Variable defining the phase field damage parameter. More...
 
const MaterialProperty< Real > & _gc_prop
 Critical energy release rate for fracture. More...
 
const MaterialProperty< Real > & _l
 Characteristic length, controls damage zone thickness. More...
 
const MaterialProperty< Real > & _visco
 
Real _kdamage
 Small number to avoid non-positive definiteness at or near complete damage. More...
 
MaterialProperty< RankTwoTensor > & _stress
 Stress being computed by this kernel. More...
 
MaterialProperty< Real > & _F
 
MaterialProperty< Real > & _dFdc
 
MaterialProperty< Real > & _d2Fdc2
 
MaterialProperty< RankTwoTensor > & _d2Fdcdstrain
 
MaterialProperty< RankTwoTensor > & _dstress_dc
 
MaterialProperty< Real > & _hist
 history variable storing the maximum positive deformation energy More...
 
const MaterialProperty< Real > & _hist_old
 
MaterialProperty< RankFourTensor > & _Jacobian_mult
 derivative of stress w.r.t. strain (_dstress_dstrain) More...
 
MaterialProperty< Real > & _kappa
 Property where the value for kappa will be defined. More...
 
MaterialProperty< Real > & _L
 Property where the value for L will be defined. More...
 

Detailed Description

Computes energy and modifies the stress for phase field fracture.

Can be used with any constitutive model or elastic symmetry.

Definition at line 27 of file ComputeCrackedStress.h.

Constructor & Destructor Documentation

◆ ComputeCrackedStress()

ComputeCrackedStress::ComputeCrackedStress ( const InputParameters &  parameters)

Definition at line 40 of file ComputeCrackedStress.C.

41  : DerivativeMaterialInterface<Material>(parameters),
42  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
43  _uncracked_base_name(getParam<std::string>("uncracked_base_name") + "_"),
44  _finite_strain_model(getParam<bool>("finite_strain_model")),
45  _use_current_hist(getParam<bool>("use_current_history_variable")),
46  _strain(
48  ? getMaterialPropertyByName<RankTwoTensor>(_uncracked_base_name + "elastic_strain")
49  : getMaterialPropertyByName<RankTwoTensor>(_uncracked_base_name + "mechanical_strain")),
50  _uncracked_stress(getMaterialPropertyByName<RankTwoTensor>(_uncracked_base_name + "stress")),
52  getMaterialPropertyByName<RankFourTensor>(_uncracked_base_name + "Jacobian_mult")),
53  _c(coupledValue("c")),
54  _gc_prop(getMaterialProperty<Real>("gc_prop")),
55  _l(getMaterialProperty<Real>("l")),
56  _visco(getMaterialProperty<Real>("visco")),
57  _kdamage(getParam<Real>("kdamage")),
58  _stress(declareProperty<RankTwoTensor>(_base_name + "stress")),
59  _F(declareProperty<Real>(getParam<MaterialPropertyName>("F_name"))),
60  _dFdc(declarePropertyDerivative<Real>(getParam<MaterialPropertyName>("F_name"),
61  getVar("c", 0)->name())),
62  _d2Fdc2(declarePropertyDerivative<Real>(
63  getParam<MaterialPropertyName>("F_name"), getVar("c", 0)->name(), getVar("c", 0)->name())),
64  _d2Fdcdstrain(declareProperty<RankTwoTensor>("d2Fdcdstrain")),
65  _dstress_dc(declarePropertyDerivative<RankTwoTensor>("stress", getVar("c", 0)->name())),
66  _hist(declareProperty<Real>("hist")),
67  _hist_old(getMaterialPropertyOld<Real>("hist")),
68  _Jacobian_mult(declareProperty<RankFourTensor>(_base_name + "Jacobian_mult")),
69  _kappa(declareProperty<Real>(getParam<MaterialPropertyName>("kappa_name"))),
70  _L(declareProperty<Real>(getParam<MaterialPropertyName>("mobility_name")))
71 {
72 }

Member Function Documentation

◆ computeQpProperties()

void ComputeCrackedStress::computeQpProperties ( )
protectedvirtual

Definition at line 82 of file ComputeCrackedStress.C.

83 {
84  const Real c = _c[_qp];
85 
86  // Zero out values when c > 1
87  Real cfactor = 1.0;
88  if (c > 1.0)
89  cfactor = 0.0;
90 
91  // Create the positive and negative projection tensors
92  RankFourTensor I4sym(RankFourTensor::initIdentitySymmetricFour);
93  std::vector<Real> eigval;
94  RankTwoTensor eigvec;
95  RankFourTensor Ppos = _uncracked_stress[_qp].positiveProjectionEigenDecomposition(eigval, eigvec);
96  RankFourTensor Pneg = I4sym - Ppos;
97 
98  // Project the positive and negative stresses
99  RankTwoTensor stress0pos = Ppos * _uncracked_stress[_qp];
100  RankTwoTensor stress0neg = Pneg * _uncracked_stress[_qp];
101 
102  // Compute the positive and negative elastic energies
103  Real G0_pos = (stress0pos).doubleContraction(_strain[_qp]) / 2.0;
104  Real G0_neg = (stress0neg).doubleContraction(_strain[_qp]) / 2.0;
105 
106  // Update the history variable
107  if (G0_pos > _hist_old[_qp])
108  _hist[_qp] = G0_pos;
109  else
110  _hist[_qp] = _hist_old[_qp];
111 
112  Real hist_variable = _hist_old[_qp];
113  if (_use_current_hist)
114  hist_variable = _hist[_qp];
115 
116  // Compute degredation function and derivatives
117  Real h = cfactor * (1.0 - c) * (1.0 - c) * (1.0 - _kdamage) + _kdamage;
118  Real dhdc = -2.0 * cfactor * (1.0 - c) * (1.0 - _kdamage);
119  Real d2hdc2 = 2.0 * cfactor * (1.0 - _kdamage);
120 
121  // Compute stress and its derivatives
122  _stress[_qp] = (Ppos * h + Pneg) * _uncracked_stress[_qp];
123  _dstress_dc[_qp] = stress0pos * dhdc;
124  _Jacobian_mult[_qp] = (Ppos * h + Pneg) * _uncracked_Jacobian_mult[_qp];
125 
126  // Compute energy and its derivatives
127  _F[_qp] = hist_variable * h - G0_neg + _gc_prop[_qp] * c * c / (2 * _l[_qp]);
128  _dFdc[_qp] = hist_variable * dhdc + _gc_prop[_qp] * c / _l[_qp];
129  _d2Fdc2[_qp] = hist_variable * d2hdc2 + _gc_prop[_qp] / _l[_qp];
130 
131  // 2nd derivative wrt c and strain = 0.0 if we used the previous step's history varible
132  if (_use_current_hist)
133  _d2Fdcdstrain[_qp] = stress0pos * dhdc;
134 
135  // Assign L and kappa
136  _kappa[_qp] = _gc_prop[_qp] * _l[_qp];
137  _L[_qp] = 1.0 / (_gc_prop[_qp] * _visco[_qp]);
138 }

◆ initQpStatefulProperties()

void ComputeCrackedStress::initQpStatefulProperties ( )
protectedvirtual

Definition at line 75 of file ComputeCrackedStress.C.

76 {
77  _stress[_qp].zero();
78  _hist[_qp] = 0.0;
79 }

◆ validParams()

InputParameters ComputeCrackedStress::validParams ( )
static

Definition at line 17 of file ComputeCrackedStress.C.

18 {
19  InputParameters params = Material::validParams();
20  params.addClassDescription("Computes energy and modifies the stress for phase field fracture");
21  params.addRequiredCoupledVar("c", "Order parameter for damage");
22  params.addParam<Real>("kdamage", 1e-9, "Stiffness of damaged matrix");
23  params.addParam<bool>("finite_strain_model", false, "The model is using finite strain");
24  params.addParam<bool>(
25  "use_current_history_variable", false, "Use the current value of the history variable.");
26  params.addParam<MaterialPropertyName>(
27  "F_name", "E_el", "Name of material property storing the elastic energy");
28  params.addParam<MaterialPropertyName>(
29  "kappa_name",
30  "kappa_op",
31  "Name of material property being created to store the interfacial parameter kappa");
32  params.addParam<MaterialPropertyName>(
33  "mobility_name", "L", "Name of material property being created to store the mobility L");
34  params.addParam<std::string>("base_name", "The base name used to save the cracked stress");
35  params.addRequiredParam<std::string>("uncracked_base_name",
36  "The base name used to calculate the original stress");
37  return params;
38 }

Member Data Documentation

◆ _base_name

const std::string ComputeCrackedStress::_base_name
protected

Base name of the stress after being modified to include cracks.

Definition at line 38 of file ComputeCrackedStress.h.

◆ _c

const VariableValue& ComputeCrackedStress::_c
protected

Variable defining the phase field damage parameter.

Definition at line 59 of file ComputeCrackedStress.h.

Referenced by computeQpProperties().

◆ _d2Fdc2

MaterialProperty<Real>& ComputeCrackedStress::_d2Fdc2
protected

Definition at line 78 of file ComputeCrackedStress.h.

Referenced by computeQpProperties().

◆ _d2Fdcdstrain

MaterialProperty<RankTwoTensor>& ComputeCrackedStress::_d2Fdcdstrain
protected

Definition at line 79 of file ComputeCrackedStress.h.

Referenced by computeQpProperties().

◆ _dFdc

MaterialProperty<Real>& ComputeCrackedStress::_dFdc
protected

Definition at line 77 of file ComputeCrackedStress.h.

Referenced by computeQpProperties().

◆ _dstress_dc

MaterialProperty<RankTwoTensor>& ComputeCrackedStress::_dstress_dc
protected

Definition at line 80 of file ComputeCrackedStress.h.

Referenced by computeQpProperties().

◆ _F

MaterialProperty<Real>& ComputeCrackedStress::_F
protected

Definition at line 76 of file ComputeCrackedStress.h.

Referenced by computeQpProperties().

◆ _finite_strain_model

bool ComputeCrackedStress::_finite_strain_model
protected

Indicator if finite strain model is used, to determine if mechanical_strain or elastic_strain should be used.

Definition at line 44 of file ComputeCrackedStress.h.

◆ _gc_prop

const MaterialProperty<Real>& ComputeCrackedStress::_gc_prop
protected

Critical energy release rate for fracture.

Definition at line 62 of file ComputeCrackedStress.h.

Referenced by computeQpProperties().

◆ _hist

MaterialProperty<Real>& ComputeCrackedStress::_hist
protected

history variable storing the maximum positive deformation energy

Definition at line 83 of file ComputeCrackedStress.h.

Referenced by computeQpProperties(), and initQpStatefulProperties().

◆ _hist_old

const MaterialProperty<Real>& ComputeCrackedStress::_hist_old
protected

Definition at line 84 of file ComputeCrackedStress.h.

Referenced by computeQpProperties().

◆ _Jacobian_mult

MaterialProperty<RankFourTensor>& ComputeCrackedStress::_Jacobian_mult
protected

derivative of stress w.r.t. strain (_dstress_dstrain)

Definition at line 87 of file ComputeCrackedStress.h.

Referenced by computeQpProperties().

◆ _kappa

MaterialProperty<Real>& ComputeCrackedStress::_kappa
protected

Property where the value for kappa will be defined.

Definition at line 90 of file ComputeCrackedStress.h.

Referenced by computeQpProperties().

◆ _kdamage

Real ComputeCrackedStress::_kdamage
protected

Small number to avoid non-positive definiteness at or near complete damage.

Definition at line 71 of file ComputeCrackedStress.h.

Referenced by computeQpProperties().

◆ _l

const MaterialProperty<Real>& ComputeCrackedStress::_l
protected

Characteristic length, controls damage zone thickness.

Definition at line 65 of file ComputeCrackedStress.h.

Referenced by computeQpProperties().

◆ _L

MaterialProperty<Real>& ComputeCrackedStress::_L
protected

Property where the value for L will be defined.

Definition at line 93 of file ComputeCrackedStress.h.

Referenced by computeQpProperties().

◆ _strain

const MaterialProperty<RankTwoTensor>& ComputeCrackedStress::_strain
protected

Mechanical_strain if finite_strain_model = false, otherwise elastic_strain.

Definition at line 50 of file ComputeCrackedStress.h.

Referenced by computeQpProperties().

◆ _stress

MaterialProperty<RankTwoTensor>& ComputeCrackedStress::_stress
protected

Stress being computed by this kernel.

Definition at line 74 of file ComputeCrackedStress.h.

Referenced by computeQpProperties(), and initQpStatefulProperties().

◆ _uncracked_base_name

const std::string ComputeCrackedStress::_uncracked_base_name
protected

Base name of the uncracked stress and strain.

Definition at line 41 of file ComputeCrackedStress.h.

◆ _uncracked_Jacobian_mult

const MaterialProperty<RankFourTensor>& ComputeCrackedStress::_uncracked_Jacobian_mult
protected

Uncracked Jacobian_mult calculated by another material.

Definition at line 56 of file ComputeCrackedStress.h.

Referenced by computeQpProperties().

◆ _uncracked_stress

const MaterialProperty<RankTwoTensor>& ComputeCrackedStress::_uncracked_stress
protected

Uncracked stress calculated by another material.

Definition at line 53 of file ComputeCrackedStress.h.

Referenced by computeQpProperties().

◆ _use_current_hist

bool ComputeCrackedStress::_use_current_hist
protected

Use current value of history variable.

Definition at line 47 of file ComputeCrackedStress.h.

Referenced by computeQpProperties().

◆ _visco

const MaterialProperty<Real>& ComputeCrackedStress::_visco
protected

Definition at line 68 of file ComputeCrackedStress.h.

Referenced by computeQpProperties().


The documentation for this class was generated from the following files:
ComputeCrackedStress::_d2Fdc2
MaterialProperty< Real > & _d2Fdc2
Definition: ComputeCrackedStress.h:78
ComputeCrackedStress::_uncracked_Jacobian_mult
const MaterialProperty< RankFourTensor > & _uncracked_Jacobian_mult
Uncracked Jacobian_mult calculated by another material.
Definition: ComputeCrackedStress.h:56
ComputeCrackedStress::_uncracked_base_name
const std::string _uncracked_base_name
Base name of the uncracked stress and strain.
Definition: ComputeCrackedStress.h:41
ComputeCrackedStress::_finite_strain_model
bool _finite_strain_model
Indicator if finite strain model is used, to determine if mechanical_strain or elastic_strain should ...
Definition: ComputeCrackedStress.h:44
ComputeCrackedStress::_c
const VariableValue & _c
Variable defining the phase field damage parameter.
Definition: ComputeCrackedStress.h:59
ComputeCrackedStress::_F
MaterialProperty< Real > & _F
Definition: ComputeCrackedStress.h:76
ComputeCrackedStress::_Jacobian_mult
MaterialProperty< RankFourTensor > & _Jacobian_mult
derivative of stress w.r.t. strain (_dstress_dstrain)
Definition: ComputeCrackedStress.h:87
ComputeCrackedStress::_strain
const MaterialProperty< RankTwoTensor > & _strain
Mechanical_strain if finite_strain_model = false, otherwise elastic_strain.
Definition: ComputeCrackedStress.h:50
ComputeCrackedStress::_hist
MaterialProperty< Real > & _hist
history variable storing the maximum positive deformation energy
Definition: ComputeCrackedStress.h:83
ComputeCrackedStress::_l
const MaterialProperty< Real > & _l
Characteristic length, controls damage zone thickness.
Definition: ComputeCrackedStress.h:65
ComputeCrackedStress::_dstress_dc
MaterialProperty< RankTwoTensor > & _dstress_dc
Definition: ComputeCrackedStress.h:80
ComputeCrackedStress::_d2Fdcdstrain
MaterialProperty< RankTwoTensor > & _d2Fdcdstrain
Definition: ComputeCrackedStress.h:79
ComputeCrackedStress::_kappa
MaterialProperty< Real > & _kappa
Property where the value for kappa will be defined.
Definition: ComputeCrackedStress.h:90
validParams
InputParameters validParams()
ComputeCrackedStress::_stress
MaterialProperty< RankTwoTensor > & _stress
Stress being computed by this kernel.
Definition: ComputeCrackedStress.h:74
ComputeCrackedStress::_visco
const MaterialProperty< Real > & _visco
Definition: ComputeCrackedStress.h:68
name
const std::string name
Definition: Setup.h:21
ComputeCrackedStress::_dFdc
MaterialProperty< Real > & _dFdc
Definition: ComputeCrackedStress.h:77
ComputeCrackedStress::_use_current_hist
bool _use_current_hist
Use current value of history variable.
Definition: ComputeCrackedStress.h:47
ComputeCrackedStress::_kdamage
Real _kdamage
Small number to avoid non-positive definiteness at or near complete damage.
Definition: ComputeCrackedStress.h:71
RankFourTensorTempl
Definition: ACGrGrElasticDrivingForce.h:20
ComputeCrackedStress::_base_name
const std::string _base_name
Base name of the stress after being modified to include cracks.
Definition: ComputeCrackedStress.h:38
ComputeCrackedStress::_L
MaterialProperty< Real > & _L
Property where the value for L will be defined.
Definition: ComputeCrackedStress.h:93
ComputeCrackedStress::_gc_prop
const MaterialProperty< Real > & _gc_prop
Critical energy release rate for fracture.
Definition: ComputeCrackedStress.h:62
RankTwoTensorTempl< Real >
ComputeCrackedStress::_hist_old
const MaterialProperty< Real > & _hist_old
Definition: ComputeCrackedStress.h:84
ComputeCrackedStress::_uncracked_stress
const MaterialProperty< RankTwoTensor > & _uncracked_stress
Uncracked stress calculated by another material.
Definition: ComputeCrackedStress.h:53