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

This class is an implementation of a generalized Kelvin-Voigt model with constant mechanical properties. More...

#include <GeneralizedKelvinVoigtModel.h>

Inheritance diagram for GeneralizedKelvinVoigtModel:
[legend]

Public Types

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

Public Member Functions

 GeneralizedKelvinVoigtModel (const InputParameters &parameters)
 
void recomputeQpApparentProperties (unsigned int qp)
 Compute the apparent properties at a quadrature point. More...
 
bool hasGuarantee (const MaterialPropertyName &prop_name, Guarantee guarantee)
 

Protected Member Functions

virtual void computeQpViscoelasticProperties ()
 This method assigns the mechanical properties of each spring and dashpot in the system. More...
 
virtual void computeQpViscoelasticPropertiesInv ()
 This method computes the inverse elasticity tensor of each spring in the system (if required). More...
 
virtual void computeQpApparentElasticityTensors () final
 This method computes the apparent elasticity tensor used in the internal time-stepping scheme. More...
 
virtual void computeQpApparentCreepStrain () final
 This method computes the apparent creep strain corresponding to the current viscous_strain of each dashpot. More...
 
virtual void updateQpViscousStrains () final
 Update the internal viscous strains at a quadrature point. More...
 
virtual void initQpStatefulProperties () override
 
virtual void computeQpElasticityTensor () final
 Inherited from ComputeElasticityTensorBase. More...
 
void declareViscoelasticProperties ()
 Declare all necessary MaterialProperties for the model. More...
 
Real computeTheta (Real dt, Real viscosity) const
 Provides theta as a function of the time step and a viscosity. More...
 
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. More...
 
std::vector< RankFourTensor > _Ci
 The elasticity tensor of each subsequent spring. More...
 
std::vector< Real > _eta_i
 The viscosity of each dashpot. More...
 
RankFourTensor _S0
 The inverse of the elasticity tensor of the first spring. More...
 
std::vector< RankFourTensor > _Si
 The inverse of each subsequent spring elasticity tensor. More...
 
IntegrationRule _integration_rule
 Determines how theta is computed. More...
 
Real _theta
 User-defined value for theta. More...
 
MaterialProperty< RankFourTensor > & _apparent_elasticity_tensor
 Apparent elasticity tensor. This is NOT the elasticity tensor of the material. More...
 
MaterialProperty< RankFourTensor > & _apparent_elasticity_tensor_inv
 Inverse of the apparent elasticity tensor. More...
 
MaterialProperty< RankFourTensor > & _elasticity_tensor_inv
 Instantaneous elasticity tensor. This IS the real elasticity tensor of the material. More...
 
bool _need_viscoelastic_properties_inverse
 If active, indicates that we need to call computeQpViscoelasticPropertiesInv() More...
 
bool _has_longterm_dashpot
 Indicates if the spring-dashpot assembly has a single dashpot not associated with a spring. More...
 
unsigned int _components
 This is the number of internal variables required by the model. More...
 
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
 previous value of the elastic strain for update purposes More...
 
const MaterialProperty< RankTwoTensor > & _creep_strain_old
 Previous value of the true creep strain for update purposes. More...
 
bool _has_driving_eigenstrain
 Indicates if the model is only driven by the stress, or also by an additional eigenstrain. More...
 
std::string _driving_eigenstrain_name
 Name of the eigenstrain that drives the additional creep strain. More...
 
bool _force_recompute_properties
 If activated, the time-stepping scheme will be re-initialized at each step of the solver. More...
 
bool & _step_zero
 checks whether we are at the first time step More...
 
std::string _base_name
 
std::string _elasticity_tensor_name
 
MaterialProperty< RankFourTensor > & _elasticity_tensor
 
Function *const _prefactor_function
 prefactor function to multiply the elasticity tensor with More...
 
const MaterialProperty< RankFourTensor > & _first_elasticity_tensor_old
 old material properties required for the update of the viscoelastic strain More...
 
const MaterialProperty< RankFourTensor > & _first_elasticity_tensor_inv_old
 
MaterialProperty< RankFourTensor > & _first_elasticity_tensor
 Elasticity tensor of a stand-alone elastic spring in the chain. More...
 
MaterialProperty< RankFourTensor > * _first_elasticity_tensor_inv
 
std::vector< MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors
 List of elasticity tensor of each subsequent spring in the chain. More...
 
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. More...
 
