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

EshelbyTensor defines a strain increment and rotation increment, for finite strains. More...

#include <EshelbyTensor.h>

Inheritance diagram for EshelbyTensorTempl< is_ad >:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 EshelbyTensorTempl (const InputParameters &parameters)
 
virtual void initialSetup () override
 
virtual void initQpStatefulProperties () override
 
virtual void computeQpProperties () 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 Attributes

const std::string _base_name
 Base name of the material system.
 
const bool _compute_dissipation
 Whether to also compute Eshelby tensor's dissipation for C(t) integral.
 
const MaterialProperty< Real > & _sed
 
const MaterialProperty< Real > * _serd
 
MaterialProperty< RankTwoTensor > & _eshelby_tensor
 
MaterialProperty< RankTwoTensor > * _eshelby_tensor_dissipation
 
const GenericMaterialProperty< RankTwoTensor, is_ad > & _stress
 The stress tensor.
 
const MaterialProperty< RankTwoTensor > & _stress_old
 The old stress tensor.
 
std::vector< const VariableGradient * > _grad_disp
 
std::vector< const VariableGradient * > _grad_disp_old
 
MaterialProperty< RealVectorValue > & _J_thermal_term_vec
 
const VariableGradient_grad_temp
 
const bool _has_temp
 
const OptionalMaterialProperty< RankTwoTensor > & _total_deigenstrain_dT
 

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
 

Detailed Description

template<bool is_ad>
class EshelbyTensorTempl< is_ad >

EshelbyTensor defines a strain increment and rotation increment, for finite strains.

Definition at line 21 of file EshelbyTensor.h.

Constructor & Destructor Documentation

◆ EshelbyTensorTempl()

template<bool is_ad>
EshelbyTensorTempl< is_ad >::EshelbyTensorTempl ( const InputParameters parameters)

Definition at line 42 of file EshelbyTensor.C.

44 _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
45 _compute_dissipation(getParam<bool>("compute_dissipation")),
46 _sed(getMaterialPropertyByName<Real>(_base_name + "strain_energy_density")),
48 ? &getMaterialPropertyByName<Real>(_base_name + "strain_energy_rate_density")
49 : nullptr),
50 _eshelby_tensor(declareProperty<RankTwoTensor>(_base_name + "Eshelby_tensor")),
53 ? &declareProperty<RankTwoTensor>(_base_name + "Eshelby_tensor_dissipation")
54 : nullptr),
55 _stress(getGenericMaterialProperty<RankTwoTensor, is_ad>(_base_name + "stress")),
56 _stress_old(getMaterialPropertyOld<RankTwoTensor>(_base_name + "stress")),
57 _grad_disp(3),
59 _J_thermal_term_vec(declareProperty<RealVectorValue>("J_thermal_term_vec")),
60 _grad_temp(coupledGradient("temperature")),
61 _has_temp(isCoupled("temperature")),
62 _total_deigenstrain_dT(getOptionalMaterialProperty<RankTwoTensor>("total_deigenstrain_dT"))
63{
64 unsigned int ndisp = coupledComponents("displacements");
65
66 // Checking for consistency between mesh size and length of the provided displacements vector
67 if (ndisp != _mesh.dimension())
69 "The number of variables supplied in 'displacements' must match the mesh dimension.");
70
71 // fetch coupled gradients
72 for (unsigned int i = 0; i < ndisp; ++i)
73 _grad_disp[i] = &coupledGradient("displacements", i);
74
75 // set unused dimensions to zero
76 for (unsigned i = ndisp; i < 3; ++i)
77 _grad_disp[i] = &_grad_zero;
78
79 // Need previous step's displacements to compute deformation gradient time rate
81 {
82 // fetch coupled gradients previous step
83 for (unsigned int i = 0; i < ndisp; ++i)
84 _grad_disp_old[i] = &coupledGradientOld("displacements", i);
85
86 // set unused dimensions to zero
87 for (unsigned i = ndisp; i < 3; ++i)
88 _grad_disp_old[i] = &_grad_zero;
89 }
90}
void mooseError(Args &&... args)
const bool _compute_dissipation
Whether to also compute Eshelby tensor's dissipation for C(t) integral.
const MaterialProperty< Real > & _sed
std::vector< const VariableGradient * > _grad_disp_old
const MaterialProperty< Real > * _serd
const GenericMaterialProperty< RankTwoTensor, is_ad > & _stress
The stress tensor.
MaterialProperty< RankTwoTensor > & _eshelby_tensor
const OptionalMaterialProperty< RankTwoTensor > & _total_deigenstrain_dT
const MaterialProperty< RankTwoTensor > & _stress_old
The old stress tensor.
MaterialProperty< RealVectorValue > & _J_thermal_term_vec
const VariableGradient & _grad_temp
MaterialProperty< RankTwoTensor > * _eshelby_tensor_dissipation
const std::string _base_name
Base name of the material system.
std::vector< const VariableGradient * > _grad_disp
VectorValue< Real > RealVectorValue
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Member Function Documentation

