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

This class is an implementation of a generalized Maxwell model with constant mechanical properties. More...

#include <GeneralizedMaxwellModel.h>

Inheritance diagram for GeneralizedMaxwellModel:
[legend]

Public Types

enum class  IntegrationRule { BackwardEuler , MidPoint , Newmark , Zienkiewicz }
 Determines how theta is calculated for the time-integration system. More...
 
typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 GeneralizedMaxwellModel (const InputParameters &parameters)
 
void recomputeQpApparentProperties (unsigned int qp)
 Compute the apparent properties at a quadrature point.
 
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
 
bool hasGuarantee (const MaterialPropertyName &prop_name, Guarantee guarantee)
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual void computeQpViscoelasticProperties ()
 This method assigns the mechanical properties of each spring and dashpot in the system.
 
virtual void computeQpViscoelasticPropertiesInv ()
 This method computes the inverse elasticity tensor of each spring in the system (if required).
 
virtual void computeQpApparentElasticityTensors () final
 This method computes the apparent elasticity tensor used in the internal time-stepping scheme.
 
virtual void computeQpApparentCreepStrain () final
 This method computes the apparent creep strain corresponding to the current viscous_strain of each dashpot.
 
virtual void updateQpViscousStrains () final
 Update the internal viscous strains at a quadrature point.
 
virtual void initQpStatefulProperties () override
 
virtual void computeQpElasticityTensor () final
 Inherited from ComputeElasticityTensorBase.
 
virtual void declareViscoelasticProperties ()
 Declare all necessary MaterialProperties for the model.
 
Real computeTheta (Real dt, Real viscosity) const
 Provides theta as a function of the time step and a viscosity.
 
virtual void computeQpProperties ()
 
void issueGuarantee (const MaterialPropertyName &prop_name, Guarantee guarantee)
 
void revokeGuarantee (const MaterialPropertyName &prop_name, Guarantee guarantee)
 

Protected Attributes

RankFourTensor _C0
 The elasticity tensor associated with the first spring.
 
std::vector< RankFourTensor_Ci
 The elasticity tensor of each subsequent spring.
 
std::vector< Real > _eta_i
 The viscosity of each dashpot.
 
RankFourTensor _S0
 The inverse of the elasticity tensor of the first spring.
 
std::vector< RankFourTensor_Si
 The inverse of each subsequent spring elasticity tensor.
 
IntegrationRule _integration_rule
 Determines how theta is computed.
 
Real _theta
 User-defined value for theta.
 
MaterialProperty< RankFourTensor > & _apparent_elasticity_tensor
 Apparent elasticity tensor. This is NOT the elasticity tensor of the material.
 
MaterialProperty< RankFourTensor > & _apparent_elasticity_tensor_inv
 Inverse of the apparent elasticity tensor.
 
MaterialProperty< RankFourTensor > & _elasticity_tensor_inv
 Instantaneous elasticity tensor. This IS the real elasticity tensor of the material.
 
bool _need_viscoelastic_properties_inverse
 If active, indicates that we need to call computeQpViscoelasticPropertiesInv()
 
bool _has_longterm_dashpot
 Indicates if the spring-dashpot assembly has a single dashpot not associated with a spring.
 
unsigned int _components
 This is the number of internal variables required by the model.
 
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
 previous value of the elastic strain for update purposes
 
const MaterialProperty< RankTwoTensor > & _creep_strain_old
 Previous value of the true creep strain for update purposes.
 
bool _has_driving_eigenstrain
 Indicates if the model is only driven by the stress, or also by an additional eigenstrain.
 
std::string _driving_eigenstrain_name
 Name of the eigenstrain that drives the additional creep strain.
 
bool _force_recompute_properties
 If activated, the time-stepping scheme will be re-initialized at each step of the solver.
 
bool & _step_zero
 checks whether we are at the first time step
 
const std::string _base_name
 Base name of the material system.
 
std::string _elasticity_tensor_name
 
GenericMaterialProperty< T, is_ad > & _elasticity_tensor
 
GenericMaterialProperty< Real, is_ad > & _effective_stiffness
 
const Function *const _prefactor_function
 prefactor function to multiply the elasticity tensor with
 
MaterialProperty< RankFourTensor > & _first_elasticity_tensor
 Elasticity tensor of a stand-alone elastic spring in the chain.
 
MaterialProperty< RankFourTensor > * _first_elasticity_tensor_inv
 
std::vector< MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors
 List of elasticity tensor of each subsequent spring in the chain.
 
std::vector< MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors_inv
 
std::vector< const MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors_inv_old
 
std::vector< MaterialProperty< Real > * > _dashpot_viscosities
 List of viscosities of each subsequent dashpot in the chain.
 
std::vector< const MaterialProperty< Real > * > _dashpot_viscosities_old
 
MaterialProperty< RankFourTensor > * _longterm_elasticity_tensor
 Elasticity tensor corresponding to the long-term dashpot.
 