std::vector< const MaterialProperty< Real > * > _dashpot_viscosities_old
 
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. More...
 
const MaterialProperty< RankTwoTensor > & _apparent_creep_strain_old
 
const MaterialProperty< RankTwoTensor > * _driving_eigenstrain
 Pointer to the value of the driving eigenstrain. More...
 
const MaterialProperty< RankTwoTensor > * _driving_eigenstrain_old
 

Detailed Description

This class is an implementation of a generalized Kelvin-Voigt 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 (this could represent a Burgers model, for example).

Definition at line 26 of file GeneralizedKelvinVoigtModel.h.

Member Enumeration Documentation

◆ IntegrationRule

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 88 of file LinearViscoelasticityBase.h.

89  {
91  BackwardEuler,
93  MidPoint,
95  Newmark,
97  Zienkiewicz,
98  };

Constructor & Destructor Documentation

◆ GeneralizedKelvinVoigtModel()

GeneralizedKelvinVoigtModel::GeneralizedKelvinVoigtModel ( const InputParameters &  parameters)

Definition at line 35 of file GeneralizedKelvinVoigtModel.C.

36  : GeneralizedKelvinVoigtBase(parameters),
37  _Ci(getParam<std::vector<Real>>("creep_modulus").size()),
38  _eta_i(getParam<std::vector<Real>>("creep_viscosity")),
39  _Si(getParam<std::vector<Real>>("creep_modulus").size())
40 {
41  Real young_modulus = getParam<Real>("young_modulus");
42  Real poisson_ratio = getParam<Real>("poisson_ratio");
43 
44  _C0.fillFromInputVector({young_modulus, poisson_ratio}, RankFourTensor::symmetric_isotropic_E_nu);
45  _S0 = _C0.invSymm();
46 
47  std::vector<Real> creep_modulus = getParam<std::vector<Real>>("creep_modulus");
48  std::vector<Real> creep_ratio;
49  if (isParamValid("creep_ratio"))
50  creep_ratio = getParam<std::vector<Real>>("creep_ratio");
51  else
52  creep_ratio.resize(_Ci.size(), poisson_ratio);
53 
54  if (creep_modulus.size() != _Ci.size())
55  mooseError("incompatible number of creep moduli and viscosities");
56  if (creep_ratio.size() != _Ci.size())
57  mooseError("incompatible number of creep ratios and viscosities");
58  if (!(_Ci.size() == _eta_i.size() || _Ci.size() + 1 == _eta_i.size()))
59  mooseError("incompatible number of creep ratios and viscosities");
60 
61  for (unsigned int i = 0; i < _Ci.size(); ++i)
62  {
63  _Ci[i].fillFromInputVector({creep_modulus[i], creep_ratio[i]},
64  RankFourTensor::symmetric_isotropic_E_nu);
65  _Si[i] = _Ci[i].invSymm();
66  }
67 
68  for (unsigned int i = 0; i < _eta_i.size(); ++i)
69  {
70  if (_eta_i[i] < 0 || MooseUtils::absoluteFuzzyEqual(_eta_i[i], 0.0))
71  mooseError("material viscosity must be strictly > 0");
72  }
73 
74  _components = _eta_i.size();
75  _has_longterm_dashpot = (_eta_i.size() == _Ci.size() + 1);
76 
79 }
void issueGuarantee(const MaterialPropertyName &prop_name, Guarantee guarantee)
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 > _Ci
The elasticity tensor of each subsequent spring.
void declareViscoelasticProperties()
Declare all necessary MaterialProperties for the model.
bool _has_longterm_dashpot
Indicates if the spring-dashpot assembly has a single dashpot not associated with a spring...
RankFourTensor _C0
The elasticity tensor associated with the first spring.
unsigned int _components
This is the number of internal variables required by the model.
GeneralizedKelvinVoigtBase(const InputParameters &parameters)
std::vector< RankFourTensor > _Si
The inverse of each subsequent spring elasticity tensor.

Member Function Documentation

◆ computeQpApparentCreepStrain()

void GeneralizedKelvinVoigtBase::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 87 of file GeneralizedKelvinVoigtBase.C.