◆ computeQpProperties()

template<bool is_ad>
void EshelbyTensorTempl< is_ad >::computeQpProperties ( )
overridevirtual

Definition at line 110 of file EshelbyTensor.C.

111{
112 // Deformation gradient
114 (*_grad_disp[0])[_qp], (*_grad_disp[1])[_qp], (*_grad_disp[2])[_qp]);
115
116 RankTwoTensor H(F);
117 F.addIa(1.0);
118 Real detF = F.det();
119 RankTwoTensor FinvT(F.inverse().transpose());
120
121 // 1st Piola-Kirchoff Stress (P):
122 RankTwoTensor P = detF * MetaPhysicL::raw_value(_stress[_qp]) * FinvT;
123
124 // HTP = H^T * P = H^T * detF * sigma * FinvT;
125 RankTwoTensor HTP = H.transpose() * P;
126
128 WI *= (_sed[_qp] * detF);
129
130 _eshelby_tensor[_qp] = WI - HTP;
131
132 // Compute deformation gradient rate
133 if (_compute_dissipation == true)
134 {
136 (*_grad_disp_old[0])[_qp], (*_grad_disp_old[1])[_qp], (*_grad_disp_old[2])[_qp]);
137
139 Wdot *= ((*_serd)[_qp] * detF);
140
141 // F_dot = (F - F_old)/dt
142 RankTwoTensor F_dot = (H - H_old) / _dt;
143
144 // FdotTP = Fdot^T * P = Fdot^T * detF * sigma * FinvT;
145 RankTwoTensor FdotTP = F_dot.transpose() * P;
146
147 (*_eshelby_tensor_dissipation)[_qp] = Wdot - FdotTP;
148 }
149
150 if (_has_temp)
151 {
152 const Real sigma_alpha =
153 MetaPhysicL::raw_value(_stress[_qp]).doubleContraction(_total_deigenstrain_dT[_qp]);
154 _J_thermal_term_vec[_qp] = sigma_alpha * _grad_temp[_qp];
155 }
156 else
157 _J_thermal_term_vec[_qp].zero();
158}
static RankTwoTensorTempl initializeFromRows(const libMesh::TypeVector< T > &row0, const libMesh::TypeVector< T > &row1, const libMesh::TypeVector< T > &row2)
RankTwoTensorTempl< T > transpose() const
auto raw_value(const Eigen::Map< T > &in)

◆ initialSetup()

template<bool is_ad>
void EshelbyTensorTempl< is_ad >::initialSetup ( )
overridevirtual

Definition at line 94 of file EshelbyTensor.C.

95{
97 mooseError("EshelbyTensor Error: To include thermal strain term in Fracture integral "
98 "calculation, must both couple temperature in DomainIntegral block and compute "
99 "total_deigenstrain_dT using ThermalFractureIntegral material model.");
100}

◆ initQpStatefulProperties()

template<bool is_ad>
void EshelbyTensorTempl< is_ad >::initQpStatefulProperties ( )
overridevirtual

Definition at line 104 of file EshelbyTensor.C.

105{
106}

◆ validParams()

template<bool is_ad>
InputParameters EshelbyTensorTempl< is_ad >::validParams ( )
static

Definition at line 19 of file EshelbyTensor.C.