MaterialProperty< RankFourTensor > * _longterm_elasticity_tensor_inv
 
std::vector< MaterialProperty< RankTwoTensor > * > _viscous_strains
 
std::vector< const MaterialProperty< RankTwoTensor > * > _viscous_strains_old
 
MaterialProperty< RankTwoTensor > & _apparent_creep_strain
 The apparent creep strain resulting from the internal viscous strains.
 
const MaterialProperty< RankTwoTensor > & _apparent_creep_strain_old
 
const MaterialProperty< RankTwoTensor > *const _driving_eigenstrain
 Pointer to the value of the driving eigenstrain.
 
const MaterialProperty< RankTwoTensor > *const _driving_eigenstrain_old
 

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
 
std::map< MaterialPropertyName, std::set< Guarantee > > _guarantees
 

Detailed Description

This class is an implementation of a generalized Maxwell model with constant mechanical properties.

It consists of an arbitrary number of Kelvin-Voigt units associated in series with a single spring, and an optional dashpot. Having an optional dashpot may lead to divergence of the time-stepping scheme and should be used with care.

Definition at line 21 of file GeneralizedMaxwellModel.h.

Member Enumeration Documentation

◆ IntegrationRule

enum class LinearViscoelasticityBase::IntegrationRule
stronginherited

Determines how theta is calculated for the time-integration system.

Enumerator
BackwardEuler 

theta = 1

MidPoint 

theta = 0.5

Newmark 

theta defined by the user

Zienkiewicz 

theta automatically adjusted as a function of the time step and the viscosity

Definition at line 82 of file LinearViscoelasticityBase.h.

83 {
89 Newmark,
92 };
@ Zienkiewicz
theta automatically adjusted as a function of the time step and the viscosity
@ Newmark
theta defined by the user

Constructor & Destructor Documentation

◆ GeneralizedMaxwellModel()

GeneralizedMaxwellModel::GeneralizedMaxwellModel ( const InputParameters parameters)

Definition at line 34 of file GeneralizedMaxwellModel.C.