88 {
89  _apparent_creep_strain[_qp].zero();
90 
91  for (unsigned int i = 0; i < _springs_elasticity_tensors.size(); ++i)
92  {
93  Real theta_i = computeTheta(_dt, (*_dashpot_viscosities[i])[_qp]);
94  Real gamma = (*_dashpot_viscosities[i])[_qp] / (_dt * theta_i);
95  _apparent_creep_strain[_qp] += (*_viscous_strains[i])[_qp] * (gamma / (1. + gamma));
96  }
97 
99  _apparent_creep_strain[_qp] += (*_viscous_strains.back())[_qp];
100 
102  {
103  RankFourTensor cumulated_driving_tensor;
104  cumulated_driving_tensor.zero();
105  for (unsigned int i = 0; i < _springs_elasticity_tensors.size(); ++i)
106  {
107  double theta_i = computeTheta(_dt, (*_dashpot_viscosities[i])[_qp]);
108  double gamma = (*_dashpot_viscosities[i])[_qp] / (_dt * theta_i);
109  cumulated_driving_tensor += (*_springs_elasticity_tensors_inv[i])[_qp] / (1. + gamma);
110  }
111 
112  _apparent_creep_strain[_qp] +=
113  (_elasticity_tensor[_qp] * cumulated_driving_tensor) * (*_driving_eigenstrain)[_qp];
114 
116  {
117  double theta_i = computeTheta(_dt, (*_dashpot_viscosities.back())[_qp]);
118  double gamma = (*_dashpot_viscosities.back())[_qp] / (_dt * theta_i);
119  _apparent_creep_strain[_qp] += (*_driving_eigenstrain)[_qp] / gamma;
120  }
121  }
122 }
std::vector< MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors_inv
std::vector< MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors
List of elasticity tensor of each subsequent spring in the chain.
bool _has_longterm_dashpot
Indicates if the spring-dashpot assembly has a single dashpot not associated with a spring...
std::vector< MaterialProperty< Real > * > _dashpot_viscosities
List of viscosities of each subsequent dashpot in the chain.
MaterialProperty< RankTwoTensor > & _apparent_creep_strain
The apparent creep strain resulting from the internal viscous strains.
const MaterialProperty< RankTwoTensor > * _driving_eigenstrain
Pointer to the value of the driving eigenstrain.
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
Real computeTheta(Real dt, Real viscosity) const
Provides theta as a function of the time step and a viscosity.
MaterialProperty< RankFourTensor > & _elasticity_tensor

◆ computeQpApparentElasticityTensors()

void GeneralizedKelvinVoigtBase::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 62 of file GeneralizedKelvinVoigtBase.C.

63 {
65  _elasticity_tensor_inv[_qp] = (*_first_elasticity_tensor_inv)[_qp];
66  _apparent_elasticity_tensor_inv[_qp] = (*_first_elasticity_tensor_inv)[_qp];
67 
68  for (unsigned int i = 0; i < _springs_elasticity_tensors.size(); ++i)
69  {
70  Real theta_i = computeTheta(_dt, (*_dashpot_viscosities[i])[_qp]);
71  Real gamma = (*_dashpot_viscosities[i])[_qp] / (_dt * theta_i);
73  (*_springs_elasticity_tensors_inv[i])[_qp] / (1. + gamma);
74  }
75 
77  {
78  Real theta_i = computeTheta(_dt, (*_dashpot_viscosities.back())[_qp]);
79  Real gamma = (*_dashpot_viscosities.back())[_qp] / (_dt * theta_i);
80  _apparent_elasticity_tensor_inv[_qp] += (*_first_elasticity_tensor_inv)[_qp] / gamma;
81  }
82 
84 }
std::vector< MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors_inv
std::vector< MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors
List of elasticity tensor of each subsequent spring in the chain.
bool _has_longterm_dashpot
Indicates if the spring-dashpot assembly has a single dashpot not associated with a spring...
MaterialProperty< RankFourTensor > & _apparent_elasticity_tensor
Apparent elasticity tensor. This is NOT the elasticity tensor of the material.
std::vector< MaterialProperty< Real > * > _dashpot_viscosities
List of viscosities of each subsequent dashpot in the chain.
MaterialProperty< RankFourTensor > & _first_elasticity_tensor
Elasticity tensor of a stand-alone elastic spring in the chain.
MaterialProperty< RankFourTensor > & _elasticity_tensor_inv
Instantaneous elasticity tensor. This IS the real elasticity tensor of the material.
Real computeTheta(Real dt, Real viscosity) const
Provides theta as a function of the time step and a viscosity.
MaterialProperty< RankFourTensor > & _elasticity_tensor
MaterialProperty< RankFourTensor > & _apparent_elasticity_tensor_inv
Inverse of the apparent elasticity tensor.