20{
22 params.addClassDescription("Computes the Eshelby tensor as a function of "
23 "strain energy density and the first "
24 "Piola-Kirchhoff stress");
26 "displacements",
27 "The displacements appropriate for the simulation geometry and coordinate system");
28 params.addParam<std::string>("base_name",
29 "Optional parameter that allows the user to define "
30 "multiple mechanics material systems on the same "
31 "block, i.e. for multiple phases");
32 params.addParam<bool>(
33 "compute_dissipation",
34 false,
35 "Whether to compute Eshelby tensor's dissipation (or rate of change). This tensor"
36 "yields the increase in dissipation per unit crack advanced");
37 params.addCoupledVar("temperature", "Coupled temperature");
38 return params;
39}
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
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)
void addCoupledVar(const std::string &name, const std::string &doc_string)
static InputParameters validParams()

Member Data Documentation

◆ _base_name

template<bool is_ad>
const std::string EshelbyTensorTempl< is_ad >::_base_name
protected

Base name of the material system.

Definition at line 34 of file EshelbyTensor.h.

◆ _compute_dissipation

template<bool is_ad>
const bool EshelbyTensorTempl< is_ad >::_compute_dissipation
protected

Whether to also compute Eshelby tensor's dissipation for C(t) integral.

Definition at line 37 of file EshelbyTensor.h.

Referenced by EshelbyTensorTempl< is_ad >::EshelbyTensorTempl().

◆ _eshelby_tensor

template<bool is_ad>
MaterialProperty<RankTwoTensor>& EshelbyTensorTempl< is_ad >::_eshelby_tensor
protected

Definition at line 42 of file EshelbyTensor.h.

◆ _eshelby_tensor_dissipation

template<bool is_ad>
MaterialProperty<RankTwoTensor>* EshelbyTensorTempl< is_ad >::_eshelby_tensor_dissipation
protected

Definition at line 43 of file EshelbyTensor.h.

◆ _grad_disp

template<bool is_ad>
std::vector<const VariableGradient *> EshelbyTensorTempl< is_ad >::_grad_disp
protected

Definition at line 51 of file EshelbyTensor.h.

Referenced by EshelbyTensorTempl< is_ad >::EshelbyTensorTempl().

◆ _grad_disp_old

template<bool is_ad>
std::vector<const VariableGradient *> EshelbyTensorTempl< is_ad >::_grad_disp_old
protected

Definition at line 52 of file EshelbyTensor.h.

Referenced by EshelbyTensorTempl< is_ad >::EshelbyTensorTempl().

◆ _grad_temp

template<bool is_ad>
const VariableGradient& EshelbyTensorTempl< is_ad >::_grad_temp
protected

Definition at line 55 of file EshelbyTensor.h.

◆ _has_temp

template<bool is_ad>
const bool EshelbyTensorTempl< is_ad >::_has_temp
protected

Definition at line 56 of file EshelbyTensor.h.

◆ _J_thermal_term_vec

template<bool is_ad>
MaterialProperty<RealVectorValue>& EshelbyTensorTempl< is_ad >::_J_thermal_term_vec
protected

Definition at line 54 of file EshelbyTensor.h.

◆ _sed

template<bool is_ad>
const MaterialProperty<Real>& EshelbyTensorTempl< is_ad >::_sed
protected

Definition at line 39 of file EshelbyTensor.h.

◆ _serd

template<bool is_ad>
const MaterialProperty<Real>* EshelbyTensorTempl< is_ad >::_serd
protected

Definition at line 40 of file EshelbyTensor.h.

◆ _stress

template<bool is_ad>
const GenericMaterialProperty<RankTwoTensor, is_ad>& EshelbyTensorTempl< is_ad >::_stress
protected

The stress tensor.

Definition at line 46 of file EshelbyTensor.h.

◆ _stress_old

template<bool is_ad>
const MaterialProperty<RankTwoTensor>& EshelbyTensorTempl< is_ad >::_stress_old
protected

The old stress tensor.

Definition at line 49 of file EshelbyTensor.h.

◆ _total_deigenstrain_dT

template<bool is_ad>
const OptionalMaterialProperty<RankTwoTensor>& EshelbyTensorTempl< is_ad >::_total_deigenstrain_dT
protected

Definition at line 57 of file EshelbyTensor.h.


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