35 : GeneralizedMaxwellBase(parameters),
36 _Ci(getParam<std::vector<Real>>("creep_modulus").size()),
37 _eta_i(getParam<std::vector<Real>>("creep_viscosity")),
38 _Si(getParam<std::vector<Real>>("creep_modulus").size())
39{
40 Real young_modulus = getParam<Real>("young_modulus");
41 Real poisson_ratio = getParam<Real>("poisson_ratio");
42
44
45 std::vector<Real> creep_modulus = getParam<std::vector<Real>>("creep_modulus");
46 std::vector<Real> creep_ratio;
47 if (isParamValid("creep_ratio"))
48 creep_ratio = getParam<std::vector<Real>>("creep_ratio");
49 else
50 creep_ratio.resize(_Ci.size(), poisson_ratio);
51
52 if (creep_modulus.size() != _Ci.size())
53 mooseError("incompatible number of creep moduli and viscosities");
54 if (creep_ratio.size() != _Ci.size())
55 mooseError("incompatible number of creep ratios and viscosities");
56 if (_Ci.size() != _eta_i.size())
57 mooseError("incompatible number of creep ratios and viscosities");
58
59 for (unsigned int i = 0; i < _Ci.size(); ++i)
60 {
61 _Ci[i].fillFromInputVector({creep_modulus[i], creep_ratio[i]},
63 _Si[i] = _Ci[i].invSymm();
64 _C0 -= _Ci[i];
65 }
66
67 if (MooseUtils::absoluteFuzzyEqual(_C0.L2norm(), 0.0))
68 _S0.zero();
69 else
70 _S0 = _C0.invSymm();
71
72 for (unsigned int i = 0; i < _eta_i.size(); ++i)
73 {
74 if (_eta_i[i] < 0 || MooseUtils::absoluteFuzzyEqual(_eta_i[i], 0.0))
75 mooseError("material viscosity must be strictly > 0");
76 }
77
78 _components = _eta_i.size();
79 _has_longterm_dashpot = (_eta_i.size() == _Ci.size() + 1);
80
83}
void mooseError(Args &&... args)
This class represents an assembly of springs and dashpots following a generalized Maxwell model (an a...
std::vector< RankFourTensor > _Ci
The elasticity tensor of each subsequent spring.
std::vector< Real > _eta_i
The viscosity of each dashpot.
RankFourTensor _C0
The elasticity tensor associated with the first spring.
std::vector< RankFourTensor > _Si
The inverse of each subsequent spring elasticity tensor.
RankFourTensor _S0
The inverse of the elasticity tensor of the first spring.
void issueGuarantee(const MaterialPropertyName &prop_name, Guarantee guarantee)
bool _has_longterm_dashpot
Indicates if the spring-dashpot assembly has a single dashpot not associated with a spring.
virtual void declareViscoelasticProperties()
Declare all necessary MaterialProperties for the model.
unsigned int _components
This is the number of internal variables required by the model.
void fillFromInputVector(const std::vector< T > &input, FillMethod fill_method)
RankFourTensorTempl< T > invSymm() const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

Member Function Documentation

◆ computeQpApparentCreepStrain()

void GeneralizedMaxwellBase::computeQpApparentCreepStrain ( )
finalprotectedvirtualinherited

This method computes the apparent creep strain corresponding to the current viscous_strain of each dashpot.

It must be called after the apparent elasticity tensors have been calculated.

This method is purely virtual. Inherited classes must override it.

This method is related to the internal time-stepping scheme. It should only be overwritten by classes that inherit directly from LinearViscoelasticityBase, and that represent a different spring-dashpot assembly. See GeneralizedKelvinVoigtBase for example.

Implements LinearViscoelasticityBase.

Definition at line 89 of file GeneralizedMaxwellBase.C.

90{
91 _apparent_creep_strain[_qp].zero();
92
93 for (unsigned int i = 0; i < _springs_elasticity_tensors.size(); ++i)
94 {
95 Real theta_i = computeTheta(_dt, (*_dashpot_viscosities[i])[_qp]);
96 Real gamma = (*_dashpot_viscosities[i])[_qp] / (_dt * theta_i);
98 ((*_springs_elasticity_tensors[i])[_qp] * (*_viscous_strains[i])[_qp]) *
99 (gamma / (1. + gamma));
100 }
101
103 {
104 Real theta_i = computeTheta(_dt, (*_dashpot_viscosities.back())[_qp]);
105 Real gamma = (*_dashpot_viscosities.back())[_qp] / (_dt * theta_i);
107 (_first_elasticity_tensor[_qp] * (*_viscous_strains.back())[_qp]) * gamma;
108 }
109
111
113 {
116 (*_driving_eigenstrain)[_qp];
117 _apparent_creep_strain[_qp] -= (*_driving_eigenstrain)[_qp];
118 }
119}
GenericMaterialProperty< T, is_ad > & _elasticity_tensor
std::vector< MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors
List of elasticity tensor of each subsequent spring in the chain.
bool _has_driving_eigenstrain
Indicates if the model is only driven by the stress, or also by an additional eigenstrain.
std::vector< MaterialProperty< RankTwoTensor > * > _viscous_strains
MaterialProperty< RankTwoTensor > & _apparent_creep_strain
The apparent creep strain resulting from the internal viscous strains.
Real computeTheta(Real dt, Real viscosity) const
Provides theta as a function of the time step and a viscosity.
std::vector< MaterialProperty< Real > * > _dashpot_viscosities
List of viscosities of each subsequent dashpot in the chain.
MaterialProperty< RankFourTensor > & _apparent_elasticity_tensor_inv
Inverse of the apparent elasticity tensor.
const MaterialProperty< RankTwoTensor > *const _driving_eigenstrain
Pointer to the value of the driving eigenstrain.
MaterialProperty< RankFourTensor > & _first_elasticity_tensor
Elasticity tensor of a stand-alone elastic spring in the chain.

◆ computeQpApparentElasticityTensors()

void GeneralizedMaxwellBase::computeQpApparentElasticityTensors ( )
finalprotectedvirtualinherited

This method computes the apparent elasticity tensor used in the internal time-stepping scheme.

It is called after the mechanical properties have been set, and before the apparent creep strains are calculated.

This method is also responsible for calculating the instantaneous elasticity tensor, and the inverse of both the apparent and instantaneous elasticity tensors.

This method is purely virtual. Inherited classes must override it.

This method is related to the internal time-stepping scheme. It should only be overwritten by classes that inherit directly from LinearViscoelasticityBase, and that represent a different spring-dashpot assembly. See GeneralizedKelvinVoigtBase for example.

Implements LinearViscoelasticityBase.

Definition at line 59 of file GeneralizedMaxwellBase.C.

60{
61
64
65 for (unsigned int i = 0; i < _springs_elasticity_tensors.size(); ++i)
66 {
67 Real theta_i = computeTheta(_dt, (*_dashpot_viscosities[i])[_qp]);
68 Real gamma = (*_dashpot_viscosities[i])[_qp] / (_dt * theta_i);
71 (*_springs_elasticity_tensors[i])[_qp] * (gamma / (1. + gamma));
72 }
73
75 {
76 Real theta_i = computeTheta(_dt, (*_dashpot_viscosities.back())[_qp]);
77 Real gamma = (*_dashpot_viscosities.back())[_qp] / (_dt * theta_i);
79
80 mooseDoOnce(mooseWarning("Generalized Maxwell model with longterm viscosity may not converge "
81 "under Dirichlet boundary conditions"));
82 }
83
85 _elasticity_tensor_inv[_qp] = _elasticity_tensor[_qp].invSymm();
86}
void mooseWarning(Args &&... args)
MaterialProperty< RankFourTensor > & _apparent_elasticity_tensor
Apparent elasticity tensor. This is NOT the elasticity tensor of the material.
MaterialProperty< RankFourTensor > & _elasticity_tensor_inv
Instantaneous elasticity tensor. This IS the real elasticity tensor of the material.

◆ computeQpElasticityTensor()

void LinearViscoelasticityBase::computeQpElasticityTensor ( )
finalprotectedvirtualinherited

Inherited from ComputeElasticityTensorBase.

Implements ComputeElasticityTensorBaseTempl< is_ad, T >.

Definition at line 206 of file LinearViscoelasticityBase.C.

207{
210}
void recomputeQpApparentProperties(unsigned int qp)
Compute the apparent properties at a quadrature point.
bool _force_recompute_properties
If activated, the time-stepping scheme will be re-initialized at each step of the solver.

◆ computeQpProperties()

template<bool is_ad, typename T = RankFourTensor>
virtual void ComputeElasticityTensorBaseTempl< is_ad, T >::computeQpProperties ( )
protectedvirtualinherited

◆ computeQpViscoelasticProperties()

void GeneralizedMaxwellModel::computeQpViscoelasticProperties ( )
protectedvirtual

This method assigns the mechanical properties of each spring and dashpot in the system.

This method is purely virtual. Inherited classes must override it.

This method is related to the storage of the mechanical properties of each spring and dashpot in the system, and not the internal time-stepping procedure. Only end-user classes should override it. See GeneralizedKelvinVoigModel for example.

Implements LinearViscoelasticityBase.

Definition at line 86 of file GeneralizedMaxwellModel.C.

87{
89
90 for (unsigned int i = 0; i < _Ci.size(); ++i)
91 (*_springs_elasticity_tensors[i])[_qp] = _Ci[i];
92
93 for (unsigned int i = 0; i < _eta_i.size(); ++i)
94 (*_dashpot_viscosities[i])[_qp] = _eta_i[i];
95}

◆ computeQpViscoelasticPropertiesInv()

void GeneralizedMaxwellModel::computeQpViscoelasticPropertiesInv ( )
protectedvirtual

This method computes the inverse elasticity tensor of each spring in the system (if required).

This method is virtual. Its default behavior computes the inverse of each tensor. It must be inherited only if there is a faster way to compute this inverse (for example, if they are known).

This method is related to the storage of the mechanical properties of each spring and dashpot in the system, and not the internal time-stepping procedure. Only end-user classes should override it. See GeneralizedKelvinVoigtModel for example.

Reimplemented from LinearViscoelasticityBase.

Definition at line 98 of file GeneralizedMaxwellModel.C.

99{
100 (*_first_elasticity_tensor_inv)[_qp] = _S0;
101
102 for (unsigned int i = 0; i < _Si.size(); ++i)
103 (*_springs_elasticity_tensors_inv[i])[_qp] = _Si[i];
104}
std::vector< MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors_inv

◆ computeTheta()

Real LinearViscoelasticityBase::computeTheta ( Real  dt,
Real  viscosity 
) const
protectedinherited

Provides theta as a function of the time step and a viscosity.

Definition at line 241 of file LinearViscoelasticityBase.C.

242{
243 if (MooseUtils::absoluteFuzzyEqual(dt, 0.0))
244 mooseError("linear viscoelasticity cannot be integrated over a dt of ", dt);
245
246 switch (_integration_rule)
247 {
249 return 1.;
251 return 0.5;
253 return _theta;
255 return 1. / (1. - std::exp(-dt / viscosity)) - viscosity / dt;
256 default:
257 return 1.;
258 }
259 return 1.;
260}
Real _theta
User-defined value for theta.
IntegrationRule _integration_rule
Determines how theta is computed.

Referenced by GeneralizedKelvinVoigtBase::computeQpApparentCreepStrain(), GeneralizedMaxwellBase::computeQpApparentCreepStrain(), GeneralizedKelvinVoigtBase::computeQpApparentElasticityTensors(), GeneralizedMaxwellBase::computeQpApparentElasticityTensors(), GeneralizedKelvinVoigtBase::updateQpViscousStrains(), and GeneralizedMaxwellBase::updateQpViscousStrains().

◆ declareViscoelasticProperties()

void LinearViscoelasticityBase::declareViscoelasticProperties ( )
protectedvirtualinherited

Declare all necessary MaterialProperties for the model.

This method must be called once at the end of the constructor of a final inherited class, after _components has been set. See GeneralizedKelvinVoigtModel or GeneralizedMaxwell model for example.

Reimplemented in GeneralizedKelvinVoigtBase.

Definition at line 102 of file LinearViscoelasticityBase.C.

103{
104 for (unsigned int i = 0; i < _components; ++i)
105 {
106 std::string ith = Moose::stringify(i + 1);
107
108 if (!_has_longterm_dashpot || (_components > 0 && i < _components - 1))
109 {
111 &declareProperty<RankFourTensor>(_base_name + "spring_elasticity_tensor_" + ith));
112 getMaterialPropertyOld<RankFourTensor>(_base_name + "spring_elasticity_tensor_" + ith);
113 }
114
115 _dashpot_viscosities.push_back(&declareProperty<Real>(_base_name + "dashpot_viscosity_" + ith));
116 _dashpot_viscosities_old.push_back(
117 &getMaterialPropertyOld<Real>(_base_name + "dashpot_viscosity_" + ith));
118
119 _viscous_strains.push_back(
120 &declareProperty<RankTwoTensor>(_base_name + "viscous_strain_" + ith));
121 _viscous_strains_old.push_back(
122 &getMaterialPropertyOld<RankTwoTensor>(_base_name + "viscous_strain_" + ith));
123
125 {
126 _springs_elasticity_tensors_inv.push_back(&declareProperty<RankFourTensor>(
127 _base_name + "spring_elasticity_tensor_" + ith + "_inv"));
128 _springs_elasticity_tensors_inv_old.push_back(&getMaterialPropertyOld<RankFourTensor>(
129 _base_name + "spring_elasticity_tensor_" + ith + "_inv"));
130 }
131 }
132
134 {
136 &declareProperty<RankFourTensor>(_base_name + "longterm_elasticity_tensor");
139 &declareProperty<RankFourTensor>(_base_name + "longterm_elasticity_tensor_inv");
140 }
141}
const std::string _base_name
Base name of the material system.
bool _need_viscoelastic_properties_inverse
If active, indicates that we need to call computeQpViscoelasticPropertiesInv()
std::vector< const MaterialProperty< Real > * > _dashpot_viscosities_old
std::vector< const MaterialProperty< RankTwoTensor > * > _viscous_strains_old
std::vector< const MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors_inv_old
MaterialProperty< RankFourTensor > * _longterm_elasticity_tensor
Elasticity tensor corresponding to the long-term dashpot.
MaterialProperty< RankFourTensor > * _longterm_elasticity_tensor_inv
std::string stringify(const T &t)

Referenced by GeneralizedKelvinVoigtBase::declareViscoelasticProperties(), and GeneralizedMaxwellModel().

◆ hasGuarantee()

bool GuaranteeProvider::hasGuarantee ( const MaterialPropertyName &  prop_name,
Guarantee  guarantee 
)
inherited

Definition at line 16 of file GuaranteeProvider.C.

17{
18 auto it = _guarantees.find(prop_name);
19 if (it == _guarantees.end())
20 return false;
21
22 auto it2 = it->second.find(guarantee);
23 return it2 != it->second.end();
24}
std::map< MaterialPropertyName, std::set< Guarantee > > _guarantees

◆ initQpStatefulProperties()

void LinearViscoelasticityBase::initQpStatefulProperties ( )
overrideprotectedvirtualinherited

Definition at line 144 of file LinearViscoelasticityBase.C.

145{
146 if (_components != _viscous_strains.size())
148 "inconsistent numbers of dashpots and viscous strains in LinearViscoelasticityBase;"
149 " Make sure declareViscoelasticProperties has been called in the viscoelastic model");
150
151 _apparent_creep_strain[_qp].zero();
152 _apparent_elasticity_tensor[_qp].zero();
154 _elasticity_tensor_inv[_qp].zero();
155 _first_elasticity_tensor[_qp].zero();
157 (*_longterm_elasticity_tensor)[_qp].zero();
159 (*_first_elasticity_tensor_inv)[_qp].zero();
161 (*_longterm_elasticity_tensor_inv)[_qp].zero();
162
163 for (unsigned int i = 0; i < _components; ++i)
164 {
165 if (!_has_longterm_dashpot || (_components > 0 && i < _components - 1))
166 {
170 }
171
172 (*_dashpot_viscosities[i])[_qp] = 0.0;
173 (*_viscous_strains[i])[_qp].zero();
174 }
175}
MaterialProperty< RankFourTensor > * _first_elasticity_tensor_inv
const Number zero