◆ computeQpElasticityTensor()

void LinearViscoelasticityBase::computeQpElasticityTensor ( )
finalprotectedvirtualinherited

Inherited from ComputeElasticityTensorBase.

Implements ComputeElasticityTensorBase.

Definition at line 191 of file LinearViscoelasticityBase.C.

192 {
195 }
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()

void ComputeElasticityTensorBase::computeQpProperties ( )
protectedvirtualinherited

Definition at line 41 of file ComputeElasticityTensorBase.C.

42 {
44 
45  // Multiply by prefactor
47  _elasticity_tensor[_qp] *= _prefactor_function->value(_t, _q_point[_qp]);
48 }
Function *const _prefactor_function
prefactor function to multiply the elasticity tensor with
virtual void computeQpElasticityTensor()=0
MaterialProperty< RankFourTensor > & _elasticity_tensor

◆ computeQpViscoelasticProperties()

void GeneralizedKelvinVoigtModel::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 82 of file GeneralizedKelvinVoigtModel.C.

83 {
85 
86  for (unsigned int i = 0; i < _Ci.size(); ++i)
87  (*_springs_elasticity_tensors[i])[_qp] = _Ci[i];
88 
89  for (unsigned int i = 0; i < _eta_i.size(); ++i)
90  (*_dashpot_viscosities[i])[_qp] = _eta_i[i];
91 }
std::vector< Real > _eta_i
The viscosity of each dashpot.
std::vector< MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors
List of elasticity tensor of each subsequent spring in the chain.
std::vector< RankFourTensor > _Ci
The elasticity tensor of each subsequent spring.
RankFourTensor _C0
The elasticity tensor associated with the first spring.
std::vector< MaterialProperty< Real > * > _dashpot_viscosities
List of viscosities of each subsequent dashpot in the chain.
MaterialProperty< RankFourTensor > & _first_elasticity_tensor
Elasticity tensor of a stand-alone elastic spring in the chain.

◆ computeQpViscoelasticPropertiesInv()

void GeneralizedKelvinVoigtModel::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 94 of file GeneralizedKelvinVoigtModel.C.

95 {
96  (*_first_elasticity_tensor_inv)[_qp] = _S0;
97 
98  for (unsigned int i = 0; i < _Si.size(); ++i)
99  (*_springs_elasticity_tensors_inv[i])[_qp] = _Si[i];
100 }
std::vector< MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors_inv
RankFourTensor _S0
The inverse of the elasticity tensor of the first spring.
std::vector< RankFourTensor > _Si
The inverse of each subsequent spring elasticity tensor.

◆ 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 215 of file LinearViscoelasticityBase.C.

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

216 {
217  if (MooseUtils::absoluteFuzzyEqual(dt, 0.0))
218  mooseError("linear viscoelasticity cannot be integrated over a dt of ", dt);
219 
220  switch (_integration_rule)
221  {
223  return 1.;
225  return 0.5;
227  return _theta;
229  return 1. / (1. - std::exp(-dt / viscosity)) - viscosity / dt;
230  default:
231  return 1.;
232  }
233  return 1.;
234 }
theta automatically adjusted as a function of the time step and the viscosity
Real _theta
User-defined value for theta.
IntegrationRule _integration_rule
Determines how theta is computed.

◆ declareViscoelasticProperties()

void LinearViscoelasticityBase::declareViscoelasticProperties ( )
protectedinherited

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.

Definition at line 101 of file LinearViscoelasticityBase.C.

Referenced by GeneralizedKelvinVoigtModel(), and GeneralizedMaxwellModel::GeneralizedMaxwellModel().