◆ issueGuarantee()

void GuaranteeProvider::issueGuarantee ( const MaterialPropertyName &  prop_name,
Guarantee  guarantee 
)
protectedinherited

◆ recomputeQpApparentProperties()

void LinearViscoelasticityBase::recomputeQpApparentProperties ( unsigned int  qp)
inherited

Compute the apparent properties at a quadrature point.

This initializes the internal time-stepping scheme, and must be called at the beginning of the time step.

This method is called by LinearViscoelasticityManager.

Definition at line 178 of file LinearViscoelasticityBase.C.

179{
180 unsigned int qp_prev = _qp;
181 _qp = qp;
182
183 if (_t_step >= 1)
184 _step_zero = false;
185
186 // 1. we get the viscoelastic properties and their inverse if needed
188
191
192 // 2. we update the internal viscous strains from the previous time step
194
195 // 3. we compute the apparent elasticity tensor
197
198 // 4. we transform the internal viscous strains in an apparent creep strain
199 if (!_step_zero)
201
202 _qp = qp_prev;
203}
virtual void computeQpViscoelasticPropertiesInv()
This method computes the inverse elasticity tensor of each spring in the system (if required).
virtual void updateQpViscousStrains()=0
Update the internal viscous strains at a quadrature point.
bool & _step_zero
checks whether we are at the first time step
virtual void computeQpApparentCreepStrain()=0
This method computes the apparent creep strain corresponding to the current viscous_strain of each da...
virtual void computeQpViscoelasticProperties()=0
This method assigns the mechanical properties of each spring and dashpot in the system.
virtual void computeQpApparentElasticityTensors()=0
This method computes the apparent elasticity tensor used in the internal time-stepping scheme.

Referenced by LinearViscoelasticityBase::computeQpElasticityTensor(), and LinearViscoelasticityManager::execute().

◆ revokeGuarantee()

void GuaranteeProvider::revokeGuarantee ( const MaterialPropertyName &  prop_name,
Guarantee  guarantee 
)
protectedinherited

Definition at line 34 of file GuaranteeProvider.C.

35{
36 auto it = _guarantees.find(prop_name);
37 if (it != _guarantees.end())
38 it->second.erase(guarantee);
39}

Referenced by ComputeElasticityTensorCP::ComputeElasticityTensorCP().

◆ updateQpViscousStrains()

void GeneralizedMaxwellBase::updateQpViscousStrains ( )
finalprotectedvirtualinherited

Update the internal viscous strains at a quadrature point.

Calling this method is required at the end of each time step to update the internal time-stepping scheme correctly.

This method is pure virtual. Inherited classes must override it.

This method is related to the internal time-stepping scheme. It should only be overwritten by classes that inherit directly from LinearViscoelasticityBase, and that represent a different spring-dashpot assembly. See GeneralizedKelvinVoigtBase or GeneralizedMaxwellBase for example.

Implements LinearViscoelasticityBase.

Definition at line 26 of file GeneralizedMaxwellBase.C.

27{
28 if (_t_step <= 1)
29 return;
30
31 RankTwoTensor effective_strain = _elastic_strain_old[_qp] + _creep_strain_old[_qp];
33 effective_strain += (*_driving_eigenstrain_old)[_qp];
34
35 for (unsigned int i = 0; i < _springs_elasticity_tensors.size(); ++i)
36 {
37 Real theta_i = computeTheta(_dt_old, (*_dashpot_viscosities_old[i])[_qp]);
38 Real gamma = (*_dashpot_viscosities_old[i])[_qp] / (_dt_old * theta_i);
39 (*_viscous_strains[i])[_qp] =
40 (*_viscous_strains_old[i])[_qp] *
41 (((*_dashpot_viscosities_old[i])[_qp] * gamma - _dt_old * (1. - theta_i) * gamma) /
42 ((*_dashpot_viscosities_old[i])[_qp] * (1. + gamma)));
43 (*_viscous_strains[i])[_qp] +=
44 effective_strain *
45 (((*_dashpot_viscosities_old[i])[_qp] + _dt_old * (1. - theta_i) * gamma) /
46 ((*_dashpot_viscosities_old[i])[_qp] * (1. + gamma)));
47 }
48
50 {
51 Real theta_i = computeTheta(_dt_old, (*_dashpot_viscosities_old.back())[_qp]);
52 (*_viscous_strains.back())[_qp] = effective_strain / theta_i;
53 (*_viscous_strains.back())[_qp] -=
54 (*_viscous_strains_old.back())[_qp] * ((1. - theta_i) / theta_i);
55 }
56}
const MaterialProperty< RankTwoTensor > & _creep_strain_old
Previous value of the true creep strain for update purposes.
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
previous value of the elastic strain for update purposes