102 {
103  for (unsigned int i = 0; i < _components; ++i)
104  {
105  std::string ith = Moose::stringify(i + 1);
106 
107  if (!_has_longterm_dashpot || (_components > 0 && i < _components - 1))
108  {
109  _springs_elasticity_tensors.push_back(
110  &declareProperty<RankFourTensor>(_base_name + "spring_elasticity_tensor_" + ith));
111  getMaterialPropertyOld<RankFourTensor>(_base_name + "spring_elasticity_tensor_" + ith);
112  }
113 
114  _dashpot_viscosities.push_back(&declareProperty<Real>(_base_name + "dashpot_viscosity_" + ith));
115  _dashpot_viscosities_old.push_back(
116  &getMaterialPropertyOld<Real>(_base_name + "dashpot_viscosity_" + ith));
117 
118  _viscous_strains.push_back(
119  &declareProperty<RankTwoTensor>(_base_name + "viscous_strain_" + ith));
120  _viscous_strains_old.push_back(
121  &getMaterialPropertyOld<RankTwoTensor>(_base_name + "viscous_strain_" + ith));
122 
124  {
125  _springs_elasticity_tensors_inv.push_back(&declareProperty<RankFourTensor>(
126  _base_name + "spring_elasticity_tensor_" + ith + "_inv"));
127  _springs_elasticity_tensors_inv_old.push_back(&getMaterialPropertyOld<RankFourTensor>(
128  _base_name + "spring_elasticity_tensor_" + ith + "_inv"));
129  }
130  }
131 }
std::vector< MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors_inv
std::vector< MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors
List of elasticity tensor of each subsequent spring in the chain.
std::vector< const MaterialProperty< RankTwoTensor > * > _viscous_strains_old
std::vector< const MaterialProperty< Real > * > _dashpot_viscosities_old
bool _has_longterm_dashpot
Indicates if the spring-dashpot assembly has a single dashpot not associated with a spring...
bool _need_viscoelastic_properties_inverse
If active, indicates that we need to call computeQpViscoelasticPropertiesInv()
std::vector< MaterialProperty< Real > * > _dashpot_viscosities
List of viscosities of each subsequent dashpot in the chain.
std::vector< const MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors_inv_old
unsigned int _components
This is the number of internal variables required by the model.
std::vector< MaterialProperty< RankTwoTensor > * > _viscous_strains

◆ 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 134 of file LinearViscoelasticityBase.C.

135 {
136  if (_components != _viscous_strains.size())
137  mooseError(
138  "inconsistent numbers of dashpots and viscous strains in LinearViscoelasticityBase;"
139  " Make sure declareViscoelasticProperties has been called in the viscoelastic model");
140 
141  _apparent_creep_strain[_qp].zero();
142  _apparent_elasticity_tensor[_qp].zero();
144  _elasticity_tensor_inv[_qp].zero();
145  _first_elasticity_tensor[_qp].zero();
147  (*_first_elasticity_tensor_inv)[_qp].zero();
148 
149  for (unsigned int i = 0; i < _components; ++i)
150  {
151  if (!_has_longterm_dashpot || (_components > 0 && i < _components - 1))
152  {
153  (*_springs_elasticity_tensors[i])[_qp].zero();
155  (*_springs_elasticity_tensors_inv[i])[_qp].zero();
156  }
157 
158  (*_dashpot_viscosities[i])[_qp] = 0.0;
159  (*_viscous_strains[i])[_qp].zero();
160  }
161 }
std::vector< MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors_inv
std::vector< MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors
List of elasticity tensor of each subsequent spring in the chain.
bool _has_longterm_dashpot
Indicates if the spring-dashpot assembly has a single dashpot not associated with a spring...
bool _need_viscoelastic_properties_inverse
If active, indicates that we need to call computeQpViscoelasticPropertiesInv()
MaterialProperty< RankFourTensor > & _apparent_elasticity_tensor
Apparent elasticity tensor. This is NOT the elasticity tensor of the material.
std::vector< MaterialProperty< Real > * > _dashpot_viscosities
List of viscosities of each subsequent dashpot in the chain.
MaterialProperty< RankFourTensor > & _first_elasticity_tensor
Elasticity tensor of a stand-alone elastic spring in the chain.
unsigned int _components
This is the number of internal variables required by the model.
MaterialProperty< RankTwoTensor > & _apparent_creep_strain
The apparent creep strain resulting from the internal viscous strains.
MaterialProperty< RankFourTensor > & _elasticity_tensor_inv
Instantaneous elasticity tensor. This IS the real elasticity tensor of the material.
std::vector< MaterialProperty< RankTwoTensor > * > _viscous_strains
MaterialProperty< RankFourTensor > & _apparent_elasticity_tensor_inv
Inverse of the apparent elasticity tensor.

◆ 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 164 of file LinearViscoelasticityBase.C.

Referenced by LinearViscoelasticityBase::computeQpElasticityTensor().

165 {
166  unsigned int qp_prev = _qp;
167  _qp = qp;
168 
169  if (_t_step >= 1)
170  _step_zero = false;
171 
172  // 1. we get the viscoelastic properties and their inverse if needed
176 
177  // 2. we update the internal viscous strains from the previous time step
179 
180  // 3. we compute the apparent elasticity tensor
182 
183  // 4. we transform the internal viscous strains in an apparent creep strain
184  if (!_step_zero)
186 
187  _qp = qp_prev;
188 }
bool & _step_zero
checks whether we are at the first time step
bool _need_viscoelastic_properties_inverse
If active, indicates that we need to call computeQpViscoelasticPropertiesInv()
virtual void computeQpApparentElasticityTensors()=0
This method computes the apparent elasticity tensor used in the internal time-stepping scheme...
virtual void computeQpViscoelasticProperties()=0
This method assigns the mechanical properties of each spring and dashpot in the system.
virtual void computeQpApparentCreepStrain()=0
This method computes the apparent creep strain corresponding to the current viscous_strain of each da...
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.

◆ revokeGuarantee()

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

Definition at line 34 of file GuaranteeProvider.C.

Referenced by ComputeElasticityTensorCP::ComputeElasticityTensorCP().

35 {
36  auto it = _guarantees.find(prop_name);
37  if (it != _guarantees.end())
38  it->second.erase(guarantee);
39 }
std::map< MaterialPropertyName, std::set< Guarantee > > _guarantees

◆ updateQpViscousStrains()

void GeneralizedKelvinVoigtBase::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 32 of file GeneralizedKelvinVoigtBase.C.

33 {
34  if (_t_step <= 1)
35  return;
36 
37  RankTwoTensor effective_stress = _first_elasticity_tensor_old[_qp] * _elastic_strain_old[_qp];
38 
40  effective_stress += _first_elasticity_tensor_old[_qp] * (*_driving_eigenstrain_old)[_qp];
41 
42  for (unsigned int i = 0; i < _springs_elasticity_tensors.size(); ++i)
43  {
44  Real theta_i = computeTheta(_dt_old, (*_dashpot_viscosities_old[i])[_qp]);
45  Real gamma = (*_dashpot_viscosities_old[i])[_qp] / (_dt_old * theta_i);
46  (*_viscous_strains[i])[_qp] =
47  ((*_springs_elasticity_tensors_inv_old[i])[_qp] * effective_stress) /
48  (theta_i * (1. + gamma));
49  (*_viscous_strains[i])[_qp] += (*_viscous_strains_old[i])[_qp] *
50  (gamma / (theta_i * (1. + gamma)) - (1. - theta_i) / theta_i);
51  }
52 
54  {
55  (*_viscous_strains.back())[_qp] = (_first_elasticity_tensor_inv_old[_qp] * effective_stress) *
56  (_dt_old / (*_dashpot_viscosities_old.back())[_qp]);
57  (*_viscous_strains.back())[_qp] += (*_viscous_strains_old.back())[_qp];
58  }
59 }
std::vector< MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors
List of elasticity tensor of each subsequent spring in the chain.
std::vector< const MaterialProperty< RankTwoTensor > * > _viscous_strains_old
std::vector< const MaterialProperty< Real > * > _dashpot_viscosities_old
bool _has_longterm_dashpot
Indicates if the spring-dashpot assembly has a single dashpot not associated with a spring...
const MaterialProperty< RankTwoTensor > & _elastic_strain_old
previous value of the elastic strain for update purposes
const MaterialProperty< RankFourTensor > & _first_elasticity_tensor_old
old material properties required for the update of the viscoelastic strain
std::vector< const MaterialProperty< RankFourTensor > * > _springs_elasticity_tensors_inv_old
const MaterialProperty< RankFourTensor > & _first_elasticity_tensor_inv_old
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
Real computeTheta(Real dt, Real viscosity) const
Provides theta as a function of the time step and a viscosity.

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 241 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

std::string ComputeElasticityTensorBase::_base_name
protectedinherited

◆ _C0

RankFourTensor GeneralizedKelvinVoigtModel::_C0
protected