◆ validParams()

InputParameters GeneralizedMaxwellModel::validParams ( )
static

Definition at line 15 of file GeneralizedMaxwellModel.C.

16{
19 "Generalized Maxwell model composed of a parallel assembly of unit Maxwell modules");
20 params.addRequiredParam<Real>("young_modulus", "initial elastic modulus of the material");
21 params.addRequiredParam<Real>("poisson_ratio", "initial poisson ratio of the material");
22 params.addRequiredParam<std::vector<Real>>(
23 "creep_modulus", "list of the elastic moduli of the different springs in the material");
24 params.addRequiredParam<std::vector<Real>>(
25 "creep_viscosity",
26 "list of the characteristic times of the different dashpots in the material");
27 params.addParam<std::vector<Real>>(
28 "creep_ratio", "list of the poisson ratios of the different springs in the material");
29 params.set<bool>("force_recompute_properties") = false;
30 params.suppressParameter<bool>("force_recompute_properties");
31 return params;
32}
static InputParameters validParams()
void suppressParameter(const std::string &name)
void addRequiredParam(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)
T & set(const std::string &name, bool quiet_mode=false)

Member Data Documentation

◆ _apparent_creep_strain

MaterialProperty<RankTwoTensor>& LinearViscoelasticityBase::_apparent_creep_strain
protectedinherited

◆ _apparent_creep_strain_old

const MaterialProperty<RankTwoTensor>& LinearViscoelasticityBase::_apparent_creep_strain_old
protectedinherited

Definition at line 242 of file LinearViscoelasticityBase.h.

◆ _apparent_elasticity_tensor

MaterialProperty<RankFourTensor>& LinearViscoelasticityBase::_apparent_elasticity_tensor
protectedinherited

◆ _apparent_elasticity_tensor_inv

MaterialProperty<RankFourTensor>& LinearViscoelasticityBase::_apparent_elasticity_tensor_inv
protectedinherited

◆ _base_name

template<bool is_ad, typename T = RankFourTensor>
const std::string ComputeElasticityTensorBaseTempl< is_ad, T >::_base_name
protectedinherited

◆ _C0

RankFourTensor GeneralizedMaxwellModel::_C0
protected

The elasticity tensor associated with the first spring.

This is !not! the true elasticity tensor of the material

Definition at line 36 of file GeneralizedMaxwellModel.h.

Referenced by computeQpViscoelasticProperties(), and GeneralizedMaxwellModel().

◆ _Ci

std::vector<RankFourTensor> GeneralizedMaxwellModel::_Ci
protected

The elasticity tensor of each subsequent spring.

Definition at line 38 of file GeneralizedMaxwellModel.h.

Referenced by computeQpViscoelasticProperties(), and GeneralizedMaxwellModel().

◆ _components

unsigned int LinearViscoelasticityBase::_components
protectedinherited

This is the number of internal variables required by the model.

This must be set in the constructor of an inherited class. See GeneralizedKelvinVoigtModel for example.

Definition at line 209 of file LinearViscoelasticityBase.h.

Referenced by LinearViscoelasticityBase::declareViscoelasticProperties(), GeneralizedKelvinVoigtModel::GeneralizedKelvinVoigtModel(), GeneralizedMaxwellModel(), and LinearViscoelasticityBase::initQpStatefulProperties().

◆ _creep_strain_old

const MaterialProperty<RankTwoTensor>& LinearViscoelasticityBase::_creep_strain_old
protectedinherited

Previous value of the true creep strain for update purposes.

This is calculated by a ComputeLinearViscoelasticStress or a LinearViscoelasticStressUpdate material.

Definition at line 252 of file LinearViscoelasticityBase.h.

Referenced by GeneralizedMaxwellBase::updateQpViscousStrains().

◆ _dashpot_viscosities

std::vector<MaterialProperty<Real> *> LinearViscoelasticityBase::_dashpot_viscosities
protectedinherited

◆ _dashpot_viscosities_old

std::vector<const MaterialProperty<Real> *> LinearViscoelasticityBase::_dashpot_viscosities_old
protectedinherited

◆ _driving_eigenstrain

const MaterialProperty<RankTwoTensor>* const LinearViscoelasticityBase::_driving_eigenstrain
protectedinherited

Pointer to the value of the driving eigenstrain.

Definition at line 259 of file LinearViscoelasticityBase.h.

Referenced by GeneralizedKelvinVoigtBase::computeQpApparentCreepStrain(), and GeneralizedMaxwellBase::computeQpApparentCreepStrain().

◆ _driving_eigenstrain_name

std::string LinearViscoelasticityBase::_driving_eigenstrain_name
protectedinherited

Name of the eigenstrain that drives the additional creep strain.

Definition at line 257 of file LinearViscoelasticityBase.h.

◆ _driving_eigenstrain_old

const MaterialProperty<RankTwoTensor>* const LinearViscoelasticityBase::_driving_eigenstrain_old
protectedinherited

Definition at line 260 of file LinearViscoelasticityBase.h.

◆ _effective_stiffness

template<bool is_ad, typename T = RankFourTensor>
GenericMaterialProperty<Real, is_ad>& ComputeElasticityTensorBaseTempl< is_ad, T >::_effective_stiffness
protectedinherited

Definition at line 40 of file ComputeElasticityTensorBase.h.

◆ _elastic_strain_old

const MaterialProperty<RankTwoTensor>& LinearViscoelasticityBase::_elastic_strain_old
protectedinherited

previous value of the elastic strain for update purposes

Definition at line 246 of file LinearViscoelasticityBase.h.

Referenced by GeneralizedKelvinVoigtBase::updateQpViscousStrains(), and GeneralizedMaxwellBase::updateQpViscousStrains().

◆ _elasticity_tensor

template<bool is_ad, typename T = RankFourTensor>
GenericMaterialProperty<T, is_ad>& ComputeElasticityTensorBaseTempl< is_ad, T >::_elasticity_tensor
protectedinherited

◆ _elasticity_tensor_inv

MaterialProperty<RankFourTensor>& LinearViscoelasticityBase::_elasticity_tensor_inv
protectedinherited

Instantaneous elasticity tensor. This IS the real elasticity tensor of the material.

Inverse of the instaneous elasticity tensor

Definition at line 199 of file LinearViscoelasticityBase.h.

Referenced by GeneralizedKelvinVoigtBase::computeQpApparentElasticityTensors(), GeneralizedMaxwellBase::computeQpApparentElasticityTensors(), and LinearViscoelasticityBase::initQpStatefulProperties().

◆ _elasticity_tensor_name

template<bool is_ad, typename T = RankFourTensor>
std::string ComputeElasticityTensorBaseTempl< is_ad, T >::_elasticity_tensor_name
protectedinherited

◆ _eta_i

std::vector<Real> GeneralizedMaxwellModel::_eta_i
protected

The viscosity of each dashpot.

Definition at line 40 of file GeneralizedMaxwellModel.h.

Referenced by computeQpViscoelasticProperties(), and GeneralizedMaxwellModel().

◆ _first_elasticity_tensor

MaterialProperty<RankFourTensor>& LinearViscoelasticityBase::_first_elasticity_tensor
protectedinherited

◆ _first_elasticity_tensor_inv

MaterialProperty<RankFourTensor>* LinearViscoelasticityBase::_first_elasticity_tensor_inv
protectedinherited

◆ _force_recompute_properties

bool LinearViscoelasticityBase::_force_recompute_properties
protectedinherited

If activated, the time-stepping scheme will be re-initialized at each step of the solver.

This may be required for models in which the mechanical properties vary following other variables. If the mechanical properties are constant through the time step, this can be set to false.

Definition at line 268 of file LinearViscoelasticityBase.h.

Referenced by LinearViscoelasticityBase::computeQpElasticityTensor().

◆ _guarantees

std::map<MaterialPropertyName, std::set<Guarantee> > GuaranteeProvider::_guarantees
privateinherited

◆ _has_driving_eigenstrain

bool LinearViscoelasticityBase::_has_driving_eigenstrain
protectedinherited

◆ _has_longterm_dashpot

bool LinearViscoelasticityBase::_has_longterm_dashpot
protectedinherited

◆ _integration_rule

IntegrationRule LinearViscoelasticityBase::_integration_rule
protectedinherited

Determines how theta is computed.

Definition at line 187 of file LinearViscoelasticityBase.h.

Referenced by LinearViscoelasticityBase::computeTheta().

◆ _longterm_elasticity_tensor

MaterialProperty<RankFourTensor>* LinearViscoelasticityBase::_longterm_elasticity_tensor
protectedinherited

◆ _longterm_elasticity_tensor_inv

MaterialProperty<RankFourTensor>* LinearViscoelasticityBase::_longterm_elasticity_tensor_inv
protectedinherited

◆ _need_viscoelastic_properties_inverse

bool LinearViscoelasticityBase::_need_viscoelastic_properties_inverse
protectedinherited

◆ _prefactor_function

template<bool is_ad, typename T = RankFourTensor>
const Function* const ComputeElasticityTensorBaseTempl< is_ad, T >::_prefactor_function
protectedinherited

prefactor function to multiply the elasticity tensor with

Definition at line 43 of file ComputeElasticityTensorBase.h.

Referenced by ComputeLayeredCosseratElasticityTensor::computeQpElasticityTensor().

◆ _S0

RankFourTensor GeneralizedMaxwellModel::_S0
protected

The inverse of the elasticity tensor of the first spring.

Definition at line 43 of file GeneralizedMaxwellModel.h.

Referenced by computeQpViscoelasticPropertiesInv(), and GeneralizedMaxwellModel().

◆ _Si

std::vector<RankFourTensor> GeneralizedMaxwellModel::_Si
protected

The inverse of each subsequent spring elasticity tensor.

Definition at line 45 of file GeneralizedMaxwellModel.h.

Referenced by computeQpViscoelasticPropertiesInv(), and GeneralizedMaxwellModel().

◆ _springs_elasticity_tensors

std::vector<MaterialProperty<RankFourTensor> *> LinearViscoelasticityBase::_springs_elasticity_tensors
protectedinherited

◆ _springs_elasticity_tensors_inv

std::vector<MaterialProperty<RankFourTensor> *> LinearViscoelasticityBase::_springs_elasticity_tensors_inv
protectedinherited

◆ _springs_elasticity_tensors_inv_old

std::vector<const MaterialProperty<RankFourTensor> *> LinearViscoelasticityBase::_springs_elasticity_tensors_inv_old
protectedinherited

◆ _step_zero

bool& LinearViscoelasticityBase::_step_zero
protectedinherited

checks whether we are at the first time step

Definition at line 271 of file LinearViscoelasticityBase.h.

Referenced by LinearViscoelasticityBase::recomputeQpApparentProperties().

◆ _theta

Real LinearViscoelasticityBase::_theta
protectedinherited

◆ _viscous_strains

std::vector<MaterialProperty<RankTwoTensor> *> LinearViscoelasticityBase::_viscous_strains
protectedinherited

◆ _viscous_strains_old

std::vector<const MaterialProperty<RankTwoTensor> *> LinearViscoelasticityBase::_viscous_strains_old
protectedinherited

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