The elasticity tensor associated with the first spring.

This is the true elasticity tensor of the material

Definition at line 39 of file GeneralizedKelvinVoigtModel.h.

Referenced by computeQpViscoelasticProperties(), and GeneralizedKelvinVoigtModel().

◆ _Ci

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

The elasticity tensor of each subsequent spring.

Definition at line 41 of file GeneralizedKelvinVoigtModel.h.

Referenced by computeQpViscoelasticProperties(), and GeneralizedKelvinVoigtModel().

◆ _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 213 of file LinearViscoelasticityBase.h.

Referenced by LinearViscoelasticityBase::declareViscoelasticProperties(), GeneralizedKelvinVoigtModel(), GeneralizedMaxwellModel::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 251 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>* LinearViscoelasticityBase::_driving_eigenstrain
protectedinherited

Pointer to the value of the driving eigenstrain.

Definition at line 258 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 256 of file LinearViscoelasticityBase.h.

◆ _driving_eigenstrain_old

const MaterialProperty<RankTwoTensor>* LinearViscoelasticityBase::_driving_eigenstrain_old
protectedinherited

Definition at line 259 of file LinearViscoelasticityBase.h.

◆ _elastic_strain_old

const MaterialProperty<RankTwoTensor>& LinearViscoelasticityBase::_elastic_strain_old
protectedinherited

previous value of the elastic strain for update purposes

Definition at line 245 of file LinearViscoelasticityBase.h.

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

◆ _elasticity_tensor

MaterialProperty<RankFourTensor>& ComputeElasticityTensorBase::_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 203 of file LinearViscoelasticityBase.h.

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

◆ _elasticity_tensor_name

std::string ComputeElasticityTensorBase::_elasticity_tensor_name
protectedinherited

◆ _eta_i

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

The viscosity of each dashpot.

Definition at line 43 of file GeneralizedKelvinVoigtModel.h.

Referenced by computeQpViscoelasticProperties(), and GeneralizedKelvinVoigtModel().

◆ _first_elasticity_tensor

MaterialProperty<RankFourTensor>& LinearViscoelasticityBase::_first_elasticity_tensor
protectedinherited

◆ _first_elasticity_tensor_inv

MaterialProperty<RankFourTensor>* LinearViscoelasticityBase::_first_elasticity_tensor_inv
protectedinherited

◆ _first_elasticity_tensor_inv_old

const MaterialProperty<RankFourTensor>& GeneralizedKelvinVoigtBase::_first_elasticity_tensor_inv_old
protectedinherited

◆ _first_elasticity_tensor_old

const MaterialProperty<RankFourTensor>& GeneralizedKelvinVoigtBase::_first_elasticity_tensor_old
protectedinherited

old material properties required for the update of the viscoelastic strain

Definition at line 47 of file GeneralizedKelvinVoigtBase.h.

Referenced by GeneralizedKelvinVoigtBase::updateQpViscousStrains().

◆ _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 267 of file LinearViscoelasticityBase.h.

Referenced by LinearViscoelasticityBase::computeQpElasticityTensor().

◆ _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 191 of file LinearViscoelasticityBase.h.

Referenced by LinearViscoelasticityBase::computeTheta().

◆ _need_viscoelastic_properties_inverse

bool LinearViscoelasticityBase::_need_viscoelastic_properties_inverse
protectedinherited

◆ _prefactor_function

Function* const ComputeElasticityTensorBase::_prefactor_function
protectedinherited

prefactor function to multiply the elasticity tensor with

Definition at line 42 of file ComputeElasticityTensorBase.h.

Referenced by ComputeLayeredCosseratElasticityTensor::computeQpElasticityTensor(), and ComputeElasticityTensorBase::computeQpProperties().

◆ _S0

RankFourTensor GeneralizedKelvinVoigtModel::_S0
protected

The inverse of the elasticity tensor of the first spring.

Definition at line 46 of file GeneralizedKelvinVoigtModel.h.

Referenced by computeQpViscoelasticPropertiesInv(), and GeneralizedKelvinVoigtModel().

◆ _Si

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

The inverse of each subsequent spring elasticity tensor.

Definition at line 48 of file GeneralizedKelvinVoigtModel.h.

Referenced by computeQpViscoelasticPropertiesInv(), and GeneralizedKelvinVoigtModel().

◆ _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 270 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: